Datasets:
Add files using upload-large-folder tool
Browse files- parse/dev/1QQnYd02etI/1QQnYd02etI_middle.json +0 -0
- parse/dev/Bl8CQrx2Up4/Bl8CQrx2Up4_middle.json +0 -0
- parse/dev/Bl8CQrx2Up4/Bl8CQrx2Up4_model.json +0 -0
- parse/dev/RRGVCN8kjim/RRGVCN8kjim.md +349 -0
- parse/dev/RRGVCN8kjim/RRGVCN8kjim_content_list.json +0 -0
- parse/dev/RRGVCN8kjim/RRGVCN8kjim_model.json +0 -0
- parse/dev/Xu8aG5Q8M3/Xu8aG5Q8M3.md +437 -0
- parse/dev/b9APFSTylGT/b9APFSTylGT.md +422 -0
- parse/dev/b9APFSTylGT/b9APFSTylGT_content_list.json +1238 -0
- parse/dev/b9APFSTylGT/b9APFSTylGT_middle.json +0 -0
- parse/dev/b9APFSTylGT/b9APFSTylGT_model.json +0 -0
- parse/dev/eLxADkHrBcR/eLxADkHrBcR.md +245 -0
- parse/dev/eLxADkHrBcR/eLxADkHrBcR_content_list.json +1338 -0
- parse/dev/eLxADkHrBcR/eLxADkHrBcR_middle.json +0 -0
- parse/dev/eLxADkHrBcR/eLxADkHrBcR_model.json +0 -0
- parse/dev/x5mtJD2ovc/x5mtJD2ovc_middle.json +0 -0
- parse/dev/x6INXlnUGro/x6INXlnUGro.md +237 -0
- parse/dev/x6INXlnUGro/x6INXlnUGro_content_list.json +942 -0
- parse/dev/x6INXlnUGro/x6INXlnUGro_model.json +0 -0
- parse/dev/xp5VOBxTxZ/xp5VOBxTxZ.md +478 -0
parse/dev/1QQnYd02etI/1QQnYd02etI_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/Bl8CQrx2Up4/Bl8CQrx2Up4_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/Bl8CQrx2Up4/Bl8CQrx2Up4_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/RRGVCN8kjim/RRGVCN8kjim.md
ADDED
|
@@ -0,0 +1,349 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SPARSE DETR: EFFICIENT END-TO-END OBJECT DETECTION WITH LEARNABLE SPARSITY
|
| 2 |
+
|
| 3 |
+
Byungseok $\mathbf { R o h } ^ { 1 * \dagger }$ , JaeWoong $\mathbf { S h i n ^ { 2 * \ddagger } }$ , Wuhyun $\mathbf { S h i n ^ { 1 * } }$ , Saehoon Kim1
|
| 4 |
+
1KakaoBrain
|
| 5 |
+
2Lunit
|
| 6 |
+
|
| 7 |
+
{peter.roh,aiden.hsin,sam.kim}@kakaobrain.com jwoong.shin@lunit.io
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
DETR is the first end-to-end object detector using a transformer encoder-decoder architecture and demonstrates competitive performance but low computational efficiency on high resolution feature maps. The subsequent work, Deformable DETR, enhances the efficiency of DETR by replacing dense attention with deformable attention, which achieves $1 0 \times$ faster convergence and improved performance. Deformable DETR uses the multiscale feature to ameliorate performance, however, the number of encoder tokens increases by $2 0 \times$ compared to DETR, and the computation cost of the encoder attention remains a bottleneck. In our preliminary experiment, we observe that the detection performance hardly deteriorates even if only a part of the encoder token is updated. Inspired by this observation, we propose Sparse DETR that selectively updates only the tokens expected to be referenced by the decoder, thus help the model effectively detect objects. In addition, we show that applying an auxiliary detection loss on the selected tokens in the encoder improves the performance while minimizing computational overhead. We validate that Sparse DETR achieves better performance than Deformable DETR even with only $10 \%$ encoder tokens on the COCO dataset. Albeit only the encoder tokens are sparsified, the total computation cost decreases by $38 \%$ and the frames per second (FPS) increases by $42 \%$ compared to Deformable DETR. Code is available at https://github.com/kakaobrain/sparse-detr.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
In recent years, we have witnessed the dramatic advancement and the success of object detection in deep learning. Diverse object detection methods have been proposed, but the existing algorithms that perform positive matching with the ground truth as a heuristic way require non-maximum suppression (NMS) post-processing of near-duplicate predictions. Recently, Carion et al. (2020) has introduced a fully end-to-end detector DETR by eliminating the need for NMS post-processing through a set-based objective. The training objective is designed by employing the Hungarian algorithm that considers both classification and regression costs, and achieves highly competitive performance. However, DETR is unable to use multi-scale features such as feature pyramid networks (Lin et al., 2017), which are commonly used in object detection to improve the detection of small objects. The main reason is increased memory usage and computation by adding Transformer (Vaswani et al., 2017) architecture. As a result, its ability to detect small objects is relatively poor.
|
| 16 |
+
|
| 17 |
+
To address this problem, Zhu et al. (2021) has proposed a deformable-attention inspired by the deformable convolution (Dai et al., 2017) and reduced the quadratic complexity to linear complexity through key sparsification in the attention module. By using deformable attention, deformable DETR addresses the slow convergence and high complexity issue of DETR, which enables the encoder to use multi-scale features as an input and significantly improves performance on detecting small objects. However, using the multi-scale features as an encoder input increases the number of tokens to be processed by about 20 times. Eventually, despite efficient computation for the same token length, the overall complexity increases back again, making the model inference slower even than vanilla DETR.
|
| 18 |
+
|
| 19 |
+
In general, natural images often contain large background regions irrelevant to the objects of interest, and accordingly, in end-to-end detectors, the tokens corresponding to the background also occupy a significant portion. In addition, the importance of each regional feature is not identical, which has been proven by the two-stage detectors successfully do their job by focusing only on the foreground. It suggests that there exists considerable regional redundancy that can be reduced in the detection tasks and seeking to devise an efficient detector focusing on the salient regions is a necessary and natural direction. In our preliminary experiments, we observe the following: (a) during inference of a fully-converged Deformable DETR model on the COCO validation dataset, the encoder tokens referenced by the decoder account for only about $45 \%$ of the total, and (b) retraining a new detector while updating only the encoder tokens preferred by the decoder from another fully-trained detector, barely suffers performance loss(0.1 AP degradation). See Appendix A.9 for the details.
|
| 20 |
+
|
| 21 |
+
Inspired by this observation, we propose a learnable decoder cross-attention map predictor to sparsify encoder tokens. In the existing methods (Carion et al., 2020; Zhu et al., 2021), the encoder takes all the tokens, i.e. the backbone features combined with corresponding positional embeddings, as input without discrimination. Meanwhile, our approach distinguishes encoder tokens to be referenced later in the decoder and considers only those tokens in self-attention. Therefore, this can significantly reduce the number of encoder tokens involved in the computation and reduce the total computational cost. We further propose the encoder auxiliary loss for selected encoder tokens to improve detection performance while minimizing computational overhead. The proposed auxiliary loss not only improves performance, but also allows training a larger number of encoder layers.
|
| 22 |
+
|
| 23 |
+
Extensive experiments on the COCO 2017 benchmark (Lin et al., 2014) demonstrate that Sparse DETR effectively reduces computational cost while achieving better detection performance. Without bells and whistles, Sparse DETR using Swin-T (Liu et al., 2021) backbone achieves $4 8 . 2 \mathrm { \ A P }$ with $38 \%$ reduction of the entire computational cost compared to the 48.0 AP baseline and $4 9 . 2 \mathrm { \ A P }$ with $23 \%$ reduction. In the case of the experiment that achieves 48.2 AP using only $10 \%$ of encoder tokens, the computational cost of the transformer encoder block is reduced by approximately $82 \%$ .
|
| 24 |
+
|
| 25 |
+
We summarize our contributions as follows:
|
| 26 |
+
|
| 27 |
+
• We propose encoder token sparsification method for an efficient end-to-end object detector, by which we lighten the attention complexity in the encoder. This efficiency enables stacking more encoder layers than Deformable DETR, leading to performance improvement within the same computational budget.
|
| 28 |
+
• We propose two novel sparsification criteria to sample the informative subset from the entire token set: Objectness Score $( O S )$ and Decoder cross-Attention Map (DAM). Based on the decoder cross-attention map criterion, the sparsified model preserves detection performance even when using only $10 \%$ of the whole tokens.
|
| 29 |
+
We adopt an encoder auxiliary loss only for the selected tokens. This additional loss not only stabilizes the learning process, but also greatly improves performance, with only marginally increased training time.
|
| 30 |
+
|
| 31 |
+
# 2 RELATED WORK
|
| 32 |
+
|
| 33 |
+
Efficient computation in vision transformers. It is a well-known problem that the attention computation in Transformers incurs the high time and memory complexity. The vision transformers need to digest even bigger token sets as input so that a large body of works (Parmar et al., 2018; Child et al., 2019a; Ho et al., 2019; Wang et al., 2020; Katharopoulos et al., 2020; Choromanski et al., 2021; Kitaev et al., 2020) has been proposed lightweight attention mechanisms for them. Most of those works shed light on the complexity that resides only in a single-scale attention module, which hinders direct extension to the multi-scale features generally required in object detection.
|
| 34 |
+
|
| 35 |
+
One of the promising approaches for the lighter transformer attention is input-dependent token sparsification. DynamicViT (Rao et al., 2021) and IA-RED $^ 2$ (Pan et al., 2021), similar to our work, both propose jointly-learned token selectors generating the sparsity patterns to be overlaid on the input tokens. Those approaches mainly focus on sparsifying a backbone network evaluated on the classification tasks, while our interest lies in a sparse encoder of the end-to-end object detectors.
|
| 36 |
+
|
| 37 |
+
On the other hand, there has been a line of works sharing the spirit with ours in that they aim at sparse transformers in the DETR-based framework. Deformable DETR (Zhu et al., 2021) conducts sparse attention computation by sampling only a fraction of the entire key set with learnable 2-d offsets, which enables to use multi-scale feature maps with a reasonable computational cost. It can be viewed as a key sparsification method but with dense queries, while our approach further reduces the query set pursuing even more sparsity. PnP-DETR (Wang et al., 2021) shortens the token length of the transformer encoder by introducing the Polling and Pull (PnP) module to sample the foreground tokens and condense the background tokens into a smaller set. However, their method cannot naively be integrated with Deformable DETR, since their sparsification breaks the 2d spatial structure of the token set assumed in the deformable attention. On the contrary, Sparse DETR preserves the 2d sample space of the set and can be seamlessly combined with the deformable attention, which facilitates handling the multi-scale features. Thus, our approach gets benefits from both the deformable key sampling and the proposed query sparsification. Most of all, we propose explicit objectives for the token selection network, whereas the aforementioned works have no explicit objective implying their beliefs in a good selection strategy, merely relying on the final detection objective.
|
| 38 |
+
|
| 39 |
+
Auxiliary Loss. Auxiliary loss (Lee et al., 2015; Szegedy et al., 2015) is widely adopted to deliver gradients to the early layers of deep networks. DETR variants employ auxiliary Hungarian matching objectives at the end of every decoder layer with extra FFN heads so that each decoder layer directly learns to detect the correct number of objects out of the decoder’s outputs. Unlike the decoder’s object queries whose number is relatively small(e.g. 300), the number of encoder’s tokens has much larger scales when using multi-scale features. Thus, extending the layerwise auxiliary loss to the multi-scale encoder increases the training time cost by feeding too many tokens to the attached FFN heads. In Sparse DETR, thanks to the sparsity already induced in the encoder, we can instantly economize that cost while enjoying the auxiliary gradients in a wider range of intermediate layers.
|
| 40 |
+
|
| 41 |
+
# 3 APPROACH
|
| 42 |
+
|
| 43 |
+
In this section, we present our main contributions: (a) formulating a generalized saliency-based token sparsification scheme for the encoder, (b) proposing the effective saliency criteria with which that scheme can practically work, and (c) employing the encoder auxiliary losses and the top- $k$ decoder query selection to improve the performance. Before describing the details, we revisit the key components of DETR (Carion et al., 2020) and Deformable DETR (Zhu et al., 2021).
|
| 44 |
+
|
| 45 |
+
# 3.1 PRELIMINARY
|
| 46 |
+
|
| 47 |
+
DETR. DETR takes the flattened spatial feature map ${ \bf x } _ { \mathrm { f e a t } } \in \mathbb { R } ^ { N \times D }$ from a backbone network into the transformer encoder, where $N$ denotes the number of tokens (i.e. features) and $D$ denotes token dimension. The encoder iteratively updates $\mathbf { x } _ { \mathrm { f e a t } }$ by several vanilla self-attention modules. Then, the transformer decoder takes both the refined encoder tokens (i.e. encoder output) and $M$ learnable object queries $\{ q _ { i } \} _ { i = 1 \cdots M }$ as inputs and predicts a tuple of a class score $\mathbf { c } \in [ \bar { 0 } , 1 ] ^ { C }$ and a bounding box $\mathbf { b } \in [ 0 , 1 ] ^ { 4 }$ for each object query $q _ { i }$ , denoted as $\{ \hat { \bf y } _ { i } \} = \{ ( { \bf c } _ { i } , { \bf b } _ { i } ) \}$ , where $C$ denotes the number of classes. All components including the backbone network are jointly trained by performing the bipartite matching between the ground truth $\left\{ \mathbf { y } _ { i } \right\}$ and predictions $\left\{ \hat { \mathbf { y } } _ { i } \right\}$ .
|
| 48 |
+
|
| 49 |
+
Deformable DETR. Deformable DETR replaces the vanilla dense attention, which is the main computational bottleneck in DETR, with a deformable attention module. This significantly reduces the computational cost and improves the convergence. Suppose that we have the same size of a set of queries (denoted as $\Omega _ { q } )$ ) and a set of keys (denoted as $\Omega _ { k }$ ), which means $| \Omega _ { q } | = | \Omega _ { k } | =$ $N$ . The conventional dense attention computes the attention weight $A _ { q k }$ for every pair $\{ ( q , k ) :$ $q \in \Omega _ { q } , k \in \Omega _ { k } \}$ , resulting in quadratic complexity with respect to $N$ . Deformable attention reduces this quadratic complexity into the linear one by only considering relevant keys for each query. Specifically, deformable attention computes attention weight $A _ { q k }$ for all queries and a small set of keys: $\{ ( q , \dot { k } ) : q \in \Omega _ { q } , k \in \Omega _ { q k } \}$ , where $\Omega _ { q k } \subset \Omega _ { k }$ and $\left| \Omega _ { q k } \right| = \mathbf { \bar { \Psi } } K \ll N$ .
|
| 50 |
+
|
| 51 |
+
Due to this key sparsification, Deformable DETR is able to use the multi-scale features of the backbone network, improving the detection performance of small objects significantly. Paradoxically, using the multi-scale feature increases the number of tokens in the transformer encoder by about $2 0 \times$ compared to DETR, making that the encoder becomes the computational bottleneck of deformable DETR. This motivates us to develop a sparsification method to reduce the number of tokens in the encoder aggressively, which is described in the next sections.
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
Figure 1: Attention complexity. The circles in the square matrix represent the attention between keys and queries. The gray/white circles correspond to preserved/removed connection respectively, and darker gray on the diagonal positions means where the token attends to itself. (a) Dense attention in DETR takes quadratic complexity. (b) Deformable DETR uses key sparsification, thus takes linear complexity. (c) Sparse DETR further uses query sparsification. Attention in Sparse DETR also takes linear complexity, but is much lighter than Deformable DETR’s.
|
| 55 |
+
|
| 56 |
+
# 3.2 ENCODER TOKEN SPARSIFICATION
|
| 57 |
+
|
| 58 |
+
In this section, we introduce our token sparsification scheme that the encoder module selectively refines a small number of encoder tokens. This encoder token subset is obtained from the backbone feature map $\mathbf { X } _ { \mathrm { f e a t } }$ with a certain criterion, which is described in the subsequent section. For features that are not updated in this process, the values of $\mathbf { X } _ { \mathrm { f e a t } }$ are passed through the encoder layers without being changed.
|
| 59 |
+
|
| 60 |
+
Formally, suppose that we have a scoring network $g : \mathbb { R } ^ { d } \mathbb { R }$ that measures saliency of each token in $\mathbf { x } _ { \mathrm { f e a t } }$ . We then define $\rho$ -salient regions $\Omega _ { s } ^ { \rho }$ as the top- $\cdot \rho \%$ tokens with the highest scores, for a given keeping ratio $\rho$ , i.e. $S = | \Omega _ { s } ^ { \rho } | = \rho \cdot | \Omega _ { q } | \ll | \Omega _ { q } | = N$ . Then, the $i$ -th encoder layer updates the features $\mathbf { x } _ { i - 1 }$ by:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\mathbf { x } _ { i } ^ { j } = \left\{ \begin{array} { l l } { \mathbf { x } _ { i - 1 } ^ { j } } & { j \notin \Omega _ { s } ^ { \rho } } \\ { \operatorname { L N } ( \operatorname { F F N } ( \mathbf { z } _ { i } ^ { j } ) + \mathbf { z } _ { i } ^ { j } ) } & { j \in \Omega _ { s } ^ { \rho } , \mathrm { ~ w h e r e ~ } \mathbf { z } _ { i } ^ { j } = \operatorname { L N } ( \operatorname { D e f A t t n } ( \mathbf { x } _ { i - 1 } ^ { j } , \mathbf { x } _ { i - 1 } ) + \mathbf { x } _ { i - 1 } ^ { j } ) , } \end{array} \right.
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
where DefAttn refers to deformable attention, LN to layer normalization (Ba et al., 2016), and FFN to a feed-forward network. Even in the case of unselected tokens, the values are still passed through the encoder layer, so they can be referenced as keys when updating the selected tokens. This means that the unselected tokens can hand over information to the selected tokens without losing the value of themselves while minimizing the computational cost. Here, we use deformable attention for refining tokens in $\Omega _ { s } ^ { \rho }$ , but the proposed encoder token sparsification is applicable regardless of which attention method the encoder uses.
|
| 67 |
+
|
| 68 |
+
Complexity of Attention Modules in Encoder. Deformable DETR reduces the attention complexity through key sparsification, and we further reduce the attention complexity through query sparsification, as shown in Fig. 1. Conventional dense attention in DETR requires quadratic complexity $O ( N ^ { 2 } )$ , where $N$ is the query length. Deformable attention requires linear complexity $O ( N K )$ , where $K \ll N$ is the number of keys for each query. Sparse attention requires only $O ( S K )$ , where $S \ll N$ is the number of salient encoder queries.
|
| 69 |
+
|
| 70 |
+
# 3.3 FINDING SALIENT ENCODER TOKENS
|
| 71 |
+
|
| 72 |
+
In this section, we introduce how to find a salient token set $\Omega _ { s } ^ { \rho }$ from a backbone feature $\mathbf { x } _ { \mathrm { f e a t } }$ . We propose a method for determining saliency using a cross attention map from the transformer decoder. Before presenting our approach, we first discuss a simple yet effective method based on the objectness scores obtained from a separate detection head. The limitation of this simple approach motivates us to develop an advanced one, which is described in the following paragraph.
|
| 73 |
+
|
| 74 |
+

|
| 75 |
+
Figure 2: Illustration on how to learn a scoring network by predicting binarized Decoder crossAttention Map (DAM), where a dashed orange arrow means a backpropagation path. The bottom box shows the forward/backward passes in Sparse DETR, and the top boxes present how to construct DAM for learning the scoring network. See Appendix A.1 for implementation details of scoring net.
|
| 76 |
+
|
| 77 |
+
Objectness Score. Measuring objectness per each input token (i.e. feature $\mathbf { x } _ { \mathrm { f e a t . } }$ ) of encoder is very natural to determine which ones from a backbone feature should be further updated in the transformer encoder. It is widely known that feature map from a pretrained backbone network is able to find the saliency of objects, which is why the region proposal network (RPN) has been successfully adopted in many object detectors (Ren et al., 2015; Dai et al., 2016; He et al., 2017). Inspired by this observation, we introduce an additional detection head and Hungarian loss to the backbone feature map, where the structure of the newly added head is the same as the one of the final detection head in the decoder. Then, we can select the top- $\rho \%$ encoder tokens with the highest class scores as a salient token set $\Omega _ { s } ^ { \rho }$ . This approach is effective to sparsify encoder tokens, but we believe that it is sub-optimal to the transformer decoder, because the selected encoder tokens from the separate detection head are not explicitly considered for the decoder.
|
| 78 |
+
|
| 79 |
+
Decoder Cross-Attention Map. We consider another approach to select a subset of encoder tokens that are highly relevant to the decoder in a more explicit manner. We observe that the crossattention maps from the transformer decoder could be used for measuring the saliency, because the decoder gradually attends to a subset of encoder output tokens that are favorable to detect objects as training continues. Motivated by this, we introduce a scoring network that predicts a pseudo groundtruth of the saliency defined by decoder cross-attention maps, and use it to determine which encoder tokens should be further refined on the fly. Fig. 2 summarizes how to train a scoring network, and details are presented below.
|
| 80 |
+
|
| 81 |
+
To determine the saliency of each input token of encoder $\mathbf { x } _ { \mathrm { f e a t } }$ , we have to aggregate the decoder cross-attentions between all object queries and the encoder output. This procedure produces a single map of the same size as the feature map from the backbone, which is defined as Decoder crossAttention Map (DAM). In the case of the dense attention, DAM can be easily obtained by summing up attention maps from every decoder layer. In case of deformable attention, for each encoder token, the corresponding value of DAM can be obtained by accumulating the attention weights of decoder object queries whose attention offsets are directed toward the encoder output tokens. Refer to the Appendix A.2 for the details in the DAM creation.
|
| 82 |
+
|
| 83 |
+
To train the scoring network, we binarize DAM so that the top- $\cdot \rho \%$ (by attention weights) of encoder tokens is only retained. This is because our goal is to find a small subset of encoder tokens that the decoder references the most, rather than precisely predicting how much each encoder token will be referenced by the decoder. This binarized DAM implies the one-hot target that indicates whether each encoder token is included in the top- $\cdot \rho \%$ most referenced encoder tokens. Then, we consider a 4-layer scoring network $g$ to predict how likely a given encoder token is included in the top- $\rho \%$ most referenced tokens, and the network is trained by minimizing the binary cross entropy (BCE) loss between the binarized DAM and prediction:
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
\mathcal { L } _ { d a m } = - \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \mathrm { { B C E } } ( g ( \mathbf { x } _ { \mathrm { { f e a t } } } ) _ { i } , \mathbf { D A M } _ { i } ^ { \mathrm { { b i n } } } ) ,
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+

|
| 90 |
+
Figure 3: Sparse DETR architecture. Sparse DETR introduces three additional components: (a) the scoring network, (b) auxiliary heads in the encoder, and (c) the auxiliary head to select the top- $k$ tokens for the decoder. Sparse DETR measures the saliency of encoder tokens by using the scoring network, and selects the top- $\cdot \rho \%$ tokens, which is referred to as (1) in the diagram. After refining only the selected tokens in the encoder blocks, the auxiliary head selects the top- $k$ tokens from the encoder output, which is served as the decoder object queries. This process is referred to as (2) in the diagram. In addition, we remark that additional auxiliary heads in each encoder block play a key role in achieving improved performance. Only sparsified encoder tokens are passed to the encoder auxiliary heads for efficiency. All auxiliary heads in the encoder and decoder are trained with a Hungarian loss as described in Deformable DETR (Zhu et al., 2021).
|
| 91 |
+
|
| 92 |
+
where $\mathrm { D A M } _ { i } ^ { \mathrm { b i n } }$ means the binarized DAM value of the ith encoder token.
|
| 93 |
+
|
| 94 |
+
One may say that since DAM in the early phase of training is not accurate, pruning out the encoder tokens based on the result in the decoder degrades the final performance or hurts the convergence. However, we empirically observe that the optimization is very stable even in the early phase of training, and achieves better performance compared to the method based on objectness score. We describe detailed comparisons in the experiments section.
|
| 95 |
+
|
| 96 |
+
# 3.4 ADDITIONAL COMPONENTS
|
| 97 |
+
|
| 98 |
+
In this section, we introduce two additional components: (a) auxiliary losses on the encoder tokens and (b) top- $k$ decoder queries selection. We empirically observe that these greatly help improve the final performance and stabilize the optimization. The overall architecture of Sparse DETR including these components is depicted in Fig. 3.
|
| 99 |
+
|
| 100 |
+
Encoder Auxiliary Loss. In DETR variants, auxiliary detection heads are attached to decoder tilayers, but not to encoder layers. Due to a significantly larger number of encoder tokens (about 18k tokens) compared to decoder tokens (about 300), encoder auxiliary heads will heavily increase the computational cost. In Sparse DETR, however, only part of encoder tokens are refined by the encoder, and adding auxiliary heads only for sparsified encoder tokens is not a big burden.
|
| 101 |
+
|
| 102 |
+
We empirically observe that applying an auxiliary detection head along with Hungarian loss on the selected tokens stabilizes the convergence of deeper encoders by alleviating the vanishing gradient issue and even improves the detection performance. We conjecture that, following the analysis in Sun et al. (2021), applying Hungarian loss at the intermediate layers helps distinguish the confusing features in the encoder, which contributes to the detection performance in the final head.
|
| 103 |
+
|
| 104 |
+
Top- $k$ Decoder Queries. In DETR and Deformable DETR, decoder queries are given by only learnable object queries or with predicted reference points via another head after the encoder. In Efficient DETR (Yao et al., 2021), decoder takes a part of encoder output as input, similar to RoI Pooling (Ren et al., 2015). Here, an auxiliary detection head is attached to the encoder output $\mathbf { x } _ { \mathrm { e n c } }$ and the head calculates the objectness (class) score of each encoder output. Based on the score, the top- $k$ encoder outputs are passed as decoder queries, similar to objectness score-based encoder token sparsification. Since this outperforms the methods based on learnable object queries or the two-stage scheme, we include this top- $k$ decoder query selection in our final architecture.
|
| 105 |
+
|
| 106 |
+
Table 1: Detection results of Sparse DETR on COCO 2017 val set. Top- $k$ & BBR denotes that we sample the top- $k$ object queries instead of using the learned object queries (Yao et al., 2021), and perform bounding box refinement in the decoder block (Zhu et al., 2021), respectively. Note that the proposed encoder auxiliary loss is only applied to Sparse DETR. FLOPs and FPS are measured in the same way as used in Zhu et al. (2021). The results marked by $\dag , \ddag$ are the reported ones from Zhu et al. (2021) and Wang et al. (2021), respectively.
|
| 107 |
+
|
| 108 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Epochs</td><td rowspan="2">Keeping ratio (p)</td><td rowspan="2">Top-k &BBR</td><td colspan="6">AP50 AP75 APs APM APL</td><td rowspan="2"></td><td colspan="2"></td></tr><tr><td>AP</td><td></td><td></td><td></td><td></td><td></td><td>params FLOPs FPS</td><td></td></tr><tr><td colspan="10">ResNet-50 backbone:</td><td></td><td></td><td></td><td></td></tr><tr><td>F-RCNN-FPNt</td><td>109</td><td>N/A</td><td></td><td>42.0</td><td>62.1</td><td>45.5</td><td>26.6</td><td>45.4</td><td>53.4</td><td>42M</td><td>180G</td><td></td><td>26</td></tr><tr><td>DETRt</td><td>500</td><td>100%</td><td></td><td>42.0</td><td>62.4</td><td>44.2</td><td>20.5</td><td>45.8</td><td>61.1</td><td></td><td>41M</td><td>86G</td><td>28</td></tr><tr><td>DETR-DC5†</td><td>500</td><td>100%</td><td></td><td>43.3</td><td>63.1</td><td>45.9</td><td>22.5</td><td>47.3</td><td></td><td>61.1</td><td>41M</td><td>187G</td><td>12</td></tr><tr><td rowspan="2">PnP-DETR$</td><td>500</td><td>33%</td><td></td><td>41.1</td><td>61.5</td><td>43.7</td><td>20.8</td><td>44.6</td><td>60.0</td><td></td><td>-</td><td>1</td><td>-</td></tr><tr><td>500</td><td>50%</td><td></td><td>41.8</td><td>62.1</td><td>44.4</td><td>21.2</td><td>45.3</td><td>60.8</td><td>-</td><td></td><td>1</td><td>-</td></tr><tr><td rowspan="2">PnP-DETR-DC5‡</td><td>500</td><td>33%</td><td></td><td>42.7</td><td>62.8</td><td></td><td>45.1</td><td>22.4</td><td>46.2</td><td>60</td><td>-</td><td>-</td><td>-</td></tr><tr><td>500</td><td>50%</td><td></td><td>43.1</td><td>63.4</td><td>45.3</td><td>22.7</td><td>46.5</td><td></td><td>61.1</td><td>1</td><td>-</td><td>-</td></tr><tr><td rowspan="2">Deformable-DETR</td><td>50</td><td>100%</td><td></td><td>43.9</td><td>62.8</td><td>47.8</td><td>26.1</td><td></td><td>47.4</td><td>58.0</td><td>40M</td><td>173G</td><td>19.1</td></tr><tr><td>50</td><td>100% 10%</td><td>√</td><td>46.0</td><td>65.2</td><td>49.8</td><td>28.2</td><td>49.1</td><td></td><td>61.0</td><td>41M</td><td>177G</td><td>18.2</td></tr><tr><td rowspan="5">Sparse-DETR</td><td>50 50</td><td></td><td>√</td><td></td><td>45.3 65.8</td><td>49.3</td><td>28.4</td><td></td><td>48.3</td><td>60.1</td><td>41M</td><td>105G</td><td>25.3</td></tr><tr><td></td><td>20%</td><td>√</td><td></td><td>45.6 65.8</td><td></td><td>49.6</td><td>28.5</td><td>48.6</td><td>60.4</td><td>41M</td><td>113G</td><td>24.8</td></tr><tr><td>50</td><td>30%</td><td>√</td><td>46.0</td><td>65.9</td><td>49.7</td><td></td><td>29.1</td><td>49.1</td><td>60.6</td><td>41M</td><td>121G</td><td>23.2</td></tr><tr><td>50</td><td>40%</td><td>√</td><td>46.2</td><td>66.0</td><td>50.3</td><td>28.7</td><td></td><td>49.0</td><td>61.4</td><td>41M</td><td>128G</td><td>21.8</td></tr><tr><td>50</td><td>50%</td><td>√</td><td>46.3</td><td>66.0</td><td>50.1</td><td>29.0</td><td>49.5</td><td></td><td>60.8</td><td>41M</td><td>136G</td><td>20.5</td></tr><tr><td colspan="2">Swin-T backbone:</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td colspan="2">DETR</td><td>500</td><td>100%</td><td></td><td>45.4</td><td>66.2</td><td>48.1</td><td>22.9</td><td>49.5</td><td>65.9</td><td>45M</td><td>92G</td><td>26.8</td></tr><tr><td colspan="2">Deformable-DETR</td><td>50</td><td>100%</td><td></td><td>45.7</td><td>65.3</td><td>49.9</td><td>26.9</td><td>49.4</td><td>61.2</td><td>40M</td><td>180G</td><td>15.9</td></tr><tr><td colspan="2"></td><td>50</td><td>100%</td><td>√</td><td>48.0</td><td>68.0</td><td>52.0</td><td>30.3</td><td>51.4</td><td>63.7</td><td>41M</td><td>185G</td><td>15.4</td></tr><tr><td colspan="2" rowspan="6">Sparse-DETR</td><td>50</td><td>10%</td><td>√</td><td>48.2</td><td>69.2</td><td>52.3</td><td>29.8</td><td>51.2</td><td>64.5</td><td>41M</td><td>113G</td><td>21.2</td></tr><tr><td>50</td><td></td><td>20%</td><td>√</td><td>48.8</td><td>69.4</td><td>53.0</td><td></td><td></td><td></td><td>41M</td><td>121G</td><td>20.0</td></tr><tr><td>50</td><td>30%</td><td></td><td>√</td><td>49.1</td><td>69.5</td><td></td><td>30.4 31.4</td><td>51.9 52.5</td><td>64.8 65.1</td><td>41M</td><td>129G</td><td>18.9</td></tr><tr><td>50</td><td></td><td></td><td>√</td><td>49.2</td><td>69.5</td><td>53.5 53.5</td><td>31.4</td><td>52.9</td><td>64.8</td><td>41M</td><td>136G</td><td>18.0</td></tr><tr><td>50</td><td>40% 50%</td><td>√</td><td></td><td>49.3</td><td>69.5</td><td>53.3</td><td>32.0</td><td>52.7</td><td>64.9</td><td>41M</td><td>144G</td><td>17.2</td></tr></table>
|
| 109 |
+
|
| 110 |
+
# 4 EXPERIMENTS
|
| 111 |
+
|
| 112 |
+
We compare Sparse DETR with the conventional object detectors, including the recently proposed ones in the DETR family. In addition, we conduct an ablation study to support our claims in Section 3, presenting the performance comparison between token selection criteria (OS vs. DAM), the effectiveness of the encoder auxiliary loss, and the dynamic sparsification during inference.
|
| 113 |
+
|
| 114 |
+
Implementation Details. We use ResNet-50 (He et al., 2016) and Swin Transformer (Liu et al., 2021) as pre-trained backbone networks, where Swin Transformer is one of the state-of-the-art architecture in the ViT family. We stack 6 encoder and 6 decoder layers, each with an auxiliary head at the end. We train the model on a $4 \times \mathsf { V } 1 0 0$ GPU machine with a total batch size of 16, for 50 epochs, where the initial learning rate is 0.0002 and decayed by 1/10 at the 40 epoch. Unless otherwise specified, we use the same hyperparameters as in Deformable DETR.
|
| 115 |
+
|
| 116 |
+
# 4.1 COMPARISON WITH OBJECT DETECTION BASELINES
|
| 117 |
+
|
| 118 |
+
Baselines. We compare Sparse DETR with Faster-RCNN with FPN (Lin et al., 2017), DETR (Carion et al., 2020), Deformable DETR (Zhu et al., 2021), and $\mathrm { P n P }$ DETR (Wang et al., 2021). We also compare with DETR and Deformable DETR that uses Swin-Tiny (Liu et al., 2021) as a backbone. Here, for brevity, we denote Deformable DETR with the top- $k$ object query selection and bounding box refinement, as Deformable ${ \mathrm { D E T R } } +$ . In Sparse DETR, encoder tokens are sparsified with keeping ratios of $10 \%$ , $20 \%$ , $30 \%$ , $40 \%$ , and $50 \%$ , using DAM criterion. We demonstrate detection performance and inference costs on COCO val2017 dataset.
|
| 119 |
+
|
| 120 |
+
Result. Table 1 shows the results of Sparse DETR and the other baselines on COCO val2017 set. Remarkably, on the ResNet-50 backbone, Sparse DETR with a keeping ratio over $30 \%$ outperforms all the baselines while minimizing the computational cost. Even with the keeping ratio reduced down to $10 \%$ , Sparse DETR still performs better than most baselines except for Deformable ${ \mathrm { D E T R } } +$ . More surprisingly, on the Swin-T backbone, Sparse DETR only with the keeping ratio $10 \%$ outperforms all the baselines with no exception, while improving FPS by $3 8 \%$ compared to Deformable DETR $^ +$ .
|
| 121 |
+
|
| 122 |
+

|
| 123 |
+
Figure 4: Selection criteria. Comparison of the performance with respect to encoder token selection criteria for different backbones.
|
| 124 |
+
|
| 125 |
+

|
| 126 |
+
Figure 5: Correlation graph. Correlation graphs of OS and DAM during training.
|
| 127 |
+
|
| 128 |
+
Remark that, compared to the most competitive baseline, Deformable $\mathrm { D E T R + }$ , the improvement in $\mathsf { A P } _ { L }$ is relatively noticeable on the Swin-T backbone even under the extreme sparsity of $10 \%$ , while the performance gap on the ResNet-50 backbone comes evenly from different sizes of objects. We conjecture that it is because a single token in Swin-T can hold a wider region of information than the one in ResNet-50, so even if we aggressively sparsify the encoder token, the network seems to have enough information to detect objects.
|
| 129 |
+
|
| 130 |
+
# 4.2 COMPARISON BETWEEN TOKEN SELECTION CRITERIA
|
| 131 |
+
|
| 132 |
+
Baselines. To verify the benefits of the proposed saliency criteria, we compare three token sparsification criteria: random, Objectness Score (OS), and Decoder cross-Attention Map (DAM). The random baseline samples a fixed ratio of arbitrary tokens. Note that the proposed encoder auxiliary loss is applied for all the methods.
|
| 133 |
+
|
| 134 |
+
Result. As illustrated in Fig. 4, the random strategy suffers noticeable performance degradation. On the other hand, the DAM-based model outperforms the OS-based model at every ratio and almost catches up with the non-sparse baseline when using $50 \%$ of encoder tokens. See the Appendix A.4 for detailed results of this experiment.
|
| 135 |
+
|
| 136 |
+
To analyze the reason that DAM-based model outperforms its counterpart, we measure the overlap between the encoder tokens referred by the decoder and the tokens refined by the encoder. As a metric, we compute a scalar correlation Corr as:
|
| 137 |
+
|
| 138 |
+
$$
|
| 139 |
+
\mathrm { \Gamma } _ { C o r r } : = \frac { \sum _ { x \in \Omega _ { D } \cap \Omega _ { s } ^ { \rho } } \mathrm { D A M } _ { x } } { \sum _ { x \in \Omega _ { D } } \mathrm { D A M } _ { x } } ,
|
| 140 |
+
$$
|
| 141 |
+
|
| 142 |
+
where $\Omega _ { D }$ is the encoder token set referred by the decoder and $\mathrm { D A M } _ { x }$ is the DAM-value corresponding to token $x$ . This Corr metric indicates the ratio of tokens polished by the encoder among the tokens referred by the decoder.
|
| 143 |
+
|
| 144 |
+
Fig. 5 demonstrates that Corr of DAM-based model rises higher than that of OS-based model. This result implies that DAM-based model is a more suitable sparsification method for the decoder, because the tokens referenced by the decoder are explicitly refined in the encoder, which achieves better detection performance. See the Appendix A.4 for detailed results of this experiment.
|
| 145 |
+
|
| 146 |
+

|
| 147 |
+
Figure 6: Ablation of # encoder layers.
|
| 148 |
+
Figure 7: Dynamic sparsification.
|
| 149 |
+
|
| 150 |
+
# 4.3 EFFECTIVENESS OF THE ENCODER AUXILIARY LOSS
|
| 151 |
+
|
| 152 |
+
Owing to the sparsified token set in our model, we can apply the auxiliary loss to the encoder layers without sacrificing too much computational cost. Apart from improved efficiency and performance, we find another benefit of the encoder auxiliary loss that allows us to safely stack more encoder layers without failing to converge.
|
| 153 |
+
|
| 154 |
+
As shown in Fig. 6, the encoder auxiliary loss not only enhances detection performance, but also consistently increases detection performance as the encoder layers doubled to 12. However, we observe that the training without its assistance utterly fails when using 12 encoder layers. We argue that gradient propagated through decoder cross-attention vanishes as we stack more encoder layers, thus intermediate gradients from the auxiliary loss are required. The observations reported in Appendix A.5 supports this assertion and Appendix A.6 details the results of Fig. 6.
|
| 155 |
+
|
| 156 |
+
# 4.4 DYNAMIC SPARSIFICATION FOR INFERENCE STAGE
|
| 157 |
+
|
| 158 |
+
To deploy the models in various hardware conditions of real-world applications, one often should retrain them at different scales according to the performance-computation trade-off required. We evaluate if our model trained with a fixed sparsity can adapt well to dynamic sparsity at inference time to check out Sparse DETR can avoid that hassle. Figure 7 shows the performance under the varied keeping ratio $( \rho )$ during inference when the model trained using the Swin-T backbone and $30 \%$ of encoder tokens with the DAM-based method. When the inference keeping ratio is small, the performance of dynamic sparsification is slightly degraded, but the overall performance is satisfactory at various keeping ratios given that only a single model is used.
|
| 159 |
+
|
| 160 |
+
PnP DETR introduces dynamic ratio training to achieve similar performance to the fixed keeping ratio counterpart. However, without the additional trick, it suffers significant performance degradation, for instance, $5 . 0 \ \mathrm { A P }$ drop when training/inference keeping ratio is 0.33/0.5, despite the increased number of encoder tokens. On the contrary, Sparse DETR achieves 0.2 AP improvement in a similar condition where the training/inference keeping ratio is 0.3/0.5. To conclude, our method shows better robustness compared to $\mathrm { P n P }$ DETR without further treatment, showing a greater potential of dynamic adaptation to different hardware environments. Note that any technique such as dynamic ratio training is orthogonal to our method and introducing it may bring even more robustness.
|
| 161 |
+
|
| 162 |
+
# 5 CONCLUSION
|
| 163 |
+
|
| 164 |
+
In this paper, we have presented encoder token sparsification algorithm that lowers the computational cost of the encoder, which is a computational bottleneck in the DETR and Deformable DETR. By doing so, the proposed Sparse DETR architecture outperforms the Deformable DETR even when using only $10 \%$ of the encoder token, and decreases the overall computation by $38 \%$ , and increases the FPS by $42 \%$ compared to the Deformable DETR. We hope that our proposed method will provide insights to effectively detect objects in the transformer structure in the future.
|
| 165 |
+
|
| 166 |
+
# REFERENCES
|
| 167 |
+
|
| 168 |
+
Lei Jimmy Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
|
| 169 |
+
|
| 170 |
+
Alexei Baevski and Michael Auli. Adaptive input representations for neural language modeling. In ICLR (Poster). OpenReview.net, 2019.
|
| 171 |
+
|
| 172 |
+
Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, 2020.
|
| 173 |
+
|
| 174 |
+
Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. CoRR, abs/1904.10509, 2019a.
|
| 175 |
+
|
| 176 |
+
Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. CoRR, abs/1904.10509, 2019b.
|
| 177 |
+
|
| 178 |
+
Krzysztof Marcin Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Andreea Gane, Tamas Sarl ´ os, Peter Hawkins, Jared Quincy Davis, Afroz Mohiuddin, Lukasz Kaiser, ´ David Benjamin Belanger, Lucy J. Colwell, and Adrian Weller. Rethinking attention with performers. In ICLR. OpenReview.net, 2021.
|
| 179 |
+
|
| 180 |
+
Jifeng Dai, Yi Li, Kaiming He, and Jian Sun. R-FCN: object detection via region-based fully convolutional networks. In NIPS, pp. 379–387, 2016.
|
| 181 |
+
|
| 182 |
+
Jifeng Dai, Haozhi Qi, Yuwen Xiong, Yi Li, Guodong Zhang, Han Hu, and Yichen Wei. Deformable convolutional networks. In ICCV, 2017.
|
| 183 |
+
|
| 184 |
+
Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, 2009.
|
| 185 |
+
|
| 186 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
|
| 187 |
+
|
| 188 |
+
Kaiming He, Georgia Gkioxari, Piotr Dollar, and Ross B. Girshick. Mask R-CNN. In ´ ICCV, 2017.
|
| 189 |
+
|
| 190 |
+
Dan Hendrycks and Kevin Gimpel. Bridging nonlinearities and stochastic regularizers with gaussian error linear units. CoRR, abs/1606.08415, 2016.
|
| 191 |
+
|
| 192 |
+
Jonathan Ho, Nal Kalchbrenner, Dirk Weissenborn, and Tim Salimans. Axial attention in multidimensional transformers. CoRR, abs/1912.12180, 2019.
|
| 193 |
+
|
| 194 |
+
Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and Franc¸ois Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. In ICML, volume 119 of Proceedings of Machine Learning Research, pp. 5156–5165. PMLR, 2020.
|
| 195 |
+
|
| 196 |
+
Nikita Kitaev, Lukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. In ICLR. OpenReview.net, 2020.
|
| 197 |
+
|
| 198 |
+
Chen-Yu Lee, Saining Xie, Patrick Gallagher, Zhengyou Zhang, and Zhuowen Tu. DeeplySupervised Nets. In Guy Lebanon and S. V. N. Vishwanathan (eds.), Proceedings of the Eighteenth International Conference on Artificial Intelligence and Statistics, volume 38 of Proceedings of Machine Learning Research, pp. 562–570, San Diego, California, USA, 09–12 May 2015. PMLR.
|
| 199 |
+
|
| 200 |
+
Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollar, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In ´ ECCV, 2014.
|
| 201 |
+
|
| 202 |
+
Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie.´ Feature pyramid networks for object detection. In CVPR, 2017.
|
| 203 |
+
|
| 204 |
+
Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin transformer: Hierarchical vision transformer using shifted windows. In ICCV, 2021.
|
| 205 |
+
|
| 206 |
+
Bowen Pan, Yifan Jiang, Rameswar Panda, Zhangyang Wang, Rogerio Feris, and Aude Oliva. ´ IA-RED2: Interpretability-aware redundancy reduction for vision transformers. arXiv preprint arXiv:2106.12620, 2021.
|
| 207 |
+
|
| 208 |
+
Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Lukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. In ICML, volume 80 of Proceedings of Machine Learning Research, pp. 4052–4061. PMLR, 2018.
|
| 209 |
+
|
| 210 |
+
Yongming Rao, Wenliang Zhao, Benlin Liu, Jiwen Lu, Jie Zhou, and Cho-Jui Hsieh. DynamicViT: efficient vision transformers with dynamic token sparsification. arXiv preprint arXiv:2106.02034, 2021.
|
| 211 |
+
|
| 212 |
+
Shaoqing Ren, Kaiming He, Ross B. Girshick, and Jian Sun. Faster R-CNN: towards real-time object detection with region proposal networks. In NIPS, pp. 91–99, 2015.
|
| 213 |
+
|
| 214 |
+
Byungseok Roh, Wuhyun Shin, Ildoo Kim, and Sungwoong Kim. Spatilly consistent representation learning. In CVPR. IEEE, 2021.
|
| 215 |
+
|
| 216 |
+
Peize Sun, Yi Jiang, Enze Xie, Wenqi Shao, Zehuan Yuan, Changhu Wang, and Ping Luo. What makes for end-to-end object detection? In ICML, volume 139, pp. 9934–9944, 2021.
|
| 217 |
+
|
| 218 |
+
Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott E. Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In CVPR, pp. 1–9. IEEE Computer Society, 2015.
|
| 219 |
+
|
| 220 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, 2017.
|
| 221 |
+
|
| 222 |
+
Huiyu Wang, Yukun Zhu, Bradley Green, Hartwig Adam, Alan L. Yuille, and Liang-Chieh Chen. Axial-deeplab: Stand-alone axial-attention for panoptic segmentation. In ECCV (4), volume 12349 of Lecture Notes in Computer Science, pp. 108–126. Springer, 2020.
|
| 223 |
+
|
| 224 |
+
Qiang Wang, Bei Li, Tong Xiao, Jingbo Zhu, Changliang Li, Derek F. Wong, and Lidia S. Chao. Learning deep transformer models for machine translation. In ACL (1), pp. 1810–1822. Association for Computational Linguistics, 2019.
|
| 225 |
+
|
| 226 |
+
Tao Wang, Li Yuan, Yunpeng Chen, Jiashi Feng, and Shuicheng Yan. PnP-DETR: towards efficient visual analysis with transformers. In ICCV, 2021.
|
| 227 |
+
|
| 228 |
+
Zhuyu Yao, Jiangbo Ai, Boxun Li, and Chi Zhang. Efficient DETR: improving end-to-end object detector with dense prior. arXiv preprint arXiv:2104.01318, 2021.
|
| 229 |
+
|
| 230 |
+
Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable DETR: deformable transformers for end-to-end object detection. In ICLR, 2021.
|
| 231 |
+
|
| 232 |
+
# A APPENDIX
|
| 233 |
+
|
| 234 |
+
# A.1 IMPLEMENTATION DETAILS OF THE SCORING NETWORK
|
| 235 |
+
|
| 236 |
+
The scoring network is consists of 4 linear layers where Layer Normalization (Ba et al., 2016) comes before the first layer and every layer except for the last one is followed by GELU (Hendrycks & Gimpel, 2016) activation. The output dimension of the 1st layer is 256 and halved to 128 and 64 at the 2nd and 3rd layers. The last layer outputs 1-d logit for the BCE loss. Since the network locally processes the input tokens in a token-wise manner, the final decisions may overlook global statistics without additional treatment. To remedy this issue, we set aside half of the output dimension of the first layer as a global feature, and average them across the whole token set, then concatenate it with each of the remained local features to maintain the original dimension. We also exclude the tokens that correspond to the zero-padded area when selecting top- $\cdot \rho \%$ scores, thereby we can prevent those tokens from participating in Hungarian matching process and getting meaningless gradients from the detection objective.
|
| 237 |
+
|
| 238 |
+
# A.2 DAM CREATION IN DEFORMABLE ATTENTION
|
| 239 |
+
|
| 240 |
+
As attention offset calculated in deformable attention is a fractional position, deformable attention uses bilinear interpolation to get values. Thus, we also use bilinear interpolation to obtain DAM.
|
| 241 |
+
|
| 242 |
+
Assume that, one of the attention offsets, weights and the reference point of decoder object query $q$ is calculated as $p , A$ and $r$ , respectively. Then, deformable attention takes values as:
|
| 243 |
+
|
| 244 |
+
$$
|
| 245 |
+
\sum _ { x } A \cdot G ( x , r + p ) \cdot v ( x )
|
| 246 |
+
$$
|
| 247 |
+
|
| 248 |
+
, where $x$ enumerates all integral spatial locations in the feature map, $G ( \cdot , \cdot )$ is the bilinear interpolation kernel defined as $G ( a , b ) = \operatorname* { m a x } ( 0 , 1 - | a _ { x } - b _ { x } | ) \cdot \operatorname* { m a x } ( 0 , 1 - | a _ { y } - b _ { y } | )$ and $v$ is the values. Similarly, we accumulate DAM-value for location $x$ as:
|
| 249 |
+
|
| 250 |
+
$$
|
| 251 |
+
\sum _ { ( p , A , r ) } A \cdot G ( x , r + p )
|
| 252 |
+
$$
|
| 253 |
+
|
| 254 |
+
. Then, we accumulate DAM over every decoder object query.
|
| 255 |
+
|
| 256 |
+
# A.3 ALTERNATIVE OBJECTIVES FOR DAM-BASED MODEL
|
| 257 |
+
|
| 258 |
+
As a training objective of the scoring network using DAM, we can consider other alternatives as long as they can encourage the predicted scores to represent the relative saliency of the encoder tokens. One of the naive alternatives is the regression loss by which the scoring network directly predicts the values in DAM. The ranking loss can be another choice with which the network focuses more on learning the relativeness rather than estimating the set of salient tokens.
|
| 259 |
+
|
| 260 |
+
Figure 8 shows the default BCE loss outperforms the alternatives. First, it is well-known that the regression problem is much harder than classification. Furthermore, since the value of DAM changes during training, the regression loss to predict the accurate value is more difficult. In case of the pairwise ranking loss, ranking the DAM elements may also be unstable as DAM gradually evolves. Meanwhile, the BCE loss may reduce those element-level noises down to the set-level in that its binary (keep or drop) targets retain more consistency compared to the exact values or ranks. Refer to Table 2 to see the exact values of the points represented in Figure 8.
|
| 261 |
+
|
| 262 |
+

|
| 263 |
+
Figure 8: DAM loss ablation
|
| 264 |
+
|
| 265 |
+
Table 2: Comparision between the alternative objectives for DAM-based scoring network.
|
| 266 |
+
|
| 267 |
+
<table><tr><td>Loss</td><td>Keeping ratio (p)</td><td>AP AP50</td><td>AP75</td><td>APs</td><td>APM</td><td>APL</td></tr><tr><td rowspan="4">smoothed L1</td><td>10%</td><td>47.8 68.9</td><td>51.7</td><td>29.8</td><td>50.9</td><td>64.0</td></tr><tr><td>20%</td><td>48.4 69.0</td><td>52.5</td><td>31.1</td><td>51.4</td><td>64.7</td></tr><tr><td>30%</td><td>48.6 69.0</td><td>52.6</td><td>31.1</td><td>51.9</td><td>64.7</td></tr><tr><td>40%</td><td>48.6 69.3</td><td>52.9</td><td>33.4</td><td>51.8</td><td>64.5</td></tr><tr><td rowspan="4">ranking</td><td>10%</td><td>48.0 69.1</td><td>52.1</td><td>29.9</td><td>51.4</td><td>64.6</td></tr><tr><td>20%</td><td>48.7 69.5</td><td>53.0</td><td>31.1</td><td>51.8</td><td>65.1</td></tr><tr><td>30%</td><td>48.8 69.2</td><td>52.8</td><td>31.4</td><td>52.0</td><td>64.9</td></tr><tr><td>40%</td><td>48.9 69.3</td><td>53.1</td><td>31.5</td><td>52.2</td><td>64.7</td></tr><tr><td rowspan="4">BCE</td><td>10%</td><td>48.2 69.2</td><td>52.3</td><td>29.8</td><td>51.2</td><td>64.5</td></tr><tr><td>20%</td><td>48.8 69.4</td><td>53.0</td><td>30.4</td><td>51.9</td><td>64.8</td></tr><tr><td>30%</td><td>49.1 69.5</td><td>53.5</td><td>31.4</td><td>52.5</td><td>65.1</td></tr><tr><td>40%</td><td>49.2 69.5</td><td>53.5</td><td>31.4</td><td>52.9</td><td>64.8</td></tr></table>
|
| 268 |
+
|
| 269 |
+
Table 3: Comparison between token selection criteria.
|
| 270 |
+
|
| 271 |
+
<table><tr><td>Scoring method</td><td>Keeping</td><td colspan="6"></td><td colspan="3"></td></tr><tr><td rowspan="2"></td><td rowspan="2">ratio (p) ResNet-50 backbone:</td><td>AP AP50</td><td></td><td>AP75</td><td>APs</td><td>APM</td><td>APL</td><td>params</td><td>FLOPs</td><td>FPS</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="2">N/A</td><td>100%</td><td>46.3</td><td>65.8</td><td>50.1</td><td>29.0</td><td>49.4</td><td>61.7</td><td>41M</td><td>177G</td><td>18.2</td></tr><tr><td>0%</td><td>42.2</td><td>63.0</td><td>45.6</td><td>25.9</td><td>45.3</td><td>56.5</td><td>36M</td><td>91G</td><td>35.0</td></tr><tr><td rowspan="4">random</td><td>10% 20%</td><td>43.6 44.0</td><td>64.3 64.8</td><td>47.2 47.8</td><td>26.7 27.3</td><td>46.9</td><td>58.4</td><td>41M</td><td>102G</td><td>27.7</td></tr><tr><td>30%</td><td>44.0</td><td></td><td></td><td></td><td>47.0</td><td>58.4</td><td>41M</td><td>110G</td><td>25.6</td></tr><tr><td></td><td></td><td>64.9</td><td>47.5</td><td>27.4</td><td>47.4</td><td>58.2</td><td>41M</td><td>117G</td><td>24.1</td></tr><tr><td>40% 50%</td><td>44.5 44.4</td><td>65.1</td><td>48.0 48.0</td><td>27.3 27.8</td><td>47.8 47.4</td><td>59.8 59.2</td><td>41M 41M</td><td>125G</td><td>22.5 21.1</td></tr><tr><td rowspan="5">OS</td><td>10%</td><td>44.9</td><td>64.8 65.2</td><td>48.7</td><td>27.9</td><td>47.8</td><td>60.4</td><td>41M</td><td>133G 106G</td><td>26.6</td></tr><tr><td>20%</td><td>45.5</td><td>65.5</td><td>49.3</td><td>28.7</td><td>48.3</td><td>60.5</td><td>41M</td><td>114G</td><td>24.7</td></tr><tr><td>30%</td><td>45.7</td><td>65.8</td><td>49.5</td><td>29.7</td><td>48.5</td><td>60.8</td><td>41M</td><td>121G</td><td>23.2</td></tr><tr><td>40%</td><td>45.8</td><td>65.5</td><td>49.8</td><td>29.1</td><td>48.8</td><td></td><td>41M</td><td></td><td>21.8</td></tr><tr><td>50%</td><td>46.0</td><td>65.9</td><td>49.8</td><td>28.8</td><td>48.9</td><td>60.5 60.6</td><td>41M</td><td>129G 136G</td><td>20.6</td></tr><tr><td rowspan="5">DAM</td><td>10%</td><td>45.3</td><td>65.8</td><td>49.3</td><td>28.4</td><td>48.3</td><td>60.1</td><td>41M</td><td>105G</td><td>26.5</td></tr><tr><td>20%</td><td>45.6</td><td>65.8</td><td>49.6</td><td>28.5</td><td>48.6</td><td>60.4</td><td>41M</td><td>113G</td><td>24.8</td></tr><tr><td>30%</td><td>46.0</td><td>65.9</td><td>49.7</td><td>29.1</td><td>49.1</td><td>60.6</td><td>41M</td><td>121G</td><td>23.2</td></tr><tr><td>40%</td><td>46.2</td><td>66.0</td><td>50.3</td><td>28.7</td><td>49.0</td><td>61.4</td><td>41M</td><td>128G</td><td>21.8</td></tr><tr><td>50%</td><td>46.3</td><td>66.0</td><td>50.1</td><td>29.0</td><td>49.5</td><td>60.8</td><td>41M</td><td>136G</td><td>20.5</td></tr><tr><td colspan="2">Swin-T backbone:</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="2">N/A</td><td>100% 0%</td><td>49.4 43.7</td><td>69.4</td><td>53.5</td><td>31.9</td><td>52.6</td><td>65.1</td><td>41M</td><td>185G</td><td>15.4</td></tr><tr><td>10%</td><td>45.5</td><td>65.8</td><td>46.9</td><td>27.0</td><td>46.7</td><td>60.0</td><td>37M</td><td>96G</td><td>26.5</td></tr><tr><td rowspan="5">random</td><td>20%</td><td>45.6</td><td>67.6</td><td>48.8</td><td>28.4</td><td>48.5</td><td>62.2</td><td>41M</td><td>110G</td><td>22.1</td></tr><tr><td>30%</td><td></td><td>67.5</td><td>49.2</td><td>28.6</td><td>49.1</td><td>62.2</td><td>41M</td><td>118G</td><td>20.8</td></tr><tr><td></td><td>46.2</td><td>68.1</td><td>49.7</td><td>29.5</td><td>49.7</td><td>63.0</td><td>41M</td><td>125G</td><td>19.7</td></tr><tr><td>40%</td><td>46.5</td><td>68.2</td><td>50.0</td><td>29.9</td><td>49.8</td><td>63.0</td><td>41M</td><td>133G</td><td>18.7</td></tr><tr><td>50%</td><td>47.2</td><td>68.3</td><td>50.9</td><td>29.1</td><td>50.4</td><td>63.9</td><td>41M</td><td>141G</td><td>17.7</td></tr><tr><td rowspan="5">OS</td><td>10%</td><td>48.0</td><td>69.1</td><td>52.1</td><td>29.9</td><td>51.1</td><td>64.4</td><td>42M</td><td>114G</td><td>21.4</td></tr><tr><td>20%</td><td>48.3</td><td>69.1</td><td>52.5</td><td>30.4</td><td>51.6</td><td>64.2</td><td>42M</td><td>122G</td><td>20.2</td></tr><tr><td>30%</td><td>48.6</td><td>69.2</td><td>53.0</td><td>31.0</td><td>52.0</td><td>64.6</td><td>42M</td><td>129G</td><td>18.6</td></tr><tr><td>40%</td><td>48.9</td><td>69.4</td><td>53.1</td><td>33.0</td><td>51.9</td><td>64.5</td><td>42M</td><td>137G</td><td>18.2</td></tr><tr><td>50%</td><td>49.0</td><td>69.2</td><td>53.5</td><td>31.2</td><td>52.4</td><td>65.0</td><td>42M</td><td>145G</td><td>17.2</td></tr><tr><td rowspan="5">DAM</td><td>10%</td><td>48.2</td><td>69.2</td><td>52.3</td><td>29.8</td><td>51.2</td><td>64.5</td><td>41M</td><td>113G</td><td>21.2</td></tr><tr><td>20%</td><td>48.8</td><td>69.4</td><td>53.0</td><td>30.4</td><td>51.9</td><td>64.8</td><td>41M</td><td>121G</td><td>20.0</td></tr><tr><td>30%</td><td>49.1</td><td>69.5</td><td>53.5</td><td>31.4</td><td>52.5</td><td>65.1</td><td>41M</td><td>129G</td><td>18.9</td></tr><tr><td>40%</td><td>49.2</td><td>69.5</td><td>53.5</td><td>31.4</td><td>52.9</td><td>64.8</td><td>41M</td><td>136G</td><td>18.0</td></tr><tr><td>50%</td><td>49.3</td><td>69.5</td><td>53.3</td><td>32.0</td><td>52.7</td><td>64.9</td><td>41M</td><td>144G</td><td>17.2</td></tr></table>
|
| 272 |
+
|
| 273 |
+

|
| 274 |
+
Figure 9: Layerwise gradient norm in DETR variants. An observation of the vanishing gradient problem on DETR variants with different backbones by measuring $\ell ^ { 2 }$ -norm of gradients in a layerwise manner. The first letter in $x$ -axis label represents module name, specifically, ‘B’ for the backbone and ‘E’ for the encoder, and the second number represents $i$ -th layer in that module. (a), (b): Layerwise gradient norm of DETR with ResNet-50 backbone. With the default settings(PostLN), the gradient scale generally decreases as more encoder layers are stacked, while the Pre-LN technique preserves gradient magnitude even in deeper early layers. (c) : Layerwise gradient norm of Deformable-DETR with Swin-T backbone. In this case, the Pre-LN fails to prevent vanishing gradient while the encoder auxiliary loss(denoted as Post-LN $^ +$ EncAux) proposed in this paper effectively resolves this issue.
|
| 275 |
+
|
| 276 |
+
# A.4 EXPERIMENTAL DETAILS FOR DIFFERENT TOKEN SELECTION CRITERIA
|
| 277 |
+
|
| 278 |
+
Table 3 contains the specific values used to plot (a) ResNet-50 and (b) Swin-T backbone in Figure 4. Additionally, they also include a lower-bound baseline that has no scoring method with keeping ratio $0 \%$ , meaning that the entire encoder block is removed and the backbone features are directly passed to the decoder. Even with the lowest keeping ratio $10 \%$ , all the scoring methods including random criterion outperform this lower-bound baseline. Note that all experiments reported in Table 3 except for the keeping ratio $0 \%$ use the encoder auxiliary loss for training.
|
| 279 |
+
|
| 280 |
+
# A.5 VANISHING GRADIENT PROBLEM IN THE DEEP END-TO-END DETECTORS
|
| 281 |
+
|
| 282 |
+
As shown in Section 4.2 in Carion et al. (2020), they observe that the performance of DETR gradually improves with more encoder layers. To reproduce this result, we used the default settings of the official code, but only changed the number of encoder layers. However, we fail to train the DETR model when using more than 9 encoder layers, which is probably due to different hyperparameters from the ones used in their experiments. Interestingly, we also found that the DETR model converges stably with the Pre-LN architecture(Baevski & Auli, 2019; Child et al., 2019b; Wang et al., 2019) that is known to be a better choice than the canonical Post-LN when the number of layers of transformer increases. We used the pre norm option the authors already have implemented in their code.
|
| 283 |
+
|
| 284 |
+
Table 4: Effectiveness of the encoder auxiliary loss using Swin-T. When the number of encoder layers is more than 9, the model training fails, but if the encoder auxiliary loss is adopted, the model training is feasible regardless of the number of encoder layers, and accuracy is improved.
|
| 285 |
+
|
| 286 |
+
<table><tr><td rowspan="2">#of encoder</td><td rowspan="2">Keeping ratio (p)</td><td rowspan="2">Aux. loss</td><td colspan="6"></td><td rowspan="2"></td><td colspan="2"></td></tr><tr><td>AP</td><td>AP50</td><td>AP75</td><td>APs</td><td>APM</td><td>APL</td><td>params FLOPs</td><td>FPS</td></tr><tr><td rowspan="9">6</td><td>100%</td><td></td><td>48.0</td><td>68.0</td><td>52</td><td>30.3</td><td>51.4</td><td>63.7</td><td>41M</td><td>185G</td><td>15.4</td></tr><tr><td>100%</td><td>√</td><td>49.4</td><td>69.4</td><td>53.5</td><td>31.9</td><td>52.6</td><td>65.1</td><td>41M</td><td>185G</td><td>15.4</td></tr><tr><td>10%</td><td></td><td>46.8</td><td>68.0</td><td>50.6</td><td>29.7</td><td>49.7</td><td>63.3</td><td>41M</td><td>113G</td><td>21.2</td></tr><tr><td>20%</td><td></td><td>47.5</td><td>68.3</td><td>51.4</td><td>31.4</td><td>50.4</td><td>64.4</td><td>41M</td><td>121G</td><td>20.0</td></tr><tr><td>30%</td><td></td><td>47.6</td><td>67.9</td><td>51.4</td><td>29.9</td><td>51.1</td><td>63.9</td><td>41M</td><td>129G</td><td>18.9</td></tr><tr><td>40%</td><td></td><td>47.6</td><td>68.2</td><td>51.5</td><td>30.3</td><td>50.8</td><td>64.0</td><td>41M</td><td>136G</td><td>18.0</td></tr><tr><td>10%</td><td></td><td>48.2</td><td>69.2</td><td>52.3</td><td>29.8</td><td>51.2</td><td>64.5</td><td>41M</td><td>113G</td><td>21.2</td></tr><tr><td>20%</td><td></td><td>48.8</td><td>69.4</td><td>53.0</td><td>30.4</td><td>51.9</td><td>64.8</td><td>41M</td><td>121G</td><td>20.0</td></tr><tr><td>30%</td><td>√>>></td><td>49.1</td><td>69.5</td><td>53.5</td><td>31.4</td><td>52.5</td><td>65.1</td><td>41M</td><td>129G</td><td>18.9</td></tr><tr><td>9</td><td>40%</td><td></td><td>49.2</td><td>69.5</td><td>53.5</td><td>31.4</td><td>52.9</td><td>64.8</td><td>41M</td><td>136G</td><td>18.0</td></tr><tr><td rowspan="5">12</td><td>100%</td><td>√</td><td>49.7</td><td>69.4</td><td>54.1</td><td>32.4</td><td>52.9</td><td>65.4</td><td>44M</td><td>220G</td><td>12.8</td></tr><tr><td>100%</td><td>√</td><td>50.1</td><td>69.6</td><td>54.6</td><td>32.2</td><td>53.4</td><td>65.8</td><td>46M</td><td>261G</td><td>11.0</td></tr><tr><td>10%</td><td></td><td>49.0</td><td>69.5 69.6</td><td>53.5 53.5</td><td>31.6</td><td>52.2</td><td>65.2</td><td>46M</td><td>128G</td><td>19.2</td></tr><tr><td>20% 30%</td><td>>></td><td>49.4 49.3</td><td>69.4</td><td>53.6</td><td>31.9 31.7</td><td>52.8 52.5</td><td>65.4 65.6</td><td>46M 46M</td><td>143G 158G</td><td>17.5</td></tr><tr><td>40%</td><td></td><td>49.8</td><td>69.8</td><td>54.3</td><td>33.1</td><td>53.4</td><td>65.4</td><td>46M</td><td>173G</td><td>15.6 14.6</td></tr></table>
|
| 287 |
+
|
| 288 |
+
Figure 9(a) and 9(b) illustrate that gradient norm of each layer from bottom to top in 6 and 12 encoder layers when using Post-LN and Pre-LN, respectively. We compute the $\ell ^ { 2 }$ -norm of the gradients for all parameters in a particular layer, as if they are concatenated into a single vector. To see training dynamics in the early stage of training, we track the gradients computed on a fixed set of training data and average them over the first 150 steps with a batch size of 2. Note that we applied Pre-LN only to the encoder module for a fair comparison between only the early modules although it could be used in any other transformer modules, e.g. backbone or decoder.
|
| 289 |
+
|
| 290 |
+
We found that the vanishing gradient issue is generally observed regardless of the encoder size. When we double the size of the encoder, as one can expect, the gradient in the early layers ends up with an even smaller scale, which may have caused the convergence failure. Meanwhile, the PreLN technique seems to significantly alleviate this issue even for the deeper encoder by maintaining the gradient scale evenly through the encoder layers and conveying a strong training signal to the backbone layers.
|
| 291 |
+
|
| 292 |
+
On the other hand, as shown in Figure 9(c), Deformable-DETR suffers from the same problem of vanishing gradient and even the Pre-LN technique does not help in this case. Meanwhile, the encoder auxiliary loss proposed in our paper drastically amplifies the gradient magnitude in the early layers by providing aggressive intermediate objectives for each encoder layer. Note that it also creates good synergy with our main sparsification strategy owing to reduced training cost. We claim that this observation supports our motivation of introducing the encoder auxiliary loss.
|
| 293 |
+
|
| 294 |
+
# A.6 EXPERIMENTAL DETAILS FOR EFFECTIVENESS OF THE ENCODER AUXILIARY LOSS
|
| 295 |
+
|
| 296 |
+
Table 4 presents the detailed values of Figure 4. As shown in the Table 4 and discussed in Section A.5, training of a deeper encoder of more than 9 layers fails without the auxiliary loss, but if it is adopted, the convergence becomes feasible as the intermediate gradients provided to the early encoder layers augment the vanishing gradient back-propagated from the decoder module.
|
| 297 |
+
|
| 298 |
+
Table 5: Detection results of Sparse DETR with SCRL initialization using ResNet-50. The same environment and hyperparameters as Experiments section are used, except for initializing the backbone with SCRL (Roh et al., 2021) model. The results marked by $\ S$ mean that the backbone network is initialized by SCRL instead of the ImageNet (Deng et al., 2009) pre-trained one.
|
| 299 |
+
|
| 300 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">Keeping ratio (p)</td><td colspan="6"></td><td rowspan="2"></td><td colspan="2"></td></tr><tr><td>AP</td><td>AP50</td><td>AP75</td><td>APs</td><td>APM</td><td>APL</td><td>params FLOPs</td><td>FPS</td></tr><tr><td rowspan="5">Sparse-DETR</td><td>10%</td><td>45.3</td><td>65.8</td><td>49.3</td><td>28.4</td><td>48.3</td><td>60.1</td><td>41M</td><td>105G</td><td>25.3</td></tr><tr><td>20%</td><td>45.6</td><td>65.8</td><td>49.6</td><td>28.5</td><td>48.6</td><td>60.4</td><td>41M</td><td>113G</td><td>24.8</td></tr><tr><td>30%</td><td>46.0</td><td>65.9</td><td>49.7</td><td>29.1</td><td>49.1</td><td>60.6</td><td>41M</td><td>121G</td><td>23.2</td></tr><tr><td>40%</td><td>46.2</td><td>66.0</td><td>50.3</td><td>28.7</td><td>49.0</td><td>61.4</td><td>41M</td><td>128G</td><td>21.8</td></tr><tr><td>50%</td><td>46.3</td><td>66.0</td><td>50.1</td><td>29.0</td><td>49.5</td><td>60.8</td><td>41M</td><td>136G</td><td>20.5</td></tr><tr><td rowspan="5">Sparse-DETR$</td><td>10%</td><td>46.9</td><td>67.2</td><td>51.0</td><td>30.2</td><td>49.7</td><td>62.3</td><td>41M</td><td>105G</td><td>25.3</td></tr><tr><td>20%</td><td>47.3</td><td>67.1</td><td>51.4</td><td>29.7</td><td>50.3</td><td>62.7</td><td>41M</td><td>113G</td><td>24.8</td></tr><tr><td>30%</td><td>47.4</td><td>67.3</td><td>51.4</td><td>30.1</td><td>50.5</td><td>62.4</td><td>41M</td><td>121G</td><td>23.2</td></tr><tr><td>40%</td><td>47.7</td><td>67.4</td><td>51.6</td><td>30.0</td><td>50.8</td><td>62.9</td><td>41M</td><td>128G</td><td>21.8</td></tr><tr><td>50%</td><td>47.9</td><td>67.5</td><td>52.1</td><td>30.5</td><td>51.2</td><td>63.2</td><td>41M</td><td>136G</td><td>20.5</td></tr></table>
|
| 301 |
+
|
| 302 |
+
Table 6: Performance of Sparse DETR with Swin-B. The same environment and hyperparameters as Experiments section are used, except for changing the backbone to a larger scale. Note that Aux. loss means only the ones applied to the encoder layers.
|
| 303 |
+
A.7 EFFECTIVENESS OF USING A DENSE REPRESENTATION AS BACKBONE INITIALIZATION
|
| 304 |
+
|
| 305 |
+
<table><tr><td rowspan="2">Backbone</td><td rowspan="2">Keeping ratio (p)</td><td rowspan="2">Aux. loss</td><td colspan="5"></td><td rowspan="2"></td><td colspan="2">FLOPs</td></tr><tr><td>AP</td><td>AP50</td><td>AP75 APs</td><td>APM</td><td>APL</td><td>params</td><td>FPS</td></tr><tr><td rowspan="5">Swin-T</td><td>100%</td><td></td><td>48.0</td><td>68.0</td><td>52.0</td><td>30.3</td><td>51.4</td><td>63.7</td><td>41M</td><td>185G</td><td>15.4</td></tr><tr><td>10%</td><td></td><td>48.2</td><td>69.2</td><td>52.3</td><td>29.8</td><td>51.2</td><td>64.5</td><td>41M</td><td>113G</td><td>21.2</td></tr><tr><td>20%</td><td></td><td>48.8</td><td>69.4</td><td>53.0</td><td>30.4</td><td>51.9</td><td>64.8</td><td>41M</td><td>121G</td><td>20.0</td></tr><tr><td>30%</td><td></td><td>49.1</td><td>69.5</td><td>53.5</td><td>31.4</td><td>52.5</td><td>65.1</td><td>41M</td><td>129G</td><td>18.9</td></tr><tr><td>40%</td><td><>>></td><td>49.2</td><td>69.5</td><td>53.5</td><td>31.4</td><td>52.9</td><td>64.8</td><td>41M</td><td>136G</td><td>18.0</td></tr><tr><td rowspan="5">Swin-B</td><td>100%</td><td></td><td>52.5</td><td>72.9</td><td>56.9</td><td>34.7</td><td>56.5</td><td>69.6</td><td>101M</td><td>400G</td><td>7.6</td></tr><tr><td>10%</td><td></td><td>52.2</td><td>73.5</td><td>57.0</td><td>34.0</td><td>56.3</td><td>70.3</td><td>101M</td><td>335G</td><td>8.8</td></tr><tr><td>20%</td><td></td><td>53.1</td><td>73.8</td><td>57.9</td><td>34.6</td><td>56.9</td><td>70.6</td><td>101M</td><td>343G</td><td>8.6</td></tr><tr><td>30%</td><td><>>></td><td>53.2</td><td>73.7</td><td>57.7</td><td>35.3</td><td>56.8</td><td>70.8</td><td>101M</td><td>350G</td><td>8.4</td></tr><tr><td>40%</td><td></td><td>53.3</td><td>73.4</td><td>58.0</td><td>36.3</td><td>57.2</td><td>70.9</td><td>101M</td><td>358G</td><td>8.2</td></tr></table>
|
| 306 |
+
|
| 307 |
+
Recently, many self-supervised learning methods through contrastive learning have been studied, and in particular, methods for obtaining dense representations with better performance for localization downstream tasks such as object detection are in the spotlight. In order to check whether our proposed method is effective even when such dense representation is used, the backbone network is initialized with the SCRL (Roh et al., 2021) model that aims to learn dense representations in a selfsupervised way instead of initializing with the ImageNet (Deng et al., 2009) pre-trained one. Just as the SCRL model outperformed the ImageNet pre-trained model in various localization downstream tasks, our proposed method, Sparse DETR, also shows better performance in all keeping ratios $( \rho )$ without the influence of encoder token sparsification as shown in Table 5.
|
| 308 |
+
|
| 309 |
+
# A.8 USING A LARGER TRANSFORMER-BASED BACKBONE(SWIN-B)
|
| 310 |
+
|
| 311 |
+
We perform experiments on Sparse DETR with Swin-Base(Liu et al., 2021) backbone to see if our method shows similar efficiency and performance gain even when using a heavier transformer-based backbone. Table 6 illustrates a comparison of COCO detection performance between Swin-T and Swin-B backbone under the varied sparsity. Due to the increased capacity, using Swin-B backbone significantly boosts up the baseline AP up to 52.5 $( + 4 . 5 ) $ but with $2 . 4 \times$ parameters and $2 . 1 \times$ com
|
| 312 |
+
|
| 313 |
+

|
| 314 |
+
Figure 10: Distribution of the ratio of non-zero values of DAM on COCO 2017 val set.
|
| 315 |
+
|
| 316 |
+
Table 7: Two-stage encoder token sparsification with a varied keeping ratio. COCO detection performance when the encoder tokens are sparsified at the later stage with the top- ${ \cdot \rho \% }$ binarized DAMs pre-computed from the former stage. All models are Deformable-DETR $^ +$ with Swin-T backbone and the encoder auxiliary loss is not applied. Note that the performance of the $50 \%$ model(47.9 AP) hardly degenerates compared to the baseline(48.0 AP).
|
| 317 |
+
|
| 318 |
+
<table><tr><td>Keeping ratio (p)</td><td>AP AP50</td><td>AP75</td><td>APs</td><td>APM</td><td>APL</td></tr><tr><td>100%</td><td>48.0 68.0</td><td>52.0</td><td>30.3</td><td>51.4</td><td>63.7</td></tr><tr><td>10%</td><td>44.0 66.0</td><td>47.2</td><td>26.9</td><td>46.8</td><td>61.0</td></tr><tr><td>20%</td><td>44.9 66.3</td><td>48.3</td><td>28.2</td><td>48.2</td><td>61.4</td></tr><tr><td>30%</td><td>46.5 67.3</td><td>50.2</td><td>30.9</td><td>49.7</td><td>62.3</td></tr><tr><td>40%</td><td>47.3 67.9</td><td>51.3</td><td>30.7</td><td>50.7</td><td>63.4</td></tr><tr><td>50%</td><td>47.9 67.8</td><td>52.0</td><td>29.8</td><td>51.4</td><td>63.7</td></tr></table>
|
| 319 |
+
|
| 320 |
+
putational cost. With the keeping ratio of $40 \%$ and the encoder auxiliary loss, the performance gap remains at a similar leve $( + 4 . 1 )$ . We can also observe consistent performance gains as the keeping ratio gets higher while the increasing gap converges more quickly than Swin-T. It may be because a single visual token of Swin-B can incorporate a wider range of information due to the deeper attention hierarchies and a smaller number of tokens is required to fully represent all the objects in an image. Note that the efficiency of a backbone network is behind the scope of this paper. Our work is orthogonal to the backbone sparsification approaches, e.g. DynamicViT (Rao et al., 2021), and we leave the integration with those works as future work.
|
| 321 |
+
|
| 322 |
+
A.9 THE PRELIMINARY EXPERIMENTS: WHY PURSUE A SPARSE ENCODER?
|
| 323 |
+
|
| 324 |
+
Using a model trained with Deformable-DETR, we have analyzed the number of encoder output tokens referenced by the decoder’s object query. Unlike using the bilinear interpolation described in the appendix A.2 to generate DAMs for training with pseudo-labels, in this analysis, we do not use bilinear interpolation to calculate how many encoder tokens are directly referenced by the decoder object query. To analyze the non-zero values of DAM, we use a Deforamble DETR model trained with Top- $k$ sampling strategy (Yao et al., 2021) and bounding box refinement (Zhu et al., 2021) using ResNet-50 backbone. Fig. 10 illustrates the distribution of the ratio of non-zero values of DAM on COCO val2017 dataset. As shown in Fig. 10, on average, only $45 \%$ of encoder tokens were referenced by object queries.
|
| 325 |
+
|
| 326 |
+
This observation naturally raises a question: Can we preserve the detection performance even if we focus, in the first place, only on the encoder tokens that the decoder might have preferred? As a preliminary experiment to answer this question, we trained the detector restricting token updates to the subset to which the decoder could have referred if there had been no such restriction. To this end, we performed the two-stage learning as follows: (i) We first obtained the DAMs of the entire training data by feeding them to a fully-trained Deformable-DETR model. (ii) Then, we retrained another model from the scratch by updating only a subset of tokens determined by the binarized DAM preserving top- $\rho \%$ of the elements(refer to Section3.3 for more details). Table 7 shows the performance on COCO detection for different keeping ratio $\rho$ . We found that the two-stage model almost catches up with the baseline $\rho = 1 0 0 \%$ as the keeping ratio is raised close to $45 \%$ , namely the percentage of non-zero values in DAM computed on the validation dataset earlier.
|
| 327 |
+
|
| 328 |
+
These observations have strongly motivated us to develop the encoder token sparsification method presented in the main text. Note that our main algorithm differs from this preliminary experiment in some aspects: (a) A DAM is obtained from the jointly learning decoder, not from the separately trained decoder, and (b) a binarized DAM is utilized as a prediction target of the scoring network rather than used directly as a sparsification mask.
|
| 329 |
+
|
| 330 |
+
# A.10 VISUALIZATIONS OF SELECTED ENCODER TOKENS
|
| 331 |
+
|
| 332 |
+
We visualize selected encoder tokens and top- $k$ decoder queries for each criterion, OS, and DAM. In the first row, selected encoder tokens from the backbone feature map are visualized as yellow regions, whereas unselected tokens are visualized as purple regions. In the second row, selected top$k$ decoder queries from encoder output are visualized in the same manner. In the final row, DAM values and Corr metrics are visualized. Corr is measured as in Section 4.2.
|
| 333 |
+
|
| 334 |
+
Interestingly, the DAM-based selection seems to better capture the objects than OS-based selection. The OS-based selection also captures objects well, but it typically focuses on the high-frequency edges that are not only in the foreground but also in the background. On the other hand, the DAMbased selection captures the boundary of the objects and also their inner areas and is less distracted from the background edges. We analyze that DAM focuses on the boundary of objects to lower the regression loss, and attends to the inside of objects to lower the classification loss. Finally, the scoring network predicts such a DAM well, and refining the encoder tokens according to it finally helps achieve better detection performance.
|
| 335 |
+
|
| 336 |
+

|
| 337 |
+
Figure 11: Visualization of selected tokens and DAM for COCO validation image #289960
|
| 338 |
+
|
| 339 |
+

|
| 340 |
+
Figure 12: Visualization of selected tokens and DAM for COCO validation image #22396
|
| 341 |
+
|
| 342 |
+

|
| 343 |
+
Figure 13: Visualization of selected tokens and DAM for COCO validation image #46252
|
| 344 |
+
|
| 345 |
+

|
| 346 |
+
Figure 14: Visualization of selected tokens and DAM for COCO validation image #6040
|
| 347 |
+
|
| 348 |
+

|
| 349 |
+
Figure 15: Visualization of selected tokens and DAM for COCO validation image #17379
|
parse/dev/RRGVCN8kjim/RRGVCN8kjim_content_list.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/RRGVCN8kjim/RRGVCN8kjim_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/Xu8aG5Q8M3/Xu8aG5Q8M3.md
ADDED
|
@@ -0,0 +1,437 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# LayoutGPT: Compositional Visual Planning and Generation with Large Language Models
|
| 2 |
+
|
| 3 |
+
Weixi Feng1˚ Wanrong ${ { \bf { Z } } { \bf { h } } { \bf { u } } ^ { 1 * } }$ Tsu-jui $\mathbf { F u } ^ { 1 }$ Varun Jampani2 Arjun Akula2 Xuehai $\mathbf { H e ^ { 3 } }$ Sugato Basu2 Xin Eric Wang3 William Yang Wang1
|
| 4 |
+
|
| 5 |
+
1University of California, Santa Barbara 2Google 3University of California, Santa Cruz https://github.com/weixi-feng/LayoutGPT
|
| 6 |
+
|
| 7 |
+
# [2D Numerical Reasoning] There are three elephants standing beside a pool of water.
|
| 8 |
+
|
| 9 |
+
# [2D Spatial Reasoning] A carrot and some onion next to a knife on a cutting board.
|
| 10 |
+
|
| 11 |
+

|
| 12 |
+
Figure 1: Generated layouts from LayoutGPT in 2D images and 3D indoor scenes. LayoutGPT can serve as a visual planner to reflect challenging numerical and spatial concepts in visual spaces.
|
| 13 |
+
|
| 14 |
+
# Abstract
|
| 15 |
+
|
| 16 |
+
Attaining a high degree of user controllability in visual generation often requires intricate, fine-grained inputs like layouts. However, such inputs impose a substantial burden on users when compared to simple text inputs. To address the issue, we study how Large Language Models (LLMs) can serve as visual planners by generating layouts from text conditions, and thus collaborate with visual generative models. We propose LayoutGPT, a method to compose in-context visual demonstrations in style sheet language to enhance the visual planning skills of LLMs. LayoutGPT can generate plausible layouts in multiple domains, ranging from 2D images to 3D indoor scenes. LayoutGPT also shows superior performance in converting challenging language concepts like numerical and spatial relations to layout arrangements for faithful text-to-image generation. When combined with a downstream image generation model, LayoutGPT outperforms text-to-image models/systems by $20 \%$ and achieves comparable performance as human users in designing visual layouts for numerical and spatial correctness. Lastly, LayoutGPT achieves comparable performance to supervised methods in 3D indoor scene synthesis, demonstrating its effectiveness and potential in multiple visual domains.
|
| 17 |
+
|
| 18 |
+
# 1 Introduction
|
| 19 |
+
|
| 20 |
+
Can Large Language Models (LLMs) comprehend visual concepts and generate plausible arrangments in visual spaces? Recently, LLMs have shown significant advancement in various reasoning skills [50, 49] that remain challenging to visual generative models. For instance, text-to-image generation (T2I) models suffer from generating objects with specified counts, positions, and attributes [10, 24]. 3D scene synthesis models face challenges in preserving furniture within pre-defined room sizes [30]. Addressing these issues necessitates the development of compositional skills that effectively arrange components in a coherent manner, accurately reflecting object specifications and interactions.
|
| 21 |
+
|
| 22 |
+
Visual layout is an essential symbolic representation that has been widely studied as it reflects the compositions of a visual space [33, 53, 45, 34]. For instance, layout generation models [21, 25, 17, 53, 23] can be combined with region-controlled image generation methods [56, 27] to improve image compositionality [52]. But unlike LLMs, these models are restricted to discrete categories or have limited reasoning skills for complicated text conditions. Recently, LLMs like ChatGPT [37], are adopted as a centralized module of frameworks or systems where multiple foundational computer vision models are integrated. Through defined action items or API calls, LLMs can interact with visual generative models to extend the systems’ capability into image generation tasks. [51].
|
| 23 |
+
|
| 24 |
+
Despite the advancement, existing approaches that involve the collaboration between LLMs and image generation models are either limited to executing the latter through program generation or using LLMs for language data augmentation for image editing [3]. Current LLM-based systems fail to improve the compositional faithfulness of a generated image by simply using T2I models through API calls. While one could additionally integrate models that synthesize images with the guidance of layouts [56, 27], keypoints [27], or sketches [20, 57], users still have to create fine-grained inputs on their own, leading to extra efforts and degraded efficiency compared to pure language instructions.
|
| 25 |
+
|
| 26 |
+
To address these challenges, we introduce LayoutGPT, a training-free approach that injects visual commonsense into LLMs and enables them to generate desirable layouts based on text conditions. Despite being trained without any image data, LLMs can learn visual commonsense through in-context demonstrations and then apply the knowledge to infer visual planning for novel samples. Specifically, we observe that representing image layouts is highly compatible with how style sheet language formats images on a webpage. Therefore, as LLMs are trained with program data, constructing layouts as structured programs may enhance LLMs’ ability to “imagine” object locations from merely language tokens. Our programs not only enable stable and consistent output structures but also strengthen LLMs’ understanding of the visual concepts behind each individual attribute value. When combined with a region-controlled image generation model [27], LayoutGPT outperforms existing methods by $20 \%$ and achieves comparable performance as human users in generating plausible image layouts and obtaining images with the correct object counts or spatial relations.
|
| 27 |
+
|
| 28 |
+
In addition, we extend LayoutGPT from 2D layout planning to 3D indoor scene synthesis. With a slight expansion of the style attributes, LayoutGPT can understand challenging 3D concepts such as depth, furniture sizes, and practical and coherent furniture arrangements for different types of rooms. We show that LayoutGPT performs comparably to a state-of-the-art (SOTA) supervised method. Our experimental results suggest that LLMs have the potential to handle more complicated visual inputs. Our contribution can be summarized as the following points:
|
| 29 |
+
|
| 30 |
+
• We propose LayoutGPT, a program-guided method to adopt LLMs for layout-based visual planning in multiple domains. LayoutGPT addresses the inherent multimodal reasoning skills of LLMs and can improve end-user efficiency.
|
| 31 |
+
|
| 32 |
+
• We propose Numerical and Spatial Reasoning (NSR-1K) benchmark that includes prompts characterizing counting and positional relations for text-to-image generation.
|
| 33 |
+
|
| 34 |
+
• Experimental results show that LayoutGPT effectively improves counting and spatial relations faithfulness in 2D image generation and achieves strong performance in 3D indoor scene synthesis. Our experiments suggest that the reasoning power of LLMs can be leveraged for visual generation and handling more complicated visual representations.
|
| 35 |
+
|
| 36 |
+
# 2 Related Work
|
| 37 |
+
|
| 38 |
+
Image Layout Generation Layout generation has been an important task for automatic graphical design for various scenarios, including indoor scenes [40, 46], document layouts [59, 60, 15], and graphical user interface [8]. Previous work has proposed various types of models that need to be trained from scratch before generating layouts. LayoutGAN [25] is a GAN-based framework to generate both class and geometric labels of wireframe boxes for a fixed number of scene elements. LayoutVAE [21] generates image layouts conditioned on an input object label set. Transformerbased methods are proposed to enhance flexibility in the layout generation process. For instance, LayoutTransformer [17] adopts self-attention to learn contextual relations between elements and achieve layout completion based on a partial layout input. BLT [23] proposes a hierarchical sampling policy so that any coordinate values can be modified at the sampling stage to enable flexible and controlled generation. However, existing methods are restricted to class labels and fail to reason over numerical and spatial concepts in text conditions. In contrast, LayoutGPT can convert challenging textual concepts to 2D layouts and generate free-form, detailed descriptions for each region.
|
| 39 |
+
|
| 40 |
+
Compositional Image Generation Recent studies have shown that text-to-image generation (T2I) models suffer from compositional issues such as missing objects, incorrect spatial relations, and incorrect attributes [24, 2]. StructureDiffusion [10] proposes to adjust text embeddings by utilizing prior knowledge from linguistic structures. Attend-and-Excite [4] optimizes attention regions so that objects attend on separate regions. Another line of work strives to introduce extra conditions as inputs. For example, ReCo [56], GLIGEN [27], and Layout-Guidance [6] can generate images based on bounding box inputs and regional captions. [52] combines a layout generator and a region-controlled method to achieve accurate generation results. While we focus on layout generation, we also employ layout-to-image models to generate final images and show the effectiveness of LayoutGPT.
|
| 41 |
+
|
| 42 |
+
Indoor Scene Synthesis Indoor scene synthesis aims at generating reasonable furniture layouts in a 3D space that satisfies room functionality. Early work adopting autoregressive models requires supervision of 2D bounding boxes and other visual maps [40]. Later, SceneFormer [47] proposes to apply a set of transformers to add furniture to scenes. While previous work adopts separate models to predict different object attributes, ATISS [38] demonstrates that a single transformer model can generate more realistic arrangments while being more efficient. In this work, we investigate leveraging LLMs to achieve scene synthesis without any fine-tuning.
|
| 43 |
+
|
| 44 |
+
LLMs for Vision Language inputs have been an essential part of many vision language tasks [43, 11, 28, 14]. With the strong generalization ability of contemporary LLMs, recent work attempts to adapt the power of LLMs on multimodal tasks [31, 55]. For instance, multimodal chain-of-thought [58] trained a model to incorporate visual inputs as rationales for question answering. [22] proposes to learn translation parameters to map embeddings between visual and language domains such that an LLM can ground on both modalities. VisProg [18] and ViperGPT [44] use LLMs to design modular pseudocode instructions or executable Python programs to achieve visual reasoning. LLMScore [32] leverages LLMs to evaluate text-to-image models. Visual ChatGPT [51] proposes a prompt manager that supports the execution of various image generation models. In this work, we directly involve LLMs in the generation process by leveraging LLMs to design visual layouts through in-context learning and structured representations.
|
| 45 |
+
|
| 46 |
+
# 3 Method
|
| 47 |
+
|
| 48 |
+
# 3.1 Overview
|
| 49 |
+
|
| 50 |
+
Given a condition $\mathcal { C }$ , the goal of layout generation is to predict a set of tuples $\mathcal { O } \ = \ \{ { \bf o } _ { j } | j \ =$ $1 , 2 , \ldots , n \}$ where each tuple $\mathbf { o } _ { j }$ denotes the layout information of a 2D or 3D bounding box of object $j$ . In image planning, $\mathcal { C }$ is the input text prompt, $\mathbf { o } _ { j }$ consists of a category $c _ { j }$ , bounding box location $\mathbf { t } _ { j } = ( x _ { j } , y _ { j } ) \in \mathbb { R } ^ { 2 }$ and bounding box size $\mathbf { s } _ { j } = ( w _ { j } , h _ { j } ) \in \mathbb { R } ^ { 2 }$ , i.e. $\mathbf { o } _ { j } = ( c _ { j } , \mathbf { t } _ { j } , \mathbf { s } _ { j } )$ . Similarly, in 3D scene synthesis, $\mathcal { C }$ specifies the room type and room size, $\mathbf { o } _ { j }$ consists of category $c _ { j }$ , location $\mathbf { t } _ { j } \in \mathbb { R } ^ { 3 }$ , size $\mathbf { s } _ { j } \in \mathbb { R } ^ { 3 }$ , and orientation $\mathbf { r } _ { j } \in \mathbb { R }$ , i.e. ${ \bf o } _ { j } = ( c _ { j } , { \bf t } _ { j } , { \bf s } _ { j } , { \bf r } _ { j } )$ . While $c _ { j }$ can be modeled as a discrete value, our method directly predicts the category text.
|
| 51 |
+
|
| 52 |
+

|
| 53 |
+
Figure 2: The overview process of our LayoutGPT framework performing 2D layout planning for text-conditioned image generation or 3D layout planning for scene synthesis.
|
| 54 |
+
|
| 55 |
+
# 3.2 LayoutGPT Prompt Construction
|
| 56 |
+
|
| 57 |
+
As is shown in Fig. 2, LayoutGPT prompts consist of three main components: task instructions, and in-context exemplars in CSS structures with normalization.
|
| 58 |
+
|
| 59 |
+
CSS Structures In autoregressive layout generation, $\mathbf { o } _ { j }$ is usually modeled as a plain sequence of values, i.e. $( c _ { 1 } , x _ { 1 } , y _ { 1 } , w _ { 1 } , h _ { 1 } , c _ { 2 } , x _ { 2 } , . ~ . ~ . )$ [17, 23]. However, such a sequence can be challenging for LLMs to understand due to underspecified meaning of each value. Therefore, we seek a structured format that specifies the physical meaning of each value for LLMs to interpret spatial knowledge. We realize that image layouts are highly similar to how CSS (short for Cascading Style Sheets) formats the layout of a webpage and defines various properties of the img tag in HTML. For instance, $x _ { j } , y _ { j }$ corresponds to the standard properties left and top, while $w _ { j } , h _ { j }$ corresponds to width and height in CSS. As LLMs like GPT- $3 . 5 / 4$ are trained with code snippets, formatting image/scene layouts in CSS structures potentially enhances the LLMs’ interpretation of the spatial meaning behind each value. Therefore, as is shown in Fig. 2, we place category name $c _ { j }$ as the selector and map other attribute values into the declaration section following standard CSS styles.
|
| 60 |
+
|
| 61 |
+
Task Instructions & Normalization Similar to previous work in improving the prompting ability of LLMs [48, 42, 37], we prepend task instructions to the prompt to specify the task goal, define the standard format, unit for values, etc. Besides, as the common length unit of CSS is pixels (px), we normalize each property value based on a fixed scalar and rescale the value to a maximum of 256px. As will be shown in later sections (Sec. 4.4 & 5.4), all three components play important roles in injecting visual commonsense into LLMs and improving generation accuracy.
|
| 62 |
+
|
| 63 |
+
# 3.3 In-Context Exemplars Selection
|
| 64 |
+
|
| 65 |
+
Following previous work [1, 54], we select supporting demonstration exemplars for in-context learning based on retrieval results. Given a test condition $\mathcal { C } _ { j }$ and a support set of demonstrations $\mathcal { D } \ : = \ : \{ ( \mathcal { C } _ { k } , \mathbf { o } _ { k } ) | k \ : = \ : 1 , 2 , . . . \}$ , we define a function $f ( \mathcal { C } _ { k } , \mathcal { \overline { { C } } } _ { j } ) ~ \in ~ \mathbb { R }$ that measures the distances between two conditions. For 2D text-conditioned image layout generation, we adopt the CLIP [39] model to extract text features of $\mathcal { C } _ { j }$ (usually a caption) and the image feature of $\mathcal { C } _ { k }$ and measure the cosine similarity between them. For the 3D scene synthesis task where each room has length $r l$ and width $r w$ , we measure distance with $f ( \mathcal { C } _ { k } , \mathcal { C } _ { j } ) = \| r l _ { k } - r l _ { j } \| ^ { 2 } + \| r w _ { k } - r w _ { j } \| ^ { 2 }$ . We select supporting demonstrations with the top- $k$ least distance measures and construct them as exemplars following the CSS structure in Fig. 2. These supporting examples are provided to GPT- $3 . 5 / 4$ in reverse order, with the most similar example presented last.
|
| 66 |
+
|
| 67 |
+
Table 1: Dataset statistics and examples of the NSR-1K benchmark for image layout planning and text-to-image (T2I) generation with an emphasis on numerical and spatial reasoning.
|
| 68 |
+
|
| 69 |
+
<table><tr><td>Task</td><td>Type</td><td>Example Prompt</td><td># Train</td><td>#Val</td><td>#Test</td></tr><tr><td rowspan="4">T2I Numerical Reasoning</td><td>Single Category</td><td>“There are two giraffes in the photo.”</td><td>14890</td><td>-</td><td>114</td></tr><tr><td>Two Categories</td><td>“Three potted plants with one vase in the picture.”</td><td>7402</td><td>-</td><td>197</td></tr><tr><td>Comparison</td><td>“A picture of three cars with a few fire hydrants,the number of cars is more than that offire hydrants."</td><td>7402</td><td>-</td><td>100</td></tr><tr><td>Natural</td><td>“A fenced in pasture with four horses standing around eating grass”</td><td>9004</td><td>-</td><td>351</td></tr><tr><td rowspan="2">T2I Spatial Reasoning</td><td>Two Categories</td><td>“A dog to the right of a bench."</td><td>360</td><td></td><td>199</td></tr><tr><td>Natural</td><td>“A black cat laying on top of abed next to pillows.”</td><td>378</td><td></td><td>84</td></tr></table>
|
| 70 |
+
|
| 71 |
+
# 3.4 Image and Scene Generation
|
| 72 |
+
|
| 73 |
+
For text-conditioned image synthesis, we utilize a layout-to-image generation model to generate images based on the generated layouts. As for each object layout in 3D scene synthesis, we retrieve a 3D object based on the predicted category, location, orientation, and size following [38]. We directly render the scene with the retrieved 3D objects. See Sec. 4 & Sec. 5 for more details.
|
| 74 |
+
|
| 75 |
+
# 4 LayoutGPT for Text-Conditioned Image Synthesis
|
| 76 |
+
|
| 77 |
+
In this section, we provide an extensive evaluation of LayoutGPT for 2D text-to-image (T2I) synthesis and compare it with SOTA T2I models/systems. An ablation study is conducted to demonstrate the effect of individual components from LayoutGPT. We also showcase qualitative results and application scenarios of our method.
|
| 78 |
+
|
| 79 |
+
# 4.1 Experiment Setup
|
| 80 |
+
|
| 81 |
+
Datasets & Benchmarks To evaluate the generations in terms of specified counts and spatial locations, we propose NSR-1K, a benchmark that includes template-based and human-written (natural) prompts from MSCOCO [29]. Table 1 summarizes our dataset statistics with examples. For template-based prompts, we apply a set of filters to obtain images with only 1-2 types of object and then create prompts based on object categories and bounding box information. As for natural prompts, we extract COCO captions with keywords to suit the task of numerical reasoning (e.g. “four”) or spatial reasoning (e.g. “on top of”) and ensure that all objects from the bounding box annotations are mentioned in the caption to avoid hallucination. Each prompt from NSR-1K is guaranteed to have a corresponding ground truth image and layout annotations. Detailed benchmark construction processes are described in Appendix B.1.
|
| 82 |
+
|
| 83 |
+
Evaluation Metrics To evaluate generated layouts, we report precision, recall, and accuracy based on generated bounding box counts and spatial positions [9, 16]. For spatial reasoning, each prompt falls into one of the four types of relations ({left, right, top, below}) and we use the bounding box center for evaluation following PaintSkills [7]. To evaluate generated images, we first obtain bounding boxes from GLIP [26] detection results and then compute average accuracy based on the bounding box counts or spatial relations. We also report CLIP cosine similarity between text prompts and generated images for reference. Detailed metric descriptions are listed in Appendix B.2.
|
| 84 |
+
|
| 85 |
+
Baselines As we consider both layout evaluation and image evaluation, we compare LayoutGPT with end-to-end T2I models (Stable Diffusion [41], Attend-and-Excite $[ 4 ] )$ and two-stage systems that generate layouts first and then apply GLIGEN [27] as the layout-to-image model. We also evaluate ground truth layouts and human-drawn layouts as the theoretical upper bounds. The human-drawn layouts are collected through crowdsourcing, in which we specifically ask human annotators to draw layouts given text prompts. We slightly modify LayoutTransformer [17] as a baseline for supervised conditional layout generation. Detailed descriptions of baseline setups and human annotating are discussed in the Appendix A and E.
|
| 86 |
+
|
| 87 |
+
Table 2: Comparison of our LayoutGPT with baseline methods in terms of counting and spatial correctness. Line 5-11 generates layout and adopts GLIGEN [27] for layout-guided image generation. “Human” (line 11) denotes layouts collected from human users given text prompts. Text in bold shows the best results of LayoutGPT.
|
| 88 |
+
|
| 89 |
+
<table><tr><td rowspan="3" colspan="2">Methods</td><td colspan="5">Numerical Reasoning</td><td colspan="3">Spatial Reasoning</td></tr><tr><td colspan="3">Layout Eval.</td><td colspan="2">Image Eval.</td><td>Layout Eval.</td><td colspan="2">Image Eval.</td></tr><tr><td>Precision</td><td>Recall</td><td>Accuracy</td><td>Acc. (GLIP)</td><td>CLIP Sim.</td><td>Accuracy</td><td>Acc. (GLIP)</td><td>CLIP Sim.</td></tr><tr><td colspan="2">Text-→Image</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td></td><td>Stable Diffusion (v1.4) [41]</td><td></td><td></td><td></td><td>32.22</td><td>0.256</td><td></td><td>16.89</td><td>0.252</td></tr><tr><td>123</td><td>Stable Diffusion (v2.1)</td><td></td><td></td><td></td><td>42.44</td><td>0.256</td><td></td><td>17.81</td><td>0.256</td></tr><tr><td></td><td>Attend-and-Excite (SD v1.4) [4]</td><td></td><td></td><td></td><td>38.96</td><td>0.258</td><td></td><td>24.38</td><td>0.263</td></tr><tr><td>4</td><td>Attend-and-Excite (SD v2.1)</td><td></td><td></td><td></td><td>45.74</td><td>0.254</td><td></td><td>26.86</td><td>0.264</td></tr><tr><td colspan="2">Text→Layout→Image</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>5</td><td>LayoutTransformer[17]</td><td>75.70</td><td>61.69</td><td>22.26</td><td>40.55</td><td>0.247</td><td>6.36</td><td>28.13</td><td>0.241</td></tr><tr><td></td><td>LayoutGPT(GPT-3.5)</td><td>94.81</td><td>96.49</td><td>86.33</td><td>51.20</td><td>0.258</td><td>82.54</td><td>52.86</td><td>0.264</td></tr><tr><td>67</td><td>LayoutGPT (Codex)</td><td>90.19</td><td>88.29</td><td>72.02</td><td>46.64</td><td>0.254</td><td>74.63</td><td>45.58</td><td>0.262</td></tr><tr><td>8</td><td>LayoutGPT (GPT-3.5,chat)</td><td>81.84</td><td>85.47</td><td>75.51</td><td>54.40</td><td>0.261</td><td>85.87</td><td>56.75</td><td>0.268</td></tr><tr><td>9</td><td>LayoutGPT (GPT-4)</td><td>78.36</td><td>86.29</td><td>78.43</td><td>55.64</td><td>0.261</td><td>91.73</td><td>60.64</td><td>0.268</td></tr><tr><td>10</td><td>GT layouts</td><td>100.00</td><td>100.00</td><td>100.00</td><td>53.23</td><td>0.256</td><td>100.00</td><td>62.54</td><td>0.261</td></tr><tr><td>11</td><td>Human</td><td>99.26</td><td>96.52</td><td>92.56</td><td>56.07</td><td>0.258</td><td>91.17</td><td>51.94</td><td>0.258</td></tr></table>
|
| 90 |
+
|
| 91 |
+

|
| 92 |
+
Stable Diffusion
|
| 93 |
+
|
| 94 |
+

|
| 95 |
+
Stable Diffusion
|
| 96 |
+
LayoutGPT LayoutGPT+GLIGEN Human+GLIGEN
|
| 97 |
+
|
| 98 |
+

|
| 99 |
+
LayoutGPT LayoutGPT+GLIGEN Human+GLIGEN
|
| 100 |
+
Two teddy bears and a stuffed snowman wearing hats (Numerical)
|
| 101 |
+
|
| 102 |
+

|
| 103 |
+
Three clocks at a train station under a concrete arch (Numerical)
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
A cat is sitting on a basket under a bench (Spatial)
|
| 107 |
+
|
| 108 |
+

|
| 109 |
+
Figure 3: Qualitative comparison between Stable Diffusion, LayoutGPT, and human annotations regarding numerical (top row) and spatial reasoning (bottom row) skills.
|
| 110 |
+
|
| 111 |
+
A yellow surfboard sits next to a bicycle on a brick sidewalk (Spatial)
|
| 112 |
+
|
| 113 |
+
# 4.2 Evaluation Results
|
| 114 |
+
|
| 115 |
+
Quantitative Results As shown in Table 2, among the variants of LayoutGPT $( \# 6 - \# 9 )$ , GPT-3.5 achieves the best performance in numerical reasoning while GPT-4 performs the best in generating correct spatial positions. LayoutGPT outperforms LayoutTransformer $( \# 5 )$ by large margins, proving the strong cross-modal reasoning skills of LLMs. As for image-level evaluation, LayoutGPT surpasses end-to-end T2I models $( \# 1 - \# 3 )$ by $20 \%$ in GLIP-based accuracy and relatively $1 \%$ in CLIP similarity. Therefore, using layouts as an intermediate representation indeed leads to more reliable and faithful generation outcomes. In addition, LayoutGPT achieves similar layout accuracy as human users (numerical $\# 6$ vs. $\# 1 1$ $8 6 . 3 3 \%$ v.s. $9 2 . 5 6 \%$ ); spatial $\# 9$ vs. $\# 1 1$ ( $9 1 . 7 3 \%$ v.s. $9 1 . 1 7 \%$ ), which implies its potential to spare users from drawing layouts manually. The discrepancy between layout accuracy and GLIP-based accuracy suggests that the bottleneck mainly stems from layout-guided image generation and GLIP grounding results.
|
| 116 |
+
|
| 117 |
+
In addition, LayoutGPT binds attributes to each object’s bounding box with $100 \%$ accuracy on HRS [2] color prompts. We further evaluate the attribute correctness rate (accuracy) on the final generated images when combining LayoutGPT with GLIGEN/ReCo. As shown in Table 3, our system largely improves the color correctness over Stable Diffusion with multiple objects.
|
| 118 |
+
|
| 119 |
+
Qualitative results We show the qualitative results of LayoutGPT and baselines in Fig. 3. LayoutGPT can understand visual commonsense such as the clock sizes at a train station (top left) or complex spatial relations between multiple objects (bottom right), while SD fails to generate correct numbers or positions. Besides, LayoutGPT demonstrates a similar layout design to human users (bottom left). Fig. 11 in the Appendix visualizes the results of attribute binding using LayoutGPT and ReCo [56].
|
| 120 |
+
|
| 121 |
+

|
| 122 |
+
Figure 4: Dense layout planning: LayoutGPT can generate rich objects or categories in complex scenes for MSCOCO 2017 Panoptic prompts [29]. Text-based inpainting: LayoutGPT can generate free-form regional descriptions that are not mentioned in the global prompt.
|
| 123 |
+
|
| 124 |
+
# 4.3 Application Scenarios
|
| 125 |
+
|
| 126 |
+
By utilizing LLMs as layout generators, LayoutGPT can be applied to a diverse set of scenarios for accurate and creative image generation.
|
| 127 |
+
|
| 128 |
+
Dense Layout Planning: In Fig. 4 (top), we apply random in-context examples from COCO17 panoptic annotations with $6 \sim 1 5$ bounding boxes per image. LayoutGPT can be applied to scenarios that imply numerous objects (e.g. different kinds of donuts) or various categories (e.g. bathroom or street view). Though only a few objects are mentioned in the prompts, LayoutGPT predicts layouts for the whole scene and imagines common objects that are usually visible in each scene.
|
| 129 |
+
|
| 130 |
+
Text-based Inpainting: In addition, the inherent language generation ability of LLMs enables our method to generate fine-grained regional descriptions from coarse global prompts (Fig. 4 bottom). LayoutGPT can enrich the description of each object with details that are not mentioned in the prompt, producing suitable outputs for models like ReCo [56].
|
| 131 |
+
|
| 132 |
+
Counterfactual Scenarios: We test LayoutGPT on counterfactual prompts provided by GPT-4 [35]. The in-context examples are randomly drawn from MSCOCO 2017[29], which greatly differs from the counterfactual prompts. As shown in Fig. 5, LayoutGPT manages to generate reasonable layouts on these challenging prompts and handles the relationship between objects well.
|
| 133 |
+
|
| 134 |
+
# 4.4 Ablation Study
|
| 135 |
+
|
| 136 |
+
Component Analysis Table 4 presents the component analysis of our CSS-style prompt on spatial reasoning prompts. Comparisons between line 1-3 entails that the task instructions $( \# 2 )$ and CSS format $( \# 3 )$ effectively improve layout accuracy. Format in-context exemplars in CSS structures show a more significant effect on accuracy. Pairwise comparisons of line 5-7 support the argument that the CSS style is the most essential component. While solely applying normalization degrades accuracy in line 4, line $5 \& 8$ shows that it slightly improves the performance when combined with other components.
|
| 137 |
+
|
| 138 |
+
Table 4: Ablation study of LayoutGPT (GPT-3.5) on spatial reasoning prompts. “w/ Instr.”: with prepended task instructions. “w/ CSS”: format in-context demonstrations in CSS style. “w/ Norm.”: normalizing attribute values to integers by a fixed size.
|
| 139 |
+
|
| 140 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">w/ Instr.</td><td rowspan="2">w/ Css</td><td rowspan="2">w/ Norm.</td><td rowspan="2">Layout-to-Image Model</td><td>Layout Eval</td><td colspan="2">Image Eval</td></tr><tr><td>Acc.</td><td>Acc. (GLIP)</td><td>CLIP Sim</td></tr><tr><td>1</td><td></td><td></td><td></td><td rowspan="9"></td><td>55.12</td><td>34.35</td><td>0.259</td></tr><tr><td>2</td><td>√</td><td></td><td></td><td>78.23</td><td>47.92</td><td>0.263</td></tr><tr><td>3</td><td>√</td><td></td><td></td><td>80.82</td><td>51.38</td><td>0.264</td></tr><tr><td>4</td><td></td><td>√</td><td>GLIGEN [27]</td><td>44.10</td><td>26.43</td><td>0.257</td></tr><tr><td>5</td><td>√</td><td></td><td></td><td>81.84</td><td>52.08</td><td>0.264</td></tr><tr><td>6</td><td>√</td><td>√</td><td></td><td>73.36</td><td>44.88</td><td>0.262</td></tr><tr><td>7</td><td></td><td>√</td><td>√</td><td>76.61</td><td>47.56</td><td>0.263</td></tr><tr><td>8</td><td>√</td><td>√</td><td>√</td><td>82.54</td><td>52.86</td><td>0.264</td></tr><tr><td>9</td><td>1</td><td>√</td><td>√</td><td></td><td>31.02</td><td>0.258</td></tr><tr><td></td><td colspan="3"></td><td rowspan="2">Layout-Guidance [6]</td><td rowspan="2">82.54 100.00</td><td>33.92</td><td>0.257</td></tr><tr><td>10</td><td colspan="2">GT layouts</td><td></td><td></td></tr></table>
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 5: Qualitative examples of LayoutGPT’s performance on counterfactual prompts.
|
| 144 |
+
|
| 145 |
+
Model-Agnostic Property We show that LayoutGPT is agnostic to layout-guided image generation models in line $ 9 - 1 0$ in Table 4. We feed the same generated layouts from LayoutGPT to LayoutGuidance [6] and compute image-level metrics. Compared to using ground truth layouts $( \# 1 0 )$ , LayoutGPT $( \# 9 )$ shows a minor gap in GLIP-based accuracy and a comparable CLIP similarity score. The discrepancy in GLIP-based accuracy is similar to that in Table 2, implying that the layouts generated by our method are agnostic to the downstream model.
|
| 146 |
+
|
| 147 |
+
# 5 LayoutGPT for Indoor Scene Synthesis
|
| 148 |
+
|
| 149 |
+
# 5.1 Task Setup
|
| 150 |
+
|
| 151 |
+
Datasets & Benchmarks For indoor scene synthesis, we use an updated version of the 3D-FRONT dataset [12, 13] following ATISS [38]. After applying the same pre-processing operations, we end up with 4273 bedroom scenes and 841 scenes for the living room. We only use rectangular floor plans of the test set for evaluation since LayoutGPT is not compatible with irregular ones. Hence, we end up with 3397/453/423 for train/val/test split of bedroom scenes and 690/98/53 for train/val/test split of living room scenes.
|
| 152 |
+
|
| 153 |
+
Evaluation Metrics We follow prior work [38] to report KL divergence between the furniture category distributions of predicted and ground truth scenes. We also render scene images from four camera angles for each scene and report FID scores [19]. In addition, we report out-of-bound rates, i.e. the percentage of scenes with furniture exceeding the floor plan boundary.
|
| 154 |
+
|
| 155 |
+
# 5.2 Evaluation Results
|
| 156 |
+
|
| 157 |
+
Quantitative Results The evaluation results are recorded in Table 5. We provide a random baseline for comparison denoted as “Random Scenes”, in which the scene is randomly sampled from the in-context exemplars for each inference run.3
|
| 158 |
+
|
| 159 |
+
Table 5: Comparison of LayoutGPT with ATISS on indoor scene synthesis. “Random Scenes” means randomly sampling one training scene from the in-context demonstrations for each inference room sample. (\* denotes results reproduced by us)
|
| 160 |
+
|
| 161 |
+
<table><tr><td rowspan="2">Models</td><td colspan="3">Bedrooms</td><td colspan="3">Living Rooms</td></tr><tr><td>Out of bounds (↓)</td><td>KL Div. (↓)</td><td>FID (↓)</td><td>Out of bounds (↓)</td><td>KL Div. (↓)</td><td>FID(1)</td></tr><tr><td>Random Scenes</td><td>11.16</td><td>0.0142</td><td>23.76</td><td>9.43</td><td>0.1239</td><td>79.61</td></tr><tr><td>ATISS*[17]</td><td>49.88</td><td>0.0113</td><td>30.02</td><td>83.02</td><td>0.1054</td><td>85.40</td></tr><tr><td>LayoutGPT (GPT-3.5)</td><td>43.26</td><td>0.0995</td><td>28.37</td><td>73.58</td><td>0.1405</td><td>76.34</td></tr><tr><td>LayoutGPT(GPT-3.5,chat)</td><td>57.21</td><td>0.0846</td><td>29.66</td><td>81.13</td><td>0.2077</td><td>89.40</td></tr><tr><td>LayoutGPT (GPT-4)</td><td>51.06</td><td>0.1417</td><td>29.88</td><td>64.15</td><td>0.1613</td><td>78.60</td></tr></table>
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 6: Visualization of LayoutGPT across different types of rooms with different floor plan sizes.
|
| 165 |
+
|
| 166 |
+
For both bedrooms and living rooms planning, LayoutGPT attains lower out-of-bound rates than ATISS (bedrooms: $4 3 . 2 6 \%$ vs. $4 9 . 8 8 \%$ ; living rooms: $6 4 . 1 6 \%$ vs. $8 3 . 0 2 \%$ ), which verifies LayoutGPT’s spatial reasoning ability in 3D environments. In addition, LayoutGPT has lower FID compared to ATISS (bedrooms: 28.37 vs. 30.02; living rooms: 76.34 vs. 85.40), which indicates that the planned scene has higher quality. Noted here that the living room split contains much more objects on average (11 for living rooms vs. 5 in bedrooms) and is a low-resource split with only 690 training scenes. Therefore, while living rooms are challenging for both methods, LayoutGPT shows more significant improvement over ATISS as supervised methods tend to overfit in early epochs.
|
| 167 |
+
|
| 168 |
+
Meanwhile, ATISS performs better in terms of KL divergence, which means that the overall furniture distribution predicted by ATISS is closer to the test split. We observe that LayoutGPT tends to avoid furnitures that are extremely rarely seen in each scene (e.g. coffee tables for bedrooms) as these objects appear less frequently in the in-context demonstrations. The limited in-context demonstration size also restricts LayoutGPT to have a universal observation of the furniture distributions.
|
| 169 |
+
|
| 170 |
+
Qualitative Results As shown in Fig. 6, LayoutGPT manages to understand common 3D concepts, such as “the pendant lamp should be suspended from the ceiling” and “nightstands should be placed by the headboard of the bed” (bottom row). When given a floor plan size for both living and dining rooms, LayoutGPT can also generate complicated 3D planning with dining tables and chairs on one side, and a sofa, a coffee table, and a TV stand on the other side (bottom right).
|
| 171 |
+
|
| 172 |
+
# 5.3 Application Scenarios
|
| 173 |
+
|
| 174 |
+
Text-guided Synthesis: LayoutGPT can follow text captions to arrange furniture in the scene (see Fig. 7). When the captions enumerate a complete list of furniture, LayoutGPT strictly follows the captions to generate the furniture and achieve a KL Div. value close to zero.
|
| 175 |
+
|
| 176 |
+
Partial Scene Completion: Thanks to the autoregressive decoding mechanism, LayoutGPT can complete a scene with partial arrangments such that the additional furniture remains coherent with the existing ones. Through in-context demonstrations, LayoutGPT learns critical (visual) commonsense such as visual symmetric (e.g. nightstands in Fig. 8 (a)), positional relations (e.g. stool at the end of the bed in Fig. 8 (b)), and room functions (e.g. desks and chairs in the dining area in Fig. 8 (d)).
|
| 177 |
+
|
| 178 |
+

|
| 179 |
+
Figure 7: Generation of 3D scenes based on text captions that enumerate the furniture.Bedroom, 3.8m × 3.3m Master Bedroom, 5.0 m × 3.0m Living & Dining room, 3.6 mBedroom, 3.8m × 3.3m Master Bedroom, 5.0 m × 3.0m Living & Dining room, 3.6 m Bedroom, 3.8m × 3.3m Master Bedroom, 5.0 m × 3.0m Living & Dining room, 3.6 m ×
|
| 180 |
+
|
| 181 |
+

|
| 182 |
+
Figure 8: LayoutGPT can successfully complete a partial scene for different rooms. We provide three starting objects for bedrooms and seven objects for living rooms.
|
| 183 |
+
|
| 184 |
+
# 5.4 Ablation Study
|
| 185 |
+
|
| 186 |
+
Similar to Sec. 4.4, we study the effect of task instructions, CSS structure, and normalization on indoor scene synthesis (see Table 6). In contrast to our conclusion for 2D planning in Sec. 4.4, comparisons between line 1-4 show that normalization $( \# 4 )$ is the most critical component for suppressing the out-of-bound rate while the CSS structure is also effective. We observe that LLMs occasionally copy attribute values directly from in-context exemplars even though the room sizes are different. Therefore,
|
| 187 |
+
|
| 188 |
+
Table 6: Ablation studies on LayoutGPT on the bedroom split for 3D indoor scene synthesis.
|
| 189 |
+
|
| 190 |
+
<table><tr><td></td><td>w/ Instr.</td><td>w/ Css</td><td>w/ Norm.</td><td>Out of Bound ↓</td><td>KL Div. ↓</td><td>FID↓</td></tr><tr><td>1</td><td></td><td></td><td></td><td>55.32</td><td>0.1070</td><td>56.83</td></tr><tr><td>2</td><td>5</td><td></td><td></td><td>54.85</td><td>0.1153</td><td>58.85</td></tr><tr><td>3</td><td></td><td>√</td><td></td><td>51.77</td><td>0.0776</td><td>55.62</td></tr><tr><td>4</td><td></td><td></td><td>厂</td><td>46.57</td><td>0.1276</td><td>58.24</td></tr><tr><td>5</td><td>√</td><td></td><td></td><td>51.30</td><td>0.0741</td><td>57.64</td></tr><tr><td>6</td><td></td><td></td><td></td><td>46.81</td><td>0.0913</td><td>58.61</td></tr><tr><td>7</td><td></td><td></td><td></td><td>43.74</td><td>0.0848</td><td>57.70</td></tr><tr><td>8</td><td>√</td><td></td><td></td><td>43.26</td><td>0.0995</td><td>56.66</td></tr></table>
|
| 191 |
+
|
| 192 |
+
normalizing all exemplars to the same scale can reduce the out-of-bound rate. CSS style facilitates LLMs to understand the physical meaning behind each attribute value and hence leads to almost the best result when combined with normalization $( \# 7 )$ .
|
| 193 |
+
|
| 194 |
+
# 6 Conclusion
|
| 195 |
+
|
| 196 |
+
In this work, we address a new direction of generative model collaborations. Specifically, we are interested in how Large Language Models (LLMs) can collaborate with visual generative models. To this end, we propose LayoutGPT, an approach that turns an LLM into a visual planner through in-context learning and CSS style prompts. LayoutGPT can generate plausible visual arrangements in both image space and 3D indoor scenes. LayoutGPT can effectively improve image compositions by generating accurate layouts and achieves comparable performance in indoor scene synthesis compared to supervised methods. Besides, LayoutGPT can improve user efficiency in image generation and serve as an essential part of a unified system for all types of multimodal tasks.
|
| 197 |
+
|
| 198 |
+
# Acknowledgments
|
| 199 |
+
|
| 200 |
+
The work was funded by an unrestricted gift from Google and a gift from the Robert N. Noyce Trust to the University of California via the Noyce Initiative. We would like to thank Google and the Robert N. Noyce Trust for their generous sponsorship. The views and conclusions contained in this document are those of the authors and should not be interpreted as representing the sponsors’ official policy, expressed or inferred.
|
| 201 |
+
|
| 202 |
+
# References
|
| 203 |
+
|
| 204 |
+
[1] Jean-Baptiste Alayrac, Jeff Donahue, Pauline Luc, Antoine Miech, Iain Barr, Yana Hasson, Karel Lenc, Arthur Mensch, Katie Millican, Malcolm Reynolds, Roman Ring, Eliza Rutherford, Serkan Cabi, Tengda Han, Zhitao Gong, Sina Samangooei, Marianne Monteiro, Jacob Menick, Sebastian Borgeaud, Andy Brock, Aida Nematzadeh, Sahand Sharifzadeh, Mikolaj Binkowski, Ricardo Barreira, Oriol Vinyals, Andrew Zisserman, and Karen Simonyan. Flamingo: a visual language model for few-shot learning. ArXiv, abs/2204.14198, 2022. 4
|
| 205 |
+
[2] Eslam Mohamed Bakr, Pengzhan Sun, Xiaogian Shen, Faizan Farooq Khan, Li Erran Li, and Mohamed Elhoseiny. HRS-Bench: Holistic, Reliable and Scalable Benchmark for Text-toImage Models. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 20041–20053, October 2023. 3, 6, 7, 19
|
| 206 |
+
[3] Tim Brooks, Aleksander Holynski, and Alexei A Efros. Instructpix2pix: Learning to follow image editing instructions. CVPR2023, 2022. 2
|
| 207 |
+
[4] Hila Chefer, Yuval Alaluf, Yael Vinker, Lior Wolf, and Daniel Cohen-Or. Attend-and-excite: Attention-based semantic guidance for text-to-image diffusion models. ACM Transactions on Graphics (TOG), 42(4):1–10, 2023. 3, 5, 6, 21
|
| 208 |
+
[5] Mark Chen, Jerry Tworek, Heewoo Jun, Qiming Yuan, Henrique Ponde, Jared Kaplan, Harrison Edwards, Yura Burda, Nicholas Joseph, Greg Brockman, Alex Ray, Raul Puri, Gretchen Krueger, Michael Petrov, Heidy Khlaaf, Girish Sastry, Pamela Mishkin, Brooke Chan, Scott Gray, Nick Ryder, Mikhail Pavlov, Alethea Power, Lukasz Kaiser, Mohammad Bavarian, Clemens Winter, Philippe Tillet, Felipe Petroski Such, David W. Cummings, Matthias Plappert, Fotios Chantzis, Elizabeth Barnes, Ariel Herbert-Voss, William H. Guss, Alex Nichol, Igor Babuschkin, S. Arun Balaji, Shantanu Jain, Andrew Carr, Jan Leike, Joshua Achiam, Vedant Misra, Evan Morikawa, Alec Radford, Matthew M. Knight, Miles Brundage, Mira Murati, Katie Mayer, Peter Welinder, Bob McGrew, Dario Amodei, Sam McCandlish, Ilya Sutskever, and Wojciech Zaremba. Evaluating large language models trained on code. ArXiv, abs/2107.03374, 2021. 15
|
| 209 |
+
[6] Minghao Chen, Iro Laina, and Andrea Vedaldi. Training-free layout control with cross-attention guidance. arXiv preprint arXiv:2304.03373, 2023. 3, 8
|
| 210 |
+
[7] Jaemin Cho, Abhay Zala, and Mohit Bansal. Dall-eval: Probing the reasoning skills and social biases of text-to-image generation models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3043–3054, 2023. 5, 16
|
| 211 |
+
[8] Biplab Deka, Zifeng Huang, Chad Franzen, Joshua Hibschman, Daniel Afergan, Yang Li, Jeffrey Nichols, and Ranjitha Kumar. Rico: A mobile app dataset for building data-driven design applications. In Proceedings of the 30th annual ACM symposium on user interface software and technology, pages 845–854, 2017. 3
|
| 212 |
+
[9] Alaaeldin El-Nouby, Shikhar Sharma, Hannes Schulz, Devon Hjelm, Layla El Asri, Samira Ebrahimi Kahou, Yoshua Bengio, and Graham W.Taylor. Tell, Draw, and Repeat: Generating and Modifying Images Based on Continual Linguistic Instruction. In International Conference on Computer Vision (ICCV), 2019. 5
|
| 213 |
+
[10] Weixi Feng, Xuehai He, Tsu-Jui Fu, Varun Jampani, Arjun Akula, Pradyumna Narayana, Sugato Basu, Xin Eric Wang, and William Yang Wang. Training-free structured diffusion guidance for compositional text-to-image synthesis. ICLR, 2023. 2, 3
|
| 214 |
+
[11] Stella Frank, Emanuele Bugliarello, and Desmond Elliott. Vision-and-language or vision-forlanguage? on cross-modal influence in multimodal transformers. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pages 9847–9857, 2021. 3
|
| 215 |
+
[12] Huan Fu, Bowen Cai, Lin Gao, Ling-Xiao Zhang, Jiaming Wang, Cao Li, Qixun Zeng, Chengyue Sun, Rongfei Jia, Binqiang Zhao, et al. 3d-front: 3d furnished rooms with layouts and semantics. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2021. 8
|
| 216 |
+
[13] Huan Fu, Rongfei Jia, Lin Gao, Mingming Gong, Binqiang Zhao, Steve Maybank, and Dacheng Tao. 3d-future: 3d furniture shape with texture. International Journal of Computer Vision, 129:3313–3337, 2021. 8
|
| 217 |
+
[14] Tsu-Jui $\mathrm { F u ^ { * } }$ , Linjie $\mathrm { L i ^ { * } }$ , Zhe Gan, Kevin Lin, William Yang Wang, Lijuan Wang, and Zicheng Liu. An Empirical Study of End-to-End Video-Language Transformers with Masked Visual Modeling. In Conference on Computer Vision and Pattern Recognition (CVPR), 2023. 3
|
| 218 |
+
[15] Tsu-Jui Fu, William Yang Wang, Daniel McDuff, and Yale Song. DOC2PPT: Automatic Presentation Slides Generation from Scientific Documents. In Association for the Advancement of Artificial Intelligence (AAAI), 2022. 3
|
| 219 |
+
[16] Tsu-Jui Fu, Xin Eric Wang, Scott Grafton, Miguel Eckstein, and William Yang Wang. SSCR: Iterative Language-Based Image Editing via Self-Supervised Counterfactual Reasoning. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2020. 5
|
| 220 |
+
[17] Kamal Gupta, Justin Lazarow, Alessandro Achille, Larry S Davis, Vijay Mahadevan, and Abhinav Shrivastava. Layouttransformer: Layout generation and completion with self-attention. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 1004– 1014, 2021. 2, 3, 4, 5, 6, 9
|
| 221 |
+
[18] Tanmay Gupta and Aniruddha Kembhavi. Visual programming: Compositional visual reasoning without training. CVPR 2023, 2022. 3
|
| 222 |
+
[19] Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. Advances in neural information processing systems, 30, 2017. 8
|
| 223 |
+
[20] Lianghua Huang, Di Chen, Yu Liu, Yujun Shen, Deli Zhao, and Jingren Zhou. Composer: Creative and controllable image synthesis with composable conditions. In International Conference on Machine Learning, 2023. 2
|
| 224 |
+
[21] Akash Abdu Jyothi, Thibaut Durand, Jiawei He, Leonid Sigal, and Greg Mori. Layoutvae: Stochastic scene layout generation from a label set. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9895–9904, 2019. 2, 3
|
| 225 |
+
[22] Jing Yu Koh, Ruslan Salakhutdinov, and Daniel Fried. Grounding language models to images for multimodal generation. In International Conference on Machine Learning, 2023. 3
|
| 226 |
+
[23] Xiang Kong, Lu Jiang, Huiwen Chang, Han Zhang, Yuan Hao, Haifeng Gong, and Irfan Essa. Blt: bidirectional layout transformer for controllable layout generation. In Computer Vision– ECCV 2022: 17th European Conference, Tel Aviv, Israel, October 23–27, 2022, Proceedings, Part XVII, pages 474–490. Springer, 2022. 2, 3, 4
|
| 227 |
+
[24] Kimin Lee, Hao Liu, Moonkyung Ryu, Olivia Watkins, Yuqing Du, Craig Boutilier, Pieter Abbeel, Mohammad Ghavamzadeh, and Shixiang Shane Gu. Aligning text-to-image models using human feedback. arXiv preprint arXiv:2302.12192, 2023. 2, 3
|
| 228 |
+
[25] Jianan Li, Tingfa Xu, Jianming Zhang, Aaron Hertzmann, and Jimei Yang. LayoutGAN: Generating graphic layouts with wireframe discriminator. In International Conference on Learning Representations, 2019. 2, 3
|
| 229 |
+
[26] Liunian Harold Li, Pengchuan Zhang, Haotian Zhang, Jianwei Yang, Chunyuan Li, Yiwu Zhong, Lijuan Wang, Lu Yuan, Lei Zhang, Jenq-Neng Hwang, et al. Grounded language-image pre-training. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10965–10975, 2022. 5, 17
|
| 230 |
+
[27] Yuheng Li, Haotian Liu, Qingyang Wu, Fangzhou Mu, Jianwei Yang, Jianfeng Gao, Chunyuan Li, and Yong Jae Lee. Gligen: Open-set grounded text-to-image generation. 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2023. 2, 3, 5, 6, 8, 21
|
| 231 |
+
[28] Zhuowan Li, Cihang Xie, Benjamin Van Durme, and Alan Yuille. Localization vs. semantics: How can language benefit visual representation learning? arXiv preprint arXiv:2212.00281, 2022. 3
|
| 232 |
+
[29] Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In Computer Vision–ECCV 2014: 13th European Conference, Zurich, Switzerland, September 6-12, 2014, Proceedings, Part V 13, pages 740–755. Springer, 2014. 5, 7, 21
|
| 233 |
+
[30] Jingyu Liu, Wenhan Xiong, Ian Jones, Yixin Nie, Anchit Gupta, and Barlas Oguz. Clip-layout: ˘ Style-consistent indoor scene synthesis with semantic furniture embedding. arXiv preprint arXiv:2303.03565, 2023. 2
|
| 234 |
+
[31] Pan Lu, Baolin Peng, Hao Cheng, Michel Galley, Kai-Wei Chang, Ying Nian Wu, Song-Chun Zhu, and Jianfeng Gao. Chameleon: Plug-and-play compositional reasoning with large language models. arXiv preprint arXiv:2304.09842, 2023. 3
|
| 235 |
+
[32] Yujie Lu, Xianjun Yang, Xiujun Li, Xin Eric Wang, and William Yang Wang. LLMScore: Unveiling the power of large language models in text-to-image synthesis evaluation. In Thirtyseventh Conference on Neural Information Processing Systems (NeurIPS), 2023. 3
|
| 236 |
+
[33] Andrew Luo, Zhoutong Zhang, Jiajun Wu, and Joshua B Tenenbaum. End-to-end optimization of scene layout. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 3754–3763, 2020. 2
|
| 237 |
+
[34] Wan-Duo Kurt Ma, JP Lewis, W Bastiaan Kleijn, and Thomas Leung. Directed diffusion: Direct control of object placement through attention guidance. arXiv preprint arXiv:2302.13153, 2023. 2
|
| 238 |
+
[35] OpenAI. Gpt-4 technical report. arXiv preprint arXiv:2303.08774, 2023. 7, 15
|
| 239 |
+
[36] Long Ouyang, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, John Schulman, Jacob Hilton, Fraser Kelton, Luke E. Miller, Maddie Simens, Amanda Askell, Peter Welinder, Paul Francis Christiano, Jan Leike, and Ryan J. Lowe. Training language models to follow instructions with human feedback. ArXiv, abs/2203.02155, 2022. 15
|
| 240 |
+
[37] Long Ouyang, Jeffrey Wu, Xu Jiang, Diogo Almeida, Carroll Wainwright, Pamela Mishkin, Chong Zhang, Sandhini Agarwal, Katarina Slama, Alex Ray, et al. Training language models to follow instructions with human feedback. Advances in Neural Information Processing Systems, 35:27730–27744, 2022. 2, 4
|
| 241 |
+
[38] Despoina Paschalidou, Amlan Kar, Maria Shugrina, Karsten Kreis, Andreas Geiger, and Sanja Fidler. Atiss: Autoregressive transformers for indoor scene synthesis. Advances in Neural Information Processing Systems, 34:12013–12026, 2021. 3, 5, 8, 20
|
| 242 |
+
[39] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In International Conference on Machine Learning, 2021. 4
|
| 243 |
+
[40] Daniel Ritchie, Kai Wang, and Yu-an Lin. Fast and flexible indoor scene synthesis via deep convolutional generative models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6182–6190, 2019. 3
|
| 244 |
+
[41] Robin Rombach, A. Blattmann, Dominik Lorenz, Patrick Esser, and Björn Ommer. Highresolution image synthesis with latent diffusion models. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 10674–10685, 2021. 5, 6, 21
|
| 245 |
+
[42] Victor Sanh, Albert Webson, Colin Raffel, Stephen Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Arun Raja, Manan Dey, M Saiful Bari, Canwen Xu, Urmish Thakker, Shanya Sharma Sharma, Eliza Szczechla, Taewoon Kim, Gunjan Chhablani, Nihal Nayak, Debajyoti Datta, Jonathan Chang, Mike Tian-Jian Jiang, Han Wang, Matteo Manica, Sheng Shen, Zheng Xin Yong, Harshit Pandey, Rachel Bawden, Thomas Wang, Trishala Neeraj, Jos Rozen, Abheesht Sharma, Andrea Santilli, Thibault Fevry, Jason Alan Fries, Ryan Teehan, Teven Le Scao, Stella Biderman, Leo Gao, Thomas Wolf, and Alexander M Rush. Multitask prompted training enables zero-shot task generalization. In International Conference on Learning Representations, 2022. 4
|
| 246 |
+
[43] Sebastian Schuster, Ranjay Krishna, Angel Chang, Li Fei-Fei, and Christopher D Manning. Generating semantically precise scene graphs from textual descriptions for improved image retrieval. In Proceedings of the fourth workshop on vision and language, pages 70–80, 2015. 3
|
| 247 |
+
[44] Dídac Surís, Sachit Menon, and Carl Vondrick. Vipergpt: Visual inference via python execution for reasoning. In Proceedings of the IEEE/CVF International Conference on Computer Vision, 2023. 3
|
| 248 |
+
[45] Bo Wang, Tao Wu, Minfeng Zhu, and Peng Du. Interactive image synthesis with panoptic layout generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 7783–7792, 2022. 2
|
| 249 |
+
[46] Kai Wang, Yu-An Lin, Ben Weissmann, Manolis Savva, Angel X Chang, and Daniel Ritchie. Planit: Planning and instantiating indoor scenes with relation graph and spatial prior networks. ACM Transactions on Graphics (TOG), 38(4):1–15, 2019. 3
|
| 250 |
+
[47] Xinpeng Wang, Chandan Yeshwanth, and Matthias Nießner. Sceneformer: Indoor scene generation with transformers. In 2021 International Conference on 3D Vision (3DV), pages 106–115. IEEE, 2021. 3
|
| 251 |
+
[48] Jason Wei, Maarten Bosma, Vincent Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M. Dai, and Quoc V Le. Finetuned language models are zero-shot learners. In International Conference on Learning Representations, 2022. 4
|
| 252 |
+
[49] Jason Wei, Yi Tay, Rishi Bommasani, Colin Raffel, Barret Zoph, Sebastian Borgeaud, Dani Yogatama, Maarten Bosma, Denny Zhou, Donald Metzler, Ed H. Chi, Tatsunori Hashimoto, Oriol Vinyals, Percy Liang, Jeff Dean, and William Fedus. Emergent abilities of large language models. Transactions on Machine Learning Research, 2022. Survey Certification. 2
|
| 253 |
+
[50] Jason Wei, Xuezhi Wang, Dale Schuurmans, Maarten Bosma, brian ichter, Fei Xia, Ed H. Chi, Quoc V Le, and Denny Zhou. Chain of thought prompting elicits reasoning in large language models. In Alice H. Oh, Alekh Agarwal, Danielle Belgrave, and Kyunghyun Cho, editors, Advances in Neural Information Processing Systems, 2022. 2
|
| 254 |
+
[51] Chenfei Wu, Shengming Yin, Weizhen Qi, Xiaodong Wang, Zecheng Tang, and Nan Duan. Visual chatgpt: Talking, drawing and editing with visual foundation models. arXiv preprint arXiv:2303.04671, 2023. 2, 3
|
| 255 |
+
[52] Qiucheng Wu, Yujian Liu, Handong Zhao, Trung Bui, Zhe Lin, Yang Zhang, and Shiyu Chang. Harnessing the spatial-temporal attention of diffusion models for high-fidelity text-to-image synthesis. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 7766–7776, 2023. 2, 3
|
| 256 |
+
[53] Cheng-Fu Yang, Wan-Cyuan Fan, Fu-En Yang, and Yu-Chiang Frank Wang. Layouttransformer: Scene layout generation with conceptual and spatial diversity. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pages 3732–3741, 2021. 2
|
| 257 |
+
[54] Zhengyuan Yang, Zhe Gan, Jianfeng Wang, Xiaowei Hu, Yumao Lu, Zicheng Liu, and Lijuan Wang. An empirical study of gpt-3 for few-shot knowledge-based vqa. In AAAI Conference on Artificial Intelligence, 2021. 4
|
| 258 |
+
[55] Zhengyuan Yang, Linjie Li, Jianfeng Wang, Kevin Lin, Ehsan Azarnasab, Faisal Ahmed, Zicheng Liu, Ce Liu, Michael Zeng, and Lijuan Wang. Mm-react: Prompting chatgpt for multimodal reasoning and action. arXiv preprint arXiv:2303.11381, 2023. 3
|
| 259 |
+
[56] Zhengyuan Yang, Jianfeng Wang, Zhe Gan, Linjie Li, Kevin Lin, Chenfei Wu, Nan Duan, Zicheng Liu, Ce Liu, Michael Zeng, et al. Reco: Region-controlled text-to-image generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 14246–14255, 2023. 2, 3, 6, 7
|
| 260 |
+
[57] Lvmin Zhang, Anyi Rao, and Maneesh Agrawala. Adding conditional control to text-to-image diffusion models. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3836–3847, 2023. 2
|
| 261 |
+
[58] Zhuosheng Zhang, Aston Zhang, Mu Li, Hai Zhao, George Karypis, and Alex Smola. Multimodal chain-of-thought reasoning in language models. arXiv preprint arXiv:2302.00923, 2023. 3
|
| 262 |
+
[59] Xinru Zheng, Xiaotian Qiao, Ying Cao, and Rynson WH Lau. Content-aware generative modeling of graphic design layouts. ACM Transactions on Graphics (TOG), 38(4):1–15, 2019. 3
|
| 263 |
+
[60] Xu Zhong, Jianbin Tang, and Antonio Jimeno Yepes. Publaynet: largest dataset ever for document layout analysis. In 2019 International Conference on Document Analysis and Recognition (ICDAR), pages 1015–1022. IEEE, 2019. 3
|
| 264 |
+
|
| 265 |
+
# A Implementation Details
|
| 266 |
+
|
| 267 |
+
In this section, we provide a detailed description of our prompt construction and instantiate instructions examples.
|
| 268 |
+
|
| 269 |
+
Task instructions As is shown in Table 7, the specific task instructions start with verbalized descriptions of the task and are followed by the formal definition of the CSS style. As for the indoor scene synthesis, we additionally provide a list of available furniture and the normalized frequency distribution for fair comparisons with the supervised method. Yet we discover that the provided frequency distribution has little effect on the generation results, based on the trivial change in the KL divergence. In some cases, it is important to make LLMs sample from a defined distribution instead of learning the distribution from in-context exemplars, which we leave for future work.
|
| 270 |
+
|
| 271 |
+
Table 7: The prepending instructions provided to GPT- $3 . 5 / 4$ during our LayoutGPT’s 2D and 3D layout planning process. The instructions listed here are for the setting with CSS structure and with normalization.
|
| 272 |
+
|
| 273 |
+
<table><tr><td>Task</td><td>Instruction for GPT-3.5/4</td></tr><tr><td rowspan="2">2D Layout Planning</td><td>Instruction: Given a sentence prompt that will be used to generate an image,plan the layout of the image. The</td></tr><tr><td>generated layout should folow the CSS style,where each line starts with the object description and is followed by its absolute position. Formally,each line should be like "object {width: ?px; height: ?px; left: ?px;top: ?px;}". The image is 64px wide and 64px high. Therefore,al properties of the positions should not exceed 64px, including the addition of left and width and the addition of top and height.</td></tr><tr><td rowspan="4">3D Layout Planning</td><td>Instruction: Synthesize the 3D layout of an indoor scene from the bottom-up view.The generated 3D layout should follow the CSS style,where each line starts with the furniture category and is followed by the</td></tr><tr><td>3D size,orientation,and absolute position. Formally,each line should follow the template: FURNITURE {length: ?px: width: ?px; height: ?px; left: ?px; top: ?px; depth: ?px; orientation: ?degrees;} All values are in pixels but the orientation angleis in degrees.</td></tr><tr><td>Available furniture:armchair,bookshelf,cabinet,ceiling_lamp,chair,children_cabinet,cof- fee_table,desk,double_bed,dressing_chair,dressing_table,floor_lamp,kids_bed,nightstand, pendant_lamp,shelf, single_bed,sofa,stool,table,tv_stand,wardrobe</td></tr><tr><td>Overall furniture frequencies: (armchair: 0.Oo45; bookshelf: 0.0o76;cabinet: 0.0221; ceiling_lamp: 0.062;chair:0.024;children_cabinet:0.0075;coffee_table:0.0013;desk:0.0172;double_bed: 0.1682;dressing_chair:0.0063;dressing_table:0.0213;floor_lamp:0.0093;kids_bed:0.0079; nightstand: 0.2648;pendant_lamp: 0.1258;shelf: 0.0086; single_bed: 0.0211; sofa: 0.0018; stool: 0.012; table: 0.0201; tv_stand: 0.0308;wardrobe: 0.1557)</td></tr></table>
|
| 274 |
+
|
| 275 |
+
Base LLMs We use four variants of GPT models, (1) Codex [5] (code-davinci-002), an LLM that is fine-tuned with large-scale code datasets and can translate natural language into functioning code snippets; (2) GPT-3.5 [36] (text-davinci-003), which is trained to generate text or code from human instructions; (3) GPT-3.5-chat (gpt-3.5-turbo) and (4) GPT-4 [35] $\left( { \tt g p t - 4 } \right)$ , which are both optimized for conversational tasks. For the last two models, we first feed the in-context exemplars as multiple turns of dialogues between the user and the model to fit into the API design. However, we generally observe that GPT-3.5-chat and GPT-4 are not as strong as GPT-3.5 in learning from the in-context demonstrations, especially when the dialogue format follows a certain structure instead of free-form descriptions.
|
| 276 |
+
|
| 277 |
+
Hyperparameters For all LLMs, we fix the sampling temperature to 0.7 and apply no penalty to the next token prediction. For image layouts evaluation in Table 2, we fix the number of exemplars to 16 for numerical reasoning, and 8 for spatial reasoning, based on the best results of a preliminary experiment. However, we do not observe significant gaps in evaluation results when using different amounts of exemplars (see Sec. B.4). For each prompt, we generate five different layouts/images using baselines or LayoutGPT and thus result in 3810 images for numerical reasoning and 1415 images for spatial reasoning in all reported evaluation results. As for indoor scene synthesis, we fix the number of exemplars to 8 for bedrooms and 4 for living rooms to reach the maximum allowed input tokens. We set the maximum output token as 512 for bedrooms and 1024 for living rooms as bedrooms have ${ \sim } 5$ objects per room while living rooms have ${ \sim } 1 1$ objects per room. We generate one layout for each rectangular floor plan for evaluation.
|
| 278 |
+
|
| 279 |
+
# B LayoutGPT for 2D Layout Planning
|
| 280 |
+
|
| 281 |
+
# B.1 NSR-1K Benchmark Construction
|
| 282 |
+
|
| 283 |
+
We rely on the MSCOCO annotations to create NSR-1K with ground-truth layout annotations. Note that each image in COCO is paired with a set of captions and a set of bounding box annotations.
|
| 284 |
+
|
| 285 |
+
Numerical Reasoning We primarily focus on the competence of T2I models to count accurately, i.e., generate the correct number of objects as indicated in the input text prompt. The prompts for this evaluation encompass object counts ranging from 1 to 5. To design the template-based T2I prompts, we initially sample possible object combinations within an image based on the bounding box annotations. We only use the bounding box annotation of an image when there are at most two types of objects within the image. As a result, the template-based prompts consist of three distinct types: (1) Single Category, wherein the prompt references only one category of objects in varying numbers; (2) Two Categories, wherein the prompt references two categories of distinct objects in varying numbers; and (3) Comparison, wherein the prompt references two categories of distinct objects but specifies the number of only one type of object, while the number of the other type is indicated indirectly through comparison terms including “fewer than”, “equal number of”, and “more than”. As for natural prompts, we select COCO captions containing one of the numerical keywords from “one” to “five” and filter out those with bounding box categories that are not mentioned to avoid hallucination.
|
| 286 |
+
|
| 287 |
+
Spatial Reasoning We challenge LLMs with prompts that describe the positional relations of two or more objects. Our spatial reasoning prompts consist of template-based prompts and natural prompts from COCO. To construct template-based prompts, we first extract images with only two ground-truth bounding boxes that belong to two different categories. Following the definitions from PaintSkill [7], we ensure the spatial relation of the two boxes belong to (left, right, above, below). Specifically, given two objects $A , B$ , their bounding box centers $( x _ { A } , y _ { A } ) , ( x _ { B } , y _ { B } )$ and the Euclidean distance $d$ between two centers, we define their spatial relation $\operatorname { R e l } ( A , B )$ as:
|
| 288 |
+
|
| 289 |
+
$$
|
| 290 |
+
\begin{array} { r } { \mathrm { R e l } ( A , B ) = \left\{ \begin{array} { l l } { B \mathrm { a b o v e } A } & { \mathrm { i f } \frac { y _ { B } - y _ { A } } { d } \geqslant s i n ( \pi / 4 ) } \\ { B \mathrm { b e l o w } A } & { \mathrm { i f } \frac { y _ { B } - y _ { A } } { d } \leqslant s i n ( - \pi / 4 ) } \\ { B \mathrm { o n t h e l e f t o f } A } & { \mathrm { i f } \frac { x _ { B } - x _ { A } } { d } < c o s ( 3 \pi / 4 ) } \\ { B \mathrm { o n t h e r i g h t o f } A } & { \mathrm { i f } \frac { x _ { B } - x _ { A } } { d } > c o s ( \pi / 4 ) } \end{array} \right. } \end{array}
|
| 291 |
+
$$
|
| 292 |
+
|
| 293 |
+
The definition basically dissects a circle centered at $A$ equally into four sectors that each represent a spatial relation. While the definition may not stand for all camera viewpoints, it allows us to mainly focus on the front view of the scene. Then, we utilize the category labels and the pre-defined relations to form a prompt, as is shown in Table 1. As for the natural COCO prompts, we select prompts that contain one of the key phrases (the left/right of, on top of, under/below) and∑min(x , x′ ) ensure that the bounding box annotations align with our definition.w precicion =
|
| 294 |
+
|
| 295 |
+
# B.2 Evaluation Metrics Categories c
|
| 296 |
+
|
| 297 |
+
We denote the set of Prediction $n$ object categories in the ground truth annotation as 1 0 3x′ci $\mathcal { C } _ { G T } = c _ { 1 } , c _ { 2 } , . . . , c _ { n }$ , where % $x _ { c _ { 1 } } , x _ { c _ { 1 } } , \ldots , x _ { c _ { n } }$ represent the number of objects for each category. Additionally, we denoteMAE = ∑ | xck − x′ck | the set of $m$ object categories mentioned in GPT- $3 . 5 / 4$ ’s layout prediction as n1 $\mathcal { C } _ { p r e d } = c _ { 1 } ^ { \prime } , c _ { 2 } ^ { \prime } , . . . , c _ { m } ^ { \prime }$ , where % $x _ { c _ { 1 } ^ { \prime } } ^ { \prime } , x _ { c _ { 2 } ^ { \prime } } ^ { \prime } , \ldots , x _ { c _ { m } ^ { \prime } } ^ { \prime }$ represent the number of objects for each category accordingly. If a category= 3 (|2 − 1| + |1 − 0| + |2 − 3|) = 1 $c _ { i }$ is not mentioned in $\mathcal { C } _ { p r e d }$ , then $x _ { c _ { i } } ^ { \prime }$ is assigned a value of 0, and vice versa.
|
| 298 |
+
|
| 299 |
+
<table><tr><td>Categories</td><td>Ci</td><td>cat</td><td>bed</td><td>pillow</td></tr><tr><td>Ground Truth</td><td>Xc</td><td>2</td><td>1 ..</td><td>2</td></tr><tr><td>Prediction</td><td>xe</td><td>1</td><td>0</td><td>3</td></tr></table>
|
| 300 |
+
|
| 301 |
+
$$
|
| 302 |
+
{ \begin{array} { c } { { \scriptstyle { \it { p r e c i c i o n } } } = { \frac { \sum m i n ( x _ { c _ { k } } , x _ { c _ { k } } ^ { \prime } ) } { \sum x _ { c _ { k } ^ { \prime } } ^ { \prime } } } = { \frac { 1 + 0 + 2 } { 1 + 0 + 3 } } = 7 5 \% } \\ { { \scriptstyle { \it { r e c a l l } } } = { \frac { \sum m i n ( x _ { c _ { k } } , x _ { c _ { k } } ^ { \prime } ) } { \sum x _ { c _ { k } ^ { \prime } } } } = { \frac { 1 + 0 + 2 } { 2 + 1 + 2 } } = 6 0 \% } \end{array} }
|
| 303 |
+
$$
|
| 304 |
+
|
| 305 |
+
Table 8: Closeup of various in-context example formats with ablated CSS structure and normalization for 2D layout planning.
|
| 306 |
+
|
| 307 |
+
<table><tr><td></td><td></td><td>CSS StructureNormalizationIn-context Example Format Demo</td></tr><tr><td></td><td></td><td>Prompt: a teddy bear to the right of a book Layout: teddy bear: 0.50,0.71,0.50,0.15 book:0.50,0.61,0.00,0.26</td></tr><tr><td>厂</td><td></td><td>Prompt:a teddy bear to the right of a book Layout: teddy bear {width: 0.50; height: 0.71; left: 0.50; top: 0.15;} book{width: 0.50; height: 0.61; left: 0.0O; top: 0.26;}</td></tr><tr><td></td><td>√</td><td>Prompt: a teddy bear to the right of a book Layout: teddy bear:32,45,31,9 book:31,38,0,16</td></tr><tr><td></td><td>4</td><td>Prompt: a teddy bear to the right of a book Layout: teddy bear {width:32px; height:45px; left:31px; top:9px;} book{width:31px; height: 38px; left: Opx; top:16px;}</td></tr></table>
|
| 308 |
+
|
| 309 |
+
The numerical reasoning ability of GPT-3.5/4 on layout planning is assessed using the followingř metrics: (1) precision: calculated as $\frac { \sum _ { k = 1 } ^ { n } \operatorname* { m i n } ( x _ { c _ { k } } , x _ { c _ { k } } ^ { \prime } ) } { \sum _ { k = 1 } ^ { m } x _ { c _ { k } ^ { \prime } } ^ { \prime } }$ , is an indication of the percentage of predicted objects that exist in the groundtruth; (2) recall: calculated as $\frac { \sum _ { k = 1 } ^ { n } \operatorname* { m i n } ( x _ { c _ { k } } , x _ { c _ { k } } ^ { \prime } ) } { \sum _ { k = 1 } ^ { n } x _ { c _ { k } } }$ , indicates the percentage of ground-truth objects that are covered in the prediction; (3) accuracy: In the “comparison” subtask, an accuracy score of 1 is achieved when the predicted relation, whether it is an inequality or equality, between the two objects is accurately determined. For all other numerical subtasks, accuracy equals to 1 if the predicted categories and object numbers precisely match the ground truth. In other cases, the accuracy is 0. Fig. 9 shows an example of how we compute the precision and recall. The accuracy for this single example is 0 since the predicted object distribution does not match the ground truth in every category.
|
| 310 |
+
|
| 311 |
+
For spatial reasoning, we evaluate spatial accuracy based on the LLM-generated layouts and GLIPbased layouts. We adopt [26] finetuned on COCO to detect involved objects from the generated images and obtain the bounding boxes. For both types of layouts, we categorize the spatial relation based on the above definition and compute the percentage of predicted layouts with the correct spatial relation. For all evaluation benchmarks, we measure the CLIP similarity, which is the cosine similarity between the generated image feature and the corresponding prompt feature.
|
| 312 |
+
|
| 313 |
+
# B.3 GPT-3.5/4 Prompting
|
| 314 |
+
|
| 315 |
+
In Sec. 4.4, we investigate the impact of three components in the structured prompts: (1) Instruction, which examines whether detailed instructions explaining the task setup and the format of the supporting examples are included in the prompt. (2) Structure, which evaluates the impact of different formatting settings on the presentation of the bounding box aspects of height, width, top, and left. The “w/ CSS” setting formats the aspects in CSS, while the “w/o CSS” setting presents the four aspects in a sequence separated by a comma. (3) Normalization, which investigates the effects of rescaling the bounding box aspects to a specified canvas size and presenting them as integers in pixels in the “w/ Norm.” setting, while the “w/o Norm.” setting presents the aspects as relative scales to the canvas size in floats that range from (0, 1).
|
| 316 |
+
|
| 317 |
+
Table 7 shows the detailed prepending instructions LayoutGPT provided to GPT- $3 . 5 / 4$ models during 2D layout planning. Table 8 compares the formats of supporting examples with ablated structures and normalization settings.
|
| 318 |
+
|
| 319 |
+
For experiments in Sec. 4.3, to adapt to the nature of the Panoptic task, we add the following additional instruction when prompting LayoutGPT: “The objects layout might be dense, and objects may overlap with each other. Some objects might not have been mentioned in the prompt, but are very likely to appear in the described scenario.” To generate counterfactual prompts for text-to-image generation, the following text prompt is provided to GPT-4: “Please provide a few counterfactual prompts that depict rarely seen the spatial relationship between the 80 MSCOCO object categories. An example would be "a monkey riding on top of a bird"”.
|
| 320 |
+
|
| 321 |
+
Table 9: The automatic metric scores of LayoutGPT (GPT-3.5) with different in-context sample selection approaches. All values are in percentage $( \% )$ .
|
| 322 |
+
|
| 323 |
+
<table><tr><td>#</td><td>Exemplar Selection</td><td># In-Context Exemplars</td><td colspan="4">Numerical Reasoning</td><td colspan="2">Spatial Reasoning</td></tr><tr><td></td><td></td><td></td><td>Precision↑</td><td>Recall↑</td><td>Layout Accuracy↑</td><td>GLIP Accuracy↑</td><td>Layout Accuracy↑</td><td>GLIP Accuracy↑</td></tr><tr><td>1</td><td>Fixed Random</td><td>16</td><td>64.83</td><td>92.71</td><td>87.66</td><td>47.10</td><td>80.14</td><td>47.07</td></tr><tr><td>2</td><td></td><td>4</td><td>88.93</td><td>95.02</td><td>76.17</td><td>50.20</td><td>85.30</td><td>51.66</td></tr><tr><td>3</td><td>Retrieval</td><td>8</td><td>93.32</td><td>95.63</td><td>82.68</td><td>50.58</td><td>82.54</td><td>52.86</td></tr><tr><td>4</td><td></td><td>16</td><td>94.81</td><td>96.49</td><td>86.33</td><td>51.25</td><td>82.40</td><td>51.09</td></tr></table>
|
| 324 |
+
|
| 325 |
+

|
| 326 |
+
Figure 10: Comparison between the most similar in-context exemplar and the generation results of LayoutGPT.
|
| 327 |
+
|
| 328 |
+
# B.4 Additional Experiments
|
| 329 |
+
|
| 330 |
+
Random In-Context Exemplars Empirically, selecting in-context exemplars can be critical for the overall performance of LLMs. Apart from our retrieval-augmented method in Sec. 3, we also experiment with a fixed random set of in-context exemplars. Specifically, we randomly sample $k$ examples from the training (support) set $D$ to form a fixed set of in-context demonstrations for all test conditions $\mathcal { C } _ { j }$ . Therefore, the fixed random setting results in in-context exemplars that are unrelated to the test condition $\mathcal { C } _ { j }$ . The minor gap between lines 1&5 in Table 9 verifies that LayoutGPT is not directly copying from the in-context exemplars in most cases. Fig. 10 further justifies the argument with layout visualization of the most similar in-context exemplars and the LayoutGPT outputs.
|
| 331 |
+
|
| 332 |
+
Number of In-Context Exemplars We take a closer look at the effects of the number of in-context exemplars in the prompt as shown in Table 9. For counting, we observe that the number of exemplars is positively correlated with the counting accuracy. We conjecture that LLMs learn to make more accurate predictions for challenging prompts (e.g., comparison) by learning from more few-shot exemplars. As the layout accuracy also accounts for results where CSS parsing fails, we observe that the LLMs generate more consistent CSS-style code by learning from more examples. However, we cannot observe a similar trend in spatial reasoning prompts. We conjecture that LLMs only require as few as four demonstrations to learn the differences between the four types of spatial relations. The small optimal number of in-context exemplars implies that LLMs already have 2D spatial knowledge and can map textual descriptions to corresponding coordinate values. Yet it is important to find a proper representation to elicit such knowledge from LLMs as implied in Sec. 4.4.
|
| 333 |
+
|
| 334 |
+

|
| 335 |
+
Figure 11: Attribute binding examples of LayoutGPT and generated images using ReCo.
|
| 336 |
+
|
| 337 |
+
Table 10: The layout performance on each numerical reasoning subtask. Results reported on LayoutGPT (GPT-4).
|
| 338 |
+
|
| 339 |
+
<table><tr><td>Prompt Source</td><td>Subtask</td><td>Precision</td><td>Recall</td><td>Accuracy</td></tr><tr><td rowspan="3">Template</td><td>Single Category</td><td>85.96</td><td>85.96</td><td>85.96</td></tr><tr><td>Two Categories</td><td>85.14</td><td>85.04</td><td>66.60</td></tr><tr><td>Comparison</td><td>-</td><td>-</td><td>77.80</td></tr><tr><td colspan="2">Natural Prompts from MSCOCO</td><td>72.08</td><td>87.1</td><td>82.79</td></tr><tr><td></td><td>Total</td><td>78.36</td><td>86.29</td><td>78.43</td></tr></table>
|
| 340 |
+
|
| 341 |
+
Performance on Numerical Subtasks Table 10 presents the performance of layout generation in various numerical reasoning subtasks. Regarding template-based prompts, the LayoutGPT demonstrates superior performance in the “Single Category” numerical reasoning task, exhibiting precision, recall, and accuracy values around $86 \%$ . However, when it comes to the “Two Category” numerical reasoning task, while precision and recall experience minimal changes, the accuracy drops to $66 \%$ . For the “Comparison” subtask, the accuracy hovers around $78 \%$ . These outcomes indicate that LayoutGPT encounters greater challenges when confronted with multi-class planning scenarios, whether the number of objects is explicitly provided or indirectly implied through comparative clauses.
|
| 342 |
+
|
| 343 |
+
For natural prompts extracted from MSCOCO, a noteworthy observation is the high recall accompanied by relatively lower precision. This discrepancy arises due to the ground truth bounding box annotations encompassing only 80 object classes, whereas the natural prompts may mention objects beyond the annotated classes. Consequently, our LayoutGPT may predict object layouts corresponding to classes not present in the ground truth, which, despite lowering precision, aligns with the desired behavior.
|
| 344 |
+
|
| 345 |
+
Performance on Size Comparison Reasoning Task We evaluate LayoutGPT’s reasoning ability regarding object size. We use the standard HRS benchmark [2] which is designed for benchmarking compositional text-to-image models. HRS prompts for size reasoning contain comparison terms between randomly sampled common objects. The size relations described in HRS size prompts are often counterfactual and rarely seen (e.g., “a person which is smaller than a chair and larger than horse”, “a car which is smaller than a banana and chair and bigger than airplane”.). LayoutGPT achieves an accuracy of $9 8 . 0 \% / 9 3 . 1 \% / 9 2 . 1 \%$ when the prompt involves size comparison between 2/3/4 objects. Meanwhile, the best size reasoning performance of nine text-to-image models reported by the HRS benchmark is only $3 1 . 1 \% / 0 . 2 \% / 0 \% .$ . The results further verify that LayoutGPT acquires decent reasoning ability on rare scenarios / counterfactual prompts.
|
| 346 |
+
|
| 347 |
+
# B.5 Failure Cases
|
| 348 |
+
|
| 349 |
+
Fig. 12 shows typical failure cases in numerical and spatial relations. As previously discussed, we observe in Table 10 that numerical prompts that involves two type of objects (“Two Categories” and “Comparison”) are more challenging to LayoutGPT and the image generation model. In these subtasks, LayoutGPT tends to predict much smaller bounding boxes to fit all objects within the limited image space. The small boxes further challenge GLIGEN to fit the object within the limited region, as shown in Fig. 12 (right).
|
| 350 |
+
|
| 351 |
+

|
| 352 |
+
Figure 12: Typical failure cases of LayoutGPT and the generation results using GLIGEN.
|
| 353 |
+
|
| 354 |
+

|
| 355 |
+
Figure 13: Sorted scene differences between LayoutGPT generated scenes and the most similar incontext exemplars of 423 testing bedroom samples. We partition the distribution into three segments representing different behaviors of LayoutGPT. Duplication: The generated scene is a duplication of the exemplar. Modification: LayoutGPT slightly modifies one exemplar as the generated layout. Generation: LayoutGPT generates novel scenes that are highly different from the exemplars.
|
| 356 |
+
|
| 357 |
+
# C LayoutGPT for 3D Scene Synthesis
|
| 358 |
+
|
| 359 |
+
Due to the limitation in datasets, the conditions are room type and room size instead of text descriptions. While ATISS [38] utilizes the floor plan image as the input condition, LLMs are not compatible with image inputs. Therefore, we convert the floor plan image into the specification of the room size. Therefore, the input conditions are similar to “Room Type: Bedroom, Room Size: max length 256px, max width 256px”.
|
| 360 |
+
|
| 361 |
+
# C.1 Exemplar Selection
|
| 362 |
+
|
| 363 |
+
Similar to Sec. B.4, we investigate the effect of using a random set of in-context exemplars for indoor scene synthesis. When we apply 8 random bedroom layouts from the training set as in-context exemplars, the out-of-bound rate increases from $4 3 . 2 6 \%$ in Table 5 to $8 5 . 5 8 \%$ . The significant differences suggest that LayoutGPT heavily relies on rooms with similar floor plans to maintain objects within the boundary. Yet we verify that the generated layouts from LayoutGPT are not duplicates of the in-context exemplars in most cases.
|
| 364 |
+
|
| 365 |
+
We first define a training scene layout as a set of objects $S ^ { t } = \{ \mathbf { o } _ { 1 } ^ { t } , \dots , \mathbf { o } _ { m } ^ { t } \}$ , and a generated scene layout as $S ^ { g } = \bigl \{ \mathbf o _ { 1 } ^ { g } , \dots \bigl \} \mathbf o _ { n } ^ { g } \bigr \}$ . Note that $\mathbf { o } _ { j }$ consists of category $\mathbf { c } _ { j }$ , location $\mathbf { t } _ { j } \in \mathbb { R } ^ { 3 }$ , size $\mathbf { s } _ { j } \in \mathbb { R } ^ { 3 } .$ , and orientation $\mathbf { r } _ { j } \in \mathbb { R }$ , i.e. $\mathbf { o } _ { \mathbf { j } } = ( \mathbf { c } _ { j } , \mathbf { t } _ { j } , \mathbf { \check { s } } _ { j } , \mathbf { r } _ { j } )$ We define the scene difference $D ( \cdot | \cdot )$ between $S ^ { t }$ and $S ^ { t }$ as
|
| 366 |
+
|
| 367 |
+
$$
|
| 368 |
+
D ( S ^ { t } | S ^ { g } ) = \sum _ { i = 1 } ^ { n } \operatorname* { m i n } _ { j , \mathbf { c } _ { j } ^ { t } = \mathbf { c } _ { i } ^ { g } } ( \| \mathbf { t } _ { j } ^ { t } - \mathbf { t } _ { i } ^ { g } \| _ { 1 } + \| \mathbf { s } _ { j } ^ { t } - \mathbf { s } _ { i } ^ { g } \| _ { 1 } ) .
|
| 369 |
+
$$
|
| 370 |
+
|
| 371 |
+
We set $\mathbf { t } _ { j } ^ { t } , \mathbf { s } _ { j } ^ { t }$ to 0 if $S ^ { t }$ does not have a single object that belongs to the same category as $\mathbf { c } _ { i } ^ { g }$ . For each testing sample of the bedroom, we compute the scene differences between the generated layout and all eight in-context exemplars and use the minimum value as the final scene difference. Note that all parameters used for computation are in “meters” instead of “pixels”.
|
| 372 |
+
|
| 373 |
+

|
| 374 |
+
Figure 14: Typical failure cases of LayoutGPT.
|
| 375 |
+
|
| 376 |
+
We plot the scene differences of all 423 testing samples in Fig. 13. We empirically discover that a scene difference below 1.0 means $S ^ { g }$ is highly similar to $S ^ { t }$ , which we conclude as duplication from in-context exemplars. A scene difference below 6.0 shows moderate differences in object sizes or locations between two scenes, representing a modification based on $S ^ { t }$ to generate $S ^ { g }$ . Finally, a scene difference larger than 6.0 represents new objects or significant differences in object sizes or locations between the exemplar and the generated layouts, i.e. true generation. Fig. 13 shows that 34/111/278 scenes belong to duplication/modification/generation. Among each category, 30/67/143 scenes have no out-of-bound furniture. Therefore, LayoutGPT is performing generation instead of duplicating in-context exemplars in most cases.
|
| 377 |
+
|
| 378 |
+
# C.2 Failure Cases
|
| 379 |
+
|
| 380 |
+
While LayoutGPT achieves comparable results as ATISS, LayoutGPT cannot avoid typical failure cases as shown in Fig. 14, such as out-of-bound furniture and overlapped objects. Fig. 14 (right) shows an incorrect placement of nightstands on the same side of the bed while they are commonly placed on each side of the bed headboard. Future work could focus on more sophisticated in-context learning or fine-tuning methods to improve the LLMs’ understanding of 3D concepts.
|
| 381 |
+
|
| 382 |
+
# D LayoutGPT for 2D Keypoint Planning
|
| 383 |
+
|
| 384 |
+
In addition to its application in 2D and 3D layout planning, we investigate the feasibility of leveraging LayoutGPT for 2D keypoint planning to facilitate text-conditioned image generation. In this approach, we utilize LayoutGPT to predict keypoint distributions based on a given text prompt, and subsequently employ GLIGEN [27] for keypoint-to-image generation. The keypoint format used aligns with the specifications outlined in MSCOCO2017 [29], focusing on 17 keypoints that correspond to the human skeleton. Similar to our methodology for selecting supporting examples in the context of 2D layout planning (Section B), we retrieve the $k$ -most similar examples from the training set of MSCOCO2017 and utilize these examples to provide keypoint distributions as input to GPT-3.5/4. Table 11 presents an illustrative example of the input format employed for keypoint planning with GPT-3.5.
|
| 385 |
+
|
| 386 |
+
Fig. 15 presents several illustrative examples that compare the images generated by conditioning on keypoints planned by our LayoutGPT with those generated by end-to-end models such as StableDiffusion- $\cdot \mathbf { v } 2 . 1$ [41] and Attend-and-Excite [4]. In this preliminary demonstration, we observe that LayoutGPT exhibits promising potential in offering inherent control over specific movements or actions through keypoint planning.
|
| 387 |
+
|
| 388 |
+
Nevertheless, it is worth noting that keypoints planning presents considerably greater challenges compared to bounding box layout planning, attributable to several evident factors. Firstly, keypoints planning necessitates the prediction of the positions of 17 nodes, which is significantly more complex than the 2D layout planning involving four aspects or the 3D layout planning encompassing seven aspects. Secondly, the distribution of keypoints encompasses a much larger array of spatial relations due to the numerous possible body movements. In contrast, previous 2D layout planning tasks only involve four types of spatial relations. These inherent complexities render keypoint planning heavily reliant on in-context demonstrations. However, the limited availability of annotations pertaining to
|
| 389 |
+
|
| 390 |
+
Instruction:
|
| 391 |
+
Given a sentence prompt that will be used to generate an image, plan skeleton keypoints layout of the mentioned objects. The skeleton keypoints include the following 17 nodes: nose, left_eye, right_eye, left_ear, right_ear, left_shoulder, right_shoulder, left_elbow, right_elbow, left_wrist, right_wrist, left_hip, right_hip, left_knee, right_knee, left_ankle, right_ankle. The generated keypoints layout should follow the CSS style, where each line starts with the keypoint node name and is followed by its absolute position.
|
| 392 |
+
Formally, each line should be like "node_name {left: ?px; top: ?px; }". Please follow this format strictly. Do not display in other variation of formats. Notice that some keypoint nodes may not be visible on the canvas. In such cases, simply put "node_name {left: 0px; top: 0px; }" for the invisible nodes. The image is $6 4 \mathrm { p x }$ wide and $6 4 \mathrm { p x }$ high. Therefore, all properties of the positions should not exceed $6 4 \mathrm { p x }$ .
|
| 393 |
+
|
| 394 |
+
Prompt: a man on a surfboard in a river near a couple of trees and branches
|
| 395 |
+
|
| 396 |
+
Keypoints:
|
| 397 |
+
|
| 398 |
+
person#1: nose {left: 36px; top: 33px; } left_eye {left: 36px; top: 33px; } right_eye {left: 36px; top: 33px; } left_ear {left: 37px; top: 33px; } right_ear {left: $0 \mathrm { p x }$ ; top: 0px; } left_shoulder {left: 38px; top: 34px; } right_shoulder {left: 36px; top: 35px; } left_elbow {left: 35px; top: 34px; } right_elbow {left: 35px; top: 38px; } left_wrist {left: $3 3 \mathrm { p x }$ ; top: 32px; } right_wrist {left: 33px; top: 39px; } left_hip {left: $3 9 \mathrm { p x }$ ; top: 39px; } right_hip {left: $3 7 \mathrm { p x }$ ; top: 40px; } left_knee {left: 38px; top: 44px; } right_knee {left: 37px; top: 44px; } left_ankle {left: $3 9 \mathrm { p x }$ ; top: 49px; } right_ankle {left: 37px; top: 48px; }
|
| 399 |
+
|
| 400 |
+
# [MORE SUPPORTING EXAMPLES]
|
| 401 |
+
|
| 402 |
+
Prompt: a man leaning on a surfboard in the water riding a wave Keypoints:
|
| 403 |
+
|
| 404 |
+
body movements in the MSCOCO dataset further exacerbates the challenges associated with reliable keypoint planning. Therefore, we leave the exploration of this potential direction to future research endeavors.
|
| 405 |
+
|
| 406 |
+
# E Ethical Statement
|
| 407 |
+
|
| 408 |
+
In addition to the layouts predicted by GPT- $3 . 5 / 4$ , we also incorporate human-planned layouts as a natural baseline for comparative analysis. To facilitate this, we provide annotators with an interface featuring a blank square space where they can draw bounding boxes. Alongside the input text prompt, we also present the noun words or phrases from the prompt to human annotators, instructing them to draw a bounding box for each corresponding element. We intentionally refrain from imposing additional constraints, enabling annotators to freely exercise their imagination and create layouts based on their understanding of reasonable object arrangements. To compensate annotators for their efforts, we offer a payment rate of $\$ 0.2$ US dollars per Human Intelligence Task (HIT). The average completion time of approximately 30 seconds per HIT, which corresponds to an average hourly payment rate of $\$ 24$ .
|
| 409 |
+
|
| 410 |
+
# F Limitations
|
| 411 |
+
|
| 412 |
+
The current work has several limitations that provide opportunities for future research. Firstly, while this work focuses on 2D and 3D bounding box layouts and makes a preliminary attempt at keypoints, there exist various other methods for providing additional spatial knowledge in image/scene generation, such as segmentation masks and depth maps. Future work could explore integrating LLMs with these alternative visual control mechanisms to broaden the scope of visual planning capabilities. Secondly, the current work primarily addresses visual generation tasks and lacks a unified framework for handling other visual tasks like classification or understanding. Extending the proposed framework to encompass a wider range of visual tasks would provide a more comprehensive and versatile solution. Thirdly, this work is a downstream application that attempts to distill knowledge from LLMs’ extensive knowledge bases. Future research could explore more fundamental approaches that directly enhance the visual planning abilities of various visual generation models. By developing specialized models that are explicitly designed for visual planning, it may be possible to achieve more refined and dedicated visual generation outcomes. Overall, while the current work demonstrates the potential of using LLMs for visual planning, there are avenues for future research to address the aforementioned limitations and further advance the field of visual generation and planning.
|
| 413 |
+
|
| 414 |
+

|
| 415 |
+
Figure 15: Plausible examples of LayoutGPT(GPT-4) planning keypoints distributions before conducting text-conditioned image generation.
|
| 416 |
+
|
| 417 |
+
# G Broader Impact
|
| 418 |
+
|
| 419 |
+
The utilization of LLMs for conducting visual planning in compositional 2D or 3D generation has significant broader impacts. Firstly, LLMs alleviate the burden on human designers by simplifying the complex design process. This not only enhances productivity but also facilitates scalability, as LLMs can efficiently handle large-scale planning tasks. Secondly, LLMs exhibit remarkable capabilities in achieving fine-grained visual control. By conditioning on textual inputs, LLMs can easily generate precise and detailed instructions for the desired visual layout, allowing for precise composition and arrangement of elements. Moreover, LLMs bring a wealth of commonsense knowledge into the planning process. With access to vast amounts of information, LLMs can incorporate this knowledge to ensure more accurate and contextually coherent visual planning. This integration of commonsense knowledge enhances the fidelity of attribute annotations and contributes to more reliable and realistic visual generation outcomes.
|
| 420 |
+
|
| 421 |
+
It is worth noting that this work represents an initial foray into the realm of visual planning using LLMs, indicating the potential for further advancements and applications in this area. As research in this field progresses, we can anticipate the development of more sophisticated and specialized visual planning techniques, expanding the scope of LLMs’ contribution to diverse domains, such as architecture, virtual reality, and computer-aided design.
|
| 422 |
+
|
| 423 |
+
# H Additional Qualitative Examples
|
| 424 |
+
|
| 425 |
+
We present additional visual showcases to demonstrate the capabilities of LayoutGPT in different contexts. Fig. 16 showcases examples related to 2D numerical reasoning, Fig. 17 illustrates examples of 2D spatial reasoning, and Fig. 18 displays examples of 3D scene synthesis. These showcases offer further insights into the effectiveness and versatility of our approach across various domains.
|
| 426 |
+
|
| 427 |
+

|
| 428 |
+
Figure 16: Qualitative examples of variants of LayoutGPT on numerical reasoning prompts.
|
| 429 |
+
|
| 430 |
+

|
| 431 |
+
Figure 17: Qualitative examples of variants of LayoutGPT on spatial reasoning prompts.
|
| 432 |
+
|
| 433 |
+

|
| 434 |
+
GPT-3.5
|
| 435 |
+
GPT-3.5-chat
|
| 436 |
+
GPT-4
|
| 437 |
+
Figure 18: Additional qualitative examples of variants of LayoutGPT in bedroom scene synthesis.
|
parse/dev/b9APFSTylGT/b9APFSTylGT.md
ADDED
|
@@ -0,0 +1,422 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Prompt Learning with Optimal Transport for Vision-Language Models
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
1 With the increasing attention to large vision-language models such as CLIP, there
|
| 11 |
+
2 has been a significant amount of effort dedicated to building efficient prompts.
|
| 12 |
+
3 Unlike conventional methods of only learning one single prompt, we propose
|
| 13 |
+
4 to learn multiple comprehensive prompts to describe diverse characteristics of
|
| 14 |
+
5 categories such as intrinsic attributes or extrinsic contexts. However, directly
|
| 15 |
+
6 matching each prompt to the same visual feature is problematic, as it pushes the
|
| 16 |
+
7 prompts to converge to one point. To solve this problem, we propose to apply
|
| 17 |
+
8 optimal transport to match the vision and text modalities. Specifically, we first
|
| 18 |
+
9 model images and the categories with visual and textual feature sets. Then, we
|
| 19 |
+
10 apply a two-stage optimization strategy to learn the prompts. In the inner loop, we
|
| 20 |
+
11 optimize the optimal transport distance to align visual features and prompts by the
|
| 21 |
+
12 Sinkhorn algorithm, while in the outer loop, we learn the prompts by this distance
|
| 22 |
+
13 from the supervised data. Extensive experiments are conducted on the few-shot
|
| 23 |
+
14 recognition task and the improvement demonstrates the superiority of our method.
|
| 24 |
+
|
| 25 |
+
# 15 1 Introduction
|
| 26 |
+
|
| 27 |
+
16 In the past few years, large-scale vision-language pre-trained (VLP) models, such as CLIP [39],
|
| 28 |
+
17 ALIGN [17], and BLIP [23] have achieved remarkable success in open-world visual concept learning.
|
| 29 |
+
18 These methods have brought new light but also pose a new question: how to efficiently adapt the
|
| 30 |
+
19 knowledge from pretraining to the downstream tasks since these models are typical of massive sizes
|
| 31 |
+
20 which are not feasible for normal users to re-train.
|
| 32 |
+
21 One of the conventional
|
| 33 |
+
22 paradigms of utilizing pretrained
|
| 34 |
+
23 knowledge is “pre-training,
|
| 35 |
+
24 fine-tuning”, which fixes the
|
| 36 |
+
25 architecture of the pre-trained
|
| 37 |
+
26 neural network and tunes its
|
| 38 |
+
27 parameters using task-specific
|
| 39 |
+
28 objective functions. Beyond
|
| 40 |
+
29 fine-tuning the parameters,
|
| 41 |
+
30 many recent methods [63, 64]
|
| 42 |
+
31 introduce the concept of prompt
|
| 43 |
+
32 learning from the field of NLP to the vision domain and achieve striking performance gain for the
|
| 44 |
+
33 few-shot visual classification. They fix the model parameters and instead learn suitable prompts
|
| 45 |
+
34 by turning a template sentence into a set of learnable vectors. Then, these prompts are learned by
|
| 46 |
+
35 minimizing the distance between the visual features and prompt-based language features.
|
| 47 |
+
36 Despite significant improvements over manual prompts, learning only a sentence is intuitively
|
| 48 |
+
37 insufficient to represent a class. One class can be described by many intrinsic characteristics and
|
| 49 |
+
38 even extrinsic context relations. Thus, for one object, we may have multiple prompt candidates
|
| 50 |
+
39 which focus on different attributes. As shown in Figure 1, we can describe the class “Brambling” in
|
| 51 |
+
40 different views: such as the color of the wing, the color of the crown and eyes, the shape and color of
|
| 52 |
+
41 the tail, and even the living environment information. It motivates us to learn multiple prompts to
|
| 53 |
+
42 comprehensively represent the class and thus facilitate classification.
|
| 54 |
+
43 The most natural solution is to directly learn multiple prompts by respectively matching each prompt
|
| 55 |
+
44 with the visual features. However, it is the same as matching the mean of prompt features and the
|
| 56 |
+
45 visual features. This solution is problematic since all prompts are encouraged to be closer to one single
|
| 57 |
+
46 point and thus tend to learn the same characteristics. It contradicts our purpose to learn comprehensive
|
| 58 |
+
47 prompts. To solve this problem, we tested adding some constraints to push away the prompt from
|
| 59 |
+
48 each other, but found that this solution still fails to learn representative and comprehensive prompts.
|
| 60 |
+
49 This solution treats the visual representation as one single point, and such a unified view of visual
|
| 61 |
+
50 features ignores the fact that different prompts may only focus on one or a subset of characteristics.
|
| 62 |
+
51 To address this problem, in this paper, we propose Prompt Learning with Optimal Transport (PLOT),
|
| 63 |
+
52 which applies optimal transport (OT) to align the local visual features and multiple textual prompts.
|
| 64 |
+
53 Optimal transport can calculate the distance between two distributions under the form of multiple
|
| 65 |
+
54 sampling. In our prompt learning framework, we formulate local visual features and multiple prompts
|
| 66 |
+
55 as the samplings of two discrete distributions and use OT to encourage fine-grained cross-modal
|
| 67 |
+
56 matching. Specifically, to obtain the local visual features with different semantic clues, we extract all
|
| 68 |
+
57 feature maps as the visual representation instead of the single global representation. Fortunately, we
|
| 69 |
+
58 can easily obtain the visual feature maps from the visual encoder of CLIP by using all outputs of the
|
| 70 |
+
59 multi-head self-attention layer [42]. Then the problem comes down to how to calculate the distance
|
| 71 |
+
60 between two feature sets.
|
| 72 |
+
61 We solve this problem by introducing the optimal transport theory [51] and formulate the feature sets
|
| 73 |
+
62 as a discrete probability distribution where each feature has an equal probability value. Furthermore,
|
| 74 |
+
63 to reduce the computational cost and avoid the extra model parameters, we learn the prompts with
|
| 75 |
+
64 a two-stage optimization strategy. At the first stage in the inner loop, we fix both visual and text
|
| 76 |
+
65 features and optimize the optimal transport problem by a fast Sinkhorn distances algorithm [6]. Then,
|
| 77 |
+
66 in the outer loop, we fix all parameters of optimal transport and back-propagate the gradient to learn
|
| 78 |
+
67 the prompts with different characteristics. Compared with conventional distance (such as Euclidean
|
| 79 |
+
68 distance of mean features), optimal transport can align different visual features for each local prompt,
|
| 80 |
+
69 which is more robust to the visual misalignment and tolerates well feature shift [44]. It is because OT
|
| 81 |
+
70 learns an adaptive transport plan to align features, which achieves fine-grained matching across two
|
| 82 |
+
71 modalities. We conduct experiments on 11 datasets following the standard setting of CLIP [39] and
|
| 83 |
+
72 CoOp [63] to evaluate our method. These experiments span the visual classification of generic objects,
|
| 84 |
+
73 scenes, actions, fine-grained categories, and so on. The significant result improvement demonstrates
|
| 85 |
+
74 that PLOT can effectively learn representative and comprehensive prompts.
|
| 86 |
+
|
| 87 |
+

|
| 88 |
+
Figure 1: The motivation that one category can be complementarily described in different views (An example of “Brambling”).
|
| 89 |
+
|
| 90 |
+
# 75 2 Related Work
|
| 91 |
+
|
| 92 |
+
Optimal Transport The Optimal Transport [30] is initially introduced to solve the problem of how to reduce the cost when moving several items simultaneously. Recently, OT theory has drawn wide attention in the machine learning and computer vision community by comparing distributions readily available to them under the form of feature sets [37]. Due to the brilliant property of distribution matching, OT has been applied in many theoretic and application tasks including generative models [1, 45, 60], structural matching [4, 57, 61, 56] (e.g. sequence matching [4] and graph matching [56]), and other distribution-based tasks (such as clustering [22], distribution estimation [2], and causal discovery [50]). In this paper, we use OT to align the features of vision and language modalities which represents the data structure by learning an adaptive transport plan [44].
|
| 93 |
+
|
| 94 |
+
85 Vision-Language Pre-trained Models Vision-Language Pre-trained (VLP) models aim to explore
|
| 95 |
+
86 the semantic correspondence between the vision and language modalities through large-scale pre
|
| 96 |
+
87 training. Recently, VLP models have achieved an exciting performance improvement in the zero-shot
|
| 97 |
+
88 and few-shot visual recognition [39, 10, 63, 64, 59], which shows the great potential to promote
|
| 98 |
+
89 open-world visual understanding with the help of language. One key part of learning VLP models is
|
| 99 |
+
90 the self-supervised learning objective on two modalities. The popular VLP objectives can be divided
|
| 100 |
+
91 into reconstruction [25, 15, 8, 20], contrastive matching [39, 17, 16], or the combination of both
|
| 101 |
+
92 two [24, 54, 19]. Besides, recent progress in the field of VLP also benefits a lot from large-scale
|
| 102 |
+
93 pair-wised datasets. For example, CLIP [39] applies 400 million image-text pairs for contrastive
|
| 103 |
+
94 learning, while ALIGN even exploits 1.8 billion data pairs. Beyond recognition, these VLP models
|
| 104 |
+
95 also show great potential for other downstream applications, such as dense prediction [42, 62], image
|
| 105 |
+
96 generation [31, 41, 35], and action understanding [53, 48].
|
| 106 |
+
97 Prompt Learning Prompt learning is introduced from the field of NLP to efficiently adapt the large
|
| 107 |
+
98 language model to downstream tasks. Different from the conventional “pre-training, fine-tuning”
|
| 108 |
+
99 paradigm which initializes the pre-trained model and tunes the parameters of the network using
|
| 109 |
+
100 downstream task-specific objective functions, prompt learning applies textual prompt to reformulate
|
| 110 |
+
101 the downstream tasks as the original pretrained task [27, 36]. By the prompt, the domain shift between
|
| 111 |
+
102 pretrained task and downstream application is reduced and thus the pretrained knowledge can be
|
| 112 |
+
103 easier adapted to downstream tasks. The concept of prompt learning [36, 40, 38] begins from the
|
| 113 |
+
104 success of GPT [40] series. Early prompt learning methods (such as Petroni et al. [36] and Pörner et
|
| 114 |
+
105 al. [38]) always manually create templates based on human prior knowledge. Furthermore, some
|
| 115 |
+
106 mining-based methods [18] and gradient-based methods [46] are proposed to automatically search for
|
| 116 |
+
107 appropriate templates. Beyond search in the discrete space, some methods [26, 49, 28] remove the
|
| 117 |
+
108 constraint that the prompts are “words” and instead learn prompts in the continuous embedding space.
|
| 118 |
+
109 Recently, CoOp [63] and its extended version [64] introduce prompt learning into open-world visual
|
| 119 |
+
110 understanding to adapt the knowledge from the large-scale visual-language pretrained models and
|
| 120 |
+
111 achieve great performance improvement on the few-shot visual recognition. Compared with $\mathrm { C o O p }$ ,
|
| 121 |
+
112 our PLOT method further improves prompt learning by introducing the optimal transport distance to
|
| 122 |
+
113 learn multiple local prompts and achieves fine-grained vision-language matching.
|
| 123 |
+
|
| 124 |
+
# 14 3 Approach
|
| 125 |
+
|
| 126 |
+
In this section we will first revisit the baseline method $\mathrm { C o O p } \ 3 . 1$ , review the preliminaries of optimal transport 3.2, and then introduce our proposed PLOT 3.3 to show how we can learn multiple comprehensive prompts.
|
| 127 |
+
|
| 128 |
+
# 118 3.1 A Revisit of CoOp
|
| 129 |
+
|
| 130 |
+
119 CoOp [63] is one of the pioneering methods to learn the prompts for using vision language pretrained
|
| 131 |
+
120 knowledge (such as CLIP [39]) for downstream open-world visual recognition. Different from CLIP
|
| 132 |
+
121 which manually designs the prompt templates, $\mathrm { C o O p }$ sets a part of context words in the template as
|
| 133 |
+
122 continuous learnable parameters which can be learned from the few-shot data. Then the classification
|
| 134 |
+
123 weights can be represented by the distance between the learned prompt and visual feature.
|
| 135 |
+
124 Specifically, given an image $_ { \textbf { \em x } }$ , a visual feature $\pmb { f } = f ( \pmb { x } )$ is obtained by the visual encoder $f$ of
|
| 136 |
+
125 CLIP. Then, the textual prompt can be formulated as $\pmb { t } _ { k } = \{ \pmb { v e c } _ { 1 } , \pmb { v e c } _ { 2 } , \dots , \pmb { v e c } _ { L } , \pmb { c } _ { k } \}$ , where $c _ { k }$ is
|
| 137 |
+
126 the word embedding of the class name, $\{ v e c _ { l } | _ { l = 1 } ^ { L } \}$ are learnable vectors with the same dimension as
|
| 138 |
+
127 the original word embedding and $\mathrm { L }$ is the length of context words. With prompt $\mathbf { \Delta } _ { t _ { k } }$ as the input, the
|
| 139 |
+
128 text encoder $g$ outputs the textual feature as $\begin{array} { r } { \mathbf { g } _ { k } = g ( \mathbf { \hat { t } } _ { k } ) } \end{array}$ . The final prediction probability is computed
|
| 140 |
+
129 by the matching score as follows:
|
| 141 |
+
|
| 142 |
+
$$
|
| 143 |
+
p ( y = k | \pmb { x } ) = \frac { e x p ( \sin ( \pmb { f } , \pmb { g } _ { k } ) / \tau ) } { \sum _ { k ^ { \prime } = 1 } ^ { K } e x p ( \sin ( \pmb { f } , \pmb { g } _ { k ^ { \prime } } ) / \tau ) } ,
|
| 144 |
+
$$
|
| 145 |
+
|
| 146 |
+
where $\sin ( \cdot , \cdot )$ denotes a metric function such as cosine similarity, and $\tau$ stands for the temperature of Softmax. Then we can optimize the parameters of $\{ v e c _ { l } | _ { l = 1 } ^ { L } \}$ with the cross-entropy loss between the prediction and the labeled target.
|
| 147 |
+
|
| 148 |
+
# 3.2 Optimal Transport
|
| 149 |
+
|
| 150 |
+
34 Optimal transport (OT) distance is a widely used metric for the comparison of distributions. Here, we
|
| 151 |
+
35 only focus on the discrete situation which is more related to our framework. Assuming we have two
|
| 152 |
+
36 sets of points (features), the discrete distributions are formulated as:
|
| 153 |
+
|
| 154 |
+
$$
|
| 155 |
+
U = \sum _ { m = 1 } ^ { M } u _ { m } \delta _ { f _ { m } } \qquad \mathrm { a n d } \qquad V = \sum _ { n = 1 } ^ { N } v _ { n } \delta _ { g _ { n } } ,
|
| 156 |
+
$$
|
| 157 |
+
|
| 158 |
+
137 where $\textbf { \em u }$ and $\textbf { { v } }$ are the discrete probability vectors that sum to 1, and $\delta _ { f }$ is a Dirac delta function
|
| 159 |
+
138 placed at support point $f$ in the embedding space. Then, the total distance of these two distributions
|
| 160 |
+
|
| 161 |
+

|
| 162 |
+
Figure 2: The framework of PLOT. PLOT first describes each category with multiple prompts and obtains a set of prompt features by text encoder. The image is also encoded as a set of local features. Then the optimal transport is used as the metric between prompts and visual features.
|
| 163 |
+
|
| 164 |
+
139 are written as:
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
< T , C > = \sum _ { m = 1 } ^ { M } \sum _ { n = 1 } ^ { N } T _ { m , n } { \cal C } _ { m , n } .
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
140 We call $C$ the cost matrix in which each point denotes the cost between $f _ { m }$ and $\scriptstyle { \pmb { g } } _ { n }$ , such as
|
| 171 |
+
141 $C _ { m , n } = 1 - \sin ( { f _ { m } } , { \pmb { g } } _ { n } )$ . While the $\mathbf { T }$ is called the transport plan, which is learned to minimize the
|
| 172 |
+
142 total distance. The optimization problem of optimal transport is formulated as:
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
\begin{array} { l l } { { d _ { O T } ( { \pmb u } , { \pmb v } | { \cal C } ) = \underset { \cal T } { \mathrm { m i n i m i z e } } < { \cal T } , { \cal C } > } } \\ { { \mathrm { s u b j e c t ~ t o ~ } } } & { { { \cal T } { \bf 1 } = { \pmb u } , { \cal T } ^ { T } { \bf 1 } = { \pmb v } , { \cal T } \geq 0 . } } \end{array}
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
143 As directly optimizing the above objective is always time-consuming, we apply the Sinkhorn dis
|
| 179 |
+
144 tance [6] to use an entropic constraint for fast optimization. The optimization problem with a
|
| 180 |
+
145 Lagrange multiplier of the entropy constraint is:
|
| 181 |
+
|
| 182 |
+
$$
|
| 183 |
+
\begin{array} { r l } & { d _ { O T , \lambda } ( \pmb { u } , \pmb { v } | C ) = \underset { T } { \mathrm { m i n i m i z e } } < T , C > - \lambda h ( \pmb { T } ) } \\ & { } \\ & { \mathrm { s u b j e c t ~ t o } \quad T \mathbf { 1 } = \pmb { u } , T ^ { T } \mathbf { 1 } = \pmb { v } , } \end{array}
|
| 184 |
+
$$
|
| 185 |
+
|
| 186 |
+
146 where $h ( \cdot )$ is entropy and $\lambda \geq 0$ is a hyper-parameter. Then we can have a fast optimization solution
|
| 187 |
+
147 with a few iterations as:
|
| 188 |
+
|
| 189 |
+
$$
|
| 190 |
+
\pmb { T } ^ { * } = \mathrm { d i a g } ( \pmb { u } ^ { t } ) e x p ( - \pmb { C } / \lambda ) \mathrm { d i a g } ( \pmb { v } ^ { t } ) ,
|
| 191 |
+
$$
|
| 192 |
+
|
| 193 |
+
where $t$ denotes iteration and in each iteration $\begin{array} { c c l } { { { \pmb u } ^ { t } } } & { { = } } & { { { \pmb u } / ( ( e x p ( - { \pmb C } / \lambda ) { \pmb v } ^ { t - 1 } ) } } \end{array}$ and $\begin{array} { r l } { \boldsymbol { v } ^ { t } } & { { } = } \end{array}$ $\pmb { v } / ( ( e x p ( - C / \lambda ) ^ { T } \pmb { u } ^ { t } )$ , with the initiation $\mathbf { \nabla } \mathbf { v } ^ { 0 } = \mathbf { 1 }$ .
|
| 194 |
+
|
| 195 |
+
# 3.3 Prompt Learning with Optimal Transport
|
| 196 |
+
|
| 197 |
+
In this subsection, we introduce the details of our PLOT, which learns multiple prompts to describe different characteristics of the category by minimizing the OT distance.
|
| 198 |
+
|
| 199 |
+
153 Specifically, as shown in Figure 2, given an image $_ { \textbf { \em x } }$ , we first feed it to the visual encoder branch of
|
| 200 |
+
154 CLIP. Apart from the global visual feature $f$ , we can also obtain a set of local features $\{ f _ { m } | _ { m = 1 } ^ { M } \}$
|
| 201 |
+
155 The visual encoder has a multi-head attention pooling layer in which the input is the combination of
|
| 202 |
+
156 the global feature and a set of local features (feature map) and the output is a tensor with the shape
|
| 203 |
+
157 $\mathbb { R } ^ { ( \bar { H } \times W + 1 ) \times C }$ , where $H$ and $W$ is the height and width of feature map and $C$ is the feature dimension.
|
| 204 |
+
158 Therefore, we can obtain $M = H \times W$ local features and a global feature. At the same time, for
|
| 205 |
+
159 class $k$ , we can initialize $_ \mathrm { N }$ local prompts as $\{ t _ { k , n } | _ { n = 1 } ^ { N } \}$ with learnable vectors $\{ v e c _ { l , n } | _ { l = 1 , n = 1 } ^ { L , N } \}$
|
| 206 |
+
160 where each is the same as the prompt in $\mathrm { C o O p }$ . With both visual and textual encoders, we can obtain
|
| 207 |
+
161 local visual features ${ \pmb F } = \{ { \pmb f } _ { m } | _ { m = 1 } ^ { M } \} \in \mathbb { R } ^ { M \times C }$ and prompt features ${ G } _ { k } = \{ \pmb { g } _ { n } | _ { n = 1 } ^ { N } \} \in \mathbb { R } ^ { N \times C }$ .
|
| 208 |
+
62 In the inner loop, we learn the transport plan $\mathbf { T }$ with these fixed support sets ${ \bf \nabla } F , G _ { k }$ , by minimizing
|
| 209 |
+
63 the following OT distance to push $G _ { k }$ to $\pmb { F }$ :
|
| 210 |
+
|
| 211 |
+
$$
|
| 212 |
+
d _ { O T } ( k ) = d _ { O T } ( \boldsymbol { u } , \boldsymbol { v } | \mathbf { 1 } - \mathbf { F } ^ { T } \mathbf { G } _ { k } ) ,
|
| 213 |
+
$$
|
| 214 |
+
|
| 215 |
+
where 164 ${ \pmb { C } } = { \bf 1 } - { \pmb { F } } ^ { T } { \pmb { G } } _ { k }$ denotes that we use the cosine distance between $\pmb { F }$ and $G _ { k }$ as the cost matrix.
|
| 216 |
+
Then we can obtain the solution of transport plan 165 $\mathbf { T } ^ { * }$ as Eq (6) and the final OT distance $d o T ( k )$ .
|
| 217 |
+
|
| 218 |
+
166 Given the OT distance between $G _ { k }$ and $\pmb { F }$ , we reformulate the prediction probability as:
|
| 219 |
+
|
| 220 |
+
$$
|
| 221 |
+
p _ { o t } ( y = k | x ) = \frac { e x p ( ( 1 - d _ { O T } ( k ) ) / \tau ) } { \sum _ { k ^ { \prime } = 1 } ^ { K } e x p ( ( 1 - d _ { O T } ( k ^ { \prime } ) ) / \tau ) } .
|
| 222 |
+
$$
|
| 223 |
+
|
| 224 |
+
In the outer loop, we fix the transport plan 167 $\mathbf { T } ^ { * }$ and apply the cross entropy loss to optimize the 168 $\{ v e c _ { l , n } | _ { l = 1 , n = 1 } ^ { L , N } \}$ as:
|
| 225 |
+
|
| 226 |
+
$$
|
| 227 |
+
L _ { C E } = - \frac { 1 } { | \mathcal { X } | } \sum _ { \pmb { x } \in \mathcal { X } } \sum _ { k = 1 } ^ { K } y _ { \pmb { x } , k } p _ { o t } ( y = k | \pmb { x } ) ,
|
| 228 |
+
$$
|
| 229 |
+
|
| 230 |
+
69 where $\scriptstyle { \mathbf { } } _ { \mathbf { } } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf \Psi \mathbf { } \mathbf { } \mathbf { } \mathbf { } \mathbf \Psi \mathbf { } \mathbf { } \mathbf { } \mathbf \Psi \mathbf { } \mathbf { } \mathbf \Psi \mathbf { } \mathbf { } \mathbf \Psi \mathbf { } \mathbf \Psi \mathbf { } \mathbf \Psi \mathbf { } \mathbf \Psi \mathbf { } \mathbf \Psi \mathbf { } \mathbf \Psi \mathbf \Psi \Psi \mathbf \Psi \Psi \mathbf \Psi \Psi \mathbf \Psi \Psi \mathbf \Psi \mathbf \Psi \Psi \mathbf \Psi \mathbf \Psi \Psi \mathbf \Psi \mathbf \Psi \Psi \mathbf \Psi \mathbf \Psi \mathbf \Psi \mathbf \Psi \Psi \mathbf \Psi \mathbf \Psi \mathbf \Psi \mathbf \Psi \mathbf \Psi \mathbf \Psi \mathbf \Psi \mathbf \mathbf \Psi \mathbf \Psi \mathbf \Psi \mathbf \mathbf \Psi \mathbf \Psi \mathbf \mathbf \Psi \mathbf \Psi \mathbf \mathbf \Psi \mathbf \mathbf \Psi \mathbf \mathbf \mathbf \Psi \mathbf \Psi \mathbf \mathbf \mathbf \Psi \mathbf \mathbf \Psi \mathbf \mathbf \mathbf \Psi \mathbf \mathbf \mathbf \mathbf \Psi \mathbf \mathbf \Psi \mathbf \mathbf \mathbf \Psi \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf \Psi \mathbf \mathbf \mathbf \Psi \mathbf \mathbf \mathbf \mathbf \mathbf \Psi \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf \Psi \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf \Psi \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf \mathbf $ is a one-hot label vector. The detail algorithm can be found in the supplementary materials.
|
| 231 |
+
|
| 232 |
+
Though the optimization strategy of the optimal transport and prompts is two-stage, the whole training flow is end-to-end. It is because that the transport plan is computed using a small number of matrix multiplications as one forward module of the neural network. The gradients of these matrix multiplications are taped for backpropagation for end-to-end optimization, which makes the whole system fully differentiable (including the iterative algorithm) and easy to implement using an autograd library like PyTorch. In the experiments, we found that it is natural and relatively easy to this optimization strategy.
|
| 233 |
+
|
| 234 |
+
# 3.4 Inference strategy
|
| 235 |
+
|
| 236 |
+
In the inference, given one query image and the learned prompts, we first obtain the a visual feature set containing $M = H \times W$ vectors and a prompt feature set containing $N \times C$ vectors. Then, we calculate the distance between the visual feature set and the prompt feature set of each class by $O I ^ { \prime }$ as (6). After obtaining the OT distance for each class, we sort the distance and classify the image.
|
| 237 |
+
|
| 238 |
+
# 4 Experiments
|
| 239 |
+
|
| 240 |
+
Extensive experiments are conducted to evaluate our method, including comparison with CoOp, ablation studies, parameter analysis extensibility analysis, computing cost analysis and visualization.
|
| 241 |
+
|
| 242 |
+
# 4.1 Datasets
|
| 243 |
+
|
| 244 |
+
We followed the experimental settings in the CoOp [63] for the few-shot learning evaluation. The experiments are conducted on the 11 visual recognition datasets, including Caltech101 [9], DTD [5], EuroSAT [12], FGVCAircraft [29], Flowers102 [32], Food101 [3], ImageNet [7], OxfordPets [33], StanfordCars [21], SUN397 [55], and UCF101 [47]. These datasets span visual classification of generic objects, scenes, actions, fine-grained categories, and so on, which constitutes a comprehensive evaluation of our method. All experiments adopted the few-shot evaluation protocol used in CLIP [39] and CoOp [63], where we respectively choose 1, 2, 4, 8, and 16 shots for model training and use the original test set for evaluation. Besides, we also evaluated the robustness of our method with domain shift. Following $\mathrm { C o O p }$ , we used the ImageNet as the source domain and evaluate our method with ImageNet-based robustness evaluation datasets including ImageNetV2 [43], ImageNet-Sketch [52], ImageNet-A [14], and ImageNet-R [13]. A detailed introduction of each dataset can be found in the supplementary materials.
|
| 245 |
+
|
| 246 |
+
# 4.2 Implementation details
|
| 247 |
+
|
| 248 |
+
We chose CoOp [63] as our main competitor to evaluate our method. Compared with CoOp which only learns a global prompt for one class, our PLOT method learns multiple local prompts and applies the OT distance for better fine-grained alignment. Besides, we also reported the performance of training a linear classifier with the CLIP [39] features. It is also a widely-used strategy to adapt the pretrained knowledge for the downstream task [46]. We reproduced the performance of CoOp and the CLIP linear probe with the released official code.
|
| 249 |
+
|
| 250 |
+
The original CoOp method has different versions with different class token positions and parameter initialization strategies. We applied the default model that fixes the class token positions in the end due to the limited performance gap between two different ways of positioning the class token. Besides, we used the random parameter initialization strategy but not the class-specific context version. Following the widely used setting in [63, 64, 10, 58], we also chose RN50 [11] as the backbone network of the visual branch and set the length of learnable context tokens as 16. All the code of our method is based on $\mathrm { C o O p }$ , which adopted the SGD optimizer with 0.002 initial learning rate, CosineAnnealingLR
|
| 251 |
+
|
| 252 |
+

|
| 253 |
+
Figure 3: The few-shot learning results on 11 datasets. We compare our PLOT with CoOp, $C o C o O p$ , and the Linear Probe method and observe the consistent and significant performance improvement on most datasets. (The average accuracy on all datasets is shown on the left top.) Table 1: Comparison with $\mathrm { C o O p }$ on robustness to domain shift.
|
| 254 |
+
|
| 255 |
+
<table><tr><td rowspan="3">Method</td><td>Source</td><td colspan="4">Target</td></tr><tr><td>ImageNet</td><td>-V2</td><td>-Sketch</td><td>-A</td><td>-R</td></tr><tr><td>CLIP +CoOp</td><td>61.91</td><td>54.26</td><td>32.47</td><td>21.78</td><td>54.21</td></tr><tr><td>CLIP + PLOT (N =4)</td><td>63.01</td><td>55.11</td><td>33.00</td><td>21.86</td><td>55.61</td></tr></table>
|
| 256 |
+
|
| 257 |
+
212 schedule, and a warmup trick with 1e-5 learning rate. Besides, we also followed the epoch strategy to
|
| 258 |
+
213 train more epochs for more shots.
|
| 259 |
+
|
| 260 |
+
We apply $N = 4$ prompts for each category and use $M = 7 \times 7$ due to the feature map size. We set the hyper-parameters in the Sinkhorn distances algorithm [6] as $\lambda = 0 . 1$ for all the datasets. We set the maximum iteration number of the inner loop as 100 and will early stop the iteration when the average absolute update value $\Lambda < 0 . 0 1$ . We initialize all values in the vector $v$ and $\mu$ as $1 / N$ and $1 / M$ respectively. All models are conducted on the Pytorch [34] 1.7.1 and trained on 4 NVIDIA A100 GPUs. We repeated the experiments three times with different seeds and reported the average.
|
| 261 |
+
|
| 262 |
+
# 4.3 Comparison With CoOp
|
| 263 |
+
|
| 264 |
+
In this subsection, we compare our PLOT with the baseline CoOp on the few-shot recognition and domain generalization tasks.
|
| 265 |
+
|
| 266 |
+
Few-Shot Learning We summarized the experimental results in Figure 3 where the red line denotes our PLOT method, the blue one denotes CoOp, the purple line denotes CoCoOp, and the green one is the CLIP linear probe. The detailed accuracy can be found in the supplementary materials. We observed that both prompt learning methods (PLOT and $\mathrm { C o O p } )$ ) outperform the linear probe method by a large margin. Besides, PLOT can further improve the performance of $\mathrm { C o O p }$ and CoCoOp on most of the datasets. Taking the average accuracy (at the left top) as the example, Plot respectively gained $3 . 0 3 \%$ , $3 . 4 5 \%$ , $2 . 1 3 \%$ , $1 . 3 8 \%$ , $\bar { 0 . 6 1 \% }$ performance boost over $\mathrm { C o O p }$ at 1, 2, 4, 8, 16 shots. We found the performance gap will reduce when shots increase. It is not surprising since both CoOp and PLOT focus on utilizing the pre-trained knowledge, and the effect of pre-training diminishes given more training data. Among all datasets, PLOT achieves a larger improvement over $\mathrm { C o O p }$ o n the FOOD101 and DTD datasets and achieves comparable performance only on the StanfordCars datasets. For the FGVCAircraft dataset in which the CoOp only obtains $7 . 7 7 \%$ accuracy, our PLOT can achieve an accuracy of $1 7 . 7 9 \%$ , twice as high as that of the CoOp. Note that we don’t use the class-specific context, thus the performance on the fine-grained classification datasets is lower, e.g.
|
| 267 |
+
|
| 268 |
+
Table 2: Ablation studies on few-shot recognition. PLOT is our defined model with $N = 4$ , $C o O p$ is the baseline method, M denotes that we respectively match the global visual feature and multiple textual prompts, V denotes that we apply a constraint to add the variance of prompts, M indicates using the visual feature map instead of the global visual feature.
|
| 269 |
+
|
| 270 |
+
<table><tr><td>Dataset</td><td>Settings</td><td>1 shot</td><td>2 shots</td><td>4 shots</td><td>8 shots</td><td>16 shots</td></tr><tr><td rowspan="5">Caltech101</td><td>PLOT CoOp</td><td>89.83±0.339 87.51 ± 1.02</td><td>90.67 ±0.21 87.84 ±1.10</td><td>90.80±0.20 89.52 ±0.80</td><td>91.54 ± 0.33 90.28±0.42</td><td>92.24±0.38 91.99 ± 0.31</td></tr><tr><td>G</td><td>88.13 ±0.36</td><td>86.98 ± 1.25</td><td>88.45 ± 0.79</td><td>90.16 ± 0.22</td><td>90.72 ±0.18</td></tr><tr><td>G+V</td><td>88.28 ± 0.43</td><td>87.72 ± 1.25</td><td></td><td></td><td></td></tr><tr><td>M</td><td></td><td></td><td>88.45 ± 0.30</td><td>89.82 ±0.20</td><td>92.00 ± 0.13</td></tr><tr><td>M+V</td><td>69.78 ± 1.75 66.11 ± 8.29</td><td>71.57 ± 1.59</td><td>77.18 ± 2.16</td><td>81.77 ± 0.47</td><td>86.21±0.20</td></tr><tr><td rowspan="6">DTD</td><td>PLOT</td><td></td><td>71.45 ± 3.98</td><td>79.30 ± 3.96</td><td>86.96 ± 0.78</td><td>89.80 ±0.17</td></tr><tr><td></td><td>46.55 ± 2.62</td><td>51.24±1.95</td><td>56.03±0.43</td><td>61.70 ± 0.35</td><td>65.60 ± 0.82</td></tr><tr><td>CoOp</td><td>43.62 ±1.96</td><td>45.35 ± 0.31</td><td>53.94 ±1.37</td><td>59.69 ± 0.13</td><td>62.51±0.25</td></tr><tr><td>G</td><td>45.12 ± 1.69</td><td>48.39 ± 2.08</td><td>54.75 ± 0.48</td><td>60.15 ± 0.70</td><td>63.59 ±0.76</td></tr><tr><td>G+V M</td><td>45.90 ± 2.00</td><td>48.50 ± 0.99</td><td>53.96 ± 0.48</td><td>59.69 ± 1.01</td><td>63.51 ± 0.66</td></tr><tr><td>M+V</td><td>13.18 ± 4.57 12.61 ± 5.93</td><td>12.25 ± 3.86 15.11 ± 1.81</td><td>13.00 ± 4.73 20.35 ± 1.33</td><td>20.76 ± 5.42</td><td>26.99 ±1.98</td></tr><tr><td rowspan="6">FOOD101</td><td>PLOT</td><td>77.74 ± 0.47</td><td></td><td></td><td>44.13 ± 2.39</td><td>56.85 ± 0.54</td></tr><tr><td>CoOp</td><td></td><td>77.70±0.02</td><td>77.21 ±0.43</td><td>75.31 ± 0.30</td><td>77.09 ±0.18</td></tr><tr><td>G</td><td>74.25 ±1.52</td><td>72.61 ± 1.33</td><td>73.49 ± 2.03</td><td>71.58 ± 0.79</td><td>74.48 ± 0.15</td></tr><tr><td>G+V</td><td>74.63 ± 0.11</td><td>70.15 ±0.49</td><td>70.41 ± 0.46</td><td>70.72 ± 0.98</td><td>73.68 ±0.46</td></tr><tr><td>M</td><td>74.83 ± 0.31</td><td>70.09 ± 0.85</td><td>70.86 ± 0.22 46.86 ±1.39</td><td>70.80 ± 0.68</td><td>73.93 ± 0.35</td></tr><tr><td>M+V</td><td>52.02 ± 4.86 46.52 ± 1.15</td><td>46.12 ±1.46 45.95 ± 2.66</td><td>53.57 ± 0.83</td><td>53.43 ± 0.88 62.95 ± 0.37</td><td>61.28 ± 0.23 67.63 ± 1.11</td></tr></table>
|
| 271 |
+
|
| 272 |
+
Table 3: Parameter analysis for the number of prompts
|
| 273 |
+
|
| 274 |
+
<table><tr><td>Dataset</td><td>Settings</td><td>1 shot</td><td>2 shots</td><td>4 shots</td><td>8 shots</td><td>16 shots</td></tr><tr><td rowspan="4">Caltech101</td><td>N=1</td><td>88.47 ± 1.15</td><td>89.19 ± 0.39</td><td>89.70 ±0.38</td><td>90.45 ± 0.24</td><td>91.56 ± 0.14</td></tr><tr><td>N=2</td><td>88.86 ± 0.51</td><td>89.60 ±0.10</td><td>90.60 ± 0.17</td><td>91.25 ±0.65</td><td>91.89 ± 0.36</td></tr><tr><td>N=4</td><td>89.83 ± 0.33</td><td>90.67 ± 0.21</td><td>90.80±0.20</td><td>91.54 ± 0.33</td><td>92.24±0.38</td></tr><tr><td>N=8</td><td>89.74± 0.30</td><td>90.18 ± 0.46</td><td>91.02 ± 0.18</td><td>91.28 ±0.28</td><td>92.04 ±0.29</td></tr><tr><td rowspan="4">DTD</td><td>N=1</td><td>43.91 ± 0.65</td><td>48.21 ± 2.20</td><td>53.69 ± 1.10</td><td>58.90 ±0.19</td><td>62.85 ± 0.74</td></tr><tr><td>N=2</td><td>45.59 ± 2.46</td><td>48.06 ±1.92</td><td>55.58 ± 1.71</td><td>61.56± 0.17</td><td>64.60 ±0.92</td></tr><tr><td>N=4</td><td>46.55 ± 2.62</td><td>51.24 ± 1.95</td><td>56.03 ± 0.43</td><td>61.70 ± 0.35</td><td>65.60 ± 0.82</td></tr><tr><td>N=8</td><td>46.89 ±1.94</td><td>51.87 ± 2.06</td><td>54.45 ± 0.48</td><td>62.20 ±0.56</td><td>65.25± 0.38</td></tr><tr><td rowspan="4">FOOD101</td><td>N=1</td><td>75.96 ± 0.48</td><td>76.12 ± 0.59</td><td>77.11 ± 0.41</td><td>76.56 ± 0.69</td><td>77.43 ± 0.80</td></tr><tr><td>N=2</td><td>77.12 ± 0.49</td><td>76.89 ± 0.23</td><td>76.16 ± 0.52</td><td>75.23 ± 0.69</td><td>76.81± 0.50</td></tr><tr><td>N=4</td><td>77.74±0.47</td><td>77.70±0.02</td><td>77.21 ± 0.43</td><td>75.31 ± 0.30</td><td>77.09 ±0.18</td></tr><tr><td>N=8</td><td>78.05 ± 0.15</td><td>78.19±0.07</td><td>78.12 ±0.17</td><td>76.63 ±0.22</td><td>77.48 ± 0.12</td></tr></table>
|
| 275 |
+
|
| 276 |
+
the performance of both $\mathrm { C o O p }$ and PLOT without class-specific context is lower than the linear probing on FGVCAircraft. All these performance comparisons can serve as experimental evidence to demonstrate that multiple local prompts and optimal transport distance facilitate the prompt learning of vision-language models. On StanfordCar, learning multiple prompts didn’t significantly improve the performance over a single prompt. It may be because the discriminative characters in this dataset coincide with each other, such that one global prompt and one global visual feature can work well.
|
| 277 |
+
|
| 278 |
+
Domain generalization The robustness also plays a critical role in model applications since the real-world environment may have large domain shifts with the training data. Therefore, we conducted a robustness evaluation to investigate the transferability of models learned by PLOT.
|
| 279 |
+
|
| 280 |
+
Table 1 summarizes the results of our PLOT method and CoOp on four ImageNet-based robustness evaluation datasets. For both methods, we trained the models on ImageNet with 16 shots per class. For PLOT, we set the number of prompts as $N = 4$ . We can observe that PLOT outperforms CoOp consistently on both source and target domains. These experimental results demonstrate that the performance improvement of our learning multiple prompts doesn’t rely on single-domain overfitting.
|
| 281 |
+
|
| 282 |
+
# 4.4 Ablation Studies and More Analysis
|
| 283 |
+
|
| 284 |
+
252 In this subsection, we conducted the ablation studies to investigate the effectiveness of different
|
| 285 |
+
253 components, in order to answer the following questions.
|
| 286 |
+
|
| 287 |
+
Q: Can we directly learn multiple prompts by respectively matching each prompt with the global visual feature? A: No. As shown in Table 2, we report the performance of directly matching the global visual feature (notated as “G”) and compare it with the baseline CoOp and our PLOT on three datasets including Caltech101, DTD, and FOOD101. We observe that there is no improvement over the baseline on some datasets (such as Caltech101 and FOOD101) if we only directly match prompts and global features. Though “G” obtained the improvement on the DTD dataset, this improvement is still less than that of PLOT. It is because this “G” method is incentivized to learn the indistinguishable prompts, which contradicts our purpose to learn multiple comprehensive prompts. We further add some constraints to push away the prompt from each other. For example, we add an objective function to add the distance between every two prompts as a regularization term, which is notated as “V”. However, comparing “G” and $\mathrm { ^ { 6 6 } G + V ^ { 5 } }$ , we do not find significant and consistent improvement when using variance loss.
|
| 288 |
+
|
| 289 |
+
Q: Does the improvement mainly come from using all feature maps? A: No. In PLOT, we apply all feature maps of the visual encoder branch, where each feature is a local embedding at one spatial position. Compared with the global feature, these local features are more informative and contain fine-grained clues. However, we demonstrate that the improvement of PLOT does not only rely on using all feature maps. On the contrary, directly using the feature map to replace the global feature causes a large performance drop. For example, on all three datasets, directly using the feature map (“M” or $\mathbf { \hat { \mu } ^ { 6 } M + V } ^ { 5 } )$ has an around $2 0 \%$ 1 shot accuracy drop over using the global visual feature. It is not surprising since the original CLIP model is trained by matching the global visual feature and language feature. Without using the OT method, the distance between the feature map and multiple textual prompts degenerates to the mean distance of each feature-prompt pair. Besides, when using the feature map, adding the variance loss works well, especially for more shots. For example, the accuracy on 16 shots DTD is improved by a large margin (from 26.99 to 56.85).
|
| 290 |
+
|
| 291 |
+
Q: How many prompts are needed? A: 4 prompts are enough One important hyper-parameter in PLOT is the number of prompts. To analyze the effect of the number of prompts, we conducted the experiments on three datasets with 1, 2, 4, 8 prompts. The results are summarized in the white part of Table 3. We can observe that the performance obviously increases when adding the number of prompts from 1 to 4. For example, PLOT $\left( \mathrm { N } { = } 4 \right)$ respectively obtains $1 . 3 6 \%$ , $2 . 6 4 \%$ , and $1 . 6 8 \%$ 1-shot accuracy improvement over PLOT $\left( \mathrm { N } { = } 1 \right)$ ) on three datasets. Besides, when we further increase the number of prompts, the improvement is not consistent. To balance the improvement and cost, we set $N = 4$ as the default configuration of our PLOT model. In the experiments, we tuned this hyper-parameter on the Caltech101 dataset and applied it to other datasets.
|
| 292 |
+
|
| 293 |
+
Q: Can PLOT benefit zero-shot learning? A: No. CLIP [39] shows that manually designing the prompts can still achieve good performance. We obtain 7 prompts by prompt engineering on the ImageNet dataset and can further ensemble them to obtain ${ \bf 6 0 . 3 8 \% }$ top 1 accuracy. In this section, we replace the cosine distance between the global visual feature and prompt ensemble with the OT distance between the feature map and all 7 prompts. However, without any learning, the OT distance only obtains ${ \bf 5 8 . 7 8 \% }$ accuracy. It is a limitation of the PLOT to still need few-shot data for optimization, which cannot be directly applied in the zero-shot setting. We argue there are two reasons why the OT distance does not work without learning: 1) prompt engineering selects prompts based on the global feature and cosine distance, instead of OT distance with feature map; 2) all these selected prompts are closed to the global feature and lack the complementarity.
|
| 294 |
+
|
| 295 |
+
Q: Can PLOT benefit Adapter-based methods? A: Yes. Adapter-based methods [10, 58] is another research direction of the efficient adaptation of pre-trained vision-language models. Different from the prompt learning that fixes the model parameters and tunes the language prompt, adapter-based methods [10, 58] allow for fine-tuning a part of the network or adding an extra model for training. Recently, adapter-based methods also achieve good performance on few-shot visual recognition. Therefore, we want to explore whether our PLOT method can benefit them, and how.
|
| 296 |
+
|
| 297 |
+
We apply the Tip-adapter-F [58] as our baseline method, which learns a $L i n e a r ( d , N _ { c l s } \times K _ { s h o t s } )$ model to describe one image by the similarity with all training samples, where $d$ is the dimension of visual feature, $N _ { c l s }$ is the number of categories (e.g. 1000 in ImageNet), and $K _ { s h o t s }$ is the number of shots. Then, the final similarity consists of the original distance between the visual feature and prompt ensembling and the new distance calculated by the learned feature and one-hot vector of labels (whose dimension is $( N _ { c l s } \times K _ { s h o t s } , N _ { c l s } ) )$ . Please find details in Tip-adapter-F [58]. To introduce PLOT to this framework, we first used the feature map to replace the global feature and
|
| 298 |
+
|
| 299 |
+

|
| 300 |
+
Figure 4: Visualizations. We provide the heatmaps of transport plan $_ { \mathbf { \delta T } }$ related to each prompt on 4 categories in ImageNet. Different transport plans focus on different attributes of the object.
|
| 301 |
+
|
| 302 |
+
Table 4: Comparison with Adapter-based method.
|
| 303 |
+
|
| 304 |
+
<table><tr><td>Dataset</td><td>Methods</td><td>1 shot</td><td>2 shots</td><td>4 shots</td><td>8 shots</td><td>16 shots</td></tr><tr><td rowspan="3">ImageNet</td><td>Tip-Adapter-F</td><td>61.32</td><td>61.69</td><td>62.52</td><td>64.00</td><td>65.51</td></tr><tr><td>Tip-Adapter-F+ OT</td><td>61.44</td><td>61.98</td><td>62.86</td><td>64.13</td><td>65.76</td></tr><tr><td>Tip-Adapter-F +PLOT</td><td>62.27</td><td>64.31</td><td>63.89</td><td>65.04</td><td>66.17</td></tr></table>
|
| 305 |
+
|
| 306 |
+
310 then learned multiple linear models. As a result, with different local features and different linear
|
| 307 |
+
311 models, we can obtain a $M \times N$ distance matrix and apply the Sinkhorn algorithm [6] to calculate
|
| 308 |
+
312 the OT distance. Furthermore, we can apply the learned prompts as co-partner of the ensembling
|
| 309 |
+
313 prompt to refine the final similarity.
|
| 310 |
+
|
| 311 |
+
Table 4 summarizes the few-shot recognition results of the original Tip-Adapter-F method and our adapter-based PLOT methods on ImageNet. From this table, We observe that using the OT distance can improve the performance of the adapter-based method. Using the learned prompts, we can further promote the accuracy of all settings.
|
| 312 |
+
|
| 313 |
+
Q: What is the extra computation time cost of PLOT over CoOp baseline? A: Around $\mathbf { 1 0 \% }$ inference speed and ${ \bf 5 \% }$ training time. Despite the performance improvement, the extra computation cost is still a limitation of PLOT. Please see the detailed analysis in the supplementary materials.
|
| 314 |
+
|
| 315 |
+
# 4.5 Visualization
|
| 316 |
+
|
| 317 |
+
In this subsection, we provide some visualization examples of the transport plans $_ { \mathbf { T } }$ related to different prompts $\left( \mathrm { N } { = } 4 \right)$ ). We translate each transport plan into colorful heatmaps and resize them into their original size and combine them with the raw image. As shown in Figure 4, we provide the heatmaps of 4 categories in ImageNet. We observe that different transport plans highlight different regions of the image, which demonstrates that the learned multiple prompts are complementary. For the class “Brambling”, the prompts respectively focus on the head, tail, wing, and environment. For “Dog Sled”, the prompts are related to dogs, the sled, some ties, and the snow environment.
|
| 318 |
+
|
| 319 |
+
# 5 Conclusion
|
| 320 |
+
|
| 321 |
+
In this paper, we present a method, named PLOT, to learn multiple comprehensive prompts to describe diverse characteristics of one category. To avoid convergence to one point, we propose to apply the optimal transport to achieve the fine-grained alignment between both vision and language domains. We apply a two-stage optimization strategy where the inner loop fixes the prompts and learns the transport plan to calculate the cross-modality distance, and the outer loop uses this distance to optimize the prompt learner. We build our method on the base of CoOp and achieve significant improvement on the few-shot recognition task in various datasets, which demonstrates the advantage to learn multiple prompts instead of a single one.
|
| 322 |
+
|
| 323 |
+
# References
|
| 324 |
+
|
| 325 |
+
[1] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In ICML, pages 214–223, 2017.
|
| 326 |
+
[2] Emmanuel Boissard, Thibaut Le Gouic, and Jean-Michel Loubes. Distribution’s template estimate with wasserstein metrics. Bernoulli, 21(2):740–759, 2015.
|
| 327 |
+
[3] Lukas Bossard, Matthieu Guillaumin, and Luc Van Gool. Food-101–mining discriminative components with random forests. In ECCV, pages 446–461, 2014.
|
| 328 |
+
[4] Liqun Chen, Yizhe Zhang, Ruiyi Zhang, Chenyang Tao, Zhe Gan, Haichao Zhang, Bai Li, Dinghan Shen, Changyou Chen, and Lawrence Carin. Improving sequence-to-sequence learning via optimal transport. arXiv preprint arXiv:1901.06283, 2019.
|
| 329 |
+
[5] Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In CVPR, pages 3606–3613, 2014.
|
| 330 |
+
[6] Marco Cuturi. Sinkhorn distances: lightspeed computation of optimal transport. In NeurIPS, volume 2, page 4, 2013.
|
| 331 |
+
[7] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248–255, 2009.
|
| 332 |
+
[8] Zi-Yi Dou, Yichong Xu, Zhe Gan, Jianfeng Wang, Shuohang Wang, Lijuan Wang, Chenguang Zhu, Zicheng Liu, Michael Zeng, et al. An empirical study of training end-to-end vision-and-language transformers. arXiv preprint arXiv:2111.02387, 2021.
|
| 333 |
+
[9] Li Fei-Fei, Rob Fergus, and Pietro Perona. Learning generative visual models from few training examples: An incremental bayesian approach tested on 101 object categories. In CVPRW, pages 178–178, 2004.
|
| 334 |
+
[10] Peng Gao, Shijie Geng, Renrui Zhang, Teli Ma, Rongyao Fang, Yongfeng Zhang, Hongsheng Li, and Yu Qiao. Clip-adapter: Better vision-language models with feature adapters. arXiv preprint arXiv:2110.04544, 2021.
|
| 335 |
+
[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770–778, 2016.
|
| 336 |
+
[12] Patrick Helber, Benjamin Bischke, Andreas Dengel, and Damian Borth. Eurosat: A novel dataset and deep learning benchmark for land use and land cover classification. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 12(7):2217–2226, 2019.
|
| 337 |
+
[13] Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath, Frank Wang, Evan Dorundo, Rahul Desai, Tyler Zhu, Samyak Parajuli, Mike Guo, et al. The many faces of robustness: A critical analysis of out-of-distribution generalization. arXiv preprint arXiv:2006.16241, 2020.
|
| 338 |
+
[14] Dan Hendrycks, Kevin Zhao, Steven Basart, Jacob Steinhardt, and Dawn Song. Natural adversarial examples. arXiv preprint arXiv:1907.07174, 2019.
|
| 339 |
+
[15] Yicong Hong, Qi Wu, Yuankai Qi, Cristian Rodriguez-Opazo, and Stephen Gould. Vln bert: A recurrent vision-and-language bert for navigation. In CVPR, pages 1643–1653, 2021.
|
| 340 |
+
[16] Aashi Jain, Mandy Guo, Krishna Srinivasan, Ting Chen, Sneha Kudugunta, Chao Jia, Yinfei Yang, and Jason Baldridge. Mural: multimodal, multitask retrieval across languages. arXiv preprint arXiv:2109.05125, 2021.
|
| 341 |
+
[17] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In ICML, pages 4904–4916, 2021.
|
| 342 |
+
[18] Zhengbao Jiang, Frank F Xu, Jun Araki, and Graham Neubig. How can we know what language models know? TACL, 8:423–438, 2020.
|
| 343 |
+
[19] Aishwarya Kamath, Mannat Singh, Yann LeCun, Gabriel Synnaeve, Ishan Misra, and Nicolas Carion. Mdetr-modulated detection for end-to-end multi-modal understanding. In ICCV, pages 1780–1790, 2021.
|
| 344 |
+
[20] Wonjae Kim, Bokyung Son, and Ildoo Kim. Vilt: Vision-and-language transformer without convolution or region supervision. In ICML, pages 5583–5594, 2021.
|
| 345 |
+
[21] Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. 3d object representations for fine-grained categorization. In ICCVW, pages 554–561, 2013.
|
| 346 |
+
[22] Charlotte Laclau, Ievgen Redko, Basarab Matei, Younes Bennani, and Vincent Brault. Co-clustering through optimal transport. In ICML, pages 1955–1964, 2017.
|
| 347 |
+
[23] Junnan Li, Dongxu Li, Caiming Xiong, and Steven Hoi. Blip: Bootstrapping language-image pre-training for unified vision-language understanding and generation. arXiv preprint arXiv:2201.12086, 2022.
|
| 348 |
+
[24] Junnan Li, Ramprasaath Selvaraju, Akhilesh Gotmare, Shafiq Joty, Caiming Xiong, and Steven Chu Hong Hoi. Align before fuse: Vision and language representation learning with momentum distillation. NeurIPS, 34, 2021.
|
| 349 |
+
[25] Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, and Kai-Wei Chang. Visualbert: A simple and performant baseline for vision and language. arXiv preprint arXiv:1908.03557, 2019.
|
| 350 |
+
[26] Xiang Lisa Li and Percy Liang. Prefix-tuning: Optimizing continuous prompts for generation. arXiv preprint arXiv:2101.00190, 2021.
|
| 351 |
+
[27] Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing. arXiv preprint arXiv:2107.13586, 2021.
|
| 352 |
+
[28] Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. Gpt understands, too. arXiv preprint arXiv:2103.10385, 2021.
|
| 353 |
+
[29] Subhransu Maji, Esa Rahtu, Juho Kannala, Matthew Blaschko, and Andrea Vedaldi. Fine-grained visual classification of aircraft. arXiv preprint arXiv:1306.5151, 2013.
|
| 354 |
+
[30] Gaspard Monge. Mémoire sur la théorie des déblais et des remblais. Histoire de l’Académie Royale des Sciences de Paris, 1781.
|
| 355 |
+
[31] Alex Nichol, Prafulla Dhariwal, Aditya Ramesh, Pranav Shyam, Pamela Mishkin, Bob McGrew, Ilya Sutskever, and Mark Chen. Glide: Towards photorealistic image generation and editing with text-guided diffusion models. arXiv preprint arXiv:2112.10741, 2021.
|
| 356 |
+
[32] Maria-Elena Nilsback and Andrew Zisserman. Automated flower classification over a large number of classes. In 2008 Sixth Indian Conference on Computer Vision, Graphics & Image Processing, pages 722–729, 2008.
|
| 357 |
+
[33] Omkar M Parkhi, Andrea Vedaldi, Andrew Zisserman, and CV Jawahar. Cats and dogs. In CVPR, pages 3498–3505, 2012.
|
| 358 |
+
[34] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. NeurIPS, 2019.
|
| 359 |
+
[35] Or Patashnik, Zongze Wu, Eli Shechtman, Daniel Cohen-Or, and Dani Lischinski. Styleclip: Text-driven manipulation of stylegan imagery. In ICCV, pages 2085–2094, 2021.
|
| 360 |
+
[36] Fabio Petroni, Tim Rocktäschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H Miller, and Sebastian Riedel. Language models as knowledge bases? arXiv preprint arXiv:1909.01066, 2019.
|
| 361 |
+
[37] Gabriel Peyre and Marco Cuturi. Computational optimal transport. Foundations and Trends in Machine Learning, 11(5-6):355–607, 2019.
|
| 362 |
+
[38] Nina Poerner, Ulli Waltinger, and Hinrich Schütze. Bert is not a knowledge base (yet): Factual knowledge vs. name-based reasoning in unsupervised qa. arXiv preprint arXiv:1911.03681, 2019.
|
| 363 |
+
[39] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. arXiv preprint arXiv:2103.00020, 2021.
|
| 364 |
+
[40] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019.
|
| 365 |
+
[41] Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, and Mark Chen. Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 2022.
|
| 366 |
+
[42] Yongming Rao, Wenliang Zhao, Guangyi Chen, Yansong Tang, Zheng Zhu, Guan Huang, Jie Zhou, and Jiwen Lu. Denseclip: Language-guided dense prediction with context-aware prompting. arXiv preprint arXiv:2112.01518, 2021.
|
| 367 |
+
[43] Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenet classifiers generalize to imagenet? arXiv preprint arXiv:1902.10811, 2019.
|
| 368 |
+
[44] Yossi Rubner, Carlo Tomasi, and Leonidas J Guibas. The earth mover’s distance as a metric for image retrieval. IJCV, 40(2):99–121, 2000.
|
| 369 |
+
[45] Tim Salimans, Han Zhang, Alec Radford, and Dimitris Metaxas. Improving gans using optimal transport. ICLR, 2018.
|
| 370 |
+
[46] Taylor Shin, Yasaman Razeghi, Robert L Logan IV, Eric Wallace, and Sameer Singh. Autoprompt: Eliciting knowledge from language models with automatically generated prompts. arXiv preprint arXiv:2010.15980, 2020.
|
| 371 |
+
[47] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012.
|
| 372 |
+
[48] Guy Tevet, Brian Gordon, Amir Hertz, Amit H Bermano, and Daniel Cohen-Or. Motionclip: Exposing human motion generation to clip space. arXiv preprint arXiv:2203.08063, 2022.
|
| 373 |
+
[49] Maria Tsimpoukelli, Jacob L Menick, Serkan Cabi, SM Eslami, Oriol Vinyals, and Felix Hill. Multimodal few-shot learning with frozen language models. NeurIPS, 34:200–212, 2021.
|
| 374 |
+
[50] Ruibo Tu, Kun Zhang, Hedvig Kjellström, and Cheng Zhang. Optimal transport for causal discovery. ICLR, 2022.
|
| 375 |
+
[51] Cédric Villani. Optimal transport: old and new, volume 338. Springer, 2009.
|
| 376 |
+
[52] Haohan Wang, Songwei Ge, Zachary Lipton, and Eric P Xing. Learning robust global representations by penalizing local predictive power. NeurIPS, 32, 2019.
|
| 377 |
+
[53] Mengmeng Wang, Jiazheng Xing, and Yong Liu. Actionclip: A new paradigm for video action recognition. arXiv preprint arXiv:2109.08472, 2021.
|
| 378 |
+
[54] Wenhui Wang, Hangbo Bao, Li Dong, and Furu Wei. Vlmo: Unified vision-language pre-training with mixture-of-modality-experts. arXiv preprint arXiv:2111.02358, 2021.
|
| 379 |
+
[55] Jianxiong Xiao, James Hays, Krista A Ehinger, Aude Oliva, and Antonio Torralba. Sun database: Largescale scene recognition from abbey to zoo. In CVPR, pages 3485–3492, 2010.
|
| 380 |
+
[56] Hongteng Xu, Dixin Luo, Hongyuan Zha, and Lawrence Carin Duke. Gromov-wasserstein learning for graph matching and node embedding. In ICML, pages 6932–6941, 2019.
|
| 381 |
+
[57] Jingjing Xu, Hao Zhou, Chun Gan, Zaixiang Zheng, and Lei Li. Vocabulary learning via optimal transport for neural machine translation. arXiv preprint arXiv:2012.15671, 2020.
|
| 382 |
+
[58] Renrui Zhang, Rongyao Fang, Peng Gao, Wei Zhang, Kunchang Li, Jifeng Dai, Yu Qiao, and Hongsheng Li. Tip-adapter: Training-free clip-adapter for better vision-language modeling. arXiv preprint arXiv:2111.03930, 2021.
|
| 383 |
+
[59] Renrui Zhang, Longtian Qiu, Wei Zhang, and Ziyao Zeng. Vt-clip: Enhancing vision-language models with visual-guided texts. arXiv preprint arXiv:2112.02399, 2021.
|
| 384 |
+
[60] He Zhao, Dinh Phung, Viet Huynh, Trung Le, and Wray Buntine. Neural topic model via optimal transport. ICLR, 2021.
|
| 385 |
+
[61] Wenliang Zhao, Yongming Rao, Ziyi Wang, Jiwen Lu, and Jie Zhou. Towards interpretable deep metric learning with structural matching. In ICCV, pages 9887–9896, 2021.
|
| 386 |
+
[62] Chong Zhou, Chen Change Loy, and Bo Dai. Denseclip: Extract free dense labels from clip. arXiv preprint arXiv:2112.01071, 2021.
|
| 387 |
+
[63] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Learning to prompt for vision-language models. arXiv preprint arXiv:2109.01134, 2021.
|
| 388 |
+
[64] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Conditional prompt learning for vision-language models. In CVPR, 2022.
|
| 389 |
+
|
| 390 |
+
# Checklist
|
| 391 |
+
|
| 392 |
+
1. For all authors...
|
| 393 |
+
|
| 394 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 395 |
+
(b) Did you describe the limitations of your work? [Yes] See our analysis in Section 4.4. 1) Our method is still need few-shot data for optimization, which cannot be applied in zero-shot setting. 2) The method needs more computing cost than CoOp.
|
| 396 |
+
(c) Did you discuss any potential negative societal impacts of your work? [N/A] We propose a general framework for using the vision-language pre-trained model. It is not for specific applications, which does not directly involve societal issues.
|
| 397 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 398 |
+
|
| 399 |
+
2. If you are including theoretical results...
|
| 400 |
+
|
| 401 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A]
|
| 402 |
+
|
| 403 |
+
3. If you ran experiments...
|
| 404 |
+
|
| 405 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes]
|
| 406 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes]
|
| 407 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes]
|
| 408 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Section 4.2.
|
| 409 |
+
|
| 410 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 411 |
+
|
| 412 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes]
|
| 413 |
+
(b) Did you mention the license of the assets? [N/A]
|
| 414 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [No]
|
| 415 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 416 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 417 |
+
|
| 418 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 419 |
+
|
| 420 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 421 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 422 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
parse/dev/b9APFSTylGT/b9APFSTylGT_content_list.json
ADDED
|
@@ -0,0 +1,1238 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Prompt Learning with Optimal Transport for Vision-Language Models ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
223,
|
| 8 |
+
122,
|
| 9 |
+
774,
|
| 10 |
+
172
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous Author(s) \nAffiliation \nAddress \nemail ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
423,
|
| 19 |
+
226,
|
| 20 |
+
578,
|
| 21 |
+
281
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Abstract ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
462,
|
| 31 |
+
318,
|
| 32 |
+
535,
|
| 33 |
+
334
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "1 With the increasing attention to large vision-language models such as CLIP, there \n2 has been a significant amount of effort dedicated to building efficient prompts. \n3 Unlike conventional methods of only learning one single prompt, we propose \n4 to learn multiple comprehensive prompts to describe diverse characteristics of \n5 categories such as intrinsic attributes or extrinsic contexts. However, directly \n6 matching each prompt to the same visual feature is problematic, as it pushes the \n7 prompts to converge to one point. To solve this problem, we propose to apply \n8 optimal transport to match the vision and text modalities. Specifically, we first \n9 model images and the categories with visual and textual feature sets. Then, we \n10 apply a two-stage optimization strategy to learn the prompts. In the inner loop, we \n11 optimize the optimal transport distance to align visual features and prompts by the \n12 Sinkhorn algorithm, while in the outer loop, we learn the prompts by this distance \n13 from the supervised data. Extensive experiments are conducted on the few-shot \n14 recognition task and the improvement demonstrates the superiority of our method. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
148,
|
| 42 |
+
348,
|
| 43 |
+
766,
|
| 44 |
+
542
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "15 1 Introduction ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
148,
|
| 54 |
+
560,
|
| 55 |
+
312,
|
| 56 |
+
577
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "16 In the past few years, large-scale vision-language pre-trained (VLP) models, such as CLIP [39], \n17 ALIGN [17], and BLIP [23] have achieved remarkable success in open-world visual concept learning. \n18 These methods have brought new light but also pose a new question: how to efficiently adapt the \n19 knowledge from pretraining to the downstream tasks since these models are typical of massive sizes \n20 which are not feasible for normal users to re-train. \n21 One of the conventional \n22 paradigms of utilizing pretrained \n23 knowledge is “pre-training, \n24 fine-tuning”, which fixes the \n25 architecture of the pre-trained \n26 neural network and tunes its \n27 parameters using task-specific \n28 objective functions. Beyond \n29 fine-tuning the parameters, \n30 many recent methods [63, 64] \n31 introduce the concept of prompt \n32 learning from the field of NLP to the vision domain and achieve striking performance gain for the \n33 few-shot visual classification. They fix the model parameters and instead learn suitable prompts \n34 by turning a template sentence into a set of learnable vectors. Then, these prompts are learned by \n35 minimizing the distance between the visual features and prompt-based language features. \n36 Despite significant improvements over manual prompts, learning only a sentence is intuitively \n37 insufficient to represent a class. One class can be described by many intrinsic characteristics and \n38 even extrinsic context relations. Thus, for one object, we may have multiple prompt candidates \n39 which focus on different attributes. As shown in Figure 1, we can describe the class “Brambling” in \n40 different views: such as the color of the wing, the color of the crown and eyes, the shape and color of \n41 the tail, and even the living environment information. It motivates us to learn multiple prompts to \n42 comprehensively represent the class and thus facilitate classification. \n43 The most natural solution is to directly learn multiple prompts by respectively matching each prompt \n44 with the visual features. However, it is the same as matching the mean of prompt features and the \n45 visual features. This solution is problematic since all prompts are encouraged to be closer to one single \n46 point and thus tend to learn the same characteristics. It contradicts our purpose to learn comprehensive \n47 prompts. To solve this problem, we tested adding some constraints to push away the prompt from \n48 each other, but found that this solution still fails to learn representative and comprehensive prompts. \n49 This solution treats the visual representation as one single point, and such a unified view of visual \n50 features ignores the fact that different prompts may only focus on one or a subset of characteristics. \n51 To address this problem, in this paper, we propose Prompt Learning with Optimal Transport (PLOT), \n52 which applies optimal transport (OT) to align the local visual features and multiple textual prompts. \n53 Optimal transport can calculate the distance between two distributions under the form of multiple \n54 sampling. In our prompt learning framework, we formulate local visual features and multiple prompts \n55 as the samplings of two discrete distributions and use OT to encourage fine-grained cross-modal \n56 matching. Specifically, to obtain the local visual features with different semantic clues, we extract all \n57 feature maps as the visual representation instead of the single global representation. Fortunately, we \n58 can easily obtain the visual feature maps from the visual encoder of CLIP by using all outputs of the \n59 multi-head self-attention layer [42]. Then the problem comes down to how to calculate the distance \n60 between two feature sets. \n61 We solve this problem by introducing the optimal transport theory [51] and formulate the feature sets \n62 as a discrete probability distribution where each feature has an equal probability value. Furthermore, \n63 to reduce the computational cost and avoid the extra model parameters, we learn the prompts with \n64 a two-stage optimization strategy. At the first stage in the inner loop, we fix both visual and text \n65 features and optimize the optimal transport problem by a fast Sinkhorn distances algorithm [6]. Then, \n66 in the outer loop, we fix all parameters of optimal transport and back-propagate the gradient to learn \n67 the prompts with different characteristics. Compared with conventional distance (such as Euclidean \n68 distance of mean features), optimal transport can align different visual features for each local prompt, \n69 which is more robust to the visual misalignment and tolerates well feature shift [44]. It is because OT \n70 learns an adaptive transport plan to align features, which achieves fine-grained matching across two \n71 modalities. We conduct experiments on 11 datasets following the standard setting of CLIP [39] and \n72 CoOp [63] to evaluate our method. These experiments span the visual classification of generic objects, \n73 scenes, actions, fine-grained categories, and so on. The significant result improvement demonstrates \n74 that PLOT can effectively learn representative and comprehensive prompts. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
147,
|
| 65 |
+
584,
|
| 66 |
+
828,
|
| 67 |
+
654
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "text",
|
| 73 |
+
"text": "",
|
| 74 |
+
"bbox": [
|
| 75 |
+
147,
|
| 76 |
+
661,
|
| 77 |
+
392,
|
| 78 |
+
811
|
| 79 |
+
],
|
| 80 |
+
"page_idx": 0
|
| 81 |
+
},
|
| 82 |
+
{
|
| 83 |
+
"type": "image",
|
| 84 |
+
"img_path": "images/c57e9c1381d6db8b3dade63c3241e4fb4e845de8801b03d88426df4af12cc486.jpg",
|
| 85 |
+
"image_caption": [
|
| 86 |
+
"Figure 1: The motivation that one category can be complementarily described in different views (An example of “Brambling”). "
|
| 87 |
+
],
|
| 88 |
+
"image_footnote": [],
|
| 89 |
+
"bbox": [
|
| 90 |
+
405,
|
| 91 |
+
662,
|
| 92 |
+
821,
|
| 93 |
+
767
|
| 94 |
+
],
|
| 95 |
+
"page_idx": 0
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"type": "text",
|
| 99 |
+
"text": "",
|
| 100 |
+
"bbox": [
|
| 101 |
+
153,
|
| 102 |
+
813,
|
| 103 |
+
826,
|
| 104 |
+
867
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 0
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "text",
|
| 110 |
+
"text": "",
|
| 111 |
+
"bbox": [
|
| 112 |
+
145,
|
| 113 |
+
875,
|
| 114 |
+
826,
|
| 115 |
+
901
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 0
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "",
|
| 122 |
+
"bbox": [
|
| 123 |
+
147,
|
| 124 |
+
92,
|
| 125 |
+
825,
|
| 126 |
+
160
|
| 127 |
+
],
|
| 128 |
+
"page_idx": 1
|
| 129 |
+
},
|
| 130 |
+
{
|
| 131 |
+
"type": "text",
|
| 132 |
+
"text": "",
|
| 133 |
+
"bbox": [
|
| 134 |
+
147,
|
| 135 |
+
166,
|
| 136 |
+
825,
|
| 137 |
+
279
|
| 138 |
+
],
|
| 139 |
+
"page_idx": 1
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "",
|
| 144 |
+
"bbox": [
|
| 145 |
+
147,
|
| 146 |
+
285,
|
| 147 |
+
825,
|
| 148 |
+
422
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 1
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "text",
|
| 154 |
+
"text": "",
|
| 155 |
+
"bbox": [
|
| 156 |
+
147,
|
| 157 |
+
429,
|
| 158 |
+
825,
|
| 159 |
+
622
|
| 160 |
+
],
|
| 161 |
+
"page_idx": 1
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "text",
|
| 165 |
+
"text": "75 2 Related Work ",
|
| 166 |
+
"text_level": 1,
|
| 167 |
+
"bbox": [
|
| 168 |
+
151,
|
| 169 |
+
641,
|
| 170 |
+
320,
|
| 171 |
+
657
|
| 172 |
+
],
|
| 173 |
+
"page_idx": 1
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"type": "text",
|
| 177 |
+
"text": "Optimal Transport The Optimal Transport [30] is initially introduced to solve the problem of how to reduce the cost when moving several items simultaneously. Recently, OT theory has drawn wide attention in the machine learning and computer vision community by comparing distributions readily available to them under the form of feature sets [37]. Due to the brilliant property of distribution matching, OT has been applied in many theoretic and application tasks including generative models [1, 45, 60], structural matching [4, 57, 61, 56] (e.g. sequence matching [4] and graph matching [56]), and other distribution-based tasks (such as clustering [22], distribution estimation [2], and causal discovery [50]). In this paper, we use OT to align the features of vision and language modalities which represents the data structure by learning an adaptive transport plan [44]. ",
|
| 178 |
+
"bbox": [
|
| 179 |
+
171,
|
| 180 |
+
670,
|
| 181 |
+
825,
|
| 182 |
+
795
|
| 183 |
+
],
|
| 184 |
+
"page_idx": 1
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"type": "text",
|
| 188 |
+
"text": "85 Vision-Language Pre-trained Models Vision-Language Pre-trained (VLP) models aim to explore \n86 the semantic correspondence between the vision and language modalities through large-scale pre \n87 training. Recently, VLP models have achieved an exciting performance improvement in the zero-shot \n88 and few-shot visual recognition [39, 10, 63, 64, 59], which shows the great potential to promote \n89 open-world visual understanding with the help of language. One key part of learning VLP models is \n90 the self-supervised learning objective on two modalities. The popular VLP objectives can be divided \n91 into reconstruction [25, 15, 8, 20], contrastive matching [39, 17, 16], or the combination of both \n92 two [24, 54, 19]. Besides, recent progress in the field of VLP also benefits a lot from large-scale \n93 pair-wised datasets. For example, CLIP [39] applies 400 million image-text pairs for contrastive \n94 learning, while ALIGN even exploits 1.8 billion data pairs. Beyond recognition, these VLP models \n95 also show great potential for other downstream applications, such as dense prediction [42, 62], image \n96 generation [31, 41, 35], and action understanding [53, 48]. \n97 Prompt Learning Prompt learning is introduced from the field of NLP to efficiently adapt the large \n98 language model to downstream tasks. Different from the conventional “pre-training, fine-tuning” \n99 paradigm which initializes the pre-trained model and tunes the parameters of the network using \n100 downstream task-specific objective functions, prompt learning applies textual prompt to reformulate \n101 the downstream tasks as the original pretrained task [27, 36]. By the prompt, the domain shift between \n102 pretrained task and downstream application is reduced and thus the pretrained knowledge can be \n103 easier adapted to downstream tasks. The concept of prompt learning [36, 40, 38] begins from the \n104 success of GPT [40] series. Early prompt learning methods (such as Petroni et al. [36] and Pörner et \n105 al. [38]) always manually create templates based on human prior knowledge. Furthermore, some \n106 mining-based methods [18] and gradient-based methods [46] are proposed to automatically search for \n107 appropriate templates. Beyond search in the discrete space, some methods [26, 49, 28] remove the \n108 constraint that the prompts are “words” and instead learn prompts in the continuous embedding space. \n109 Recently, CoOp [63] and its extended version [64] introduce prompt learning into open-world visual \n110 understanding to adapt the knowledge from the large-scale visual-language pretrained models and \n111 achieve great performance improvement on the few-shot visual recognition. Compared with $\\mathrm { C o O p }$ , \n112 our PLOT method further improves prompt learning by introducing the optimal transport distance to \n113 learn multiple local prompts and achieves fine-grained vision-language matching. ",
|
| 189 |
+
"bbox": [
|
| 190 |
+
147,
|
| 191 |
+
800,
|
| 192 |
+
825,
|
| 193 |
+
911
|
| 194 |
+
],
|
| 195 |
+
"page_idx": 1
|
| 196 |
+
},
|
| 197 |
+
{
|
| 198 |
+
"type": "text",
|
| 199 |
+
"text": "",
|
| 200 |
+
"bbox": [
|
| 201 |
+
147,
|
| 202 |
+
90,
|
| 203 |
+
825,
|
| 204 |
+
147
|
| 205 |
+
],
|
| 206 |
+
"page_idx": 2
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"type": "text",
|
| 210 |
+
"text": "",
|
| 211 |
+
"bbox": [
|
| 212 |
+
142,
|
| 213 |
+
154,
|
| 214 |
+
826,
|
| 215 |
+
388
|
| 216 |
+
],
|
| 217 |
+
"page_idx": 2
|
| 218 |
+
},
|
| 219 |
+
{
|
| 220 |
+
"type": "text",
|
| 221 |
+
"text": "14 3 Approach ",
|
| 222 |
+
"text_level": 1,
|
| 223 |
+
"bbox": [
|
| 224 |
+
155,
|
| 225 |
+
402,
|
| 226 |
+
287,
|
| 227 |
+
420
|
| 228 |
+
],
|
| 229 |
+
"page_idx": 2
|
| 230 |
+
},
|
| 231 |
+
{
|
| 232 |
+
"type": "text",
|
| 233 |
+
"text": "In this section we will first revisit the baseline method $\\mathrm { C o O p } \\ 3 . 1$ , review the preliminaries of optimal transport 3.2, and then introduce our proposed PLOT 3.3 to show how we can learn multiple comprehensive prompts. ",
|
| 234 |
+
"bbox": [
|
| 235 |
+
171,
|
| 236 |
+
428,
|
| 237 |
+
821,
|
| 238 |
+
469
|
| 239 |
+
],
|
| 240 |
+
"page_idx": 2
|
| 241 |
+
},
|
| 242 |
+
{
|
| 243 |
+
"type": "text",
|
| 244 |
+
"text": "118 3.1 A Revisit of CoOp ",
|
| 245 |
+
"text_level": 1,
|
| 246 |
+
"bbox": [
|
| 247 |
+
151,
|
| 248 |
+
479,
|
| 249 |
+
341,
|
| 250 |
+
494
|
| 251 |
+
],
|
| 252 |
+
"page_idx": 2
|
| 253 |
+
},
|
| 254 |
+
{
|
| 255 |
+
"type": "text",
|
| 256 |
+
"text": "119 CoOp [63] is one of the pioneering methods to learn the prompts for using vision language pretrained \n120 knowledge (such as CLIP [39]) for downstream open-world visual recognition. Different from CLIP \n121 which manually designs the prompt templates, $\\mathrm { C o O p }$ sets a part of context words in the template as \n122 continuous learnable parameters which can be learned from the few-shot data. Then the classification \n123 weights can be represented by the distance between the learned prompt and visual feature. \n124 Specifically, given an image $_ { \\textbf { \\em x } }$ , a visual feature $\\pmb { f } = f ( \\pmb { x } )$ is obtained by the visual encoder $f$ of \n125 CLIP. Then, the textual prompt can be formulated as $\\pmb { t } _ { k } = \\{ \\pmb { v e c } _ { 1 } , \\pmb { v e c } _ { 2 } , \\dots , \\pmb { v e c } _ { L } , \\pmb { c } _ { k } \\}$ , where $c _ { k }$ is \n126 the word embedding of the class name, $\\{ v e c _ { l } | _ { l = 1 } ^ { L } \\}$ are learnable vectors with the same dimension as \n127 the original word embedding and $\\mathrm { L }$ is the length of context words. With prompt $\\mathbf { \\Delta } _ { t _ { k } }$ as the input, the \n128 text encoder $g$ outputs the textual feature as $\\begin{array} { r } { \\mathbf { g } _ { k } = g ( \\mathbf { \\hat { t } } _ { k } ) } \\end{array}$ . The final prediction probability is computed \n129 by the matching score as follows: ",
|
| 257 |
+
"bbox": [
|
| 258 |
+
142,
|
| 259 |
+
500,
|
| 260 |
+
825,
|
| 261 |
+
569
|
| 262 |
+
],
|
| 263 |
+
"page_idx": 2
|
| 264 |
+
},
|
| 265 |
+
{
|
| 266 |
+
"type": "text",
|
| 267 |
+
"text": "",
|
| 268 |
+
"bbox": [
|
| 269 |
+
140,
|
| 270 |
+
574,
|
| 271 |
+
825,
|
| 272 |
+
660
|
| 273 |
+
],
|
| 274 |
+
"page_idx": 2
|
| 275 |
+
},
|
| 276 |
+
{
|
| 277 |
+
"type": "equation",
|
| 278 |
+
"img_path": "images/5390e40a4870304fef575eadc9a89e1c5c6a24f464e8c8244af2af5b74d16de2.jpg",
|
| 279 |
+
"text": "$$\np ( y = k | \\pmb { x } ) = \\frac { e x p ( \\sin ( \\pmb { f } , \\pmb { g } _ { k } ) / \\tau ) } { \\sum _ { k ^ { \\prime } = 1 } ^ { K } e x p ( \\sin ( \\pmb { f } , \\pmb { g } _ { k ^ { \\prime } } ) / \\tau ) } ,\n$$",
|
| 280 |
+
"text_format": "latex",
|
| 281 |
+
"bbox": [
|
| 282 |
+
354,
|
| 283 |
+
666,
|
| 284 |
+
642,
|
| 285 |
+
704
|
| 286 |
+
],
|
| 287 |
+
"page_idx": 2
|
| 288 |
+
},
|
| 289 |
+
{
|
| 290 |
+
"type": "text",
|
| 291 |
+
"text": "where $\\sin ( \\cdot , \\cdot )$ denotes a metric function such as cosine similarity, and $\\tau$ stands for the temperature of Softmax. Then we can optimize the parameters of $\\{ v e c _ { l } | _ { l = 1 } ^ { L } \\}$ with the cross-entropy loss between the prediction and the labeled target. ",
|
| 292 |
+
"bbox": [
|
| 293 |
+
160,
|
| 294 |
+
710,
|
| 295 |
+
825,
|
| 296 |
+
753
|
| 297 |
+
],
|
| 298 |
+
"page_idx": 2
|
| 299 |
+
},
|
| 300 |
+
{
|
| 301 |
+
"type": "text",
|
| 302 |
+
"text": "3.2 Optimal Transport ",
|
| 303 |
+
"text_level": 1,
|
| 304 |
+
"bbox": [
|
| 305 |
+
173,
|
| 306 |
+
763,
|
| 307 |
+
346,
|
| 308 |
+
779
|
| 309 |
+
],
|
| 310 |
+
"page_idx": 2
|
| 311 |
+
},
|
| 312 |
+
{
|
| 313 |
+
"type": "text",
|
| 314 |
+
"text": "34 Optimal transport (OT) distance is a widely used metric for the comparison of distributions. Here, we \n35 only focus on the discrete situation which is more related to our framework. Assuming we have two \n36 sets of points (features), the discrete distributions are formulated as: ",
|
| 315 |
+
"bbox": [
|
| 316 |
+
151,
|
| 317 |
+
784,
|
| 318 |
+
825,
|
| 319 |
+
825
|
| 320 |
+
],
|
| 321 |
+
"page_idx": 2
|
| 322 |
+
},
|
| 323 |
+
{
|
| 324 |
+
"type": "equation",
|
| 325 |
+
"img_path": "images/400262e1ffbb02047ef330acecd754adaed327a7b6c8db82178ed2d19b14989b.jpg",
|
| 326 |
+
"text": "$$\nU = \\sum _ { m = 1 } ^ { M } u _ { m } \\delta _ { f _ { m } } \\qquad \\mathrm { a n d } \\qquad V = \\sum _ { n = 1 } ^ { N } v _ { n } \\delta _ { g _ { n } } ,\n$$",
|
| 327 |
+
"text_format": "latex",
|
| 328 |
+
"bbox": [
|
| 329 |
+
343,
|
| 330 |
+
833,
|
| 331 |
+
655,
|
| 332 |
+
876
|
| 333 |
+
],
|
| 334 |
+
"page_idx": 2
|
| 335 |
+
},
|
| 336 |
+
{
|
| 337 |
+
"type": "text",
|
| 338 |
+
"text": "137 where $\\textbf { \\em u }$ and $\\textbf { { v } }$ are the discrete probability vectors that sum to 1, and $\\delta _ { f }$ is a Dirac delta function \n138 placed at support point $f$ in the embedding space. Then, the total distance of these two distributions ",
|
| 339 |
+
"bbox": [
|
| 340 |
+
137,
|
| 341 |
+
882,
|
| 342 |
+
825,
|
| 343 |
+
912
|
| 344 |
+
],
|
| 345 |
+
"page_idx": 2
|
| 346 |
+
},
|
| 347 |
+
{
|
| 348 |
+
"type": "image",
|
| 349 |
+
"img_path": "images/2d85bb34d9ff604845e43487f68a39419971c3db82cc68daca2f31d8e66755e1.jpg",
|
| 350 |
+
"image_caption": [
|
| 351 |
+
"Figure 2: The framework of PLOT. PLOT first describes each category with multiple prompts and obtains a set of prompt features by text encoder. The image is also encoded as a set of local features. Then the optimal transport is used as the metric between prompts and visual features. "
|
| 352 |
+
],
|
| 353 |
+
"image_footnote": [],
|
| 354 |
+
"bbox": [
|
| 355 |
+
173,
|
| 356 |
+
90,
|
| 357 |
+
825,
|
| 358 |
+
244
|
| 359 |
+
],
|
| 360 |
+
"page_idx": 3
|
| 361 |
+
},
|
| 362 |
+
{
|
| 363 |
+
"type": "text",
|
| 364 |
+
"text": "139 are written as: ",
|
| 365 |
+
"bbox": [
|
| 366 |
+
142,
|
| 367 |
+
308,
|
| 368 |
+
267,
|
| 369 |
+
321
|
| 370 |
+
],
|
| 371 |
+
"page_idx": 3
|
| 372 |
+
},
|
| 373 |
+
{
|
| 374 |
+
"type": "equation",
|
| 375 |
+
"img_path": "images/73c6d5d67053831369f730face7a896aa4f2dbf1f716ad4663ef50c2533427e6.jpg",
|
| 376 |
+
"text": "$$\n< T , C > = \\sum _ { m = 1 } ^ { M } \\sum _ { n = 1 } ^ { N } T _ { m , n } { \\cal C } _ { m , n } .\n$$",
|
| 377 |
+
"text_format": "latex",
|
| 378 |
+
"bbox": [
|
| 379 |
+
385,
|
| 380 |
+
316,
|
| 381 |
+
612,
|
| 382 |
+
361
|
| 383 |
+
],
|
| 384 |
+
"page_idx": 3
|
| 385 |
+
},
|
| 386 |
+
{
|
| 387 |
+
"type": "text",
|
| 388 |
+
"text": "140 We call $C$ the cost matrix in which each point denotes the cost between $f _ { m }$ and $\\scriptstyle { \\pmb { g } } _ { n }$ , such as \n141 $C _ { m , n } = 1 - \\sin ( { f _ { m } } , { \\pmb { g } } _ { n } )$ . While the $\\mathbf { T }$ is called the transport plan, which is learned to minimize the \n142 total distance. The optimization problem of optimal transport is formulated as: ",
|
| 389 |
+
"bbox": [
|
| 390 |
+
140,
|
| 391 |
+
361,
|
| 392 |
+
825,
|
| 393 |
+
404
|
| 394 |
+
],
|
| 395 |
+
"page_idx": 3
|
| 396 |
+
},
|
| 397 |
+
{
|
| 398 |
+
"type": "equation",
|
| 399 |
+
"img_path": "images/492430b29380fae5e25024cb766d92baaf5e617b5cc37bc9abba3343dcfe568e.jpg",
|
| 400 |
+
"text": "$$\n\\begin{array} { l l } { { d _ { O T } ( { \\pmb u } , { \\pmb v } | { \\cal C } ) = \\underset { \\cal T } { \\mathrm { m i n i m i z e } } < { \\cal T } , { \\cal C } > } } \\\\ { { \\mathrm { s u b j e c t ~ t o ~ } } } & { { { \\cal T } { \\bf 1 } = { \\pmb u } , { \\cal T } ^ { T } { \\bf 1 } = { \\pmb v } , { \\cal T } \\geq 0 . } } \\end{array}\n$$",
|
| 401 |
+
"text_format": "latex",
|
| 402 |
+
"bbox": [
|
| 403 |
+
361,
|
| 404 |
+
406,
|
| 405 |
+
637,
|
| 406 |
+
452
|
| 407 |
+
],
|
| 408 |
+
"page_idx": 3
|
| 409 |
+
},
|
| 410 |
+
{
|
| 411 |
+
"type": "text",
|
| 412 |
+
"text": "143 As directly optimizing the above objective is always time-consuming, we apply the Sinkhorn dis \n144 tance [6] to use an entropic constraint for fast optimization. The optimization problem with a \n145 Lagrange multiplier of the entropy constraint is: ",
|
| 413 |
+
"bbox": [
|
| 414 |
+
140,
|
| 415 |
+
460,
|
| 416 |
+
825,
|
| 417 |
+
503
|
| 418 |
+
],
|
| 419 |
+
"page_idx": 3
|
| 420 |
+
},
|
| 421 |
+
{
|
| 422 |
+
"type": "equation",
|
| 423 |
+
"img_path": "images/3c81eb9ce7b52c2923e3d3c8467ed9a16f9ec73e9e8f6ee25037f99bcc4d8a01.jpg",
|
| 424 |
+
"text": "$$\n\\begin{array} { r l } & { d _ { O T , \\lambda } ( \\pmb { u } , \\pmb { v } | C ) = \\underset { T } { \\mathrm { m i n i m i z e } } < T , C > - \\lambda h ( \\pmb { T } ) } \\\\ & { } \\\\ & { \\mathrm { s u b j e c t ~ t o } \\quad T \\mathbf { 1 } = \\pmb { u } , T ^ { T } \\mathbf { 1 } = \\pmb { v } , } \\end{array}\n$$",
|
| 425 |
+
"text_format": "latex",
|
| 426 |
+
"bbox": [
|
| 427 |
+
334,
|
| 428 |
+
506,
|
| 429 |
+
661,
|
| 430 |
+
551
|
| 431 |
+
],
|
| 432 |
+
"page_idx": 3
|
| 433 |
+
},
|
| 434 |
+
{
|
| 435 |
+
"type": "text",
|
| 436 |
+
"text": "146 where $h ( \\cdot )$ is entropy and $\\lambda \\geq 0$ is a hyper-parameter. Then we can have a fast optimization solution \n147 with a few iterations as: ",
|
| 437 |
+
"bbox": [
|
| 438 |
+
148,
|
| 439 |
+
554,
|
| 440 |
+
823,
|
| 441 |
+
582
|
| 442 |
+
],
|
| 443 |
+
"page_idx": 3
|
| 444 |
+
},
|
| 445 |
+
{
|
| 446 |
+
"type": "equation",
|
| 447 |
+
"img_path": "images/c4fffb8dc5cdbb88c0da5ddf3cd3cc92a4317c99e2c970ad2bd06ea091e11e57.jpg",
|
| 448 |
+
"text": "$$\n\\pmb { T } ^ { * } = \\mathrm { d i a g } ( \\pmb { u } ^ { t } ) e x p ( - \\pmb { C } / \\lambda ) \\mathrm { d i a g } ( \\pmb { v } ^ { t } ) ,\n$$",
|
| 449 |
+
"text_format": "latex",
|
| 450 |
+
"bbox": [
|
| 451 |
+
374,
|
| 452 |
+
580,
|
| 453 |
+
619,
|
| 454 |
+
598
|
| 455 |
+
],
|
| 456 |
+
"page_idx": 3
|
| 457 |
+
},
|
| 458 |
+
{
|
| 459 |
+
"type": "text",
|
| 460 |
+
"text": "where $t$ denotes iteration and in each iteration $\\begin{array} { c c l } { { { \\pmb u } ^ { t } } } & { { = } } & { { { \\pmb u } / ( ( e x p ( - { \\pmb C } / \\lambda ) { \\pmb v } ^ { t - 1 } ) } } \\end{array}$ and $\\begin{array} { r l } { \\boldsymbol { v } ^ { t } } & { { } = } \\end{array}$ $\\pmb { v } / ( ( e x p ( - C / \\lambda ) ^ { T } \\pmb { u } ^ { t } )$ , with the initiation $\\mathbf { \\nabla } \\mathbf { v } ^ { 0 } = \\mathbf { 1 }$ . ",
|
| 461 |
+
"bbox": [
|
| 462 |
+
165,
|
| 463 |
+
599,
|
| 464 |
+
826,
|
| 465 |
+
628
|
| 466 |
+
],
|
| 467 |
+
"page_idx": 3
|
| 468 |
+
},
|
| 469 |
+
{
|
| 470 |
+
"type": "text",
|
| 471 |
+
"text": "3.3 Prompt Learning with Optimal Transport ",
|
| 472 |
+
"text_level": 1,
|
| 473 |
+
"bbox": [
|
| 474 |
+
174,
|
| 475 |
+
637,
|
| 476 |
+
506,
|
| 477 |
+
652
|
| 478 |
+
],
|
| 479 |
+
"page_idx": 3
|
| 480 |
+
},
|
| 481 |
+
{
|
| 482 |
+
"type": "text",
|
| 483 |
+
"text": "In this subsection, we introduce the details of our PLOT, which learns multiple prompts to describe different characteristics of the category by minimizing the OT distance. ",
|
| 484 |
+
"bbox": [
|
| 485 |
+
168,
|
| 486 |
+
656,
|
| 487 |
+
821,
|
| 488 |
+
685
|
| 489 |
+
],
|
| 490 |
+
"page_idx": 3
|
| 491 |
+
},
|
| 492 |
+
{
|
| 493 |
+
"type": "text",
|
| 494 |
+
"text": "153 Specifically, as shown in Figure 2, given an image $_ { \\textbf { \\em x } }$ , we first feed it to the visual encoder branch of \n154 CLIP. Apart from the global visual feature $f$ , we can also obtain a set of local features $\\{ f _ { m } | _ { m = 1 } ^ { M } \\}$ \n155 The visual encoder has a multi-head attention pooling layer in which the input is the combination of \n156 the global feature and a set of local features (feature map) and the output is a tensor with the shape \n157 $\\mathbb { R } ^ { ( \\bar { H } \\times W + 1 ) \\times C }$ , where $H$ and $W$ is the height and width of feature map and $C$ is the feature dimension. \n158 Therefore, we can obtain $M = H \\times W$ local features and a global feature. At the same time, for \n159 class $k$ , we can initialize $_ \\mathrm { N }$ local prompts as $\\{ t _ { k , n } | _ { n = 1 } ^ { N } \\}$ with learnable vectors $\\{ v e c _ { l , n } | _ { l = 1 , n = 1 } ^ { L , N } \\}$ \n160 where each is the same as the prompt in $\\mathrm { C o O p }$ . With both visual and textual encoders, we can obtain \n161 local visual features ${ \\pmb F } = \\{ { \\pmb f } _ { m } | _ { m = 1 } ^ { M } \\} \\in \\mathbb { R } ^ { M \\times C }$ and prompt features ${ G } _ { k } = \\{ \\pmb { g } _ { n } | _ { n = 1 } ^ { N } \\} \\in \\mathbb { R } ^ { N \\times C }$ . \n62 In the inner loop, we learn the transport plan $\\mathbf { T }$ with these fixed support sets ${ \\bf \\nabla } F , G _ { k }$ , by minimizing \n63 the following OT distance to push $G _ { k }$ to $\\pmb { F }$ : ",
|
| 495 |
+
"bbox": [
|
| 496 |
+
140,
|
| 497 |
+
690,
|
| 498 |
+
826,
|
| 499 |
+
823
|
| 500 |
+
],
|
| 501 |
+
"page_idx": 3
|
| 502 |
+
},
|
| 503 |
+
{
|
| 504 |
+
"type": "text",
|
| 505 |
+
"text": "",
|
| 506 |
+
"bbox": [
|
| 507 |
+
153,
|
| 508 |
+
827,
|
| 509 |
+
825,
|
| 510 |
+
856
|
| 511 |
+
],
|
| 512 |
+
"page_idx": 3
|
| 513 |
+
},
|
| 514 |
+
{
|
| 515 |
+
"type": "equation",
|
| 516 |
+
"img_path": "images/979aac41062dcd78dbc80f5aef0646091e63fd2eb7cd4a7a67bb45f034353eb9.jpg",
|
| 517 |
+
"text": "$$\nd _ { O T } ( k ) = d _ { O T } ( \\boldsymbol { u } , \\boldsymbol { v } | \\mathbf { 1 } - \\mathbf { F } ^ { T } \\mathbf { G } _ { k } ) ,\n$$",
|
| 518 |
+
"text_format": "latex",
|
| 519 |
+
"bbox": [
|
| 520 |
+
383,
|
| 521 |
+
858,
|
| 522 |
+
612,
|
| 523 |
+
877
|
| 524 |
+
],
|
| 525 |
+
"page_idx": 3
|
| 526 |
+
},
|
| 527 |
+
{
|
| 528 |
+
"type": "text",
|
| 529 |
+
"text": "where 164 ${ \\pmb { C } } = { \\bf 1 } - { \\pmb { F } } ^ { T } { \\pmb { G } } _ { k }$ denotes that we use the cosine distance between $\\pmb { F }$ and $G _ { k }$ as the cost matrix. \nThen we can obtain the solution of transport plan 165 $\\mathbf { T } ^ { * }$ as Eq (6) and the final OT distance $d o T ( k )$ . ",
|
| 530 |
+
"bbox": [
|
| 531 |
+
138,
|
| 532 |
+
882,
|
| 533 |
+
830,
|
| 534 |
+
912
|
| 535 |
+
],
|
| 536 |
+
"page_idx": 3
|
| 537 |
+
},
|
| 538 |
+
{
|
| 539 |
+
"type": "text",
|
| 540 |
+
"text": "166 Given the OT distance between $G _ { k }$ and $\\pmb { F }$ , we reformulate the prediction probability as: ",
|
| 541 |
+
"bbox": [
|
| 542 |
+
135,
|
| 543 |
+
90,
|
| 544 |
+
751,
|
| 545 |
+
107
|
| 546 |
+
],
|
| 547 |
+
"page_idx": 4
|
| 548 |
+
},
|
| 549 |
+
{
|
| 550 |
+
"type": "equation",
|
| 551 |
+
"img_path": "images/2da49d79f6d0e704321219551d37442169c247852e80bd9c7cf485cb76499532.jpg",
|
| 552 |
+
"text": "$$\np _ { o t } ( y = k | x ) = \\frac { e x p ( ( 1 - d _ { O T } ( k ) ) / \\tau ) } { \\sum _ { k ^ { \\prime } = 1 } ^ { K } e x p ( ( 1 - d _ { O T } ( k ^ { \\prime } ) ) / \\tau ) } .\n$$",
|
| 553 |
+
"text_format": "latex",
|
| 554 |
+
"bbox": [
|
| 555 |
+
338,
|
| 556 |
+
113,
|
| 557 |
+
658,
|
| 558 |
+
150
|
| 559 |
+
],
|
| 560 |
+
"page_idx": 4
|
| 561 |
+
},
|
| 562 |
+
{
|
| 563 |
+
"type": "text",
|
| 564 |
+
"text": "In the outer loop, we fix the transport plan 167 $\\mathbf { T } ^ { * }$ and apply the cross entropy loss to optimize the 168 $\\{ v e c _ { l , n } | _ { l = 1 , n = 1 } ^ { L , N } \\}$ as: ",
|
| 565 |
+
"bbox": [
|
| 566 |
+
140,
|
| 567 |
+
156,
|
| 568 |
+
825,
|
| 569 |
+
189
|
| 570 |
+
],
|
| 571 |
+
"page_idx": 4
|
| 572 |
+
},
|
| 573 |
+
{
|
| 574 |
+
"type": "equation",
|
| 575 |
+
"img_path": "images/861e1e5366c6a6a7ffe47567844bcac19211b7a9747078254574f9e8cb9d827c.jpg",
|
| 576 |
+
"text": "$$\nL _ { C E } = - \\frac { 1 } { | \\mathcal { X } | } \\sum _ { \\pmb { x } \\in \\mathcal { X } } \\sum _ { k = 1 } ^ { K } y _ { \\pmb { x } , k } p _ { o t } ( y = k | \\pmb { x } ) ,\n$$",
|
| 577 |
+
"text_format": "latex",
|
| 578 |
+
"bbox": [
|
| 579 |
+
359,
|
| 580 |
+
188,
|
| 581 |
+
637,
|
| 582 |
+
232
|
| 583 |
+
],
|
| 584 |
+
"page_idx": 4
|
| 585 |
+
},
|
| 586 |
+
{
|
| 587 |
+
"type": "text",
|
| 588 |
+
"text": "69 where $\\scriptstyle { \\mathbf { } } _ { \\mathbf { } } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf \\Psi \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf \\Psi \\mathbf { } \\mathbf { } \\mathbf { } \\mathbf \\Psi \\mathbf { } \\mathbf { } \\mathbf \\Psi \\mathbf { } \\mathbf { } \\mathbf \\Psi \\mathbf { } \\mathbf \\Psi \\mathbf { } \\mathbf \\Psi \\mathbf { } \\mathbf \\Psi \\mathbf { } \\mathbf \\Psi \\mathbf { } \\mathbf \\Psi \\mathbf \\Psi \\Psi \\mathbf \\Psi \\Psi \\mathbf \\Psi \\Psi \\mathbf \\Psi \\Psi \\mathbf \\Psi \\mathbf \\Psi \\Psi \\mathbf \\Psi \\mathbf \\Psi \\Psi \\mathbf \\Psi \\mathbf \\Psi \\Psi \\mathbf \\Psi \\mathbf \\Psi \\mathbf \\Psi \\mathbf \\Psi \\Psi \\mathbf \\Psi \\mathbf \\Psi \\mathbf \\Psi \\mathbf \\Psi \\mathbf \\Psi \\mathbf \\Psi \\mathbf \\Psi \\mathbf \\mathbf \\Psi \\mathbf \\Psi \\mathbf \\Psi \\mathbf \\mathbf \\Psi \\mathbf \\Psi \\mathbf \\mathbf \\Psi \\mathbf \\Psi \\mathbf \\mathbf \\Psi \\mathbf \\mathbf \\Psi \\mathbf \\mathbf \\mathbf \\Psi \\mathbf \\Psi \\mathbf \\mathbf \\mathbf \\Psi \\mathbf \\mathbf \\Psi \\mathbf \\mathbf \\mathbf \\Psi \\mathbf \\mathbf \\mathbf \\mathbf \\Psi \\mathbf \\mathbf \\Psi \\mathbf \\mathbf \\mathbf \\Psi \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\Psi \\mathbf \\mathbf \\mathbf \\Psi \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\Psi \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\Psi \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\Psi \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf \\mathbf $ is a one-hot label vector. The detail algorithm can be found in the supplementary materials. ",
|
| 589 |
+
"bbox": [
|
| 590 |
+
153,
|
| 591 |
+
234,
|
| 592 |
+
823,
|
| 593 |
+
250
|
| 594 |
+
],
|
| 595 |
+
"page_idx": 4
|
| 596 |
+
},
|
| 597 |
+
{
|
| 598 |
+
"type": "text",
|
| 599 |
+
"text": "Though the optimization strategy of the optimal transport and prompts is two-stage, the whole training flow is end-to-end. It is because that the transport plan is computed using a small number of matrix multiplications as one forward module of the neural network. The gradients of these matrix multiplications are taped for backpropagation for end-to-end optimization, which makes the whole system fully differentiable (including the iterative algorithm) and easy to implement using an autograd library like PyTorch. In the experiments, we found that it is natural and relatively easy to this optimization strategy. ",
|
| 600 |
+
"bbox": [
|
| 601 |
+
171,
|
| 602 |
+
256,
|
| 603 |
+
825,
|
| 604 |
+
353
|
| 605 |
+
],
|
| 606 |
+
"page_idx": 4
|
| 607 |
+
},
|
| 608 |
+
{
|
| 609 |
+
"type": "text",
|
| 610 |
+
"text": "3.4 Inference strategy ",
|
| 611 |
+
"text_level": 1,
|
| 612 |
+
"bbox": [
|
| 613 |
+
176,
|
| 614 |
+
364,
|
| 615 |
+
338,
|
| 616 |
+
378
|
| 617 |
+
],
|
| 618 |
+
"page_idx": 4
|
| 619 |
+
},
|
| 620 |
+
{
|
| 621 |
+
"type": "text",
|
| 622 |
+
"text": "In the inference, given one query image and the learned prompts, we first obtain the a visual feature set containing $M = H \\times W$ vectors and a prompt feature set containing $N \\times C$ vectors. Then, we calculate the distance between the visual feature set and the prompt feature set of each class by $O I ^ { \\prime }$ as (6). After obtaining the OT distance for each class, we sort the distance and classify the image. ",
|
| 623 |
+
"bbox": [
|
| 624 |
+
176,
|
| 625 |
+
383,
|
| 626 |
+
825,
|
| 627 |
+
439
|
| 628 |
+
],
|
| 629 |
+
"page_idx": 4
|
| 630 |
+
},
|
| 631 |
+
{
|
| 632 |
+
"type": "text",
|
| 633 |
+
"text": "4 Experiments ",
|
| 634 |
+
"text_level": 1,
|
| 635 |
+
"bbox": [
|
| 636 |
+
174,
|
| 637 |
+
445,
|
| 638 |
+
312,
|
| 639 |
+
463
|
| 640 |
+
],
|
| 641 |
+
"page_idx": 4
|
| 642 |
+
},
|
| 643 |
+
{
|
| 644 |
+
"type": "text",
|
| 645 |
+
"text": "Extensive experiments are conducted to evaluate our method, including comparison with CoOp, ablation studies, parameter analysis extensibility analysis, computing cost analysis and visualization. ",
|
| 646 |
+
"bbox": [
|
| 647 |
+
176,
|
| 648 |
+
470,
|
| 649 |
+
825,
|
| 650 |
+
500
|
| 651 |
+
],
|
| 652 |
+
"page_idx": 4
|
| 653 |
+
},
|
| 654 |
+
{
|
| 655 |
+
"type": "text",
|
| 656 |
+
"text": "4.1 Datasets ",
|
| 657 |
+
"text_level": 1,
|
| 658 |
+
"bbox": [
|
| 659 |
+
173,
|
| 660 |
+
510,
|
| 661 |
+
271,
|
| 662 |
+
523
|
| 663 |
+
],
|
| 664 |
+
"page_idx": 4
|
| 665 |
+
},
|
| 666 |
+
{
|
| 667 |
+
"type": "text",
|
| 668 |
+
"text": "We followed the experimental settings in the CoOp [63] for the few-shot learning evaluation. The experiments are conducted on the 11 visual recognition datasets, including Caltech101 [9], DTD [5], EuroSAT [12], FGVCAircraft [29], Flowers102 [32], Food101 [3], ImageNet [7], OxfordPets [33], StanfordCars [21], SUN397 [55], and UCF101 [47]. These datasets span visual classification of generic objects, scenes, actions, fine-grained categories, and so on, which constitutes a comprehensive evaluation of our method. All experiments adopted the few-shot evaluation protocol used in CLIP [39] and CoOp [63], where we respectively choose 1, 2, 4, 8, and 16 shots for model training and use the original test set for evaluation. Besides, we also evaluated the robustness of our method with domain shift. Following $\\mathrm { C o O p }$ , we used the ImageNet as the source domain and evaluate our method with ImageNet-based robustness evaluation datasets including ImageNetV2 [43], ImageNet-Sketch [52], ImageNet-A [14], and ImageNet-R [13]. A detailed introduction of each dataset can be found in the supplementary materials. ",
|
| 669 |
+
"bbox": [
|
| 670 |
+
173,
|
| 671 |
+
530,
|
| 672 |
+
825,
|
| 673 |
+
694
|
| 674 |
+
],
|
| 675 |
+
"page_idx": 4
|
| 676 |
+
},
|
| 677 |
+
{
|
| 678 |
+
"type": "text",
|
| 679 |
+
"text": "4.2 Implementation details ",
|
| 680 |
+
"text_level": 1,
|
| 681 |
+
"bbox": [
|
| 682 |
+
171,
|
| 683 |
+
705,
|
| 684 |
+
374,
|
| 685 |
+
719
|
| 686 |
+
],
|
| 687 |
+
"page_idx": 4
|
| 688 |
+
},
|
| 689 |
+
{
|
| 690 |
+
"type": "text",
|
| 691 |
+
"text": "We chose CoOp [63] as our main competitor to evaluate our method. Compared with CoOp which only learns a global prompt for one class, our PLOT method learns multiple local prompts and applies the OT distance for better fine-grained alignment. Besides, we also reported the performance of training a linear classifier with the CLIP [39] features. It is also a widely-used strategy to adapt the pretrained knowledge for the downstream task [46]. We reproduced the performance of CoOp and the CLIP linear probe with the released official code. ",
|
| 692 |
+
"bbox": [
|
| 693 |
+
171,
|
| 694 |
+
724,
|
| 695 |
+
825,
|
| 696 |
+
808
|
| 697 |
+
],
|
| 698 |
+
"page_idx": 4
|
| 699 |
+
},
|
| 700 |
+
{
|
| 701 |
+
"type": "text",
|
| 702 |
+
"text": "The original CoOp method has different versions with different class token positions and parameter initialization strategies. We applied the default model that fixes the class token positions in the end due to the limited performance gap between two different ways of positioning the class token. Besides, we used the random parameter initialization strategy but not the class-specific context version. Following the widely used setting in [63, 64, 10, 58], we also chose RN50 [11] as the backbone network of the visual branch and set the length of learnable context tokens as 16. All the code of our method is based on $\\mathrm { C o O p }$ , which adopted the SGD optimizer with 0.002 initial learning rate, CosineAnnealingLR ",
|
| 703 |
+
"bbox": [
|
| 704 |
+
166,
|
| 705 |
+
814,
|
| 706 |
+
823,
|
| 707 |
+
911
|
| 708 |
+
],
|
| 709 |
+
"page_idx": 4
|
| 710 |
+
},
|
| 711 |
+
{
|
| 712 |
+
"type": "image",
|
| 713 |
+
"img_path": "images/b84a44759120ceaf7528f443ecdfaf977c2ef9f4d71ac238fa7ff5b4bd56af7f.jpg",
|
| 714 |
+
"image_caption": [
|
| 715 |
+
"Figure 3: The few-shot learning results on 11 datasets. We compare our PLOT with CoOp, $C o C o O p$ , and the Linear Probe method and observe the consistent and significant performance improvement on most datasets. (The average accuracy on all datasets is shown on the left top.) Table 1: Comparison with $\\mathrm { C o O p }$ on robustness to domain shift. "
|
| 716 |
+
],
|
| 717 |
+
"image_footnote": [],
|
| 718 |
+
"bbox": [
|
| 719 |
+
236,
|
| 720 |
+
88,
|
| 721 |
+
758,
|
| 722 |
+
383
|
| 723 |
+
],
|
| 724 |
+
"page_idx": 5
|
| 725 |
+
},
|
| 726 |
+
{
|
| 727 |
+
"type": "table",
|
| 728 |
+
"img_path": "images/ad9a968b12ebbcd690b8921b975defd61d74f50a3f4280bcb20005ccca264689.jpg",
|
| 729 |
+
"table_caption": [],
|
| 730 |
+
"table_footnote": [],
|
| 731 |
+
"table_body": "<table><tr><td rowspan=\"3\">Method</td><td>Source</td><td colspan=\"4\">Target</td></tr><tr><td>ImageNet</td><td>-V2</td><td>-Sketch</td><td>-A</td><td>-R</td></tr><tr><td>CLIP +CoOp</td><td>61.91</td><td>54.26</td><td>32.47</td><td>21.78</td><td>54.21</td></tr><tr><td>CLIP + PLOT (N =4)</td><td>63.01</td><td>55.11</td><td>33.00</td><td>21.86</td><td>55.61</td></tr></table>",
|
| 732 |
+
"bbox": [
|
| 733 |
+
238,
|
| 734 |
+
454,
|
| 735 |
+
754,
|
| 736 |
+
527
|
| 737 |
+
],
|
| 738 |
+
"page_idx": 5
|
| 739 |
+
},
|
| 740 |
+
{
|
| 741 |
+
"type": "text",
|
| 742 |
+
"text": "212 schedule, and a warmup trick with 1e-5 learning rate. Besides, we also followed the epoch strategy to \n213 train more epochs for more shots. ",
|
| 743 |
+
"bbox": [
|
| 744 |
+
147,
|
| 745 |
+
535,
|
| 746 |
+
828,
|
| 747 |
+
563
|
| 748 |
+
],
|
| 749 |
+
"page_idx": 5
|
| 750 |
+
},
|
| 751 |
+
{
|
| 752 |
+
"type": "text",
|
| 753 |
+
"text": "We apply $N = 4$ prompts for each category and use $M = 7 \\times 7$ due to the feature map size. We set the hyper-parameters in the Sinkhorn distances algorithm [6] as $\\lambda = 0 . 1$ for all the datasets. We set the maximum iteration number of the inner loop as 100 and will early stop the iteration when the average absolute update value $\\Lambda < 0 . 0 1$ . We initialize all values in the vector $v$ and $\\mu$ as $1 / N$ and $1 / M$ respectively. All models are conducted on the Pytorch [34] 1.7.1 and trained on 4 NVIDIA A100 GPUs. We repeated the experiments three times with different seeds and reported the average. ",
|
| 754 |
+
"bbox": [
|
| 755 |
+
171,
|
| 756 |
+
569,
|
| 757 |
+
825,
|
| 758 |
+
652
|
| 759 |
+
],
|
| 760 |
+
"page_idx": 5
|
| 761 |
+
},
|
| 762 |
+
{
|
| 763 |
+
"type": "text",
|
| 764 |
+
"text": "4.3 Comparison With CoOp ",
|
| 765 |
+
"text_level": 1,
|
| 766 |
+
"bbox": [
|
| 767 |
+
174,
|
| 768 |
+
664,
|
| 769 |
+
383,
|
| 770 |
+
679
|
| 771 |
+
],
|
| 772 |
+
"page_idx": 5
|
| 773 |
+
},
|
| 774 |
+
{
|
| 775 |
+
"type": "text",
|
| 776 |
+
"text": "In this subsection, we compare our PLOT with the baseline CoOp on the few-shot recognition and domain generalization tasks. ",
|
| 777 |
+
"bbox": [
|
| 778 |
+
168,
|
| 779 |
+
683,
|
| 780 |
+
821,
|
| 781 |
+
712
|
| 782 |
+
],
|
| 783 |
+
"page_idx": 5
|
| 784 |
+
},
|
| 785 |
+
{
|
| 786 |
+
"type": "text",
|
| 787 |
+
"text": "Few-Shot Learning We summarized the experimental results in Figure 3 where the red line denotes our PLOT method, the blue one denotes CoOp, the purple line denotes CoCoOp, and the green one is the CLIP linear probe. The detailed accuracy can be found in the supplementary materials. We observed that both prompt learning methods (PLOT and $\\mathrm { C o O p } )$ ) outperform the linear probe method by a large margin. Besides, PLOT can further improve the performance of $\\mathrm { C o O p }$ and CoCoOp on most of the datasets. Taking the average accuracy (at the left top) as the example, Plot respectively gained $3 . 0 3 \\%$ , $3 . 4 5 \\%$ , $2 . 1 3 \\%$ , $1 . 3 8 \\%$ , $\\bar { 0 . 6 1 \\% }$ performance boost over $\\mathrm { C o O p }$ at 1, 2, 4, 8, 16 shots. We found the performance gap will reduce when shots increase. It is not surprising since both CoOp and PLOT focus on utilizing the pre-trained knowledge, and the effect of pre-training diminishes given more training data. Among all datasets, PLOT achieves a larger improvement over $\\mathrm { C o O p }$ o n the FOOD101 and DTD datasets and achieves comparable performance only on the StanfordCars datasets. For the FGVCAircraft dataset in which the CoOp only obtains $7 . 7 7 \\%$ accuracy, our PLOT can achieve an accuracy of $1 7 . 7 9 \\%$ , twice as high as that of the CoOp. Note that we don’t use the class-specific context, thus the performance on the fine-grained classification datasets is lower, e.g. ",
|
| 788 |
+
"bbox": [
|
| 789 |
+
171,
|
| 790 |
+
718,
|
| 791 |
+
825,
|
| 792 |
+
911
|
| 793 |
+
],
|
| 794 |
+
"page_idx": 5
|
| 795 |
+
},
|
| 796 |
+
{
|
| 797 |
+
"type": "table",
|
| 798 |
+
"img_path": "images/8e2f3b54076261a0efde38b51ee912af6f609a379b1c2d0c1238c2a4cee06d6e.jpg",
|
| 799 |
+
"table_caption": [
|
| 800 |
+
"Table 2: Ablation studies on few-shot recognition. PLOT is our defined model with $N = 4$ , $C o O p$ is the baseline method, M denotes that we respectively match the global visual feature and multiple textual prompts, V denotes that we apply a constraint to add the variance of prompts, M indicates using the visual feature map instead of the global visual feature. "
|
| 801 |
+
],
|
| 802 |
+
"table_footnote": [],
|
| 803 |
+
"table_body": "<table><tr><td>Dataset</td><td>Settings</td><td>1 shot</td><td>2 shots</td><td>4 shots</td><td>8 shots</td><td>16 shots</td></tr><tr><td rowspan=\"5\">Caltech101</td><td>PLOT CoOp</td><td>89.83±0.339 87.51 ± 1.02</td><td>90.67 ±0.21 87.84 ±1.10</td><td>90.80±0.20 89.52 ±0.80</td><td>91.54 ± 0.33 90.28±0.42</td><td>92.24±0.38 91.99 ± 0.31</td></tr><tr><td>G</td><td>88.13 ±0.36</td><td>86.98 ± 1.25</td><td>88.45 ± 0.79</td><td>90.16 ± 0.22</td><td>90.72 ±0.18</td></tr><tr><td>G+V</td><td>88.28 ± 0.43</td><td>87.72 ± 1.25</td><td></td><td></td><td></td></tr><tr><td>M</td><td></td><td></td><td>88.45 ± 0.30</td><td>89.82 ±0.20</td><td>92.00 ± 0.13</td></tr><tr><td>M+V</td><td>69.78 ± 1.75 66.11 ± 8.29</td><td>71.57 ± 1.59</td><td>77.18 ± 2.16</td><td>81.77 ± 0.47</td><td>86.21±0.20</td></tr><tr><td rowspan=\"6\">DTD</td><td>PLOT</td><td></td><td>71.45 ± 3.98</td><td>79.30 ± 3.96</td><td>86.96 ± 0.78</td><td>89.80 ±0.17</td></tr><tr><td></td><td>46.55 ± 2.62</td><td>51.24±1.95</td><td>56.03±0.43</td><td>61.70 ± 0.35</td><td>65.60 ± 0.82</td></tr><tr><td>CoOp</td><td>43.62 ±1.96</td><td>45.35 ± 0.31</td><td>53.94 ±1.37</td><td>59.69 ± 0.13</td><td>62.51±0.25</td></tr><tr><td>G</td><td>45.12 ± 1.69</td><td>48.39 ± 2.08</td><td>54.75 ± 0.48</td><td>60.15 ± 0.70</td><td>63.59 ±0.76</td></tr><tr><td>G+V M</td><td>45.90 ± 2.00</td><td>48.50 ± 0.99</td><td>53.96 ± 0.48</td><td>59.69 ± 1.01</td><td>63.51 ± 0.66</td></tr><tr><td>M+V</td><td>13.18 ± 4.57 12.61 ± 5.93</td><td>12.25 ± 3.86 15.11 ± 1.81</td><td>13.00 ± 4.73 20.35 ± 1.33</td><td>20.76 ± 5.42</td><td>26.99 ±1.98</td></tr><tr><td rowspan=\"6\">FOOD101</td><td>PLOT</td><td>77.74 ± 0.47</td><td></td><td></td><td>44.13 ± 2.39</td><td>56.85 ± 0.54</td></tr><tr><td>CoOp</td><td></td><td>77.70±0.02</td><td>77.21 ±0.43</td><td>75.31 ± 0.30</td><td>77.09 ±0.18</td></tr><tr><td>G</td><td>74.25 ±1.52</td><td>72.61 ± 1.33</td><td>73.49 ± 2.03</td><td>71.58 ± 0.79</td><td>74.48 ± 0.15</td></tr><tr><td>G+V</td><td>74.63 ± 0.11</td><td>70.15 ±0.49</td><td>70.41 ± 0.46</td><td>70.72 ± 0.98</td><td>73.68 ±0.46</td></tr><tr><td>M</td><td>74.83 ± 0.31</td><td>70.09 ± 0.85</td><td>70.86 ± 0.22 46.86 ±1.39</td><td>70.80 ± 0.68</td><td>73.93 ± 0.35</td></tr><tr><td>M+V</td><td>52.02 ± 4.86 46.52 ± 1.15</td><td>46.12 ±1.46 45.95 ± 2.66</td><td>53.57 ± 0.83</td><td>53.43 ± 0.88 62.95 ± 0.37</td><td>61.28 ± 0.23 67.63 ± 1.11</td></tr></table>",
|
| 804 |
+
"bbox": [
|
| 805 |
+
178,
|
| 806 |
+
146,
|
| 807 |
+
818,
|
| 808 |
+
415
|
| 809 |
+
],
|
| 810 |
+
"page_idx": 6
|
| 811 |
+
},
|
| 812 |
+
{
|
| 813 |
+
"type": "table",
|
| 814 |
+
"img_path": "images/175945c0adcf1cea5984dc8234b713556bd59f73786a8530a581c7d73fc19c48.jpg",
|
| 815 |
+
"table_caption": [
|
| 816 |
+
"Table 3: Parameter analysis for the number of prompts "
|
| 817 |
+
],
|
| 818 |
+
"table_footnote": [],
|
| 819 |
+
"table_body": "<table><tr><td>Dataset</td><td>Settings</td><td>1 shot</td><td>2 shots</td><td>4 shots</td><td>8 shots</td><td>16 shots</td></tr><tr><td rowspan=\"4\">Caltech101</td><td>N=1</td><td>88.47 ± 1.15</td><td>89.19 ± 0.39</td><td>89.70 ±0.38</td><td>90.45 ± 0.24</td><td>91.56 ± 0.14</td></tr><tr><td>N=2</td><td>88.86 ± 0.51</td><td>89.60 ±0.10</td><td>90.60 ± 0.17</td><td>91.25 ±0.65</td><td>91.89 ± 0.36</td></tr><tr><td>N=4</td><td>89.83 ± 0.33</td><td>90.67 ± 0.21</td><td>90.80±0.20</td><td>91.54 ± 0.33</td><td>92.24±0.38</td></tr><tr><td>N=8</td><td>89.74± 0.30</td><td>90.18 ± 0.46</td><td>91.02 ± 0.18</td><td>91.28 ±0.28</td><td>92.04 ±0.29</td></tr><tr><td rowspan=\"4\">DTD</td><td>N=1</td><td>43.91 ± 0.65</td><td>48.21 ± 2.20</td><td>53.69 ± 1.10</td><td>58.90 ±0.19</td><td>62.85 ± 0.74</td></tr><tr><td>N=2</td><td>45.59 ± 2.46</td><td>48.06 ±1.92</td><td>55.58 ± 1.71</td><td>61.56± 0.17</td><td>64.60 ±0.92</td></tr><tr><td>N=4</td><td>46.55 ± 2.62</td><td>51.24 ± 1.95</td><td>56.03 ± 0.43</td><td>61.70 ± 0.35</td><td>65.60 ± 0.82</td></tr><tr><td>N=8</td><td>46.89 ±1.94</td><td>51.87 ± 2.06</td><td>54.45 ± 0.48</td><td>62.20 ±0.56</td><td>65.25± 0.38</td></tr><tr><td rowspan=\"4\">FOOD101</td><td>N=1</td><td>75.96 ± 0.48</td><td>76.12 ± 0.59</td><td>77.11 ± 0.41</td><td>76.56 ± 0.69</td><td>77.43 ± 0.80</td></tr><tr><td>N=2</td><td>77.12 ± 0.49</td><td>76.89 ± 0.23</td><td>76.16 ± 0.52</td><td>75.23 ± 0.69</td><td>76.81± 0.50</td></tr><tr><td>N=4</td><td>77.74±0.47</td><td>77.70±0.02</td><td>77.21 ± 0.43</td><td>75.31 ± 0.30</td><td>77.09 ±0.18</td></tr><tr><td>N=8</td><td>78.05 ± 0.15</td><td>78.19±0.07</td><td>78.12 ±0.17</td><td>76.63 ±0.22</td><td>77.48 ± 0.12</td></tr></table>",
|
| 820 |
+
"bbox": [
|
| 821 |
+
178,
|
| 822 |
+
440,
|
| 823 |
+
818,
|
| 824 |
+
632
|
| 825 |
+
],
|
| 826 |
+
"page_idx": 6
|
| 827 |
+
},
|
| 828 |
+
{
|
| 829 |
+
"type": "text",
|
| 830 |
+
"text": "the performance of both $\\mathrm { C o O p }$ and PLOT without class-specific context is lower than the linear probing on FGVCAircraft. All these performance comparisons can serve as experimental evidence to demonstrate that multiple local prompts and optimal transport distance facilitate the prompt learning of vision-language models. On StanfordCar, learning multiple prompts didn’t significantly improve the performance over a single prompt. It may be because the discriminative characters in this dataset coincide with each other, such that one global prompt and one global visual feature can work well. ",
|
| 831 |
+
"bbox": [
|
| 832 |
+
173,
|
| 833 |
+
642,
|
| 834 |
+
825,
|
| 835 |
+
727
|
| 836 |
+
],
|
| 837 |
+
"page_idx": 6
|
| 838 |
+
},
|
| 839 |
+
{
|
| 840 |
+
"type": "text",
|
| 841 |
+
"text": "Domain generalization The robustness also plays a critical role in model applications since the real-world environment may have large domain shifts with the training data. Therefore, we conducted a robustness evaluation to investigate the transferability of models learned by PLOT. ",
|
| 842 |
+
"bbox": [
|
| 843 |
+
174,
|
| 844 |
+
732,
|
| 845 |
+
825,
|
| 846 |
+
775
|
| 847 |
+
],
|
| 848 |
+
"page_idx": 6
|
| 849 |
+
},
|
| 850 |
+
{
|
| 851 |
+
"type": "text",
|
| 852 |
+
"text": "Table 1 summarizes the results of our PLOT method and CoOp on four ImageNet-based robustness evaluation datasets. For both methods, we trained the models on ImageNet with 16 shots per class. For PLOT, we set the number of prompts as $N = 4$ . We can observe that PLOT outperforms CoOp consistently on both source and target domains. These experimental results demonstrate that the performance improvement of our learning multiple prompts doesn’t rely on single-domain overfitting. ",
|
| 853 |
+
"bbox": [
|
| 854 |
+
174,
|
| 855 |
+
780,
|
| 856 |
+
825,
|
| 857 |
+
851
|
| 858 |
+
],
|
| 859 |
+
"page_idx": 6
|
| 860 |
+
},
|
| 861 |
+
{
|
| 862 |
+
"type": "text",
|
| 863 |
+
"text": "4.4 Ablation Studies and More Analysis ",
|
| 864 |
+
"text_level": 1,
|
| 865 |
+
"bbox": [
|
| 866 |
+
165,
|
| 867 |
+
863,
|
| 868 |
+
464,
|
| 869 |
+
877
|
| 870 |
+
],
|
| 871 |
+
"page_idx": 6
|
| 872 |
+
},
|
| 873 |
+
{
|
| 874 |
+
"type": "text",
|
| 875 |
+
"text": "252 In this subsection, we conducted the ablation studies to investigate the effectiveness of different \n253 components, in order to answer the following questions. ",
|
| 876 |
+
"bbox": [
|
| 877 |
+
147,
|
| 878 |
+
883,
|
| 879 |
+
825,
|
| 880 |
+
911
|
| 881 |
+
],
|
| 882 |
+
"page_idx": 6
|
| 883 |
+
},
|
| 884 |
+
{
|
| 885 |
+
"type": "text",
|
| 886 |
+
"text": "Q: Can we directly learn multiple prompts by respectively matching each prompt with the global visual feature? A: No. As shown in Table 2, we report the performance of directly matching the global visual feature (notated as “G”) and compare it with the baseline CoOp and our PLOT on three datasets including Caltech101, DTD, and FOOD101. We observe that there is no improvement over the baseline on some datasets (such as Caltech101 and FOOD101) if we only directly match prompts and global features. Though “G” obtained the improvement on the DTD dataset, this improvement is still less than that of PLOT. It is because this “G” method is incentivized to learn the indistinguishable prompts, which contradicts our purpose to learn multiple comprehensive prompts. We further add some constraints to push away the prompt from each other. For example, we add an objective function to add the distance between every two prompts as a regularization term, which is notated as “V”. However, comparing “G” and $\\mathrm { ^ { 6 6 } G + V ^ { 5 } }$ , we do not find significant and consistent improvement when using variance loss. ",
|
| 887 |
+
"bbox": [
|
| 888 |
+
142,
|
| 889 |
+
92,
|
| 890 |
+
825,
|
| 891 |
+
257
|
| 892 |
+
],
|
| 893 |
+
"page_idx": 7
|
| 894 |
+
},
|
| 895 |
+
{
|
| 896 |
+
"type": "text",
|
| 897 |
+
"text": "Q: Does the improvement mainly come from using all feature maps? A: No. In PLOT, we apply all feature maps of the visual encoder branch, where each feature is a local embedding at one spatial position. Compared with the global feature, these local features are more informative and contain fine-grained clues. However, we demonstrate that the improvement of PLOT does not only rely on using all feature maps. On the contrary, directly using the feature map to replace the global feature causes a large performance drop. For example, on all three datasets, directly using the feature map (“M” or $\\mathbf { \\hat { \\mu } ^ { 6 } M + V } ^ { 5 } )$ has an around $2 0 \\%$ 1 shot accuracy drop over using the global visual feature. It is not surprising since the original CLIP model is trained by matching the global visual feature and language feature. Without using the OT method, the distance between the feature map and multiple textual prompts degenerates to the mean distance of each feature-prompt pair. Besides, when using the feature map, adding the variance loss works well, especially for more shots. For example, the accuracy on 16 shots DTD is improved by a large margin (from 26.99 to 56.85). ",
|
| 898 |
+
"bbox": [
|
| 899 |
+
169,
|
| 900 |
+
263,
|
| 901 |
+
825,
|
| 902 |
+
429
|
| 903 |
+
],
|
| 904 |
+
"page_idx": 7
|
| 905 |
+
},
|
| 906 |
+
{
|
| 907 |
+
"type": "text",
|
| 908 |
+
"text": "Q: How many prompts are needed? A: 4 prompts are enough One important hyper-parameter in PLOT is the number of prompts. To analyze the effect of the number of prompts, we conducted the experiments on three datasets with 1, 2, 4, 8 prompts. The results are summarized in the white part of Table 3. We can observe that the performance obviously increases when adding the number of prompts from 1 to 4. For example, PLOT $\\left( \\mathrm { N } { = } 4 \\right)$ respectively obtains $1 . 3 6 \\%$ , $2 . 6 4 \\%$ , and $1 . 6 8 \\%$ 1-shot accuracy improvement over PLOT $\\left( \\mathrm { N } { = } 1 \\right)$ ) on three datasets. Besides, when we further increase the number of prompts, the improvement is not consistent. To balance the improvement and cost, we set $N = 4$ as the default configuration of our PLOT model. In the experiments, we tuned this hyper-parameter on the Caltech101 dataset and applied it to other datasets. ",
|
| 909 |
+
"bbox": [
|
| 910 |
+
173,
|
| 911 |
+
435,
|
| 912 |
+
825,
|
| 913 |
+
560
|
| 914 |
+
],
|
| 915 |
+
"page_idx": 7
|
| 916 |
+
},
|
| 917 |
+
{
|
| 918 |
+
"type": "text",
|
| 919 |
+
"text": "Q: Can PLOT benefit zero-shot learning? A: No. CLIP [39] shows that manually designing the prompts can still achieve good performance. We obtain 7 prompts by prompt engineering on the ImageNet dataset and can further ensemble them to obtain ${ \\bf 6 0 . 3 8 \\% }$ top 1 accuracy. In this section, we replace the cosine distance between the global visual feature and prompt ensemble with the OT distance between the feature map and all 7 prompts. However, without any learning, the OT distance only obtains ${ \\bf 5 8 . 7 8 \\% }$ accuracy. It is a limitation of the PLOT to still need few-shot data for optimization, which cannot be directly applied in the zero-shot setting. We argue there are two reasons why the OT distance does not work without learning: 1) prompt engineering selects prompts based on the global feature and cosine distance, instead of OT distance with feature map; 2) all these selected prompts are closed to the global feature and lack the complementarity. ",
|
| 920 |
+
"bbox": [
|
| 921 |
+
173,
|
| 922 |
+
566,
|
| 923 |
+
825,
|
| 924 |
+
705
|
| 925 |
+
],
|
| 926 |
+
"page_idx": 7
|
| 927 |
+
},
|
| 928 |
+
{
|
| 929 |
+
"type": "text",
|
| 930 |
+
"text": "Q: Can PLOT benefit Adapter-based methods? A: Yes. Adapter-based methods [10, 58] is another research direction of the efficient adaptation of pre-trained vision-language models. Different from the prompt learning that fixes the model parameters and tunes the language prompt, adapter-based methods [10, 58] allow for fine-tuning a part of the network or adding an extra model for training. Recently, adapter-based methods also achieve good performance on few-shot visual recognition. Therefore, we want to explore whether our PLOT method can benefit them, and how. ",
|
| 931 |
+
"bbox": [
|
| 932 |
+
165,
|
| 933 |
+
712,
|
| 934 |
+
825,
|
| 935 |
+
795
|
| 936 |
+
],
|
| 937 |
+
"page_idx": 7
|
| 938 |
+
},
|
| 939 |
+
{
|
| 940 |
+
"type": "text",
|
| 941 |
+
"text": "We apply the Tip-adapter-F [58] as our baseline method, which learns a $L i n e a r ( d , N _ { c l s } \\times K _ { s h o t s } )$ model to describe one image by the similarity with all training samples, where $d$ is the dimension of visual feature, $N _ { c l s }$ is the number of categories (e.g. 1000 in ImageNet), and $K _ { s h o t s }$ is the number of shots. Then, the final similarity consists of the original distance between the visual feature and prompt ensembling and the new distance calculated by the learned feature and one-hot vector of labels (whose dimension is $( N _ { c l s } \\times K _ { s h o t s } , N _ { c l s } ) )$ . Please find details in Tip-adapter-F [58]. To introduce PLOT to this framework, we first used the feature map to replace the global feature and ",
|
| 942 |
+
"bbox": [
|
| 943 |
+
166,
|
| 944 |
+
801,
|
| 945 |
+
825,
|
| 946 |
+
897
|
| 947 |
+
],
|
| 948 |
+
"page_idx": 7
|
| 949 |
+
},
|
| 950 |
+
{
|
| 951 |
+
"type": "image",
|
| 952 |
+
"img_path": "images/08d9b7cffd3a033b270221f27d732b125692e3a6c258dfa9ae21f128c885ad2a.jpg",
|
| 953 |
+
"image_caption": [
|
| 954 |
+
"Figure 4: Visualizations. We provide the heatmaps of transport plan $_ { \\mathbf { \\delta T } }$ related to each prompt on 4 categories in ImageNet. Different transport plans focus on different attributes of the object. "
|
| 955 |
+
],
|
| 956 |
+
"image_footnote": [],
|
| 957 |
+
"bbox": [
|
| 958 |
+
246,
|
| 959 |
+
87,
|
| 960 |
+
750,
|
| 961 |
+
328
|
| 962 |
+
],
|
| 963 |
+
"page_idx": 8
|
| 964 |
+
},
|
| 965 |
+
{
|
| 966 |
+
"type": "table",
|
| 967 |
+
"img_path": "images/de24cecf6f2b11aa55bbb44a1ece49407beb0e3e244dcc2dd699e21b180385f7.jpg",
|
| 968 |
+
"table_caption": [
|
| 969 |
+
"Table 4: Comparison with Adapter-based method. "
|
| 970 |
+
],
|
| 971 |
+
"table_footnote": [],
|
| 972 |
+
"table_body": "<table><tr><td>Dataset</td><td>Methods</td><td>1 shot</td><td>2 shots</td><td>4 shots</td><td>8 shots</td><td>16 shots</td></tr><tr><td rowspan=\"3\">ImageNet</td><td>Tip-Adapter-F</td><td>61.32</td><td>61.69</td><td>62.52</td><td>64.00</td><td>65.51</td></tr><tr><td>Tip-Adapter-F+ OT</td><td>61.44</td><td>61.98</td><td>62.86</td><td>64.13</td><td>65.76</td></tr><tr><td>Tip-Adapter-F +PLOT</td><td>62.27</td><td>64.31</td><td>63.89</td><td>65.04</td><td>66.17</td></tr></table>",
|
| 973 |
+
"bbox": [
|
| 974 |
+
191,
|
| 975 |
+
382,
|
| 976 |
+
803,
|
| 977 |
+
448
|
| 978 |
+
],
|
| 979 |
+
"page_idx": 8
|
| 980 |
+
},
|
| 981 |
+
{
|
| 982 |
+
"type": "text",
|
| 983 |
+
"text": "310 then learned multiple linear models. As a result, with different local features and different linear \n311 models, we can obtain a $M \\times N$ distance matrix and apply the Sinkhorn algorithm [6] to calculate \n312 the OT distance. Furthermore, we can apply the learned prompts as co-partner of the ensembling \n313 prompt to refine the final similarity. ",
|
| 984 |
+
"bbox": [
|
| 985 |
+
143,
|
| 986 |
+
454,
|
| 987 |
+
823,
|
| 988 |
+
510
|
| 989 |
+
],
|
| 990 |
+
"page_idx": 8
|
| 991 |
+
},
|
| 992 |
+
{
|
| 993 |
+
"type": "text",
|
| 994 |
+
"text": "Table 4 summarizes the few-shot recognition results of the original Tip-Adapter-F method and our adapter-based PLOT methods on ImageNet. From this table, We observe that using the OT distance can improve the performance of the adapter-based method. Using the learned prompts, we can further promote the accuracy of all settings. ",
|
| 995 |
+
"bbox": [
|
| 996 |
+
173,
|
| 997 |
+
516,
|
| 998 |
+
825,
|
| 999 |
+
571
|
| 1000 |
+
],
|
| 1001 |
+
"page_idx": 8
|
| 1002 |
+
},
|
| 1003 |
+
{
|
| 1004 |
+
"type": "text",
|
| 1005 |
+
"text": "Q: What is the extra computation time cost of PLOT over CoOp baseline? A: Around $\\mathbf { 1 0 \\% }$ inference speed and ${ \\bf 5 \\% }$ training time. Despite the performance improvement, the extra computation cost is still a limitation of PLOT. Please see the detailed analysis in the supplementary materials. ",
|
| 1006 |
+
"bbox": [
|
| 1007 |
+
169,
|
| 1008 |
+
578,
|
| 1009 |
+
823,
|
| 1010 |
+
621
|
| 1011 |
+
],
|
| 1012 |
+
"page_idx": 8
|
| 1013 |
+
},
|
| 1014 |
+
{
|
| 1015 |
+
"type": "text",
|
| 1016 |
+
"text": "4.5 Visualization ",
|
| 1017 |
+
"text_level": 1,
|
| 1018 |
+
"bbox": [
|
| 1019 |
+
173,
|
| 1020 |
+
636,
|
| 1021 |
+
303,
|
| 1022 |
+
650
|
| 1023 |
+
],
|
| 1024 |
+
"page_idx": 8
|
| 1025 |
+
},
|
| 1026 |
+
{
|
| 1027 |
+
"type": "text",
|
| 1028 |
+
"text": "In this subsection, we provide some visualization examples of the transport plans $_ { \\mathbf { T } }$ related to different prompts $\\left( \\mathrm { N } { = } 4 \\right)$ ). We translate each transport plan into colorful heatmaps and resize them into their original size and combine them with the raw image. As shown in Figure 4, we provide the heatmaps of 4 categories in ImageNet. We observe that different transport plans highlight different regions of the image, which demonstrates that the learned multiple prompts are complementary. For the class “Brambling”, the prompts respectively focus on the head, tail, wing, and environment. For “Dog Sled”, the prompts are related to dogs, the sled, some ties, and the snow environment. ",
|
| 1029 |
+
"bbox": [
|
| 1030 |
+
173,
|
| 1031 |
+
656,
|
| 1032 |
+
825,
|
| 1033 |
+
753
|
| 1034 |
+
],
|
| 1035 |
+
"page_idx": 8
|
| 1036 |
+
},
|
| 1037 |
+
{
|
| 1038 |
+
"type": "text",
|
| 1039 |
+
"text": "5 Conclusion ",
|
| 1040 |
+
"text_level": 1,
|
| 1041 |
+
"bbox": [
|
| 1042 |
+
171,
|
| 1043 |
+
772,
|
| 1044 |
+
299,
|
| 1045 |
+
789
|
| 1046 |
+
],
|
| 1047 |
+
"page_idx": 8
|
| 1048 |
+
},
|
| 1049 |
+
{
|
| 1050 |
+
"type": "text",
|
| 1051 |
+
"text": "In this paper, we present a method, named PLOT, to learn multiple comprehensive prompts to describe diverse characteristics of one category. To avoid convergence to one point, we propose to apply the optimal transport to achieve the fine-grained alignment between both vision and language domains. We apply a two-stage optimization strategy where the inner loop fixes the prompts and learns the transport plan to calculate the cross-modality distance, and the outer loop uses this distance to optimize the prompt learner. We build our method on the base of CoOp and achieve significant improvement on the few-shot recognition task in various datasets, which demonstrates the advantage to learn multiple prompts instead of a single one. ",
|
| 1052 |
+
"bbox": [
|
| 1053 |
+
173,
|
| 1054 |
+
800,
|
| 1055 |
+
825,
|
| 1056 |
+
911
|
| 1057 |
+
],
|
| 1058 |
+
"page_idx": 8
|
| 1059 |
+
},
|
| 1060 |
+
{
|
| 1061 |
+
"type": "text",
|
| 1062 |
+
"text": "References ",
|
| 1063 |
+
"text_level": 1,
|
| 1064 |
+
"bbox": [
|
| 1065 |
+
145,
|
| 1066 |
+
90,
|
| 1067 |
+
267,
|
| 1068 |
+
106
|
| 1069 |
+
],
|
| 1070 |
+
"page_idx": 9
|
| 1071 |
+
},
|
| 1072 |
+
{
|
| 1073 |
+
"type": "text",
|
| 1074 |
+
"text": "[1] Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In ICML, pages 214–223, 2017. \n[2] Emmanuel Boissard, Thibaut Le Gouic, and Jean-Michel Loubes. Distribution’s template estimate with wasserstein metrics. Bernoulli, 21(2):740–759, 2015. \n[3] Lukas Bossard, Matthieu Guillaumin, and Luc Van Gool. Food-101–mining discriminative components with random forests. In ECCV, pages 446–461, 2014. \n[4] Liqun Chen, Yizhe Zhang, Ruiyi Zhang, Chenyang Tao, Zhe Gan, Haichao Zhang, Bai Li, Dinghan Shen, Changyou Chen, and Lawrence Carin. Improving sequence-to-sequence learning via optimal transport. arXiv preprint arXiv:1901.06283, 2019. \n[5] Mircea Cimpoi, Subhransu Maji, Iasonas Kokkinos, Sammy Mohamed, and Andrea Vedaldi. Describing textures in the wild. In CVPR, pages 3606–3613, 2014. \n[6] Marco Cuturi. Sinkhorn distances: lightspeed computation of optimal transport. In NeurIPS, volume 2, page 4, 2013. \n[7] Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In CVPR, pages 248–255, 2009. \n[8] Zi-Yi Dou, Yichong Xu, Zhe Gan, Jianfeng Wang, Shuohang Wang, Lijuan Wang, Chenguang Zhu, Zicheng Liu, Michael Zeng, et al. An empirical study of training end-to-end vision-and-language transformers. arXiv preprint arXiv:2111.02387, 2021. \n[9] Li Fei-Fei, Rob Fergus, and Pietro Perona. Learning generative visual models from few training examples: An incremental bayesian approach tested on 101 object categories. In CVPRW, pages 178–178, 2004. \n[10] Peng Gao, Shijie Geng, Renrui Zhang, Teli Ma, Rongyao Fang, Yongfeng Zhang, Hongsheng Li, and Yu Qiao. Clip-adapter: Better vision-language models with feature adapters. arXiv preprint arXiv:2110.04544, 2021. \n[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770–778, 2016. \n[12] Patrick Helber, Benjamin Bischke, Andreas Dengel, and Damian Borth. Eurosat: A novel dataset and deep learning benchmark for land use and land cover classification. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 12(7):2217–2226, 2019. \n[13] Dan Hendrycks, Steven Basart, Norman Mu, Saurav Kadavath, Frank Wang, Evan Dorundo, Rahul Desai, Tyler Zhu, Samyak Parajuli, Mike Guo, et al. The many faces of robustness: A critical analysis of out-of-distribution generalization. arXiv preprint arXiv:2006.16241, 2020. \n[14] Dan Hendrycks, Kevin Zhao, Steven Basart, Jacob Steinhardt, and Dawn Song. Natural adversarial examples. arXiv preprint arXiv:1907.07174, 2019. \n[15] Yicong Hong, Qi Wu, Yuankai Qi, Cristian Rodriguez-Opazo, and Stephen Gould. Vln bert: A recurrent vision-and-language bert for navigation. In CVPR, pages 1643–1653, 2021. \n[16] Aashi Jain, Mandy Guo, Krishna Srinivasan, Ting Chen, Sneha Kudugunta, Chao Jia, Yinfei Yang, and Jason Baldridge. Mural: multimodal, multitask retrieval across languages. arXiv preprint arXiv:2109.05125, 2021. \n[17] Chao Jia, Yinfei Yang, Ye Xia, Yi-Ting Chen, Zarana Parekh, Hieu Pham, Quoc Le, Yun-Hsuan Sung, Zhen Li, and Tom Duerig. Scaling up visual and vision-language representation learning with noisy text supervision. In ICML, pages 4904–4916, 2021. \n[18] Zhengbao Jiang, Frank F Xu, Jun Araki, and Graham Neubig. How can we know what language models know? TACL, 8:423–438, 2020. \n[19] Aishwarya Kamath, Mannat Singh, Yann LeCun, Gabriel Synnaeve, Ishan Misra, and Nicolas Carion. Mdetr-modulated detection for end-to-end multi-modal understanding. In ICCV, pages 1780–1790, 2021. \n[20] Wonjae Kim, Bokyung Son, and Ildoo Kim. Vilt: Vision-and-language transformer without convolution or region supervision. In ICML, pages 5583–5594, 2021. \n[21] Jonathan Krause, Michael Stark, Jia Deng, and Li Fei-Fei. 3d object representations for fine-grained categorization. In ICCVW, pages 554–561, 2013. \n[22] Charlotte Laclau, Ievgen Redko, Basarab Matei, Younes Bennani, and Vincent Brault. Co-clustering through optimal transport. In ICML, pages 1955–1964, 2017. \n[23] Junnan Li, Dongxu Li, Caiming Xiong, and Steven Hoi. Blip: Bootstrapping language-image pre-training for unified vision-language understanding and generation. arXiv preprint arXiv:2201.12086, 2022. \n[24] Junnan Li, Ramprasaath Selvaraju, Akhilesh Gotmare, Shafiq Joty, Caiming Xiong, and Steven Chu Hong Hoi. Align before fuse: Vision and language representation learning with momentum distillation. NeurIPS, 34, 2021. \n[25] Liunian Harold Li, Mark Yatskar, Da Yin, Cho-Jui Hsieh, and Kai-Wei Chang. Visualbert: A simple and performant baseline for vision and language. arXiv preprint arXiv:1908.03557, 2019. \n[26] Xiang Lisa Li and Percy Liang. Prefix-tuning: Optimizing continuous prompts for generation. arXiv preprint arXiv:2101.00190, 2021. \n[27] Pengfei Liu, Weizhe Yuan, Jinlan Fu, Zhengbao Jiang, Hiroaki Hayashi, and Graham Neubig. Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing. arXiv preprint arXiv:2107.13586, 2021. \n[28] Xiao Liu, Yanan Zheng, Zhengxiao Du, Ming Ding, Yujie Qian, Zhilin Yang, and Jie Tang. Gpt understands, too. arXiv preprint arXiv:2103.10385, 2021. \n[29] Subhransu Maji, Esa Rahtu, Juho Kannala, Matthew Blaschko, and Andrea Vedaldi. Fine-grained visual classification of aircraft. arXiv preprint arXiv:1306.5151, 2013. \n[30] Gaspard Monge. Mémoire sur la théorie des déblais et des remblais. Histoire de l’Académie Royale des Sciences de Paris, 1781. \n[31] Alex Nichol, Prafulla Dhariwal, Aditya Ramesh, Pranav Shyam, Pamela Mishkin, Bob McGrew, Ilya Sutskever, and Mark Chen. Glide: Towards photorealistic image generation and editing with text-guided diffusion models. arXiv preprint arXiv:2112.10741, 2021. \n[32] Maria-Elena Nilsback and Andrew Zisserman. Automated flower classification over a large number of classes. In 2008 Sixth Indian Conference on Computer Vision, Graphics & Image Processing, pages 722–729, 2008. \n[33] Omkar M Parkhi, Andrea Vedaldi, Andrew Zisserman, and CV Jawahar. Cats and dogs. In CVPR, pages 3498–3505, 2012. \n[34] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. NeurIPS, 2019. \n[35] Or Patashnik, Zongze Wu, Eli Shechtman, Daniel Cohen-Or, and Dani Lischinski. Styleclip: Text-driven manipulation of stylegan imagery. In ICCV, pages 2085–2094, 2021. \n[36] Fabio Petroni, Tim Rocktäschel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, Alexander H Miller, and Sebastian Riedel. Language models as knowledge bases? arXiv preprint arXiv:1909.01066, 2019. \n[37] Gabriel Peyre and Marco Cuturi. Computational optimal transport. Foundations and Trends in Machine Learning, 11(5-6):355–607, 2019. \n[38] Nina Poerner, Ulli Waltinger, and Hinrich Schütze. Bert is not a knowledge base (yet): Factual knowledge vs. name-based reasoning in unsupervised qa. arXiv preprint arXiv:1911.03681, 2019. \n[39] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, et al. Learning transferable visual models from natural language supervision. arXiv preprint arXiv:2103.00020, 2021. \n[40] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019. \n[41] Aditya Ramesh, Prafulla Dhariwal, Alex Nichol, Casey Chu, and Mark Chen. Hierarchical text-conditional image generation with clip latents. arXiv preprint arXiv:2204.06125, 2022. \n[42] Yongming Rao, Wenliang Zhao, Guangyi Chen, Yansong Tang, Zheng Zhu, Guan Huang, Jie Zhou, and Jiwen Lu. Denseclip: Language-guided dense prediction with context-aware prompting. arXiv preprint arXiv:2112.01518, 2021. \n[43] Benjamin Recht, Rebecca Roelofs, Ludwig Schmidt, and Vaishaal Shankar. Do imagenet classifiers generalize to imagenet? arXiv preprint arXiv:1902.10811, 2019. \n[44] Yossi Rubner, Carlo Tomasi, and Leonidas J Guibas. The earth mover’s distance as a metric for image retrieval. IJCV, 40(2):99–121, 2000. \n[45] Tim Salimans, Han Zhang, Alec Radford, and Dimitris Metaxas. Improving gans using optimal transport. ICLR, 2018. \n[46] Taylor Shin, Yasaman Razeghi, Robert L Logan IV, Eric Wallace, and Sameer Singh. Autoprompt: Eliciting knowledge from language models with automatically generated prompts. arXiv preprint arXiv:2010.15980, 2020. \n[47] Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv preprint arXiv:1212.0402, 2012. \n[48] Guy Tevet, Brian Gordon, Amir Hertz, Amit H Bermano, and Daniel Cohen-Or. Motionclip: Exposing human motion generation to clip space. arXiv preprint arXiv:2203.08063, 2022. \n[49] Maria Tsimpoukelli, Jacob L Menick, Serkan Cabi, SM Eslami, Oriol Vinyals, and Felix Hill. Multimodal few-shot learning with frozen language models. NeurIPS, 34:200–212, 2021. \n[50] Ruibo Tu, Kun Zhang, Hedvig Kjellström, and Cheng Zhang. Optimal transport for causal discovery. ICLR, 2022. \n[51] Cédric Villani. Optimal transport: old and new, volume 338. Springer, 2009. \n[52] Haohan Wang, Songwei Ge, Zachary Lipton, and Eric P Xing. Learning robust global representations by penalizing local predictive power. NeurIPS, 32, 2019. \n[53] Mengmeng Wang, Jiazheng Xing, and Yong Liu. Actionclip: A new paradigm for video action recognition. arXiv preprint arXiv:2109.08472, 2021. \n[54] Wenhui Wang, Hangbo Bao, Li Dong, and Furu Wei. Vlmo: Unified vision-language pre-training with mixture-of-modality-experts. arXiv preprint arXiv:2111.02358, 2021. \n[55] Jianxiong Xiao, James Hays, Krista A Ehinger, Aude Oliva, and Antonio Torralba. Sun database: Largescale scene recognition from abbey to zoo. In CVPR, pages 3485–3492, 2010. \n[56] Hongteng Xu, Dixin Luo, Hongyuan Zha, and Lawrence Carin Duke. Gromov-wasserstein learning for graph matching and node embedding. In ICML, pages 6932–6941, 2019. \n[57] Jingjing Xu, Hao Zhou, Chun Gan, Zaixiang Zheng, and Lei Li. Vocabulary learning via optimal transport for neural machine translation. arXiv preprint arXiv:2012.15671, 2020. \n[58] Renrui Zhang, Rongyao Fang, Peng Gao, Wei Zhang, Kunchang Li, Jifeng Dai, Yu Qiao, and Hongsheng Li. Tip-adapter: Training-free clip-adapter for better vision-language modeling. arXiv preprint arXiv:2111.03930, 2021. \n[59] Renrui Zhang, Longtian Qiu, Wei Zhang, and Ziyao Zeng. Vt-clip: Enhancing vision-language models with visual-guided texts. arXiv preprint arXiv:2112.02399, 2021. \n[60] He Zhao, Dinh Phung, Viet Huynh, Trung Le, and Wray Buntine. Neural topic model via optimal transport. ICLR, 2021. \n[61] Wenliang Zhao, Yongming Rao, Ziyi Wang, Jiwen Lu, and Jie Zhou. Towards interpretable deep metric learning with structural matching. In ICCV, pages 9887–9896, 2021. \n[62] Chong Zhou, Chen Change Loy, and Bo Dai. Denseclip: Extract free dense labels from clip. arXiv preprint arXiv:2112.01071, 2021. \n[63] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Learning to prompt for vision-language models. arXiv preprint arXiv:2109.01134, 2021. \n[64] Kaiyang Zhou, Jingkang Yang, Chen Change Loy, and Ziwei Liu. Conditional prompt learning for vision-language models. In CVPR, 2022. ",
|
| 1075 |
+
"bbox": [
|
| 1076 |
+
165,
|
| 1077 |
+
108,
|
| 1078 |
+
830,
|
| 1079 |
+
912
|
| 1080 |
+
],
|
| 1081 |
+
"page_idx": 9
|
| 1082 |
+
},
|
| 1083 |
+
{
|
| 1084 |
+
"type": "text",
|
| 1085 |
+
"text": "",
|
| 1086 |
+
"bbox": [
|
| 1087 |
+
166,
|
| 1088 |
+
90,
|
| 1089 |
+
828,
|
| 1090 |
+
916
|
| 1091 |
+
],
|
| 1092 |
+
"page_idx": 10
|
| 1093 |
+
},
|
| 1094 |
+
{
|
| 1095 |
+
"type": "text",
|
| 1096 |
+
"text": "",
|
| 1097 |
+
"bbox": [
|
| 1098 |
+
171,
|
| 1099 |
+
88,
|
| 1100 |
+
828,
|
| 1101 |
+
608
|
| 1102 |
+
],
|
| 1103 |
+
"page_idx": 11
|
| 1104 |
+
},
|
| 1105 |
+
{
|
| 1106 |
+
"type": "text",
|
| 1107 |
+
"text": "Checklist ",
|
| 1108 |
+
"text_level": 1,
|
| 1109 |
+
"bbox": [
|
| 1110 |
+
173,
|
| 1111 |
+
621,
|
| 1112 |
+
254,
|
| 1113 |
+
636
|
| 1114 |
+
],
|
| 1115 |
+
"page_idx": 11
|
| 1116 |
+
},
|
| 1117 |
+
{
|
| 1118 |
+
"type": "text",
|
| 1119 |
+
"text": "1. For all authors... ",
|
| 1120 |
+
"bbox": [
|
| 1121 |
+
215,
|
| 1122 |
+
646,
|
| 1123 |
+
330,
|
| 1124 |
+
659
|
| 1125 |
+
],
|
| 1126 |
+
"page_idx": 11
|
| 1127 |
+
},
|
| 1128 |
+
{
|
| 1129 |
+
"type": "text",
|
| 1130 |
+
"text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] See our analysis in Section 4.4. 1) Our method is still need few-shot data for optimization, which cannot be applied in zero-shot setting. 2) The method needs more computing cost than CoOp. \n(c) Did you discuss any potential negative societal impacts of your work? [N/A] We propose a general framework for using the vision-language pre-trained model. It is not for specific applications, which does not directly involve societal issues. \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
|
| 1131 |
+
"bbox": [
|
| 1132 |
+
240,
|
| 1133 |
+
664,
|
| 1134 |
+
825,
|
| 1135 |
+
786
|
| 1136 |
+
],
|
| 1137 |
+
"page_idx": 11
|
| 1138 |
+
},
|
| 1139 |
+
{
|
| 1140 |
+
"type": "text",
|
| 1141 |
+
"text": "2. If you are including theoretical results... ",
|
| 1142 |
+
"bbox": [
|
| 1143 |
+
215,
|
| 1144 |
+
790,
|
| 1145 |
+
467,
|
| 1146 |
+
803
|
| 1147 |
+
],
|
| 1148 |
+
"page_idx": 11
|
| 1149 |
+
},
|
| 1150 |
+
{
|
| 1151 |
+
"type": "text",
|
| 1152 |
+
"text": "(a) Did you state the full set of assumptions of all theoretical results? [N/A] (b) Did you include complete proofs of all theoretical results? [N/A] ",
|
| 1153 |
+
"bbox": [
|
| 1154 |
+
240,
|
| 1155 |
+
808,
|
| 1156 |
+
691,
|
| 1157 |
+
837
|
| 1158 |
+
],
|
| 1159 |
+
"page_idx": 11
|
| 1160 |
+
},
|
| 1161 |
+
{
|
| 1162 |
+
"type": "text",
|
| 1163 |
+
"text": "3. If you ran experiments... ",
|
| 1164 |
+
"bbox": [
|
| 1165 |
+
215,
|
| 1166 |
+
840,
|
| 1167 |
+
377,
|
| 1168 |
+
854
|
| 1169 |
+
],
|
| 1170 |
+
"page_idx": 11
|
| 1171 |
+
},
|
| 1172 |
+
{
|
| 1173 |
+
"type": "text",
|
| 1174 |
+
"text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Section 4.2. ",
|
| 1175 |
+
"bbox": [
|
| 1176 |
+
240,
|
| 1177 |
+
858,
|
| 1178 |
+
825,
|
| 1179 |
+
911
|
| 1180 |
+
],
|
| 1181 |
+
"page_idx": 11
|
| 1182 |
+
},
|
| 1183 |
+
{
|
| 1184 |
+
"type": "text",
|
| 1185 |
+
"text": "",
|
| 1186 |
+
"bbox": [
|
| 1187 |
+
240,
|
| 1188 |
+
92,
|
| 1189 |
+
826,
|
| 1190 |
+
146
|
| 1191 |
+
],
|
| 1192 |
+
"page_idx": 12
|
| 1193 |
+
},
|
| 1194 |
+
{
|
| 1195 |
+
"type": "text",
|
| 1196 |
+
"text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
|
| 1197 |
+
"bbox": [
|
| 1198 |
+
212,
|
| 1199 |
+
150,
|
| 1200 |
+
767,
|
| 1201 |
+
164
|
| 1202 |
+
],
|
| 1203 |
+
"page_idx": 12
|
| 1204 |
+
},
|
| 1205 |
+
{
|
| 1206 |
+
"type": "text",
|
| 1207 |
+
"text": "(a) If your work uses existing assets, did you cite the creators? [Yes] \n(b) Did you mention the license of the assets? [N/A] \n(c) Did you include any new assets either in the supplemental material or as a URL? [No] \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] ",
|
| 1208 |
+
"bbox": [
|
| 1209 |
+
240,
|
| 1210 |
+
167,
|
| 1211 |
+
826,
|
| 1212 |
+
267
|
| 1213 |
+
],
|
| 1214 |
+
"page_idx": 12
|
| 1215 |
+
},
|
| 1216 |
+
{
|
| 1217 |
+
"type": "text",
|
| 1218 |
+
"text": "5. If you used crowdsourcing or conducted research with human subjects... ",
|
| 1219 |
+
"bbox": [
|
| 1220 |
+
210,
|
| 1221 |
+
271,
|
| 1222 |
+
658,
|
| 1223 |
+
285
|
| 1224 |
+
],
|
| 1225 |
+
"page_idx": 12
|
| 1226 |
+
},
|
| 1227 |
+
{
|
| 1228 |
+
"type": "text",
|
| 1229 |
+
"text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
|
| 1230 |
+
"bbox": [
|
| 1231 |
+
240,
|
| 1232 |
+
287,
|
| 1233 |
+
825,
|
| 1234 |
+
371
|
| 1235 |
+
],
|
| 1236 |
+
"page_idx": 12
|
| 1237 |
+
}
|
| 1238 |
+
]
|
parse/dev/b9APFSTylGT/b9APFSTylGT_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/b9APFSTylGT/b9APFSTylGT_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/eLxADkHrBcR/eLxADkHrBcR.md
ADDED
|
@@ -0,0 +1,245 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FULLY ONLINE META LEARNING
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
While deep networks can learn complex functions such as classifiers, detectors, and trackers, many applications require models that continually adapt to changing input distributions, changing tasks, and changing environmental conditions. Indeed, this ability to continuously accrue knowledge and use past experience to learn new tasks quickly in continual settings is one of the key properties of an intelligent system. For complex and high-dimensional problems, simply updating the model continually with standard learning algorithms such as gradient descent may result in slow adaptation. Meta-learning can provide a powerful tool to accelerate adaptation yet is conventionally studied in batch settings. In this paper, we study how metalearning can be applied to tackle online problems of this nature, simultaneously adapting to changing tasks and input distributions and meta-training the model in order to adapt more quickly in the future. Extending meta-learning into the online setting presents its own challenges, and although several prior methods have studied related problems, they generally require a discrete notion of tasks, with known ground-truth task boundaries. Such methods typically adapt to each task in sequence, resetting the model between tasks, rather than adapting continuously across tasks. In many real-world settings, such discrete boundaries are unavailable, and may not even exist. To address these settings, we propose a Fully Online MetaLearning (FOML) algorithm, which does not require any ground truth knowledge about the task boundaries and stays fully online without resetting to pre-trained weights. Our experiments show that FOML was able to learn new tasks faster than the state-of-the-art online learning methods on various datasets.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Flexibility and rapid adaptation are a hallmark of intelligence: humans can not only solve complex problems, but they can also figure out how to solve them very rapidly, as compared to our current machine learning algorithms. Such rapid adaptation is crucial for both humans and computers: for humans, it is crucial for survival in changing natural environments, and it is also crucial for agents that classify photographs on the Internet, interpret text, control autonomous vehicles, and generally make accurate predictions with rapidly changing real-world data. While deep neural networks are remarkably effective for learning and representing accurate models He et al. (2015); Krizhevsky et al. (2012); Simonyan & Zisserman (2014); Szegedy et al. $\boxed { 2 0 1 5 }$ , they are comparatively unimpressive when it comes to adaptability, due to their computational and data requirements. Meta-learning in principle mitigates this problem, by leveraging the generalization power of neural networks to accelerate adaptation to new tasks Finn et al. (2019); Li et al. (2017); Nichol et al. (2018); Nichol & Schulman (2018); Park & Oliva (2019); Antoniou et al. (2018). However, standard meta-learning algorithms operate in batch mode, making them poorly suited for continuously evolving environments. More recently, online meta-learning methods have been proposed with the goal of enabling continual adaptation Finn et al. (2019); Jerfel et al. (2018); Yao et al. (2020); Nagabandi et al. (2018); Li & Hospedales (2020), where a constant stream of data from distinct tasks is used for both adaptation and meta-training. In this scheme, meta-training is used to accelerate how quickly the network can adapt to each new task it sees, and simultaneously use that data from each new task for meta-training. This further accelerates how quickly each subsequent task can be acquired. However, current online meta-learning methods fall short of the goal of creating an effective adaptation system for online data in several ways: (1) they typically require task boundaries in the data stream to be known, making them ill-suited to settings where task boundaries are ill-defined and tasks change or evolve gradually, a common tread in real-world; (2) as a result, they typically re-adapt from the meta-trained model on each task, resulting in a very “discrete” mode of operation, where the model adapts to a task, then resets, then adapts to a new one. These limitations restrict the applicability of current online meta-learning methods to real-world settings. We argue that task boundary assumption is somewhat artificial in online settings, where the stream of incoming data is cleanly partitioned into discrete and well-separated tasks presented in sequence. In this paper, we instead develop a fully online meta-learning approach, which does not assume knowledge of task boundaries and does not re-adapt for every new task from the meta parameters.
|
| 12 |
+
|
| 13 |
+

|
| 14 |
+
Figure 1: Comparison of standard online meta-learning and FOML: In standard online meta-learning (e.g., FTML Finn et al. (2019)), shown on the left, adaptation is performed on one task a time, and the algorithm “resets” the adaptation process at task boundaries. For example, a MAML-based method would reset the current parameters back to the meta-trained parameters. In our approach (right), knowledge of task boundaries is not required, and the algorithm continually keeps track of online parameters $\phi$ and meta-parameters $\theta$ . The online parameters are simply updated on the latest data, and the meta-parameters are updated to “pull” the online parameters toward fast-adapting solutions via a MAML-style meta-update.
|
| 15 |
+
|
| 16 |
+
Standard meta-learning methods consist of a meta-training phase, typically done with standard SGD, and an “inner loop” adaptation phase, which computes task specific parameter $\phi _ { i }$ for the task $\mathcal { T } _ { i }$ from a support set to make accurate predictions on a query set. For example, in model-agnostic metalearning (MAML), adaptation consists of taking a few gradient steps on the support set, starting from the meta-trained parameter vector $\theta$ , leading to a set of post-adaptation parameters, and meta-training optimizes the meta-trained parameters $\theta$ so that these gradient steps lead to good results. Previous extensions of such approaches into the online setting typically observe one task at a time, adapt to that task (i.e., compute post-adaptation parameters on it), and then reset $\phi _ { i }$ back to the meta-trained parameters $\theta$ at the beginning of the next task. Thus, the algorithm repeatedly adapts, resets back to pretrained meta parameters at the task boundary, adapts again, and repeats. This is illustrated in Figure 1 (left). However, in many realistic settings, the task boundaries are not known, and instead the tasks shift gradually over time. The discrete “resetting” procedure is a poor fit in such cases, and we would like to simply continue adapting the weights over time without ever resetting back to the meta-trained parameters, still benefit from a concurrent meta-training process. For example, a metatrained image-tagging model on the Internet (e.g., tagging friends in photographs) might gradually adapt to changing patterns and preferences of its users over time, where it would be unnatural to assume discrete shifts in what users want to tag. Similarly, a traffic prediction system might adapt to changing traffic patterns, including periodic changes due to seasons, and unexpected changes due to shifting economic conditions, weather, and accidents. In this spirit, our method does not require any knowledge on the task boundaries as well as stays fully-online through out the learning.
|
| 17 |
+
|
| 18 |
+
The main contribution of our paper is FOML (fully online meta-learning), an online meta-learning algorithm that continually updates its online parameters with each new datapoint or batch of datapoints, while simultaneously performing meta-gradient updates on a separate set of meta-parameters using a buffer of previously seen data. FOML does not require ground truth knowledge of task boundaries, and does not reset the online parameters back to the meta-parameters between tasks, instead updating the online parameters continually in a fully online fashion. We compare FOML empirically to strong baselines and a state-of-the-art prior online meta-learning method, showing that FOML learns to adapt more quickly, and achieves lower error rates, both on a simple sequential image classification task from prior work and a more complex benchmark that we propose based on the CIFAR100 dataset, with a sequence of 1200 tasks.
|
| 19 |
+
|
| 20 |
+
# 2 RELATED WORK
|
| 21 |
+
|
| 22 |
+
Online meta-learning brings together ideas from online learning, meta learning, and continual learning, with the aim of adapting quickly to each new task while simultaneously learning how to adapt even more quickly in the future. We discuss these three sets of approaches next.
|
| 23 |
+
|
| 24 |
+
Meta Learning: Meta learning methods try to learn the high-level context of the data, to behave well on new tasks (Learning to learn). These methods involve learning a metric space Koch et al. (2015); Vinyals et al. (2016); Snell et al. (2017); Yang et al. (2017), gradient based updates Finn et al. (2017); Li et al. (2017); Park & Oliva (2019); Nichol et al. (2018); Nichol & Schulman (2018), or some specific architecture designs Santoro et al. (2016); Munkhdalai & Yu (2017); Ravi & Larochelle (2016).
|
| 25 |
+
|
| 26 |
+
In this work, we are mainly interested in gradient based meta learning methods for online learning. MAML Finn et al. (2017) and its variants Nichol et al. (2018); Nichol & Schulman (2018); Li et al. $\textcircled { 2 0 1 7 }$ ; Park & Oliva (2019); Antoniou et al. (2018) first meta train the models in such a way that the meta parameters are close to the optimal task specific parameters (good initialization). This way, adaptation becomes faster when fine tuning from the meta parameters. However, directly adapting this approach into an online setting will require more relaxation on online learning assumptions, such as access to task boundaries and resetting back and froth from meta parameters. Our method does not require knowledge of task boundaries.
|
| 27 |
+
|
| 28 |
+
Online Learning: Online learning methods update their models based on the stream of data sequentially. There are various works on online learning using linear models Cesa-Bianchi & Lugosi (2006), non-linear models with kernels Kivinen et al. (2004); Jin et al. (2010), and deep neural networks Zhou $\boxed { \mathrm { e t ~ a l . } } \boxed { \mathbb { 2 0 1 2 } }$ . Online learning algorithms often simply update the model on the new data, and do not consider the past knowledge of the previously seen data to do this online update more efficiently. However, the online meta learning framework, allow us to keep track of previously seen data and with the “meta” knowledge we can update the online weights to the new data more faster and efficiently.
|
| 29 |
+
|
| 30 |
+
Continual Learning: A number of prior works on continual learning have addressed catastrophic forgetting McCloskey & Cohen (1989); Li & Hoiem (2017); Ratcliff (1990); Rajasegaran et al. $\bar { ( 2 0 1 9 ) } / \bar { 2 0 2 0 } \}$ , removing the need to store all prior data during training. Our method does not address catastrophic forgetting for the meta-training phase, because we must still store all data so as to “replay” it for meta-training, though it may be possible to discard or sub-sample old data (which we leave to future work). However, our adaptation process is fully online. A number of works perform metalearning for better continual learning, i.e. learning good continual learning strategies Al-Shedivat et al. (2017); Nagabandi et al. (2018); Javed & White (2019); Harrison et al. (2019); He et al. (2019); Beaulieu et al. (2020). However, these prior methods still perform batch-mode meta-training. In batch-mode meta-training, these methods first collect all of the past data and train a model with a meta-learning algorithm (e.g. MAML, Reptile) then take this pretrained weights and fine-tune this model with data from new task. Oh the other hand, our method performs the meta-training incrementally online. In other words, we do not stop at a task boundary and train a model will all data, and re-start again, our method continuously update meta-parameters.
|
| 31 |
+
|
| 32 |
+
The closest work to ours is the follow the meta-leader (FTML) method Finn et al. $\textcircled { 2 0 1 9 }$ and other online meta-learning methods $\underline { { \mathrm { [ Y a o e t a l . ] } } } ( \underline { { 2 0 2 0 } } )$ . FTML is a variant of MAML that finetunes to each new task in turn, resetting to the meta-trained parameters between every task. While this effectively accelerates acquisition of new tasks, it requires ground truth knowledge of task boundaries and, as we show in our experiments, our approach outperforms FTML even when FTML has access to task boundaries and our method does not. Note that the memory requirements for such methods increase with the number of adaptation gradient steps, and this limitation is also shared by our approach. Online-within-online meta-learning Denevi et al. (2019) also aims to accelerate online updates by leveraging prior tasks, but still requires knowledge of task boundaries. MOCA Harrison et al. (2020) instead aims to infer the task boundaries. In contrast, our method does not even attempt to find the task boundaries, but directly adapts without them. A number of related works also address continual learning via meta-learning, but with the aim of minimizing catastrophic forgetting Gupta et al. (2020); $\mathtt { \boxed { C a c c i a e t a l . } } \mathtt { \boxed { 2 0 2 0 } }$ . Our aim is not to address catastrophic forgetting. Our method also meta-trains from small datasets for thousands of tasks, whereas prior continual learning approaches typically focus on settings with fewer larger tasks (e.g., 10-100 tasks).
|
| 33 |
+
|
| 34 |
+
# 3 FOUNDATIONS
|
| 35 |
+
|
| 36 |
+
Prior to diving into online meta learning, we first briefly summarize meta learning, model agnostic meta-learning, and online learning in this section.
|
| 37 |
+
|
| 38 |
+
Meta-learning: Meta-learning address the problem of learning to learn. It uses the knowledge learned from previous tasks to quickly learn new tasks. Meta-learning assumes that the tasks are drawn from a stationary distribution $\tau \sim \mathbb { P } ( \tau )$ . During the meta-training phase (outer-loop), $N$ tasks are assumed to be drawn from this distribution to produce the meta-training set, and the model is trained in such a way that, when a new task with its own training and test data $\mathcal { T } = \{ \mathcal { D } _ { \mathcal { T } } ^ { t r } , \mathcal { D } _ { \mathcal { T } } ^ { t e } \}$ is T Tpresented to it at meta-test time, the model should be able to adapt to this task quickly (inner-loop). Using $\theta$ to denote the meta-trained parameters, the meta-learning objective is:
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
\theta ^ { * } = \arg \operatorname* { m a x } _ { \theta } \mathbb { E } _ { \mathcal { D } _ { \mathcal { T } } ^ { t r } \mathrm { ~ w h e r e ~ } \mathcal { T } \sim \mathbb { P } ( \mathcal { T } ) } \left[ \mathcal { L } ( F _ { \theta } ( \mathcal { D } _ { \mathcal { T } } ^ { t r } ) , \mathcal { D } _ { \mathcal { T } } ^ { t e } ) \right] ,
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
where $F _ { \theta }$ is the meta-learned adaptation process that reads in the training set $\mathcal { D } _ { t } ^ { t r }$ and outputs task-specific parameters, prototypes, or features (depending on the method) for the new task $\tau _ { i }$ .
|
| 45 |
+
|
| 46 |
+
Model-agnostic meta-learning: In MAML Finn et al. (2017), the inner-loop function is (stochastic) gradient descent. Hence, during the MAML inner-loop adaptation, $F _ { \theta } ( \mathcal { D } _ { i } ^ { t r } )$ becomes $\theta - \bar { \alpha } \nabla \mathcal { L } _ { \theta } ( \theta , \mathcal { D } _ { i } ^ { t r } )$ (or, more generally, multiple gradient steps). Intuitively, what this means is that meta-training with MAML produces a parameter vector $\theta$ that can quickly adapt to any task from the meta-training distribution via gradient descent on the task loss. The principle benefits of this is that, when faced with a new task that differs from those seen during meta-training, the algorithm “at worst” adapts with regular gradient descent, and at best is massively accelerated by the meta-training.
|
| 47 |
+
|
| 48 |
+
Online learning: In online learning, the model faces a sequence of loss functions $\{ \mathcal { L } _ { t } \} _ { t = 1 } ^ { \infty }$ and a sequence of data $\{ \mathcal { D } _ { t } = \{ ( x , y ) \} \} _ { t = 1 } ^ { \infty }$ for every time step $t$ . The function $f : x \hat { y }$ maps inputs $x$ to predictions $\hat { y }$ . The goal of an online learning algorithm is to find a set of parameters for each time step $\{ \phi \} _ { t = 1 } ^ { \infty }$ , such that the overall loss between the predictions $\hat { y }$ and the ground truth labels $y$ is minimized over the sequence. This is typically quantified in terms of regret:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\mathrm { R e g r e t } _ { T } = \sum _ { t = 1 } ^ { T } \mathcal L _ { t } ( \phi , \mathcal D _ { t } ) - \sum _ { t = 1 } ^ { T } \mathcal L _ { t } ( \phi _ { t } , \mathcal D _ { t } ) .
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
where, $\begin{array} { r } { \phi _ { t } = \mathrm { a r g m i n } _ { \phi } \mathcal { L } _ { t } ( \phi , \mathcal { D } _ { t } ) } \end{array}$ . The first term measures the loss from the online model, and the second term measures the loss of the best possible model on that task. Various online algorithms try to minimize the regret as much as possible when introducing new tasks.
|
| 55 |
+
|
| 56 |
+
# 4 ONLINE META-LEARNING: PROBLEM STATEMENT AND METHODS
|
| 57 |
+
|
| 58 |
+
In an online meta-learning setting Finn et al. $\underline { { \left( 2 0 1 9 \right) } }$ , the model $f _ { \phi }$ observes datapoints one at a time from an online data stream $s$ . Each datapoint consists of an input $\ v { x } _ { m } ^ { t }$ , where $t$ is the task index and $m$ is the index of the datapoint within that task, and a label $y _ { m } ^ { t }$ . The task changes over time and the model should be able to update the parameters $\phi$ to minimize the loss at each time step. The goal of online meta-learning is to quickly learn each new task $\mathcal { T } _ { t }$ and perform well as soon as possible according to the specified loss function.
|
| 59 |
+
|
| 60 |
+
Here, we define a task as a group of samples based on some discrete variable properties in the samples. For example, it can be grouped by classes, a set of classes, semantic categories or time stamp etc. A simple baseline solution would be to just train the model on the current task $\mathcal { T } _ { t }$ . We denote this baseline as TFS (Train from Scratch). For every new task, the model simply trains a new set of parameters using all of the data from the current task $\mathcal { T } _ { t }$ that has been seen so far:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\phi _ { T F S } ^ { t } = \arg \operatorname* { m i n } _ { \phi } \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \mathcal { L } _ { t } ( \phi , ( x _ { m } ^ { t } , y _ { m } ^ { t } ) ) .
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
TFS has two issues. First, it requires the task boundaries to be known, which can make it difficult to apply to settings where this information is not available. Second, it does not utilize knowledge from other tasks, which greatly limits its performance even when task boundaries are available.
|
| 67 |
+
|
| 68 |
+
A straightforward way to utilize knowledge from other tasks in the online data stream is to store all the seen tasks in a large buffer $\boldsymbol { B }$ , and simply keep training the model on all of the seen tasks. We will refer to this baseline method as TOE (Train on Everything):
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\phi _ { T O E } ^ { t } = \arg \operatorname* { m i n } _ { \phi } \frac { 1 } { M t } \sum _ { i = 1 } ^ { t } \sum _ { m = 1 } ^ { M } \mathcal { L } _ { i } ( \phi , ( x _ { m } ^ { i } , y _ { m } ^ { i } ) ) .
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
TOE learns a function that fits all of the previously seen samples. However, this function may be far from optimal for the task at hand, because the different tasks may be mutually exclusive. Therefore, fitting a single model on all of the previously seen tasks might not provide a good task-specific model for the current task. A more sophisticated baseline, which we refer to as FTL (Follow the Leader), pre-trains a model on all of the previous tasks, and then fine-tunes it only on the data from the current task. Note that this is subtly different from FTL in the classic online learning setting, due to the difference in problem formulation. This can be achieved by initializing $\phi$ with pretrained weights up to the previous task $\phi _ { T O E } ^ { t - 1 }$ :
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\phi _ { F T L } ^ { \mathrm { { \large { t } } } } = \arg \operatorname* { m i n } _ { \phi } \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \mathcal { L } _ { t } ( \phi _ { T O E } ^ { t - 1 } , ( x _ { m } ^ { t } , y _ { m } ^ { t } ) ) .
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
Here, for the task $t$ , we take a model that is pre-trained on all previously seen tasks $( f _ { \phi _ { T O E } ^ { t - 1 } } )$ and fine-tune on the current task data. In this way, FTL can use the past knowledge to more quickly adapt to the new task. However, pre-training on past tasks may not necessarily result in an initialization that is conducive to fast adaptation Finn et al. (2017); Nichol et al. (2018); Nichol & Schulman (2018); Li $\boxed { \mathrm { e t ~ a l . } } \textcircled { 1 2 0 1 7 }$ . Finn et al. Finn et al. $\mathbb { Z 0 1 9 }$ proposed a MAML-based online meta-learning approach, where MAML is used to meta-train a “meta-leader” model on all previously seen tasks, which is then adapted on all data from the current task. This way, the meta-leader parameters will be much closer to new task optimal parameters, and because of this it is much faster to adapt to new tasks from the online data.
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\begin{array} { r } { \phi _ { F T M L } ^ { t } = \underset { \phi _ { M A M L } ^ { t - 1 } } { \arg \operatorname* { m i n } } \mathbb { E } _ { ( x _ { m } ^ { t } , y _ { m } ^ { t } ) \sim T _ { t } } [ \mathcal { L } _ { t } \big ( \phi _ { M A M L } ^ { t - 1 } , ( x _ { m } ^ { t } , y _ { m } ^ { t } ) \big ) ] . } \\ { \mathrm { w h e r e } , ~ \phi _ { M A M L } ^ { t - 1 } = \underset { \phi } { \arg \operatorname* { m i n } } \mathbb { E } _ { T _ { j } \sim \mathcal { D } ( T _ { t - 1 } ) } [ \mathcal { L } _ { j } \big ( \phi - \nabla \mathcal { L } _ { j } ( \phi , \mathcal { D } _ { j } ^ { t r } ) , \mathcal { D } _ { j } ^ { t e } ) ] . } \end{array}
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
Here, FTML algorithm first train a model using MAML algorithm on last seen t-1 tasks $\mathcal { T } _ { t - 1 } =$ $\{ T _ { 1 } , T _ { 2 } , . . . , T _ { t - 1 } \}$ to generate a meta-weights $\phi _ { M A M L } ^ { t - 1 }$ (Eq.7). After this pre-training stage, FTML algorithm fine-tunes the meta-weights using the data from next tasks to find optimal parameters $\phi _ { F T M L } ^ { t }$ for task t. FTL and FTML aim to efficiently use knowledge from past tasks to quickly adapt to the new task. However, the pre-trained weights from FTL do not guarantee fast adaptation, and both methods require ground-truth task boundaries. This assumption may not be realistic in real-world settings, where the tasks may change gradually and no external information is available to indicate task transitions. Although FTML can enable fast adaptation, the model needs to be “reset” at each task, essentially creating a “branch” on each task. This requires maintaining two independent learning processes: a) an adaptation process, whose result is discarded completely at the end of the task, and b) a meta-training process, which does not influence the current task at all, and is only used for forward transfer into future tasks. See Figure 1 for the branching in standard meta learning setting. This branching at task boundaries and “resetting” after the adaptation makes these the parameter trajectory not continuous, hence we argue that FTL and FTML are not fully online. In this work, our aim is to develop a fully online meta-learning method that continually performs both “fast” updates and “slow” meta-updates, does not periodically “reset” the adapted parameters back to the meta-parameters, and does not require any ground truth knowledge of task boundaries.
|
| 87 |
+
|
| 88 |
+
# 5 FULLY ONLINE META-LEARNING WITHOUT TASK BOUNDARIES
|
| 89 |
+
|
| 90 |
+
We first discuss the intuition behind how our approach handles online meta-learning without task boundaries. In many real-world tasks, we might expect the tasks in the online data stream to change gradually. This makes it very hard to draw a clear boundary between the tasks. Therefore, it is necessary to relax task boundary assumption if we want a robust online learner that can work on a real-world data stream. Additionally, since nearby data points are most likely to belong to the same or similar task, we would expect adaptation to each new data point to be much faster from a model that has already been adapted to other recent data points.
|
| 91 |
+
|
| 92 |
+
FOML maintains two separate parameter vectors for the online updates $( \phi )$ and the meta updates $\mathbf { \eta } ^ { ( \theta ) }$ . Both parameterize the same architecture, such that $f _ { \phi }$ and $f _ { \theta }$ represent the same neural network, but with different weights. The online model continuously reads in the latest datapoints from the online data stream, and updates the parameters $\phi$ in online fashion, without any boundaries or resets. However, simply updating the online model on each data point naïvely will not meta-train it to adapt more quickly, and may even result in drift, where the model forgets prior data. Therefore, we also incorporate a regularizer into the online update that is determined by a concurrent meta-learning process (see Fig. $\overline { { 2 } } )$ . Note that FOML only incorporates the meta-parameters into the online updates via the meta-learned regularization term, without ever resetting the online parameters back to the meta-parameters (in contrast, e.g., to FTML Finn et al. (2019))
|
| 93 |
+
|
| 94 |
+
The meta-updates of previous MAML-based online meta-learning approaches involve sampling data from all of the tasks seen so far, and then updating the meta-parameters $\theta$ based on the derivatives of the MAML objective. This provides a diverse sampling of tasks for the meta update, though it requires storing all of the seen data $\boxed { \mathrm { F i n n ~ e t ~ a l . } } \textcircled { 2 0 1 9 }$ . We also use a MAML-style update for the meta parameters, and also require storing the previously seen data. To this end, we will use $\boldsymbol { B }$ to denote a buffer containing all of the data seen so far. Each new datapoint is added to $\boldsymbol { B }$ once the label is observed.
|
| 95 |
+
|
| 96 |
+
However, since we do not assume knowledge of task boundaries, we cannot sample entire tasks from $\boldsymbol { B }$ , but instead must sample individual datapoints. We therefore adopt a different strategy, which we describe in Section $\boxed { 5 . 2 }$ as shown in $\mathrm { F i g } { \overline { { \bigcirc } } }$ instead of aiming to sample in complete tasks from the data buffer, we simply sample random past datapoints, and meta-train the regularizer so that the online updates retain good performance on all past data. We find that this strategy is effective at accelerating acquisition of future tasks in online meta-learning settings where the tasks are not mutual exclusive. We define both types of updates in detail in the next sections.
|
| 97 |
+
|
| 98 |
+

|
| 99 |
+
Figure 2: Overview of FOML learning: FOMLupdates the online parameters $\phi$ using only the most recent $K$ datapoints from the buffer $\boldsymbol { B }$ . Meta-learning learns a regularizer, parameterized by meta-parameters $\theta$ , via second-order MAML-style updates. The goal of metalearning is to make $\phi$ perform well on randomly sampled prior datapoints after performing $K$ steps with the metatrained regularizer.
|
| 100 |
+
|
| 101 |
+
# 5.1 FULLY ONLINE ADAPTATION
|
| 102 |
+
|
| 103 |
+
At each time step, FOML observes a data point $x _ { t }$ , predicts its label $\hat { y } _ { t }$ , then receives the true label $y _ { t }$ and updates the online parameters. In practice, we make updates after observing $N$ new datapoints $N = 1 0$ in our experiments), so as to reduce the variance of the gradient updates. We create a small dataset $\mathcal { D } _ { t r } ^ { j }$ with these $N$ datapoints for the time step $j$ . The true label for these datapoints can be from class labels, annotations, rewards, or even self-supervision, though we focus on the supervised classification setting in our experiments.
|
| 104 |
+
|
| 105 |
+
However, the online updates are based only on the most recent samples, and do not make use of any past data. Therefore, we need some mechanism for the (slower) meta-training process to “transfer” the knowledge it is distilling from the prior tasks into this online parameter vector. We can instantiate such a mechanism by introducing a regularizer into the online parameter update that depends on the meta-parameters $\theta$ , which we denote as $\mathcal { R } ( \phi , \theta )$ . While a variety of parameterizations could be used for $\mathcal { R } ( \phi , \theta )$ , we opt for a simple squared error term of the form $\mathcal { R } ( \bar { \phi } , \theta ) = ( \phi - \theta ) ^ { 2 }$ , resulting in the following online update at each step $j$ :
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\begin{array} { r l } & { \phi ^ { j } = \phi ^ { j - 1 } - \alpha _ { 1 } \nabla _ { \phi ^ { j - 1 } } \{ \mathcal { L } ( \phi ^ { j - 1 } ; \mathcal { D } _ { t r } ^ { j } ) + \beta _ { 1 } \mathcal { R } ( \phi ^ { j - 1 } , \theta ) \} } \\ & { \quad = \phi ^ { j - 1 } - \underbrace { \alpha _ { 1 } \nabla _ { \phi ^ { j - 1 } } \mathcal { L } ( \phi ^ { j - 1 } ; \mathcal { D } _ { t r } ^ { j } ) } _ { \mathrm { t a s k ~ s p e c i f i c ~ u p d a t e } } + \underbrace { 2 \alpha _ { 1 } \beta _ { 1 } ( \theta - \phi ^ { j - 1 } ) } _ { \mathrm { m e t a ~ d i r e c t i o n a l ~ u p d a t e } } } \end{array}
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
In the case of classification, $\mathcal { L }$ is the cross-entropy loss. $\alpha _ { 1 } , \beta _ { 1 }$ are hyperparameters.
|
| 112 |
+
|
| 113 |
+
Next, we discuss how these meta-parameters are trained so as to maximize the effectiveness of this regularizer at accelerating adaption to new tasks.
|
| 114 |
+
|
| 115 |
+
# 5.2 META-LEARNING WITHOUT TASK BOUNDARIES
|
| 116 |
+
|
| 117 |
+
As discussed in the previous section, the online updates to $\phi ^ { j }$ include a regularizer $\mathcal { R }$ that transfers knowledge from the meta-parameters $\theta$ into each online update. Additionally, our method maintains a buffer $\boldsymbol { B }$ containing all data seen so far, which is used for the meta-update.
|
| 118 |
+
|
| 119 |
+
In contrast to prior methods, which explicitly draw a training and validation set from the buffer (i.e., a query and support set) and then perform a separate “inner loop” update on this training set Finn $\boxed { \dot { \mathrm { e t ~ a l . } } } \boxed { ( 2 0 1 9 ) }$ , our meta-updates recycle the inner loop adaptation that is already performed via the online updates, and therefore we only draw a validation set $\mathcal { D } _ { v a l } ^ { m }$ from the buffer $\boldsymbol { B }$ . Specifically, we sample a set of using the gradi $N$ datapoints at rt of the loss on m from and th $\boldsymbol { B }$ to form egulariz $\mathcal { D } _ { v a l } ^ { m }$ . We then upafter the last e the meta-updates on rameters . $\theta$ $\mathcal { D } _ { v a l } ^ { m }$ $\mathcal { R }$ $K$ $\phi$
|
| 120 |
+
|
| 121 |
+
In other words, we adjust the meta-parameters in such a way that, if an online update is regularized with this meta-weights, then the loss on the online update will be minimized. This can be expressed via following meta update:
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
\left. \begin{array} { l } { { \displaystyle { \sf I a t e } : \int } _ { } \\ { { \theta = \theta - \alpha _ { 2 } \nabla _ { \theta } \left\{ { \mathcal L } \left( \phi ^ { j } ; { \mathcal D } _ { v a l } ^ { m } \right) + \beta _ { 2 } \sum _ { k = 0 } ^ { K } { \mathcal R } ( \theta , \phi ^ { j - k } ) \right\} } } } \end{array} \right.
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
Here, the $\phi ^ { j }$ has dependence on $\theta$ due to the previous online update as shown in Eq. 9. Subsequently, $\theta$ and $\phi ^ { j }$ are only related via regularization term, unlike FTML Finn et al. (2019), which sets $\phi ^ { 0 } = \theta$ at every task boundary.
|
| 128 |
+
|
| 129 |
+
The choice of sampling $\mathcal { D } _ { v a l } ^ { m }$ at random from $\boldsymbol { B }$ has several interpretations. We can interpret this as regularizing $\phi$ to prevent the online parameters from drifting away from solutions that also work well on the entire data buffer. However, this interpretation is incomplete, since the meta-update doesn’t simply keep $\phi$ close to a single parameter vector that works well on $\mathcal { D } _ { v a l } ^ { m }$ , but rather changes the regularizer so that gradient updates with that regularizer maximally improve performance on $\mathcal { D } _ { v a l } ^ { m }$ . This has the effect of actually accelerating how quickly $\phi$ can adapt to new tasks using this regularizer, so long as past tasks are reasonably representative of prior tasks. We experimentally verify this claim in our experiments. Note, however, that this scheme does assume that the tasks are not mutually exclusive. We summarize the complete algorithm in Algorithm 1.
|
| 130 |
+
|
| 131 |
+
# Algorithm 1 Online Meta Learning with FOML
|
| 132 |
+
|
| 133 |
+
<table><tr><td colspan="2">1: procedure META TRAINING</td></tr><tr><td>2: Require:0,B,,BufferB,Data streamS</td><td> Initiate ° with .</td></tr><tr><td>3: ←</td><td></td></tr><tr><td>4:</td><td>while Data stream S available do</td></tr><tr><td>5: D↑S</td><td>V get new data from online data-stream</td></tr><tr><td>6: B↑B+Dj</td><td>>add new data to the buffer</td></tr><tr><td>7:</td><td>DDa←D > partition the data into train and validation splits</td></tr><tr><td>8:</td><td>ytr←fj-1(Dr) > make predictions on the train set</td></tr><tr><td>9: ↑11</td><td>-α1VΦj-1{Ltask(Φì-1;D𝑖r)+βR(ρj-1,0)}</td></tr><tr><td>10: yval←(Dval)</td><td>>Evaluate the updated model on the validation set</td></tr><tr><td>11: Dmt ~ random-sample(B)</td><td>> sample random batch from buffer</td></tr><tr><td>12:</td><td>0←0-a2VθLtask(Φ;Dmt)</td></tr><tr><td>13: j←j+1</td><td></td></tr></table>
|
| 134 |
+
|
| 135 |
+
# 6 EXPERIMENTAL EVALUATION
|
| 136 |
+
|
| 137 |
+
Our experiments focus on online meta-learning of image classification tasks. In these settings, an effective algorithm should adapt to changing tasks as quickly as possible, rapidly identify when the task has changed, and adjust its parameters accordingly. Furthermore, a successful algorithm should make use of past task shifts to meta-learn effectively, thus accelerating the speed with which it adapts to future task changes. In all cases, the algorithm receives one data point at a time, and the task changes periodically. In order to allow for a comparison with prior methods, which generally assume known task boundaries, the data stream is partitioned into discrete tasks, but our algorithm is not aware of which datapoint belongs to which tasks or where the boundaries occur. The prior methods, in contrast, are provided with this information, thus giving them an advantage. We first describe the specific task formulations, and then the prior methods that we compare to.
|
| 138 |
+
|
| 139 |
+
Online meta-learning should adapt to each task as quickly as possible, and use data from past to accelerate acquisition of future tasks. We report our learning curves, with one axis corresponding to the number of seen tasks, and the other axis corresponding to the cumulative error rate on that task. This error rate is computed using a held-out validation data for the task after adaptation.
|
| 140 |
+
|
| 141 |
+
We evaluate prior online meta-learning methods and baselines on three different datasets (RainbowMNIST, CIFAR100 and CELEBA). TOE (train on everything), TFS (train from scratch), FTL (follow the leader), FTML (follow the meta-leader) Finn et al. (2019), LwF Li & Hoiem (2017), iCaRL Rebuffi et al. (2016) and MOCA Harrison et al. (2020) are the baseline methods we compare against our method FOML. See Section 4 for more detailed description of these methods. Please see Appendix A.2 for more details on the baseline methods.
|
| 142 |
+
|
| 143 |
+
Datasets: We compare TOE, TFS, FTL, FTML, LwF, iCaLR and FOML on three different datasets. Rainbow-MNIST Finn et al. (2019) was created by changing the background color, scale and rotation of the MNIST dataset. It includes 7 different background colors, 2 scales (full and half) and 4 different rotations. This leads to a total of 56 number of tasks. Each individual task is to classify the images into 10 classes. We use the same partition with 900 samples per each task, as in prior work Finn $\boxed { \mathrm { e t ~ a l . } } \textcircled { 2 0 1 9 }$ . However, this task contains relatively simple images, and only 56 tasks. To create a much longer task sequence with significantly more realistic images, we modified the CIFAR-100 and CELEBA datasets to create an online meta-learning benchmark, which we call online-CIFAR100 and online-CELEBA, respectively. Every task is a randomly sampled set of classes, and the goal is to classify whether two images in this set belongs to same class or not. Specifically, each task corresponds to 5 classes, and every datapoint consists of a pair of images, each corresponding to one of the 5 classes for that task. The goal is to predict whether the two images belong to the same class or not. Note that different tasks are not mutually exclusive, which in principle should favor a TOE-style method, since meta-learning is known to underperform with non-mutually-exclusive tasks Yin et al. $\textcircled { 2 0 1 9 }$ . To make sure the data distribution changes smoothly over tasks, we only change a subset of the classes between consecutive tasks.
|
| 144 |
+
|
| 145 |
+

|
| 146 |
+
Figure 3: Comparison between online algorithms: We compare our method with baselines and prior approaches, including TFS (Train from Scratch), TOE (Train on Everything), FTL (Follow the Leader) and FTML (Follow the Meta Leader). a: Performance relative to the number of tasks seen over the course of online training on the Rainbow-MNIST dataset. As the number of task increases, FOML achieves lower error rates compared to other methods. We also compare our method with continual learning baselines: LwF Li & Hoiem (2017), iCaRL Rebuffi et al. $\boxed { 2 0 1 6 }$ and MOCA Harrison et al. (2020). MOCA Harrison et al. (2020) archive similar performance to ours at the end of the learning, but FOML makes significantly faster progress. b: Error rates on the Online-CIFAR100 dataset. Note that FOML not only achieves lower error rates on average, but also reaches the lowest error (of around $17 \%$ ) more quickly than the other methods. c: Performance of FOML on the CELEBA dataset. This dataset contains more than 1000 classes, and we follow the same protocol as in Online-CIFAR100 experiments. Our method, FOML, learns more quickly on this task as well.
|
| 147 |
+
|
| 148 |
+
Results on Rainbow-MNIST: As shown in $\mathrm { F i g } \bigstar \bigstar$ FOML attains the lowest error rate on most tasks in Rainbow-MNIST, except a small segment in the beginning. The performance of TFS is similar across all the tasks, and does not improve over time. This is because it resets its weights every time it encounters a new task, and therefore cannot not gain any advantage from past data. TOE has larger error rates at the start, but as we add more data into the buffer, TOE is able to improve. On the other hand, both FTL and FTML start with similar performance, but FTML achieve much lower error rates at the end of the sequence compared to FTL, consistently with prior work Finn et al. (2019). The final error rates of FOML are around $10 \%$ , and it reaches this performance significantly faster than FTML, after less than 20 tasks. Note that FTML also has access to task boundaries, while FOML does not.
|
| 149 |
+
|
| 150 |
+
Results on Online-CIFAR100 and Online-CELEBA: We use a Siamese network for this experiment, where each image is fed into a 7-layer convolutional network, and each branch outputs a 128 dimensional embedding vector. A difference of these vectors are fed into a fully connected layer for the final classification. Each task contains data from 5 classes, and each new task introduces three new classes, and retains two of the classes from the previous task, providing a degree of temporal coherence while still requiring each algorithm to handle persistent shift in the task. $\mathrm { F i g } \ 3$ shows the error rates of various online learning methods, where each method is trained over a sequence of 1200 tasks for online-CIFAR100. All the methods start with initial error rates of $50 \%$ . The tasks are not mutually exclusive, so in principle TOE can attain good performance, but it makes the slowest progress among all the methods, suggesting that simple pretraining is not sufficient to accelerate learning. FTL uses a similar pre-training strategy as TOE. However it has an adaptation stage where the model is fine-tuned on the new task. This allows it to make slower progress. As expected from prior work $\lvert \lvert \dim \operatorname { e t } \mathrm { a l . } \rvert \langle 2 0 1 9 \rvert$ , the meta-learning procedure used by FTML allows it to make faster progress than FTL. However, FOML makes faster progress on average, and achieves the lowest final error rate $( \sim 1 5 \%$ ) after sequence of 1200 tasks.
|
| 151 |
+
|
| 152 |
+

|
| 153 |
+
Figure 4: Ablation experiments: a) We vary the number of online updates $K$ used before the meta-update, to see how it affects the performance of our method. The performance of FOML improves as the number of online updates is increased. b) This experiment shows how FOML performs with and without meta updates, to confirm that the meta-training is indeed an essential component of our method. With meta-updates, FOML learns more quickly, and performance improves with more tasks.
|
| 154 |
+
|
| 155 |
+
# 6.1 ABLATION STUDIES
|
| 156 |
+
|
| 157 |
+
We perform various ablations by varying the number of online parameters used for the meta-update $K$ , importance of meta-model to analysis the properties of our method. For additional ablations, please see the Appendix.
|
| 158 |
+
|
| 159 |
+
Number of online parameters used for the meta-update: Our method periodically updates the online weights and meta weights. The meta-updates involves taking $K$ recent online parameters and updating the meta model via MAML gradient. Therefore, meta-updates depend on the trajectory of the online parameters. In this experiment, we investigate how the performance of FOML changes as we vary the number of parameters used for the meta-update $K$ in Algorithm $\underset { - , - } { \mathrm { ~ 1 ) } }$ . Fig 4 shows the performance of our method with various values of $K$ : $K = [ 1 , 2 , 3 , 5 , 1 0 ]$ . We can see that the performance improves when we update the meta parameters over longer trajectory of online parameters (larger $K$ ). We speculate that this is due to the longer sequences providing a clearer signal for how the meta-parameters influence online updates over many steps.
|
| 160 |
+
|
| 161 |
+
Importance of meta update: FOML keeps track of separate online parameters and meta-parameters, and each is updated via corresponding updates. However, only the online parameters $\phi$ are used for evaluation. The meta-parameters $\theta$ only influence them via the regularizer and do not directly affect evaluation. This might raise the question: how important is the contribution of the meta-parameters to the performance of the algorithm during online training? We train a model with and without meta-updates, and the performance is shown in $\mathrm { F i g } 4 .$ None that, the model without meta-updates is identical to our method, except that the meta-updates themselves are not performed. We can clearly see that the model trained with meta-updates outperforms a model trained without meta-updates. The model trained without meta-updates generally does not improve significantly as more tasks are seen, while the model trained with meta-updates improves with each task, and reaches significantly lower final error. This shows that, even though $\theta$ and $\phi$ are decoupled and only connected via a regularization, the meta-learning component of our method really is critical for its good performance.
|
| 162 |
+
|
| 163 |
+
# 7 CONCLUSION
|
| 164 |
+
|
| 165 |
+
We presented FOML, a MAML-based algorithm for online meta-learning that does not require ground truth knowledge of task boundaries, and does not require resetting the parameter vector back to the meta-learned parameters for every task. FOML is conceptually simple, maintaining just two parameter vectors over the entire online adaptation process: a vector of online parameters $\phi$ , which are updated continually on each new batch of datapoints, and a vector of meta-parameters $\theta$ , which are updated correspondingly with meta-updates to accelerate the online adaptation process, and influence the online updates via a regularizer. We find that even a relatively simple task sampling scheme that selects datapoints at random from a buffer of all seen data enables effective meta-training that accelerates the speed with which FOML can adapt to each new task, and we find that FOML reaches a final performance that is comparable to or better than baselines and prior methods, while learning to adapt quickly to new tasks significantly faster. While our work focuses on supervised classification problems, a particularly exciting direction for future work is to extend such online meta-learning methods to other types of online supervision that may be more readily available, including self-supervision and prediction, so that models equipped with online meta-learning can continually improve as they see more of the world.
|
| 166 |
+
|
| 167 |
+
# REFERENCES
|
| 168 |
+
|
| 169 |
+
Maruan Al-Shedivat, Trapit Bansal, Yuri Burda, Ilya Sutskever, Igor Mordatch, and Pieter Abbeel. Continuous adaptation via meta-learning in nonstationary and competitive environments. arXiv preprint arXiv:1710.03641, 2017.
|
| 170 |
+
|
| 171 |
+
Antreas Antoniou, Harrison Edwards, and Amos Storkey. How to train your maml. arXiv preprint arXiv:1810.09502, 2018.
|
| 172 |
+
|
| 173 |
+
Shawn Beaulieu, Lapo Frati, Thomas Miconi, Joel Lehman, Kenneth O Stanley, Jeff Clune, and Nick Cheney. Learning to continually learn. arXiv preprint arXiv:2002.09571, 2020.
|
| 174 |
+
|
| 175 |
+
Massimo Caccia, Pau Rodriguez, Oleksiy Ostapenko, Fabrice Normandin, Min Lin, Lucas Caccia, Issam Laradji, Irina Rish, Alexandre Lacoste, David Vazquez, et al. Online fast adaptation and knowledge accumulation: a new approach to continual learning. arXiv preprint arXiv:2003.05856, 2020.
|
| 176 |
+
|
| 177 |
+
Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 9650–9660, 2021.
|
| 178 |
+
|
| 179 |
+
Nicolo Cesa-Bianchi and Gábor Lugosi. Prediction, learning, and games. Cambridge university press, 2006.
|
| 180 |
+
|
| 181 |
+
Giulia Denevi, Dimitris Stamos, Carlo Ciliberto, and Massimiliano Pontil. Online-within-online meta-learning. In ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 32 (NIPS 2019), volume 32, pp. 1–11. Neural Information Processing Systems (NeurIPS 2019), 2019.
|
| 182 |
+
|
| 183 |
+
Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning, pp. 1126–1135. PMLR, 2017.
|
| 184 |
+
|
| 185 |
+
Chelsea Finn, Aravind Rajeswaran, Sham Kakade, and Sergey Levine. Online meta-learning. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 1920–1930. PMLR, 09–15 Jun 2019.
|
| 186 |
+
|
| 187 |
+
Sebastian Flennerhag, Andrei A Rusu, Razvan Pascanu, Francesco Visin, Hujun Yin, and Raia Hadsell. Meta-learning with warped gradient descent. arXiv preprint arXiv:1909.00025, 2019.
|
| 188 |
+
|
| 189 |
+
Gunshi Gupta, Karmesh Yadav, and Liam Paull. La-maml: Look-ahead meta learning for continual learning. arXiv preprint arXiv:2007.13904, 2020.
|
| 190 |
+
|
| 191 |
+
James Harrison, Apoorva Sharma, Chelsea Finn, and Marco Pavone. Continuous meta-learning without tasks. arXiv preprint arXiv:1912.08866, 2019.
|
| 192 |
+
|
| 193 |
+
James Harrison, Apoorva Sharma, Chelsea Finn, and Marco Pavone. Continuous meta-learning without tasks. Advances in neural information processing systems, 33, 2020.
|
| 194 |
+
|
| 195 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. corr abs/1512.03385 (2015), 2015.
|
| 196 |
+
|
| 197 |
+
Xu He, Jakub Sygnowski, Alexandre Galashov, Andrei A Rusu, Yee Whye Teh, and Razvan Pascanu. Task agnostic continual learning via meta learning. arXiv preprint arXiv:1906.05201, 2019.
|
| 198 |
+
|
| 199 |
+
Khurram Javed and Martha White. Meta-learning representations for continual learning. arXiv preprint arXiv:1905.12588, 2019.
|
| 200 |
+
|
| 201 |
+
Ghassen Jerfel, Erin Grant, Thomas L Griffiths, and Katherine Heller. Reconciling meta-learning and continual learning with online mixtures of tasks. arXiv preprint arXiv:1812.06080, 2018.
|
| 202 |
+
|
| 203 |
+
Rong Jin, Steven CH Hoi, and Tianbao Yang. Online multiple kernel learning: Algorithms and mistake bounds. In International conference on algorithmic learning theory, pp. 390–404. Springer, 2010.
|
| 204 |
+
|
| 205 |
+
Jyrki Kivinen, Alexander J Smola, and Robert C Williamson. Online learning with kernels. IEEE transactions on signal processing, 52(8):2165–2176, 2004.
|
| 206 |
+
|
| 207 |
+
Gregory Koch, Richard Zemel, Ruslan Salakhutdinov, et al. Siamese neural networks for one-shot image recognition. In ICML deep learning workshop, volume 2. Lille, 2015.
|
| 208 |
+
|
| 209 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 25:1097–1105, 2012.
|
| 210 |
+
|
| 211 |
+
Da Li and Timothy Hospedales. Online meta-learning for multi-source and semi-supervised domain adaptation. In European Conference on Computer Vision, pp. 382–403. Springer, 2020.
|
| 212 |
+
|
| 213 |
+
Zhenguo Li, Fengwei Zhou, Fei Chen, and Hang Li. Meta-sgd: Learning to learn quickly for few-shot learning. arXiv preprint arXiv:1707.09835, 2017.
|
| 214 |
+
|
| 215 |
+
Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE transactions on pattern analysis and machine intelligence, 40(12):2935–2947, 2017.
|
| 216 |
+
|
| 217 |
+
Michael McCloskey and Neal J Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of learning and motivation, volume 24, pp. 109–165. Elsevier, 1989.
|
| 218 |
+
|
| 219 |
+
Tsendsuren Munkhdalai and Hong Yu. Meta networks. In International Conference on Machine Learning, pp. 2554–2563. PMLR, 2017.
|
| 220 |
+
|
| 221 |
+
Anusha Nagabandi, Chelsea Finn, and Sergey Levine. Deep online learning via meta-learning: Continual adaptation for model-based rl. arXiv preprint arXiv:1812.07671, 2018.
|
| 222 |
+
|
| 223 |
+
Alex Nichol and John Schulman. Reptile: a scalable metalearning algorithm. arXiv preprint arXiv:1803.02999, 2(3):4, 2018.
|
| 224 |
+
|
| 225 |
+
Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999, 2018.
|
| 226 |
+
|
| 227 |
+
Eunbyung Park and Junier B Oliva. Meta-curvature. arXiv preprint arXiv:1902.03356, 2019.
|
| 228 |
+
|
| 229 |
+
Jathushan Rajasegaran, Munawar Hayat, Salman Khan, Fahad Shahbaz Khan, and Ling Shao. Random path selection for incremental learning. Advances in Neural Information Processing Systems, 2019.
|
| 230 |
+
|
| 231 |
+
Jathushan Rajasegaran, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, and Mubarak Shah. itaml: An incremental task-agnostic meta-learning approach. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13588–13597, 2020.
|
| 232 |
+
|
| 233 |
+
Roger Ratcliff. Connectionist models of recognition memory: constraints imposed by learning and forgetting functions. Psychological review, 97(2):285, 1990.
|
| 234 |
+
|
| 235 |
+
Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. 2016.
|
| 236 |
+
|
| 237 |
+
Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, and Christoph H Lampert. icarl: Incremental classifier and representation learning. corr abs/1611.07725 (2016). arXiv preprint arXiv:1611.07725, 2016.
|
| 238 |
+
|
| 239 |
+
Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Metalearning with memory-augmented neural networks. In International conference on machine learning, pp. 1842–1850. PMLR, 2016.
|
| 240 |
+
|
| 241 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014.
|
| 242 |
+
|
| 243 |
+
Jake Snell, Kevin Swersky, and Richard S Zemel. Prototypical networks for few-shot learning. arXiv preprint arXiv:1703.05175, 2017.
|
| 244 |
+
|
| 245 |
+
Xingyou Song, Wenbo Gao, Yuxiang Yang, Krzysztof Choromanski, Aldo Pacchiano, and Yunhao Tang. Es-maml: Simple hessian-free meta learning. arXiv preprint arXiv:1910.01215, 2019. Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1–9, 2015. Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. Advances in neural information processing systems, 29:3630–3638, 2016. Flood Sung Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning.(2018). 2017. Huaxiu Yao, Yingbo Zhou, Mehrdad Mahdavi, Zhenhui Li, Richard Socher, and Caiming Xiong. Online structured meta-learning. arXiv preprint arXiv:2010.11545, 2020. Mingzhang Yin, George Tucker, Mingyuan Zhou, Sergey Levine, and Chelsea Finn. Meta-learning without memorization. arXiv preprint arXiv:1912.03820, 2019. Michael Zhang, James Lucas, Jimmy Ba, and Geoffrey E Hinton. Lookahead optimizer: k steps forward, 1 step back. Advances in neural information processing systems, 32, 2019. Guanyu Zhou, Kihyuk Sohn, and Honglak Lee. Online incremental feature learning with denoising autoencoders. In Artificial intelligence and statistics, pp. 1453–1461. PMLR, 2012.
|
parse/dev/eLxADkHrBcR/eLxADkHrBcR_content_list.json
ADDED
|
@@ -0,0 +1,1338 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "FULLY ONLINE META LEARNING ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
174,
|
| 8 |
+
99,
|
| 9 |
+
575,
|
| 10 |
+
121
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Anonymous authors Paper under double-blind review ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
183,
|
| 19 |
+
145,
|
| 20 |
+
398,
|
| 21 |
+
172
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "ABSTRACT ",
|
| 28 |
+
"text_level": 1,
|
| 29 |
+
"bbox": [
|
| 30 |
+
454,
|
| 31 |
+
210,
|
| 32 |
+
544,
|
| 33 |
+
226
|
| 34 |
+
],
|
| 35 |
+
"page_idx": 0
|
| 36 |
+
},
|
| 37 |
+
{
|
| 38 |
+
"type": "text",
|
| 39 |
+
"text": "While deep networks can learn complex functions such as classifiers, detectors, and trackers, many applications require models that continually adapt to changing input distributions, changing tasks, and changing environmental conditions. Indeed, this ability to continuously accrue knowledge and use past experience to learn new tasks quickly in continual settings is one of the key properties of an intelligent system. For complex and high-dimensional problems, simply updating the model continually with standard learning algorithms such as gradient descent may result in slow adaptation. Meta-learning can provide a powerful tool to accelerate adaptation yet is conventionally studied in batch settings. In this paper, we study how metalearning can be applied to tackle online problems of this nature, simultaneously adapting to changing tasks and input distributions and meta-training the model in order to adapt more quickly in the future. Extending meta-learning into the online setting presents its own challenges, and although several prior methods have studied related problems, they generally require a discrete notion of tasks, with known ground-truth task boundaries. Such methods typically adapt to each task in sequence, resetting the model between tasks, rather than adapting continuously across tasks. In many real-world settings, such discrete boundaries are unavailable, and may not even exist. To address these settings, we propose a Fully Online MetaLearning (FOML) algorithm, which does not require any ground truth knowledge about the task boundaries and stays fully online without resetting to pre-trained weights. Our experiments show that FOML was able to learn new tasks faster than the state-of-the-art online learning methods on various datasets. ",
|
| 40 |
+
"bbox": [
|
| 41 |
+
233,
|
| 42 |
+
241,
|
| 43 |
+
766,
|
| 44 |
+
546
|
| 45 |
+
],
|
| 46 |
+
"page_idx": 0
|
| 47 |
+
},
|
| 48 |
+
{
|
| 49 |
+
"type": "text",
|
| 50 |
+
"text": "1 INTRODUCTION ",
|
| 51 |
+
"text_level": 1,
|
| 52 |
+
"bbox": [
|
| 53 |
+
176,
|
| 54 |
+
574,
|
| 55 |
+
336,
|
| 56 |
+
589
|
| 57 |
+
],
|
| 58 |
+
"page_idx": 0
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"type": "text",
|
| 62 |
+
"text": "Flexibility and rapid adaptation are a hallmark of intelligence: humans can not only solve complex problems, but they can also figure out how to solve them very rapidly, as compared to our current machine learning algorithms. Such rapid adaptation is crucial for both humans and computers: for humans, it is crucial for survival in changing natural environments, and it is also crucial for agents that classify photographs on the Internet, interpret text, control autonomous vehicles, and generally make accurate predictions with rapidly changing real-world data. While deep neural networks are remarkably effective for learning and representing accurate models He et al. (2015); Krizhevsky et al. (2012); Simonyan & Zisserman (2014); Szegedy et al. $\\boxed { 2 0 1 5 }$ , they are comparatively unimpressive when it comes to adaptability, due to their computational and data requirements. Meta-learning in principle mitigates this problem, by leveraging the generalization power of neural networks to accelerate adaptation to new tasks Finn et al. (2019); Li et al. (2017); Nichol et al. (2018); Nichol & Schulman (2018); Park & Oliva (2019); Antoniou et al. (2018). However, standard meta-learning algorithms operate in batch mode, making them poorly suited for continuously evolving environments. More recently, online meta-learning methods have been proposed with the goal of enabling continual adaptation Finn et al. (2019); Jerfel et al. (2018); Yao et al. (2020); Nagabandi et al. (2018); Li & Hospedales (2020), where a constant stream of data from distinct tasks is used for both adaptation and meta-training. In this scheme, meta-training is used to accelerate how quickly the network can adapt to each new task it sees, and simultaneously use that data from each new task for meta-training. This further accelerates how quickly each subsequent task can be acquired. However, current online meta-learning methods fall short of the goal of creating an effective adaptation system for online data in several ways: (1) they typically require task boundaries in the data stream to be known, making them ill-suited to settings where task boundaries are ill-defined and tasks change or evolve gradually, a common tread in real-world; (2) as a result, they typically re-adapt from the meta-trained model on each task, resulting in a very “discrete” mode of operation, where the model adapts to a task, then resets, then adapts to a new one. These limitations restrict the applicability of current online meta-learning methods to real-world settings. We argue that task boundary assumption is somewhat artificial in online settings, where the stream of incoming data is cleanly partitioned into discrete and well-separated tasks presented in sequence. In this paper, we instead develop a fully online meta-learning approach, which does not assume knowledge of task boundaries and does not re-adapt for every new task from the meta parameters. ",
|
| 63 |
+
"bbox": [
|
| 64 |
+
173,
|
| 65 |
+
604,
|
| 66 |
+
826,
|
| 67 |
+
924
|
| 68 |
+
],
|
| 69 |
+
"page_idx": 0
|
| 70 |
+
},
|
| 71 |
+
{
|
| 72 |
+
"type": "image",
|
| 73 |
+
"img_path": "images/4895b32a01bf2b30cb4c2cab4eb84e441a311f7f4a2b0ee8dbb8fc20da4a7dc6.jpg",
|
| 74 |
+
"image_caption": [
|
| 75 |
+
"Figure 1: Comparison of standard online meta-learning and FOML: In standard online meta-learning (e.g., FTML Finn et al. (2019)), shown on the left, adaptation is performed on one task a time, and the algorithm “resets” the adaptation process at task boundaries. For example, a MAML-based method would reset the current parameters back to the meta-trained parameters. In our approach (right), knowledge of task boundaries is not required, and the algorithm continually keeps track of online parameters $\\phi$ and meta-parameters $\\theta$ . The online parameters are simply updated on the latest data, and the meta-parameters are updated to “pull” the online parameters toward fast-adapting solutions via a MAML-style meta-update. "
|
| 76 |
+
],
|
| 77 |
+
"image_footnote": [],
|
| 78 |
+
"bbox": [
|
| 79 |
+
274,
|
| 80 |
+
99,
|
| 81 |
+
723,
|
| 82 |
+
207
|
| 83 |
+
],
|
| 84 |
+
"page_idx": 1
|
| 85 |
+
},
|
| 86 |
+
{
|
| 87 |
+
"type": "text",
|
| 88 |
+
"text": "",
|
| 89 |
+
"bbox": [
|
| 90 |
+
174,
|
| 91 |
+
315,
|
| 92 |
+
825,
|
| 93 |
+
412
|
| 94 |
+
],
|
| 95 |
+
"page_idx": 1
|
| 96 |
+
},
|
| 97 |
+
{
|
| 98 |
+
"type": "text",
|
| 99 |
+
"text": "Standard meta-learning methods consist of a meta-training phase, typically done with standard SGD, and an “inner loop” adaptation phase, which computes task specific parameter $\\phi _ { i }$ for the task $\\mathcal { T } _ { i }$ from a support set to make accurate predictions on a query set. For example, in model-agnostic metalearning (MAML), adaptation consists of taking a few gradient steps on the support set, starting from the meta-trained parameter vector $\\theta$ , leading to a set of post-adaptation parameters, and meta-training optimizes the meta-trained parameters $\\theta$ so that these gradient steps lead to good results. Previous extensions of such approaches into the online setting typically observe one task at a time, adapt to that task (i.e., compute post-adaptation parameters on it), and then reset $\\phi _ { i }$ back to the meta-trained parameters $\\theta$ at the beginning of the next task. Thus, the algorithm repeatedly adapts, resets back to pretrained meta parameters at the task boundary, adapts again, and repeats. This is illustrated in Figure 1 (left). However, in many realistic settings, the task boundaries are not known, and instead the tasks shift gradually over time. The discrete “resetting” procedure is a poor fit in such cases, and we would like to simply continue adapting the weights over time without ever resetting back to the meta-trained parameters, still benefit from a concurrent meta-training process. For example, a metatrained image-tagging model on the Internet (e.g., tagging friends in photographs) might gradually adapt to changing patterns and preferences of its users over time, where it would be unnatural to assume discrete shifts in what users want to tag. Similarly, a traffic prediction system might adapt to changing traffic patterns, including periodic changes due to seasons, and unexpected changes due to shifting economic conditions, weather, and accidents. In this spirit, our method does not require any knowledge on the task boundaries as well as stays fully-online through out the learning. ",
|
| 100 |
+
"bbox": [
|
| 101 |
+
174,
|
| 102 |
+
419,
|
| 103 |
+
825,
|
| 104 |
+
698
|
| 105 |
+
],
|
| 106 |
+
"page_idx": 1
|
| 107 |
+
},
|
| 108 |
+
{
|
| 109 |
+
"type": "text",
|
| 110 |
+
"text": "The main contribution of our paper is FOML (fully online meta-learning), an online meta-learning algorithm that continually updates its online parameters with each new datapoint or batch of datapoints, while simultaneously performing meta-gradient updates on a separate set of meta-parameters using a buffer of previously seen data. FOML does not require ground truth knowledge of task boundaries, and does not reset the online parameters back to the meta-parameters between tasks, instead updating the online parameters continually in a fully online fashion. We compare FOML empirically to strong baselines and a state-of-the-art prior online meta-learning method, showing that FOML learns to adapt more quickly, and achieves lower error rates, both on a simple sequential image classification task from prior work and a more complex benchmark that we propose based on the CIFAR100 dataset, with a sequence of 1200 tasks. ",
|
| 111 |
+
"bbox": [
|
| 112 |
+
174,
|
| 113 |
+
704,
|
| 114 |
+
826,
|
| 115 |
+
843
|
| 116 |
+
],
|
| 117 |
+
"page_idx": 1
|
| 118 |
+
},
|
| 119 |
+
{
|
| 120 |
+
"type": "text",
|
| 121 |
+
"text": "2 RELATED WORK ",
|
| 122 |
+
"text_level": 1,
|
| 123 |
+
"bbox": [
|
| 124 |
+
176,
|
| 125 |
+
853,
|
| 126 |
+
344,
|
| 127 |
+
869
|
| 128 |
+
],
|
| 129 |
+
"page_idx": 1
|
| 130 |
+
},
|
| 131 |
+
{
|
| 132 |
+
"type": "text",
|
| 133 |
+
"text": "Online meta-learning brings together ideas from online learning, meta learning, and continual learning, with the aim of adapting quickly to each new task while simultaneously learning how to adapt even more quickly in the future. We discuss these three sets of approaches next. ",
|
| 134 |
+
"bbox": [
|
| 135 |
+
176,
|
| 136 |
+
882,
|
| 137 |
+
825,
|
| 138 |
+
924
|
| 139 |
+
],
|
| 140 |
+
"page_idx": 1
|
| 141 |
+
},
|
| 142 |
+
{
|
| 143 |
+
"type": "text",
|
| 144 |
+
"text": "Meta Learning: Meta learning methods try to learn the high-level context of the data, to behave well on new tasks (Learning to learn). These methods involve learning a metric space Koch et al. (2015); Vinyals et al. (2016); Snell et al. (2017); Yang et al. (2017), gradient based updates Finn et al. (2017); Li et al. (2017); Park & Oliva (2019); Nichol et al. (2018); Nichol & Schulman (2018), or some specific architecture designs Santoro et al. (2016); Munkhdalai & Yu (2017); Ravi & Larochelle (2016). ",
|
| 145 |
+
"bbox": [
|
| 146 |
+
174,
|
| 147 |
+
103,
|
| 148 |
+
826,
|
| 149 |
+
188
|
| 150 |
+
],
|
| 151 |
+
"page_idx": 2
|
| 152 |
+
},
|
| 153 |
+
{
|
| 154 |
+
"type": "text",
|
| 155 |
+
"text": "In this work, we are mainly interested in gradient based meta learning methods for online learning. MAML Finn et al. (2017) and its variants Nichol et al. (2018); Nichol & Schulman (2018); Li et al. $\\textcircled { 2 0 1 7 }$ ; Park & Oliva (2019); Antoniou et al. (2018) first meta train the models in such a way that the meta parameters are close to the optimal task specific parameters (good initialization). This way, adaptation becomes faster when fine tuning from the meta parameters. However, directly adapting this approach into an online setting will require more relaxation on online learning assumptions, such as access to task boundaries and resetting back and froth from meta parameters. Our method does not require knowledge of task boundaries. ",
|
| 156 |
+
"bbox": [
|
| 157 |
+
173,
|
| 158 |
+
194,
|
| 159 |
+
826,
|
| 160 |
+
305
|
| 161 |
+
],
|
| 162 |
+
"page_idx": 2
|
| 163 |
+
},
|
| 164 |
+
{
|
| 165 |
+
"type": "text",
|
| 166 |
+
"text": "Online Learning: Online learning methods update their models based on the stream of data sequentially. There are various works on online learning using linear models Cesa-Bianchi & Lugosi (2006), non-linear models with kernels Kivinen et al. (2004); Jin et al. (2010), and deep neural networks Zhou $\\boxed { \\mathrm { e t ~ a l . } } \\boxed { \\mathbb { 2 0 1 2 } }$ . Online learning algorithms often simply update the model on the new data, and do not consider the past knowledge of the previously seen data to do this online update more efficiently. However, the online meta learning framework, allow us to keep track of previously seen data and with the “meta” knowledge we can update the online weights to the new data more faster and efficiently. ",
|
| 167 |
+
"bbox": [
|
| 168 |
+
173,
|
| 169 |
+
313,
|
| 170 |
+
826,
|
| 171 |
+
410
|
| 172 |
+
],
|
| 173 |
+
"page_idx": 2
|
| 174 |
+
},
|
| 175 |
+
{
|
| 176 |
+
"type": "text",
|
| 177 |
+
"text": "Continual Learning: A number of prior works on continual learning have addressed catastrophic forgetting McCloskey & Cohen (1989); Li & Hoiem (2017); Ratcliff (1990); Rajasegaran et al. $\\bar { ( 2 0 1 9 ) } / \\bar { 2 0 2 0 } \\}$ , removing the need to store all prior data during training. Our method does not address catastrophic forgetting for the meta-training phase, because we must still store all data so as to “replay” it for meta-training, though it may be possible to discard or sub-sample old data (which we leave to future work). However, our adaptation process is fully online. A number of works perform metalearning for better continual learning, i.e. learning good continual learning strategies Al-Shedivat et al. (2017); Nagabandi et al. (2018); Javed & White (2019); Harrison et al. (2019); He et al. (2019); Beaulieu et al. (2020). However, these prior methods still perform batch-mode meta-training. In batch-mode meta-training, these methods first collect all of the past data and train a model with a meta-learning algorithm (e.g. MAML, Reptile) then take this pretrained weights and fine-tune this model with data from new task. Oh the other hand, our method performs the meta-training incrementally online. In other words, we do not stop at a task boundary and train a model will all data, and re-start again, our method continuously update meta-parameters. ",
|
| 178 |
+
"bbox": [
|
| 179 |
+
173,
|
| 180 |
+
416,
|
| 181 |
+
826,
|
| 182 |
+
611
|
| 183 |
+
],
|
| 184 |
+
"page_idx": 2
|
| 185 |
+
},
|
| 186 |
+
{
|
| 187 |
+
"type": "text",
|
| 188 |
+
"text": "The closest work to ours is the follow the meta-leader (FTML) method Finn et al. $\\textcircled { 2 0 1 9 }$ and other online meta-learning methods $\\underline { { \\mathrm { [ Y a o e t a l . ] } } } ( \\underline { { 2 0 2 0 } } )$ . FTML is a variant of MAML that finetunes to each new task in turn, resetting to the meta-trained parameters between every task. While this effectively accelerates acquisition of new tasks, it requires ground truth knowledge of task boundaries and, as we show in our experiments, our approach outperforms FTML even when FTML has access to task boundaries and our method does not. Note that the memory requirements for such methods increase with the number of adaptation gradient steps, and this limitation is also shared by our approach. Online-within-online meta-learning Denevi et al. (2019) also aims to accelerate online updates by leveraging prior tasks, but still requires knowledge of task boundaries. MOCA Harrison et al. (2020) instead aims to infer the task boundaries. In contrast, our method does not even attempt to find the task boundaries, but directly adapts without them. A number of related works also address continual learning via meta-learning, but with the aim of minimizing catastrophic forgetting Gupta et al. (2020); $\\mathtt { \\boxed { C a c c i a e t a l . } } \\mathtt { \\boxed { 2 0 2 0 } }$ . Our aim is not to address catastrophic forgetting. Our method also meta-trains from small datasets for thousands of tasks, whereas prior continual learning approaches typically focus on settings with fewer larger tasks (e.g., 10-100 tasks). ",
|
| 189 |
+
"bbox": [
|
| 190 |
+
173,
|
| 191 |
+
617,
|
| 192 |
+
826,
|
| 193 |
+
825
|
| 194 |
+
],
|
| 195 |
+
"page_idx": 2
|
| 196 |
+
},
|
| 197 |
+
{
|
| 198 |
+
"type": "text",
|
| 199 |
+
"text": "3 FOUNDATIONS ",
|
| 200 |
+
"text_level": 1,
|
| 201 |
+
"bbox": [
|
| 202 |
+
176,
|
| 203 |
+
839,
|
| 204 |
+
328,
|
| 205 |
+
854
|
| 206 |
+
],
|
| 207 |
+
"page_idx": 2
|
| 208 |
+
},
|
| 209 |
+
{
|
| 210 |
+
"type": "text",
|
| 211 |
+
"text": "Prior to diving into online meta learning, we first briefly summarize meta learning, model agnostic meta-learning, and online learning in this section. ",
|
| 212 |
+
"bbox": [
|
| 213 |
+
174,
|
| 214 |
+
859,
|
| 215 |
+
821,
|
| 216 |
+
888
|
| 217 |
+
],
|
| 218 |
+
"page_idx": 2
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"type": "text",
|
| 222 |
+
"text": "Meta-learning: Meta-learning address the problem of learning to learn. It uses the knowledge learned from previous tasks to quickly learn new tasks. Meta-learning assumes that the tasks are drawn from a stationary distribution $\\tau \\sim \\mathbb { P } ( \\tau )$ . During the meta-training phase (outer-loop), $N$ tasks are assumed to be drawn from this distribution to produce the meta-training set, and the model is trained in such a way that, when a new task with its own training and test data $\\mathcal { T } = \\{ \\mathcal { D } _ { \\mathcal { T } } ^ { t r } , \\mathcal { D } _ { \\mathcal { T } } ^ { t e } \\}$ is T Tpresented to it at meta-test time, the model should be able to adapt to this task quickly (inner-loop). Using $\\theta$ to denote the meta-trained parameters, the meta-learning objective is: ",
|
| 223 |
+
"bbox": [
|
| 224 |
+
174,
|
| 225 |
+
895,
|
| 226 |
+
821,
|
| 227 |
+
924
|
| 228 |
+
],
|
| 229 |
+
"page_idx": 2
|
| 230 |
+
},
|
| 231 |
+
{
|
| 232 |
+
"type": "text",
|
| 233 |
+
"text": "",
|
| 234 |
+
"bbox": [
|
| 235 |
+
173,
|
| 236 |
+
102,
|
| 237 |
+
826,
|
| 238 |
+
174
|
| 239 |
+
],
|
| 240 |
+
"page_idx": 3
|
| 241 |
+
},
|
| 242 |
+
{
|
| 243 |
+
"type": "equation",
|
| 244 |
+
"img_path": "images/9f35c6a5eba7566d794e6272f13d79e2718872c6d57bb46c463ace067944374c.jpg",
|
| 245 |
+
"text": "$$\n\\theta ^ { * } = \\arg \\operatorname* { m a x } _ { \\theta } \\mathbb { E } _ { \\mathcal { D } _ { \\mathcal { T } } ^ { t r } \\mathrm { ~ w h e r e ~ } \\mathcal { T } \\sim \\mathbb { P } ( \\mathcal { T } ) } \\left[ \\mathcal { L } ( F _ { \\theta } ( \\mathcal { D } _ { \\mathcal { T } } ^ { t r } ) , \\mathcal { D } _ { \\mathcal { T } } ^ { t e } ) \\right] ,\n$$",
|
| 246 |
+
"text_format": "latex",
|
| 247 |
+
"bbox": [
|
| 248 |
+
321,
|
| 249 |
+
178,
|
| 250 |
+
673,
|
| 251 |
+
200
|
| 252 |
+
],
|
| 253 |
+
"page_idx": 3
|
| 254 |
+
},
|
| 255 |
+
{
|
| 256 |
+
"type": "text",
|
| 257 |
+
"text": "where $F _ { \\theta }$ is the meta-learned adaptation process that reads in the training set $\\mathcal { D } _ { t } ^ { t r }$ and outputs task-specific parameters, prototypes, or features (depending on the method) for the new task $\\tau _ { i }$ . ",
|
| 258 |
+
"bbox": [
|
| 259 |
+
173,
|
| 260 |
+
208,
|
| 261 |
+
823,
|
| 262 |
+
237
|
| 263 |
+
],
|
| 264 |
+
"page_idx": 3
|
| 265 |
+
},
|
| 266 |
+
{
|
| 267 |
+
"type": "text",
|
| 268 |
+
"text": "Model-agnostic meta-learning: In MAML Finn et al. (2017), the inner-loop function is (stochastic) gradient descent. Hence, during the MAML inner-loop adaptation, $F _ { \\theta } ( \\mathcal { D } _ { i } ^ { t r } )$ becomes $\\theta - \\bar { \\alpha } \\nabla \\mathcal { L } _ { \\theta } ( \\theta , \\mathcal { D } _ { i } ^ { t r } )$ (or, more generally, multiple gradient steps). Intuitively, what this means is that meta-training with MAML produces a parameter vector $\\theta$ that can quickly adapt to any task from the meta-training distribution via gradient descent on the task loss. The principle benefits of this is that, when faced with a new task that differs from those seen during meta-training, the algorithm “at worst” adapts with regular gradient descent, and at best is massively accelerated by the meta-training. ",
|
| 269 |
+
"bbox": [
|
| 270 |
+
173,
|
| 271 |
+
242,
|
| 272 |
+
826,
|
| 273 |
+
342
|
| 274 |
+
],
|
| 275 |
+
"page_idx": 3
|
| 276 |
+
},
|
| 277 |
+
{
|
| 278 |
+
"type": "text",
|
| 279 |
+
"text": "Online learning: In online learning, the model faces a sequence of loss functions $\\{ \\mathcal { L } _ { t } \\} _ { t = 1 } ^ { \\infty }$ and a sequence of data $\\{ \\mathcal { D } _ { t } = \\{ ( x , y ) \\} \\} _ { t = 1 } ^ { \\infty }$ for every time step $t$ . The function $f : x \\hat { y }$ maps inputs $x$ to predictions $\\hat { y }$ . The goal of an online learning algorithm is to find a set of parameters for each time step $\\{ \\phi \\} _ { t = 1 } ^ { \\infty }$ , such that the overall loss between the predictions $\\hat { y }$ and the ground truth labels $y$ is minimized over the sequence. This is typically quantified in terms of regret: ",
|
| 280 |
+
"bbox": [
|
| 281 |
+
173,
|
| 282 |
+
347,
|
| 283 |
+
825,
|
| 284 |
+
417
|
| 285 |
+
],
|
| 286 |
+
"page_idx": 3
|
| 287 |
+
},
|
| 288 |
+
{
|
| 289 |
+
"type": "equation",
|
| 290 |
+
"img_path": "images/39f4a99ed9d09647dc3086d906884c357433f422f3fe83fb274822c08e226702.jpg",
|
| 291 |
+
"text": "$$\n\\mathrm { R e g r e t } _ { T } = \\sum _ { t = 1 } ^ { T } \\mathcal L _ { t } ( \\phi , \\mathcal D _ { t } ) - \\sum _ { t = 1 } ^ { T } \\mathcal L _ { t } ( \\phi _ { t } , \\mathcal D _ { t } ) .\n$$",
|
| 292 |
+
"text_format": "latex",
|
| 293 |
+
"bbox": [
|
| 294 |
+
352,
|
| 295 |
+
422,
|
| 296 |
+
645,
|
| 297 |
+
467
|
| 298 |
+
],
|
| 299 |
+
"page_idx": 3
|
| 300 |
+
},
|
| 301 |
+
{
|
| 302 |
+
"type": "text",
|
| 303 |
+
"text": "where, $\\begin{array} { r } { \\phi _ { t } = \\mathrm { a r g m i n } _ { \\phi } \\mathcal { L } _ { t } ( \\phi , \\mathcal { D } _ { t } ) } \\end{array}$ . The first term measures the loss from the online model, and the second term measures the loss of the best possible model on that task. Various online algorithms try to minimize the regret as much as possible when introducing new tasks. ",
|
| 304 |
+
"bbox": [
|
| 305 |
+
174,
|
| 306 |
+
470,
|
| 307 |
+
825,
|
| 308 |
+
513
|
| 309 |
+
],
|
| 310 |
+
"page_idx": 3
|
| 311 |
+
},
|
| 312 |
+
{
|
| 313 |
+
"type": "text",
|
| 314 |
+
"text": "4 ONLINE META-LEARNING: PROBLEM STATEMENT AND METHODS",
|
| 315 |
+
"text_level": 1,
|
| 316 |
+
"bbox": [
|
| 317 |
+
173,
|
| 318 |
+
518,
|
| 319 |
+
759,
|
| 320 |
+
536
|
| 321 |
+
],
|
| 322 |
+
"page_idx": 3
|
| 323 |
+
},
|
| 324 |
+
{
|
| 325 |
+
"type": "text",
|
| 326 |
+
"text": "In an online meta-learning setting Finn et al. $\\underline { { \\left( 2 0 1 9 \\right) } }$ , the model $f _ { \\phi }$ observes datapoints one at a time from an online data stream $s$ . Each datapoint consists of an input $\\ v { x } _ { m } ^ { t }$ , where $t$ is the task index and $m$ is the index of the datapoint within that task, and a label $y _ { m } ^ { t }$ . The task changes over time and the model should be able to update the parameters $\\phi$ to minimize the loss at each time step. The goal of online meta-learning is to quickly learn each new task $\\mathcal { T } _ { t }$ and perform well as soon as possible according to the specified loss function. ",
|
| 327 |
+
"bbox": [
|
| 328 |
+
173,
|
| 329 |
+
541,
|
| 330 |
+
826,
|
| 331 |
+
630
|
| 332 |
+
],
|
| 333 |
+
"page_idx": 3
|
| 334 |
+
},
|
| 335 |
+
{
|
| 336 |
+
"type": "text",
|
| 337 |
+
"text": "Here, we define a task as a group of samples based on some discrete variable properties in the samples. For example, it can be grouped by classes, a set of classes, semantic categories or time stamp etc. A simple baseline solution would be to just train the model on the current task $\\mathcal { T } _ { t }$ . We denote this baseline as TFS (Train from Scratch). For every new task, the model simply trains a new set of parameters using all of the data from the current task $\\mathcal { T } _ { t }$ that has been seen so far: ",
|
| 338 |
+
"bbox": [
|
| 339 |
+
173,
|
| 340 |
+
636,
|
| 341 |
+
826,
|
| 342 |
+
705
|
| 343 |
+
],
|
| 344 |
+
"page_idx": 3
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"type": "equation",
|
| 348 |
+
"img_path": "images/96538c0dc7e227221ccd33acfb30f2a9bbf7bb73a55b9411367beb490075e7be.jpg",
|
| 349 |
+
"text": "$$\n\\phi _ { T F S } ^ { t } = \\arg \\operatorname* { m i n } _ { \\phi } \\frac { 1 } { M } \\sum _ { m = 1 } ^ { M } \\mathcal { L } _ { t } ( \\phi , ( x _ { m } ^ { t } , y _ { m } ^ { t } ) ) .\n$$",
|
| 350 |
+
"text_format": "latex",
|
| 351 |
+
"bbox": [
|
| 352 |
+
354,
|
| 353 |
+
704,
|
| 354 |
+
643,
|
| 355 |
+
747
|
| 356 |
+
],
|
| 357 |
+
"page_idx": 3
|
| 358 |
+
},
|
| 359 |
+
{
|
| 360 |
+
"type": "text",
|
| 361 |
+
"text": "TFS has two issues. First, it requires the task boundaries to be known, which can make it difficult to apply to settings where this information is not available. Second, it does not utilize knowledge from other tasks, which greatly limits its performance even when task boundaries are available. ",
|
| 362 |
+
"bbox": [
|
| 363 |
+
174,
|
| 364 |
+
751,
|
| 365 |
+
825,
|
| 366 |
+
794
|
| 367 |
+
],
|
| 368 |
+
"page_idx": 3
|
| 369 |
+
},
|
| 370 |
+
{
|
| 371 |
+
"type": "text",
|
| 372 |
+
"text": "A straightforward way to utilize knowledge from other tasks in the online data stream is to store all the seen tasks in a large buffer $\\boldsymbol { B }$ , and simply keep training the model on all of the seen tasks. We will refer to this baseline method as TOE (Train on Everything): ",
|
| 373 |
+
"bbox": [
|
| 374 |
+
173,
|
| 375 |
+
800,
|
| 376 |
+
825,
|
| 377 |
+
843
|
| 378 |
+
],
|
| 379 |
+
"page_idx": 3
|
| 380 |
+
},
|
| 381 |
+
{
|
| 382 |
+
"type": "equation",
|
| 383 |
+
"img_path": "images/59d472785ca70a5d35147a68b1d2aec489b1e8dd43ec6bd81bdfe4b434e055cc.jpg",
|
| 384 |
+
"text": "$$\n\\phi _ { T O E } ^ { t } = \\arg \\operatorname* { m i n } _ { \\phi } \\frac { 1 } { M t } \\sum _ { i = 1 } ^ { t } \\sum _ { m = 1 } ^ { M } \\mathcal { L } _ { i } ( \\phi , ( x _ { m } ^ { i } , y _ { m } ^ { i } ) ) .\n$$",
|
| 385 |
+
"text_format": "latex",
|
| 386 |
+
"bbox": [
|
| 387 |
+
338,
|
| 388 |
+
847,
|
| 389 |
+
658,
|
| 390 |
+
892
|
| 391 |
+
],
|
| 392 |
+
"page_idx": 3
|
| 393 |
+
},
|
| 394 |
+
{
|
| 395 |
+
"type": "text",
|
| 396 |
+
"text": "TOE learns a function that fits all of the previously seen samples. However, this function may be far from optimal for the task at hand, because the different tasks may be mutually exclusive. Therefore, fitting a single model on all of the previously seen tasks might not provide a good task-specific model for the current task. A more sophisticated baseline, which we refer to as FTL (Follow the Leader), pre-trains a model on all of the previous tasks, and then fine-tunes it only on the data from the current task. Note that this is subtly different from FTL in the classic online learning setting, due to the difference in problem formulation. This can be achieved by initializing $\\phi$ with pretrained weights up to the previous task $\\phi _ { T O E } ^ { t - 1 }$ : ",
|
| 397 |
+
"bbox": [
|
| 398 |
+
173,
|
| 399 |
+
895,
|
| 400 |
+
825,
|
| 401 |
+
924
|
| 402 |
+
],
|
| 403 |
+
"page_idx": 3
|
| 404 |
+
},
|
| 405 |
+
{
|
| 406 |
+
"type": "text",
|
| 407 |
+
"text": "",
|
| 408 |
+
"bbox": [
|
| 409 |
+
174,
|
| 410 |
+
103,
|
| 411 |
+
825,
|
| 412 |
+
188
|
| 413 |
+
],
|
| 414 |
+
"page_idx": 4
|
| 415 |
+
},
|
| 416 |
+
{
|
| 417 |
+
"type": "equation",
|
| 418 |
+
"img_path": "images/b4a91f39f8a9b6952a9f9a860f40bec7362ba5366226983363fce4f4b3cb7e6c.jpg",
|
| 419 |
+
"text": "$$\n\\phi _ { F T L } ^ { \\mathrm { { \\large { t } } } } = \\arg \\operatorname* { m i n } _ { \\phi } \\frac { 1 } { M } \\sum _ { m = 1 } ^ { M } \\mathcal { L } _ { t } ( \\phi _ { T O E } ^ { t - 1 } , ( x _ { m } ^ { t } , y _ { m } ^ { t } ) ) .\n$$",
|
| 420 |
+
"text_format": "latex",
|
| 421 |
+
"bbox": [
|
| 422 |
+
339,
|
| 423 |
+
178,
|
| 424 |
+
656,
|
| 425 |
+
220
|
| 426 |
+
],
|
| 427 |
+
"page_idx": 4
|
| 428 |
+
},
|
| 429 |
+
{
|
| 430 |
+
"type": "text",
|
| 431 |
+
"text": "Here, for the task $t$ , we take a model that is pre-trained on all previously seen tasks $( f _ { \\phi _ { T O E } ^ { t - 1 } } )$ and fine-tune on the current task data. In this way, FTL can use the past knowledge to more quickly adapt to the new task. However, pre-training on past tasks may not necessarily result in an initialization that is conducive to fast adaptation Finn et al. (2017); Nichol et al. (2018); Nichol & Schulman (2018); Li $\\boxed { \\mathrm { e t ~ a l . } } \\textcircled { 1 2 0 1 7 }$ . Finn et al. Finn et al. $\\mathbb { Z 0 1 9 }$ proposed a MAML-based online meta-learning approach, where MAML is used to meta-train a “meta-leader” model on all previously seen tasks, which is then adapted on all data from the current task. This way, the meta-leader parameters will be much closer to new task optimal parameters, and because of this it is much faster to adapt to new tasks from the online data. ",
|
| 432 |
+
"bbox": [
|
| 433 |
+
173,
|
| 434 |
+
226,
|
| 435 |
+
826,
|
| 436 |
+
343
|
| 437 |
+
],
|
| 438 |
+
"page_idx": 4
|
| 439 |
+
},
|
| 440 |
+
{
|
| 441 |
+
"type": "equation",
|
| 442 |
+
"img_path": "images/a0b30c9d079f01a9499653cb68fbd6a767f402f767d7096f577434db765a57b4.jpg",
|
| 443 |
+
"text": "$$\n\\begin{array} { r } { \\phi _ { F T M L } ^ { t } = \\underset { \\phi _ { M A M L } ^ { t - 1 } } { \\arg \\operatorname* { m i n } } \\mathbb { E } _ { ( x _ { m } ^ { t } , y _ { m } ^ { t } ) \\sim T _ { t } } [ \\mathcal { L } _ { t } \\big ( \\phi _ { M A M L } ^ { t - 1 } , ( x _ { m } ^ { t } , y _ { m } ^ { t } ) \\big ) ] . } \\\\ { \\mathrm { w h e r e } , ~ \\phi _ { M A M L } ^ { t - 1 } = \\underset { \\phi } { \\arg \\operatorname* { m i n } } \\mathbb { E } _ { T _ { j } \\sim \\mathcal { D } ( T _ { t - 1 } ) } [ \\mathcal { L } _ { j } \\big ( \\phi - \\nabla \\mathcal { L } _ { j } ( \\phi , \\mathcal { D } _ { j } ^ { t r } ) , \\mathcal { D } _ { j } ^ { t e } ) ] . } \\end{array}\n$$",
|
| 444 |
+
"text_format": "latex",
|
| 445 |
+
"bbox": [
|
| 446 |
+
279,
|
| 447 |
+
340,
|
| 448 |
+
715,
|
| 449 |
+
398
|
| 450 |
+
],
|
| 451 |
+
"page_idx": 4
|
| 452 |
+
},
|
| 453 |
+
{
|
| 454 |
+
"type": "text",
|
| 455 |
+
"text": "Here, FTML algorithm first train a model using MAML algorithm on last seen t-1 tasks $\\mathcal { T } _ { t - 1 } =$ $\\{ T _ { 1 } , T _ { 2 } , . . . , T _ { t - 1 } \\}$ to generate a meta-weights $\\phi _ { M A M L } ^ { t - 1 }$ (Eq.7). After this pre-training stage, FTML algorithm fine-tunes the meta-weights using the data from next tasks to find optimal parameters $\\phi _ { F T M L } ^ { t }$ for task t. FTL and FTML aim to efficiently use knowledge from past tasks to quickly adapt to the new task. However, the pre-trained weights from FTL do not guarantee fast adaptation, and both methods require ground-truth task boundaries. This assumption may not be realistic in real-world settings, where the tasks may change gradually and no external information is available to indicate task transitions. Although FTML can enable fast adaptation, the model needs to be “reset” at each task, essentially creating a “branch” on each task. This requires maintaining two independent learning processes: a) an adaptation process, whose result is discarded completely at the end of the task, and b) a meta-training process, which does not influence the current task at all, and is only used for forward transfer into future tasks. See Figure 1 for the branching in standard meta learning setting. This branching at task boundaries and “resetting” after the adaptation makes these the parameter trajectory not continuous, hence we argue that FTL and FTML are not fully online. In this work, our aim is to develop a fully online meta-learning method that continually performs both “fast” updates and “slow” meta-updates, does not periodically “reset” the adapted parameters back to the meta-parameters, and does not require any ground truth knowledge of task boundaries. ",
|
| 456 |
+
"bbox": [
|
| 457 |
+
173,
|
| 458 |
+
404,
|
| 459 |
+
825,
|
| 460 |
+
642
|
| 461 |
+
],
|
| 462 |
+
"page_idx": 4
|
| 463 |
+
},
|
| 464 |
+
{
|
| 465 |
+
"type": "text",
|
| 466 |
+
"text": "5 FULLY ONLINE META-LEARNING WITHOUT TASK BOUNDARIES ",
|
| 467 |
+
"text_level": 1,
|
| 468 |
+
"bbox": [
|
| 469 |
+
174,
|
| 470 |
+
656,
|
| 471 |
+
743,
|
| 472 |
+
672
|
| 473 |
+
],
|
| 474 |
+
"page_idx": 4
|
| 475 |
+
},
|
| 476 |
+
{
|
| 477 |
+
"type": "text",
|
| 478 |
+
"text": "We first discuss the intuition behind how our approach handles online meta-learning without task boundaries. In many real-world tasks, we might expect the tasks in the online data stream to change gradually. This makes it very hard to draw a clear boundary between the tasks. Therefore, it is necessary to relax task boundary assumption if we want a robust online learner that can work on a real-world data stream. Additionally, since nearby data points are most likely to belong to the same or similar task, we would expect adaptation to each new data point to be much faster from a model that has already been adapted to other recent data points. ",
|
| 479 |
+
"bbox": [
|
| 480 |
+
173,
|
| 481 |
+
680,
|
| 482 |
+
825,
|
| 483 |
+
779
|
| 484 |
+
],
|
| 485 |
+
"page_idx": 4
|
| 486 |
+
},
|
| 487 |
+
{
|
| 488 |
+
"type": "text",
|
| 489 |
+
"text": "FOML maintains two separate parameter vectors for the online updates $( \\phi )$ and the meta updates $\\mathbf { \\eta } ^ { ( \\theta ) }$ . Both parameterize the same architecture, such that $f _ { \\phi }$ and $f _ { \\theta }$ represent the same neural network, but with different weights. The online model continuously reads in the latest datapoints from the online data stream, and updates the parameters $\\phi$ in online fashion, without any boundaries or resets. However, simply updating the online model on each data point naïvely will not meta-train it to adapt more quickly, and may even result in drift, where the model forgets prior data. Therefore, we also incorporate a regularizer into the online update that is determined by a concurrent meta-learning process (see Fig. $\\overline { { 2 } } )$ . Note that FOML only incorporates the meta-parameters into the online updates via the meta-learned regularization term, without ever resetting the online parameters back to the meta-parameters (in contrast, e.g., to FTML Finn et al. (2019)) ",
|
| 490 |
+
"bbox": [
|
| 491 |
+
173,
|
| 492 |
+
785,
|
| 493 |
+
825,
|
| 494 |
+
926
|
| 495 |
+
],
|
| 496 |
+
"page_idx": 4
|
| 497 |
+
},
|
| 498 |
+
{
|
| 499 |
+
"type": "text",
|
| 500 |
+
"text": "The meta-updates of previous MAML-based online meta-learning approaches involve sampling data from all of the tasks seen so far, and then updating the meta-parameters $\\theta$ based on the derivatives of the MAML objective. This provides a diverse sampling of tasks for the meta update, though it requires storing all of the seen data $\\boxed { \\mathrm { F i n n ~ e t ~ a l . } } \\textcircled { 2 0 1 9 }$ . We also use a MAML-style update for the meta parameters, and also require storing the previously seen data. To this end, we will use $\\boldsymbol { B }$ to denote a buffer containing all of the data seen so far. Each new datapoint is added to $\\boldsymbol { B }$ once the label is observed. ",
|
| 501 |
+
"bbox": [
|
| 502 |
+
173,
|
| 503 |
+
103,
|
| 504 |
+
825,
|
| 505 |
+
200
|
| 506 |
+
],
|
| 507 |
+
"page_idx": 5
|
| 508 |
+
},
|
| 509 |
+
{
|
| 510 |
+
"type": "text",
|
| 511 |
+
"text": "However, since we do not assume knowledge of task boundaries, we cannot sample entire tasks from $\\boldsymbol { B }$ , but instead must sample individual datapoints. We therefore adopt a different strategy, which we describe in Section $\\boxed { 5 . 2 }$ as shown in $\\mathrm { F i g } { \\overline { { \\bigcirc } } }$ instead of aiming to sample in complete tasks from the data buffer, we simply sample random past datapoints, and meta-train the regularizer so that the online updates retain good performance on all past data. We find that this strategy is effective at accelerating acquisition of future tasks in online meta-learning settings where the tasks are not mutual exclusive. We define both types of updates in detail in the next sections. ",
|
| 512 |
+
"bbox": [
|
| 513 |
+
173,
|
| 514 |
+
208,
|
| 515 |
+
825,
|
| 516 |
+
305
|
| 517 |
+
],
|
| 518 |
+
"page_idx": 5
|
| 519 |
+
},
|
| 520 |
+
{
|
| 521 |
+
"type": "image",
|
| 522 |
+
"img_path": "images/6324b8603a44252fe35de3caed33f7cd2b96a7f4907d4e95dcf116c0e01fb04c.jpg",
|
| 523 |
+
"image_caption": [
|
| 524 |
+
"Figure 2: Overview of FOML learning: FOMLupdates the online parameters $\\phi$ using only the most recent $K$ datapoints from the buffer $\\boldsymbol { B }$ . Meta-learning learns a regularizer, parameterized by meta-parameters $\\theta$ , via second-order MAML-style updates. The goal of metalearning is to make $\\phi$ perform well on randomly sampled prior datapoints after performing $K$ steps with the metatrained regularizer. "
|
| 525 |
+
],
|
| 526 |
+
"image_footnote": [],
|
| 527 |
+
"bbox": [
|
| 528 |
+
178,
|
| 529 |
+
315,
|
| 530 |
+
482,
|
| 531 |
+
422
|
| 532 |
+
],
|
| 533 |
+
"page_idx": 5
|
| 534 |
+
},
|
| 535 |
+
{
|
| 536 |
+
"type": "text",
|
| 537 |
+
"text": "5.1 FULLY ONLINE ADAPTATION ",
|
| 538 |
+
"text_level": 1,
|
| 539 |
+
"bbox": [
|
| 540 |
+
174,
|
| 541 |
+
433,
|
| 542 |
+
416,
|
| 543 |
+
446
|
| 544 |
+
],
|
| 545 |
+
"page_idx": 5
|
| 546 |
+
},
|
| 547 |
+
{
|
| 548 |
+
"type": "text",
|
| 549 |
+
"text": "At each time step, FOML observes a data point $x _ { t }$ , predicts its label $\\hat { y } _ { t }$ , then receives the true label $y _ { t }$ and updates the online parameters. In practice, we make updates after observing $N$ new datapoints $N = 1 0$ in our experiments), so as to reduce the variance of the gradient updates. We create a small dataset $\\mathcal { D } _ { t r } ^ { j }$ with these $N$ datapoints for the time step $j$ . The true label for these datapoints can be from class labels, annotations, rewards, or even self-supervision, though we focus on the supervised classification setting in our experiments. ",
|
| 550 |
+
"bbox": [
|
| 551 |
+
173,
|
| 552 |
+
450,
|
| 553 |
+
825,
|
| 554 |
+
537
|
| 555 |
+
],
|
| 556 |
+
"page_idx": 5
|
| 557 |
+
},
|
| 558 |
+
{
|
| 559 |
+
"type": "text",
|
| 560 |
+
"text": "However, the online updates are based only on the most recent samples, and do not make use of any past data. Therefore, we need some mechanism for the (slower) meta-training process to “transfer” the knowledge it is distilling from the prior tasks into this online parameter vector. We can instantiate such a mechanism by introducing a regularizer into the online parameter update that depends on the meta-parameters $\\theta$ , which we denote as $\\mathcal { R } ( \\phi , \\theta )$ . While a variety of parameterizations could be used for $\\mathcal { R } ( \\phi , \\theta )$ , we opt for a simple squared error term of the form $\\mathcal { R } ( \\bar { \\phi } , \\theta ) = ( \\phi - \\theta ) ^ { 2 }$ , resulting in the following online update at each step $j$ : ",
|
| 561 |
+
"bbox": [
|
| 562 |
+
176,
|
| 563 |
+
544,
|
| 564 |
+
823,
|
| 565 |
+
641
|
| 566 |
+
],
|
| 567 |
+
"page_idx": 5
|
| 568 |
+
},
|
| 569 |
+
{
|
| 570 |
+
"type": "equation",
|
| 571 |
+
"img_path": "images/1375cad56fa06150fe7906e8f2a728eb8e7da9619009f0019eff5afcc39dab70.jpg",
|
| 572 |
+
"text": "$$\n\\begin{array} { r l } & { \\phi ^ { j } = \\phi ^ { j - 1 } - \\alpha _ { 1 } \\nabla _ { \\phi ^ { j - 1 } } \\{ \\mathcal { L } ( \\phi ^ { j - 1 } ; \\mathcal { D } _ { t r } ^ { j } ) + \\beta _ { 1 } \\mathcal { R } ( \\phi ^ { j - 1 } , \\theta ) \\} } \\\\ & { \\quad = \\phi ^ { j - 1 } - \\underbrace { \\alpha _ { 1 } \\nabla _ { \\phi ^ { j - 1 } } \\mathcal { L } ( \\phi ^ { j - 1 } ; \\mathcal { D } _ { t r } ^ { j } ) } _ { \\mathrm { t a s k ~ s p e c i f i c ~ u p d a t e } } + \\underbrace { 2 \\alpha _ { 1 } \\beta _ { 1 } ( \\theta - \\phi ^ { j - 1 } ) } _ { \\mathrm { m e t a ~ d i r e c t i o n a l ~ u p d a t e } } } \\end{array}\n$$",
|
| 573 |
+
"text_format": "latex",
|
| 574 |
+
"bbox": [
|
| 575 |
+
308,
|
| 576 |
+
646,
|
| 577 |
+
687,
|
| 578 |
+
705
|
| 579 |
+
],
|
| 580 |
+
"page_idx": 5
|
| 581 |
+
},
|
| 582 |
+
{
|
| 583 |
+
"type": "text",
|
| 584 |
+
"text": "In the case of classification, $\\mathcal { L }$ is the cross-entropy loss. $\\alpha _ { 1 } , \\beta _ { 1 }$ are hyperparameters. ",
|
| 585 |
+
"bbox": [
|
| 586 |
+
174,
|
| 587 |
+
713,
|
| 588 |
+
723,
|
| 589 |
+
728
|
| 590 |
+
],
|
| 591 |
+
"page_idx": 5
|
| 592 |
+
},
|
| 593 |
+
{
|
| 594 |
+
"type": "text",
|
| 595 |
+
"text": "Next, we discuss how these meta-parameters are trained so as to maximize the effectiveness of this regularizer at accelerating adaption to new tasks. ",
|
| 596 |
+
"bbox": [
|
| 597 |
+
174,
|
| 598 |
+
734,
|
| 599 |
+
825,
|
| 600 |
+
762
|
| 601 |
+
],
|
| 602 |
+
"page_idx": 5
|
| 603 |
+
},
|
| 604 |
+
{
|
| 605 |
+
"type": "text",
|
| 606 |
+
"text": "5.2 META-LEARNING WITHOUT TASK BOUNDARIES ",
|
| 607 |
+
"text_level": 1,
|
| 608 |
+
"bbox": [
|
| 609 |
+
174,
|
| 610 |
+
772,
|
| 611 |
+
552,
|
| 612 |
+
786
|
| 613 |
+
],
|
| 614 |
+
"page_idx": 5
|
| 615 |
+
},
|
| 616 |
+
{
|
| 617 |
+
"type": "text",
|
| 618 |
+
"text": "As discussed in the previous section, the online updates to $\\phi ^ { j }$ include a regularizer $\\mathcal { R }$ that transfers knowledge from the meta-parameters $\\theta$ into each online update. Additionally, our method maintains a buffer $\\boldsymbol { B }$ containing all data seen so far, which is used for the meta-update. ",
|
| 619 |
+
"bbox": [
|
| 620 |
+
173,
|
| 621 |
+
790,
|
| 622 |
+
825,
|
| 623 |
+
833
|
| 624 |
+
],
|
| 625 |
+
"page_idx": 5
|
| 626 |
+
},
|
| 627 |
+
{
|
| 628 |
+
"type": "text",
|
| 629 |
+
"text": "In contrast to prior methods, which explicitly draw a training and validation set from the buffer (i.e., a query and support set) and then perform a separate “inner loop” update on this training set Finn $\\boxed { \\dot { \\mathrm { e t ~ a l . } } } \\boxed { ( 2 0 1 9 ) }$ , our meta-updates recycle the inner loop adaptation that is already performed via the online updates, and therefore we only draw a validation set $\\mathcal { D } _ { v a l } ^ { m }$ from the buffer $\\boldsymbol { B }$ . Specifically, we sample a set of using the gradi $N$ datapoints at rt of the loss on m from and th $\\boldsymbol { B }$ to form egulariz $\\mathcal { D } _ { v a l } ^ { m }$ . We then upafter the last e the meta-updates on rameters . $\\theta$ $\\mathcal { D } _ { v a l } ^ { m }$ $\\mathcal { R }$ $K$ $\\phi$ ",
|
| 630 |
+
"bbox": [
|
| 631 |
+
173,
|
| 632 |
+
840,
|
| 633 |
+
825,
|
| 634 |
+
924
|
| 635 |
+
],
|
| 636 |
+
"page_idx": 5
|
| 637 |
+
},
|
| 638 |
+
{
|
| 639 |
+
"type": "text",
|
| 640 |
+
"text": "In other words, we adjust the meta-parameters in such a way that, if an online update is regularized with this meta-weights, then the loss on the online update will be minimized. This can be expressed via following meta update: ",
|
| 641 |
+
"bbox": [
|
| 642 |
+
174,
|
| 643 |
+
103,
|
| 644 |
+
825,
|
| 645 |
+
143
|
| 646 |
+
],
|
| 647 |
+
"page_idx": 6
|
| 648 |
+
},
|
| 649 |
+
{
|
| 650 |
+
"type": "equation",
|
| 651 |
+
"img_path": "images/fccf158fa3293b6298f4425c9ae5da1aa72cad58202faa76aeb61bfc4f13f9dc.jpg",
|
| 652 |
+
"text": "$$\n\\left. \\begin{array} { l } { { \\displaystyle { \\sf I a t e } : \\int } _ { } \\\\ { { \\theta = \\theta - \\alpha _ { 2 } \\nabla _ { \\theta } \\left\\{ { \\mathcal L } \\left( \\phi ^ { j } ; { \\mathcal D } _ { v a l } ^ { m } \\right) + \\beta _ { 2 } \\sum _ { k = 0 } ^ { K } { \\mathcal R } ( \\theta , \\phi ^ { j - k } ) \\right\\} } } } \\end{array} \\right.\n$$",
|
| 653 |
+
"text_format": "latex",
|
| 654 |
+
"bbox": [
|
| 655 |
+
325,
|
| 656 |
+
137,
|
| 657 |
+
673,
|
| 658 |
+
179
|
| 659 |
+
],
|
| 660 |
+
"page_idx": 6
|
| 661 |
+
},
|
| 662 |
+
{
|
| 663 |
+
"type": "text",
|
| 664 |
+
"text": "Here, the $\\phi ^ { j }$ has dependence on $\\theta$ due to the previous online update as shown in Eq. 9. Subsequently, $\\theta$ and $\\phi ^ { j }$ are only related via regularization term, unlike FTML Finn et al. (2019), which sets $\\phi ^ { 0 } = \\theta$ at every task boundary. ",
|
| 665 |
+
"bbox": [
|
| 666 |
+
176,
|
| 667 |
+
181,
|
| 668 |
+
825,
|
| 669 |
+
224
|
| 670 |
+
],
|
| 671 |
+
"page_idx": 6
|
| 672 |
+
},
|
| 673 |
+
{
|
| 674 |
+
"type": "text",
|
| 675 |
+
"text": "The choice of sampling $\\mathcal { D } _ { v a l } ^ { m }$ at random from $\\boldsymbol { B }$ has several interpretations. We can interpret this as regularizing $\\phi$ to prevent the online parameters from drifting away from solutions that also work well on the entire data buffer. However, this interpretation is incomplete, since the meta-update doesn’t simply keep $\\phi$ close to a single parameter vector that works well on $\\mathcal { D } _ { v a l } ^ { m }$ , but rather changes the regularizer so that gradient updates with that regularizer maximally improve performance on $\\mathcal { D } _ { v a l } ^ { m }$ . This has the effect of actually accelerating how quickly $\\phi$ can adapt to new tasks using this regularizer, so long as past tasks are reasonably representative of prior tasks. We experimentally verify this claim in our experiments. Note, however, that this scheme does assume that the tasks are not mutually exclusive. We summarize the complete algorithm in Algorithm 1. ",
|
| 676 |
+
"bbox": [
|
| 677 |
+
173,
|
| 678 |
+
231,
|
| 679 |
+
826,
|
| 680 |
+
358
|
| 681 |
+
],
|
| 682 |
+
"page_idx": 6
|
| 683 |
+
},
|
| 684 |
+
{
|
| 685 |
+
"type": "text",
|
| 686 |
+
"text": "Algorithm 1 Online Meta Learning with FOML ",
|
| 687 |
+
"text_level": 1,
|
| 688 |
+
"bbox": [
|
| 689 |
+
174,
|
| 690 |
+
371,
|
| 691 |
+
490,
|
| 692 |
+
385
|
| 693 |
+
],
|
| 694 |
+
"page_idx": 6
|
| 695 |
+
},
|
| 696 |
+
{
|
| 697 |
+
"type": "table",
|
| 698 |
+
"img_path": "images/8a827646ad564d0c72125847d74019058795c00fc2d263ab6b4911e3ae95850d.jpg",
|
| 699 |
+
"table_caption": [],
|
| 700 |
+
"table_footnote": [],
|
| 701 |
+
"table_body": "<table><tr><td colspan=\"2\">1: procedure META TRAINING</td></tr><tr><td>2: Require:0,B,,BufferB,Data streamS</td><td> Initiate ° with .</td></tr><tr><td>3: ←</td><td></td></tr><tr><td>4:</td><td>while Data stream S available do</td></tr><tr><td>5: D↑S</td><td>V get new data from online data-stream</td></tr><tr><td>6: B↑B+Dj</td><td>>add new data to the buffer</td></tr><tr><td>7:</td><td>DDa←D > partition the data into train and validation splits</td></tr><tr><td>8:</td><td>ytr←fj-1(Dr) > make predictions on the train set</td></tr><tr><td>9: ↑11</td><td>-α1VΦj-1{Ltask(Φì-1;D𝑖r)+βR(ρj-1,0)}</td></tr><tr><td>10: yval←(Dval)</td><td>>Evaluate the updated model on the validation set</td></tr><tr><td>11: Dmt ~ random-sample(B)</td><td>> sample random batch from buffer</td></tr><tr><td>12:</td><td>0←0-a2VθLtask(Φ;Dmt)</td></tr><tr><td>13: j←j+1</td><td></td></tr></table>",
|
| 702 |
+
"bbox": [
|
| 703 |
+
176,
|
| 704 |
+
388,
|
| 705 |
+
826,
|
| 706 |
+
569
|
| 707 |
+
],
|
| 708 |
+
"page_idx": 6
|
| 709 |
+
},
|
| 710 |
+
{
|
| 711 |
+
"type": "text",
|
| 712 |
+
"text": "6 EXPERIMENTAL EVALUATION ",
|
| 713 |
+
"text_level": 1,
|
| 714 |
+
"bbox": [
|
| 715 |
+
178,
|
| 716 |
+
577,
|
| 717 |
+
450,
|
| 718 |
+
592
|
| 719 |
+
],
|
| 720 |
+
"page_idx": 6
|
| 721 |
+
},
|
| 722 |
+
{
|
| 723 |
+
"type": "text",
|
| 724 |
+
"text": "Our experiments focus on online meta-learning of image classification tasks. In these settings, an effective algorithm should adapt to changing tasks as quickly as possible, rapidly identify when the task has changed, and adjust its parameters accordingly. Furthermore, a successful algorithm should make use of past task shifts to meta-learn effectively, thus accelerating the speed with which it adapts to future task changes. In all cases, the algorithm receives one data point at a time, and the task changes periodically. In order to allow for a comparison with prior methods, which generally assume known task boundaries, the data stream is partitioned into discrete tasks, but our algorithm is not aware of which datapoint belongs to which tasks or where the boundaries occur. The prior methods, in contrast, are provided with this information, thus giving them an advantage. We first describe the specific task formulations, and then the prior methods that we compare to. ",
|
| 725 |
+
"bbox": [
|
| 726 |
+
173,
|
| 727 |
+
595,
|
| 728 |
+
825,
|
| 729 |
+
736
|
| 730 |
+
],
|
| 731 |
+
"page_idx": 6
|
| 732 |
+
},
|
| 733 |
+
{
|
| 734 |
+
"type": "text",
|
| 735 |
+
"text": "Online meta-learning should adapt to each task as quickly as possible, and use data from past to accelerate acquisition of future tasks. We report our learning curves, with one axis corresponding to the number of seen tasks, and the other axis corresponding to the cumulative error rate on that task. This error rate is computed using a held-out validation data for the task after adaptation. ",
|
| 736 |
+
"bbox": [
|
| 737 |
+
174,
|
| 738 |
+
742,
|
| 739 |
+
825,
|
| 740 |
+
797
|
| 741 |
+
],
|
| 742 |
+
"page_idx": 6
|
| 743 |
+
},
|
| 744 |
+
{
|
| 745 |
+
"type": "text",
|
| 746 |
+
"text": "We evaluate prior online meta-learning methods and baselines on three different datasets (RainbowMNIST, CIFAR100 and CELEBA). TOE (train on everything), TFS (train from scratch), FTL (follow the leader), FTML (follow the meta-leader) Finn et al. (2019), LwF Li & Hoiem (2017), iCaRL Rebuffi et al. (2016) and MOCA Harrison et al. (2020) are the baseline methods we compare against our method FOML. See Section 4 for more detailed description of these methods. Please see Appendix A.2 for more details on the baseline methods. ",
|
| 747 |
+
"bbox": [
|
| 748 |
+
174,
|
| 749 |
+
804,
|
| 750 |
+
825,
|
| 751 |
+
890
|
| 752 |
+
],
|
| 753 |
+
"page_idx": 6
|
| 754 |
+
},
|
| 755 |
+
{
|
| 756 |
+
"type": "text",
|
| 757 |
+
"text": "Datasets: We compare TOE, TFS, FTL, FTML, LwF, iCaLR and FOML on three different datasets. Rainbow-MNIST Finn et al. (2019) was created by changing the background color, scale and rotation of the MNIST dataset. It includes 7 different background colors, 2 scales (full and half) and 4 different rotations. This leads to a total of 56 number of tasks. Each individual task is to classify the images into 10 classes. We use the same partition with 900 samples per each task, as in prior work Finn $\\boxed { \\mathrm { e t ~ a l . } } \\textcircled { 2 0 1 9 }$ . However, this task contains relatively simple images, and only 56 tasks. To create a much longer task sequence with significantly more realistic images, we modified the CIFAR-100 and CELEBA datasets to create an online meta-learning benchmark, which we call online-CIFAR100 and online-CELEBA, respectively. Every task is a randomly sampled set of classes, and the goal is to classify whether two images in this set belongs to same class or not. Specifically, each task corresponds to 5 classes, and every datapoint consists of a pair of images, each corresponding to one of the 5 classes for that task. The goal is to predict whether the two images belong to the same class or not. Note that different tasks are not mutually exclusive, which in principle should favor a TOE-style method, since meta-learning is known to underperform with non-mutually-exclusive tasks Yin et al. $\\textcircled { 2 0 1 9 }$ . To make sure the data distribution changes smoothly over tasks, we only change a subset of the classes between consecutive tasks. ",
|
| 758 |
+
"bbox": [
|
| 759 |
+
173,
|
| 760 |
+
895,
|
| 761 |
+
825,
|
| 762 |
+
925
|
| 763 |
+
],
|
| 764 |
+
"page_idx": 6
|
| 765 |
+
},
|
| 766 |
+
{
|
| 767 |
+
"type": "image",
|
| 768 |
+
"img_path": "images/0d87dc0631d4148160dd7826c9c035242ba7154edabc88202c2298f9c5cecf5f.jpg",
|
| 769 |
+
"image_caption": [
|
| 770 |
+
"Figure 3: Comparison between online algorithms: We compare our method with baselines and prior approaches, including TFS (Train from Scratch), TOE (Train on Everything), FTL (Follow the Leader) and FTML (Follow the Meta Leader). a: Performance relative to the number of tasks seen over the course of online training on the Rainbow-MNIST dataset. As the number of task increases, FOML achieves lower error rates compared to other methods. We also compare our method with continual learning baselines: LwF Li & Hoiem (2017), iCaRL Rebuffi et al. $\\boxed { 2 0 1 6 }$ and MOCA Harrison et al. (2020). MOCA Harrison et al. (2020) archive similar performance to ours at the end of the learning, but FOML makes significantly faster progress. b: Error rates on the Online-CIFAR100 dataset. Note that FOML not only achieves lower error rates on average, but also reaches the lowest error (of around $17 \\%$ ) more quickly than the other methods. c: Performance of FOML on the CELEBA dataset. This dataset contains more than 1000 classes, and we follow the same protocol as in Online-CIFAR100 experiments. Our method, FOML, learns more quickly on this task as well. "
|
| 771 |
+
],
|
| 772 |
+
"image_footnote": [],
|
| 773 |
+
"bbox": [
|
| 774 |
+
191,
|
| 775 |
+
101,
|
| 776 |
+
808,
|
| 777 |
+
222
|
| 778 |
+
],
|
| 779 |
+
"page_idx": 7
|
| 780 |
+
},
|
| 781 |
+
{
|
| 782 |
+
"type": "text",
|
| 783 |
+
"text": "",
|
| 784 |
+
"bbox": [
|
| 785 |
+
173,
|
| 786 |
+
381,
|
| 787 |
+
825,
|
| 788 |
+
575
|
| 789 |
+
],
|
| 790 |
+
"page_idx": 7
|
| 791 |
+
},
|
| 792 |
+
{
|
| 793 |
+
"type": "text",
|
| 794 |
+
"text": "Results on Rainbow-MNIST: As shown in $\\mathrm { F i g } \\bigstar \\bigstar$ FOML attains the lowest error rate on most tasks in Rainbow-MNIST, except a small segment in the beginning. The performance of TFS is similar across all the tasks, and does not improve over time. This is because it resets its weights every time it encounters a new task, and therefore cannot not gain any advantage from past data. TOE has larger error rates at the start, but as we add more data into the buffer, TOE is able to improve. On the other hand, both FTL and FTML start with similar performance, but FTML achieve much lower error rates at the end of the sequence compared to FTL, consistently with prior work Finn et al. (2019). The final error rates of FOML are around $10 \\%$ , and it reaches this performance significantly faster than FTML, after less than 20 tasks. Note that FTML also has access to task boundaries, while FOML does not. ",
|
| 795 |
+
"bbox": [
|
| 796 |
+
174,
|
| 797 |
+
582,
|
| 798 |
+
825,
|
| 799 |
+
708
|
| 800 |
+
],
|
| 801 |
+
"page_idx": 7
|
| 802 |
+
},
|
| 803 |
+
{
|
| 804 |
+
"type": "text",
|
| 805 |
+
"text": "Results on Online-CIFAR100 and Online-CELEBA: We use a Siamese network for this experiment, where each image is fed into a 7-layer convolutional network, and each branch outputs a 128 dimensional embedding vector. A difference of these vectors are fed into a fully connected layer for the final classification. Each task contains data from 5 classes, and each new task introduces three new classes, and retains two of the classes from the previous task, providing a degree of temporal coherence while still requiring each algorithm to handle persistent shift in the task. $\\mathrm { F i g } \\ 3$ shows the error rates of various online learning methods, where each method is trained over a sequence of 1200 tasks for online-CIFAR100. All the methods start with initial error rates of $50 \\%$ . The tasks are not mutually exclusive, so in principle TOE can attain good performance, but it makes the slowest progress among all the methods, suggesting that simple pretraining is not sufficient to accelerate learning. FTL uses a similar pre-training strategy as TOE. However it has an adaptation stage where the model is fine-tuned on the new task. This allows it to make slower progress. As expected from prior work $\\lvert \\lvert \\dim \\operatorname { e t } \\mathrm { a l . } \\rvert \\langle 2 0 1 9 \\rvert$ , the meta-learning procedure used by FTML allows it to make faster progress than FTL. However, FOML makes faster progress on average, and achieves the lowest final error rate $( \\sim 1 5 \\%$ ) after sequence of 1200 tasks. ",
|
| 806 |
+
"bbox": [
|
| 807 |
+
173,
|
| 808 |
+
714,
|
| 809 |
+
825,
|
| 810 |
+
922
|
| 811 |
+
],
|
| 812 |
+
"page_idx": 7
|
| 813 |
+
},
|
| 814 |
+
{
|
| 815 |
+
"type": "image",
|
| 816 |
+
"img_path": "images/d581f23944023419d740b7525f8655a8c2436908f955bf455188406cb531bf4b.jpg",
|
| 817 |
+
"image_caption": [
|
| 818 |
+
"Figure 4: Ablation experiments: a) We vary the number of online updates $K$ used before the meta-update, to see how it affects the performance of our method. The performance of FOML improves as the number of online updates is increased. b) This experiment shows how FOML performs with and without meta updates, to confirm that the meta-training is indeed an essential component of our method. With meta-updates, FOML learns more quickly, and performance improves with more tasks. "
|
| 819 |
+
],
|
| 820 |
+
"image_footnote": [],
|
| 821 |
+
"bbox": [
|
| 822 |
+
271,
|
| 823 |
+
102,
|
| 824 |
+
714,
|
| 825 |
+
231
|
| 826 |
+
],
|
| 827 |
+
"page_idx": 8
|
| 828 |
+
},
|
| 829 |
+
{
|
| 830 |
+
"type": "text",
|
| 831 |
+
"text": "6.1 ABLATION STUDIES ",
|
| 832 |
+
"text_level": 1,
|
| 833 |
+
"bbox": [
|
| 834 |
+
176,
|
| 835 |
+
315,
|
| 836 |
+
352,
|
| 837 |
+
329
|
| 838 |
+
],
|
| 839 |
+
"page_idx": 8
|
| 840 |
+
},
|
| 841 |
+
{
|
| 842 |
+
"type": "text",
|
| 843 |
+
"text": "We perform various ablations by varying the number of online parameters used for the meta-update $K$ , importance of meta-model to analysis the properties of our method. For additional ablations, please see the Appendix. ",
|
| 844 |
+
"bbox": [
|
| 845 |
+
174,
|
| 846 |
+
338,
|
| 847 |
+
825,
|
| 848 |
+
380
|
| 849 |
+
],
|
| 850 |
+
"page_idx": 8
|
| 851 |
+
},
|
| 852 |
+
{
|
| 853 |
+
"type": "text",
|
| 854 |
+
"text": "Number of online parameters used for the meta-update: Our method periodically updates the online weights and meta weights. The meta-updates involves taking $K$ recent online parameters and updating the meta model via MAML gradient. Therefore, meta-updates depend on the trajectory of the online parameters. In this experiment, we investigate how the performance of FOML changes as we vary the number of parameters used for the meta-update $K$ in Algorithm $\\underset { - , - } { \\mathrm { ~ 1 ) } }$ . Fig 4 shows the performance of our method with various values of $K$ : $K = [ 1 , 2 , 3 , 5 , 1 0 ]$ . We can see that the performance improves when we update the meta parameters over longer trajectory of online parameters (larger $K$ ). We speculate that this is due to the longer sequences providing a clearer signal for how the meta-parameters influence online updates over many steps. ",
|
| 855 |
+
"bbox": [
|
| 856 |
+
174,
|
| 857 |
+
386,
|
| 858 |
+
825,
|
| 859 |
+
512
|
| 860 |
+
],
|
| 861 |
+
"page_idx": 8
|
| 862 |
+
},
|
| 863 |
+
{
|
| 864 |
+
"type": "text",
|
| 865 |
+
"text": "Importance of meta update: FOML keeps track of separate online parameters and meta-parameters, and each is updated via corresponding updates. However, only the online parameters $\\phi$ are used for evaluation. The meta-parameters $\\theta$ only influence them via the regularizer and do not directly affect evaluation. This might raise the question: how important is the contribution of the meta-parameters to the performance of the algorithm during online training? We train a model with and without meta-updates, and the performance is shown in $\\mathrm { F i g } 4 .$ None that, the model without meta-updates is identical to our method, except that the meta-updates themselves are not performed. We can clearly see that the model trained with meta-updates outperforms a model trained without meta-updates. The model trained without meta-updates generally does not improve significantly as more tasks are seen, while the model trained with meta-updates improves with each task, and reaches significantly lower final error. This shows that, even though $\\theta$ and $\\phi$ are decoupled and only connected via a regularization, the meta-learning component of our method really is critical for its good performance. ",
|
| 866 |
+
"bbox": [
|
| 867 |
+
173,
|
| 868 |
+
518,
|
| 869 |
+
826,
|
| 870 |
+
685
|
| 871 |
+
],
|
| 872 |
+
"page_idx": 8
|
| 873 |
+
},
|
| 874 |
+
{
|
| 875 |
+
"type": "text",
|
| 876 |
+
"text": "7 CONCLUSION ",
|
| 877 |
+
"text_level": 1,
|
| 878 |
+
"bbox": [
|
| 879 |
+
176,
|
| 880 |
+
694,
|
| 881 |
+
320,
|
| 882 |
+
710
|
| 883 |
+
],
|
| 884 |
+
"page_idx": 8
|
| 885 |
+
},
|
| 886 |
+
{
|
| 887 |
+
"type": "text",
|
| 888 |
+
"text": "We presented FOML, a MAML-based algorithm for online meta-learning that does not require ground truth knowledge of task boundaries, and does not require resetting the parameter vector back to the meta-learned parameters for every task. FOML is conceptually simple, maintaining just two parameter vectors over the entire online adaptation process: a vector of online parameters $\\phi$ , which are updated continually on each new batch of datapoints, and a vector of meta-parameters $\\theta$ , which are updated correspondingly with meta-updates to accelerate the online adaptation process, and influence the online updates via a regularizer. We find that even a relatively simple task sampling scheme that selects datapoints at random from a buffer of all seen data enables effective meta-training that accelerates the speed with which FOML can adapt to each new task, and we find that FOML reaches a final performance that is comparable to or better than baselines and prior methods, while learning to adapt quickly to new tasks significantly faster. While our work focuses on supervised classification problems, a particularly exciting direction for future work is to extend such online meta-learning methods to other types of online supervision that may be more readily available, including self-supervision and prediction, so that models equipped with online meta-learning can continually improve as they see more of the world. ",
|
| 889 |
+
"bbox": [
|
| 890 |
+
174,
|
| 891 |
+
715,
|
| 892 |
+
825,
|
| 893 |
+
924
|
| 894 |
+
],
|
| 895 |
+
"page_idx": 8
|
| 896 |
+
},
|
| 897 |
+
{
|
| 898 |
+
"type": "text",
|
| 899 |
+
"text": "REFERENCES ",
|
| 900 |
+
"text_level": 1,
|
| 901 |
+
"bbox": [
|
| 902 |
+
176,
|
| 903 |
+
103,
|
| 904 |
+
287,
|
| 905 |
+
117
|
| 906 |
+
],
|
| 907 |
+
"page_idx": 9
|
| 908 |
+
},
|
| 909 |
+
{
|
| 910 |
+
"type": "text",
|
| 911 |
+
"text": "Maruan Al-Shedivat, Trapit Bansal, Yuri Burda, Ilya Sutskever, Igor Mordatch, and Pieter Abbeel. Continuous adaptation via meta-learning in nonstationary and competitive environments. arXiv preprint arXiv:1710.03641, 2017. ",
|
| 912 |
+
"bbox": [
|
| 913 |
+
174,
|
| 914 |
+
126,
|
| 915 |
+
823,
|
| 916 |
+
169
|
| 917 |
+
],
|
| 918 |
+
"page_idx": 9
|
| 919 |
+
},
|
| 920 |
+
{
|
| 921 |
+
"type": "text",
|
| 922 |
+
"text": "Antreas Antoniou, Harrison Edwards, and Amos Storkey. How to train your maml. arXiv preprint arXiv:1810.09502, 2018. ",
|
| 923 |
+
"bbox": [
|
| 924 |
+
171,
|
| 925 |
+
179,
|
| 926 |
+
823,
|
| 927 |
+
207
|
| 928 |
+
],
|
| 929 |
+
"page_idx": 9
|
| 930 |
+
},
|
| 931 |
+
{
|
| 932 |
+
"type": "text",
|
| 933 |
+
"text": "Shawn Beaulieu, Lapo Frati, Thomas Miconi, Joel Lehman, Kenneth O Stanley, Jeff Clune, and Nick Cheney. Learning to continually learn. arXiv preprint arXiv:2002.09571, 2020. ",
|
| 934 |
+
"bbox": [
|
| 935 |
+
173,
|
| 936 |
+
217,
|
| 937 |
+
823,
|
| 938 |
+
246
|
| 939 |
+
],
|
| 940 |
+
"page_idx": 9
|
| 941 |
+
},
|
| 942 |
+
{
|
| 943 |
+
"type": "text",
|
| 944 |
+
"text": "Massimo Caccia, Pau Rodriguez, Oleksiy Ostapenko, Fabrice Normandin, Min Lin, Lucas Caccia, Issam Laradji, Irina Rish, Alexandre Lacoste, David Vazquez, et al. Online fast adaptation and knowledge accumulation: a new approach to continual learning. arXiv preprint arXiv:2003.05856, 2020. ",
|
| 945 |
+
"bbox": [
|
| 946 |
+
173,
|
| 947 |
+
256,
|
| 948 |
+
826,
|
| 949 |
+
311
|
| 950 |
+
],
|
| 951 |
+
"page_idx": 9
|
| 952 |
+
},
|
| 953 |
+
{
|
| 954 |
+
"type": "text",
|
| 955 |
+
"text": "Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 9650–9660, 2021. ",
|
| 956 |
+
"bbox": [
|
| 957 |
+
173,
|
| 958 |
+
321,
|
| 959 |
+
826,
|
| 960 |
+
366
|
| 961 |
+
],
|
| 962 |
+
"page_idx": 9
|
| 963 |
+
},
|
| 964 |
+
{
|
| 965 |
+
"type": "text",
|
| 966 |
+
"text": "Nicolo Cesa-Bianchi and Gábor Lugosi. Prediction, learning, and games. Cambridge university press, 2006. ",
|
| 967 |
+
"bbox": [
|
| 968 |
+
173,
|
| 969 |
+
375,
|
| 970 |
+
823,
|
| 971 |
+
404
|
| 972 |
+
],
|
| 973 |
+
"page_idx": 9
|
| 974 |
+
},
|
| 975 |
+
{
|
| 976 |
+
"type": "text",
|
| 977 |
+
"text": "Giulia Denevi, Dimitris Stamos, Carlo Ciliberto, and Massimiliano Pontil. Online-within-online meta-learning. In ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 32 (NIPS 2019), volume 32, pp. 1–11. Neural Information Processing Systems (NeurIPS 2019), 2019. ",
|
| 978 |
+
"bbox": [
|
| 979 |
+
176,
|
| 980 |
+
412,
|
| 981 |
+
823,
|
| 982 |
+
457
|
| 983 |
+
],
|
| 984 |
+
"page_idx": 9
|
| 985 |
+
},
|
| 986 |
+
{
|
| 987 |
+
"type": "text",
|
| 988 |
+
"text": "Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. In International Conference on Machine Learning, pp. 1126–1135. PMLR, 2017. ",
|
| 989 |
+
"bbox": [
|
| 990 |
+
171,
|
| 991 |
+
465,
|
| 992 |
+
825,
|
| 993 |
+
496
|
| 994 |
+
],
|
| 995 |
+
"page_idx": 9
|
| 996 |
+
},
|
| 997 |
+
{
|
| 998 |
+
"type": "text",
|
| 999 |
+
"text": "Chelsea Finn, Aravind Rajeswaran, Sham Kakade, and Sergey Levine. Online meta-learning. In Kamalika Chaudhuri and Ruslan Salakhutdinov (eds.), Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pp. 1920–1930. PMLR, 09–15 Jun 2019. ",
|
| 1000 |
+
"bbox": [
|
| 1001 |
+
173,
|
| 1002 |
+
505,
|
| 1003 |
+
826,
|
| 1004 |
+
561
|
| 1005 |
+
],
|
| 1006 |
+
"page_idx": 9
|
| 1007 |
+
},
|
| 1008 |
+
{
|
| 1009 |
+
"type": "text",
|
| 1010 |
+
"text": "Sebastian Flennerhag, Andrei A Rusu, Razvan Pascanu, Francesco Visin, Hujun Yin, and Raia Hadsell. Meta-learning with warped gradient descent. arXiv preprint arXiv:1909.00025, 2019. ",
|
| 1011 |
+
"bbox": [
|
| 1012 |
+
173,
|
| 1013 |
+
571,
|
| 1014 |
+
823,
|
| 1015 |
+
601
|
| 1016 |
+
],
|
| 1017 |
+
"page_idx": 9
|
| 1018 |
+
},
|
| 1019 |
+
{
|
| 1020 |
+
"type": "text",
|
| 1021 |
+
"text": "Gunshi Gupta, Karmesh Yadav, and Liam Paull. La-maml: Look-ahead meta learning for continual learning. arXiv preprint arXiv:2007.13904, 2020. ",
|
| 1022 |
+
"bbox": [
|
| 1023 |
+
174,
|
| 1024 |
+
609,
|
| 1025 |
+
823,
|
| 1026 |
+
640
|
| 1027 |
+
],
|
| 1028 |
+
"page_idx": 9
|
| 1029 |
+
},
|
| 1030 |
+
{
|
| 1031 |
+
"type": "text",
|
| 1032 |
+
"text": "James Harrison, Apoorva Sharma, Chelsea Finn, and Marco Pavone. Continuous meta-learning without tasks. arXiv preprint arXiv:1912.08866, 2019. ",
|
| 1033 |
+
"bbox": [
|
| 1034 |
+
173,
|
| 1035 |
+
648,
|
| 1036 |
+
823,
|
| 1037 |
+
678
|
| 1038 |
+
],
|
| 1039 |
+
"page_idx": 9
|
| 1040 |
+
},
|
| 1041 |
+
{
|
| 1042 |
+
"type": "text",
|
| 1043 |
+
"text": "James Harrison, Apoorva Sharma, Chelsea Finn, and Marco Pavone. Continuous meta-learning without tasks. Advances in neural information processing systems, 33, 2020. ",
|
| 1044 |
+
"bbox": [
|
| 1045 |
+
173,
|
| 1046 |
+
686,
|
| 1047 |
+
823,
|
| 1048 |
+
717
|
| 1049 |
+
],
|
| 1050 |
+
"page_idx": 9
|
| 1051 |
+
},
|
| 1052 |
+
{
|
| 1053 |
+
"type": "text",
|
| 1054 |
+
"text": "Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. corr abs/1512.03385 (2015), 2015. ",
|
| 1055 |
+
"bbox": [
|
| 1056 |
+
171,
|
| 1057 |
+
727,
|
| 1058 |
+
823,
|
| 1059 |
+
756
|
| 1060 |
+
],
|
| 1061 |
+
"page_idx": 9
|
| 1062 |
+
},
|
| 1063 |
+
{
|
| 1064 |
+
"type": "text",
|
| 1065 |
+
"text": "Xu He, Jakub Sygnowski, Alexandre Galashov, Andrei A Rusu, Yee Whye Teh, and Razvan Pascanu. Task agnostic continual learning via meta learning. arXiv preprint arXiv:1906.05201, 2019. ",
|
| 1066 |
+
"bbox": [
|
| 1067 |
+
173,
|
| 1068 |
+
765,
|
| 1069 |
+
826,
|
| 1070 |
+
795
|
| 1071 |
+
],
|
| 1072 |
+
"page_idx": 9
|
| 1073 |
+
},
|
| 1074 |
+
{
|
| 1075 |
+
"type": "text",
|
| 1076 |
+
"text": "Khurram Javed and Martha White. Meta-learning representations for continual learning. arXiv preprint arXiv:1905.12588, 2019. ",
|
| 1077 |
+
"bbox": [
|
| 1078 |
+
173,
|
| 1079 |
+
804,
|
| 1080 |
+
823,
|
| 1081 |
+
833
|
| 1082 |
+
],
|
| 1083 |
+
"page_idx": 9
|
| 1084 |
+
},
|
| 1085 |
+
{
|
| 1086 |
+
"type": "text",
|
| 1087 |
+
"text": "Ghassen Jerfel, Erin Grant, Thomas L Griffiths, and Katherine Heller. Reconciling meta-learning and continual learning with online mixtures of tasks. arXiv preprint arXiv:1812.06080, 2018. ",
|
| 1088 |
+
"bbox": [
|
| 1089 |
+
171,
|
| 1090 |
+
842,
|
| 1091 |
+
825,
|
| 1092 |
+
872
|
| 1093 |
+
],
|
| 1094 |
+
"page_idx": 9
|
| 1095 |
+
},
|
| 1096 |
+
{
|
| 1097 |
+
"type": "text",
|
| 1098 |
+
"text": "Rong Jin, Steven CH Hoi, and Tianbao Yang. Online multiple kernel learning: Algorithms and mistake bounds. In International conference on algorithmic learning theory, pp. 390–404. Springer, 2010. ",
|
| 1099 |
+
"bbox": [
|
| 1100 |
+
174,
|
| 1101 |
+
881,
|
| 1102 |
+
825,
|
| 1103 |
+
924
|
| 1104 |
+
],
|
| 1105 |
+
"page_idx": 9
|
| 1106 |
+
},
|
| 1107 |
+
{
|
| 1108 |
+
"type": "text",
|
| 1109 |
+
"text": "Jyrki Kivinen, Alexander J Smola, and Robert C Williamson. Online learning with kernels. IEEE transactions on signal processing, 52(8):2165–2176, 2004. ",
|
| 1110 |
+
"bbox": [
|
| 1111 |
+
169,
|
| 1112 |
+
103,
|
| 1113 |
+
825,
|
| 1114 |
+
133
|
| 1115 |
+
],
|
| 1116 |
+
"page_idx": 10
|
| 1117 |
+
},
|
| 1118 |
+
{
|
| 1119 |
+
"type": "text",
|
| 1120 |
+
"text": "Gregory Koch, Richard Zemel, Ruslan Salakhutdinov, et al. Siamese neural networks for one-shot image recognition. In ICML deep learning workshop, volume 2. Lille, 2015. ",
|
| 1121 |
+
"bbox": [
|
| 1122 |
+
171,
|
| 1123 |
+
141,
|
| 1124 |
+
825,
|
| 1125 |
+
171
|
| 1126 |
+
],
|
| 1127 |
+
"page_idx": 10
|
| 1128 |
+
},
|
| 1129 |
+
{
|
| 1130 |
+
"type": "text",
|
| 1131 |
+
"text": "Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 25:1097–1105, 2012. ",
|
| 1132 |
+
"bbox": [
|
| 1133 |
+
174,
|
| 1134 |
+
180,
|
| 1135 |
+
825,
|
| 1136 |
+
223
|
| 1137 |
+
],
|
| 1138 |
+
"page_idx": 10
|
| 1139 |
+
},
|
| 1140 |
+
{
|
| 1141 |
+
"type": "text",
|
| 1142 |
+
"text": "Da Li and Timothy Hospedales. Online meta-learning for multi-source and semi-supervised domain adaptation. In European Conference on Computer Vision, pp. 382–403. Springer, 2020. ",
|
| 1143 |
+
"bbox": [
|
| 1144 |
+
173,
|
| 1145 |
+
233,
|
| 1146 |
+
823,
|
| 1147 |
+
263
|
| 1148 |
+
],
|
| 1149 |
+
"page_idx": 10
|
| 1150 |
+
},
|
| 1151 |
+
{
|
| 1152 |
+
"type": "text",
|
| 1153 |
+
"text": "Zhenguo Li, Fengwei Zhou, Fei Chen, and Hang Li. Meta-sgd: Learning to learn quickly for few-shot learning. arXiv preprint arXiv:1707.09835, 2017. ",
|
| 1154 |
+
"bbox": [
|
| 1155 |
+
174,
|
| 1156 |
+
272,
|
| 1157 |
+
823,
|
| 1158 |
+
301
|
| 1159 |
+
],
|
| 1160 |
+
"page_idx": 10
|
| 1161 |
+
},
|
| 1162 |
+
{
|
| 1163 |
+
"type": "text",
|
| 1164 |
+
"text": "Zhizhong Li and Derek Hoiem. Learning without forgetting. IEEE transactions on pattern analysis and machine intelligence, 40(12):2935–2947, 2017. ",
|
| 1165 |
+
"bbox": [
|
| 1166 |
+
173,
|
| 1167 |
+
310,
|
| 1168 |
+
825,
|
| 1169 |
+
340
|
| 1170 |
+
],
|
| 1171 |
+
"page_idx": 10
|
| 1172 |
+
},
|
| 1173 |
+
{
|
| 1174 |
+
"type": "text",
|
| 1175 |
+
"text": "Michael McCloskey and Neal J Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of learning and motivation, volume 24, pp. 109–165. Elsevier, 1989. ",
|
| 1176 |
+
"bbox": [
|
| 1177 |
+
173,
|
| 1178 |
+
349,
|
| 1179 |
+
826,
|
| 1180 |
+
392
|
| 1181 |
+
],
|
| 1182 |
+
"page_idx": 10
|
| 1183 |
+
},
|
| 1184 |
+
{
|
| 1185 |
+
"type": "text",
|
| 1186 |
+
"text": "Tsendsuren Munkhdalai and Hong Yu. Meta networks. In International Conference on Machine Learning, pp. 2554–2563. PMLR, 2017. ",
|
| 1187 |
+
"bbox": [
|
| 1188 |
+
171,
|
| 1189 |
+
402,
|
| 1190 |
+
823,
|
| 1191 |
+
431
|
| 1192 |
+
],
|
| 1193 |
+
"page_idx": 10
|
| 1194 |
+
},
|
| 1195 |
+
{
|
| 1196 |
+
"type": "text",
|
| 1197 |
+
"text": "Anusha Nagabandi, Chelsea Finn, and Sergey Levine. Deep online learning via meta-learning: Continual adaptation for model-based rl. arXiv preprint arXiv:1812.07671, 2018. ",
|
| 1198 |
+
"bbox": [
|
| 1199 |
+
169,
|
| 1200 |
+
440,
|
| 1201 |
+
823,
|
| 1202 |
+
470
|
| 1203 |
+
],
|
| 1204 |
+
"page_idx": 10
|
| 1205 |
+
},
|
| 1206 |
+
{
|
| 1207 |
+
"type": "text",
|
| 1208 |
+
"text": "Alex Nichol and John Schulman. Reptile: a scalable metalearning algorithm. arXiv preprint arXiv:1803.02999, 2(3):4, 2018. ",
|
| 1209 |
+
"bbox": [
|
| 1210 |
+
169,
|
| 1211 |
+
479,
|
| 1212 |
+
823,
|
| 1213 |
+
508
|
| 1214 |
+
],
|
| 1215 |
+
"page_idx": 10
|
| 1216 |
+
},
|
| 1217 |
+
{
|
| 1218 |
+
"type": "text",
|
| 1219 |
+
"text": "Alex Nichol, Joshua Achiam, and John Schulman. On first-order meta-learning algorithms. arXiv preprint arXiv:1803.02999, 2018. ",
|
| 1220 |
+
"bbox": [
|
| 1221 |
+
171,
|
| 1222 |
+
518,
|
| 1223 |
+
825,
|
| 1224 |
+
547
|
| 1225 |
+
],
|
| 1226 |
+
"page_idx": 10
|
| 1227 |
+
},
|
| 1228 |
+
{
|
| 1229 |
+
"type": "text",
|
| 1230 |
+
"text": "Eunbyung Park and Junier B Oliva. Meta-curvature. arXiv preprint arXiv:1902.03356, 2019. ",
|
| 1231 |
+
"bbox": [
|
| 1232 |
+
173,
|
| 1233 |
+
556,
|
| 1234 |
+
784,
|
| 1235 |
+
573
|
| 1236 |
+
],
|
| 1237 |
+
"page_idx": 10
|
| 1238 |
+
},
|
| 1239 |
+
{
|
| 1240 |
+
"type": "text",
|
| 1241 |
+
"text": "Jathushan Rajasegaran, Munawar Hayat, Salman Khan, Fahad Shahbaz Khan, and Ling Shao. Random path selection for incremental learning. Advances in Neural Information Processing Systems, 2019. ",
|
| 1242 |
+
"bbox": [
|
| 1243 |
+
174,
|
| 1244 |
+
582,
|
| 1245 |
+
826,
|
| 1246 |
+
625
|
| 1247 |
+
],
|
| 1248 |
+
"page_idx": 10
|
| 1249 |
+
},
|
| 1250 |
+
{
|
| 1251 |
+
"type": "text",
|
| 1252 |
+
"text": "Jathushan Rajasegaran, Salman Khan, Munawar Hayat, Fahad Shahbaz Khan, and Mubarak Shah. itaml: An incremental task-agnostic meta-learning approach. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 13588–13597, 2020. ",
|
| 1253 |
+
"bbox": [
|
| 1254 |
+
174,
|
| 1255 |
+
633,
|
| 1256 |
+
826,
|
| 1257 |
+
678
|
| 1258 |
+
],
|
| 1259 |
+
"page_idx": 10
|
| 1260 |
+
},
|
| 1261 |
+
{
|
| 1262 |
+
"type": "text",
|
| 1263 |
+
"text": "Roger Ratcliff. Connectionist models of recognition memory: constraints imposed by learning and forgetting functions. Psychological review, 97(2):285, 1990. ",
|
| 1264 |
+
"bbox": [
|
| 1265 |
+
173,
|
| 1266 |
+
688,
|
| 1267 |
+
823,
|
| 1268 |
+
717
|
| 1269 |
+
],
|
| 1270 |
+
"page_idx": 10
|
| 1271 |
+
},
|
| 1272 |
+
{
|
| 1273 |
+
"type": "text",
|
| 1274 |
+
"text": "Sachin Ravi and Hugo Larochelle. Optimization as a model for few-shot learning. 2016. ",
|
| 1275 |
+
"bbox": [
|
| 1276 |
+
169,
|
| 1277 |
+
724,
|
| 1278 |
+
754,
|
| 1279 |
+
742
|
| 1280 |
+
],
|
| 1281 |
+
"page_idx": 10
|
| 1282 |
+
},
|
| 1283 |
+
{
|
| 1284 |
+
"type": "text",
|
| 1285 |
+
"text": "Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, and Christoph H Lampert. icarl: Incremental classifier and representation learning. corr abs/1611.07725 (2016). arXiv preprint arXiv:1611.07725, 2016. ",
|
| 1286 |
+
"bbox": [
|
| 1287 |
+
174,
|
| 1288 |
+
751,
|
| 1289 |
+
826,
|
| 1290 |
+
794
|
| 1291 |
+
],
|
| 1292 |
+
"page_idx": 10
|
| 1293 |
+
},
|
| 1294 |
+
{
|
| 1295 |
+
"type": "text",
|
| 1296 |
+
"text": "Adam Santoro, Sergey Bartunov, Matthew Botvinick, Daan Wierstra, and Timothy Lillicrap. Metalearning with memory-augmented neural networks. In International conference on machine learning, pp. 1842–1850. PMLR, 2016. ",
|
| 1297 |
+
"bbox": [
|
| 1298 |
+
174,
|
| 1299 |
+
803,
|
| 1300 |
+
823,
|
| 1301 |
+
847
|
| 1302 |
+
],
|
| 1303 |
+
"page_idx": 10
|
| 1304 |
+
},
|
| 1305 |
+
{
|
| 1306 |
+
"type": "text",
|
| 1307 |
+
"text": "Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. ",
|
| 1308 |
+
"bbox": [
|
| 1309 |
+
173,
|
| 1310 |
+
856,
|
| 1311 |
+
823,
|
| 1312 |
+
886
|
| 1313 |
+
],
|
| 1314 |
+
"page_idx": 10
|
| 1315 |
+
},
|
| 1316 |
+
{
|
| 1317 |
+
"type": "text",
|
| 1318 |
+
"text": "Jake Snell, Kevin Swersky, and Richard S Zemel. Prototypical networks for few-shot learning. arXiv preprint arXiv:1703.05175, 2017. ",
|
| 1319 |
+
"bbox": [
|
| 1320 |
+
173,
|
| 1321 |
+
895,
|
| 1322 |
+
823,
|
| 1323 |
+
924
|
| 1324 |
+
],
|
| 1325 |
+
"page_idx": 10
|
| 1326 |
+
},
|
| 1327 |
+
{
|
| 1328 |
+
"type": "text",
|
| 1329 |
+
"text": "Xingyou Song, Wenbo Gao, Yuxiang Yang, Krzysztof Choromanski, Aldo Pacchiano, and Yunhao Tang. Es-maml: Simple hessian-free meta learning. arXiv preprint arXiv:1910.01215, 2019. Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1–9, 2015. Oriol Vinyals, Charles Blundell, Timothy Lillicrap, Daan Wierstra, et al. Matching networks for one shot learning. Advances in neural information processing systems, 29:3630–3638, 2016. Flood Sung Yongxin Yang, Li Zhang, Tao Xiang, Philip HS Torr, and Timothy M Hospedales. Learning to compare: Relation network for few-shot learning.(2018). 2017. Huaxiu Yao, Yingbo Zhou, Mehrdad Mahdavi, Zhenhui Li, Richard Socher, and Caiming Xiong. Online structured meta-learning. arXiv preprint arXiv:2010.11545, 2020. Mingzhang Yin, George Tucker, Mingyuan Zhou, Sergey Levine, and Chelsea Finn. Meta-learning without memorization. arXiv preprint arXiv:1912.03820, 2019. Michael Zhang, James Lucas, Jimmy Ba, and Geoffrey E Hinton. Lookahead optimizer: k steps forward, 1 step back. Advances in neural information processing systems, 32, 2019. Guanyu Zhou, Kihyuk Sohn, and Honglak Lee. Online incremental feature learning with denoising autoencoders. In Artificial intelligence and statistics, pp. 1453–1461. PMLR, 2012. ",
|
| 1330 |
+
"bbox": [
|
| 1331 |
+
171,
|
| 1332 |
+
101,
|
| 1333 |
+
828,
|
| 1334 |
+
412
|
| 1335 |
+
],
|
| 1336 |
+
"page_idx": 11
|
| 1337 |
+
}
|
| 1338 |
+
]
|
parse/dev/eLxADkHrBcR/eLxADkHrBcR_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/eLxADkHrBcR/eLxADkHrBcR_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/x5mtJD2ovc/x5mtJD2ovc_middle.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/x6INXlnUGro/x6INXlnUGro.md
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Learning Agile Skills via Adversarial Imitation of Rough Partial Demonstrations
|
| 2 |
+
|
| 3 |
+
Chenhao $\mathbf { L i } ^ { 1 , 2 }$ , Marin Vlastelica1, Sebastian Blaes1, Jonas Frey2,1, Felix Grimminger1, Georg Martius1 1Max Planck Institute for Intelligent Systems, Germany 2 Robotic Systems Lab, ETH Zurich, Switzerland chenhao.li@tuebingen.mpg.de
|
| 4 |
+
|
| 5 |
+
Abstract: Learning agile skills is one of the main challenges in robotics. To this end, reinforcement learning approaches have achieved impressive results. These methods require explicit task information in terms of a reward function or an expert that can be queried in simulation to provide a target control output, which limits their applicability. In this work, we propose a generative adversarial method for inferring reward functions from partial and potentially physically incompatible demonstrations for successful skill acquirement where reference or expert demonstrations are not easily accessible. Moreover, we show that by using a Wasserstein GAN formulation and transitions from demonstrations with rough and partial information as input, we are able to extract policies that are robust and capable of imitating demonstrated behaviors. Finally, the obtained skills such as a backflip are tested on an agile quadruped robot called Solo 8 and present faithful replication of hand-held human demonstrations.
|
| 6 |
+
|
| 7 |
+
Keywords: Adversarial, Imitation Learning, Legged Robots
|
| 8 |
+
|
| 9 |
+

|
| 10 |
+
Figure 1: Our method (WASABI) achieves agile physical behaviors from rough (hand-held) and partial (robot base) motions. The illustrated performance measure is the Dynamic Time Warping distance of the base trajectories (left). A learned backflip policy is deployed on Solo 8 (right).
|
| 11 |
+
|
| 12 |
+
# 1 Introduction
|
| 13 |
+
|
| 14 |
+
Obtaining dynamic skills for autonomous machines has been a cardinal challenge in robotics. In the field of legged systems, many attempts have been made to attain diverse skills using conventional inverse kinematics techniques [1, 2]. In recent years, learning-based quadrupedal locomotion has been achieved by reinforcement learning (RL) approaches to address more complex environments and improve performance [3, 4, 5, 6]. However, the demand for acquiring more highly dynamic motions has brought new challenges to robot learning. A primary shortage of motivating desired behaviors by reward engineering is the arduous reward-shaping process involved. It can sometimes become extremely demanding in developing highly dynamic skills such as jumping and backflipping, where various terms of motivation and regularization require elaborated refinement.
|
| 15 |
+
|
| 16 |
+
Given the availability of some expert references, one possible solution is Imitation Learning (IL), which aims to mimic expert behaviors in a given task. In this framework, the agent is trained to perform a task from demonstrations by learning a mapping between observations and actions with either offline (e.g. behavioral cloning [7, 8]) or interactive (e.g. DAgger, SMILe [9]) methods. Generic IL methods could potentially reduce the problem of teaching a task to that of providing demonstrations, without the need for explicit programming or designing reward functions specific to the task [10]. Another related approach to replicating exerted motions of an expert is Inverse Reinforcement Learning (IRL). In IRL, the expert reward function is inferred given its policy or observed behaviors [11, 12, 13]. IRL is in general computationally expensive, and efforts are required to deal with ambiguous reward functions without making strong assumptions [14].
|
| 17 |
+
|
| 18 |
+
More recently, Generative Adversarial Imitation Learning (GAIL) [15] draws a connection between IL and generative adversarial networks (GANs) [16], which train a generative model (generator) by having it deceive a discriminative classifier (discriminator). The task of the discriminator is to distinguish between data generated by the generator and the true data distribution. In the setting of GAIL, the true data distribution is the expert state-action distribution, while the learned policy is treated as the generator. The output of the discriminator can then be used as a reward that encourages the learning agent to generate similar behaviors to the demonstration. Analogously, the technique has been used for learning adversarial motion priors (AMP) [17], where the output of the discriminator is used as an additional style reward to the actual task reward, that is available beforehand. In a sense, AMP enables solving well-defined tasks in a specific style specified by a reference motion, without requiring access to underlying expert actions.
|
| 19 |
+
|
| 20 |
+
In this work, we present a novel adversarial imitation learning method named Wasserstein Adversarial Behavior Imitation (WASABI). We show that we are able to extract sensible task rewards from rough and partial demonstrations by utilizing adversarial training for obtaining agile skills in a sim-to-real setting. In contrast to Peng et al. [17], our approach does not require any prior information about the task at hand in form of a specific reward function, but only reasonable task-agnostic regularization terms in addition to the adversarial reward that make the robot motion more stable. Most importantly, we achieve this without having access to samples from an expert policy, but rather hand-held human demonstrations that are physically incompatible with the robot itself. To the best of our knowledge, this is the first time that highly dynamic skills are obtained from limited reference information. In summary, our contributions include: (i) An adversarial approach for learning from partial, physically incompatible demonstrations. (ii) Analysis of the Least-Squares vs. Wasserstein GAN loss for reward inference. (iii) Experimental validation in simulation and on a quadruped robot. Supplementary videos for this work are available at https://sites.google.com/view/ corl2022-wasabi/home.
|
| 21 |
+
|
| 22 |
+
# 2 Related Work
|
| 23 |
+
|
| 24 |
+
Advances in robotics have spawned many potential applications that require intelligent systems to be able to not only make decisions but also to perform physical movements expectedly. However, in many cases, the desired behavior may not be discovered by a learning agent due to sub-optimal parameter settings or algorithmic limitations [18, 19]. While learning a task might be stated as an optimization problem, it has become widely accepted that having prior knowledge provided by an expert is more effective and efficient than attempting to solve the problem from scratch [20, 21].
|
| 25 |
+
|
| 26 |
+
The idea of IL has been formed decades ago, raising solutions in conceptual and computational models to replicate motions from demonstrations [22, 23, 24]. It has been commonly acknowledged that IL entails three major approaches: model-based IL, learning a control policy directly, and learning from demonstrated trajectories. In the first approach, algorithms are applied to learn the parameters of the dynamics model to ensure that all executed motions closely follow the demonstration [25, 26, 27]. In the second approach, also known as behavioral cloning, the agent tries to reproduce the observed state-action pairs of the expert policy [7, 8]. Behavioral cloning often faces the problems of error compounding and poor generalization, which can lead to unstable policy output, particularly in out-of-distribution regions [28]. Alternatively, reference motions can be learned using an imitation goal, which is often implemented as a tracking objective that aims to reduce the pose error between the simulated character and target poses from a reference motion [29, 30, 31, 32]. A common strategy to estimate the pose error is to use a phase variable as an additional input to the controller to synchronize the agent with a specific reference motion [33, 32, 34]. This method typically works well for replicating single motion clips, but it may fail to scale to datasets with multiple reference motions which may not be synchronized and aligned according to a single-phase variable [17].
|
| 27 |
+
|
| 28 |
+
Instead of employing a handcrafted imitation objective, adversarial IL techniques train an adversarial discriminator to distinguish between behaviors generated by an agent and demonstrations [14, 15]. While these methods have shown some promise for motion imitation tasks [35, 36], adversarial learning algorithms are notoriously unstable, and the resulting motion quality still lags well behind that of state-of-the-art tracking-based systems. Especially in the low-data regime, adversarial models can take a long time to converge [37, 17]. In some cases, adversarial IL techniques show limited robustness against different environment dynamics, as it fails to generalize to tasks where there is considerable variability in the environment from the demonstrations [38].
|
| 29 |
+
|
| 30 |
+
With the ability to encompass multiple reference motions, AMP decouples task specification from style specification by combining GAIL with extra task objectives [17, 39]. The use of AMP reduces efforts in the selection of distance error metrics, phase indicators, and appropriate motion clips. This allows the learning agent to execute tasks that may not be portrayed in the original demonstrations. To enable active style control, Multi-AMP allows for the switching of multiple different style rewards by training multiple discriminators encoding different reference motions in parallel [40].
|
| 31 |
+
|
| 32 |
+
# 3 Approach
|
| 33 |
+
|
| 34 |
+
In this section, we describe our method, WASABI, which involves generative adversarial learning of an imitation reward from rough and partial demonstrations using a GAN framework.
|
| 35 |
+
|
| 36 |
+
# 3.1 Learning Task Reward from Limited Demonstration Information
|
| 37 |
+
|
| 38 |
+
We consider partial demonstrations that are given in terms of limited state observations, for instance only local velocities of the robot’s base. The demonstrations are formulated as sequences of $o _ { t } \in \mathcal { O }$ , where the full state space $s$ of the underlying Markov Decision Process can be mapped to the observation space $\mathcal { O }$ with a function $\Phi : S \mathcal { O }$ . We utilize generative adversarial learning for inferring the task reward function from such demonstrated transitions $( o , o ^ { \prime } )$ in a reference motion. As such, the discriminator in this setup is to distinguish samples of the policy transition distribution $d ^ { \pi }$ from the reference motion distribution $d ^ { \mathcal { M } }$ . The policy $\pi$ takes on the role of the generator.
|
| 39 |
+
|
| 40 |
+
The original GAN min-max loss (CEGAN) formulation has shown to suffer from vanishing gradients due to saturation regions of the cross-entropy loss function which slows down training [41]. If the discriminator performs excessively well and thus becomes saturated, the policy will not be able to learn any information, since it receives a constant penalty for being far away from the demonstrations. For this reason, Peng et al. [17] propose to use the least-squares GAN (LSGAN) loss [42] in AMP as a substitute for reward function learning. The LSGAN loss is formulated as
|
| 41 |
+
|
| 42 |
+
$$
|
| 43 |
+
\underset { D } { \arg \operatorname* { m i n } } \mathbb { E } _ { d ^ { \mathcal { M } } } \left[ \left( D ( o , o ^ { \prime } ) - 1 \right) ^ { 2 } \right] + \mathbb { E } _ { d ^ { \pi } } \left[ \left( D ( \Phi ( s ) , \Phi ( s ^ { \prime } ) ) + 1 \right) ^ { 2 } \right] .
|
| 44 |
+
$$
|
| 45 |
+
|
| 46 |
+
The discriminator is defined as a mapping $D : { \mathcal { O } } \times { \mathcal { O } } \mapsto \mathbb { R }$ and can be used, together with $\Phi$ , as a drop-in replacement for the unknown reward function $r ( s , s ^ { \prime } )$ . Intuitively, the LSGAN loss forces the discriminator to output $+ 1$ for samples from the reference motion and $- 1$ for those from the policy. It not only prevents vanishing gradients but also provides a well-scaled output that eases downstream policy learning. However, when faced with demonstrations that initially seem beyond what the agent can achieve, the discriminator is prone to be driven to optimality, prohibiting a more fine-grained evaluation of the policy transitions with respect to their closeness to the reference motion. Moreover, the LSGAN discriminator output does not directly lead to a practical reward function by itself, since an increase in its value does not always represent close replications of demonstrated transitions. This is a consequence of the least-squares loss symmetricity around $- 1$ and $+ 1$ , therefore a suitable mapping is typically needed to transform the output into a well-behaved reward function. For this reason, we propose to use the Wasserstein loss
|
| 47 |
+
|
| 48 |
+
$$
|
| 49 |
+
\underset { { D } } { \arg \operatorname* { m i n } } - \mathbb { E } _ { d ^ { \mathcal { M } } } \left[ D ( o , o ^ { \prime } ) \right] + \mathbb { E } _ { d ^ { \pi } } \left[ D ( \Phi ( s ) , \Phi ( s ^ { \prime } ) ) \right] ,
|
| 50 |
+
$$
|
| 51 |
+
|
| 52 |
+
especially for highly dynamic motions where the discriminator is more likely to optimally distinguish between the reference and the generated motions. Under conditions of Lipschitz continuity, the Wasserstein loss is an efficient approximation to the earth mover’s distance which effectively measures the distance between two probability distributions [43]. In the original Wasserstein GAN (WGAN), Arjovsky et al. [44] enforce Lipschitz continuity by projected gradient descent, i.e. clipping the network weights. Similarly, we apply $L _ { 2 }$ regularization on the discriminator for the sake of simplicity. In addition, discriminator weight regularization also controls the scale of its output, which results in stable imitation rewards.
|
| 53 |
+
|
| 54 |
+
# 3.2 Preventing Mode Collapse in Adversarial Reward Learning
|
| 55 |
+
|
| 56 |
+
Mode collapse is a common problem in GAN training, which manifests itself by the generator being able to produce only a small set of outputs. In our framework, mode collapse is reflected by the policy trying to replicate only a subset of the reference motion which gives a high reward.
|
| 57 |
+
|
| 58 |
+
The Wasserstein loss can alleviate mode collapse by allowing training of the discriminator to optimality while avoiding vanishing gradients [44]. In fact, if the discriminator does not get stuck in the local minimum, it learns to reject partial behaviors on which the policy stabilizes. As a result, the policy will have to attempt something different, if possible. In addition to the implementation of the Wasserstein loss, we extend the capability of the discriminator by allowing more than one state transition as input, i.e. we extend the input to $H$ consecutive observations. Note that this is typically not applicable to CEGAN or LSGAN, as a longer horizon makes the discriminator even stronger. By taking more sequential states into account, the policy reduces its chance to resort to the same safe transition patterns that are present in the reference motion.
|
| 59 |
+
|
| 60 |
+
We denote trajectory segments of length $H$ preceding time $t$ by $o _ { t } ^ { H } = \left( o _ { t - H + 1 } , \ldots , o _ { t } \right)$ for the reference observations and $s _ { t } ^ { H } = ( s _ { t - { H + 1 } } , \cdot \cdot \cdot , s _ { t } )$ − for the states induced by the policy. For clarity, we omit the time index in the following. To simplify notation, we write $\bar { \Phi ( s ^ { H } ) }$ to express that each state in $s ^ { H }$ is mapped to $\mathcal { O }$ . In our experiments, we select linear and angular velocities $v , \omega$ of the robot base in the robot frame, measurement of the gravity vector in the robot frame $g$ , and the base height $z$ as the observation space $\mathcal { O }$ . More information on the state space and demonstration space is detailed in Suppl. B. Note that in this example, no joint information is required by the discriminator. This facilitates the process to obtain the expert motion, as one can simply move the robot base by hand along the desired trajectory without any joint actuation.
|
| 61 |
+
|
| 62 |
+
Using $H$ -step inputs and a gradient penalty, Eq. 2 turns into
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\arg \operatorname* { m i n } _ { D } w ^ { \mathrm { D } } ( - \mathbb { E } _ { d ^ { \mathcal { M } } } [ D ( \boldsymbol { o } ^ { H } ) ] + \mathbb { E } _ { d ^ { \mathcal { \pi } } } [ D ( \Phi ( \boldsymbol { s } ^ { H } ) ) ] ) + w ^ { \mathrm { G P } } \mathbb { E } _ { d ^ { \mathcal { M } } } [ \| \nabla _ { \Omega } D ( \Omega ) \vert _ { \Omega = \boldsymbol { o } ^ { H } } ) \| _ { 2 } ^ { 2 } ] ,
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
where the last term denotes the penalty for nonzero gradients on samples from the dataset [17]. $w ^ { \mathrm { D } }$ and $w ^ { \mathrm { G P } }$ denote the weights on the Wasserstein loss and the gradient penalty, respectively. In our experiments, they are set to $w ^ { \mathrm { D } } = 0 . 5$ and $w ^ { \mathrm { G P } } = 5 . 0$ for all tasks.
|
| 69 |
+
|
| 70 |
+
# 3.3 Reward Formulation
|
| 71 |
+
|
| 72 |
+
Despite discriminator regularization, due to the unbounded discriminator output, the scale of the reward can be arbitrary which makes it difficult to introduce additional regularization terms for stabilizing the robot motion. Therefore, we normalize the reward to have zero mean and unit variance in the policy training loop by maintaining its running mean $\widehat { \mu }$ and variance $\widehat { \sigma } ^ { 2 }$ . With this formulation, the imitation reward is then given by
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
r ^ { \mathrm { I } } = \frac { D \left( \Phi ( s ^ { H } ) \right) - \widehat { \mu } } { \widehat { \sigma } } ,
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
where $D \left( \Phi ( s ^ { H } ) \right)$ denotes the output of the discriminator.
|
| 79 |
+
|
| 80 |
+
To increase policy learning efficiency, a common practice is to define a termination condition for rollouts. In our work, an instantaneous environment reset is triggered when a robot base collision against the ground is detected. Since the imitation reward has zero mean and difficult behaviors are likely to result in negative rewards initially, the policy may attempt to end the episode early. To circumvent this, a termination penalty is imposed at the last transition before a collision happens. As the normalized reward follows a distribution with zero mean and unit variance, $- 5 \sigma$ is a lower bound on the reward with a probability greater than $9 9 . 9 9 \%$ . We use this to derive a reasonable termination penalty, based on the geometric series, by a high-probability lower bound on the return
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
r ^ { \mathrm { T } } = \mathbb { I } s \in \mathcal { T } \mathbb { I } \frac { - 5 \sigma } { 1 - \gamma } ,
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+

|
| 87 |
+
Figure 2: System overview. Given a reference dataset defining the desired base motion, the system trains a discriminator that learns an imitation reward for the policy training. This imitation reward is then combined with a regularization reward and termination penalty to train a policy that enables the robot to replicate the demonstrated motion while maintaining feasible and stable joint actuation.
|
| 88 |
+
|
| 89 |
+
where $\gamma$ is the discount factor, $\tau$ is the set of early termination states, and $[ [ \cdot ] ]$ is the Iverson bracket (1 J Kif true, 0 otherwise). Putting everything together, the total reward that the policy receives encompasses three parts, the imitation reward $\dot { \boldsymbol { r } } ^ { \mathrm { I } }$ defined by the normalized discriminator output, the termination reward $r ^ { \mathrm { T } }$ , and the regularization reward $r ^ { \mathrm { R } }$ to guarantee stable policy outputs (detailed in Suppl. C)
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\begin{array} { r } { r = w ^ { \mathrm { I } } ( r ^ { \mathrm { I } } + r ^ { \mathrm { T } } ) + r ^ { \mathrm { R } } , } \end{array}
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
where $w ^ { \mathrm { I } }$ is a motion-specific scaling factor controlling the relative importance of the imitation reward (and the termination penalty) with respect to the regularization terms.
|
| 96 |
+
|
| 97 |
+
Note that our reward formulation enables the robot to learn highly dynamic skills without any explicitly defined desired-motion-incentivizing reward, as is used in AMP, where an a priori designed reward still has to motivate the policy to execute a specific movement [17]. It is also noteworthy that the LSGAN formulation in our setting can be viewed as an implementation of AMP modified for task reward learning with substantial adaptations as detailed in Suppl. D. Figure 2 provides a schematic overview of our method, and an algorithm overview is detailed in Algorithm 1.
|
| 98 |
+
|
| 99 |
+
# Algorithm 1 WASABI
|
| 100 |
+
|
| 101 |
+
1: Input: dataset of reference motions $\mathcal { M }$ , feature map $\Phi$
|
| 102 |
+
2: initialize discriminator $D$ , policy $\pi$ , value function $V$ , state transition buffer $s ^ { H }$ , replay buffer $B$
|
| 103 |
+
3: for learning iterations $= 1 , 2 , \ldots$ do
|
| 104 |
+
4: collect $N + H$ transitions $\left( s _ { t } , a _ { t } , r _ { t } ^ { \mathrm { R } } , s _ { t + 1 } \right) _ { t - H } ^ { t + N }$ with policy $\pi$
|
| 105 |
+
5: compute $r _ { \tau } ^ { \mathrm { I } }$ using discriminator outputs $D$ $) \left( \Phi ( s _ { i } ^ { H } ) \right)$ for $i = t , \ldots , t + N$
|
| 106 |
+
6: calculate transition rewards ${ \boldsymbol { r } } _ { t } = { \boldsymbol { w } } ^ { \mathrm { I } } \left( { \boldsymbol { r } } _ { t } ^ { \mathrm { I } } + { \boldsymbol { r } } _ { t } ^ { \mathrm { T } } \right) + { \boldsymbol { r } } _ { t } ^ { \mathrm { R } }$ according to Equations 4, 5, and 6
|
| 107 |
+
7: fill replay buffer $B$ with $\left( s _ { t } , a _ { t } , r _ { t } , s _ { t + 1 } , \Phi ( s _ { t } ^ { H } ) \right) _ { t } ^ { t + N }$
|
| 108 |
+
8: for policy learning epoch $\mathfrak { l } = 1 , 2 , \ldots , n _ { \pi }$ do
|
| 109 |
+
9: sample transition mini-batches $b ^ { \pi } \sim B$
|
| 110 |
+
10: update $V$ and $\pi$ by PPO objective or another RL algorithm
|
| 111 |
+
11: end for
|
| 112 |
+
12: for discriminator learning epoch $= 1 , 2 , \dotsc , n _ { D }$ do
|
| 113 |
+
13: sample transition mini-batches $b ^ { \pi } \sim B$ and $b ^ { \mathcal { M } } \sim \mathcal { M }$
|
| 114 |
+
14: update discriminator $D$ using $b ^ { \pi }$ and $b ^ { \mathcal { M } }$ according to the loss associated with Eq. 3
|
| 115 |
+
15: end for
|
| 116 |
+
16: end for
|
| 117 |
+
|
| 118 |
+
# 4 Experiments
|
| 119 |
+
|
| 120 |
+
We evaluate WASABI on the Solo 8 robot, an open-source research quadruped robot that performs a wide range of physical actions [45], in simulation and on the real system (Fig. 3). For evaluation, we introduce 4 different robotics tasks. In SOLOLEAP, the robot is asked to move forward with a jumping motion. SOLOWAVE requires the robot to produce a wave-like locomotion behavior. For
|
| 121 |
+
|
| 122 |
+

|
| 123 |
+
Figure 3: Solo 8 (left). Backflip motion in Isaac Gym (right).
|
| 124 |
+
|
| 125 |
+

|
| 126 |
+
Figure 4: Adversarial imitation rewards for SOLOBACKFLIP. Imitation reward heatmap for LSGAN (a) and WASABI (b) around reference trajectories (blue) generated in varying pitch rate $\dot { \theta }$ and base height $z$ . (c) Distribution of imitation rewards for LSGAN and WASABI during training. WASABI provides a more fine-grained reward function.
|
| 127 |
+
|
| 128 |
+
SOLOSTANDUP we require the robot to stand up on its hind legs. In SOLOBACKFLIP the robot is asked to generate motions of a full backflip. We provide rough demonstrations of these motions by manually carrying the robot through the motion and recording only the base information. The demonstrations are then used to infer an adversarial imitation reward for training a control policy that outputs target joint positions, as outlined in Sec. 3.1. An overview of the desired movements is provided in Suppl. G, we also provide further ablation studies in Suppl. I.
|
| 129 |
+
|
| 130 |
+
In all of our experiments, we use Proximal Policy Optimization (PPO) [46] in Isaac Gym [47] and make use of domain randomization [48] for sim-to-real transfer. Further details on the training procedure can be found in Suppl. A.
|
| 131 |
+
|
| 132 |
+
# 4.1 Induced Imitation Reward Distributions
|
| 133 |
+
|
| 134 |
+
The LSGAN loss is proposed to alleviate the saturation problem that is encountered for the CEGAN loss. Yet, as outlined in Sec. 3.1, it does not directly yield a practical reward function. Peng et al. [17] remedy this by using $r ^ { \mathrm { I } } = \operatorname* { m a x } \left[ 0 , 1 - 0 . 2 5 ( \bar { D } ( \mathbf { \dot { \Phi } } ( s ) , \hat { \Phi ( s ^ { \prime } ) } ) - 1 ) ^ { 2 } \right]$ to map the discriminator output to the imitation reward and bound it between 0 and 1. However, with the effective clipping at 0, information about the distance from the policy to the demonstration transitions is lost with discriminator prediction smaller than $- 1$ (Fig. 4c). In addition, we show in Fig. 4a that the imitation reward learned using LSGAN yields a less informative signal for policy training, which is rather uniformly distributed across pitch rate $\dot { \theta }$ and base height $z$ dimensions. In comparison, WASABI can use the discriminator output directly, learning a more characteristic reward function across the state space where reference trajectories are clearly outlined to yield high rewards in contrast to the off-trajectory states (Fig. 4b).
|
| 135 |
+
|
| 136 |
+
# 4.2 Learning to Mimic Rough Demonstrations
|
| 137 |
+
|
| 138 |
+
Since we record the base motion of the robot carried by a human demonstrator, we do not have access to a reward function evaluating learned behaviors or measuring the closeness between the demonstrated and the policy trajectories. In addition, these trajectories are largely misaligned. For this reason, we make use of Dynamic Time Warping (DTW) [49] with the $L _ { 2 }$ norm metric for comparing policy trajectories and reference demonstrations. DTW allows us to match and compute the distance between the trajectories in a time-consistent manner (Fig. 1). Concretely, we use $\mathbb { E } \left[ d ^ { \mathrm { D T W } } ( \Phi ( \tau _ { \pi } ) , \tau _ { \mathcal { M } } ) \right]$ as the evaluation metric, where $\tau _ { \pi } \sim d ^ { \pi }$ is a state trajectory from a policy
|
| 139 |
+
|
| 140 |
+
<table><tr><td>Method</td><td>SOLOLEAP</td><td>SoLOWAVE</td><td>SOLOSTANDUP</td><td>SOLOBACKFLIP</td></tr><tr><td>WASABI</td><td>131.70 ± 16.44</td><td>247.29 ± 11.59</td><td>351.13 ± 88.60</td><td>477.43 ± 56.77</td></tr><tr><td>LSGAN</td><td>155.31 ± 18.10</td><td>230.91 ± 5.95</td><td>678.21 ± 6.71</td><td>813.76 ± 19.75</td></tr><tr><td> Stand Still</td><td>216.41</td><td>460.15</td><td>494.40</td><td>877.74</td></tr></table>
|
| 141 |
+
|
| 142 |
+
Table 1: Comparison of performances for LSGAN and WASABI trained with hand-held demonstrations in terms of DTW distance $d ^ { \mathrm { D T W } }$ (lower is better), successful runs are in bold font. As a reference, we provide also $d ^ { \mathrm { D T W } }$ of a constantly standing trajectory.
|
| 143 |
+
|
| 144 |
+

|
| 145 |
+
Figure 5: Performance of WASABI and LSGAN in terms of the handcrafted task reward for SOLOSTANDUP (left) and SOLOBACKFLIP (right). Dashed lines indicate partial information $( \dag )$ .
|
| 146 |
+
|
| 147 |
+
rollout and $\tau _ { \mathcal { M } } \sim d ^ { \mathcal { M } }$ denotes a reference motion from the dataset. We provide further details about this metric in Suppl. H. In Table 1 we compare performances in simulation for the different reference motions.
|
| 148 |
+
|
| 149 |
+
In order to confirm that WASABI is indeed able to extract a sensible reward function that motivates the desired motion, we compare the performance of LSGAN and WASABI in SOLOSTANDUP and SOLOBACKFLIP using an expert baseline that is trained on a handcrafted task reward for generating demonstrations in simulation. Details on the handcrafted task reward formulation are given in Suppl. E. The learned policies are evaluated with the same task rewards that are used to obtain the expert policies. A comparison of training performance curves in terms of the corresponding handcrafted task rewards is detailed in Fig. 5. In Table 2 we show the performance evaluation of the best runs. Observe that the policies trained by WASABI perform comparably to the expert policies trained with the handcrafted rewards. Interestingly, learning from partial state information may sometimes facilitate policy learning, since a decrease in discriminator observation dimensions could potentially alleviate the problem of discriminator becoming too strong as indicated in Fig. 5.
|
| 150 |
+
|
| 151 |
+
# 4.3 Evaluation on Real Robot
|
| 152 |
+
|
| 153 |
+
To evaluate our method on real system, we trained policies for sim-to-real transfer with WASABI for the SOLOLEAP, SOLOWAVE and SOLOBACKFLIP. The Solo 8 robot is powered by an external battery and driven by a controller on an external operating machine. It receives root state estimation using 10 markers attached around the base which are tracked using a Vicon motion capture system operating at $1 0 0 \mathrm { H z }$ . During deployment, we recorded the robot base information for evaluation by $d ^ { \mathrm { D T W } }$ . As detailed in Suppl. F, the policy observation space, reward, and training hyperparameters are adapted to facilitate sim-to-real transfer for these tasks specifically. The resulting performance on the real system, as shown in Table 3, resembles the performance obtained in simulation.
|
| 154 |
+
|
| 155 |
+
<table><tr><td>Method</td><td>SOLOSTANDUp†</td><td>SOLOSTANDUp*</td><td>SOLOBACKFLIPt</td><td>SOLOBACKFLIP*</td></tr><tr><td>WASABI</td><td>1.54 ± 0.51</td><td>1.68 ± 0.51</td><td>0.36 ± 0.05</td><td>0.28 ±0.02</td></tr><tr><td>LSGAN</td><td>1.07 ± 0.5</td><td>0.44 ± 0.14</td><td>0.12 ± 0.01</td><td>0.06 ± 0.01</td></tr><tr><td>Handcrafted</td><td colspan="2">2.24 ± 0.05</td><td colspan="2">0.77 ± 0.04</td></tr></table>
|
| 156 |
+
|
| 157 |
+
Table 2: Performance comparison in terms of handcrafted task reward (higher is better). We denote with $^ *$ where the full robot configuration is given to the discriminator and $\dagger$ where only base information is given. Successful runs are in bold font. Std-dev. is over 5 independent random seeds.
|
| 158 |
+
|
| 159 |
+
Table 3: Sim-to-real performance on the Solo 8 in terms of DTW distance (lower is better). Values are computed from the recorded data of the learned policies with respect to the reference trajectories.
|
| 160 |
+
|
| 161 |
+
<table><tr><td></td><td>SOLOLEAP</td><td>SOLOWAVE</td><td>SOLOBACKFLIP</td></tr><tr><td>WASABI (Real)</td><td>153.64± 7.08</td><td>215.38 ± 21.82</td><td>504.26 ± 18.90</td></tr><tr><td>WASABI (Sim)</td><td>131.70 ± 16.44</td><td>247.29 ± 11.59</td><td>477.43 ± 56.77</td></tr></table>
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 6: ANYmal C (left). Wave motion in Isaac Gym (right).
|
| 165 |
+
|
| 166 |
+
# 4.4 Cross-platform Imitation
|
| 167 |
+
|
| 168 |
+
As the reference motion in WASABI contains only base information, it does not restrict itself to be obtained only from any specific robotic platform. This provides the possibility of cross-platform imitation. Using the reference trajectories recorded from Solo 8, with a manual offset of $\mathrm { 0 . 2 5 ~ m }$ on the base height dimension addressing different sizes of the robots, we apply WASABI to ANYmal [50], a four-legged dog-like robot for research and industrial maintenance (Fig. 6). To confirm that WASABI applies to cross-platform imitation, we define ANYMALWAVE and ANYMALBACKFLIP tasks for the corresponding wave and backflip motions learned by ANYmal, yet from the reference data recorded from Solo 8. The performance in terms of the DTW distance is detailed in Table 4.
|
| 169 |
+
|
| 170 |
+
Table 4: Performance of cross-platform imitation of ANYmal using WASABI trained with hand-held demonstrations from Solo 8 in terms of DTW distance $d ^ { \mathrm { D T W } }$ , successful runs are in bold font.
|
| 171 |
+
|
| 172 |
+
<table><tr><td>Method</td><td>SoLOWAVE</td><td>ANYMALWAVE</td><td>SOLOBACKFLIP</td><td>ANYMALBACKFLIP</td></tr><tr><td>WASABI</td><td>247.29 ± 11.59</td><td>193.08 ± 14.52</td><td>477.43 ± 56.77</td><td>572.60 ± 12.18</td></tr><tr><td>Stand Still</td><td colspan="2">460.15</td><td colspan="2">877.74</td></tr></table>
|
| 173 |
+
|
| 174 |
+
# 5 Conclusion
|
| 175 |
+
|
| 176 |
+
In this work, we propose an adversarial imitation method named WASABI for inferring reward functions that is capable of learning agile skills from partial and physically incompatible demonstrations without any a priori known reward terms. Our results indicate that WASABI allows extracting robust policies that are able to transfer to the real system and enables cross-platform imitation. Furthermore, our experiments confirm that imitation learning using the LSGAN fits style transfer settings where desired motions are more achievable. For highly agile or incompatible motions which initially seem beyond the robot’s capability, WASABI outperforms LSGAN by successful and faithful replication of roughly demonstrated behaviors. Further extensions and applications are presented in Suppl. J.
|
| 177 |
+
|
| 178 |
+
# 6 Limitations
|
| 179 |
+
|
| 180 |
+
While saving the effort of developing a specific task reward that motivates desired motions, providing a good evaluation metric in terms of a distance to the reference motion is not straightforward for generic rough demonstrations. Although DTW is a feasible option, it still requires a reasonable distance metric and careful choice of the warping procedure, which might be task-dependent. Moreover, since our method works with rough demonstrations, even a good distance metric to the reference may not help inform about closeness to feasible, desirable motions from the robot’s perspective. Finally, we do not intensively study to what extent our method is robust against the degree of incompatibility of the demonstrations.
|
| 181 |
+
|
| 182 |
+
# Acknowledgments
|
| 183 |
+
|
| 184 |
+
Georg Martius is a member of the Machine Learning Cluster of Excellence, EXC number 2064/1 – Project number 390727645. We acknowledge the support from the German Federal Ministry of Education and Research (BMBF) through the Tübingen AI Center (FKZ: 01IS18039B). The authors thank the International Max Planck Research School for Intelligent Systems (IMPRS-IS) for supporting Marin Vlastelica and Sebastian Blaes, and Max Planck ETH Center for Learning Systems for supporting Jonas Frey.
|
| 185 |
+
|
| 186 |
+
# References
|
| 187 |
+
|
| 188 |
+
[1] M. Raibert, K. Blankespoor, G. Nelson, and R. Playter. Bigdog, the rough-terrain quadruped robot. IFAC Proceedings Volumes, 41(2):10822–10825, 2008.
|
| 189 |
+
[2] J. Di Carlo, P. M. Wensing, B. Katz, G. Bledt, and S. Kim. Dynamic locomotion in the mit cheetah 3 through convex model-predictive control. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 1–9. IEEE, 2018.
|
| 190 |
+
[3] J. Hwangbo, J. Lee, A. Dosovitskiy, D. Bellicoso, V. Tsounis, V. Koltun, and M. Hutter. Learning agile and dynamic motor skills for legged robots. Science Robotics, 4(26):eaau5872, 2019.
|
| 191 |
+
[4] J. Lee, J. Hwangbo, L. Wellhausen, V. Koltun, and M. Hutter. Learning quadrupedal locomotion over challenging terrain. Science robotics, 5(47):eabc5986, 2020.
|
| 192 |
+
[5] A. Kumar, Z. Fu, D. Pathak, and J. Malik. RMA: Rapid motor adaptation for legged robots. In Robotics: Science and Systems XVII (RSS), 2021.
|
| 193 |
+
[6] T. Miki, J. Lee, J. Hwangbo, L. Wellhausen, V. Koltun, and M. Hutter. Learning robust perceptive locomotion for quadrupedal robots in the wild. Science Robotics, 7(62):eabk2822, 2022.
|
| 194 |
+
[7] D. A. Pomerleau. Efficient training of artificial neural networks for autonomous navigation. Neural Computation, 3(1):88–97, 1991.
|
| 195 |
+
[8] F. Torabi, G. Warnell, and P. Stone. Behavioral cloning from observation. ArXiv, abs/1805.01954, 2018.
|
| 196 |
+
[9] S. Ross, G. Gordon, and D. Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, pages 627–635. JMLR Workshop and Conference Proceedings, 2011.
|
| 197 |
+
[10] A. Hussein, M. M. Gaber, E. Elyan, and C. Jayne. Imitation learning: A survey of learning methods. ACM Computing Surveys (CSUR), 50(2):1–35, 2017.
|
| 198 |
+
[11] B. D. Ziebart, A. L. Maas, J. A. Bagnell, A. K. Dey, et al. Maximum entropy inverse reinforcement learning. In AAAI, volume 8, pages 1433–1438. Chicago, IL, USA, 2008.
|
| 199 |
+
[12] E. Bashir and M. Luštrek. Inverse reinforcement learning through max-margin algorithm. In Intelligent Environments 2021: Workshop Proceedings of the 17th International Conference on Intelligent Environments, volume 29, page 190. IOS Press, 2021.
|
| 200 |
+
[13] D. Garg, S. Chakraborty, C. Cundy, J. Song, and S. Ermon. Iq-learn: Inverse soft-q learning for imitation. Advances in Neural Information Processing Systems, 34, 2021.
|
| 201 |
+
[14] P. Abbeel and A. Y. Ng. Apprenticeship learning via inverse reinforcement learning. In Proceedings of the Twenty-first International Conference on Machine Learning, page 1, 2004.
|
| 202 |
+
[15] J. Ho and S. Ermon. Generative adversarial imitation learning. In Advances in Neural Information Processing Systems, volume 29, 2016.
|
| 203 |
+
[16] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial networks. In Advances in Neural Information Processing Systems, volume 3, 06 2014.
|
| 204 |
+
[17] X. B. Peng, Z. Ma, P. Abbeel, S. Levine, and A. Kanazawa. AMP: Adversarial motion priors for stylized physics-based character control. ACM Transactions on Graphics (TOG), 40(4):1–20, 2021.
|
| 205 |
+
[18] D. Pathak, D. Gandhi, and A. Gupta. Self-supervised exploration via disagreement. In International Conference on Machine Learning, pages 5062–5071. PMLR, 2019.
|
| 206 |
+
[19] Q. Cai, Z. Yang, C. Jin, and Z. Wang. Provably efficient exploration in policy optimization. In International Conference on Machine Learning, pages 1283–1294. PMLR, 2020.
|
| 207 |
+
[20] A. Billard, S. Calinon, R. Dillmann, and S. Schaal. Survey: Robot programming by demonstration. Technical report, Springrer, 2008.
|
| 208 |
+
[21] B. D. Argall, S. Chernova, M. Veloso, and B. Browning. A survey of robot learning from demonstration. Robotics and Autonomous Systems, 57(5):469–483, 2009.
|
| 209 |
+
[22] S. Schaal. Learning from demonstration. Advances in Neural Information Processing Systems, 9, 1996.
|
| 210 |
+
[23] C. G. Atkeson and S. Schaal. Robot learning from demonstration. In ICML, volume 97, pages 12–20, 1997.
|
| 211 |
+
[24] S. Schaal. Is imitation learning the route to humanoid robots? Trends in Cognitive Sciences, 3 (6):233–242, 1999.
|
| 212 |
+
[25] S. Calinon, F. D’halluin, E. L. Sauser, D. G. Caldwell, and A. G. Billard. Learning and reproduction of gestures by imitation. IEEE Robotics & Automation Magazine, 17(2):44–54, 2010.
|
| 213 |
+
[26] S. M. Khansari-Zadeh and A. Billard. Learning stable nonlinear dynamical systems with gaussian mixture models. IEEE Transactions on Robotics, 27(5):943–957, 2011.
|
| 214 |
+
[27] A. J. Ijspeert, J. Nakanishi, H. Hoffmann, P. Pastor, and S. Schaal. Dynamical movement primitives: learning attractor models for motor behaviors. Neural Computation, 25(2):328–373, 2013.
|
| 215 |
+
[28] F. Codevilla, E. Santana, A. M. López, and A. Gaidon. Exploring the limitations of behavior cloning for autonomous driving. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9329–9338, 2019.
|
| 216 |
+
[29] Y. Lee, S. Kim, and J. Lee. Data-driven biped control. ACM Trans. Graph., 29(4), jul 2010. ISSN 0730-0301.
|
| 217 |
+
[30] L. Liu, K. Yin, M. van de Panne, T. Shao, and W. Xu. Sampling-based contact-rich motion control. ACM SIGGRAPH 2010 papers, 2010.
|
| 218 |
+
[31] L. Liu, M. V. D. Panne, and K. Yin. Guided learning of control graphs for physics-based characters. ACM Transactions on Graphics (TOG), 35(3):1–14, 2016.
|
| 219 |
+
[32] X. B. Peng, P. Abbeel, S. Levine, and M. van de Panne. Deepmimic: Example-guided deep reinforcement learning of physics-based character skills. ACM Transactions on Graphics (TOG), 37(4):1–14, 2018.
|
| 220 |
+
[33] S. Lee, M. Park, K. Lee, and J. Lee. Scalable muscle-actuated human simulation and control. ACM Transactions On Graphics (TOG), 38(4):1–13, 2019.
|
| 221 |
+
[34] X. B. Peng, A. Kanazawa, J. Malik, P. Abbeel, and S. Levine. Sfv: Reinforcement learning of physical skills from videos. ACM Transactions On Graphics (TOG), 37(6):1–14, 2018.
|
| 222 |
+
[35] J. Merel, Y. Tassa, D. TB, S. Srinivasan, J. Lemmon, Z. Wang, G. Wayne, and N. Heess. Learning human behaviors from motion capture by adversarial imitation. arXiv preprint arXiv:1707.02201, 2017.
|
| 223 |
+
[36] Z. Wang, J. S. Merel, S. E. Reed, N. de Freitas, G. Wayne, and N. Heess. Robust imitation of diverse behaviors. Advances in Neural Information Processing Systems, 30, 2017.
|
| 224 |
+
[37] R. Jena and K. P. Sycara. Loss-annealed gail for sample efficient and stable imitation learning. ArXiv, abs/2001.07798, 2020.
|
| 225 |
+
[38] J. Fu, K. Luo, and S. Levine. Learning robust rewards with adversarial inverse reinforcement learning. arXiv preprint arXiv:1710.11248, 2017.
|
| 226 |
+
[39] A. Escontrela, X. B. Peng, W. Yu, T. Zhang, A. Iscen, K. Goldberg, and P. Abbeel. Adversarial motion priors make good substitutes for complex reward functions. arXiv preprint arXiv:2203.15103, 2022.
|
| 227 |
+
[40] E. Vollenweider, M. Bjelonic, V. Klemm, N. Rudin, J. Lee, and M. Hutter. Advanced skills through multiple adversarial motion priors in reinforcement learning. arXiv preprint arXiv:2203.14912, 2022.
|
| 228 |
+
[41] M. Arjovsky and L. Bottou. Towards principled methods for training generative adversarial networks. arXiv preprint arXiv:1701.04862, 2017.
|
| 229 |
+
[42] X. Mao, Q. Li, H. Xie, R. Y. Lau, Z. Wang, and S. Paul Smolley. Least squares generative adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 2794–2802, 2017.
|
| 230 |
+
[43] Y. Rubner, C. Tomasi, and L. J. Guibas. A metric for distributions with applications to image databases. In Sixth international conference on computer vision (IEEE Cat. No. 98CH36271), pages 59–66. IEEE, 1998.
|
| 231 |
+
[44] M. Arjovsky, S. Chintala, and L. Bottou. Wasserstein gan. ArXiv, abs/1701.07875, 2017.
|
| 232 |
+
[45] F. Grimminger, A. Meduri, M. Khadiv, J. Viereck, M. Wüthrich, M. Naveau, V. Berenz, S. Heim, F. Widmaier, T. Flayols, J. Fiene, A. Badri-Spröwitz, and L. Righetti. An open torque-controlled modular robot architecture for legged locomotion research. IEEE Robotics and Automation Letters, 5(2):3650–3657, 2020. doi:10.1109/LRA.2020.2976639.
|
| 233 |
+
[46] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 234 |
+
[47] V. Makoviychuk, L. Wawrzyniak, Y. Guo, M. Lu, K. Storey, M. Macklin, D. Hoeller, N. Rudin, A. Allshire, A. Handa, et al. Isaac gym: High performance gpu-based physics simulation for robot learning. arXiv preprint arXiv:2108.10470, 2021.
|
| 235 |
+
[48] J. Tobin, R. Fong, A. Ray, J. Schneider, W. Zaremba, and P. Abbeel. Domain randomization for transferring deep neural networks from simulation to the real world. In 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 23–30. IEEE, 2017.
|
| 236 |
+
[49] D. J. Berndt and J. Clifford. Using dynamic time warping to find patterns in time series. In KDD Workshop, 1994.
|
| 237 |
+
[50] Anymal c – the next step in robotic industrial inspection, August 2019. URL https://www. anybotics.com/the-next-step-in-robotic-industrial-inspection/.
|
parse/dev/x6INXlnUGro/x6INXlnUGro_content_list.json
ADDED
|
@@ -0,0 +1,942 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"type": "text",
|
| 4 |
+
"text": "Learning Agile Skills via Adversarial Imitation of Rough Partial Demonstrations ",
|
| 5 |
+
"text_level": 1,
|
| 6 |
+
"bbox": [
|
| 7 |
+
200,
|
| 8 |
+
101,
|
| 9 |
+
799,
|
| 10 |
+
151
|
| 11 |
+
],
|
| 12 |
+
"page_idx": 0
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"type": "text",
|
| 16 |
+
"text": "Chenhao $\\mathbf { L i } ^ { 1 , 2 }$ , Marin Vlastelica1, Sebastian Blaes1, Jonas Frey2,1, Felix Grimminger1, Georg Martius1 1Max Planck Institute for Intelligent Systems, Germany 2 Robotic Systems Lab, ETH Zurich, Switzerland chenhao.li@tuebingen.mpg.de ",
|
| 17 |
+
"bbox": [
|
| 18 |
+
269,
|
| 19 |
+
175,
|
| 20 |
+
732,
|
| 21 |
+
252
|
| 22 |
+
],
|
| 23 |
+
"page_idx": 0
|
| 24 |
+
},
|
| 25 |
+
{
|
| 26 |
+
"type": "text",
|
| 27 |
+
"text": "Abstract: Learning agile skills is one of the main challenges in robotics. To this end, reinforcement learning approaches have achieved impressive results. These methods require explicit task information in terms of a reward function or an expert that can be queried in simulation to provide a target control output, which limits their applicability. In this work, we propose a generative adversarial method for inferring reward functions from partial and potentially physically incompatible demonstrations for successful skill acquirement where reference or expert demonstrations are not easily accessible. Moreover, we show that by using a Wasserstein GAN formulation and transitions from demonstrations with rough and partial information as input, we are able to extract policies that are robust and capable of imitating demonstrated behaviors. Finally, the obtained skills such as a backflip are tested on an agile quadruped robot called Solo 8 and present faithful replication of hand-held human demonstrations. ",
|
| 28 |
+
"bbox": [
|
| 29 |
+
232,
|
| 30 |
+
295,
|
| 31 |
+
766,
|
| 32 |
+
474
|
| 33 |
+
],
|
| 34 |
+
"page_idx": 0
|
| 35 |
+
},
|
| 36 |
+
{
|
| 37 |
+
"type": "text",
|
| 38 |
+
"text": "Keywords: Adversarial, Imitation Learning, Legged Robots ",
|
| 39 |
+
"bbox": [
|
| 40 |
+
233,
|
| 41 |
+
487,
|
| 42 |
+
629,
|
| 43 |
+
502
|
| 44 |
+
],
|
| 45 |
+
"page_idx": 0
|
| 46 |
+
},
|
| 47 |
+
{
|
| 48 |
+
"type": "image",
|
| 49 |
+
"img_path": "images/54ed9e7feb526fd6840fc861b3659f2ffa346702fcfc613371ffd0fcbe359959.jpg",
|
| 50 |
+
"image_caption": [
|
| 51 |
+
"Figure 1: Our method (WASABI) achieves agile physical behaviors from rough (hand-held) and partial (robot base) motions. The illustrated performance measure is the Dynamic Time Warping distance of the base trajectories (left). A learned backflip policy is deployed on Solo 8 (right). "
|
| 52 |
+
],
|
| 53 |
+
"image_footnote": [],
|
| 54 |
+
"bbox": [
|
| 55 |
+
212,
|
| 56 |
+
523,
|
| 57 |
+
785,
|
| 58 |
+
633
|
| 59 |
+
],
|
| 60 |
+
"page_idx": 0
|
| 61 |
+
},
|
| 62 |
+
{
|
| 63 |
+
"type": "text",
|
| 64 |
+
"text": "1 Introduction ",
|
| 65 |
+
"text_level": 1,
|
| 66 |
+
"bbox": [
|
| 67 |
+
174,
|
| 68 |
+
712,
|
| 69 |
+
310,
|
| 70 |
+
728
|
| 71 |
+
],
|
| 72 |
+
"page_idx": 0
|
| 73 |
+
},
|
| 74 |
+
{
|
| 75 |
+
"type": "text",
|
| 76 |
+
"text": "Obtaining dynamic skills for autonomous machines has been a cardinal challenge in robotics. In the field of legged systems, many attempts have been made to attain diverse skills using conventional inverse kinematics techniques [1, 2]. In recent years, learning-based quadrupedal locomotion has been achieved by reinforcement learning (RL) approaches to address more complex environments and improve performance [3, 4, 5, 6]. However, the demand for acquiring more highly dynamic motions has brought new challenges to robot learning. A primary shortage of motivating desired behaviors by reward engineering is the arduous reward-shaping process involved. It can sometimes become extremely demanding in developing highly dynamic skills such as jumping and backflipping, where various terms of motivation and regularization require elaborated refinement. ",
|
| 77 |
+
"bbox": [
|
| 78 |
+
173,
|
| 79 |
+
742,
|
| 80 |
+
825,
|
| 81 |
+
867
|
| 82 |
+
],
|
| 83 |
+
"page_idx": 0
|
| 84 |
+
},
|
| 85 |
+
{
|
| 86 |
+
"type": "text",
|
| 87 |
+
"text": "Given the availability of some expert references, one possible solution is Imitation Learning (IL), which aims to mimic expert behaviors in a given task. In this framework, the agent is trained to perform a task from demonstrations by learning a mapping between observations and actions with either offline (e.g. behavioral cloning [7, 8]) or interactive (e.g. DAgger, SMILe [9]) methods. Generic IL methods could potentially reduce the problem of teaching a task to that of providing demonstrations, without the need for explicit programming or designing reward functions specific to the task [10]. Another related approach to replicating exerted motions of an expert is Inverse Reinforcement Learning (IRL). In IRL, the expert reward function is inferred given its policy or observed behaviors [11, 12, 13]. IRL is in general computationally expensive, and efforts are required to deal with ambiguous reward functions without making strong assumptions [14]. ",
|
| 88 |
+
"bbox": [
|
| 89 |
+
174,
|
| 90 |
+
873,
|
| 91 |
+
825,
|
| 92 |
+
901
|
| 93 |
+
],
|
| 94 |
+
"page_idx": 0
|
| 95 |
+
},
|
| 96 |
+
{
|
| 97 |
+
"type": "text",
|
| 98 |
+
"text": "",
|
| 99 |
+
"bbox": [
|
| 100 |
+
174,
|
| 101 |
+
92,
|
| 102 |
+
825,
|
| 103 |
+
202
|
| 104 |
+
],
|
| 105 |
+
"page_idx": 1
|
| 106 |
+
},
|
| 107 |
+
{
|
| 108 |
+
"type": "text",
|
| 109 |
+
"text": "More recently, Generative Adversarial Imitation Learning (GAIL) [15] draws a connection between IL and generative adversarial networks (GANs) [16], which train a generative model (generator) by having it deceive a discriminative classifier (discriminator). The task of the discriminator is to distinguish between data generated by the generator and the true data distribution. In the setting of GAIL, the true data distribution is the expert state-action distribution, while the learned policy is treated as the generator. The output of the discriminator can then be used as a reward that encourages the learning agent to generate similar behaviors to the demonstration. Analogously, the technique has been used for learning adversarial motion priors (AMP) [17], where the output of the discriminator is used as an additional style reward to the actual task reward, that is available beforehand. In a sense, AMP enables solving well-defined tasks in a specific style specified by a reference motion, without requiring access to underlying expert actions. ",
|
| 110 |
+
"bbox": [
|
| 111 |
+
174,
|
| 112 |
+
208,
|
| 113 |
+
825,
|
| 114 |
+
361
|
| 115 |
+
],
|
| 116 |
+
"page_idx": 1
|
| 117 |
+
},
|
| 118 |
+
{
|
| 119 |
+
"type": "text",
|
| 120 |
+
"text": "In this work, we present a novel adversarial imitation learning method named Wasserstein Adversarial Behavior Imitation (WASABI). We show that we are able to extract sensible task rewards from rough and partial demonstrations by utilizing adversarial training for obtaining agile skills in a sim-to-real setting. In contrast to Peng et al. [17], our approach does not require any prior information about the task at hand in form of a specific reward function, but only reasonable task-agnostic regularization terms in addition to the adversarial reward that make the robot motion more stable. Most importantly, we achieve this without having access to samples from an expert policy, but rather hand-held human demonstrations that are physically incompatible with the robot itself. To the best of our knowledge, this is the first time that highly dynamic skills are obtained from limited reference information. In summary, our contributions include: (i) An adversarial approach for learning from partial, physically incompatible demonstrations. (ii) Analysis of the Least-Squares vs. Wasserstein GAN loss for reward inference. (iii) Experimental validation in simulation and on a quadruped robot. Supplementary videos for this work are available at https://sites.google.com/view/ corl2022-wasabi/home. ",
|
| 121 |
+
"bbox": [
|
| 122 |
+
174,
|
| 123 |
+
367,
|
| 124 |
+
826,
|
| 125 |
+
559
|
| 126 |
+
],
|
| 127 |
+
"page_idx": 1
|
| 128 |
+
},
|
| 129 |
+
{
|
| 130 |
+
"type": "text",
|
| 131 |
+
"text": "2 Related Work ",
|
| 132 |
+
"text_level": 1,
|
| 133 |
+
"bbox": [
|
| 134 |
+
174,
|
| 135 |
+
582,
|
| 136 |
+
321,
|
| 137 |
+
599
|
| 138 |
+
],
|
| 139 |
+
"page_idx": 1
|
| 140 |
+
},
|
| 141 |
+
{
|
| 142 |
+
"type": "text",
|
| 143 |
+
"text": "Advances in robotics have spawned many potential applications that require intelligent systems to be able to not only make decisions but also to perform physical movements expectedly. However, in many cases, the desired behavior may not be discovered by a learning agent due to sub-optimal parameter settings or algorithmic limitations [18, 19]. While learning a task might be stated as an optimization problem, it has become widely accepted that having prior knowledge provided by an expert is more effective and efficient than attempting to solve the problem from scratch [20, 21]. ",
|
| 144 |
+
"bbox": [
|
| 145 |
+
174,
|
| 146 |
+
614,
|
| 147 |
+
825,
|
| 148 |
+
696
|
| 149 |
+
],
|
| 150 |
+
"page_idx": 1
|
| 151 |
+
},
|
| 152 |
+
{
|
| 153 |
+
"type": "text",
|
| 154 |
+
"text": "The idea of IL has been formed decades ago, raising solutions in conceptual and computational models to replicate motions from demonstrations [22, 23, 24]. It has been commonly acknowledged that IL entails three major approaches: model-based IL, learning a control policy directly, and learning from demonstrated trajectories. In the first approach, algorithms are applied to learn the parameters of the dynamics model to ensure that all executed motions closely follow the demonstration [25, 26, 27]. In the second approach, also known as behavioral cloning, the agent tries to reproduce the observed state-action pairs of the expert policy [7, 8]. Behavioral cloning often faces the problems of error compounding and poor generalization, which can lead to unstable policy output, particularly in out-of-distribution regions [28]. Alternatively, reference motions can be learned using an imitation goal, which is often implemented as a tracking objective that aims to reduce the pose error between the simulated character and target poses from a reference motion [29, 30, 31, 32]. A common strategy to estimate the pose error is to use a phase variable as an additional input to the controller to synchronize the agent with a specific reference motion [33, 32, 34]. This method typically works well for replicating single motion clips, but it may fail to scale to datasets with multiple reference motions which may not be synchronized and aligned according to a single-phase variable [17]. ",
|
| 155 |
+
"bbox": [
|
| 156 |
+
174,
|
| 157 |
+
704,
|
| 158 |
+
825,
|
| 159 |
+
911
|
| 160 |
+
],
|
| 161 |
+
"page_idx": 1
|
| 162 |
+
},
|
| 163 |
+
{
|
| 164 |
+
"type": "text",
|
| 165 |
+
"text": "Instead of employing a handcrafted imitation objective, adversarial IL techniques train an adversarial discriminator to distinguish between behaviors generated by an agent and demonstrations [14, 15]. While these methods have shown some promise for motion imitation tasks [35, 36], adversarial learning algorithms are notoriously unstable, and the resulting motion quality still lags well behind that of state-of-the-art tracking-based systems. Especially in the low-data regime, adversarial models can take a long time to converge [37, 17]. In some cases, adversarial IL techniques show limited robustness against different environment dynamics, as it fails to generalize to tasks where there is considerable variability in the environment from the demonstrations [38]. ",
|
| 166 |
+
"bbox": [
|
| 167 |
+
173,
|
| 168 |
+
90,
|
| 169 |
+
825,
|
| 170 |
+
202
|
| 171 |
+
],
|
| 172 |
+
"page_idx": 2
|
| 173 |
+
},
|
| 174 |
+
{
|
| 175 |
+
"type": "text",
|
| 176 |
+
"text": "With the ability to encompass multiple reference motions, AMP decouples task specification from style specification by combining GAIL with extra task objectives [17, 39]. The use of AMP reduces efforts in the selection of distance error metrics, phase indicators, and appropriate motion clips. This allows the learning agent to execute tasks that may not be portrayed in the original demonstrations. To enable active style control, Multi-AMP allows for the switching of multiple different style rewards by training multiple discriminators encoding different reference motions in parallel [40]. ",
|
| 177 |
+
"bbox": [
|
| 178 |
+
174,
|
| 179 |
+
208,
|
| 180 |
+
825,
|
| 181 |
+
292
|
| 182 |
+
],
|
| 183 |
+
"page_idx": 2
|
| 184 |
+
},
|
| 185 |
+
{
|
| 186 |
+
"type": "text",
|
| 187 |
+
"text": "3 Approach ",
|
| 188 |
+
"text_level": 1,
|
| 189 |
+
"bbox": [
|
| 190 |
+
174,
|
| 191 |
+
310,
|
| 192 |
+
287,
|
| 193 |
+
328
|
| 194 |
+
],
|
| 195 |
+
"page_idx": 2
|
| 196 |
+
},
|
| 197 |
+
{
|
| 198 |
+
"type": "text",
|
| 199 |
+
"text": "In this section, we describe our method, WASABI, which involves generative adversarial learning of an imitation reward from rough and partial demonstrations using a GAN framework. ",
|
| 200 |
+
"bbox": [
|
| 201 |
+
173,
|
| 202 |
+
342,
|
| 203 |
+
823,
|
| 204 |
+
369
|
| 205 |
+
],
|
| 206 |
+
"page_idx": 2
|
| 207 |
+
},
|
| 208 |
+
{
|
| 209 |
+
"type": "text",
|
| 210 |
+
"text": "3.1 Learning Task Reward from Limited Demonstration Information ",
|
| 211 |
+
"text_level": 1,
|
| 212 |
+
"bbox": [
|
| 213 |
+
174,
|
| 214 |
+
386,
|
| 215 |
+
666,
|
| 216 |
+
401
|
| 217 |
+
],
|
| 218 |
+
"page_idx": 2
|
| 219 |
+
},
|
| 220 |
+
{
|
| 221 |
+
"type": "text",
|
| 222 |
+
"text": "We consider partial demonstrations that are given in terms of limited state observations, for instance only local velocities of the robot’s base. The demonstrations are formulated as sequences of $o _ { t } \\in \\mathcal { O }$ , where the full state space $s$ of the underlying Markov Decision Process can be mapped to the observation space $\\mathcal { O }$ with a function $\\Phi : S \\mathcal { O }$ . We utilize generative adversarial learning for inferring the task reward function from such demonstrated transitions $( o , o ^ { \\prime } )$ in a reference motion. As such, the discriminator in this setup is to distinguish samples of the policy transition distribution $d ^ { \\pi }$ from the reference motion distribution $d ^ { \\mathcal { M } }$ . The policy $\\pi$ takes on the role of the generator. ",
|
| 223 |
+
"bbox": [
|
| 224 |
+
174,
|
| 225 |
+
411,
|
| 226 |
+
826,
|
| 227 |
+
508
|
| 228 |
+
],
|
| 229 |
+
"page_idx": 2
|
| 230 |
+
},
|
| 231 |
+
{
|
| 232 |
+
"type": "text",
|
| 233 |
+
"text": "The original GAN min-max loss (CEGAN) formulation has shown to suffer from vanishing gradients due to saturation regions of the cross-entropy loss function which slows down training [41]. If the discriminator performs excessively well and thus becomes saturated, the policy will not be able to learn any information, since it receives a constant penalty for being far away from the demonstrations. For this reason, Peng et al. [17] propose to use the least-squares GAN (LSGAN) loss [42] in AMP as a substitute for reward function learning. The LSGAN loss is formulated as ",
|
| 234 |
+
"bbox": [
|
| 235 |
+
173,
|
| 236 |
+
515,
|
| 237 |
+
825,
|
| 238 |
+
598
|
| 239 |
+
],
|
| 240 |
+
"page_idx": 2
|
| 241 |
+
},
|
| 242 |
+
{
|
| 243 |
+
"type": "equation",
|
| 244 |
+
"img_path": "images/74602fb928b266f43001c97ad07087a78d8f7f1d67f1c19ef0c13f2b44a566da.jpg",
|
| 245 |
+
"text": "$$\n\\underset { D } { \\arg \\operatorname* { m i n } } \\mathbb { E } _ { d ^ { \\mathcal { M } } } \\left[ \\left( D ( o , o ^ { \\prime } ) - 1 \\right) ^ { 2 } \\right] + \\mathbb { E } _ { d ^ { \\pi } } \\left[ \\left( D ( \\Phi ( s ) , \\Phi ( s ^ { \\prime } ) ) + 1 \\right) ^ { 2 } \\right] .\n$$",
|
| 246 |
+
"text_format": "latex",
|
| 247 |
+
"bbox": [
|
| 248 |
+
277,
|
| 249 |
+
603,
|
| 250 |
+
718,
|
| 251 |
+
633
|
| 252 |
+
],
|
| 253 |
+
"page_idx": 2
|
| 254 |
+
},
|
| 255 |
+
{
|
| 256 |
+
"type": "text",
|
| 257 |
+
"text": "The discriminator is defined as a mapping $D : { \\mathcal { O } } \\times { \\mathcal { O } } \\mapsto \\mathbb { R }$ and can be used, together with $\\Phi$ , as a drop-in replacement for the unknown reward function $r ( s , s ^ { \\prime } )$ . Intuitively, the LSGAN loss forces the discriminator to output $+ 1$ for samples from the reference motion and $- 1$ for those from the policy. It not only prevents vanishing gradients but also provides a well-scaled output that eases downstream policy learning. However, when faced with demonstrations that initially seem beyond what the agent can achieve, the discriminator is prone to be driven to optimality, prohibiting a more fine-grained evaluation of the policy transitions with respect to their closeness to the reference motion. Moreover, the LSGAN discriminator output does not directly lead to a practical reward function by itself, since an increase in its value does not always represent close replications of demonstrated transitions. This is a consequence of the least-squares loss symmetricity around $- 1$ and $+ 1$ , therefore a suitable mapping is typically needed to transform the output into a well-behaved reward function. For this reason, we propose to use the Wasserstein loss ",
|
| 258 |
+
"bbox": [
|
| 259 |
+
173,
|
| 260 |
+
638,
|
| 261 |
+
825,
|
| 262 |
+
805
|
| 263 |
+
],
|
| 264 |
+
"page_idx": 2
|
| 265 |
+
},
|
| 266 |
+
{
|
| 267 |
+
"type": "equation",
|
| 268 |
+
"img_path": "images/47f27d79aaf52e0b391d06393ca71ce19598e2fecb8cfcaae04abe37691d1f4f.jpg",
|
| 269 |
+
"text": "$$\n\\underset { { D } } { \\arg \\operatorname* { m i n } } - \\mathbb { E } _ { d ^ { \\mathcal { M } } } \\left[ D ( o , o ^ { \\prime } ) \\right] + \\mathbb { E } _ { d ^ { \\pi } } \\left[ D ( \\Phi ( s ) , \\Phi ( s ^ { \\prime } ) ) \\right] ,\n$$",
|
| 270 |
+
"text_format": "latex",
|
| 271 |
+
"bbox": [
|
| 272 |
+
328,
|
| 273 |
+
810,
|
| 274 |
+
666,
|
| 275 |
+
837
|
| 276 |
+
],
|
| 277 |
+
"page_idx": 2
|
| 278 |
+
},
|
| 279 |
+
{
|
| 280 |
+
"type": "text",
|
| 281 |
+
"text": "especially for highly dynamic motions where the discriminator is more likely to optimally distinguish between the reference and the generated motions. Under conditions of Lipschitz continuity, the Wasserstein loss is an efficient approximation to the earth mover’s distance which effectively measures the distance between two probability distributions [43]. In the original Wasserstein GAN (WGAN), Arjovsky et al. [44] enforce Lipschitz continuity by projected gradient descent, i.e. clipping the network weights. Similarly, we apply $L _ { 2 }$ regularization on the discriminator for the sake of simplicity. In addition, discriminator weight regularization also controls the scale of its output, which results in stable imitation rewards. ",
|
| 282 |
+
"bbox": [
|
| 283 |
+
174,
|
| 284 |
+
842,
|
| 285 |
+
825,
|
| 286 |
+
911
|
| 287 |
+
],
|
| 288 |
+
"page_idx": 2
|
| 289 |
+
},
|
| 290 |
+
{
|
| 291 |
+
"type": "text",
|
| 292 |
+
"text": "",
|
| 293 |
+
"bbox": [
|
| 294 |
+
174,
|
| 295 |
+
90,
|
| 296 |
+
823,
|
| 297 |
+
132
|
| 298 |
+
],
|
| 299 |
+
"page_idx": 3
|
| 300 |
+
},
|
| 301 |
+
{
|
| 302 |
+
"type": "text",
|
| 303 |
+
"text": "3.2 Preventing Mode Collapse in Adversarial Reward Learning ",
|
| 304 |
+
"text_level": 1,
|
| 305 |
+
"bbox": [
|
| 306 |
+
173,
|
| 307 |
+
148,
|
| 308 |
+
627,
|
| 309 |
+
165
|
| 310 |
+
],
|
| 311 |
+
"page_idx": 3
|
| 312 |
+
},
|
| 313 |
+
{
|
| 314 |
+
"type": "text",
|
| 315 |
+
"text": "Mode collapse is a common problem in GAN training, which manifests itself by the generator being able to produce only a small set of outputs. In our framework, mode collapse is reflected by the policy trying to replicate only a subset of the reference motion which gives a high reward. ",
|
| 316 |
+
"bbox": [
|
| 317 |
+
174,
|
| 318 |
+
174,
|
| 319 |
+
826,
|
| 320 |
+
217
|
| 321 |
+
],
|
| 322 |
+
"page_idx": 3
|
| 323 |
+
},
|
| 324 |
+
{
|
| 325 |
+
"type": "text",
|
| 326 |
+
"text": "The Wasserstein loss can alleviate mode collapse by allowing training of the discriminator to optimality while avoiding vanishing gradients [44]. In fact, if the discriminator does not get stuck in the local minimum, it learns to reject partial behaviors on which the policy stabilizes. As a result, the policy will have to attempt something different, if possible. In addition to the implementation of the Wasserstein loss, we extend the capability of the discriminator by allowing more than one state transition as input, i.e. we extend the input to $H$ consecutive observations. Note that this is typically not applicable to CEGAN or LSGAN, as a longer horizon makes the discriminator even stronger. By taking more sequential states into account, the policy reduces its chance to resort to the same safe transition patterns that are present in the reference motion. ",
|
| 327 |
+
"bbox": [
|
| 328 |
+
173,
|
| 329 |
+
222,
|
| 330 |
+
825,
|
| 331 |
+
348
|
| 332 |
+
],
|
| 333 |
+
"page_idx": 3
|
| 334 |
+
},
|
| 335 |
+
{
|
| 336 |
+
"type": "text",
|
| 337 |
+
"text": "We denote trajectory segments of length $H$ preceding time $t$ by $o _ { t } ^ { H } = \\left( o _ { t - H + 1 } , \\ldots , o _ { t } \\right)$ for the reference observations and $s _ { t } ^ { H } = ( s _ { t - { H + 1 } } , \\cdot \\cdot \\cdot , s _ { t } )$ − for the states induced by the policy. For clarity, we omit the time index in the following. To simplify notation, we write $\\bar { \\Phi ( s ^ { H } ) }$ to express that each state in $s ^ { H }$ is mapped to $\\mathcal { O }$ . In our experiments, we select linear and angular velocities $v , \\omega$ of the robot base in the robot frame, measurement of the gravity vector in the robot frame $g$ , and the base height $z$ as the observation space $\\mathcal { O }$ . More information on the state space and demonstration space is detailed in Suppl. B. Note that in this example, no joint information is required by the discriminator. This facilitates the process to obtain the expert motion, as one can simply move the robot base by hand along the desired trajectory without any joint actuation. ",
|
| 338 |
+
"bbox": [
|
| 339 |
+
173,
|
| 340 |
+
353,
|
| 341 |
+
826,
|
| 342 |
+
479
|
| 343 |
+
],
|
| 344 |
+
"page_idx": 3
|
| 345 |
+
},
|
| 346 |
+
{
|
| 347 |
+
"type": "text",
|
| 348 |
+
"text": "Using $H$ -step inputs and a gradient penalty, Eq. 2 turns into ",
|
| 349 |
+
"bbox": [
|
| 350 |
+
173,
|
| 351 |
+
484,
|
| 352 |
+
566,
|
| 353 |
+
500
|
| 354 |
+
],
|
| 355 |
+
"page_idx": 3
|
| 356 |
+
},
|
| 357 |
+
{
|
| 358 |
+
"type": "equation",
|
| 359 |
+
"img_path": "images/d42dc0b636a69a7932d67edd25e820c3087ce92256bd0155c4c88a4efbc6e80c.jpg",
|
| 360 |
+
"text": "$$\n\\arg \\operatorname* { m i n } _ { D } w ^ { \\mathrm { D } } ( - \\mathbb { E } _ { d ^ { \\mathcal { M } } } [ D ( \\boldsymbol { o } ^ { H } ) ] + \\mathbb { E } _ { d ^ { \\mathcal { \\pi } } } [ D ( \\Phi ( \\boldsymbol { s } ^ { H } ) ) ] ) + w ^ { \\mathrm { G P } } \\mathbb { E } _ { d ^ { \\mathcal { M } } } [ \\| \\nabla _ { \\Omega } D ( \\Omega ) \\vert _ { \\Omega = \\boldsymbol { o } ^ { H } } ) \\| _ { 2 } ^ { 2 } ] ,\n$$",
|
| 361 |
+
"text_format": "latex",
|
| 362 |
+
"bbox": [
|
| 363 |
+
183,
|
| 364 |
+
506,
|
| 365 |
+
790,
|
| 366 |
+
534
|
| 367 |
+
],
|
| 368 |
+
"page_idx": 3
|
| 369 |
+
},
|
| 370 |
+
{
|
| 371 |
+
"type": "text",
|
| 372 |
+
"text": "where the last term denotes the penalty for nonzero gradients on samples from the dataset [17]. $w ^ { \\mathrm { D } }$ and $w ^ { \\mathrm { G P } }$ denote the weights on the Wasserstein loss and the gradient penalty, respectively. In our experiments, they are set to $w ^ { \\mathrm { D } } = 0 . 5$ and $w ^ { \\mathrm { G P } } = 5 . 0$ for all tasks. ",
|
| 373 |
+
"bbox": [
|
| 374 |
+
176,
|
| 375 |
+
544,
|
| 376 |
+
825,
|
| 377 |
+
587
|
| 378 |
+
],
|
| 379 |
+
"page_idx": 3
|
| 380 |
+
},
|
| 381 |
+
{
|
| 382 |
+
"type": "text",
|
| 383 |
+
"text": "3.3 Reward Formulation ",
|
| 384 |
+
"text_level": 1,
|
| 385 |
+
"bbox": [
|
| 386 |
+
174,
|
| 387 |
+
603,
|
| 388 |
+
359,
|
| 389 |
+
617
|
| 390 |
+
],
|
| 391 |
+
"page_idx": 3
|
| 392 |
+
},
|
| 393 |
+
{
|
| 394 |
+
"type": "text",
|
| 395 |
+
"text": "Despite discriminator regularization, due to the unbounded discriminator output, the scale of the reward can be arbitrary which makes it difficult to introduce additional regularization terms for stabilizing the robot motion. Therefore, we normalize the reward to have zero mean and unit variance in the policy training loop by maintaining its running mean $\\widehat { \\mu }$ and variance $\\widehat { \\sigma } ^ { 2 }$ . With this formulation, the imitation reward is then given by ",
|
| 396 |
+
"bbox": [
|
| 397 |
+
173,
|
| 398 |
+
627,
|
| 399 |
+
826,
|
| 400 |
+
698
|
| 401 |
+
],
|
| 402 |
+
"page_idx": 3
|
| 403 |
+
},
|
| 404 |
+
{
|
| 405 |
+
"type": "equation",
|
| 406 |
+
"img_path": "images/391eff5d9ade23164b651745e0c59e83148b574349bf7114173c62181d29f557.jpg",
|
| 407 |
+
"text": "$$\nr ^ { \\mathrm { I } } = \\frac { D \\left( \\Phi ( s ^ { H } ) \\right) - \\widehat { \\mu } } { \\widehat { \\sigma } } ,\n$$",
|
| 408 |
+
"text_format": "latex",
|
| 409 |
+
"bbox": [
|
| 410 |
+
421,
|
| 411 |
+
704,
|
| 412 |
+
575,
|
| 413 |
+
738
|
| 414 |
+
],
|
| 415 |
+
"page_idx": 3
|
| 416 |
+
},
|
| 417 |
+
{
|
| 418 |
+
"type": "text",
|
| 419 |
+
"text": "where $D \\left( \\Phi ( s ^ { H } ) \\right)$ denotes the output of the discriminator. ",
|
| 420 |
+
"bbox": [
|
| 421 |
+
173,
|
| 422 |
+
744,
|
| 423 |
+
555,
|
| 424 |
+
761
|
| 425 |
+
],
|
| 426 |
+
"page_idx": 3
|
| 427 |
+
},
|
| 428 |
+
{
|
| 429 |
+
"type": "text",
|
| 430 |
+
"text": "To increase policy learning efficiency, a common practice is to define a termination condition for rollouts. In our work, an instantaneous environment reset is triggered when a robot base collision against the ground is detected. Since the imitation reward has zero mean and difficult behaviors are likely to result in negative rewards initially, the policy may attempt to end the episode early. To circumvent this, a termination penalty is imposed at the last transition before a collision happens. As the normalized reward follows a distribution with zero mean and unit variance, $- 5 \\sigma$ is a lower bound on the reward with a probability greater than $9 9 . 9 9 \\%$ . We use this to derive a reasonable termination penalty, based on the geometric series, by a high-probability lower bound on the return ",
|
| 431 |
+
"bbox": [
|
| 432 |
+
173,
|
| 433 |
+
765,
|
| 434 |
+
825,
|
| 435 |
+
877
|
| 436 |
+
],
|
| 437 |
+
"page_idx": 3
|
| 438 |
+
},
|
| 439 |
+
{
|
| 440 |
+
"type": "equation",
|
| 441 |
+
"img_path": "images/fe387c233d532e166ce11fe4b45121d8476bbbe26eb3f2b6bfd2e8c0f396bfe8.jpg",
|
| 442 |
+
"text": "$$\nr ^ { \\mathrm { T } } = \\mathbb { I } s \\in \\mathcal { T } \\mathbb { I } \\frac { - 5 \\sigma } { 1 - \\gamma } ,\n$$",
|
| 443 |
+
"text_format": "latex",
|
| 444 |
+
"bbox": [
|
| 445 |
+
428,
|
| 446 |
+
883,
|
| 447 |
+
570,
|
| 448 |
+
915
|
| 449 |
+
],
|
| 450 |
+
"page_idx": 3
|
| 451 |
+
},
|
| 452 |
+
{
|
| 453 |
+
"type": "image",
|
| 454 |
+
"img_path": "images/e464e7954999a7260f9ba4d8f4718095b61a769ab55e795e7b740cd693bebd5f.jpg",
|
| 455 |
+
"image_caption": [
|
| 456 |
+
"Figure 2: System overview. Given a reference dataset defining the desired base motion, the system trains a discriminator that learns an imitation reward for the policy training. This imitation reward is then combined with a regularization reward and termination penalty to train a policy that enables the robot to replicate the demonstrated motion while maintaining feasible and stable joint actuation. "
|
| 457 |
+
],
|
| 458 |
+
"image_footnote": [],
|
| 459 |
+
"bbox": [
|
| 460 |
+
205,
|
| 461 |
+
87,
|
| 462 |
+
794,
|
| 463 |
+
256
|
| 464 |
+
],
|
| 465 |
+
"page_idx": 4
|
| 466 |
+
},
|
| 467 |
+
{
|
| 468 |
+
"type": "text",
|
| 469 |
+
"text": "where $\\gamma$ is the discount factor, $\\tau$ is the set of early termination states, and $[ [ \\cdot ] ]$ is the Iverson bracket (1 J Kif true, 0 otherwise). Putting everything together, the total reward that the policy receives encompasses three parts, the imitation reward $\\dot { \\boldsymbol { r } } ^ { \\mathrm { I } }$ defined by the normalized discriminator output, the termination reward $r ^ { \\mathrm { T } }$ , and the regularization reward $r ^ { \\mathrm { R } }$ to guarantee stable policy outputs (detailed in Suppl. C) ",
|
| 470 |
+
"bbox": [
|
| 471 |
+
174,
|
| 472 |
+
344,
|
| 473 |
+
823,
|
| 474 |
+
401
|
| 475 |
+
],
|
| 476 |
+
"page_idx": 4
|
| 477 |
+
},
|
| 478 |
+
{
|
| 479 |
+
"type": "equation",
|
| 480 |
+
"img_path": "images/3e2dbe5f83c0993ab418cbafc93b870bcb1f3c0d5c9a4ed0f5dbb2136db8b681.jpg",
|
| 481 |
+
"text": "$$\n\\begin{array} { r } { r = w ^ { \\mathrm { I } } ( r ^ { \\mathrm { I } } + r ^ { \\mathrm { T } } ) + r ^ { \\mathrm { R } } , } \\end{array}\n$$",
|
| 482 |
+
"text_format": "latex",
|
| 483 |
+
"bbox": [
|
| 484 |
+
419,
|
| 485 |
+
406,
|
| 486 |
+
576,
|
| 487 |
+
425
|
| 488 |
+
],
|
| 489 |
+
"page_idx": 4
|
| 490 |
+
},
|
| 491 |
+
{
|
| 492 |
+
"type": "text",
|
| 493 |
+
"text": "where $w ^ { \\mathrm { I } }$ is a motion-specific scaling factor controlling the relative importance of the imitation reward (and the termination penalty) with respect to the regularization terms. ",
|
| 494 |
+
"bbox": [
|
| 495 |
+
171,
|
| 496 |
+
431,
|
| 497 |
+
823,
|
| 498 |
+
459
|
| 499 |
+
],
|
| 500 |
+
"page_idx": 4
|
| 501 |
+
},
|
| 502 |
+
{
|
| 503 |
+
"type": "text",
|
| 504 |
+
"text": "Note that our reward formulation enables the robot to learn highly dynamic skills without any explicitly defined desired-motion-incentivizing reward, as is used in AMP, where an a priori designed reward still has to motivate the policy to execute a specific movement [17]. It is also noteworthy that the LSGAN formulation in our setting can be viewed as an implementation of AMP modified for task reward learning with substantial adaptations as detailed in Suppl. D. Figure 2 provides a schematic overview of our method, and an algorithm overview is detailed in Algorithm 1. ",
|
| 505 |
+
"bbox": [
|
| 506 |
+
173,
|
| 507 |
+
465,
|
| 508 |
+
825,
|
| 509 |
+
549
|
| 510 |
+
],
|
| 511 |
+
"page_idx": 4
|
| 512 |
+
},
|
| 513 |
+
{
|
| 514 |
+
"type": "text",
|
| 515 |
+
"text": "Algorithm 1 WASABI ",
|
| 516 |
+
"text_level": 1,
|
| 517 |
+
"bbox": [
|
| 518 |
+
174,
|
| 519 |
+
563,
|
| 520 |
+
326,
|
| 521 |
+
578
|
| 522 |
+
],
|
| 523 |
+
"page_idx": 4
|
| 524 |
+
},
|
| 525 |
+
{
|
| 526 |
+
"type": "text",
|
| 527 |
+
"text": "1: Input: dataset of reference motions $\\mathcal { M }$ , feature map $\\Phi$ \n2: initialize discriminator $D$ , policy $\\pi$ , value function $V$ , state transition buffer $s ^ { H }$ , replay buffer $B$ \n3: for learning iterations $= 1 , 2 , \\ldots$ do \n4: collect $N + H$ transitions $\\left( s _ { t } , a _ { t } , r _ { t } ^ { \\mathrm { R } } , s _ { t + 1 } \\right) _ { t - H } ^ { t + N }$ with policy $\\pi$ \n5: compute $r _ { \\tau } ^ { \\mathrm { I } }$ using discriminator outputs $D$ $) \\left( \\Phi ( s _ { i } ^ { H } ) \\right)$ for $i = t , \\ldots , t + N$ \n6: calculate transition rewards ${ \\boldsymbol { r } } _ { t } = { \\boldsymbol { w } } ^ { \\mathrm { I } } \\left( { \\boldsymbol { r } } _ { t } ^ { \\mathrm { I } } + { \\boldsymbol { r } } _ { t } ^ { \\mathrm { T } } \\right) + { \\boldsymbol { r } } _ { t } ^ { \\mathrm { R } }$ according to Equations 4, 5, and 6 \n7: fill replay buffer $B$ with $\\left( s _ { t } , a _ { t } , r _ { t } , s _ { t + 1 } , \\Phi ( s _ { t } ^ { H } ) \\right) _ { t } ^ { t + N }$ \n8: for policy learning epoch $\\mathfrak { l } = 1 , 2 , \\ldots , n _ { \\pi }$ do \n9: sample transition mini-batches $b ^ { \\pi } \\sim B$ \n10: update $V$ and $\\pi$ by PPO objective or another RL algorithm \n11: end for \n12: for discriminator learning epoch $= 1 , 2 , \\dotsc , n _ { D }$ do \n13: sample transition mini-batches $b ^ { \\pi } \\sim B$ and $b ^ { \\mathcal { M } } \\sim \\mathcal { M }$ \n14: update discriminator $D$ using $b ^ { \\pi }$ and $b ^ { \\mathcal { M } }$ according to the loss associated with Eq. 3 \n15: end for \n16: end for ",
|
| 528 |
+
"bbox": [
|
| 529 |
+
178,
|
| 530 |
+
583,
|
| 531 |
+
769,
|
| 532 |
+
796
|
| 533 |
+
],
|
| 534 |
+
"page_idx": 4
|
| 535 |
+
},
|
| 536 |
+
{
|
| 537 |
+
"type": "text",
|
| 538 |
+
"text": "4 Experiments ",
|
| 539 |
+
"text_level": 1,
|
| 540 |
+
"bbox": [
|
| 541 |
+
174,
|
| 542 |
+
824,
|
| 543 |
+
312,
|
| 544 |
+
842
|
| 545 |
+
],
|
| 546 |
+
"page_idx": 4
|
| 547 |
+
},
|
| 548 |
+
{
|
| 549 |
+
"type": "text",
|
| 550 |
+
"text": "We evaluate WASABI on the Solo 8 robot, an open-source research quadruped robot that performs a wide range of physical actions [45], in simulation and on the real system (Fig. 3). For evaluation, we introduce 4 different robotics tasks. In SOLOLEAP, the robot is asked to move forward with a jumping motion. SOLOWAVE requires the robot to produce a wave-like locomotion behavior. For ",
|
| 551 |
+
"bbox": [
|
| 552 |
+
174,
|
| 553 |
+
856,
|
| 554 |
+
825,
|
| 555 |
+
911
|
| 556 |
+
],
|
| 557 |
+
"page_idx": 4
|
| 558 |
+
},
|
| 559 |
+
{
|
| 560 |
+
"type": "image",
|
| 561 |
+
"img_path": "images/c4bfda7e38c2d6dce94984c93b628674140ffbc2911c7db9c1018d5057e0cb21.jpg",
|
| 562 |
+
"image_caption": [
|
| 563 |
+
"Figure 3: Solo 8 (left). Backflip motion in Isaac Gym (right). "
|
| 564 |
+
],
|
| 565 |
+
"image_footnote": [],
|
| 566 |
+
"bbox": [
|
| 567 |
+
243,
|
| 568 |
+
88,
|
| 569 |
+
754,
|
| 570 |
+
174
|
| 571 |
+
],
|
| 572 |
+
"page_idx": 5
|
| 573 |
+
},
|
| 574 |
+
{
|
| 575 |
+
"type": "image",
|
| 576 |
+
"img_path": "images/7ce013bd8503b7893f5927a8160320bb1c476fc603f0265de762be52c9f4414e.jpg",
|
| 577 |
+
"image_caption": [
|
| 578 |
+
"Figure 4: Adversarial imitation rewards for SOLOBACKFLIP. Imitation reward heatmap for LSGAN (a) and WASABI (b) around reference trajectories (blue) generated in varying pitch rate $\\dot { \\theta }$ and base height $z$ . (c) Distribution of imitation rewards for LSGAN and WASABI during training. WASABI provides a more fine-grained reward function. "
|
| 579 |
+
],
|
| 580 |
+
"image_footnote": [],
|
| 581 |
+
"bbox": [
|
| 582 |
+
187,
|
| 583 |
+
208,
|
| 584 |
+
816,
|
| 585 |
+
354
|
| 586 |
+
],
|
| 587 |
+
"page_idx": 5
|
| 588 |
+
},
|
| 589 |
+
{
|
| 590 |
+
"type": "text",
|
| 591 |
+
"text": "SOLOSTANDUP we require the robot to stand up on its hind legs. In SOLOBACKFLIP the robot is asked to generate motions of a full backflip. We provide rough demonstrations of these motions by manually carrying the robot through the motion and recording only the base information. The demonstrations are then used to infer an adversarial imitation reward for training a control policy that outputs target joint positions, as outlined in Sec. 3.1. An overview of the desired movements is provided in Suppl. G, we also provide further ablation studies in Suppl. I. ",
|
| 592 |
+
"bbox": [
|
| 593 |
+
174,
|
| 594 |
+
443,
|
| 595 |
+
825,
|
| 596 |
+
526
|
| 597 |
+
],
|
| 598 |
+
"page_idx": 5
|
| 599 |
+
},
|
| 600 |
+
{
|
| 601 |
+
"type": "text",
|
| 602 |
+
"text": "In all of our experiments, we use Proximal Policy Optimization (PPO) [46] in Isaac Gym [47] and make use of domain randomization [48] for sim-to-real transfer. Further details on the training procedure can be found in Suppl. A. ",
|
| 603 |
+
"bbox": [
|
| 604 |
+
176,
|
| 605 |
+
532,
|
| 606 |
+
825,
|
| 607 |
+
575
|
| 608 |
+
],
|
| 609 |
+
"page_idx": 5
|
| 610 |
+
},
|
| 611 |
+
{
|
| 612 |
+
"type": "text",
|
| 613 |
+
"text": "4.1 Induced Imitation Reward Distributions ",
|
| 614 |
+
"text_level": 1,
|
| 615 |
+
"bbox": [
|
| 616 |
+
174,
|
| 617 |
+
592,
|
| 618 |
+
493,
|
| 619 |
+
606
|
| 620 |
+
],
|
| 621 |
+
"page_idx": 5
|
| 622 |
+
},
|
| 623 |
+
{
|
| 624 |
+
"type": "text",
|
| 625 |
+
"text": "The LSGAN loss is proposed to alleviate the saturation problem that is encountered for the CEGAN loss. Yet, as outlined in Sec. 3.1, it does not directly yield a practical reward function. Peng et al. [17] remedy this by using $r ^ { \\mathrm { I } } = \\operatorname* { m a x } \\left[ 0 , 1 - 0 . 2 5 ( \\bar { D } ( \\mathbf { \\dot { \\Phi } } ( s ) , \\hat { \\Phi ( s ^ { \\prime } ) } ) - 1 ) ^ { 2 } \\right]$ to map the discriminator output to the imitation reward and bound it between 0 and 1. However, with the effective clipping at 0, information about the distance from the policy to the demonstration transitions is lost with discriminator prediction smaller than $- 1$ (Fig. 4c). In addition, we show in Fig. 4a that the imitation reward learned using LSGAN yields a less informative signal for policy training, which is rather uniformly distributed across pitch rate $\\dot { \\theta }$ and base height $z$ dimensions. In comparison, WASABI can use the discriminator output directly, learning a more characteristic reward function across the state space where reference trajectories are clearly outlined to yield high rewards in contrast to the off-trajectory states (Fig. 4b). ",
|
| 626 |
+
"bbox": [
|
| 627 |
+
173,
|
| 628 |
+
617,
|
| 629 |
+
825,
|
| 630 |
+
772
|
| 631 |
+
],
|
| 632 |
+
"page_idx": 5
|
| 633 |
+
},
|
| 634 |
+
{
|
| 635 |
+
"type": "text",
|
| 636 |
+
"text": "4.2 Learning to Mimic Rough Demonstrations ",
|
| 637 |
+
"text_level": 1,
|
| 638 |
+
"bbox": [
|
| 639 |
+
174,
|
| 640 |
+
787,
|
| 641 |
+
508,
|
| 642 |
+
803
|
| 643 |
+
],
|
| 644 |
+
"page_idx": 5
|
| 645 |
+
},
|
| 646 |
+
{
|
| 647 |
+
"type": "text",
|
| 648 |
+
"text": "Since we record the base motion of the robot carried by a human demonstrator, we do not have access to a reward function evaluating learned behaviors or measuring the closeness between the demonstrated and the policy trajectories. In addition, these trajectories are largely misaligned. For this reason, we make use of Dynamic Time Warping (DTW) [49] with the $L _ { 2 }$ norm metric for comparing policy trajectories and reference demonstrations. DTW allows us to match and compute the distance between the trajectories in a time-consistent manner (Fig. 1). Concretely, we use $\\mathbb { E } \\left[ d ^ { \\mathrm { D T W } } ( \\Phi ( \\tau _ { \\pi } ) , \\tau _ { \\mathcal { M } } ) \\right]$ as the evaluation metric, where $\\tau _ { \\pi } \\sim d ^ { \\pi }$ is a state trajectory from a policy ",
|
| 649 |
+
"bbox": [
|
| 650 |
+
174,
|
| 651 |
+
814,
|
| 652 |
+
825,
|
| 653 |
+
912
|
| 654 |
+
],
|
| 655 |
+
"page_idx": 5
|
| 656 |
+
},
|
| 657 |
+
{
|
| 658 |
+
"type": "table",
|
| 659 |
+
"img_path": "images/18be50636add847e948523a87c383bfead05f52c2278429322f2540771d1c8d6.jpg",
|
| 660 |
+
"table_caption": [],
|
| 661 |
+
"table_footnote": [],
|
| 662 |
+
"table_body": "<table><tr><td>Method</td><td>SOLOLEAP</td><td>SoLOWAVE</td><td>SOLOSTANDUP</td><td>SOLOBACKFLIP</td></tr><tr><td>WASABI</td><td>131.70 ± 16.44</td><td>247.29 ± 11.59</td><td>351.13 ± 88.60</td><td>477.43 ± 56.77</td></tr><tr><td>LSGAN</td><td>155.31 ± 18.10</td><td>230.91 ± 5.95</td><td>678.21 ± 6.71</td><td>813.76 ± 19.75</td></tr><tr><td> Stand Still</td><td>216.41</td><td>460.15</td><td>494.40</td><td>877.74</td></tr></table>",
|
| 663 |
+
"bbox": [
|
| 664 |
+
176,
|
| 665 |
+
88,
|
| 666 |
+
818,
|
| 667 |
+
167
|
| 668 |
+
],
|
| 669 |
+
"page_idx": 6
|
| 670 |
+
},
|
| 671 |
+
{
|
| 672 |
+
"type": "text",
|
| 673 |
+
"text": "Table 1: Comparison of performances for LSGAN and WASABI trained with hand-held demonstrations in terms of DTW distance $d ^ { \\mathrm { D T W } }$ (lower is better), successful runs are in bold font. As a reference, we provide also $d ^ { \\mathrm { D T W } }$ of a constantly standing trajectory. ",
|
| 674 |
+
"bbox": [
|
| 675 |
+
173,
|
| 676 |
+
171,
|
| 677 |
+
825,
|
| 678 |
+
213
|
| 679 |
+
],
|
| 680 |
+
"page_idx": 6
|
| 681 |
+
},
|
| 682 |
+
{
|
| 683 |
+
"type": "image",
|
| 684 |
+
"img_path": "images/e562e06579699ac7ed944cef297ea26d1e523f8ae4806eb07d9266950c3987a2.jpg",
|
| 685 |
+
"image_caption": [
|
| 686 |
+
"Figure 5: Performance of WASABI and LSGAN in terms of the handcrafted task reward for SOLOSTANDUP (left) and SOLOBACKFLIP (right). Dashed lines indicate partial information $( \\dag )$ . "
|
| 687 |
+
],
|
| 688 |
+
"image_footnote": [],
|
| 689 |
+
"bbox": [
|
| 690 |
+
218,
|
| 691 |
+
234,
|
| 692 |
+
784,
|
| 693 |
+
334
|
| 694 |
+
],
|
| 695 |
+
"page_idx": 6
|
| 696 |
+
},
|
| 697 |
+
{
|
| 698 |
+
"type": "text",
|
| 699 |
+
"text": "rollout and $\\tau _ { \\mathcal { M } } \\sim d ^ { \\mathcal { M } }$ denotes a reference motion from the dataset. We provide further details about this metric in Suppl. H. In Table 1 we compare performances in simulation for the different reference motions. ",
|
| 700 |
+
"bbox": [
|
| 701 |
+
174,
|
| 702 |
+
397,
|
| 703 |
+
825,
|
| 704 |
+
439
|
| 705 |
+
],
|
| 706 |
+
"page_idx": 6
|
| 707 |
+
},
|
| 708 |
+
{
|
| 709 |
+
"type": "text",
|
| 710 |
+
"text": "In order to confirm that WASABI is indeed able to extract a sensible reward function that motivates the desired motion, we compare the performance of LSGAN and WASABI in SOLOSTANDUP and SOLOBACKFLIP using an expert baseline that is trained on a handcrafted task reward for generating demonstrations in simulation. Details on the handcrafted task reward formulation are given in Suppl. E. The learned policies are evaluated with the same task rewards that are used to obtain the expert policies. A comparison of training performance curves in terms of the corresponding handcrafted task rewards is detailed in Fig. 5. In Table 2 we show the performance evaluation of the best runs. Observe that the policies trained by WASABI perform comparably to the expert policies trained with the handcrafted rewards. Interestingly, learning from partial state information may sometimes facilitate policy learning, since a decrease in discriminator observation dimensions could potentially alleviate the problem of discriminator becoming too strong as indicated in Fig. 5. ",
|
| 711 |
+
"bbox": [
|
| 712 |
+
173,
|
| 713 |
+
445,
|
| 714 |
+
825,
|
| 715 |
+
598
|
| 716 |
+
],
|
| 717 |
+
"page_idx": 6
|
| 718 |
+
},
|
| 719 |
+
{
|
| 720 |
+
"type": "text",
|
| 721 |
+
"text": "4.3 Evaluation on Real Robot ",
|
| 722 |
+
"text_level": 1,
|
| 723 |
+
"bbox": [
|
| 724 |
+
174,
|
| 725 |
+
614,
|
| 726 |
+
392,
|
| 727 |
+
630
|
| 728 |
+
],
|
| 729 |
+
"page_idx": 6
|
| 730 |
+
},
|
| 731 |
+
{
|
| 732 |
+
"type": "text",
|
| 733 |
+
"text": "To evaluate our method on real system, we trained policies for sim-to-real transfer with WASABI for the SOLOLEAP, SOLOWAVE and SOLOBACKFLIP. The Solo 8 robot is powered by an external battery and driven by a controller on an external operating machine. It receives root state estimation using 10 markers attached around the base which are tracked using a Vicon motion capture system operating at $1 0 0 \\mathrm { H z }$ . During deployment, we recorded the robot base information for evaluation by $d ^ { \\mathrm { D T W } }$ . As detailed in Suppl. F, the policy observation space, reward, and training hyperparameters are adapted to facilitate sim-to-real transfer for these tasks specifically. The resulting performance on the real system, as shown in Table 3, resembles the performance obtained in simulation. ",
|
| 734 |
+
"bbox": [
|
| 735 |
+
173,
|
| 736 |
+
640,
|
| 737 |
+
825,
|
| 738 |
+
752
|
| 739 |
+
],
|
| 740 |
+
"page_idx": 6
|
| 741 |
+
},
|
| 742 |
+
{
|
| 743 |
+
"type": "table",
|
| 744 |
+
"img_path": "images/3ede422dffce406638d3ba84c08a9082e69b19944f83c6e9387b87d1a8ef097e.jpg",
|
| 745 |
+
"table_caption": [],
|
| 746 |
+
"table_footnote": [
|
| 747 |
+
"Table 2: Performance comparison in terms of handcrafted task reward (higher is better). We denote with $^ *$ where the full robot configuration is given to the discriminator and $\\dagger$ where only base information is given. Successful runs are in bold font. Std-dev. is over 5 independent random seeds. "
|
| 748 |
+
],
|
| 749 |
+
"table_body": "<table><tr><td>Method</td><td>SOLOSTANDUp†</td><td>SOLOSTANDUp*</td><td>SOLOBACKFLIPt</td><td>SOLOBACKFLIP*</td></tr><tr><td>WASABI</td><td>1.54 ± 0.51</td><td>1.68 ± 0.51</td><td>0.36 ± 0.05</td><td>0.28 ±0.02</td></tr><tr><td>LSGAN</td><td>1.07 ± 0.5</td><td>0.44 ± 0.14</td><td>0.12 ± 0.01</td><td>0.06 ± 0.01</td></tr><tr><td>Handcrafted</td><td colspan=\"2\">2.24 ± 0.05</td><td colspan=\"2\">0.77 ± 0.04</td></tr></table>",
|
| 750 |
+
"bbox": [
|
| 751 |
+
179,
|
| 752 |
+
773,
|
| 753 |
+
818,
|
| 754 |
+
853
|
| 755 |
+
],
|
| 756 |
+
"page_idx": 6
|
| 757 |
+
},
|
| 758 |
+
{
|
| 759 |
+
"type": "table",
|
| 760 |
+
"img_path": "images/29567f518d0e1a9b73f88bac7fb30e69791c0087ab2db90aeb4bf17d1aa7fd0b.jpg",
|
| 761 |
+
"table_caption": [
|
| 762 |
+
"Table 3: Sim-to-real performance on the Solo 8 in terms of DTW distance (lower is better). Values are computed from the recorded data of the learned policies with respect to the reference trajectories. "
|
| 763 |
+
],
|
| 764 |
+
"table_footnote": [],
|
| 765 |
+
"table_body": "<table><tr><td></td><td>SOLOLEAP</td><td>SOLOWAVE</td><td>SOLOBACKFLIP</td></tr><tr><td>WASABI (Real)</td><td>153.64± 7.08</td><td>215.38 ± 21.82</td><td>504.26 ± 18.90</td></tr><tr><td>WASABI (Sim)</td><td>131.70 ± 16.44</td><td>247.29 ± 11.59</td><td>477.43 ± 56.77</td></tr></table>",
|
| 766 |
+
"bbox": [
|
| 767 |
+
243,
|
| 768 |
+
88,
|
| 769 |
+
750,
|
| 770 |
+
146
|
| 771 |
+
],
|
| 772 |
+
"page_idx": 7
|
| 773 |
+
},
|
| 774 |
+
{
|
| 775 |
+
"type": "image",
|
| 776 |
+
"img_path": "images/c383c274c8378c931323ccdf1936c6bf5f11b1395189d1f86cbc68adafa074f8.jpg",
|
| 777 |
+
"image_caption": [
|
| 778 |
+
"Figure 6: ANYmal C (left). Wave motion in Isaac Gym (right). "
|
| 779 |
+
],
|
| 780 |
+
"image_footnote": [],
|
| 781 |
+
"bbox": [
|
| 782 |
+
184,
|
| 783 |
+
202,
|
| 784 |
+
820,
|
| 785 |
+
279
|
| 786 |
+
],
|
| 787 |
+
"page_idx": 7
|
| 788 |
+
},
|
| 789 |
+
{
|
| 790 |
+
"type": "text",
|
| 791 |
+
"text": "4.4 Cross-platform Imitation ",
|
| 792 |
+
"text_level": 1,
|
| 793 |
+
"bbox": [
|
| 794 |
+
174,
|
| 795 |
+
325,
|
| 796 |
+
388,
|
| 797 |
+
340
|
| 798 |
+
],
|
| 799 |
+
"page_idx": 7
|
| 800 |
+
},
|
| 801 |
+
{
|
| 802 |
+
"type": "text",
|
| 803 |
+
"text": "As the reference motion in WASABI contains only base information, it does not restrict itself to be obtained only from any specific robotic platform. This provides the possibility of cross-platform imitation. Using the reference trajectories recorded from Solo 8, with a manual offset of $\\mathrm { 0 . 2 5 ~ m }$ on the base height dimension addressing different sizes of the robots, we apply WASABI to ANYmal [50], a four-legged dog-like robot for research and industrial maintenance (Fig. 6). To confirm that WASABI applies to cross-platform imitation, we define ANYMALWAVE and ANYMALBACKFLIP tasks for the corresponding wave and backflip motions learned by ANYmal, yet from the reference data recorded from Solo 8. The performance in terms of the DTW distance is detailed in Table 4. ",
|
| 804 |
+
"bbox": [
|
| 805 |
+
173,
|
| 806 |
+
349,
|
| 807 |
+
826,
|
| 808 |
+
462
|
| 809 |
+
],
|
| 810 |
+
"page_idx": 7
|
| 811 |
+
},
|
| 812 |
+
{
|
| 813 |
+
"type": "table",
|
| 814 |
+
"img_path": "images/0c0ea05b787e8c072c2a74e631e9269da3b7812b3cdec036b0d64f91bdc4571c.jpg",
|
| 815 |
+
"table_caption": [
|
| 816 |
+
"Table 4: Performance of cross-platform imitation of ANYmal using WASABI trained with hand-held demonstrations from Solo 8 in terms of DTW distance $d ^ { \\mathrm { D T W } }$ , successful runs are in bold font. "
|
| 817 |
+
],
|
| 818 |
+
"table_footnote": [],
|
| 819 |
+
"table_body": "<table><tr><td>Method</td><td>SoLOWAVE</td><td>ANYMALWAVE</td><td>SOLOBACKFLIP</td><td>ANYMALBACKFLIP</td></tr><tr><td>WASABI</td><td>247.29 ± 11.59</td><td>193.08 ± 14.52</td><td>477.43 ± 56.77</td><td>572.60 ± 12.18</td></tr><tr><td>Stand Still</td><td colspan=\"2\">460.15</td><td colspan=\"2\">877.74</td></tr></table>",
|
| 820 |
+
"bbox": [
|
| 821 |
+
173,
|
| 822 |
+
473,
|
| 823 |
+
836,
|
| 824 |
+
540
|
| 825 |
+
],
|
| 826 |
+
"page_idx": 7
|
| 827 |
+
},
|
| 828 |
+
{
|
| 829 |
+
"type": "text",
|
| 830 |
+
"text": "5 Conclusion ",
|
| 831 |
+
"text_level": 1,
|
| 832 |
+
"bbox": [
|
| 833 |
+
174,
|
| 834 |
+
608,
|
| 835 |
+
299,
|
| 836 |
+
626
|
| 837 |
+
],
|
| 838 |
+
"page_idx": 7
|
| 839 |
+
},
|
| 840 |
+
{
|
| 841 |
+
"type": "text",
|
| 842 |
+
"text": "In this work, we propose an adversarial imitation method named WASABI for inferring reward functions that is capable of learning agile skills from partial and physically incompatible demonstrations without any a priori known reward terms. Our results indicate that WASABI allows extracting robust policies that are able to transfer to the real system and enables cross-platform imitation. Furthermore, our experiments confirm that imitation learning using the LSGAN fits style transfer settings where desired motions are more achievable. For highly agile or incompatible motions which initially seem beyond the robot’s capability, WASABI outperforms LSGAN by successful and faithful replication of roughly demonstrated behaviors. Further extensions and applications are presented in Suppl. J. ",
|
| 843 |
+
"bbox": [
|
| 844 |
+
174,
|
| 845 |
+
638,
|
| 846 |
+
826,
|
| 847 |
+
751
|
| 848 |
+
],
|
| 849 |
+
"page_idx": 7
|
| 850 |
+
},
|
| 851 |
+
{
|
| 852 |
+
"type": "text",
|
| 853 |
+
"text": "6 Limitations ",
|
| 854 |
+
"text_level": 1,
|
| 855 |
+
"bbox": [
|
| 856 |
+
174,
|
| 857 |
+
768,
|
| 858 |
+
302,
|
| 859 |
+
786
|
| 860 |
+
],
|
| 861 |
+
"page_idx": 7
|
| 862 |
+
},
|
| 863 |
+
{
|
| 864 |
+
"type": "text",
|
| 865 |
+
"text": "While saving the effort of developing a specific task reward that motivates desired motions, providing a good evaluation metric in terms of a distance to the reference motion is not straightforward for generic rough demonstrations. Although DTW is a feasible option, it still requires a reasonable distance metric and careful choice of the warping procedure, which might be task-dependent. Moreover, since our method works with rough demonstrations, even a good distance metric to the reference may not help inform about closeness to feasible, desirable motions from the robot’s perspective. Finally, we do not intensively study to what extent our method is robust against the degree of incompatibility of the demonstrations. ",
|
| 866 |
+
"bbox": [
|
| 867 |
+
173,
|
| 868 |
+
800,
|
| 869 |
+
825,
|
| 870 |
+
911
|
| 871 |
+
],
|
| 872 |
+
"page_idx": 7
|
| 873 |
+
},
|
| 874 |
+
{
|
| 875 |
+
"type": "text",
|
| 876 |
+
"text": "Acknowledgments ",
|
| 877 |
+
"text_level": 1,
|
| 878 |
+
"bbox": [
|
| 879 |
+
174,
|
| 880 |
+
92,
|
| 881 |
+
303,
|
| 882 |
+
106
|
| 883 |
+
],
|
| 884 |
+
"page_idx": 8
|
| 885 |
+
},
|
| 886 |
+
{
|
| 887 |
+
"type": "text",
|
| 888 |
+
"text": "Georg Martius is a member of the Machine Learning Cluster of Excellence, EXC number 2064/1 – Project number 390727645. We acknowledge the support from the German Federal Ministry of Education and Research (BMBF) through the Tübingen AI Center (FKZ: 01IS18039B). The authors thank the International Max Planck Research School for Intelligent Systems (IMPRS-IS) for supporting Marin Vlastelica and Sebastian Blaes, and Max Planck ETH Center for Learning Systems for supporting Jonas Frey. ",
|
| 889 |
+
"bbox": [
|
| 890 |
+
173,
|
| 891 |
+
114,
|
| 892 |
+
825,
|
| 893 |
+
198
|
| 894 |
+
],
|
| 895 |
+
"page_idx": 8
|
| 896 |
+
},
|
| 897 |
+
{
|
| 898 |
+
"type": "text",
|
| 899 |
+
"text": "References ",
|
| 900 |
+
"text_level": 1,
|
| 901 |
+
"bbox": [
|
| 902 |
+
174,
|
| 903 |
+
218,
|
| 904 |
+
266,
|
| 905 |
+
233
|
| 906 |
+
],
|
| 907 |
+
"page_idx": 8
|
| 908 |
+
},
|
| 909 |
+
{
|
| 910 |
+
"type": "text",
|
| 911 |
+
"text": "[1] M. Raibert, K. Blankespoor, G. Nelson, and R. Playter. Bigdog, the rough-terrain quadruped robot. IFAC Proceedings Volumes, 41(2):10822–10825, 2008. \n[2] J. Di Carlo, P. M. Wensing, B. Katz, G. Bledt, and S. Kim. Dynamic locomotion in the mit cheetah 3 through convex model-predictive control. In 2018 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 1–9. IEEE, 2018. \n[3] J. Hwangbo, J. Lee, A. Dosovitskiy, D. Bellicoso, V. Tsounis, V. Koltun, and M. Hutter. Learning agile and dynamic motor skills for legged robots. Science Robotics, 4(26):eaau5872, 2019. \n[4] J. Lee, J. Hwangbo, L. Wellhausen, V. Koltun, and M. Hutter. Learning quadrupedal locomotion over challenging terrain. Science robotics, 5(47):eabc5986, 2020. \n[5] A. Kumar, Z. Fu, D. Pathak, and J. Malik. RMA: Rapid motor adaptation for legged robots. In Robotics: Science and Systems XVII (RSS), 2021. \n[6] T. Miki, J. Lee, J. Hwangbo, L. Wellhausen, V. Koltun, and M. Hutter. Learning robust perceptive locomotion for quadrupedal robots in the wild. Science Robotics, 7(62):eabk2822, 2022. \n[7] D. A. Pomerleau. Efficient training of artificial neural networks for autonomous navigation. Neural Computation, 3(1):88–97, 1991. \n[8] F. Torabi, G. Warnell, and P. Stone. Behavioral cloning from observation. ArXiv, abs/1805.01954, 2018. \n[9] S. Ross, G. Gordon, and D. Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, pages 627–635. JMLR Workshop and Conference Proceedings, 2011. \n[10] A. Hussein, M. M. Gaber, E. Elyan, and C. Jayne. Imitation learning: A survey of learning methods. ACM Computing Surveys (CSUR), 50(2):1–35, 2017. \n[11] B. D. Ziebart, A. L. Maas, J. A. Bagnell, A. K. Dey, et al. Maximum entropy inverse reinforcement learning. In AAAI, volume 8, pages 1433–1438. Chicago, IL, USA, 2008. \n[12] E. Bashir and M. Luštrek. Inverse reinforcement learning through max-margin algorithm. In Intelligent Environments 2021: Workshop Proceedings of the 17th International Conference on Intelligent Environments, volume 29, page 190. IOS Press, 2021. \n[13] D. Garg, S. Chakraborty, C. Cundy, J. Song, and S. Ermon. Iq-learn: Inverse soft-q learning for imitation. Advances in Neural Information Processing Systems, 34, 2021. \n[14] P. Abbeel and A. Y. Ng. Apprenticeship learning via inverse reinforcement learning. In Proceedings of the Twenty-first International Conference on Machine Learning, page 1, 2004. \n[15] J. Ho and S. Ermon. Generative adversarial imitation learning. In Advances in Neural Information Processing Systems, volume 29, 2016. \n[16] I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial networks. In Advances in Neural Information Processing Systems, volume 3, 06 2014. \n[17] X. B. Peng, Z. Ma, P. Abbeel, S. Levine, and A. Kanazawa. AMP: Adversarial motion priors for stylized physics-based character control. ACM Transactions on Graphics (TOG), 40(4):1–20, 2021. \n[18] D. Pathak, D. Gandhi, and A. Gupta. Self-supervised exploration via disagreement. In International Conference on Machine Learning, pages 5062–5071. PMLR, 2019. \n[19] Q. Cai, Z. Yang, C. Jin, and Z. Wang. Provably efficient exploration in policy optimization. In International Conference on Machine Learning, pages 1283–1294. PMLR, 2020. \n[20] A. Billard, S. Calinon, R. Dillmann, and S. Schaal. Survey: Robot programming by demonstration. Technical report, Springrer, 2008. \n[21] B. D. Argall, S. Chernova, M. Veloso, and B. Browning. A survey of robot learning from demonstration. Robotics and Autonomous Systems, 57(5):469–483, 2009. \n[22] S. Schaal. Learning from demonstration. Advances in Neural Information Processing Systems, 9, 1996. \n[23] C. G. Atkeson and S. Schaal. Robot learning from demonstration. In ICML, volume 97, pages 12–20, 1997. \n[24] S. Schaal. Is imitation learning the route to humanoid robots? Trends in Cognitive Sciences, 3 (6):233–242, 1999. \n[25] S. Calinon, F. D’halluin, E. L. Sauser, D. G. Caldwell, and A. G. Billard. Learning and reproduction of gestures by imitation. IEEE Robotics & Automation Magazine, 17(2):44–54, 2010. \n[26] S. M. Khansari-Zadeh and A. Billard. Learning stable nonlinear dynamical systems with gaussian mixture models. IEEE Transactions on Robotics, 27(5):943–957, 2011. \n[27] A. J. Ijspeert, J. Nakanishi, H. Hoffmann, P. Pastor, and S. Schaal. Dynamical movement primitives: learning attractor models for motor behaviors. Neural Computation, 25(2):328–373, 2013. \n[28] F. Codevilla, E. Santana, A. M. López, and A. Gaidon. Exploring the limitations of behavior cloning for autonomous driving. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9329–9338, 2019. \n[29] Y. Lee, S. Kim, and J. Lee. Data-driven biped control. ACM Trans. Graph., 29(4), jul 2010. ISSN 0730-0301. \n[30] L. Liu, K. Yin, M. van de Panne, T. Shao, and W. Xu. Sampling-based contact-rich motion control. ACM SIGGRAPH 2010 papers, 2010. \n[31] L. Liu, M. V. D. Panne, and K. Yin. Guided learning of control graphs for physics-based characters. ACM Transactions on Graphics (TOG), 35(3):1–14, 2016. \n[32] X. B. Peng, P. Abbeel, S. Levine, and M. van de Panne. Deepmimic: Example-guided deep reinforcement learning of physics-based character skills. ACM Transactions on Graphics (TOG), 37(4):1–14, 2018. \n[33] S. Lee, M. Park, K. Lee, and J. Lee. Scalable muscle-actuated human simulation and control. ACM Transactions On Graphics (TOG), 38(4):1–13, 2019. \n[34] X. B. Peng, A. Kanazawa, J. Malik, P. Abbeel, and S. Levine. Sfv: Reinforcement learning of physical skills from videos. ACM Transactions On Graphics (TOG), 37(6):1–14, 2018. \n[35] J. Merel, Y. Tassa, D. TB, S. Srinivasan, J. Lemmon, Z. Wang, G. Wayne, and N. Heess. Learning human behaviors from motion capture by adversarial imitation. arXiv preprint arXiv:1707.02201, 2017. \n[36] Z. Wang, J. S. Merel, S. E. Reed, N. de Freitas, G. Wayne, and N. Heess. Robust imitation of diverse behaviors. Advances in Neural Information Processing Systems, 30, 2017. \n[37] R. Jena and K. P. Sycara. Loss-annealed gail for sample efficient and stable imitation learning. ArXiv, abs/2001.07798, 2020. \n[38] J. Fu, K. Luo, and S. Levine. Learning robust rewards with adversarial inverse reinforcement learning. arXiv preprint arXiv:1710.11248, 2017. \n[39] A. Escontrela, X. B. Peng, W. Yu, T. Zhang, A. Iscen, K. Goldberg, and P. Abbeel. Adversarial motion priors make good substitutes for complex reward functions. arXiv preprint arXiv:2203.15103, 2022. \n[40] E. Vollenweider, M. Bjelonic, V. Klemm, N. Rudin, J. Lee, and M. Hutter. Advanced skills through multiple adversarial motion priors in reinforcement learning. arXiv preprint arXiv:2203.14912, 2022. \n[41] M. Arjovsky and L. Bottou. Towards principled methods for training generative adversarial networks. arXiv preprint arXiv:1701.04862, 2017. \n[42] X. Mao, Q. Li, H. Xie, R. Y. Lau, Z. Wang, and S. Paul Smolley. Least squares generative adversarial networks. In Proceedings of the IEEE International Conference on Computer Vision, pages 2794–2802, 2017. \n[43] Y. Rubner, C. Tomasi, and L. J. Guibas. A metric for distributions with applications to image databases. In Sixth international conference on computer vision (IEEE Cat. No. 98CH36271), pages 59–66. IEEE, 1998. \n[44] M. Arjovsky, S. Chintala, and L. Bottou. Wasserstein gan. ArXiv, abs/1701.07875, 2017. \n[45] F. Grimminger, A. Meduri, M. Khadiv, J. Viereck, M. Wüthrich, M. Naveau, V. Berenz, S. Heim, F. Widmaier, T. Flayols, J. Fiene, A. Badri-Spröwitz, and L. Righetti. An open torque-controlled modular robot architecture for legged locomotion research. IEEE Robotics and Automation Letters, 5(2):3650–3657, 2020. doi:10.1109/LRA.2020.2976639. \n[46] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017. \n[47] V. Makoviychuk, L. Wawrzyniak, Y. Guo, M. Lu, K. Storey, M. Macklin, D. Hoeller, N. Rudin, A. Allshire, A. Handa, et al. Isaac gym: High performance gpu-based physics simulation for robot learning. arXiv preprint arXiv:2108.10470, 2021. \n[48] J. Tobin, R. Fong, A. Ray, J. Schneider, W. Zaremba, and P. Abbeel. Domain randomization for transferring deep neural networks from simulation to the real world. In 2017 IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), pages 23–30. IEEE, 2017. \n[49] D. J. Berndt and J. Clifford. Using dynamic time warping to find patterns in time series. In KDD Workshop, 1994. \n[50] Anymal c – the next step in robotic industrial inspection, August 2019. URL https://www. anybotics.com/the-next-step-in-robotic-industrial-inspection/. ",
|
| 912 |
+
"bbox": [
|
| 913 |
+
173,
|
| 914 |
+
231,
|
| 915 |
+
828,
|
| 916 |
+
911
|
| 917 |
+
],
|
| 918 |
+
"page_idx": 8
|
| 919 |
+
},
|
| 920 |
+
{
|
| 921 |
+
"type": "text",
|
| 922 |
+
"text": "",
|
| 923 |
+
"bbox": [
|
| 924 |
+
171,
|
| 925 |
+
73,
|
| 926 |
+
828,
|
| 927 |
+
920
|
| 928 |
+
],
|
| 929 |
+
"page_idx": 9
|
| 930 |
+
},
|
| 931 |
+
{
|
| 932 |
+
"type": "text",
|
| 933 |
+
"text": "",
|
| 934 |
+
"bbox": [
|
| 935 |
+
171,
|
| 936 |
+
90,
|
| 937 |
+
828,
|
| 938 |
+
708
|
| 939 |
+
],
|
| 940 |
+
"page_idx": 10
|
| 941 |
+
}
|
| 942 |
+
]
|
parse/dev/x6INXlnUGro/x6INXlnUGro_model.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
parse/dev/xp5VOBxTxZ/xp5VOBxTxZ.md
ADDED
|
@@ -0,0 +1,478 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Understanding the Generalization Benefit of Normalization Layers: Sharpness Reduction
|
| 2 |
+
|
| 3 |
+
Kaifeng Lyu Zhiyuan Li Sanjeev Arora Department of Computer Science Princeton University
|
| 4 |
+
{klyu,zhiyuanli,arora}@cs.princeton.edu
|
| 5 |
+
|
| 6 |
+
# Abstract
|
| 7 |
+
|
| 8 |
+
Normalization layers (e.g., Batch Normalization, Layer Normalization) were introduced to help with optimization difficulties in very deep nets, but they clearly also help generalization, even in not-so-deep nets. Motivated by the long-held belief that flatter minima lead to better generalization, this paper gives mathematical analysis and supporting experiments suggesting that normalization (together with accompanying weight-decay) encourages GD to reduce the sharpness of loss surface. Here “sharpness” is carefully defined given that the loss is scale-invariant, a known consequence of normalization. Specifically, for a fairly broad class of neural nets with normalization, our theory explains how GD with a finite learning rate enters the so-called Edge of Stability (EoS) regime, and characterizes the trajectory of GD in this regime via a continuous sharpness-reduction flow.
|
| 9 |
+
|
| 10 |
+
# 1 Introduction
|
| 11 |
+
|
| 12 |
+
Training modern deep neural nets crucially relies on normalization layers to make the training process less sensitive to hyperparameters and initialization. The two of the most popular normalization layers are Batch Normalization (BN) [55] for vision tasks and Layer Normalization (LN) [9] for language tasks. Recent works also proposed other normalization layers aiming for better performance, most notably including Group Normalization (GN) [120], Weight Normalization (WN) [102], Scaled Weight Standardization (SWS) [97, 53, 14], etc. Most normalization layers amount to a reparametrization of the neural net so that the loss becomes invariant to the scale of most parameters, and with a minor change, to all parameters: $\mathcal { L } ( c \pmb { w } ) = \mathcal { L } ( \pmb { w } )$ for all scalings $c > 0$ [55, 7, 77]. The current paper assumes this scale-invariance for all parameters and analyzes the trajectory of gradient descent with weight decay (WD):
|
| 13 |
+
|
| 14 |
+
$$
|
| 15 |
+
\pmb { w } _ { t + 1 } ( 1 - \hat { \eta } \hat { \lambda } ) \pmb { w } _ { t } - \hat { \eta } \nabla \mathcal { L } ( \pmb { w } _ { t } ) .
|
| 16 |
+
$$
|
| 17 |
+
|
| 18 |
+
The use of WD is a common practice that has been adopted in training state-of-the-art neural nets, such as ResNets [46, 47] and Transformers [29, 15]. Previous ablation studies showed that adding WD to normalized nets indeed leads to better generalization [126, 72, 125]. More notably, Liu et al. [83] conducted experiments of training ResNets initialized from global minima with poor test accuracy, and showed that SGD with WD escapes from those bad global minima and attains good test accuracy. In contrast, training with vanilla SGD yields significant generalization degradation.
|
| 19 |
+
|
| 20 |
+
In the traditional view, WD regularizes the model by penalizing the parameter norm, but this may appear nonsensical for scale-invariant loss because one can scale down the norm arbitrarily without changing the loss value. However, the scale of the parameter does matter in backward propagation, and thus WD can affect the training dynamics. In particular, simple calculus shows $\begin{array} { r } { \mathrm { ~ } \nabla \dot { \mathcal { L } } ( \bar { \pmb w } ) = \frac { 1 } { \| \pmb w \| _ { 2 } } \nabla \mathcal { L } ( \frac { \pmb w } { \| \pmb w \| _ { 2 } } ) \propto \frac { 1 } { \| \pmb w \| _ { 2 } } } \end{array}$ and $\begin{array} { r } { \nabla ^ { 2 } \mathcal { L } ( \pmb { w } ) = \frac { 1 } { \| \pmb { w } \| _ { 2 } ^ { 2 } } \nabla ^ { 2 } \mathcal { L } \big ( \frac { \pmb { w } } { \| \pmb { w } \| _ { 2 } } \big ) \propto \frac { 1 } { \| \pmb { w } \| _ { 2 } ^ { 2 } } } \end{array}$ , so WD is in effect trying to enlarge the gradient and Hessian in training. This makes the training dynamics very different from unnormalized nets and requires revisiting classical convergence analyses [77, 78, 84, 80].
|
| 21 |
+
|
| 22 |
+

|
| 23 |
+
Figure 1: Experiment on overparameterized matrix completion with Batch Normalization. Given 800 $( 3 \hat { 2 } \% )$ entries $\Omega$ of a rank-2 matrix $\boldsymbol { M } ~ \in ~ \mathbb { R } ^ { 5 0 \times 5 0 }$ , use $\mathrm { G D + W D }$ to optimize the loss ${ \mathcal { L } } ( U , V ) \ : =$ $\begin{array} { r } { \frac { 1 } { | \Omega | } \sum _ { ( i , j ) \in \Omega } ( \mathrm { B N } ( [ U V ^ { \top } ] _ { i , j } ) - M _ { i , j } ) ^ { 2 } } \end{array}$ , where $U , V \in \mathbb { R } ^ { 5 0 \times 5 0 }$ (thus no explicit constraint on rank). Starting from step $\sim 2 \mathrm { k }$ , spherical sharpness drops significantly $\mathbf { ( b ) }$ , which encourages low-rank (d) and causes the test loss (MSE of all entries) to decrease from 1.12 to 0.013 (a). See also Appendix P.1.
|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
Figure 2: In training a smooth and scale-invariant VGG-11 on CIFAR-10 with (full-batch) $\mathrm { G D + W D }$ , the spherical sharpness keeps decreasing and the test accuracy keeps increasing. BN is added after every linear layer to ensure scale-invariance. $1 0 0 \%$ training accuracy is achieved after $\sim 6 8 0$ steps (dotted line), but as the training continues for $\sim 4 7 \mathrm { k }$ steps, the spherical sharpness keeps decreasing $\mathbf { ( b ) }$ and the test accuracy increases from $6 \bar { 9 } . 1 \%$ to $7 2 . 0 \%$ (a). Then the training exhibits destabilization but the test accuracy is further boosted to $8 4 . 3 \%$ . Removing either of BN or WD eliminates this phenomenon; see Appendices P.4 and P.5.
|
| 27 |
+
|
| 28 |
+
The current paper aims to improve mathematical understanding of how normalization improves generalization. While this may arise from many places, we focus on studying the dynamics of (fullbatch) GD (1), which is a necessary first step towards understanding SGD. We show that the interplay between normalization and WD provably induces an implicit bias to persistently reduce the sharpness of the local loss landscape during the training process, which we call the sharpness-reduction bias.
|
| 29 |
+
|
| 30 |
+
It is long believed that flatter minima generalize better [50, 63, 95], but the notion of sharpness/flatness makes sense only if it is carefully defined in consideration of various symmetries in neural nets. One of the most straightforward measures of sharpness is the maximum eigenvalue of Hessian, namely $\lambda _ { 1 } \big ( \nabla ^ { 2 } \mathcal { L } ( \pmb { w } _ { t } ) \big )$ . But for normalized nets, this sharpness measure is vulnerable to weight rescaling, because one can scale the weight norm to make a minimizer arbitrarily flat [31]. Also, this sharpness measure may not decrease with the number of training steps: an empirical study by Cohen et al. [24] shows that for various neural nets (including normalized nets), GD has an overwhelming tendency to persistently increase $\lambda _ { 1 } \big ( \nabla ^ { 2 } \mathcal { L } ( \pmb { w } _ { t } ) \big )$ until it reaches the Edge of Stability (EoS) regime, a regime where $\lambda _ { 1 } \big ( \nabla ^ { 2 } \mathcal { L } ( \pmb { w } _ { t } ) \big )$ stays around $2 / \hat { \eta }$ $\hat { \eta }$ is the learning rate). See also Section 6 and Figure 2c.
|
| 31 |
+
|
| 32 |
+
# 1.1 Our Contributions
|
| 33 |
+
|
| 34 |
+
The sharpness measure we use in this paper takes care of the scale-invariance in normalized nets. We are motivated by our experiments on matrix completion (with BN) and CIFAR-10, where our sharpness measure decreases as the training proceeds, and the generalization improves accordingly; see Figures 1 and 2. We note that techniques from previous works [92, 95, 37] can be easily adopted here to establish a PAC-Bayes bound on the test error, where our sharpness measure appears as an additive term (see Appendix C).
|
| 35 |
+
|
| 36 |
+
Definition 1.1 (Spherical Sharpness). For a scale-invariant loss $\mathcal { L } ( w )$ (i.e., $\mathcal { L } ( c \pmb { w } ) = \mathcal { L } ( \pmb { w } )$ for all $c > 0$ ), the spherical sharpness at $\pmb { w } \in \mathbb { R } ^ { D }$ is defined by $\lambda _ { 1 } \big ( \nabla ^ { 2 } \mathcal { L } \big ( \frac { w } { \| w \| _ { 2 } } \big ) \big )$ L L, the maximum eigenvalue of the Hessian matrix after projecting $\pmb { w }$ onto the unit sphere.
|
| 37 |
+
|
| 38 |
+
Based on Definition 1.1, we study the aforementioned sharpness-reduction bias in training normalized nets with $\mathrm { G D + W D }$ (defined in (1)). For constant learning rate $\hat { \eta }$ and weight decay $\hat { \lambda }$ , we can rewrite this rule equivalently as Projected Gradient Descent (PGD) on the unit sphere with adaptive learning rates, $\pmb { \theta } _ { t + 1 } \mathrm { \bar { \Omega } } \Pi ( \pmb { \theta } _ { t } - \tilde { \eta } _ { t } \nabla \tilde { \mathcal { L } } ( \pmb { \theta } _ { t } ) )$ , where $\begin{array} { r } { \theta _ { t } : = \frac { \pmb { w } _ { t } } { \| \pmb { w } _ { t } \| _ { 2 } } } \end{array}$ is the direction of ${ \pmb w } _ { t }$ , and $\tilde { \eta } _ { t }$ is the “effective” learning rate at step $t$ (see Lemma 3.1). We call $\tilde { \eta } _ { t }$ adaptive because it can be shown to resemble the behaviors of adaptive gradient methods (e.g., RMSprop [49]): $\tilde { \eta } _ { t }$ increases when gradient is small and decreases when gradient is large (Figure 3). Our main contributions are as follows:
|
| 39 |
+
|
| 40 |
+
1. After $\theta _ { t }$ reaches a point near the manifold of minimizers of $\mathcal { L }$ , we theoretically show that the effective learning rate $\tilde { \eta } _ { t }$ increases until GD enters a regime where $2 / \tilde { \eta } _ { t }$ roughly equals to the spherical sharpness (or equivalently $2 / \hat { \eta } \approx \lambda _ { 1 } ( \nabla ^ { 2 } \mathcal { L } ( \pmb { w } _ { t } ) \breve { ) } )$ , namely the EoS regime (Section 4.1).
|
| 41 |
+
2. In the EoS regime, we show that for GD with a small (but finite) learning rate, $\theta _ { t }$ oscillates around the manifold and moves approximately along a sharpness-reduction flow, which is a gradient flow for minimizing spherical sharpness on the manifold (with gradient-dependent learning rate) (Section 4.2).
|
| 42 |
+
3. As an application of our theory, we show that for linear regression with BN, $\mathrm { G D + W D }$ finds the minimizer that corresponds to the linear model with minimum weight norm, which looks surprisingly the same as the conventional effect of WD but is achieved through the completely different sharpness-reduction mechanism (Section 5).
|
| 43 |
+
4. We experimentally verified the sharpness-reduction phenomenon predicted by our theorem and its benefits to generalization on CIFAR-10 with VGG-11 and ResNet-20, as well as matrix completion with BN (Appendix P).
|
| 44 |
+
5. We generalize our theoretical results of sharpness-reduction bias to a broader class of adaptive gradient methods, most notably a variant of RMSprop with scalar learning rate (Appendix B).
|
| 45 |
+
|
| 46 |
+
Technical Contribution. Our proof technique is novel and may have independent interest to the ML community. The main challenge is that we need to analyze the implicit bias of GD in the EoS regime which crucially relies on step size being finite — this is in sharp contrast to many previous works on implicit bias of GD [107, 106, 87, 59, 43, 42, 76, 100, 4, 22, 79, 88, 101, 108, 38] where the same bias exists at infinitesimal LR. Our analysis is inspired by a previous line of works [13, 25, 81] showing that label noise can drive SGD to move on the minimizer manifold along the direction of minimizing the trace of Hessian. We borrow a few lemmas from those analyses, but the overall proof strategy is very different because our setting does not even have any stochastic gradient noise. Instead, we connect the dynamics in the EoS regime to power methods and show that GD oscillates around the minimizer manifold. This oscillation then becomes a driving power that pushes the parameter to move on the manifold. Finally, we analyze the speed of this movement by modeling two key parameters of the dynamics as a 1-dimensional Hamiltonian system (Figure 6). To the best of our knowledge, we are the first to provide theoretical proof for a sharpness measure to decrease during the standard GD training, without any additional regularization (e.g., label noise [13, 25, 81]) and without involving uncommon variants of GD (e.g., normalized GD or non-smooth wrappings on the loss function [8]).
|
| 47 |
+
|
| 48 |
+
# 2 Related Works
|
| 49 |
+
|
| 50 |
+
Sharpness and Generalization. It has been long believed that flat minima generalize better [50]. Several empirical studies [63, 74, 117, 57] verified the positive correlation between flatness and generalization. Neyshabur et al. [95] justified this via PAC-Bayes theory [92]. Several other theoretical papers explored the generalization properties of flat minima specifically for two-layer nets [13, 94, 44, 81, 30] and deep linear nets [93]. Jiang et al. [60] conducted extensive experiments for all existing generalization measures to evaluate their correlation and causal relationships with generalization error, concluding that sharpness-based measures perform the best overall. In light of this, Foret et al. [37] proposed SAM algorithm to improve the generalization by minimizing the sharpness. Despite so many positive results on sharpness-based measures, a common issue of many works is that the measures may suffer from sensitivity to rescaling of parameters in deep nets [31]. Another issue is that the minima could lie in asymmetric valleys that are flat on one side and sharp on the other [45].
|
| 51 |
+
|
| 52 |
+
Understanding Normalization Layers. The benefits of normalization layers can be shown in various aspects. A series of works studied the forward propagation of deep nets at random initialization, showing that normalization layers stabilize the growth of intermediate layer outputs with depth [14, 10, 28], provably avoid rank collapse [26] and orthogonalize representations [27]. Although these works mainly focused on BN [55], Lubana et al. [85], Labatie et al. [67] provided thorough discussions on the applicability of these arguments to other normalization layers. It is also believed that BN has a unique regularization effect through the noise in batch statistics [86, 111, 104]. Several other works argued that normalization layers lead to a smoothening or preconditioning effect of the loss landscape [103, 12, 39, 61, 82, 68], which may help optimization. By analyzing the training dynamics, Arora et al. [7] rigorously proved that normalization yields an auto-tuning effect of the effective learning rate $\tilde { \eta } _ { t }$ , which makes the asymptotic speed of optimization much less sensitive to the learning rate and initialization. In linear regression settings, Cai et al. [16], Kohler et al. [65] showed that training with BN leads to a faster convergence rate; Wu et al. [119] studied the implicit regularization effect of WN [102]. For two-layer nets with normalization, Ma and Ying [90] derived a mean-field formulation of the training dynamics; Dukler et al. [33] proved a convergence rate via NTK-based analysis. The current paper focuses on the interplay between normalization and WD during training, whereas all the above works either do not analyze the dynamics or assume no WD.
|
| 53 |
+
|
| 54 |
+
Interplay Between Normalization and WD. A common feature of normalization layers (including but not limited to BN, WN, LN, GN, SWS) is that they make the loss invariant to the scale of layer weights. In presence of both scale-invariance and WD, training dynamics can go out of the scope of the classical optimization theory, e.g., one can train the net to small loss even with learning rates exponentially increasing [77]. A series of works investigated into the interplay between normalization and WD and argued that the training dynamic with SGD eventually reaches an “equilibrium” state, where the parameter norm [78, 113, 21] and the size of angular update [114] become stable. Li et al. [78], Wang and Wang [115] provided empirical and theoretical evidence that the function represented by the net also equilibrates to a stationary distribution that is independent of initialization. This could be related to Liu et al. [83]’s experiments on the ability of SGD with WD to escape from bad initialization, but it remains unclear why the generalization should be good at the equilibrium state. In this paper, we focus on (full-batch) GD, which is the most basic and important special case of SGD.
|
| 55 |
+
|
| 56 |
+
# 3 Preliminaries
|
| 57 |
+
|
| 58 |
+
Let $\mathbb { S } ^ { D - 1 } : = \{ \pmb { \theta } \in \mathbb { R } ^ { D } : \| \pmb { \theta } \| _ { 2 } = 1 \}$ be the unit sphere equipped with subspace topology. We say a loss function $\mathcal { L } ( w )$ defined on $\mathbb { R } ^ { \hat { D } } \setminus \{ { \bf { 0 } } \}$ is scale-invariant if $\mathcal { L } ( c \pmb { w } ) = \bar { \mathcal { L } } ( \pmb { w } )$ for all $c > 0$ . In other words, the loss value does not change with the parameter norm. For a differentiable scaleinvariant function $\mathcal { L } ( w )$ , the gradient is $( - 1 )$ -homogeneous and it is always perpendicular to $\pmb { w }$ , i.e., $\nabla \mathcal { L } ( c \pmb { w } ) = c ^ { - 1 } \nabla \mathcal { L } ( \pmb { w } )$ for all $c > 0$ and $\langle \nabla \mathcal { L } ( \boldsymbol { w } ) , \mathbf { \bar { w } } \rangle = 0$ (see Lemma D.1).
|
| 59 |
+
|
| 60 |
+
The focus of this paper is the dynamics of $\mathrm { G D + W D }$ on scale-invariant loss. (1) gives the update rule for learning rate (LR) $\hat { \eta }$ and weight decay (WD) $\hat { \lambda }$ . We use $\begin{array} { r } { \pmb { \theta } _ { t } : = \frac { \pmb { w } _ { t } } { \| \pmb { w } _ { t } \| _ { 2 } } } \end{array}$ to denote the projection of ${ \pmb w } _ { t }$ onto $\mathbb { S } ^ { D - 1 }$ at step $t$ . We write $\mathrm { G D + W D }$ on scale-invariant loss as a specific kind of Projected Gradient Descent (PGD) and define the effective learning rate to be the LR $\begin{array} { r } { \tilde { \eta } _ { t } : = \frac { \hat { \eta } } { ( 1 - \hat { \eta } \hat { \lambda } ) \| \pmb { w } _ { t } \| _ { 2 } ^ { 2 } } } \end{array}$ that appears in the update rule of PGD. This notion is slightly different from the effective learning rate $\frac { \hat { \eta } } { \| \pmb { w } _ { t } \| _ { 2 } ^ { 2 } }$ defined in previous works [113, 52, 7], but ours is more convenient for our analysis.
|
| 61 |
+
|
| 62 |
+
Lemma 3.1. When the parameters ${ \pmb w } _ { t }$ are updated as (1), $\theta _ { t }$ satisfies the following equation:
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\pmb { \theta } _ { t + 1 } = \Pi \big ( \pmb { \theta } _ { t } - \tilde { \eta } _ { t } \nabla \mathcal { L } ( \pmb { \theta } _ { t } ) \big ) ,
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
where η˜t := ηˆ(1−ηˆλˆ)kwtk2 is called the effective learning rate at step $t$ , and $\Pi : w \mapsto \frac { w } { \| w \| _ { 2 } }$ is the projection operator that projects any vector onto the unit sphere.
|
| 69 |
+
|
| 70 |
+
# 4 $\mathbf { G D + W D }$ on Scale-Invariant Loss Functions
|
| 71 |
+
|
| 72 |
+
This section analyzes $\mathrm { G D + W D }$ (1) on a scale-invariant loss $\mathcal { L } ( w )$ , in particular what happens after approaching a manifold of local minimizers. Section 4.1 analyzes the dynamics in the stable regime, where loss is guaranteed to decrease monotonically, and Theorem 4.2 suggests ${ \pmb w } _ { t }$ can get close to a local minimizer at some time $t _ { 0 }$ . We show that the effective LR keeps increasing after $t _ { 0 }$ , causing $\mathrm { G D + W D }$ to eventually leave this stable regime and enter a new regime which we call the Edge of Stability (EoS). In Section 4.2, we establish our main theorem, which connects the dynamics of ${ \pmb w } _ { t }$ in the EoS regime to a sharpness-reduction flow.
|
| 73 |
+
|
| 74 |
+
# 4.1 GD+WD Eventually Leaves the Stable Regime
|
| 75 |
+
|
| 76 |
+
A standard step of analyzing optimization methods is to do Taylor expansion locally for the loss function, and show that how the optimization method decreases the loss using a descent lemma. In our case of scale-invariant loss functions, we use $\pmb { H } ( \pmb { w } ) : = \nabla ^ { 2 } \mathcal { L } ( \pmb { w } ) \in \mathbb { R } ^ { D \times D }$ to denote the Hessian matrix of $\mathcal { L }$ at ${ \pmb w } \in \mathbb { R } ^ { D }$ , and $\lambda _ { 1 } ^ { \mathrm { H } } ( \pmb { w } ) : = \lambda _ { 1 } ( \pmb { H } ( \pmb { w } ) )$ to denote the top eigenvalue of $H ( w )$ .
|
| 77 |
+
|
| 78 |
+
Lemma 4.1 (Descent Lemma). For scale-invariant loss $\mathcal { L } ( w )$ , at step t of $G D \pm W D$ we have
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\mathcal { L } ( \pmb { \theta } _ { t + 1 } ) \leq \mathcal { L } ( \pmb { \theta } _ { t } ) - \tilde { \eta } _ { t } ( 1 - \tilde { \eta } _ { t } \lambda _ { \mathrm { m a x } } ^ { ( t ) } / 2 ) \| \nabla \mathcal { L } ( \pmb { \theta } _ { t } ) \| _ { 2 } ^ { 2 } .
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
where $\begin{array} { r } { \lambda _ { \operatorname* { m a x } } ^ { ( t ) } : = \operatorname* { s u p } _ { \alpha \in [ 0 , \tilde { \eta } _ { t } ] } \left\{ \lambda _ { 1 } ^ { \mathrm { H } } ( \pmb \theta _ { t } - \alpha \nabla \mathcal L ( \pmb \theta _ { t } ) ) \right\} } \end{array}$ is an upper bound of spherical sharpness locally.
|
| 85 |
+
|
| 86 |
+
This descent lemma shows that the training loss $\mathcal { L } ( \pmb { \theta } _ { t } )$ keeps decreasing as long as the effective LR $\tilde { \eta } _ { t }$ is smaller than $2 / \lambda _ { \operatorname* { m a x } } ^ { ( t ) }$ , We call the regime of $\tilde { \eta } _ { t } < 2 / \lambda _ { \operatorname* { m a x } } ^ { ( t ) }$ as the stable regime of $\mathrm { G D + W D }$ . If $\tilde { \eta } _ { t } \approx 2 / \lambda _ { \operatorname* { m a x } } ^ { ( t ) }$ with a small difference, then we call it as the Edge of Stability $( E o S )$ regime. We remark that this condition for EoS regime is essentially the same as $\hat { \eta } \approx 2 / \lambda _ { 1 } ^ { \mathrm { H } } ( w )$ in Cohen et al. [24]’s definition because $\tilde { \eta } _ { t } \cdot \lambda _ { \mathrm { m a x } } ^ { ( t ) } \approx \hat { \eta } \cdot \lambda _ { 1 } ^ { \mathrm { H } } ( \pmb { w } )$ ; see Appendix G.3.
|
| 87 |
+
|
| 88 |
+
Fix an initial point $\pmb { w } _ { 0 } \in \mathbb { R } ^ { D } \setminus \{ \mathbf { 0 } \}$ . Now we aim to characterize the dynamics of $\mathrm { G D + W D }$ when LR $\hat { \eta }$ and WD $\hat { \lambda }$ are small enough. The convergence rate of $\mathrm { G D + W D }$ has been analyzed by Li et al. [80]. Here we present a variant of their theorem that bounds both the gradient and effective LR.
|
| 89 |
+
|
| 90 |
+
Theorem 4.2 (Variant of Theorem D.2, Li et al. [80]). Let $\mathcal { L } ( w )$ be a scale-invariant loss function and $\rho _ { 2 } : = \operatorname* { s u p } \{ \| \nabla ^ { 2 } \mathcal { L } ( \pmb { w } ) \| _ { 2 } : \pmb { w } \in \mathbb { S } ^ { D - 1 } \}$ be the smoothness constant of $\mathcal { L }$ restricted on the unit sphere. For GD+WD (1) with ηˆλˆ ≤ 1/2 and η˜0 ≤ 1π2ρ (1−ηˆλˆ) , l et $\begin{array} { r } { T _ { 0 } : = \left\lceil \frac { 1 } { 2 \hat { \eta } \hat { \lambda } } \ln \frac { \| \pmb { w } _ { 0 } \| _ { 2 } ^ { 2 } } { \rho _ { 2 } \pi ^ { 2 } \hat { \eta } } \right\rceil } \end{array}$ steps, there must exist $0 \leq t \leq T _ { 0 }$ such that $\lVert \nabla \mathcal { L } ( { \pmb \theta } _ { t } ) \rVert _ { 2 } ^ { 2 } \leq 8 \pi ^ { 4 } \rho _ { 2 } ^ { 2 } \hat { \lambda } \hat { \eta }$ and $\begin{array} { r } { \tilde { \eta } _ { t } \le \frac { 2 } { \pi ^ { 2 } \rho _ { 2 } ( 1 - \hat { \eta } \hat { \lambda } ) } } \end{array}$
|
| 91 |
+
|
| 92 |
+
Theorem 4.2 shows that for some t0 ≤ T0, k∇L(θt0 )k22 ≤ O(λˆηˆ) and η˜t0 ≤ 1π2ρ2 ρ2 , which means $\pmb { \theta } _ { t _ { 0 } }$ is an approximate first-order stationary point of $\mathcal { L }$ on the unit sphere. This does not guarantee that $\pmb { \theta } _ { t _ { 0 } }$ is close to any global minimizer, but in practice the training loss rarely gets stuck at a non-optimal value when the model is overparameterized [70, 96, 71, 125]. We are thus motivated to study the case where $\pmb { \theta } _ { t _ { 0 } }$ not only has small gradient $\lVert \nabla \mathcal { L } ( \pmb { \theta } _ { t _ { 0 } } ) \rVert _ { 2 } ^ { 2 } \leq O ( \hat { \lambda } \hat { \eta } )$ but also is close to a local minimizer $\pmb { \theta } ^ { * } \in \mathbb { S } ^ { D - 1 }$ of $\mathcal { L }$ in the sense that $\lVert \pmb { \theta } _ { t _ { 0 } } - \pmb { \theta } ^ { * } \rVert _ { 2 } \leq O ( ( \hat { \lambda } \hat { \eta } ) ^ { 1 / 2 } )$ (assuming smoothness, the latter implies the former).
|
| 93 |
+
|
| 94 |
+
As the gradient is small near the local minimizer $\pmb { \theta } ^ { * }$ , starting from step $t _ { 0 }$ , the norm of ${ \pmb w } _ { t }$ decreases due to the effect of WD. See Figure 3a. Since the effective LR is inversely proportional to $\| \boldsymbol { w } _ { t } \| _ { 2 } ^ { 2 }$ , this leads to the effective LR to increase. Then Theorem 4.4 will show that the $\mathrm { G D + W D }$ $t _ { 1 } > t _ { 0 }$ c eventually leaves the stable regi, and enters the EoS regime where $\tilde { \eta } _ { t } \approx 2 / \lambda _ { \operatorname* { m a x } } ^ { ( t ) }$ e .
|
| 95 |
+
|
| 96 |
+
To establish Theorem 4.4, we need to assume that $\mathcal { L }$ satisfies Polyak-Łojasiewicz (PL) condition locally, which is a standard regularity condition in the optimization literature to ease theoretical analysis around a minimizer. Intuitively,
|
| 97 |
+
|
| 98 |
+

|
| 99 |
+
Figure 3: The norm of ${ \pmb w } _ { t }$ decreases when gradient is small and increases when gradient is large.
|
| 100 |
+
|
| 101 |
+
PL condition guarantees that the gradient grows faster than a quadratic function as we move a parameter $\pmb { \theta }$ away from $\pmb { \theta } ^ { * }$ . Note that PL condition is strictly weaker than convexity as the function can still be non-convex under PL condition (see, e.g., [62]).
|
| 102 |
+
|
| 103 |
+
Definition 4.3 (Polyak-Łojasiewicz Condition). For a scale-invariant loss $\mathcal { L } ( w )$ and $\mu > 0$ , we say that $\mathcal { L }$ satisfies $\mu$ -Polyak-Łojasiewicz condition (or $\mu$ -PL) locally around a local minimizer $\pmb { \theta } ^ { * }$ on $\mathbb { S } ^ { D - 1 }$ if for some neighborhood $U \subseteq \mathbb { S } ^ { D - 1 }$ of $\pmb { \theta } ^ { * }$ , $\begin{array} { r } { \forall \dot { \pmb { \theta } } \in \dot { U } : \frac { 1 } { 2 } \| \dot { \nabla } \mathcal { L } ( \pmb { \theta } ) \| _ { 2 } ^ { 2 } \geq \mu \cdot \left( \mathcal { L } ( \pmb { \theta } ) - \mathcal { L } ( \pmb { \theta } ^ { * } ) \right) } \end{array}$ .
|
| 104 |
+
|
| 105 |
+
Theorem 4.4. Let $\mathcal { L } ( w )$ be a $\mathcal { C } ^ { 2 }$ -smooth scale-invariant loss that satisfies $\mu$ -PL around a local minimizer $\pmb { \theta } ^ { * }$ L Con the unit sphere, and $\rho _ { 2 } : = \operatorname* { s u p } \{ \| \nabla ^ { 2 } \mathcal { L } ( \pmb { w } ) \| _ { 2 } : \pmb { w } \in \mathring { \mathbb { S } } ^ { D - 1 } \}$ . For $G D \pm W D$ on $\mathcal { L } ( w )$ with learning rate $\hat { \eta }$ and weight decay $\hat { \lambda }$ , if at some step $t _ { 0 }$ , $\lVert \pmb { \theta } _ { t _ { 0 } } - \pmb { \theta } ^ { * } \rVert _ { 2 } \leq O ( ( \hat { \lambda } \hat { \eta } ) ^ { 1 / 2 } )$ and $\begin{array} { r } { \tilde { \eta } _ { t _ { 0 } } \ \leq \ \frac { 2 } { \rho _ { 2 } } \ < \ \frac { 2 } { \lambda _ { 1 } ^ { \mathrm { H } } ( \pmb { \theta } ^ { * } ) } } \end{array}$ < 2λH(θ∗) , and if λˆηˆ is small enough, then there exists a time t1 > t0 such that $\lVert \pmb { \theta } _ { t _ { 1 } } - \pmb { \theta } ^ { * } \rVert _ { 2 } = O ( ( \hat { \lambda } \hat { \eta } ) ^ { 1 / 2 } )$ and $\begin{array} { r } { \tilde { \eta } _ { t _ { 1 } } = \frac { 2 } { \lambda _ { 1 } ^ { \mathrm { H } } ( \pmb { \theta } ^ { * } ) } + O ( ( \hat { \lambda } \hat { \eta } ) ^ { 1 / 2 } ) } \end{array}$ .
|
| 106 |
+
|
| 107 |
+
# 4.2 Dynamics at the Edge of Stability
|
| 108 |
+
|
| 109 |
+
From the analysis in the previous subsection, we know that $\theta _ { t }$ can get close to a local minimizer $\pmb { \theta } ^ { * }$ and enter the EoS regime at some step $t _ { 1 }$ . But what happens after $t _ { 1 }$ ?
|
| 110 |
+
|
| 111 |
+
Figure 4 gives a warm-up example on a 3D scale-invariant loss $\mathcal { L } : \mathbb { R } ^ { 3 } \backslash \{ \mathbf { 0 } \} \mathbb { R }$ , where the black line is a manifold $\varGamma$ consisting of all the minimizers. In training with $\mathrm { G D + W D }$ , $\theta _ { t }$ first goes close to a local minimizer $\zeta _ { 0 }$ , then Theorem 4.4 suggests that WD causes the effective LR to steadily increase until the dynamic enters the EoS regime. Now something interesting happens — $\theta _ { t }$ moves a bit away from $\zeta _ { 0 }$ and starts to oscillate around the manifold $\varGamma$ . This oscillation is not completely perpendicular to $\varGamma$ but actually forms a small angle that pushes $\theta _ { t }$ to move downward persistently until $\theta _ { t }$ approaches the minimizer $\zeta _ { * }$ denoted in the plot.
|
| 112 |
+
|
| 113 |
+
For a general scale-invariant loss $\mathcal { L } : \mathbb { R } ^ { D } \backslash \{ \mathbf { 0 } \} \mathbb { R }$ , which minimizer does $\theta _ { t }$ move towards? In this work, we consider the setting where there is a manifold $\varGamma$ consisting only of local minimizers (but not necessarily all of them). We show that $\theta _ { t }$ always oscillates around the manifold once it approaches the manifold and enters the EoS regime, and meanwhile $\theta _ { t }$ keeps moving in a direction of reducing spherical sharpness.
|
| 114 |
+
|
| 115 |
+

|
| 116 |
+
Figure 4: The trajectory of $\pmb { \theta } _ { t }$ on a 3D scale-invariant loss function. Darker color means lower loss on the unit sphere, and points in the black line are minimizers (see Appendix F). In the end, ${ \pmb \theta } _ { t }$ approaches the flattest one (red star).
|
| 117 |
+
|
| 118 |
+
# 4.2.1 Assumptions
|
| 119 |
+
|
| 120 |
+
Now we formally introduce our main assumption on the local minimizer manifold $\varGamma$
|
| 121 |
+
|
| 122 |
+
Assumption 4.5. The loss function $\mathcal { L } : \mathbb { R } ^ { D } \setminus \{ \mathbf { 0 } \} \mathbb { R }$ is $\mathcal { C } ^ { 4 }$ -smooth and scale-invariant. $\varGamma$ is a $\mathcal { C } ^ { 2 }$ -smooth, $( D _ { \Gamma } - 1 )$ -dimensional submanifold of $\mathbb { S } ^ { D - 1 }$ for some $0 \leq D _ { \Gamma } < D$ , where every $\pmb { \theta } \in \varGamma$ is a local minimizer of $\mathcal { L }$ on $\mathbb { S } ^ { D - 1 }$ and $\operatorname { r a n k } ( H ( \pmb \theta ) ) = D - D _ { \Gamma }$ .
|
| 123 |
+
|
| 124 |
+
Scale-invariance has become a standard assumption in studying neural nets with normalization layers [77, 78, 84]. For VGG and ResNet, the scale-invariance can be ensured after making minor changes to the architectures (see Appendix Q.1). The training loss $\mathcal { L }$ may not be smooth if the activation is ReLU, but lately it has become clear that differentiable activations such as Swish [98], GeLU [48] can perform equally well. Swish is indeed used in our VGG-11 experiments (Figure 2), but ResNet with ReLU activation also exhibits a sharpness-reduction bias empirically (see Appendix P.2).
|
| 125 |
+
|
| 126 |
+
For any local minimizer $\pmb { \theta } \in \varGamma$ , the eigenvalues $\lambda _ { k } ^ { \mathrm { H } } ( \pmb \theta )$ must be non-negative. And $\lambda _ { k } ^ { \mathrm { H } } ( \pmb \theta ) = 0$ for all $D - D _ { \Gamma } < k \leq D$ , since $\varGamma$ is of dimension $D _ { \Gamma } - 1$ . The condition $\mathrm { r a n k } ( { \pmb H } ( \pmb \theta ) ) = D - D _ { \Gamma }$ ensures that the Hessian is maximally non-degenerate on $\varGamma$ , which also appears as a key assumption in previous works [81, 8, 35]. This condition simplifies the calculus on $\varGamma$ in our analysis as it ensures that the null space of the matrix $H ( \pmb \theta )$ equals to the tangent space of $\varGamma$ at $\pmb \theta \in \boldsymbol { I } ^ { \intercal }$ . It is also closely related to PL condition (Definition 4.3) as Assumption 4.5 implies that $\mathcal { L } ( \pmb { \theta } )$ satisfies $\mu$ -PL (for some $\mu > 0$ ) locally around every $\pmb \theta \in \boldsymbol { \varGamma }$ on the unit sphere (Arora et al. [8], Lemma B.3).
|
| 127 |
+
|
| 128 |
+
To ease our analysis, we also need the following regularity condition to ensure that the largest eigenvalue is unique. In our experiments, sharpness reduction happens even when the multiplicity of the top eigenvalue is more than 1, but we leave the analysis of that case to future work.
|
| 129 |
+
|
| 130 |
+
Assumption 4.6. For all $\pmb { \theta } \in \varGamma$ , $\lambda _ { 1 } ^ { \mathrm { H } } ( \pmb { \theta } ) > \lambda _ { 2 } ^ { \mathrm { H } } ( \pmb { \theta } )$ . That is, the top eigenvalue of $H ( \pmb \theta )$ is unique.
|
| 131 |
+
|
| 132 |
+
# 4.2.2 Main Theorem
|
| 133 |
+
|
| 134 |
+
First, we define $\eta _ { \mathrm { { i n } } } : = \hat { \eta } \hat { \lambda }$ as the intrinsic learning rate (name from Li et al. [78]) for convenience. As suggested in Theorems 4.2 and 4.4, $\theta _ { t }$ can get close to a local minimizer and be in the EoS regime at some step $t _ { 1 }$ : if $\zeta _ { 0 }$ is the local minimizer, then $\lVert \pmb { \theta } _ { t _ { 1 } } - \zeta _ { 0 } \rVert _ { 2 } = O ( \eta _ { \mathrm { i n } } ^ { 1 / 2 } )$ $\begin{array} { r } { \widetilde { \eta } _ { t _ { 1 } } = \frac { 2 } { \lambda _ { 1 } ^ { \mathrm { H } } ( \zeta _ { 0 } ) } + { \cal O } ( \eta _ { \mathrm { i n } } ^ { 1 / 2 } ) } \end{array}$ In our main theorem, we start our analysis from step $t _ { 1 }$ while setting $t _ { 1 } = 0$ WLOG (otherwise we can shift the step numbers). We connect $\mathrm { G D + W D }$ in the EoS regime to the following gradient flow (3) on the manifold $\varGamma$ minimizing spherical sharpness (with gradient-dependent learning rate), and show that one step of $\mathrm { G D + W D }$ tracks a time interval of length $\eta _ { \mathrm { i n } }$ in the gradient flow.
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
\zeta ( 0 ) = \zeta _ { 0 } \in T , \qquad { \frac { \mathrm { d } } { \mathrm { d } \tau } } \zeta ( \tau ) = - { \frac { 2 \nabla _ { \Gamma } \log \lambda _ { 1 } ^ { \mathrm { H } } ( \zeta ( \tau ) ) } { 4 + \| \nabla _ { \Gamma } \log \lambda _ { 1 } ^ { \mathrm { H } } ( \zeta ( \tau ) ) \| _ { 2 } ^ { 2 } } } .
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
Here we use the notation $\nabla _ { \Gamma } R ( \pmb \theta )$ for any $R : \mathbb { R } ^ { D } \mathbb { R }$ to denote the projection of $\nabla R ( \pmb \theta )$ onto the tangent space ${ \sf T } _ { \theta } ( { \cal I } )$ at $\pmb { \theta } \in T$ . $\zeta ( \tau )$ reduces sharpness as it moves in direction of the negative gradient of $\log \lambda _ { 1 } ^ { \mathrm { H } } ( \zeta ( \dot { \tau } ) )$ on $\varGamma$ . A simple chain rule shows how fast the spherical sharpness decreases:
|
| 141 |
+
|
| 142 |
+
$$
|
| 143 |
+
\frac { \mathrm { d } } { \mathrm { i } t } \log \lambda _ { 1 } ^ { \mathrm { H } } ( \zeta ( \tau ) ) = - \frac { 2 \| \nabla _ { \Gamma } \log \lambda _ { 1 } ^ { \mathrm { H } } ( \zeta ( \tau ) ) \| _ { 2 } ^ { 2 } } { 4 + \| \nabla _ { \Gamma } \log \lambda _ { 1 } ^ { \mathrm { H } } ( \zeta ( \tau ) ) \| _ { 2 } ^ { 2 } } \approx \left\{ - \frac { 1 } { 2 } \| \nabla _ { \Gamma } \log \lambda _ { 1 } ^ { \mathrm { H } } ( \zeta ( \tau ) ) \| _ { 2 } ^ { 2 } \right. \quad \mathrm { ~ f o r ~ s m a l l ~ g r a d i e n t } ;
|
| 144 |
+
$$
|
| 145 |
+
|
| 146 |
+
Note that it is not enough to just assume that $\pmb { \theta } _ { 0 }$ is close to $\zeta _ { 0 }$ . If $\pmb { \theta } _ { 0 } = \zeta _ { 0 }$ holds exactly, then the subsequent dynamic of ${ \pmb w } _ { t }$ is described by $\pmb { w } _ { t } = ( 1 - \hat { \eta } \hat { \lambda } ) ^ { t } \pmb { w } _ { 0 }$ with direction unchanged. There are also some other bad initial directions of ${ \pmb w } _ { 0 }$ that may not lead to the sharpness-reduction bias. This motivates us to do a smoothed analysis for the initial direction: the initial direction is $\zeta$ with tiny random perturbation, where the perturbation scale is allowed to vary from $\exp ( - \eta _ { \mathrm { i n } } ^ { - o ( 1 ) } )$ to η1/in $\eta _ { \mathrm { i n } } ^ { 1 / 2 - o ( 1 \bar { ) } }$ and we show that a good initial direction is met with high probability as $\eta _ { \mathrm { i n } } 0$ .1 Alternatively, one can regard it as a modeling of the tiny random noise in $\mathrm { G D + W D }$ due to the precision errors in floating-point operations. See Figure 5b; the training loss can never be exactly zero in practice.
|
| 147 |
+
|
| 148 |
+
Initialization Scheme. Given a local minimizer $\zeta _ { 0 } \in T$ , we initialize $\pmb { w } _ { 0 } \in \mathbb { R } ^ { D } \setminus \{ \mathbf { 0 } \}$ as follows: draw $\pmb { \xi } \sim \mathcal { N } ( \mathbf { 0 } , \sigma _ { 0 } ^ { 2 } I / D )$ from Gaussian and set the direction of $\pmb { w } _ { 0 }$ to $\frac { \xi _ { 0 } + \pmb { \xi } } { \| \zeta _ { 0 } + \pmb { \xi } \| _ { 2 } }$ , where $\sigma _ { 0 }$ can take any value in $[ \exp ( - \eta _ { \mathrm { i n } } ^ { - o ( 1 ) } ) , \eta _ { \mathrm { i n } } ^ { 1 / 2 - o ( 1 ) } ]$ η1/2−o(1)in ]; then set the parameter norm kw0k2 to be any value that satisfies $\begin{array} { r } { \left| \tilde { \eta } _ { 0 } - \frac { 2 } { \lambda _ { 1 } ^ { \mathrm { H } } ( \zeta _ { 0 } ) } \right| \le \eta _ { \mathrm { i n } } ^ { 1 / 2 - o ( 1 ) } } \end{array}$ η1/2−o(1), where η˜0 := $\begin{array} { r } { \tilde { \eta } _ { 0 } : = \frac { \hat { \eta } } { ( 1 - \hat { \eta } \hat { \lambda } ) \| \pmb { w } _ { 0 } \| _ { 2 } ^ { 2 } } } \end{array}$ is the effective LR for the first step.
|
| 149 |
+
|
| 150 |
+
Theorem 4.7. Under Assumptions 4.5 and 4.6, for $G D \pm W D$ (1) with sufficiently small intrinsic probability learning rate $1 - O ( \eta _ { \mathrm { i n } } ^ { 1 / 2 - o ( 1 ) } )$ $\eta _ { \mathrm { i n } } : = \hat { \eta } \hat { \lambda } ,$ if we follow the above initialization scheme for some , the trajectory of $\begin{array} { r } { \pmb { \theta } _ { t } : = \frac { \pmb { w } _ { t } } { \| \pmb { w } _ { t } \| _ { 2 } } } \end{array}$ ∈ approximately tracks a sharpness- $\zeta _ { 0 } \in T$ , then with reduction flow $\zeta : [ 0 , T ] T$ that starts from $\zeta _ { 0 }$ and evolves as the ODE (3) up to time $T$ (if solution exists), in the sense that $\lVert \pmb \theta _ { t } - \zeta ( t \eta _ { \mathrm { i n } } ) \rVert _ { 2 } = O ( \eta _ { \mathrm { i n } } ^ { 1 / 4 - o ( 1 ) } )$ η1/4−o(1)in ) for all 0 ≤ t ≤ T /ηin.
|
| 151 |
+
|
| 152 |
+
Remark 4.8 (Magnitude of Oscillation). As suggested by Figure 4, $\theta _ { t }$ actually oscillates around the manifold. But according to our analysis, the magnitude of oscillation is as small as η1/2−o(1)), so it is absorbed into our final bound $O ( \eta _ { \mathrm { i n } } ^ { 1 / 4 - o ( 1 ) } )$ for the distance between $\theta _ { t }$ and $\zeta ( t \eta _ { \mathrm { i n } } )$ .
|
| 153 |
+
|
| 154 |
+
# 4.2.3 Proof Idea
|
| 155 |
+
|
| 156 |
+
Throughout our proof, we view $\mathrm { G D + W D }$ for ${ \pmb w } _ { t }$ as a PGD for $\theta _ { t }$ with effective LR $\tilde { \eta } _ { t }$ (Lemma 3.1). To track $\theta _ { t }$ with $\zeta ( t \eta _ { \mathrm { i n } } )$ , for each step $t$ , we construct a local minimizer $\phi _ { t } \in T$ that serves as the “projection” of $\theta _ { t }$ onto the manifold $\varGamma$ , in the sense that the displacement $\pmb { x } _ { t } : = \pmb { \theta } _ { t } - \phi _ { t }$ is approximately perpendicular to the tangent space of $\varGamma$ at $\phi _ { t }$ . Our entire proof works through induction. According to the initial conditions, the dynamic is initially in the EoS regime: $\| \pmb { x } _ { t } \| _ { 2 } \leq \eta _ { \mathrm { i n } } ^ { 1 / 2 - o ( 1 ) }$ and |η˜t − 2/λH1 (φt)| ≤ η1/in at $t = 0$ . In our induction, we maintain the induction hypothesis that these two EoS conditions continue to hold for all $t \geq 0$ .
|
| 157 |
+
|
| 158 |
+

|
| 159 |
+
Figure 5: Illustration of the oscillation and periodic behaviors of $\mathrm { G D + W D }$ on linear regression with BN (see Sections 4.2.3 and 5). The training loss decreases to $\approx 1 0 ^ { - 1 4 }$ in the first 1k steps and achieves test loss 0.26. Starting from step $\sim 1 \mathrm { k }$ , the dynamic enters the EoS regime. (a). The test loss decreases to 0.16 as a distance measure to the flattest solution (M) decreases towards 0; (b). The training loss oscillates around $\sim 1 0 ^ { - 4 }$ in the EoS regime; (c). $2 / \tilde { \eta } _ { t }$ switches back and forth between being smaller and larger than $\lambda _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } )$ ; (d). The parameter oscillates around the minimizer manifold along the top eigenvector direction, and the magnitude of oscillation $\left| h _ { t } \right|$ rises and falls periodically.
|
| 160 |
+
|
| 161 |
+
Period-Two Oscillation. A key insight in our proof is that after a few initial steps, $\theta _ { t }$ is oscillating around $\phi _ { t }$ along the $\pm v _ { 1 } ^ { \mathrm { H } } ( \pmb { \theta } )$ directions, where ${ \pmb v } _ { 1 } ^ { \mathrm { H } } ( { \pmb \theta } )$ is a unit top eigenvector of $H ( \pmb \theta )$ and is chosen in a way that ${ \pmb v } _ { 1 } ^ { \mathrm { H } } ( { \pmb \theta } )$ is continuous on $\varGamma$ . More specifically, $\pmb { x } _ { t } ^ { \star } = \breve { h } _ { t } \pmb { v } _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } ) + O ( \| \pmb { x } _ { t } \| _ { 2 } ^ { 2 } )$ for $h _ { t } : = \langle { \pmb x } _ { t } , { \pmb v } _ { 1 } ^ { \mathrm { H } } ( { \pmb \phi } _ { t } ) \rangle$ . The oscillation is of period 2: $h _ { t } > 0$ when $t$ is even and $h _ { t } < 0$ when $t$ is odd. See Figure 5d for an example.
|
| 162 |
+
|
| 163 |
+
This oscillation can be connected to a power method for the matrix $I - \tilde { \eta } _ { t } H ( \phi _ { t } )$ . In the EoS regime, we can approximate $\pmb { \theta } _ { t + 1 }$ (when $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ is small) as $\pmb { \theta } _ { t + 1 } = \Pi \big ( \pmb { \theta } _ { t } - \tilde { \eta } _ { t } \nabla \mathcal { L } ( \pmb { \theta } _ { t } ) \big ) \approx \Pi \big ( \pmb { \theta } _ { t } - \tilde { \eta } _ { t } \pmb { H } ( \phi _ { t } ) \pmb { x } _ { t } \big ) \approx$ $\pmb { \theta } _ { t } - \tilde { \eta } _ { t } \pmb { H } ( \phi _ { t } ) \pmb { x } _ { t }$ by Taylor expansions of $\nabla \mathcal { L }$ and $\Pi : \mathbb { R } ^ { \hat { D } } \setminus \{ \mathbf { 0 } \} \dot { \mathbb { S } } ^ { D - 1 }$ . We can further show that $\phi _ { t + 1 } \approx \phi _ { t }$ due to our choice of projections. Then the connection to power method is shown below:
|
| 164 |
+
|
| 165 |
+
$$
|
| 166 |
+
\begin{array} { r } { \pmb { x } _ { t + 1 } \approx \pmb { \theta } _ { t + 1 } - \pmb { \phi } _ { t } \approx ( \pmb { I } - \tilde { \eta } _ { t } \pmb { H } ( \phi _ { t } ) ) \pmb { x } _ { t } . } \end{array}
|
| 167 |
+
$$
|
| 168 |
+
|
| 169 |
+
By simple linear algebra, $v _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } )$ is an eigenvector of $I - \tilde { \eta } _ { t } H ( \phi _ { t } )$ , associated with eigenvalue $1 - \tilde { \eta } _ { t } \lambda _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } ) \approx - \dot { 1 }$ 1. The remaining eigenvalues are $\{ 1 - \tilde { \eta } _ { t } \lambda _ { i } ^ { \mathrm { H } } ( \phi _ { t } ) \} _ { i = 2 } ^ { D }$ , where $\lambda _ { i } ^ { \mathrm { H } } ( \phi _ { t } )$ is the $i$ -th largest eigenvalue of $\pmb { H } ( \pmb \theta _ { t } )$ , and they lie in the range $( - 1 , 1 ]$ since $\lambda _ { i } ^ { \mathrm { H } } ( \phi _ { t } ) \in [ 0 , \lambda _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } ) )$ . Using a similar analysis to power method, we show that $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ quickly aligns to the direction of $\pm { \pmb { v } } _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } )$ after a few initial steps, as the corresponding eigenvalue has approximately the largest absolute value.2
|
| 170 |
+
|
| 171 |
+
To formally establish the above result, we need a tiny initial alignment between $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ and ${ \pmb v } _ { 1 } ^ { \mathrm { H } } ( \phi _ { 0 } )$ , just as the initial condition in power method. This is where we need the initial random perturbation.
|
| 172 |
+
|
| 173 |
+
Oscillation Drives $\phi _ { t }$ to Move. This period-two oscillation is the driving power to push $\phi _ { t }$ to move on the manifold. The main idea here is to realize that the oscillation direction deviates slightly from the direction of $\pm { \pmb { v } } _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } )$ by using a higher-order approximation. We specifically use the Taylor approximation to show that this deviation leads $\phi _ { t }$ to move slightly on $\varGamma$ : after each cycle of oscillation, $\phi _ { t + 2 } \approx \phi _ { t } - 4 h _ { t } ^ { 2 } \nabla _ { \Gamma } \log \lambda _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } ) + O ( \eta _ { \mathrm { i n } } ^ { 1 . 5 - o ( 1 ) } )$ η1.5−o(1)in ), which resembles two steps of gradient descent on $\varGamma$ to minimize the logarithm of spherical sharpness with learning rate $2 h _ { t } ^ { 2 }$ ,
|
| 174 |
+
|
| 175 |
+
Periodic Behavior of $h _ { t }$ and $\tilde { \eta } _ { t }$ . It remains to analyze the dynamics of $h _ { t }$ so that we can know how fast the sharpness reduction is. Our analysis is inspired by an empirical study from Lobacheva et al. [84], which reveals a periodic behavior of gradients and effective learning rates in training normalized nets with weight decay. In our theoretical setting, we capture this periodic behavior by showing that $h _ { t }$ and $\tilde { \eta } _ { t }$ do evolve periodically. See Figures ${ 5 \mathrm { c } }$ and 5d for an example.
|
| 176 |
+
|
| 177 |
+
The key is that $\tilde { \eta } _ { t }$ changes as an adaptive gradient method: $\tilde { \eta } _ { t }$ increases when gradient is small and decreases when gradient is large (due to the effect of WD; see Figures 3a and 3b), and in our case the gradient norm scales as $\left| h _ { t } \right|$ since $\nabla \mathcal { L } ( \pmb { \theta } _ { t } ) \approx h _ { t } \lambda _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } ) \pmb { v } _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } )$ . By the power method approximation, $h _ { t + 2 } \approx ( 1 - \tilde { \eta } _ { t } \lambda _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } ) ) ^ { 2 } h _ { t }$ , so $\left| h _ { t } \right|$ decreases when $\tilde { \eta } _ { t } < 2 / \lambda _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } )$ . But $| h _ { t } |$ cannot decrease forever, since $\tilde { \eta } _ { t }$ increases when $| h _ { t } |$ is sufficiently small. When $\tilde { \eta } _ { t }$ rises to over $2 \dot { / } \lambda _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } )$ , $| h _ { t } |$ changes from decreasing to increasing according to our approximation. But $h _ { t }$ cannot increase indefinitely either, since $\tilde { \eta } _ { t }$ decreases when $| h _ { t } |$ is sufficiently large. A period finishes when $\tilde { \eta } _ { t } < 2 / \lambda _ { 1 } ^ { \mathrm { H } } ( \phi _ { t } )$ holds again.
|
| 178 |
+
|
| 179 |
+
In our theoretical analysis, we connect this periodic behavior with a 1-dimensional Hamiltonian system (see Appendix H.2), and show that $2 h _ { t } ^ { 2 }$ in each step can be approximated by its average value in the period without incurring a large error. Further calculations show that this average value is approximately 2ηin4+k∇Γ log λH1 (ζ(tηin))k2 , the learning rate in the flow (3) multiplied with $\eta _ { \mathrm { i n } }$ . We can therefore conclude that each step of $\phi _ { t }$ (or $\pmb { \theta } _ { t }$ ) tracks a time interval of $\eta _ { \mathrm { i n } }$ in the flow.
|
| 180 |
+
|
| 181 |
+
Extensions. We note that this periodic behavior is not limited to $\mathrm { G D + W D }$ on scale-invariant loss, since the above intuitive argument holds as long as the effective LR changes adaptively with respect to gradient change. Based on this intuition, an important notion called Quasi-RMSprop scheduler is proposed. For a PGD method, a learning rate scheduler is a rule for changing the effective LR in each step, and Quasi-RMSprop is a specific class of schedulers we define, including the way that the effective LR changes in $\mathrm { G D + W D }$ on scale-invariant loss (if viewed as PGD). Our proof is done in a unified way that works as long as the effective LR changes in each step according to a Quasi-RMSprop scheduler. As a by-product, a similar theorem can be proved for GD (without projection) on non-scale-invariant loss if the LR changes as a Quasi-RMSprop in each step. For example, we can extend our analysis to RMSprop with a scalar learning rate. See Appendix B.
|
| 182 |
+
|
| 183 |
+
# 5 Case Study: Linear Regression with Batch Normalization
|
| 184 |
+
|
| 185 |
+
In this section, we analyze the $\mathrm { G D + W D }$ dynamics on linear regression with Batch Normalization (BN), as a simple application of our theory. Let $\{ ( \pmb { x } _ { i } , y _ { i } ) \} _ { i = 1 } ^ { n }$ be a dataset, where $\pmb { x } _ { i } \in \mathbb { R } ^ { d }$ and $y _ { i } \in \mathbb { R }$ are inputs and regression targets. We study the over-parameterized case where $d \gg n$ , and we assume that the regression targets are generated by an unknown linear model.
|
| 186 |
+
|
| 187 |
+
A classic linear model is parameterized by $( \boldsymbol { w } , \boldsymbol { b } ) \in \mathbb { R } ^ { d } \times \mathbb { R }$ and outputs ${ \pmb w } ^ { \top } { \pmb x } + b$ given input $_ { \textbf { \em x } }$ , but now we add a BN to the output. More specifically, we consider a batch-normalized linear model $\begin{array} { r } { \Phi ( \pmb { x } ; \pmb { w } , \gamma , \beta ) : = \gamma \cdot \frac { \pmb { w } ^ { \top } \pmb { x } - \mu _ { 1 } } { \sigma _ { 1 } } + \beta } \end{array}$ , where $\mu _ { 1 } , \sigma _ { 1 }$ are the mean and standard deviation of $\{ \pmb { w } ^ { \top } \pmb { x } _ { i } \} _ { i = 1 } ^ { n }$ over the whole dataset3, and the bias term $b$ is cancelled out due to BN. Note that $\Phi ( \pmb { x } ; \pmb { w } , \gamma , \beta )$ is still a linear function with respect to $_ { \textbf { \em x } }$ . Let $\mu _ { \mathrm { x } } \in \mathbb { R } ^ { d }$ and $\pmb { \Sigma } _ { \mathbf { x } } \in \mathbb { R } ^ { d \times d }$ be the mean and covariance of the input data $\{ { \pmb x } _ { i } \} _ { i = 1 } ^ { n }$ . Then $\Phi ( \pmb { x } ; \pmb { w } , \gamma , \beta )$ can be rewritten as:
|
| 188 |
+
|
| 189 |
+
$$
|
| 190 |
+
\begin{array} { r } { \Phi ( \boldsymbol { x } ; \boldsymbol { w } , \gamma , \beta ) = \tilde { \boldsymbol { w } } ^ { \top } \boldsymbol { x } + \tilde { b } , \qquad \mathrm { w h e r e } \quad \tilde { \boldsymbol { w } } : = \gamma \boldsymbol { w } / \| \boldsymbol { w } \| _ { \Sigma _ { \mathrm { x } } } , \quad \tilde { b } : = \beta - \tilde { \boldsymbol { w } } ^ { \top } \boldsymbol { \mu } _ { \mathrm { x } } . } \end{array}
|
| 191 |
+
$$
|
| 192 |
+
|
| 193 |
+
No matter how $\pmb { w }$ is set, the output mean and variance of $\Phi$ are always $\beta$ and $\gamma ^ { 2 }$ . To simplify our analysis, we fix $\beta , \gamma$ to be non-trainable constants so that the mean and variance of $\Phi$ ’s output match with those of $\{ y _ { i } \} _ { i = 1 } ^ { n }$ , that is, we set $\beta = \mu _ { \mathrm { y } }$ and $\gamma = \sigma _ { \mathrm { y } }$ to be the mean and standard deviation of $y _ { i }$ over the whole dataset. Then the training loss is $\begin{array} { r } { \mathcal { L } ( \pmb { w } ) : = \frac { 1 } { n } \sum _ { i \in [ n ] } ( \Phi ( \pmb { x } _ { i } ; \pmb { w } , \gamma , \beta ) - y _ { i } ) ^ { 2 } } \end{array}$ .
|
| 194 |
+
|
| 195 |
+
Theorem 5.1. In our setting of linear regression with BN, the sharpness-reduction flow $\zeta$ defined in (3) converges to the solution $\bar { \boldsymbol { w } } ^ { * } \in \mathbb { S } ^ { d - 1 }$ that minimizes sharpness $\lambda _ { 1 } ^ { \mathrm { H } } ( w ^ { * } )$ on $\varGamma$ , regardless of the initialization. Moreover, the coefficients $( \tilde { \mathbf { \Gamma } } \tilde { \mathbf { \Gamma } } ^ { \tilde { b } } )$ associated with $\ b { w } ^ { * }$ (defined in (4)) are the optimal solution of the following constrained optimization problem (M):
|
| 196 |
+
|
| 197 |
+
$$
|
| 198 |
+
\operatorname* { m i n } \quad \| \pmb { w } \| _ { 2 } ^ { 2 } \quad s . t . \quad \pmb { w } ^ { \top } \pmb { x } _ { i } + b = y _ { i } , \quad \forall i \in [ n ] .
|
| 199 |
+
$$
|
| 200 |
+
|
| 201 |
+
At first sight the result may appear trivial because the intent of WD is to regularize $L ^ { 2 }$ -norm. But this is deceptive because in scale-invariant nets the regularization effect of WD is not explicit. This result also challenges conventional view of optimization. GD is usually viewed as a discretization of its continuous counterpart, gradient flow (GF), and theoretical insight for the discrete update including convergence rate and implicit bias is achieved by analyzing the continuous counterpart (See Appendix A for a list). However, GF does not have the same sharpness-reduction bias as GD. As discussed in [77], adding WD only performs a time-rescaling on the GF trajectory on scale-invariant loss, but does not change the point that GF converge to if we project the trajectory onto the unit sphere. One can easily show that GF may converge to any zero-loss solution, but no matter how small
|
| 202 |
+
|
| 203 |
+
LR is, GD exhibits the sharpness-reduction bias towards the optimal solution of (M). To our best knowledge, this result is the first concrete example where even with arbitrarily small LR, GD can still generalize better than GF under natural settings.
|
| 204 |
+
|
| 205 |
+
# 6 Discussion
|
| 206 |
+
|
| 207 |
+
Experimental Verification of Sharpness Reduction. Besides Figures 1 and 2, Appendix P.1 provides additional matrix completion experiments with different data size, and Appendix P.2 provides CIFAR-10 experiments with ResNet-20. In all these experiments, we observed that GD continues to improve the test accuracy even after fitting the training set, and this phenomenon is correlated with the decreasing trend of spherical sharpness. See also Appendix P.3 for the validation for the periodic behavior we analyze in theory.
|
| 208 |
+
|
| 209 |
+
Ablation Studies on Normalization and Weight Decay. Our theoretical analysis crucially relies on the interplay between normalization and WD to establish the sharpness-reduction flow. We also conducted ablation studies on normalization and WD to highlight the importance of this interplay. First, if normalization is removed, the spherical sharpness becomes undefined, and we do not know if GD implicitly minimizes any sharpness measure. But even if a similar measure does exist, it cannot be strongly related to generalization, because we can verify that the test accuracy becomes very bad without normalization $( 5 6 . 8 \%$ on CIFAR-10, Figure 14), and continuing training after fitting the training set no longer improves test accuracy. Second, if WD is removed, the analysis in Arora et al. [7] guarantees convergence in the stable regime, and we can verify that the spherical sharpness and test accuracy stop changing when the loss is small. The final test accuracy is stuck at $6 6 . 4 \%$ (Figure 15), whereas training with WD leads to $8 4 . 3 \%$ .
|
| 210 |
+
|
| 211 |
+
Explaining the Progressive Sharpening and EoS Phenomena. Cohen et al. [24] conducted extensive empirical studies on the dynamics of GD in deep learning (without weight decay), formally $\pmb { w } _ { t + 1 } \bar { \pmb { w } } _ { t } - \hat { \eta } \nabla \tilde { \mathcal { L } } ( \pmb { w } _ { t } )$ . They observed the progressive sharpening phenomenon: $\bar { \lambda _ { 1 } ( \nabla ^ { 2 } \tilde { \mathcal { L } } ( \mathbf { \mathfrak { w } } _ { t } ) ) }$ tends to increase so long as it is less than $2 / \hat { \eta }$ . Then they observed that the training typically enters the EoS regime, which they define as a regime that (1) $\lambda _ { 1 } \big ( \nabla ^ { 2 } \tilde { \mathcal { L } } ( \boldsymbol { w } _ { t } ) \big )$ hovers right at, or just above $2 / \hat { \eta }$ ; and (2) the training loss $\tilde { \mathcal { L } } ( w _ { t } )$ goes up and down over short timescales, yet still decreases in the long-term run. A recent research trend focuses on explaining the progressive sharpening and EoS phenomena [1, 91, 8, 18]. Our work corresponds to an important special case where $\tilde { \mathcal { L } } ( \omega )$ is a scale-invariant loss with $L ^ { 2 }$ -regularization, namely $\begin{array} { r } { \mathcal { L } ( \pmb { w } ) + \frac { \hat { \lambda } } { 2 } \| \pmb { w } \| _ { 2 } ^ { 2 } } \end{array}$ . By analyzing the interplay between normalization and WD, the first part of our results (Section 4.1) attributes progressive sharpening to norm change, and the second part (Section 4.2) justifies in theory that the training can make progress in the EoS regime. See Appendix G.3 for more discussion.
|
| 212 |
+
|
| 213 |
+
# 7 Conclusions and Future Work
|
| 214 |
+
|
| 215 |
+
We exhibited settings where gradient descent has an implicit bias to reduce spherical sharpness in training neural nets with normalization layers and weight decay, and we verified experimentally this sharpness-reduction bias predicted by our theorem as well as its generalization benefit on CIFAR-10.
|
| 216 |
+
|
| 217 |
+
Our theoretical analysis applies to dynamics around a minimizer manifold and requires a small (but finite) learning rate so that we can show that the parameter oscillates locally and approximately tracks a sharpness-reduction flow. We note that in practice a decrease in spherical sharpness is observed even with moderate LR and even before getting close to a minimizer manifold. Explaining these phenomena is left for future work. Now we list some other future directions. The first is to generalize our results to SGD, where the sharpness measure may not be the spherical sharpness and could depend on the structure of gradient noise. Second, to understand the benefit of reducing spherical sharpness on specific tasks, e.g., why does reducing spherical sharpness encourage low-rank on matrix completion with BN (Figure 1)? Third, to study sharpness-reduction bias for neural net architectures that are not scale-invariant on all parameters (e.g., with certain unnormalized layers).
|
| 218 |
+
|
| 219 |
+
# Acknowledgements
|
| 220 |
+
|
| 221 |
+
This work is funded by NSF, ONR, Simons Foundation, DARPA and SRC. ZL is also supported by Microsoft Research PhD Fellowship.
|
| 222 |
+
|
| 223 |
+
References [1] Kwangjun Ahn, Jingzhao Zhang, and Suvrit Sra. Understanding the unstable convergence of gradient descent. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato, editors, Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pages 247–257. PMLR, 17–23 Jul 2022. [2] Zeyuan Allen-Zhu, Yuanzhi Li, and Yingyu Liang. Learning and generalization in overparameterized neural networks, going beyond two layers. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019. [3] Zeyuan Allen-Zhu, Yuanzhi Li, and Zhao Song. A convergence theory for deep learning via over-parameterization. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 242–252. PMLR, 09–15 Jun 2019. [4] Sanjeev Arora, Nadav Cohen, Wei Hu, and Yuping Luo. Implicit regularization in deep matrix factorization. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d’ Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 7411–7422. Curran Associates, Inc., 2019. [5] Sanjeev Arora, Simon Du, Wei Hu, Zhiyuan Li, and Ruosong Wang. Fine-grained analysis of optimization and generalization for overparameterized two-layer neural networks. In International Conference on Machine Learning, pages 322–332. PMLR, 2019. [6] Sanjeev Arora, Simon S Du, Wei Hu, Zhiyuan Li, Russ R Salakhutdinov, and Ruosong Wang. On exact computation with an infinitely wide neural net. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d’ Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8139–8148. Curran Associates, Inc., 2019. [7] Sanjeev Arora, Zhiyuan Li, and Kaifeng Lyu. Theoretical analysis of auto rate-tuning by batch normalization. In International Conference on Learning Representations, 2019. [8] Sanjeev Arora, Zhiyuan Li, and Abhishek Panigrahi. Understanding gradient descent on the edge of stability in deep learning. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato, editors, Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pages 948–1024. PMLR, 17–23 Jul 2022. [9] Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
|
| 224 |
+
[10] David Balduzzi, Marcus Frean, Lennox Leary, J. P. Lewis, Kurt Wan-Duo Ma, and Brian McWilliams. The shattered gradients problem: If resnets are the answer, then what is the question? In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 342–350. PMLR, 06���11 Aug 2017.
|
| 225 |
+
[11] David Barrett and Benoit Dherin. Implicit gradient regularization. In International Conference on Learning Representations, 2021.
|
| 226 |
+
[12] Johan Bjorck, Carla Gomes, and Bart Selman. Understanding batch normalization. arXiv preprint arXiv:1806.02375, 2018.
|
| 227 |
+
[13] Guy Blanc, Neha Gupta, Gregory Valiant, and Paul Valiant. Implicit regularization for deep neural networks driven by an ornstein-uhlenbeck like process. In Jacob Abernethy and Shivani Agarwal, editors, Proceedings of Thirty Third Conference on Learning Theory, volume 125 of Proceedings of Machine Learning Research, pages 483–513. PMLR, 09–12 Jul 2020.
|
| 228 |
+
[14] Andrew Brock, Soham De, and Samuel L Smith. Characterizing signal propagation to close the performance gap in unnormalized resnets. In International Conference on Learning Representations, 2021.
|
| 229 |
+
|
| 230 |
+
[15] Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, Sandhini Agarwal, Ariel Herbert-Voss, Gretchen Krueger, Tom Henighan, Rewon Child, Aditya Ramesh, Daniel Ziegler, Jeffrey Wu, Clemens Winter, Chris Hesse, Mark Chen, Eric Sigler, Mateusz Litwin, Scott Gray, Benjamin Chess, Jack Clark, Christopher Berner, Sam McCandlish, Alec Radford, Ilya Sutskever, and Dario Amodei. Language models are few-shot learners. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 1877–1901. Curran Associates, Inc., 2020.
|
| 231 |
+
|
| 232 |
+
[16] Yongqiang Cai, Qianxiao Li, and Zuowei Shen. A quantitative analysis of the effect of batch normalization on gradient descent. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 882–890. PMLR, 09–15 Jun 2019.
|
| 233 |
+
|
| 234 |
+
[17] Yuan Cao and Quanquan Gu. Generalization bounds of stochastic gradient descent for wide and deep neural networks. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019.
|
| 235 |
+
|
| 236 |
+
[18] Lei Chen and Joan Bruna. On gradient descent convergence beyond the edge of stability. arXiv preprint arXiv:2206.04172, 2022.
|
| 237 |
+
|
| 238 |
+
[19] Zixiang Chen, Yuan Cao, Difan Zou, and Quanquan Gu. How much over-parameterization is sufficient to learn deep ReLU networks? In International Conference on Learning Representations, 2021.
|
| 239 |
+
|
| 240 |
+
[20] Yuejie Chi, Yue M. Lu, and Yuxin Chen. Nonconvex optimization meets low-rank matrix factorization: An overview. IEEE Transactions on Signal Processing, 67(20):5239–5269, 2019. doi: 10.1109/TSP.2019.2937282.
|
| 241 |
+
|
| 242 |
+
[21] Vitaliy Chiley, Ilya Sharapov, Atli Kosson, Urs Koster, Ryan Reece, Sofia Samaniego de la Fuente, Vishal Subbiah, and Michael James. Online normalization for training neural networks. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019.
|
| 243 |
+
|
| 244 |
+
[22] Lenaic Chizat and Francis Bach. Implicit bias of gradient descent for wide two-layer neural networks trained with the logistic loss. In Conference on Learning Theory, pages 1305–1338. PMLR, 2020.
|
| 245 |
+
|
| 246 |
+
[23] Lénaïc Chizat, Edouard Oyallon, and Francis Bach. On lazy training in differentiable programming. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 2937–2947. Curran Associates, Inc., 2019.
|
| 247 |
+
|
| 248 |
+
[24] Jeremy Cohen, Simran Kaur, Yuanzhi Li, J Zico Kolter, and Ameet Talwalkar. Gradient descent on neural networks typically occurs at the edge of stability. In International Conference on Learning Representations, 2021.
|
| 249 |
+
|
| 250 |
+
[25] Alex Damian, Tengyu Ma, and Jason D Lee. Label noise SGD provably prefers flat global minimizers. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, volume 34, pages 27449–27461. Curran Associates, Inc., 2021.
|
| 251 |
+
|
| 252 |
+
[26] Hadi Daneshmand, Jonas Kohler, Francis Bach, Thomas Hofmann, and Aurelien Lucchi. Batch normalization provably avoids ranks collapse for randomly initialised deep networks. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 18387–18398. Curran Associates, Inc., 2020.
|
| 253 |
+
|
| 254 |
+
[27] Hadi Daneshmand, Amir Joudaki, and Francis Bach. Batch normalization orthogonalizes representations in deep random networks. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, 2021.
|
| 255 |
+
|
| 256 |
+
[28] Soham De and Sam Smith. Batch normalization biases residual blocks towards the identity function in deep networks. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 19964–19975. Curran Associates, Inc., 2020.
|
| 257 |
+
|
| 258 |
+
[29] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pages 4171– 4186, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1423.
|
| 259 |
+
|
| 260 |
+
[30] Lijun Ding, Dmitriy Drusvyatskiy, and Maryam Fazel. Flat minima generalize for low-rank matrix recovery. arXiv preprint arXiv:2203.03756, 2022.
|
| 261 |
+
|
| 262 |
+
[31] Laurent Dinh, Razvan Pascanu, Samy Bengio, and Yoshua Bengio. Sharp minima can generalize for deep nets. In Doina Precup and Yee Whye Teh, editors, Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pages 1019–1028. PMLR, 06–11 Aug 2017.
|
| 263 |
+
|
| 264 |
+
[32] Simon Du, Jason Lee, Haochuan Li, Liwei Wang, and Xiyu Zhai. Gradient descent finds global minima of deep neural networks. In International Conference on Machine Learning, pages 1675–1685. PMLR, 2019.
|
| 265 |
+
|
| 266 |
+
[33] Yonatan Dukler, Quanquan Gu, and Guido Montufar. Optimization theory for ReLU neural networks trained with normalization layers. In Hal Daumé III and Aarti Singh, editors, Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 2751–2760. PMLR, 13–18 Jul 2020.
|
| 267 |
+
|
| 268 |
+
[34] K. J. Falconer. Differentiation of the Limit Mapping in a Dynamical System. Journal of the London Mathematical Society, s2-27(2):356–372, 04 1983. ISSN 0024-6107. doi: 10.1112/jlms/s2-27.2.356.
|
| 269 |
+
|
| 270 |
+
[35] Benjamin Fehrman, Benjamin Gess, and Arnulf Jentzen. Convergence rates for the stochastic gradient descent method for non-convex objective functions. Journal of Machine Learning Research, 21(136):1–48, 2020.
|
| 271 |
+
|
| 272 |
+
[36] Robert L. Foote. Shorter notes: Regularity of the distance function. Proceedings of the American Mathematical Society, 92(1):153–155, 1984. ISSN 00029939, 10886826.
|
| 273 |
+
|
| 274 |
+
[37] Pierre Foret, Ariel Kleiner, Hossein Mobahi, and Behnam Neyshabur. Sharpness-aware minimization for efficiently improving generalization. In International Conference on Learning Representations, 2021.
|
| 275 |
+
|
| 276 |
+
[38] Rong Ge, Yunwei Ren, Xiang Wang, and Mo Zhou. Understanding deflation process in over-parametrized tensor decomposition. Advances in Neural Information Processing Systems, 34, 2021.
|
| 277 |
+
|
| 278 |
+
[39] Behrooz Ghorbani, Shankar Krishnan, and Ying Xiao. An investigation into neural net optimization via hessian eigenvalue density. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 2232–2241. PMLR, 09–15 Jun 2019.
|
| 279 |
+
|
| 280 |
+
[40] Justin Gilmer, Behrooz Ghorbani, Ankush Garg, Sneha Kudugunta, Behnam Neyshabur, David Cardoze, George Edward Dahl, Zachary Nado, and Orhan Firat. A loss curvature perspective on training instabilities of deep learning models. In International Conference on Learning Representations, 2022.
|
| 281 |
+
|
| 282 |
+
[41] Suriya Gunasekar, Blake E Woodworth, Srinadh Bhojanapalli, Behnam Neyshabur, and Nati Srebro. Implicit regularization in matrix factorization. In I. Guyon, U. V. Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems 30, pages 6151–6159. Curran Associates, Inc., 2017.
|
| 283 |
+
|
| 284 |
+
[42] Suriya Gunasekar, Jason D Lee, Daniel Soudry, and Nati Srebro. Implicit bias of gradient descent on linear convolutional networks. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 9482–9491. Curran Associates, Inc., 2018.
|
| 285 |
+
|
| 286 |
+
[43] Suriya Gunasekar, Jason D Lee, Daniel Soudry, and Nati Srebro. Implicit bias of gradient descent on linear convolutional networks. Advances in Neural Information Processing Systems, 31, 2018.
|
| 287 |
+
|
| 288 |
+
[44] Jeff Z. HaoChen, Colin Wei, Jason Lee, and Tengyu Ma. Shape matters: Understanding the implicit bias of the noise covariance. In Mikhail Belkin and Samory Kpotufe, editors, Proceedings of Thirty Fourth Conference on Learning Theory, volume 134 of Proceedings of Machine Learning Research, pages 2315–2357. PMLR, 15–19 Aug 2021.
|
| 289 |
+
|
| 290 |
+
[45] Haowei He, Gao Huang, and Yang Yuan. Asymmetric valleys: Beyond sharp and flat local minima. Advances in neural information processing systems, 32, 2019.
|
| 291 |
+
|
| 292 |
+
[46] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 770–778, 2016.
|
| 293 |
+
|
| 294 |
+
[47] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max Welling, editors, Computer Vision – ECCV 2016, pages 630–645, Cham, 2016. Springer International Publishing. ISBN 978-3-319-46493-0.
|
| 295 |
+
|
| 296 |
+
[48] Dan Hendrycks and Kevin Gimpel. Gaussian error linear units (GELUs). arXiv preprint arXiv:1606.08415, 2016.
|
| 297 |
+
|
| 298 |
+
[49] Geoffrey Hinton, Nitish Srivastava, and Kevin Swersky. Neural networks for machine learning lecture 6a: Overview of mini-batch gradient descent. Technical report, 2012. URL https: //www.cs.toronto.edu/\~tijmen/csc321/slides/lecture_slides_lec6.pdf.
|
| 299 |
+
|
| 300 |
+
[50] Sepp Hochreiter and Jürgen Schmidhuber. Flat minima. Neural computation, 9(1):1–42, 1997.
|
| 301 |
+
|
| 302 |
+
[51] Elad Hoffer, Itay Hubara, and Daniel Soudry. Train longer, generalize better: closing the generalization gap in large batch training of neural networks. In I. Guyon, U. Von Luxburg, S. Bengio, H. Wallach, R. Fergus, S. Vishwanathan, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 30. Curran Associates, Inc., 2017.
|
| 303 |
+
|
| 304 |
+
[52] Elad Hoffer, Ron Banner, Itay Golan, and Daniel Soudry. Norm matters: efficient and accurate normalization schemes in deep networks. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
|
| 305 |
+
|
| 306 |
+
[53] Lei Huang, Xianglong Liu, Yang Liu, Bo Lang, and Dacheng Tao. Centered weight normalization in accelerating training of deep neural networks. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), Oct 2017.
|
| 307 |
+
|
| 308 |
+
[54] Hikaru Ibayashi and Masaaki Imaizumi. Exponential escape efficiency of SGD from sharp minima in non-stationary regime. arXiv preprint arXiv:2111.04004, 2021.
|
| 309 |
+
|
| 310 |
+
[55] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Francis Bach and David Blei, editors, Proceedings of the 32nd International Conference on Machine Learning, volume 37 of Proceedings of Machine Learning Research, pages 448–456, Lille, France, 07–09 Jul 2015. PMLR.
|
| 311 |
+
|
| 312 |
+
[56] Arthur Jacot, Franck Gabriel, and Clement Hongler. Neural tangent kernel: Convergence and generalization in neural networks. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 8571–8580. Curran Associates, Inc., 2018.
|
| 313 |
+
|
| 314 |
+
[57] Stanisław Jastrz˛ebski, Zachary Kenton, Devansh Arpit, Nicolas Ballas, Asja Fischer, Yoshua Bengio, and Amos Storkey. Three factors influencing minima in SGD. arXiv preprint arXiv:1711.04623, 2017.
|
| 315 |
+
|
| 316 |
+
[58] Stanislaw Jastrzebski, Maciej Szymczak, Stanislav Fort, Devansh Arpit, Jacek Tabor, Kyunghyun Cho, and Krzysztof Geras. The break-even point on optimization trajectories of deep neural networks. In International Conference on Learning Representations, 2020.
|
| 317 |
+
|
| 318 |
+
[59] Ziwei Ji and Matus Telgarsky. Directional convergence and alignment in deep learning. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 17176–17186. Curran Associates, Inc., 2020.
|
| 319 |
+
|
| 320 |
+
[60] Yiding Jiang, Behnam Neyshabur, Hossein Mobahi, Dilip Krishnan, and Samy Bengio. Fantastic generalization measures and where to find them. In International Conference on Learning Representations, 2020.
|
| 321 |
+
|
| 322 |
+
[61] Ryo Karakida, Shotaro Akaho, and Shun-ichi Amari. The normalization method for alleviating pathological sharpness in wide neural networks. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019.
|
| 323 |
+
|
| 324 |
+
[62] Hamed Karimi, Julie Nutini, and Mark Schmidt. Linear convergence of gradient and proximalgradient methods under the polyak-łojasiewicz condition. In European Conference on Machine Learning and Knowledge Discovery in Databases - Volume 9851, ECML PKDD 2016, pages 795–811, Berlin, Heidelberg, 2016. Springer-Verlag. ISBN 9783319461274. doi: 10.1007/ 978-3-319-46128-1_50.
|
| 325 |
+
|
| 326 |
+
[63] Nitish Shirish Keskar, Dheevatsa Mudigere, Jorge Nocedal, Mikhail Smelyanskiy, and Ping Tak Peter Tang. On large-batch training for deep learning: Generalization gap and sharp minima. In International Conference on Learning Representations, 2017.
|
| 327 |
+
|
| 328 |
+
[64] Bobby Kleinberg, Yuanzhi Li, and Yang Yuan. An alternative view: When does SGD escape local minima? In Jennifer Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 2698–2707. PMLR, 10–15 Jul 2018.
|
| 329 |
+
|
| 330 |
+
[65] Jonas Kohler, Hadi Daneshmand, Aurelien Lucchi, Thomas Hofmann, Ming Zhou, and Klaus Neymeyr. Exponential convergence rates for batch normalization: The power of lengthdirection decoupling in non-convex optimization. In Kamalika Chaudhuri and Masashi Sugiyama, editors, Proceedings of the Twenty-Second International Conference on Artificial Intelligence and Statistics, volume 89 of Proceedings of Machine Learning Research, pages 806–815. PMLR, 16–18 Apr 2019.
|
| 331 |
+
|
| 332 |
+
[66] Lingkai Kong and Molei Tao. Stochasticity of deterministic gradient descent: Large learning rate for multiscale objective function. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 2625–2638. Curran Associates, Inc., 2020.
|
| 333 |
+
|
| 334 |
+
[67] Antoine Labatie, Dominic Masters, Zach Eaton-Rosen, and Carlo Luschi. Proxy-normalizing activations to match batch normalization while removing batch dependence. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, volume 34, pages 16990–17006. Curran Associates, Inc., 2021.
|
| 335 |
+
|
| 336 |
+
[68] Susanna Lange, Kyle Helfrich, and Qiang Ye. Batch normalization preconditioning for neural network training. Journal of Machine Learning Research, 23(72):1–41, 2022.
|
| 337 |
+
|
| 338 |
+
[69] Beatrice Laurent and Pascal Massart. Adaptive estimation of a quadratic functional by model selection. Annals of Statistics, pages 1302–1338, 2000.
|
| 339 |
+
|
| 340 |
+
[70] Jason D. Lee, Max Simchowitz, Michael I. Jordan, and Benjamin Recht. Gradient descent only converges to minimizers. In Vitaly Feldman, Alexander Rakhlin, and Ohad Shamir, editors, 29th Annual Conference on Learning Theory, volume 49 of Proceedings of Machine Learning Research, pages 1246–1257, Columbia University, New York, New York, USA, 23–26 Jun 2016. PMLR.
|
| 341 |
+
[71] Jason D Lee, Ioannis Panageas, Georgios Piliouras, Max Simchowitz, Michael I Jordan, and Benjamin Recht. First-order methods almost always avoid saddle points. arXiv preprint arXiv:1710.07406, 2017.
|
| 342 |
+
[72] Aitor Lewkowycz and Guy Gur-Ari. On the training dynamics of deep networks with L_2 regularization. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 4790–4799. Curran Associates, Inc., 2020.
|
| 343 |
+
[73] Aitor Lewkowycz, Yasaman Bahri, Ethan Dyer, Jascha Sohl-Dickstein, and Guy Gur-Ari. The large learning rate phase of deep learning: the catapult mechanism. arXiv preprint arXiv:2003.02218, 2020.
|
| 344 |
+
[74] Hao Li, Zheng Xu, Gavin Taylor, Christoph Studer, and Tom Goldstein. Visualizing the loss landscape of neural nets. Advances in neural information processing systems, 31, 2018.
|
| 345 |
+
[75] Yuanzhi Li and Yingyu Liang. Learning overparameterized neural networks via stochastic gradient descent on structured data. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
|
| 346 |
+
[76] Yuanzhi Li, Tengyu Ma, and Hongyang Zhang. Algorithmic regularization in overparameterized matrix sensing and neural networks with quadratic activations. In Sébastien Bubeck, Vianney Perchet, and Philippe Rigollet, editors, Proceedings of the 31st Conference On Learning Theory, volume 75 of Proceedings of Machine Learning Research, pages 2–47. PMLR, 06–09 Jul 2018.
|
| 347 |
+
[77] Zhiyuan Li and Sanjeev Arora. An exponential learning rate schedule for deep learning. In International Conference on Learning Representations, 2020.
|
| 348 |
+
[78] Zhiyuan Li, Kaifeng Lyu, and Sanjeev Arora. Reconciling modern deep learning with traditional optimization analyses: The intrinsic learning rate. In H. Larochelle, M. Ranzato, R. Hadsell, M. F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 14544–14555. Curran Associates, Inc., 2020.
|
| 349 |
+
[79] Zhiyuan Li, Yuping Luo, and Kaifeng Lyu. Towards resolving the implicit bias of gradient descent for matrix factorization: Greedy low-rank learning. In International Conference on Learning Representations, 2021.
|
| 350 |
+
[80] Zhiyuan Li, Srinadh Bhojanapalli, Manzil Zaheer, Sashank Reddi, and Sanjiv Kumar. Robust training of neural networks using scale invariant architectures. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato, editors, Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pages 12656–12684. PMLR, 17–23 Jul 2022.
|
| 351 |
+
[81] Zhiyuan Li, Tianhao Wang, and Sanjeev Arora. What happens after SGD reaches zero loss? –a mathematical framework. In International Conference on Learning Representations, 2022.
|
| 352 |
+
[82] Zinan Lin, Vyas Sekar, and Giulia Fanti. Why spectral normalization stabilizes GANs: Analysis and improvements. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, volume 34, pages 9625–9638. Curran Associates, Inc., 2021.
|
| 353 |
+
[83] Shengchao Liu, Dimitris Papailiopoulos, and Dimitris Achlioptas. Bad global minima exist and sgd can reach them. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 8543–8552. Curran Associates, Inc., 2020.
|
| 354 |
+
|
| 355 |
+
[84] Ekaterina Lobacheva, Maxim Kodryan, Nadezhda Chirkova, Andrey Malinin, and Dmitry P Vetrov. On the periodic behavior of neural network training with batch normalization and weight decay. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, volume 34, pages 21545–21556. Curran Associates, Inc., 2021.
|
| 356 |
+
|
| 357 |
+
[85] Ekdeep S Lubana, Robert Dick, and Hidenori Tanaka. Beyond batchnorm: Towards a unified understanding of normalization in deep learning. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, volume 34, pages 4778–4791. Curran Associates, Inc., 2021.
|
| 358 |
+
|
| 359 |
+
[86] Ping Luo, Xinjiang Wang, Wenqi Shao, and Zhanglin Peng. Towards understanding regularization in batch normalization. In International Conference on Learning Representations, 2019.
|
| 360 |
+
|
| 361 |
+
[87] Kaifeng Lyu and Jian Li. Gradient descent maximizes the margin of homogeneous neural networks. In International Conference on Learning Representations, 2020.
|
| 362 |
+
|
| 363 |
+
[88] Kaifeng Lyu, Zhiyuan Li, Runzhe Wang, and Sanjeev Arora. Gradient descent on two-layer nets: Margin maximization and simplicity bias. Advances in Neural Information Processing Systems, 34, 2021.
|
| 364 |
+
|
| 365 |
+
[89] Chao Ma and Lexing Ying. On linear stability of SGD and input-smoothness of neural networks. In A. Beygelzimer, Y. Dauphin, P. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, 2021.
|
| 366 |
+
|
| 367 |
+
[90] Chao Ma and Lexing Ying. A Riemannian mean field formulation for two-layer neural networks with batch normalization. Research in the Mathematical Sciences, 9(3):47, July 2022. ISSN 2197-9847.
|
| 368 |
+
|
| 369 |
+
[91] Chao Ma, Daniel Kunin, Lei Wu, and Lexing Ying. Beyond the quadratic approximation: The multiscale structure of neural network loss landscapes. Journal of Machine Learning, 1(3): 247–267, 2022. ISSN 2790-2048.
|
| 370 |
+
|
| 371 |
+
[92] David McAllester. Simplified PAC-Bayesian margin bounds. In Learning theory and Kernel machines, pages 203–215. Springer, 2003.
|
| 372 |
+
|
| 373 |
+
[93] Rotem Mulayoff and Tomer Michaeli. Unique properties of flat minima in deep networks. In Hal Daumé III and Aarti Singh, editors, Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 7108–7118. PMLR, 13–18 Jul 2020.
|
| 374 |
+
|
| 375 |
+
[94] Rotem Mulayoff, Tomer Michaeli, and Daniel Soudry. The implicit bias of minima stability: A view from function space. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, volume 34, pages 17749–17761. Curran Associates, Inc., 2021.
|
| 376 |
+
|
| 377 |
+
[95] Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nati Srebro. Exploring generalization in deep learning. Advances in neural information processing systems, 30, 2017.
|
| 378 |
+
|
| 379 |
+
[96] Ioannis Panageas and Georgios Piliouras. Gradient Descent Only Converges to Minimizers: Non-Isolated Critical Points and Invariant Regions. In Christos H. Papadimitriou, editor, 8th Innovations in Theoretical Computer Science Conference (ITCS 2017), volume 67 of Leibniz International Proceedings in Informatics (LIPIcs), pages 2:1–2:12, Dagstuhl, Germany, 2017. Schloss Dagstuhl–Leibniz-Zentrum fuer Informatik. ISBN 978-3-95977-029-3. doi: 10.4230/LIPIcs.ITCS.2017.2.
|
| 380 |
+
|
| 381 |
+
[97] Siyuan Qiao, Huiyu Wang, Chenxi Liu, Wei Shen, and Alan Yuille. Micro-batch training with batch-channel normalization and weight standardization. arXiv preprint arXiv:1903.10520, 2019.
|
| 382 |
+
|
| 383 |
+
[98] Prajit Ramachandran, Barret Zoph, and Quoc V Le. Searching for activation functions. arXiv preprint arXiv:1710.05941, 2017.
|
| 384 |
+
|
| 385 |
+
[99] Akshay Rangamani, Nam H. Nguyen, Abhishek Kumar, Dzung Phan, Sang Peter Chin, and Trac D. Tran. A scale invariant measure of flatness for deep network minima. In ICASSP 2021 - 2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 1680–1684, 2021.
|
| 386 |
+
|
| 387 |
+
[100] Noam Razin and Nadav Cohen. Implicit regularization in deep learning may not be explainable by norms. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 21174–21187. Curran Associates, Inc., 2020.
|
| 388 |
+
|
| 389 |
+
[101] Noam Razin, Asaf Maman, and Nadav Cohen. Implicit regularization in hierarchical tensor factorization and deep convolutional neural networks. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato, editors, Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pages 18422–18462. PMLR, 17–23 Jul 2022.
|
| 390 |
+
|
| 391 |
+
[102] Tim Salimans and Durk P Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 29. Curran Associates, Inc., 2016.
|
| 392 |
+
|
| 393 |
+
[103] Shibani Santurkar, Dimitris Tsipras, Andrew Ilyas, and Aleksander Madry. How does batch normalization help optimization? In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems 31, pages 2483–2493. Curran Associates, Inc., 2018.
|
| 394 |
+
|
| 395 |
+
[104] Alexander Shekhovtsov and Boris Flach. Stochastic normalizations as bayesian learning. In C. V. Jawahar, Hongdong Li, Greg Mori, and Konrad Schindler, editors, Computer Vision – ACCV 2018, pages 463–479, Cham, 2019. Springer International Publishing. ISBN 978-3- 030-20890-5.
|
| 396 |
+
|
| 397 |
+
[105] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In International Conference on Learning Representations, 2015.
|
| 398 |
+
|
| 399 |
+
[106] Daniel Soudry, Elad Hoffer, Mor Shpigel Nacson, Suriya Gunasekar, and Nathan Srebro. The implicit bias of gradient descent on separable data. Journal of Machine Learning Research, 19 (70):1–57, 2018.
|
| 400 |
+
|
| 401 |
+
[107] Daniel Soudry, Elad Hoffer, and Nathan Srebro. The implicit bias of gradient descent on separable data. In International Conference on Learning Representations, 2018.
|
| 402 |
+
|
| 403 |
+
[108] Dominik Stöger and Mahdi Soltanolkotabi. Small random initialization is akin to spectral learning: Optimization and generalization guarantees for overparameterized low-rank matrix reconstruction. Advances in Neural Information Processing Systems, 34, 2021.
|
| 404 |
+
|
| 405 |
+
[109] Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016.
|
| 406 |
+
|
| 407 |
+
[110] Hidenori Tanaka and Daniel Kunin. Noether’s learning dynamics: Role of symmetry breaking in neural networks. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, volume 34, pages 25646–25660. Curran Associates, Inc., 2021.
|
| 408 |
+
|
| 409 |
+
[111] Mattias Teye, Hossein Azizpour, and Kevin Smith. Bayesian uncertainty estimation for batch normalized deep networks. In Jennifer Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 4907–4916. PMLR, 10–15 Jul 2018.
|
| 410 |
+
|
| 411 |
+
[112] Yusuke Tsuzuku, Issei Sato, and Masashi Sugiyama. Normalized flat minima: Exploring scale invariant definition of flat minima for neural networks using PAC-Bayesian analysis. In Hal Daumé III and Aarti Singh, editors, Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 9636–9647. PMLR, 13–18 Jul 2020.
|
| 412 |
+
|
| 413 |
+
[113] Twan van Laarhoven. L2 regularization versus batch and weight normalization. arXiv preprint arXiv:1706.05350, 2017.
|
| 414 |
+
|
| 415 |
+
[114] Ruosi Wan, Zhanxing Zhu, Xiangyu Zhang, and Jian Sun. Spherical motion dynamics: Learning dynamics of normalized neural network using sgd and weight decay. In M. Ranzato, A. Beygelzimer, Y. Dauphin, P.S. Liang, and J. Wortman Vaughan, editors, Advances in Neural Information Processing Systems, volume 34, pages 6380–6391. Curran Associates, Inc., 2021.
|
| 416 |
+
|
| 417 |
+
[115] Yi Wang and Zhiren Wang. Three-stage evolution and fast equilibrium for SGD with nondegerate critical points. In Kamalika Chaudhuri, Stefanie Jegelka, Le Song, Csaba Szepesvari, Gang Niu, and Sivan Sabato, editors, Proceedings of the 39th International Conference on Machine Learning, volume 162 of Proceedings of Machine Learning Research, pages 23092–23113. PMLR, 17–23 Jul 2022.
|
| 418 |
+
|
| 419 |
+
[116] Yuqing Wang, Minshuo Chen, Tuo Zhao, and Molei Tao. Large learning rate tames homogeneity: Convergence and balancing effect. In International Conference on Learning Representations, 2022.
|
| 420 |
+
|
| 421 |
+
[117] Lei Wu, Zhanxing Zhu, et al. Towards understanding generalization of deep learning: Perspective of loss landscapes. arXiv preprint arXiv:1706.10239, 2017.
|
| 422 |
+
|
| 423 |
+
[118] Lei Wu, Chao Ma, and Weinan E. How sgd selects the global minima in over-parameterized learning: A dynamical stability perspective. In S. Bengio, H. Wallach, H. Larochelle, K. Grauman, N. Cesa-Bianchi, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 31. Curran Associates, Inc., 2018.
|
| 424 |
+
|
| 425 |
+
[119] Xiaoxia Wu, Edgar Dobriban, Tongzheng Ren, Shanshan Wu, Zhiyuan Li, Suriya Gunasekar, Rachel Ward, and Qiang Liu. Implicit regularization and convergence for weight normalization. In H. Larochelle, M. Ranzato, R. Hadsell, M.F. Balcan, and H. Lin, editors, Advances in Neural Information Processing Systems, volume 33, pages 2835–2847. Curran Associates, Inc., 2020.
|
| 426 |
+
|
| 427 |
+
[120] Yuxin Wu and Kaiming He. Group normalization. In Proceedings of the European Conference on Computer Vision (ECCV), September 2018.
|
| 428 |
+
|
| 429 |
+
[121] Zeke Xie, Issei Sato, and Masashi Sugiyama. A diffusion theory for deep learning dynamics: Stochastic gradient descent exponentially favors flat minima. In International Conference on Learning Representations, 2021.
|
| 430 |
+
|
| 431 |
+
[122] Greg Yang. Scaling limits of wide neural networks with weight sharing: Gaussian process behavior, gradient independence, and neural tangent kernel derivation. arXiv preprint arXiv:1902.04760, 2019.
|
| 432 |
+
|
| 433 |
+
[123] Mingyang Yi, Qi Meng, Wei Chen, Zhi-ming Ma, and Tie-Yan Liu. Positively scale-invariant flatness of ReLU neural networks. arXiv preprint arXiv:1903.02237, 2019.
|
| 434 |
+
|
| 435 |
+
[124] Mingyang Yi, Huishuai Zhang, Wei Chen, Zhi-Ming Ma, and Tie-Yan Liu. Bn-invariant sharpness regularizes the training model to better generalization. In Proceedings of the TwentyEighth International Joint Conference on Artificial Intelligence, IJCAI-19, pages 4164–4170. International Joint Conferences on Artificial Intelligence Organization, 7 2019.
|
| 436 |
+
|
| 437 |
+
[125] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In International Conference on Learning Representations, 2017.
|
| 438 |
+
|
| 439 |
+
[126] Guodong Zhang, Chaoqi Wang, Bowen Xu, and Roger Grosse. Three mechanisms of weight decay regularization. In International Conference on Learning Representations, 2019.
|
| 440 |
+
|
| 441 |
+
[127] Zhanxing Zhu, Jingfeng Wu, Bing Yu, Lei Wu, and Jinwen Ma. The anisotropic noise in stochastic gradient descent: Its behavior of escaping from sharp minima and regularization effects. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings of Machine Learning Research, pages 7654–7663. PMLR, 09–15 Jun 2019.
|
| 442 |
+
|
| 443 |
+
[128] Difan Zou, Yuan Cao, Dongruo Zhou, and Quanquan Gu. Stochastic gradient descent optimizes over-parameterized deep ReLU networks. arXiv preprint arXiv:1811.08888, 2018.
|
| 444 |
+
|
| 445 |
+
# Checklist
|
| 446 |
+
|
| 447 |
+
1. For all authors...
|
| 448 |
+
|
| 449 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 450 |
+
(b) Did you describe the limitations of your work? [Yes] See Sections 4.2.1 and 7.
|
| 451 |
+
(c) Did you discuss any potential negative societal impacts of your work? [N/A] We are basically a theoretical work studying the generalization myestery in deep learning. We do not see any negative societal impact.
|
| 452 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 453 |
+
|
| 454 |
+
2. If you are including theoretical results...
|
| 455 |
+
|
| 456 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] The assumptions of our main theorem for $\mathrm { G D + W D }$ on scale-invariant loss are stated in Section 4.2.1. For GD/PGD with Quasi-RMSprop schedulers in general, see Appendix B.3.
|
| 457 |
+
(b) Did you include complete proofs of all theoretical results? [Yes] See Appendices G and H for the proofs for our main theorems, Appendix O for the proof for the linear example.
|
| 458 |
+
|
| 459 |
+
3. If you ran experiments...
|
| 460 |
+
|
| 461 |
+
(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] See our supplementary material.
|
| 462 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Appendix Q.
|
| 463 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] Most of our experiments have only run once due to computational constraints, but we verified the sharpness-reduction bias across various settings.
|
| 464 |
+
(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Appendix Q.
|
| 465 |
+
|
| 466 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 467 |
+
|
| 468 |
+
(a) If your work uses existing assets, did you cite the creators? [N/A]
|
| 469 |
+
(b) Did you mention the license of the assets? [N/A]
|
| 470 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
|
| 471 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 472 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 473 |
+
|
| 474 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 475 |
+
|
| 476 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 477 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 478 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|