Datasets:
Upload folder using huggingface_hub (part 5)
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- md/train/4Nt1F3qf9Gn/4Nt1F3qf9Gn.md +223 -0
- md/train/4YlE2huxEsl/4YlE2huxEsl.md +411 -0
- md/train/4c0J6lwQ4_/4c0J6lwQ4_.md +317 -0
- md/train/4c1EiEvivpx/4c1EiEvivpx.md +292 -0
- md/train/4cEapqXfP30/4cEapqXfP30.md +266 -0
- md/train/4dXmpCDGNp7/4dXmpCDGNp7.md +0 -0
- md/train/4fLr7H5D_eT/4fLr7H5D_eT.md +310 -0
- md/train/4i23Bjlh4Y9/4i23Bjlh4Y9.md +561 -0
- md/train/4pf_pOo0Dt/4pf_pOo0Dt.md +425 -0
- md/train/4qR3coiNaIv/4qR3coiNaIv.md +313 -0
- md/train/5-GXHFNbq_U/5-GXHFNbq_U.md +278 -0
- md/train/519VBzfEaKW/519VBzfEaKW.md +219 -0
- md/train/52XXcK8jY0J/52XXcK8jY0J.md +206 -0
- md/train/5CGPY2VeEGb/5CGPY2VeEGb.md +297 -0
- md/train/5Dl1378QutR/5Dl1378QutR.md +403 -0
- md/train/5FRJWsiLRmA/5FRJWsiLRmA.md +416 -0
- md/train/5GihaaZKL4/5GihaaZKL4.md +394 -0
- md/train/5KWmB6JePx/5KWmB6JePx.md +357 -0
- md/train/5L8XMh667qz/5L8XMh667qz.md +392 -0
- md/train/5NA1PinlGFu/5NA1PinlGFu.md +421 -0
- md/train/5PiSFHhRe2C/5PiSFHhRe2C.md +374 -0
- md/train/5SST78xEh4A/5SST78xEh4A.md +352 -0
- md/train/5UZ-AcwFDKJ/5UZ-AcwFDKJ.md +254 -0
- md/train/5Ya8PbvpZ9/5Ya8PbvpZ9.md +314 -0
- md/train/5jRVa89sZk/5jRVa89sZk.md +288 -0
- md/train/5jaqt-Hsqir/5jaqt-Hsqir.md +447 -0
- md/train/5k8F6UU39V/5k8F6UU39V.md +376 -0
- md/train/5kTlVBkzSRx/5kTlVBkzSRx.md +202 -0
- md/train/5la5tka8a4-/5la5tka8a4-.md +551 -0
- md/train/5lhWG3Hj2By/5lhWG3Hj2By.md +0 -0
- md/train/5m3SEczOV8L/5m3SEczOV8L.md +0 -0
- md/train/5nLibPckV2N/5nLibPckV2N.md +276 -0
- md/train/5qsptDcsdEj/5qsptDcsdEj.md +356 -0
- md/train/5rm0b_fsNZ/5rm0b_fsNZ.md +278 -0
- md/train/5vShUEyjmm/5vShUEyjmm.md +389 -0
- md/train/63pC59XOZLZ/63pC59XOZLZ.md +263 -0
- md/train/66H4g_OHdnl/66H4g_OHdnl.md +0 -0
- md/train/68B1ezcffDc/68B1ezcffDc.md +343 -0
- md/train/6Ab68Ip4Mu/6Ab68Ip4Mu.md +247 -0
- md/train/6EWOVxvJ5FI/6EWOVxvJ5FI.md +462 -0
- md/train/6MaBrlQ5JM/6MaBrlQ5JM.md +384 -0
- md/train/6NFBvWlRXaG/6NFBvWlRXaG.md +0 -0
- md/train/6OoCDvFV4m/6OoCDvFV4m.md +321 -0
- md/train/6RB77-6-_oI/6RB77-6-_oI.md +242 -0
- md/train/6Tm1mposlrM/6Tm1mposlrM.md +488 -0
- md/train/6UdQLhqJyFD/6UdQLhqJyFD.md +412 -0
- md/train/6YEQUn0QICG/6YEQUn0QICG.md +578 -0
- md/train/6YL_BntJrz6/6YL_BntJrz6.md +282 -0
- md/train/6nbpPqUCIi7/6nbpPqUCIi7.md +324 -0
- md/train/6puCSjH3hwA/6puCSjH3hwA.md +524 -0
md/train/4Nt1F3qf9Gn/4Nt1F3qf9Gn.md
ADDED
|
@@ -0,0 +1,223 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# CLOCS: CONTRASTIVE LEARNING OF CARDIAC SIGNALS ACROSS SPACE, TIME, AND PATIENTS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
The healthcare industry generates troves of unlabelled physiological data. This data can be exploited via contrastive learning, a self-supervised pre-training method that encourages representations of instances to be similar to one another. We propose a family of contrastive learning methods, CLOCS, that encourages representations across space, time, and patients to be similar to one another. We show that CLOCS consistently outperforms the state-of-the-art methods, BYOL and SimCLR, when performing a linear evaluation of, and fine-tuning on, downstream tasks. We also show that CLOCS achieves strong generalization performance with only $2 5 \%$ o f labelled training data. Furthermore, our training procedure naturally generates patient-specific representations that can be used to quantify patient-similarity.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
At present, the healthcare system is unable to sufficiently leverage the large, unlabelled datasets that it generates on a daily basis. This is partially due to the dependence of deep learning algorithms on high quality labels for good generalization performance. However, arriving at such high quality labels in a clinical setting where physicians are squeezed for time and attention is increasingly difficult. To overcome such an obstacle, self-supervised techniques have emerged as promising methods. These methods exploit the unlabelled dataset to formulate pretext tasks such as predicting the rotation of images (Gidaris et al., 2018), their corresponding colourmap (Larsson et al., 2017), and the arrow of time (Wei et al., 2018). More recently, contrastive learning was introduced as a way to learn representations of instances that share some context. By capturing this high-level shared context (e.g., medical diagnosis), representations become invariant to the differences (e.g., input modalities) between the instances.
|
| 12 |
+
|
| 13 |
+
Contrastive learning can be characterized by three main components: 1) a positive and negative set of examples, 2) a set of transformation operators, and 3) a variant of the noise contrastive estimation loss. Most research in this domain has focused on curating a positive set of examples by exploiting data temporality (Oord et al., 2018), data augmentations (Chen et al., 2020), and multiple views of the same data instance (Tian et al., 2019). These methods are predominantly catered to the image-domain and central to their implementation is the notion that shared context arises from the same instance. We believe this precludes their applicability to the medical domain where physiological time-series are plentiful. Moreover, their interpretation of shared context is limited to data from a common source where that source is the individual data instance. In medicine, however, shared context can occur at a higher level, the patient level. This idea is central to our contributions and will encourage the development of representations that are patient-specific. Such representations have the potential to be used in tasks that exploit patient similarity such as disease subgroup clustering and discovery. As a result of the process, medical practitioners may receive more interpretable outputs from networks.
|
| 14 |
+
|
| 15 |
+
In this work, we leverage electrocardiogram (ECG) signals to learn patient-specific representations in a self-supervised manner via contrastive learning. To do so, we exploit the fact that ECG signals summarize both temporal and spatial information. The latter can be understood in terms of projections of the same electrical signal onto multiple axes, also known as leads.
|
| 16 |
+
|
| 17 |
+
Contributions. Our contributions are the following:
|
| 18 |
+
|
| 19 |
+
1. We propose a family of patient-specific contrastive learning methods, entitled CLOCS, that exploit both temporal and spatial information present within ECG signals.
|
| 20 |
+
|
| 21 |
+
2. We show that CLOCS outperforms state-of-the-art methods, BYOL and SimCLR, when performing a linear evaluation of, and fine-tuning on, downstream tasks involving cardiac arrhythmia classification.
|
| 22 |
+
|
| 23 |
+
# 2 RELATED WORK
|
| 24 |
+
|
| 25 |
+
Contrastive Learning. In contrastive predictive coding, Oord et al. (2018) use representations of current segments to predict those of future segments. More recently, Tian et al. (2019) propose contrastive multi-view coding where multiple views of the same image are treated as ‘shared context’. He et al. (2019); Chen et al. (2020); Grill et al. (2020) exploit the idea of instance discrimination (Wu et al., 2018) and interpret multiple views as stochastically augmented forms of the same instance. They explore the benefit of sequential data augmentations and show that cropping and colour distortions are the most important. These augmentations, however, do not trivially extend to the time-series domain. Shen et al. (2020) propose to create mixtures of images to smoothen the output distribution and thus prevent the model from being overly confident. Time Contrastive Learning (Hyvarinen & Morioka, 2016) performs contrastive learning over temporal segments in a signal and illustrate the relationship between their approach and ICA. In contrast to our work, they formulate their task as prediction of the segment index within a signal and perform limited experiments that do not exploit the noise contrastive estimation (NCE) loss. Bachman et al. (2019) Time Contrastive Networks (Sermanet et al., 2017) attempt to learn commonalities across views and differences across time. In contrast, our work focuses on identifying commonalities across both spatial and temporal components of data.
|
| 26 |
+
|
| 27 |
+
Self-Supervision for Medical Time-Series. Miotto et al. (2016) propose DeepPatient, a 3-layer stacked denoising autoencoder that attempts to learn a patient representation using electronic health record (EHR) data. Although performed on a large proprietary dataset, their approach is focused on EHRs and does not explore contrastive learning for physiological signals. Sarkar & Etemad (2020) apply existing self-supervised methods on ECG recordings in the context of affective computing. The methods implemented include defining pretext classification tasks such as temporal inversion, negation, time-warping, etc. Their work is limited to affective computing, does not explore contrastive learning, and does not exploit multi-lead data as we do. Lyu et al. (2018) explore a sequence to sequence model to learn representations from EHR data in the eICU dataset. In the process, they minimize the reconstruction error of the input time-series. Li et al. (2020) leverage the aforementioned unsupervised learning technique on a large clinical dataset, CPRD, to obtain uncertainty estimates for predictions.
|
| 28 |
+
|
| 29 |
+
# 3 BACKGROUND
|
| 30 |
+
|
| 31 |
+
# 3.1 CONTRASTIVE LEARNING
|
| 32 |
+
|
| 33 |
+
Assume the presence of a learner $f _ { \theta } : x \in \mathbb { R } ^ { D } \to h \in \mathbb { R } ^ { E }$ , parameterized by $\theta$ , which maps a $D$ -dimensional input, $x$ , to an $E$ -dimensional representation, $h$ . Further assume the presence of an unlabelled dataset, $X \in \mathbb { R } ^ { N \times D }$ , where $N$ is the total number of instances.
|
| 34 |
+
|
| 35 |
+
Each unlabelled instance, $x ^ { i } \in X$ , is exposed to a set of transformations, $T _ { A }$ and $T _ { B }$ , such that $x _ { A } ^ { i } = T _ { A } ( x ^ { i } )$ and $x _ { B } ^ { i } = T _ { B } ( x ^ { i } )$ . Such transformations can consist of two different data augmentation procedures such as random cropping and flipping. These transformed instances now belong to an augmented dataset, $X ^ { \prime } \in \mathbb { R } ^ { N \times D \times V }$ , where $V$ is equal to the number of applied transformations. In contrastive learning, representations, $h _ { A } ^ { i } = f _ { \theta } ( \hat { x _ { A } ^ { i } } )$ and $h _ { B } ^ { i } = f _ { \theta } ( x _ { B } ^ { i } )$ , are said to share context. As a result of this shared context, these representations constitute a positive pair because (a) they are derived from the same original instance, $x ^ { i }$ , and (b) the transformations applied to the original instance were class-preserving. Representations within a positive pair are encouraged to be similar to one another and dissimilar to representations of all other instances, $h _ { A } ^ { j } , h _ { B } ^ { j } \ \forall j \neq i$ . The similarity of these representations, $s ( h _ { A } ^ { i } , h _ { B } ^ { i } )$ , is quantified via a metric, $s$ , such as cosine similarity. By encouraging high similarity between representations in the positive pair, the goal is to learn representations that are invariant to different transformations of the same instance.
|
| 36 |
+
|
| 37 |
+
# 4 METHODS
|
| 38 |
+
|
| 39 |
+
# 4.1 POSITIVE AND NEGATIVE PAIRS OF REPRESENTATIONS
|
| 40 |
+
|
| 41 |
+
Representations that are derived from the same instance are typically assumed to share context. This approach, however, fails to capture commonalities present across instances. In the medical domain, for example, multiple physiological recordings from the same patient may share context. It is important to note that if the multitude of physiological recordings associated with a patient were collected over large time-scales (e.g., on the order of years) and in drastically different scenarios (e.g., at rest vs. during a stress test), then the shared context across these recordings is likely to diminish. This could be due to changing patient demographics and disease profiles. With the previous caveat in mind, we propose to leverage commonalities present in multiple physiological recordings by redefining a positive pair to refer to representations of transformed instances that belong to the same patient. We outline how to arrive at these transformed instances next.
|
| 42 |
+
|
| 43 |
+
# 4.2 TRANSFORMATION OPERATORS
|
| 44 |
+
|
| 45 |
+
When choosing the transformation operators, $T$ , that are applied to each instance, the principal desideratum is that they capture invariances in the ECG recording. Motivated by the observation that ECG recordings reflect both temporal and spatial information, we propose to exploit both temporal and spatial invariance. We provide an intuition for such invariances in Fig. 1.
|
| 46 |
+
|
| 47 |
+

|
| 48 |
+
Figure 1: ECG recordings reflect both temporal and spatial information. This is because they measure the electrical activity of the heart using different leads (views) over time. Temporal Invariance. Abrupt changes to the ECG recording are unlikely to occur on the order of seconds, and therefore adjacent segments of shorter duration will continue to share context. Spatial Invariance. Recordings from different leads (at the same time) will reflect the same cardiac function, and thus share context.
|
| 49 |
+
|
| 50 |
+
As is pertains to temporal invariance (Fig. 1 left), we assume that upon splitting an ECG recording, associated with Class 1, into several segments, each of them remain associated with Class 1. We justify this assumption based on human physiology where abrupt changes in cardiac function (on the order of seconds) are unlikely to occur. If these segments were collected years apart, for example, our assumption may no longer hold. As for spatial invariance (Fig. 1 right), we leverage the hexiaxial diagram which illustrates the location of the leads relative to the heart. We assume that temporallyaligned ECG recordings from different leads (views) are associated with the same class. This is based on the idea that multiple leads (collected at the same time) will reflect the same underlying cardiac function. Occasionally, this assumption may not hold, if, for example, a cardiac condition afflicts a specific part of the heart, making it detectable by only a few leads. We now describe how to exploit these invariances for contrastive learning.
|
| 51 |
+
|
| 52 |
+
Contrastive Multi-segment Coding (CMSC). Given an ECG recording, $x ^ { i }$ , with duration $S$ seconds, we can extract $V$ non-overlapping temporal segments, each with duration $S / V$ seconds. If $V = 2$ , for example, $x _ { t 1 } ^ { i } = T _ { t 1 } ( \stackrel { . } { x ^ { i } } )$ and $x _ { t 2 } ^ { i ^ { \star } } = T _ { t 2 } \overline { { ( x ^ { i } ) } }$ where $t$ indicates the timestamp of the temporal segment (see Fig. 1 left). We exploit temporal invariances in the ECG by defining representations of these adjacent and non-overlapping temporal segments as positive pairs.
|
| 53 |
+
|
| 54 |
+
Contrastive Multi-lead Coding (CMLC). Different projections of the same electrical signal emanating from the heart are characterized by different leads, $L$ . For example, with two leads, $L 1$ and $L 2$ , then $x _ { L 1 } ^ { i } = T _ { L 1 } ( x ^ { i } )$ and $x _ { L 2 } ^ { i } = T _ { L 2 } \mathbf { \bar { ( } } x ^ { i } )$ (see Fig. 1 right). We exploit spatial invariances in the ECG by defining temporally-aligned representations of these different projections as positive pairs.
|
| 55 |
+
|
| 56 |
+
Contrastive Multi-segment Multi-lead Coding (CMSMLC). We simultaneously exploit both temporal and spatial invariances in the ECG by defining representations of non-overlapping temporal segments and different projections as positive pairs. For example, in the presence of two temporal segments with timestamps, $t 1$ and $t 2$ , that belong to two leads, $L 1$ and $L 2$ , then $x _ { t 1 , L 1 } ^ { i } = T _ { t 1 , L 1 } \overset { \cdot } { ( x ^ { i } ) }$ and xit2,L2 $x _ { t 2 , L 2 } ^ { i } = T _ { t 2 , L 2 } ( x ^ { i } )$ .
|
| 57 |
+
|
| 58 |
+
# 4.3 PATIENT-SPECIFIC NOISE CONTRASTIVE ESTIMATION LOSS
|
| 59 |
+
|
| 60 |
+
Given our patient-centric definition of positive pairs, we propose to optimize a patient-specific noise contrastive estimation loss. More formally, Given a mini-batch of $K$ instances, we apply a pair of transformation operators and generate $2 K$ transformed instances (a subset of which is shown in Fig. 2. We encourage a pair of representations, $h _ { A } ^ { i }$ and $h _ { B } ^ { k }$ , $i , k \in P$ , from the same patient, $P$ , to be similar to one another and dissimilar to representations from other patients. We quantify this similarity using the cosine similarity, $s$ , with a temperature scaling parameter, $\tau$ , (see Eq. 4) as is performed in (Tian et al., 2019; Chen et al., 2020). We extend this to all representations in the mini-batch to form a similarity matrix of dimension $K \times K$ . In this matrix, we identify positive pairs by associating each instance with its patient ID. By design, this includes the diagonal elements and results in the loss shown in Eq. 2. If the same patient reappears within the mini-batch, then we also consider off-diagonal elements, resulting in the loss shown in Eq. 3. The frequency of these off-diagonals is inconsistent due to the random shuffling of data. We optimize the objective function in Eq. 1 for all pairwise combinations of transformation operators, $T _ { A }$ and $T _ { B }$ , where we include Eq. 2 and Eq. 3 twice to consider negative pairs in both views.
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\mathcal { L } = \mathbb { E } _ { T _ { A } , T _ { B } } \left[ \mathcal { L } _ { d i a g } ^ { h _ { A } , h _ { B } } + \mathcal { L } _ { d i a g } ^ { h _ { B } , h _ { A } } + \mathcal { L } _ { o f f - d i a g } ^ { h _ { A } , h _ { B } } + \mathcal { L } _ { o f f - d i a g } ^ { h _ { B } , h _ { A } } \right]
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\mathcal { L } _ { d i a g } ^ { h _ { A } , h _ { B } } = - \mathbb { E } _ { i \in P } \left[ \log \frac { e ^ { s ( h _ { A } ^ { i } , h _ { B } ^ { i } ) } } { \sum _ { j } e ^ { s ( h _ { A } ^ { i } , h _ { B } ^ { j } ) } } \right]
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\mathcal { L } _ { o f f - d i a g } ^ { h _ { A } , h _ { B } } = - \mathbb { E } _ { i , k \in P } \left[ \log \frac { e ^ { s ( h _ { A } ^ { i } , h _ { B } ^ { k } ) } } { \sum _ { j } e ^ { s ( h _ { A } ^ { i } , h _ { B } ^ { j } ) } } \right] \quad ( 3 ) \quad s ( h _ { A } ^ { i } , h _ { B } ^ { i } ) = \frac { f _ { \theta } ( x _ { A } ^ { i } ) \cdot f _ { \theta } ( x _ { B } ^ { i } ) } { \| f _ { \theta } ( x _ { A } ^ { i } ) \| \| f _ { \theta } ( x _ { B } ^ { i } ) \| } \frac { 1 } { \tau }
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+

|
| 75 |
+
Figure 2: Similarity matrix for a mini-batch of $K$ instances in (Left) Contrastive Multi-segment Coding, (Centre) Contrastive Multi-lead Coding, and (Right) Contrastive Multi-segment Multilead Coding. Additional matrices would be generated based on all pairs of applied transformation operators, $T _ { A }$ and $T _ { B }$ . Exemplar transformed ECG instances are illustrated along the edges. To identify positive pairs, we associate each instance with its patient ID. By design, diagonal elements (green) correspond to the same patient, contributing to Eq. 2. Similarly, instances 1 and 50 (yellow) belong to the same patient, contributing to Eq. 3. The blue area corresponds to negative examples as they pertain to instances from different patients.
|
| 76 |
+
|
| 77 |
+
# 5 EXPERIMENTAL DESIGN
|
| 78 |
+
|
| 79 |
+
# 5.1 DATASETS
|
| 80 |
+
|
| 81 |
+
We conduct our experiments using PyTorch (Paszke et al., 2019) on four ECG datasets that include cardiac arrhythmia labels. PhysioNet 2020 (Perez Alday et al., 2020) consists of 12-lead ECG recordings from 6,877 patients alongside 9 different classes of cardiac arrhythmia. Each recording can be associated with multiple labels. Chapman (Zheng et al., 2020) consists of 12-lead ECG recordings from 10,646 patients alongside 11 different classes of cardiac arrhythmia. As is suggested by Zheng et al. (2020), we group these labels into 4 major classes. PhysioNet 2017 (Clifford et al., 2017) consists of 8,528 single-lead ECG recordings alongside 4 different classes. Cardiology (Hannun et al., 2019) consists of single-lead ECG recordings from 328 patients alongside 12 different classes of cardiac arrhythmia. An in-depth description of these datasets can be found in Appendix A.1.
|
| 82 |
+
|
| 83 |
+
All datasets were split into training, validation, and test sets according to patient ID using a 60, 20, 20 configuration. In other words, patients appeared in only one of the sets. The exact number of instances used during self-supervised pre-training and supervised training can be found in Appendix A.2.
|
| 84 |
+
|
| 85 |
+
# 5.2 PRE-TRAINING IMPLEMENTATION
|
| 86 |
+
|
| 87 |
+
We conduct our pre-training experiments on the training set of two of the four datasets: PhysioNet 2020 and Chapman. We chose these datasets as they contain multi-lead data. In CMSC, we extract a pair of non-overlapping temporal segments of $S = 2 5 0 0$ samples. This is equivalent to either 10 or 5 seconds worth of ECG data from the Chapman and PhysioNet 2020 datasets, respectively. Therefore, our model is presented with a mini-batch of dimension $K \times S \times 2$ where $K$ is the batchsize, and $S$ is the number of samples. In CMLC, we explore two scenarios with a different number of leads corresponding to the same instance. Our mini-batch dimension is $K \times S \times L$ , where $L$ is the number of leads. Lastly, in CMSMLC, we incorporate an additional temporal segment in each mini-batch. Therefore, our mini-batch dimension is $K \times 2 S \times L$ . To ensure a fair comparison between all methods, we expose them to an equal number of patients and instances during training. In CMLC or CMSMLC, we either pre-train using 4 leads (II, V2, aVL, aVR) or all 12 leads. We chose these 4 leads as they cover a large range of axes.
|
| 88 |
+
|
| 89 |
+
# 5.3 EVALUATION ON DOWNSTREAM TASK
|
| 90 |
+
|
| 91 |
+
We evaluate our pre-trained methods in two scenarios. In Linear Evaluation of Representations, we are interested in evaluating the utility of the fixed feature extractor in learning representations. Therefore, the pre-trained parameters are frozen and multinomial logistic regression is performed on the downstream supervised task. In Transfer Capabilities of Representations, we are interested in evaluating the inductive bias introduced by pre-training. Therefore, the pre-trained parameters are used as an initialization for training on the downstream supervised task.
|
| 92 |
+
|
| 93 |
+
# 5.4 BASELINES
|
| 94 |
+
|
| 95 |
+
We compare our pre-training methods to networks that are initialized randomly (Random Init.), via supervised pre-training (Supervised), or via a multi-task pre-training mechanism introduced specifically for ECG signals (MT-SSL) (Sarkar & Etemad, 2020). We also compare to BYOL (Grill et al., 2020) and SimCLR (Chen et al., 2020), which encourage representations of instances and their perturbed counterparts to be similar to one another, with the aim of learning transformation-invariant representations that transfer well. As SimCLR has been shown to be highly dependent on the choice of perturbations, we explore the following time-series perturbations (see Appendix B for visualizations):
|
| 96 |
+
|
| 97 |
+
• Gaussian - we add $\epsilon \sim \mathcal { N } ( 0 , \sigma )$ to the time-series signal where we chose $\sigma$ based on the amplitude of the signal. This was motivated by the work of Han et al. (2020) who recently showed the effect of additive noise on ECG signals.
|
| 98 |
+
• Flip - we flip the time-series signal temporally $( \mathbf { F l i p } _ { Y } )$ ), reversing the arrow of time, or we invert the time-series signal along the $\mathbf { X }$ -axis $( \mathbf { F l i p } _ { X } )$ ).
|
| 99 |
+
• SpecAugment (Park et al., 2019) - we take the short-time Fourier transform of the time-series signal, generating a spectrogram. We then mask either temporal $( \mathbf { S } \mathbf { A } _ { t } )$ or spectral $( \mathbf { S } \mathbf { A } _ { f } )$ ) bins
|
| 100 |
+
|
| 101 |
+
of varying widths before converting the spectrogram to the time domain. We also explore the application of sequential perturbations to the time-series signal.
|
| 102 |
+
|
| 103 |
+
# 5.5 HYPERPARAMETERS
|
| 104 |
+
|
| 105 |
+
During self-supervised pre-training, we chose the temperature parameter, $\tau = 0 . 1$ , as per Chen et al. (2020). For BYOL, we chose the decay rate, $\tau _ { d } = 0 . 9 0$ , after experimenting with various alternatives (see Appendix F). We use the same network architecture for all experiments. Further implementation details can be found in Appendix C.
|
| 106 |
+
|
| 107 |
+
# 6 EXPERIMENTAL RESULTS
|
| 108 |
+
|
| 109 |
+
# 6.1 LINEAR EVALUATION OF REPRESENTATIONS
|
| 110 |
+
|
| 111 |
+
In this section, we evaluate the utility of the self-supervised representations learned using four leads on a downstream linear classification task. In Table 1, we show the test AUC on Chapman and PhysioNet 2020 using $50 \%$ of the labelled data $F = 0 . 5$ ) after having learned representations, with dimension $E = 1 2 8$ , using the same two datasets.
|
| 112 |
+
|
| 113 |
+
We show that CMSC outperforms BYOL and SimCLR on both datasets. On the Chapman dataset, CMSC and SimCLR achieve an $\mathrm { A U C = }$ 0.896 and 0.738, respectively, illustrating a $1 5 . 8 \%$ improvement. Such a finding implies that the representations learned by CMSC are richer and thus allow for improved generalization. We hypothesize that this is due to the setup of CMSC whereby the shared context is across segments (temporally) and patients. Moreover, we show that CLOCS (all 3 proposed methods) outperforms SimCLR in $100 \%$ of all conducted experiments, even when pre-training and evaluating with all 12 leads (see Appendix D).
|
| 114 |
+
|
| 115 |
+
Table 1: Test AUC of the linear evaluation of the representations at $\ F \ = \ 0 . 5$ , after having pre-trained on Chapman or PhysioNet 2020 with $E = 1 2 8$ . Pre-training and evaluating multi-lead datasets\* using 4 leads (II, V2, aVL, aVR). Mean and standard deviation are shown across 5 seeds.
|
| 116 |
+
|
| 117 |
+
<table><tr><td>Dataset</td><td>Chapman*</td><td>PhysioNet 2020*</td></tr><tr><td>MT-SSL</td><td>0.677 ± 0.024</td><td>0.665 ± 0.015</td></tr><tr><td>BYOL</td><td>0.643 ± 0.043</td><td>0.595 ± 0.018</td></tr><tr><td>SimCLR</td><td>0.738 ±0.034</td><td>0.615 ± 0.014</td></tr><tr><td>CMSC</td><td>0.896 ±0.005</td><td>0.715 ± 0.033</td></tr><tr><td>CMLC</td><td>0.870 ± 0.022</td><td>0.596 ±0.008</td></tr><tr><td>CMSMLC</td><td>0.847 ± 0.024</td><td>0.680 ±0.008</td></tr></table>
|
| 118 |
+
|
| 119 |
+
# 6.2 EFFECT OF PERTURBATIONS ON PERFORMANCE
|
| 120 |
+
|
| 121 |
+
So far, we have presented CLOCS without having incorporated any perturbations during pre-training. However, contrastive learning methods, and in particular SimCLR, are notorious for their overdependence on the choice of perturbations. To explore this dependence, we apply a diverse set of stochastic perturbations, $P$ , (see Appendix B) during pre-training and observe its effect on generalization performance. We follow the setup introduced by Chen et al. (2020) and apply either a single perturbation to each instance, $x ^ { i }$ , whereby $x _ { 1 } ^ { i } = { \dot { P } } _ { 1 } ( x ^ { i } )$ , or sequential perturbations whereby $\mathsf { \bar { x } } _ { 1 , 2 } ^ { i } = P _ { 2 } ( P _ { 1 } ( x ^ { i } ) )$ .
|
| 122 |
+
|
| 123 |
+
We apply such perturbations while pre-training with SimCLR or CMSC on PhysioNet 2020 using 4 leads and, in Fig. 3, illustrate the test AUC in the linear evaluation scenario. We show that, regardless of the type and number of perturbations, CMSC continues to outperform SimCLR. For example, the worst-performing CMSC implementation $( { \mathrm { F l i p } } _ { Y } )$ ) results in an $\mathrm { A U C } = 0 . 6 6 1$ which is still greater than the best-performing SimCLR implementation (Gaussian $ \mathbf { S } \mathbf { A } _ { t } .$ ) with an $\mathrm { A U C } = 0 . 6 3 6$ . In fact, we find that pre-training with CMSC without applying any perturbations (see Table 1) still outperforms the best-performing SimCLR implementation. Such a finding suggests that CMSC’s already strong performance is more likely to stem from its redefinition of the ‘shared context’ to include both time and patients than from the choice of perturbations.
|
| 124 |
+
|
| 125 |
+
# 6.3 TRANSFER CAPABILITIES OF REPRESENTATIONS
|
| 126 |
+
|
| 127 |
+
In this section, we evaluate the utility of initializing a network for a downstream task with parameters learned via self-supervision using four leads. In Table 2, we show the test AUC on downstream datasets at $F = 0 . 5$ for the various self-supervised methods with $E = 1 2 8$ .
|
| 128 |
+
|
| 129 |
+

|
| 130 |
+
Figure 3: Effect of single (blue) and sequential (green) perturbations applied to the (top) SimCLR and (bottom) CMSC implementations on linear evaluation. Sequential perturbations involve a Gaussian perturbation followed by one of the remaining four types. Pre-training and evaluation was performed on PhysioNet 2020 using 4 leads. Evaluation was performed at $F = 0 . 5$ and results are averaged across 5 seeds. We show that CMSC outperforms SimCLR regardless of the applied perturbation.
|
| 131 |
+
|
| 132 |
+
We show that, with a few exceptions, self-supervision is advantageous relative to a Random Initialization. This can be seen by the higher AUC achieved by the former relative to the latter. We also show that, depending on the downstream dataset, either CMSC or CMSMLC outperform BYOL and SimCLR. For example, when pre-training on Chapman and fine-tuning on Cardiology, CMSMLC achieves an $\mathrm { A U C } = 0 . 7 1 7$ , a $4 . 1 \%$ improvement compared to SimCLR. This implies that by encouraging representations across space, time, and patients to be similar to one another, networks are nudged into a favourable parameter space. In Appendix E.1, we extend these findings and illustrate that CLOCS outperforms SimCLR in at least $7 5 \%$ of all experiments conducted, on average. When pre-training, fine-tuning, and evaluating using all 12 leads, we show that CMSC outperforms all other methods in at least $9 0 \%$ of all experiments conducted (see Appendix E.2).
|
| 133 |
+
|
| 134 |
+
Table 2: Test AUC in the fine-tuning scenario at $F = 0 . 5$ , after having pre-trained on Chapman or PhysioNet 2020 with $E = 1 2 8$ . Pre-training, fine-tuning, and evaluating multi-lead datasets\* using 4 leads. Mean and standard deviation are shown across 5 seeds.
|
| 135 |
+
|
| 136 |
+
<table><tr><td>Pretraining Dataset</td><td colspan="3">Chapman*</td><td colspan="3">PhysioNet 2020*</td></tr><tr><td>Downstream Dataset</td><td>Cardiology</td><td>PhysioNet 2017</td><td>PhysioNet 2020*</td><td>Cardiology</td><td>PhysioNet 2017</td><td>Chapman*</td></tr><tr><td>Random Init.</td><td>0.678 ± 0.011</td><td>0.763 ±0.005</td><td>0.803 ± 0.008</td><td>0.678 ± 0.011</td><td>0.763 ± 0.005</td><td>0.907 ± 0.006</td></tr><tr><td>Supervised</td><td>0.684 ± 0.015</td><td>0.799 ± 0.008</td><td>0.827 ± 0.001</td><td>0.730 ± 0.002</td><td>0.810 ± 0.009</td><td>0.954 ± 0.003</td></tr><tr><td colspan="7">Self-supervised Pre-training</td></tr><tr><td>MT-SSL</td><td>0.650 ± 0.009</td><td>0.741 ± 0.012</td><td>0.774 ± 0.010</td><td>0.661± 0.011</td><td>0.746 ± 0.016</td><td>0.923 ± 0.007</td></tr><tr><td>BYOL</td><td>0.678 ± 0.021</td><td>0.748 ± 0.014</td><td>0.802 ± 0.013</td><td>0.674 ± 0.022</td><td>0.757 ± 0.010</td><td>0.916 ± 0.009</td></tr><tr><td>SimCLR</td><td>0.676 ± 0.011</td><td>0.772 ± 0.010</td><td>0.823 ± 0.011</td><td>0.658 ± 0.027</td><td>0.762 ± 0.009</td><td>0.923 ± 0.010</td></tr><tr><td>CMSC</td><td>0.695 ± 0.024</td><td>0.773 ± 0.013</td><td>0.830 ± 0.002</td><td>0.714 ± 0.014</td><td>0.760 ± 0.013</td><td>0.932 ± 0.008</td></tr><tr><td>CMLC</td><td>0.665 ± 0.016</td><td>0.767 ± 0.013</td><td>0.810 ± 0.011</td><td>0.675 ± 0.013</td><td>0.762 ± 0.007</td><td>0.910 ± 0.012</td></tr><tr><td>CMSMLC</td><td>0.717 ± 0.006</td><td>0.774 ± 0.004</td><td>0.814 ± 0.009</td><td>0.698 ± 0.011</td><td>0.774 ± 0.012</td><td>0.930 ± 0.012</td></tr></table>
|
| 137 |
+
|
| 138 |
+
# 6.4 DOING MORE WITH LESS LABELLED DATA
|
| 139 |
+
|
| 140 |
+
Having established that self-supervision can nudge networks to a favourable parameter space, we set out to investigate whether such a space can lead to strong generalization with less labelled data in the downstream task. In Fig. 4, we illustrate the validation AUC of networks initialized randomly or via CMSC and fine-tuned on two different datasets.
|
| 141 |
+
|
| 142 |
+
We find that fine-tuning a network based on a CMSC initialization drastically improves data-efficiency. In Fig. 4a, we show that a network initialized with CMSC and exposed to only $2 5 \%$ of the labelled data outperforms one that is initialized randomly and exposed to $1 \bar { 0 } 0 \%$ of the labelled data. This can be seen by the consistently higher AUC during, and at the end of, training. A similar outcome can be seen in Fig. 4b. This suggests that self-supervised pre-training exploits data efficiently such that it can do more with less on downstream classification tasks.
|
| 143 |
+
|
| 144 |
+

|
| 145 |
+
Figure 4: Validation AUC of a network initialized randomly or via CMSC and which is exposed to different amounts of labelled training data, $F$ . Results are averaged across 5 seeds. Shaded area represents one standard deviation.
|
| 146 |
+
|
| 147 |
+
# 6.5 EFFECT OF EMBEDDING DIMENSION, $E$ , AND AVAILABILITY OF LABELLED DATA, $F$
|
| 148 |
+
|
| 149 |
+
The dimension of the representation learned during self-supervision and the availability of labelled training data can both have an effect on model performance. In this section, we investigate these claims. In Figs. 5a and 5b, we illustrate the test AUC for all pre-training methods as a function of $E = ( 3 2 , 6 4 , 1 2 8 , 2 5 6 )$ and $F = ( 0 . 2 5 , 0 . 5 0 , 0 . 7 5 , 1 )$ .
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
Figure 5: Effect of (a) embedding dimension, $E$ , and (b) labelled fraction, $F$ , on the test AUC when pre-training on Chapman and fine-tuning on Cardiology. Results are averaged across 5 seeds. Error bars represent one standard deviation.
|
| 153 |
+
|
| 154 |
+
In Fig. 5a, we show that networks initialized randomly or via SimCLR are not significantly affected by the embedding dimension. This can be seen by the $\mathrm { A U C } \approx 0 . 6 3$ and $\approx 0 . 6 5$ , for these two methods across all values of $E$ . In contrast, the embedding dimension has a greater effect on CMSC where $\mathrm { A U C } \approx 0 . 6 6 0 . 6 9$ as $E = 3 2 1 2 8$ . This implies that CMSC is still capable of achieving strong generalization performance despite the presence of few labelled data $F = 0 . 2 5 )$ . We hypothesize that the strong performance of CMSC, particularly at $E = 1 2 8$ , is driven by its learning of patient-specific representations (see Appendix G) that cluster tightly around one another, a positive characteristic especially when such representations map to the same downstream class.
|
| 155 |
+
|
| 156 |
+
In Fig. 5b, we show that increasing the amount of labelled training data benefits the generalization performance of all methods. This can be seen by the increasing AUC values as $F = 0 . 2 5 1$ . We also show that at all fraction values, CMSMLC outperforms its counterparts. For example, at $F = 1$ , CMSMLC achieves an $\mathrm { A U C } = 0 . 7 3 2$ whereas SimCLR achieves an $\mathrm { A U C } = 0 . 7 1 8$ . Such superiority still holds at $F = 0 . 2 5$ where the two methods achieve an $\mathrm { A U C } = 0 . 6 7 5$ and 0.652, respectively. This outcome emphasizes the robustness of CMSMLC to scarce labelled training data.
|
| 157 |
+
|
| 158 |
+
# 6.6 CLOCS LEARNS PATIENT-SPECIFIC REPRESENTATIONS
|
| 159 |
+
|
| 160 |
+
We redefined ‘shared context’ to refer to representations from the same patient, which in turn should produce patient-specific representations. To validate this hypothesis, we calculate the pairwise Euclidean distance between representations of the same patient (Intra-Patient) and those of different patients (Inter-Patient). On average, the former should be smaller than the latter. In Fig. 6, we illustrate the two distributions associated with the intra and inter-patient distances at $E = 1 2 8$ . We also find that increasing the embedding dimension shifts these distributions to higher values (see Fig 9).
|
| 161 |
+
|
| 162 |
+
We show that these two distributions have large mean values and overlap significantly when implementing SimCLR, as seen in Fig. 6a. This is expected as SimCLR is blind to the notion of a patient. In contrast, when implementing CMSC, the intra-patient distances are lower than those found in SimCLR, as seen in Fig. 6b. Moreover, the intra and inter-patient distributions are more separable. This implies that pre-training with CMSC leads to patient-specific representations. We note that this phenomenon takes place while concomitantly learning better representations, as observed in previous sections.
|
| 163 |
+
|
| 164 |
+

|
| 165 |
+
Figure 6: Distribution of pairwise Euclidean distance between representations $E = 1 2 8$ ) belonging to the same patient (Intra-Patient) and those belonging to different patients (Inter-Patient). Selfsupervision was performed on PhysioNet 2020. Notice the lower average intra-patient distance and improved separability between the two distributions with CMSC than with SimCLR.
|
| 166 |
+
|
| 167 |
+
# 7 DISCUSSION AND FUTURE WORK
|
| 168 |
+
|
| 169 |
+
In this paper, we proposed a family of self-supervised pre-training mechanisms, entitled CLOCS, based on contrastive learning for physiological signals. In the process, we encourage representations across segments (temporally) and leads (spatially) that correspond to instances from the same patient to be similar to one another. We show that our methods outperform the state-of-the-art methods, BYOL and SimCLR, when performing a linear evaluation of, and fine-tuning on, downstream tasks. This conclusion also holds when applying a range of perturbations and when pre-training and evaluating with a different number of leads. We now elucidate several avenues worth exploring.
|
| 170 |
+
|
| 171 |
+
Quantifying patient similarity. We have managed to learn patient-specific representations. These representations can be used to quantify patient-similarity in order to assist with diagnosis or gain a better understanding of a diseased condition. Validation of these representations can be performed by comparing known similar patients.
|
| 172 |
+
|
| 173 |
+
Multi-modal transfer. We transferred parameters from one task to another that shared the same input modality, the ECG. Such data may not always be available for self-supervision. An interesting path would be to explore whether contrastive self-supervision on one modality can transfer well to another modality.
|
| 174 |
+
|
| 175 |
+
# REFERENCES
|
| 176 |
+
|
| 177 |
+
Philip Bachman, R Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. In Advances in Neural Information Processing Systems, pp. 15509–15519, 2019.
|
| 178 |
+
|
| 179 |
+
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv preprint arXiv:2002.05709, 2020.
|
| 180 |
+
|
| 181 |
+
Gari D Clifford, Chengyu Liu, Benjamin Moody, H Lehman Li-wei, Ikaro Silva, Qiao Li, AE Johnson, and Roger G Mark. Af classification from a short single lead ECG recording: the physionet/computing in cardiology challenge 2017. In 2017 Computing in Cardiology, pp. 1–4, 2017.
|
| 182 |
+
|
| 183 |
+
Spyros Gidaris, Praveer Singh, and Nikos Komodakis. Unsupervised representation learning by predicting image rotations. arXiv preprint arXiv:1803.07728, 2018.
|
| 184 |
+
|
| 185 |
+
Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre H Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Avila Pires, Zhaohan Daniel Guo, Mohammad Gheshlaghi Azar, et al. Bootstrap your own latent: A new approach to self-supervised learning. arXiv preprint arXiv:2006.07733, 2020.
|
| 186 |
+
|
| 187 |
+
Xintian Han, Yuxuan Hu, Luca Foschini, Larry Chinitz, Lior Jankelson, and Rajesh Ranganath. Deep learning models for electrocardiograms are susceptible to adversarial attack. Nature Medicine, pp. 1–4, 2020.
|
| 188 |
+
|
| 189 |
+
Awni Y Hannun, Pranav Rajpurkar, Masoumeh Haghpanahi, Geoffrey H Tison, Codie Bourn, Mintu P Turakhia, and Andrew Y Ng. Cardiologist-level arrhythmia detection and classification in ambulatory electrocardiograms using a deep neural network. Nature Medicine, 25(1):65, 2019.
|
| 190 |
+
|
| 191 |
+
Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. arXiv preprint arXiv:1911.05722, 2019.
|
| 192 |
+
|
| 193 |
+
Aapo Hyvarinen and Hiroshi Morioka. Unsupervised feature extraction by time-contrastive learning and nonlinear ica. In Advances in Neural Information Processing Systems, pp. 3765–3773, 2016.
|
| 194 |
+
|
| 195 |
+
Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Colorization as a proxy task for visual understanding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 6874–6883, 2017.
|
| 196 |
+
|
| 197 |
+
Yikuan Li, Shishir Rao, Abdelaali Hassaine, Rema Ramakrishnan, Yajie Zhu, Dexter Canoy, Gholamreza Salimi-Khorshidi, Thomas Lukasiewicz, and Kazem Rahimi. Deep bayesian gaussian processes for uncertainty estimation in electronic health records. arXiv preprint arXiv:2003.10170, 2020.
|
| 198 |
+
|
| 199 |
+
Xinrui Lyu, Matthias Hueser, Stephanie L Hyland, George Zerveas, and Gunnar Rätsch. Improving clinical predictions through unsupervised time series representation learning. arXiv preprint arXiv:1812.00490, 2018.
|
| 200 |
+
|
| 201 |
+
Riccardo Miotto, Li Li, Brian A Kidd, and Joel T Dudley. Deep patient: an unsupervised representation to predict the future of patients from the electronic health records. Scientific Reports, 6(1): 1–10, 2016.
|
| 202 |
+
|
| 203 |
+
Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
|
| 204 |
+
|
| 205 |
+
Daniel S Park, William Chan, Yu Zhang, Chung-Cheng Chiu, Barret Zoph, Ekin D Cubuk, and Quoc V Le. Specaugment: A simple data augmentation method for automatic speech recognition. arXiv preprint arXiv:1904.08779, 2019.
|
| 206 |
+
|
| 207 |
+
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. In Advances in Neural Information Processing Systems, pp. 8024–8035, 2019.
|
| 208 |
+
|
| 209 |
+
E. A. Perez Alday, A. Gu, A. Shah, C. Liu, A. Sharma, S. Seyedi, A. Bahrami Rad, M. Reyna, and G. Clifford. Classification of 12-lead ECGs: the PhysioNet - computing in cardiology challenge 2020 (version 1.0.1). PhysioNet, 2020.
|
| 210 |
+
|
| 211 |
+
Pritam Sarkar and Ali Etemad. Self-supervised ecg representation learning for emotion recognition. arXiv preprint arXiv:2002.03898, 2020.
|
| 212 |
+
|
| 213 |
+
Pierre Sermanet, Corey Lynch, Jasmine Hsu, and Sergey Levine. Time-contrastive networks: Selfsupervised learning from multi-view observation. In 2017 IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), pp. 486–487. IEEE, 2017.
|
| 214 |
+
|
| 215 |
+
Zhiqiang Shen, Zechun Liu, Zhuang Liu, Marios Savvides, and Trevor Darrell. Rethinking image mixture for unsupervised visual representation learning. arXiv preprint arXiv:2003.05438, 2020.
|
| 216 |
+
|
| 217 |
+
Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. arXiv preprint arXiv:1906.05849, 2019.
|
| 218 |
+
|
| 219 |
+
Donglai Wei, Joseph J Lim, Andrew Zisserman, and William T Freeman. Learning and using the arrow of time. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 8052–8060, 2018.
|
| 220 |
+
|
| 221 |
+
Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via nonparametric instance discrimination. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3733–3742, 2018.
|
| 222 |
+
|
| 223 |
+
Jianwei Zheng, Jianming Zhang, Sidy Danioko, Hai Yao, Hangyuan Guo, and Cyril Rakovski. A 12-lead electrocardiogram database for arrhythmia research covering more than 10,000 patients. Scientific Data, 7(1):1–8, 2020.
|
md/train/4YlE2huxEsl/4YlE2huxEsl.md
ADDED
|
@@ -0,0 +1,411 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Beltrami Flow and Neural Diffusion on Graphs
|
| 2 |
+
|
| 3 |
+
James Rowbottom∗ Twitter Inc.
|
| 4 |
+
|
| 5 |
+
Benjamin P. Chamberlain∗ Twitter Inc. bchamberlain@twitter.com
|
| 6 |
+
|
| 7 |
+
Davide Eynard Twitter Inc.
|
| 8 |
+
|
| 9 |
+
rancesco Di Giovann Twitter Inc.
|
| 10 |
+
|
| 11 |
+
Xiaowen Dong University of Oxford
|
| 12 |
+
|
| 13 |
+
Michael M. Bronstein Twitter Inc. and Imperial College London
|
| 14 |
+
|
| 15 |
+
# Abstract
|
| 16 |
+
|
| 17 |
+
We propose a novel class of graph neural networks based on the discretised Beltrami flow, a non-Euclidean diffusion PDE. In our model, node features are supplemented with positional encodings derived from the graph topology and jointly evolved by the Beltrami flow, producing simultaneously continuous feature learning and topology evolution. The resulting model generalises many popular graph neural networks and achieves state-of-the-art results on several benchmarks.
|
| 18 |
+
|
| 19 |
+
# 1 Introduction
|
| 20 |
+
|
| 21 |
+
The majority of graph neural networks (GNNs) are based on the message passing paradigm [30], wherein node features are learned by means of a non-linear propagation on the graph. Multiple recent works have pointed to the limitations of the message passing approach. These include; limited expressive power [80, 95, 9, 7], the related oversmoothing problem [60, 62] and the bottleneck phenomena [1, 93], which render such approaches inefficient, especially in deep GNNs. Multiple alternatives have been proposed, among which are higher-order methods [54, 7] and decoupling the propagation and input graphs by modifying the topology, often referred to as graph rewiring. Topological modifications can take different forms such as graph sampling [32], kNN [43], using the complete graph [86, 1], latent graph learning [89, 36], or multi-hop filters [92, 73]. However, there is no agreement in the literature on when and how to modify the graph, and a single principled framework for doing so.
|
| 22 |
+
|
| 23 |
+
A somewhat underappreciated fact is that GNNs are intimately related to diffusion equations [16], a connection that was exploited in the early work of Scarselli et al. [76]. Diffusion PDEs have been historically important in computer graphics [83, 11, 51, 64], computer vision [13, 18, 6], and image processing [65, 82, 90, 85, 26, 12], where they created an entire trend of variational and PDE-based approaches. In machine learning and data science, diffusion equations underpin such popular manifold learning methods as eigenmaps [5] and diffusion maps [20], as well as the family of PageRank algorithms [63, 14]. In deep learning, differential equations are used as models of neural networks [16, 19, 25, 94, 71, 98] and for physics-informed learning [72, 22, 75, 21, 81, 47].
|
| 24 |
+
|
| 25 |
+
Main contributions In this paper, we propose a novel class of GNNs based on the discretised non-Euclidean diffusion PDE in joint positional and feature space, inspired by the Beltrami flow [82] used two decades ago in the image processing literature for edge-preserving image denoising. We show that the discretisation of the spatial component of the Beltrami flow offers a principled view on positional encoding and graph rewiring, whereas the discretisation of the temporal component can replace GNN layers with more flexible adaptive numerical schemes. Based on this model, we introduce Beltrami Neural Diffusion (BLEND) that generalises a broad range of GNN architectures and shows state-of-the-art performance on many popular benchmarks. In a broader perspective, our approach explores new tools from PDEs and differential geometry that are less well known in the graph ML community.
|
| 26 |
+
|
| 27 |
+
# 2 Background
|
| 28 |
+
|
| 29 |
+
Beltrami flow Kimmel et al. [40, 82, 39] considered images as 2-manifolds (parametric surfaces) $( \Sigma , g )$ embedded in some larger ambient space as $\mathbf { z } ( \mathbf { u } ) \overset { } { = } ( \mathbf { u } , \alpha \mathbf { x } ( \mathbf { u } ) ) \ \subseteq \ \mathbb { R } ^ { { \hat { d } } + 2 }$ where $\alpha \geq 0$ is a scaling factor, $\mathbf { u } = ( u _ { 1 } , u _ { 2 } )$ are the 2D positional coordinates of the pixels, and $\mathbf { x }$ are the $d$ - dimensional colour or feature coordinates (with $d = 1$ or 3 for grayscale or RGB images, or $d = k ^ { 2 }$ when using $k \times k$ patches as features [12]). In these works, the image is evolved along the gradient flow of a functional $S [ \mathbf { z } , g ]$ called the Polyakov action $I 6 8 J$ , which roughly measures the smoothness of the embedding1. For images embedded in Euclidean space with the functional $S$ minimised with respect to both the embedding $\mathbf { z }$ and the metric $g$ , one obtains the following PDE:
|
| 30 |
+
|
| 31 |
+
$$
|
| 32 |
+
\frac { \partial \mathbf { z } ( \mathbf { u } , t ) } { \partial t } = \Delta _ { \mathbf { G } } \mathbf { z } ( \mathbf { u } , t ) , \qquad \mathbf { z } ( \mathbf { u } , 0 ) = \mathbf { z } ( \mathbf { u } ) , \quad t \geq 0 ,
|
| 33 |
+
$$
|
| 34 |
+
|
| 35 |
+
and boundary conditions as appropriate. Here $\Delta _ { \mathbf { G } }$ is the Laplace-Beltrami operator, the Laplacian operator induced on $\Sigma$ by the Euclidean space we embed the image into. Namely, the embedding of the manifold allows us to pull-back the Euclidean distance structure on the image: the distance between two nearby points $\mathbf { u }$ and $\mathbf { u } + \mathrm { d } \mathbf { u }$ is given by
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
\mathrm { d } \ell ^ { 2 } = \mathrm { d } \mathbf { u } ^ { \top } \mathbf { G } ( \mathbf { u } ) \mathrm { d } \mathbf { u } = \mathrm { d } u _ { 1 } ^ { 2 } + \mathrm { d } u _ { 2 } ^ { 2 } + \alpha ^ { 2 } \sum _ { i = 1 } ^ { d } \mathrm { d } x _ { i } ^ { 2 } ,
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
where $\mathbf { G } = \mathbf { I } + \alpha ^ { 2 } ( \nabla _ { \mathbf { u } } \mathbf { x } ( \mathbf { u } ) ) ^ { \top } \nabla _ { \mathbf { u } } \mathbf { x } ( \mathbf { u } )$ is a $2 \times 2$ matrix called the Riemannian metric. The fact that the distance is a combination of the positional component (distance between pixels in the plane, $\| \mathbf { u } - \mathbf { u } ^ { \prime } \| )$ and the colour component (distance between the colours of the pixels, $\| \mathbf { \bar { x } } ( \mathbf { u } ) - \mathbf { x } ( \mathbf { u } ^ { \bar { \prime } } ) \| )$ is crucial as it allows edge-preserving image diffusion.
|
| 42 |
+
|
| 43 |
+
When dealing with images, the evolution of the first two components of $( z _ { 1 } , z _ { 2 } ) = \mathbf { u }$ is a nuisance amounting to the reparametrisation of the manifold and can be ignored. For grayscale images (the case when $d = 1$ and ${ \bf z } = ( u _ { 1 } , u _ { 2 } , x ) )$ , this is done by projection along the dimension $z _ { 3 }$ , in which case the Beltrami flow takes the form of an inhomogeneous diffusion equation of $x$ ,
|
| 44 |
+
|
| 45 |
+
$$
|
| 46 |
+
\frac { \partial x ( \mathbf { u } , t ) } { \partial t } = \frac { 1 } { \sqrt { \operatorname* { d e t } \mathbf { G } ( \mathbf { u } , t ) } } \mathrm { d i v } \left( \frac { \nabla x ( \mathbf { u } , t ) } { \sqrt { \operatorname* { d e t } \mathbf { G } ( \mathbf { u } , t ) } } \right) \qquad t \geq 0 .
|
| 47 |
+
$$
|
| 48 |
+
|
| 49 |
+
The diffusivity
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
a = \frac { 1 } { \sqrt { \mathrm { d e t } \mathbf { G } } } = \frac { 1 } { \sqrt { 1 + \alpha ^ { 2 } \| \nabla x \| ^ { 2 } } }
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
determining the speed of diffusion at each point, can be interpreted as an edge indicator: diffusion is weak across edges where $\| \nabla x \| \gg 1$ . The result is an adaptive diffusion [65] popular in image processing due to its ability to denoise images while preserving their edges. For cases with $d > 1$ (multiple colour channels), equation (3) is applied to each channel separately; however, the metric $\mathbf { G }$ couples the channels, which results in their gradients becoming aligned [38].
|
| 56 |
+
|
| 57 |
+
Special cases In the limit case $\alpha = 0$ , equation (3) becomes the simple homogeneous isotropic diffusion ∂∂t x = div(∇x) = ∆x, where ∆ = $\begin{array} { r } { \Delta = \frac { \partial ^ { 2 } } { \partial u _ { 1 } ^ { 2 } } + \frac { \partial ^ { 2 } } { \partial u _ { 2 } ^ { 2 } } } \end{array}$ is the standard Euclidean Laplacian operator. The solution is given in closed form as the convolution of the initial image and a Gaussian kernel with time-dependent variance,
|
| 58 |
+
|
| 59 |
+

|
| 60 |
+
Figure 1: Two interpretations of the Beltrami flow: position-dependent bilateral kernel (top) and a Gaussian passed on the manifold (bottom).
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
x ( { \mathbf { u } } , t ) = x ( { \mathbf { u } } , 0 ) \star \frac { 1 } { ( 4 \pi t ) ^ { d / 2 } } e ^ { - \| { \mathbf { u } } \| ^ { 2 } / 4 t }
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
and can be considered a simple linear low-pass filtering. In the limit $t \to \infty$ , the image becomes constant and equal to the average colour.2
|
| 67 |
+
|
| 68 |
+
Another interpretation of the Beltrami flow is passing a Gaussian on the manifold (see Figure 1, bottom), which can locally be expressed as non-linear filtering with the bilateral kernel [85] dependent on the joint positional and colour distance (Figure 1, top),
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
x ( \mathbf { u } , t ) = \frac { 1 } { ( 4 \pi t ) ^ { d / 2 } } \int _ { \mathbb { R } ^ { 2 } } x ( \mathbf { v } , 0 ) e ^ { - \| \mathbf { u } - \mathbf { v } \| ^ { 2 } / 4 t } e ^ { - \alpha ^ { 2 } \| \mathbf { x } ( \mathbf { u } , \mathbf { 0 } ) - \mathbf { x } ( \mathbf { v } , \mathbf { 0 } ) \| ^ { 2 } / 4 t } \mathrm { d } \mathbf { v } .
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
For $\alpha = 0$ , the bilateral filter (6) reduces to a simple convolution with a time-dependent Gaussian.
|
| 75 |
+
|
| 76 |
+
# 3 Discrete Beltrami flow on graphs
|
| 77 |
+
|
| 78 |
+
We now develop the analogy of Beltrami flow for graphs. We consider a graph to be a discretisation of a continuous structure (manifold), and show that the evolution of the feature coordinates in time amounts to message passing layers in GNNs, whereas the evolution of the positional coordinates amounts to graph rewiring, which is used in some GNN architectures.
|
| 79 |
+
|
| 80 |
+
# 3.1 Graph Beltrami flow
|
| 81 |
+
|
| 82 |
+
Let ${ \mathcal { G } } = ( \gamma = \{ 1 , \ldots , n \} , \mathcal { E } )$ be an undirected graph, where $\nu$ and $\mathcal { E }$ denote node and edge sets, respectively. We further assume node-wise $d .$ -dimensional features $\mathbf { x } _ { i } \in \mathbb { R } ^ { d }$ for $i = 1 , \ldots , n$ . Denote by $\mathbf { z } _ { i } = ( \mathbf { u } _ { i } , \alpha \mathbf { x } _ { i } )$ the embedding of the graph in a joint space $\mathcal { C } \times \mathbb { R } ^ { d }$ , where $\mathcal { C }$ is a $d ^ { \prime }$ -dimensional space with a metric $d _ { \mathcal { C } }$ representing the node coordinates (for simplicity, we will assume $\mathcal { C } = \mathbb { R } ^ { d ^ { \prime } }$ unless otherwise stated). We refer to $\mathbf { u } _ { i } \mathbf { x } _ { i }$ and $\mathbf { z } _ { i }$ as the positional, feature and joint coordinates of node $i$ , respectively, and arrange them into the matrices U, $\mathbf { X }$ , and $\mathbf { Z }$ , of sizes $n \times d ^ { \prime } , n \times d$ , and $n \times ( d ^ { \prime } + d )$ .
|
| 83 |
+
|
| 84 |
+
For images, Beltrami flow amounts to evolving the embedding $\mathbf { z }$ along $\mathrm { d i v } ( a ( \mathbf { z } ) \nabla \mathbf { z } )$ , with $a$ a diffusivity map.3 Thus, we consider the graph Beltrami flow to be the discrete diffusion equation
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\frac { \partial \mathbf z _ { i } ( t ) } { \partial t } = \sum _ { j : ( i , j ) \in \mathcal E ^ { \prime } } a ( \mathbf z _ { i } ( t ) , \mathbf z _ { j } ( t ) ) ( \mathbf z _ { j } ( t ) - \mathbf z _ { i } ( t ) ) \qquad \mathbf z _ { i } ( 0 ) = \mathbf z _ { i } ; \quad i = 1 , \ldots , n ; \quad t \geq 0 .
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
We motivate our definition as follows: $\mathbf { g } _ { i j } = \mathbf { z } _ { j } - \mathbf { z } _ { i }$ and $\begin{array} { r } { \mathbf { d } _ { i } = \sum _ { j : ( i , j ) \in \mathcal { E } } \mathbf { g } _ { i j } } \end{array}$ are the discrete analogies of the gradient $\nabla \mathbf { z }$ and divergence $\mathrm { d i v } ( \mathbf { g } )$ , both with respect to a graph $( \mathcal { V } , \mathcal { E } ^ { \prime } )$ that can be interpreted as the numerical stencil for the discretisation of the continuous Laplace-Beltrami operator in (3). Note that $\mathcal { E } ^ { \prime }$ can be different from the input $\mathcal { E }$ (referred to as ‘rewiring’). As discussed in Section 3.3, most GNNs use $\mathcal { E } ^ { \prime } = \mathcal { E }$ (input graph is used for diffusion, no rewiring). Alternatively, the positional coordinates of the nodes can be used to define a new graph topology either with $\mathcal { E } ( \bar { \mathbf { U } } ) = \{ ( i , j ) : d _ { \mathcal { C } } ( \mathbf { u } _ { i } , \mathbf { u } _ { j } ) < r \}$ , for some radius $r > 0$ , or using $k$ nearest neighbours. This new rewiring is precomputed using the input positional coordinates (i.e., $\mathcal { E } ^ { \prime } = \mathcal { E } ( \mathbf { U } ( 0 ) ) )$ or updated throughout the diffusion (i.e., $\mathcal { E } ^ { \prime } ( t \bar { ) } = \mathcal { E } ( \bar { \mathbf { U } } ( t \bar { ) } ) )$ . Therefore, (7) can be compactly rewritten as
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\frac { \partial { \bf z } _ { i } ( t ) } { \partial t } = \mathrm { d i v } \left( a ( { \bf z } ( t ) ) \nabla { \bf z } _ { i } ( t ) \right) .
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
The function $a$ is the diffusivity controlling the diffusion strength between nodes $i$ and $j$ and is assumed to be normalised: $\begin{array} { r } { \sum _ { j : ( i , j ) \in \mathcal { E } ^ { \prime } } a ( \mathbf { z } _ { i } , \mathbf { z } _ { j } ) \ : = \ : 1 } \end{array}$ . The dependence of the diffusivity on the
|
| 97 |
+
|
| 98 |
+
embedding $\mathbf { z }$ matches the smooth PDE analysed in e.g. [82, Section 4.2] and is consistent with the form of attention mechanism used in e.g. [88, 86]. In matrix-form, we can also rewrite (7) as
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\begin{array} { r l } & { \left( \frac { \partial } { \partial t } \mathbf { U } ( t ) , \frac { \partial } { \partial t } \mathbf { X } ( t ) \right) = \left( \mathbf { A } ( \mathbf { U } ( t ) , \mathbf { X } ( t ) ) - \mathbf { I } \right) \left( \mathbf { U } ( t ) , \mathbf { X } ( t ) \right) } \\ & { \qquad \mathbf { U } ( 0 ) = \mathbf { U } ; \ \mathbf { X } ( 0 ) = \alpha \mathbf { X } ; \ t \geq 0 , } \end{array}
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
where we emphasise the evolution of both the positional and feature components, coupled through the matrix-valued function A
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
a _ { i j } ( t ) = \left\{ \begin{array} { l l } { a ( ( \mathbf { u } _ { i } ( t ) , \mathbf { x } _ { i } ( t ) ) , ( \mathbf { u } _ { j } ( t ) , \mathbf { x } _ { j } ( t ) ) ) } & { ( i , j ) \in \mathcal { E } ( \mathbf { U } ( t ) ) } \\ { 0 } & { \mathrm { e l s e } . } \end{array} \right.
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
representing the diffusivity. The graph Beltrami flow produces an evolution of the joint positional and feature coordinates, ${ \bf Z } ( t ) = ( { \bf U } ( t ) , { \bf X } ( t ) )$ . In Section 3.3 we will show how the evolution of the feature coordinates $\mathbf X ( t )$ results in feature diffusion or message passing on the graph, the core of GNNs. As noted in Section 2, in the smooth case the Beltrami flow is obtained as gradient flow of an energy functional when minimised with respect to both the embedding and the metric on the surface (an image). When the embedding takes values in the Euclidean space, this leads to equations of the form (3) with no channel-mixing and an exact form of the diffusivity determined by the pull-back $\mathbf { G }$ of the Euclidean metric. To further motivate our approach, it is tempting to investigate whether a similar conclusion can be attained here. Although in the discrete case the operation of pull-back is not well-defined, we are able to derive that the gradient flow of a modified graph Dirichlet energy gives rise to an equation of the form (7). We note though that the gradient flow does not recover the exact form of the diffusivity implemented in this paper. This is not a limitation of the theory and should be expected: by requiring the gradient flow to avoid channel-mixing and imitate the image analogy in [82] and by inducing a discrete pull-back condition, we are imposing constraints on the problem. We leave the theoretical implications for future work and refer to the Supplementary Materials for a more thorough discussion, including definitions and proofs.
|
| 111 |
+
|
| 112 |
+
Theorem 1. Under structural assumptions on the diffusivity, graph Beltrami flow (7) is the gradient flow of the discrete Polyakov functional.
|
| 113 |
+
|
| 114 |
+
# 3.2 Numerical solvers
|
| 115 |
+
|
| 116 |
+
Explicit vs implicit schemes Equation (7) is solved numerically, which in the simplest case is done by replacing the continuous time derivative $\frac { \partial } { \partial t }$ with forward time difference:
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\frac { \mathbf { z } _ { i } ^ { ( k + 1 ) } - \mathbf { z } _ { i } ^ { ( k ) } } { \tau } = \sum _ { j : ( i , j ) \in \mathcal { E } ( \mathbf { U } ^ { ( k ) } ) } a \left( \mathbf { z } _ { i } ^ { ( k ) } , \mathbf { z } _ { j } ^ { ( k ) } \right) ( \mathbf { z } _ { j } ^ { ( k ) } - \mathbf { z } _ { i } ^ { ( k ) } ) .
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
Here $k$ denotes the discrete time index (iteration) and $\tau$ is the time step (discretisation parameter). Rewriting (9) compactly in matrix-vector form with $\tau = 1$ leads to the explicit Euler scheme:
|
| 123 |
+
|
| 124 |
+
$$
|
| 125 |
+
\begin{array} { r } { { \bf Z } ^ { ( k + 1 ) } = ( { \bf A } ^ { ( k ) } - { \bf I } ) { \bf Z } ^ { ( k ) } = { \bf Q } ^ { ( k ) } { \bf Z } ^ { ( k ) } , } \end{array}
|
| 126 |
+
$$
|
| 127 |
+
|
| 128 |
+
where a(k)ij $a _ { i j } ^ { ( k ) } = a ( \mathbf { z } _ { i } ^ { ( k ) } , \mathbf { z } _ { j } ^ { ( k ) } )$ and the matrix $\mathbf { Q } ^ { ( k ) }$ (diffusion operator) is given by
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
q _ { i j } ^ { ( k ) } = \left\{ \begin{array} { l l } { 1 - \tau \sum _ { l : ( i , l ) \in \mathcal { E } } a _ { i l } ^ { ( k ) } } & { i = j } \\ { \tau a _ { i j } ^ { ( k ) } } & { ( i , j ) \in \mathcal { E } ( \mathbf { U } ^ { ( k ) } ) } \\ { 0 } & { \mathrm { o t h e r w i s e } } \end{array} \right.
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
The solution to the diffusion equation is computed by applying scheme (10) multiple times in sequence, starting from some initial $\mathbf { Z } ^ { ( 0 ) }$ . It is ‘explicit’ because the update $\mathbf { Z } ^ { ( k + 1 ) }$ is done directly by the application of the diffusion operator $\mathbf { Q } ^ { ( k ) }$ on $\mathbf { Z } ^ { ( k ) }$ (as opposed to implicit schemes of the form $\dot { \mathbf { Z } } ^ { ( k ) } = \dot { \mathbf { Q } } ^ { ( k ) } \mathbf { Z } ^ { ( k + 1 ) }$ arising from backward time differences that require inversion of the diffusion operator [91]).
|
| 135 |
+
|
| 136 |
+
Multi-step and adaptive schemes Higher-order approximation of temporal derivatives amount to using intermediate fractional steps, which are then linearly combined. Runge-Kutta (RK) [74, 44], ubiquitously used in numerical analysis, is a classical family of explicit numerical schemes, including Euler as a particular case. The Dormand-Prince (DOPRI) [24] is an RK method based on fifth and fourth-order approximations, the difference between which is used as an error estimate guiding the time step size [78].
|
| 137 |
+
|
| 138 |
+
Adaptive spatial discretisation and rewiring Many numerical PDE solvers also employ adaptive spatial discretisation. The choice of the stencil (mesh) for spatial derivatives is done based on the character of the solution at these points; in the simulation of phenomena such as shock waves it is often desired to use denser sampling in the respective regions of the domain, which can change in time. A class of techniques for adaptive rewiring of the spatial derivatives are known as Moving Mesh (MM) methods [33]. Interpreting the graph $\mathcal { E } ^ { \prime }$ in (7) as the numerical stencil for the discretisation of the continuous Laplace-Beltrami operator in (3), we can regard rewiring as a form of MM.
|
| 139 |
+
|
| 140 |
+
# 3.3 Relation to graph neural networks
|
| 141 |
+
|
| 142 |
+
Equation (9) has the structure of many GNN architectures of the ‘attentional’ type [10], where the discrete time index $k$ corresponds to a (convolutional or attentional) layer of the GNN and multiple diffusion iterations amount to a deep GNN. In the diffusion formalism, the time parameter $t$ acts as a continuous analogy of the layers, in the spirit of neural differential equations [19]. Typical GNNs amount to explicit single-step (Euler) discretisation schemes, whereas our continuous interpretation can exploit more efficient numerical schemes.
|
| 143 |
+
|
| 144 |
+
GNNs as instances of graph Beltrami flow The graph Beltrami framework leads to a family of graph neural networks that generalise many popular architectures (see Table 1). For example, GAT [88] can be obtained as a particular setting of our framework where the input graph is fixed $\mathbf { \mathcal { E } ^ { \prime } } = \mathbf { \mathcal { E } }$ ) and only the feature coordinates $\mathbf { X }$ are evolved. Equation (10) in this case becomes
|
| 145 |
+
|
| 146 |
+
$$
|
| 147 |
+
\mathbf { x } _ { i } ^ { ( k + 1 ) } = \mathbf { x } _ { i } ^ { ( k ) } + \tau \sum _ { j : ( i , j ) \in \mathcal { E } } a \left( \mathbf { x } _ { i } ^ { ( k ) } , \mathbf { x } _ { j } ^ { ( k ) } \right) ( \mathbf { x } _ { j } ^ { ( k ) } - \mathbf { x } _ { i } ^ { ( k ) } )
|
| 148 |
+
$$
|
| 149 |
+
|
| 150 |
+
and corresponds to the update formula of GAT with a residual connection and the assumption of no non-linearity between the layers. The role of the diffusivity is played by a learnable parametric attention function, which is generally time-dependent: $a ( \mathbf { z } _ { i } ^ { ( \bar { k } ) } , \bar { \mathbf { z } _ { j } ^ { ( k ) } } , k )$ . This results in separate attention parameters per layer $k$ , which can be learned independently. Our intentionally simplistic choice of a time-independent attention function amounts to parameter sharing across layers. We will show in Section 5.1 that this leads to a smaller model that is less likely to overfit.
|
| 151 |
+
|
| 152 |
+
Another popular architecture MoNet [57] uses linear diffusion of the features with weights dependent on the structure of the graph expressed as ‘pseudo-coordinates’, which can be cast as attention of the form $a ( \mathbf { u } _ { i } , \mathbf { u } _ { j } )$ . Transformers [87] can be interpreted as feature diffusion on a fixed complete graph with $\mathcal { E } ^ { \prime } = \mathcal { V } \times \mathcal { V }$ [10]. Positional encoding (used in Transformers as well as in several recent GNN architectures [9, 27]) amounts to attention dependent on both $\mathbf { X }$ and U, which allows the diffusion to adapt to the local structure of the graph; importantly, the positional coordinates U are precomputed. Similarly, DeepSets [97] and PointNet [70] architectures can be interpreted as GNNs applied on a graph with no edges ${ \mathcal { E } } ^ { \prime } = \emptyset$ ), where each node is treated independently of the others [10]. DIGL [43] performs graph rewiring as a pre-processing step using personalised page rank as positional coordinates, which are then fixed and not evolved. In the point cloud methods, DGCNN [89] and DGM [36], the graph is constructed based on the feature coordinates X and rewired adaptively (in our notation, $\bar { \mathcal { E } ^ { \prime } = \mathcal { E } ( \mathbf { X } ( t ) ) } )$ ).
|
| 153 |
+
|
| 154 |
+
<table><tr><td>Method</td><td>Evolution</td><td>Diffusivity</td><td>Graph (V,ε')</td><td>Discretisation</td></tr><tr><td>ChebNet</td><td>Features X</td><td>Fixed aij</td><td>Fixed ε</td><td>Explicit fixed step</td></tr><tr><td>GAT</td><td>Features X</td><td>a(xi,Xj)</td><td>Fixedε</td><td>Explicit fixed step</td></tr><tr><td>MoNet</td><td>Features X</td><td>a(ui,uj)</td><td>Fixed ε</td><td>Explicit fixed step</td></tr><tr><td>Transformer</td><td>Features X</td><td>a(u,xi),(uj,Xj))</td><td>Fixedε=V×V</td><td>Explicit fixed step</td></tr><tr><td>DeepSet/PointNet</td><td>Features X</td><td>a(xi)</td><td>Fixedε=0</td><td>Explicit fixed step</td></tr><tr><td>DIGL*</td><td>Features X</td><td>a(xi,xj)</td><td>Fixed ε(U)</td><td>Explicit fixed step</td></tr><tr><td>DGCNN/DGM*</td><td>Features X</td><td>a(xi,xj)</td><td>Adaptive ε(X)</td><td>Explicit fixed step</td></tr><tr><td>Beltrami</td><td>Positions U +Features X</td><td>a((u,xi),(uj,xj))</td><td>Adaptive ε(U)</td><td>Explicit adaptive step / Implicit</td></tr></table>
|
| 155 |
+
|
| 156 |
+
Table 1: GNN architectures interpreted as particular instances of our framework. ∗Attentional variant.
|
| 157 |
+
|
| 158 |
+
Graph rewiring Multiple authors have recently argued in favor of decoupling the input graph from the graph used for diffusion. Such rewiring can take the form of graph sampling [32] to address scalability issues, data denoising [43], removal of information bottlenecks [1], or larger multi-hop filters [73]. The graph construction can also be made differentiable and a task-specific rewiring can be learned [89, 36]. The statement of Klicpera et al. [43] that ‘diffusion improves graph learning’, leading to the eponymous paradigm (DIGL), can be understood as a form of diffusion on the graph connectivity independent of the features. Specifically, the authors used as node positional encoding the Personalised PageRank (PPR), which can be interpreted as the steady-state of a diffusion process
|
| 159 |
+
|
| 160 |
+
$$
|
| 161 |
+
\mathbf { U } _ { \mathrm { P P R } } = \sum _ { k \geq 0 } ( 1 - \beta ) \beta ^ { k } \underline { { \mathbf { A } } } _ { \mathrm { R W } } ^ { k } = ( 1 - \beta ) ( \mathbf { I } - \beta \underline { { \mathbf { A } } } _ { \mathrm { R W } } ) ^ { - 1 } , \quad 0 < \beta < 1 ,
|
| 162 |
+
$$
|
| 163 |
+
|
| 164 |
+
where $\Delta _ { \mathrm { R W } }$ is the random walk graph Laplacian and $\beta \in ( 0 , 1 )$ is a parameter such that $1 - \beta$ represents the restart probability. The resulting positional encoding of dimension $d = n$ can be used to rewire the graph by $k \mathbf { N N }$ sampling, which corresponds to using $\mathcal { E } ^ { \prime } = \mathcal { E } ( \mathbf { U } _ { \mathrm { P P R } } )$ in our framework.
|
| 165 |
+
|
| 166 |
+
Numerical schemes All the aforementioned GNN architectures can be seen as an explicit discretisation of equation (7) with fixed step size. On the other hand, our continuous diffusion framework offers an additional advantage of employing more efficient numerical schemes with adaptive step size. Graph rewiring of the form $\mathcal { E } ^ { \prime } \overset { = } { = } \mathcal { \bar { E } } ( \mathbf { U } ( t ) )$ can be interpreted as adaptive spatial discretisation (moving mesh method).
|
| 167 |
+
|
| 168 |
+
# 3.4 Extensions
|
| 169 |
+
|
| 170 |
+
Non-Euclidean geometry There are multiple theoretical and empirical arguments [52, 17] in favor of using hyperbolic spaces to represent real-life ‘small-world’ graphs (in particular, scale-free networks can be obtained as $k \mathbf { N N }$ graphs in such spaces [8]). Our framework allows using a non-Euclidean metric $d _ { \mathcal { C } }$ for the positional coordinates U (Figure 2). In Section 5 we show that hyperbolic positional encodings allow for a significant reduction in model size with only a marginal degradation of performance.
|
| 171 |
+
|
| 172 |
+
Time-dependent diffusivity The diffusivity function $a$ which we assumed time-independent and which lead to parameter sharing across layers (i.e., updates of the form $\mathbf { \tilde { Z } } ^ { ( k + 1 ) } = \mathbf { Q } ( \mathbf { Z } ^ { ( k ) } , \pmb { \theta } ) \mathbf { Z } ^ { ( k ) } )$ can be made time-dependent of the form $\mathbf { Z } ^ { ( k + 1 ) } = \mathbf { Q } ( \mathbf { Z } ^ { ( k ) } , \pmb { \theta } ^ { ( k ) } ) \mathbf { Z } ^ { ( k ) }$ , where $\pmb { \theta }$ and $\pmb \theta ^ { ( k ) }$ denote shared and layer-dependent parameters, respectively.
|
| 173 |
+
|
| 174 |
+

|
| 175 |
+
Figure 2: Graph Beltrami flow with hyperbolic positional coordinates.
|
| 176 |
+
|
| 177 |
+
Onsager diffusion As we noted, the Beltrami flow diffuses each channel separately. A more general variant of diffusion allowing for feature mixing is the Onsager diffusion [61] of the form $\begin{array} { r } { \dot { \frac { \partial } { \partial t } } \mathbf { Z } ( t ) = \mathbf { Q } ( \mathbf { Z } ( t ) ) \mathbf { Z } ( t ) \mathbf { W } ( t ) } \end{array}$ , where the matrix-valued function W acts across the channels. GCN [42] can be regarded a particular setting thereof, with update of the form .
|
| 178 |
+
|
| 179 |
+
MPNNs Finally, we note that the Beltrami flow amounts to linear aggregation with non-linear coefficients, or the ‘attentional’ flavor of GNNs [10]. The more general message passing flavor [30] is possible using a generic non-linear equation of the form $\begin{array} { r } { \frac { \partial } { \partial t } \mathbf { Z } ( t ) = \Psi ( \mathbf { Z } ( t ) ) } \end{array}$ .
|
| 180 |
+
|
| 181 |
+
# 4 BLEND: Beltrami Neural Diffusion
|
| 182 |
+
|
| 183 |
+
Beltrami Neural Diffusion (BLEND) is a novel class of graph neural network architectures derived from the graph Beltrami framework. We assume an input graph $\mathcal { G } = ( \nu , \mathcal { E } )$ with $n$ nodes and $d$ -dimensional node-wise features represented as a matrix $\mathbf { X } _ { \mathrm { i n } }$ . We further assume a $d ^ { \prime }$ -dimensional positional encoding $\mathbf { U } _ { \mathrm { i n } }$ of the graph nodes. BLEND architectures implement a learnable joint diffusion process of $\mathbf { U }$ and $\mathbf { X }$ and runs it for time $T$ , to produce an output node embeddings $\mathbf { Y }$ ,
|
| 184 |
+
|
| 185 |
+
$$
|
| 186 |
+
\mathbf { Z } ( 0 ) = \left( \phi ( \mathbf { U } _ { \mathrm { i n } } ) , \psi ( \mathbf { X } _ { \mathrm { i n } } ) \right) \qquad \mathbf { Z } ( T ) = \mathbf { Z } ( 0 ) + \int _ { 0 } ^ { T } \frac { \partial \mathbf { Z } ( t ) } { \partial t } \mathrm { d } t \qquad \mathbf { Y } = \xi ( \mathbf { Z } ( T ) ) ,
|
| 187 |
+
$$
|
| 188 |
+
|
| 189 |
+
where $\phi , \psi$ are learnable positional and feature encoders and $\xi$ is a learnable decoder (possibly changing the output dimensions). Here the $\alpha$ in Equations (2) and (8) is absorbed by $\psi$ and made learnable. $\frac { \partial \mathbf { Z } ( t ) } { \partial t }$ is given by the graph Beltrami flow equation (8), where the diffusivity function (attention) $a$ is also learnable. The choice of attention function depends on the geometry of the positional encoding and for Euclidean encodings we find the scaled dot product attention [86] performs well, in which case
|
| 190 |
+
|
| 191 |
+
$$
|
| 192 |
+
a ( \mathbf { z } _ { i } , \mathbf { z } _ { j } ) = \mathrm { s o f t m a x } \left( \frac { ( \mathbf { W } _ { K } \mathbf { z } _ { i } ) ^ { \top } \mathbf { W } _ { Q } \mathbf { z } _ { j } } { d _ { k } } \right)
|
| 193 |
+
$$
|
| 194 |
+
|
| 195 |
+
where $\mathbf { W } _ { K }$ and $\mathbf { W } _ { Q }$ are learned matrices, and $d _ { k }$ is a hyperparameter.
|
| 196 |
+
|
| 197 |
+
# 5 Experimental results
|
| 198 |
+
|
| 199 |
+
In this section, we compare the proposed Beltrami framework to popular GNN architectures on standard node classification benchmarks and provide a detailed study of the choice of the positional encoding space. Additional experiments and implementation details, including runtimes and hyperparameter tuning are given in the Supplementary Materials. The code is available at https://github.com/twitter-research/graph-neural-pde.
|
| 200 |
+
|
| 201 |
+
Datasets In our experiments, we use the following datasets: Cora [56], Citeseer [77], Pubmed [58], CoauthorCS [79], Amazon, Computer, and Photo [55], and OGB-arxiv [35]. Since many works using the first three datasets rely on the Planetoid splits [96], we included them Table 2, together with a more robust evaluation on 100 random splits with 20 random initialisations [79].
|
| 202 |
+
|
| 203 |
+
Baselines We compare to the following GNN architectures: GCN [42], GAT [88], MoNet [57] and GraphSAGE [32], and recent ODE-based GNN models: CGNN [94], GDE [67], GODE [98], and two versions of LanczosNet [49]. We use two variants of our method: using fixed input graph (BLEND) and using $k \mathbf { N N }$ graph in the positional coordinates (BLEND-knn).
|
| 204 |
+
|
| 205 |
+
# 5.1 Node Classification
|
| 206 |
+
|
| 207 |
+
In these experiments, we followed the methodology of [79] using 20 random weight initialisations for datasets with fixed Planetoid splits and 100 random splits otherwise. Where available, results from [79] are reported. Hyperparameters with the highest validation accuracy were chosen and results are reported on a test set that is used only once. Hyperparameter search used Ray Tune [50] with a thousand random trials using an asynchronous hyperband scheduler with a grace period and half life of ten epochs. The code to reproduce our results is included with the submission and will be released publicly fol
|
| 208 |
+
|
| 209 |
+
Table 2: Performance (test accuracy $\pm$ std) of different GNN models using Planetoid splits.
|
| 210 |
+
|
| 211 |
+
<table><tr><td>Method</td><td>CORA</td><td>CiteSeer</td><td>PubMed</td></tr><tr><td>GCN</td><td>81.9±0.8</td><td>69.5±0.9</td><td>79.0±0.5</td></tr><tr><td>GAT</td><td>82.8±0.5</td><td>71.0±0.6</td><td>77.0±1.3</td></tr><tr><td>MoNet</td><td>82.2±0.7</td><td>70.0±0.6</td><td>77.7±0.6</td></tr><tr><td>GS-maxpool</td><td>77.4±1.0</td><td>67.0±1.0</td><td>76.6±0.8</td></tr><tr><td>Lanczos</td><td>79.5±1.8</td><td>66.2±1.9</td><td>78.3±0.3</td></tr><tr><td>AdaLanczos</td><td>80.4±1.1</td><td>68.7±1.0</td><td>78.1±0.4</td></tr><tr><td>CGNN</td><td>81.7±0.7</td><td>68.1±1.2</td><td>80.2±0.3</td></tr><tr><td>GDE</td><td>83.8±0.5</td><td>72.5±0.5</td><td>79.9±0.3</td></tr><tr><td>GODE</td><td>83.3±0.3</td><td>72.4±0.6</td><td>80.1±0.3</td></tr><tr><td>BLEND</td><td>84.2±0.6</td><td>74.4±0.7</td><td>80.7± 0.7</td></tr><tr><td>BLEND-kNN</td><td>83.1±0.8</td><td>73.3±0.9</td><td>81.5±0.5</td></tr></table>
|
| 212 |
+
|
| 213 |
+
lowing the review process. Experiments ran on AWS p2.8xlarge machines, each with 8 Tesla V100-SXM2 GPUs.
|
| 214 |
+
|
| 215 |
+
Implementation details For all datasets excepting ogb-arxiv, adaptive explicit Dormand-Prince scheme was used as the numerical solver; for ogb-arxiv, we used the Runge-Kutta method. For the two smallest datasets (Cora and Citeseer) we performed direct backpropagation through each step of the numerical integrator. For the larger datasets, to reduce memory complexity, we use Pontryagin’s maximum principle to propagate gradients backwards in time [69]. For the larger datasets, kinetic energy and Jacobian regularisation [28, 37] was employed. The regularisation ensures the learned dynamics is well-conditioned and easily solvable by a numeric solver, which reduced training time. We use constant initialisation for the attention weights, ${ \mathbf W } _ { K } , { \mathbf W } _ { Q }$ , so training starts from a well-conditioned system that induces small regularisation penalty terms [28].
|
| 216 |
+
|
| 217 |
+
The space complexity of BLEND is dominated by evaluating attention (13) over edges and is $\mathcal { O } ( \vert \mathcal { E } ^ { \prime } \vert ( d + d ^ { \prime } ) )$ where $\mathcal { E } ^ { \prime }$ is the edge set following rewiring and $d$ is dimension of features and $d ^ { \prime }$ is the dimension of positional encoding. The runtime complexity is $\mathcal { O } ( | \mathcal { E } ^ { \prime } | ( d + d ^ { \prime } ) ) ( E _ { b } + E _ { f } )$ , split
|
| 218 |
+
|
| 219 |
+
<table><tr><td>Method</td><td>CORA</td><td>CiteSeer</td><td>PubMed</td><td>Coauthor CS</td><td>Computer</td><td>Photo</td><td>ogb-arxiv</td></tr><tr><td>GCN</td><td>81.5±1.3</td><td>71.9 ±1.9</td><td>77.8±2.9</td><td>91.1±0.5</td><td>82.6±2.4</td><td>91.2±1.2</td><td>71.74±0.29</td></tr><tr><td>GAT</td><td>81.8±1.3</td><td>71.4±1.9</td><td>78.7±2.3</td><td>90.5±0.6</td><td>78.0±19</td><td>85.7±20</td><td>73.01±0.19*</td></tr><tr><td>GAT-ppr</td><td>81.6±0.3</td><td>68.5±0.2</td><td>76.7±0.3</td><td>91.3±0.1</td><td>85.4±0.3</td><td>90.9±0.3</td><td>一</td></tr><tr><td>MoNet</td><td>81.3±1.3</td><td>71.2±2.0</td><td>78.6±2.3</td><td>90.8±0.6</td><td>83.5±2.2</td><td>91.2±2.3</td><td></td></tr><tr><td>GS-mean</td><td>79.2±7.7</td><td>71.6±1.9</td><td>77.4±2.2</td><td>91.3±2.8</td><td>82.4±1.8</td><td>91.4±1.3</td><td>71.49±0.27</td></tr><tr><td>GS-maxpool</td><td>76.6±1.9</td><td>67.5±2.3</td><td>76.1±2.3</td><td>85.0±1.1</td><td></td><td>90.4±1.3</td><td></td></tr><tr><td>CGNN</td><td>81.4±1.6</td><td>66.9±1.8</td><td>66.6±4.4</td><td>92.3±0.2</td><td>80.3±2.0</td><td>91.4±1.5</td><td>58.70±2.50</td></tr><tr><td>GDE</td><td>78.7±2.2</td><td>71.8±1.1</td><td>73.9±3.7</td><td>91.6±0.1</td><td>82.9±0.6</td><td>92.4±2.0</td><td>56.66±10.9</td></tr><tr><td>BLEND</td><td>84.8±0.9</td><td>75.9±1.3</td><td>79.5±1.4</td><td>92.9±0.2</td><td>86.9±0.6</td><td>92.9±0.6</td><td>72.56±0.1 +</td></tr><tr><td>BLEND-kNN</td><td>82.5±0.9</td><td>73.4±0.5</td><td>80.9±0.7</td><td>92.3±0.1</td><td>86.7±0.6</td><td>93.5±0.3</td><td></td></tr></table>
|
| 220 |
+
|
| 221 |
+
Table 3: Performance (test accuracy±std) of different GNN models using random splits. $^ { * } \mathrm { O G B }$ GAT reference has 1.5M parameters vs ours $7 0 \mathrm { K . \dagger }$ BLEND-kNN pre-processes the graph using the DIGL methodology [43] (Section 3.3), which constructs an n-dimensional representation of each node (an n-by-n matrix), then sparsifies into a kNN graph. The ogb-arxiv dataset has ${ > } 1 5 0 \mathrm { K }$ nodes and goes OOM. This is not a limitation of BLEND, but that of DIGL. Other forms of initial rewiring are possible, but we chose to compare with DIGL (arguably the most popular graph rewiring) and so this result is missing
|
| 222 |
+
|
| 223 |
+
between the forward and backward pass and can be dominated by either depending on the number of function evaluations $( E _ { b } , E _ { f } )$ .
|
| 224 |
+
|
| 225 |
+
Tables 2–3 summarise the results of our experiments. BLEND outperforms other GNNs in most of the experiments, showing state-of-the-art results on some datasets. Another important point to note is that compared GNNs use different sets of parameters per layer, whereas in BLEND, due to our choice of a time-independent attention, parameters are shared. This results in significantly fewer parameters: for comparison, the OGB versions of GCN, SAGE and GAT used in the ogb-arxiv experiment require 143K, 219K and 1.63M parameters respectively, compared to only 70K in BLEND.
|
| 226 |
+
|
| 227 |
+
# 5.2 Positional encoding
|
| 228 |
+
|
| 229 |
+
In the second experiment, we investigated the impact of the positional encodings and vary the dimensionality and underlying geometry, in order to showcase the flexibility of our framework.
|
| 230 |
+
|
| 231 |
+
Figure 3 shows that for all datasets BLEND is superior to a Euclidean model where positional encodings are not used, which corresponds to $Z \ = \ X$ (BLEND w/o positional in Figure 3) and a version of GAT where attention is over a concatenation of the same positional encodings used in BLEND and the features. The only exception is
|
| 232 |
+
|
| 233 |
+

|
| 234 |
+
Figure 3: An ablation study showing BLEND with and without positional encodings as well as GAT, the most similar conventional GNN with positional encodings added
|
| 235 |
+
|
| 236 |
+
CoathorCS, where the performance without positional encodings is unchanged.
|
| 237 |
+
|
| 238 |
+
We experimented with three forms of positional encoding: DIGL PPR embeddings of dimension $n$ [43], DeepWalk embeddings [66] of dimensions 16–256, and hyperbolic embeddings in the Poincare ball [15, 59] of dimension 2–16. Positional encodings are calculated as a preprocessing step and input as the U coordinates to BLEND. We calculated DeepWalk node embeddings using PyTorch Geometric’s Node2Vec implementation with parameters $p = 1$ , $q = 1$ , context size 20, and 16 walks per node. We trained with walk length ranging between 40 and 120 and took the embeddings with the highest accuracy for the link prediction task. Shallow hyperbolic embeddings were generated using the HGCN [17] implementation with the default parameters provided by the authors.
|
| 239 |
+
|
| 240 |
+
Figure 4 (left) compares the performance of the best model using DIGL $n$ -dimensional positional encodings against the best performing $d$ -dimensional hyperbolic positional encodings with $d$ tuned over the range 2-16. The average performance with DIGL positional encodings is 85.48, compared to 85.28 for hyperbolic encodings. Only in one case the DIGL encodings outperform the best hyperbolic encodings. Figure 4 (right) show the change in performance with the dimension $d ^ { \prime }$ of the positional encoding using a fixed hyperparameter configuration. As expected, we observe monotonic increase in performance as function of $d ^ { \prime }$ . Importantly most of the performance is captured by either 16 dimensional hyperbolic or positional encodings, with a small additional margin gained for going up to $d ^ { \prime } = n$ , which is impractical for larger graphs.
|
| 241 |
+
|
| 242 |
+

|
| 243 |
+
Figure 4: Left: performance comparison between Euclidean and hyperbolic positional embeddings. Right: results of positional embeddings ablation. Hyperbolic or Euclidean embeddings with $d ^ { \prime } = \bar { 1 } 6$ allow to obtain performances comparable to euclidean embeddings with $d ^ { \prime } = n > > 1 6$ .
|
| 244 |
+
|
| 245 |
+
# 5.3 Additional ablations
|
| 246 |
+
|
| 247 |
+
In addition to studying the affect of positional encodings , we performed ablation studies on the step size used in the integrator as well as different forms of attention.
|
| 248 |
+
|
| 249 |
+
In Figure 5 we studied the affect of changing the step size of the integrator using the explicit Euler method with a fixed terminal time set to be the optimal terminal time. The left hand side of the figure shows the performance using the adaptive stepsize Dopri5 for comparison. Dopri5 gives the most consistent performance and is best if three of the six datasets. Details of additional attention functions and their relative performance can be found in the Supplementary Material.
|
| 250 |
+
|
| 251 |
+

|
| 252 |
+
Figure 5: step size against accurcy for explicit Euler compared to the adaptive dopri5.
|
| 253 |
+
|
| 254 |
+
# 6 Related work
|
| 255 |
+
|
| 256 |
+
Image processing, computer vision, and graphics. Following the Perona-Malik scheme [65], PDE-based approaches flourished in the 1990s with multiple versions of anisotropic [90] and nonEuclidean [82] diffusion used primarily for image denoising. The realisation of these ideas in the form of nonlinear filters [85, 12] was adopted in the industry. PDE-based methods were also used for low-level vision tasks including inpainting [6] and image segmentation [13, 18]. In computer graphics, fundamental solutions (‘heat kernels’) of diffusion equations were used as shape descriptors [83]. The closed-form expression of such solutions using the Laplace-Beltrami operator served as inspiration for some of the early approaches for GNNs [34, 23, 42, 45].
|
| 257 |
+
|
| 258 |
+
Neural differential equations The interpretation of neural networks as discretised differential equations (‘neural ODEs’) [19] was an influential recent result with multiple follow-up works [25, 28, 53, 46]. In deep learning on graphs, this mindset has been applied to GNN architectures [2, 67] and continuous message passing [94]. Continuous GNNs were also explored in [31] who, similarly to [76], addressed the solutions of fixed point equations. Ordinary Differential Equations
|
| 259 |
+
|
| 260 |
+
on Graph Networks (GODE)[98] approach the problem using the technique of invertible ResNets.
|
| 261 |
+
Finally, [75] used graph-based ODEs to generate physics simulations.
|
| 262 |
+
|
| 263 |
+
Physics-inspired learning Solving PDEs with deep learning has been explored by [72]. Neural networks appeared in [47] to accelerate PDE solvers with applications in the physical sciences. These have been applied to problems where the PDE can be described on a graph [48]. [4] consider the problem of predicting fluid flow and use a PDE inside a GNN. These approaches differ from ours in that they solve a given PDE, whereas we use the notion of discretising PDEs as a principle to understand and design GNNs.
|
| 264 |
+
|
| 265 |
+
Neural ODEs on graphs The most similar work to this is GRAND [16] of which BLEND can be considered a non-Euclidean extension. In addition there are several other works that apply the neural ODE framework to graphs. In GDE [67], GODE [98] and CGNN [94], the goal is to adapt neural ordinary differential equations to graphs. In contrast, we consider non-Euclidean partial differential equations and regard GNNs as particular instances of their discretisation (both spatial and temporal). We can naturally use spaces with any metric, in particular, extending recent works on hyperbolic graph embeddings. None of the previous techniques explore the link to differential geometry. More specifically, GDE, GODE, and CGNN consider Neural ODEs of the canonical form $\begin{array} { r } { \frac { \partial x } { \partial t } = f ( x , t , \theta ) } \end{array}$ where $f$ is a graph neural network (GODE), the message passing component of a GNN (CGNN), or restricting $f$ to be layers of bijective functions on graphs (GDE). Furthermore, in CGNN only ODEs with closed form solutions are considered. [75] on the other hand is quite distinct as they are not concerned with GNN design and instead use graph-based ODEs to generate physics simulations.
|
| 266 |
+
|
| 267 |
+
# 7 Conclusion
|
| 268 |
+
|
| 269 |
+
We developed a new class of graph neural networks based on the discretisation of a non-Euclidean diffusion PDE called Beltrami flow. We represent the graph structure and node features as a manifold in a joint continuous space, whose evolution by a parametric diffusion PDE (driven by the downstream learning task) gives rise to feature learning, positional encoding, and possibly also graph rewiring. Our experimental results show very good performance on popular benchmarks with a small fraction of parameters used by other GNN models. Perhaps most importantly, our framework establishes important links between GNNs, differential geometry, and PDEs – fields with a rich history and profound results that in our opinion are still insufficiently explored in the graph ML community.
|
| 270 |
+
|
| 271 |
+
Future directions While we show that our framework generalises many popular GNN architectures we seek to use the graph as a numerical representation of an underlying continuous space. This view of the graph as an approximation of a continuous latent structure is a common paradigm of manifold learning [84, 5, 20] and network geometry [8]. If adopted in graph ML, this mindset offers a rigorous mathematical framework for formalising and generalising some of the recent trends in the field, including the departure from the input graph as the basis for message passing [1], latent graph inference [41, 89, 29, 36] higher-order [7, 54] and directional [3] message passing (which can be expressed as anisotropic diffusion arising from additional structure of the underlying continuous space and different discretisation of the PDEs e.g. based on finite elements), and exploiting efficient numerical PDE solvers [19]. We leave these exciting directions for future research.
|
| 272 |
+
|
| 273 |
+
Societal impact GNNs have recently become increasingly utilized in industrial applications e.g. in recommender systems and social networks, and hence could potentially lead to a negative societal impact if used improperly. We would like to emphasize that our paper does not study such potential negative applications and the mathematical framework we develop could help to interpret and understand existing GNN models. We believe that better understanding of ML models is key to managing their potential societal implications and preventing their negative impact.
|
| 274 |
+
|
| 275 |
+
Limitations The assumption that the graph can be modelled as a discretisation of some continuous space makes our framework applicable only to cases where the edge and node features are continuous in nature. Applications e.g. to knowledge graphs with categorical attributes could only be addressed by first embedding such attributes in a continuous space. Finally, the structural result presented in Theorem 1 that link our model to the Polyakov action have not been implemented. This will be addressed in future works.
|
| 276 |
+
|
| 277 |
+
# 8 Acknowledgements
|
| 278 |
+
|
| 279 |
+
We thank Nils Hammerla and Gabriele Corso for feedback on early version of this manuscript. MB and JR are supported in part by ERC Consolidator grant no 724228 (LEMAN).
|
| 280 |
+
|
| 281 |
+
# References
|
| 282 |
+
|
| 283 |
+
[1] Uri Alon and Eran Yahav. On the bottleneck of graph neural networks and its practical implications. In ICLR, 2021.
|
| 284 |
+
[2] Pedro H. C. Avelar, Anderson R. Tavares, Marco Gori, and Luis C. Lamb. Discrete and continuous deep residual learning over graphs. arXiv:1911.09554, 2019. [3] Dominique Beaini, Saro Passaro, Vincent Létourneau, William L Hamilton, Gabriele Corso, and Pietro Liò. Directional graph networks. arXiv:2010.02863, 2020. [4] Filipe de Avila Belbute-Peres, Thomas Economon, and Zico Kolter. Combining differentiable pde solvers and graph neural networks for fluid flow prediction. In ICML, 2020. [5] Mikhail Belkin and Partha Niyogi. Laplacian eigenmaps for dimensionality reduction and data representation. Neural Computation, 15(6):1373–1396, 2003.
|
| 285 |
+
[6] Marcelo Bertalmio, Guillermo Sapiro, Vincent Caselles, and Coloma Ballester. Image inpainting. In PACMCGIT, 2000. [7] Cristian Bodnar, Fabrizio Frasca, Yu Guang Wang, Nina Otter, Guido Montúfar, Pietro Liò, and Michael Bronstein. Weisfeiler and lehman go topological: Message passing simplicial networks. arXiv:2103.03212, 2021.
|
| 286 |
+
[8] Marian Boguna, Ivan Bonamassa, Manlio De Domenico, Shlomo Havlin, Dmitri Krioukov, and M Ángeles Serrano. Network geometry. Nature Reviews Physics, pages 1–22, 2021.
|
| 287 |
+
[9] Giorgos Bouritsas, Fabrizio Frasca, Stefanos Zafeiriou, and Michael M Bronstein. Improving graph neural network expressivity via subgraph isomorphism counting. arXiv:2006.09252, 2020.
|
| 288 |
+
[10] Michael M Bronstein, Joan Bruna, Taco Cohen, and Petar Velickovi ˇ c. Geometric deep learning: ´ Grids, groups, graphs, geodesics, and gauges. arXiv:2104.13478, 2021.
|
| 289 |
+
[11] Michael M Bronstein and Iasonas Kokkinos. Scale-invariant heat kernel signatures for non-rigid shape recognition. In CVPR, 2010.
|
| 290 |
+
[12] Antoni Buades, Bartomeu Coll, and J-M Morel. A non-local algorithm for image denoising. In ICCV, 2005.
|
| 291 |
+
[13] Vicent Caselles, Ron Kimmel, and Guillermo Sapiro. Geodesic active contours. IJCV, 22(1):61–79, 1997.
|
| 292 |
+
[14] Soumen Chakrabarti. Dynamic personalized pagerank in entity-relation graphs. In WWW, 2007.
|
| 293 |
+
[15] Benjamin P. Chamberlain, James Clough, and Marc Peter Deisenroth. Neural embeddings of graphs in hyperbolic space. arXiv:1705.10359, 2017.
|
| 294 |
+
[16] Benjamin P. Chamberlain, James Rowbottom, Maria Gorinova, Michael M. Bronstein, Stefan Webb, and Emanuele Rossi. GRAND: graph neural diffusion. In ICML 2021, pages 1407–1418, 2021.
|
| 295 |
+
[17] Ines Chami, Rex Ying, Christopher Ré, and Jure Leskovec. Hyperbolic graph convolutional neural networks. In NeurIPS, 2019.
|
| 296 |
+
[18] Tony F Chan and Luminita A Vese. Active contours without edges. IEEE Trans. Image Processing, 10(2):266–277, 2001.
|
| 297 |
+
[19] Ricky T. Q. Chen, Yulia Rubanova, Jesse Bettencourt, and David Duvenaud. Neural ordinary differential equations. In NeurIPS, pages 6571–6583, 2018.
|
| 298 |
+
[20] Ronald R Coifman and Stéphane Lafon. Diffusion maps. Applied and computational harmonic analysis, 21(1):5–30, 2006.
|
| 299 |
+
[21] Miles Cranmer, Sam Greydanus, Stephan Hoyer, Peter Battaglia, David Spergel, and Shirley Ho. Lagrangian neural networks. 2020.
|
| 300 |
+
[22] Miles Cranmer, Rui Xu, Peter Battaglia, and Shirley Ho. Learning symbolic physics with graph networks. arXiv:1909.05862, 2019.
|
| 301 |
+
[23] Michaël Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In NeurIPS, 2016.
|
| 302 |
+
[24] John R Dormand and Peter J Prince. A family of embedded Runge-Kutta formulae. Journal of Computational and Applied Mathematics, 6(1):19–26, 1980.
|
| 303 |
+
[25] Emilien Dupont, Arnaud Doucet, and Yee Whye Teh. Augmented neural ODEs. In NeurIPS, pages 3134–3144, 2019.
|
| 304 |
+
[26] Frédo Durand and Julie Dorsey. Fast bilateral filtering for the display of high-dynamic-range images. In Proc Computer Graphics and Interactive Techniques, 2002.
|
| 305 |
+
[27] Vijay Prakash Dwivedi and Xavier Bresson. A generalization of transformer networks to graphs. arXiv:2012.09699, 2020.
|
| 306 |
+
[28] Chris Finlay, Jörn-Henrik Jacobsen, Levon Nurbekyan, and Adam M Oberman. How to train your neural ode: The world of Jacobian and kinetic regularization. In ICML, 2020.
|
| 307 |
+
[29] Luca Franceschi, Mathias Niepert, Massimiliano Pontil, and Xiao He. Learning discrete structures for graph neural networks. In ICML, 2019.
|
| 308 |
+
[30] Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry. In ICML, 2017.
|
| 309 |
+
[31] Fangda Gu, Heng Chang, Wenwu Zhu, Somayeh Sojoudi, and Laurent El Ghaoui. Implicit graph neural networks. In NeurIPS, 2020.
|
| 310 |
+
[32] William L Hamilton, Rex Ying, and Jure Leskovec. Inductive representation learning on large graphs. In NeurIPS, 2017.
|
| 311 |
+
[33] DF Hawken, JJ Gottlieb, and JS Hansen. Review of some adaptive node-movement techniques in finite-element and finite-difference solutions of partial differential equations. Journal of Computational Physics, 95(2):254–302, 1991.
|
| 312 |
+
[34] Mikael Henaff, Joan Bruna, and Yann LeCun. Deep convolutional networks on graph-structured data. arXiv:1506.05163, 2015.
|
| 313 |
+
[35] Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. Open graph benchmark: Datasets for machine learning on graphs. arXiv:2005.00687, 2020.
|
| 314 |
+
[36] Anees Kazi, Luca Cosmo, Nassir Navab, and Michael Bronstein. Differentiable graph module (DGN) graph convolutional networks. arXiv:2002.04999, 2020.
|
| 315 |
+
[37] Jacob Kelly, Jesse Bettencourt, Matthew James Johnson, and David Duvenaud. Learning differential equations that are easy to solve. In NeurIPS, 2020.
|
| 316 |
+
[38] Ron Kimmel. Numerical geometry of images: Theory, algorithms, and applications. Springer, 2012.
|
| 317 |
+
[39] Ron Kimmel, Ravi Malladi, and Nir Sochen. Images as embedded maps and minimal surfaces: movies, color, texture, and volumetric medical images. IJCV, 39(2):111–129, 2000.
|
| 318 |
+
[40] Ron Kimmel, Nir Sochen, and Ravi Malladi. From high energy physics to low level vision. pages 236–247. Springer, 1997.
|
| 319 |
+
[41] Thomas Kipf, Ethan Fetaya, Kuan-Chieh Wang, Max Welling, and Richard Zemel. Neural relational inference for interacting systems. In ICML, 2018.
|
| 320 |
+
[42] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017.
|
| 321 |
+
[43] Johannes Klicpera, Stefan Weißenberger, and Stephan Günnemann. Diffusion improves graph learning. In NeurIPS, volume 32, 2019.
|
| 322 |
+
[44] Wilhelm Kutta. Beitrag zur naherungsweisen integration totaler differentialgleichungen. Z. Math. Phys., 46:435–453, 1901.
|
| 323 |
+
[45] Ron Levie, Federico Monti, Xavier Bresson, and Michael M Bronstein. Cayleynets: Graph convolutional neural networks with complex rational spectral filters. IEEE Trans. Signal Processing, 2017.
|
| 324 |
+
[46] Xuechen Li, Ricky Tian Qi Chen, Ting-Kam Leonard Wong, and David Duvenaud. Scalable gradients for stochastic differential equations. In Artificial Intelligence and Statistics, 2020.
|
| 325 |
+
[47] Zongyi Li, Nikola Kovachki, Kamyar Azizzadenesheli, Burigede Liu, Kaushik Bhattacharya, Andrew Stuart, and Anima Anandkumar. Fourier neural operator for parametric partial differential equations. 2020.
|
| 326 |
+
[48] Zongyi Li, Nikola Kovachki, Kamyar Azizzadenesheli, Burigede Liu, Kaushik Bhattacharya, Andrew Stuart, and Anima Anandkumar. Multipole graph neural operator for parametric partial differential equations. In NeurIPS, 2020.
|
| 327 |
+
[49] Renjie Liao, Zhizhen Zhao, Raquel Urtasun, and Richard S Zemel. Lanczosnet: Multi-scale deep graph convo-lutional networks. In 7th International Conference on Learning Representations, ICLR 2019, 2019.
|
| 328 |
+
[50] Richard Liaw, Eric Liang, Robert Nishihara, Philipp Moritz, Joseph E. Gonzalez, and Ion Stoica. Tune: A research platform for distributed model selection and training. In arXiv: 1807.05118., 2018.
|
| 329 |
+
[51] Roee Litman and Alexander M Bronstein. Learning spectral descriptors for deformable shape correspondence. PAMI, 36(1):171–180, 2013.
|
| 330 |
+
[52] Qi Liu, Maximilian Nickel, and Douwe Kiela. Hyperbolic graph neural networks. arXiv preprint arXiv:1910.12892, 2019.
|
| 331 |
+
[53] Xuanqing Liu, Tesi Xiao, Si Si, Qin Cao, Sanjiv Kumar, and Cho-Jui Hsieh. Neural SDE: Stabilizing neural ODE networks with stochastic noise. (2), 2019.
|
| 332 |
+
[54] Haggai Maron, Heli Ben-Hamu, Hadar Serviansky, and Yaron Lipman. Provably powerful graph networks. In NeurIPS, pages 2153–2164, 2019.
|
| 333 |
+
[55] Julian McAuley, Christopher Targett, Qinfeng Shi, and Anton Van Den Hengel. Image-based recommendations on styles and substitutes. In Proceedings Information Retrieval, 2015.
|
| 334 |
+
[56] Andrew Kachites McCallum, Kamal Nigam, Jason Rennie, and Kristie Seymore. Automating the construction of internet portals with machine learning. Information Retrieval, 3(2):127–163, 2000.
|
| 335 |
+
[57] Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodolà, Jan Svoboda, and Michael M. Bronstein. Geometric deep learning on graphs and manifolds using mixture model CNNs. In CVPR, 2017.
|
| 336 |
+
[58] Galileo Namata, Ben London, Lise Getoor, Bert Huang, and UMD EDU. Query-driven active surveying for collective classification. In Proceedings Mining and Learning with Graphs, 2012.
|
| 337 |
+
[59] Maximillian Nickel and Douwe Kiela. Learning continuous hierarchies in the lorentz model of hyperbolic geometry. In International Conference on Machine Learning, pages 3779–3788. PMLR, 2018.
|
| 338 |
+
[60] Hoang NT and Takanori Maehara. Revisiting graph neural networks: All we have is low-pass filters. 2019.
|
| 339 |
+
[61] Lars Onsager. Reciprocal relations in irreversible processes. i. Physical Review, 37(4):405, 1931.
|
| 340 |
+
[62] Kenta Oono and Taiji Suzuki. Graph neural networks exponentially lose expressive power for node classification. In ICLR, 2020.
|
| 341 |
+
[63] Lawrence Page, Sergey Brin, Rajeev Motwani, and Terry Winograd. The pagerank citation ranking: Bringing order to the web. Technical report, 1999.
|
| 342 |
+
[64] Giuseppe Patané. Laplacian spectral kernels and distances for geometry processing and shape analysis. Computer Graphics Forum, 35(2):599–624, 2016.
|
| 343 |
+
[65] Pietro Perona and Jitendra Malik. Scale-space and edge detection using anisotropic diffusion. PAMI, 12(7):629–639, 1990.
|
| 344 |
+
[66] Bryan Perozzi, Rami Al-Rfou, and Steven Skiena. Deepwalk: Online learning of social representations. In Proceedings of the 20th ACM SIGKDD international conference on Knowledge discovery and data mining, pages 701–710, 2014.
|
| 345 |
+
[67] Michael Poli, Stefano Massaroli, Junyoung Park, Atsushi Yamashita, Hajime Asama, and Jinkyoo Park. Graph neural ordinary differential equations. pages 6571–6583, 2019.
|
| 346 |
+
[68] Alexander M Polyakov. Quantum geometry of bosonic strings. Physics Letters B, 103(3):207–210, 1981.
|
| 347 |
+
[69] Lev Semenovich Pontryagin. Mathematical theory of optimal processes. Routledge, 2018.
|
| 348 |
+
[70] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In CVPR, 2017.
|
| 349 |
+
[71] Alejandro F. Queiruga, N. Benjamin Erichson, Dane Taylor, and Michael W. Mahoney. Continuous-in-depth neural networks. CoRR, 2020.
|
| 350 |
+
[72] Maziar Raissi, Paris Perdikaris, and George Em Karniadakis. Physics informed deep learning (Part II): Data-driven discovery of nonlinear partial differential equations. CoRR, (Part II), 2017.
|
| 351 |
+
[73] Emanuele Rossi, Fabrizio Frasca, Ben Chamberlain, Davide Eynard, Michael Bronstein, and Federico Monti. SIGN: Scalable inception graph neural networks. arXiv:2004.11198, 2020.
|
| 352 |
+
[74] Carl Runge. Über die numerische auflösung von differentialgleichungen. Mathematische Annalen, 46(2):167–178, 1895.
|
| 353 |
+
[75] Alvaro Sanchez-Gonzalez, Victor Bapst, Kyle Cranmer, and Peter Battaglia. Hamiltonian graph networks with ODE integrators. 2019.
|
| 354 |
+
[76] Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE Trans. Neural Networks, 27(8):61–80, 2009.
|
| 355 |
+
[77] Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Galligher, and Tina EliassiRad. Collective classification in network data. AI Magazine, 29(3):93–93, 2008.
|
| 356 |
+
[78] Lawrence F Shampine. Some practical Runge-Kutta formulas. Mathematics of Computation, 46(173):135–150, 1986.
|
| 357 |
+
[79] Oleksandr Shchur, Maximilian Mumme, Aleksandar Bojchevski, and Stephan Günnemann. Pitfalls of graph neural network evaluation. arXiv:1811.05868, 2018.
|
| 358 |
+
[80] Nino Shervashidze, Pascal Schweitzer, Erik Jan Van Leeuwen, Kurt Mehlhorn, and Karsten M Borgwardt. Weisfeiler-lehman graph kernels. JMLR, 12:2539–2561, 2011.
|
| 359 |
+
[81] Jonathan Shlomi, Peter Battaglia, and Jean-Roch Vlimant. Graph neural networks in particle physics. Machine Learning: Science and Technology, 2(2):021001, 2020.
|
| 360 |
+
[82] Nir Sochen, Ron Kimmel, and Ravi Malladi. A general framework for low level vision. IEEE Trans. Image Processing, 7(3):310–318, 1998.
|
| 361 |
+
[83] Jian Sun, Maks Ovsjanikov, and Leonidas Guibas. A concise and provably informative multiscale signature based on heat diffusion. Computer Graphics Forum, 28(5):1383–1392, 2009.
|
| 362 |
+
[84] Joshua B Tenenbaum, Vin De Silva, and John C Langford. A global geometric framework for nonlinear dimensionality reduction. Dcience, 290(5500):2319–2323, 2000.
|
| 363 |
+
[85] Carlo Tomasi and Roberto Manduchi. Bilateral filtering for gray and color images. In ICCV, 1998.
|
| 364 |
+
[86] Ashish Vaswani, Noam Shazeer, Niki Parmar, Akob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In NeurIPS, pages 5998–6008, 2017.
|
| 365 |
+
[87] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. 2017.
|
| 366 |
+
[88] Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua ´ Bengio. Graph attention networks. In ICLR, 2018.
|
| 367 |
+
[89] Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E Sarma, Michael M Bronstein, and Justin M Solomon. Dynamic graph CNN for learning on point clouds. ACM Trans. Graphics, 38(5):1–12, 2019.
|
| 368 |
+
[90] Joachim Weickert. Anisotropic diffusion in image processing. Teubner Stuttgart, 1998.
|
| 369 |
+
[91] Joachim Weickert, Bart M. Ter Haar Romeny, and Max A. Viergever. Efficient and reliable schemes for nonlinear diffusion filtering. IEEE Trans. Image Processing, 7(3):398–410, 1998.
|
| 370 |
+
[92] Felix Wu, Amauri Souza, Tianyi Zhang, Christopher Fifty, Tao Yu, and Kilian Weinberger. Simplifying graph convolutional networks. In ICML. PMLR, 2019.
|
| 371 |
+
[93] Tailin Wu, Hongyu Ren, Pan Li, and Jure Leskovec. Graph information bottleneck. NeurIPS, 2020.
|
| 372 |
+
[94] Louis-pascal A C Xhonneux, Meng Qu, and Jian Tang. Continuous graph neural networks. In ICML, 2020.
|
| 373 |
+
[95] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In ICLR, 2019.
|
| 374 |
+
[96] Zhilin Yang, William Cohen, and Ruslan Salakhudinov. Revisiting semi-supervised learning with graph embeddings. In International conference on machine learning, pages 40–48. PMLR, 2016.
|
| 375 |
+
[97] Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Russ R Salakhutdinov, and Alexander J Smola. Deep sets. In NeurIPS, 2017.
|
| 376 |
+
[98] Juntang Zhuang, Nicha Dvornek, Xiaoxiao Li, and James S. Duncan. Ordinary differential equations on graph networks. Technical Report 1, 2020.
|
| 377 |
+
|
| 378 |
+
# Checklist
|
| 379 |
+
|
| 380 |
+
1. For all authors...
|
| 381 |
+
|
| 382 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 383 |
+
(b) Did you describe the limitations of your work? [Yes] In limitations (S6) and an extensions (S3.4)
|
| 384 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] Section 6
|
| 385 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 386 |
+
|
| 387 |
+
2. If you are including theoretical results...
|
| 388 |
+
|
| 389 |
+
(a) Did you state the full set of assumptions of all theoretical results? Theorem 1 is dealt with in the supplementary material [Yes] Supplementary Material
|
| 390 |
+
(b) Did you include complete proofs of all theoretical results? [Yes] Supplementary Material
|
| 391 |
+
|
| 392 |
+
3. If you ran experiments...
|
| 393 |
+
|
| 394 |
+
(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] In supplementary material
|
| 395 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] hyperparameters are included in Supplementary Material and splits are addressed in section 5
|
| 396 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] Results in Section 5 include error bars
|
| 397 |
+
(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] AWS, details at the end of 5.1 and supplementary material
|
| 398 |
+
|
| 399 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 400 |
+
|
| 401 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] papers have been cited for the most relevant OS libraries
|
| 402 |
+
(b) Did you mention the license of the assets? [No]
|
| 403 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
|
| 404 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 405 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 406 |
+
|
| 407 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 408 |
+
|
| 409 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 410 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 411 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/4c0J6lwQ4_/4c0J6lwQ4_.md
ADDED
|
@@ -0,0 +1,317 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# MULTI-TIME ATTENTION NETWORKS FOR IRREGULARLY SAMPLED TIME SERIES
|
| 2 |
+
|
| 3 |
+
Satya Narayan Shukla & Benjamin M. Marlin
|
| 4 |
+
|
| 5 |
+
College of Information and Computer Sciences University of Massachusetts Amherst Amherst, MA 01003, USA {snshukla,marlin}@cs.umass.edu
|
| 6 |
+
|
| 7 |
+
# ABSTRACT
|
| 8 |
+
|
| 9 |
+
Irregular sampling occurs in many time series modeling applications where it presents a significant challenge to standard deep learning models. This work is motivated by the analysis of physiological time series data in electronic health records, which are sparse, irregularly sampled, and multivariate. In this paper, we propose a new deep learning framework for this setting that we call MultiTime Attention Networks. Multi-Time Attention Networks learn an embedding of continuous time values and use an attention mechanism to produce a fixed-length representation of a time series containing a variable number of observations. We investigate the performance of this framework on interpolation and classification tasks using multiple datasets. Our results show that the proposed approach performs as well or better than a range of baseline and recently proposed models while offering significantly faster training times than current state-of-the-art methods.1
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
Irregularly sampled time series occur in application domains including healthcare, climate science, ecology, astronomy, biology and others. It is well understood that irregular sampling poses a significant challenge to machine learning models, which typically assume fully-observed, fixed-size feature representations (Marlin et al., 2012; Yadav et al., 2018). While recurrent neural networks (RNNs) have been widely used to model such data because of their ability to handle variable length sequences, basic RNNs assume regular spacing between observation times as well as alignment of the time points where observations occur for different variables (i.e., fully-observed vectors). In practice, both of these assumptions can fail to hold for real-world sparse and irregularly observed time series. To respond to these challenges, there has been significant progress over the last decade on building and adapting machine learning models that can better capture the structure of irregularly sampled multivariate time series (Li & Marlin, 2015; 2016; Lipton et al., 2016; Futoma et al., 2017; Che et al., 2018; Shukla & Marlin, 2019; Rubanova et al., 2019).
|
| 14 |
+
|
| 15 |
+
In this work, we introduce a new model for multivariate, sparse and irregularly sampled time series that we refer to as Multi-Time Attention networks or mTANs. mTANs are fundamentally continuous-time, interpolation-based models. Their primary innovations are the inclusion of a learned continuous-time embedding mechanism coupled with a time attention mechanism that replaces the use of a fixed similarity kernel when forming representation from continuous time inputs. This gives mTANs more representational flexibility than previous interpolation-based models (Shukla & Marlin, 2019).
|
| 16 |
+
|
| 17 |
+
Our approach re-represents an irregularly sampled time series at a fixed set of reference points. The proposed time attention mechanism uses reference time points as queries and the observed time points as keys. We propose an encoder-decoder framework for end-to-end learning using an mTAN module to interface with given multivariate, sparse and irregularly sampled time series inputs. The encoder takes the irregularly sampled time series as input and produces a fixed-length latent representation over a set of reference points, while the decoder uses the latent representations to produce reconstructions conditioned on the set of observed time points. Learning uses established methods for variational autoencoders (Rezende et al., 2014; Kingma & Welling, 2014).
|
| 18 |
+
|
| 19 |
+
The main contributions of the mTAN model framework are: (1) It provides a flexible approach to modeling multivariate, sparse and irregularly sampled time series data (including irregularly sampled time series of partially observed vectors) by leveraging a time attention mechanism to learn temporal similarity from data instead of using fixed kernels. (2) It uses a temporally distributed latent representation to better capture local structure in time series data. (3) It provides interpolation and classification performance that is as good as current state-of-the-art methods or better, while providing significantly reduced training times.
|
| 20 |
+
|
| 21 |
+
# 2 RELATED WORK
|
| 22 |
+
|
| 23 |
+
An irregularly sampled time series is a time series with irregular time intervals between observations. In the multivariate setting, there can also be a lack of alignment across different variables within the same multivariate time series. Finally, when gaps between observation times are large, the time series is also considered to be sparse. Such data occur in electronic health records (Marlin et al., 2012; Yadav et al., 2018), climate science (Schulz & Stattegger, 1997), ecology (Clark & Bjørnstad, 2004), biology (Ruf, 1999), and astronomy (Scargle, 1982). It is well understood that such data cause significant issues for standard supervised machine learning models that typically assume fully observed, fixed-size feature representations (Marlin et al., 2012).
|
| 24 |
+
|
| 25 |
+
A basic approach to dealing with irregular sampling is fixed temporal discretization. For example, Marlin et al. (2012) and Lipton et al. (2016) discretize continuous-time observations into hour-long bins. This has the advantage of simplicity, but requires ad-hoc handling of bins with more than one observation and results in missing data when bins are empty.
|
| 26 |
+
|
| 27 |
+
The alternative to temporal discretization is to construct models with the ability to directly use an irregularly sampled time series as input. Che et al. (2018) present several methods based on gated recurrent unit networks (GRUs, Chung et al. (2014)), including an approach that takes as input a sequence consisting of observed values, missing data indicators, and time intervals since the last observation. Pham et al. (2017) proposed to capture time irregularity by modifying the forget gate of an LSTM (Hochreiter & Schmidhuber, 1997), while Neil et al. (2016) introduced a new time gate that regulates access to the hidden and cell state of the LSTM. While these approaches allow the network to handle event-based sequences with irregularly spaced vector-valued observations, they do not support learning directly from vectors that are partially observed, which commonly occurs in the multivariate setting because of lack of alignment of observation times across different variables.
|
| 28 |
+
|
| 29 |
+
Another line of work has looked at using observations from the future as well as from the past for interpolation. Yoon et al. (2019) and Yoon et al. (2018) presented an approach based on the multi-directional RNN (M-RNN) that can leverage observations from the relative past and future of a given time point. Shukla & Marlin (2019) proposed the interpolation-prediction network framework, consisting of several semi-parametric RBF interpolation layers that interpolate multivariate, sparse, and irregularly sampled input time series against a set of reference time points while taking into account all observed data in a time series. Horn et al. (2020) proposed a set function-based approach for classifying time-series with irregularly sampled and unaligned observation.
|
| 30 |
+
|
| 31 |
+
Chen et al. (2018) proposed a variational auto-encoder model (Kingma & Welling, 2014; Rezende et al., 2014) for continuous time data based on the use of a neural network decoder combined with a latent ordinary differential equation (ODE) model. They model time series data via a latent continuous-time function that is defined via a neural network representation of its gradient field. Building on this, Rubanova et al. (2019) proposed a latent ODE model that uses an ODE-RNN model as the encoder. ODE-RNNs use neural ODEs to model the hidden state dynamics and an RNN to update the hidden state in the presence of a new observation. De Brouwer et al. (2019) proposed GRU-ODE-Bayes, a continuous-time version of the Gated Recurrent Unit (Chung et al., 2014). Instead of the encoder-decoder architecture where the ODE is decoupled from the input processing, GRU-ODE-Bayes provides a tighter integration by interleaving the ODE and the input processing steps.
|
| 32 |
+
|
| 33 |
+
Several recent approaches have also used attention mechanisms to model irregularly sampled time series (Song et al., 2018; Tan et al., 2020; Zhang et al., 2019) as well as medical concepts (Peng et al., 2019; Cai et al., 2018). Most of these approaches are similar to Vaswani et al. (2017) where they replace the positional encoding with an encoding of time and model sequences using self-attention.
|
| 34 |
+
|
| 35 |
+
However, instead of adding the time encoding to the input representation as in Vaswani et al. (2017), they concatenate it with the input representation. These methods use a fixed time encoding similar to the positional encoding of Vaswani et al. (2017). Xu et al. (2019) learn a functional time representation and concatenate it with the input event embedding to model time-event interactions.
|
| 36 |
+
|
| 37 |
+
Like Xu et al. (2019) and Kazemi et al. (2019), our proposed method learns a time representation. However, instead of concatenating it with the input embedding, our model learns to attend to observations at different time points by computing a similarity weighting using only the time embedding. Our proposed model uses the time embedding as both the queries and keys in the attention formulation. It learns an interpolation over the query time points by attending to the observed values at key time points. Our proposed method is thus similar to kernel-based interpolation, but learning the time attention based similarity kernel gives our model more flexibility compared to methods like that of Shukla & Marlin (2019) that use similarity kernels with fixed functional forms. Another important difference relative to many of these previous methods is that our proposed approach attends only to the observed data dimensions at each time point and hence does not require a separate imputation step to handle vector valued observations with an arbitrary collection of dimensions missing at any given time point.
|
| 38 |
+
|
| 39 |
+
# 3 THE MULTI-TIME ATTENTION MODULE
|
| 40 |
+
|
| 41 |
+
In this section, we present the proposed Multi-Time Attention Module (mTAN). The role of this module is to re-represent a sparse and irregularly sampled time series in a fixed-dimensional space. This module uses multiple continuous-time embeddings and attention-based interpolation. We begin by presenting notation followed by the time embedding and attention components.
|
| 42 |
+
|
| 43 |
+
Notation: In the case of a supervised learning task, we let $\mathcal { D } = \{ ( \mathbf { s } _ { n } , y _ { n } ) | n = 1 , . . . , N \}$ represent a data set containing $N$ data cases. An individual data case consists of a single target value $y _ { n }$ (discrete for classification), as well as a $D$ -dimensional, sparse and irregularly sampled multivariate time series ${ \bf s } _ { n }$ . Different dimensions $d$ of the multivariate time series can have observations at different times, as well as different total numbers of observations $L _ { d n }$ . Thus, we represent time series $d$ for data case $n$ as a tuple $\mathbf { s } _ { d n } = ( \mathbf { t } _ { d n } , \mathbf { x } _ { d n } )$ where $\mathbf t _ { d n } = [ t _ { 1 d n } , . . . , t _ { L _ { d n } d n } ]$ is the list of time points at which observations are defined and $\mathbf { x } _ { d n } = [ x _ { 1 d n } , . . . , x _ { L _ { d n } d n } ]$ is the corresponding list of observed values. In the case of an unsupervised task such as interpolation, each data case consists of a multivariate time series ${ \bf s } _ { n }$ only. We drop the data case index $n$ for brevity when the context is clear.
|
| 44 |
+
|
| 45 |
+
Time Embedding: Time attention module is based on embedding continuous time points into a vector space. We generalize the notion of a positional encoding used in transformer-based models to continuous time. Time attention networks simultaneously leverage $H$ embedding functions $\phi _ { h } ( t )$ , each outputting a representation of size $d _ { r }$ . Dimension $i$ of embedding $h$ is defined as follows:
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\phi _ { h } ( t ) [ i ] = \left\{ \begin{array} { l l } { \omega _ { 0 h } \cdot t + \alpha _ { 0 h } , } & { \qquad \mathrm { i f } \quad i = 0 } \\ { \sin ( \omega _ { i h } \cdot t + \alpha _ { i h } ) , } & { \qquad \mathrm { i f } \quad 0 < i < d _ { r } } \end{array} \right.
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
where the $\omega _ { i h }$ ’s and $\alpha _ { i h }$ ’s are learnable parameters. The periodic terms can capture periodicity in time series data. In this case, $\omega _ { i h }$ and $\alpha _ { i h }$ represent the frequency and phase of the sine function. The linear term, on the other hand, can capture non-periodic patterns dependent on the progression of time. For a given difference $\Delta$ , $\phi _ { h } ( t + \Delta )$ can be represented as a linear function of $\phi _ { h } ( t )$ .
|
| 52 |
+
|
| 53 |
+
Learning the periodic time embedding functions is equivalent to using a one-layer fully connected network with a sine function non-linearity to map the time values into a higher dimensional space. By contrast, the positional encoding used in transformer models is defined only for discrete positions. We note that our time embedding functions subsume positional encodings when evaluated at discrete positions.
|
| 54 |
+
|
| 55 |
+
Multi-Time Attention: The time embedding component described above takes a continuous time point and embeds it into $H$ different $d _ { r }$ -dimensional spaces. In this section, we describe how we leverage time embeddings to produce a continuous-time embedding module for sparse and irregularly sampled time series. This multi-time attention embedding module $\operatorname { m T A N } ( t , \mathbf { s } )$ takes as input a query time point $t$ and a set of keys and values in the form of a $D$ -dimensional multivariate sparse and irregularly sampled time series s (as defined in the notation section above), and returns a $J$ - dimensional embedding at time $t$ . This process leverages a continuous-time attention mechanism applied to the $H$ time embeddings. The complete computation is described below.
|
| 56 |
+
|
| 57 |
+

|
| 58 |
+
Figure 1: Architecture of the mTAND module. It takes irregularly sampled time points and corresponding values as keys and values and produces a fixed dimensional representation at the query time points. The attention blocks (ATT) perform a scaled dot product attention over the observed values using the time embedding of the query and key time points. Equation 3 and 4 defines this operation. Note that the output at all query points can be computed in parallel.
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
\begin{array} { r l } & { \mathrm { m T A N } ( t , \mathbf { s } ) [ j ] = \displaystyle \sum _ { h = 1 } ^ { H } \sum _ { d = 1 } ^ { D } \hat { x } _ { h d } ( t , \mathbf { s } ) \cdot U _ { h d j } } \\ & { \quad \quad \quad \hat { x } _ { h d } ( t , \mathbf { s } ) = \displaystyle \sum _ { i = 1 } ^ { L _ { d } } \kappa _ { h } ( t , t _ { i d } ) x _ { i d } } \\ & { \quad \quad \quad \kappa _ { h } ( t , t _ { i d } ) = \displaystyle \frac { \exp \big ( \phi _ { h } ( t ) \mathbf { w v } ^ { T } \phi _ { h } ( t _ { i d } ) ^ { T } / \sqrt { d _ { k } } \big ) } { \sum _ { i ^ { \prime } = 1 } ^ { L _ { d } } \exp \big ( \phi _ { h } ( t ) \mathbf { w v } ^ { T } \phi _ { h } ( t _ { i ^ { \prime } d } ) ^ { T } / \sqrt { d _ { k } } \big ) } } \end{array}
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
As shown in Equation 2, dimension $j$ of the mTAN embedding $\mathrm { m T A N } ( t , \mathbf { s } ) [ j ]$ is given by a linear combination of intermediate univariate continuous-time functions ${ \hat { x } } _ { h d } ( t , \mathbf { s } )$ . There is one such function defined for each input data dimension $d$ and each time embedding $h$ . The parameters $U _ { h d j }$ are learnable linear combination weights.
|
| 65 |
+
|
| 66 |
+
As shown in Equation 3, the structure of the intermediate continuous-time function ${ \hat { x } } _ { h d } ( t , \mathbf { s } )$ is essentially a kernel smoother applied to the $d ^ { t h }$ dimension of the time series. However, the interpolation weights $\kappa _ { h } ( t , t _ { i d } )$ are defined based on a time attention mechanism that leverages time embeddings, as shown in Equation 4. As we can see, the same time embedding function $\phi _ { h } ( t )$ is applied for all data dimensions. The form of the attention mechanism is a softmax function over the observed time points $t _ { i d }$ for dimension $d$ . The activation within the softmax is a scaled inner product between the time embedding $\phi _ { h } ( t )$ of the query time point $t$ and the time embedding $\phi _ { h } ( t _ { i d } )$ of the observed time point, the key. The parameters $\mathbf { w }$ and $\mathbf { v }$ are each $d _ { r } \times d _ { k }$ matrices where $d _ { k } \leq d _ { r }$ . We use a scaling factor $\frac { 1 } { \sqrt { d _ { k } } }$ to normalize the dot product to counteract the growth in the dot product magnitude with increase in the dimension $d _ { k }$ .
|
| 67 |
+
|
| 68 |
+
Learning the time embeddings provides our model with flexibility to learn complex temporal kernel functions $\kappa _ { h } ( t , t ^ { \prime } )$ . The use of multiple simultaneous time embeddings $\phi _ { h } ( t )$ and a final linear combination across time embedding dimensions and data dimensions means that the final output representation function $\operatorname { m T A N } ( t , \mathbf { s } )$ is extremely flexible. Different input dimensions can leverage different time embeddings via learned sparsity patterns in the parameter tensor $U$ . Information from different data dimensions can also be mixed together to create compact reduced dimensional representations. We note that all of the required computations can be parallelized using masking variables to deal with unobserved dimensions, allowing for efficient implementation on a GPU.
|
| 69 |
+
|
| 70 |
+
Discretization: Since the mTAN module defines a continuous function of $t$ given s, it can not be directly incorporated into neural network architectures that expect inputs in the form of fixeddimensional vectors or discrete sequences. However, the mTAN module can easily be adapted to produce such an output representation by materializing its output at a set of reference time points $\mathbf { \bar { r } } = [ r _ { 1 } , . . . , r _ { K } ]$ . In some cases, we may have a fixed set of such points. In other cases, the set of reference time points may need to depend on s itself. In particular, we define the auxiliary function $\rho ( \mathbf { s } )$ to return the set of time points at which there is an observation on any dimension of s.
|
| 71 |
+
|
| 72 |
+

|
| 73 |
+
Figure 2: Architecture of the proposed encoder-decoder framework mTAND-Full. The classifier is required only for performing classification tasks. The mTAND module is shown in Figure 1.
|
| 74 |
+
|
| 75 |
+
Given a collection of reference time points $\mathbf { r }$ , we define the discretized mTAN module $\mathrm { m T A N D } ( \mathbf { r } , \mathbf { s } )$ as $\mathrm { m T A N D } ( \mathbf { r } , \mathbf { s } ) [ i ] = \mathrm { m T A N } ( r _ { i } , \mathbf { s } )$ . This module takes as input the set of reference time points $\mathbf { r }$ and the time series s and outputs a sequence of mTAN embeddings of length $| \mathbf { r } |$ , each of dimension $J$ . The architecture of the mTAND module is shown in Figure 1. The mTAND module can be used to interface sparse and irregularly sampled multivariate time series data with any deep neural network layer type including fully-connected, recurrent, and convolutional layers. In the next section, we describe the construction of a temporal encoder-decoder architecture leveraging the mTAND module, which can be applied to both classification and interpolation tasks.
|
| 76 |
+
|
| 77 |
+
# 4 ENCODER-DECODER FRAMEWORK
|
| 78 |
+
|
| 79 |
+
As described in the last section, we leverage the discretized mTAN module in an encoder-decoder framework as the primary model in this paper, which we refer to as an mTAN network. We develop the encoder-decoder framework within the variational autoencoder (VAE) framework in this section. The architecture for the model framework is shown in Figure 2.
|
| 80 |
+
|
| 81 |
+
Model Architecture: As we are modeling time series data, we begin by defining a sequence of latent states $\mathbf { z } _ { i }$ . Each of these latent states are IID-distributed according to a standard multivariate normal distribution $p ( \mathbf { z } _ { i } )$ . We define the set of latent states ${ \bf z } = [ { \bf z } _ { 1 } , . . . , { \bf z } _ { K } ]$ at $K$ reference time points.
|
| 82 |
+
|
| 83 |
+
We define a three-stage decoder. First, the latent states are processed through an RNN decoder $\mathbf { h } _ { R N N } ^ { d e c } = [ \mathbf { h } _ { 1 , R N N } ^ { d e c } , . . . , \mathbf { h } _ { K , R N N } ^ { d e c } ]$ ndencies resulting in a first set of deterministic latent v. Second, the output of the RNN decoder stage and the $K$ ablestime points $\mathbf { h } _ { R N N } ^ { d e c }$ are provided to the mTAND module along with a set of $T$ query time points t. The mTAND module outputs a sequence of embeddings $\mathbf { h } _ { T A N } ^ { d e c } = [ \mathbf { h } _ { 1 , T A N } ^ { d e c } , . . . , \mathbf { h } _ { T , T A N } ^ { d e c } ]$ of length |t|. Third, the mTAN embeddings are independently decoded using a fully connected decoder $f ^ { d e c } ( )$ and the result is used to parameterize an output distribution. In this work, we use a diagonal covariance Gaussian distribution with mean given by the final decoded representation and a fixed variance $\sigma ^ { 2 }$ . The final generated time series is given by $\hat { \bf s } = ( { \bf t } , { \bf x } )$ with all data dimensions observed. The full generative process is shown below. We let $p _ { \theta } ( \mathbf { x } | \mathbf { z } , \mathbf { t } )$ define the probability distribution over the values of the time series $\mathbf { x }$ given the time points $\mathbf { t }$ and the latent variables z. $\theta$ represents the parameters of all components of the decoder.
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
\begin{array} { r l } & { \quad \mathbf { z } _ { k } \sim p ( \mathbf { z } _ { k } ) } \\ & { \quad \mathbf { h } _ { R N N } ^ { d e c } = \mathrm { R N N } ^ { d e c } ( \mathbf { z } ) } \\ & { \quad \mathbf { h } _ { T A N } ^ { d e c } = \mathrm { m T A N D } ^ { d e c } ( \mathbf { t } , \mathbf { h } _ { R N N } ^ { d e c } ) } \\ & { \quad \quad \quad x _ { i d } \sim \mathcal { N } ( x _ { i d } ; f ^ { d e c } ( \mathbf { h } _ { i , T A N } ^ { d e c } ) [ d ] , \sigma ^ { 2 } I ) } \end{array}
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
For an encoder, we simply invert the structure of the generative process. We begin by mapping the input time series s through the mTAND module along with a collection of $K$ reference time points $\mathbf { r }$ . We apply an RNN encoder to the mTAND model that outputs $\mathbf { h } _ { T A N } ^ { e n c }$ to encode longer-range temporal structure. Finally, we construct a distribution over latent variables at each reference time point using the RNN outputs to be the distribu a diagonal Gaussian distribution with mean and variance output by fully connected layers applied to $\mathbf { h } _ { R N N } ^ { e n c }$ . The complete encoder architecture is described below. We define er the latent variables induced by the input time series s and the $q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } )$ time points $\mathbf { r }$ . $\gamma$ represents all of the parameters in all of the encoder components.
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
\begin{array} { c } { { { \bf h } _ { T A N } ^ { e n c } = { \bf m } \mathrm { T A N D } ^ { e n c } ( { \bf r } , { \bf s } ) } } \\ { { { \bf h } _ { R N N } ^ { e n c } = { \bf R } { \bf N } \mathrm { N } ^ { e n c } ( { \bf h } _ { T A N } ^ { e n c } ) } } \\ { { { \bf z } _ { k } \sim q _ { \gamma } ( { \bf z } _ { k } | { \pmb { \mu } } _ { k } , \sigma _ { k } ^ { 2 } ) , ~ { \pmb { \mu } } _ { k } = f _ { \mu } ^ { e n c } ( { \bf h } _ { k , R N N } ^ { e n c } ) , ~ \sigma _ { k } ^ { 2 } = \exp ( f _ { \sigma } ^ { e n c } ( { \bf h } _ { k , R N N } ^ { e n c } ) ) } } \end{array}
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
Unsupervised Learning: To learn the parameters of our encoder-decoder model given a data set of sparse and irregularly sampled time series, we follow a slightly modified VAE training approach and maximize a normalized variational lower bound on the log marginal likelihood based on the evidence lower bound or ELBO. The learning objective is defined below where $p _ { \theta } ( x _ { j d n } | \mathbf { z } , \mathbf { t } _ { n } )$ and $q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } _ { n } )$ are defined in the previous section.
|
| 96 |
+
|
| 97 |
+
$$
|
| 98 |
+
\begin{array} { l } { \displaystyle \mathcal { L } _ { \mathrm { N V A E } } ( \theta , \gamma ) = \sum _ { n = 1 } ^ { N } \frac { 1 } { \sum _ { d } L _ { d n } } \Big ( \mathbb { E } _ { q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } _ { n } ) } [ \log p _ { \theta } ( \mathbf { x } _ { n } | \mathbf { z } , \mathbf { t } _ { n } ) ] - D _ { \mathrm { K L } } ( q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } _ { n } ) | | p ( \mathbf { z } ) ) \Big ) } \\ { \displaystyle D _ { \mathrm { K L } } ( q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } _ { n } ) | | p ( \mathbf { z } ) ) = \sum _ { i = 1 } ^ { K } D _ { \mathrm { K L } } ( q _ { \gamma } ( \mathbf { z } _ { i } | \mathbf { r } , \mathbf { s } _ { n } ) | | p ( \mathbf { z } _ { i } ) ) } \\ { \displaystyle \log p _ { \theta } ( \mathbf { x } _ { n } | \mathbf { z } , \mathbf { t } _ { n } ) = \sum _ { d = 1 } ^ { D } \sum _ { j = 1 } ^ { L _ { d n } } \log p _ { \theta } ( x _ { j d n } | \mathbf { z } , t _ { j d n } ) } \end{array}
|
| 99 |
+
$$
|
| 100 |
+
|
| 101 |
+
Since irregularly sampled time series can have different numbers of observations across different dimensions as well as across different data cases, it can be helpful to normalize the terms in the standard ELBO objective to avoid the model focusing more on sequences that are longer at the expense of sequences that are shorter. The objective above normalizes the contribution of each data case by the total number of observations it contains. The fact that all data dimensions are not observed at all time points is accounted for in Equation 14. In practice, we use $k$ samples from the variational distribution $q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } _ { n } )$ to compute the learning objective.
|
| 102 |
+
|
| 103 |
+
Supervised Learning: We can also augment the encoder-decoder model with a supervised learning component that leverages the latent states as a feature extractor. We define this component to be of the form $p _ { \delta } ( y _ { n } | \mathbf { z } )$ where $\delta$ are the model parameters. This leads to an augmented learning objective as shown in Equation 15 where the $\lambda$ term trades off the supervised and unsupervised terms.
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\mathcal { L } _ { \mathrm { s u p e r v i s e d } } ( \theta , \gamma , \delta ) = \mathcal { L } _ { \mathrm { N V A E } } ( \theta , \gamma ) + \lambda \mathbb { E } _ { q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } _ { n } ) } \log p _ { \delta } ( y _ { n } | \mathbf { z } )
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
In this work, we focus on classification as an illustrative supervised learning problem. For the classification model $p _ { \delta } ( y _ { n } | \mathbf { z } )$ , we use a GRU followed by a 2-layer fully connected network. We use a small number of samples to approximate the required intractable expectations during both learning and prediction. Predictions are computed by marginalizing over the latent variable as shown below.
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
y ^ { * } = \underset { y \in \mathcal { V } } { \arg \operatorname* { m a x } } ~ \mathbb { E } _ { q _ { \gamma } ( \mathbf { z } | \mathbf { r } , \mathbf { s } ) } [ \log p _ { \delta } ( y | \mathbf { z } ) ]
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
# 5 EXPERIMENTS
|
| 116 |
+
|
| 117 |
+
In this section, we present interpolation and classification experiments using a range of models and three real-world data sets (Physionet Challenge 2012, MIMIC-III, and a Human Activity dataset). Additional illustrative results on synthetic data can be found in Appendix A.2.
|
| 118 |
+
|
| 119 |
+
Datasets: The PhysioNet Challenge 2012 dataset (Silva et al., 2012) consists of multivariate time series data with 37 variables extracted from intensive care unit (ICU) records. Each record contains sparse and irregularly spaced measurements from the first 48 hours after admission to ICU. We follow the procedures of Rubanova et al. (2019) and round the observation times to the nearest minute. This leads to 2880 possible measurement times per time series. The data set includes 4000 labeled instances and 4000 unlabeled instances. We use all 8000 instances for interpolation experiments and the 4000 labeled instances for classification experiments. We focus on predicting in-hospital mortality. $1 3 . 8 \%$ of examples are in the positive class.
|
| 120 |
+
|
| 121 |
+
The MIMIC-III data set (Johnson et al., 2016) is a multivariate time series dataset consisting of sparse and irregularly sampled physiological signals collected at Beth Israel Deaconess Medical Center from 2001 to 2012. Following the procedures of Shukla & Marlin (2019), we extract 53, 211 records each containing 12 physiological variables. We focus on predicting in-hospital mortality using the first 48 hours of data. $\dot { 8 } . 1 \%$ of the instances have positive labels.
|
| 122 |
+
|
| 123 |
+
The human activity dataset consists of 3D positions of the waist, chest and ankles collected from five individuals performing various activities including walking, sitting, lying, standing, etc. We follow the data preprocessing steps of Rubanova et al. (2019) and construct a dataset of 6, 554 sequences with 12 channels and 50 time points. We focus on classifying each time point in the sequence into one of eleven types of activities.
|
| 124 |
+
|
| 125 |
+
Experimental Protocols: We conduct interpolation experiments using the 8000 data cases in the PhysioNet data set. We randomly divide the data set into a training set containing $80 \%$ of the instances, and a test set containing the remaining $20 \%$ of instances. We use $20 \%$ of the training data for validation. In the interpolation task, we condition on a subset of available points and predict values for rest of the time points. We perform interpolation experiments with a varying percentage of observed points ranging from $5 0 \%$ to $\bar { 9 } 0 \%$ of the available points. At test time, the values of observed points are conditioned on and each model is used to infer the values at rest of the available time points in the test instance. We repeat each experiment five times using different random seeds to initialize the model parameters. We assess performance using mean squared error (MSE).
|
| 126 |
+
|
| 127 |
+
We use the labeled data in all three data sets to conduct classification experiments. The PhysioNet and MIMIC III problems are whole time series classification problems. Note that for the human activity dataset, we classify each time point in the time series. We treat this as a smoothing problem and condition on all available observations when producing the classification at each time-point (similar to labeling in a CRF). We use bidirectional RNNs as the RNN-based baselines for the human activity dataset. We randomly divide each data set into a training set containing $80 \%$ of the time series, and a test set containing the remaining $20 \%$ of instances. We use $20 \%$ of the training set for validation. We repeat each experiment five times using different random seeds to initialize the model parameters. Due to class imbalance in the Physionet and MIMIC-III data sets, we assess classification performance using area under the ROC curve (the AUC score). For the Human Activity dataset, we evaluate models using accuracy.
|
| 128 |
+
|
| 129 |
+
For both interpolation and prediction, we select hyper-parameters on the held-out validation set using grid search, and then apply the best trained model to the test set. The hyper-parameter ranges searched for each model/dataset/task are fully described in Appendix A.4.
|
| 130 |
+
|
| 131 |
+
Models: The model we focus on is the encoder-decoder architecture based on the discretized multitime attention module (mTAND-Full). In the classification experiments, the hidden state at the last observed point is passed to a two-layer binary classification module for all models. For each data set, the structure of this classifier is the same for all models. For the proposed model, the sequence of latent states is first passed through a GRU and then the final hidden state is passed through the same classification module. For the classification task only, we consider an ablation of the full model that uses the proposed mTAND encoder, which consists of our mTAND module followed by a GRU to extract a final hidden state, which is then passed to the classification module (mTAND-Enc). We compare to several deep learning models that expand on recurrent networks to accommodate irregular sampling. We also compare to several encoder-decoder approaches. The full list of model variants is briefly described below. We use a Gated Recurrent Unit (GRU) (Chung et al., 2014) module as the recurrent network throughout. Architecture details can be found in Appendix A.3.
|
| 132 |
+
|
| 133 |
+
Table 1: Interpolation performance versus percent observed time points on PhysioNet
|
| 134 |
+
|
| 135 |
+
<table><tr><td>Model</td><td colspan="5">Mean Squared Error(×10-³)</td></tr><tr><td>RNN-VAE</td><td>13.418 ± 0.008</td><td>12.594± 0.004</td><td>11.887 ± 0.005</td><td>11.133 ± 0.007</td><td>11.470 ± 0.006</td></tr><tr><td>L-ODE-RNN</td><td>8.132 ±0.020</td><td>8.140 ± 0.018</td><td>8.171 ±0.030</td><td>8.143 ±0.025</td><td>8.402 ±0.022</td></tr><tr><td>L-ODE-ODE</td><td>6.721 ±0.109</td><td>6.816± 0.045</td><td>6.798 ±0.143</td><td>6.850 ± 0.066</td><td>7.142 ± 0.066</td></tr><tr><td>mTAND-Full</td><td>4.139 ± 0.029</td><td>4.018 ± 0.048</td><td>4.157 ± 0.053</td><td>4.410 ± 0.149</td><td>4.798 ± 0.036</td></tr><tr><td>Observed %</td><td>50%</td><td>60%</td><td>70%</td><td>80%</td><td>90%</td></tr></table>
|
| 136 |
+
|
| 137 |
+
• RNN-Impute: Missing observations replaced with weighted average of last observed measurement within that time series and global mean of the variable across training examples (Che et al., 2018).
|
| 138 |
+
• RNN- $\Delta _ { t }$ : Input is concatenated with masking variable and time interval $\Delta _ { t }$ indicating how long the particular variable is missing.
|
| 139 |
+
• RNN-Decay: RNN with exponential decay on hidden states (Mozer et al., 2017; Che et al., 2018).
|
| 140 |
+
• GRU-D: combining hidden state decay with input decay (Che et al., 2018).
|
| 141 |
+
• Phased-LSTM: Captures time irregularity by a time gate that regulates access to the hidden and cell state of the LSTM (Neil et al., 2016) with forward filling to handle partially observed vectors.
|
| 142 |
+
• IP-Nets: Interpolation prediction networks, which use several semi-parametric RBF interpolation layers, followed by a GRU (Shukla & Marlin, 2019).
|
| 143 |
+
• SeFT: Uses a set function based approach where all the observations are modeled individually before pooling them together using an attention based approach (Horn et al., 2020).
|
| 144 |
+
• RNN-VAE: A VAE-based model where the encoder and decoder are standard RNN models.
|
| 145 |
+
• ODE-RNN: Uses neural ODEs to model hidden state dynamics and an RNN to update the hidden state in presence of a new observation (Rubanova et al., 2019).
|
| 146 |
+
• L-ODE-RNN: Latent ODE where the encoder is an RNN and decoder is a neural ODE (Chen et al., 2018).
|
| 147 |
+
• L-ODE-ODE: Latent ODE where the encoder is an ODE-RNN and decoder is a neural ODE (Rubanova et al., 2019).
|
| 148 |
+
|
| 149 |
+
Physionet Experiments: Table 1 compares the performance of all methods on the interpolation task where we observe $5 0 \% - 9 0 \%$ of the values in the test instances. As we can see, the proposed method (mTAND-Full) consistently and substantially outperforms all of the previous approaches across all of the settings of observed time points. We note that in this experiment, different columns correspond to different setting (for example, in the case of $7 0 \%$ , we condition on $7 0 \%$ of data and predict the rest of the data; i.e., $3 0 \%$ ) and, hence the results across columns are not comparable.
|
| 150 |
+
|
| 151 |
+
Table 2 compares predictive performance on the PhysioNet mortality prediction task. The full Multi-Time Attention network model (mTAND-Full) and the classifier based only on the Multi-Time Attention network encoder (mTAND-Enc) achieve significantly improved performance relative to the current state-of-the-art methods (ODE-RNN and L-ODE-ODE) and other baseline methods.
|
| 152 |
+
|
| 153 |
+
We also report the time per epoch in minutes for all the methods. We note that the ODE-based models require substantially more run time than other methods due to the required use of an ODE solver (Chen et al., 2018; Rubanova et al., 2019). These methods also require taking the union of all observation time points in a batch, which further slows down the training process. As we can see, the proposed full Multi-Time Attention network (mTAND-Full) is over 85 times faster than ODE-RNN and over 100 times faster than L-ODE-ODE, the best-performing ODE-based models.
|
| 154 |
+
|
| 155 |
+
MIMIC-III Experiments: Table 2 compares the predictive performance of the models on the mortality prediction task on MIMIC-III. The Multi-Time Attention network-based encoder-decoder framework (mTAND-Full) achieves better performance than the recent IP-Net and SeFT model as well as all of the RNN baseline models. While ODE-RNN and L-ODE-ODE both have slightly better mean AUC than mTAND-Full, the differences are not statistically significant. Further, as shown on the PhysioNet classification problem, mTAND-Full is more than an order of magnitude faster than the ODE-based methods.
|
| 156 |
+
|
| 157 |
+
Table 2: Classification Performance on PhysioNet, MIMIC-III and Human Activity dataset
|
| 158 |
+
|
| 159 |
+
<table><tr><td rowspan="2">Model</td><td colspan="2">AUC Score</td><td>Accuracy</td><td rowspan="2">time per epoch</td></tr><tr><td>PhysioNet</td><td>MIMIC-III</td><td>Human Activity</td></tr><tr><td>RNN-Impute</td><td>0.764± 0.016</td><td>0.8249 ± 0.0010</td><td>0.859 ± 0.004</td><td>0.5</td></tr><tr><td>RNN-△t</td><td>0.787 ± 0.014</td><td>0.8364 ± 0.0011</td><td>0.857 ± 0.002</td><td>0.5</td></tr><tr><td>RNN-Decay</td><td>0.807 ± 0.003</td><td>0.8392 ± 0.0012</td><td>0.860 ± 0.005</td><td>0.7</td></tr><tr><td>RNN GRU-D</td><td>0.818 ± 0.008</td><td>0.8270± 0.0010</td><td>0.862 ± 0.005</td><td>0.7</td></tr><tr><td>Phased-LSTM</td><td>0.836 ± 0.003</td><td>0.8429 ± 0.0035</td><td>0.855 ± 0.005</td><td>0.3</td></tr><tr><td>IP-Nets</td><td>0.819 ± 0.006</td><td>0.8390 ± 0.0011</td><td>0.869 ± 0.007</td><td>1.3</td></tr><tr><td>SeFT</td><td>0.795 ± 0.015</td><td>0.8485 ± 0.0022</td><td>0.815 ± 0.002</td><td>0.5</td></tr><tr><td>RNN-VAE</td><td>0.515 ± 0.040</td><td>0.5175 ± 0.0312</td><td>0.343 ± 0.040</td><td>2.0</td></tr><tr><td>ODE-RNN</td><td>0.833 ± 0.009</td><td>0.8561 ± 0.0051</td><td>0.885 ± 0.008</td><td>16.5</td></tr><tr><td>L-ODE-RNN</td><td>0.781±0.018</td><td>0.7734± 0.0030</td><td>0.838 ± 0.004</td><td>6.7</td></tr><tr><td>L-ODE-ODE</td><td>0.829 ± 0.004</td><td>0.8559 ± 0.0041</td><td>0.870 ± 0.028</td><td>22.0</td></tr><tr><td>mTAND-Enc</td><td>0.854± 0.001</td><td>0.8419 ± 0.0017</td><td>0.907 ± 0.002</td><td>0.1</td></tr><tr><td>mTAND-Full</td><td>0.858 ± 0.004</td><td>0.8544 ± 0.0024</td><td>0.910 ± 0.002</td><td>0.2</td></tr></table>
|
| 160 |
+
|
| 161 |
+
Human Activity Experiments: Table 2 shows that the mTAND-based classifiers achieve significantly better performance than the baseline models on this prediction task, followed by ODE-based models and IP-Nets.
|
| 162 |
+
|
| 163 |
+
Additional Experiments: In Appendix A.2, we demonstrate the effectiveness of learning temporally distributed latent representations with mTANs on a synthetic dataset. We show that mTANs are able to capture local structure in the time series better than latent ODE-based methods that encode to a single time point. This property of mTANs helps to improve the interpolation performance in terms of mean squared error.
|
| 164 |
+
|
| 165 |
+
We also perform ablation experiments to show the performance gain achieved by learning similarity kernels and time embeddings in Appendix A.1. In particular, we show that learning the time embedding improves classification performance compared to using fixed positional encodings. We also demonstrate the effectiveness of learning the similarity kernel by comparing to an approach that uses fixed RBF kernels. Appendix A.1 shows that learning the similarity kernel using the mTAND module performs as well as or better than using a fixed RBF kernel.
|
| 166 |
+
|
| 167 |
+
# 6 DISCUSSION AND CONCLUSIONS
|
| 168 |
+
|
| 169 |
+
In this paper, we have presented the Multi-Time Attention (mTAN) module for learning from sparse and irregularly sampled data along with a VAE-based encoder-decoder model leveraging this module. Our results show that the resulting model performs as well or better than a range of baseline and state-of-the-art models on both the interpolation and classification tasks, while offering training times that are one to two orders of magnitude faster than previous state of the art methods. While in this work we have focused on a VAE-based encoder-decoder architecture, the proposed mTAN module can be used to provide an interface between sparse and irregularly sampled time series and many different types of deep neural network architectures including GAN-based models. Composing the mTAN module with convolutional networks instead of recurrent architectures may also provide further computational enhancements due to improved parallelism.
|
| 170 |
+
|
| 171 |
+
# ACKNOWLEDGEMENTS
|
| 172 |
+
|
| 173 |
+
Research reported in this paper was partially supported by the National Institutes of Health under award numbers 5U01CA229445 and 1P41EB028242.
|
| 174 |
+
|
| 175 |
+
# REFERENCES
|
| 176 |
+
|
| 177 |
+
Xiangrui Cai, Jinyang Gao, Kee Yuan Ngiam, Beng Chin Ooi, Ying Zhang, and Xiaojie Yuan. Medical concept embedding with time-aware attention. In IJCAI, 2018.
|
| 178 |
+
|
| 179 |
+
Zhengping Che, Sanjay Purushotham, Kyunghyun Cho, David Sontag, and Yan Liu. Recurrent neural networks for multivariate time series with missing values. Scientific Reports, 8(1):6085, 2018.
|
| 180 |
+
|
| 181 |
+
Tian Qi Chen, Yulia Rubanova, Jesse Bettencourt, and David K Duvenaud. Neural ordinary differential equations. In Advances in Neural Information Processing Systems 31, pp. 6571–6583. 2018.
|
| 182 |
+
|
| 183 |
+
Junyoung Chung, C¸ aglar G ˘ ul¨ c¸ehre, Kyunghyun Cho, and Yoshua Bengio. Empirical evaluation of gated recurrent neural networks on sequence modeling. arXiv e-prints, abs/1412.3555, 2014. URL https://arxiv.org/abs/1412.3555. Presented at the Deep Learning workshop at NIPS2014.
|
| 184 |
+
|
| 185 |
+
J.S. Clark and O.N. Bjørnstad. Population time series: process variability, observation errors, missing values, lags, and hidden states. Ecology, 85(11):3140–3150, 2004.
|
| 186 |
+
|
| 187 |
+
Edward De Brouwer, Jaak Simm, Adam Arany, and Yves Moreau. Gru-ode-bayes: Continuous modeling of sporadically-observed time series. In Advances in Neural Information Processing Systems 32, pp. 7379–7390. Curran Associates, Inc., 2019.
|
| 188 |
+
|
| 189 |
+
Joseph Futoma, Sanjay Hariharan, and Katherine A. Heller. Learning to detect sepsis with a multitask gaussian process RNN classifier. In Proceedings of the 34th International Conference on Machine Learning, pp. 1174–1182, 2017.
|
| 190 |
+
|
| 191 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
|
| 192 |
+
|
| 193 |
+
Max Horn, Michael Moor, Christian Bock, Bastian Rieck, and Karsten Borgwardt. Set functions for time series. In Proceedings of the 25th International Conference on Machine Learning, 2020.
|
| 194 |
+
|
| 195 |
+
Alistair EW Johnson, Tom J Pollard, Lu Shen, H Lehman Li-wei, Mengling Feng, Mohammad Ghassemi, Benjamin Moody, Peter Szolovits, Leo Anthony Celi, and Roger G Mark. Mimic-iii, a freely accessible critical care database. Scientific Data, 3:160035, 2016.
|
| 196 |
+
|
| 197 |
+
S. Kazemi, R. Goel, Sepehr Eghbali, Janahan Ramanan, Jaspreet Sahota, Sanjay Thakur, S. Wu, C. Smyth, P. Poupart, and Marcus A. Brubaker. Time2vec: Learning a vector representation of time. ArXiv, abs/1907.05321, 2019.
|
| 198 |
+
|
| 199 |
+
Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In 2nd International Conference on Learning Representations, 2014.
|
| 200 |
+
|
| 201 |
+
Steven Cheng-Xian Li and Benjamin M Marlin. A scalable end-to-end gaussian process adapter for irregularly sampled time series classification. In Advances In Neural Information Processing Systems, pp. 1804–1812, 2016.
|
| 202 |
+
|
| 203 |
+
Steven Cheng-Xian Li and Benjmain M. Marlin. Classification of sparse and irregularly sampled time series with mixtures of expected Gaussian kernels and random features. In 31st Conference on Uncertainty in Artificial Intelligence, 2015.
|
| 204 |
+
|
| 205 |
+
Zachary C Lipton, David Kale, and Randall Wetzel. Directly modeling missing data in sequences with rnns: Improved classification of clinical time series. In Machine Learning for Healthcare Conference, pp. 253–270, 2016.
|
| 206 |
+
|
| 207 |
+
Benjamin M. Marlin, David C. Kale, Robinder G. Khemani, and Randall C. Wetzel. Unsupervised pattern discovery in electronic health care data using probabilistic clustering models. In Proceedings of the 2nd ACM SIGHIT International Health Informatics Symposium, pp. 389–398, 2012.
|
| 208 |
+
|
| 209 |
+
Michael C. Mozer, Denis Kazakov, and Robert V. Lindsey. Discrete event, continuous time rnns. CoRR, abs/1710.04110, 2017. URL http://arxiv.org/abs/1710.04110.
|
| 210 |
+
|
| 211 |
+
Daniel Neil, Michael Pfeiffer, and Shih-Chii Liu. Phased lstm: Accelerating recurrent network training for long or event-based sequences. In Advances in Neural Information Processing Systems, pp. 3882–3890. 2016.
|
| 212 |
+
|
| 213 |
+
Xueping Peng, Guodong Long, Tao Shen, Sen Wang, J. Jiang, and Michael Blumenstein. Temporal self-attention network for medical concept embedding. 2019 IEEE International Conference on Data Mining (ICDM), pp. 498–507, 2019.
|
| 214 |
+
|
| 215 |
+
Trang Pham, Truyen Tran, Dinh Phung, and Svetha Venkatesh. Predicting healthcare trajectories from medical records: A deep learning approach. Journal of Biomedical Informatics, 69, 04 2017. doi: 10.1016/j.jbi.2017.04.001.
|
| 216 |
+
|
| 217 |
+
Danilo Jimenez Rezende, Shakir Mohamed, and Daan Wierstra. Stochastic backpropagation and approximate inference in deep generative models. In Proceedings of the 31st International Conference on Machine Learning, pp. 1278–1286, 2014.
|
| 218 |
+
|
| 219 |
+
Yulia Rubanova, Ricky T. Q. Chen, and David K Duvenaud. Latent ordinary differential equations for irregularly-sampled time series. In Advances in Neural Information Processing Systems 32, pp. 5320–5330. Curran Associates, Inc., 2019.
|
| 220 |
+
|
| 221 |
+
T. Ruf. The lomb-scargle periodogram in biological rhythm research: analysis of incomplete and unequally spaced time-series. Biological Rhythm Research, 30(2):178–201, 1999.
|
| 222 |
+
|
| 223 |
+
Jeffrey D Scargle. Studies in astronomical time series analysis. ii-statistical aspects of spectral analysis of unevenly spaced data. The Astrophysical Journal, 263:835–853, 1982.
|
| 224 |
+
|
| 225 |
+
M. Schulz and K. Stattegger. Spectrum: Spectral analysis of unevenly spaced paleoclimatic time series. Computers & Geosciences, 23(9):929–945, 1997.
|
| 226 |
+
|
| 227 |
+
Satya Narayan Shukla and Benjamin M Marlin. Interpolation Prediction Networks for Irregularly Sampled Time Series. ICLR, 2019.
|
| 228 |
+
|
| 229 |
+
Ikaro Silva, George Moody, Daniel Scott, Leo Celi, and Roger Mark. Predicting in-hospital mortality of icu patients: The physionet/computing in cardiology challenge 2012. Computing in cardiology, 39:245–248, 2012.
|
| 230 |
+
|
| 231 |
+
Huan Song, Deepta Rajan, Jayaraman J. Thiagarajan, and Andreas Spanias. Attend and diagnose: Clinical time series analysis using attention models. In 32nd AAAI Conference on Artificial Intelligence, AAAI 2018, pp. 4091–4098. AAAI press, January 2018.
|
| 232 |
+
|
| 233 |
+
Qingxiong Tan, Mang Ye, Baoyao Yang, Siqi Liu, Andy Jinhua Ma, Terry Cheuk-Fung Yip, Grace Lai-Hung Wong, and Pongchi Yuen. Data-gru: Dual-attention time-aware gated recurrent unit for irregular multivariate time series. In AAAI, 2020.
|
| 234 |
+
|
| 235 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, undefinedukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pp. 6000–6010, 2017.
|
| 236 |
+
|
| 237 |
+
Da Xu, Chuanwei Ruan, Evren Korpeoglu, Sushant Kumar, and Kannan Achan. Self-attention with functional time representation learning. In Advances in Neural Information Processing Systems 32, pp. 15915–15925. 2019.
|
| 238 |
+
|
| 239 |
+
Pranjul Yadav, Michael Steinbach, Vipin Kumar, and Gyorgy Simon. Mining electronic health records (ehrs): A survey. ACM Computing Surveys (CSUR), 50(6):85, 2018.
|
| 240 |
+
|
| 241 |
+
J. Yoon, W. R. Zame, and M. van der Schaar. Estimating missing data in temporal data streams using multi-directional recurrent neural networks. IEEE Transactions on Biomedical Engineering, 66(5): 1477–1490, 2019. doi: 10.1109/TBME.2018.2874712.
|
| 242 |
+
|
| 243 |
+
Jinsung Yoon, William R Zame, and Mihaela Van Der Schaar. Deep sensing: Active sensing using multi-directional recurrent neural networks. ICLR, 2018.
|
| 244 |
+
|
| 245 |
+
Yuan Zhang, Xi Yang, Julie Ivy, and Min Chi. Attain: Attention-based time-aware lstm networks for disease progression modeling. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, pp. 4369–4375, 2019.
|
| 246 |
+
|
| 247 |
+
# A APPENDIX
|
| 248 |
+
|
| 249 |
+
# A.1 ABLATION STUDY
|
| 250 |
+
|
| 251 |
+
In this section, we perform ablation experiments to show the performance gain achieved by learning similarity kernel and time embedding. Table 3 shows the ablation results by substituting fixed positional encoding (Vaswani et al., 2017) in place of learnable time embedding defined in Equation 1 in mTAND-Full model on PhysioNet and MIMIC-III dataset for classification task. We report the average AUC score over 5 runs. As we can see from Table 3, learning the time embedding improves AUC score by $1 \%$ as compared to using fixed positional encodings.
|
| 252 |
+
|
| 253 |
+
Table 3: Ablation with time embedding
|
| 254 |
+
|
| 255 |
+
<table><tr><td>Dataset</td><td>Time Embedding</td><td>AUC Score</td></tr><tr><td>PhysioNet</td><td>Positional Encoding Learned Time Embedding</td><td>0.845 ± 0.004 0.858 ± 0.004</td></tr><tr><td>MIMIC-III</td><td>Positional Encoding Learned Time Embedding</td><td>0.843 ± 0.001 0.854 ± 0.002</td></tr></table>
|
| 256 |
+
|
| 257 |
+
Since mTANs are fundamentally continuous-time interpolation-based models, we perform an ablation study by comparing mTANs with the IP-nets (Shukla & Marlin, 2019). IP-Nets use several semiparametric RBF interpolation layers, followed by a GRU to model irregularly sampled time series. In this framework, we replace the RBK kernel with a learnable similarity kernel using mTAND module, the corresponding model is mTAND-Enc. Table 4 compares the performance of the two methods on classification task on PhysioNet, MIMIC-III and Human Activity dataset. We report the average AUC score over 5 runs. Table 4 shows that learning the similarity kernel using mTAND module performs as well or better than using a fixed RBF kernel.
|
| 258 |
+
|
| 259 |
+
Table 4: Comparing interpolation kernels
|
| 260 |
+
|
| 261 |
+
<table><tr><td>Dataset</td><td>Model</td><td>AUC Score</td></tr><tr><td rowspan="2">PhysioNet</td><td>IP-Nets</td><td>0.819 ± 0.006</td></tr><tr><td>mTAND-Enc</td><td>0.854 ± 0.001</td></tr><tr><td rowspan="2">MIMIC-III</td><td>IP-Nets</td><td>0.839 ± 0.001</td></tr><tr><td>mTAND-Enc</td><td>0.842 ± 0.001</td></tr><tr><td rowspan="2">Human Activity</td><td>IP-Nets</td><td>0.869 ± 0.007</td></tr><tr><td>mTAND-Enc</td><td>0.907 ± 0.002</td></tr></table>
|
| 262 |
+
|
| 263 |
+
# A.2 SYNTHETIC INTERPOLATION EXPERIMENTS
|
| 264 |
+
|
| 265 |
+
To demonstrate the capabilities of our model on the interpolation task, we generate a synthetic dataset consisting of 1000 trajectories each of 100 time points sampled over $t \in [ 0 , 1 ]$ . We fix 10 reference points and use RBF kernel with a fixed bandwidth of 100 for constructing local interpolations at 100 time points over [0, 1]. The values at the reference points are drawn from a standard normal distribution.
|
| 266 |
+
|
| 267 |
+
We randomly sample 20 observations from each trajectory to simulate a sparse and irregularly sampled multivariate time series. We use $8 0 \%$ of the data for training and $2 0 \%$ for testing. At test time, encoder conditions on 20 irregularly sampled time points and the decoder generates interpolations on all 100 time points. Figure 3 illustrates the interpolation results on the test set for the Multi-Time Attention Network and Latent ODE model with ODE encoder (Rubanova et al., 2019). For both the models, we draw 100 samples from the approximate posterior distribution. As we can see from Figure 3, the ODE interpolations are much smoother and haven’t been able to capture the local structure as well as mTANS.
|
| 268 |
+
|
| 269 |
+

|
| 270 |
+
Figure 3: Interpolations on the synthetic interpolation dataset. The columns represent 3 different examples. First row: Ground truth trajectories with observed points, second row: reconstructions on the complete range $t \in [ 0 , 1 ]$ using the proposed model mTAN, third row: reconstructions on the complete range $t \in [ 0 , 1 ]$ using the Latent ODE model with ODE encoder.
|
| 271 |
+
|
| 272 |
+
Table 5: Synthetic Data: Mean Squared Error
|
| 273 |
+
|
| 274 |
+
<table><tr><td>Latent Dimension</td><td>Model</td><td>Reconstruction</td><td>Interpolation</td></tr><tr><td>10</td><td>L-ODE-ODE</td><td>0.0209</td><td>0.0571</td></tr><tr><td rowspan="2"></td><td>mTAND-Full</td><td>0.0088</td><td>0.0409</td></tr><tr><td>L-ODE-ODE</td><td>0.0191</td><td>0.0541</td></tr><tr><td>20</td><td>mTAND-Full</td><td>0.0028</td><td>0.0335</td></tr></table>
|
| 275 |
+
|
| 276 |
+
Table 5 compares the proposed model with best performing baseline Latent-ODE with ODE encoder (L-ODE-ODE) on reconstruction and interpolation task. For both the tasks, we condition on the 20 irregularly sampled time points and reconstruct the input points (reconstruction) and the whole set of 100 time points (interpolation). We report the mean squared error on test set.
|
| 277 |
+
|
| 278 |
+
# A.3 ARCHITECTURE DETAILS
|
| 279 |
+
|
| 280 |
+
Multi-Time Attention Network (mTAND-Full): In our proposed encoder-decoder framework (Figure 2), we use bi-directional GRU as the recurrent model in both encoder and decoder. In encoder, we use a 2 layer fully connected network with 50 hidden units and ReLU activations to map the RNN hidden state at each reference point to mean and variance. Similarly in decoder, mTAN embeddings are independently decoded using a 2 layer fully connected network with 50 hidden units and ReLU activations, and the result is used to parameterize the output distribution. For classification tasks, we use a separate GRU layer on top of the latent states followed by a 2-layer fully connected layer with 300 units and ReLU activations to output the class probabilities.
|
| 281 |
+
|
| 282 |
+
Multi-Time Attention Encoder (mTAND-Enc): As we show in the experiments, the proposed mTAN module can standalone be used for classification tasks. The mTAND-Enc consists of MultiTime attention module followed by GRU to extract the final hidden state which is then passed to a 2-layer fully connected layer to output the class probabilities.
|
| 283 |
+
|
| 284 |
+
Loss Function: For computing the evidence lower bound (ELBO) during training, we use negative log-likelihood with fixed variance as the reconstruction loss. For all the datasets, we use a fixed variance of 0.01. For computing ELBO, we use 5 samples for interpolation task and 1 sample for classification tasks. We use cross entropy loss for classification. For the classification tasks, we tune the $\lambda$ parameter in the supervised learning loss function (Equation 15). We achieved best performance using $\lambda$ as 100 and 5 for Physionet, MIMIC-III respectively. For human activity dataset, we achieved best results without using the regulaizer or ELBO component. We found that KL annealing with coeff 0.99 improved the performance of interpolation and classification tasks on Physionet.
|
| 285 |
+
|
| 286 |
+
# A.4 HYPERPARAMETERS
|
| 287 |
+
|
| 288 |
+
Baselines: For Physionet and Human Activity dataset, we use the reported hyperparameters for RNN baselines as well as ODE models from Rubanova et al. (2019). For MIMIC-III dataset, we independently tune the hyperparameters of the baseline models on the validation set. We search for GRU hidden units, latent dimension, number of hidden units in fully connected network for ODE function in recognition and generative model over the range $\{ 2 0 , 3 2 , 6 4 , 1 2 8 , 2 5 6 \}$ . For ODEs, we also searched the number of layers in fully connected network in the range $\{ 1 , 2 , 3 \}$ .
|
| 289 |
+
|
| 290 |
+
mTAN: We learn time embeddings of size 128. The number of embeddings $H \in \{ 1 , 2 , 4 \}$ . The linear projection matrices used for projecting time embedding $W$ are each $d _ { k } * d _ { k } / h$ where $d _ { k }$ is the embedding size. We search the latent dimension and GRU encoder hidden size over the range $\{ 3 2 , 6 4 , 1 \bar { 2 } 8 \}$ . We keep GRU decoder hidden size at 50. For the classification tasks, we use 128 reference points. For interpolation task, we search number of reference points over the range $\{ 8 , 1 6 , 3 2 , 6 4 , 1 2 8 \}$ . We use Adam Optimizer for training the models. For classification, experiments are run for 300 iteration with learning rate 0.0001, while for interpolation task experiments are run for 500 iterations with learning rate 0.001. Best hyperparameters are reported in the code.
|
| 291 |
+
|
| 292 |
+
# A.5 VISUALIZING ATTENTION WEIGHTS
|
| 293 |
+
|
| 294 |
+

|
| 295 |
+
Figure 4: Visualization of attention weights. mTAN learns an interpolation over the query time points by attending to the observed values at key time points. The brighter edges correspond to higher attention weights.
|
| 296 |
+
|
| 297 |
+
In this section, we visualize the attention weights learned by our proposed model. We experiment using synthetic dataset (described in A.2) which consists of univariate time series. Figure 4 shows the attention weights learned by the encoder mTAND module. The input shown in the figure is the irregularly sampled time points and the edges show how the output at reference points attends to the values on the input time points. The final output can be computed by substituting the attention weights in Equation 3.
|
| 298 |
+
|
| 299 |
+
# A.6 TRAINING DETAILS
|
| 300 |
+
|
| 301 |
+
# A.6.1 DATA GENERATION AND PREPROCESSING
|
| 302 |
+
|
| 303 |
+
All the datasets used in the experiments are publicly available and can be downloaded using the following links:
|
| 304 |
+
|
| 305 |
+
PhysioNet: https://physionet.org/content/challenge-2012/ MIMIC-III: https://mimic.physionet.org/
|
| 306 |
+
|
| 307 |
+
Human Activity: https://archive.ics.uci.edu/ml/datasets/Localization+ Data+for+Person+Activity.
|
| 308 |
+
|
| 309 |
+
We rescale each feature to be between 0 and 1 for Physionet and MIMIC-III dataset. We also rescale the time to be in $[ 0 , 1 ]$ for all datasets. In case of MIMIC-III dataset, for the time series missing entirely, we follow the preprocessing steps of Shukla & Marlin (2019) and assign the starting point (time $\scriptstyle \mathrm { t = } 0$ ) value of the time series to the global mean for that variable.
|
| 310 |
+
|
| 311 |
+
# A.6.2 SOURCE CODE
|
| 312 |
+
|
| 313 |
+
The code for reproducing the results in this paper is available at https://github.com/ reml-lab/mTAN.
|
| 314 |
+
|
| 315 |
+
# A.6.3 COMPUTING INFRASTRUCTURE
|
| 316 |
+
|
| 317 |
+
All experiments were run on a Nvidia Titan X GPU.
|
md/train/4c1EiEvivpx/4c1EiEvivpx.md
ADDED
|
@@ -0,0 +1,292 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Neural Scene Flow Prior
|
| 2 |
+
|
| 3 |
+
Xueqian Li∗1,2 Jhony Kaesemodel Pontes1 Simon Lucey2 1Argo AI 2The University of Adelaide
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Before the deep learning revolution, many perception algorithms were based on runtime optimization in conjunction with a strong prior/regularization penalty. A prime example of this in computer vision is optical and scene flow. Supervised learning has largely displaced the need for explicit regularization. Instead, they rely on large amounts of labeled data to capture prior statistics, which are not always readily available for many problems. Although optimization is employed to learn the neural network, the weights of this network are frozen at runtime. As a result, these learning solutions are domain-specific and do not generalize well to other statistically different scenarios. This paper revisits the scene flow problem that relies predominantly on runtime optimization and strong regularization. A central innovation here is the inclusion of a neural scene flow prior, which uses the architecture of neural networks as a new type of implicit regularizer. Unlike learning-based scene flow methods, optimization occurs at runtime, and our approach needs no offline datasets—making it ideal for deployment in new environments such as autonomous driving. We show that an architecture based exclusively on multilayer perceptrons (MLPs) can be used as a scene flow prior. Our method attains competitive—if not better—results on scene flow benchmarks. Also, our neural prior’s implicit and continuous scene flow representation allows us to estimate dense long-term correspondences across a sequence of point clouds. The dense motion information is represented by scene flow fields where points can be propagated through time by integrating motion vectors. We demonstrate such a capability by accumulating a sequence of lidar point clouds.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
State-of-the-art results have recently been achieved by learning-based models [17, 30, 47, 60, 68] for the scene flow problem—the task of estimating 3D motion fields from dynamic scenes. However, such models heavily rely on large-scale data to capture prior knowledge, which is not always readily available. Scene flow annotations are expensive, and most methods train on synthetic and unrealistic scenarios to fine-tune on small real datasets.
|
| 12 |
+
|
| 13 |
+
Poor generalization to unseen, out-of-the-distribution inputs is another problem. Prior information is generally limited to the statistics of the data used for training. Real-world applications such as autonomous driving require robust solutions to low-level vision tasks such as depth, optical, and scene flow estimation that work in statistically different scenarios. Inspired by recent innovations that make use of coordinate-based networks (i.e., pixels or 3D positions as inputs) [9, 36, 37, 39, 56] for 3D modeling and rendering, we investigate the use of such networks to regularize the scene flow problem without any learning directly from point clouds. Optimization happens at runtime, and instead of learning a prior from data, the network structure itself captures the prior information. It is not limited to the statistics of a specific dataset.
|
| 14 |
+
|
| 15 |
+
Optimizing neural networks at execution time is not new. Ulyanov et al. [63] showed that a randomly initialized convolutional network could be used as a handcrafted prior for standard inverse problems such as image denoising, super-resolution, and inpainting. Ding and Feng [12] proposed a runtime optimization method (DeepMapping) for rigid pose estimation using deep neural networks. Although such deep image priors, deep mapping, and coordinate-based networks for neural scene representations have been successfully applied for inverse problems, rendering, and rigid registration, none has yet investigated (to the best of our knowledge) the use of network-based priors for regularizing scene flow directly from point clouds.
|
| 16 |
+
|
| 17 |
+
Our proposed neural prior is based on a simple multilayer perceptron (MLP) architecture, and we show it is powerful enough to regularize scene flow given two point clouds implicitly. The input to the network is 3D points, and the output is a regularized scene flow.
|
| 18 |
+
|
| 19 |
+
Our neural prior allows for a continuous scene flow representation instead of discrete such as in graph Laplacian-based priors, e.g., [45]. We show how the flow fields captured by our neural
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: Our neural scene flow prior method achieved higher accuracy while being ${ \sim } 1 0 \times$ faster than the recent runtime optimization method graph prior [45]. The evaluation was on the KITTI Scene Flow test set, where each point cloud size varies from $1 4 \mathrm { k }$ to $6 8 \mathrm { k }$ points. In our method, we fixed the number of hidden layers in the MLP to 4 and varied the number of hidden units. In the graph prior method, we varied the number of neighbors to create the graph. Accuracy uses the $A c c _ { 5 }$ metric as defined in the experiments section. Learningbased methods might still be $1 0 \times - 1 0 0 \times$ faster than the runtime optimization methods, but they still lack generalization and have memory issues when dealing with large point clouds—with tens of thousands of points.
|
| 23 |
+
|
| 24 |
+
prior can be employed to estimate long-term correspondences across a sequence of point clouds. The continuous scene flow allows for better integration of motions across time.
|
| 25 |
+
|
| 26 |
+
Our results are promising and competitive to supervised [30], self-supervised [38, 68], and nonlearning methods [1, 45] (see Table 1). Our method also scales to real-world point clouds with tens of thousands of points while achieving better accuracy and time complexity than recent runtime optimization methods (see Fig. 1).
|
| 27 |
+
|
| 28 |
+
# 2 Related work
|
| 29 |
+
|
| 30 |
+
Non-learning-based scene flow Scene flow is the uplift from the optical flow, which is proposed by Vedula et al. [64] as the non-rigid motion field in the 3D space. The authors proposed the optimization-based scene flow estimation using image sequences to infer reconstruction knowledge of the flow in 3D surfaces. Successive RGB/RGB-D image-based work [4, 18–21, 27, 43, 44, 50] used probability-based estimation, coarse-to-fine techniques, 6-DoF parameterization, or object segmentation, etc., to improve accuracy and computation time. Although image-based scene flow methods are widely used, direct estimation of the scene flow from the point cloud is still possible through non-rigid registration methods, such as [1, 10, 26, 42]. In this paper, we focus on point cloud-based scene flow estimation.
|
| 31 |
+
|
| 32 |
+
Learning-based scene flow Image-based learning methods [6, 51, 54, 60, 70] use convolution and data supervision to solve scene flow from monocular or RGB-D images with the available depth information. Other image-based methods [22, 23, 32, 52, 53] take care of extra occlusion cues in the large-scale autonomous driving scenes. Point-based learning methods have become more prevalent with the rapid development of point cloud feature learning [28, 48, 49, 65, 67]. FlowNet3D [30] is a seminal work that estimates scene flow using PointNet+ $^ +$ [49]. Successive work [17, 31, 47, 66] extends point-based learning methods using different feature extraction techniques. One obvious drawback of these supervised learning methods is the demand for sufficient ground truth labels. Besides, supervised methods lack generalizability while eventually only fitting domain-specific data. Self-supervised methods [25, 38, 61, 68], on the other hand, replaced the loss between the prediction and the ground truth flow with a point distance loss to use the point cloud itself as supervision.
|
| 33 |
+
|
| 34 |
+
Self-supervision can adapt to different datasets and maintain certain generalizability. Nonetheless, massive training data are still required for sufficient learning.
|
| 35 |
+
|
| 36 |
+
The graph Laplacian method Graph Laplacian [2] is widely used to smooth the surface in mesh processing [5, 14, 57, 58], point cloud denoising [11, 71], etc. Here we talk about the recent scene flow estimation using Graph Laplacian [45]. The method explicitly constructed a graph of the point cloud to constrain the non-rigid scene flow as rigid within a specific range. While as a dataless runtime optimization, the method is heavily affected by the hyperparameters of the graph and loses scalability when the point cloud becomes larger or the neighbors in the graph grow.
|
| 37 |
+
|
| 38 |
+
Deep neural prior, implicit functions, and neural rendering Although large-scale data helps in feature representation [59], end-to-end learning still requires high computation capacity and readily available training datasets. Instead, Ulyanov et al. [63] proposed a new style of optimization that uses a convolutional neural network to infer prior knowledge from the network architecture. One broader interest is to extend the idea of the network being an image function to the 3D shape modeling, and implicitly represent the continuous shape as level sets of neural networks. By directly mapping the 3D input to binary occupancy nets [9, 36], or signed distance functions [3, 39, 55], it is powerful to model the 3D geometries in a continuous space using the coordinate-based network. The following Scene Representation Networks [56] takes advantage of the coordinate-based network and renders view synthetic images. Mildenhall et al. proposed a seminal work NeRF [37], which is a novel way to do neural volume rendering using both point positions and viewing directions based on the coordinate-based network. Dynamic scene synthesis work [13, 16, 29, 40, 46, 62, 69] follows the NeRF framework, and integrates the motions to generate dynamic scenes. Some of the work [16, 29] use scene flow to further constrain or segment dynamic scenes. An interesting work that solves for the rigid alignment between point clouds using runtime optimization is DeepMapping [12]. However, this work only deals with rigid motion, and the network architecture is more complex than coordinate-based networks. In this work, we are interested in coordinate-based networks to address the large-scale, real-world scene flow problem.
|
| 39 |
+
|
| 40 |
+
# 3 Approach
|
| 41 |
+
|
| 42 |
+
Problem definition Let $S _ { 1 }$ and $S _ { 2 }$ be two 3D point clouds sampled from a dynamic scene at time $t$ -1 and $t$ . The number of points in each point cloud, $| S _ { 1 } |$ and $| S _ { 2 } |$ , are typically different and not in correspondence. A 3D point $\mathbf { p } \in S _ { 1 }$ moving from time $t \mathrm { - } 1$ to time $t$ can be modeled by a translational vector (or flow vector) $\bar { \mathbf { f } } \in \mathbb { R } ^ { 3 }$ , where $\mathbf { p ^ { \prime } } = \mathbf { p } + \mathbf { f }$ . The collection of flow vectors for all 3D points is the scene flow $\mathcal { F } = \{ \mathbf { f } _ { i } \} _ { i = 1 } ^ { | S _ { 1 } | }$ .
|
| 43 |
+
|
| 44 |
+
Optimization We want to optimize for a scene flow $\mathcal { F }$ that minimizes the distance between the two point clouds, $S _ { 1 }$ and $S _ { 2 }$ . Given the non-rigidity assumption of the scene, the optimization is inherently unconstrained. Thus, a regularization term C is necessary to constrain the motion field. We therefore solve for scene flow as
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
\mathcal { F } ^ { * } = \underset { \mathcal { F } } { \arg \operatorname* { m i n } } \sum _ { \mathbf { p } \in S _ { 1 } } \mathbf { D } \left( \mathbf { p } + \mathbf { f } , S _ { 2 } \right) + \lambda \mathbf { C } ,
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
where $\mathrm { D }$ is a function to compute the distance from the perturbed point $\mathbf { p }$ by the flow vector f to its closest neighbor in $S _ { 2 }$ . C is a regularizer (e.g., Laplacian regularizer), and $\lambda$ is a weighting factor for the regularizer. In this paper, we want to investigate using a neural prior to regularize the scene flow.
|
| 51 |
+
|
| 52 |
+
# 3.1 Neural scene flow prior
|
| 53 |
+
|
| 54 |
+
Learning-based scene flow methods learn scene flow priors from a large number of examples. As in Deep Image Prior [63], we want to investigate if the structure of a neural network by itself is sufficient to capture a scene flow prior without any learning.
|
| 55 |
+
|
| 56 |
+
Here we use a neural network as an implicit regularizer. The parameters are optimized as
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\Theta ^ { * } = \underset { \Theta } { \arg \operatorname* { m i n } } \sum _ { \mathbf { p } \in S _ { 1 } } \mathrm { D } \left( \mathbf { p } + g \left( \mathbf { p } ; \Theta \right) , S _ { 2 } \right) ,
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where $g$ is a neural network parameterized by $\Theta$ to regularize the scene flow $\mathcal { F }$ . The input to $g$ is $\mathbf { p }$ which is the point to be disturbed by the flow. The output of $g$ is $\mathbf { f }$ and thus $\mathbf { f } ^ { * } = g \left( \mathbf { p } ; \mathbf { \bar { \Theta } } \right)$ . For the distance function D, we define it as
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\mathbf { D } \left( \mathbf { p } , \pmb { S } \right) = \operatorname* { m i n } _ { \mathbf { x } \in \pmb { S } } \| \mathbf { p } - \mathbf { x } \| _ { 2 } ^ { 2 } .
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
In practice, we use it bidirectionally for both point sets, which is equivalent to Chamfer distance [15].
|
| 69 |
+
|
| 70 |
+
The objective in Eq. (2), is for the forward scene flow $\mathcal { F }$ , which is the one we are interested in. However, it has been shown in [30, 38], that a cycle consistency regularizer encourages better scene flow estimations. The extra regularizer simply enforces the backward flow to be similar to the forward flow, $\mathcal { F } _ { b w d } \approx \mathcal { F }$ . The optimal backward flow is defined as $\mathbf { f } _ { b w d } ^ { * } = g \left( \mathbf { p } ^ { \prime } ; \mathbf { \Theta } \Theta _ { b w d } ^ { * } \right)$ , where $\mathbf { p } ^ { \prime }$ is the shifted point by the forward flow as $\mathbf { p } + \mathbf { f }$ . Note that the network $g$ is the same but with different parameters, $\Theta _ { b w d }$ . Using the backward flow as an additional constraint, the optimal network weights are solved as
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\Theta ^ { * } , \Theta _ { b w d } ^ { * } = \underset { \Theta , \Theta _ { b w d } } { \mathrm { a r g } \mathrm { m i n } } \sum _ { \mathbf { p } \in S _ { 1 } } \mathbf { D } \left( \mathbf { p } + g \left( \mathbf { p } ; \Theta \right) , S _ { 2 } \right) + \sum _ { \mathbf { p } ^ { \prime } \in S _ { 1 } ^ { \prime } } \mathbf { D } \left( \mathbf { p } ^ { \prime } + g \left( \mathbf { p } ^ { \prime } ; \Theta _ { b w d } \right) , S _ { 1 } \right) ,
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $ { \boldsymbol { S } } _ { 1 } ^ { \prime }$ is the shifted $S _ { 1 }$ by the forward flow, i.e., $S _ { 1 } ^ { \prime } = S _ { 1 } { + } \mathcal { F }$ . Please find more details in the supplementary material. For the network $g$ , we use MLPs with ReLU activations. The objective function in Eq. (4) can be optimized by gradient descent techniques using off-the-shelf frameworks with automatic differentiation. We show in the experiments section how the architecture of the neural prior affects performance by varying the number of hidden layers and units.
|
| 77 |
+
|
| 78 |
+
Why use a neural scene flow prior? Deep learning relies on massive amounts of data and computational resources to capture prior statistics. Although learning methods have achieved impressive results in most tasks, they still struggle when deployed in environments where the statistics are different from those captured during learning. Our intuition is that a neural prior acts as a strong implicit regularizer that constrains dynamic motion fields to be as smooth as possible. A neural scene flow prior also scales to large scenes while achieving high-fidelity results at a low computational cost. Our proposed method with 8 hidden layers and 128 hidden units has about $1 1 6 \mathrm { k }$ parameters. FlowNet3D [30], for example, has about 1.2M parameters. Our method has ${ \sim } 1 0 \times$ fewer parameters than the state-of-the-art supervised methods while achieving competitive, if not better, results. Lastly, our deep scene flow prior captures a continuous flow field that allows us to perform better scene flow interpolation across a sequence of point clouds.
|
| 79 |
+
|
| 80 |
+
# 4 Experiments
|
| 81 |
+
|
| 82 |
+
We evaluated the performance (accuracy, generalizability, and computational cost) of our neural prior for scene flow on synthetic and real-world datasets. We performed experiments on different neural network settings and analyzed the performance of the neural prior to regularizing scene flow. Remarkably, we show that a simple MLP-based prior to regularize scene flow is enough to achieve competitive results to the state-of-the-art scene flow methods.
|
| 83 |
+
|
| 84 |
+
Datasets We used four scene flow datasets: 1) FlyingThings3D [33] which is an extensive collection of randomly moving synthetic objects. We used the preprocessed data from [30]; 2) KITTI [34, 35] which has real-world self-driving scenes. We used the subset released by [30]; 3) Argoverse [8] and 4) nuScenes [7] are two large-scale autonomous driving datasets with challenging dynamic scenes. However, there are no official scene flow annotations. We followed the data processing method in [45] to collect pseudo-ground-truth scene flow. Ground points were removed from lidar point clouds as in [30] (please refer to the supplementary material for more details).
|
| 85 |
+
|
| 86 |
+
Metrics We employed the widely used metrics as in [30, 38, 45, 68] to evaluate our method, which are: $\mathcal { E }$ to denote the end-point error (EPE), which is the mean absolute distance of two point clouds; $A c c _ { 5 }$ to denote the accuracy in percentage of estimated flows when $\mathcal { E } < 0 . 0 5 \mathrm { m }$ or $\mathcal { E } ^ { \prime } < 5 \%$ , where $\mathcal { E } ^ { \prime }$ is the relative error; $A c c _ { 1 0 }$ denotes the percentage of estimated flows where $\mathcal { E } < 0 . 1 \mathrm { m }$ or $\mathcal { E } ^ { \prime } < 1 0 \%$ ; and $\theta _ { \epsilon }$ which is the mean angle error between the estimated and ground-truth scene flows.
|
| 87 |
+
|
| 88 |
+
Implementation details We defined our neural prior for scene flow as a simple coordinate-based MLP architecture with 8 hidden layers, a fixed length of 128 for the hidden units, Rectified Linear Unit (ReLU) activation and shared weights across points. The network input is the 3D point cloud $\mathbf { P } _ { t - 1 }$ , and the output is the scene flow F. We used PyTorch [41] for the implementation and optimized the objective function with Adam [24]. The weights were randomly initialized. We set a fixed learning rate of $8 \mathrm { { e } - 3 }$ and run the optimization for 5k iterations with early stopping on the loss. For our settings and datasets, we found the optimization to mostly converge in less than 1k iterations. All experiments were run on a machine with an NVIDIA Quadro P5000 GPU and a 16 Intel(R) Xeon(R) W-2145 CPU $\textcircled { a } 3 . 7 0 \mathrm { G H z }$ .
|
| 89 |
+
|
| 90 |
+
Training setup for the learning-based methods We used the publicly available implementation of the learning-based methods to perform our experiments. The training settings for each method are: FlowNet3D and full-supervised PointPWC-Net: trained on FlyingThings3D with supervision; and self-supervised Just Go with the Flow and PointPWC-Net: trained on FlyingThings3D with supervision and fine-tuned on domain-matched datasets with self-supervision (i.e., fine-tuned and tested on statistically similar data, KITTI, nuScenes, Argoverse respectively). Note that FlowNet3D and full-supervised PointPWC-Net was only trained on the synthetic FlyingThings3D to demonstrate the poor generalizability of learning-based methods to other domains. Just Go with the Flow and self-supervised PointPWC-Net were trained using self-supervision, and although they do not require ground-truth annotations, they still require large-scale datasets for training to achieve competitive performance. Note that these self-supervised methods were both pretrained on fullylabeled FlyingThings3D to provide adequate full supervision.
|
| 91 |
+
|
| 92 |
+
Optimization setup for the non-learning methods Non-rigid ICP [1] was originally proposed for mesh registration. We adapted it for point cloud registration. A graph prior was recently proposed in [45] to optimize scene flow from point clouds. We implemented the method using the hyperparameters defined by the authors. The weight for the graph prior term is set to 10, the number of neighbors $k$ to build the $k$ -NN graph, if not explicitly specified, is set to 50, the learning rate to 0.1, and the number of iterations to $1 . 5 \mathrm { k }$ .
|
| 93 |
+
|
| 94 |
+

|
| 95 |
+
Figure 2: We analyzed the performance of our method on the KITTI test set when varying the number of hidden layers and hidden units of the MLP architecture. Accuracy is the $A c c _ { 5 }$ metric.
|
| 96 |
+
|
| 97 |
+
# 4.1 Choosing the neural prior architecture
|
| 98 |
+
|
| 99 |
+
Fig. 2 shows how the performance of our method
|
| 100 |
+
|
| 101 |
+
is affected when varying the neural prior MLP architecture: number of hidden layers and hidden units. The experiments were performed on the KITTI test set and all points included (i.e., without point sampling). The average number of points for the KITTI dataset is about $3 0 \mathrm { k }$ . We ran our method five times with different random seeds to include the uncertainty levels in the plot.
|
| 102 |
+
|
| 103 |
+
Overall, the performance of our method improved as we increased the number of hidden layers and hidden units. For small numbers of hidden layers (e.g., 1 and 2), the performance deteriorated when the number of hidden units is large, around 128 and 256 (or $2 ^ { 7 }$ and $2 ^ { 8 }$ ). We chose the MLP architecture with the best performance with relatively low computation time for our following experiments: 8 hidden layers and 128 $( 2 ^ { 7 } )$ hidden units.
|
| 104 |
+
|
| 105 |
+
# 4.2 Comparing to other methods
|
| 106 |
+
|
| 107 |
+
Table 1 shows how our method stands against other state-of-the-art methods on different datasets and metrics. We set the number of points to 2,048, which follows the experimental protocols as in FlowNet3D [30] and Graph prior [45]. We ran the experiments 5 times to report uncertainties for runtime optimization methods (i.e., our method and the graph prior method [45]) with uncertainties for each run. The learning-based methods and non-rigid ICP are deterministic during runtime.
|
| 108 |
+
|
| 109 |
+
Our method achieved better performance in most datasets and metrics. We considered the well-known Non-rigid ICP as a baseline for the non-learning methods ( ). Our method outperformed the recent graph prior method by a large margin. The supervised FlowNet3D and PointPWC-Net (using fullsupervision loss) methods ( ) had better performance on FlyingThings3D because they were trained on it with supervision. If the dataset is out-of-the-distribution, these supervised methods produced unreliable results. The self-supervised methods ( ), Just Go with the Flow and PointPWC-Net (using self-supervision loss), despite not being exposed to ground-truth labels during training, still generated better results than supervised methods—showing that self-supervision is an important direction for scene flow estimation. Still, it is remarkable that with a simple MLP regularizer and an optimization framework, our method can robustly estimate scene flow from point clouds with great accuracy.
|
| 110 |
+
|
| 111 |
+
Table 1: Performance of our method and others across different datasets and metrics. are supervised methods trained on the synthetic FlyingThings3D dataset. are self-supervised methods trained on FlyingThings3D with supervision and fine-tuned with self-supervision on matched datasets. $\bullet$ are non-learning methods that do not rely on training data. All experiments were run with 2,048 points. ↑ means larger values are better while $\downarrow$ means smaller values are better. We did no report standard deviations smaller than 1e−2.
|
| 112 |
+
|
| 113 |
+
<table><tr><td></td><td colspan="4">FlyingThings3D [33] Train:19,967 samples,Test: 2,000 samples</td><td colspan="4">nuScenes Scene Flow [7] Train:1,513 samples,Test:310 samples</td></tr><tr><td></td><td colspan="4"></td><td colspan="4"></td></tr><tr><td></td><td>ε(m)↓</td><td>Acc5(%) ↑</td><td>Acc10(%) ↑</td><td>0e(rad)↓</td><td>ε(m)↓</td><td>Acc5(%) ↑</td><td>Acc10(%) ↑</td><td>θe(rad)↓</td></tr><tr><td>·FlowNet3D [30]</td><td>0.134</td><td>22.64</td><td>54.17</td><td>0.305</td><td>0.505</td><td>2.12</td><td>10.81</td><td>0.620</td></tr><tr><td>·PointPWC-Net [68]</td><td>0.121</td><td>29.09</td><td>61.70</td><td>0.229</td><td>0.442</td><td>7.64</td><td>22.32</td><td>0.497</td></tr><tr><td>Just Go with the Flow [38]</td><td colspan="4"></td><td>0.625</td><td>6.09</td><td>0.139 22.42</td><td>0.432</td></tr><tr><td>·PointPWC-Net [68]</td><td></td><td></td><td></td><td></td><td>0.431</td><td>6.87</td><td></td><td>0.406</td></tr><tr><td>·Non-rigid ICP [1]</td><td>0.339 0.255</td><td>14.05</td><td>35.68</td><td>0.480</td><td>0.402</td><td>6.99</td><td>21.01</td><td>0.492 0.337</td></tr><tr><td>•Graph prior [45] ·Ours</td><td>0.234</td><td>16.56±0.02 19.16±0.23</td><td>42.05±0.02 46.74±0.46</td><td>0.362 0.341</td><td>0.289 0.175±0.01</td><td>20.12±0.01 35.18±1.32</td><td>43.54±0.02 63.45±0.46</td><td>0.279±0.04</td></tr><tr><td></td><td></td><td colspan="3">KITTI Scene Flow [34,35]</td><td colspan="4"></td></tr><tr><td></td><td colspan="4">Train:100 samples,Test: 50 samples</td><td colspan="4">Argoverse Scene Flow [8] Train:2,691 samples,Test: 212 samples</td></tr><tr><td></td><td>ε(m)↓</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>·FlowNet3D [30]</td><td></td><td>Acc5(%) ↑</td><td>Acc10(%) ↑</td><td>θ(rad)↓</td><td>ε(m)↓</td><td>Acc5(%) ↑</td><td>Acc10(%) ↑</td><td>θ(rad)↓</td></tr><tr><td>·PointPWC-Net [68]</td><td>0.199 0.142</td><td>10.44 29.91</td><td>38.89 59.83</td><td>0.386 0.239</td><td>0.455 0.405</td><td>1.34 8.25</td><td>6.12 25.47</td><td>0.736 0.674</td></tr><tr><td>• Just Go with the Flow [38]</td><td>0.218</td><td></td><td>34.38</td><td>0.254</td><td>0.542</td><td>8.80</td><td>20.28</td><td>0.715</td></tr><tr><td>·PointPWC-Net [68]</td><td>0.177</td><td>10.17 13.29</td><td>42.15</td><td>0.272</td><td>0.409</td><td>9.79</td><td>29.31</td><td>0.643</td></tr><tr><td>•Non-rigid ICP[1]</td><td>0.338</td><td>22.06</td><td>43.03</td><td>0.460</td><td>0.461</td><td>4.27</td><td>13.90</td><td>0.741</td></tr><tr><td>·Graph prior [45]</td><td>0.099</td><td>63.60±0.09</td><td>81.18±0.08</td><td>0.176</td><td>0.257</td><td>25.24±0.04</td><td>47.60±0.02</td><td>0.467</td></tr><tr><td>●Ours</td><td>0.050±0.01</td><td>81.68±2.00</td><td>93.19±1.30</td><td>0.133±0.01</td><td>0.159±0.01</td><td>38.43±0.48</td><td>63.08±0.59</td><td>0.374±0.01</td></tr></table>
|
| 114 |
+
|
| 115 |
+
Our PointPWC-Net results were different from those reported in the PointPWC-Net paper. The reasons are: In the official PointPWC-Net implementation, there is a threshold to limit the lidar point cloud within 35 meters of distance from the center. In our experiments, we used all points available in all ranges (up to $8 5 \mathrm { m }$ ). Lidar point clouds get sparser as the distance increases, making it challenging to estimate scene flow in far ranges and sparse regions. Nevertheless, we did not shy away from this fact in our experiments. Also, in the original PointPWC-Net experiments, the authors used 8,192 points. In ours, we used 2,048 points. Naturally, there exists a performance gap between our reported results and theirs. We decided to use 2,048 points to follow the experiment protocols proposed in FlowNet3D [30] and graph prior [45] to facilitate comparisons across different datasets and models. Although simple and tested on sparse point clouds (2,048 points), our method achieved impressive results on different datasets. Please find further details and additional experiments in the supplementary material.
|
| 116 |
+
|
| 117 |
+
# 4.3 Estimating scene flow from large point clouds with high density
|
| 118 |
+
|
| 119 |
+
Real-world point clouds collected from depth sensors such as lidar typically have tens of thousands of points. We evaluated the performance of our method on large point clouds and compared it against the graph prior method. The KITTI and Argoverse Scene Flow datasets were used, given that both have large point clouds with high density.
|
| 120 |
+
|
| 121 |
+
Fig. 3 shows the performance on the KITTI Scene Flow dataset, in terms of accuracy and computational time, of our method and the graph prior method when varying the number of points. Our method’s accuracy $( A c c _ { 5 } )$ increased as the number of points grew until around $2 0 \mathrm { k }$ points and then saturated, while the computational time slowly increased. In contrast, the graph prior achieved lower accuracy and dramatic growth in computation. The computational complexity of our MLPbased prior grows linearly in the number of points, ${ \mathcal { O } } ( n )$ , while the graph prior grows quadratically in the number of points, $O ( n ^ { 2 } )$ . The graph prior relies on the construction of a graph Laplacian matrix to use as a regularizer (i.e., $\mathbf { L } \in \mathbb { R } ^ { n \times n }$ , where $n$ is the number of points).
|
| 122 |
+
|
| 123 |
+

|
| 124 |
+
Figure 3: Performance of our neural prior and the graph prior [45] when varying the number of points. Our method achieved higher accuracy $( A c c _ { 5 } )$ and better time complexity. Results were averaged over the KITTI Scene Flow dataset.
|
| 125 |
+
|
| 126 |
+
Table 2: Performance of our neural prior and the graph prior [45] when using all points available. Our method achieved better performance on all metrics by a margin while being ${ \sim } 5 \times$ faster if $k { = } 5 0$ and ${ \sim } 1 0 \times$ faster if $k { = } 2 0 0$ (for KITTI).
|
| 127 |
+
|
| 128 |
+
<table><tr><td></td><td colspan="5">KITTI Scene Flow Average number of points:~30k</td></tr><tr><td></td><td>m↓ (m)</td><td>Acc5↑ (%)</td><td>Acc10 ↑ (%)</td><td>↓ (rad)</td><td>Time↓ (s)</td></tr><tr><td>Graph prior (k=50)</td><td>0.225</td><td>65.50</td><td>70.32</td><td>0.277</td><td>162.97</td></tr><tr><td>Graph prior (k=200)</td><td>0.082</td><td>84.00</td><td>88.45</td><td>0.141</td><td>310.12</td></tr><tr><td>Ours</td><td>0.025</td><td>95.68</td><td>98.00</td><td>0.085</td><td>38.33</td></tr><tr><td></td><td colspan="5">Argoverse Scene Flow Average number of points:~50k</td></tr><tr><td></td><td>m↓ (m)</td><td>Acc5↑ (%</td><td>AcC10 ↑ (%)</td><td>0↓ (rad)</td><td>Time↓ (s)</td></tr><tr><td>Graph prior (k=50)</td><td>0.249</td><td>46.92</td><td>61.72</td><td>0.494</td><td>410.21</td></tr><tr><td>Ours</td><td>0.043</td><td>86.04</td><td>94.07</td><td>0.244</td><td>84.46</td></tr></table>
|
| 129 |
+
|
| 130 |
+
The accuracy of the graph prior method degraded after $1 0 \mathrm { k }$ points. The graph regularizer needs more than $5 \mathrm { k }$ iterations for higher density point clouds to converge to a reasonable solution or carefully tuned schedulers to accelerate its convergence. Moreover, the $k$ -NN graph is built with 50 neighbors, and for higher density point clouds, larger graphs might be necessary for a better regularization.
|
| 131 |
+
|
| 132 |
+
Table 2 shows a quantitative comparison between our method and the graph prior method on the KITTI and Argoverse Scene Flow datasets when using all points. Our method achieved better performance on all metrics. We also reported results for the graph prior method when setting the number of neighbors, $k$ , to 200. According to our results in Fig. 1, the scene flow accuracy saturated after $k { = } 2 0 0$ . Fig. 4 shows a qualitative example of a scene flow estimation using our method.
|
| 133 |
+
|
| 134 |
+
These results show that our method scales to large point clouds with high density, and gain a great improvement in performance with much denser point clouds. In contrast, training supervised/selfsupervised models with high-density point clouds is not always practical due to high memory usage. Typically, such models are trained with up to $^ \mathrm { 8 k }$ points.
|
| 135 |
+
|
| 136 |
+
Performance and inference time tradeoffs Estimating scene flow with runtime optimization is usually slower than using learning-based methods $1 0 \times - 1 0 0 \times$ slower). The trade-off, however, depends on the application. If robustness/generalizability is not an issue but rather the inference time, our proposed objective can train a self-supervised model and act as a surrogate of our non-learning method but inheriting the faster inference time from the trained model. We show an example of lidar point cloud densification (Section 4.6) to generate denser point clouds that can be used for robotics applications such as offline mapping, creating denser depth maps, etc., that would not require real-time inference.
|
| 137 |
+
|
| 138 |
+

|
| 139 |
+
Figure 5: Example of a failure case. Partial scene from FlyingThings3D. Our nearest-neighbor-based loss might fail when handling large missing parts, occlusions, and bad correspondences. Green points are the target, and red points are the shifted blue points by the estimated scene flow (yellow arrows).
|
| 140 |
+
|
| 141 |
+
# 4.4 Limitations
|
| 142 |
+
|
| 143 |
+
Although our method achieved better computational complexity than other non-learning-based methods, the inference time is still limiting for some applications that demand real-time inferences.
|
| 144 |
+
|
| 145 |
+

|
| 146 |
+
Figure 4: Qualitative example of a scene flow estimation using our proposed method. The complex and highly dynamic driving scene is from the Argoverse Scene Flow dataset. The scene flow estimated by our method is close to the ground truth. We also show a prediction using the supervised FlowNet3D method trained on FlyingThings3D and fine-tuned on the KITTI Scene Flow dataset. Note how the scene flow deviated from the ground truth when the inference was performed on an out-of-the-distribution sample. The scene flow color encodes the magnitude (color intensity) and direction (angle) of the flow vectors. For example, the purplish vehicles are heading northeast.
|
| 147 |
+
|
| 148 |
+
Another limitation is that the loss function we used relies on nearest neighbors, which might find bad correspondences due to partial point clouds and occlusions. Fig. 5 shows a failure case because of the nearest-neighbor-based distance loss. Few corresponding points due to missing parts in the scene might lead to incorrect flow estimations.
|
| 149 |
+
|
| 150 |
+
# 4.5 A continuous scene flow field
|
| 151 |
+
|
| 152 |
+
Our neural prior implicitly regularizes the scene flow through the coordinate-based MLP network. Thus, our method allows for a continuous scene flow representation instead of a discrete representation such as in graph-based priors.
|
| 153 |
+
|
| 154 |
+
An advantage of a continuous scene flow representation is that we can reuse the optimal network weights to estimate dense long-term correspondences across a sequence of point clouds (see Section 4.6). Fig. 6 shows how the estimated scene flow and the continuous flow field change as the optimization converges to a solution.
|
| 155 |
+
|
| 156 |
+
# 4.6 Application: scene flow integration
|
| 157 |
+
|
| 158 |
+
Here we demonstrate how to use our method to perform scene flow integration. Given a temporal sequence of point sets, $\{ S _ { 0 } , S _ { 1 } , S _ { 2 } , \cdots , S _ { M } \}$ , we first optimize for the pairwise scene flows, $\{ \bar { \mathcal { F } } _ { 0 1 } , \mathcal { F } _ { 1 2 } , \cdot \cdot \cdot , \mathcal { F } _ { M - 1 M } \}$ , using our proposed method with the optimal neural prior parameters, $\{ \Theta _ { 0 \to 1 } ^ { * } , \Theta _ { 1 \to 2 } ^ { * } , \cdot \cdot \cdot , \Theta _ { M \cdot 1 \to M } ^ { * } \}$ , saved. Then, starting from $\mathbf { f } _ { 0 \to 1 }$ , we can integrate long-term flows using the classic Forward Euler method recursively for $m { = } 1 { : } M { - } 1$ iterations as
|
| 159 |
+
|
| 160 |
+
$$
|
| 161 |
+
\mathbf { f } _ { 0 m + 1 } = \mathbf { f } _ { 0 m } + g ( \mathbf { p } _ { 0 } + \mathbf { f } _ { 0 m } ; \mathbf { \Theta } _ { m m + 1 } ^ { * } ) .
|
| 162 |
+
$$
|
| 163 |
+
|
| 164 |
+

|
| 165 |
+
Figure 6: Example showing how the estimated scene flow and the continuous flow field (bottom) given by our neural prior change as the optimization converges to a solution. We show a top-view dynamic driving scene from Argoverse Scene Flow. The scene flow color encodes the magnitude (color intensity) and direction (angle) of the flow vectors. For example, the purplish vehicles are heading northeast. The red arrow shows the position and direction of travel of the autonomous vehicle, which is stopped, waiting for a pedestrian to cross the street. Note how the predicted scene flow is close to the ground truth at iteration 2k. At iteration 0, the scene flow is random, given the random initialization of the neural prior. Thus having very small magnitudes for the random directions. As the optimization went on, the flow fields became better constrained. A simple way to interpret the flow fields is to imagine sampling a point at any location in the continuous scene flow field to recover an estimated flow vector. For example, imagine sampling a point around the orange region in the flow field at iteration $2 \mathrm { k }$ (green arrow in the bottom right). The direction of the flow vector will be pointing southeast at a specific magnitude, similar to the vehicles in the orange region.
|
| 166 |
+
|
| 167 |
+
This gives the long-term scene flow $\mathcal { F } _ { 0 M } = \{ ( \mathbf { f } _ { 0 M } ) _ { i } \} _ { i = 0 } ^ { | S _ { 0 } | }$ , from ${ \cal S } _ { 0 } { \cal S } _ { M }$ . Note that we are not relying on discrete nearest-neighbor-based interpolations. Our neural scene flow prior is a continuous representation that naturally provides continuous scene flow estimations. Fig. 7 shows an example of an Argoverse scene where we applied such a technique to integrate 10 point clouds into a single frame to densify the point cloud.
|
| 168 |
+
|
| 169 |
+
# 5 Conclusion
|
| 170 |
+
|
| 171 |
+
We show that how hand-designed coordinate-based network architecture can serve as a new type of implicit regularizer in the runtime optimization for the scene flow problem. Our neural prior gets rid of the need for massive labeled/unlabeled training data while being scalable with dense point clouds. Additionally, since we infer prior knowledge from the network architectures instead of from data, our approach can generalize to out-of-the-distribution scenarios as compared to learning-based methods. The continuous flow representation also allows for flow integration across a long sequence that can be used in many robotics applications such as offline mapping. We believe this paper shows a promising direction for large-scale, real-world scene flow estimation without data supervision.
|
| 172 |
+
|
| 173 |
+
# Broader impact
|
| 174 |
+
|
| 175 |
+
Our proposed neural scene flow prior allows for estimating 3D motion fields from large-scale dynamic scenes without annotating massive data but preserving generalizability—making it useful for scenarios where motion prediction is required. Especially in computer vision and robotics communities, robust scene flow estimations is crucial. For example, autonomous vehicles need to predict future distribution of the surrounding objects to avoid catastrophe in dynamic environments; safe human-computer interaction is enabled with precise dynamic flow predictions. Our work also encourages further exploration in the combination of the innovative coordinate-based networks and classical runtime optimization algorithm. This dataless approach offers an affordable solution for many industrial problems without adequate supervision (e.g., autonomous driving).
|
| 176 |
+
|
| 177 |
+

|
| 178 |
+
Figure 7: Example of a scene flow integration to densify an Argoverse lidar point cloud. The left and middle columns are a top and front view of the point cloud, respectively. The rightmost column shows the accumulated point cloud projected onto the image. Note the smearing effect on the dynamic objects when rigidly accumulating the point clouds (middle row). Accumulation using our neural prior nicely produced a denser point cloud while taking care of all dynamic objects in the scene. Here, rigid means that the point cloud accumulation was performed using a rigid registration method (i.e., ICP) where rigid 6-DoF poses are used for the registrations.
|
| 179 |
+
|
| 180 |
+
However, as AI-based research, it could be misused by malicious groups for nefarious purposes. For example, the collected data might contain sensitive information that potentially invades privacy, and can be used for illegal data trading. Moreover, such research has the potential to be used in autonomous weapons and military drones. The potential evil use of our method needs attention and needs to be prevented. We hope to motivate the community to take full advantage of the innovations of this work to benefit society.
|
| 181 |
+
|
| 182 |
+
# Acknowledgments and Disclosure of Funding
|
| 183 |
+
|
| 184 |
+
The authors would like to thank Chen-Hsuan Lin for useful discussions through the project, review and help with section 3. We thank Haosen Xing for careful review of the entire manuscript and assistance in several parts of the paper, Jianqiao Zheng for helpful discussions. We thank all anonymous reviewers for their valuable comments and suggestions to make our paper stronger.
|
| 185 |
+
|
| 186 |
+
# References
|
| 187 |
+
|
| 188 |
+
[1] Brian Amberg, Sami Romdhani, and Thomas Vetter. Optimal step nonrigid ICP algorithms for surface registration. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1–8. IEEE, 2007. 2, 5, 6
|
| 189 |
+
[2] Rie Kubota Ando and Tong Zhang. Learning on graph with Laplacian regularization. Neural Information Processing Systems (NeurIPS), 19:25, 2007. 3
|
| 190 |
+
[3] Matan Atzmon and Yaron Lipman. SAL: Sign agnostic learning of shapes from raw data. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2565–2574, 2020. 3
|
| 191 |
+
[4] Tali Basha, Yael Moses, and Nahum Kiryati. Multi-view scene flow estimation: A view centered variational approach. International Journal of Computer Vision (IJCV), 101(1):6–21, 2013. 2
|
| 192 |
+
[5] Alexander I Bobenko and Boris A Springborn. A discrete Laplace–Beltrami operator for simplicial surfaces. Discrete & Computational Geometry, 38(4):740–756, 2007. 3
|
| 193 |
+
[6] Fabian Brickwedde, Steffen Abraham, and Rudolf Mester. Mono-SF: Multi-view geometry meets singleview depth for monocular scene flow estimation of dynamic traffic scenes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 2780–2790, 2019. 2
|
| 194 |
+
[7] Holger Caesar, Varun Bankiti, Alex H Lang, Sourabh Vora, Venice Erin Liong, Qiang Xu, Anush Krishnan, Yu Pan, Giancarlo Baldan, and Oscar Beijbom. nuScenes: A multimodal dataset for autonomous driving. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 11621–11631, 2020. 4, 6
|
| 195 |
+
[8] Ming-Fang Chang, John Lambert, Patsorn Sangkloy, Jagjeet Singh, Slawomir Bak, Andrew Hartnett, De Wang, Peter Carr, Simon Lucey, Deva Ramanan, et al. Argoverse: 3D tracking and forecasting with rich maps. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 8748–8757, 2019. 4, 6
|
| 196 |
+
[9] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5939–5948, 2019. 1, 3
|
| 197 |
+
[10] Haili Chui and Anand Rangarajan. A new point matching algorithm for non-rigid registration. Computer Vision and Image Understanding (CVIU), 89(2-3):114–141, 2003. 2
|
| 198 |
+
[11] Chinthaka Dinesh, Gene Cheung, and Ivan V Bajic. Point cloud denoising via feature graph laplacian ´ regularization. IEEE Transactions on Image Processing, 29:4143–4158, 2020. 3
|
| 199 |
+
[12] Li Ding and Chen Feng. DeepMapping: Unsupervised map estimation from multiple point clouds. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8650–8659, 2019. 2, 3
|
| 200 |
+
[13] Yilun Du, Yinan Zhang, Hong-Xing Yu, Joshua B Tenenbaum, and Jiajun Wu. Neural radiance flow for 4D view synthesis and video processing. arXiv e-prints, pages arXiv–2012, 2020. 3
|
| 201 |
+
[14] Marvin Eisenberger, Zorah Lahner, and Daniel Cremers. Smooth shells: Multi-scale shape registration with functional maps. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 12265–12274, 2020. 3
|
| 202 |
+
[15] Haoqiang Fan, Hao Su, and Leonidas J Guibas. A point set generation network for 3D object reconstruction from a single image. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 605–613, 2017. 4
|
| 203 |
+
[16] Chen Gao, Ayush Saraf, Johannes Kopf, and Jia-Bin Huang. Dynamic view synthesis from dynamic monocular video. arXiv preprint arXiv:2105.06468, 2021. 3
|
| 204 |
+
[17] Xiuye Gu, Yijie Wang, Chongruo Wu, Yong Jae Lee, and Panqu Wang. HPLFlownet: Hierarchical permutohedral lattice flownet for scene flow estimation on large-scale point clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3254–3263, 2019. 1, 2
|
| 205 |
+
[18] Simon Hadfield and Richard Bowden. Kinecting the dots: Particle based scene flow from depth sensors. In Proceedings of the International Conference on Computer Vision (ICCV), pages 2290–2295. IEEE, 2011. 2
|
| 206 |
+
[19] Simon Hadfield and Richard Bowden. Scene particles: Unregularized particle-based scene flow estimation. IEEE Transactions on Pattern Analysis and Machine Intelligence (PAMI), 36(3):564–576, 2013. 2
|
| 207 |
+
[20] Michael Hornacek, Andrew Fitzgibbon, and Carsten Rother. SphereFlow: 6 DoF scene flow from RGB-D pairs. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3526–3533, 2014. 2
|
| 208 |
+
[21] Frédéric Huguet and Frédéric Devernay. A variational method for scene flow estimation from stereo sequences. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1–7. IEEE, 2007. 2
|
| 209 |
+
[22] Junhwa Hur and Stefan Roth. Self-supervised monocular scene flow estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 7396–7405, 2020. 2
|
| 210 |
+
[23] Huaizu Jiang, Deqing Sun, Varun Jampani, Zhaoyang Lv, Erik Learned-Miller, and Jan Kautz. SENSE: A shared encoder network for scene-flow estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3195–3204, 2019. 2
|
| 211 |
+
[24] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Yoshua Bengio and Yann LeCun, editors, Proceedings of the International Conference on Learning Representations (ICLR), 2015. 5
|
| 212 |
+
[25] Yair Kittenplon, Yonina C Eldar, and Dan Raviv. FlowStep3D: Model unrolling for self-supervised scene flow estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 2
|
| 213 |
+
[26] Hao Li, Robert W Sumner, and Mark Pauly. Global correspondence optimization for non-rigid registration of depth scans. In Computer Graphics Forum, volume 27, pages 1421–1430. Wiley Online Library, 2008. 2
|
| 214 |
+
[27] Rui Li and Stan Sclaroff. Multi-scale 3D scene flow from binocular stereo sequences. Computer Vision and Image Understanding (CVIU), 110(1):75–90, 2008. 2
|
| 215 |
+
[28] Yangyan Li, Rui Bu, Mingchao Sun, Wei Wu, Xinhan Di, and Baoquan Chen. PointCNN: Convolution on X-transformed points. Neural Information Processing Systems (NeurIPS), 31:820–830, 2018. 2
|
| 216 |
+
[29] Zhengqi Li, Simon Niklaus, Noah Snavely, and Oliver Wang. Neural scene flow fields for space-time view synthesis of dynamic scenes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 3
|
| 217 |
+
[30] Xingyu Liu, Charles R Qi, and Leonidas J Guibas. FlowNet3D: Learning scene flow in 3D point clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 529–537, 2019. 1, 2, 4, 5, 6
|
| 218 |
+
[31] Xingyu Liu, Mengyuan Yan, and Jeannette Bohg. MeteorNet: Deep learning on dynamic 3d point cloud sequences. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 9246–9255, 2019. 2
|
| 219 |
+
[32] Wei-Chiu Ma, Shenlong Wang, Rui Hu, Yuwen Xiong, and Raquel Urtasun. Deep rigid instance scene flow. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3614–3622, 2019. 2
|
| 220 |
+
[33] Nikolaus Mayer, Eddy Ilg, Philip Hausser, Philipp Fischer, Daniel Cremers, Alexey Dosovitskiy, and Thomas Brox. A large dataset to train convolutional networks for disparity, optical flow, and scene flow estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4040–4048, 2016. 4, 6
|
| 221 |
+
[34] Moritz Menze and Andreas Geiger. Object scene flow for autonomous vehicles. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3061–3070, 2015. 4, 6
|
| 222 |
+
[35] Moritz Menze, Christian Heipke, and Andreas Geiger. Joint 3D estimation of vehicles and scene flow. ISPRS Annals of the Photogrammetry, Remote Sensing and Spatial Information Sciences, 2:427, 2015. 4, 6
|
| 223 |
+
[36] Lars Mescheder, Michael Oechsle, Michael Niemeyer, Sebastian Nowozin, and Andreas Geiger. Occupancy networks: Learning 3d reconstruction in function space. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4460–4470, 2019. 1, 3
|
| 224 |
+
[37] Ben Mildenhall, Pratul P Srinivasan, Matthew Tancik, Jonathan T Barron, Ravi Ramamoorthi, and Ren Ng. NeRF: Representing scenes as neural radiance fields for view synthesis. In Proceedings of the European Conference on Computer Vision (ECCV), pages 405–421. Springer, 2020. 1, 3
|
| 225 |
+
[38] Himangi Mittal, Brian Okorn, and David Held. Just go with the flow: Self-supervised scene flow estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 11177– 11185, 2020. 2, 4, 6
|
| 226 |
+
[39] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. DeepSDF: Learning continuous signed distance functions for shape representation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 165–174, 2019. 1, 3
|
| 227 |
+
[40] Keunhong Park, Utkarsh Sinha, Jonathan T. Barron, Sofien Bouaziz, Dan B Goldman, Steven M. Seitz, and Ricardo Martin-Brualla. Deformable neural radiance fields. arXiv preprint arXiv:2011.12948, 2020. 3
|
| 228 |
+
[41] 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. In Neural Information Processing Systems (NeurIPS), 2019. 5
|
| 229 |
+
[42] Mark Pauly, Niloy J Mitra, Joachim Giesen, Markus H Gross, and Leonidas J Guibas. Example-based 3D scan completion. In Symposium on Geometry Processing, pages 23–32, 2005. 2
|
| 230 |
+
[43] Jean-Philippe Pons, Renaud Keriven, and Olivier Faugeras. Multi-view stereo reconstruction and scene flow estimation with a global image-based matching score. International Journal of Computer Vision (IJCV), 72(2):179–193, 2007. 2
|
| 231 |
+
[44] J-P Pons, Renaud Keriven, O Faugeras, and Gerardo Hermosillo. Variational stereovision and 3D scene flow estimation with statistical similarity measures. In Proceedings of the International Conference on Computer Vision (ICCV), volume 2, pages 597–597. IEEE Computer Society, 2003. 2
|
| 232 |
+
[45] Jhony Kaesemodel Pontes, James Hays, and Simon Lucey. Scene flow from point clouds with or without learning. In Proceedings of the International Conference on 3D Vision (3DV). IEEE, 2020. 2, 3, 4, 5, 6, 7
|
| 233 |
+
[46] Albert Pumarola, Enric Corona, Gerard Pons-Moll, and Francesc Moreno-Noguer. D-NeRF: Neural Radiance Fields for Dynamic Scenes. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2021. 3
|
| 234 |
+
[47] Gilles Puy, Alexandre Boulch, and Renaud Marlet. FLOT: Scene Flow on Point Clouds Guided by Optimal Transport. In Proceedings of the European Conference on Computer Vision (ECCV), 2020. 1, 2
|
| 235 |
+
[48] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. PointNet: Deep learning on point sets for 3D classification and segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 652–660, 2017. 2
|
| 236 |
+
[49] Charles R Qi, Li Yi, Hao Su, and Leonidas J Guibas. PointNet $^ { + + }$ : Deep hierarchical feature learning on point sets in a metric space. In Neural Information Processing Systems (NeurIPS), pages 5105–5114, 2017. 2
|
| 237 |
+
[50] Julian Quiroga, Thomas Brox, Frédéric Devernay, and James Crowley. Dense semi-rigid scene flow estimation from rgbd images. In Proceedings of the European Conference on Computer Vision (ECCV), pages 567–582. Springer, 2014. 2
|
| 238 |
+
[51] Rishav Rishav, Ramy Battrawy, René Schuster, Oliver Wasenmüller, and Didier Stricker. DeepLiDARFlow: A deep learning architecture for scene flow estimation using monocular camera and sparse LiDAR. In Proceedings of the IEEE/RSJ Conference on Intelligent Robots and Systems (IROS), pages 10460–10467. IEEE, 2020. 2
|
| 239 |
+
[52] Rohan Saxena, René Schuster, Oliver Wasenmuller, and Didier Stricker. PWOC-3D: Deep occlusion-aware end-to-end scene flow estimation. In Proceedings of the IEEE Intelligent Vehicles Symposium (IV), pages 324–331. IEEE, 2019. 2
|
| 240 |
+
[53] René Schuster, Christian Unger, and Didier Stricker. A deep temporal fusion framework for scene flow using a learnable motion model and occlusions. In Proceedings of the IEEE Workshop on Applications of Computer Vision (WACV), pages 247–255, 2021. 2
|
| 241 |
+
[54] Lin Shao, Parth Shah, Vikranth Dwaracherla, and Jeannette Bohg. Motion-based object segmentation based on dense RGB-D scene flow. IEEE Robotics and Automation Letters, 3(4):3797–3804, 2018. 2
|
| 242 |
+
[55] Vincent Sitzmann, Julien Martel, Alexander Bergman, David Lindell, and Gordon Wetzstein. Implicit neural representations with periodic activation functions. Neural Information Processing Systems (NeurIPS), 33, 2020. 3
|
| 243 |
+
[56] Vincent Sitzmann, Michael Zollhoefer, and Gordon Wetzstein. Scene representation networks: Continuous 3D-structure-aware neural scene representations. Neural Information Processing Systems (NeurIPS), 32:1121–1132, 2019. 1, 3
|
| 244 |
+
[57] Olga Sorkine. Laplacian mesh processing. Eurographics (STARs), 29, 2005. 3
|
| 245 |
+
[58] Olga Sorkine and Marc Alexa. As-rigid-as-possible surface modeling. In Symposium on Geometry Processing, volume 4, pages 109–116, 2007. 3
|
| 246 |
+
[59] Chen Sun, Abhinav Shrivastava, Saurabh Singh, and Abhinav Gupta. Revisiting unreasonable effectiveness of data in deep learning era. In Proceedings of the International Conference on Computer Vision (ICCV), pages 843–852, 2017. 3
|
| 247 |
+
[60] Zachary Teed and Jia Deng. RAFT-3D: Scene flow using rigid-motion embeddings. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8375–8384, 2021. 1, 2
|
| 248 |
+
[61] Ivan Tishchenko, Sandro Lombardi, Martin Oswald, and Marc Pollefeys. Self-supervised learning of non-rigid residual flow and ego-motion. In Proceedings of the International Conference on 3D Vision (3DV), 2020. 2
|
| 249 |
+
[62] Edgar Tretschk, Ayush Tewari, Vladislav Golyanik, Michael Zollhöfer, Christoph Lassner, and Christian Theobalt. Non-rigid neural radiance fields: Reconstruction and novel view synthesis of a dynamic scene from monocular video, 2020. 3
|
| 250 |
+
[63] Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Deep image prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 9446–9454, 2018. 2, 3
|
| 251 |
+
[64] Sundar Vedula, Simon Baker, Peter Rander, Robert Collins, and Takeo Kanade. Three-dimensional scene flow. In Proceedings of the International Conference on Computer Vision (ICCV), volume 2, pages 722–729. IEEE, 1999. 2
|
| 252 |
+
[65] Yue Wang, Yongbin Sun, Ziwei Liu, Sanjay E Sarma, Michael M Bronstein, and Justin M Solomon. Dynamic graph CNN for learning on point clouds. ACM Transactions on Graphics (TOG), 38(5):1–12, 2019. 2
|
| 253 |
+
[66] Zirui Wang, Shuda Li, Henry Howard-Jenkins, Victor Prisacariu, and Min Chen. FlowNet3D $^ { + + }$ : Geometric losses for deep scene flow estimation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 91–98, 2020. 2
|
| 254 |
+
[67] Wenxuan Wu, Zhongang Qi, and Li Fuxin. PointConv: Deep convolutional networks on 3d point clouds. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 9621–9630, 2019. 2
|
| 255 |
+
[68] Wenxuan Wu, Zhi Yuan Wang, Zhuwen Li, Wei Liu, and Li Fuxin. PointPWC-Net: Cost volume on point clouds for (self-) supervised scene flow estimation. In Proceedings of the European Conference on Computer Vision (ECCV), pages 88–107. Springer, 2020. 1, 2, 4, 6
|
| 256 |
+
[69] Wenqi Xian, Jia-Bin Huang, Johannes Kopf, and Changil Kim. Space-time neural irradiance fields for free-viewpoint video. arXiv preprint arXiv:2011.12950, 2020. 3
|
| 257 |
+
[70] Gengshan Yang and Deva Ramanan. Upgrading optical flow to 3D scene flow through optical expansion. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1334–1343, 2020. 2
|
| 258 |
+
[71] Jin Zeng, Gene Cheung, Michael Ng, Jiahao Pang, and Cheng Yang. 3D point cloud denoising using graph Laplacian regularization of a low dimensional manifold model. IEEE Transactions on Image Processing, 29:3474–3489, 2019. 3
|
| 259 |
+
|
| 260 |
+
# Checklist
|
| 261 |
+
|
| 262 |
+
1. For all authors...
|
| 263 |
+
|
| 264 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 265 |
+
(b) Did you describe the limitations of your work? [Yes] We described the limitations in the experiment section, and we also provided failure cases.
|
| 266 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] We discussed in the Broader Impact section
|
| 267 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 268 |
+
|
| 269 |
+
2. If you are including theoretical results...
|
| 270 |
+
|
| 271 |
+
(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]
|
| 272 |
+
|
| 273 |
+
3. If you ran experiments...
|
| 274 |
+
|
| 275 |
+
(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] We cite all the data we used in the experiment section. And we will release code in personal GitHub repository.
|
| 276 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] In the experiment section, we specify implementation details for all methods, and all data we used.
|
| 277 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] We report error bars for optimization-based methods which have uncertainties.
|
| 278 |
+
(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] We included in the implementation details of the experiments section.
|
| 279 |
+
|
| 280 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 281 |
+
|
| 282 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] We have cited all the data we used.
|
| 283 |
+
(b) Did you mention the license of the assets? [N/A]
|
| 284 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
|
| 285 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 286 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 287 |
+
|
| 288 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 289 |
+
|
| 290 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 291 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 292 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/4cEapqXfP30/4cEapqXfP30.md
ADDED
|
@@ -0,0 +1,266 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Adversarial Neuron Pruning Purifies Backdoored Deep Models
|
| 2 |
+
|
| 3 |
+
Dongxian $\mathbf { W _ { u } 1 * }$ Yisen Wang2,3† 1Dept. of Computer Science and Technology, Tsinghua University, China 2Key Lab. of Machine Perception, School of Artificial Intelligence, Peking Univesity, China 3Institute for Artificial Intelligence, Peking Univesity, China
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
As deep neural networks (DNNs) are growing larger, their requirements for computational resources become huge, which makes outsourcing training more popular. Training in a third-party platform, however, may introduce potential risks that a malicious trainer will return backdoored DNNs, which behave normally on clean samples but output targeted misclassifications whenever a trigger appears at the test time. Without any knowledge of the trigger, it is difficult to distinguish or recover benign DNNs from backdoored ones. In this paper, we first identify an unexpected sensitivity of backdoored DNNs, that is, they are much easier to collapse and tend to predict the target label on clean samples when their neurons are adversarially perturbed. Based on these observations, we propose a novel model repairing method, termed Adversarial Neuron Pruning (ANP), which prunes some sensitive neurons to purify the injected backdoor. Experiments show, even with only an extremely small amount of clean data (e.g., $1 \%$ ), ANP effectively removes the injected backdoor without causing obvious performance degradation. Our code is available at https://github.com/csdongxian/ANP_backdoor.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
In recent years, deep neural networks (DNNs) achieve satisfactory performance in many tasks, including computer vision [15], speech recognition [45], and gaming agents [36]. However, their success heavily relies on a large amount of computation and data, forcing researchers to outsource the training in “Machine Learning as a Service” (MLaaS) platforms or download pretrained models from the Internet, which brings potential risks of training-time attacks [17, 35, 2]. Among them, backdoor attack [14, 6, 42] is remarkably dangerous because it stealthily builds a strong relationship between a trigger pattern and a target label inside DNNs by poisoning a small proportion of the training data. As a result, the returned model always behaves normally on the clean data but is controlled to make target misclassification by presenting the trigger pattern such as a specific single-pixel [41] or a black-white checkerboard [14] at the test time.
|
| 12 |
+
|
| 13 |
+
Since DNNs are deployed in many real-world and safety-critical applications, it is urgent to defend against backdoor attacks. While there are many defense methods during training [38, 41, 8, 29, 20], this work focuses on a more realistic scenario in outsourcing training that repairs models after training. In particular, the defenders try to remove the injected backdoor without access to the model training process. Without knowledge of the trigger pattern, previous methods only achieve limited robustness [7, 24, 22]. Some works try to reconstruct the trigger [43, 5, 33, 50, 44], however, the trigger pattern in brand-new attacks becomes natural [26], invisible [49], and dynamic [30], leading to the reconstruction infeasible. Different from them, in this paper, we turn to explore whether we can successfully remove the injected backdoor even without knowing the trigger pattern.
|
| 14 |
+
|
| 15 |
+
Usually, the adversary perturbs inputs to cause misclassification, e.g., attaching triggers for backdoored models or adding adversarial perturbations. Parallel to this, we are also able to cause misclassification by perturbing neurons of DNNs [47]. For any neuron inside DNN, we could perturb its weight and bias by multiplying a relatively small number, to change its output. Similar to adversarial perturbations, we can optimize the neuron perturbations to increase its classification loss. Surprisingly, we find that, within the same perturbation budget, backdoored DNNs are much easier to collapse and prone to output the target label than normal DNNs even without the presence of the trigger. That is, the neurons that are sensitive to adversarial neuron perturbation are strongly related to the injected backdoor. Motivated by this, we propose a novel model repairing method, named Adversarial Neuron Pruning (ANP), which prunes most sensitive neurons under the adversarial neuron perturbation. Since the number of neurons is much smaller than weight parameters, e.g., only 4810 neurons for ResNet-18 while 11M parameters for the same model, our method can work well only based on $1 \%$ of clean data. Our main contributions are summarized as follows:
|
| 16 |
+
|
| 17 |
+
• We find that through adversarially perturbing neurons, backdoored DNNs can present backdoor behaviors even without the presence of the trigger patterns and are much easier to output misclassification than normal DNNs.
|
| 18 |
+
• To defend backdoor attacks, we propose a simple yet effective model repairing method, Adversarial Neuron Pruning (ANP), which prunes the most sensitive neurons under adversarial neuron perturbations without fine-tuning.
|
| 19 |
+
• Extensive experiments demonstrate that ANP consistently provides state-of-the-art defense performance against various backdoor attacks, even using an extremely small amount of clean data.
|
| 20 |
+
|
| 21 |
+
# 2 Related Work
|
| 22 |
+
|
| 23 |
+
# 2.1 Backdoor Attacks
|
| 24 |
+
|
| 25 |
+
The backdoor attack is a type of attacks occurring during DNN training. The adversary usually poisons a fraction of training data via attaching a predefined trigger and relabeling them as target labels (dirty-label setting) [14, 6]. All poisoned samples can be relabeled as a single target class (all-to-one), or poisoned samples from different source classes are relabeled as different target classes (all-to-all) [30]. After training, the model can be controlled to predict the target label in the presence of the trigger at the test time. Different from evasion attacks (e.g., adversarial attacks) [3, 39, 13], backdoor attacks aim to embed a input- and model-agnostic trigger into the model, which is a severe threat to the applications of deep learning [12]. Since incorrectly-labeled samples are easy to be detected, some attacks attach the trigger to samples from the target class (clean-label setting) [35, 42, 1]. Apart from simple forms like a single-pixel [41] or a black-and-white checkerboard [14], the trigger patterns can be more complex such as a sinusoidal strip [1] and a dynamic pattern [30]. These triggers in recent attacks become more natural [26] and human-imperceptible [49, 31], making them stealthy and hard to be detected by human inspection. Besides, powerful adversaries who have access to the model can optimize the trigger pattern [25], and even co-optimize the trigger pattern and the model together to enhance the power of backdoor attacks [32].
|
| 26 |
+
|
| 27 |
+
# 2.2 Backdoor Defense
|
| 28 |
+
|
| 29 |
+
Defense during Training. With access to training, the defender is able to detect the poisoned data or make poisoning invalid during the training process. Regarding poisoned data as outliers, we can detect and filter them out using robust statistics in the input space [38, 18, 8, 9] or the feature space [17, 41, 28, 10]. Meanwhile, other studies focus on training strategies to make the poisoned data have little or no effect on the trained model [23, 40] through randomized smoothing [34, 46], majority vote [21], differential privacy [29], and input preprocessing [27, 4].
|
| 30 |
+
|
| 31 |
+
Defense after Training. For a downloaded model, we have lost control of its training. To repair the risk model, one direct way is to first reconstruct an approximation of the backdoor trigger via adversarial perturbation [43] or generative adversarial network (GAN) [5, 33, 50]. Once the trigger is reconstructed, it is feasible to prune neurons that are activated in the presence of the trigger, or fine-tune the model to unlearn the trigger [43]. As the trigger patterns in recently proposed attacks become more complicated such as the dynamics trigger [30] or natural phenomenon-based trigger [26], reconstruction becomes increasingly difficult. There are other studies on trigger-agnostic repairing via model pruning [24] or fine-tuning [7, 22] on the clean data. While they may suffer from severe accuracy degradation when only small clean data are available [7]. Unlike previous defensive pruning methods which are based on the rule-of-thumb, our proposed method is data-driven and does not require additional fine-tuning.
|
| 32 |
+
|
| 33 |
+
# 3 The Proposed Method
|
| 34 |
+
|
| 35 |
+
# 3.1 Preliminary
|
| 36 |
+
|
| 37 |
+
Deep Neural Network and Its Neurons. In this paper, we take a fully-connected network as an example (other convolutional networks are also applicable). Its layers are numbered from 0 (input) to $L$ (output) and each layer contains $n _ { 0 } , \cdots , n _ { L }$ neurons. The network has $n = n _ { 1 } + n _ { 2 } + \cdot \cdot \cdot + n _ { L }$ parameterized neurons in total3. We denote the weight parameters of the $k$ -th neuron in $l$ -th layer as w(l)k , the bias as b $b _ { k } ^ { ( l ) }$ , and its output is
|
| 38 |
+
|
| 39 |
+
$$
|
| 40 |
+
h _ { k } ^ { ( l ) } = \sigma ( \mathbf { w } _ { k } ^ { ( l ) \top } \mathbf { h } ^ { ( l - 1 ) } + b _ { k } ^ { ( l ) } ) ,
|
| 41 |
+
$$
|
| 42 |
+
|
| 43 |
+
where $\sigma ( \cdot )$ is the nonlinear function and $\mathbf { h } ^ { ( l - 1 ) }$ is the outputs of all neurons in the previous layer, $i . e . , { \bf h } ^ { ( l - 1 ) } = [ h _ { 1 } ^ { ( l - 1 ) } , \cdot \cdot \cdot , h _ { n _ { l } } ^ { ( l - 1 ) } ]$ . For simplicity, we denote all weights of the network as $\mathbf { w } =$ $\begin{array} { r l r } { } & { } & { [ { \bf w } _ { 1 } ^ { ( 1 ) } , \cdot \cdot \cdot , { \bf w } _ { n _ { 1 } } ^ { ( 1 ) } , \cdot \cdot \cdot , { \bf w } _ { 1 } ^ { ( L ) } , \cdot \cdot \cdot , { \bf w } _ { n _ { L } } ^ { ( L ) } ] } \end{array}$ , and all biases as $\mathbf { b } = [ b _ { 1 } ^ { ( 1 ) } , \cdots , b _ { n _ { l } } ^ { ( 1 ) } , \cdots , b _ { 1 } ^ { ( L ) } , \cdots , b _ { n _ { L } } ^ { ( L ) } ]$ For a given input $\mathbf { x }$ , the network makes the prediction $f ( \mathbf { x } ; \mathbf { w } , \mathbf { b } )$ .
|
| 44 |
+
|
| 45 |
+
DNN Training. We consider a $c$ -class classification problem. The parameters of weights and biases in DNN are learned on a training dataset $\mathcal { D } _ { \mathcal { T } } = \{ ( \bar { \bf x } _ { 1 } , \bar { y } _ { 1 } ) , \cdot \cdot \cdot , ( \bar { \bf x } _ { s } , \bar { y } _ { s } ) \}$ containing $s$ inputs, where each input is $\mathbf { x } _ { i } \in \mathbb { R } ^ { d } , i = 1 , \cdots , s .$ , and its ground-truth label is $y _ { i } \in \{ 1 , \cdots , c \}$ . The training procedure tries to find the optimal $( \mathbf { w } ^ { \star } , \mathbf { b } ^ { \star } )$ which minimize the training loss on the training data $\mathcal { D } _ { \mathcal { T } }$ ,
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\mathcal { L } _ { \mathcal { D } _ { T } } ( \mathbf { w } , \mathbf { b } ) = \underset { \mathbf { x } , y \sim \mathcal { D } _ { T } } { \mathbb { E } } \ell ( f ( \mathbf { x } ; \mathbf { w } , \mathbf { b } ) , y ) ,
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
where $\ell ( \cdot , \cdot )$ is usually cross entropy loss.
|
| 52 |
+
|
| 53 |
+
Defense Setting. We adopt a typical defense setting that an untrustworthy model is downloaded from a third party (e.g., outsourcing training) without knowledge of the training data $\mathcal { D } _ { \mathcal { T } }$ . For defense, we are assumed to have a small amount of clean data $\mathcal { D } _ { \mathcal { V } }$ . The goals of model repairing are to remove the backdoor behavior while keeping the accuracy on clean samples.
|
| 54 |
+
|
| 55 |
+
# 3.2 Adversarial Neuron Perturbations
|
| 56 |
+
|
| 57 |
+
In previous studies, the adversary causes misclassification by perturbing inputs before feeding them to DNNs. For example, attaching triggers to inputs to make backdoored DNN output the target label or adversarially perturbing inputs to make normal/backdoored DNN output incorrectly.
|
| 58 |
+
|
| 59 |
+
Here, we try another direction to perturb DNN neurons to cause misclassification. Given the $k$ -th neuron in the $l$ -th layers, we can perturb its weight $\mathbf { w } _ { k } ^ { ( l ) }$ and bias $b _ { k } ^ { ( l ) }$ by multiplying a small number respectively. As a result, the perturbed weight is and the output of the perturbed neuron becomes $( 1 + \delta _ { k } ^ { ( l ) } ) \mathbf { w } _ { k } ^ { ( l ) }$ , the perturbed bias is $( 1 + \xi _ { k } ^ { ( l ) } ) b _ { k } ^ { ( l ) }$
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
h _ { k } ^ { ( l ) } = \sigma \big ( ( 1 + \delta _ { k } ^ { ( l ) } ) \mathbf { w } _ { k } ^ { ( l ) \top } \mathbf { h } ^ { ( l - 1 ) } + ( 1 + \xi _ { k } ^ { ( l ) } ) b _ { k } ^ { ( l ) } \big ) ,
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
where δ(l)k and $\xi _ { k } ^ { ( l ) }$ indicate the relative sizes of the perturbations to the weight and bias respectively. Similarly, all neurons can be perturbed like Eq. (3). We denote the relative weight perturbation size of all neurons as $\pmb { \delta } = [ \delta _ { 1 } ^ { ( 1 ) } , \cdots , \delta _ { n _ { 1 } } ^ { ( 1 ) } , \cdots , \delta _ { 1 } ^ { ( L ) } , \cdots , \delta _ { n _ { L } } ^ { ( L ) } ] ,$ , and the relative bias perturbation
|
| 66 |
+
|
| 67 |
+

|
| 68 |
+
|
| 69 |
+
Figure 1: The performance of neuron-perturbed models with different perturbation budgets.
|
| 70 |
+
|
| 71 |
+
size as $\pmb { \xi } = [ \xi _ { 1 } ^ { ( 1 ) } , \cdots , \xi _ { n _ { 1 } } ^ { ( 1 ) } , \cdots , \xi _ { 1 } ^ { ( L ) } , \cdots , \xi _ { n _ { L } } ^ { ( L ) } ]$ for simplicity. For a clean input $\mathbf { x }$ , the output of the perturbed model is
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
f ( \mathbf { x } ; ( 1 + \delta ) \odot \mathbf { w } , ( 1 + \pmb { \xi } ) \odot \mathbf { b } ) ,
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
where neuron-wise multiplication $\odot$ multiplies the parameters by the perturbation sizes belonging to the same neuron as follows:
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
( 1 + \pmb \delta ) \odot \mathbf { w } = \big [ ( 1 + \delta _ { 1 } ^ { ( 1 ) } ) \mathbf { w } _ { 1 } ^ { ( 1 ) } , \cdots , ( 1 + \delta _ { n _ { 1 } } ^ { ( 1 ) } ) \mathbf { w } _ { n _ { 1 } } ^ { ( 1 ) } , \cdots , ( 1 + \delta _ { 1 } ^ { ( L ) } ) \mathbf { w } _ { 1 } ^ { ( L ) } , \cdots , ( 1 + \delta _ { n _ { L } } ^ { ( L ) } ) \mathbf { w } _ { n _ { L } } ^ { ( L ) } \big ] ,
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
( 1 + \pmb { \xi } ) \odot \mathbf { b } = \big [ ( 1 + \xi _ { 1 } ^ { ( 1 ) } ) b _ { 1 } ^ { ( 1 ) } , \cdots , ( 1 + \xi _ { n _ { 1 } } ^ { ( 1 ) } ) b _ { n _ { 1 } } ^ { ( 1 ) } , \cdots , ( 1 + \xi _ { 1 } ^ { ( L ) } ) b _ { 1 } ^ { ( L ) } , \cdots , ( 1 + \xi _ { n _ { L } } ^ { ( L ) } ) b _ { n _ { L } } ^ { ( L ) } \big ] .
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
Given a trained model, similar to adversarial perturbations [39, 13], we optimize the neuron perturbations $\delta$ and $\boldsymbol { \xi }$ to increase the classification loss on the clean data:
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\operatorname* { m a x } _ { \delta , \xi \in [ - \epsilon , \epsilon ] ^ { n } } \mathcal { L } _ { \mathcal { D } _ { \mathcal { V } } } \big ( ( 1 + \delta ) \odot \mathbf { w } , ( 1 + \xi ) \odot \mathbf { b } \big ) ,
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
where $\epsilon$ is the perturbation budget, which limits the maximum perturbation size.
|
| 94 |
+
|
| 95 |
+
Specifically, we generate adversarial neuron perturbations for three ResNet-18 models [15] on CIFAR10 [19]: a benign model, a backdoored one with a predefined trigger (Badnets [14]), and a backdoored one with a dynamic trigger (Input-aware Backdoor Attack [30], IAB). We all set the target label in backdoor as class 0. We solve the maximization in Eq. (7) using project gradient descent (PGD) with random initialization similar to generating adversarial examples. The number of iterations is 300 and the step size is 0.001. Figure 1(a) shows adversarial neuron perturbations leads to misclassification, and the larger the perturbation budget $\epsilon$ is, the larger the error rate is. In addition, backdoored models always have larger error rates with the same perturbation budget compared to the benign one. To explore the misclassification in detail, we illustrate the proportion of different classes in predictions by three models in Figure 1(b). For benign model, adversarial neuron perturbations mislead the model to output the untargeted class (e.g., class 3). While for backdoored models, the majority of misclassified samples are predicted as the target label (e.g., class 0) whose proportion rate is much higher than the benign model. More results to support these findings can be found in Appendix B. Therefore, even without the trigger, we can still induce the backdoor behaviours via adversarial neuron perturbations. The reasons can be explained as follows: assuming the $k$ -th neuron in $l$ -th layers is backdoor-related, it is dormant on clean sample [24] (i.e., output is close to 0: $h _ { k } ^ { ( l ) } \approx 0 ,$ ). If w(l)>k hl−1 > 0 and b(l)k > 0, we can increase its output by enlarging the norm of the weights (i.e., $\delta _ { k } ^ { ( l ) } > 0 \}$ ), and further continue to increase it by adding a larger bias (i.e., $\xi _ { k } ^ { ( l ) } > 0 ) ^ { 4 }$ . With suitable perturbations, the backdoor-related neuron is activated even on clean samples. Thus, the neurons that are sensitive to adversarial neuron perturbation are strongly related to the injected backdoor.
|
| 96 |
+
|
| 97 |
+
# 3.3 The Proposed Adversarial Neuron Pruning (ANP)
|
| 98 |
+
|
| 99 |
+
As mentioned above, the sensitivity under adversarial neuron perturbations is strongly related to the injected backdoor. Inspired by this, we try to prune some sensitive neurons to defend backdoor attacks, named Adversarial Neuron Pruning method (ANP). We denote the pruning masks as $\mathbf { m } =$ $[ m _ { 1 } ^ { ( 1 ) } , \cdots , m _ { n _ { 1 } } ^ { ( 1 ) } , \cdots , m _ { 1 } ^ { ( L ) } , \cdots , m _ { n _ { L } } ^ { ( L ) } ] \in \bar { \{ 0 , 1 \} } ^ { n }$ . For the $k$ -th neuron in the $l$ -th layer, we set its weight w(k l ) = 0 if m( l )k = L , and keep it unchanged if $m _ { k } ^ { ( l ) } = 1$ . Similar to Ghorbani and Zou [11], we always keep the bias $b _ { k } ^ { ( l ) }$ to avoid extra harm to the accuracy on clean data5.
|
| 100 |
+
|
| 101 |
+
Continuous Relaxation and Optimization. Due to the binary masks, pruning is a discrete optimization problem that is difficult to solve within feasible time. To address this, we apply continuous relaxation to let $\mathbf { m } \in [ 0 , 1 ] ^ { n }$ and optimizes them using projected gradient descent (PGD). To restore the continuous masks to discreteness after optimization, we set all mask smaller than a threshold as 0 (prune neurons with small masks), and others as 1 (keep neurons with large masks). We expect the pruned model to not only behaves well on clean data but also keep stable under adversarial neuron perturbations. Therefore, we solve the following minimization problem,
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
\operatorname* { m i n } _ { \mathbf { m } \in \left[ 0 , 1 \right] ^ { n } } \left[ \alpha \mathcal { L } _ { { D } _ { \mathcal { V } } } ( \mathbf { m } \odot \mathbf { w } , \mathbf { b } ) + \left( 1 - \alpha \right) \operatorname* { m a x } _ { \delta , \xi \in \left[ - \epsilon , \epsilon \right] ^ { n } } \mathcal { L } _ { { D } _ { \mathcal { V } } } ( ( \mathbf { m } + \delta ) \odot \mathbf { w } , ( 1 + \pm \xi ) \odot \mathbf { b } ) \right] ,
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
where $\alpha \in [ 0 , 1 ]$ is a trade-off coefficient. If $\alpha$ is close to 1, the minimization object focuses more on accuracy of the pruned model on clean data, while if $\alpha$ is close to 0, it focuses more on robustness against backdoor attacks.
|
| 108 |
+
|
| 109 |
+
Implementation of ANP. As shown in Algorithm 1, we start from an unpruned network, that is, initializing all masks as 1 (Line 2). We randomly initialize perturbations (Line 5), and update them using one step (Line 6-7), then project them onto the feasible regime (Line 8-9). Following that, we update mask values based on the adversarial neuron perturbation (Line 10) and project mask value onto [0, 1] (Line 11). As convergence after iterations, we pruned neurons with small mask value and keep others unchanged (Line 13). Note that the proposed ANP is data-driven, different from previous pruning-based defenses which are based on the thumb-of-rule [24, 43]. Besides, ANP can work well on an extremely small amount of clean data due to the small number of masks.
|
| 110 |
+
|
| 111 |
+
# Algorithm 1 Adversarial Neuron Pruning (ANP)
|
| 112 |
+
|
| 113 |
+
1: Input: Network $f ( \cdot ; { \bf w } , { \bf b } )$ , hyper-parameter $\alpha$ , learning rate $\eta$ , batch size $b$ , maximum perturba
|
| 114 |
+
tion size $\epsilon$
|
| 115 |
+
2: Initialize all elements in $\mathbf { m }$ as 1
|
| 116 |
+
3: repeat
|
| 117 |
+
4: Read mini-batch $B = \{ ( \mathbf { x } _ { 1 } , y _ { 1 } ) , . . . , ( \mathbf { x } _ { b } , y _ { b } ) \}$ from training set
|
| 118 |
+
5: $\delta _ { 0 } , \xi _ { 0 } \sim U ( - \epsilon , \epsilon )$ , where $U ( - \epsilon , \epsilon )$ is the uniform distribution
|
| 119 |
+
6: $\begin{array} { r } { \pmb { \delta } \pmb { \delta } _ { 0 } + \epsilon \mathrm { s i g n } ( \nabla _ { \delta } \mathcal { L } ( ( \mathbf { m } + \pmb { \delta } _ { 0 } ) \odot \mathbf { w } , } \end{array}$ , $( { \bf 1 } + { \pmb \xi } _ { 0 } ) \odot { \bf b } ) )$
|
| 120 |
+
7: $\pmb { \xi } \pmb { \xi } _ { 0 } + \epsilon \mathrm { s i g n } ( \nabla _ { \pmb { \xi } } \mathcal { L } ( ( \mathbf { m } + \pmb { \delta } _ { 0 } ) \odot \mathbf { w }$ , $\left( \mathbf { 1 } + \pmb { \xi } _ { 0 } \right) \odot \mathbf { b } ) _ { }$ )
|
| 121 |
+
8: $\delta \gets \operatorname* { m a x } ( - \epsilon , \operatorname* { m i n } ( \delta , \epsilon ) )$
|
| 122 |
+
9: $\pmb { \xi } \gets \operatorname* { m a x } ( - \epsilon , \operatorname* { m i n } ( \pmb { \xi } , \epsilon ) )$
|
| 123 |
+
10: m ← m − η∇m[αL(m w, b) + (1 − α)L((m + δ) w, (1 + ξ) b)]
|
| 124 |
+
11: $\mathbf { m } \gets \mathrm { m a x } ( 0 , \mathrm { m i n } ( \mathbf { m } , 1 ) )$
|
| 125 |
+
12: until training converged
|
| 126 |
+
13: $m _ { k } ^ { ( l ) } = \mathbb { I } ( m _ { k } ^ { ( \bar { l } ) } > t h r e s h o l d )$ , for all $k , l$
|
| 127 |
+
14: Output: A robust network $f ( \cdot ; \mathbf { m } \odot \mathbf { w } , \mathbf { b } )$ against backdoor attacks
|
| 128 |
+
|
| 129 |
+
Adaptation to Batch Normalization. Batch Normalization (BatchNorm) [16] always normalizes its input and controls the mean and variance of the output by a pair of trainable parameters (scale $\gamma$ and shift $\beta$ ). If BatchNorm is inserted between matrix multiplication and the nonlinear activation, the perturbations to weight and bias may cancel each other out. For example, if we perturb the weight and bias of a neuron to the maximum by multiplying $( 1 + \epsilon )$ , the normalization offsets them and nothing changes after BatchNorm. To address this problem, we perturb the scale and shift parameters instead. We also make similar changes to the pruning masks.
|
| 130 |
+
|
| 131 |
+
Table 1: Performance (average over 5 random runs) of 4 defense methods against 6 backdoor attacks on $1 \%$ (500 images) of clean data on CIFAR-10 training set using ResNet-18. The AvgDrop indicates the average changes in ACC or ASR over 6 backdoor attacks compared to no defense results (Before).
|
| 132 |
+
|
| 133 |
+
<table><tr><td rowspan=1 colspan=1>Metric</td><td rowspan=1 colspan=1>Defense</td><td rowspan=1 colspan=1>Badnets Blend IAB-one IAB-all CLB SIG</td><td rowspan=1 colspan=1>AvgDrop</td></tr><tr><td rowspan=5 colspan=1>ACC</td><td rowspan=5 colspan=1>BeforeFT(lr = 0.01)FT(lr = 0.02)FPMCR(t = 0.3)ANP</td><td rowspan=1 colspan=1>93.73 94.82 93.89 94.10 93.78 93.64</td><td rowspan=1 colspan=1>一</td></tr><tr><td rowspan=1 colspan=1>90.48 92.12 88.68 89.06 91.26 91.19</td><td rowspan=1 colspan=1>↓3.53</td></tr><tr><td rowspan=1 colspan=1>87.23 88.98 84.85 83.77 88.25 88.63</td><td rowspan=1 colspan=1>↓7.04</td></tr><tr><td rowspan=2 colspan=1>92.18 92.40 91.57 92.28 91.91 91.6485.95 88.26 86.30 84.53 86.87 85.8890.20 93.44 92.62 92.79 92.67 93.40</td><td rowspan=1 colspan=1>↓2.00</td></tr><tr><td rowspan=1 colspan=1>7.70↓1.47</td></tr><tr><td rowspan=5 colspan=1>ASR</td><td rowspan=5 colspan=1>BeforeFT(lr = 0.01)FT(lr = 0.02)FPMCR(t = 0.3)ANP</td><td rowspan=1 colspan=1>99.97 100.0 98.49 92.88 99.94 94.2611.70 47.17 0.99 1.36 12.51 0.40</td><td rowspan=1 colspan=1>一↓85.24</td></tr><tr><td rowspan=2 colspan=1>2.95 10.20 1.70 1.83 1.17 0.395.34 65.39 20.73 32.36 3.40 0.32</td><td rowspan=1 colspan=1>↓94.55</td></tr><tr><td rowspan=1 colspan=1>↓76.33</td></tr><tr><td rowspan=1 colspan=1>5.70 13.57 30.23 35.17 12.77 0.52</td><td rowspan=1 colspan=1>←81.26</td></tr><tr><td rowspan=1 colspan=1>0.45 0.46 0.88 0.86 3.98 0.28</td><td rowspan=1 colspan=1>↓96.44</td></tr></table>
|
| 134 |
+
|
| 135 |
+
# 4 Experiments
|
| 136 |
+
|
| 137 |
+
In this section, we conduct comprehensive experiments to evaluate the effectiveness of ANP, including its benchmarking robustness, ablation studies and performance under limited computation resources.
|
| 138 |
+
|
| 139 |
+
# 4.1 Experimental Settings
|
| 140 |
+
|
| 141 |
+
Backdoor Attacks and Settings. We consider 5 state-of-the-art backdoor attacks: 1) BadNets [14], 2) Blend backdoor attack (Blend) [6], 3) Input-aware backdoor attack with all-to-one target label (IAB-one) or all-to-all target label (IAB-all) [30], 4) Clean-label backdoor (CLB) [42], and 5) Sinusoidal signal backdoor attack (SIG) [1]. For fair comparisons, we follow the default configuration in their original papers such as the trigger patterns, the trigger sizes and the target labels. We evaluate the performance of all attacks and defenses on CIFAR-10 [19] using ResNet-18 [15] as the base model. We use $9 0 \%$ training data to train the backdoored DNNs and use the all or part of the remaining $1 0 \%$ training data for defense. More details about implementation can be found in Appendix A.
|
| 142 |
+
|
| 143 |
+
Backdoor Defenses and Settings. We compare our proposed ANP with 3 existing model repairing methods: 1) standard fine-tuning (FT), 2) fine-pruning (FP) [24], and 3) mode connectivity repair (MCR) [48]. All defense methods are assumed to have access to the same $1 \%$ of clean training data (500 images). The results based on $1 0 \%$ (5000 images) and $0 . 1 \%$ (50 images) of clean training data can be found in Appendix. For ANP, we optimize all masks using Stochastic Gradient Descent (SGD) with the perturbation budget $\epsilon = 0 . 4$ and the trade-off coefficient $\alpha = 0 . 2$ . We set the batch size 128, the constant learning rate 0.2, and the momentum 0.9 for 2000 iterations in total. Typical data augmentation like random crop and horizontal flipping are applied. After optimization, neurons with mask value smaller than 0.2 are pruned.
|
| 144 |
+
|
| 145 |
+
Evaluation Metrics. We evaluate the performance of different defenses using two metrics: 1) the accuracy on clean data (ACC), and 2) and the attack success rate (ASR) that is the ratio of triggered samples that are misclassified as the target label. For better comparison between different strategies for the target label (e.g., all-to-one and all-to-all), we remove the samples whose ground-truth labels already belong to the target class in the all-to-one setting before calculating ASR. Therefore, an ideal defense always has close-to-zero ASR and high ACC.
|
| 146 |
+
|
| 147 |
+
# 4.2 Benchmarking the State-of-the-art Robustness
|
| 148 |
+
|
| 149 |
+
To verify the effectiveness of the proposed ANP, we compare its performance with other 3 existing model repairing methods using ACC and ASR in Table 1. All experiments are repeated over 5 runs with different random seeds, and we only report the average performance without the standard deviation due to the space constraint. More detailed results including the standard deviation can be found in Appendix C.
|
| 150 |
+
|
| 151 |
+
Table 2: The average training time of defense method against 6 backdoor attacks on $1 \%$ (500 images) of clean data on CIFAR-10 training set using ResNet-18.
|
| 152 |
+
|
| 153 |
+
<table><tr><td>Defense</td><td>FT</td><td>FP</td><td>MCR</td><td>ANP</td></tr><tr><td>Time (s)</td><td>93.80</td><td>1427.1</td><td>286.1</td><td>241.5</td></tr></table>
|
| 154 |
+
|
| 155 |
+
The experimental results show that the proposed ANP remarkably provides almost the highest robustness against several state-of-the-art backdoor attacks. In particular, in 5 of total 6 attacks, our proposed ANP successfully reduces the ASR to lower than $1 \%$ while only has a slight drop $( \sim 1 . 4 7 \%$ on average) in ACC. Note that we only use $1 \%$ of clean data from CIFAR-10 training set, which is extremely small. We find the standard fine-tuning (FT) with a larger learning rate ${ l r = 0 . 0 2 } )$ also provides strong robustness similar to ANP. However, it has an obvious drop in ACC since a large learning rate may destroy the features learned before and the new ones learned on limited data are poor in generalization. The poor accuracy hinders its usage in practical scenarios. In contrast, ANP has similar robustness against backdoor attacks while maintains ACC at a relatively high level at the same time. Similar to our method, Fine-pruning (FP) [24] also prunes some neurons and fine-tunes the pruned model on clean data. Specifically, It only prunes neurons in the last convolutional layer using a rule-of-thumb6, and provides limited robustness against backdoor attacks. Differently, the proposed ANP is data-driven (i.e., optimizing pruning masks based on data) and prunes neurons globally (i.e., pruning neurons in all layers), leading to higher ACC and lower ASR than FP. MCR suggests mitigating backdoor by using a curve model lying on a path connection between two backdoored models in the loss landscapes. However, with limited data, it fails in providing high robustness against complex triggers (e.g. a random trigger sampled from Gaussian in blend backdoor attack or the dynamic trigger in input-aware attack). By contrast, ANP always reduces ASR significantly no matter what the trigger looks like. Note that ANP only prunes neurons and never changes any parameters of backdoored DNNs, while other methods all fine-tune parameters. Under this situation, ANP still provides the almost best robustness against these state-of-the-art attacks, which indicates that pure pruning (without fine-tuning) is still a promising defense against backdoor attacks.
|
| 156 |
+
|
| 157 |
+
We also compare the training time of ANP and other baselines in Table 2, which indicates the efficiency of the proposed ANP. In particular, we apply 2000 iterations for FT, FP, and ANP, and 200 epochs (i.e., 800 iterations) for MCR following the open-sourced code7. Note that ANP is not as slow as the vanilla adversarial training (AT) since ANP only requires one extra backpropagation while PGD inside AT usually needs 10 extra backpropagations (PGD-10) in each update of model parameters. Besides, although ANP takes $2 . 5 \times$ time compared to FT, it improves accuracy (e.g., $8 8 . 9 8 \% 9 3 . 4 4 \%$ for Blend) and reduce vulnerability $( e . g . , \bar { 1 0 . 2 0 \% } \to 0 . 4 6 \%$ for Blend) significantly, making the overhead caused by ANP acceptable.
|
| 158 |
+
|
| 159 |
+
# 4.3 Ablation Studies
|
| 160 |
+
|
| 161 |
+
Effect of Adversarial Neuron Perturbation. Recalling Section 3.2, we apply adversarial neuron perturbations to induce the injected backdoor and then defend against backdoor attacks. Here, we evaluate the effect of the adversarial neuron perturbation in our defense strategy. In the following experiments, we defend against Badnets attack by default, unless otherwise specified. First, we optimize masks with perturbations $\alpha = 0 . 2$ and $\epsilon = 0 . 4$ , i.e., ANP) and without perturbations $\alpha = 1 . 0$ , i.e., the vanilla pruning method). Figure 2(a) shows the ACC and ASR on the test set during optimization. We find the optimization under adversarial neuron perturbations helps the backdoored model suppress ASR significantly while the vanilla one always has high ASR throughout the training process. Next, we illustrate the mask distribution after optimization. Figure 2(b) illustrates a certain fraction of masks becomes zero, which means that adversarial neuron perturbations indeed find some sensitive neurons and helps the model to remove them. In contrast, there is no mask close to 0 for the vanilla pruning method in Figure 2(c). Finally, we prune different fractions of neurons according to their mask in Figure 2(d). For both methods, ASR becomes low after pruning more than $5 \%$ of neurons8. However, ACC also starts to degrade significantly for the vanilla pruning method with more than $5 \%$ of neurons pruned. Since backdoored-related neurons are still mixed with other neurons (e.g., discriminant neurons), the vanilla pruning method prunes some discriminant neurons incorrectly. Meanwhile, ANP always keeps ACC at a relatively high level. In conclusion, the adversarial neuron perturbation is the key to distinguish the backdoor-related neurons from the other neurons, which thereby successfully obtains high ACC as well as low ASR.
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 2: Comparison between optimization with and without adversarial neuron perturbations.
|
| 165 |
+
|
| 166 |
+
Table 3: Results with small budget $\epsilon = 0 . 1$ against Blend attack on 500 clean images. “Neurons↓” indicates the number of neurons pruned by ANP.
|
| 167 |
+
|
| 168 |
+
<table><tr><td>Steps</td><td>1</td><td>2</td><td>5</td><td>10</td></tr><tr><td>Time (s)</td><td>239.9</td><td>359.2</td><td>551.8</td><td>943.9</td></tr><tr><td>Neurons↓</td><td>159</td><td>188</td><td>235</td><td>259</td></tr><tr><td>ASR (%)</td><td>65.19</td><td>13.40</td><td>1.06</td><td>0.90</td></tr><tr><td>ACC (%)</td><td>93.62</td><td>93.07</td><td>92.95</td><td>92.72</td></tr></table>
|
| 169 |
+
|
| 170 |
+
Table 4: Results with large budget $\epsilon = 0 . 4$ against Blend attack on 500 clean images. “Neurons↓” indicates the number of neurons pruned by ANP.
|
| 171 |
+
|
| 172 |
+
<table><tr><td>Steps</td><td>1</td><td>2</td><td>5</td><td>10</td></tr><tr><td>Time (s)</td><td>241.5</td><td>357.2</td><td>557.1</td><td>950.1</td></tr><tr><td>Neurons↓</td><td>233</td><td>239</td><td>281</td><td>296</td></tr><tr><td>ASR (%)</td><td>0.46</td><td>1.30</td><td>5.30</td><td>31.34</td></tr><tr><td>ACC (%)</td><td>93.44</td><td>94.07</td><td>93.57</td><td>94.28</td></tr></table>
|
| 173 |
+
|
| 174 |
+
In addition, we explore the effects of number of iterations in crafting adversarial neuron perturbations. We conduct experiments with varying numbers of steps (1/2/5/10) in ANP with a small perturbation budget $\mathit { \check { \Psi } } _ { \epsilon } = 0 . 1 $ ) and a large perturbation budget $\mathit { \check { \Psi } } \epsilon = 0 . 4$ ) respectively. The other settings are the same as Section 4.1. The experimental results are shown in Tables 3-4. Under a small perturbation budget, with more steps for ANP, the ASR decreases with a slight drop in ACC. This is because ANP with a single step and small size is too weak to distinguish benign neurons and backdoor-related neurons, while more steps can help ANP find more backdoor-related neurons. However, under a large perturbation budget, ANP with more steps has worse robustness. This is because, with a large perturbation budget, more neurons become sensitive. As a result, ANP with more steps finds too many “suspicious” neurons, and it is unable to identify backdoor-related neurons from them. In conclusion, we can strengthen the power of ANP to find backdoor-related neurons using a larger perturbation budget or more steps. Among them, single-step ANP with a slightly larger budget is more practical due to its time efficiency, and we adopt this by default.
|
| 175 |
+
|
| 176 |
+
Results with Varying Hyperparameters. As mentioned in Section 3.3, the hyper-parameter $\alpha$ in ANP controls the trade-off between the accuracy on clean data and the robustness against backdoor attacks. To test the performance with different $\alpha$ , we optimize masks for a Badnets ResNet-18 based on $1 \%$ of clean data using different $\alpha \in [ 0 , 1 ]$ with a fixed budget $\epsilon = 0 . 4$ . In pruning, we always prune neurons by the threshold 0.2. As shown in the left plot of Figure 4, ANP is able to achieve a high robustness $\mathrm { \Delta A S R } < 4 \%$ ) when $\alpha \leq 0 . 6$ . Meanwhile, ANP maintains a high natural accuracy $( \mathrm { A C C } \geq 9 0 \% )$ as long as $\alpha \ge 0 . 1$ . As a result, ANP behaves well with high ACC and low ASR in a range of $\alpha \in [ 0 . 1 , 0 . 6 ]$ .
|
| 177 |
+
|
| 178 |
+
Similarly, we also test the performance with different perturbation budgets $\epsilon$ . The experiment settings are almost the same except a fixed trade-off coefficient $\alpha = 0 . 2$ and varying budgets $\epsilon \in [ 0 , 1 ]$ . For example, we can provide obvious robustness (ASR becomes $7 . 4 5 \%$ ) with a small perturbation budget $\epsilon = 0 . 2$ ) as shown in the right plot of Figure 4. However, we find the accuracy on clean data degrades with a large perturbation budget. This is because too large perturbation budget brings much difficulty to converge well and ANP only finds a poor solution, which fails in identifying these discriminant and robust neurons and prunes part of them. As a result, ACC decreases significantly. In conclusion, the proposed ANP is stable in a large range of the trade-off coefficient $\alpha \in [ 0 . 1 , 0 . 6 ]$ and the perturbation budget $\epsilon \in [ 0 . 2 , 0 . 7 ]$ , demonstrating that ANP is not sensitive to hyper-parameters.
|
| 179 |
+
|
| 180 |
+

|
| 181 |
+
Figure 3: Performance $\pm$ std over 5 random runs) of pruned models using different architectures by different pruning fractions or different thresholds.
|
| 182 |
+
|
| 183 |
+
From the discussion above, we find that the hyperparameters are insensitive as shown in Figure 4 and ANP performs well across a wide range of hyperparameters, e.g., trade-off coefficient $\alpha \in [ 0 . 1 , 0 . 6 ]$ against Badnets attack. In addition, with varying hyperparameters, the performance trends are very consistent across different backdoor attacks as shown in Figure $\mathrm { X }$ in Appendix C.1. As a result, even though the attack (e.g., Blend) is unknown, the defender could tune $\alpha$ against a known attack (e.g., Badnets) and find the 0.2 is a good choice. ANP with $\alpha = 0 . 2$ also achieves satisfactory performance against Blend attack. In conclusion, the selection of hyperparameters in ANP is not difficult.
|
| 184 |
+
|
| 185 |
+
Pruning by Fraction or by Threshold. Different from previous pruning methods that use a fixed pruning fraction, the proposed ANP prunes neurons by a threshold when generalized across different model architectures. To verify this, we train different Badnets models using ResNet-18 [15], ResNet50 [15], and VGG-19 [37] with the same settings as Section 4.1. We also train a model with Badnets MobileNet-V2 with 300 epochs . We optimize the pruning masks for these models with $\epsilon = 0 . 4 , \alpha = 0 . 2$ for ResNet-18, ResNet-50, and VGG-19. For MobileNet-V2, we found the perturbation budget $\epsilon = 0 . 4$ is too large, leading to a failure in convergence. So we apply a smaller budget $\epsilon = 0 . 2$ and the same trade-off coefficient $\alpha = 0 . 2$ . We show the ACC and ASR after pruning by varying pruning fractions in Figure 3(a) and 3(b), which indicates that the suitable fraction varies across model architectures. For example, ResNet-18 only has low ASR after pruning $5 \%$ of neurons, while MobileNet-V2 has a large accuracy drop on clean samples with more than $5 \%$ neurons pruned. Figure 3(c) and Figure 3(d) show ACC and ASR after pruning by different thresholds respectively. When pruning by the threshold, we find there is a large overlap in [0.2, 0.5] (the gray zone) in which all models have high ACC and low ASR simultaneously. That is why we adopt the strategy of pruning by the threshold in ANP. Note that, even for low-capacity models as MobileNet-V2, it is still possible to remove the injected backdoor by neuron pruning (without the fine-tuning).
|
| 186 |
+
|
| 187 |
+
Pruning on Different Components. We also compare the performance when applying ANP to different components inside DNNs. We prune a backdoored 4-layer CNN (2 conv layers $^ { + 1 }$ fullyconnected layer $^ +$ output layer) on MNIST, and find it more efficient to prune neurons in some layers. In particular, we achieve $0 . 4 3 \%$ of ASR $( 9 9 . 0 4 \%$ of ACC) when two neurons in the 2nd layer are pruned, while we only achieve $4 . 4 2 \%$ of ASR $( 9 2 . 4 8 \%$ of ACC) even after pruning 150 neurons in the fully-connected layer. The experimental settings and more results can be found in Appendix C.2. This indicates that the structure of components matter in pruning-based defense. We leave this in our future work.
|
| 188 |
+
|
| 189 |
+
# 4.4 Performance under Limited Computation Resource
|
| 190 |
+
|
| 191 |
+
In practical scenarios, the defender usually has limited clean data and computation resources, bringing more difficulty to repair backdoored models. While Section 4.2 has discussed the effectiveness of the proposed ANP on the extremely small amount of data, this part focuses on the performance with limited computation resources in defense.
|
| 192 |
+
|
| 193 |
+
In particular, we optimize all masks for a Badnets ResNet-18 with varying number of iterations (20, 100, 400, and 2000) on $1 \%$ of clean data (500 images) and prune the model from neurons with the small mask to neurons with the large mask. Figure 5 shows the ACC and ASR with varying pruning fractions based on different numbers of iterations. We find that some backdoor-related neurons have already been distinguished just after 20 iterations. For example, after removing $4 \%$ of neurons with the smallest masks, the pruned model has $6 . 2 8 \%$ of ASR and $8 6 . 6 5 \%$ of ACC. As the pruning fraction increases, ASR falls significantly first and raises again after $1 0 \%$ of neurons are pruned. This is because ANP has not yet separated them completely due to extremely limited computation (only 20 iterations). With more than 100 iterations, this phenomenon disappears. And ANP based on 100 iterations already has comparable performance to ANP on 2000 iterations, especially when we have not pruned too many neurons $( < 8 \%$ ).
|
| 194 |
+
|
| 195 |
+

|
| 196 |
+
Figure 4: Performance ( $\pm$ std over 5 random runs) of the pruned model by a threshold 0.2 with different hyper-parameters (Left: trade-off coefficient $\alpha$ ; Right: perturbation budget $\dot { \epsilon }$ ).
|
| 197 |
+
|
| 198 |
+

|
| 199 |
+
Figure 5: Performance ( $\pm$ std over 5 random runs) of the proposed ANP with varying pruning fractions based on different numbers of iterations.
|
| 200 |
+
|
| 201 |
+
We also find that ANP with 2000 iterations should prune more $( + 1 \% )$ neurons to degrade ASR than ones with fewer iterations. We conjecture this is because there also exist some sensitive neurons that are unrelated to the injected backdoor9, which are assigned with small masks at the late optimization stage. Besides, for ACC, we can see that more iterations maintain a higher ACC than fewer iterations, especially when more neurons are pruned, as the left neurons are almost the discriminant and robust ones. In conclusion, even with extremely small number of iterations (e.g., 20 iterations), ANP is able to distinguish the backdoor-related neurons from other neurons and obtains satisfactory robustness against backdoor attacks.
|
| 202 |
+
|
| 203 |
+
# 5 Conclusion
|
| 204 |
+
|
| 205 |
+
In this paper, we identified a sensitivity of backdoored DNNs to adversarial neuron perturbations, which induces them to present backdoor behaviours even without the presence of the trigger patterns. Based on these findings, we proposed Adversarial Neuron Pruning (ANP) to prune the sensitive neurons under adversarial neuron perturbations. Comprehensive experiments show that ANP consistently removes the injected backdoor and provides the highest robustness against several state-of-the-art backdoor attacks even with a limited amount of clean data and computation resources. Finally, our work also reminds researchers that pruning (without fine-tuning) is still a promising defense against backdoor attacks.
|
| 206 |
+
|
| 207 |
+
# Broader Impact
|
| 208 |
+
|
| 209 |
+
The backdoor attack has become a threat to outsourcing training and open-sourcing models. We propose ANP to improve the robustness against these backdoor attacks, which may help to build a more secure model even trained in an untrustworthy third-party platform. Further, we do not want this paper to bring overoptimism about AI safety to the society. Since the backdoor attack is only a part of potential risks ( e.g., adversarial attacks, privacy leakage, and model extraction), there is still a long way towards secure AI and trustworthy AI.
|
| 210 |
+
|
| 211 |
+
# Acknowledgments
|
| 212 |
+
|
| 213 |
+
Yisen Wang is partially supported by the National Natural Science Foundation of China under Grant 62006153, and Project 2020BD006 supported by PKU-Baidu Fund.
|
| 214 |
+
|
| 215 |
+
# References
|
| 216 |
+
|
| 217 |
+
[1] Mauro Barni, Kassem Kallas, and Benedetta Tondi. A new backdoor attack in cnns by training set corruption without label poisoning. In ICIP, 2019.
|
| 218 |
+
[2] Battista Biggio, Blaine Nelson, and Pavel Laskov. Support vector machines under adversarial label noise. In ACML, 2011.
|
| 219 |
+
[3] Battista Biggio, Igino Corona, Davide Maiorca, Blaine Nelson, Nedim Šrndic, Pavel Laskov, ´ Giorgio Giacinto, and Fabio Roli. Evasion attacks against machine learning at test time. In ECML/PKDD, 2013.
|
| 220 |
+
[4] Eitan Borgnia, Valeriia Cherepanova, Liam Fowl, Amin Ghiasi, Jonas Geiping, Micah Goldblum, Tom Goldstein, and Arjun Gupta. Strong data augmentation sanitizes poisoning and backdoor attacks without an accuracy tradeoff. In ICASSP, 2021.
|
| 221 |
+
[5] Huili Chen, Cheng Fu, Jishen Zhao, and Farinaz Koushanfar. Deepinspect: A black-box trojan detection and mitigation framework for deep neural networks. In IJCAI, 2019.
|
| 222 |
+
[6] Xinyun Chen, Chang Liu, Bo Li, Kimberly Lu, and Dawn Song. Targeted backdoor attacks on deep learning systems using data poisoning. arXiv preprint arXiv:1712.05526, 2017.
|
| 223 |
+
[7] Xinyun Chen, Wenxiao Wang, Chris Bender, Yiming Ding, Ruoxi Jia, Bo Li, and Dawn Song. Refit: a unified watermark removal framework for deep learning systems with limited data. arXiv preprint arXiv:1911.07205, 2019.
|
| 224 |
+
[8] Ilias Diakonikolas, Gautam Kamath, Daniel Kane, Jerry Li, Jacob Steinhardt, and Alistair Stewart. Sever: A robust meta-algorithm for stochastic optimization. In ICML, 2019.
|
| 225 |
+
[9] Chao Gao, Yuan Yao, and Weizhi Zhu. Generative adversarial nets for robust scatter estimation: A proper scoring rule perspective. Journal of Machine Learning Research, 21(160):1–48, 2020.
|
| 226 |
+
[10] Yansong Gao, Change Xu, Derui Wang, Shiping Chen, Damith C Ranasinghe, and Surya Nepal. Strip: A defence against trojan attacks on deep neural networks. In ACSAC, 2019.
|
| 227 |
+
[11] Amirata Ghorbani and James Zou. Neuron shapley: Discovering the responsible neurons. In NeurIPS, 2021.
|
| 228 |
+
[12] Micah Goldblum, Dimitris Tsipras, Chulin Xie, Xinyun Chen, Avi Schwarzschild, Dawn Song, Aleksander Madry, Bo Li, and Tom Goldstein. Data security for machine learning: Data poisoning, backdoor attacks, and defenses. arXiv preprint arXiv:2012.10544, 2020.
|
| 229 |
+
[13] Ian J Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In ICLR, 2015.
|
| 230 |
+
[14] Tianyu Gu, Kang Liu, Brendan Dolan-Gavitt, and Siddharth Garg. Badnets: Evaluating backdooring attacks on deep neural networks. IEEE Access, 7:47230–47244, 2019.
|
| 231 |
+
[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
|
| 232 |
+
[16] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In ICML, 2015.
|
| 233 |
+
[17] Pang Wei Koh and Percy Liang. Understanding black-box predictions via influence functions. In ICML, 2017.
|
| 234 |
+
[18] Pang Wei Koh, Jacob Steinhardt, and Percy Liang. Stronger data poisoning attacks break data sanitization defenses. arXiv preprint arXiv:1811.00741, 2018.
|
| 235 |
+
[19] Alex Krizhevsky and Geoffrey Hinton. Learning multiple layers of features from tiny images. Technical Report, University of Toronto, 2009.
|
| 236 |
+
[20] Alexander Levine and Soheil Feizi. Deep partition aggregation: Provable defense against general poisoning attacks. arXiv preprint arXiv:2006.14768, 2020.
|
| 237 |
+
[21] Alexander Levine and Soheil Feizi. Deep partition aggregation: Provable defense against general poisoning attacks. In ICLR, 2021.
|
| 238 |
+
[22] Yige Li, Nodens Koren, Lingjuan Lyu, Xixiang Lyu, Bo Li, and Xingjun Ma. Neural attention distillation: Erasing backdoor triggers from deep neural networks. In ICLR, 2021.
|
| 239 |
+
[23] Yige Li, Xixiang Lyu, Nodens Koren, Lingjuan Lyu, Bo Li, and Xingjun Ma. Anti-backdoor learning: Training clean models on poisoned data. In NeurIPS, 2021.
|
| 240 |
+
[24] Kang Liu, Brendan Dolan-Gavitt, and Siddharth Garg. Fine-pruning: Defending against backdooring attacks on deep neural networks. In RAID, 2018.
|
| 241 |
+
[25] Yingqi Liu, Shiqing Ma, Yousra Aafer, Wen-Chuan Lee, Juan Zhai, Weihang Wang, and Xiangyu Zhang. Trojaning attack on neural networks. In NDSS, 2018.
|
| 242 |
+
[26] Yunfei Liu, Xingjun Ma, James Bailey, and Feng Lu. Reflection backdoor: A natural backdoor attack on deep neural networks. In ECCV, 2020.
|
| 243 |
+
[27] Yuntao Liu, Yang Xie, and Ankur Srivastava. Neural trojans. In ICCD, 2017.
|
| 244 |
+
[28] Shiqing Ma and Yingqi Liu. Nic: Detecting adversarial samples with neural network invariant checking. In NDSS, 2019.
|
| 245 |
+
[29] Yuzhe Ma, Xiaojin Zhu Zhu, and Justin Hsu. Data poisoning against differentially-private learners: Attacks and defenses. In IJCAI, 2019.
|
| 246 |
+
[30] Anh Nguyen and Anh Tran. Input-aware dynamic backdoor attack. In NeurIPS, 2020.
|
| 247 |
+
[31] Anh Nguyen and Anh Tran. Wanet–imperceptible warping-based backdoor attack. In ICLR, 2021.
|
| 248 |
+
[32] Ren Pang, Hua Shen, Xinyang Zhang, Shouling Ji, Yevgeniy Vorobeychik, Xiapu Luo, Alex Liu, and Ting Wang. A tale of evil twins: Adversarial inputs versus poisoned models. In CCS, 2020.
|
| 249 |
+
[33] Ximing Qiao, Yukun Yang, and Hai Li. Defending neural backdoors via generative distribution modeling. In NeurIPS, 2019.
|
| 250 |
+
[34] Elan Rosenfeld, Ezra Winston, Pradeep Ravikumar, and Zico Kolter. Certified robustness to label-flipping attacks via randomized smoothing. In ICML, 2020.
|
| 251 |
+
[35] Ali Shafahi, W Ronny Huang, Mahyar Najibi, Octavian Suciu, Christoph Studer, Tudor Dumitras, and Tom Goldstein. Poison frogs! targeted clean-label poisoning attacks on neural networks. In NeurIPS, 2018.
|
| 252 |
+
[36] David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
|
| 253 |
+
[37] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015.
|
| 254 |
+
[38] Jacob Steinhardt, Pang Wei Koh, and Percy Liang. Certified defenses for data poisoning attacks. In NeurIPS, 2017.
|
| 255 |
+
[39] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014.
|
| 256 |
+
[40] Lue Tao, Lei Feng, Jinfeng Yi, Sheng-Jun Huang, and Songcan Chen. Better safe than sorry: Preventing delusive adversaries with adversarial training. In NeurIPS, 2021.
|
| 257 |
+
[41] Brandon Tran, Jerry Li, and Aleksander Madry. Spectral signatures in backdoor attacks. In NeurIPS, 2018.
|
| 258 |
+
[42] Alexander Turner, Dimitris Tsipras, and Aleksander Madry. Label-consistent backdoor attacks. arXiv preprint arXiv:1912.02771, 2019.
|
| 259 |
+
[43] Bolun Wang, Yuanshun Yao, Shawn Shan, Huiying Li, Bimal Viswanath, Haitao Zheng, and Ben Y Zhao. Neural cleanse: Identifying and mitigating backdoor attacks in neural networks. In S&P, 2019.
|
| 260 |
+
[44] Ren Wang, Gaoyuan Zhang, Sijia Liu, Pin-Yu Chen, Jinjun Xiong, and Meng Wang. Practical detection of trojan neural networks: Data-limited and data-free cases. In ECCV, 2020.
|
| 261 |
+
[45] Yisen Wang, Xuejiao Deng, Songbai Pu, and Zhiheng Huang. Residual convolutional ctc networks for automatic speech recognition. arXiv preprint arXiv:1702.07793, 2017.
|
| 262 |
+
[46] Maurice Weber, Xiaojun Xu, Bojan Karlas, Ce Zhang, and Bo Li. Rab: Provable robustness against backdoor attacks. arXiv preprint arXiv:2003.08904, 2020.
|
| 263 |
+
[47] Dongxian Wu, Shu-Tao Xia, and Yisen Wang. Adversarial weight perturbation helps robust generalization. In NeurIPS, 2020.
|
| 264 |
+
[48] Pu Zhao, Pin-Yu Chen, Payel Das, Karthikeyan Natesan Ramamurthy, and Xue Lin. Bridging mode connectivity in loss landscapes and adversarial robustness. In ICLR, 2019.
|
| 265 |
+
[49] Haoti Zhong, Cong Liao, Anna Cinzia Squicciarini, Sencun Zhu, and David Miller. Backdoor embedding in convolutional neural network models via invisible perturbation. In CODASPY, 2020.
|
| 266 |
+
[50] Liuwan Zhu, Rui Ning, Cong Wang, Chunsheng Xin, and Hongyi Wu. Gangsweep: Sweep out neural backdoors by gan. In MM, 2020.
|
md/train/4dXmpCDGNp7/4dXmpCDGNp7.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/4fLr7H5D_eT/4fLr7H5D_eT.md
ADDED
|
@@ -0,0 +1,310 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FjORD: Fair and Accurate Federated Learning under heterogeneous targets with Ordered Dropout
|
| 2 |
+
|
| 3 |
+
Samuel Horváth∗ KAUST† Thuwal, KSA samuel.horvath@kaust.edu.sa
|
| 4 |
+
|
| 5 |
+
Stefanos Laskaridis∗ Samsung AI Center Cambridge, UK mail@stefanos.cc
|
| 6 |
+
|
| 7 |
+
Mario Almeida∗
|
| 8 |
+
Samsung AI Center
|
| 9 |
+
Cambridge, UK
|
| 10 |
+
mario.a@samsung.com
|
| 11 |
+
|
| 12 |
+
Ilias Leontiadis Samsung AI Center Cambridge, UK i.leontiadis@samsung.com
|
| 13 |
+
|
| 14 |
+
Stylianos I. Venieris Samsung AI Center Cambridge, UK s.venieris@samsung.com
|
| 15 |
+
|
| 16 |
+
Nicholas D. Lane Samsung AI Center &
|
| 17 |
+
University of Cambridge Cambridge, UK
|
| 18 |
+
nic.lane@samsung.com
|
| 19 |
+
|
| 20 |
+
# Abstract
|
| 21 |
+
|
| 22 |
+
Federated Learning (FL) has been gaining significant traction across different ML tasks, ranging from vision to keyboard predictions. In large-scale deployments, client heterogeneity is a fact and constitutes a primary problem for fairness, training performance and accuracy. Although significant efforts have been made into tackling statistical data heterogeneity, the diversity in the processing capabilities and network bandwidth of clients, termed as system heterogeneity, has remained largely unexplored. Current solutions either disregard a large portion of available devices or set a uniform limit on the model’s capacity, restricted by the least capable participants. In this work, we introduce Ordered Dropout, a mechanism that achieves an ordered, nested representation of knowledge in deep neural networks (DNNs) and enables the extraction of lower footprint submodels without the need of retraining. We further show that for linear maps our Ordered Dropout is equivalent to SVD. We employ this technique, along with a self-distillation methodology, in the realm of FL in a framework called FjORD. FjORD alleviates the problem of client system heterogeneity by tailoring the model width to the client’s capabilities. Extensive evaluation on both CNNs and RNNs across diverse modalities shows that FjORD consistently leads to significant performance gains over state-of-the-art baselines, while maintaining its nested structure.
|
| 23 |
+
|
| 24 |
+
# 1 Introduction
|
| 25 |
+
|
| 26 |
+
Over the past few years, advances in deep learning have revolutionised the way we interact with everyday devices. Much of this success relies on the availability of large-scale training infrastructures and the collection of vast amounts of training data. However, users and providers are becoming increasingly aware of the privacy implications of this ever-increasing data collection, leading to the creation of various privacy-preserving initiatives by service providers [3] and government regulators [10].
|
| 27 |
+
|
| 28 |
+
Federated Learning (FL) [46] is a relatively new subfield of machine learning (ML) that allows the training of models without the data leaving the users’ devices; instead, FL allows users to collaboratively train a model by moving the computation to them. At each round, participating devices download the latest model and compute an updated model using their local data. These locally trained models are then sent from the participating devices back to a central server where updates are aggregated for next round’s global model. Until now, a lot of research effort has been invested with the sole goal of maximising the accuracy of the global model [46, 42, 39, 31, 63], while complementary mechanisms have been proposed to ensure privacy and robustness [6, 14, 47, 48, 27, 4].
|
| 29 |
+
|
| 30 |
+

|
| 31 |
+
Figure 1: FjORD employs OD to tailor the amount of computation to the capabilities of each participating device.
|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
Figure 2: Ordered vs. Random Dropout. In this example, the left-most features are used by more devices during training, creating a natural ordering to the importance of these features.
|
| 35 |
+
|
| 36 |
+
A key challenge of deploying FL in the wild is the vast heterogeneity of devices [38], ranging from low-end IoT to flagship mobile devices. Despite this fact, the widely accepted norm in FL is that the local models have to share the same architecture as the global model. Under this assumption, developers typically opt to either drop low-tier devices from training, hence introducing training bias due to unseen data [30], or limit the global model’s size to accommodate the slowest clients, leading to degraded accuracy due to the restricted model capacity [8]. In addition to these limitations, variability in sample sizes, computation load and data transmission speeds further contribute to a very unbalanced training environment. Finally, the resulting model might not be as efficient as models specifically tailored to the capabilities of each device tier to meet the minimum processingperformance requirements [34].
|
| 37 |
+
|
| 38 |
+
In this work, we introduce FjORD (Fig. 1), a novel adaptive training framework that enables heterogeneous devices to participate in FL by dynamically adapting model size – and thus computation, memory and data exchange sizes – to the available client resources. To this end, we introduce Ordered Dropout (OD), a mechanism for run-time ordered (importance-based) pruning, which enables us to extract and train submodels in a nested manner. As such, OD enables all devices to participate in the FL process independently of their capabilities by training a submodel of the original DNN, while still contributing knowledge to the global model. Alongside OD, we propose a self-distillation method from the maximal supported submodel on a device to enhance the feature extraction of smaller submodels. Finally, our framework has the additional benefit of producing models that can be dynamically scaled during inference, based on the hardware and load constraints of the device.
|
| 39 |
+
|
| 40 |
+
Our evaluation shows that FjORD enables significant accuracy benefits over the baselines across diverse datasets and networks, while allowing for the extraction of submodels of varying FLOPs and sizes without the need for retraining.
|
| 41 |
+
|
| 42 |
+
# 2 Motivation
|
| 43 |
+
|
| 44 |
+
Despite the progress on the accuracy front, the unique deployment challenges of FL still set a limit to the attainable performance. FL is typically deployed on either siloed setups, such as among hospitals, or on mobile devices in the wild [7]. In this work, we focus on the latter setting. Hence, while cloud-based distributed training uses powerful high-end clients [19], in FL these are commonly substituted by resource-constrained and heterogeneous embedded devices.
|
| 45 |
+
|
| 46 |
+
In this respect, FL deployment is currently hindered by the vast heterogeneity of client hardware [66, 28, 7]. On the one hand, different mobile hardware leads to significantly varying processing speed [1], in turn leading to longer waits upon aggregation of updates (i.e. stragglers). At the same time, devices of mid and low tiers might not even be able to support larger models, e.g. the model does not fit in memory or processing is slow, and, thus, are either excluded or dropped upon timeouts from the training process, together with their unique data. More interestingly, the resource allocation to participating devices may also reflect on demographic and socio-economic information of owners, that makes the exclusion of such clients unfair [30] in terms of participation. Analogous to the device load and heterogeneity, a similar trend can be traced in the downstream (model) and upstream (updates) network communication in FL, which can be an additional substantial bottleneck for the training procedure [55].
|
| 47 |
+
|
| 48 |
+
# 3 Ordered Dropout
|
| 49 |
+
|
| 50 |
+
In this paper, we firstly introduce the tools that act as enablers for heterogeneous federated training. Concretely, we have devised a mechanism of importance-based pruning for the easy extraction of subnetworks from the original, specially trained model, each with a different computational and memory footprint. We name this technique Ordered Dropout (OD), as it orders knowledge representation in nested submodels of the original network.
|
| 51 |
+
|
| 52 |
+
More specifically, our technique starts by sampling a value (denoted by $p$ ) from a distribution of candidate values. Each of these values corresponds to a specific submodel, which in turn gets translated to a specific computational and memory footprint (see Table 1b). Such sampled values and associations are depicted in Fig. 2. Contrary to conventional dropout (RD), our technique drops adjacent components of the model instead of random neurons, which translates to computational benefits3 in today’s linear algebra libraries and higher accuracy as shown later.
|
| 53 |
+
|
| 54 |
+
# 3.1 Ordered Dropout Mechanics
|
| 55 |
+
|
| 56 |
+
The proposed OD method is parametrised with respect to: i) the value of the dropout rate $p \in ( 0 , 1 ]$ per layer, ii) the set of candidate values $\mathcal { P }$ , such that $p \in \mathcal P$ and iii) the sampling method of $p$ over the set of candidate values, such that $p \sim D _ { \mathcal { P } }$ , where $D _ { \mathcal { P } }$ is the distribution over $\mathcal { P }$ .
|
| 57 |
+
|
| 58 |
+
A primary hyperparameter of OD is the dropout rate $p$ which defines how much of each layer is to be included, with the rest of the units dropped in a structured and ordered manner. The value of $p$ is selected by sampling from the dropout distribution $D _ { \mathcal { P } }$ which is represented by a set of discrete values $\mathcal { P } = \{ s _ { 1 } , s _ { 2 } , . . . , s _ { | \mathcal { P } | } \}$ such that $0 { < } s _ { 1 } { < } . . . { < } s _ { | } p _ { | } \leq 1$ and probabilities $\mathbf { P } ( { \dot { p } } = s _ { i } ) > 0$ , $\forall i \in [ | \mathcal { P } | ]$ such that $\begin{array} { r } { \sum _ { i = 1 } ^ { | \mathcal { P } | } \mathbf { P } ( p = s _ { i } ) = 1 } \end{array}$ . For instance, a uniform distribution over $\mathcal { P }$ is denoted by $p \sim \mathcal { U } _ { \mathcal { P } }$ (i.e. $D = \mathcal { U }$ ). In our experiments we use uniform distribution over the set $\mathcal { P } = \{ i / { k } \} _ { i = 1 } ^ { k }$ , which we refer to as $\mathcal { U } _ { k }$ (or uniform- $k$ ). The discrete nature of the distribution stems from the innately discrete number of neurons or filters to be selected. The selection of set $\mathcal { P }$ is discussed in the next subsection.
|
| 59 |
+
|
| 60 |
+
The dropout rate $p$ can be constant across all layers or configured individually per layer $l$ , leading to $p _ { l } \sim \dot { D } _ { \mathcal { P } } ^ { l }$ . As such an approach opens the search space dramatically, we refer the reader to NAS techniques [69] and continue with the same $p$ value across network layers for simplicity, without hurting the generality of our approach.
|
| 61 |
+
|
| 62 |
+
Given a $p$ value, a pruned $p$ -subnetwork can be directly obtained as follows. For each4 layer $l$ with width5 $K _ { l }$ , the submodel for a given $p$ has all neurons/filters with index $\{ 0 , 1 , \ldots , \lceil p \cdot K _ { l } \rceil - 1 \}$ included and $\{ \lceil p \cdot K _ { l } \rceil , \ldots , K _ { l } ^ { - } - 1 \}$ pruned. Moreover, the unnecessary connections between pruned neurons/filters are also removed6. We denote a pruned $p$ -subnetwork $\mathbf { F } _ { p }$ with its weights ${ \pmb w } _ { p }$ , where $\mathbf { F }$ and $\pmb { w }$ are the original network and weights, respectively. Importantly, contrary to existing pruning techniques [18, 35, 49], a $p$ -subnetwork from OD can be directly obtained post-training without the need to fine-tune, thus eliminating the requirement to access any labelled data.
|
| 63 |
+
|
| 64 |
+
# 3.2 Training OD Formulation
|
| 65 |
+
|
| 66 |
+
We propose two ways to train an OD-enabled network: i) plain $O D$ and ii) knowledge distillation $O D$ training (OD w/ KD). In the first approach, in each step we first sample $p \sim D _ { \mathcal { P } }$ ; then we perform the forward and backward pass using the $p$ -reduced network $\mathbf { F } _ { p }$ ; finally we update the submodel’s weights using the selected optimiser. Since sampling a $p$ -reduced network provides us significant computational savings on average, we can exploit this reduction to further boost accuracy. Therefore, in the second approach we exploit the nested structure of OD, i.e. $p _ { 1 } < p _ { 2 } \implies \mathbf { F } _ { p _ { 1 } } \subset \mathbf { F } _ { p _ { 2 } }$ and allow for the bigger capacity supermodel to teach the sampled $p$ -reduced network at each iteration via knowledge distillation (teacher $p _ { \operatorname* { m a x } } > p$ , $p _ { \operatorname* { m a x } } = \operatorname* { m a x } { \mathcal P }$ ). In particular, in each iteration, the loss function consists of two components as follows:
|
| 67 |
+
|
| 68 |
+

|
| 69 |
+
Figure 3: Full non-federated datasets. OD-Ordered Dropout with $D _ { \mathcal { P } } = \mathcal { U } _ { 5 }$ , SM-single independent models, KD-knowledge distillation.
|
| 70 |
+
|
| 71 |
+
where $\mathrm { S M } _ { p }$ is the softmax output of the sampled $p$ -submodel, $\pmb { y } _ { \mathrm { l a b e l } }$ is the ground-truth label, CE is the cross-entropy function, KL is the KL divergence, $T$ is the distillation temperature [21] and $\alpha$ is the relative weight of the two components. We observed in our experiments always backpropagating also the teacher network further boosts performance. Furthermore, the best performing values for distillation were $\alpha = T = 1$ , thus smaller models exactly mimic the teacher output. This means that new knowledge propagates in submodels by proxy, i.e. by backpropagating on the teacher, leading to the following loss function:
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\mathscr { L } _ { d } ( \mathbf { S } \mathbf { M } _ { p } , \mathbf { S } \mathbf { M } _ { p _ { \operatorname* { m a x } } } , \pmb { y } _ { \mathrm { l a b e l } } ) = \mathbf { K L } ( \mathbf { S } \mathbf { M } _ { p } , \mathbf { S } \mathbf { M } _ { p _ { \operatorname* { m a x } } } , T ) + \mathbf { C } \mathbf { E } ( \operatorname* { m a x } ( \mathbf { S } \mathbf { M } _ { p _ { \operatorname* { m a x } } } ) , \pmb { y } _ { \mathrm { l a b e l } } )
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
# 3.3 Ordered Dropout exactly recovers SVD
|
| 78 |
+
|
| 79 |
+
We further show that our new OD formulation can recover the Singular Value Decomposition (SVD) in the case where there exists a linear mapping from features to responses. We formalise this claim in the following theorem.
|
| 80 |
+
|
| 81 |
+
Theorem 1. Let $\mathbf { F } : \mathbb { R } ^ { n } \mathbb { R } ^ { m }$ be a NN with two fully-connected linear layers with no activation or biases and $K = \operatorname* { m i n } \{ m , n \}$ hidden neurons. Moreover, let data $\mathcal { X }$ come from a uniform distribution on the $n$ -dimensional unit ball and $A$ be an $m \times n$ full rank matrix with $K$ distinct singular values. If response $y$ is linked to data $\mathcal { X }$ via a linear map: $x A x$ and distribution $D _ { \mathcal { P } }$ is such that for every $b \in [ K ]$ there exists $p \in \mathcal P$ for which $b = \lceil p \cdot K \rceil$ , then for the optimal solution of
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
\operatorname* { m i n } _ { \mathbf { F } } \mathbb { E } _ { { x } \sim { \mathcal { X } } } \mathbb { E } _ { { p } \sim { D _ { \mathcal { P } } } } \| \mathbf { F } _ { p } ( { x } ) - { y } \| ^ { 2 }
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
it holds $\mathbf { F } _ { p } ( x ) = A _ { b } x$ , where $A _ { b }$ is the best $b$ -rank approximation of $A$ and $b = \lceil p \cdot K \rceil$ .
|
| 88 |
+
|
| 89 |
+
Theorem 1 shows that our OD formulation exhibits not only intuitively, but also theoretically ordered importance representation. Proof of this claim is deferred to the Appendix.
|
| 90 |
+
|
| 91 |
+
# 3.4 Model-Device Association
|
| 92 |
+
|
| 93 |
+
Computational and Memory Implications. The primary objective of OD is to alleviate the excessive computational and memory demands of the training and inference deployments. When a layer is shrunk through OD, there is no need to perform the forward and backward passes or gradient updates on the pruned units. As a result, OD offers gains both in terms of FLOP count and model size. In particular, for every fully-connected and convolutional layer, the number of FLOPs and weight parameters is reduced by $K _ { 1 } { \cdot } K _ { 2 } \big / [ p { \cdot } K _ { 1 } ] { \cdot } [ p { \cdot } K _ { 2 } ] \sim 1 \big / p ^ { 2 }$ , where $K _ { 1 }$ and $K _ { 2 }$ correspond to the number of input and output neurons/channels, respectively. Accordingly, the bias terms are reduced by a factor of $K _ { 2 } / [ p \cdot K _ { 2 } ] \sim 1 / p$ . The normalisation, activation and pooling layers are compressed in terms of FLOPs and parameters similarly to the biases in fully-connected and convolutional layers. This is also evident in Table 1b. Finally, smaller model size also leads to reduced memory footprint for gradients and the optimiser’s state vectors such as momentum. However, how are these submodels related to devices in the wild and how is this getting modelled?
|
| 94 |
+
|
| 95 |
+
Ordered Dropout Rates Space. Our primary objective with OD is to tackle device heterogeneity. Inherently, each device has certain capabilities and can run a specific number of model operations within a given time budget. Since each $p$ value defines a submodel of a given width, we can indirectly associate a $p _ { \mathrm { m a x } } ^ { i }$ value with the $i$ -th device capabilities, such as memory, processing throughput or energy budget. As such, each participating client is given at most the $p _ { \mathrm { m a x } } ^ { i ^ { \ast } }$ -submodel it can handle.
|
| 96 |
+
|
| 97 |
+
Devices in the wild, however, can have dramatically different capabilities; a fact further exacerbated by the co-existence of previous-generation devices. Modelling discretely each device becomes quickly intractable at scale. Therefore, we cluster devices of similar capabilities together and subsequently associate a single $p _ { \mathrm { m a x } } ^ { i }$ value with each cluster. This clustering can be done heuristically (i.e. based on the specifications of the device) or via benchmarking of the model on the actual device and is considered a system-design decision for our paper. As smartphones nowadays run a multitude of simultaneous tasks [43], our framework can further support modelling of transient device load by reducing its associated $p _ { \mathrm { m a x } } ^ { i }$ , which essentially brings the capabilities of the device to a lower tier at run time, thus bringing real-time adaptability to FjORD.
|
| 98 |
+
|
| 99 |
+
Concretely, the discrete candidate values of $\mathcal { P }$ depend on i) the number of clusters and corresponding device tiers, ii) the different load levels being modelled and iii) the size of the network itself, as i.e. for each tier $i$ there exists $p _ { \mathrm { m a x } } ^ { i }$ beyond which the network cannot be resolved. In this paper, we treat the former two as invariants (assumed to be given by the service provider), but provide results across different number and distributions of clusters, models and datasets.
|
| 100 |
+
|
| 101 |
+
# 3.5 Preliminary Results
|
| 102 |
+
|
| 103 |
+
Here, we present some results to showcase the performance of OD in the centralised non-FL training setting (i.e. the server has access to all training data) across three tasks, explained in detail in $\ S 5$ Concretely, we run OD with distribution $D _ { \mathcal { P } } = \mathcal { U } _ { 5 }$ (uniform distribution over the set $\{ i / 5 \} _ { i = 1 } ^ { 5 } ,$ ) and compare it with end-to-end trained submodels (SM) trained in isolation for the given width of the model. Fig. 3 shows that across the three datasets, the best attained performance of OD along every width $p$ is very close to the performance of the baseline models. We extend this comparison against Random Dropout in the Appendix. We note at this point that the submodel baselines are trained from scratch, explicitly optimised to that given width with no possibility to jump across them, while our OD model was trained using a single training loop and offers the ability to switch between accuracy-computation points without the need to retrain.
|
| 104 |
+
|
| 105 |
+
#
|
| 106 |
+
|
| 107 |
+
Building upon the shoulders of OD, we introduce FjORD, a framework for federated training over heterogenous clients. We subsequently describe the FjORD’s workflow, further documented in Alg. 1.
|
| 108 |
+
|
| 109 |
+
As a starting point, the global model architecture, $\mathbf { F }$ , is initialised with weights $\pmb { w } ^ { 0 }$ , either randomly or via a pretrained network. The dropout rates space $\mathcal { P }$ is selected along with distribution $D _ { \mathcal { P } }$ with $| \mathcal { P } |$ discrete candidate values, with each $p$ corresponding to a subnetwork of the global model with varying FLOPs and parameters. Next, the devices to participate are clustered into $| \mathcal { C } _ { \mathrm { t i e r s } } |$ tiers and a $p _ { \mathrm { m a x } } ^ { c }$ value is associated with each cluster $c$ . The resulting $p _ { \mathrm { m a x } } ^ { c }$ represents the maximum capacity of the network that devices in this cluster can handle without violating a latency or memory constraint.
|
| 110 |
+
|
| 111 |
+
At the beginning of each communication round $t$ , the set of participating devices $S _ { t }$ is determined, which either consists of all available clients $\boldsymbol { A } _ { t }$ or contains only a random subset of $\boldsymbol { A } _ { t }$ based on the server’s capacity. Next, the server broadcasts the current model to the set of clients $S _ { t }$ and each client $i$ receives ${ w _ { p } } _ { \operatorname* { m a x } } ^ { i }$ . On the client side, each client runs $E$ local iterations and at each local iteration $k$ , the device $i$ samples $p _ { ( i , k ) }$ from conditional distribution $D _ { \mathcal { P } } | D _ { \mathcal { P } } \leq p _ { \operatorname* { m a x } } ^ { i }$ which accounts for its limited capability. Subsequently, each client updates the respective weights $( { w _ { p } } _ { \boldsymbol { \mathrm { ( } i } , \boldsymbol { k } \mathrm { ) } } )$ of the local submodel using the FedAvg [46] update rule. In this step, other strategies [39, 63, 31] can be interchangeably employed. At the end of the local iterations, each device sends its update back to the server.
|
| 112 |
+
|
| 113 |
+
Finally, the server aggregates these communicated changes and updates the global model, to be distributed in the next global federated round to a different subset of devices. Heterogeneity of devices leads to heterogeneity in the model updates and, hence, we need to account for that in the global aggregation step. To this end, we utilise the following aggregation rule
|
| 114 |
+
|
| 115 |
+
$$
|
| 116 |
+
\pmb { w } _ { s _ { j } } ^ { t + 1 } \backslash \pmb { w } _ { s _ { j - 1 } } ^ { t + 1 } = \mathrm { W A } \left( \left\{ \pmb { w } _ { i _ { s _ { j } } } ^ { ( i , t , E ) } \backslash \pmb { w } _ { s _ { j - 1 } } ^ { ( i , t , E ) } \right\} _ { i \in S _ { t } ^ { j } } \right)
|
| 117 |
+
$$
|
| 118 |
+
|
| 119 |
+
where ${ w _ { s } } _ { j . } \backslash w _ { s _ { j - 1 } }$ are the weights that belong to ${ \bf F } _ { s _ { j } }$ but not to $\mathbf { F } _ { { s } _ { j - 1 } }$ , ${ \pmb w } ^ { t + 1 }$ the global weights sj sj−1at communication round $t + 1$ , $\mathbf { \Sigma } _ { w } ^ { } ( i , t , E )$ sj the weights on client $i$ sj−1 at communication round $t$ after $E$ local iterations, $S _ { t } ^ { j } = \{ i \in { \mathcal { S } } _ { t } : p _ { \operatorname* { m a x } } ^ { i } \geq s _ { j } \}$ a set of clients that have the capacity to update ${ \pmb w } _ { s _ { j } }$ , and WA stands for weighted average, where weights are proportional to the amount of data on each client.
|
| 120 |
+
|
| 121 |
+
Communication Savings. In addition to the computational savings (§3.4), OD provides additional communication savings. First, for the server-to-client transfer, every device with $p _ { \mathrm { m a x } } ^ { i } < 1$ observes a reduction of approximately $^ 1 / ( p _ { \mathrm { m a x } } ^ { i } ) ^ { 2 }$ in the downstream transferred data due to the smaller model size $( \ S \ 3 . 4 )$ . Accordingly, the upstream client-to-server transfer is decreased by $^ 1 / ( p _ { \mathrm { m a x } } ^ { i } ) ^ { 2 }$ as only the gradient updates of the unpruned units are transmitted.
|
| 122 |
+
|
| 123 |
+
# Algorithm 1: FjORD (Proposed Framework)
|
| 124 |
+
|
| 125 |
+
Input: ${ \bf F } , { \pmb w } ^ { 0 } , D _ { \mathcal { P } } , T , E$
|
| 126 |
+
1 for $t \gets 0$ to $T - 1$ do // Global rounds
|
| 127 |
+
2 Server selects clients as a subset $S _ { t } \subset A _ { t }$
|
| 128 |
+
3 Server broadcasts weights of $p _ { \mathrm { m a x } } ^ { i }$ -submodel to each client $i \in S _ { t }$
|
| 129 |
+
4 for $k 0$ to $E - 1$ do // Local iterations
|
| 130 |
+
5 $\forall i \in S _ { t }$ : Device $_ { i }$ samples $p _ { ( i , k ) } \sim D p \vert D _ { \mathcal { P } } \leq p _ { \mathrm { m a x } } ^ { i }$ and updates the weights of local model
|
| 131 |
+
6 end
|
| 132 |
+
7 $\forall i \in S _ { t }$ : device $_ { i }$ sends to the server the updated weights $\mathbf { \Delta } _ { w } ^ { ( i , t , E ) }$
|
| 133 |
+
8 Server updates $\scriptstyle w ^ { t + 1 }$ as in Eq. (1)
|
| 134 |
+
|
| 135 |
+
Identifiability. A standard procedure in FL is to perform element-wise averaging to aggregate model updates from clients. However, coordinate-wise averaging of updates may have detrimental effects on the accuracy of the global model, due to the permutation invariance of the hidden layers. Recent techniques tackle this problem by matching clients’ neurons before averaging [68, 57, 62]. Unfortunately, doing so is computationally expensive and hurts scalability. FjORD mitigates this issue since it exhibits the natural importance of neurons/channels within each hidden layer by design; essentially OD acts in lieu of a neuron matching algorithm without the computational overhead.
|
| 136 |
+
|
| 137 |
+
Subnetwork Knowledge Transfer. In $\ S \ 3 . 2$ , we introduced knowledge distillation for our OD formulation. We extend this approach to FjORD, where instead of the full network, we employ width $\operatorname* { m a x } \{ p \in \mathcal { P } : p \leq p _ { \operatorname* { m a x } } ^ { i } \}$ as a teacher network in each local iteration on device $i$ . We provide the alternative of FjORD with knowledge distillation mainly as a solution for cases where the client bottleneck is memory- or network-related, rather than computational in nature [32]. However, in cases where client devices are computationally bound in terms of training latency, we propose FjORD without KD or decreasing $p _ { \mathrm { m a x } } ^ { i }$ to account for the overhead of KD.
|
| 138 |
+
|
| 139 |
+
9 end
|
| 140 |
+
|
| 141 |
+
<table><tr><td>Dataset</td><td>Model</td><td># Clients # Samples Task</td></tr><tr><td>CIFAR10</td><td>ResNet18</td><td>10050,ooo Image classification</td></tr><tr><td>FEMNIST</td><td>CNN</td><td>3,400 671,585 Image classification</td></tr><tr><td>Shakespeare RNN</td><td></td><td>71538, OO1 Next character prediction</td></tr></table>
|
| 142 |
+
|
| 143 |
+
# 5 Evaluation of FjORD
|
| 144 |
+
|
| 145 |
+
In this section, we provide a thorough evaluation of FjORD and its components across different tasks, datasets, models and device cluster distributions to show its performance, elasticity and generality.
|
| 146 |
+
|
| 147 |
+
Datasets and Models. We evaluate FjORD on two vision and one text prediction task, shown in Table 1a. For CIFAR10 [33], we use the “CIFAR” version of ResNet18 [20]. We federate the dataset by randomly dividing it into equally-sized partitions, each allocated to a specific client, and thus remaining IID in nature. For FEMNIST, we use a CNN with two convolutional layers followed by a softmax layer. For Shakespeare, we employ a RNN with an embedding layer (without dropout) followed by two LSTM [22] layers and a softmax layer. We report the model’s performance of the last epoch on the test set which is constructed by combining the test data for each client. We report top-1 accuracy vision tasks and negative perplexity for text prediction. Further details, such as hyperparameters, description of datasets and models are available in the Appendix.
|
| 148 |
+
|
| 149 |
+
Table 1: Datasets and models
|
| 150 |
+
|
| 151 |
+
<table><tr><td colspan="2">p=0.2</td><td>0.4</td><td>0.6</td><td>0.8</td><td>1.0</td></tr><tr><td colspan="6">CIFAR10/ResNet18</td></tr><tr><td>MACs</td><td>23M</td><td>91M</td><td>203M</td><td>360M</td><td>555M</td></tr><tr><td>Params</td><td>456K</td><td>2M</td><td>4M</td><td>7M</td><td>11M</td></tr><tr><td colspan="6">FEMNIST/CNN</td></tr><tr><td>MACs</td><td>47K</td><td>120K</td><td>218K</td><td>342K</td><td>491K</td></tr><tr><td>Params</td><td>5K</td><td>10K</td><td>15K</td><td>20K</td><td>26K</td></tr><tr><td colspan="6">Shakespeare/RNN</td></tr><tr><td>MACs</td><td>12K</td><td>40K</td><td>83K</td><td>143K</td><td>216K</td></tr><tr><td>Params</td><td>12K</td><td>40K</td><td>82K</td><td>142K</td><td>214K</td></tr></table>
|
| 152 |
+
|
| 153 |
+
# 5.1 Experimental Setup
|
| 154 |
+
|
| 155 |
+
(b) MACs and parameters per $p$ -reduced network
|
| 156 |
+
|
| 157 |
+
Infrastructure. FjORD was implemented on top of the Flower (v0.14dev) [5] framework and PyTorch (v1.4.0) [51]. We run all our experiments on a private cloud cluster, consisting of Nvidia V100 GPUs. To scale to hundreds of clients on a single machine, we optimized Flower so that clients only allocate GPU resources when actively participating in a federated client round. We report average performance and the standard deviation across three runs for all experiments. To model client availability, we run up to 100 Flower clients in parallel and sample $10 \%$ at each global round, with the ability for clients to switch identity at the beginning of each round to overprovision for larger federated datasets. Furthermore, we model client heterogeneity by assigning each client to one of the device clusters. We provide the following setups:
|
| 158 |
+
|
| 159 |
+

|
| 160 |
+
Figure 4: Ordered Dropout with KD vs eFD baselines. Performance vs dropout rate $p$ across different networks and datasets. $D _ { \mathcal { P } } = \mathcal { U } _ { 5 }$
|
| 161 |
+
|
| 162 |
+
Uniform-{5,10}: This refers to the distribution $D _ { \mathcal { P } }$ , i.e. $p \sim \mathcal { U } _ { k }$ , with $k = 5$ or 10.
|
| 163 |
+
|
| 164 |
+
Drop Scale $\in \ \{ 0 . 5 , 1 . 0 \}$ : This parameter affects a possible skew in the number of devices per uniform- cluster. It refers to the drop in clients per cluster of devices, as we go to higher $n$ and drop scale $d s$ , the high-end cluster $n$ contains $\scriptstyle 1 - \sum _ { i = 0 } ^ { n - 1 } d s / _ { n }$ of the devices and the $p$ ’s. Formally, for rest of the clusters contain $\left. d s \right/ n$ each. Hence, for $d s { = } 1 . 0$ of the uniform-5 case, all devices can run the $p = 0 . 2$ subnetwork, $80 \%$ can run the $p = 0 . 4$ and so on, leading to a device distribution of $( 0 . 2 , . . . , 0 . 2 )$ . This percentage drop is half for the case of $d s { = } 0 . 5$ , resulting in a larger high-end cluster, e.g. $( 0 . 1 , 0 . 1 , . . . , 0 . 6 )$ .
|
| 165 |
+
|
| 166 |
+
Baselines. To assess the performance against the state-of-the-art, we compare FjORD with the following baselines: i) Extended Federated Dropout (eFD), ii) FjORD with eFD (FjORD w/ eFD).
|
| 167 |
+
|
| 168 |
+
eFD builds on top of the technique of Federated Dropout (FD) [8], which adopts a Random Dropout (RD) at neuron/filter level for minimising the model’s footprint. However, FD does not support adaptability to heterogeneous client capabilities out of the box, as it inherits a single dropout rate across devices. For this reason, we propose an extension to FD, allowing to adapt the dropout rate to the device capabilities, defined by the respective cluster membership. It is clear that eFD dominates FD in performance and provides a tougher baseline, as the latter needs to impose the same dropout rate to fit the model at hand on all devices, leading to larger dropout rates (i.e. uniform dropout of $80 \%$ for full model to support the low-end devices). We provide empirical evidence for this in the Appendix. For investigative purposes, we also applied eFD on top of FjORD, as a means to update a larger part of the model from lower-tier devices, i.e. allow them to evaluate submodels beyond their $p _ { \mathrm { m a x } } ^ { i }$ during training.
|
| 169 |
+
|
| 170 |
+
# 5.2 Performance Evaluation
|
| 171 |
+
|
| 172 |
+
In order to evaluate the performance of FjORD, we compare it to the two baselines, eFD and $_ \mathrm { O D + e F D }$ . We consider the uniform-5 setup with drop scale of 1.0 (i.e. uniform clusters). For each baseline, we train one independent model $\mathbf { F } _ { p }$ , end-to-end, for each $p$ . For eFD, what this translates to is that the clusters of devices that cannot run model $\mathbf { F } _ { p }$ compensate by randomly dropping out neurons/filters. We point out that $p = 0 . 2$ is omitted from the eFD results as it is essentially not employing any dropout whatsoever. For the case of $\mathrm { F j O R D + e F D }$ , we control the RD by capping it to $d = 0 . 2 5$ . This allows for larger submodels to be updated more often – as device belonging to cluster $c$ can now have pcmax $p _ { \mathrm { m a x } } ^ { c } \to p _ { \mathrm { m a x } } ^ { c + 1 }$ during training where $c { + 1 }$ is the next more powerful cluster – while at the same time it prevents the destructive effect of too high dropout values shown in the eFD baseline.
|
| 173 |
+
|
| 174 |
+
Fig. 4 presents the achieved accuracy for varying values of $p$ across the three target datasets. FjORD (denoted by FjORD w/ KD) outperforms eFD across all datasets with improvements between 1.53- 34.87 percentage points (pp) (19.22 pp avg. across $p$ values) on CIFAR10, 1.57-6.27 pp (3.41 pp avg.) on FEMNIST and 0.01-0.82 points (p) (0.46 p avg.) on Shakespeare. Compared to FjORD $+ \mathrm { e F D }$ , FjORD achieves performance gains of $0 . 7 1 { \cdot } 2 . 6 6 \mathrm { p p }$ (1.79 avg.), up to 2.56 pp (1.35 pp avg.) on FEMNIST and $0 . 1 2 – 0 . 2 2 \mathfrak { p }$ $_ { 0 . 1 8 \mathrm { ~ p ~ } }$ avg.) on Shakespeare.
|
| 175 |
+
|
| 176 |
+
Across all tasks, we observe that FjORD is able to improve its performance with increasing $p$ due to the nested structure of its OD method. We also conclude that eFD on top of FjORD does not seem to lead to better results. More importantly though, given the heterogeneous pool of devices, to obtain the highest performing model for eFD, multiple models have to be trained (i.e. one per device cluster). For instance, the highest performing models for eFD are $\mathbf { F } _ { 0 . 4 }$ , $\mathbf { F } _ { 0 . 6 }$ and ${ \bf F } _ { 0 . 4 }$ for CIFAR10, FEMNIST and Shakespeare respectively, which can be obtained only a posteriori; after all model variants have been trained. Instead, despite the device heterogeneity, FjORD requires a single training process that leads to a global model that significantly outperforms the best model of eFD (by 2.98 and $2 . 7 3 \mathrm { p p }$ for CIFAR10 and FEMNIST, respectively, and $0 . 1 3 { \mathfrak { p } }$ for Shakespeare), while allowing the direct, seamless extraction of submodels due to the nested structure of OD. Empirical evidence of the convergence of FjORD and the corresponding baselines is provided in the Appendix.
|
| 177 |
+
|
| 178 |
+

|
| 179 |
+
Figure 5: Ablation analysis of FjORD with Knowledge Distillation. Ordered Dropout with $D _ { \mathcal { P } } = \mathcal { U } _ { 5 }$ , KD - Knowledge distillation.
|
| 180 |
+
|
| 181 |
+
# 5.3 Ablation Study of KD in FjORD
|
| 182 |
+
|
| 183 |
+
To evaluate the contribution of our knowledge distillation method to the attainable performance of FjORD, we conduct an ablative analysis on all three datasets. We adopt the same setup of uniform-5 and drop scale $= 1 . 0$ as in the previous section and compare FjORD with and without KD.
|
| 184 |
+
|
| 185 |
+
Fig. 5 shows the efficacy of FjORD’s KD in $\mathrm { F L }$ settings. FjORD’s KD consistently improves the performance across all three datasets when $p > 0 . 4$ , with average gains of 0.18, 0.68 and 0.87 pp for submodels of size 0.6, 0.8 and 1 on CIFAR-10, 1.96, 2.39 and 2.65 pp for FEMNIST and $0 . 1 0 \mathrm { p }$ for Shakespeare. For the cases of $p \leq 0 . 4$ , the impact of KD is fading. We believe this to be a side-effect of optimising for the average accuracy across submodels, which also yielded the $T = \alpha = 1$ strategy. We leave the exploration of alternative weighted KD strategies as future work. Overall, the use of KD significantly improves the performance of the global model, yielding gains of 0.71 and $2 . 6 3 \mathrm { p p }$ for CIFAR10 and FEMNIST and $0 . 1 0 \mathfrak { p }$ for Shakespeare.
|
| 186 |
+
|
| 187 |
+
# 5.4 FjORD’s Deployment Flexibility
|
| 188 |
+
|
| 189 |
+
# 5.4.1 Device Clusters Scalability
|
| 190 |
+
|
| 191 |
+
An important characteristic of FjORD is its ability to scale to a larger number of device clusters or, equivalently, perform well with higher granularity of $p$ values. To illustrate this, we test the performance of OD across two setups, uniform-5 and $- I O$ (defined in $\ S 5 . 1$ ).
|
| 192 |
+
|
| 193 |
+
As shown in Fig. 6, FjORD sustains its performance even under the higher granularity of $p$ values. This means that for applications where the modelling of clients needs to be more fine-grained, FjORD can still be of great value, without any significant degradation in achieved accuracy per submodel. This further supports the use-case where device-load needs to be modelled explicitly in device clusters (e.g. modelling device capabilities and load with deciles).
|
| 194 |
+
|
| 195 |
+
# 5.4.2 Adaptability to Device Distributions
|
| 196 |
+
|
| 197 |
+
In this section, we make a similar case about FjORD’s elasticity with respect to the allocation of available devices to each cluster. We adopt the setup of uniform-5 once again, but compare across drop scales 0.5 and 1.0 (defined in $\ S 5 . 1$ ). In both cases, clients that can support models of $p _ { \operatorname* { m a x } } ^ { i } \in \{ 0 . 2 , \dots , 0 . 8 \}$ are equisized, but the former halves the percentage of devices and allocates it to the last (high-end) cluster, now accounting for $60 \%$ of the devices. The rationale behind this is that the majority of participating devices are able to run the whole original model.
|
| 198 |
+
|
| 199 |
+
The results depicted in Fig. 7 show that the larger submodels are expectedly more accurate, being updated more often. However, the same graphs also indicate that FjORD does not significantly degrade the accuracy of the smaller submodels in the presence of more high-tier devices (i. $e . \ d s = 0 . 5$ ). This is a direct consequence of sampling $p$ values during local rounds, instead of tying each tier with only the maximal submodel it can handle. We should also note that we did not alter the uniform sampling in this case on the premise that high-end devices are seen more often, precisely to illustrate FjORD’s adaptability to latent user device distribution changes of which the server may not be aware.
|
| 200 |
+
|
| 201 |
+
# 6 Related Work
|
| 202 |
+
|
| 203 |
+
Dropout Techniques. Contrary to conventional Random Dropout [59], which stochastically drops a different, random set of a layer’s units in every batch and is typically applied for regularisation purposes, OD employs a structured ordered dropping scheme that aims primarily at tunably reducing the computational and memory cost of training and inference. However, OD can still have an implicit regularisation effect since we encourage learning towards the top-ranked units (e.g. the left-most units in the example of Fig. 2), as these units will be dropped less often during training. Respectively, at inference time, the load of a client can be dynamically adjusted by dropping the least important units, i.e. adjusting the width of the network.
|
| 204 |
+
|
| 205 |
+

|
| 206 |
+
Figure 6: Demonstration of FjORD’s scalability with respect to the number of device clusters.
|
| 207 |
+
|
| 208 |
+

|
| 209 |
+
(b) RNN - Shakespeare
|
| 210 |
+
Figure 7: Demonstration of the adaptability of FjORD across different device distributions.
|
| 211 |
+
|
| 212 |
+
To the best of our knowledge, the only similar technique to OD is Nested Dropout, where the authors proposed a similar construction, which is applied to the representation layer in autoencoders [54] in order to enforce identifiability of the learned representation or the last layer of the feature extractor [24] to learn an ordered set of features for transfer learning. In our case, we apply OD to every layer to elastically adapt the computation and memory requirements during training and inference.
|
| 213 |
+
|
| 214 |
+
Traditional Pruning. Conventional non-FL compression techniques can be applicable to reduce the network size and computation needs. The majority of pruning methods [18, 16, 37, 35, 49] aim to generate a single pruned model and require access to labelled data in order to perform a costly fine-tuning/calibration for each pruned variant. Instead, FjORD’s Ordered Dropout enables the deterministic extraction of multiple pruned models with varying resource budgets directly after training. In this manner, we remove both the excessive overhead of fine-tuning and the need for labelled data availability, which is crucial for real-world, privacy-aware applications [60, 56]. Finally, other model compression methods [13, 64, 9] remain orthogonal to FjORD.
|
| 215 |
+
|
| 216 |
+
System Heterogeneity. So far, although substantial effort has been devoted to alleviating the statistical heterogeneity [38] among clients [58, 36, 26, 12, 40], the system heterogeneity has largely remained unaddressed. Considering the diversity of client devices, techniques on client selection [50] and control of the per-round number of participating clients and local iterations [45, 65] have been developed. Nevertheless, as these schemes are restricted to allocate a uniform amount of work to each selected client, they either limit the model complexity to fit the lowest-end devices or exclude slow clients altogether. From an aggregation viewpoint, [39] allows for partial results to be integrated to the global model, thus enabling the allocation of different amounts of work across heterogeneous clients. Despite the fact that each client is allowed to perform a different number of local iterations based on its resources, large models still cannot be accommodated on the more constrained devices.
|
| 217 |
+
|
| 218 |
+
Communication Optimisation. The majority of existing work has focused on tackling the communication overhead in FL. [32] proposed using structured and sketched updates to reduce the transmitted data. ATOMO [61] introduced a generalised gradient decomposition and sparsification technique, aiming to reduce the gradient sizes communicated upstream. [17] adaptively select the gradients’ sparsification degree based on the available bandwidth and computational power. Building upon gradient quantisation methods [44, 23, 53, 25], [2] proposed using quantisation in the model sharing and aggregation steps. However, their scheme requires the same clients to participate across all rounds, and is, thus, unsuitable for realistic settings where clients’ availability cannot be guaranteed. Despite the bandwidth savings, these communication-optimising approaches do not offer computational gains nor do they address device heterogeneity. Nonetheless, they remain orthogonal to our work and can be complementarily combined to further alleviate the communication cost.
|
| 219 |
+
|
| 220 |
+
Computation-Communication Co-optimisation. A few works aim to co-optimise both the computational and bandwidth costs. PruneFL [29] proposes an unstructured pruning method. Despite the similarity to our work in terms of pruning, this method assumes a common pruned model across all clients at a given round, thus not allowing more powerful devices to update more weights. Hence, the pruned model needs to meet the constraints of the least capable devices, which severely limits the model capacity. Moreover, the adopted unstructured sparsity is difficult to translate to processing speed gains [67]. Federated Dropout [8] randomly sparsifies the global model, before sharing it to the clients. Similarly to PruneFL, Federated Dropout does not consider the system diversity and distributes the same model size to all clients. Thus, it is restricted by the low-end devices or excludes them altogether from the FL process. Additionally, Federated Dropout does not translate to computational benefits at inference time, since the whole model is deployed after federated training.
|
| 221 |
+
|
| 222 |
+
Contrary to the presented works, our framework embraces the client heterogeneity, instead of treating it as a limitation, and thus pushes the boundaries of FL deployment in terms of fairness, scalability and performance by tailoring the model size to the device at hand, both at training and inference time, in a “train-once-deploy-everywhere” manner.
|
| 223 |
+
|
| 224 |
+
# 7 Conclusions & Future Work
|
| 225 |
+
|
| 226 |
+
In this work, we have introduced FjORD, a federated learning method for heterogeneous device training. To this direction, FjORD builds on top of our Ordered Dropout technique as a means to extract submodels of smaller footprints from a main model in a way where training the part also participates in training the whole. We show that our Ordered Dropout is equivalent to SVD for linear mappings and demonstrate that FjORD’s performance in the local and federated setting exceeds that of competing techniques, while maintaining flexibility across different environment setups.
|
| 227 |
+
|
| 228 |
+
In the future, we plan to investigate how FjORD can be deployed and extended to future-gen devices and models in a life-long manner, the interplay between system and data heterogeneity for OD-based personalisation as well as alternative dynamic inference techniques for tackling system heterogeneity.
|
| 229 |
+
|
| 230 |
+
# Broader Impact
|
| 231 |
+
|
| 232 |
+
Our work has a dual broader societal impact: i) on privacy and fairness in participation and ii) on the environment. On the one hand, centralised DNN training [19] has been the norm for a long time, mainly facilitated by the advances in server-grade accelerator design and cheap storage. However, this paradigm comes with a set of disadvantages, both in terms of data privacy and energy consumption. With mobile and embedded devices becoming more capable and FL becoming a viable alternative [3, 7], one can leverage the free compute cycles of client devices to train models on-device, without data ever leaving the device premises. These devices, being typically battery-powered, operate under a more constrained power envelope compared to data-center accelerators [1]. Moreover, these devices are already deployed in the wild, but typically not used for training purposes. What FjORD contributes is the ability for even less capable devices to participate in the training process, thus increasing the representation of low-tier devices (and by extension the correlated demographic groups), as well as adding to the overall compute capabilities of the distributed system as a whole, potentially offsetting part of the carbon footprint of centralised training data centers [52].
|
| 233 |
+
|
| 234 |
+
However, moving the computation cost from the service provider to the user of the device is a non-negligible step and the user should be made aware what their device is used for, especially if they are contributing to the knowledge of a model they do not own. Moreover, while many large data centers [11, 15] are increasingly dependent on renewable resources for meeting their power demands, this might not be the case for household electricity, which may impede the sustainability of training on device, at least in the short run.
|
| 235 |
+
|
| 236 |
+
# Funding Disclosure
|
| 237 |
+
|
| 238 |
+
This work was entirely performed at and funded by Samsung AI.
|
| 239 |
+
|
| 240 |
+
# References
|
| 241 |
+
|
| 242 |
+
[1] Mario Almeida, Stefanos Laskaridis, Ilias Leontiadis, Stylianos I. Venieris, and Nicholas D. Lane. EmBench: Quantifying Performance Variations of Deep Neural Networks Across Modern Commodity Devices. In The 3rd International Workshop on Deep Learning for Mobile Systems and Applications (EMDL), 2019.
|
| 243 |
+
|
| 244 |
+
[2] Mohammad Mohammadi Amiri, Deniz Gunduz, Sanjeev R Kulkarni, and H Vincent Poor. Federated Learning with Quantized Global Model Updates. arXiv preprint arXiv:2006.10672, 2020.
|
| 245 |
+
[3] Apple. Learning with Privacy at Scale. In Differential Privacy Team Technical Report, 2017.
|
| 246 |
+
[4] Eugene Bagdasaryan, Andreas Veit, Yiqing Hua, Deborah Estrin, and Vitaly Shmatikov. How To Backdoor Federated Learning. In Proceedings of the Twenty Third International Conference on Artificial Intelligence and Statistics (AISTATS), pages 2938–2948, 2020.
|
| 247 |
+
[5] Daniel J Beutel, Taner Topal, Akhil Mathur, Xinchi Qiu, Titouan Parcollet, and Nicholas D Lane. Flower: A Friendly Federated Learning Research Framework. arXiv preprint arXiv:2007.14390, 2020. [6] Keith Bonawitz et al. Practical Secure Aggregation for Privacy-Preserving Machine Learning. In Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security (CCS), 2017.
|
| 248 |
+
[7] Keith Bonawitz et al. Towards Federated Learning at Scale: System Design. In Proceedings of Machine Learning and Systems (MLSys), 2019.
|
| 249 |
+
[8] Sebastian Caldas, Jakub Konecný, Brendan McMahan, and Ameet Talwalkar. Expanding the ˇ Reach of Federated Learning by Reducing Client Resource Requirements. In NeurIPS Workshop on Federated Learning for Data Privacy and Confidentiality, 2018.
|
| 250 |
+
[9] Łukasz Dudziak, Mohamed S Abdelfattah, Ravichander Vipperla, Stefanos Laskaridis, and Nicholas D Lane. ShrinkML: End-to-End ASR Model Compression Using Reinforcement Learning. In INTERSPEECH, pages 2235–2239, 2019.
|
| 251 |
+
[10] European Commission. GDPR: 2018 Reform of EU Data Protection Rules.
|
| 252 |
+
[11] Facebook. Software, servers, systems, sensors, and science: Facebook’s recipe for hyperefficient data centers. https://tech.fb.com/hyperefficient-data-centers/, 2021. Accessed: January 10, 2022.
|
| 253 |
+
[12] Alireza Fallah, Aryan Mokhtari, and Asuman Ozdaglar. Personalized Federated Learning with Theoretical Guarantees: A Model-Agnostic Meta-Learning Approach. Advances in Neural Information Processing Systems (NeurIPS), 2020.
|
| 254 |
+
[13] Biyi Fang, Xiao Zeng, and Mi Zhang. NestDNN: Resource-Aware Multi-Tenant On-Device Deep Learning for Continuous Mobile Vision. In Proceedings of the 24th Annual International Conference on Mobile Computing and Networking (MobiCom), pages 115–127, 2018.
|
| 255 |
+
[14] Robin C. Geyer, Tassilo J. Klein, and Moin Nabi. Differentially Private Federated Learning: A Client Level Perspective. In NeurIPS Workshop on Machine Learning on the Phone and other Consumer Devices (MLPCD), 2017.
|
| 256 |
+
[15] Google. Google datacenters efficiency. https://www.google.co.uk/about/ datacenters/efficiency/, 2021. Accessed: January 10, 2022.
|
| 257 |
+
[16] Yiwen Guo, Anbang Yao, and Yurong Chen. Dynamic Network Surgery for Efficient DNNs. In Advances in Neural Information Processing Systems (NeuriPS), pages 1387–1395, 2016.
|
| 258 |
+
[17] Pengchao Han, Shiqiang Wang, and Kin K Leung. Adaptive Gradient Sparsification for Efficient Federated Learning: An Online Learning Approach. In IEEE International Conference on Distributed Computing Systems (ICDCS), 2020.
|
| 259 |
+
[18] Song Han, Jeff Pool, John Tran, and William Dally. Learning both Weights and Connections for Efficient Neural Network. In Advances in Neural Information Processing Systems (NeurIPS), pages 1135–1143, 2015.
|
| 260 |
+
[19] K. Hazelwood et al. Applied Machine Learning at Facebook: A Datacenter Infrastructure Perspective. In IEEE International Symposium on High Performance Computer Architecture (HPCA), 2018.
|
| 261 |
+
[20] 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.
|
| 262 |
+
[21] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the Knowledge in a Neural Network. In NeurIPS Deep Learning Workshop, 2014.
|
| 263 |
+
[22] Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8):1735–1780, 1997.
|
| 264 |
+
[23] Samuel Horváth, Chen-Yu Ho, L’udovít Horváth, Atal Narayan Sahu, Marco Canini, and Peter Richtárik. Natural Compression for Distributed Deep Learning. arXiv preprint arXiv:1905.10988, 2019.
|
| 265 |
+
[24] Samuel Horváth, Aaron Klein, Peter Richtárik, and Cédric Archambeau. Hyperparameter transfer learning with adaptive complexity. In International Conference on Artificial Intelligence and Statistics, pages 1378–1386. PMLR, 2021.
|
| 266 |
+
[25] Samuel Horváth and Peter Richtárik. A Better Alternative to Error Feedback for CommunicationEfficient Distributed Learning. In International Conference on Learning Representations, 2021.
|
| 267 |
+
[26] Kevin Hsieh, Amar Phanishayee, Onur Mutlu, and Phillip Gibbons. The Non-IID Data Quagmire of Decentralized Machine Learning. In International Conference on Machine Learning (ICML), 2020.
|
| 268 |
+
[27] R. Hu, Y. Guo, H. Li, Q. Pei, and Y. Gong. Personalized Federated Learning With Differential Privacy. IEEE Internet of Things Journal (JIOT), 7(10):9530–9539, 2020.
|
| 269 |
+
[28] Andrey Ignatov, Radu Timofte, Andrei Kulik, Seungsoo Yang, Ke Wang, Felix Baum, Max Wu, Lirong Xu, and Luc Van Gool. AI Benchmark: All About Deep Learning on Smartphones in 2019. In International Conference on Computer Vision Workshops (ICCVW), 2019.
|
| 270 |
+
[29] Yuang Jiang, Shiqiang Wang, Bong Jun Ko, Wei-Han Lee, and Leandros Tassiulas. Model Pruning Enables Efficient Federated Learning on Edge Devices. In Workshop on Scalability, Privacy, and Security in Federated Learning (SpicyFL), NeurIPS, 2020.
|
| 271 |
+
[30] Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurélien Bellet, Mehdi Bennis, Arjun Nitin Bhagoji, Keith Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. Advances and open problems in federated learning. arXiv preprint arXiv:1912.04977, 2019.
|
| 272 |
+
[31] Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian Stich, and Ananda Theertha Suresh. SCAFFOLD: Stochastic Controlled Averaging for Federated Learning. In International Conference on Machine Learning (ICML), 2020.
|
| 273 |
+
[32] Jakub Konecný, H. Brendan McMahan, Felix X. Yu, Peter Richtarik, Ananda Theertha Suresh, ˇ and Dave Bacon. Federated Learning: Strategies for Improving Communication Efficiency. In NeurIPS Workshop on Private Multi-Party Machine Learning, 2016.
|
| 274 |
+
[33] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
|
| 275 |
+
[34] Stefanos Laskaridis, Stylianos I. Venieris, Hyeji Kim, and Nicholas D. Lane. HAPI: HardwareAware Progressive Inference. In International Conference on Computer-Aided Design (ICCAD), 2020.
|
| 276 |
+
[35] Namhoon Lee, Thalaiyasingam Ajanthan, and Philip Torr. SNIP: Single-Shot Network Pruning based on Connection Sensitivity. In International Conference on Learning Representations (ICLR), 2019.
|
| 277 |
+
[36] Daliang Li and Junpu Wang. FedMD: Heterogenous Federated Learning via Model Distillation. In NeurIPS 2019 Workshop on Federated Learning for Data Privacy and Confidentiality, 2019.
|
| 278 |
+
[37] Hao Li, Asim Kadav, Igor Durdanovic, Hanan Samet, and Hans Peter Graf. Pruning Filters for Efficient ConvNets. In International Conference on Learning Representations (ICLR), 2016.
|
| 279 |
+
[38] Tian Li, Anit Kumar Sahu, Ameet Talwalkar, and Virginia Smith. Federated Learning: Challenges, Methods, and Future Directions. IEEE Signal Processing Magazine, 2020.
|
| 280 |
+
[39] Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated Optimization in Heterogeneous Networks. In Proceedings of Machine Learning and Systems (MLSys), 2020.
|
| 281 |
+
[40] Tian Li, Maziar Sanjabi, Ahmad Beirami, and Virginia Smith. Fair Resource Allocation in Federated Learning. In International Conference on Learning Representations (ICLR), 2020.
|
| 282 |
+
[41] Xiaoxiao Li, Meirui JIANG, Xiaofei Zhang, Michael Kamp, and Qi Dou. Fed{BN}: Federated Learning on Non-{IID} Features via Local Batch Normalization. In International Conference on Learning Representations (ICLR), 2021.
|
| 283 |
+
[42] Paul Pu Liang, Terrance Liu, Liu Ziyin, Nicholas B Allen, Randy P Auerbach, David Brent, Ruslan Salakhutdinov, and Louis-Philippe Morency. Think Locally, Act Globally: Federated Learning with Local and Global Representations. In NeurIPS 2019 Workshop on Federated Learning, 2019.
|
| 284 |
+
[43] Robert LiKamWa and Lin Zhong. Starfish: Efficient Concurrency Support for Computer Vision Applications. In Proceedings of the 13th Annual International Conference on Mobile Systems, Applications, and Services (MobiSys), pages 213–226, 2015.
|
| 285 |
+
[44] Yujun Lin, Song Han, Huizi Mao, Yu Wang, and Bill Dally. Deep Gradient Compression: Reducing the Communication Bandwidth for Distributed Training. In International Conference on Learning Representations (ICLR), 2018.
|
| 286 |
+
[45] Bing Luo, Xiang Li, Shiqiang Wang, Jianwei Huang, and Leandros Tassiulas. Cost-Effective Federated Learning Design. In INFOCOM, 2021.
|
| 287 |
+
[46] Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-Efficient Learning of Deep Networks from Decentralized Data. In Proceedings of the 20th International Conference on Artificial Intelligence and Statistics (AISTATS), 2017.
|
| 288 |
+
[47] H. Brendan McMahan, Daniel Ramage, Kunal Talwar, and Li Zhang. Learning Differentially Private Recurrent Language Models. In International Conference on Learning Representations (ICLR), 2018.
|
| 289 |
+
[48] Luca Melis, Congzheng Song, Emiliano De Cristofaro, and Vitaly Shmatikov. Exploiting Unintended Feature Leakage in Collaborative Learning. In IEEE Symposium on Security and Privacy (SP), pages 691–706, 2019.
|
| 290 |
+
[49] Pavlo Molchanov, Arun Mallya, Stephen Tyree, Iuri Frosio, and Jan Kautz. Importance Estimation for Neural Network Pruning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 11264–11272, 2019.
|
| 291 |
+
[50] Takayuki Nishio and Ryo Yonetani. Client Selection for Federated Learning with Heterogeneous Resources in Mobile Edge. In IEEE International Conference on Communications (ICC), 2019.
|
| 292 |
+
[51] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. PyTorch: An Imperative Style, High-Performance Deep Learning Library. In Advances in Neural Information Processing Systems (NeurIPS), pages 8026–8037, 2019.
|
| 293 |
+
[52] Xinchi Qiu, Titouan Parcollet, Daniel J. Beutel, Taner Topal, Akhil Mathur, and Nicholas D. Lane. A first look into the carbon footprint of federated learning. CoRR, abs/2010.06537, 2020.
|
| 294 |
+
[53] Aditya Rajagopal, Diederik Vink, Stylianos Venieris, and Christos-Savvas Bouganis. MultiPrecision Policy Enforced Training (MuPPET) : A Precision-Switching Strategy for Quantised Fixed-Point Training of CNNs. In Proceedings of the 37th International Conference on Machine Learning (ICML), pages 7943–7952, 2020.
|
| 295 |
+
[54] Oren Rippel, Michael Gelbart, and Ryan Adams. Learning Ordered Representations with Nested Dropout. In International Conference on Machine Learning (ICML), pages 1746–1754, 2014.
|
| 296 |
+
[55] F. Sattler, S. Wiedemann, K. R. Müller, and W. Samek. Robust and Communication-Efficient Federated Learning From Non-i.i.d. Data. IEEE Transactions on Neural Networks and Learning Systems (TNNLS), 31(9):3400–3413, 2020.
|
| 297 |
+
[56] Reza Shokri and Vitaly Shmatikov. Privacy-Preserving Deep Learning. In Proceedings of the 22nd ACM SIGSAC Conference on Computer and Communications Security (CCS), pages 1310–1321, 2015.
|
| 298 |
+
[57] Sidak Pal Singh and Martin Jaggi. Model Fusion via Optimal Transport. Advances in Neural Information Processing Systems (NeurIPS), 33, 2020.
|
| 299 |
+
[58] Virginia Smith, Chao-Kai Chiang, Maziar Sanjabi, and Ameet S Talwalkar. Federated MultiTask Learning. In Advances in Neural Information Processing Systems (NeurIPS), 2017.
|
| 300 |
+
[59] Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A Simple Way to Prevent Neural Networks from Overfitting. Journal of Machine Learning Research (JMLR), 15(56):1929–1958, 2014.
|
| 301 |
+
[60] Martin J Wainwright, Michael Jordan, and John C Duchi. Privacy Aware Learning. In Advances in Neural Information Processing Systems (NeurIPS), 2012.
|
| 302 |
+
[61] Hongyi Wang, Scott Sievert, Shengchao Liu, Zachary Charles, Dimitris Papailiopoulos, and Stephen Wright. ATOMO: Communication-Efficient Learning via Atomic Sparsification. Advances in Neural Information Processing Systems (NeurIPS), 2018.
|
| 303 |
+
[62] Hongyi Wang, Mikhail Yurochkin, Yuekai Sun, Dimitris Papailiopoulos, and Yasaman Khazaeni. Federated Learning with Matched Averaging. In International Conference on Learning Representations (ICLR), 2020.
|
| 304 |
+
[63] Jianyu Wang, Qinghua Liu, Hao Liang, Gauri Joshi, and H Vincent Poor. Tackling the Objective Inconsistency Problem in Heterogeneous Federated Optimization. Advances in Neural Information Processing Systems (NeurIPS), 2020.
|
| 305 |
+
[64] Kuan Wang, Zhijian Liu, Yujun Lin, Ji Lin, and Song Han. HAQ: Hardware-Aware Automated Quantization with Mixed Precision. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition (CVPR), pages 8612–8620, 2019.
|
| 306 |
+
[65] Shiqiang Wang, Tiffany Tuor, Theodoros Salonidis, Kin K Leung, Christian Makaya, Ting He, and Kevin Chan. Adaptive Federated Learning in Resource Constrained Edge Computing Systems. IEEE Journal on Selected Areas in Communications (JSAC), 37(6), 2019.
|
| 307 |
+
[66] C. Wu et al. Machine Learning at Facebook: Understanding Inference at the Edge. In IEEE International Symposium on High Performance Computer Architecture (HPCA), 2019.
|
| 308 |
+
[67] Zhuliang Yao, Shijie Cao, Wencong Xiao, Chen Zhang, and Lanshun Nie. Balanced Sparsity for Efficient DNN Inference on GPU. In AAAI Conference on Artificial Intelligence (AAAI), volume 33, pages 5676–5683, 2019.
|
| 309 |
+
[68] Mikhail Yurochkin, Mayank Agarwal, Soumya Ghosh, Kristjan Greenewald, Nghia Hoang, and Yasaman Khazaeni. Bayesian Nonparametric Federated Learning of Neural Networks. In International Conference on Machine Learning (ICML), pages 7252–7261. PMLR, 2019.
|
| 310 |
+
[69] Barret Zoph and Quoc Le. Neural Architecture Search with Reinforcement Learning. In International Conference on Learning Representations (ICLR), 2017.
|
md/train/4i23Bjlh4Y9/4i23Bjlh4Y9.md
ADDED
|
@@ -0,0 +1,561 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# On the Generalization of Neural Networks Trained with SGD: Information-Theoretical Bounds and Implications
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
1 Understanding the generalization behaviour of deep neural networks is an important
|
| 11 |
+
2 theme of modern research in machine learning. In this paper, we follow up on
|
| 12 |
+
3 a recent work of Neu [49] and present new information-theoretic upper bounds
|
| 13 |
+
4 for the generalization error of neural networks trained with SGD. Our bounds and
|
| 14 |
+
5 experimental study provide new insights on the SGD training of neural networks.
|
| 15 |
+
6 They also point to a new and simple regularization scheme which we show performs
|
| 16 |
+
7 comparably to the current state of the art.
|
| 17 |
+
|
| 18 |
+
# 8 1 Introduction
|
| 19 |
+
|
| 20 |
+
9 The outstanding performance of deep learning has brought to the surface some intriguing properties
|
| 21 |
+
10 of deep neural networks, one of which is the observation that despite their high capacity, deep neural
|
| 22 |
+
11 networks tend to generalize well [80]. This contradicts classical wisdom in statistical learning theory
|
| 23 |
+
12 (e.g., [71] ) and has stimulated intense research interest in understanding the generalization behaviour
|
| 24 |
+
13 of modern neural networks.
|
| 25 |
+
14 One theme of research focuses on the study of over-parameterized neural networks, where generaliza
|
| 26 |
+
15 tion bounds are obtained [22, 1, 6, 50, 52, 53, 2, 3] and a curious “double descent” phenomenon is
|
| 27 |
+
16 observed and analyzed [9, 46, 78]. New bounding techniques for analyzing generalization have also
|
| 28 |
+
17 been developed, utilizing information theoretic quantities [64, 65, 77, 5, 13, 69, 23, 7, 4, 30, 84]. The
|
| 29 |
+
18 bounds provided by these techniques have the advantages of accounting for both the data structure
|
| 30 |
+
19 and the learning algorithm.
|
| 31 |
+
20 The generalization ability of neural networks trained with mini-batched stochastic gradient descent
|
| 32 |
+
21 [61], simply referred to SGD in this paper, has also been widely studied. Specifically, built on a
|
| 33 |
+
22 connection between stability and generalization [12], a stability-based bound is first presented in [32],
|
| 34 |
+
23 followed by a surge of research effort exploiting similar approaches [44, 17, 26, 43, 8]. Information
|
| 35 |
+
24 theoretic bounding techniques have also demonstrated great power in analyzing SGD-like algorithms.
|
| 36 |
+
25 For example, [55] is the first to utilize information-theoretical bound in analyzing the generalization
|
| 37 |
+
26 ability of SGLD [28, 74]. The bound was subsquently improved by [47, 31, 62, 72]. Inspired by the
|
| 38 |
+
27 work of [55], [49] presents an information- theoretic analysis of the models trained with SGD. The
|
| 39 |
+
28 analysis of [49] constructs an auxiliary weight process parallel to SGD training and upper-bounds the
|
| 40 |
+
29 generalization error through this auxiliary process.
|
| 41 |
+
30 Another line of research connects the generalization of neural networks with the flatness of loss
|
| 42 |
+
31 minima [35] found by SGD or its variant [40, 20, 24, 51, 16, 37, 38, 83, 27]. This understanding
|
| 43 |
+
32 has led to the discovery of new SGD-based training algorithms for improved generalization. For
|
| 44 |
+
33 example, in a concurrent development by [83] and [27], a local “max-pooling” operation is applied to
|
| 45 |
+
34 the loss landscape prior to the SGD updates. This approach, referred to as AMP[83] or SAM[27], is
|
| 46 |
+
35 shown to make SGD favor flatter minima and achieve the state-of-the-art performance among various
|
| 47 |
+
36 competitive regularization schemes [83].
|
| 48 |
+
37 In this paper, we focus on investigating the generalization of neural networks trained with SGD.
|
| 49 |
+
38 We build upon the work of [49]. Following the same construction of the auxiliary weight process
|
| 50 |
+
39 in [49], we present upper bounds of generalization error that improve upon [49] in two ways. The
|
| 51 |
+
40 first improvement is via removing an unnecessary term in the bounds of [49] by invoking the HWI
|
| 52 |
+
41 inequality [60]. The second improvement is via replacing a sample-level mutual information term in
|
| 53 |
+
42 [49] with an instance-level mutual information term, exploiting a recent result of [13]. The bounds we
|
| 54 |
+
43 obtain decompose into two terms, one measuring the impact of training trajectories (“the trajectory
|
| 55 |
+
44 term”) and the other measuring the impact of the flatness of the found solution (“the flatness term”).
|
| 56 |
+
45 We empirically validate the derived bounds. Various insights are also obtained experimentally
|
| 57 |
+
46 concerning the generalization of neural networks under SGD training. For example, the batch size of
|
| 58 |
+
47 SGD appears to impact the trajectory term and the flatness term in opposite ways, which complicates
|
| 59 |
+
48 the overall dependency of generalization error on batch sizes. A particular interesting observation
|
| 60 |
+
49 from our experiments is that a key quantity arising in the trajectory term of the bounds, which we
|
| 61 |
+
50 refer to as gradient dispersion1, reveals a double descent phenomenon with respect to training epochs.
|
| 62 |
+
51 Most intriguingly, the valley in the double descent curve appears to mark the great divide between the
|
| 63 |
+
52 “generalization regime” and the “memorization regime” of training. Furthering from this observation,
|
| 64 |
+
53 we also show that it is possible to reduce the memorization effect by dynamically clipping the gradient
|
| 65 |
+
54 and reducing its dispersion.
|
| 66 |
+
55 Our bounds also inspire a natural and simple solution to alleviate generalization error. Specifically,
|
| 67 |
+
56 we propose a new training scheme, referred to as Gaussian model perturbation (GMP), aiming at
|
| 68 |
+
57 reducing the flatness term of the bounds. This scheme effectively applies a local “average pooling” to
|
| 69 |
+
58 the empirical risk surface prior to SGD, greatly resembling the “max-pooling” approach adopted in
|
| 70 |
+
59 AMP[83]. We demonstrate experimentally that GMP achieves a competitive performance with the
|
| 71 |
+
60 current art of regularization schemes.
|
| 72 |
+
|
| 73 |
+
Length constraints precludes elaboration at places. The reader is referred to supplementary materials for proofs and additional information.
|
| 74 |
+
|
| 75 |
+
63 Other Related Literature Gradient dispersion is mostly studied from optimization perspectives[11,
|
| 76 |
+
64 63, 39, 75, 25]. Prior to this work, only a few works relate gradient dispersion with the generalization
|
| 77 |
+
65 behaviour of the networks. In [49, 72], gradient dispersion also appears in the generalization bounds.
|
| 78 |
+
66 In [38], gradient dispersion is argued to capture a notion of “flatness” of the local minima of the loss
|
| 79 |
+
67 landscape, thereby correlating with generalization.
|
| 80 |
+
68 Injecting noise in the training process has been proposed in various regularization schemes, for
|
| 81 |
+
69 example, [10, 14, 15, 68, 73]. But unlike the Gaussian model perturbation scheme derived in this
|
| 82 |
+
70 paper, where noise is injected to the model parameters, noise in those schemes is injected either to
|
| 83 |
+
71 the training data or to the network activation.
|
| 84 |
+
72 Gradient clipping is a common technique for preventing gradient exploding (see, e.g., [45, 56]).
|
| 85 |
+
73 This technique is also used in [82] to accelerate training. In this paper, gradient clipping is used to
|
| 86 |
+
74 investigate and control the impact of gradient dispersion on generalization error.
|
| 87 |
+
|
| 88 |
+
# 75 2 Preliminaries
|
| 89 |
+
|
| 90 |
+
Population Risk, Empirical Risk and Generalization Error Unless otherwise noted, a random variable will be denoted by a capitalized letter (e.g., $Z$ ), and its realization denoted by the corresponding lower-case letter (e.g. $z$ ). Let $\mathcal { Z }$ be the instance space of interest and $\mu$ be an unknown distribution on $\mathcal { Z }$ , specifying random variable $Z$ . Let $\mathcal { W } \subseteq \bar { \mathbb { R } } ^ { d }$ be the space of hypotheses. Suppose that a training sample ${ \bar { S } } = ( Z _ { 1 } , Z _ { 2 } , \ldots , Z _ { n } )$ is drawn i.i.d. from $\mu$ and that a stochastic learning algorithm $\mathcal { A }$ takes $S$ as its input and outputs a hypothesis $W \in { \mathcal { W } }$ according to some conditional distribution $P _ { W | S }$ mapping ${ \mathcal { Z } } ^ { n }$ to $\mathcal { W }$ . Let $\ell : \mathcal { W } \times \mathcal { Z } \to \mathbb { R } ^ { + }$ be a loss function, where $\ell ( w , z )$ measures the “unfitness” or “error” of any $z \in { \mathcal { Z } }$ with respect to a hypothesis $w \in \mathcal W$ . The population risk, for any
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
L _ { \mu } ( w ) \triangleq \mathbb { E } _ { Z \sim \mu } [ \ell ( w , Z ) ] .
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
85 The goal of learning is to find a hypothesis $w$ that minimizes the population risk. But since $\mu$ is only
|
| 97 |
+
6 partially accessible via the sample $S$ , in practice, we instead turn to the empirical risk, defined as
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
L _ { S } ( w ) \triangleq { \frac { 1 } { n } } \sum _ { i = 1 } ^ { n } \ell ( w , Z _ { i } ) .
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
87 The expected generalization error of the learning algorithm $\mathcal { A }$ is then defined as
|
| 104 |
+
|
| 105 |
+
$$
|
| 106 |
+
\mathrm { g e n } ( \mu , P _ { W | S } ) \triangleq \mathbb { E } _ { W , S } [ L _ { \mu } ( W ) - L _ { S } ( W ) ] ,
|
| 107 |
+
$$
|
| 108 |
+
|
| 109 |
+
where the expectation is taken over the joint distribution of 88 $( S , W )$ (i.e., $\mu ^ { n } \otimes P _ { W | S } )$ .
|
| 110 |
+
|
| 111 |
+
89 Throughout this paper, we take $\ell$ as a continuous function (adopting the usual notion “surrogate loss”
|
| 112 |
+
90 [66].). Additionally, we assume that $\ell$ is differentiable almost everywhere with respect to both $w$ and
|
| 113 |
+
91 $z$ . Furthermore we assume that $\ell ( w , Z )$ is $R$ -subgaussian2 for any $w \in \mathcal { W }$ . Note that a bounded loss
|
| 114 |
+
92 is guaranteed to be subgaussian for all $\mu$ and all $w \in \mathcal { W }$ . Let $I ( X ; Y )$ denote the mutual information
|
| 115 |
+
93 [18] between any pair of random variables $( X , Y )$ . The following results are known.
|
| 116 |
+
|
| 117 |
+
94 Lemma 1 ([77, Theorem 1.]). The expected generalization error of algorithm $\mathcal { A }$ is bounded by
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
| \mathrm { g e n } ( \mu , P _ { W | S } ) | \leq \sqrt { \frac { 2 R ^ { 2 } } { n } I ( W ; S ) } ,
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
95
|
| 124 |
+
|
| 125 |
+
96 Lemma 2 ([13, Proposition 1.]). The expected generalization error of algorithm $\mathcal { A }$ is bounded by
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
| \mathrm { g e n } ( \mu , P _ { W | S } ) | \leq \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \sqrt { 2 R ^ { 2 } I ( W ; Z _ { i } ) } ,
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
97
|
| 132 |
+
|
| 133 |
+
98 Stochastic Gradient Descent We now restrict the learning algorithm $\mathcal { A }$ to be the mini-batched
|
| 134 |
+
99 stochastic gradient descent (SGD) algorithm for empirical risk minimization. For each training epoch,
|
| 135 |
+
100 the dataset $S$ is randomly split into $m$ disjoint mini-batches, each having size $b$ , namely, $n = m b$ .
|
| 136 |
+
101 Based on each batch, one parameter update is performed. Specifically, let $B _ { t }$ denote the batch used
|
| 137 |
+
102 for the $t ^ { \mathrm { t h } }$ update. Define
|
| 138 |
+
|
| 139 |
+
$$
|
| 140 |
+
g ( w , B _ { t } ) \triangleq \frac { 1 } { b } \sum _ { z \in B _ { t } } \nabla _ { w } \ell ( w , z ) ,
|
| 141 |
+
$$
|
| 142 |
+
|
| 143 |
+
103 namely, $g ( w , B _ { t } )$ is the average gradient computed for the batch $B _ { t }$ with respect to parameter $w$ . The rule for the 104 $t ^ { \mathrm { t h } }$ parameter update is then
|
| 144 |
+
|
| 145 |
+
$$
|
| 146 |
+
W _ { t } \triangleq W _ { t - 1 } - \lambda _ { t } g ( W _ { t - 1 } , B _ { t } ) ,
|
| 147 |
+
$$
|
| 148 |
+
|
| 149 |
+
105 where $\lambda _ { t }$ is the learning rate at the step $t$ . The initial parameter setting $W _ { 0 }$ is assumed to be drawn
|
| 150 |
+
106 from the zero-mean spherical Gaussian $\mathcal { N } ( 0 , \sigma _ { 0 } ^ { 2 } \mathbf { I } _ { d } )$ with variance $\sigma _ { 0 } ^ { 2 }$ in each dimension. We will
|
| 151 |
+
107 assume that the SGD algorithm stops after $T$ updates and outputs $W _ { T }$ as the learned model parameter.
|
| 152 |
+
108 Given the training sample $S$ , let $\xi$ govern the randomness in the sequence $( B _ { 1 } , B _ { 2 } , \ldots , B _ { T } )$ of
|
| 153 |
+
109 batches. For the simplicity of notion, we will fix the configuration of $\xi$ . That is, we will assume a
|
| 154 |
+
110 fixed “batching trajectory”, or a fixed way to shuffle the example indices $\{ 1 , \ldots , n \}$ and divide them
|
| 155 |
+
111 into $m$ batches in each epoch. The presented generalization bounds of this paper can be extended
|
| 156 |
+
112 to the case where the batching trajectory is uniformly random (as we set up above). This merely
|
| 157 |
+
113 involves averaging over all batching trajectories or taking expectation over $\xi$ .
|
| 158 |
+
114 Auxiliary Weight Process We now associate with the SGD algorithm an auxiliary weight process
|
| 159 |
+
115 $\{ \widetilde { W _ { t } } \}$ . Let $\sigma ^ { 2 }$ be given, and let $\sigma _ { 1 } , \sigma _ { 2 } , \ldots , \sigma _ { T }$ be a sequence of positive real numbers. Define
|
| 160 |
+
|
| 161 |
+
$$
|
| 162 |
+
\widetilde { W } _ { 0 } \triangleq W _ { 0 } , \quad \mathrm { a n d } \widetilde { W } _ { t } \triangleq \widetilde { W } _ { t - 1 } - \lambda _ { t } g ( W _ { t - 1 } , B _ { t } ) + N _ { t } , \mathrm { f o r } t > 0 ,
|
| 163 |
+
$$
|
| 164 |
+
|
| 165 |
+
where 116 $N _ { t } \sim \mathcal N ( 0 , \sigma _ { t } ^ { 2 } \mathbf I _ { d } )$ is a Gaussian noise. The relationship between this auxiliary weight process 117 $\{ \widetilde { W _ { t } } \}$ and the weight process $\{ W _ { t } \}$ in SGD is shown in the Bayesian network below.
|
| 166 |
+
|
| 167 |
+
118
|
| 168 |
+
|
| 169 |
+
$$
|
| 170 |
+
\begin{array} { r l r l r l r l r l r l r l r } & { } & & { N _ { 1 } } & & { N _ { 2 } } & & { \cdots } & & { N _ { T - 1 } } & & { N _ { T } } \\ & { } & & { \downarrow } & & { \downarrow } & & { } & & { \downarrow } & & { \downarrow } & & { \downarrow } \\ { \widetilde { W } _ { 0 } } & { } & { \widetilde { W } _ { 1 } } & { } & { \widetilde { W } _ { 2 } } & { } & { \cdots } & { } & { \widetilde { W } _ { T - 1 } } & { } & { \widetilde { W } _ { T } } \\ { \parallel } & { \nearrow } & { } & { \chi } & { \chi } & { \nearrow } & { \dots } & { } & { \dots } & { } & { W _ { T } } \\ { W _ { 0 } } & { } & { W _ { 1 } } & { } & { W _ { 2 } } & { } & { \cdots } & { } & { W _ { T - 1 } } & { } & { W _ { T } } \end{array}
|
| 171 |
+
$$
|
| 172 |
+
|
| 173 |
+
119 Let $\begin{array} { r } { \Delta _ { t } = \sum _ { \tau = 1 } ^ { t } N _ { \tau } } \end{array}$ . Noting that the weight updates in $\{ \widetilde { W } _ { t } \}$ uses the same gradient signal as that
|
| 174 |
+
120 used in $\{ W _ { t } \}$ (which depends on $W _ { t - 1 }$ not $\widetilde { W } _ { t - 1 } )$ ), it is immediate that $\widetilde { W } _ { t } = W _ { t } + \Delta _ { t }$ . Note that this
|
| 175 |
+
121 auxiliary process follows the same construction as [49], which we will use to study the generalization
|
| 176 |
+
122 error of SGD.
|
| 177 |
+
|
| 178 |
+
123 To that end, define gradient dispersion at parameter $w$ by
|
| 179 |
+
|
| 180 |
+
$$
|
| 181 |
+
\mathbb { V } ( w ) \triangleq \mathbb { E } \left[ | | \nabla _ { w } \ell ( w , Z ) - \mathbb { E } \left[ \nabla _ { w } \ell ( w , Z ) \right] | | _ { 2 } ^ { 2 } \right] ,
|
| 182 |
+
$$
|
| 183 |
+
|
| 184 |
+
124 where the expectation is taken over $Z \sim \mu$ .
|
| 185 |
+
|
| 186 |
+
For a given sample 125 $s \in \mathcal { Z } ^ { n }$ , define
|
| 187 |
+
|
| 188 |
+
$$
|
| 189 |
+
\gamma ( w , s ) \triangleq \mathbb { E } \left[ L _ { s } ( w + \Delta _ { T } ) - L _ { s } ( w ) \right] ,
|
| 190 |
+
$$
|
| 191 |
+
|
| 192 |
+
26 where the expectation is taken over $\Delta _ { T }$ and $L _ { s } ( w )$ is the empirical risk of $s$ at parameter $w$ .
|
| 193 |
+
|
| 194 |
+
In the remainder of the paper, let 127 $S ^ { \prime }$ denote another sample drawn from $\mu ^ { n }$ , independent of all other 128 random variables. The main generalization bound in [49] is re-stated below.
|
| 195 |
+
|
| 196 |
+
129 Lemma 3 ([49, Theorem 1.]). The generalization error of SGD is upper bounded by
|
| 197 |
+
|
| 198 |
+
$$
|
| 199 |
+
\left| \mathrm { g e n } ( \mu , P _ { W _ { T } | S } ) \right| \leq \sqrt { \frac { 2 R ^ { 2 } } { n } \sum _ { t = 1 } ^ { T } \frac { \lambda _ { t } ^ { 2 } } { \sigma _ { t } ^ { 2 } } \mathbb { E } \left[ \Psi ( W _ { t - 1 } ) + \frac { \Psi ( W _ { t - 1 } ) } { b } \right] } + \left| \mathbb { E } \left[ \gamma ( W _ { T } , S ) - \gamma ( W _ { T } , S ^ { \prime } ) \right] \right| ,
|
| 200 |
+
$$
|
| 201 |
+
|
| 202 |
+
$$
|
| 203 |
+
\begin{array} { r } { \Psi ( w _ { t - 1 } ) \triangleq \mathbb { E } \left[ | | \nabla _ { w } \ell ( w _ { t - 1 } , Z ) - \nabla _ { w } \ell ( w _ { t - 1 } + \zeta , Z ) | | _ { 2 } ^ { 2 } \right] a n d \zeta \sim \mathcal { N } ( 0 , 2 \sum _ { i = 1 } ^ { t - 1 } \sigma _ { i } ^ { 2 } \mathrm { I } _ { d } ) . } \end{array}
|
| 204 |
+
$$
|
| 205 |
+
|
| 206 |
+
The term $\Psi ( w _ { t - 1 } )$ in the bound is referred to as “local gradient sensitivity” in [49].
|
| 207 |
+
|
| 208 |
+
# 3 New Generalization Bounds for SGD
|
| 209 |
+
|
| 210 |
+
133 We first prove that the generalization bound in Lemma 3 can be tightened by removing the local
|
| 211 |
+
134 gradient sensitivity term $\Psi ( w _ { t - 1 } )$ . The key observation is that an independence condition used for
|
| 212 |
+
135 establishing Lemma 3 in [49] is unnecessary (see Lemma 4 in [49]). This requires invoking a vector
|
| 213 |
+
136 version of the HWI inequality [60, Lemma 3.4.2], which we prove in this paper.
|
| 214 |
+
|
| 215 |
+
Lemma 4. Let37 $X$ and $Y$ be two random vectors in $\mathbb { R } ^ { d }$ , and let $\boldsymbol { N } \sim \mathcal { N } ( 0 , \mathbf { I } _ { d } )$ be independent of 38 $( X , Y )$ . Then, for every $t > 0$ , $\begin{array} { r } { \mathrm { D } _ { \mathrm { K L } } \big ( P _ { X + \sqrt { t } N } | | P _ { Y + \sqrt { t } N } \big ) \leq \frac { 1 } { 2 t } \mathbb { E } \left[ | | X - Y | | ^ { 2 } \right] } \end{array}$ .
|
| 216 |
+
|
| 217 |
+
39 Here $\mathrm { D } _ { \mathrm { K L } }$ is the KL divergence. Note that the bound in Lemma 3 relies on a similar result which
|
| 218 |
+
40 however requires the independence of $X$ and $Y$ . Using Lemma 4, we obtain the following theorem.
|
| 219 |
+
|
| 220 |
+
141 Theorem 1. The generalization error of SGD is upper bounded by
|
| 221 |
+
|
| 222 |
+
$$
|
| 223 |
+
\left| \mathrm { g e n } ( \mu , P _ { W _ { T } | S } ) \right| \le \sqrt { \frac { 2 R ^ { 2 } } { n b } \sum _ { t = 1 } ^ { T } \frac { \lambda _ { t } ^ { 2 } } { \sigma _ { t } ^ { 2 } } \mathbb { E } \left[ \mathbb { V } ( W _ { t - 1 } ) \right] } + \left| \mathbb { E } \left[ \gamma ( W _ { T } , S ) - \gamma ( W _ { T } , S ^ { \prime } ) \right] \right| .
|
| 224 |
+
$$
|
| 225 |
+
|
| 226 |
+
143 The proof of this theorem, as the bounds in [49], relies on Lemma 1 and the sample-level mutual
|
| 227 |
+
144 information bound therein. This theorem can be further tightened by exploiting the fact that the
|
| 228 |
+
145 instance-level mutual information bound in Lemma 2 is in fact tighter than the sample-level mutual
|
| 229 |
+
146 information bound in Lemma 1, as shown in [13]. The main ingredient to proceed in this direction is
|
| 230 |
+
147 the following lemma.
|
| 231 |
+
Lemma 5. Le148 $\begin{array} { r } { \ d _ { t } G _ { t } = - \lambda _ { t } g ( W _ { t - 1 } , B _ { t } ) . \ d H _ { t } Z _ { i } \in B _ { t } , t h e n I ( G _ { t } + N _ { t } ; Z _ { i } | \widetilde W _ { t - 1 } ) \le \frac { \lambda _ { t } ^ { 2 } } { \sigma _ { t } ^ { 2 } b ^ { 2 } } \mathbb { E } \left[ \mathbb { V } ( W _ { t - 1 } ) \right] . } \end{array}$
|
| 232 |
+
49
|
| 233 |
+
150 In this lemma, the mutual information $I ( G _ { t } + N _ { t } ; Z _ { i } | \widetilde { W } _ { t - 1 } )$ roughly indicates the degree by which
|
| 234 |
+
151 the SGD’s updating signal $G _ { t }$ (smoothed with noise) depends on an individual training instance
|
| 235 |
+
152 $Z _ { i }$ , when $Z _ { i }$ is used for computing the gradient. When this dependency is strong (giving rise to a
|
| 236 |
+
153 high value of the mutual information), the model conceivably tends to overfit the individual training
|
| 237 |
+
154 instances. This lemma suggests that the strength of this dependency can be upper-bounded by the
|
| 238 |
+
155 expected gradient dispersion at the current weight configuration. In our experiments, we will estimate
|
| 239 |
+
156 the expected gradient dispersion and validate this intuition.
|
| 240 |
+
157 It is remarkable that the noise $\{ N _ { t } \}$ plays an important role for the bound to hold. To see this,
|
| 241 |
+
158 consider $b = 1$ and $\mathcal { Z }$ is countable and large. Then $\bar { I } ( G _ { t } ; Z _ { t } | W _ { t - 1 } )$ is merely the conditional entropy
|
| 242 |
+
159 $H ( Z _ { i } | W _ { t - 1 } )$ , which would grow with sample size $n$ at least as $\log n$ . Upper-bounding it with a
|
| 243 |
+
160 quantity independent of $n$ would be impossible – This justifies the construction of the auxiliary
|
| 244 |
+
161 weight process.
|
| 245 |
+
162 We now state our main theorem. Unlike Theorem 1, which considers a random batching trajectory,
|
| 246 |
+
163 this theorem considers a fixed batching trajectory to keep the expression less cluttered. For that
|
| 247 |
+
164 batching trajectory, we will use $\mathcal { T } _ { i }$ to denote the set of indices of batches $B _ { t }$ containing instance $Z _ { i }$ .
|
| 248 |
+
|
| 249 |
+
165 Theorem 2. The expected generalization error of SGD is bounded by
|
| 250 |
+
|
| 251 |
+
$$
|
| 252 |
+
\left| \mathrm { g e n } ( \mu , P _ { W _ { T } | S } ) \right| \leq \frac { R } { n b } \sum _ { i = 1 } ^ { n } \sqrt { \sum _ { t \in { \mathcal T } _ { i } } \frac { 2 \lambda _ { t } ^ { 2 } } { \sigma _ { t } ^ { 2 } } \mathbb { E } \left[ \mathbb { V } ( W _ { t - 1 } ) \right] } + \left| \mathbb { E } \left[ \gamma ( W _ { T } , S ) - \gamma ( W _ { T } , S ^ { \prime } ) \right] \right| .
|
| 253 |
+
$$
|
| 254 |
+
|
| 255 |
+
167 With an additional assumption, the second term in the bound can be re-expressed, as shown in the
|
| 256 |
+
168 following corollary.
|
| 257 |
+
|
| 258 |
+
169 Corollary 1. Assume $L _ { \mu } ( w _ { T } ) \leq \mathbb { E } _ { \Delta } \left[ L _ { \mu } ( w _ { T } + \Delta _ { T } ) \right]$ , then the following holds,
|
| 259 |
+
|
| 260 |
+
$$
|
| 261 |
+
\mathrm { g e n } ( \mu , P _ { W r | S } ) \leq \frac { R } { n b } \sum _ { i = 1 } ^ { n } \sqrt { \sum _ { t \in \mathcal { T } _ { i } } \frac { 2 \lambda _ { t } ^ { 2 } } { \sigma _ { t } ^ { 2 } } \mathbb { E } \left[ \mathbb { V } ( W _ { t - 1 } ) \right] } + \frac { \sum _ { t = 1 } ^ { T } \sigma _ { t } ^ { 2 } } { 2 } \mathrm { T r } \left( \mathbb { E } \left[ \mathrm { H } _ { W _ { T } } ( Z ) \right] \right) ,
|
| 262 |
+
$$
|
| 263 |
+
|
| 264 |
+
where 170 $\mathrm { H } _ { W _ { T } }$ is the Hessian matrix of the loss with respect to $W _ { T }$ and $\operatorname { T r } ( \cdot )$ denotes trace.
|
| 265 |
+
|
| 266 |
+
171 Corollary 1 follows directly from the second order Taylor expansion of the second term in the bound
|
| 267 |
+
172 of Theorem 2. The condition $L _ { \mu } ( w _ { T } ) \leq \mathbb { E } _ { \Delta } \left[ L _ { \mu } ( \hat { w _ { T } } + \bar { \Delta _ { T } } ) \right]$ indicates that the perturbation does
|
| 268 |
+
173 not decrease the population risk. This is also assumed in [27] in the derivation of a PAC-Bayesian
|
| 269 |
+
174 generalization bound.
|
| 270 |
+
175 Notably, in the bound of Theorem 2, the first term captures the impact of the training trajectory
|
| 271 |
+
176 (“trajectory term”), and the second term captures the impact of the final solution. As seen in Corollary
|
| 272 |
+
177 1, this term in fact measures the flatness for the loss landscape at the found solution (“flatness term”).
|
| 273 |
+
178 The previous bound of [49] (Lemma 3) and its tightened version in Theorem 1 also similarly contain a
|
| 274 |
+
179 trajectory term and a flatness term. Despite that the flatness term there are identical to that in Theorem
|
| 275 |
+
180 2, we now show the trajectory term in Theorem 2 does improve on its counter-part in Theorem 1.
|
| 276 |
+
181 Lemma 6. Assume the instances are sampled without replacement in every epoch. Then the trajectory
|
| 277 |
+
182 term in Theorem 2 is upper-bounded by
|
| 278 |
+
|
| 279 |
+
$$
|
| 280 |
+
\operatorname* { m i n } \left\{ \frac { R } { n } \sum _ { t = 1 } ^ { T } \sqrt { \frac { 2 \lambda _ { t } ^ { 2 } } { \sigma _ { t } ^ { 2 } } \mathbb { E } \left[ \mathbb { V } ( W _ { t - 1 } ) \right] } , \sqrt { \frac { 2 R ^ { 2 } } { n b } \sum _ { t = 1 } ^ { T } \frac { \lambda _ { t } ^ { 2 } } { \sigma _ { t } ^ { 2 } } \mathbb { E } \left[ \mathbb { V } ( W _ { t - 1 } ) \right] } \right\} .
|
| 281 |
+
$$
|
| 282 |
+
|
| 283 |
+
184 The condition in Lemma 6 is usually satisfied in practice. This lemma then immediately implies that
|
| 284 |
+
185 the trajectory term in Theorem 2 is no worse than that in Theorem 1. Incorporating this result, if we
|
| 285 |
+
186 restrict the smoothness of the loss function $\ell$ , we may obtain another version of the generalization
|
| 286 |
+
187 bound (although the flatness term therein is expected to be looser than that in Corollary 1).
|
| 287 |
+
188 Corollary 2. If the loss function is differentiable and $\beta$ -smooth with respect to $w$ , then under the
|
| 288 |
+
189 condition of Lemma ${ \it 6 }$ ,
|
| 289 |
+
|
| 290 |
+
$$
|
| 291 |
+
\mathrm { g e n } ( \mu , P _ { W _ { T } | S } ) | \leq \operatorname* { m i n } \left\{ \frac { R } { n } \sum _ { t = 1 } ^ { T } \sqrt { \frac { 2 \lambda _ { t } ^ { 2 } } { \sigma _ { t } ^ { 2 } } \mathbb { E } \left[ \mathbb { V } ( W _ { t - 1 } ) \right] } , \sqrt { \frac { 2 R ^ { 2 } } { n b } \sum _ { t = 1 } ^ { T } \frac { \lambda _ { t } ^ { 2 } } { \sigma _ { t } ^ { 2 } } \mathbb { E } \left[ \mathbb { V } ( W _ { t - 1 } ) \right] } \right\} + \beta d \sum _ { t = 1 } ^ { T } \sigma _ { t } ^ { 2 } .
|
| 292 |
+
$$
|
| 293 |
+
|
| 294 |
+
191 To conclude, we remark that these bounds suggest that in order for the model to generalize well, both
|
| 295 |
+
192 the trajectory term and the flatness term need to be small — the former involves the interaction of the
|
| 296 |
+
193 learning rate and batch size with the gradient dispersion along the training trajectory, whereas the
|
| 297 |
+
194 latter depends on the flatness of the empirical risk surface at the found solution.
|
| 298 |
+
|
| 299 |
+
# 195 4 Experimental Study
|
| 300 |
+
|
| 301 |
+
196 Bound Verification We first verify our bound in Corollary 1 by training an MLP (with one hidden
|
| 302 |
+
197 layer) and an AlexNet [42] on MNIST and CIFAR10 [41], respectively. To simplify estimation, we
|
| 303 |
+
198 fix the weight initialization and set $\sigma _ { t }$ and $\lambda _ { t }$ to be constants $\sigma$ and $\lambda$ , respectively. To compute
|
| 304 |
+
199 $\textstyle \sum _ { i = 1 } ^ { n } { \sqrt { \sum _ { t \in { \mathcal { T } } _ { i } } \mathbb { E } \left[ \mathbb { V } ( W _ { t - 1 } ) \right] } }$ , we compute the gradient dispersion as its empirical estimate from a
|
| 305 |
+
200 batch, utilizing a PyTorch [54] library BackPack [19]. To compute $\mathrm { T r } \left( \mathbb { E } \left[ \mathrm { H } _ { W _ { T } } ( Z ) \right] \right)$ , we randomly
|
| 306 |
+
201 sample $10 \%$ of the training data and use the PyHessian library [79] to compute the Hessian. Since
|
| 307 |
+
202 every choice of $\sigma$ gives a valid generalization bound in Corollary 1, we need to find the optimal
|
| 308 |
+
203 $\sigma$ , which gives the tightest bound. This can be done by simply utilizing the fact $A / \sigma + \bar { \sigma ^ { 2 } } B \geq$
|
| 309 |
+
204 $3 ( A / 2 ) ^ { 2 / 3 } B ^ { 1 / 3 }$ for any positive $A$ and $B$ , where the equality is achieved by the optimal $\sigma$ . We set
|
| 310 |
+
205 the sub-gaussian parameter $R = 0 . 1$ . The implementation in this paper is on PyTorch, and all the
|
| 311 |
+
206 experiments are carried out on NVIDIA Tesla V100 GPUs (32 GB).
|
| 312 |
+
207 We perform experiments with varying network width and varying levels of label noise. Specifically,
|
| 313 |
+
208 label noise level $\epsilon$ refers to the setting where we replace the labels of $\epsilon$ fraction of the training and
|
| 314 |
+
209 testing instances with random labels. The estimated bound is compared against the true generalization
|
| 315 |
+
210 gap, namely, the difference between the training loss and testing loss, and is shown in Figure 1.
|
| 316 |
+
211 In Figure 1, we see that in all cases the estimated bound follows closely the trend of the true
|
| 317 |
+
212 generalization gap. The fact that the bound curve consistently tracks the gap curve under various
|
| 318 |
+
213 label noise levels indicates that our bound very well captures the changes of the data distribution.
|
| 319 |
+
214 Note that in Figure 1 (a) and (b), our bound decays with the increase of the model size, showing a
|
| 320 |
+
215 trend as opposite to the bounds obtained in classical learning theory. But such a trend clearly better
|
| 321 |
+
216 explains the generalization behaviour of modern neural networks.
|
| 322 |
+
217 Learning Rate and Batch Size. The learning rate and batch size in SGD have explicitly appeared
|
| 323 |
+
218 in the trajectory term of the bound in Theorem 2. From the way they appear in the bound, one may be
|
| 324 |
+
219 tempted to assert that a small learning rate or large batch size will improve generalization. This would
|
| 325 |
+
220 then contradict some previous observations [37, 76, 33], in which increasing the ratio of learning rate
|
| 326 |
+
221 to batch size will benefit generalization. We now investigate this by performing experiments with
|
| 327 |
+
222 varying learning rates and batch sizes. In our experiments, the model is continuously updated until
|
| 328 |
+
223 the average training loss drops below 0.0001. We separate trajectory and flatness terms of the bound
|
| 329 |
+
224 and plot them in Figure 2.
|
| 330 |
+
225 A key observation in Figure 2 is that the learning rate impacts the trajectory term and the flatness term
|
| 331 |
+
226 in opposite ways, as seen, for example, in (a) and (b), where the two set of curves swap their orders in
|
| 332 |
+
227 the two figures. On the other hand, the batch size also impacts the two terms in opposite ways, as seen
|
| 333 |
+
228 in (a) and (b) where curves decrease in (a) but increase in (b). This makes the generalization bound,
|
| 334 |
+
229 i.e., the sum of the two terms, have a rather complex relationship with the settings of learning rate
|
| 335 |
+
230 and batch size. This relationship is further complicated by the fact that a small learning rate requires
|
| 336 |
+
231 a longer training time, or a larger number $T$ of training iterations, which increases the number that
|
| 337 |
+
232 are summed over in the trajectory term. Nonetheless, we do observe that a smaller batch size gives a
|
| 338 |
+
233 lower value of the flatness term ((b) and (d)), confirming the previous wisdom that small batch sizes
|
| 339 |
+
234 enable the neural network to find a flat minima [40].
|
| 340 |
+
235 Double Descent of Gradient Dispersion We experimentally investigate the impact of gradient
|
| 341 |
+
236 dispersion on the training of the neural networks by fixing the learning rate, batch size and weight
|
| 342 |
+
237 initialization for the each model (MLP for MNIST, AlexNet for CIFAR10). For each model and
|
| 343 |
+
238 various label noise levels, we plot in Figure 3 the evolution of the (empirical) gradient dispersion
|
| 344 |
+
239 $\widehat { \mathbb { V } } ( \boldsymbol { w } _ { t } )$ , training accuracy and testing accuracy across training epochs.
|
| 345 |
+
|
| 346 |
+

|
| 347 |
+
Figure 1: Estimated bound and empirical generalization gap (“gap”) as functions of network width ((a) and (b)) and label noise level ((c) and (d)). Left Y-axis: gap value; right Y-axis: bound value.
|
| 348 |
+
|
| 349 |
+

|
| 350 |
+
Figure 2: The impact of learning rate and batch size on the trajectory term and the flatness term.
|
| 351 |
+
|
| 352 |
+

|
| 353 |
+
Figure 3: Epoch-wise double descent of gradient dispersion, in relation to training/testing accuracies.
|
| 354 |
+
|
| 355 |
+
An intriguing epoch-wise “double descent” phenomenon is observed, particularly when the labels are noisy. According to the double descent curve, the training may be split into three phases (e.g., Figure 3 (h)). In the first phase, the gradient dispersion rapidly descends and maintains a very low level. In this phase, both training and test accuracies increase while maintaining a very small generalization gap. This suggests that the network in this phase is extracting useful patterns and generalizes well. In the second phase, the gradient dispersion starts increasing until it reaches a peak value. In this phase, the training and testing accuracies gradually diverge, marking the model entering an overfitting or “memorization” regime – when the data contains the noisy labels, the network mostly tries to memorize the labels in the training set. In the third phase, the gradient dispersion descends again, reaching a low value. In this phase, the model continuously overfits the training data, until the training and testing curves reach their respective maximum and minimum. It appears that the timing of the three phases depends on the dataset and the label noise level. For simpler data (e.g. MNIST) and cleaner datasets (e.g. CIFAR10 with low label noise), the first phase may be shorter. This is arguably because in these datasets, extracting useful patterns is relatively easier. Nonetheless, the valley in the double-descent curve appears to mark a “great divide” between generalization and memorization.
|
| 356 |
+
|
| 357 |
+
255 Dynamic Gradient Clipping Inspired by our generalization bounds and above observations, one
|
| 358 |
+
256 way to reduce the generalization error is to control the trajectory term of the bounds by reducing the
|
| 359 |
+
257 gradient dispersion in each training step. Here we investigate a simple scheme that dynamically clips
|
| 360 |
+
258 the gradient norm so as to reduce the gradient dispersion. Specifically, whenever the current gradient
|
| 361 |
+
259 norm is larger than the gradient norm $K$ steps earlier, or $| | g ( W _ { t } , B _ { t } ) | | _ { 2 } > | | g ( W _ { t - K } , B _ { t - K } ) | | _ { 2 }$ (i.e.,
|
| 362 |
+
260 the model is expected to have entered the “memorization” regime), we reduce the norm of the current
|
| 363 |
+
261 gradient $g ( W _ { t } , B _ { t } )$ to $\alpha$ fraction of $| | g ( W _ { t - K } , B _ { t - K } ) | | _ { 2 }$ , for some prescribed value $\alpha < 1$ . The
|
| 364 |
+
262 effectiveness of this scheme is best demonstrated when the labels contain noise. As shown in Figure
|
| 365 |
+
263 4, dynamic gradient clipping significantly closes the gap between the training accuracy and the testing
|
| 366 |
+
264 accuracy. The models trained with this scheme maintain a near-optimal testing accuracy (e.g., about
|
| 367 |
+
265 $80 \%$ when the label noise level of MNIST is 0.2), without suffering from the severe memorization
|
| 368 |
+
266 effect as seen in models trained without this scheme. Further understanding of the double-descent
|
| 369 |
+
267 phenomenon of the gradient dispersion may enable more delicate design of such a dynamic clipping
|
| 370 |
+
268 scheme and potentially lead to novel and powerful regularization techniques.
|
| 371 |
+
|
| 372 |
+

|
| 373 |
+
Figure 4: Dynamic Gradient Clipping.
|
| 374 |
+
|
| 375 |
+
# 269 5 A Practical Implication: Gaussian Model Perturbation
|
| 376 |
+
|
| 377 |
+
270 The appearance of the flatness term in our generalization bounds suggests that for an empirical
|
| 378 |
+
271 risk minimizer $w ^ { * }$ to generalize well, it is necessary that the empirical risk surface at $w ^ { * }$ is flat,
|
| 379 |
+
272 or insensitive to a small perturbation of $w ^ { * }$ . This naturally motivates a training scheme using the
|
| 380 |
+
273 following regularized loss:
|
| 381 |
+
|
| 382 |
+
$$
|
| 383 |
+
\operatorname* { m i n } _ { w } L _ { s } ( w ) + \rho \operatorname* { l g } _ { \Delta \sim \mathcal { N } ( 0 , \sigma ^ { 2 } \mathbf { I } _ { d } ) } [ L _ { s } ( w + \Delta ) - L _ { s } ( w ) ] ,
|
| 384 |
+
$$
|
| 385 |
+
|
| 386 |
+
274 where $\rho$ is a hyper-parameter. Replacing the expectation above with its stochastic approximation
|
| 387 |
+
275 using $k$ realizations of $\Delta$ gives rise to the following optimization problem.
|
| 388 |
+
|
| 389 |
+
$$
|
| 390 |
+
\operatorname* { m i n } _ { w } \frac { 1 } { b } \sum _ { z \in B } \left( ( 1 - \rho ) \ell ( w , z ) + \rho \frac { 1 } { k } \sum _ { i = 1 } ^ { k } \left( \ell ( w + \delta _ { i } , z ) \right) \right) .
|
| 391 |
+
$$
|
| 392 |
+
|
| 393 |
+
276 We refer to the SGD training scheme using this loss as Gaussian model perturbation or GMP. Notably,
|
| 394 |
+
277 GMP requires $k + 1$ forward passes for every parameter update. Empirical evidence shows that a
|
| 395 |
+
278 small $k$ , for example, $k = 3$ , already gives competitive performance. Implementing the $k + 1$ forward
|
| 396 |
+
279 passes on parallel processors further reduces the computation load.
|
| 397 |
+
280 We experimentally compare GMP with several major regularization schemes in the current art, includ
|
| 398 |
+
281 ing Dropout [68], label smoothing [70], Flooding [36], MixUp [81], adversarial training [29], and
|
| 399 |
+
282 AMP [83]. The compared schemes are evaluated on three popular benchmark image classification
|
| 400 |
+
283 datasets SVHN [48], CIFAR-10 and CIFAR-100 [41]. Two representative deep architectures PreAc
|
| 401 |
+
284 tResNet18 [34] and VGG16 [67] are taken as the underlying model. We train the models for 200
|
| 402 |
+
285 epochs by SGD. The learning rate is initialized as 0.1 and divided by 10 after 100 and 150 epochs.
|
| 403 |
+
286 For all compared models, the batch size is set to 50 and weight decay is set to $1 0 ^ { - 4 }$ . For GMP, we
|
| 404 |
+
287 choose $\rho = 0 . 5$ and set the standard deviation of the Gaussian noise $\Delta$ to 0.03. The value of $k$ is
|
| 405 |
+
288 chosen as 3 and 10 respectively (referred to as $\mathrm { G M P ^ { 3 } }$ and $\mathrm { G M P ^ { 1 0 } }$ ).
|
| 406 |
+
289 The performances of all compared schemes are given in Table 1. For the compared regularization
|
| 407 |
+
290 schemes except GMP, we directly report their performances as given in [83]. Performances of vanilla
|
| 408 |
+
291 ERM without regularization are also included as a reference.
|
| 409 |
+
292 Table 1 demonstrates the effectiveness of GMP. Overall GMP performs comparably to the current
|
| 410 |
+
293 art of regularization schemes, although appearing slighly inferior to the most recent record given by
|
| 411 |
+
294 AMP [83]. Noting that the key ingredient of AMP, “max-pooling” in the parameter space, greatly
|
| 412 |
+
295 resembles regularization term in GMP, which may be seen as “average-pooling” in the same space.
|
| 413 |
+
|
| 414 |
+
Table 1: Top-1 classification accuracy on (a) SVHN, (b) CIFAR-10 and (c) CIFAR-100. We run experiments 10 times and report the mean and the standard deviation of the testing accuracy.
|
| 415 |
+
|
| 416 |
+
<table><tr><td>PreActResNet18</td><td>Top-1 Acc. (%)</td><td>PreActResNet18</td><td>Top-1 Acc. (%)</td><td>PreActResNet18</td><td>Top-1 Acc. (%)</td></tr><tr><td>ERM</td><td>97.05±0.063</td><td>ERM</td><td>94.98±0.212</td><td>ERM</td><td>75.69±0.303</td></tr><tr><td>Dropout</td><td>97.20±0.065</td><td>Dropout</td><td>95.14±0.148</td><td>Dropout</td><td>75.52±0.351</td></tr><tr><td>Label Smoothing</td><td>97.22±0.087</td><td>Label Smoothing</td><td>95.15±0.115</td><td>Label Smoothing</td><td>77.93±0.256</td></tr><tr><td>Flooding</td><td>97.16±0.047</td><td>Flooding</td><td>95.03±0.082</td><td>Flooding</td><td>75.50±0.234</td></tr><tr><td>MixUp</td><td>97.26±0.044</td><td>MixUp</td><td>95.91±0.117</td><td>MixUp</td><td>78.22±0.210</td></tr><tr><td>Adv.Training</td><td>97.23±0.080</td><td>Adv. Training</td><td>95.01±0.085</td><td>Adv. Training</td><td>74.77±0.229</td></tr><tr><td>AMP</td><td>97.70±0.025</td><td>AMP</td><td>96.03±0.091</td><td>AMP</td><td>78.49±0.308</td></tr><tr><td>GMP3</td><td>97.43±0.037</td><td>GMP3</td><td>95.64±0.053</td><td>GMP3</td><td>78.05±0.208</td></tr><tr><td>GMP10</td><td>97.34±0.058</td><td>GMP10</td><td>95.71±0.073</td><td>GMP10</td><td>78.07±0.170</td></tr><tr><td>VGG16</td><td>Top-1 Acc. (%)</td><td>VGG16</td><td>Top-1 Acc. (%)</td><td>VGG16</td><td>Top-1 Acc. (%)</td></tr><tr><td>ERM</td><td>96.86±0.060</td><td>ERM</td><td>93.68±0.193</td><td>ERM</td><td>72.16±0.297</td></tr><tr><td>Dropout</td><td>97.04±0.049</td><td>Dropout</td><td>93.78±0.147</td><td>Dropout</td><td>72.28±0.337</td></tr><tr><td>Label Smoothing</td><td>96.93±0.070</td><td>Label Smoothing</td><td>93.71±0.158</td><td>Label Smoothing</td><td>72.51±0.179</td></tr><tr><td>Flooding</td><td>96.85±0.085</td><td>Flooding</td><td>93.74±0.145</td><td>Flooding</td><td>72.07±0.271</td></tr><tr><td>MixUp</td><td>96.91±0.057</td><td>MixUp</td><td>94.52±0.112</td><td>MixUp</td><td>73.19±0.254</td></tr><tr><td>Adv.Training</td><td>97.06±0.091</td><td>Adv. Training</td><td>93.51±0.130</td><td>Adv.Training</td><td>70.88±0.145</td></tr><tr><td>AMP</td><td>97.27±0.015</td><td>AMP</td><td>94.35±0.147</td><td>AMP</td><td>74.40±0.168</td></tr><tr><td>GMP3</td><td>97.18±0.057</td><td>GMP3</td><td>94.33±0.094</td><td>GMP3</td><td>74.45±0.256</td></tr><tr><td>GMP10</td><td>97.09±0.068</td><td>GMP10</td><td>94.45±0.158</td><td>GMP10</td><td>75.09±0.285</td></tr></table>
|
| 417 |
+
|
| 418 |
+
(a) SVHN (b) CIFAR-10 (c) CIFAR-100
|
| 419 |
+
|
| 420 |
+
# 296 6 Conclusion and Outlook
|
| 421 |
+
|
| 422 |
+
This paper presents new generalization bounds for neural networks trained with SGD, improving upon the results of [49]. Our bounds naturally point to new and effective regularization schemes. At the same time, they reveal interesting phenomena in the SGD training of neural networks. While these phenomena deserve further investigation in their own right, we here suggest another direction for improving the bounds, namely, via the use of strong data-processing inequalities (DPI) [57–59] (noting that the standard DPI is in fact needed for establishing Theorem 2).
|
| 423 |
+
|
| 424 |
+
303 For any Markov chain $U \to X \to Y$ , we will denote by $u , x$ , and $\mathcal { V }$ the spaces in which $U$ ,
|
| 425 |
+
304 $X$ , $Y$ take values, respectively. For any distribution $P$ on $\mathcal { X }$ , we will use $P _ { Y \mid X } \circ P$ to denote the
|
| 426 |
+
305 distribution on $\mathcal { V }$ induced by the push-forward of the distribution $P$ by $P _ { Y \mid X }$ , namely, for any $y \in \mathcal { V }$ ,
|
| 427 |
+
306 $\begin{array} { r } { \left( P _ { Y | X } \circ P \right) ( y ) \triangleq \int P _ { Y | X } ( y | x ) P ( x ) d x } \end{array}$ . Let ${ \cal { S } } ( U )$ be the support of $P _ { U }$ and ${ \mathcal { H } } ( U , P _ { X | U } )$ be the
|
| 428 |
+
307 convex hull of $\{ P _ { X | U = u } : u \in { \mathcal { S } } ( U ) \}$ . Define
|
| 429 |
+
|
| 430 |
+
$$
|
| 431 |
+
\eta ( U \to X \to Y ) \triangleq \operatorname* { s u p } _ { P , Q \in \mathcal { H } ( U , P _ { X | U } ) } \frac { \mathrm { D } _ { \mathrm { K L } } ( P _ { Y | X } \circ P | | P _ { Y | X } \circ Q ) } { \mathrm { D } _ { \mathrm { K L } } ( P | | Q ) }
|
| 432 |
+
$$
|
| 433 |
+
|
| 434 |
+
08 Lemma 7. For any Markov chain $U X Y$ , $I ( U ; Y ) \leq \eta ( U X Y ) I ( U ; X ) .$
|
| 435 |
+
|
| 436 |
+
309 Here $\eta ( U \to X \to Y )$ serves as the “contraction coefficient” for the stochastic kernel $P _ { Y \mid X }$ ,
|
| 437 |
+
310 characterizing the greatest extent by which the kernel may bring closer any two distributions on $S ( U )$
|
| 438 |
+
311 in its output space. It is easy to see that $\eta ( U \to X \to Y ) \leq 1$ , giving rise to a stronger DPI.
|
| 439 |
+
12 Denote $V _ { t } \triangleq \widetilde { W } _ { t - 1 } + G _ { t }$ . It can be verified that $Z _ { i } V _ { t } \widetilde { W } _ { t }$ form a Markov chain. Denote
|
| 440 |
+
13 $\eta _ { i , t } \triangleq \eta ( Z _ { i } V _ { t } \widetilde { W } _ { t } )$ , and $\Gamma _ { i } ^ { t } = \{ t + 1 , t + 2 , \ldots , T \} \setminus \mathcal { T } _ { i }$ . Theorem 2 can be improved to:
|
| 441 |
+
|
| 442 |
+
314 Theorem 3. The expected generalization error of SGD is bounded by
|
| 443 |
+
|
| 444 |
+
$$
|
| 445 |
+
\left| \mathrm { g e n } ( \mu , P _ { W _ { T } | S } ) \right| \le \frac { 2 R } { n b } \sum _ { i = 1 } ^ { n } \sqrt { \sum _ { t \in { \mathcal T } _ { i } } \frac { \lambda _ { t } ^ { 2 } } { \sigma _ { t } ^ { 2 } } \mathbb { E } \left[ \mathbb { V } ( W _ { t - 1 } ) \right] \cdot \prod _ { \tau \in \Gamma _ { i } ^ { t } } \eta _ { i , \tau } } + \left| \mathbb { E } \left[ \gamma ( W _ { T } , S ) - \gamma ( W _ { T } , S ^ { \prime } ) \right] \right| .
|
| 446 |
+
$$
|
| 447 |
+
|
| 448 |
+
316 It remains to characterize the contraction coefficient $\eta _ { i , \tau }$ in a computable form. Simply bounding it
|
| 449 |
+
317 via the Dobrushin’s coefficient [21], as suggested in [72] for analyzing SGLD, is unlikely to make
|
| 450 |
+
318 the bound in this theorem significantly tighter than that in Theorem 2.
|
| 451 |
+
|
| 452 |
+
19 References [1] Z. Allen-Zhu, Y. Li, and Z. Song. A convergence theory for deep learning via overparameterization. In International Conference on Machine Learning, pages 242–252. PMLR, 2019. [2] S. Arora, R. Ge, B. Neyshabur, and Y. Zhang. Stronger generalization bounds for deep nets via a compression approach. In International Conference on Machine Learning, pages 254–263. PMLR, 2018. [3] S. Arora, S. Du, W. Hu, Z. Li, and R. 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. [4] A. R. Asadi and E. Abbe. Chaining meets chain rule: Multilevel entropic regularization and training of neural networks. Journal of Machine Learning Research, 21(139):1–32, 2020. [5] A. R. Asadi, E. Abbe, and S. Verdú. Chaining mutual information and tightening generalization bounds. In Proceedings of the 32nd International Conference on Neural Information Processing Systems, pages 7245–7254, 2018. [6] P. L. Bartlett, D. J. Foster, and M. Telgarsky. Spectrally-normalized margin bounds for neural networks. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pages 6241–6250, 2017. [7] R. Bassily, S. Moran, I. Nachum, J. Shafer, and A. Yehudayoff. Learners that use little information. In Algorithmic Learning Theory, pages 25–55. PMLR, 2018. [8] R. Bassily, V. Feldman, C. Guzmán, and K. Talwar. Stability of stochastic gradient descent on nonsmooth convex losses. Advances in Neural Information Processing Systems, 33, 2020. [9] M. Belkin, D. Hsu, S. Ma, and S. Mandal. Reconciling modern machine-learning practice and the classical bias–variance trade-off. Proceedings of the National Academy of Sciences, 116 (32):15849–15854, 2019. [10] C. M. Bishop. Training with noise is equivalent to tikhonov regularization. Neural computation, 7(1):108–116, 1995.
|
| 453 |
+
46 [11] L. Bottou, F. E. Curtis, and J. Nocedal. Optimization methods for large-scale machine learning. Siam Review, 60(2):223–311, 2018.
|
| 454 |
+
348 [12] O. Bousquet and A. Elisseeff. Stability and generalization. The Journal of Machine Learning Research, 2:499–526, 2002.
|
| 455 |
+
50 [13] Y. Bu, S. Zou, and V. V. Veeravalli. Tightening mutual information-based bounds on generalization error. IEEE Journal on Selected Areas in Information Theory, 1(1):121–130, 2020.
|
| 456 |
+
[14] A. Camuto, M. Willetts, U. Simsekli, S. J. Roberts, and C. C. Holmes. Explicit regularisation in gaussian noise injections. In Advances in Neural Information Processing Systems, 2020. [15] A. Camuto, X. Wang, L. Zhu, C. Holmes, M. Gürbüzbalaban, and U. ¸Sim¸sekli. Asymmetric heavy tails and implicit bias in gaussian noise injections. arXiv preprint arXiv:2102.07006, 2021. [16] P. Chaudhari, A. Choromanska, S. Soatto, Y. LeCun, C. Baldassi, C. Borgs, J. T. Chayes, L. Sagun, and R. Zecchina. Entropy-sgd: Biasing gradient descent into wide valleys. In 5th International Conference on Learning Representations. OpenReview.net, 2017.
|
| 457 |
+
60 [17] Y. Chen, C. Jin, and B. Yu. Stability and convergence trade-off of iterative optimization algorithms. arXiv preprint arXiv:1804.01619, 2018.
|
| 458 |
+
362 [18] T. M. Cover and J. A. Thomas. Elements of Information Theory. John Wiley & Sons, 2012.
|
| 459 |
+
363 [19] F. Dangel, F. Kunstner, and P. Hennig. Backpack: Packing more into backprop. In 8th International Conference on Learning Representations. OpenReview.net, 2020.
|
| 460 |
+
[20] L. Dinh, R. Pascanu, S. Bengio, and Y. Bengio. Sharp minima can generalize for deep nets. In International Conference on Machine Learning, pages 1019–1028. PMLR, 2017.
|
| 461 |
+
[21] R. L. Dobrushin. Central limit theorem for nonstationary markov chains. i. Theory of Probability & Its Applications, 1(1):65–80, 1956.
|
| 462 |
+
[22] S. S. Du, X. Zhai, B. Poczos, and A. Singh. Gradient descent provably optimizes overparameterized neural networks. In International Conference on Learning Representations, 2018.
|
| 463 |
+
[23] C. Dwork, V. Feldman, M. Hardt, T. Pitassi, O. Reingold, and A. Roth. Generalization in adaptive data analysis and holdout reuse. In Proceedings of the 28th International Conference on Neural Information Processing Systems-Volume 2, pages 2350–2358, 2015.
|
| 464 |
+
[24] G. K. Dziugaite and D. M. Roy. Computing nonvacuous generalization bounds for deep (stochastic) neural networks with many more parameters than training data. In Proceedings of the 33rd Annual Conference on Uncertainty in Artificial Intelligence (UAI), 2017.
|
| 465 |
+
[25] F. Faghri, D. Duvenaud, D. J. Fleet, and J. Ba. A study of gradient variance in deep learning. arXiv preprint arXiv:2007.04532, 2020.
|
| 466 |
+
[26] V. Feldman and J. Vondrak. High probability generalization bounds for uniformly stable algorithms with nearly optimal rate. In Conference on Learning Theory, pages 1270–1279. PMLR, 2019.
|
| 467 |
+
[27] P. Foret, A. Kleiner, H. Mobahi, and B. Neyshabur. Sharpness-aware minimization for efficiently improving generalization. arXiv preprint arXiv:2010.01412, 2020.
|
| 468 |
+
[28] S. B. Gelfand and S. K. Mitter. Recursive stochastic algorithms for global optimization in rˆd. SIAM Journal on Control and Optimization, 29(5):999–1018, 1991.
|
| 469 |
+
[29] I. J. Goodfellow, J. Shlens, and C. Szegedy. Explaining and harnessing adversarial examples. In 3rd International Conference on Learning Representations, ICLR, 2015.
|
| 470 |
+
[30] H. Hafez-Kolahi, Z. Golgooni, S. Kasaei, and M. Soleymani. Conditioning and processing: Techniques to improve information-theoretic generalization bounds. Advances in Neural Information Processing Systems, 33, 2020.
|
| 471 |
+
[31] M. Haghifam, J. Negrea, A. Khisti, D. M. Roy, and G. K. Dziugaite. Sharpened generalization bounds based on conditional mutual information and an application to noisy, iterative algorithms. arXiv preprint arXiv:2004.12983, 2020.
|
| 472 |
+
[32] M. Hardt, B. Recht, and Y. Singer. Train faster, generalize better: Stability of stochastic gradient descent. In International Conference on Machine Learning, pages 1225–1234. PMLR, 2016.
|
| 473 |
+
[33] F. He, T. Liu, and D. Tao. Control batch size and learning rate to generalize well: Theoretical and empirical evidence. In Advances in Neural Information Processing Systems 32, pages 1141–1150, 2019.
|
| 474 |
+
[34] K. He, X. Zhang, S. Ren, and J. Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision, pages 630–645, 2016.
|
| 475 |
+
[35] S. Hochreiter and J. Schmidhuber. Flat minima. Neural Computation, 9(1):1–42, 1997.
|
| 476 |
+
[36] T. Ishida, I. Yamane, T. Sakai, G. Niu, and M. Sugiyama. Do we need zero training loss after achieving zero training error? In Proceedings of the 37th International Conference on Machine Learning, ICML, 2020.
|
| 477 |
+
[37] S. Jastrz˛ebski, Z. Kenton, D. Arpit, N. Ballas, A. Fischer, Y. Bengio, and A. Storkey. Three factors influencing minima in sgd. arXiv preprint arXiv:1711.04623, 2017.
|
| 478 |
+
[38] Y. Jiang, B. Neyshabur, H. Mobahi, D. Krishnan, and S. Bengio. Fantastic generalization measures and where to find them. In International Conference on Learning Representations, 2019.
|
| 479 |
+
[39] R. Johnson and T. Zhang. Accelerating stochastic gradient descent using predictive variance reduction. Advances in neural information processing systems, 26:315–323, 2013.
|
| 480 |
+
[40] N. S. Keskar, D. Mudigere, J. Nocedal, M. Smelyanskiy, and P. T. P. Tang. On large-batch training for deep learning: Generalization gap and sharp minima. In 5th International Conference on Learning Representations. OpenReview.net, 2017.
|
| 481 |
+
[41] A. Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
|
| 482 |
+
[42] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. Advances in neural information processing systems, 25:1097–1105, 2012.
|
| 483 |
+
[43] Y. Lei and Y. Ying. Fine-grained analysis of stability and generalization for stochastic gradient descent. In International Conference on Machine Learning, pages 5809–5819. PMLR, 2020.
|
| 484 |
+
[44] B. London. A pac-bayesian analysis of randomized learning with application to stochastic gradient descent. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pages 2935–2944, 2017.
|
| 485 |
+
[45] S. Merity, N. S. Keskar, and R. Socher. Regularizing and optimizing lstm language models. In International Conference on Learning Representations, 2018.
|
| 486 |
+
[46] P. Nakkiran, G. Kaplun, Y. Bansal, T. Yang, B. Barak, and I. Sutskever. Deep double descent: Where bigger models and more data hurt. In International Conference on Learning Representations, 2019.
|
| 487 |
+
[47] J. Negrea, M. Haghifam, G. K. Dziugaite, A. Khisti, and D. M. Roy. Information-theoretic generalization bounds for sgld via data-dependent estimates. In Advances in Neural Information Processing Systems, pages 11013–11023, 2019.
|
| 488 |
+
[48] Y. Netzer, T. Wang, A. Coates, A. Bissacco, B. Wu, and A. Y. Ng. Reading digits in natural images with unsupervised feature learning. In NeurIPS Workshop on Deep Learning and Unsupervised Feature Learning, 2011.
|
| 489 |
+
[49] G. Neu. Information-theoretic generalization bounds for stochastic gradient descent. arXiv preprint arXiv:2102.00931, 2021.
|
| 490 |
+
[50] B. Neyshabur, R. Tomioka, and N. Srebro. Norm-based capacity control in neural networks. In Conference on Learning Theory, pages 1376–1401. PMLR, 2015.
|
| 491 |
+
[51] B. Neyshabur, S. Bhojanapalli, D. McAllester, and N. Srebro. Exploring generalization in deep learning. In Advances in Neural Information Processing Systems, pages 5947–5956, 2017.
|
| 492 |
+
[52] B. Neyshabur, S. Bhojanapalli, and N. Srebro. A pac-bayesian approach to spectrally-normalized margin bounds for neural networks. In International Conference on Learning Representations, 2018.
|
| 493 |
+
[53] B. Neyshabur, Z. Li, S. Bhojanapalli, Y. LeCun, and N. Srebro. The role of over-parametrization in generalization of neural networks. In International Conference on Learning Representations, 2018.
|
| 494 |
+
[54] A. Paszke, S. Gross, F. Massa, A. Lerer, J. Bradbury, G. Chanan, T. Killeen, Z. Lin, N. Gimelshein, L. Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. Advances in Neural Information Processing Systems, 32:8026–8037, 2019.
|
| 495 |
+
[55] A. Pensia, V. Jog, and P.-L. Loh. Generalization error bounds for noisy, iterative algorithms. In 2018 IEEE International Symposium on Information Theory (ISIT), pages 546–550. IEEE, 2018.
|
| 496 |
+
[56] M. Peters, M. Neumann, M. Iyyer, M. Gardner, C. Clark, K. Lee, and L. Zettlemoyer. Deep contextualized word representations. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 2227–2237, 2018.
|
| 497 |
+
458 [57] Y. Polyanskiy and Y. Wu. Dissipation of information in channels with input constraints. IEEE Transactions on Information Theory, 62(1):35–55, 2015.
|
| 498 |
+
460 [58] Y. Polyanskiy and Y. Wu. Strong data-processing inequalities for channels and bayesian networks. In Convexity and Concentration, pages 211–249. Springer, 2017.
|
| 499 |
+
462 [59] M. Raginsky. Strong data processing inequalities and $\phi$ -sobolev inequalities for discrete channels. IEEE Transactions on Information Theory, 62(6):3355–3389, 2016.
|
| 500 |
+
464 [60] M. Raginsky and I. Sason. Concentration of measure inequalities in information theory, communications and coding. Foundations and Trends in Communications and Information Theory; NOW Publishers: Boston, MA, USA, 2018. [61] H. Robbins and S. Monro. A stochastic approximation method. The annals of mathematical statistics, pages 400–407, 1951. [62] B. Rodríguez-Gálvez, G. Bassi, R. Thobaben, and M. Skoglund. On random subset generalization error bounds and the stochastic gradient langevin dynamics algorithm. arXiv preprint arXiv:2010.10994, 2020. [63] N. L. Roux, M. Schmidt, and F. Bach. A stochastic gradient method with an exponential convergence rate for finite training sets. In Proceedings of the 25th International Conference on Neural Information Processing Systems-Volume 2, pages 2663–2671, 2012. [64] D. Russo and J. Zou. Controlling bias in adaptive data analysis using information theory. In Artificial Intelligence and Statistics, pages 1232–1240, 2016. [65] D. Russo and J. Zou. How much does your data exploration overfit? controlling bias via information usage. IEEE Transactions on Information Theory, 66(1):302–323, 2019.
|
| 501 |
+
479 [66] S. Shalev-Shwartz and S. Ben-David. Understanding machine learning: From theory to algorithms. Cambridge university press, 2014. [67] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. In 3rd International Conference on Learning Representations, ICLR, 2015. [68] N. Srivastava, G. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. The Journal of Machine Learning Research, 15(1):1929–1958, 2014. [69] T. Steinke and L. Zakynthinou. Reasoning about generalization via conditional mutual information. In Conference on Learning Theory, volume 125 of Proceedings of Machine Learning Research, pages 3437–3452. PMLR, 2020. [70] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, CVPR, pages 2818–2826, 2016.
|
| 502 |
+
[71] V. Vapnik. Statistical learning theory. Wiley, 1998. ISBN 978-0-471-03003-4. [72] H. Wang, Y. Huang, R. Gao, and F. P. Calmon. Learning while dissipating information: Understanding the generalization capability of sgld. arXiv preprint arXiv:2102.02976, 2021.
|
| 503 |
+
495 [73] C. Wei, S. Kakade, and T. Ma. The implicit and explicit regularization effects of dropout. In International Conference on Machine Learning, pages 10181–10192. PMLR, 2020. [74] M. Welling and Y. W. Teh. Bayesian learning via stochastic gradient langevin dynamics. In Proceedings of the 28th international conference on machine learning (ICML-11), pages 681–688. Citeseer, 2011.
|
| 504 |
+
500 [75] Y. Wen, K. Luk, M. Gazeau, G. Zhang, H. Chan, and J. Ba. An empirical study of stochastic gradient descent with structured covariance noise. In International Conference on Artificial Intelligence and Statistics, pages 3621–3631. PMLR, 2020.
|
| 505 |
+
|
| 506 |
+
503 [76] L. Wu, C. Ma, and E. Weinan. How sgd selects the global minima in over-parameterized
|
| 507 |
+
504 learning: A dynamical stability perspective. Advances in Neural Information Processing
|
| 508 |
+
505 Systems, 2018:8279–8288, 2018.
|
| 509 |
+
506 [77] A. Xu and M. Raginsky. Information-theoretic analysis of generalization capability of learning
|
| 510 |
+
507 algorithms. Advances in Neural Information Processing Systems, 2017:2525–2534, 2017.
|
| 511 |
+
508 [78] Z. Yang, Y. Yu, C. You, J. Steinhardt, and Y. Ma. Rethinking bias-variance trade-off for
|
| 512 |
+
509 generalization of neural networks. In International Conference on Machine Learning, pages
|
| 513 |
+
510 10767–10777. PMLR, 2020.
|
| 514 |
+
511 [79] Z. Yao, A. Gholami, K. Keutzer, and M. W. Mahoney. Pyhessian: Neural networks through
|
| 515 |
+
512 the lens of the hessian. In 2020 IEEE International Conference on Big Data (Big Data), pages
|
| 516 |
+
513 581–590. IEEE, 2020.
|
| 517 |
+
514 [80] C. Zhang, S. Bengio, M. Hardt, B. Recht, and O. Vinyals. Understanding deep learning
|
| 518 |
+
515 requires rethinking generalization. In 5th International Conference on Learning Representations.
|
| 519 |
+
516 OpenReview.net, 2017.
|
| 520 |
+
517 [81] H. Zhang, M. Cisse, Y. N. Dauphin, and D. Lopez-Paz. mixup: Beyond empirical risk mini
|
| 521 |
+
518 mization. In 6th International Conference on Learning Representations, ICLR, 2018.
|
| 522 |
+
519 [82] J. Zhang, T. He, S. Sra, and A. Jadbabaie. Why gradient clipping accelerates training: A
|
| 523 |
+
520 theoretical justification for adaptivity. In International Conference on Learning Representations,
|
| 524 |
+
521 2019.
|
| 525 |
+
522 [83] Y. Zheng, R. Zhang, and Y. Mao. Regularizing neural networks via adversarial model perturba
|
| 526 |
+
523 tion. In CVPR, 2021.
|
| 527 |
+
524 [84] R. Zhou, C. Tian, and T. Liu. Individually conditional individual mutual information bound on
|
| 528 |
+
525 generalization error. arXiv preprint arXiv:2012.09922, 2020.
|
| 529 |
+
|
| 530 |
+
1. For all authors...
|
| 531 |
+
|
| 532 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 533 |
+
(b) Did you describe the limitations of your work? [Yes] See Section 4, Section 5 and supplementary materials.
|
| 534 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] See supplementary materials.
|
| 535 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 536 |
+
|
| 537 |
+
2. If you are including theoretical results...
|
| 538 |
+
|
| 539 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] See Section 2 and Section 3.
|
| 540 |
+
(b) Did you include complete proofs of all theoretical results? [Yes] See supplementary materials.
|
| 541 |
+
|
| 542 |
+
3. If you ran experiments...
|
| 543 |
+
|
| 544 |
+
(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 supplementary materials.
|
| 545 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 5 and supplementary materials.
|
| 546 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] See Section 4 and Section 5.
|
| 547 |
+
(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.
|
| 548 |
+
|
| 549 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 550 |
+
|
| 551 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] See Section 4 and Section 5.
|
| 552 |
+
(b) Did you mention the license of the assets? [Yes] See supplementary materials.
|
| 553 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [No]
|
| 554 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [No]
|
| 555 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No]
|
| 556 |
+
|
| 557 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 558 |
+
|
| 559 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 560 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 561 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/4pf_pOo0Dt/4pf_pOo0Dt.md
ADDED
|
@@ -0,0 +1,425 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Self-Supervised Learning with Data Augmentations Provably Isolates Content from Style
|
| 2 |
+
|
| 3 |
+
Julius von Kügelgen⇤1,2
|
| 4 |
+
|
| 5 |
+
Luigi Gresele⇤1
|
| 6 |
+
|
| 7 |
+
# Wieland Brendel 3 Bernhard Schölkopf†1 Michel Besserve†1 Francesco Locatello†5
|
| 8 |
+
|
| 9 |
+
1 Max Planck Institute for Intelligent Systems Tübingen 2 University of Cambridge
|
| 10 |
+
3 Tübingen AI Center, University of Tübingen 4 IMPRS for Intelligent Systems 5 Amazon
|
| 11 |
+
|
| 12 |
+
# Abstract
|
| 13 |
+
|
| 14 |
+
Self-supervised representation learning has shown remarkable success in a number of domains. A common practice is to perform data augmentation via hand-crafted transformations intended to leave the semantics of the data invariant. We seek to understand the empirical success of this approach from a theoretical perspective. We formulate the augmentation process as a latent variable model by postulating a partition of the latent representation into a content component, which is assumed invariant to augmentation, and a style component, which is allowed to change. Unlike prior work on disentanglement and independent component analysis, we allow for both nontrivial statistical and causal dependencies in the latent space. We study the identifiability of the latent representation based on pairs of views of the observations and prove sufficient conditions that allow us to identify the invariant content partition up to an invertible mapping in both generative and discriminative settings. We find numerical simulations with dependent latent variables are consistent with our theory. Lastly, we introduce Causal3DIdent, a dataset of high-dimensional, visually complex images with rich causal dependencies, which we use to study the effect of data augmentations performed in practice.
|
| 15 |
+
|
| 16 |
+
# 1 Introduction
|
| 17 |
+
|
| 18 |
+
Learning good representations of high-dimensional observations from large amounts of unlabelled data is widely recognised as an important step for more capable and data-efficient learning systems [10, 72]. Over the last decade, self-supervised learning (SSL) has emerged as the dominant paradigm for such unsupervised representation learning [1, 20, 21, 34, 41, 47, 48, 90, 91, 115, 122, 125, 126]. The main idea behind SSL is to extract a supervisory signal from unlabelled observations by leveraging known structure of the data, which allows for the application of supervised learning techniques. A common approach is to directly predict some part of the observation from another part (e.g., future from past, or original from corruption), thus forcing the model to learn a meaningful representation in the process. While this technique has shown remarkable success in natural language processing [13, 23, 30, 81, 84, 86, 95, 99] and speech recognition [5, 6, 100, 104], where a finite dictionary allows one to output a distribution over the missing part, such predictive SSL methods are not easily applied to continuous or high-dimensional domains such as vision. Here, a common approach is to learn a joint embedding of similar observations or views such that their representation is close [7, 12, 22, 44]. Different views can come, for example, from different modalities (text & speech; video & audio) or time points. As still images lack such multi-modality or temporal structure, recent advances in representation learning have relied on generating similar views by means of data augmentation.
|
| 19 |
+
|
| 20 |
+
In order to be useful, data augmentation is thought to require the transformations applied to generate additional views to be generally chosen to preserve the semantic characteristics of an observation, while changing other “nuisance” aspects. While this intuitively makes sense and has shown remarkable empirical results, the success of data augmentation techniques in practice is still not very well understood from a theoretical perspective—despite some efforts [17, 19, 28]. In the present work, we seek to better understand the empirical success of SSL with data augmentation by formulating the generative process as a latent variable model (LVM) and studying identifiability of the representation, i.e., under which conditions the ground truth latent factors can provably be inferred from the data [77].
|
| 21 |
+
|
| 22 |
+
Related work and its relation to the current. Prior work on unsupervised representation learning from an LVM perspective often postulates mutually independent latent factors: this independence assumption is, for example, at the heart of independent component analysis (ICA) [24, 56] and disentanglement [10, 14, 18, 49, 65, 71]. Since it is impossible to identify the true latent factors without any supervisory signal in the general nonlinear case [57, 82], recent work has turned to weakly- or self-supervised approaches which leverage additional information in the form of multiple views [39, 83, 108, 129], auxiliary variables [58, 63], or temporal structure [45, 54, 55, 69]. To identify or disentangle the individual independent latent factors, it is typically assumed that there is a chance that each factor changes across views, environments, or time points.
|
| 23 |
+
|
| 24 |
+
Our work—being directly motivated by common practices in SSL with data augmentation—differs from these works in the following two key aspects (see Fig. 1 for an overview). First, we do not assume independence and instead allow for both nontrivial statistical and causal relations between latent variables. This is in line with a recently proposed [105] shift towards causal representation learning [40, 76, 85, 87, 106, 107, 112, 123, 127], motivated by the fact that many underlying variables of interest may not be independent but causally related to each other.1 Second, instead of a scenario wherein all latent factors may change as a result of augmentation, we assume a partition of the latent space into two blocks: a content block which is shared or invariant across different augmented views, and a style block that may change. This is aligned with the notion that augmentations leave certain semantic aspects (i.e., content) intact and only affect style, and is thus a more appropriate assumption for studying SSL. In line with earlier work [39, 54, 57, 58, 63, 69, 82, 83, 129], we focus on the setting of continuous ground-truth latents, though we believe our results to hold more broadly.
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
Figure 1: Overview of our problem formulation. We partition the latent variable $\mathbf { z }$ into content c and style s, and allow for statistical and causal dependence of style on content. We assume that only style changes between the original view $\mathbf { x }$ and the augmented view $\tilde { \mathbf { x } }$ , i.e., they are obtained by applying the same deterministic function f to ${ \bf z } = ( { \bf c } , { \bf s } )$ and $\tilde { \mathbf { z } } = ( \mathbf { c } , \tilde { \mathbf { s } } )$ .
|
| 28 |
+
|
| 29 |
+
Structure and contributions. Following a review of SSL with data augmentation and identifiability theory $( \ S 2 )$ , we formalise the process of data generation and augmentation as an LVM with content and style variables $( \ S 3 )$ . We then establish identifiability results of the invariant content partition $^ { ( \ S \mathrm { ~ \normalfont ~ ) ~ } }$ , validate our theoretical insights experimentally $^ { ( \ S \mathrm { ~ \sc ~ } ) }$ , and discuss our findings and their limitations in the broader context of SSL with data augmentation $( \ S \ G )$ . We highlight the following contributions:
|
| 30 |
+
|
| 31 |
+
• we prove that SSL with data augmentations identifies the invariant content partition of the representation in generative (Thm. 4.2) and discriminative learning with invertible (Thm. 4.3) and non-invertible encoders with entropy regularisation (Thm. 4.4); in particular, Thm. 4.4 provides a theoretical justification for the empirically observed effectiveness of contrastive SSL methods that use data augmentation and InfoNCE [91] as an objective, such as SimCLR [20]; • we show that our theory is consistent with results in simulating statistical dependencies within blocks of content and style variables, as well as with style causally dependent on content (§ 5.1); • we introduce Causal3DIdent, a dataset of 3D objects which allows for the study of identifiability in a causal representation learning setting, and use it to perform a systematic study of data augmentations used in practice, yielding novel insights on what particular data augmentations are truly isolating as invariant content and discarding as varying style when applied $\mathrm { ~ ~ { ~ \left( \ S ~ \right. ~ } ~ } )$ .
|
| 32 |
+
|
| 33 |
+
# 2 Preliminaries and background
|
| 34 |
+
|
| 35 |
+
Self-supervised representation learning with data augmentation. Given an unlabelled dataset of observations (e.g., images) $\mathbf { x }$ , data augmentation techniques proceed as follows. First, a set of observation-level transformations $\mathbf { t } \in \mathcal { T }$ are specified together with a distribution $p _ { \mathbf { t } }$ over $\tau$ . Both $\tau$ and $p _ { \mathbf { t } }$ are typically designed using human intelligence and domain knowledge with the intention of not changing the semantic characteristics of the data (which arguably constitutes a form of weak supervision).2 For images, for example, a common choice for $\tau$ are combinations of random crops [113], horizontal or vertical flips, blurring, colour distortion [52, 113], or cutouts [31]; and $p _ { \mathbf { t } }$ is a distribution over the parameterisation of these transformations, e.g., the centre and size of a crop [20, 31]. For each observation x, a pair of transformations $\mathbf { t } , \mathbf { t } ^ { \prime } \sim p _ { \mathbf { t } }$ is sampled and applied separately to $\mathbf { x }$ to generate a pair of augmented views $( \tilde { \mathbf { x } } , \tilde { \mathbf { x } } ^ { \prime } ) = ( \mathbf { t } ( \mathbf { x } ) , \mathbf { t } ^ { \prime } ( \mathbf { x } ) )$ .
|
| 36 |
+
|
| 37 |
+
The joint-embedding approach to SSL then uses a pair of encoder functions $( \mathbf { g } , \mathbf { g } ^ { \prime } )$ , i.e. deep nets, to map the pair $\big ( \tilde { \mathbf { x } } , \bar { \tilde { \mathbf { x } } } ^ { \prime } \big )$ to a typically lower-dimensional representation $( \tilde { \bf z } , \tilde { \bf z } ^ { \prime } ) = ( { \bf g } ( \tilde { \bf x } ) , { \bf g } ^ { \prime } ( \tilde { \bf x } ^ { \prime } ) )$ . Often, the two encoders are either identical, $\mathbf { g } = \mathbf { g } ^ { \prime }$ , or directly related (e.g., via shared parameters or asynchronous updates). Then, the encoder(s) $( \mathbf { g } , \mathbf { g } ^ { \prime } )$ are trained such that the representations $( \tilde { \mathbf { z } } , \tilde { \mathbf { z } } ^ { \prime } )$ are “close”, i.e., such that $\sin ( \tilde { \mathbf { z } } , \tilde { \mathbf { z } } ^ { \prime } )$ is large for some similarity metric $\mathrm { s i m } ( \cdot )$ , e.g., the cosine similarity [20, 129], or negative L2 norm [129]. The advantage of directly optimising for similarity in representation space over generative alternatives is that reconstruction can be very challenging for high-dimensional data. The disadvantage is the problem of collapsed representations. 3 To avoid collapsed representations and force the encoder(s) to learn a meaningful representation, two main families of approaches have been used: (i) contrastive learning (CL) [20, 47, 48, 91, 115, 126]; and (ii) regularisation-based SSL [21, 41, 128].
|
| 38 |
+
|
| 39 |
+
The idea behind CL is to not only learn similar representations for augmented views $( \tilde { \mathbf { x } } _ { i } , \tilde { \mathbf { x } } _ { i } ^ { \prime } )$ of the same $\mathbf { x } _ { i }$ , or positive pairs, but to also use other observations $\mathbf { x } _ { j }$ ${ j \neq i }$ ) to contrast with, i.e., to enforce a dissimilar representation across negative pairs $( \tilde { \mathbf { x } } _ { i } , \tilde { \mathbf { x } } _ { j } ^ { \prime } )$ . In other words, CL pulls representations of positive pairs together, and pushes those of negative pairs apart. Since both aims cannot be achieved simultaneously with a constant representation, collapse is avoided. A popular CL objective function (used, e.g., in SimCLR [20]) is InfoNCE [91] (based on noise-contrastive estimation [42, 43]):
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
\begin{array} { r } { \mathcal { L } _ { \mathrm { I n f o N C E } } ( \mathbf { g } ; \tau , K ) = \mathbb { E } _ { \{ \mathbf { x } _ { i } \} _ { i = 1 } ^ { K } \sim p _ { \mathbf { x } } } \Big [ - \sum _ { i = 1 } ^ { K } \log \frac { \exp \{ \sin ( \tilde { \mathbf { z } } _ { i } , \tilde { \mathbf { z } } _ { i } ^ { \prime } ) / \tau \} } { \sum _ { j = 1 } ^ { K } \exp \{ \sin ( \tilde { \mathbf { z } } _ { i } , \tilde { \mathbf { z } } _ { j } ^ { \prime } ) / \tau \} } \Big ] } \end{array}
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
where $\tilde { \mathbf { z } } = \mathbb { E } _ { \mathbf { t } \sim p _ { \mathbf { t } } } [ \mathbf { g } ( \mathbf { t } ( \mathbf { x } ) ) ]$ , $\tau$ is a temperature, and $K - 1$ is the number of negative pairs. InfoNCE (1) has an interpretation as multi-class logistic regression, and lower bounds the mutual information across similar views $( \tilde { \mathbf { z } } , \tilde { \mathbf { z } } ^ { \prime } )$ —a common representation learning objective [4, 9, 15, 50, 75, 79, 80, 97, 120]. Moreover, (1) can be interpreted as alignment (numerator) and uniformity (denominator) terms, the latter constituting a nonparametric entropy estimator of the representation as $K \infty$ [124]. CL with InfoNCE can thus be seen as alignment of positive pairs with (approximate) entropy regularisation.
|
| 46 |
+
|
| 47 |
+
Instead of using negative pairs, as in CL, a set of recent SSL methods only optimise for alignment and avoid collapsed representations through different forms of regularisation. For example, BYOL [41] and SimSiam [21] rely on “architectural regularisation” in the form of moving-average updates for a separate “target” net $\mathbf { g } ^ { \prime }$ (BYOL only) or a stop-gradient operation (both). BarlowTwins [128], on the other hand, optimises the cross correlation between $( \tilde { \bf z } , \bar { \tilde { \bf z } ^ { \prime } } )$ to be close to the identity matrix, thus enforcing redundancy reduction (zero off-diagonals) in addition to alignment (ones on the diagonal).
|
| 48 |
+
|
| 49 |
+
Identifiability of learned representations. In this work, we address the question of whether SSL with data augmentation can reveal or uncover properties of the underlying data generating process. Whether a representation learned from observations can be expected to match the true underlying latent factors—up to acceptable ambiguities and subject to suitable assumptions on the generative process and inference model—is captured by the notion of identifiability [77].
|
| 50 |
+
|
| 51 |
+
Within representation learning, identifiability has mainly been studied in the framework of (nonlinear) ICA which assumes a model of the form $\mathbf { x } = \mathbf { f } ( \mathbf { z } )$ and aims to recover the independent latents, or sources, z, typically up to permutation or element-wise transformation. A crucial negative result states that, with i.i.d. data and without further assumptions, this is fundamentally impossible [57]. However, recent breakthroughs have shown that identifiability can be achieved if an auxiliary variable (e.g., a time stamp or environment index) renders the sources conditionally independent [45, 54, 55, 58]. These methods rely on constructing positive and negative pairs using the auxiliary variable and learning a representation with CL. This development has sparked a renewed interest in identifiability in the context of deep representation learning [63, 64, 69, 83, 102, 108, 109, 129].
|
| 52 |
+
|
| 53 |
+
Most closely related to SSL with data augmentation are works which study identifiability when given a second view $\tilde { \mathbf { x } }$ of an observation $\mathbf { x }$ , resulting from a modified version $\tilde { \mathbf { z } }$ of the underlying latents or sources $\mathbf { z }$ [39, 69, 83, 101, 108, 129]. Here, $\tilde { \mathbf { z } }$ is either an element-wise corruption of z [39, 69, 101, 129] or may share a random subset of its components [83, 108]. Crucially, all previously mentioned works assume that any of the independent latents (are allowed to) change, and aim to identify the individual factors. However, in the context of SSL with data augmentation, where the semantic (content) part of the representation is intended to be shared between views, this assumption does not hold.
|
| 54 |
+
|
| 55 |
+
# 3 Problem formulation
|
| 56 |
+
|
| 57 |
+
We specify our problem setting by formalising the processes of data generation and augmentation. We take a latent-variable model perspective and assume that observations $\mathbf { x }$ (e.g., images) are generated by a mixing function f which takes a latent code $\mathbf { z }$ as input. Importantly, we describe the augmentation process through changes in this latent space as captured by a conditional distribution $p _ { \tilde { \mathbf { z } } | \mathbf { z } }$ , as opposed to traditionally describing the transformations $\mathbf { t }$ as acting directly at the observation level.
|
| 58 |
+
|
| 59 |
+
Formally, let $\mathbf { z }$ be a continuous r.v. taking values in an open, simply-connected $n$ -dim. representation space ${ \mathcal { Z } } \subseteq \mathbb { R } ^ { n }$ with associated probability density $p _ { \mathbf { z } }$ . Moreover, let f $: { \mathcal { Z } } { \mathcal { X } }$ be a smooth and invertible mapping to an observation space $\boldsymbol { \mathcal { X } } \subseteq \mathbb { R } ^ { d }$ and let $\mathbf { x }$ be the continuous r.v. defined as $\mathbf { x } = \mathbf { f } ( \mathbf { z } )$ . 4 The generative process for the dataset of original observations of $\mathbf { x }$ is thus given by:
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\begin{array} { r } { { \bf z } \sim p _ { \bf z } , \qquad { \bf x } = { \bf f } ( { \bf z } ) . } \end{array}
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
Next, we formalise the data augmentation process. As stated above, we take a representation-centric view, i.e., we assume that an augmentation $\tilde { \bf x }$ of the original $\mathbf { x }$ is obtained by applying the same mixing or rendering function f to a modified representation $\tilde { \mathbf { z } }$ which is (stochastically) related to the original representation $\mathbf { z }$ of $\mathbf { x }$ . Specifying the effect of data augmentation thus corresponds to specifying a conditional distribution $p _ { \tilde { \mathbf { z } } | \mathbf { z } }$ which captures the relation between $\mathbf { z }$ and $\tilde { \mathbf { z } }$ .
|
| 66 |
+
|
| 67 |
+
In terms of the transformation-centric view presented in $\ S 2$ , we can view the modified representation $\widetilde { \mathbf z } \in \mathcal { Z }$ as obtained by applying $\mathbf { f } ^ { - 1 }$ to a transformed observation $\tilde { \mathbf { x } } = \mathbf { t } ( \mathbf { x } ) \in \mathcal { X }$ where t $\sim p _ { \mathbf { t } }$ , i.e., $\tilde { \mathbf { z } } = \mathbf { f } ^ { - 1 } ( \tilde { \mathbf { x } } )$ . The conditional distribution $p _ { \tilde { \mathbf { z } } | \mathbf { z } }$ in the representation space can thus be viewed as being induced by the distribution $p _ { \mathbf { t } }$ over transformations applied at the observation level.5
|
| 68 |
+
|
| 69 |
+
We now encode the notion that the set of transformations $\tau$ used for augmentation is typically chosen such that any transformation $\mathbf { t } \in \mathcal { T }$ leaves certain aspects of the data invariant. To this end, we assume that the representation z can be uniquely partitioned into two disjoint parts:
|
| 70 |
+
|
| 71 |
+
(i) an invariant part c which will always be shared across $( \mathbf { z } , \tilde { \mathbf { z } } )$ , and which we refer to as content;
|
| 72 |
+
(ii) a varying part s which may change across $( \mathbf { z } , \tilde { \mathbf { z } } )$ , and which we refer to as style.
|
| 73 |
+
|
| 74 |
+
We assume that c and s take values in content and style subspaces ${ \mathcal { C } } \subseteq \mathbb { R } ^ { n _ { c } }$ and $S \subseteq \mathbb { R } ^ { n _ { s } }$ , respectively, i.e., $n = n _ { c } + n _ { s }$ and ${ \mathcal { Z } } = { \mathcal { C } } \times { \mathcal { S } }$ . W.l.o.g., we let c corresponds to the first $n _ { c }$ dimensions of $\mathbf { z }$ :
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\begin{array} { r } { \mathbf { z } = ( \mathbf { c } , \mathbf { s } ) , \qquad \mathbf { c } : = \mathbf { z } _ { 1 : n _ { c } } , \qquad \mathbf { s } : = \mathbf { z } _ { ( n _ { c } + 1 ) : n } , } \end{array}
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
We formalise the process of data augmentation with content-preserving transformations by definin the conditional $p _ { \tilde { \mathbf { z } } | \mathbf { z } }$ such that only a (random) subset of the style variables change at a time.
|
| 81 |
+
|
| 82 |
+
Assumption 3.1 (Content-invariance). The conditional density $p _ { \tilde { \mathbf { z } } | \mathbf { z } }$ over $\mathcal { Z } \times \mathcal { Z }$ takes the form
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
p _ { \tilde { \mathbf { z } } | \mathbf { z } } ( \tilde { \mathbf { z } } | \mathbf { z } ) = \delta ( \tilde { \mathbf { c } } - \mathbf { c } ) p _ { \tilde { \mathbf { s } } | \mathbf { s } } ( \tilde { \mathbf { s } } | \mathbf { s } )
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
for some continuous density $p _ { \tilde { \mathbf { s } } | \mathbf { s } }$ on $s \times s$ , where $\delta ( \cdot )$ is the Dirac delta function, i.e., $\tilde { \mathbf { c } } = \mathbf { c }$ a.e.
|
| 89 |
+
|
| 90 |
+
Assumption 3.2 (Style changes). Let $\mathcal { A }$ be the set of subsets of style variables $A \subseteq \{ 1 , . . . , n _ { s } \}$ and let $p _ { A }$ be a distribution on $\mathcal { A }$ . Then, the style conditional $p _ { \tilde { \mathbf { s } } | \mathbf { s } }$ is obtained via
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
\begin{array} { r } { A \sim p _ { A } , \qquad p _ { \tilde { \mathbf { s } } | \mathbf { s } , A } ( \tilde { \mathbf { s } } | \mathbf { s } , A ) = \delta ( \tilde { \mathbf { s } } _ { A ^ { \mathrm { c } } } - \mathbf { s } _ { A ^ { \mathrm { c } } } ) p _ { \tilde { \mathbf { s } } _ { A } | \mathbf { s } _ { A } } ( \tilde { \mathbf { s } } _ { A } | \mathbf { s } _ { A } ) , } \end{array}
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
where $p _ { \tilde { \mathbf { s } } _ { A } | \mathbf { s } _ { A } }$ is a continuous density on $S _ { A } \times S _ { A }$ , ${ \mathcal { S } } _ { A } \subseteq { \mathcal { S } }$ denotes the subspace of changing style variables specified by $A$ , and $A ^ { \mathrm { c } } = \{ 1 , . . . , n _ { s } \} \setminus A$ denotes the complement of $A$ .
|
| 97 |
+
|
| 98 |
+
Note that Assumption 3.2 is less restrictive than assuming that all style variables need to change, since it also allows for only a (possibly different) subset of style variables to change for any given observation. This is in line with the intuition that not all transformations affect all changeable (i.e., style) properties of the data: e.g., a colour distortion should not affect positional information, and, in the same vein, a (horizontal or vertical) flip should not affect the colour spectrum.
|
| 99 |
+
|
| 100 |
+
The generative process of an augmentation or transformed observation $\tilde { \bf x }$ is thus given by
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
A \sim p _ { A } , \qquad { \tilde { \mathbf { z } } } | \mathbf { z } , A \sim p _ { { \tilde { \mathbf { z } } } | \mathbf { z } , A } , \qquad { \tilde { \mathbf { x } } } = \mathbf { f } ( { \tilde { \mathbf { z } } } ) .
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
Our setting for modelling data augmentation differs from that commonly assumed in (multi-view) disentanglement and ICA in that we do not assume that the latent factors ${ \bf z } = ( { \bf c } , { \bf s } )$ are mutually (or conditionally) independent, i.e., we allow for arbitrary (non-factorised) marginals $p _ { \mathbf { z } }$ in (2).6
|
| 107 |
+
|
| 108 |
+
Causal interpretation: data augmentation as counterfactuals under soft style intervention. We now provide a causal account of the above data generating process by describing the (allowed) causal dependencies among latent variables using a structural causal model (SCM) [94]. As we will see, this leads to an interpretation of data augmentations as counterfactuals in the underlying latent SCM. The assumption that c stays invariant as s changes is consistent with the view that content may causally influence style, $\mathbf c \to \mathbf s$ , but not vice versa, see Fig. 1. We therefore formalise their relation as:
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\mathbf { c } : = \mathbf { f _ { c } } ( \mathbf { u _ { c } } ) , \qquad \mathbf { s } : = \mathbf { f _ { s } } ( \mathbf { c } , \mathbf { u _ { s } } ) , \qquad \mathbf { ( u _ { c } , u _ { s } ) } \sim p _ { \mathbf { u _ { c } } } \times p _ { \mathbf { u _ { s } } }
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
where $\mathbf { u _ { c } } , \mathbf { u _ { s } }$ are independent exogenous variables, and $\mathbf { f _ { c } } , \mathbf { f _ { s } }$ are deterministic functions. The latent causal variables $( \mathbf { c } , \mathbf { s } )$ are subsequently decoded into observations $\mathbf { x } = \mathbf { f } ( \mathbf { c } , \mathbf { s } )$ . Given a factual observation $\mathbf { x } ^ { \mathrm { F } } = \mathbf { f } ( \mathbf { c } ^ { \mathrm { F } } , \mathbf { s } ^ { \mathrm { F } } )$ which resulted from $\left( \mathbf { u } _ { \mathbf { c } } ^ { \mathtt { F } } , \mathbf { u } _ { \mathbf { s } } ^ { \mathtt { F } } \right)$ , we may ask the counterfactual question: “what would have happened if the style variables had been (randomly) perturbed, all else being equal?”. Consider, e.g., a soft intervention [35] on s, i.e., an intervention that changes the mechanism $\mathbf { f _ { s } }$ to
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
d o ( \mathbf { s } : = \tilde { \mathbf { f } } _ { \mathbf { s } } ( \mathbf { c } , \mathbf { u } _ { \mathbf { s } } , \mathbf { u } _ { A } ) ) ,
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where $\mathbf { u } _ { A }$ is an additional source of stochasticity accounting for the randomness of the augmentation process $( p _ { A } \times p _ { \tilde { \mathbf { s } } | \mathbf { s } , A } )$ . The resulting distribution over counterfactual observations $\mathbf { x } ^ { \mathtt { C F } } = \mathbf { f } ( \mathbf { c } ^ { \mathtt { F } } , \mathbf { s } ^ { \mathtt { C F } } )$ can be computed from the modified SCM by fixing the exogenous variables to their factual values and performing the soft intervention:
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
\mathbf { c } ^ { \mathrm { { C F } } } : = \mathbf { c } ^ { \mathrm { { F } } } , \qquad \mathbf { s } ^ { \mathrm { { C F } } } : = \tilde { \mathbf { f } } _ { \mathrm { { s } } } ( \mathbf { c } ^ { \mathrm { { F } } } , \mathbf { u } _ { \mathrm { { s } } } ^ { \mathrm { { F } } } , \mathbf { u } _ { A } ) , \qquad \mathbf { u } _ { A } \sim p _ { \mathbf { u } _ { A } } .
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
This aligns with our intuition and assumed problem setting of data augmentations as style corruptions.
|
| 127 |
+
We note that the notion of augmentation as (hard) style interventions is also at the heart of ReLIC [87], a recently proposed, causally-inspired SSL regularisation term for instance-discrimination [44, 126].
|
| 128 |
+
However, ReLIC assumes independence between content and style and does not address identifiability.
|
| 129 |
+
For another causal perspective on data augmentation in the context of domain generalisation, c.f. [59].
|
| 130 |
+
|
| 131 |
+
# 4 Theory: block-identifiability of the invariant content partition
|
| 132 |
+
|
| 133 |
+
Our goal is to prove that we can identify the invariant content partition c under a distinct, weaker set of assumptions, compared to existing results in disentanglement and nonlinear ICA [39, 69, 83, 108, 129]. We stress again that our primary interest is not to identify or disentangle individual (and independent) latent factors $z _ { j }$ , but instead to separate content from style, such that the content variables can be subsequently used for downstream tasks. We first define this distinct notion of block-identifiability.
|
| 134 |
+
|
| 135 |
+
Definition 4.1 (Block-identifiability). We say that the true content partition $\textbf { c } = \textbf { f } ^ { - 1 } ( \textbf x ) _ { 1 : n _ { c } }$ is block-identified by a function $\mathbf { g } : \mathcal { X } \mathcal { Z }$ if the inferred content partition $\hat { \mathbf { c } } = \mathbf { g } ( \mathbf { x } ) _ { 1 : n _ { c } }$ contains all and only information about c, i.e., if there exists an invertible function $\mathbf { h } : \mathbb { R } ^ { n _ { c } } \mathbb { R } ^ { n _ { c } }$ s.t. $\hat { \mathbf { c } } = \mathbf { h } ( \mathbf { c } )$
|
| 136 |
+
|
| 137 |
+
Defn. 4.1 is related to independent subspace analysis [16, 53, 73, 114], which also aims to identify blocks of random variables as opposed to individual factors, though under an independence assumption across blocks, and typically not within a multi-view setting as studied in the present work.
|
| 138 |
+
|
| 139 |
+
# 4.1 Generative self-supervised representation learning
|
| 140 |
+
|
| 141 |
+
First, we consider generative SSL, i.e., fitting a generative model to pairs $( { \bf x } , \tilde { { \bf x } } )$ of original and augmented views.7 We show that under our specified data generation and augmentation process $( \ S 3 )$
|
| 142 |
+
|
| 143 |
+
as well as suitable additional assumptions (stated and discussed in more detail below), it is possible to isolate (i.e., block-identify) the invariant content partition. Full proofs are included in Appendix A. Theorem 4.2 (Identifying content with a generative model). Consider the data generating process described in $\textrm { \tiny \oint } \textrm { \tiny { \left. \frac { } { } \right. { ~ , ~ } } }$ , i.e., the pairs $( { \bf x } , \tilde { { \bf x } } )$ of original and augmented views are generated according to (2) and (3) with $p _ { \tilde { \mathbf { z } } | \mathbf { z } }$ as defined in Assumptions 3.1 and 3.2. Assume further that
|
| 144 |
+
|
| 145 |
+
(i) $\mathbf { f } : \mathcal { Z } \mathcal { X }$ is smooth and invertible with smooth inverse (i.e., a diffeomorphism);
|
| 146 |
+
|
| 147 |
+
(ii) $p _ { \mathbf { z } }$ is a smooth, continuous density on $\mathcal { Z }$ with $p _ { \mathbf { z } } ( \mathbf { z } ) > 0$ almost everywhere;
|
| 148 |
+
|
| 149 |
+
(iii) for any $l \in \{ 1 , . . . , n _ { s } \}$ , $\exists A \subseteq \{ 1 , . . . , n _ { s } \}$ s.t. $l \in A$ ; $p _ { A } ( A ) > 0$ ; $p _ { \tilde { \mathbf { s } } _ { A } | \mathbf { s } _ { A } }$ is smooth w.r.t. both $\mathbf { s } _ { A }$ and $\tilde { \mathbf { s } } _ { A }$ ; and for any $\mathbf { s } _ { A }$ , $p _ { \tilde { \mathbf { s } } _ { A } | \mathbf { s } _ { A } } ( \cdot | \mathbf { s } _ { A } ) > 0$ in some open, non-empty subset containing $\mathbf { s } _ { A }$ .
|
| 150 |
+
|
| 151 |
+
If, for a given $n _ { s }$ $1 \leq n _ { s } < n ,$ ), a generative model $( \hat { p } _ { { \bf z } } , \hat { p } _ { A } , \hat { p } _ { { \bf \tilde { s } } | { \bf s } , A } , \hat { \bf f } )$ assumes the same generative process $( \ S \ 3 )$ , satisfies the above assumptions (i)-(iii), and matches the data likelihood,
|
| 152 |
+
|
| 153 |
+
$$
|
| 154 |
+
p _ { \mathbf { x } , \tilde { \mathbf { x } } } ( \mathbf { x } , \tilde { \mathbf { x } } ) = \hat { p } _ { \mathbf { x } , \tilde { \mathbf { x } } } ( \mathbf { x } , \tilde { \mathbf { x } } ) \qquad \forall ( \mathbf { x } , \tilde { \mathbf { x } } ) \in \mathcal { X } \times \mathcal { X }
|
| 155 |
+
$$
|
| 156 |
+
|
| 157 |
+
then it block-identifies the true content variables via $\mathbf { g } = \hat { \mathbf { f } } ^ { - 1 }$ in the sense of Defn. 4.1.
|
| 158 |
+
|
| 159 |
+
Proof sketch. First, show (using $( i )$ and the matching likelihoods) that the representation $\hat { \mathbf { z } } = \mathbf { g } ( \mathbf { x } )$ extracted by $\mathbf { g }$ is related to the true $\mathbf { z }$ by a smooth invertible mapping $\mathbf { h } = \mathbf { g } \circ \mathbf { f }$ such that $\hat { \mathbf { c } } = \mathbf { h } ( \mathbf { z } ) _ { 1 : n _ { c } }$ is invariant across $( \mathbf { z } , \tilde { \mathbf { z } } )$ almost surely w.r.t. $p _ { \mathbf { z } , \tilde { \mathbf { z } } }$ . 8 Second, show by contradiction (using (ii), (iii)) that $\mathbf { h } ( \cdot ) _ { 1 : n _ { c } }$ can, in fact, only depend on the true content c and not on style s, for otherwise the invariance from step 1 would be violated in a region of the style (sub)space of measure greater than zero.
|
| 160 |
+
|
| 161 |
+
Intuition. Thm. 4.2 assumes that the number of content $( n _ { c } )$ and style $( n _ { s } )$ variables is known, and that there is a positive probability that each style variable may change, though not necessarily on its own, according to $( i i i )$ . In this case, training a generative model of the form specified in $\ S$ (i.e., with an invariant content partition and subsets of changing style variables) by maximum likelihood on pairs $( { \bf x } , \tilde { { \bf x } } )$ will asymptotically (in the limit of infinite data) recover the true invariant content partition up to an invertible function, i.e., it isolates, or unmixes, content from style.
|
| 162 |
+
|
| 163 |
+
Discussion. The identifiability result of Thm. 4.2 for generative SSL is of potential relevance for existing variational autoencoder (VAE) [68] variants such as the GroupVAE [51],9 or its adaptive version AdaGVAE [83]. Since, contrary to existing results, Thm. 4.2 does not assume independent latents, it may also provide a principled basis for generative causal representation learning algorithms [76, 107, 127]. However, an important limitation to its practical applicability is that generative modelling does not tend to scale very well to complex high-dimensional observations, such as images.
|
| 164 |
+
|
| 165 |
+
# 4.2 Discriminative self-supervised representation learning
|
| 166 |
+
|
| 167 |
+
We therefore next turn to a discriminative approach, i.e., directly learning an encoder function g which leads to a similar embedding across $( { \bf x } , \tilde { { \bf x } } )$ . As discussed in $\ S 2$ , this is much more common for SSL with data augmentations. First, we show that if an invertible encoder $\mathbf { g }$ is used, then learning a representation which is aligned in the first $n _ { c }$ dimensions is sufficient to block-identify content.
|
| 168 |
+
|
| 169 |
+
Theorem 4.3 (Identifying content with an invertible encoder). Assume the same data generating process $( \ S \_ )$ and conditions $( i ) – ( i \nu )$ as in Thm. 4.2. Let $\mathbf { g } : \mathcal { X } \mathcal { Z }$ be any smooth and invertible function which minimises the following functional:
|
| 170 |
+
|
| 171 |
+
$$
|
| 172 |
+
\mathcal { L } _ { \mathrm { A l i g n } } ( \mathbf { g } ) : = \mathbb { E } _ { ( \mathbf { x } , \tilde { \mathbf { x } } ) \sim p _ { \mathbf { x } , \tilde { \mathbf { x } } } } [ | \Bigl | \mathbf { g } ( \mathbf { x } ) _ { 1 : n _ { c } } - \mathbf { g } ( \tilde { \mathbf { x } } ) _ { 1 : n _ { c } } | | _ { 2 } ^ { 2 } ]
|
| 173 |
+
$$
|
| 174 |
+
|
| 175 |
+
Then g block-identifies the true content variables in the sense of Definition 4.1.
|
| 176 |
+
|
| 177 |
+
Proof sketch. First, we show that the global minimum of (4) is reached by the smooth invertible function $\mathbf { f } ^ { - 1 }$ . Thus, any other minimiser $\mathbf { g }$ must satisfy the same invariance across $( { \bf x } , \tilde { { \bf x } } )$ used in step 1 of the proof of Thm. 4.2. The second step uses the same argument by contradiction as in Thm. 4.2.
|
| 178 |
+
|
| 179 |
+
Intuition. Thm. 4.3 states that if—under the same assumptions on the generative process as in Thm. 4.2—we directly learn a representation with an invertible encoder, then enforcing alignment between the first $n _ { c }$ latents is sufficient to isolate the invariant content partition. Intuitively, invertibility guarantees that all information is preserved, thus avoiding a collapsed representation.
|
| 180 |
+
|
| 181 |
+
Discussion. According to Thm. 4.3, content can be isolated if, e.g., a flow-based architecture [32, 33, 67, 92, 93] is used, or invertibility is enforced otherwise during training [8, 60]. However, the applicability of this approach is limited as it places strong constraints on the encoder architecture which makes it hard to scale these methods up to high-dimensional settings. As discussed in $\ S$ , state-of-the-art SSL methods such as SimCLR [20], BYOL [41], SimSiam [21], or BarlowTwins [128] do not use invertible encoders, but instead avoid collapsed representations—which would result from naively optimising (4) for arbitrary, non-invertible g—using different forms of regularisation.
|
| 182 |
+
|
| 183 |
+
To close this gap between theory and practice, finally, we investigate how to block-identify content without assuming an invertible encoder. We show that, if we add a regularisation term to (4) that encourages maximum entropy of the learnt representation, the invertibility assumption can be dropped. Theorem 4.4 (Identifying content with discriminative learning and a non-invertible encoder). Assume the same data generating process $( \ S \ 3 )$ and conditions (i)-(iv) as in Thm. 4.2. Let $\mathbf { g } : \mathcal { X } ( 0 , 1 ) ^ { n _ { c } }$ be any smooth function which minimises the following functional:
|
| 184 |
+
|
| 185 |
+
$$
|
| 186 |
+
\mathcal { L } _ { \mathrm { A l i g n M a x E n t } } ( \mathbf { g } ) : = \mathbb { E } _ { ( \mathbf { x } , \tilde { \mathbf { x } } ) \sim p _ { \mathbf { x } , \tilde { \mathbf { x } } } } \left[ \left| \left| \mathbf { g } ( \mathbf { x } ) - \mathbf { g } ( \tilde { \mathbf { x } } ) \right| \right| _ { 2 } ^ { 2 } \right] - H \left( \mathbf { g } ( \mathbf { x } ) \right)
|
| 187 |
+
$$
|
| 188 |
+
|
| 189 |
+
where $H ( \cdot )$ denotes the differential entropy of the random variable ${ \bf g } ( { \bf x } )$ taking values in $( 0 , 1 ) ^ { n _ { c } }$ .
|
| 190 |
+
Then g block-identifies the true content variables in the sense of Defn. 4.1.
|
| 191 |
+
|
| 192 |
+
Proof skmapping he Darmois construction [29, 57] to to a uniform random variable. Then $\mathbf { d } : \mathcal { C } ( 0 , 1 ) ^ { n _ { c } }$ $\mathbf { c } = \mathbf { f } ^ { - 1 } ( \mathbf { x } ) _ { 1 : n _ { c } }$ $\mathbf { g } ^ { \star } = \mathbf { d } \circ \mathbf { f } _ { 1 : n _ { c } } ^ { - 1 }$ minimum of (5) because $\mathbf { c }$ and the uniform distribution is the maximum entropy distribution on $( 0 , 1 ) ^ { n _ { c } }$ . Thus, any other minimiser $\mathbf { g }$ of (5) must satisfy invariance across $( { \bf x } , \tilde { { \bf x } } )$ and map to a uniform r.v. Then, use the same step 2 as in Thms. 4.2 and 4.3 to show that $\mathbf { h } = \mathbf { g } \circ \mathbf { f } : \mathcal { Z } ( 0 , 1 ) ^ { n _ { c } }$ cannot depend on style, i.e., it is a function from $\mathcal { C }$ to $( 0 , 1 ) ^ { n _ { c } }$ . Finally, we show that h must be invertible since it maps $p _ { \mathbf { c } }$ to a uniform distribution, using a result from [129].
|
| 193 |
+
|
| 194 |
+
Intuition. Thm. 4.4 states that if we do not explicitly enforce invertibility of $\mathbf { g }$ as in Thm. 4.3, additionally maximising the entropy of the learnt representation (i.e., optimising alignment and uniformity [124]) avoids a collapsed representation and recovers the invariant content block. Intuitively, this is because any function that only depends on c will be invariant across $( { \bf x } , \tilde { { \bf x } } )$ , so it is beneficial to preserve all content information to maximise entropy.
|
| 195 |
+
|
| 196 |
+
Discussion. Of our theoretical results, Thm. 4.4 requires the weakest set of assumptions, and is most closely aligned with common SSL practice. As discussed in $\ S$ , contrastive SSL with negative samples using InfoNCE (1) as an objective can asymptotically be understood as alignment with entropy regularisation [124], i.e., objective (5). Thm. 4.4 thus provides a theoretical justification for the empirically observed effectiveness of CL with InfoNCE: subject to our assumptions, CL with InfoNCE asymptotically isolates content, i.e., the part of the representation that is always left invariant by augmentation. For example, the strong image classification performance based on representations learned by SimCLR [20], which uses color distortion and random crops as augmentations, can be explained in that object class is a content variable in this case. We extensively evaluate the effect of various augmentation techniques on different ground-truth latent factors in our experiments in $\ S$ . There is also an interesting connection between Thm. 4.4 and BarlowTwins [128], which only uses positive pairs and combines alignment with a redundancy reduction regulariser that enforces decorrelation between the inferred latents. Intuitively, redundancy reduction is related to increased entropy: $\mathbf { g } ^ { \star }$ constructed in the proof of Thm. 4.4—and thus also any other minimiser of (5)—attains the global optimum of the BarlowTwins objective, though the reverse implication may not hold.
|
| 197 |
+
|
| 198 |
+
# 5 Experiments
|
| 199 |
+
|
| 200 |
+
We perform two main experiments. First, we numerically test our main result, Thm. 4.4, in a fullycontrolled, finite sample setting $( \ S \quad )$ , using CL to estimate the entropy term in (5). Second, we seek to better understand the effect of data augmentations used in practice $\mathrm { ~ ( ~ \ S ~ } \mathrm { ~ ) ~ }$ . To this end, we introduce a new dataset of 3D objects with dependencies between a number of known ground-truth factors, and use it to evaluate the effect of different augmentation techniques on what is identified as content. Additional experiments are summarised in $\ S 5 . 3$ and described in more detail in Appendix C.
|
| 201 |
+
|
| 202 |
+
# 5.1 Numerical data
|
| 203 |
+
|
| 204 |
+
Experimental setup. We generate synthetic data as described in $\ S \ O 3$ . We consider $n _ { c } = n _ { s } = 5$ with content and style latents distributed as $\mathbf { c } \sim \mathcal { N } ( 0 , \Sigma _ { c } )$ and $\mathbf { s } | \mathbf { c } \sim \mathcal { N } ( \mathbf { a } + B \mathbf { c } , \Sigma _ { s } )$ , thus allowing for statistical dependence within the two blocks (via $\Sigma _ { c }$ and $\Sigma _ { s }$ ) and causal dependence between content and style (via $B$ ). For f, we use a 3-layer MLP with LeakyReLU activation functions.10 The distribution $p _ { A }$ over subsets of changing style variables is obtained by independently flipping the same biased coin for each $s _ { i }$ . The conditional style distribution is taken as $p _ { \tilde { \mathbf { s } } _ { A } | \mathbf { \bar { s } } _ { A } } = \mathcal { N } ( \mathbf { s } _ { A } , \mathbf { \bar { \Sigma } } _ { A } ) ^ { \top }$ . We train an encoder $\mathbf { g }$ on pairs $( { \bf x } , \tilde { { \bf x } } )$ with InfoNCE using the negative L2 loss as the similarity measure, i.e., we approximate (5) using empirical averages and negative samples. For evaluation, we use kernel ridge regression [88] to predict the ground truth c and s from the learnt representation $\hat { \mathbf { c } } = \mathbf { g } ( \mathbf { x } )$ and report the $R ^ { 2 }$ coefficient of determination. For a more detailed account, we refer to Appendix D.
|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
Figure 2: (Left) Causal graph for the Causal3DIdent dataset. (Right) Two samples from each object class.
|
| 208 |
+
|
| 209 |
+
Results. In the inset table, we report mean $\pm$ std. dev. over 3 random seeds across four generative processes of increasing complexity covered by Thm. 4.4: “p(chg.)”, “Stat.”, and “Cau.” denote respectively the change probability for each $s _ { i }$ , statistical dependence within blocks $( \Sigma _ { c } \neq I \neq \Sigma _ { s } )$ , and causal dependence of style on content $B \neq 0 .$ ). An $R ^ { 2 }$ close to one indicates that almost all variation is explained by cˆ, i.e., that there is a 1-1 mapping, as required by Defn. 4.1. As can be seen, across all settings, content is block-identified. Regarding style, we observe an increased score with the introduction of dependencies, which we explain in an extended discussion in Appendix C.1. Finally, we show in Appendix C.1 that a high $R ^ { 2 }$ score can be obtained even if we use linear regression to predict c from cˆ $\dot { \phantom { 0 } } R ^ { 2 } = 0 . 9 8 \pm 0 . 0 1$ , for the last row).
|
| 210 |
+
|
| 211 |
+
<table><tr><td colspan="3">Generative process</td><td colspan="2">R² (nonlinear)</td></tr><tr><td>p(chg.)</td><td>Stat.</td><td>Cau.</td><td>Content c</td><td>Style s</td></tr><tr><td>1.0</td><td>X</td><td>X</td><td>1.00± 0.00</td><td>0.07±0.00</td></tr><tr><td>0.75</td><td>×</td><td>X</td><td>1.00 ± 0.00</td><td>0.06 ± 0.05</td></tr><tr><td>0.75</td><td>√</td><td>X</td><td>0.98 ± 0.03</td><td>0.37± 0.05</td></tr><tr><td>0.75</td><td>√</td><td>√</td><td>0.99 ± 0.01</td><td>0.80±0.08</td></tr></table>
|
| 212 |
+
|
| 213 |
+
# 5.2 High-dimensional images: Causal3DIdent
|
| 214 |
+
|
| 215 |
+
Causal3DIdent dataset. 3DIdent [129] is a benchmark for evaluating identifiability with rendered $2 2 4 \times 2 2 4$ images which contains hallmarks of natural environments (e.g. shadows, different lighting conditions, a 3D object). For influence of the latent factors on the renderings, see Fig. 2 of [129]. In 3DIdent, there is a single object class (Teapot [89]), and all 10 latents are sampled independently. For Causal3DIdent, we introduce six additional classes: Hare [121], Dragon [110], Cow [62], Armadillo [70], Horse [98], and Head [111]; and impose a causal graph over the latent variables, see Fig. 2. While object class and all environment variables (spotlight position & hue, background hue) are sampled independently, all object latents are dependent,11 see Appendix B for details.12
|
| 216 |
+
|
| 217 |
+
Experimental setup. For g, we train a convolutional encoder composed of a ResNet18 [46] and an additional fully-connected layer, with LeakyReLU activation. As in SimCLR [20], we use InfoNCE with cosine similarity, and train on pairs of augmented examples $( \tilde { \mathbf { x } } , \tilde { \mathbf { x } } ^ { \prime } )$ . As $n _ { c }$ is unknown and variable depending on the augmentation, we fix $\mathrm { d i m } ( \hat { \mathbf { c } } ) = 8$ throughout. Note that we find the results to be, for the most part, robust to the choice of $\mathrm { d i m } ( \hat { \mathbf { c } } )$ , see inset figure. We consider the following data augmentations (DA): crop, resize & flip; colour distortion (jitter & drop);
|
| 218 |
+
|
| 219 |
+
and rotation $\in \{ 9 0 ^ { \circ } , 1 8 0 ^ { \circ } , 2 7 0 ^ { \circ } \}$ . For comparison, we also consider directly imposing a content-style partition by performing a latent transformation (LT) to generate views. For evaluation, we use linear logistic regression to predict object class, and kernel ridge to predict the other latents from cˆ. 13
|
| 220 |
+
|
| 221 |
+

|
| 222 |
+
|
| 223 |
+
Table 1: Causal3DIdent results: $R ^ { 2 }$ mean $\pm$ std. dev. over 3 random seeds. DA: data augmentation, LT: latent transformation, bold: $R ^ { 2 } \geq 0 . 5$ , red: $R ^ { 2 } < 0 . 2 5$ . Results for individual axes of object position & rotation are aggregated, see Appendix C for the full table.
|
| 224 |
+
|
| 225 |
+
<table><tr><td rowspan="2">Views generated by</td><td rowspan="2">Class</td><td colspan="2">Positions</td><td colspan="3">Hues</td><td rowspan="2">Rotations</td></tr><tr><td>object</td><td>spotlight</td><td>object</td><td>spotlight</td><td>background</td></tr><tr><td>DA: colour distortion</td><td>0.42 ± 0.01</td><td>0.61 ± 0.10</td><td>0.17 ± 0.00</td><td>0.10 ± 0.01</td><td>0.01 ± 0.00</td><td>0.01 ± 0.00</td><td>0.33 ± 0.02</td></tr><tr><td>LT: change hues</td><td>1.00 ± 0.00</td><td>0.59 ± 0.33</td><td>0.91 ± 0.00</td><td>0.30 ± 0.00</td><td>0.00 ± 0.00</td><td>0.00 ± 0.00</td><td>0.30 ± 0.01</td></tr><tr><td>DA: crop (large)</td><td>0.28± 0.04</td><td>0.09± 0.08</td><td>0.21 ± 0.13</td><td>0.87 ± 0.00</td><td>0.09 ± 0.02</td><td>1.00 ± 0.00</td><td>0.02 ± 0.02</td></tr><tr><td>DA: crop (small)</td><td>0.14 ± 0.00</td><td>0.00 ± 0.01</td><td>0.00 ± 0.01</td><td>0.00± 0.00</td><td>0.00 ±0.00</td><td>1.00 ± 0.00</td><td>0.00 ±0.00</td></tr><tr><td>LT: change positions</td><td>1.00 ± 0.00</td><td>0.16 ± 0.23</td><td>0.00 ± 0.01</td><td>0.46 ± 0.02</td><td>0.00 ± 0.00</td><td>0.97 ± 0.00</td><td>0.29 ± 0.01</td></tr><tr><td>DA: crop (large) + colour distortion</td><td>0.97± 0.00</td><td>0.59 ± 0.07</td><td>0.59± 0.05</td><td>0.28± 0.00</td><td>0.01 ± 0.01</td><td>0.01 ± 0.00</td><td>0.74± 0.03</td></tr><tr><td>DA: crop (small) + colour distortion</td><td>1.00 ± 0.00</td><td>0.69± 0.04</td><td>0.93±0.00</td><td>0.30 ± 0.01</td><td>0.00 ± 0.00</td><td>0.02 ± 0.03</td><td>0.56± 0.03</td></tr><tr><td>LT: change positions + hues</td><td>1.00 ± 0.00</td><td>0.22 ± 0.22</td><td>0.07 ± 0.08</td><td>0.32 ± 0.02</td><td>0.00 ± 0.01</td><td>0.02 ± 0.03</td><td>0.34± 0.06</td></tr><tr><td>DA: rotation</td><td>0.33 ± 0.06</td><td>0.17±0.09</td><td>0.23 ± 0.12</td><td>0.83 ± 0.01</td><td>0.30 ± 0.12</td><td>0.99± 0.00</td><td>0.05 ± 0.03</td></tr><tr><td>LT: change rotations</td><td>1.00 ± 0.00</td><td>0.53 ± 0.33</td><td>0.90 ± 0.00</td><td>0.41 ± 0.00</td><td>0.00 ± 0.00</td><td>0.97 ± 0.00</td><td>0.28 ± 0.00</td></tr><tr><td>DA: rotation + colour distortion</td><td>0.59± 0.01</td><td>0.58 ± 0.06</td><td>0.21 ± 0.01</td><td>0.12 ± 0.02</td><td>0.01 ± 0.00</td><td>0.01 ± 0.00</td><td>0.33 ± 0.04</td></tr><tr><td>LT: change rotations + hues</td><td>1.00 ± 0.00</td><td>0.57 ± 0.34</td><td>0.91 ± 0.00</td><td>0.30 ± 0.00</td><td>0.00 ± 0.00</td><td>0.00 ± 0.00</td><td>0.28 ± 0.00</td></tr></table>
|
| 226 |
+
|
| 227 |
+
Results. The results are presented in Tab. 1. Overall, our main findings can be summarised as:
|
| 228 |
+
|
| 229 |
+
(i) it can be difficult to design image-level augmentations that leave specific latent factors invariant;
|
| 230 |
+
(ii) augmentations & latent transformations generally have a similar effect on groups of latents;
|
| 231 |
+
(iii) augmentations that yield good classification performance induce variation in all other latents.
|
| 232 |
+
|
| 233 |
+
We observe that, similar to directly varying the hue latents, colour distortion leads to a discarding of hue information as style, and a preservation of (object) position as content. Crops, similar to varying the position latents, lead to a discarding of position as style, and a preservation of background and object hue as content, the latter assuming crops are sufficiently large. In contrast, image-level rotation affects both the object rotation and position, and thus deviates from only varying the rotation latents.
|
| 234 |
+
|
| 235 |
+
Whereas class is always preserved as content when generating views with latent transformations, when using data augmentations, we can only reliably decode class when crops & colour distortion are used in conjunction—a result which mirrors evaluation on ImageNet [20]. As can be seen by our evaluation of crops $\&$ colour distortion in isolation, while colour distortion leads to a discarding of hues as style, crops lead to a discarding of position $\&$ rotation as style. Thus, when used in conjunction, class is isolated as the sole content variable. See Appendix C.2 for additional analysis.
|
| 236 |
+
|
| 237 |
+
# 5.3 Additional experiments and ablations
|
| 238 |
+
|
| 239 |
+
We also perform an ablation on $\mathrm { d i m } ( \hat { \mathbf { c } } )$ for the synthetic setting from $\ S$ , see Appendix C.1 for details. Generally, we find that if $\mathrm { d i m } ( \hat { \mathbf { c } } ) < n _ { c }$ , there is insufficient capacity to encode all content, so a lower-dimensional mixture of content is learnt. Conversely, if $\mathrm { d i m } ( \hat { \mathbf { c } } ) > n _ { c }$ , the excess capacity is used to encode some style information (as that increases entropy). Further, we repeat our analysis from $\ S 5 . 2$ using BarlowTwins [128] (instead of SimCLR) which, as discussed at the end of $\ S 4 . 2$ , is also loosely related to Thm. 4.4. The results mostly mirror those obtained for SimCLR and presented in Tab. 1, see Appendix C.2 for details. Finally, we ran the same experimental setup as in $\ S$ also on the MPI3D-real dataset [38] containing $> 1$ million real images with ground-truth annotations of 3D objects being moved by a robotic arm. Subject to some caveats, the results show a similar trend as those on Causal3DIdent, see Appendix C.3 for details.
|
| 240 |
+
|
| 241 |
+
# 6 Discussion
|
| 242 |
+
|
| 243 |
+
Theory vs practice. We have made an effort to tailor our problem formulation $^ { ( \ S ) }$ to the setting of data augmentation with content-preserving transformations. However, some of our more technical assumptions, which are necessary to prove block-identifiability of the invariant content partition, may not hold exactly in practice. This is apparent, e.g., from our second experiment $( \ S 5 . 2 )$ , where we observe that—while class should, in principle, always be invariant across views (i.e., content)—when using only crops, colour distortion, or rotation, g appears to encode shortcuts [37, 96].14 Data augmentation, unlike latent transformations, generates views $\tilde { \bf x }$ which are not restricted to the 11-dim. image manifold $\mathcal { X }$ corresponding to the generative process of Causal3DIdent, but may introduce additional variation: e.g., colour distortion leads to a rich combination of colours, typically a 3-dim. feature, whereas Causal3DIdent only contains one degree of freedom (hue). With additional factors, any introduced invariances may be encoded as content in place of class. Image-level augmentations also tend to change multiple latent factors in a correlated way, which may violate assumption (iii) of our theorems, i.e., that $p _ { \tilde { \mathbf { s } } _ { A } | \mathbf { s } _ { A } }$ is fully-supported locally. We also assume that $\mathbf { z }$ is continuous, even though Causal3DIdent and most disentanglement datasets also contain discrete latents. This is a very common assumption in the related literature [39, 54, 57, 58, 63, 69, 82, 83, 129] that may be relaxed in future work. Moreover, our theory holds asymptotically and at the global optimum, whereas in practice we solve a non-convex optimisation problem with a finite sample and need to approximate the entropy term in (5), e.g., using a finite number of negative pairs. The resulting challenges for optimisation may be further accentuated by the higher dimensionality of $\mathcal { X }$ induced by image-level augmentations. Finally, we remark that while, for simplicity, we have presented our theory for pairs $( { \bf x } , \bar { \bf x } )$ of original and augmented examples, in practice, using pairs $( \tilde { \mathbf { x } } , \tilde { \mathbf { x } } ^ { \prime } )$ of two augmented views typically yields better performance. All of our assumptions (content invariance, changing style, etc) and theoretical results still apply to the latter case. We believe that using two augmented views helps because it leads to increased variability across the pair: for if $\tilde { \mathbf { x } }$ and $\tilde { \mathbf { x } } ^ { \prime }$ differ from $\mathbf { x }$ in style subsets $A$ and $A ^ { \prime }$ , respectively, then $( \tilde { \mathbf { x } } , \tilde { \mathbf { x } } ^ { \prime } )$ differ from each other (a.s.) in the union $A \cup A ^ { \prime }$ .
|
| 244 |
+
|
| 245 |
+
Beyond entropy regularisation. We have shown a clear link between an identifiable maximum entropy approach to SSL (Thm. 4.4) and SimCLR [20] based on the analysis of [124], and have discussed an intuitive connection to the notion of redundancy reduction used in BarlowTwins [128]. Whether other types of regularisation such as the architectural approach pursued in BYOL [41] and SimSiam [21] can also be linked to entropy maximisation, remains an open question. Deriving similar results to Thm. 4.4 with other regularisers is a promising direction for future research, c.f. [116].
|
| 246 |
+
|
| 247 |
+
The choice of augmentation technique implicitly defines content and style. As we have defined content as the part of the representation which is always left invariant across views, the choice of augmentation implicitly determines the content-style partition. This is particularly important to keep in mind when applying SSL with data augmentation to safety-critical domains, such as medical imaging. We also advise caution when using data augmentation to identify specific latent properties, since, as observed in $\ S$ , image-level transformations may affect the underlying ground-truth factors in unanticipated ways. Also note that, for a given downstream task, we may not want to discard all style information since style variables may still be correlated with the task of interest and may thus help improve predictive performance. For arbitrary downstream tasks, however, where style may change in an adversarial way, it can be shown that only using content is optimal [103].
|
| 248 |
+
|
| 249 |
+
What vs how information is encoded. We focus on what information is learnt by SSL with data augmentations by specifying a generative process and studying identifiability of the latent representation. Orthogonal to this, a different line of work instead studies how information is encoded by analysing the sample complexity needed to solve a given downstream task using a linear predictor [3, 74, 116– 119]. Provided that downstream tasks only involve content, we can draw some comparisons. Whereas our results recover content only up to arbitrary invertible nonlinear functions (see Defn. 4.1), our problem setting is more general: [3, 74] assume (approximate) independence of views $( { \bf x } , \tilde { { \bf x } } )$ given the task (content), while [118, 119] assume (approximate) independence between one view and the task (content) given the other view, neither of which hold in our setting.
|
| 250 |
+
|
| 251 |
+
Conclusion. Existing representation learning approaches typically assume mutually independent latents, though dependencies clearly exist in nature [106]. We demonstrate that in a non-i.i.d. scenario, e.g., by constructing multiple views of the same example with data augmentation, we can learn useful representations in the presence of this neglected phenomenon. More specifically, the present work contributes, to the best of our knowledge, the first: (i) identifiability result under arbitrary dependence between latents; and (ii) empirical study that evaluates the effect of data augmentations not only on classification, but also on other continuous ground-truth latents. Unlike existing identifiability results which rely on change as a learning signal, our approach aims to identify what is always shared across views, i.e., also using invariance as a learning signal. We hope that this change in perspective will be helpful for applications such as optimal style transfer or disentangling shape from pose in vision, and inspire other types of counterfactual training to recover a more fine-grained causal representation.
|
| 252 |
+
|
| 253 |
+
# Acknowledgements
|
| 254 |
+
|
| 255 |
+
We thank: the anonymous reviewers for several helpful suggestions that triggered improvements in theory and additional experiments; Cian Eastwood, Ilyes Khemakem, Michael Lohaus, Osama Makansi, Ricardo Pio Monti, Roland Zimmermann, Weiyang Liu, and the MPI Tübingen causality group for helpful discussions and comments; Hugo Yèche for pointing out a mistake in $\ S 2$ of an earlier version of the manuscript; github user TangTangFei for catching a bug in the implementation of the experiments from $\ S 5 . 1$ (that has been corrected in this version); and the International Max Planck Research School for Intelligent Systems (IMPRS-IS) for supporting YS.
|
| 256 |
+
|
| 257 |
+
# Funding Transparency Statement
|
| 258 |
+
|
| 259 |
+
WB acknowledges support via his Emmy Noether Research Group funded by the German Science Foundation (DFG) under grant no. BR 6382/1-1 as well as support by Open Philantropy and the Good Ventures Foundation. This work was supported by the German Federal Ministry of Education and Research (BMBF): Tübingen AI Center, FKZ: 01IS18039A, 01IS18039B; and by the Machine Learning Cluster of Excellence, EXC number 2064/1 – Project number 390727645.
|
| 260 |
+
|
| 261 |
+
# References
|
| 262 |
+
|
| 263 |
+
[1] Pulkit Agrawal, Joao Carreira, and Jitendra Malik. Learning to see by moving. In Proceedings of the IEEE International Conference on Computer Vision, pages 37–45, 2015.
|
| 264 |
+
[2] Arctic Wildlife. Churchill Polar Bears . https://churchillpolarbears.org/churchill/, 2021. [3] Sanjeev Arora, Hrishikesh Khandeparkar, Mikhail Khodak, Orestis Plevrakis, and Nikunj Saunshi. A theoretical analysis of contrastive unsupervised representation learning. In 36th International Conference on Machine Learning, pages 9904–9923. International Machine Learning Society (IMLS), 2019.
|
| 265 |
+
[4] Philip Bachman, R. Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. In Advances in Neural Information Processing Systems 32, pages 15509–15519, 2019.
|
| 266 |
+
[5] Alexei Baevski, Steffen Schneider, and Michael Auli. vq-wav2vec: Self-supervised learning of discrete speech representations. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020.
|
| 267 |
+
[6] Alexei Baevski, Yuhao Zhou, Abdelrahman Mohamed, and Michael Auli. wav2vec 2.0: A framework for self-supervised learning of speech representations. In Advances in Neural Information Processing Systems 33, 2020.
|
| 268 |
+
[7] Suzanna Becker and Geoffrey E Hinton. Self-organizing neural network that discovers surfaces in random-dot stereograms. Nature, 355(6356):161–163, 1992.
|
| 269 |
+
[8] Jens Behrmann, Will Grathwohl, Ricky TQ Chen, David Duvenaud, and Jörn-Henrik Jacobsen. Invertible residual networks. In International Conference on Machine Learning, pages 573–582. PMLR, 2019.
|
| 270 |
+
[9] Anthony J Bell and Terrence J Sejnowski. An information-maximization approach to blind separation and blind deconvolution. Neural computation, 7(6):1129–1159, 1995.
|
| 271 |
+
[10] Yoshua Bengio, Aaron Courville, and Pascal Vincent. Representation learning: A review and new perspectives. IEEE Transactions on Pattern Analysis and Machine Intelligence, 35(8):1798–1828, 2013.
|
| 272 |
+
[11] Blender Online Community. Blender - a 3D modelling and rendering package. Blender Foundation, Blender Institute, Amsterdam, 2021.
|
| 273 |
+
[12] Jane Bromley, Isabelle Guyon, Yann LeCun, Eduard Säckinger, and Roopak Shah. Signature verification using a “siamese” time delay neural network. Advances in Neural Information Processing Systems, 6: 737–744, 1993.
|
| 274 |
+
[13] 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 Advances in Neural Information Processing Systems, volume 33, pages 1877–1901, 2020.
|
| 275 |
+
[14] Christopher P Burgess, Irina Higgins, Arka Pal, Loic Matthey, Nick Watters, Guillaume Desjardins, and Alexander Lerchner. Understanding disentangling in $\beta$ -VAE. arXiv preprint arXiv:1804.03599, 2018.
|
| 276 |
+
[15] J-F Cardoso. Infomax and maximum likelihood for blind source separation. IEEE Signal processing letters, 4(4):112–114, 1997.
|
| 277 |
+
[16] Michael A Casey and Alex Westner. Separation of mixed audio sources by independent subspace analysis. In ICMC, pages 154–161, 2000.
|
| 278 |
+
[17] Olivier Chapelle and Bernhard Schölkopf. Incorporating invariances in nonlinear SVMs. In Advances in Neural Information Processing Systems 14, pages 609–616, Cambridge, MA, USA, 2002. MIT Press.
|
| 279 |
+
[18] Ricky TQ Chen, Xuechen Li, Roger Grosse, and David Duvenaud. Isolating sources of disentanglement in vaes. In Advances in Neural Information Processing Systems, pages 2615–2625, 2018.
|
| 280 |
+
[19] Shuxiao Chen, Edgar Dobriban, and Jane H Lee. A group-theoretic framework for data augmentation. Journal of Machine Learning Research, 21(245):1–71, 2020.
|
| 281 |
+
[20] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In International Conference on Machine Learning, pages 1597–1607. PMLR, 2020.
|
| 282 |
+
[21] Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. In IEEE Conference on Computer Vision and Pattern Recognition, pages 15750–15758, 2021.
|
| 283 |
+
[22] S. Chopra, R. Hadsell, and Y. LeCun. Learning a similarity metric discriminatively, with application to face verification. In IEEE Conference on Computer Vision and Pattern Recognition, volume 1, pages 539–546, 2005.
|
| 284 |
+
[23] Ronan Collobert, Jason Weston, Léon Bottou, Michael Karlen, Koray Kavukcuoglu, and Pavel Kuksa. Natural language processing (almost) from scratch. Journal of Machine Learning Research, 12:2461– 2505, 2011.
|
| 285 |
+
[24] Pierre Comon. Independent component analysis, a new concept? Signal processing, 36(3):287–314, 1994.
|
| 286 |
+
[25] Thomas M Cover and Joy A Thomas. Elements of Information Theory. John Wiley & Sons, 2012.
|
| 287 |
+
[26] Ekin D Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V Le. Autoaugment: Learning augmentation strategies from data. In IEEE Conference on Computer Vision and Pattern Recognition, pages 113–123, 2019.
|
| 288 |
+
[27] Ekin D Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V Le. Randaugment: Practical automated data augmentation with a reduced search space. In IEEE Conference on Computer Vision and Pattern Recognition Workshops, pages 702–703, 2020.
|
| 289 |
+
[28] Tri Dao, Albert Gu, Alexander Ratner, Virginia Smith, Chris De Sa, and Christopher Ré. A kernel theory of modern data augmentation. In International Conference on Machine Learning, pages 1528–1537. PMLR, 2019.
|
| 290 |
+
[29] G Darmois. Analyse des liaisons de probabilité. In Proc. Int. Stat. Conferences 1947, page 231, 1951.
|
| 291 |
+
[30] 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, pages 4171–4186, 2019.
|
| 292 |
+
[31] Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552, 2017.
|
| 293 |
+
[32] Laurent Dinh, David Krueger, and Yoshua Bengio. NICE: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014.
|
| 294 |
+
[33] Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density estimation using real NVP. In 5th International Conference on Learning Representations, 2017.
|
| 295 |
+
[34] Carl Doersch, Abhinav Gupta, and Alexei A Efros. Unsupervised visual representation learning by context prediction. In IEEE International Conference on Computer Vision, pages 1422–1430, 2015.
|
| 296 |
+
[35] Frederick Eberhardt and Richard Scheines. Interventions and causal inference. Philosophy of science, 74 (5):981–995, 2007.
|
| 297 |
+
[36] Robert Geirhos, Patricia Rubisch, Claudio Michaelis, Matthias Bethge, Felix A. Wichmann, and Wieland Brendel. Imagenet-trained cnns are biased towards texture; increasing shape bias improves accuracy and robustness. International Conference on Learning Representations (ICLR), 2019.
|
| 298 |
+
[37] Robert Geirhos, Jörn-Henrik Jacobsen, Claudio Michaelis, Richard Zemel, Wieland Brendel, Matthias Bethge, and Felix A. Wichmann. Shortcut learning in deep neural networks. Nature Machine Intelligence, 2(11):665–673, Nov 2020.
|
| 299 |
+
[38] Muhammad Waleed Gondal, Manuel Wuthrich, Djordje Miladinovic, Francesco Locatello, Martin Breidt, Valentin Volchkov, Joel Akpo, Olivier Bachem, Bernhard Schölkopf, and Stefan Bauer. On the transfer of inductive bias from simulation to the real world: a new disentanglement dataset. Advances in Neural Information Processing Systems, 32:15740–15751, 2019.
|
| 300 |
+
[39] Luigi Gresele, Paul K. Rubenstein, Arash Mehrjou, Francesco Locatello, and Bernhard Schölkopf. The Incomplete Rosetta Stone problem: Identifiability results for multi-view nonlinear ICA. In Proceedings of the Thirty-Fifth Conference on Uncertainty in Artificial Intelligence, UAI, 2019.
|
| 301 |
+
[40] Luigi Gresele, Julius von Kügelgen, Vincent Stimper, Bernhard Schölkopf, and Michel Besserve. Independent mechanism analysis, a new concept? In Advances in Neural Information Processing Systems, 2021.
|
| 302 |
+
[41] Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre H. Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Ávila Pires, Zhaohan Guo, Mohammad Gheshlaghi Azar, Bilal Piot, Koray Kavukcuoglu, Rémi Munos, and Michal Valko. Bootstrap your own latent - A new approach to self-supervised learning. In Advances in Neural Information Processing Systems 33, 2020.
|
| 303 |
+
[42] Michael Gutmann and Aapo Hyvärinen. Noise-contrastive estimation: A new estimation principle for unnormalized statistical models. In Proceedings of the Thirteenth International Conference on Artificial Intelligence and Statistics, pages 297–304, 2010.
|
| 304 |
+
[43] Michael Gutmann and Aapo Hyvärinen. Noise-contrastive estimation of unnormalized statistical models, with applications to natural image statistics. The Journal of Machine Learning Research, 13:307–361, 2012.
|
| 305 |
+
[44] R. Hadsell, S. Chopra, and Y. LeCun. Dimensionality reduction by learning an invariant mapping. In IEEE Conference on Computer Vision and Pattern Recognition, volume 2, pages 1735–1742, 2006.
|
| 306 |
+
[45] Hermanni Hälvä and Aapo Hyvarinen. Hidden markov nonlinear ica: Unsupervised learning from nonstationary time series. In Conference on Uncertainty in Artificial Intelligence, pages 939–948. PMLR, 2020.
|
| 307 |
+
[46] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE Conference on Computer Vision and Pattern Recognition, 2016.
|
| 308 |
+
[47] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross B. Girshick. Momentum contrast for unsupervised visual representation learning. In IEEE Conference on Computer Vision and Pattern Recognition, pages 9726–9735, 2020.
|
| 309 |
+
[48] Olivier J. Hénaff. Data-efficient image recognition with contrastive predictive coding. In Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pages 4182–4192. PMLR, 2020.
|
| 310 |
+
[49] Irina Higgins, Loïc Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual concepts with a constrained variational framework. In 5th International Conference on Learning Representations, 2017.
|
| 311 |
+
[50] R. Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Philip Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. In 7th International Conference on Learning Representations, 2019.
|
| 312 |
+
[51] Haruo Hosoya. Group-based learning of disentangled representations with generalizability for novel contents. In IJCAI, pages 2506–2513, 2019.
|
| 313 |
+
[52] Andrew G. Howard. Some improvements on deep convolutional neural network based image classification, 2013.
|
| 314 |
+
[53] Aapo Hyvärinen and Patrik Hoyer. Emergence of phase-and shift-invariant features by decomposition of natural images into independent feature subspaces. Neural computation, 12(7):1705–1720, 2000.
|
| 315 |
+
[54] Aapo Hyvarinen and Hiroshi Morioka. Unsupervised feature extraction by time-contrastive learning and nonlinear ICA. In Advances in Neural Information Processing Systems, pages 3765–3773, 2016.
|
| 316 |
+
[55] Aapo Hyvarinen and Hiroshi Morioka. Nonlinear ica of temporally dependent stationary sources. In Artificial Intelligence and Statistics, pages 460–469. PMLR, 2017.
|
| 317 |
+
[56] Aapo Hyvärinen and Erkki Oja. Independent component analysis: algorithms and applications. Neural networks, 13(4-5):411–430, 2000.
|
| 318 |
+
[57] Aapo Hyvärinen and Petteri Pajunen. Nonlinear independent component analysis: Existence and uniqueness results. Neural Networks, 12(3):429–439, 1999.
|
| 319 |
+
[58] Aapo Hyvarinen, Hiroaki Sasaki, and Richard Turner. Nonlinear ica using auxiliary variables and generalized contrastive learning. In The 22nd International Conference on Artificial Intelligence and Statistics, pages 859–868. PMLR, 2019.
|
| 320 |
+
[59] Maximilian Ilse, Jakub M Tomczak, and Patrick Forré. Selecting data augmentation for simulating interventions. In International Conference on Machine Learning, pages 4555–4562. PMLR, 2021.
|
| 321 |
+
[60] Jörn-Henrik Jacobsen, Arnold Smeulders, and Edouard Oyallon. i-RevNet: Deep invertible networks. In International Conference on Learning Representations, 2018.
|
| 322 |
+
[61] Edwin T Jaynes. On the rationale of maximum-entropy methods. Proceedings of the IEEE, 70(9): 939–952, 1982.
|
| 323 |
+
[62] Keenan’s 3D Model Repository. Keenan’s 3D Model Repository https://www.cs.cmu.edu/ kmcrane/Projects/ModelRepository/, 2021.
|
| 324 |
+
[63] Ilyes Khemakhem, Diederik P. Kingma, Ricardo Pio Monti, and Aapo Hyvärinen. Variational autoencoders and nonlinear ICA: A unifying framework. In The 23rd International Conference on Artificial Intelligence and Statistics, AISTATS, volume 108, pages 2207–2217, 2020.
|
| 325 |
+
[64] Ilyes Khemakhem, Ricardo Pio Monti, Diederik P. Kingma, and Aapo Hyvärinen. Ice-beem: Identifiable conditional energy-based deep models based on nonlinear ICA. In Advances in Neural Information Processing Systems 33, 2020.
|
| 326 |
+
[65] Hyunjik Kim and Andriy Mnih. Disentangling by factorising. In International Conference on Machine Learning, pages 2649–2658. PMLR, 2018.
|
| 327 |
+
[66] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In 3rd International Conference on Learning Representations, 2015.
|
| 328 |
+
[67] Diederik P Kingma and Prafulla Dhariwal. Glow: generative flow with invertible $1 \times 1$ convolutions. In Advances in Neural Information Processing Systems, pages 10236–10245, 2018.
|
| 329 |
+
[68] Diederik P. Kingma and Max Welling. Auto-encoding variational bayes. In 2nd International Conference on Learning Representations (ICLR), 2014.
|
| 330 |
+
[69] David Klindt, Lukas Schott, Yash Sharma, Ivan Ustyuzhaninov, Wieland Brendel, Matthias Bethge, and Dylan Paiton. Towards nonlinear disentanglement in natural data with temporal sparse coding. International Conference on Learning Representations (ICLR), 2021.
|
| 331 |
+
[70] Venkat Krishnamurthy and Marc Levoy. Fitting smooth surfaces to dense polygon meshes. In John Fujii, editor, Proceedings of the 23rd Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH 1996, New Orleans, LA, USA, August 4-9, 1996, pages 313–324. ACM, 1996.
|
| 332 |
+
[71] Abhishek Kumar, Prasanna Sattigeri, and Avinash Balakrishnan. Variational inference of disentangled latent concepts from unlabeled observations. In International Conference on Learning Representations, 2018.
|
| 333 |
+
[72] Brenden M Lake, Tomer D Ullman, Joshua B Tenenbaum, and Samuel J Gershman. Building machines that learn and think like people. Behavioral and brain sciences, 40, 2017.
|
| 334 |
+
[73] Quoc V Le, Will Y Zou, Serena Y Yeung, and Andrew $\mathrm { ~ Y ~ N ~ g ~ }$ . Learning hierarchical invariant spatiotemporal features for action recognition with independent subspace analysis. In CVPR 2011, pages 3361–3368. IEEE, 2011.
|
| 335 |
+
[74] Jason D Lee, Qi Lei, Nikunj Saunshi, and Jiacheng Zhuo. Predicting what you already know helps: Provable self-supervised learning. arXiv preprint arXiv:2008.01064, 2020.
|
| 336 |
+
[75] Te-Won Lee, Mark Girolami, and Terrence J Sejnowski. Independent component analysis using an extended infomax algorithm for mixed subgaussian and supergaussian sources. Neural computation, 11 (2):417–441, 1999.
|
| 337 |
+
[76] Felix Leeb, Yashas Annadani, Stefan Bauer, and Bernhard Schölkopf. Structural autoencoders improve representations for generation and transfer. arXiv preprint arXiv:2006.07796, 2020.
|
| 338 |
+
[77] Erich L Lehmann and George Casella. Theory of point estimation. Springer Science & Business Media, 2006.
|
| 339 |
+
[78] Lepus Othus. Animal Diversity Web . https://animaldiversity.org/accounts/Lepus_othus/, 2021.
|
| 340 |
+
[79] Ralph Linsker. Self-organization in a perceptual network. Computer, 21(3):105–117, 1988.
|
| 341 |
+
[80] Ralph Linsker. An application of the principle of maximum information preservation to linear systems. In Advances in Neural Information Processing Systems, pages 186–194, 1989.
|
| 342 |
+
[81] Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019.
|
| 343 |
+
[82] Francesco Locatello, Stefan Bauer, Mario Lucic, Gunnar Raetsch, Sylvain Gelly, Bernhard Schölkopf, and Olivier Bachem. Challenging common assumptions in the unsupervised learning of disentangled representations. In International Conference on Machine Learning, pages 4114–4124, 2019.
|
| 344 |
+
[83] Francesco Locatello, Ben Poole, Gunnar Rätsch, Bernhard Schölkopf, Olivier Bachem, and Michael Tschannen. Weakly-supervised disentanglement without compromises. In Proceedings of the 37th International Conference on Machine Learning, volume 119, pages 6348–6359. PMLR, 2020.
|
| 345 |
+
[84] Lajanugen Logeswaran and Honglak Lee. An efficient framework for learning sentence representations. In 6th International Conference on Learning Representations, 2018.
|
| 346 |
+
[85] Chaochao Lu, Yuhuai Wu, Jose Miguel Hernández-Lobato, and Bernhard Schölkopf. Nonlinear invariant ´ risk minimization: A causal approach. arXiv preprint arXiv:2102.12353, 2021.
|
| 347 |
+
[86] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. Distributed representations of words and phrases and their compositionality. In Advances in Neural Information Processing Systems, pages 3111–3119, 2013.
|
| 348 |
+
[87] Jovana Mitrovic, Brian McWilliams, Jacob C. Walker, Lars Holger Buesing, and Charles Blundell. Representation learning via invariant causal mechanisms. In 9th International Conference on Learning Representations, 2021.
|
| 349 |
+
[88] Kevin P Murphy. Machine learning: a probabilistic perspective. MIT Press, Cambridge, MA, 2012.
|
| 350 |
+
[89] Martin Edward Newell. The Utilization of Procedure Models in Digital Image Synthesis. PhD thesis, The University of Utah, 1975. AAI7529894.
|
| 351 |
+
[90] Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In European conference on computer vision, pages 69–84. Springer, 2016.
|
| 352 |
+
[91] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
|
| 353 |
+
[92] George Papamakarios, Theo Pavlakou, and Iain Murray. Masked autoregressive flow for density estimation. In Advances in Neural Information Processing Systems, pages 2338–2347, 2017.
|
| 354 |
+
[93] George Papamakarios, Eric Nalisnick, Danilo Jimenez Rezende, Shakir Mohamed, and Balaji Lakshminarayanan. Normalizing flows for probabilistic modeling and inference. Journal of Machine Learning Research, 22(57):1–64, 2021.
|
| 355 |
+
[94] Judea Pearl. Causality. Cambridge university press, 2009.
|
| 356 |
+
[95] Jeffrey Pennington, Richard Socher, and Christopher D Manning. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pages 1532–1543, 2014.
|
| 357 |
+
[96] Mohammad Pezeshki, Sékou-Oumar Kaba, Yoshua Bengio, Aaron Courville, Doina Precup, and Guillaume Lajoie. Gradient starvation: A learning proclivity in neural networks. arXiv preprint arXiv:2011.09468, 2020.
|
| 358 |
+
[97] Ben Poole, Sherjil Ozair, Aaron Van Den Oord, Alex Alemi, and George Tucker. On variational bounds of mutual information. In International Conference on Machine Learning, pages 5171–5180. PMLR, 2019.
|
| 359 |
+
[98] Emil Praun, Adam Finkelstein, and Hugues Hoppe. Lapped textures. In Judith R. Brown and Kurt Akeley, editors, Proceedings of the 27th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH 2000, New Orleans, LA, USA, July 23-28, 2000, pages 465–470. ACM, 2000.
|
| 360 |
+
[99] Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving language understanding by generative pre-training. Technical report, OpenAI, 2018.
|
| 361 |
+
[100] Mirco Ravanelli, Jianyuan Zhong, Santiago Pascual, Pawel Swietojanski, Joao Monteiro, Jan Trmal, and Yoshua Bengio. Multi-task self-supervised learning for robust speech recognition. In IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 6989–6993, 2020.
|
| 362 |
+
[101] H. Richard, L. Gresele, A. Hyvarinen, B. Thirion, A. Gramfort, and P. Ablin. Modeling shared responses in neuroimaging studies through multiview ica. In Advances in Neural Information Processing Systems 33, pages 19149–19162. Curran Associates, Inc., December 2020.
|
| 363 |
+
[102] Geoffrey Roeder, Luke Metz, and Durk Kingma. On linear identifiability of learned representations. In International Conference on Machine Learning, pages 9030–9039. PMLR, 2021.
|
| 364 |
+
[103] Mateo Rojas-Carulla, Bernhard Schölkopf, Richard Turner, and Jonas Peters. Invariant models for causal transfer learning. The Journal of Machine Learning Research, 19(1):1309–1342, 2018.
|
| 365 |
+
[104] Steffen Schneider, Alexei Baevski, Ronan Collobert, and Michael Auli. wav2vec: Unsupervised pretraining for speech recognition. In Interspeech 2019, 20th Annual Conference of the International Speech Communication Association, pages 3465–3469, 2019.
|
| 366 |
+
[105] Bernhard Schölkopf. Causality for machine learning. arXiv preprint arXiv:1911.10500, 2019.
|
| 367 |
+
[106] Bernhard Schölkopf, Francesco Locatello, Stefan Bauer, Nan Rosemary Ke, Nal Kalchbrenner, Anirudh Goyal, and Yoshua Bengio. Toward causal representation learning. Proceedings of the IEEE, 2021.
|
| 368 |
+
[107] Xinwei Shen, Furui Liu, Hanze Dong, Qing Lian, Zhitang Chen, and Tong Zhang. Disentangled generative causal representation learning. arXiv preprint arXiv:2010.02637, 2020.
|
| 369 |
+
[108] Rui Shu, Yining Chen, Abhishek Kumar, Stefano Ermon, and Ben Poole. Weakly supervised disentanglement with guarantees. In 8th International Conference on Learning Representations, 2020.
|
| 370 |
+
[109] Peter Sorrenson, Carsten Rother, and Ullrich Köthe. Disentanglement by nonlinear ica with general incompressible-flow networks (gin). In International Conference on Learning Representations, 2020.
|
| 371 |
+
[110] Stanford Scanning Repository. The Stanford 3D Scanning Repository. http://graphics.stanford.edu/data/3Dscanrep/, 2021.
|
| 372 |
+
[111] Suggestive Contour Gallery. Suggestive Contour Gallery https://gfx.cs.princeton.edu/proj/sugcon/models/, 2021.
|
| 373 |
+
[112] Raphael Suter, Djordje Miladinovic, Bernhard Schölkopf, and Stefan Bauer. Robustly disentangled causal mechanisms: Validating deep representations for interventional robustness. In International Conference on Machine Learning, pages 6056–6065. PMLR, 2019.
|
| 374 |
+
[113] Christian Szegedy, Wei Liu, Yangqing Jia, Pierre Sermanet, Scott Reed, Dragomir Anguelov, Dumitru Erhan, Vincent Vanhoucke, and Andrew Rabinovich. Going deeper with convolutions. In Computer Vision and Pattern Recognition (CVPR), 2015.
|
| 375 |
+
[114] Fabian Theis. Towards a general independent subspace analysis. Advances in Neural Information Processing Systems, 19:1361–1368, 2006.
|
| 376 |
+
[115] Yonglong Tian, Dilip Krishnan, and Phillip Isola. Contrastive multiview coding. In Computer Vision - ECCV 2020, volume 12356, pages 776–794. Springer, 2020.
|
| 377 |
+
[116] Yuandong Tian, Xinlei Chen, and Surya Ganguli. Understanding self-supervised learning dynamics without contrastive pairs. In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learning,, volume 139, pages 10268–10278, 2021.
|
| 378 |
+
[117] Christopher Tosh, Akshay Krishnamurthy, and Daniel Hsu. Contrastive estimation reveals topic posterior information to linear models. arXiv preprint arXiv:2003.02234, 2020.
|
| 379 |
+
[118] Christopher Tosh, Akshay Krishnamurthy, and Daniel Hsu. Contrastive learning, multi-view redundancy, and linear models. In Algorithmic Learning Theory, pages 1179–1206. PMLR, 2021.
|
| 380 |
+
[119] Yao-Hung Hubert Tsai, Yue Wu, Ruslan Salakhutdinov, and Louis-Philippe Morency. Self-supervised learning from a multi-view perspective. In International Conference on Learning Representations, 2020.
|
| 381 |
+
[120] Michael Tschannen, Josip Djolonga, Paul K. Rubenstein, Sylvain Gelly, and Mario Lucic. On mutual information maximization for representation learning. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020.
|
| 382 |
+
[121] Greg Turk and Marc Levoy. Zippered polygon meshes from range images. In Dino Schweitzer, Andrew S. Glassner, and Mike Keeler, editors, Proceedings of the 21th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH 1994, Orlando, FL, USA, July 24-29, 1994, pages 311–318. ACM, 1994.
|
| 383 |
+
[122] Pascal Vincent, Hugo Larochelle, Yoshua Bengio, and Pierre-Antoine Manzagol. Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th International Conference on Machine Learning, pages 1096–1103, 2008.
|
| 384 |
+
[123] Julius von Kügelgen, Ivan Ustyuzhaninov, Peter Gehler, Matthias Bethge, and Bernhard Schölkopf. Towards causal generative scene models via competition of experts. In ICLR Workshop on “Causal Learning for Decision Making”, 2020.
|
| 385 |
+
[124] Tongzhou Wang and Phillip Isola. Understanding contrastive representation learning through alignment and uniformity on the hypersphere. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 9929–9939. PMLR, 2020.
|
| 386 |
+
[125] Xiaolong Wang and Abhinav Gupta. Unsupervised learning of visual representations using videos. In Proceedings of the IEEE International Conference on Computer Vision, pages 2794–2802, 2015.
|
| 387 |
+
[126] Zhirong Wu, Yuanjun Xiong, Stella X. Yu, and Dahua Lin. Unsupervised feature learning via nonparametric instance discrimination. In Conference on Computer Vision and Pattern Recognition, CVPR, pages 3733–3742. IEEE Computer Society, 2018.
|
| 388 |
+
[127] Mengyue Yang, Furui Liu, Zhitang Chen, Xinwei Shen, Jianye Hao, and Jun Wang. Causalvae: Structured causal disentanglement in variational autoencoder. arXiv preprint arXiv:2004.08697, 2020.
|
| 389 |
+
[128] Jure Zbontar, Li Jing, Ishan Misra, Yann LeCun, and Stéphane Deny. Barlow twins: Self-supervised learning via redundancy reduction. In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learning, volume 139, pages 12310–12320, 2021.
|
| 390 |
+
[129] Roland S. Zimmermann, Yash Sharma, Steffen Schneider, Matthias Bethge, and Wieland Brendel. Contrastive learning inverts the data generating process. In Proceedings of the 38th International Conference on Machine Learning, volume 139, pages 12979–12990, 2021.
|
| 391 |
+
|
| 392 |
+
# Checklist
|
| 393 |
+
|
| 394 |
+
1. For all authors...
|
| 395 |
+
|
| 396 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 397 |
+
(b) Did you describe the limitations of your work? [Yes] See the “Theory vs practice” paragraph, as well as lines 409–411 in $\ S$ .
|
| 398 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] While our work is theoretical in nature, we discuss some potential negative impacts in lines 405–409 where we caution against a naive use of data-augmentation in safety-critical domains without extensive prior study.
|
| 399 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 400 |
+
|
| 401 |
+
2. If you are including theoretical results...
|
| 402 |
+
|
| 403 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] Our problem formulation is formally described in detail in $\ S \ O 3$ . All our theoretical results are accompanied by a clear and complete account of all necessary assumptions.
|
| 404 |
+
(b) Did you include complete proofs of all theoretical results? [Yes] Due to space constraints, and since our proofs introduce novel techniques and are nontrivial, we only sketch the high-level ideas behind our proofs in the main paper. The full proofs with detailed explanations are included in Appendix A.
|
| 405 |
+
|
| 406 |
+
3. If you ran experiments...
|
| 407 |
+
|
| 408 |
+
(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] The Causal3DIdent dataset is included as a public URL, see the hyperlink in footnote 12. Code to reproduce our experiments is publicly available on github.
|
| 409 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] Provided in Appendix D
|
| 410 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] All results presented in $\ S 5$ report the mean and standard deviation over 3 random seeds as also stated in the main paper.
|
| 411 |
+
(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] Provided in Appendix D
|
| 412 |
+
|
| 413 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 414 |
+
|
| 415 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] The 3DIdent dataset, as well as the 3D models used to extend it are cited in $\ S$ .
|
| 416 |
+
(b) Did you mention the license of the assets? [Yes] Provided in Appendix B
|
| 417 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] See question 3 (a): the newly-introduced Causal3DIdent dataset has been publicly released.
|
| 418 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes] We did not use/curate any data from other people, see Appendix B for discussion of this point.
|
| 419 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [Yes] The data does not contain any personally identifiable information or offensive content, see Appendix B for discussion of this point.
|
| 420 |
+
|
| 421 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 422 |
+
|
| 423 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 424 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 425 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/4qR3coiNaIv/4qR3coiNaIv.md
ADDED
|
@@ -0,0 +1,313 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SCALABLE BAYESIAN INVERSE REINFORCEMENT LEARNING
|
| 2 |
+
|
| 3 |
+
Alex J. Chan University of Cambridge, Cambridge, UK alexjchan@maths.cam.ac.uk
|
| 4 |
+
|
| 5 |
+
Mihaela van der Schaar
|
| 6 |
+
University of Cambridge, Cambridge, UK University of California, Los Angeles, USA Cambridge Centre for AI in Medicine, UK The Alan Turing Institute, London, UK
|
| 7 |
+
mv472@cam.ac.uk
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Bayesian inference over the reward presents an ideal solution to the ill-posed nature of the inverse reinforcement learning problem. Unfortunately current methods generally do not scale well beyond the small tabular setting due to the need for an inner-loop MDP solver, and even non-Bayesian methods that do themselves scale often require extensive interaction with the environment to perform well, being inappropriate for high stakes or costly applications such as healthcare. In this paper we introduce our method, Approximate Variational Reward Imitation Learning (AVRIL), that addresses both of these issues by jointly learning an approximate posterior distribution over the reward that scales to arbitrarily complicated state spaces alongside an appropriate policy in a completely offline manner through a variational approach to said latent reward. Applying our method to real medical data alongside classic control simulations, we demonstrate Bayesian reward inference in environments beyond the scope of current methods, as well as task performance competitive with focused offline imitation learning algorithms.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
For applications in complicated and high-stakes environments it can often mean operating in the minimal possible setting - that is with no access to knowledge of the environment dynamics nor intrinsic reward, nor even the ability to interact and test policies. In this case learning and inference must be done solely on the basis of logged trajectories from a competent demonstrator showing only the states visited and the the action taken in each case.
|
| 16 |
+
|
| 17 |
+
Clinical decision making is an important example of this, where there is great interest in learning policies from medical professionals but is completely impractical and unethical to deploy policies on patients mid-training. Moreover this is an area where it is not only the policies, but also knowledge of the demonstrator’s preferences and goals, that we are interested in. While imitation learning (IL) generally deals with the problem of producing appropriate policies to match a demonstrator, with the added layer of understanding motivations this would then usually be approached through inverse reinforcement learning (IRL). Here attempting to learn the assumed underlying reward driving the demonstrator, before secondarily learning a policy that is optimal with respect to the reward using some forward reinforcement learning (RL) technique. By composing the RL and IRL procedures in order to perform IL we arrive at apprenticeship learning (AL), which introduces its own challenges, particularly in the offline setting. Notably for any given set of demonstrations there are (infinitely) many rewards for which the actions would be optimal $\mathrm { N g }$ et al., 2000). Max-margin (Abbeel & $\mathrm { N g }$ , 2004) and max-entropy (Ziebart et al., 2008) methods for heuristically differentiating plausible rewards do so at the cost of potentially dismissing the true reward for not possessing desirable qualities. On the other hand a Bayesian approach to IRL (BIRL) is more conceptually satisfying, taking a probabilistic view of the reward, we are interested in the posterior distribution having seen the demonstrations (Ramachandran & Amir, 2007), accounting for all possibilities. BIRL is not without its own drawbacks though, as noted in Brown & Niekum (2019), making it inappropriate for modern complicated environments: assuming linear rewards; small, solvable environments; and repeated, inner-loop, calls to forward RL.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Overview. AVRIL is a framework for BIRL that works through an approximation in the variational Bayesian framework, considering the reward to be a latent representation of behaviour. A distribution over the reward, which is amortised over the demonstration space, is learnt that then informs an imitator $Q$ -function policy. The dotted line represents a departure from a traditional auto-encoder as the input, alongside the latent reward, informs the decoder.
|
| 21 |
+
|
| 22 |
+
The main contribution then of this paper is a method for advancing BIRL beyond these obstacles, allowing for approximate reward inference using an arbitrarily flexible class of functions, in any environment, without costly inner-loop operations, and importantly entirely offline. This leads to our algorithm AVRIL, depicted in figure 1, which represents a framework for jointly learning a variational posterior distribution over the reward alongside an imitator policy in an auto-encoderesque manner. In what follows we review the modern methods for offline IRL/IL (Section 2) with a focus on the approach of Bayesian IRL and the issues it faces when confronted with challenging environments. We then address the above issues by introducing our contributions (Section 3), and demonstrate the gains of our algorithm in real medical data and simulated control environments, notably that it is now possible to achieve Bayesian reward inference in such settings (Section 4). Finally we wrap up with some concluding thoughts and directions (Section 5). Code for AVRIL and our experiments is made available at https://github.com/XanderJC/scalable-birl and https://github.com/vanderschaarlab/mlforhealthlabpub.
|
| 23 |
+
|
| 24 |
+
# 2 APPROACHING APPRENTICESHIP AND IMITATION OFFLINE
|
| 25 |
+
|
| 26 |
+
Preliminaries. We consider the standard Markov decision process (MDP) environment, with states $s \in \mathcal { S }$ , actions $a \in \mathcal A$ , transitions $T \in \Delta ( { \cal S } ) ^ { s \times { \cal A } }$ , rewards $\vec { R } \in \mathbb { R } ^ { S \times A 1 }$ , and discount $\gamma \in [ 0 , 1 ]$ . For a policy $\pi \in \Delta ( \mathcal { A } ) ^ { s }$ let $\begin{array} { r } { \rho _ { \pi } ( s , a ) = \mathbb { E } _ { \pi , T } [ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } \mathbb { 1 } _ { \{ s _ { t } = s , a _ { t } = a \} } ] } \end{array}$ be the induced unique occupancy measure alongside the state-only occupancy measure $\begin{array} { r } { \rho _ { \pi } ( s ) = \sum _ { a \in \mathcal { A } } \rho _ { \pi } ( s , a ) } \end{array}$ . Despite this full environment model, the only information available to us is the $\mathbf { M D P } \backslash R T$ , in that we have no access to either the underlying reward or the transitions, with our lacking knowledge of the transitions being also strong in the sense that further we are unable to simulate the environment to sample them. The learning signal is then given by access to $m$ -many trajectories of some demonstrator assumed to be acting optimally w.r.t. the MDP, following a policy $\pi _ { D }$ , making up a data set $\mathcal { D } _ { r a w } = \{ ( s _ { 1 } ^ { ( i ) } , a _ { 1 } ^ { ( i ) } , \dotsc , s _ { \tau ^ { ( i ) } } ^ { ( \bar { i } ) } , a _ { \tau ^ { ( i ) } } ^ { ( i ) } ) \} _ { i = 1 } ^ { m }$ where $s _ { t } ^ { ( i ) }$ is the state and $a _ { t } ^ { ( i ) }$ is the action taken at step $t$ during the $i$ th demonstration, and $\tau ^ { ( i ) }$ is the (max) time horizon of the ith demonstration. Given the Markov assumption though it is sufficient and convenient to consider the demonstrations simply as a collection of $n$ -many state, action, next state, next action tuples such that $\mathcal { D } = \{ ( s _ { i } , a _ { i } , s _ { i } ^ { \prime } , a _ { i } ^ { \prime } ) \} _ { i = 1 } ^ { n }$ with $\begin{array} { r } { n = \sum _ { i = 1 } ^ { m } ( \tau ^ { ( i ) } - 1 ) } \end{array}$ .
|
| 27 |
+
|
| 28 |
+
Apprenticeship through rewards. Typically AL proceeds by first inferring an appropriate reward function with an IRL procedure $\mathrm { N g }$ et al., 2000; Ramachandran & Amir, 2007; Rothkopf & Dimitrakakis, 2011; Ziebart et al., 2008) before running forward RL to obtain an appropriate policy. This allows for easy mix-and-match procedures, swapping in different standard RL and IRL methods depending on the situation. These algorithms though depend on either knowledge of $T$ in order to solve exactly or the ability to perform roll-outs in the environment, with little previous work focusing on the entirely offline setting. One simple solution is through attempting to learn the dynamics (Herman et al., 2016), though without a large supply of diverse demonstrations or a small environment this becomes impractical given imperfections in the model. Alternatively Klein et al. (2011) and Lee et al. (2019) attempt off-policy feature matching through least-squared temporal difference and deep neural networks to uncover appropriate feature representations.
|
| 29 |
+
|
| 30 |
+
Implicit-reward policy learning. Recent work has often forgone an explicit representation of the reward. Moving within the maximum-entropy RL framework (Ziebart, 2010; Levine, 2018), Ho & Ermon (2016) noted that the full procedure ${ \mathrm { ~ R L ~ o ~ I R L } }$ ) can be interpreted equivalently as the minimisation of some divergence between occupancy measures of the imitator and demonstrator:
|
| 31 |
+
|
| 32 |
+
$$
|
| 33 |
+
\underset { \pi } { \arg \operatorname* { m i n } } \{ \psi ^ { * } ( \rho _ { \pi } - \rho _ { \pi _ { D } } ) - H ( \pi ) \} ,
|
| 34 |
+
$$
|
| 35 |
+
|
| 36 |
+
with $H ( \pi )$ being the discounted causal entropy (Bloem & Bambos, 2014) of the policy and $\psi ^ { * }$ the Fenchel conjugate of a chosen regulariser on the form of the reward. These are typically optimised in an adversarial fashion (Goodfellow et al., 2014) and given the focus on evaluating $\rho _ { \pi }$ this often requires extensive interaction with the environment, otherwise banking on approximations over a replay buffer (Kostrikov et al., 2018) or a reformulation of the divergence to allow for off-policy evaluation (Kostrikov et al., 2019). Bear in mind that optimal policies within the maximum-entropy framework are parameterised by a Boltzmann distribution:
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
\pi ( a | s ) = \frac { \exp ( Q ( s , a ) ) } { \sum _ { b \in \cal { A } } \exp ( Q ( s , b ) ) } ,
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
with $Q ( s , a )$ the soft $Q$ -function, defined recursively via the soft Bellman-equation:
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
Q ( s , a ) \triangleq R ( s , a ) + \gamma \mathbb { E } _ { s ^ { \prime } \sim \rho _ { \pi } } \Big [ \operatorname { s o f t } _ { a ^ { \prime } } \operatorname { m a x } Q ( s ^ { \prime } , a ^ { \prime } ) ) \Big ] .
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
Then for a learnt parameterised policy given in terms of $Q$ -values from a function approximator $Q _ { \theta }$ we can obtain an implied reward given by:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
R _ { Q _ { \theta } } ( s , a ) = Q _ { \theta } ( s , a ) - \gamma \mathbb { E } _ { s ^ { \prime } \sim \rho _ { \pi } } \Bigg [ \log \Bigg ( \sum _ { a ^ { \prime } \in \mathcal { A } } \exp ( Q _ { \theta } ( s ^ { \prime } , a ^ { \prime } ) ) \Bigg ) \Bigg ] .
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
A number of algorithms make use of this fact with Piot et al. (2014) and Reddy et al. (2019) working by essentially placing a sparsity prior on this implied reward, encouraging it towards zero, and thus incorporating subsequent state information. Alternatively Jarrett et al. (2020) show that even the simple behavioural cloning (Bain & Sammut, 1995) is implicitly maximising some reward with an approximation that the expectation over states is taken with respect to the demonstrator, not the learnt policy. They then attempt to rectify part of this approximation using the properties of the energy-based model implied by the policy (Grathwohl et al., 2019).
|
| 55 |
+
|
| 56 |
+
The problem with learning an implicit reward in an offline setting is that it remains just that, implicit, only able to be evaluated at points seen in the demonstrations, and even then only approximately. Thus even if their consideration improves imitator policies performance they offer no real improvement for interpretation.
|
| 57 |
+
|
| 58 |
+
# 2.1 BAYESIAN INVERSE REINFORCEMENT LEARNING
|
| 59 |
+
|
| 60 |
+
We are then resigned to directly reason about the underlying reward, bringing us back to the question of IRL, and in particular BIRL for a principled approach to reasoning under uncertainty. Given a prior over possible functions, having seen some demonstrations, we calculate the posterior over the function using a theoretically simple application of Bayes rule. Ramachandran $\&$ Amir (2007) defines the likelihood of an action at a state as a Boltzmann distribution with inverse temperature and respective state-action values, yielding a probabilistic demonstrator policy given by:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\pi _ { D } ( a | s , R ) = \frac { \exp ( \beta Q _ { R } ^ { \pi _ { D } } ( s , a ) ) } { \sum _ { b \in \cal { A } } \exp ( \beta Q _ { R } ^ { \pi _ { D } } ( s , b ) ) } ,
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
where $\beta \in [ 0 , \infty )$ represents the the confidence in the optimality of the demonstrator. Note that despite similarities, moving forward we are no longer within the maximum-entropy framework and $Q _ { R } ^ { \pi } ( s , a )$ now denotes the traditional, not soft (as in equation 3), state-action value ( $Q$ -value) funcRtion given a reward $R$ and policy $\pi$ such that $\begin{array} { r } { Q _ { R } ^ { \pi } ( s , \bar { a } ) = \mathbb { E } _ { \pi , T } [ \sum _ { t = 0 } ^ { \infty } \gamma ^ { t } R ( s _ { t } ) | s _ { 0 } = s , a _ { 0 } = a ] } \end{array}$ Unsurprisingly this yields an intractable posterior distribution leading to a Markov chain Monte Carlo (MCMC) algorithm based on a random grid-walk to sample from the posterior.
|
| 67 |
+
|
| 68 |
+
Issues in complex and unknown environments. This original formulation, alongside extensions that consider maximum-a-posteriori inference (Choi & Kim, 2011) and multiple rewards (Choi & Kim, 2012; Dimitrakakis & Rothkopf, 2011), suffer from three major drawbacks that make them impractical for modern, complicated, and model-free task environments.
|
| 69 |
+
|
| 70 |
+
1. The reward is a linear combination of state features. Naturally this is a very restrictive class of functions and assumes access to carefully hand-crafted features of the state space. 2. The cardinality of the state-space is finite, $| S | < \infty$ . Admittedly this can be relaxed in practical terms, although it does mean the rapid-mixing bounds derived by Ramachandran & Amir (2007) do not hold at all in the infinite case. For finite approximations they scale at $\mathcal { O } ( | S | ^ { 2 } )$ , rapidly becoming vacuous and causing BIRL to inherit the usual MCMC difficulties on assessing convergence and sequential computation (Gamerman & Lopes, 2006). 3. The requirement of an inner-loop MDP solve. Most importantly at every step a new reward is sampled and the likelihood of the data must then be evaluated. This requires calculating the $Q$ -values of the policy with respect to the reward, in other words running forward RL. While not an insurmountable problem in the simple cases where everything is known and can be quickly solved with a procedure guaranteed to converge correctly, this becomes an issue in the realm where only deep function approximation works adequately (i.e. the nontabular setting). DQN training for example easily stretches into hours (Mnih et al., 2013) and will have to be repeated thousands of times, making it completely untenable.
|
| 71 |
+
|
| 72 |
+
We have seen that even in the most simple setting the problem of exact Bayesian inference over the reward is intractable, and the above limitations of the current MCMC methods are not trivial to overcome. Consequently very little work has been done in the area and there still remain very open challenges. Levine et al. (2011) addressed linearity through a Gaussian process approach, allowing for a significantly more flexible and non-linear representation though introducing issues of its own, namely the computational complexity of inverting large matrices (Rasmussen, 2003). More recently Brown & Niekum (2019) have presented the only current solution to the inner-loop problem by introducing an alternative formulation of the likelihood, one based on human recorded pairwise preferences over demonstrations that significantly reduces the complexity of likelihood. However labelled preferences certainly can’t be assumed always available and while very effective for the given task is not appropriate in the general case. One of the key aspects of our contribution is that we are able to deal with all three of these issues while also not requiring any additional information.
|
| 73 |
+
|
| 74 |
+
The usefulness of uncertainty. On top of the philosophical consistency of Bayesian inference there are a number of reasons for wanting a measure of uncertainty over any uncovered reward that are not available from regular IRL algorithms. First that the (epistemic) uncertainty revealed by Bayesian inference tells us a lot about what areas of the state-space we really cannot say anything about because we haven’t seen any demonstrations there - potentially informing future data collection if that is possible (Mindermann et al., 2018). Additionally in the cases we are mostly concerned about (e.g. medicine) we have to be very careful about letting algorithms pick actions in practice and we are interested in performing safe or risk-averse imitation, for which a degree of confidence over learnt rewards is necessary. Brown et al. (2020) for example use a distribution over reward to optimise a conditional value-at-risk instead of expected return so as to bound potential downsides.
|
| 75 |
+
|
| 76 |
+
# 3 APPROXIMATE VARIATIONAL REWARD IMITATION LEARNING
|
| 77 |
+
|
| 78 |
+
A variational Bayesian approach. In this section we detail our method, AVRIL, for efficiently learning an imitator policy and performing reward inference simultaneously. Unlike the previously mentioned sampling or MAP-based methods, we employ variational inference (Blei et al., 2017) to reason about the posterior. Here we posit a surrogate distribution $q _ { \phi } ( R )$ , parameterised by $\phi$ , and aim to minimise the Kullback-Leibler (KL) divergence to the posterior, resulting in an objective:
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\operatorname* { m i n } _ { \phi } \{ D _ { \mathrm { K L } } ( q _ { \phi } ( R ) | | p ( R | \mathcal { D } ) ) \} .
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
This divergence is still as troubling as the posterior to evaluate, leading to an auxiliary objective function in the Evidence Lower BOund (ELBO):
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\mathcal { F } ( \phi ) = \mathbb { E } _ { q _ { \phi } } \big [ \log p ( \mathcal { D } | R ) \big ] - D _ { K L } \big ( q _ { \phi } ( R ) | | p ( R ) \big ) ,
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
where it can be seen that maximisation over $\phi$ is equivalent to (6). We are agnostic towards the form of both the prior and variational distribution, for simplicity here we assume a Gaussian process prior with mean zero and unit variance over $R$ alongside the variational posterior distribution given by:
|
| 91 |
+
|
| 92 |
+
$$
|
| 93 |
+
q _ { \phi } ( R ) = \mathcal { N } ( R ; \mu , \sigma ^ { 2 } ) ,
|
| 94 |
+
$$
|
| 95 |
+
|
| 96 |
+
where $\mu , \sigma ^ { 2 }$ are the outputs of an encoder neural network taking $s$ as input and parameterised by $\phi$ . Note that for the algorithm that we will describe these choices are not a necessity and can be easily substituted for more expressive distributions if appropriate. Maintaining the assumption of Boltzmann rationality on the part of the demonstrator, our objective takes the form:
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\mathcal { F } ( \phi ) = \mathbb { E } _ { q _ { \phi } } \left[ \sum _ { ( s , a ) \in \mathcal { D } } \log \frac { \exp ( \beta Q _ { R } ^ { \pi _ { D } } ( s , a ) ) } { \sum _ { b \in \mathcal { A } } \exp ( \beta Q _ { R } ^ { \pi _ { D } } ( s , b ) ) } \right] - D _ { K L } \big ( q _ { \phi } ( R ) | | p ( R ) \big ) .
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
The most interesting (and problematic) part of this objective as ever centres on the evaluation of $Q _ { R } ^ { \pi _ { D } } ( s , a )$ . Notice that what is really required here is an expression of the $Q$ -values as a smooth function of the reward such that with samples of $R$ we could take gradients w.r.t. $\phi$ . Of course there is little hope of obtaining this simply, by itself it is a harder problem than that of forward RL which only attempts to evaluate the $Q$ -values for a specific $R$ and already in complicated environments has to rely on function approximation and limited guarantees.
|
| 103 |
+
|
| 104 |
+
A naive approach would be to sample $\hat { R }$ and then approximate the $Q$ -values with a second neural network, solving offline over the batched data using a least-squared $\mathrm { T D } / Q$ -learning algorithm, as is the approach forced on sampling based BIRL methods. It is in fact though doubly inappropriate for this setting, not only does this require a solve as an inner-loop but importantly differentiating through the solving operation is extremely impractical, it requires backpropagating through a number of gradient updates that are essentially unbounded as the complexity of the environment increases.
|
| 105 |
+
|
| 106 |
+
A further approximation. This raises an important question - is it possible to jointly optimise a policy and variational distribution only once instead of requiring a repeated solve? This is theoretically suspect, the $Q$ -values are defined on a singular reward, constrained as $R ( s , a ) \ =$ $\mathbb { E } _ { s ^ { \prime } , a ^ { \prime } \sim \pi , T } [ \bar { Q } _ { R } ^ { \pi } ( { \bar { s , } } a ) - \gamma Q _ { R } ^ { \pi } ( s ^ { \prime } , a ^ { \prime } ) ]$ so we cannot learn a particular standard $Q$ -function that reflects the entire distribution. But can we learn a policy that reflects the expected reward using a second policy neural network $Q _ { \theta } ?$ We can’t simply optimise $\theta$ alongside $\phi$ to maximise the ELBO though as that completely ignores the fact that the learnt policy is intimately related to the distribution over the reward. Our solution to ensure then that they behave as intended is by constraining $q _ { \phi }$ and $Q _ { \theta }$ to be consistent with each other, specifically that the implied reward of the policy is sufficiently likely under the variational posterior (equivalently that the negative log-likelihood is sufficiently low). Thus we arrive at a constrained optimisation objective given by:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\operatorname* { m a x } _ { \phi , \theta } \sum _ { ( s , a ) \in \mathcal { D } } \log \frac { \exp ( \beta Q _ { \theta } ( s , a ) ) } { \sum _ { b \in \mathcal { A } } \exp ( \beta Q _ { \theta } ( s , b ) ) } - D _ { K L } \big ( q _ { \phi } ( R ) | | p ( R ) \big ) ,
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
with $\epsilon$ reflecting the strength of the constraint. Rewriting (10) as a Lagrangian under the KKT conditions (Karush, 1939; Kuhn $\&$ Tucker, 1951), and given complimentary slackness, we obtain a practical objective function:
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\begin{array} { r l } { \mathcal { F } ( \phi , \theta , \mathcal { D } ) = \displaystyle \sum _ { ( s , a , s ^ { \prime } , a ^ { \prime } ) \in \mathcal { D } } \log \frac { \exp \beta Q _ { \theta } ( s , a ) ) } { \sum _ { b \in A } \exp ( \beta Q _ { \theta } ( s , b ) ) } - D _ { K L } \big ( q _ { \phi } ( R ( s , a ) ) | | p ( R ( s , a ) ) \big ) } & { } \\ { + \lambda \log q _ { \phi } ( Q _ { \theta } ( s , a ) - \gamma Q _ { \theta } ( s ^ { \prime } , a ^ { \prime } ) ) . } & { } \end{array}
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
Here the KL divergence between processes is approximated over a countable set, and $\lambda$ is introduced to control the strength of constraint.
|
| 119 |
+
|
| 120 |
+
On the implementation. Optimisation is simple as both networks are maximising the same objective and gradients can be easily obtained through backpropagation while being amenable to minibatching, allowing you to call your favourite gradient-based stochastic optimisation scheme. We re-iterate though that AVRIL really represents a framework for doing BIRL and not a specific model
|
| 121 |
+
|
| 122 |
+
# Algorithm 1: Approximate Variational Reward Imitation Learning (AVRIL)
|
| 123 |
+
|
| 124 |
+
Result: Parameters $\phi$ of variational distribution and $\theta$ of policy Q-function
|
| 125 |
+
Input: $\mathcal { D } , S , A , \gamma , \lambda$ , learning rate $\eta$ , mini-batch size $b$ ;
|
| 126 |
+
Initialise $\phi , \theta$ ; $\triangleright$ Can concatenate into single vector $( \phi , \theta )$
|
| 127 |
+
while not converged do Sample $\mathcal { D } _ { m i n i }$ from $\mathcal { D }$ ; $\begin{array} { r } { \mathcal { F } ( \phi , \theta , \mathcal { D } ) = \mathbb { E } [ \frac { n } { b } \mathcal { F } ( \phi , \theta , \mathcal { D } _ { m i n i } ) ] } \end{array}$ ; . MC estimate total loss $( \phi ^ { \prime } , \theta ^ { \prime } ) ( \phi , \theta ) + \eta \nabla _ { \phi , \theta } \mathcal { F } ( \phi , \theta , \mathcal { D } )$ ; . Gradient step for $\phi , \theta$ $\phi , \theta \phi ^ { \prime } , \theta ^ { \prime }$
|
| 128 |
+
end
|
| 129 |
+
Return: $\phi , \theta$
|
| 130 |
+
|
| 131 |
+
since $Q _ { \theta }$ and $q _ { \phi }$ represent arbitrary function approximators. So far we have presented both as neural networks, but this does not have to be the case. Of course the advantage of them is their flexibility and ease of training but they are still inherently black box. It is then perfectly possible to swap in any particular function approximator if the task requires it, using simple linear models for example may slightly hurt performance but allow for more insight. Despite the specific focus on infinite state-spaces, AVRIL can still even be applied in the tabular setting by simply representing the policy and variational distribution with multi-dimensional tensors. Having settled on their forms, equation (11) is calculated simply and the joint gradient with respect to $\theta$ and $\phi$ is straight-forwardly returned using any standard auto-diff package. The whole process is summarised in Algorithm 1.
|
| 132 |
+
|
| 133 |
+
We can now see how AVRIL does not suffer the issues outlined in section 2.1. Our form of $q _ { \phi } ( R )$ is flexible and easily accommodates a non-linear form of the reward given a neural architecture - this also removes any restriction on $s$ , or at least allows for any state space that is commonly tackled within the IL/RL literature. Additionally we have a single objective for which all parameters are maximised simultaneously - there are no inner-loops, costly or otherwise, meaning training is faster than the MCMC methods by a factor equal roughly to the number of samples they would require.
|
| 134 |
+
|
| 135 |
+
The generative model view. Ultimately a policy represents a generative model for the behavioural data we see. Ho & Ermon (2016) explicitly make use of this fact by casting the problem in the GAN framework (Goodfellow et al., 2014). Our method is more analogous to a VAE (Kingma & Welling, 2013), though not exactly, where given the graphical model in figure 2 the reward can be seen as a latent representation of the policy. Our approach takes the seen data and amortises the inference, encoding over the state space. The policy does not act as a decoder in precisely taking any given encoded reward and outputting a policy, but it does take the whole reward posterior and translate it into actions and therefore behaviour. This approach has its advantages, in both meaningful interpretation of the latent reward (which is non-existent in adversarial methods), and that we forgo the practical difficulties of alternating min-max optimisation (Kodali et al., 2017) while maintaining a generative view of the policy.
|
| 136 |
+
|
| 137 |
+

|
| 138 |
+
Figure 2: Graphical model for Bayesian IRL
|
| 139 |
+
|
| 140 |
+
Temporal consistency through reward regularisation. Considering only the first term of (11) yields the standard behavioural cloning setup (where the logits output can be interpreted as the $Q$ - values) as it removes the reward from the equation and just focuses on matching actions to states. AVRIL can then be seen as a policy-learning method regularised by the need for the implied reward to be consistent. Note that this does not induce any necessary bias since the logits normally contain an extra degree of freedom allowing them to arbitrarily shift by some scale factor. This factor is now explicitly constrained by giving the logits additional meaning in that they represent $Q$ -values. This places great importance on the KL term, since every parameterisation of a policy will have an associated implied reward, the KL regularises these to be not so far from the prior and preventing the reward from overfitting to the policy and becoming pointless. It also is able to double as a regularising term in a similar manor to previous reward-regularisation methods (Piot et al., 2014; Reddy et al., 2019) depending on the chosen prior, encouraging the reward to be close to zero:
|
| 141 |
+
|
| 142 |
+
Proposition 1 (Reward Regularisation) Assume that the constraint in (10) is satisfied in that $\begin{array} { r } { { \mathbb E } _ { q _ { \phi } } [ R ( s , a ) ] = { \mathbb E } _ { \pi , T } [ Q _ { \theta } ( s , a ) - \gamma Q _ { \theta } ( s ^ { \prime } , a ^ { \prime } ) ] } \end{array}$ , then given a standard normal prior $p ( R ) = \mathcal { N } ( R ; 0 , 1 )$ the $\mathrm { K L }$ divergence yields a sparsity regulator on the implied reward:
|
| 143 |
+
|
| 144 |
+
$$
|
| 145 |
+
\mathcal { L } _ { r e g } = \sum _ { ( s , a , s ^ { \prime } , a ^ { \prime } ) \in \mathcal { D } } \frac { 1 } { 2 } \big ( Q _ { \theta } ( s , a ) - \gamma Q _ { \theta } ( s ^ { \prime } , a ^ { \prime } ) \big ) ^ { 2 } + g ( \mathrm { V a r } _ { q _ { \phi } } [ R ( s , a ) ] ) .
|
| 146 |
+
$$
|
| 147 |
+
|
| 148 |
+
Proof. Appendix. This follows immediately from the fact that the divergence evaluates as DK $\begin{array} { r } { \overset { \vartriangle } { \boldsymbol { \mathrm { \iota } } } \big ( q _ { \phi } ( \hat { R } ( s , a ) ) | | p ( R ( s , a ) ) \big ) = \frac { 1 } { 2 } ( - \log ( \operatorname { V a r } _ { q _ { \phi } } [ R ( s , a ) ] ) - 1 + \operatorname { V a r } _ { q _ { \phi } } [ R ( s , a ) ] + \mathbb { E } _ { q _ { \phi } } [ R ( s , a ) ] ^ { 2 } ) } \end{array}$
|
| 149 |
+
|
| 150 |
+
This then allows AVRIL to inherit the benefit of these methods while also explicitly learning a reward that can be queried at any point. We are also allowed the choice of whether it is state-only or state-action. This has so far been arbitrary, but it is important to consider that a state-only reward is a necessary and sufficient condition for a reward that is fully disentangled from the dynamics $\operatorname { F u }$ et al., 2018). Thus by learning such a reward and given the final term of (11) that directly connects one-step rewards in terms of the policy, this forces the policy (not the reward) to account for the dynamics of the system ensuring temporal consistency in a way that BC for example simply can’t. Alternatively using a state-action reward means that inevitably some of the temporal information leaks out of the policy and into the reward - ultimately to the detriment of the policy but potentially allowing for a more interpretable (or useful) form of reward depending on the task at hand.
|
| 151 |
+
|
| 152 |
+
# 4 EXPERIMENTS
|
| 153 |
+
|
| 154 |
+
Experimental setup. We are primarily concerned with the case of medical environments, which is exactly where the issue of learning without interaction is most crucial, you just cannot let a policy sample treatments for a patient to try to learn more about the dynamics. It is also where a level of interpretability in what has been learnt is important, since the consequence of actions are potentially very impactful on human lives. As such we focus our evaluation on learning on a real-life healthcare problem, with demonstrations taken from the Medical Information Mart for Intensive Care (MIMIC-III) dataset (Johnson et al., 2016). The data contains trajectories of patients in intensive care recording their condition and theraputic interventions at one day intervals. We evaluate the ability of the methods to learn a medical policy in both the two and four action setting - specifically whether the patient should be placed on a ventilator, and the decision for ventilation in combination with antibiotic treatment. These represent the two most common, and important, clinical interventions recorded in the data. Without a recorded notion of reward, performance is measured with respect to action matching against a held out test set of demonstrations with cross-validation.
|
| 155 |
+
|
| 156 |
+
Alongside the healthcare data and for the purposes of demonstrating generalisability, we provide additional results on standard environments of varying complexity in the RL literature, the standard control problems of: CartPole, a classic control environment aiming to swing up and balance a pendulum; Acrobot, which aims to maintain a sequence of joints above a given height; and LunarLander, guiding a landing module to a safe touchdown on the moon surface. In these settings given sufficient demonstration data all benchmarks are very much capable of reaching demonstrator level performance, so we test the algorithms on their ability to handle sample complexity in the low data regime by testing their performance when given access to a select number of trajectories which we adjust, replicating the setup in Jarrett et al. (2020). With access to a simulation through the OpenAI gym (Brockman et al., 2016), we measure performance by deploying the learnt policies live and calculating their average return over 300 episodes.
|
| 157 |
+
|
| 158 |
+
Benchmarks. We test our method (AVRIL) against a number of benchmarks from the offline IRL/IL setting: Deep Successor Feature Network (DSFN) (Lee et al., 2019), an offline adaptation of max-margin IRL that generalises past the linear methods using a deep network with leastsquares temporal-difference learning, the only other method that produces both a reward and policy; Reward-regularized Classification for Apprenticeship Learning (RCAL) (Piot et al., 2014), where an explicit regulariser on the sparsity of the implied reward is introduced in order to account for the dynamics information; ValueDICE (VDICE) (Kostrikov et al., 2019), an adversarial imitation learning, adapted for the offline setting by removing the replay regularisation; Energy-based Distribution Matching (EDM) (Jarrett et al., 2020), the state-of-the-art in offline imitation learning; and finally the standard example of Behavioural Cloning (BC). To provide evidence that we are indeed learning an appropriate reward we show an ablation of our method on the MIMIC data: we take the reward learnt by AVRIL and use it as the ‘true’ reward used to train a $Q$ -network offline to learn a policy (A-RL). Note that we have not included previous BIRL methods for the reasons explained in section 2.1, training a network just once in these environments takes in the order of minutes and repeating this sequentially thousands of times is just not practical. For aid in comparison all methods share the same network architecture of two hidden layers of 64 units with ELU activation functions and are trained using Adam (Kingma & Ba, 2014) with learning rates individually tuned. Further details on experimental setup and the implementation of benchmarks can be found in the appendix.
|
| 159 |
+
|
| 160 |
+

|
| 161 |
+
Figure 3: Control environments performance. We plot the average returns received by the policies when deployed live in the environment against the number of trajectories seen during training.
|
| 162 |
+
|
| 163 |
+
Table 1: Healthcare performance. Comparison of methods on the MIMIC-III dataset. Performance of the policy is evaluated on the quality of action matching against a held out test set of demonstrations. We report the accuracy (ACC), area under the receiving operator characteristic curve (AUC) and average precision score (APS).
|
| 164 |
+
|
| 165 |
+
<table><tr><td></td><td colspan="3">Ventilator</td><td colspan="3">Ventilator + Antibiotics</td></tr><tr><td>Metric</td><td>ACC</td><td>AUC</td><td>APS</td><td>ACC</td><td>AUC</td><td>APS</td></tr><tr><td>BC</td><td>0.873 ± 0.007</td><td>0.916 ± 0.002</td><td>0.904±0.003</td><td>0.700±0.009</td><td>0.864 ± 0.003</td><td>0.665 ± 0.009</td></tr><tr><td>VDICE</td><td>0.879 ±0.002</td><td>0.915 ± 0.002</td><td>0.904±0.003</td><td>0.710 ±0.005</td><td>0.863 ±0.002</td><td>0.675 ±0.004</td></tr><tr><td>RCAL</td><td>0.870 ± 0.012</td><td>0.916 ± 0.003</td><td>0.904±0.005</td><td>0.702 ±0.008</td><td>0.865 ± 0.004</td><td>0.669 ± 0.006</td></tr><tr><td>DSFN</td><td>0.869 ± 0.005</td><td>0.905 ± 0.003</td><td>0.885 ±0.001</td><td>0.683 ± 0.007</td><td>0.856 ±0.002</td><td>0.670 ± 0.004</td></tr><tr><td>EDM</td><td>0.882 ± 0.011</td><td>0.920±0.002</td><td>0.909 ± 0.003</td><td>0.716 ±0.008</td><td>0.873±0.002</td><td>0.682 ± 0.004</td></tr><tr><td>A-RL</td><td>10.875±0.010</td><td>0.904±0.002</td><td>0.927±0.002</td><td>0.718 ± 0.010</td><td>0.864±0.002</td><td>0.665±0.005</td></tr><tr><td>AVRIL</td><td>0.891±0.002 0.917 ± 0.001</td><td></td><td>0.940±0.001</td><td></td><td>0.754± 0.001 0.884 ± 0.000 0.708 ± 0.002</td><td></td></tr></table>
|
| 166 |
+
|
| 167 |
+
Evaluation. We see for all tasks AVRIL learns an appropriate policy that performs strongly across the board, being competitive in all cases and in places beating out all of the other benchmarks. The results for our healthcare example are given in table 1, with AVRIL performing very strongly, having the highest accuracy and precision score in both tasks. The results for the control environments are shown in figure 3. AVRIL performs competitively and is easily capable of reaching demonstrator level performance in the samples given for these tasks, though not always as quickly as some of the dedicated offline IL methods.
|
| 168 |
+
|
| 169 |
+
Reward insight. Remember though that task performance is not exactly our goal. Rather the key aspect of AVRIL is the inference over the unseen reward in order to gain information about the preferences of the agent that other black-box policy methods can’t. In the previous experiments our reward encoder was a neural network for maximum flexibility and we can see from the performance of A-RL we learn a representation of the reward that can be used to relearn in the environment very effectively, albeit not quite to the same standard of AVRIL. Note this also reflects an original motivation for AVRIL in that offpolicy RL on top of a learnt reward suffers. In figure 4 we explore how to gain more insight from the learnt reward using different parameterisations of the reward. The top graph shows how a learnt state-action reward changes as a function of blood-oxygen level for an otherwise healthy patient, and it can be seen that as it drops below average the reward for ventilating the patient becomes much higher (note this is average for patients in the ICU, not across the general population). While this is intuitive we still have to query a neural network repeatedly over the state space to gain insight, the bottom graph of figure 4 presents then a simpler but perhaps more useful representation. In this case we learn a state-only reward as before but as a linear model. This is not as strong a constraint on the policy since that is still free to be non-linear as a neural network but simultaneously allows us the insight of what our model considers high value in the environment as we plot the relative model coefficients for each covariate. We can see here for example that the biggest impact on the overall estimated quality of a state is given by blood pressure, well known as an important indicator of health (Hepworth et al., 1994), strongly impacted by trauma and infection.
|
| 170 |
+
|
| 171 |
+

|
| 172 |
+
Figure 5: Gridworld example. Scaled heat-maps of: the ground truth reward; the relative state occupancy of the expert demonstrations; the reward posterior mean; and reward standard deviation.
|
| 173 |
+
|
| 174 |
+
Gridworld ground-truth comparison While environments like MIMIC are the main focus of this work they do not lend them selves to inspection of the uncovered reward as the ground truth simply is not available to us. We thus demonstrate on a toy gridworld environment, in order to clearly see the effect of learning a posterior distribution over the reward. In this (finite) example both the encoder and decoder are represented by tensors but otherwise the procedure remains the same. Figure 5 plots scaled heat-maps of: a) the ground truth reward; b) the relative state occupancy of the expert demonstrations, obtained using value-iteration; c) the reward posterior mean; and d) the reward standard deviation. The interesting thing to note is that the standard deviation of the learnt reward essentially resembles the complement of the state occupancy - revealing the epistemic uncertainty around that part of the state-space given we haven’t seen any demonstrations there.
|
| 175 |
+
|
| 176 |
+
# 5 CONCLUSIONS
|
| 177 |
+
|
| 178 |
+
We have presented a novel algorithm, Approximate Variational Reward Imitation Learning, for addressing the scalability issues that prevent current Bayesian IRL methods being used in large and unknown environments. We show that this performs strongly on real and toy data for learning imitation policies completely offline and importantly recovers a reward that is both effective for retraining policies but also offers useful insight into the preferences of the demonstrator. Of course this still represents an approximation, and there is room for further, more exact methods or else guarantees on the maximum divergence. We have focused on simply obtaining the appropriate uncertainty over reward as well as imitation in high stakes environments - in these settings it is crucial that learnt policies avoid catastrophic failure and so how exactly to use the uncertainty in order to achieve truly safe imitation (or indeed better-that-demonstrator apprenticeship) is increasingly of interest.
|
| 179 |
+
|
| 180 |
+

|
| 181 |
+
Figure 4: (Top) A state-action reward is learnt and plotted for an otherwise average patient as their blood oxygen level changes. (Bottom) The associated weights given a state-only reward as a linear function of the state-space.
|
| 182 |
+
|
| 183 |
+
# ACKNOWLEDGEMENTS
|
| 184 |
+
|
| 185 |
+
AJC would like to acknowledge and thank Microsoft Research for its support through its PhD Scholarship Program with the EPSRC. This work was additionally supported by the Office of Naval Research (ONR) and the NSF (Grant number: 1722516). We would like to thank all of the anonymous reviewers on OpenReview, alongside the many members of the van der Schaar lab, for their input, comments, and suggestions at various stages that have ultimately improved the manuscript.
|
| 186 |
+
|
| 187 |
+
# REFERENCES
|
| 188 |
+
|
| 189 |
+
Pieter Abbeel and Andrew $\mathrm { ~ Y ~ N ~ g ~ }$ . Apprenticeship learning via inverse reinforcement learning. In Proceedings of the twenty-first international conference on Machine learning, pp. 1, 2004.
|
| 190 |
+
|
| 191 |
+
Michael Bain and Claude Sammut. A framework for behavioural cloning. In Machine Intelligence 15, pp. 103–129, 1995.
|
| 192 |
+
|
| 193 |
+
David M Blei, Alp Kucukelbir, and Jon D McAuliffe. Variational inference: A review for statisticians. Journal of the American statistical Association, 112(518):859–877, 2017.
|
| 194 |
+
|
| 195 |
+
Michael Bloem and Nicholas Bambos. Infinite time horizon maximum causal entropy inverse reinforcement learning. In 53rd IEEE Conference on Decision and Control, pp. 4911–4916. IEEE, 2014.
|
| 196 |
+
|
| 197 |
+
Greg Brockman, Vicki Cheung, Ludwig Pettersson, Jonas Schneider, John Schulman, Jie Tang, and Wojciech Zaremba. Openai gym, 2016.
|
| 198 |
+
|
| 199 |
+
Daniel Brown, Scott Niekum, and Marek Petrik. Bayesian robust optimization for imitation learning. Advances in Neural Information Processing Systems, 33, 2020.
|
| 200 |
+
|
| 201 |
+
Daniel S Brown and Scott Niekum. Deep bayesian reward learning from preferences. arXiv preprint arXiv:1912.04472, 2019.
|
| 202 |
+
|
| 203 |
+
Jaedeug Choi and Kee-Eung Kim. Map inference for bayesian inverse reinforcement learning. In Advances in Neural Information Processing Systems, pp. 1989–1997, 2011.
|
| 204 |
+
|
| 205 |
+
Jaedeug Choi and Kee-Eung Kim. Nonparametric bayesian inverse reinforcement learning for multiple reward functions. In Advances in Neural Information Processing Systems, pp. 305–313, 2012.
|
| 206 |
+
|
| 207 |
+
Christos Dimitrakakis and Constantin A Rothkopf. Bayesian multitask inverse reinforcement learning. In European workshop on reinforcement learning, pp. 273–284. Springer, 2011.
|
| 208 |
+
|
| 209 |
+
Justin Fu, Katie Luo, and Sergey Levine. Learning robust rewards with adverserial inverse reinforcement learning. In International Conference on Learning Representations, 2018.
|
| 210 |
+
|
| 211 |
+
Dani Gamerman and Hedibert F Lopes. Markov chain Monte Carlo: stochastic simulation for Bayesian inference. CRC Press, 2006.
|
| 212 |
+
|
| 213 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, pp. 2672–2680, 2014.
|
| 214 |
+
|
| 215 |
+
Will Grathwohl, Kuan-Chieh Wang, Joern-Henrik Jacobsen, David Duvenaud, Mohammad Norouzi, and Kevin Swersky. Your classifier is secretly an energy based model and you should treat it like one. In International Conference on Learning Representations, 2019.
|
| 216 |
+
|
| 217 |
+
Joseph T Hepworth, Sherry Garrett Hendrickson, and Jean Lopez. Time series analysis of physiological response during icu visitation. Western journal of nursing research, 16(6):704–717, 1994.
|
| 218 |
+
|
| 219 |
+
Michael Herman, Tobias Gindele, Jorg Wagner, Felix Schmitt, and Wolfram Burgard. Inverse rein-¨ forcement learning with simultaneous estimation of rewards and dynamics. In Artificial Intelligence and Statistics, pp. 102–110. PMLR, 2016.
|
| 220 |
+
|
| 221 |
+
Ashley Hill, Antonin Raffin, Maximilian Ernestus, Adam Gleave, Anssi Kanervisto, Rene Traore, Prafulla Dhariwal, Christopher Hesse, Oleg Klimov, Alex Nichol, Matthias Plappert, Alec Radford, John Schulman, Szymon Sidor, and Yuhuai Wu. Stable baselines. https://github. com/hill-a/stable-baselines, 2018.
|
| 222 |
+
|
| 223 |
+
Jonathan Ho and Stefano Ermon. Generative adversarial imitation learning. In Advances in neural information processing systems, pp. 4565–4573, 2016.
|
| 224 |
+
|
| 225 |
+
Daniel Jarrett, Ioana Bica, and Mihaela van der Schaar. Strictly batch imitation learning by energybased distribution matching. Advances in Neural Information Processing Systems, 33, 2020.
|
| 226 |
+
|
| 227 |
+
Alistair EW Johnson, Tom J Pollard, Lu Shen, H Lehman Li-Wei, Mengling Feng, Mohammad Ghassemi, Benjamin Moody, Peter Szolovits, Leo Anthony Celi, and Roger G Mark. Mimic-iii, a freely accessible critical care database. Scientific data, 3(1):1–9, 2016.
|
| 228 |
+
|
| 229 |
+
William Karush. Minima of functions of several variables with inequalities as side constraints. M. Sc. Dissertation. Dept. of Mathematics, Univ. of Chicago, 1939.
|
| 230 |
+
|
| 231 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 232 |
+
|
| 233 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 234 |
+
|
| 235 |
+
Edouard Klein, Matthieu Geist, and Olivier Pietquin. Batch, off-policy and model-free apprenticeship learning. In European Workshop on Reinforcement Learning, pp. 285–296. Springer, 2011.
|
| 236 |
+
|
| 237 |
+
Naveen Kodali, Jacob Abernethy, James Hays, and Zsolt Kira. On convergence and stability of gans. arXiv preprint arXiv:1705.07215, 2017.
|
| 238 |
+
|
| 239 |
+
Ilya Kostrikov, Kumar Krishna Agrawal, Debidatta Dwibedi, Sergey Levine, and Jonathan Tompson. Discriminator-actor-critic: Addressing sample inefficiency and reward bias in adversarial imitation learning. In International Conference on Learning Representations, 2018.
|
| 240 |
+
|
| 241 |
+
Ilya Kostrikov, Ofir Nachum, and Jonathan Tompson. Imitation learning via off-policy distribution matching. International Conference on Learning Representations (ICLR), 2019.
|
| 242 |
+
|
| 243 |
+
HW Kuhn and AW Tucker. Nonlinear programming. In Proceedings of the Second Berkeley Symposium on Mathematical Statistics and Probability. The Regents of the University of California, 1951.
|
| 244 |
+
|
| 245 |
+
Donghun Lee, Srivatsan Srinivasan, and Finale Doshi-Velez. Truly batch apprenticeship learning with deep successor features. International Joint Conference on Artificial Intelligence (IJCAI), 2019.
|
| 246 |
+
|
| 247 |
+
Sergey Levine. Reinforcement learning and control as probabilistic inference: Tutorial and review. arXiv preprint arXiv:1805.00909, 2018.
|
| 248 |
+
|
| 249 |
+
Sergey Levine, Zoran Popovic, and Vladlen Koltun. Nonlinear inverse reinforcement learning with gaussian processes. In Advances in Neural Information Processing Systems, pp. 19–27, 2011.
|
| 250 |
+
|
| 251 |
+
Soren Mindermann, Rohin Shah, Adam Gleave, and Dylan Hadfield-Menell. Active inverse reward ¨ design. arXiv preprint arXiv:1809.03060, 2018.
|
| 252 |
+
|
| 253 |
+
Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, and Martin Riedmiller. Playing atari with deep reinforcement learning. arXiv preprint arXiv:1312.5602, 2013.
|
| 254 |
+
|
| 255 |
+
Andrew Y Ng, Stuart J Russell, et al. Algorithms for inverse reinforcement learning. In Icml, volume 1, pp. 2, 2000.
|
| 256 |
+
|
| 257 |
+
Bilal Piot, Matthieu Geist, and Olivier Pietquin. Boosted and reward-regularized classification for apprenticeship learning. In Proceedings of the 2014 international conference on Autonomous agents and multi-agent systems, pp. 1249–1256. International Foundation for Autonomous Agents and Multiagent Systems, 2014.
|
| 258 |
+
|
| 259 |
+
Antonin Raffin. Rl baselines zoo. https://github.com/araffin/rl-baselines-zoo, 2018.
|
| 260 |
+
|
| 261 |
+
Deepak Ramachandran and Eyal Amir. Bayesian inverse reinforcement learning. In IJCAI, volume 7, pp. 2586–2591, 2007.
|
| 262 |
+
|
| 263 |
+
Carl Edward Rasmussen. Gaussian processes in machine learning. In Summer School on Machine Learning, pp. 63–71. Springer, 2003.
|
| 264 |
+
|
| 265 |
+
Siddharth Reddy, Anca D Dragan, and Sergey Levine. Sqil: Imitation learning via reinforcement learning with sparse rewards. In International Conference on Learning Representations, 2019.
|
| 266 |
+
|
| 267 |
+
Constantin A Rothkopf and Christos Dimitrakakis. Preference elicitation and inverse reinforcement learning. In Joint European conference on machine learning and knowledge discovery in databases, pp. 34–48. Springer, 2011.
|
| 268 |
+
|
| 269 |
+
John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 270 |
+
|
| 271 |
+
Brian D Ziebart. Modeling Purposeful Adaptive Behavior with the Principle of Maximum Causal Entropy. PhD thesis, University of Washington, 2010.
|
| 272 |
+
|
| 273 |
+
Brian D Ziebart, Andrew L Maas, J Andrew Bagnell, and Anind K Dey. Maximum entropy inverse reinforcement learning. In Aaai, volume 8, pp. 1433–1438. Chicago, IL, USA, 2008.
|
| 274 |
+
|
| 275 |
+
# A EXPERIMENTAL SETUP
|
| 276 |
+
|
| 277 |
+
Expert Demonstrators. Demonstrations are produced by running pre-trained and hyperparmeteroptimised agents taken from the RL Baselines Zoo (Raffin, 2018) in OpenAI Stable Baselines (Hill et al., 2018). For Acrobot and LunarLander these are DQNs (Mnih et al., 2013), while CartPole uses PPO2 (Schulman et al., 2017). Trajectories were then sub-sampled for every 20th step in Acrobot and CartPole, and every 5th step in LunarLander.
|
| 278 |
+
|
| 279 |
+
Testing setup. For control environments algorithms were presented with (1,3,7,10,15) trajectories uniformly sampled from a pool of 1000 expert trajectories. Each algorithm was then trained until convergence and tested by performing 300 live roll-outs in the simulated environment and recording the average accumulated reward received in each episode. This whole process was then repeated 10 times, consequently with different initialisations and seen trajectories.
|
| 280 |
+
|
| 281 |
+
Implementations. All methods are neural network based and so in experiments they share the same architecture of 2 hidden layers of 64 units each connected by exponential linear unit (ELU) activation functions.
|
| 282 |
+
|
| 283 |
+
Publicly available code was used in the implementations of a number of the benchmarks, specifically:
|
| 284 |
+
|
| 285 |
+
• VDICE (Kostrikov et al., 2019): https://github.com/google-research/google-research/tree/ master/value_dice
|
| 286 |
+
• DSFN (Lee et al., 2019): https://github.com/dtak/batch-apprenticeship-learning
|
| 287 |
+
• EDM (Jarrett et al., 2020): https://github.com/wgrathwohl/JEM
|
| 288 |
+
|
| 289 |
+
Note that VDICE was originally designed for continuous actions with a Normal distribution output which we adapt for the experiments by replacing with a Gumbel-softmax.
|
| 290 |
+
|
| 291 |
+
# B PROOFS
|
| 292 |
+
|
| 293 |
+
Proof of proposition 1. Assuming the constraint is satisfied, we are maximising the following objective:
|
| 294 |
+
|
| 295 |
+
$$
|
| 296 |
+
\mathcal { F } ( \phi , \theta ) = \sum _ { ( s , a , s ^ { \prime } , a ^ { \prime } ) \in \mathcal { D } } \log \frac { \exp \beta Q _ { \theta } ( s , a ) ) } { \sum _ { b \in \mathcal { A } } \exp ( \beta Q _ { \theta } ( s , b ) ) } - D _ { K L } \big ( q _ { \phi } ( R ( s , a ) ) | | p ( R ( s , a ) ) \big )
|
| 297 |
+
$$
|
| 298 |
+
|
| 299 |
+
Which is equivalent to minimising the negative value
|
| 300 |
+
|
| 301 |
+
$$
|
| 302 |
+
\mathcal { F } ( \phi , \theta ) = \sum _ { ( s , a , s ^ { \prime } , a ^ { \prime } ) \in \mathcal { D } } - \log \frac { \exp \beta Q _ { \theta } ( s , a ) ) } { \sum _ { b \in \mathcal { A } } \exp ( \beta Q _ { \theta } ( s , b ) ) } + \underbrace { D _ { K L } \big ( q _ { \phi } ( R ( s , a ) ) | | p ( R ( s , a ) ) \big ) } _ { \mathcal { L } _ { r e g } } ,
|
| 303 |
+
$$
|
| 304 |
+
|
| 305 |
+
with the first term $\mathcal { L } _ { B C }$ being the negative log-likelihood of the data and the classic behavioural cloning objective. Now given a standard Gaussian prior then the $\mathrm { K L }$ divergence of a Gaussian with mean $\mu$ and variance $\sigma ^ { 2 }$ from the prior is given by $\begin{array} { r } { \frac { 1 } { 2 } ( - \log ( \sigma ^ { 2 } ) + \sigma ^ { 2 } - 1 + \bar { \mu } ^ { 2 } ) } \end{array}$ (Kingma & Welling,
|
| 306 |
+
|
| 307 |
+
2013). Then given our prior $p ( R ( s , a ) ) = \mathcal { N } ( R ; 0 , 1 )$ , the KL evaluates as:
|
| 308 |
+
|
| 309 |
+
$$
|
| 310 |
+
\begin{array} { l } { { \displaystyle { \mathcal L } _ { r e g } = \sum _ { ( s , a , s ^ { \prime } , a ^ { \prime } ) \in \mathcal D } _ { K L } \big ( q _ { \phi } ( R ( s , a ) ) | | p ( R ( s , a ) ) \big ) } } \\ { { = \sum _ { ( s , a , s ^ { \prime } , a ^ { \prime } ) \in \mathcal D } \frac { 1 } { 2 } \big ( - \log ( \operatorname { V a r } _ { q _ { \phi } } [ R ( s , a ) ] ) + \operatorname { V a r } _ { q _ { \phi } } [ R ( s , a ) ] - 1 + \mathbb { E } _ { q _ { \phi } } [ R ( s , a ) ] ^ { 2 } \big ) } } \\ { { = \sum _ { ( s , a , s ^ { \prime } , a ^ { \prime } ) \in \mathcal D } \frac { 1 } { 2 } \big ( \mathbb { E } _ { q _ { \phi } } [ R ( s , a ) ] ^ { 2 } ) + g ( \operatorname { V a r } _ { q _ { \phi } } [ R ( s , a ) ] ) } } \\ { { = \sum _ { ( s , a , s ^ { \prime } , a ^ { \prime } ) \in \mathcal D } \frac { 1 } { 2 } \big ( Q _ { \theta } ( s , a ) - \gamma Q _ { \theta } ( s ^ { \prime } , a ^ { \prime } ) \big ) ^ { 2 } + g ( \operatorname { V a r } _ { q _ { \phi } } [ R ( s , a ) ] ) } } \end{array}
|
| 311 |
+
$$
|
| 312 |
+
|
| 313 |
+
Since by assumption $\mathbb { E } _ { q _ { \phi } } [ R ( s , a ) ] ~ = ~ \mathbb { E } _ { \pi , T } [ Q _ { \theta } ( s , a ) ~ - ~ \gamma Q _ { \theta } ( s ^ { \prime } , a ^ { \prime } ) ]$ with the expectation approximated over samples in the data and considering a definition of the function $g$ to be $\begin{array} { r } { \dot { g } ( \mathrm { V a r } _ { q _ { \phi } } [ R ( s , a ) ] ) = \frac { 1 } { 2 } ( - \log ( \mathrm { V a r } _ { q _ { \phi } } [ R ( s , a ) ] ) + \mathrm { V a r } _ { q _ { \phi } } [ \bar { R } ( s , a ) ] - 1 ) . } \end{array}$ .
|
md/train/5-GXHFNbq_U/5-GXHFNbq_U.md
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Prototypical Cross-Attention Networks for Multiple Object Tracking and Segmentation
|
| 2 |
+
|
| 3 |
+
Lei $\mathbf { K e } ^ { 1 , 2 }$ Xia Li1 Martin Danelljan1 Yu-Wing Tai3 Chi-Keung Tang2 Fisher ${ \bf { Y } } { \bf { u } } ^ { 1 }$ 1ETH Zürich 2HKUST 3Kuaishou Technology {lkeab,cktang}@cse.ust.hk, {xia.li,martin.danelljan}@vision.ee.ethz.ch yuwing@gmail.com, i@yf.io
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Multiple object tracking and segmentation requires detecting, tracking, and segmenting objects belonging to a set of given classes. Most approaches only exploit the temporal dimension to address the association problem, while relying on single frame predictions for the segmentation mask itself. We propose Prototypical Cross-Attention Network (PCAN), capable of leveraging rich spatio-temporal information for online multiple object tracking and segmentation. PCAN first distills a space-time memory into a set of prototypes and then employs cross-attention to retrieve rich information from the past frames. To segment each object, PCAN adopts a prototypical appearance module to learn a set of contrastive foreground and background prototypes, which are then propagated over time. Extensive experiments demonstrate that PCAN outperforms current video instance tracking and segmentation competition winners on both Youtube-VIS and BDD100K datasets, and shows efficacy to both one-stage and two-stage segmentation frameworks. Code and video resources are available at http://vis.xyz/pub/pcan.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Multiple object tracking and segmentation (MOTS), also known as Video Instance Segmentation (VIS), is an important problem with many real-world applications, including autonomous driving [10, 26] and video analysis [4, 46]. The task involves tracking and segmenting all objects within a video from a given set of semantic classes. We are witnessing rapidly growing research interest on MOTS thanks to the introduction of large scale benchmarks [46, 50, 37]. State-of-the-art methods [46, 5, 37, 29] for MOTS mainly follow the tracking-by-detection paradigm, where objects are first detected and segmented in individual frames and then associated over time.
|
| 12 |
+
|
| 13 |
+
Although methods based on the popular tracking-by-detection philosophy have shown promising results, temporal modeling is limited to the object association phase [46, 5, 22] and only between two adjacent frames [37, 18]. On the other hand, the temporal dimension carries rich information about the scene. The information encoded in multiple temporal views of an object has the potential of improving the quality of predicted segmentation, localization, and categories. However, effectively and efficiently leveraging the rich temporal information remains a challenge. While sequential modeling has been applied for video processing [40, 41, 9, 28, 12], these methods generally operate directly on the high-resolution deep features, requiring large computational and memory consumption, which greatly limits their use.
|
| 14 |
+
|
| 15 |
+
We propose a Prototypical Cross-Attention Module, termed PCAM, to leverage temporal information for multiple object tracking and segmentation. As illustrated in Figure 1, the module first distills spatiotemporal information into condensed prototypes using clustering based on Expectation Maximization. The resulting prototypes, composed of Gaussian Components, yield a rich and generalizable yet compact representation of the past visual features. Given a deep feature embedding of the current frame, PCAM then employs prototypical cross-attention to read relevant information from prior frames.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: We propose Prototypical Cross-Attention Network for MOTS, which first condenses the space-time memory and high-resolution frame embeddings into frame-level and instance-level prototypes. These are then employed to retrieve rich temporal information from past frames by our efficient prototypical cross-attention operation.
|
| 19 |
+
|
| 20 |
+
Based on the noise-reduced clustered video features information, we further develop a Prototypical Cross-Attention Network (PCAN) for MOTS, that integrates the general PCAM at two stages in the network: on the frame-level and instance-level. The former reconstructs and aligns temporal past frame features with current frame, while the instance level integrates specific information about each object in the video. For robustness to object appearance change, PCAN represents each object instance by learning sets of contrastive foreground and background prototypes, which are propagated in an online manner. With a limited number of prototypes for each instance or frame, PCAN efficiently performs long-range feature aggregation and propagation in a video with linear complexity. Consequently, our PCAN outperforms standard non-local attention [40] and video transformer [41] on both the large-scale Youtube-VIS and BDD100K MOTS benchmarks.
|
| 21 |
+
|
| 22 |
+
Our main contributions are summarized as follows: (i) We introduce the PCAN module for efficiently utilizing long-term spatio-temporal video information. (ii) We develop a MOTS approach that employs PCAN on frame and instance-level. (iii) We further represent the appearance of each video tracklet with contrastive foreground and background prototypes, which are propagated over time. (iv) We extensively analyze our approach. Our PCAN outperforms previous approaches on the challenging self-driving dataset BDD100K [50] and the semantically diverse YouTube-VIS dataset [46].
|
| 23 |
+
|
| 24 |
+
# 2 Related work
|
| 25 |
+
|
| 26 |
+
Video instance segmentation (VIS) Existing VIS methods [46, 2, 21] widely adapt the twostage paradigm of Mask R-CNN [11] and its variants [13, 15] by adding an additional tracking branch. Thus, their typical pipelines first detect regions of interest (RoIs) and then use the instance features after RoIAlign to regress object mask and associate cross-frame instances. More recent works [5, 18, 22, 48] employ a one-stage instance segmentation method, e.g. the anchor-free FCOS detector [34], which predicts a linear combination of mask bases [3] as its final segmentation. The aforementioned approaches make very limited use of temporal information to enhance the quality of the segmentation, instead relying on single image-based mask prediction, or only model short-term temporal correlation between two consecutive frames [18, 30]. In the context of long-term temporal association, the offline method VisTr [41] adapts vision transformer [6] for VIS, but suffers from a huge computational burden and memory consumption due to the dense pixel-level attention operations over long sequences. Compared to these methods, our PCAN temporally aggregates and propagates the prototypical features with both the long-term benefit and linear complexity.
|
| 27 |
+
|
| 28 |
+
Multiple Object Tracking and Segmentation (MOTS) Similar to VIS, MOTS methods [37, 27, 29] mainly follow the tracking-by-detection paradigm. Objects are first detected and segmented, followed by association between frames. Track R-CNN [37] integrates temporal context feature from two neighboring frames using 3D convolutions. TrackFormer [25] performs joint object detection and tracking by recurrently using Transformers, while Stem-Seg [1] adopts a short 3D convolutional spatio-temporal volume to learn pixel embedding by treating segmentation as a bottom-up grouping. In contrast, our approach clusters appearance features in a long spatio-temporal volume with explicit foreground and background prototypes that are updates online. Besides, the mixture Gaussian components in instance appearance module equips PCAN a stronger modeling ability compared to instance-level average pooling [33, 49] or single Gaussian model [51, 14].
|
| 29 |
+
|
| 30 |
+
Temporal attention models Video understanding usually requires long-range sequential modeling of relations between spatio-temporal locations. Recently, attention-based approaches, such as non-local attention [40, 39, 28, 12] and transformers [8, 35, 16], have been successfully adopted in video classification and action recognition. These tasks [23, 32, 43] involve dense pixel-level attention, leading to quadratic complexity in the sequence length, thus making them excessively expensive for long sequences. Improved temporal attention models mainly include double attention mechanism [7] on image recognition with global-local decomposition, and clustered attention Transformer [38] for language sequence modeling. Besides, recent prototypical methods [19, 45] use the EM algorithm for single-image semantic segmentation or few-shot learning [33]. Unlike these methods, our PCAN uses compact prototypical representation both for temporal feature aggregation and compact instance appearance feature propagation.
|
| 31 |
+
|
| 32 |
+
# 3 Method
|
| 33 |
+
|
| 34 |
+
We propose an approach for Multiple Object Tracking and Segmentation. Given a video sequence, the goal is to detect, track, and segment objects from a predefined set of object categories. Specifically, we consider the online setting, where the predictions only depend on current and past frames.
|
| 35 |
+
|
| 36 |
+
# 3.1 Traditional Cross-Attention
|
| 37 |
+
|
| 38 |
+
To utilize the rich temporal information to improve the segmentation prediction, recent approaches [28, 12] have employed cross-attention. We consider past spatio-temporal information encoded in a memory M, consisting of deep features of size $H \times W \times T \times C$ . The memory encapsulates valuable information about the past appearances and predictions of objects and background in a scene. To attend to the memory, the information is first separately embedded into key $\mathbf { k } ^ { M }$ and value $\mathbf { v } ^ { M }$ feature vectors. The keys are used to address relevant memories whose corresponding values are returned. The standard memory reading process is a non-local operation computed as the weighted sum,
|
| 39 |
+
|
| 40 |
+
$$
|
| 41 |
+
y _ { i } = \frac { 1 } { Z _ { i } } \sum _ { j = 1 } ^ { H \times W \times T } \exp ( \mathbf { k } _ { i } ^ { Q } \cdot \mathbf { k } _ { j } ^ { M } ) \mathbf { v } _ { j } ^ { M } ,
|
| 42 |
+
$$
|
| 43 |
+
|
| 44 |
+
where $\mathbf { k } ^ { Q }$ denotes query key map, which is predicted from the current frame. Further, $i$ and $j$ are the index of each query and the memory location, and $\begin{array} { r } { Z _ { i } = \sum _ { j } \exp ( \mathbf { k } _ { i } ^ { Q } \cdot \mathbf { k } _ { j } ^ { M } ) } \end{array}$ is the normalizing factor.
|
| 45 |
+
|
| 46 |
+
Although proven effective, the standard attention operation (1) is known to suffer from poor computational and memory scaling properties [20]. In particular, since all queries are matched to all keys, it experiences a quadratic scaling $\mathcal { O } ( ( H W ) ^ { 2 } )$ of computations in the spatial size $H W$ of the feature map. This is particularly problematic for segmentation tasks, where fine-grained high-resolution information is desired to improve the quality of the predictions.
|
| 47 |
+
|
| 48 |
+
# 3.2 Prototypical Cross-Attention
|
| 49 |
+
|
| 50 |
+
To address the aforementioned limitations of the standard cross-attention, we introduce the prototypical cross-attention to first condense sets of high-resolution feature vectors in the past frames. Our approach is based on a clustered memory $\mathbf { M } _ { c }$ . We call these clusters prototypes, since they correspond to representative items in the memory. While clustering effectively reduces the number of items in the memory, it also serves to deprecate noisy information, leading to a more generalizable and robust representation of the memory.
|
| 51 |
+
|
| 52 |
+
To employ an attention mechanism, similar to (1), we require a clustering of the memory that generates a principled continuous and differentiable clustering assignment function. We therefore cluster the keys in the memory by fitting a Gaussian Mixture Model (GMM),
|
| 53 |
+
|
| 54 |
+

|
| 55 |
+
Figure 2: Overview of our frame-level prototypical cross-attention. For a frame $\hat { t }$ in the memory we first perform GMM-based clustering to achieve the key $\mathbf { k } _ { \hat { t } j } ^ { \mu }$ and value $\mathbf { v } _ { \hat { t } j } ^ { \mu }$ prototypes. Given the key encoding $\mathbf { k } _ { t }$ of the current frame, we attend to the prototypes to generate the reconstructed feature $\mathbf { y } _ { \hat { t } }$ , which are then aggregated temporally and fused with the current value encoding $\mathbf { v } _ { t }$ .
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
p ( \mathbf { k } ) = \frac { 1 } { N } \sum _ { j = 1 } ^ { N } p ( \mathbf { k } | z = j ) , \qquad p ( \mathbf { k } | z = j ) = \frac { 1 } { ( 2 \pi \sigma ^ { 2 } ) ^ { \frac { D } { 2 } } } \exp \left( - \frac { 1 } { 2 \sigma ^ { 2 } } \| \mathbf { k } - \mathbf { k } _ { j } ^ { \mu } \| ^ { 2 } \right)
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
Here, $N$ denotes the number of Gaussian mixtures, $D$ is the feature dimension of the keys. We use a constant variance parameter $\sigma ^ { 2 }$ and uniform cluster priors $\begin{array} { r } { p ( z = j ) = \frac { 1 } { N } } \end{array}$ , where $z$ denotes the latent cluster assignment variable. The component means $\mathbf { k } ^ { \mu }$ represent the prototype keys in the memory. We generate the clustering (2) using the standard Expectation-Maximization algorithm.
|
| 62 |
+
|
| 63 |
+
The GMM allows us to compute a soft cluster assignment by evaluating the posterior probability of the latent assignment variable $z$ . Using Bayes rule, the probability of a key value $\mathbf { k }$ to be assigned to the $j$ th prototype is derived as,
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
p ( z = j | \mathbf { k } ) = \frac { p ( \mathbf { k } | z = j ) p ( z = j ) } { \sum _ { l = 1 } ^ { N } p ( \mathbf { k } | z = l ) p ( z = l ) } = \frac { \exp \left( - \frac { 1 } { 2 \sigma ^ { 2 } } \| \mathbf { k } - \mathbf { k } _ { j } ^ { \mu } \| ^ { 2 } \right) } { \sum _ { l = 1 } ^ { N } \exp \left( - \frac { 1 } { 2 \sigma ^ { 2 } } \| \mathbf { k } - \mathbf { k } _ { l } ^ { \mu } \| ^ { 2 } \right) } .
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
The resulting cluster assignment can thus be written as a SoftMax operation, where the corresponding logits are provided by the negative cluster distance $\| \mathbf { k } - \mathbf { k } _ { j } ^ { \mu } \| ^ { 2 }$ scaled with a temperature of $2 \sigma ^ { 2 }$ .
|
| 70 |
+
|
| 71 |
+
Since the clustering is performed in the key space of the memory, we next retrieve the corresponding value prototypes. To this end, we employ the key cluster assignment probabilities in (3) to compute the values for each memory prototype,
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
\mathbf { v } _ { j } ^ { \mu } = \sum _ { l = 1 } ^ { H \times W } p ( z = j | \mathbf { k } _ { l } ^ { M } ) \mathbf { v } _ { l } ^ { M } .
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
For attending to our clustered memory, we first predict the key encodings We then read from the clustered memory by computing the average over t $\mathbf { k } _ { i } ^ { Q }$ of the query imvalue prototypes $\mathbf { v } _ { j } ^ { \mu }$ weighted with the cluster assignment probabilities,
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\mathbf { y } _ { i } = \sum _ { j = 1 } ^ { N } p ( z = j | \mathbf { k } _ { i } ^ { Q } ) \mathbf { v } _ { j } ^ { \mu } = \frac { 1 } { Z _ { i } } \sum _ { j = 1 } ^ { N } \exp \left( - \frac { 1 } { 2 \sigma ^ { 2 } } \| \mathbf { k } _ { i } ^ { Q } - \mathbf { k } _ { j } ^ { \mu } \| ^ { 2 } \right) \mathbf { v } _ { j } ^ { \mu } .
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
The final attention operation has much similarity with the original dot-product cross attention (1). Note that the key-query similarity in our approach is measured by Euclidian distance instead of a dot-product. Importantly, our formulation (5) attends to a reduced set of $N$ prototypes, while the original attention (1) requires attending to the full spatio-temporal memory of size $H \times W \times T$ .
|
| 84 |
+
|
| 85 |
+
# 3.3 Prototypical Cross-Attention Network
|
| 86 |
+
|
| 87 |
+
Here, we propose the Prototypical Cross-Attention Network (PCAN) for MOTS by integrating our prototypical cross-attention module into both the frame-level and instance-level. The former aims to align and aggregate temporal frame features stored in memory, while the latter is for propagating the instance appearance features over time and produce instance cross-attention maps to help segmentation. Besides, we also design a prototypical instance appearance module to represent each video tracklet with contrastive mixture foreground and background prototypes.
|
| 88 |
+
|
| 89 |
+
# 3.3.1 Frame-level Prototypical Cross-Attention
|
| 90 |
+
|
| 91 |
+
In Figure 2, prototypical cross-attention first produces prototypes by fitting a Gaussian mixtures model (2) to the feature in the memory. To provide further flexibility when dynamically updating the memory compute the $\mathbf { M }$ , we first perforkey prototypes wise clustering for each reference frame feature at , and retrieve the corresponding value embeddings $\hat { t }$ $N$ $\{ \mathbf { k } _ { \hat { t } i } ^ { \mu } \} _ { j = 1 } ^ { N }$ $\{ \mathbf { v } _ { \hat { t } j } ^ { \mu } \} _ { j = 1 } ^ { N }$ using (4) for each memory frame $\hat { t }$ independently. The key and value features are predicted using two parallel convolutional layers.
|
| 92 |
+
|
| 93 |
+
Frame-wise prototypical memory attention Given the query key encoding $\mathbf { k } _ { t i } ^ { Q }$ of the current frame $t$ , we perform prototypical cross-attention to each memory frame $\hat { t }$ independently using our formulation (3) as,
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
{ \bf y } _ { \hat { t } i } = \frac { 1 } { Z _ { \hat { t } \hat { t } } } \sum _ { j = 1 } ^ { N } \exp \left( - \frac { 1 } { 2 \sigma ^ { 2 } } \| { \bf k } _ { t i } - { \bf k } _ { \hat { t } j } ^ { \mu } \| ^ { 2 } \right) { \bf v } _ { \hat { t } j } ^ { \mu } , \qquad Z _ { \hat { t } i } = \sum _ { l = 1 } ^ { N } \exp \left( - \frac { 1 } { 2 \sigma ^ { 2 } } \| { \bf k } _ { t i } ^ { Q } - { \bf k } _ { \hat { t } \hat { t } } ^ { \mu } \| ^ { 2 } \right) .
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
Note that the index $i$ refers to a spatial coordinate in the current frame. The resulting feature map $\mathbf { y } _ { \hat { t } }$ can intuitively be seen as a projection of features from frame $\hat { t }$ to the current frame. This projection essentially aligns the condensed feature information in frame $\hat { t }$ with the current frame.
|
| 100 |
+
|
| 101 |
+
Temporal feature aggregation Since frame-wise attention does not fuse temporal information, we perform a temporal aggregation. The temporal information $\mathbf { y } _ { \hat { t } }$ in (6) from different frames $\hat { t }$ are fused as a linear combination, weighted by the feature similarity with the current frame. Specifically, the temporally aggregated representation is obtained as
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
\bar { \mathbf { y } } _ { t i } = \sum _ { \hat { t } = 1 } ^ { t } w _ { \hat { t } i } \mathbf { y } _ { \hat { t } i } , \qquad w _ { \hat { t } i } = \frac { \exp ( \mathbf { y } _ { t i } \cdot \mathbf { y } _ { \hat { t } i } ) } { \sum _ { s = 1 } ^ { t } \exp ( \mathbf { y } _ { t i } \cdot \mathbf { y } _ { s i } ) } .
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
Note that ${ \hat { t } } = t$ in the sum refers to the value embedding $\mathbf { y } _ { t i } = \mathbf { v } _ { t i } ^ { Q }$ extracted from the current frame. The contribution of each frame $\hat { t }$ is thus weighted by the similarity to this current frame prediction using the attention weights $w _ { \hat { t } i }$ . This strategy ensures that incorrect or dissimilar regions are suppressed when computing the final aggregated feature embedding $\bar { \mathbf { y } } _ { t }$ . To handle object with large-scale variation and produce more fine-grained instance mask prediction, we further extend temporal aggregation to multi-level using different levels of the extracted FPN features, as detailed in the supplementary material.
|
| 108 |
+
|
| 109 |
+
# 3.3.2 Instance-level Prototypical Cross-Attention
|
| 110 |
+
|
| 111 |
+
Contrastive foreground and background representation In additional to the condensed frame-level representation, for more accurate segmentation results, we further encode each tracked object with compact and robust appearance prototypes. To further empower our proposed attention mechanism, we utilize the initially detected object mask to identify each foreground instance. We then separately model the extracted foreground and background features using a GMM (2). We denote the resulting foreground prototypes as $\mathbf { k } _ { t j . } ^ { + }$ and background prototypes as $\mathbf { k } _ { t j } ^ { - }$ . The former thus focuses on the appearance of the specific object, creating a rich and dynamic appearance model. When employed in our prototypical cross-attention framework (Section 3.2), it provides fine-grained attention from localized prototypes that naturally learn to focus specific parts of views of the object, as visualized in Fig. 3. Furthermore, the background prototypes $\mathbf { k } _ { t j } ^ { - }$ capture valuable information about the background appearance, which can greatly alleviate the segmentation process. For each object instance we attend to the foreground and background prototypes separately using (3). The results are concatenated together with the initial mask detection to the Temporal Segmentation Head (TSM) for final prediction, as illustrated in Figure 3.
|
| 112 |
+
|
| 113 |
+

|
| 114 |
+
Figure 3: Our instance-level prototypical attention with foreground and background prototypes and temporal propagation. The foreground/background attention maps from (bottom) demonstrate the localized and discriminative appearance representation. Temporal Segmentation Module (TSM) takes the current frame, initial mask, and instance attention maps as input and generates the final mask.
|
| 115 |
+
|
| 116 |
+
Tracklet feature propagation and updating To effectively model the object appearance change and preserve the most relevant information, we design a recurrent instance appearance updating scheme. From the first video frame where object appears, the accumulated prototypes $\bar { \mathbf { k } } _ { t j } ^ { + }$ , $\bar { \mathbf { k } } _ { t j } ^ { - }$ for the instance are propagated to the subsequent frames and updated with new appearance prototypes $\mathbf { k } _ { t j } ^ { + }$ , $\mathbf { k } _ { t j } ^ { - }$ using an update rate $\lambda$ as,
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\bar { \mathbf { k } } _ { t j } ^ { + } = ( 1 - \lambda ) \bar { \mathbf { k } } _ { t - 1 , j } ^ { + } + \lambda \mathbf { k } _ { t j } ^ { + } , \qquad \bar { \mathbf { k } } _ { t j } ^ { - } = ( 1 - \lambda ) \bar { \mathbf { k } } _ { t - 1 , j } ^ { - } + \lambda \mathbf { k } _ { t j } ^ { - } .
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
Figure 3 also reveals the consistency of the attended region of a specific prototype $j$
|
| 123 |
+
|
| 124 |
+
# 4 Experiments
|
| 125 |
+
|
| 126 |
+
Here, we present comprehensive evaluation and analysis of our approach. Experiments are performed on two large scale datasets, namely YouTube-VIS [46] and BDD100K [50].
|
| 127 |
+
|
| 128 |
+
# 4.1 Experiment setup
|
| 129 |
+
|
| 130 |
+
Youtube-VIS YouTube-VIS-2019 [46] dataset contains 2,883 high quality videos with 131k annotated object instances belonging to 40 diverse categories. The task is to simultaneously classifying, segment and track object instances belonging to these categories. The evaluation metrics for this task are an adaptation of the Average Precision (AP) and Average Recall (AR) of image instance segmentation.
|
| 131 |
+
|
| 132 |
+
BDD100K We also evaluate on the large-scale tracking and segmentation dataset of BDD100K [50], which is a challenging self-driving dataset with 154 videos (30,817 images) for training, 32 videos (6,475 images) for validation, and 37 videos (7,484 images) for testing. The dataset provides 8 annotated categories for evaluation, where the images in the tracking set are annotated per 5 FPS with 30 FPS frame rate. We adopt the well-established MOTS metrics [37] to our task.
|
| 133 |
+
|
| 134 |
+
Implementation details We implement PCAN based on two different existing MOTS approaches. For Youtube-VIS, we adopt ResNet with FPN pre-trained on COCO as the backbone, and build our segmentation tracker on the one-stage segmentation model [5]. Both the instance and frame cross-attention is built on the extracted FPN features. Our model is trained with initial learning rate 0.0025 on 4 GPUs using SGD, and executes with a speed of 15.0 FPS on ResNet-50. Similar to [46, 22, 18], we use the input size $3 6 0 \times 6 4 0$ for training. On BDD100K, we build PCAN by extending the two-stage MOT method [29] with our temporal segmentation modules. We follow the same training strategy of QDTrack-mots [29]. More details can be found in supplemental material.
|
| 135 |
+
|
| 136 |
+
Table 1: Comparison with state-of-the-art on the YouTube-VIS validation set. Results are reported in terms of mask accuracy (AP) and recall (AR). Asterisks ∗ denote concurrent works on arXiv.
|
| 137 |
+
|
| 138 |
+
<table><tr><td>Method</td><td>Backbone</td><td>Type</td><td>Online</td><td>AP</td><td>AP50</td><td>AP75</td><td>AR1</td><td>AR10</td></tr><tr><td>VisTr*[41]</td><td>ResNet-50</td><td>Transformer</td><td>×</td><td>35.6</td><td>56.8</td><td>37.0</td><td>35.2</td><td>40.2</td></tr><tr><td>OSMN [47]</td><td>ResNet-50</td><td>Two-stage</td><td>√</td><td>23.4</td><td>36.5</td><td>25.7</td><td>28.9</td><td>31.1</td></tr><tr><td>FEELVOS [36]</td><td>ResNet-50</td><td>Two-stage</td><td>√</td><td>26.9</td><td>42.0</td><td>29.7</td><td>29.9</td><td>33.4</td></tr><tr><td>DeepSORT[42]</td><td>ResNet-50</td><td>Two-stage</td><td>√</td><td>26.1</td><td>42.9</td><td>26.1</td><td>27.8</td><td>31.3</td></tr><tr><td>MaskTrack R-CNN [46]</td><td>ResNet-50</td><td>Two-stage</td><td>√</td><td>30.3</td><td>51.1</td><td>32.6</td><td>31.0</td><td>35.5</td></tr><tr><td>STEm-Seg[1]</td><td>ResNet-50</td><td> One-stage</td><td></td><td>30.6</td><td>50.7</td><td>33.5</td><td>31.6</td><td>37.1</td></tr><tr><td>SipMask [5]</td><td>ResNet-50</td><td>One-stage</td><td></td><td>32.5</td><td>53.0</td><td>33.3</td><td>33.5</td><td>38.9</td></tr><tr><td>STMask*[18]</td><td>ResNet-50</td><td>One-stage</td><td>x<></td><td>33.5</td><td>52.1</td><td>36.9</td><td>31.1</td><td>39.2</td></tr><tr><td>SG-Net* [22]</td><td>ResNet-50</td><td>One-stage</td><td>√</td><td>34.8</td><td>56.1</td><td>36.8</td><td>35.8</td><td>40.8</td></tr><tr><td>PCAN (Ours)</td><td>ResNet-50</td><td>One-stage</td><td>√</td><td>36.1</td><td>54.9</td><td>39.4</td><td>36.3</td><td>41.6</td></tr><tr><td>STMask*[18]</td><td>ResNet-101</td><td>One-stage</td><td>√</td><td>36.3</td><td>55.2</td><td>39.9</td><td>33.7</td><td>42.0</td></tr><tr><td>SG-Net* [22]</td><td>ResNet-101</td><td>One-stage</td><td>√</td><td>36.3</td><td>57.1</td><td>39.6</td><td>35.9</td><td>43.0</td></tr><tr><td>PCAN (Ours)</td><td>ResNet-101</td><td>One-stage</td><td>√</td><td>37.6</td><td>57.2</td><td>41.3</td><td>37.2</td><td>43.9</td></tr></table>
|
| 139 |
+
|
| 140 |
+
Table 2: State-of-the-art comparison on the BDD100K segmentation tracking validation set. I: ImageNet. C: COCO. S: Cityscapes. B: BDD100K. "-fix" means adopting the pretrained model from the BDD100K tracking set, fixing the existing parts, and only training the added mask head.
|
| 141 |
+
|
| 142 |
+
<table><tr><td>Method</td><td>Pretrained</td><td>Online</td><td>mMOTSA↑</td><td>mMOTSP↑</td><td>mIDF个</td><td>ID sw.↓</td><td>mAP↑</td></tr><tr><td>SortIoU</td><td>I, C, S</td><td>√</td><td>10.3</td><td>59.9</td><td>21.8</td><td>15951</td><td>22.2</td></tr><tr><td>MaskTrackRCNN [36]</td><td>I, C, S</td><td>√</td><td>12.3</td><td>59.9</td><td>26.2</td><td>9116</td><td>22.0</td></tr><tr><td>STEm-Seg [1]</td><td>1,C, s</td><td>×</td><td>12.2</td><td>58.2</td><td>25.4</td><td>8732</td><td>21.8</td></tr><tr><td>QDTrack-mots [29]</td><td>1, C,S</td><td>√</td><td>22.5</td><td>59.6</td><td>40.8</td><td>1340</td><td>22.4</td></tr><tr><td>QDTrack-mots-fix [29]</td><td>I, B</td><td>√</td><td>23.5</td><td>66.3</td><td>44.5</td><td>973</td><td>25.5</td></tr><tr><td>PCAN (Ours)</td><td>I,B</td><td>√</td><td>27.4</td><td>66.7</td><td>45.1</td><td>876</td><td>26.6</td></tr></table>
|
| 143 |
+
|
| 144 |
+
# 4.2 State-of-the-Art Comparison
|
| 145 |
+
|
| 146 |
+
We compare our approach with the state-of-the-art methods on the aforementioned large-scale MOTS/VIS benchmarks Youtube-VIS and BDD100K, where PCAN outperforms all existing methods without bells and whistles, and shows efficacy to both one-stage and two-stage segmentation frameworks. We follow the official metrics of each benchmark to evaluate our model.
|
| 147 |
+
|
| 148 |
+
Youtube-VIS The results of Youtube-VIS benchmark is in Table 1, where PCAN achieves the best mask AP of $3 6 . 1 \%$ using ResNet-50 and $3 7 . 6 \%$ using ResNet-101 respectively, while being an online method. Our approach consistently surpasses most recent SOTA methods, including STMask [18] and SG-Net [22] by a significant margin. These methods only conduct temporal modeling between two adjacent frames for feature correlation. Compared to our baseline SipMask [5], a single-image based segmentation with object centerness association, PCAN improves the mask AP from $3 2 . 5 \%$ to $3 6 . 1 \%$ , which shows the effectiveness of long-term temporal modeling in helping object tracking and segmentation.
|
| 149 |
+
|
| 150 |
+
BDD100K Table 2 shows our results on BDD100K tracking and segmentation benchmark, where PCAN outperforms the strong baseline methods MaskTrackRCNN [46] and QDTrack-mots [29]. Our approach achieves a large advantage in mMOTSA, with over 3 points gain and around $10 \%$ ID switches decrease. MOTSA measures segmentation as well as tracking quality, while ID Switches can measure the performance of identity consistency. The significant advancements demonstrate that our method with prototypical cross-attention enables more accurate pixel-wise object tracking by effectively exploiting temporal information.
|
| 151 |
+
|
| 152 |
+
# 4.3 Ablation study and analysis
|
| 153 |
+
|
| 154 |
+
We conduct detailed ablation studies on Youtube-VIS validation set, where we investigate the effect of our proposed prototypical cross-attention components for MOTS during training and testing.
|
| 155 |
+
|
| 156 |
+
Effect of frame-level prototypical cross-attention module To study the importance of temporal information amount, we conduct an ablation study on models with different input temporal window lengths in Table 3. A temporal length of 1 thus means that no prior temporal information guidance is used during video instance segmentation. By varying the frame length from 1 to 32, the mask AP increases from $3 2 . 5 \%$ to $3 5 . 4 \%$ , which reveals that richer temporal information with multiple views of a segmented object indeed brings more gain to model performance. For the number of frame-level prototypes, we used 64 during training and testing. The results on YouTube-VIS in Table 8 show that the precision saturates for larger numbers of prototypes.
|
| 157 |
+
|
| 158 |
+
Table 3: Results of varying temporal memory length in our PCAN on YouTube-VIS.
|
| 159 |
+
|
| 160 |
+
<table><tr><td>Length</td><td>AP</td><td>AP50</td><td>AP75</td><td>AR1</td><td>AR10</td></tr><tr><td>1</td><td>32.5</td><td>53.0</td><td>33.3</td><td>33.5</td><td>38.9</td></tr><tr><td>2</td><td>33.7</td><td>53.8</td><td>35.3</td><td>33.9</td><td>39.5</td></tr><tr><td>4</td><td>33.9</td><td>54.0</td><td>36.8</td><td>34.1</td><td>40.0</td></tr><tr><td>8</td><td>34.2</td><td>53.7</td><td>37.6</td><td>34.4</td><td>40.3</td></tr><tr><td>16</td><td>34.6</td><td>53.7</td><td>38.3</td><td>35.4</td><td>40.5</td></tr><tr><td>32</td><td>35.4</td><td>53.8</td><td>39.1</td><td>35.9</td><td>41.0</td></tr></table>
|
| 161 |
+
|
| 162 |
+
Table 4: Effect of multi-layer prototypical feature fusion with tube length 4 on YouTube-VIS.
|
| 163 |
+
|
| 164 |
+
<table><tr><td>FPN Layer</td><td>AP</td><td>AP50</td><td>AP75</td><td>AR1</td><td>AR10</td></tr><tr><td>P3</td><td>30.8</td><td>51.7</td><td>32.0</td><td>32.6</td><td>37.0</td></tr><tr><td>P4</td><td>32.0</td><td>51.5</td><td>34.1</td><td>32.6</td><td>37.2</td></tr><tr><td>P5</td><td>32.9</td><td>52.1</td><td>35.9</td><td>33.2</td><td>38.6</td></tr><tr><td>P3-P4</td><td>33.1</td><td>52.3</td><td>35.6</td><td>33.6</td><td>38.5</td></tr><tr><td>P3-P5</td><td>33.9</td><td>54.0</td><td>36.8</td><td>34.1</td><td>40.0</td></tr></table>
|
| 165 |
+
|
| 166 |
+
Table 5: Comparison with non-local attention [39] and transformer [6, 41] on YouTube-VIS.
|
| 167 |
+
|
| 168 |
+
<table><tr><td rowspan="2">Length</td><td colspan="3">Prototypical Cross-Attention</td><td colspan="3">Non-local Attention</td><td colspan="3">Transformer (Multi-Head Self-Attention)</td></tr><tr><td>AP</td><td>FLOPs(B)</td><td>Memory(M)</td><td>AP</td><td>FLOPs(B)</td><td>Memory(M)</td><td>AP</td><td>FLOPs(B)</td><td>Memory(M)</td></tr><tr><td>2</td><td>33.7</td><td>5.8</td><td>323</td><td>33.2</td><td>24.3</td><td>2497</td><td>24.6</td><td>103.8</td><td>5321</td></tr><tr><td>4</td><td>33.9</td><td>12.0</td><td>652</td><td>33.3</td><td>49.1</td><td>4763</td><td>25.8</td><td>387.2</td><td>9844</td></tr><tr><td>8</td><td>34.2</td><td>23.7</td><td>1419</td><td>33.6</td><td>99.6</td><td>9631</td><td>28.3</td><td>1413.3</td><td>18762</td></tr></table>
|
| 169 |
+
|
| 170 |
+

|
| 171 |
+
Figure 4: Qualitative impact of our PCAM on YouTube-VIS. Mask colors encode object identity. Our frame-level PCAM (second row) helps provide consistent detections and preserve identities compared to the baseline (first row). The instance-level PCAM (fourth row) provides more accurate masks, while further improving identity consistency compared to not employing our module (third row).
|
| 172 |
+
|
| 173 |
+
Effect of multi-layer temporal aggregation Since we perform temporal feature aggregation on the extracted FPN features, to help deal with objects with partial occlusion and large-scale variation, we also study the effect of using different levels of the extracted FPN features. In Table 4, we select the FPN feature map from P3-P5 layers for (excluding P6 and P7 due to impractical computation cost), and perform prototypical temporal aggregation on each FPN layer. We find that multi-layer information is also important to final model performance.
|
| 174 |
+
|
| 175 |
+
Computation and memory efficiency In Table 5 we analyze different attention mechanisms. Compared to standard space-time memory reading using non-local attention [39, 28] or recent popular transformer [41, 6] with multi-head self-attention layer, the prototypical cross-attention with condensed prototypes not only enjoys high accuracy advantage, but also largely reduces the memory consumption and computation amount. For input tube length 8, the prototypical memory consumption is less than $10 \%$ of the transformer with negligible FLOPs computation due to the small number of representative prototypes in (5).
|
| 176 |
+
|
| 177 |
+
Effect of instance-level prototypical appearance module We analyze the instance-level prototypical cross-attention module, which represents each video tracklet using the contrastive prototypes. In
|
| 178 |
+
|
| 179 |
+
Table 6: Ablation study on number of instancelevel prototypes on YouTube-VIS.
|
| 180 |
+
|
| 181 |
+
<table><tr><td rowspan=1 colspan=1>Pos.Proto.Number丨Neg.Proto.Number</td><td rowspan=1 colspan=1>Pos.Proto.Number丨Neg.Proto.Number</td><td rowspan=1 colspan=1>AP AP50</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>32.5 53.0</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>32.4 52.3</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>32.1 52.4</td></tr><tr><td rowspan=2 colspan=1>15</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>32.7 52.8</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>33.1 53.6</td></tr><tr><td rowspan=1 colspan=1>30</td><td rowspan=1 colspan=1>30</td><td rowspan=1 colspan=1>33.9 54.1</td></tr><tr><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>50</td><td rowspan=1 colspan=1>33.6 53.8</td></tr></table>
|
| 182 |
+
|
| 183 |
+
Table 7: Ablation on instance-level EM feature propagation and updating on YouTube-VIS.
|
| 184 |
+
|
| 185 |
+
<table><tr><td>version</td><td>AP</td><td>AP50</td></tr><tr><td>No instance prototype propagation</td><td>33.5</td><td>53.2</td></tr><tr><td>Using initial instance prototype</td><td>33.0</td><td>52.8</td></tr><tr><td>Update momentum = 0.2</td><td>34.3</td><td>53.8</td></tr><tr><td>Update momentum = 0.5</td><td>34.0</td><td>53.6</td></tr></table>
|
| 186 |
+
|
| 187 |
+
Table 8: Ablation on number of framelevel prototypes on YouTube-VIS.
|
| 188 |
+
|
| 189 |
+
<table><tr><td>Proto.Number</td><td>AP</td><td>AP50</td></tr><tr><td>8</td><td>32.6</td><td>52.8</td></tr><tr><td>16</td><td>33.1</td><td>53.3</td></tr><tr><td>32</td><td>33.9</td><td>53.5</td></tr><tr><td>64</td><td>34.2</td><td>53.7</td></tr><tr><td>128</td><td>34.1</td><td>53.8</td></tr></table>
|
| 190 |
+
|
| 191 |
+
Table 9: Results of varying EM iterations for our PCAN on YouTube-VIS.
|
| 192 |
+
|
| 193 |
+
<table><tr><td>Iteration number</td><td>AP</td><td>AP50</td><td>AP75</td><td>AR1</td><td>AR10</td></tr><tr><td>1</td><td>33.3</td><td>53.4</td><td>35.8</td><td>33.2</td><td>38.8</td></tr><tr><td>2</td><td>33.7</td><td>53.9</td><td>36.4</td><td>33.6</td><td>39.3</td></tr><tr><td>4</td><td>33.7</td><td>54.1</td><td>36.5</td><td>33.9</td><td>39.5</td></tr><tr><td>6</td><td>33.9</td><td>54.0</td><td>36.8</td><td>34.1</td><td>40.0</td></tr><tr><td>8</td><td>33.6</td><td>53.6</td><td>36.1</td><td>33.7</td><td>39.3</td></tr></table>
|
| 194 |
+
|
| 195 |
+
Table 6, we study the influence of instance prototype number and the effect of foreground-background contrasting. Using both positive and negative prototypes improves AP from $3 2 . 5 \%$ to $3 3 . 9 \%$ . Compared to the single prototype representation, the GMM demonstrate a stronger appearance modeling ability. We further find that the performance saturates when the number is larger than 60. In the Figure 6 and supplementary file, we provide additional instance cross-attention maps visualization to highlight the various attended regions.
|
| 196 |
+
|
| 197 |
+
In Table 7, we investigate the effectiveness of instance prototype (including the both positive and negative ones) propagation in an online manner, and compared it with using the instance prototype in the initial frame or current frame. We find that updating object prototypes recurrently with a momentum of 0.2 improves video segmentation AP of $1 . 3 \%$ .
|
| 198 |
+
|
| 199 |
+
Influence of EM iteration number We study the influence of EM iteration number $T$ during condensing prototypes and the results are shown in Table 9. Using temporal memory length 4, we find that the accuracy gains of PCAN increase with more iterations from 1 to 6, and the improvement starts to saturate when $T \geqslant 6$ . We use the same iteration number during training and test.
|
| 200 |
+
|
| 201 |
+
Ablation study on KITTI-MOTS We also train PCAN on the KITTI-MOTS [37] training set and conduct ablations on the instance and frame PCAMs. In Table 10, PCAN with window size 8 on val set also shows significant improvements compared to the TrackR-CNN [37] (a two-stage tracker based on Mask R-CNN) on the benchmark. Note that many published methods on KITTI-MOTS, such as Vip-DeepLab [31], EagerMOT [17] and MOTSFusion [24], use 3D bounding boxes, LIDAR point clouds, or optical flow (PointTrack [44]). In contrast, our method only relies on RGB images.
|
| 202 |
+
|
| 203 |
+
Qualitative analysis In Figure 4, we showcase qualitative ablation results of PCAN on Youtube-VIS. Compared to the baseline, we see that our model results in more consistent segmentation and better tracking using prototypical cross-attention module. We also provide visual results on BDD100K in Figure 5, where PCAN produces robust tracking and segmentation results even under large object appearance change (first row) or low illumination (second row). In the 3rd row, PCAN has limitations in handling missing detections (the person in the first frame) with limited appearance information under extreme lighting, and produce tracking errors in the second frame when visible parts of the same car is totally different across frame and with low appearance similarity.
|
| 204 |
+
|
| 205 |
+
Cross-Attention Visualization In Figure 6, we visualize instance-level prototypical cross-attention of the interested car for both the corresponding foreground and background regions on three continuous frames on BDD100K, where the attended region of each object prototype reveals the implicit unsupervised temporal consistency. More visualization cases on instance and frame cross-attention maps and relevant analysis are in the supplementary file.
|
| 206 |
+
|
| 207 |
+
Societal impact PCAN has high potential impact in important applications, such as transportation, sports analysis, and self-driving vehicles. However, this powerful technology can be deployed in human monitoring and surveillance as well which raise ethical and privacy issues. Potential negative impact can be avoided by enforcing a strict and secure data privacy regulation such as the GDPR,
|
| 208 |
+
|
| 209 |
+
Table 10: Ablation study of PCAN on KITTI-MOTS [37] validation set.
|
| 210 |
+
|
| 211 |
+
<table><tr><td>Method</td><td>|Car-MOTSA</td><td>Ped-MOTSA</td><td>Car-MOTSP</td><td>Ped-MOTSP</td></tr><tr><td>TrackR-CNN [37]</td><td>87.8</td><td>65.1</td><td>87.2</td><td>75.7</td></tr><tr><td rowspan="3">PCAN w/o frame PCAM PCAN w/o instance PCAM</td><td>87.3</td><td>65.3</td><td>86.9</td><td>75.0</td></tr><tr><td>87.8</td><td>65.8</td><td>87.1</td><td>75.5</td></tr><tr><td>89.6</td><td>66.4</td><td>88.3</td><td>76.1</td></tr></table>
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
Figure 5: Qualitative results of our method on BDD100K. PCAN produces robust tracking and segmentation results under large motion and appearance changes (1st row) and heavy traffic in low-light conditions (2nd row). In the 3rd row, PCAN misses a detection (the person to the left in 1st frame), and produces tracking errors (2nd frame) when it covers totally different regions of the car with low appearance similarity. Zoom for better view. Video results are in the suppl. file.
|
| 215 |
+
|
| 216 |
+

|
| 217 |
+
Figure 6: Instance cross-attention maps visualization for the car specified by the red dotted bounding box on BDD100K. We select the first four foreground/background prototypes as example, where each one focuses on specific car sub-regions with implicit unsupervised temporal consistency over time. proper technology management education, and having an open dialogue among various stakeholders on how such technology should be deployed and regulated.
|
| 218 |
+
|
| 219 |
+
# 5 Conclusion
|
| 220 |
+
|
| 221 |
+
We present PCAN, a new online method for MOTS. PCAN first distills the space-time memory into a set of frame-level and instance-level prototypes, followed by cross-attention to retrieve rich information from the past frames. In contrast to most previous MOTS methods with limited temporal consideration, PCAN efficiently performs long-term temporal propagation and aggregation, and achieves large performance gain on the two largest MOTS benchmarks with low computation and memory cost. We validate the efficacy of PCAN on both the existing one-stage and two-stage trackers. We believe PCAN will significantly benefit more video understanding tasks in the future.
|
| 222 |
+
|
| 223 |
+
# Acknowledgments and Disclosure of Funding
|
| 224 |
+
|
| 225 |
+
This research is supported in part by the Research Grant Council of the Hong Kong SAR under grant no. 16201818 and Kuaishou Technology.
|
| 226 |
+
|
| 227 |
+
# References
|
| 228 |
+
|
| 229 |
+
[1] Ali Athar, Sabarinath Mahadevan, Aljoša Ošep, Laura Leal-Taixé, and Bastian Leibe. Stem-seg: Spatiotemporal embeddings for instance segmentation in videos. In ECCV, 2020. [2] Gedas Bertasius and Lorenzo Torresani. Classifying, segmenting, and tracking object instances in video with mask propagation. In CVPR, 2020.
|
| 230 |
+
[3] Daniel Bolya, Chong Zhou, Fanyi Xiao, and Yong Jae Lee. Yolact: Real-time instance segmentation. In ICCV, 2019.
|
| 231 |
+
[4] Sergi Caelles, Kevis-Kokitsi Maninis, Jordi Pont-Tuset, Laura Leal-Taixé, Daniel Cremers, and Luc Van Gool. One-shot video object segmentation. In CVPR, 2017.
|
| 232 |
+
[5] Jiale Cao, Rao Muhammad Anwer, Hisham Cholakkal, Fahad Shahbaz Khan, Yanwei Pang, and Ling Shao. Sipmask: Spatial information preservation for fast image and video instance segmentation. In ECCV, 2020.
|
| 233 |
+
[6] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In ECCV, 2020.
|
| 234 |
+
[7] Yunpeng Chen, Yannis Kalantidis, Jianshu Li, Shuicheng Yan, and Jiashi Feng. $a ^ { 2 }$ -nets: Double attention networks. In NeurIPS, 2018.
|
| 235 |
+
[8] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth 16x16 words: Transformers for image recognition at scale. In ICLR, 2020.
|
| 236 |
+
[9] Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He. Slowfast networks for video recognition. In ICCV, 2019.
|
| 237 |
+
[10] Andreas Geiger, Philip Lenz, and Raquel Urtasun. Are we ready for autonomous driving? the kitti vision benchmark suite. In CVPR, 2012.
|
| 238 |
+
[11] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In ICCV, 2017.
|
| 239 |
+
[12] Ping Hu, Fabian Caba, Oliver Wang, Zhe Lin, Stan Sclaroff, and Federico Perazzi. Temporally distributed networks for fast video semantic segmentation. In CVPR, 2020.
|
| 240 |
+
[13] Zhaojin Huang, Lichao Huang, Yongchao Gong, Chang Huang, and Xinggang Wang. Mask scoring r-cnn. In CVPR, 2019.
|
| 241 |
+
[14] Joakim Johnander, Martin Danelljan, Emil Brissman, Fahad Shahbaz Khan, and Michael Felsberg. A generative appearance model for end-to-end video object segmentation. In CVPR, 2019.
|
| 242 |
+
[15] Lei Ke, Yu-Wing Tai, and Chi-Keung Tang. Deep occlusion-aware instance segmentation with overlapping bilayers. In CVPR, 2021.
|
| 243 |
+
[16] Lei Ke, Yu-Wing Tai, and Chi-Keung Tang. Occlusion-aware video object inpainting. In ICCV, 2021.
|
| 244 |
+
[17] Aleksandr Kim, Aljoša Ošep, and Laura Leal-Taix’e. Eagermot: 3d multi-object tracking via sensor fusion. In IEEE International Conference on Robotics and Automation (ICRA), 2021.
|
| 245 |
+
[18] Minghan Li, Shuai Li, Lida Li, and Lei Zhang. Spatial feature calibration and temporal fusion for effective one-stage video instance segmentation. In CVPR, 2021.
|
| 246 |
+
[19] Xia Li, Zhisheng Zhong, Jianlong Wu, Yibo Yang, Zhouchen Lin, and Hong Liu. Expectation-maximization attention networks for semantic segmentation. In ICCV, 2019.
|
| 247 |
+
[20] Yingwei Li, Xiaojie Jin, Jieru Mei, Xiaochen Lian, Linjie Yang, Cihang Xie, Qihang Yu, Yuyin Zhou, Song Bai, and Alan L Yuille. Neural architecture search for lightweight non-local networks. In CVPR, 2020.
|
| 248 |
+
[21] Chung-Ching Lin, Ying Hung, Rogerio Feris, and Linglin He. Video instance segmentation tracking with a modified vae architecture. In CVPR, 2020.
|
| 249 |
+
[22] Dongfang Liu, Yiming Cui, Wenbo Tan, and Yingjie Chen. Sg-net: Spatial granularity network for one-stage video instance segmentation. In CVPR, 2021.
|
| 250 |
+
[23] Xiankai Lu, Wenguan Wang, Danelljan Martin, Tianfei Zhou, Jianbing Shen, and Van Gool Luc. Video object segmentation with episodic graph memory networks. In ECCV, 2020.
|
| 251 |
+
[24] Jonathon Luiten, Tobias Fischer, and Bastian Leibe. Track to reconstruct and reconstruct to track. IEEE Robotics and Automation Letters, 5(2):1803–1810, 2020.
|
| 252 |
+
[25] Tim Meinhardt, Alexander Kirillov, Laura Leal-Taixe, and Christoph Feichtenhofer. Trackformer: Multiobject tracking with transformers. arXiv preprint arXiv:2101.02702, 2021.
|
| 253 |
+
[26] Anton Milan, Laura Leal-Taixé, Ian Reid, Stefan Roth, and Konrad Schindler. Mot16: A benchmark for multi-object tracking. arXiv preprint arXiv:1603.00831, 2016.
|
| 254 |
+
[27] Anton Milan, Laura Leal-Taixé, Konrad Schindler, and Ian Reid. Joint tracking and segmentation of multiple targets. In CVPR, 2015.
|
| 255 |
+
[28] Seoung Wug Oh, Joon-Young Lee, Ning Xu, and Seon Joo Kim. Video object segmentation using space-time memory networks. In ICCV, 2019.
|
| 256 |
+
[29] Jiangmiao Pang, Linlu Qiu, Xia Li, Haofeng Chen, Qi Li, Trevor Darrell, and Fisher Yu. Quasi-dense similarity learning for multiple object tracking. In CVPR, 2021.
|
| 257 |
+
[30] Jiyang Qi, Yan Gao, Yao Hu, Xinggang Wang, Xiaoyu Liu, Xiang Bai, Serge Belongie, Alan Yuille, Philip Torr, and Song Bai. Occluded video instance segmentation. arXiv preprint arXiv:2102.01558, 2021.
|
| 258 |
+
[31] Siyuan Qiao, Yukun Zhu, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. Vip-deeplab: Learning visual perception with depth-aware video panoptic segmentation. In CVPR, 2021.
|
| 259 |
+
[32] Hongje Seong, Junhyuk Hyun, and Euntai Kim. Kernelized memory network for video object segmentation. In ECCV, 2020.
|
| 260 |
+
[33] Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. In NeurIPS, 2017.
|
| 261 |
+
[34] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. Fcos: Fully convolutional one-stage object detection. In ICCV, 2019.
|
| 262 |
+
[35] 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.
|
| 263 |
+
[36] Paul Voigtlaender, Yuning Chai, Florian Schroff, Hartwig Adam, Bastian Leibe, and Liang-Chieh Chen. Feelvos: Fast end-to-end embedding learning for video object segmentation. In CVPR, 2019.
|
| 264 |
+
[37] Paul Voigtlaender, Michael Krause, Aljosa Osep, Jonathon Luiten, Berin Balachandar Gnana Sekar, Andreas Geiger, and Bastian Leibe. Mots: Multi-object tracking and segmentation. In CVPR, 2019.
|
| 265 |
+
[38] Apoorv Vyas, Angelos Katharopoulos, and François Fleuret. Fast transformers with clustered attention. NeurIPS, 2020.
|
| 266 |
+
[39] Xiaolong Wang, Ross Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. In CVPR, 2018.
|
| 267 |
+
[40] Xiaolong Wang and Abhinav Gupta. Videos as space-time region graphs. In ECCV, 2018.
|
| 268 |
+
[41] Yuqing Wang, Zhaoliang Xu, Xinlong Wang, Chunhua Shen, Baoshan Cheng, Hao Shen, and Huaxia Xia. End-to-end video instance segmentation with transformers. arXiv preprint arXiv:2011.14503v1, 2020.
|
| 269 |
+
[42] Nicolai Wojke, Alex Bewley, and Dietrich Paulus. Simple online and realtime tracking with a deep association metric. In IEEE international conference on image processing (ICIP), 2017.
|
| 270 |
+
[43] Haozhe Xie, Hongxun Yao, Shangchen Zhou, Shengping Zhang, and Wenxiu Sun. Efficient regional memory network for video object segmentation. In CVPR, 2021.
|
| 271 |
+
[44] Zhenbo Xu, Wei Zhang, Xiao Tan, Wei Yang, Huan Huang, Shilei Wen, Errui Ding, and Liusheng Huang. Segment as points for efficient online multi-object tracking and segmentation. In Proceedings of the European Conference on Computer Vision (ECCV), 2020.
|
| 272 |
+
[45] Boyu Yang, Chang Liu, Bohao Li, Jianbin Jiao, and Qixiang Ye. Prototype mixture models for few-shot semantic segmentation. In ECCV, 2020.
|
| 273 |
+
[46] Linjie Yang, Yuchen Fan, and Ning Xu. Video instance segmentation. In ICCV, 2019.
|
| 274 |
+
[47] Linjie Yang, Yanran Wang, Xuehan Xiong, Jianchao Yang, and Aggelos K Katsaggelos. Efficient video object segmentation via network modulation. In CVPR, 2018.
|
| 275 |
+
[48] Shusheng Yang, Yuxin Fang, Xinggang Wang, Yu Li, Chen Fang, Ying Shan, Bin Feng, and Wenyu Liu. Crossover learning for fast online video instance segmentation. In ICCV, 2021.
|
| 276 |
+
[49] Zongxin Yang, Yunchao Wei, and Yi Yang. Collaborative video object segmentation by foregroundbackground integration. In ECCV, 2020.
|
| 277 |
+
[50] Fisher Yu, Haofeng Chen, Xin Wang, Wenqi Xian, Yingying Chen, Fangchen Liu, Vashisht Madhavan, and Trevor Darrell. Bdd100k: A diverse driving dataset for heterogeneous multitask learning. In CVPR, 2020.
|
| 278 |
+
[51] Chi Zhang, Guosheng Lin, Fayao Liu, Rui Yao, and Chunhua Shen. Canet: Class-agnostic segmentation networks with iterative refinement and attentive few-shot learning. In CVPR, 2019.
|
md/train/519VBzfEaKW/519VBzfEaKW.md
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# InfoGCL: Information-Aware Graph Contrastive Learning
|
| 2 |
+
|
| 3 |
+
Dongkuan $\mathbf { X } \mathbf { u } ^ { 1 }$ Wei Cheng2 Dongsheng Luo1 Haifeng Chen2 Xiang Zhang1 1The Pennsylvania State University 2NEC Labs America 1{dux19,dul262,xzz89}@psu.edu 2{weicheng,haifeng}@nec-labs.com
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Various graph contrastive learning models have been proposed to improve the performance of learning tasks on graph datasets in recent years. While effective and prevalent, these models are usually carefully customized. In particular, although all recent researches create two contrastive views, they differ greatly in view augmentations, architectures, and objectives. It remains an open question how to build your graph contrastive learning model from scratch for particular graph learning tasks and datasets. In this work, we aim to fill this gap by studying how graph information is transformed and transferred during the contrastive learning process and proposing an information-aware graph contrastive learning framework called InfoGCL. The key point of this framework is to follow the Information Bottleneck principle to reduce the mutual information between contrastive parts while keeping task-relevant information intact at both the levels of the individual module and the entire framework so that the information loss during graph representation learning can be minimized. We show for the first time that all recent graph contrastive learning methods can be unified by our framework. We empirically validate our theoretical analysis on both node and graph classification benchmark datasets, and demonstrate that our algorithm significantly outperforms the state-of-the-arts.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Inspired by their success in the vision and language domains, contrastive learning methods have been wildly adopted by recent progress in graph learning to improve the performance of a variety of tasks [42, 13, 22]. In a nutshell, these methods typically learn representations by creating two augmented views of a graph and maximizing the feature consistency between the two views. Inheriting the advantages of self-supervised learning, contrastive learning relieves graph representation learning from its reliance on label information in graph domain, where label information can be very costly or even impossible to collect while unlabeled/partially labeled data is common, such as chemical graph data [28]. Graph contrastive learning methods have achieved similar (and even better) performance as compared to the equivalent methods trained with labels on benchmark graph datasets [42, 13, 6].
|
| 12 |
+
|
| 13 |
+
Despite being effective and prevalent, existing graph contrastive learning models differ mostly in augmented view design, encoding architecture, and contrastive objective (refer to Table 1 in Appendix for more comparisons). For a learning task, it usually requires a substantial degree of domain expertise to carefully design and customize these modules for the specific dataset. For example, while both DGI [33] and InfoGraph [28] seek to obtain graph representations by maximizing the mutual information between patch-level and graph-level representations, they adopt different graph encoders, GCN [15] and GIN [38] respectively. mvgrl [13] applies graph diffusion convolution to construct the augmented view, while GCC [22] and GRACE [45] adopt subgraph sampling and graph perturbation, respectively.
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: Graph contrastive learning approaches consist of three stages: 1) a graph $\mathcal { G }$ undergoes view augmentation, $q _ { i } ( \cdot ) , q _ { j } ( \cdot )$ , to obtain two semantically similar views, $\mathbf { v } _ { i }$ , $\mathbf { v } _ { j }$ . 2) the two views are fed into view encoder networks, $f _ { i } ( \cdot )$ , $f _ { j } ( \cdot )$ , to extract latent representations, ${ \bf z } _ { i } , { \bf z } _ { j }$ . 3) the feature consistency between representations is maximized to optimize the objective function based on contrastive mode $( c _ { i } ( \cdot ) , c _ { j } ( \cdot ) )$ , where $c _ { i } ( \cdot ) , c _ { j } ( \cdot )$ are aggregation operations applied to representations.
|
| 17 |
+
|
| 18 |
+
The main question this paper attempts to answer is: how to perform contrastive learning for your learning tasks on specific graph datasets? However, answering this question is challenging. First, contrastive learning consists of multiple components, such as view augmentation and information encoding. For each of them, there are various choices. Numerous variations make it difficult to design models that are both robust and efficient. Existing graph contrastive learning approaches are carefully designed for different learning tasks on different datasets, however, none of them studies the guiding principles for choosing the best components. Second, graph data has unique properties that distinguish it from other types of data, such as rich structural information and highly diverse distribution [33, 28, 11, 10]. Thus, it is desirable to design the contrastive learning model that fits your graph data properties, even without any domain knowledge of the data.
|
| 19 |
+
|
| 20 |
+
We propose to address these challenges via Information Bottleneck (IB) [31], which provides a crucial principle for representation learning. Specifically, IB encourages the representations to be maximally informative about the target in the downstream task, which helps keep task-relevant information. Concurrently, IB discourages the representation learning from acquiring the task-irrelevant information from the input data, which is related to the idea of minimal sufficient statistics [27]. However, different from the typical representation learning, there are two information flows involved in the two augmented views in contrastive learning. Therefore, we extend the previous IB work [37, 43] and propose InfoGCL, an information-aware contrastive learning framework for graph data.
|
| 21 |
+
|
| 22 |
+
To study how information is transformed and transferred, we decouple a typical graph contrastive learning model into three sequential modules (as shown in Figure 1): view augmentation, view encoding, and representation contrasting. We further formalize how to find the optimal of the three modules into three optimization problems. To build the optimal graph contrastive learning model for the particular dataset and task, we argue that it is necessary and sufficient to minimize the mutual information between contrastive representations while maximizing task-relevant information at the levels of both individual module and entire framework. Our work is also motivated by the InfoMin theory [30], which suggests that a good set of views for contrastive learning in the vision domain should share the minimal information necessary to perform well at the downstream task. Beyond view selection, our work extends InfoMin to suggest principles of selecting view encodings and contrastive modes for graph learning considering the unique properties of graph data.
|
| 23 |
+
|
| 24 |
+
We suggest practically feasible principles to find the optimal modules in graph contrastive learning and show that all recent graph contrastive learning methods can be unified by these principles: i) the augmented views should contain as much task-relevant information as possible, while they should share as little information as possible; ii) the view encoder should be task-relevant and simple as much as possible; iii) the contrastive mode should keep task-relevant information as much as possible after contrasting. Besides, we also investigate the role of negative samples in graph contrastive learning and argue that negative samples are not necessarily required, especially when graph data is not extremely sparse. Our proposed method, InfoGCL, is validated on a rich set of benchmark datasets for both node-level and graph-level tasks, where we analyze its ability to capture the unique structural properties of the graph data. The results demonstrate that our algorithm achieves highly competitive performance with up to $5 . 2 \%$ relative improvement in accuracy on graph classification task and competitive results on node classification task over the state-of-the-art unsupervised methods.
|
| 25 |
+
|
| 26 |
+
# 2 Related Work
|
| 27 |
+
|
| 28 |
+
Graph Contrastive Learning. Some recent research efforts in graph domain have been attracted by the success of contrastive learning in vision and language domains [3, 8, 4]. A number of graph contrastive learning approaches have been proposed [28, 22, 42, 13]. Despite all of them creating two views and targeting at maximizing the feature disagreement between the two views, these methods are carefully designed and differ in various aspects. Deep graph Infomax (DGI) [33] applied the InfoMax principle [18] to graph data by contrasting the representations of node-level and graph-level for node classification tasks. Different from DGI, InfoGraph [28] aims at node classification tasks and it contrasts the representations of graph-level and substructure-level of different granularity. In addition, DGI and InfoGraph use different graph encoders to extract latent representations. mvgrl [13] studies both node and graph classification tasks. It transforms the adjacency matrix to a diffusion matrix and treat the two matrices as two congruent views. However, in GCC [22] and GRACE [45], subgraph sampling and graph perturbation are used to create the augmented views. GraphCL [42] explores the view augmentations approaches for graph contrastive learning. Specifically, it studies the approaches of node dropping, edge perturbation, attribute masking, and subgraph sampling. A recent work [44] also studies graph data augmentations. However, it focuses on graph neural networks for node classification and does not study the contrastive learning framework. Our method differs from them. We aim to answer the question how to perform contrastive learning for your graph data and tasks. Instead of carefully designing the architectures, we decouple typical graph contrastive learning into three stages and provide our InfoGCL principles to analyze the optimality theoretically and practically.
|
| 29 |
+
|
| 30 |
+
Information Bottleneck. Our method is related to the Information Bottleneck (IB) theory [31], which aims to find the best trade-off between accuracy and complexity when summarizing a random variable. IB has been recently used to study the deep learning approaches [26, 37, 43]. Specifically, IB expresses the trade-off between the mutual information measures $I ( \mathbf { D } , \mathbf { Z } )$ and $I ( \mathbf { Z } , \mathbf { y } )$ as
|
| 31 |
+
|
| 32 |
+
$$
|
| 33 |
+
\operatorname* { m a x } \mathbf { I } \mathbf { B } _ { \beta } = - I ( \mathbf { D } ; \mathbf { Z } ) + \beta I ( \mathbf { Z } ; \mathbf { y } ) ,
|
| 34 |
+
$$
|
| 35 |
+
|
| 36 |
+
where D, Z, y are the input, the latent representation and the task label, respectively. $\theta$ is a hyperparameter. In other words, IB aims to learn representation $\mathbf { Z }$ that is maximally expressive about y, while being minimally expressive about $\mathbf { D }$ . More recently, there are some efforts applying the IB theory to graph representation learning. [37] aims to generate both expressive and robust graph representations, while [43] studies the subgraph recognition problem. In contrast, our work focuses on graph contrastive learning, where the two augmented views make the optimization objective (information trade-off) different. Our work is also related to the idea of minimal sufficient statistics [27], which has been recently studied in the vision domain [30], claiming that a good set of image views should share the minimal information necessary to perform well at the downstream task. Different from [30], we focus on the graph domain and propose three stages considering the unique properties of graph data.
|
| 37 |
+
|
| 38 |
+
# 3 Preliminaries and Notations
|
| 39 |
+
|
| 40 |
+
Graph Representation Learning. A graph is denoted by $\mathcal { G } = \left( \mathbf { A } , \mathbf { X } \right)$ . $\mathbf { A } \in \mathbb { R } ^ { n \times n }$ is the adjacency matrix. $\mathbf { X } \in \mathbb { R } ^ { n \times d }$ is the node attribute matrix, where $d$ is the attribute dimension. In this work, we focus on both node-level and graph-level tasks. For node-level task, given graph $\mathcal { G }$ and the labels of a subset of nodes, denoted by ${ \bf Y } _ { v }$ , the goal is to learn the latent representation $\mathbf { z } _ { v }$ for each node $v$ such that $\mathbf { z } _ { v }$ preserves both network structures and node attributes, which can be further used to predict ${ \bf Y } _ { v }$ . For graph-level task, given a set of graphs $\mathbb { G } = \{ \mathcal { G } ^ { 1 } , \mathcal { G } ^ { 2 } , \cdot \cdot \cdot \mathrm ~ \} \}$ and the labels of some graphs, denoted by $\mathbf { Y } _ { g }$ , the goal is to learn the latent representation $\mathbf { z } _ { g }$ for each graph such that $\mathbf { z } _ { g }$ can be used to predict $\mathbf { Y } _ { g }$ . Typically, the graph data is fed into graph neural networks (GNNs) to generate the representations, such as $\mathbf { z } _ { g } = \mathbf { G } \mathbf { N } \mathbf { N } \mathbf { s } ( \mathcal { G } )$ .
|
| 41 |
+
|
| 42 |
+

|
| 43 |
+
Figure 2: Illustration of optimal views. (Left) The relationships between graph $\mathcal { G }$ , two views, $\mathbf { v } _ { i }$ , $\mathbf { v } _ { j }$ , and task $y$ in terms of information entropy. A, B, C, D, E are overlapping areas. Two views are contained by graph because views are functions of graph. (Middle) A, B, E become null when Eqs. (4)-(5) hold, which indicates the views and graph share the same amount of task-relevant information. (Right) C further becomes null when Eq. (3) holds, which indicates all the shared information between views is task-relevant, i.e., the views are optimal.
|
| 44 |
+
|
| 45 |
+
Graph Contrastive Learning. Given an input graph, graph contrastive learning aims to learn the representations of graph or nodes (for graph-level or node-level tasks respectively) through maximizing the feature consistency between two augmented views of the input graph via contrastive loss in the latent space. We decouple a typical graph contrastive learning model into three sequential modules.
|
| 46 |
+
|
| 47 |
+
(i) View augmentation. Graph $\mathcal { G }$ undergoes data augmentation $q ( \cdot )$ to obtain two views $\mathbf { v } _ { i }$ , $\mathbf { v } _ { j }$ , i.e., $\mathbf { v } _ { i } \sim q _ { i } ( \mathcal { G } )$ and $\mathbf { v } _ { j } \sim q _ { j } ( { \mathcal { G } } )$ . A view is represented as graph data, such as $\mathbf { v } _ { i } = ( \mathbf { A } _ { v _ { i } } , \mathbf { X } _ { v _ { i } } )$ , where $\mathbf { A } _ { v _ { i } } \in \mathbb { R } ^ { n \times n }$ and $\mathbf { X } _ { v _ { i } } \in \mathbb { R } ^ { n \times d }$ . In practice, view augmentation approaches include node dropping, edge perturbation, subgraph sampling, etc.
|
| 48 |
+
|
| 49 |
+
(ii) View encoding. Graph-level or node-level latent representation is extracted from views $\mathbf { v } _ { i } , \mathbf { v } _ { j }$ by using the view encoder networks $f ( \cdot )$ (a GNN backbone plus a projection MLP), i.e., $\mathbf { z } _ { i } \sim f _ { i } ( \mathbf { v } _ { i } )$ and $\mathbf { z } _ { j } \sim f _ { j } ( \mathbf { v } _ { j } )$ . The two encoders might or might not share parameters depending on whether they are from the same domain.
|
| 50 |
+
|
| 51 |
+
(iii) Representation contrasting. Given the latent representations, a contrastive loss is optimized to score the positive pairs $\mathbf { z } _ { i } , \mathbf { z } _ { j }$ higher compared to other negative pairs. Typically, the negative pairs are constructed from the augmented views of other graphs in the same minibatch. The InfoNCE loss [21] has been adopted as one of popular contrastive losses, which is defined as:
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\mathcal { L } _ { N C E } = - \mathbb { E } \left[ l o g \frac { e x p ( h ( \mathbf { z } _ { i , n } , \mathbf { z } _ { j , n } ) ) } { \sum _ { n ^ { \prime } = 1 } ^ { N } e x p ( h ( \mathbf { z } _ { i , n } , \mathbf { z } _ { j , n ^ { \prime } } ) ) } \right] ,
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
where $h ( \cdot )$ is a contrasting operation to score the agreement between two representations. Theoretically, minimizing the InfoNCE loss equivalently maximizes a lower bound on the mutual information between the views of positive pairs. In other words, $I ( \mathbf { z } _ { i } , \mathbf { z } _ { j } ) \geqslant l o g ( N ) - \mathcal { L } _ { N C E }$ , where $I ( \cdot )$ measures the mutual information.
|
| 58 |
+
|
| 59 |
+
# 4 Information-Aware Graph Contrastive Learning
|
| 60 |
+
|
| 61 |
+
In this paper, we study how to perform contrastive learning for specific graph tasks and datasets. In particular, we attempt to answer the following questions for graph contrastive learning: (i) What is the optimal augmented views? (ii) What is the optimal view encoder? (iii) What is the optimal contrastive mode?
|
| 62 |
+
|
| 63 |
+
# 4.1 View Augmentation
|
| 64 |
+
|
| 65 |
+
The goal of view augmentation is to create realistically rational data via the transformation approaches that do not affect the semantic label. Compared to the augmentation in other domains, graph view augmentation needs to consider the structural information of graph data, such as the node, the edge, and the subgraph. There are various graph view augmentation methods proposed recently. We follow a similar definition used in [42] to categorize four kinds of view augmentation approaches for graph data. Node dropping discards a certain part of nodes along with their edges in the input graph to create a new graph view. Edge perturbation perturbs the connectivity in the graph via adding or dropping partial edges. Attribute masking masks part of node attributes and assumes that the missing attributes can be well predicted by the remaining ones. Subgraph sampling samples a subgraph from the input graph. The rationale behind these approaches is that the semantic meaning of graph has certain robustness to graph perturbation.
|
| 66 |
+
|
| 67 |
+
The augmented views generated in the graph contrastive framework are typically used in a separate downstream task. To characterize what views are optimal for a downstream task, we define the optimality of views. The main motivation is: the optimal augmented views should contain the most task-relevant information, and the information shared between views should only be task-relevant.
|
| 68 |
+
|
| 69 |
+
Corollary 1. (Optimal Augmented Views) For a downstream task $T$ whose goal is to predict a semantic label $y$ , the optimal views, $\mathbf { v } _ { i } ^ { * } , \mathbf { v } _ { j } ^ { * } ,$ , generated from the input graph $\mathcal { G }$ are the solutions to the following optimization problem :
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
\begin{array} { c } { { ( \mathbf { v } _ { i } ^ { * } , \mathbf { v } _ { j } ^ { * } ) = \underset { \mathbf { v } _ { i } , \mathbf { v } _ { j } } { \arg \operatorname* { m i n } I ( \mathbf { v } _ { i } ; \mathbf { v } _ { j } ) } } } \\ { { s . t . ~ I ( \mathbf { v } _ { i } ; y ) = I ( \mathbf { v } _ { j } ; y ) } } \\ { { I ( \mathbf { v } _ { i } ; y ) = I ( \mathcal { G } ; y ) } } \end{array}
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
This says that for the optimal graph views, the amount of information shared between them is minimized (Eq. (3)), while the two views contain the same amount of information with respect to $y$ (Eq. (4)), which is also the amount of information that the input gprah contains about the task (Eq. (5)). The illustration of the optimal views is shown in Figure 2 and the proof is in the Appendix.
|
| 76 |
+
|
| 77 |
+
# 4.2 View Encoding
|
| 78 |
+
|
| 79 |
+
View encoding aims to extract the latent representations of nodes or graphs via feeding the data of two views into view encoder networks such that the generated representations preserve both structure and attribute information in the views. The view encoders are quite flexible in graph contrastive learning and typically they are GCN [15], GAT [32], or GIN [38], etc.
|
| 80 |
+
|
| 81 |
+
The representations extracted via view encoding are further utilized to optimize the objective function of contrastive learning. After well trained, the view encoders are used to generate the graph/node representations for a downstream task. To characterize what encoders are optimal, we define the optimality of view encoders for graph contrastive learning. The main motivation is: the representation generated by the optimal encoder for a view should keep all the shared information by the two contrastive views, meanwhile the kept information is all task-relevant.
|
| 82 |
+
|
| 83 |
+
Corollary 2. (Optimal View Encoder) Given the optimal views, $\mathbf { v } _ { i } ^ { * } , \mathbf { v } _ { j } ^ { * }$ , for a downstream task $T$ whose goal is to predict a semantic label $y$ , the optimal view encoder for view $\mathbf { v } _ { i } ^ { * }$ is the solution to the following optimization problem :
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
\boldsymbol f _ { i } ^ { * } = \arg \operatorname* { m i n } _ { \boldsymbol f _ { i } } I ( f _ { i } ( \mathbf { v } _ { i } ^ { * } ) ; \mathbf { v } _ { i } ^ { * } )
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
s . t . \ I ( f _ { i } ( \mathbf { v } _ { i } ^ { * } ) ; \mathbf { v } _ { j } ^ { * } ) = I ( \mathbf { v } _ { i } ^ { * } ; \mathbf { v } _ { j } ^ { * } )
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
It indicates that for the optimal view encoder, the amount of information shared between the optimal view and the extracted representation is minimized (Eq. (6)), while the information shared between the two optimal views is kept after the encoding process of one view (Eq. (7)). The illustration of the optimal encoder is shown in Figure 3 and the proof is illustrated in the Appendix.
|
| 94 |
+
|
| 95 |
+
# 4.3 Representation Contrasting
|
| 96 |
+
|
| 97 |
+
To allow flexible contrasting for graph data, we consider contrastive modes similar to [13]. A contrastive mode is denoted by $( c _ { i } ( \cdot ) , c _ { j } ( \cdot ) )$ , where $c _ { i } ( \cdot )$ , $c _ { j } ( \cdot )$ are the aggregation operations applied to the representations extracted by view encoders, The contrastive modes are unique to graph data because of the structural information inside a graph. Specifically, we consider five contrastive modes. In global-global mode, the graph representations from two views are contrasted. Thus, $c _ { i } ( \cdot )$ , $c _ { j } ( \cdot )$ are averaging aggregation operations in this mode. In local-global mode, we contrast the node representations from one view with the graph representations from the other view. Thus, $c _ { i } ( \cdot )$ , $c _ { j } ( \cdot )$ are the identical transformation and averaging aggregation operations, respectively. In local-local mode, the node representations from two views are contrasted. In multi-scale mode, we contrast graph representation of one view with the intermediate representation from the other. In hybrid mode, both global-global and local-global are applied.
|
| 98 |
+
|
| 99 |
+

|
| 100 |
+
Figure 3: Illustration of optimal view encoding. (Left) The relationships between two (optimal) views, $\mathbf { v } _ { i } ^ { * }$ , $\mathbf { v } _ { j } ^ { * }$ , task $y$ , and representation $\mathbf { z } _ { i }$ in terms of information entropy. A, B, C are null because the two views are optimal here. $\mathbf { z } _ { i }$ is contained by view $\mathbf { v } _ { i } ^ { * }$ because representations are functions of views. (Middle) $\mathbf { z } _ { i }$ covers $\mathbf { D }$ when Eq. (7) holds, which indicates the shared information between views is kept after encoding. $( R i g h t )$ View $\mathbf { z } _ { i }$ further exactly covers $\mathbf { D }$ and the view encoding becomes optimal, i.e., $\mathbf { z } _ { i } ^ { * }$ , which indicates all the information shared between view $\mathbf { v } _ { i } ^ { * }$ and representation $\mathbf { z } _ { i } ^ { * }$ is task-relevant.
|
| 101 |
+
|
| 102 |
+
To characterize which mode is optimal, we define the optimality of contrastive mode for graph contrastive learning. The main motivation is: the optimal contrastive mode keeps the most taskrelevant information after the representations are aggregated. The proof is included in the Appendix.
|
| 103 |
+
|
| 104 |
+
Corollary 3. (Optimal Contrastive Mode) Given the latent representations, $\mathbf { z } _ { i } ^ { * }$ , $\mathbf { z } _ { j } ^ { \ast }$ , extracted by the optimal view encoders, i.e., $\mathbf { z } _ { i } ^ { * } = f _ { i } ^ { * } ( \mathbf { v } _ { i } ^ { * } )$ , $\mathbf { z } _ { j _ { - } } ^ { * } = f _ { j _ { - } } ^ { * } ( \mathbf { v } _ { j } ^ { * } )$ , and a downstream task $T$ with label $y _ { \mathrm { { i } } }$ , the optimal contrastive mode is the solution to the following optimization problem, where $c _ { i }$ , $c _ { j }$ are the aggregation operations applied to the latent representations:
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
\displaystyle ( c _ { i } ^ { * } , c _ { j } ^ { * } ) = \arg \operatorname* { m i n } _ { ( c _ { i } , c _ { j } ) } - I ( c _ { i } ( \mathbf { z } _ { i } ^ { * } ) ; c _ { j } ( \mathbf { z } _ { j } ^ { * } ) ) .
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
# 4.4 InfoGCL Principle
|
| 111 |
+
|
| 112 |
+
According to our proposed corollaries, we can theoretically design the optimal contrastive learning approach for our specific graph data and task. However, in real-world scenarios, the conditions to meet the exact optimality of contrastive learning is hard or even not practically possible to reach because of data noise and limited model capability. Therefore, we propose to achieve the optimal for each stage independently and practically, which is an approximation to achieve the original optimality. Specifically, we make the following propositions to address the questions of the optimal views, optimal view encoder, and optimal contrastive mode.
|
| 113 |
+
|
| 114 |
+
Proposition 1. For a task $T$ with label $y _ { ; }$ , given a bunch of graph view augmentation methods, $\{ q _ { 1 } ( \cdot ) _ { : }$ , $q _ { 2 } ( \cdot ) , \cdot \cdot \cdot \}$ , that create two views $\mathbf { v } _ { i }$ , $\mathbf { v } _ { j }$ , the recommended augmentation methods are the ones, $q _ { i } ( \cdot )$ , $q _ { j } ( \cdot )$ , that maximize $I ( \mathbf { v } _ { i } ; y ) + I ( \mathbf { v } _ { j } ; y ) - I ( \mathbf { v } _ { i } ; \mathbf { v } _ { j } )$ , i.e., the area of $A { + } B { + } D$ in Figure 2.
|
| 115 |
+
|
| 116 |
+
Proposition 2. Given a task $T$ with label $y$ and a set of view encoders, $\{ f _ { i } ^ { 1 } ( \cdot ) , f _ { i } ^ { 2 } ( \cdot ) , \cdot \cdot \cdot \ \} ,$ , that generate representation $\mathbf { z } _ { i }$ via taking view $\mathbf { v } _ { i }$ as input, the recommended view encoder is the one that maximizes the mutual information between $\mathbf { v } _ { i }$ , $\mathbf { z } _ { i }$ and $y$ . Symmetrically the same for view $\mathbf { v } _ { j }$ .
|
| 117 |
+
|
| 118 |
+
Proposition 3. Given a task $T$ with label $y$ , the extracted representations, $z _ { i } , \ z _ { j }$ , and a set of aggregation operations, $\{ c _ { 1 } ( \cdot ) , c _ { 2 } ( \cdot ) , \cdot \cdot \cdot \ \} ,$ , the recommended contrastive mode is the one, $( c _ { i } , c _ { j } )$ , that has the largest amount of mutual information between $c _ { i } ( \mathbf { z } _ { i } )$ , $c _ { j } ( \mathbf { z } _ { j } )$ and $y$ .
|
| 119 |
+
|
| 120 |
+
The qualitative and quantitative evaluation of these propositions are shown in Section 5.3.
|
| 121 |
+
|
| 122 |
+
# 4.5 Role of Negative Samples
|
| 123 |
+
|
| 124 |
+
Current graph contrastive learning approaches heavily depend on negative samples. However, recent progresses of contrastive learning in vision domain indicate that negative samples are not necessarily required [8, 4], of which the main benefit is to avoid careful treatment to retrieve the negative pairs. To study the influence of negative samples on graph contrastive learning, we follow the framework of SimSiam [4] to revise the loss function as Eq.(9). A very recent work [29] also studies graph contrastive learning without negative samples. Different from it, we focus on both node and graph classification tasks.
|
| 125 |
+
|
| 126 |
+
Table 1: Dataset statistics.
|
| 127 |
+
|
| 128 |
+
<table><tr><td rowspan="2"></td><td colspan="6">Graph Task Datasets</td><td colspan="3">Node Task Datasets</td></tr><tr><td>MUTAG</td><td>PTC-MR</td><td>IMDB-B</td><td>IMDB-M</td><td>NCI1</td><td>COLLAB</td><td>Cora</td><td>Citeseer</td><td>Pubmed</td></tr><tr><td>#Graphs</td><td>188</td><td>344</td><td>1000</td><td>1500</td><td>4110</td><td>5000</td><td>1</td><td>1</td><td>1</td></tr><tr><td>#Nodes</td><td>17.9</td><td>14.3</td><td>19.8</td><td>13.0</td><td>29.9</td><td>74.5</td><td>3327</td><td>2708</td><td>19717</td></tr><tr><td>#Edges</td><td>19.8</td><td>14.7</td><td>193.1</td><td>65.9</td><td>1.1</td><td>33.0</td><td>4732</td><td>5429</td><td>44338</td></tr><tr><td>#Classes</td><td>2</td><td>2</td><td>2</td><td>2</td><td>2</td><td>3</td><td>6</td><td>7</td><td>3</td></tr></table>
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\mathcal { L } = - \frac { 1 } { N } \sum _ { n = 1 } ^ { N } \frac { \mathbf { z } _ { i , n } } { \| \mathbf { z } _ { i , n } \| } \cdot \frac { \mathbf { z } _ { j , n } } { \| \mathbf { z } _ { j , n } \| } ,
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
# 5 Experiments
|
| 135 |
+
|
| 136 |
+
In this section, we evaluate our InfoGCL with a number of experiments. We first describe datasets, evaluation protocol, and experimental setup. Then, we present the experimental results on both node and graph classification. Last, we analyze our proposed principles via ablation study.
|
| 137 |
+
|
| 138 |
+
# 5.1 Setup
|
| 139 |
+
|
| 140 |
+
We use both graph classification and node classification benchmark datasets that are widely used in the existing graph contrastive learning approaches. The graph classification datasets include MUTAG [17], PTC-MR [17], IMDB-B [40], IMDB-M [40], NCI1 [34], and COLLAB [40]. MUTAG is a collection of nitroaromatic compounds represented as graphs, where vertices stand for atoms and edges represent bonds between atoms. PTC-MR is a collection of 344 chemical compounds which report the carcinogenicity for rats. IMDB-B and IMDB-M are two movie collaboration datasets, where nodes represent actors/actress and there is an edge between them if they appear in the same movie. In NCI1, graphs are the representation of chemical compounds, where vertices stand for atoms and edges represent bonds between atoms. COLLAB is a collaboration dataset, where researchers are nodes and an edge indicates collaboration between two researchers. The node classification datasets include Citeseer, Cora, and Pubmed [23]. All of them are citation networks, where nodes are documents and edges are citation links. These datasets are summarized in Table 1.
|
| 141 |
+
|
| 142 |
+
We closely follow the evaluation protocol of previous state-of-the-art graph contrastive learning approaches. For graph classification, we report the mean 10-fold cross validation accuracy after 5 runs followed by a linear SVM. The linear SVM is trained by applying cross validation on training data folds and the best mean accuracy is reported. For node classification, we report the mean accuracy on test set after 50 runs of training followed by a linear neural network model. To make comparison fair, we adopt the basic setting of InfoGraph for graph classification. We conduct experiment with the values of the number of GNN layers, the number of epochs, batch size, the parameter C of SVM in the sets {2, 4, 8, 12}, {10, 20, 40, 100}, {32, 64, 128, 256} and $\{ 1 0 ^ { - 3 } , \ : \mathrm { { \dot { 1 } 0 ^ { - 2 } } } , . . . , \ : 1 0 ^ { 2 } , 1 0 ^ { 3 } \ : \ : \}$ , respectively. We adopt the basic setting of DGI for node classification. Specifically, we set the number of GNN layers to 1 and experiment with the batch size in the set {2, 4, 8}. The hidden dimension of representations is set to 512. We also apply the early stopping strategy.
|
| 143 |
+
|
| 144 |
+
# 5.2 Experimental Results
|
| 145 |
+
|
| 146 |
+
To evaluate our method InfoGCL on graph classification, we use thhree categories of baselines. The kernel approaches include shortest path kernel (SP) [2], Graphlet kernel (GK) [25], WeisfeilerLehman sub-tree kernel (WL) [24], deep graph kernels (DGK) [39], and multi-scale Laplacian kernel (MLG) [16]. The supervised baselines include GraphSAGE [12], GCN [15], GIN [38], GAT [32]. We also compare with the unsupervised approaches, including RandomWalk [7], node2vec [9], sub2vec [14], graph2vec [20], InfoGraph [28], GraphCL [42], and mvgrl [13]. Table 2 shows the graph classification results. We observe that our approach achieves the best results compared to other unsupervised approaches. Our approach also outperforms or matches the best kernel approaches across the datasets. Even compared with the supervised ones, our approach achieves the best in 2 out of 6 datasets and the results of our approach on other 4 dataset are among the top.
|
| 147 |
+
|
| 148 |
+
Table 2: Graph classification results $( \% )$
|
| 149 |
+
|
| 150 |
+
<table><tr><td>Method</td><td>MUTAG</td><td>PTC-MR</td><td>IMDB-B</td><td>IMDB-M</td><td>NCI1</td><td>COLLAB</td></tr><tr><td colspan="7">Kernel Approaches</td></tr><tr><td>SP</td><td>85.2 ± 2.4</td><td>58.2 ± 2.4</td><td>55.6± 0.2</td><td>38.0±0.3</td><td>73.5 ± 0.1</td><td></td></tr><tr><td>GK</td><td>81.7 ± 2.1</td><td>57.3 ± 1.4</td><td>65.9 ± 1.0</td><td>43.9 ± 0.4</td><td>66.0 ± 0.1</td><td>72.8± 0.3</td></tr><tr><td>WL</td><td>80.7 ± 3.0</td><td>58.0 ± 0.5</td><td>72.3 ± 3.4</td><td>47.0 ± 0.5</td><td>80.0± 0.5</td><td>78.9 ± 1.9</td></tr><tr><td>DGK</td><td>87.4 ± 2.7</td><td>60.1 ± 2.6</td><td>67.0 ± 0.6</td><td>44.6 ± 0.5</td><td>80.3 ± 0.5</td><td>73.1 ± 0.3</td></tr><tr><td>MLG</td><td>87.9 ± 1.6</td><td>63.3 ± 1.5</td><td>66.6 ± 0.3</td><td>41.2 ± 0.0</td><td>80.8 ± 1.3</td><td></td></tr><tr><td colspan="7">Supervised Approaches</td></tr><tr><td>GraphSAGE</td><td>85.1 ± 7.6 63.9 ± 7.7</td><td></td><td>72.3 ± 5.3</td><td>50.9 ± 2.2</td><td>77.7 ± 1.5</td><td>68.3 ± 4.2</td></tr><tr><td>GCN</td><td>85.6 ± 5.8</td><td>64.2 ± 4.3</td><td>74.0± 3.4</td><td>51.9 ± 3.8</td><td>80.2 ± 2.0</td><td>79.0 ± 1.8</td></tr><tr><td>GIN-0</td><td>89.4 ± 5.6</td><td>64.6 ± 7.0</td><td>75.1 ± 5.1</td><td>52.3 ± 2.8</td><td>82.7 ± 1.7</td><td>80.2 ± 1.9</td></tr><tr><td>GIN-e</td><td>89.0 ± 6.0</td><td>63.7 ±8.2</td><td>74.3 ± 5.1</td><td>52.1 ± 3.6</td><td>82.7 ± 1.6</td><td>80.1 ± 1.9</td></tr><tr><td>GAT</td><td>89.4 ± 6.1</td><td>66.7 ± 5.1</td><td>70.5 ± 2.3</td><td>47.8 ± 3.1</td><td>66.6 ± 2.2</td><td>67.4 ± 2.9</td></tr><tr><td colspan="7">Unsupervised Approaches</td></tr><tr><td>RandomWalk</td><td>83.7 ± 1.5</td><td>57.9 ± 1.3</td><td>50.7±0.3</td><td>34.7 ± 0.2</td><td>64.3 ± 0.3</td><td></td></tr><tr><td>node2vec</td><td>72.6 ±10.2</td><td>58.6±8.0</td><td>50.2 ± 0.9</td><td>36.0 ± 0.7</td><td>54.9 ± 1.6</td><td>56.1 ± 0.2</td></tr><tr><td>sub2vec</td><td>61.1 ± 15.8</td><td>60.0 ± 6.4</td><td>55.3 ± 1.5</td><td>36.7 ± 0.8</td><td>52.8 ±1.5</td><td>-</td></tr><tr><td>graph2vec</td><td>83.2 ±9.6</td><td>60.2 ± 6.9</td><td>71.1 ± 0.5</td><td>50.4 ± 0.9</td><td>75.4 ±1.2</td><td></td></tr><tr><td>InfoGraph</td><td>89.0 ± 1.1</td><td>61.7 ± 1.4</td><td>73.0± 0.9</td><td>49.7 ± 0.5</td><td>76.2 ±1.4</td><td>70.7 ± 1.1</td></tr><tr><td>GraphCL</td><td>86.8 ± 1.3</td><td>61.3 ± 2.1</td><td>71.1 ± 0.4</td><td>49.2 ± 0.6</td><td>77.9 ± 0.4</td><td>71.4 ± 1.2</td></tr><tr><td>mvgrl</td><td>89.7 ± 1.1</td><td>62.5 ± 1.7</td><td>74.2 ± 0.7</td><td>51.2 ± 0.5</td><td>77.0 ± 0.8</td><td>76.0 ± 1.2</td></tr><tr><td></td><td></td><td></td><td></td><td>51.4 ± 0.8</td><td>80.2 ± 0.6</td><td></td></tr><tr><td>InfoGCL</td><td>91.2 ± 1.3</td><td>63.5 ± 1.5</td><td>75.1 ± 0.9</td><td></td><td></td><td>80.0 ± 1.3</td></tr></table>
|
| 151 |
+
|
| 152 |
+
Table 3: Node classification results $( \% )$ .
|
| 153 |
+
|
| 154 |
+
<table><tr><td>Method</td><td>Cora</td><td>Citeseer</td><td>Pubmed</td></tr><tr><td></td><td>Supervised Approaches</td><td></td><td></td></tr><tr><td>MLP</td><td>55.1</td><td>46.5</td><td>71.4</td></tr><tr><td>ICA</td><td>75.1</td><td>69.1</td><td>73.9</td></tr><tr><td>LP</td><td>68.0</td><td>45.3</td><td>63.0</td></tr><tr><td>ManiReg</td><td>59.5</td><td>60.1</td><td>70.7</td></tr><tr><td>SemiEmb</td><td>59.0</td><td>59.6</td><td>71.7</td></tr><tr><td>Planetoid</td><td>75.7</td><td>64.7</td><td>77.2</td></tr><tr><td>Chebyshev</td><td>81.2</td><td>69.8</td><td>74.4</td></tr><tr><td>GCN</td><td>81.5</td><td>70.3</td><td>79.0</td></tr><tr><td>JKNet</td><td>82.7 ± 0.4</td><td>73.0 ± 0.5</td><td>77.9 ± 0.4</td></tr><tr><td>GAT</td><td>83.0 ± 0.7</td><td>72.5± 0.7</td><td>79.0 ± 0.3</td></tr><tr><td></td><td>Unsupervised Approaches</td><td></td><td></td></tr><tr><td>Linear</td><td>47.9 ± 0.4</td><td>49.3 ± 0.2</td><td>69.1 ± 0.3</td></tr><tr><td>DeepWalk</td><td>70.7 ± 0.6</td><td>51.4 ± 0.5</td><td>74.3 ± 0.9</td></tr><tr><td>GAE</td><td>71.5 ± 0.4</td><td>65.8 ±0.4</td><td>72.1 ± 0.5</td></tr><tr><td>VERSE</td><td>72.5 ± 0.3</td><td>55.5± 0.4</td><td></td></tr><tr><td>DGI</td><td>83.8 ± 0.5</td><td>72.0 ± 0.6</td><td>77.9 ± 0.3</td></tr><tr><td>GraphCL</td><td>82.5 ± 0.1</td><td>73.1 ± 0.2</td><td></td></tr><tr><td>mvgrl</td><td>86.8 ± 0.5</td><td>73.3 ± 0.5</td><td>80.1 ± 0.7</td></tr><tr><td>InfoGCL</td><td>83.5 ± 0.3</td><td>73.5 ± 0.4</td><td>79.1 ± 0.2</td></tr></table>
|
| 155 |
+
|
| 156 |
+
For node classification tasks, we compare InfoGCL with some supervised approaches and unsupervised approaches. The supervised baselines include a simple MLP model, iterative classification algorithm (ICA) [19], manifold regularization (ManiReg) [1], semi-supervised embedding (SemiEmb) [35], Planetoid [41], Chebyshev [5], GCN, JKNet [36], GAT. Table 3 shows the node classification results. It is observed that our approach achieves the state-of-the-art results and competes the best one with respect to the existing unsupervised approaches. Compared to supervised baselines, our approach outperforms all the baselines.
|
| 157 |
+
|
| 158 |
+
<table><tr><td>Method</td><td>MUTAG</td><td>IMDB-B</td><td>COLLAB</td><td>Cora</td><td>Citeseer</td><td>Pubmed</td></tr><tr><td>InfoGCL (w/o neg)</td><td>91.0 ± 1.4</td><td>75.1± 0.5</td><td>80.2 ±1.0</td><td>78.6 ± 0.4</td><td>70.4 ± 0.6</td><td>77.4±0.7</td></tr><tr><td>InfoGCL (w/ neg)</td><td>91.2 ± 1.3</td><td>75.1 ± 0.9</td><td>80.0± 1.3</td><td>83.5±0.3</td><td>73.5 ± 0.4</td><td>79.1±0.2</td></tr></table>
|
| 159 |
+
|
| 160 |
+
Table 4: Comparison between InfoGCL with negative samples and without negative samples.
|
| 161 |
+
|
| 162 |
+
# 5.3 Evaluation of InfoGCL Principle
|
| 163 |
+
|
| 164 |
+
We can unify the existing graph contrastive learning methods through the perspective of InfoGCL principle: all recent graph contrastive learning methods can be decoupled into three stages that implicitly follow the InfoGCL principle, though being different in model architecture design and optimization strategies. Below, we analyze some observations from several recent work. Because of the limited space, please refer to the Appendix for more results of the quantitative analysis.
|
| 165 |
+
|
| 166 |
+
Obs. i. Composing a graph and its augmentation benefits downstream performance [42]. Compared to composing a graph and the graph itself, augmentation leads to smaller $I ( \mathbf { v } _ { i } ; \mathbf { v } _ { j } )$ (Proposition 1).
|
| 167 |
+
|
| 168 |
+
Obs. ii. Composing different augmentations benefits more [42]. Compared to composing a graph and its augmentations, two augmentations further decrease $I ( \mathbf { v } _ { i } ; \mathbf { v } _ { j } )$ (Proposition 1).
|
| 169 |
+
|
| 170 |
+
Obs. iii. Node dropping and subgraph sampling are generally beneficial across datasets [42]. When compared to attribute masking and edge perturbation, they change the semantic meaning of the graph relatively slightly, which leads to higher $I ( \mathbf { v } _ { i } ; y )$ , $I ( \mathbf { v } _ { j } ; \bar { y } )$ (Proposition 1).
|
| 171 |
+
|
| 172 |
+
Obs. iv. Edge perturbation benefits social networks but hurts some biochemical molecules [42]. The semantic meaning of social networks are robust to edge perturbation. However, the semantic meaning of some biochemical molecules are determined by local connection pattern, where edge perturbation decreases $I ( \mathbf { v } _ { i } ; y )$ (Proposition 1).
|
| 173 |
+
|
| 174 |
+
Obs. v. Contrasting node and graph representations consistently performs better than other contrastive modes across benchmarks [13]. Compared to other contrastive modes, node-graph (i.e., local-global) mode generally extracts more graph structure information, which benefits predicting task label $y$ (Proposition 3).
|
| 175 |
+
|
| 176 |
+
# 5.4 Effect of Negative Samples
|
| 177 |
+
|
| 178 |
+
To study the effect of negative samples on graph contrastive learning, we follow SimSiam [4] and design the objective as Eq. (9). We conduct experiments on three graph task and three node task datasets. The results are reported in Table 4. It is observed that the negative samples show little influence on the three graph task datasets, while performance drops on the three node task datasets, especially the Cora dataset.
|
| 179 |
+
|
| 180 |
+
According to the dataset statistics summarized in Table 1, we see the networks of Cora, Citeseer, Pubmed are much sparser (in terms of network topology). Furthermore, we know the node features of these three datasets are also much sparser (one-hot encoding with high dimensionality). We speculate this because the contrastive learning models tends to collapse easier if negative samples are not used, especially when data is too sparse. Therefore,we make the hypothesis: negative samples benefit graph modeling, especially when i) network topology, and ii) node features are extremely sparse.
|
| 181 |
+
|
| 182 |
+
# 6 Conclusion and Limitations
|
| 183 |
+
|
| 184 |
+
We propose InfoGCL, an information-aware graph contrastive learning framework for graph contrastive learning. Existing graph contrastive learning approaches are usually carefully designed. We aim to answer how to perform contrastive learning for your learning tasks on specific graph data. Our method decouples the typical contrastive learning approaches into three sequential modules and provides the theoretical analysis for reaching the optimality. To address the questions of optimality in a practical way, we propose the InfoGCL principle, which is implicitly followed by all recent graph contrastive learning approaches. In addition, we explore the role of negative samples in graph contrastive learning and find negative samples are not necessarily required. Experiments on both node and graph benchmark datasets demonstrate the effectiveness of our method. Note that our method is not without limitations. We can further improve our method by designing better practical approximations to the theoretical optimality of graph contrastive learning.
|
| 185 |
+
|
| 186 |
+
# Funding Transparency Statement
|
| 187 |
+
|
| 188 |
+
This project was partially supported by NSF projects IIS-1707548 and CBET-1638320.
|
| 189 |
+
|
| 190 |
+
# References
|
| 191 |
+
|
| 192 |
+
[1] Mikhail Belkin, Partha Niyogi, and Vikas Sindhwani. Manifold regularization: A geometric framework for learning from labeled and unlabeled examples. J. Mach. Learn. Res, 7, 2006. [2] Karsten M. Borgwardt and Hans-Peter Kriegel. Shortest-path kernels on graphs. In ICDM, 2005. [3] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey E. Hinton. A simple framework for contrastive learning of visual representations. ICML, 2020. [4] Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. CoRR, abs/2011.10566, 2020. [5] Michaël Defferrard, Xavier Bresson, and Pierre Vandergheynst. Convolutional neural networks on graphs with fast localized spectral filtering. In NIPS, 2016. [6] Yuanqi Du, Shiyu Wang, Xiaojie Guo, Hengning Cao, Shujie Hu, Junji Jiang, Aishwarya Varala, Abhinav Angirekula, and Liang Zhao. Graphgt: Machine learning datasets for deep graph generation and transformation. 2021. [7] Gartner, Flach, and Wrobel. On graph kernels: Hardness results and efficient alternatives. In COLT Workshop, 2003. [8] Jean-Bastien Grill, Florian Strub, Florent Altché, Corentin Tallec, Pierre Richemond, Elena Buchatskaya, Carl Doersch, Bernardo Pires, Zhaohan Guo, Mohammad Azar, Bilal Piot, Koray Kavukcuoglu, Rémi Munos, and Michal Valko. Bootstrap your own latent: A new approach to self-supervised learning. 2020. [9] Aditya Grover and Jure Leskovec. node2vec: Scalable feature learning for networks. In KDD, 2016. [10] Xiaojie Guo, Yuanqi Du, and Liang Zhao. Property controllable variational autoencoder via invertible mutual dependence. In International Conference on Learning Representations, 2020. [11] Xiaojie Guo, Yuanqi Du, and Liang Zhao. Deep generative models for spatial networks. In Proceedings of the 27th ACM SIGKDD Conference on Knowledge Discovery & Data Mining, pages 505–515, 2021. [12] William L. Hamilton, Rex Ying, and Jure Leskovec. Inductive representation learning on large graphs. In NeurIPS, 2017. [13] Kaveh Hassani and Amir Hosein Khasahmadi. Contrastive multi-view representation learning on graphs. In ICML, pages 3451–3461. 2020. [14] Kexin Huang and Marinka Zitnik. Graph meta learning via local subgraphs. CoRR, abs/2006.07889, 2020. [15] Thomas N. Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. In ICLR, 2017. [16] Risi Kondor and Horace Pan. The multiscale laplacian graph kernel. In NIPS, 2016. [17] Nils Kriege and Petra Mutzel. Subgraph matching kernels for attributed graphs. In ICML, 2012. [18] R. Linsker. Self-organization in a perceptual network. Computer, 21:105, 1988. [19] Qing Lu and Lise Getoor. Link-based classification. In ICML, 2003.
|
| 193 |
+
|
| 194 |
+
[20] Annamalai Narayanan, Mahinthan Chandramohan, Rajasekar Venkatesan, Lihui Chen, Yang Liu, and Shantanu Jaiswal. graph2vec: Learning distributed representations of graphs. CoRR, 2017.
|
| 195 |
+
[21] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
|
| 196 |
+
[22] Jiezhong Qiu, Qibin Chen, Yuxiao Dong, Jing Zhang, Hongxia Yang, Ming Ding, Kuansan Wang, and Jie Tang. Gcc: Graph contrastive coding for graph neural network pre-training. KDD, 2020.
|
| 197 |
+
[23] Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Galligher, and Tina EliassiRad. Collective classification in network data. AI magazine, 29(3):93–93, 2008.
|
| 198 |
+
[24] Nino Shervashidze, Pascal Schweitzer, Erik Jan van Leeuwen, Kurt Mehlhorn, and Karsten M. Borgwardt. Weisfeiler-lehman graph kernels. J. Mach. Learn. Res, pages 2539–2561, 2011.
|
| 199 |
+
[25] Nino Shervashidze, S. V. N. Vishwanathan, Tobias Petri, Kurt Mehlhorn, and Karsten M. Borgwardt. Efficient graphlet kernels for large graph comparison. In AISTATS, 2009.
|
| 200 |
+
[26] Ravid Shwartz-Ziv and Naftali Tishby. Opening the black box of deep neural networks via information. arXiv preprint arXiv:1703.00810, 2017.
|
| 201 |
+
[27] Stefano Soatto and Alessandro Chiuso. Modeling visual representations: Defining properties and deep approximations. In ICLR, 2016.
|
| 202 |
+
[28] Fan-Yun Sun, Jordan Hoffman, Vikas Verma, and Jian Tang. Infograph: Unsupervised and semi-supervised graph-level representation learning via mutual information maximization. In ICLR, 2019.
|
| 203 |
+
[29] Shantanu Thakoor, Corentin Tallec, Mohammad Gheshlaghi Azar, Rémi Munos, Petar Velickovi ˇ c, and Michal Valko. Bootstrapped representation learning on graphs. ´ arXiv preprint arXiv:2102.06514, 2021.
|
| 204 |
+
[30] Yonglong Tian, Chen Sun, Ben Poole, Dilip Krishnan, Cordelia Schmid, and Phillip Isola. What makes for good views for contrastive learning. In NeurIPS, volume 33, 2020.
|
| 205 |
+
[31] Naftali Tishby, Fernando C. N. Pereira, and William Bialek. The information bottleneck method. CoRR, physics/0004057, 2000.
|
| 206 |
+
[32] Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua ´ Bengio. Graph Attention Networks. ICLR, 2018.
|
| 207 |
+
[33] Petar Velickovi ˇ c, William Fedus, William L. Hamilton, Pietro Liò, Yoshua Bengio, and R Devon ´ Hjelm. Deep Graph Infomax. In ICLR, 2019.
|
| 208 |
+
[34] Nikil Wale, Ian A Watson, and George Karypis. Comparison of descriptor spaces for chemical compound retrieval and classification. Knowledge and Information Systems, 14(3):347–375, 2008.
|
| 209 |
+
[35] Jason Weston, Frédéric Ratle, Hossein Mobahi, and Ronan Collobert. Deep learning via semi-supervised embedding, 2013.
|
| 210 |
+
[36] Felix Wu, Tianyi Zhang 0007, Amauri H. Souza Jr., Christopher Fifty, Tao Yu, and Kilian Q. Weinberger. Simplifying graph convolutional networks. ICML, 2019.
|
| 211 |
+
[37] Tailin Wu, Hongyu Ren, Pan Li, and Jure Leskovec. Graph information bottleneck. CoRR, 2020.
|
| 212 |
+
[38] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? In ICLR, 2019.
|
| 213 |
+
[39] Pinar Yanardag and S. V. N. Vishwanathan. Deep graph kernels. In KDD, 2015.
|
| 214 |
+
[40] Pinar Yanardag and SVN Vishwanathan. Deep graph kernels. In KDD, pages 1365–1374, 2015.
|
| 215 |
+
[41] Zhilin Yang, William W. Cohen, and Ruslan Salakhutdinov. Revisiting semi-supervised learning with graph embeddings. ICML, abs/1603.08861, 2016.
|
| 216 |
+
[42] Yuning You, Tianlong Chen, Yongduo Sui, Ting Chen, Zhangyang Wang, and Yang Shen. Graph contrastive learning with augmentations. In NeurIPS, volume 33, 2020.
|
| 217 |
+
[43] Junchi Yu, Tingyang Xu, Yu Rong, Yatao Bian, Junzhou Huang, and Ran He. Graph information bottleneck for subgraph recognition. ICLR, 2021.
|
| 218 |
+
[44] Tong Zhao, Yozen Liu, Leonardo Neves, Oliver Woodford, Meng Jiang, and Neil Shah. Data augmentation for graph neural networks. arXiv preprint arXiv:2006.06830, 2020.
|
| 219 |
+
[45] Yanqiao Zhu, Yichen Xu, Feng Yu, Qiang Liu, Shu Wu, and Liang Wang. Deep Graph Contrastive Representation Learning. In ICML Workshop, 2020.
|
md/train/52XXcK8jY0J/52XXcK8jY0J.md
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Disentangling Identifiable Features from Noisy Data with Structured Nonlinear ICA
|
| 2 |
+
|
| 3 |
+
Hermanni Hälvä1 ∗ Sylvain Le Corff2 Luc Lehéricy3
|
| 4 |
+
|
| 5 |
+
Jonathan So4 Yongjie Zhu1 Elisabeth Gassiat5 † Aapo Hyvärinen1 †
|
| 6 |
+
|
| 7 |
+
1Department of Computer Science, University of Helsinki, Finland 2 Samovar, Télécom SudParis, département CITI, Institut Polytechnique de Paris, Palaiseau, France 3Laboratoire J. A. Dieudonné, Université Côte d’Azur, CNRS, 06100, Nice, France 4Department of Engineering, University of Cambridge, UK 5Université Paris-Saclay, CNRS, Laboratoire de mathématiques d’Orsay, 91405, Orsay, France
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
We introduce a new general identifiable framework for principled disentanglement referred to as Structured Nonlinear Independent Component Analysis (SNICA). Our contribution is to extend the identifiability theory of deep generative models for a very broad class of structured models. While previous works have shown identifiability for specific classes of time-series models, our theorems extend this to more general temporal structures as well as to models with more complex structures such as spatial dependencies. In particular, we establish the major result that identifiability for this framework holds even in the presence of noise of unknown distribution. Finally, as an example of our framework’s flexibility, we introduce the first nonlinear ICA model for time-series that combines the following very useful properties: it accounts for both nonstationarity and autocorrelation in a fully unsupervised setting; performs dimensionality reduction; models hidden states; and enables principled estimation and inference by variational maximum-likelihood.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
A central tenet of unsupervised deep learning is that noisy and high dimensional real world data is generated by a nonlinear transformation of lower dimensional latent factors. Learning such lower dimensional features is valuable as they may allow us to understand complex scientific observations in terms of much simpler, semantically meaningful, representations (Morioka et al., 2020; Zhou and Wei, 2020). Access to a ground truth generative model and its latent features would also greatly enhance several other downstream tasks such as classification (Klindt et al., 2021; Banville et al., 2021), transfer learning (Khemakhem et al., 2020b), as well as causal inference (Monti et al., 2019; Wu and Fukumizu, 2020).
|
| 16 |
+
|
| 17 |
+
A recently popular approach to deep representation learning has been to learn disentangled features. Whilst not rigorously defined, the general methodology has been to use deep generative models such as VAEs (Kingma and Welling, 2014; Higgins et al., 2017) to estimate semantically distinct factors of variation that generate and encode the data. A substantial problem with the vast majority of work on disentanglement learning is that the models used are not identifiable – that is, they do not learn the true generative features, even in the limit of infinite data – in fact, this task has been proven impossible without inductive biases on the generative model (Hyvärinen and Pajunen, 1999; Locatello et al., 2019). Lack of identifiability plagues deep learning models broadly and has been implicated as one of the reasons for unexpectedly poor behaviour when these models are deployed in real world applications (D’Amour et al., 2020). Fortunately, in many applications the data have dependency structures, such as temporal dependencies which introduce inductive biases. Recent advances in both identifiability theory and practical algorithms for nonlinear ICA (Hyvärinen and Morioka, 2016, 2017; Hälvä and Hyvärinen, 2020; Morioka et al., 2021; Klindt et al., 2021; Oberhauser and Schell, 2021) exploit this and offer a principled approach to disentanglement for such data. Learning statistically independent nonlinear features in such models is well-defined, i.e. those models are identifiable.
|
| 18 |
+
|
| 19 |
+
However, the existing nonlinear ICA models suffer from numerous limitations. First, they only exploit specific types of temporal structures, such as either temporal dependencies or nonstationarity. Second, they often work under the assumption that some ’auxiliary’ data about a latent process is observed, such as knowledge of the switching points of a nonstationary process as in Hyvärinen and Morioka (2016); Khemakhem et al. (2020a) . Furthermore, all the nonlinear ICA models cited above, with the exception of Khemakhem et al. (2020a), assume that the data are fully observed and noise-free, even though observation noise is very common in practice, and even Khemakhem et al. (2020a) assumes the noise distribution to be exactly known. This approach of modelling observation noise explicitly is in stark contrast to the approach taken in papers, such as Locatello et al. (2020), who instead consider general stochasticity of their model to be captured by latent variables – this approach would be ill-suited to the type of denoising one would often need in practice. Lastly, the identifiability theorems in previous nonlinear ICA works usually restrict the latent components to a specific class of models such as exponential families (but see Hyvärinen and Morioka (2017)).
|
| 20 |
+
|
| 21 |
+
In this paper we introduce a new framework for identifiable disentanglement, Structured Nonlinear ICA (SNICA), which removes each of the aforementioned limitations in a single unifying framework. Furthermore, the framework guarantees identifiability of a rich class of nonlinear ICA models that is able to exploit dependency structures of any arbitrary order and thus, for instance, extends to spatially structured data. This is the first major theoretical contribution of our paper.
|
| 22 |
+
|
| 23 |
+
The second important theoretical contribution of our paper proves that models within the SNICA framework are identifiable even in the presence of additive output noise of arbitrary, unknown distribution. We achieve this by extending the theorems by Gassiat et al. (2020b,a). The subsequent practical implication is that SNICA models can perform dimensionality reduction to identifiable latent components and de-noise observed data. We note that noisy-observation part of the identifiability theory is not even limited to nonlinear ICA but applies to any system observed under noise.
|
| 24 |
+
|
| 25 |
+
Third, we give mild sufficient conditions, relating to the strength and the non-Gaussian nature of the temporal or spatial dependencies, enabling identifiability of nonlinear independent components in this general framework. An important implication is that our theorems can be used, for example, to develop models for disentangling identifiable features from spatial or spatio-temporal data.
|
| 26 |
+
|
| 27 |
+
As an example of the flexibility of the SNICA framework, we present a new nonlinear ICA model called $\Delta$ -SNICA . It achieves the following very practical properties which have previously been unattainable in the context of nonlinear ICA: the ability to account for both nonstationarity and autocorrelation in a fully unsupervised setting; ability perform dimensionality reduction; model latent states; and to enable principled estimation and inference by variational maximum-likelihood methods. We demonstrate the practical utility of the model in an application to noisy neuroimaging data that is hypothesized to contain meaningful lower dimensional latent components and complex temporal dynamics.
|
| 28 |
+
|
| 29 |
+
# 2 Background
|
| 30 |
+
|
| 31 |
+
We start by giving some brief background on Nonlinear ICA and identifiability. Consider a model where the distribution of observed data $\mathbf { x }$ is given by $p _ { X } ( \mathbf { x } ; \pmb \theta )$ for some parameter vector $\pmb \theta$ . This model is called identifiable if the following condition is fulfilled:
|
| 32 |
+
|
| 33 |
+
$$
|
| 34 |
+
\forall ( \pmb \theta , \pmb \theta ^ { \prime } ) \qquad p _ { X } ( \mathbf x ; \pmb \theta ) = p _ { X } ( \mathbf x ; \pmb \theta ^ { \prime } ) \Rightarrow \pmb \theta = \pmb \theta ^ { \prime } .
|
| 35 |
+
$$
|
| 36 |
+
|
| 37 |
+
In other words, based on the observed data distribution alone, we can uniquely infer the parameters that generated the data. For models parameterized with some nonparametric function estimator $\mathbf { f }$ , such as a deep neural network, we can replace $\pmb { \theta }$ with $\mathbf { f }$ in the equation above. In practice, identifiability
|
| 38 |
+
|
| 39 |
+
might hold for some parameters, not all; and parameters might be identifiable up to some more or less trivial indeterminacies, such as scaling.
|
| 40 |
+
|
| 41 |
+
In a typical nonlinear ICA setting we observe some $\mathbf { x } \in \mathbb { R } ^ { N }$ which has been generated by an invertible nonlinear mixing function f from latent independent components $\mathbf { s } \in \mathbb { R } ^ { N }$ , with $\begin{array} { r } { p ( \mathbf { s } ) = \mathbf { \dot { \prod } } _ { i = 1 } ^ { N } p ( s ^ { ( i ) } ) } \end{array}$ , as per:
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
\begin{array} { r } { { \bf x } = { \bf f } ( { \bf s } ) , } \end{array}
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
Identifiability of f would then mean that we can in theory find the true $\mathbf { f }$ , and subsequently the true data generating components. Unfortunately, without some additional structure this model is unidentifiable, as shown by Hyvärinen and Pajunen (1999): there is an infinite number of possible solutions and these have no trivial relation with each other. To solve this problem, previous work (Sprekeler et al., 2014; Hyvärinen and Morioka, 2016, 2017) developed models with temporal structure. Such time series models were generalized and expressed in a succinct way by Hyvärinen et al. (2019); Khemakhem et al. (2020a) by assuming the independent components are conditionally independent upon some observed auxiliary variable $\begin{array} { r } { \bar { u } _ { t } \colon p ( \mathbf { s } _ { t } | \bar { u _ { t } } ) = \prod _ { i = 1 } ^ { N } \bar { p ( s _ { t } ^ { ( i ) } | u _ { t } ) } . } \end{array}$ . In a time series context, the auxiliary variable might be history, e.g. $u _ { t } = \mathbf { x } _ { t - 1 }$ , or the index of a time segment to model nonstationarity (or piece-wise stationarity). (It could also be data from another modality, such as audio data used to condition video data (Arandjelovic and Zisserman, 2017).)
|
| 48 |
+
|
| 49 |
+
Notice that the mixing function f in (2) is assumed bijective and thus identifiable dimension reduction is not possible in most of the models discussed above. The only exceptions, we are aware of, are Khemakhem et al. (2020a); Klindt et al. (2021) who choose f as injective rather than bijective. Further, Khemakhem et al. (2020a) assume additive noise on the observations $\mathbf { x } = \mathbf { f } ( \mathbf { s } ) + \boldsymbol \varepsilon$ , which allows to estimate posterior of s by an identifiable VAE (iVAE). We will take a similar strategy in what follows.
|
| 50 |
+
|
| 51 |
+
# 3 Definition of Structured Nonlinear ICA
|
| 52 |
+
|
| 53 |
+
In this section, we first present the new framework of Structured Nonlinear ICA (SNICA) – a broad class of models for identifiable disentanglement and learning of independent components when data has structural dependencies. Next, we give an example of a particularly useful specific model that fits within our framework, called $\Delta$ -SNICA , by using switching linear dynamical latent processes.
|
| 54 |
+
|
| 55 |
+
# 3.1 Structured Nonlinear ICA framework
|
| 56 |
+
|
| 57 |
+
Consider observations $( \mathbf { x } _ { t } ) _ { t \in \mathbb { T } } = ( ( x _ { t } ^ { ( 1 ) } , \dots , x _ { t } ^ { ( M ) } ) ) _ { t \in \mathbb { T } }$ where $\mathbb { T }$ is a discrete indexing set of arbitrary dimension. For discrete time-series models, like previous works, $\mathbb { T }$ would be a subset of $\mathbb { N }$ . Crucially, however, we allow it to be any arbitrary indexing variable that describes a desired structure. For instance, $\mathbb { T }$ could be a subset of $\mathbb { N } ^ { 2 }$ for spatial data.
|
| 58 |
+
|
| 59 |
+
We assume the data is generated according the following nonlinear ICA model. First, there exist latent components $\mathbf { s } ^ { ( i ) } \bar { = } ( s _ { t } ^ { ( i ) } ) _ { t \in \mathbb { T } }$ for $i \in \{ 1 , \ldots , N \}$ where for any $t , t ^ { \prime } \in \mathbb { T }$ , the distributions of $( \mathbf { s } _ { t } ^ { ( i ) } ) _ { 1 \leqslant i \leqslant N }$ and $( \mathbf { s } _ { t ^ { \prime } } ^ { ( i ) } ) _ { 1 \leqslant i \leqslant N }$ are the same, which is a weak form of stationarity. Second, we assume t that for any $m \in \mathbb { N } ^ { * }$ and $( t _ { 1 } , \ldots , t _ { m } ) \in \mathbb { T } ^ { m }$ , $\begin{array} { r } { \underline { { p } } ( \mathbf { s } _ { t _ { 1 } } , \ldots , \mathbf { s } _ { t _ { m } } ) = \prod _ { i = 1 } ^ { N } p ( s _ { t _ { 1 } } ^ { ( i ) } , \ldots , s _ { t _ { m } } ^ { ( i ) } ) } \end{array}$ : that is, the $\mathbf { f } : \dot { \mathbb { R } ^ { N } } \xrightarrow { } \mathbb { R } ^ { M }$ with $M \geqslant N$ is injective, so there may be more observed variables than components. Finally, denote observational noise by $\boldsymbol { \varepsilon } _ { t } \in \mathbb { R } ^ { M }$ and assume that they are i.i.d. for all $t \in \mathbb { T }$ and independent of the signals $\mathbf { s } ^ { ( i ) }$ . Putting these together, we assume the mixing model where for each $t \in \mathbb { T }$ ,
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\mathbf { x } _ { t } = \mathbf { f } ( \mathbf { s } _ { t } ) + \pmb { \varepsilon } _ { t } ,
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
where $\mathbf { s } _ { t } = ( s _ { t } ^ { ( 1 ) } , \dots , s _ { t } ^ { ( N ) } )$ . Importantly, $\varepsilon _ { t }$ can have any arbitrary unknown distribution, even with dependent entries; in fact, it may even not have finite moments.
|
| 66 |
+
|
| 67 |
+
The main appeal of this framework is that, under the conditions given in next section, we can now guarantee identifiability for a very broad and rich class of models.
|
| 68 |
+
|
| 69 |
+
First, notice that all previous Nonlinear ICA time-series models can be reformulated and often improved upon when viewed through this new unifying framework. In other words, we can create models that are very much like those previous works, and capture their dependency profiles, but with the changes that by assuming unconditional independence and output noise we now allow them to perform dimension reduction (this does also require some additional assumptions needed in our identifiability theorems below). To see this, consider the model in Hälvä and Hyvärinen (2020) which captures nonstationarity in the independent components through a global hidden Markov chain. We can transform this model into the SNICA framework if we instead model each independent component as its own HMM (Figure 1a), with the added benefit that we now have marginally independent components and are able to perform dimensionality reduction into low dimensional latent components. Nonlinear ICA with time-dependencies, such as in an autoregressive model, proposed by Hyvärinen and Morioka (2017) is also a special case of our framework (Figure 1b), but again with the extension of dimensionality reduction. Furthermore, this framework allows for a plethora of new Nonlinear ICA models to be developed. As described above, these do not have to be limited to time-series but could for instance be a process on a two-dimensional graph with appropriate (in)dependencies (see Figure 1c). However, we now proceed to introduce a particularly useful time-series model using our framework.
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
Figure 1: Graphical models for the SNICA framework
|
| 73 |
+
|
| 74 |
+
# 3.2 $\Delta$ -SNICA $:$ Nonlinear ICA with switching linear dynamical systems
|
| 75 |
+
|
| 76 |
+
While the above framework has great generality, any practical application will need a specific model. Next we propose one which combines the following properties of previous nonlinear ICA models into a single model: ability to account for both nonstationarity and autocorrelation in a fully unsupervised setting, to perform dimensionality reduction and model hidden states. Real world processes, such as video/audio data, financial time-series, and brain signals, exhibit these properties – disentangling latent features in such data would hence be very useful.
|
| 77 |
+
|
| 78 |
+
Our new model is depicted in Figure 1d. The independent components are generated by a Switching Linear Dynamical System (SLDS) (Ackerson and Fu, 1968; Chang and Athans, 1978; Hamilton, 1990; Ghahramani and Hinton, 2000) with additional latent variables to express rich dynamics. Formally, for each independent component $i \in \{ 1 , \ldots , N \}$ , consider the following SLDS over some latent vector $\mathbf { y } _ { t } ^ { ( i ) }$ :
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\mathbf { y } _ { t } ^ { ( i ) } = \mathbf { B } _ { u _ { t } } ^ { ( i ) } \mathbf { y } _ { t - 1 } ^ { ( i ) } + \mathbf { b } _ { u _ { t } } ^ { ( i ) } + \varepsilon _ { u _ { t } } ^ { ( i ) } ,
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
where $u _ { t } : = u _ { t } ^ { ( i ) }$ is a state of a first-order hidden Markov chain $( u _ { t } ^ { ( i ) } ) _ { t = 1 : T }$ . Crucially, we assume that t tthe independent components at each time-point are the first elements $y _ { t , 1 } ^ { ( i ) }$ of $\mathbf { y } _ { t } ^ { ( i ) } = ( y _ { t , 1 } ^ { ( i ) } , \ldots , y _ { t , d } ^ { ( i ) } ) ^ { T }$ i.e. $s _ { t } ^ { ( i ) } = y _ { t , 1 } ^ { ( i ) }$ . The rest of the elements in $\mathbf { y } _ { t } ^ { ( i ) }$ are latent variables modelling hidden dynamics. The great utility of using such a higher-dimensional latent variable is that this model allows us, for example, as a special case, to consider higher-order ARMA processes, thus modelling each $s _ { t } ^ { ( i ) }$ as switching between ARMA processes of an order determined by the dimensionality of $\mathbf { y } _ { t }$ . We call the ensuing model $\Delta$ -SNICA ("Delta-SNICA", with delta as in "dynamic").
|
| 85 |
+
|
| 86 |
+
# 4 Identifiability
|
| 87 |
+
|
| 88 |
+
In this section, we present two very general identifiability theorems for SNICA. We basically decouple the problem into two parts. First, we consider identifying the noise-free distribution of $\mathbf { f } \left( \mathbf { s } _ { t } \right)$ from noisy data. Theorem 1 states conditions—on tail behaviour, non-degeneracy, and non-Gaussianity— under which it is possible to recover the distribution of a process based on noisy data with unknown noise distribution. Second, we consider demixing of the nonlinearly mixed data. Theorem 2 provides general conditions—on temporal or spatial dependencies, and non-Gaussianity—that allow recovery of the mixing function f when there is no more noise. We then consider application of these theorems to SNICA.
|
| 89 |
+
|
| 90 |
+
# 4.1 Identifiability with unknown noise distribution
|
| 91 |
+
|
| 92 |
+
Consider the model
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
{ \bf x } _ { t } = { \bf z } _ { t } + \varepsilon _ { t } ,
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
where $( \mathbf { z } _ { t } ) _ { t \in \mathbb { T } }$ is a family of random variables in $\mathbb { R } ^ { M }$ such that all $\mathbf { z } _ { t }$ , $t \in \mathbb { T }$ , have the same marginal distribution, and $\textstyle ( \varepsilon _ { t } ) _ { t \in \mathbb { T } }$ is a family of independent (over $t$ ) and identically distributed random variables, independent of $( \mathbf { z } _ { t } ) _ { t \in \mathbb { T } }$ . Let $P$ be the common distribution of each $\varepsilon _ { t }$ , for $t \in \mathbb { T }$ . Let $t _ { 1 }$ and $t _ { 2 }$ in $\mathbb { T }$ , and consider the following assumptions.
|
| 99 |
+
|
| 100 |
+
• (A1) [Tail behaviour] For some $\rho < 3$ , there exist $A$ and $B$ such that for all $\boldsymbol { \lambda } \in \mathbb { R } ^ { N }$ , $\mathbb { E } [ \exp ( \langle \lambda , \mathbf { z } _ { t _ { 1 } } \rangle ) ] \leqslant A \exp ( B \| \lambda \| ^ { \rho } ) .$
|
| 101 |
+
• (A2) [Non-degeneracy] For any $\ b { \eta } \in \mathbb { C } ^ { M }$ , $\mathbb { E } [ \exp \{ \langle \eta , \mathbf { z } _ { t _ { 2 } } \rangle \} | \ \mathbf { z } _ { t _ { 1 } } ]$ is not the null random variable.
|
| 102 |
+
• (A3) [Non-Gaussianity] The following assertion is false: there exist a vector $\boldsymbol { \eta } \in \mathbb { R } ^ { M }$ and independent random variables $\tilde { z }$ and $u$ , such that $u$ is a non dirac Gaussian random variable and $\langle \eta , \mathbf { z } _ { t _ { 1 } } \rangle$ has the same distribution as $\tilde { z } + u$ .
|
| 103 |
+
|
| 104 |
+
We defer the detailed discussion on the practical meaning of the assumptions (A1-A3) in the context of SNICA to Section 4.3. We next present Theorem 1 which establishes identifiability under unknown noise (its proof is postponed to Section A.1 in the Supplementary Material):
|
| 105 |
+
|
| 106 |
+
Theorem 1 Assume that assumptions (A1), (A2) and (A3) hold for some $( t _ { 1 } , t _ { 2 } ) \in { \mathbb { T } } ^ { 2 }$ . Then, up to translation, for all $m \geqslant 2$ , for all $( t _ { 3 } , \ldots , t _ { m } ) \in { \mathbb { T } } ^ { m - 2 }$ , the application that associates the distribution of $\left( \mathbf { z } _ { t _ { 1 } } , \ldots , \mathbf { z } _ { t _ { m } } \right)$ and $P$ to the distribution of $\left( \mathbf { x } _ { t _ { 1 } } , \ldots , \mathbf { x } _ { t _ { m } } \right)$ is one-to-one.
|
| 107 |
+
|
| 108 |
+
Here, up to translation means that adding a constant vector to all $\varepsilon _ { t }$ , and substracting this constant to all $\mathbf { z } _ { t }$ , $t \in \{ t _ { 1 } , \ldots , t _ { m } \}$ , does not change the distribution of $( \mathbf { x } _ { t _ { 1 } } , \ldots , \mathbf { x } _ { t _ { m } } )$ . The proof of Theorem 1 extends that of Theorem 1 in (Gassiat et al., 2020b), see also (Gassiat et al., 2020a), which assumed sub-Gaussian noise-free data. Our extension allows the noise-free data to have heavier tails, which is important since (noise-free) data in many real-world applications is super-Gaussian, i.e. heavy-tailed, as is well-known in work on linear ICA (Hyvärinen et al., 2001).
|
| 109 |
+
|
| 110 |
+
Importantly, there is no assumption on the unknown noise distribution in Theorem 1. In fact, it does not even assume a mixing as in ICA, and thus extends greatly outside of the framework of this paper.
|
| 111 |
+
|
| 112 |
+
# 4.2 Identifiability of the mixing function
|
| 113 |
+
|
| 114 |
+
Based on Theorem 1, it is possible to recover the distribution of the noise-free data in SNICA in (3) by setting $\mathbf { z } _ { t } = \mathbf { f } ( \mathbf { s } _ { t } )$ . Next, we consider under which conditions the mixing function f is identifiable. Denote by $S = S ^ { ( 1 ) } \times \cdots \times S ^ { ( N ) }$ the support of the distribution of all $\mathbf { s } _ { t }$ . We consider the situation where each $S ^ { ( i ) } \subset \mathbb { R }$ , $1 \leqslant i \leqslant N$ , is connected, so that each $S ^ { ( i ) }$ is an interval. We assume moreover that the injective mixing function f is a $\mathcal { C } ^ { 2 }$ diffeomorphism between $S$ and a $\mathcal { C } ^ { 2 }$ differentiable manifold $\mathcal { M } \subset \mathbb { R } ^ { M }$ . Formally, this means that there exists an atlas $\{ \varphi _ { \vartheta } : U _ { \vartheta } \to \mathbb { R } ^ { N } \} _ { \vartheta \in \Theta }$ of $\mathcal { M }$ such that for all $\vartheta , \vartheta ^ { \prime } \in \Theta$ , the map $\varphi _ { \vartheta } \circ \varphi _ { \vartheta ^ { \prime } } ^ { - 1 }$ is a $\mathcal { C } ^ { 2 }$ map, and f is a bijection $\mathbb { R } ^ { N } \to \mathcal { M }$ such that for all $\vartheta \in \Theta$ , $\varphi _ { \vartheta } \circ \mathbf { f }$ and $\mathbf { f } ^ { - 1 } \circ \varphi _ { \vartheta } ^ { - 1 }$ have continuous second derivatives. The sets $U _ { \vartheta }$ , $\vartheta \in \Theta$ , cover $\mathcal { M }$ and are open in $\mathcal { M }$ . The proof of Theorem 2 is postponed to Section A.2 in the Supplementary Material.
|
| 115 |
+
|
| 116 |
+
ssume that thehas a density xist wh $\qquad m \ \geqslant \ 2$ anon $( t _ { 1 } , \ldots , t _ { m } ) \in \mathbb { T } ^ { m }$ such that the vectorreover that there exist $( s _ { t _ { 1 } } ^ { ( i ) } , \ldots , s _ { t _ { m } } ^ { ( i ) } )$ $p _ { m } ^ { ( i ) }$ $\mathcal { C } ^ { 2 }$ $( S ^ { ( i ) } ) ^ { m }$ $( k , l ) \in \{ 1 , \ldots , m \} ^ { 2 }$ with $k \neq l$ such that the following assumptions hold with .
|
| 117 |
+
|
| 118 |
+
• $( B l )$ (Uniform $( k , l )$ -dependency). For all $i \in \{ 1 , \ldots , N \}$ , the set of zeros of $\frac { \partial ^ { 2 } } { \partial s _ { t _ { k } } ^ { ( i ) } \partial s _ { t _ { l } } ^ { ( i ) } } Q _ { m } ^ { ( i ) }$ is a meagre subset of $( S ^ { ( i ) } ) ^ { m }$ , i.e. it contains no open subset.
|
| 119 |
+
|
| 120 |
+
• $( B 2 )$ (Local $( k , l )$ -non quasi Gaussianity). For any open subset $A \subset S ^ { m }$ , there exists at most one $i \in \{ 1 , \ldots , N \}$ such that there exists a function $\alpha : \mathbb { R } ^ { m - 1 } \mathbb { R }$ and a constant $c \in \mathbb { R }$ such that for all $s \in A$ ,
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
\frac { \partial ^ { 2 } } { \partial s _ { t _ { k } } ^ { ( i ) } \partial s _ { t _ { l } } ^ { ( i ) } } Q _ { m } ^ { ( i ) } = c \alpha ( s _ { t _ { k } } ^ { ( i ) } , \mathbf { s } _ { ( - t _ { k } , - t _ { l } ) } ^ { ( i ) } ) \alpha ( s _ { t _ { l } } ^ { ( i ) } , \mathbf { s } _ { ( - t _ { k } , - t _ { l } ) } ^ { ( i ) } ) ,
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
where $\mathbf { s } _ { ( - t _ { k } , - t _ { l } ) } ^ { ( i ) } \ i s \ ( s _ { t _ { 1 } } ^ { ( i ) } , \ldots , s _ { t _ { m } } ^ { ( i ) } )$ without the coordinates $t _ { k }$ and $t _ { l }$ .
|
| 127 |
+
|
| 128 |
+
Then, $\mathbf { f } ^ { - 1 }$ can be recovered up to permutation and coordinate-wise transformations from the distribution of $( \mathbf { f } ( \mathbf { s } _ { t _ { 1 } } ) , \dots , \mathbf { f } ( \mathbf { s } _ { t _ { m } } ) )$ .
|
| 129 |
+
|
| 130 |
+
# 4.3 Applications to SNICA
|
| 131 |
+
|
| 132 |
+
In this section, we provide additional comments on the assumptions (A1-A3) and (B1-B2) and their verification in the context of SNICA.
|
| 133 |
+
|
| 134 |
+
Assumption (A1) is a condition on the tails of the noise-free data: it allows tails that are somewhat heavier than Gaussian tails. It is in fact equivalent to assuming that for some $\tilde { \rho } > 3 / 2$ , there exists $A ^ { \prime } , B ^ { \prime } > 0$ such that for all $t > 0$ , $\| \mathbf { z } _ { t _ { 1 } } \| \geqslant t ) \leqslant A ^ { \prime } \exp ( - \bar { B ^ { \prime } } t ^ { \tilde { \rho } } )$ .
|
| 135 |
+
|
| 136 |
+
Assumption (A2) is a non-degeneracy condition likely to be fulfilled for any randomly chosen SNICA model parameters. As an example, consider a model such as Fig. 1c, where there exist hidden variables $( u _ { t } ) _ { t \in \mathbb { T } }$ taking values in a finite set $\{ 1 , \ldots , K \}$ such that the pairs of variables $\left( \mathbf { z } _ { t } , u _ { t } \right)$ have the same distribution for all $t \in \mathbb { T }$ , and such that conditioned on $( u _ { t } ) _ { t \in \mathbb { T } }$ , the variables $( \mathbf { z } _ { t } ) _ { t \in \mathbb { T } }$ are independent and the distribution of $\mathbf { z } _ { t }$ only depends on $u _ { t }$ . (As a special case, this model includes the temporal HMM setting described in Fig. 1a.) Let $( t _ { 1 } , t _ { 2 } ) \in \mathbb { T } ^ { 2 }$ . For all $u , v \in \{ 1 , \ldots , K \}$ , let $\pi ( u ) = \overline { { p _ { u _ { t _ { 1 } } } ( u ) } }$ be the mass function of $\boldsymbol { u } _ { t _ { 1 } }$ , $Q ( u , v ) = p _ { u _ { t _ { 2 } } | u _ { t _ { 1 } } } ( v | u )$ be the transition matrix from $u _ { t _ { 1 } }$ to $u _ { t _ { 2 } }$ , and $\gamma _ { u } ( \mathbf { z } ) = p _ { \mathbf { z } _ { t _ { 1 } } | u _ { t _ { 1 } } } ( \mathbf { z } | u )$ be the density of $\mathbf { z } _ { t _ { 1 } }$ conditionally to $u _ { t _ { 1 } } = u$ . By assumption, it is also the density of $\mathbf { z } _ { t _ { 2 } }$ conditionally to $u _ { t _ { 2 } } = u$ . Theorem 3 provides sufficient conditions for assumption (A2) to hold:
|
| 137 |
+
|
| 138 |
+
Theorem 3 Assume that $Q$ has full rank, $\operatorname* { m i n } _ { u } \pi ( u ) > 0$ and the $( \gamma _ { u } ) _ { 1 \leqslant u \leqslant K }$ are linearly independent, then (A2) is satisfied as soon as the functions $\begin{array} { r } { \langle \eta \mapsto \int \exp ( \langle \eta , \mathbf { z } \rangle ) \gamma _ { v } ( \mathbf { z } ) d \mathbf { z } ) _ { 1 \leqslant v \leqslant K } } \end{array}$ do not have simultaneous zeros.
|
| 139 |
+
|
| 140 |
+
Besides the non-simultaneous zeros assumption, the assumptions of Theorem 3 are reminiscent of those used for the identifiability of non-parametric hidden Markov models, see for instance Gassiat et al. (2016); Lehéricy (2019). The key element is that $\mathbf { z } _ { t _ { 1 } }$ and $\mathbf { z } _ { t _ { 2 } }$ are not independent. Thus, we see that (A2) holds if the $\pi$ and the $\gamma$ are not degenerate (in the precise sense given by Theorem 3), for the latent state models in Figs. 1a,1c.Another situation where (A2) holds is when $\mathbf { z } _ { t _ { 2 } }$ is a complete statistic (Lehmann and Casella, 2006) in the statistical model $\{ \mathbb { P } _ { \mathbf { z } _ { t _ { 2 } } | \mathbf { z } _ { t _ { 1 } } } \left( \cdot | \mathbf { z } _ { t _ { 1 } } \right) \} _ { \mathbf { z } _ { t _ { 1 } } }$ , where $\mathbb { P } _ { \mathbf { z } _ { t _ { 2 } } \mid \mathbf { z } _ { t _ { 1 } } } \left( \cdot | \mathbf { z } _ { t _ { 1 } } \right)$ is the distribution of $\mathbf { z } _ { t _ { 2 } }$ conditionally to $\mathbf { z } _ { t _ { 1 } }$ . Consider the two following examples where this holds: 1) When the model $\{ \mathbb { P } _ { \mathbf { z } _ { t _ { 2 } } | \mathbf { z } _ { t _ { 1 } } } ^ { - } \left( \cdot | \mathbf { z } _ { t _ { 1 } } \right) \} _ { \mathbf { z } _ { t _ { 1 } } }$ is an exponential family. In this situation, complete statistics are known. 2) Autoregressive models with additive innovation of the form ${ \bf z } _ { t _ { 2 } } = { \bf h } ( { \bf z } _ { t _ { 1 } } ) + { \bf v } _ { t _ { 2 } }$ for some bijective function $\mathbf { h }$ when the additive noise $\mathbf { v } _ { t _ { 2 } }$ is a complete statistic in the statistical model $\{ \mathbb { P } _ { \mathbf { v } _ { t _ { 2 } } | \mathbf { z } _ { t _ { 1 } } } \left( \cdot | \mathbf { z } _ { t _ { 1 } } \right) \} _ { \mathbf { z } _ { t _ { 1 } } }$ (note that $\mathbf { v } _ { t _ { 2 } }$ cannot be independent of $\mathbf { z } _ { t _ { 1 } }$ here). The case in Fig. 1b is typically covered by this example.
|
| 141 |
+
|
| 142 |
+
Assumption (A3) states that no direction of the noise free data has a non Dirac Gaussian variable component. It holds as soon as $\mathbf { z } _ { t } = \mathbf { f } ( \mathbf { s } _ { t } )$ and the range of $\mathbf { f }$ is such that its orthogonal projection on any line is not the full line. This assumption holds for instance in the following cases: 1) The range of f is compact, or 2) the range of f is contained in a half-cylinder, that is, there exists a hyperplane such that the range of f is only on one side of this hyperplane and the projection of the range of f on this hyperplane is bounded.
|
| 143 |
+
|
| 144 |
+
Assumption (B1) and Assumption (B2) are similar to those in (Hyvärinen and Morioka, 2017; Oberhauser and Schell, 2021) in the special case of time-series, i.e. $\mathbb { T } = \mathbb { N }$ . (B1) then entails that there must be sufficiently strong statistical dependence between nearby time points. (B2) is a condition which excludes Gaussian processes and processes which can be trivially transformed to be Gaussian. (For treatment of the Gaussian case, see Appendix B in Supplementary Material.) We can further provide a simple and equivalent formulation when the independent components $\mathbf { s } ^ { ( i ) }$ follow independent and stationary HMMs with two hidden states, which is a special case of SNICA. Denote by $\gamma _ { 0 } ^ { ( i ) }$ and $\gamma _ { 1 } ^ { ( i ) }$ the densities of $s _ { t } ^ { ( i ) }$ conditionally to $\{ u _ { t } ^ { ( i ) } = 0 \}$ and $\bar { \{ u _ { t } ^ { ( i ) } = 1 \} }$ respectively.
|
| 145 |
+
|
| 146 |
+
Theorem 4 Assume that the stationary distribution $\pi$ of the hidden chain is such that $0 < \pi ( 0 ) < 1$ and that its transition matrix is invertible. Then $( B l )$ and $( B 2 )$ are satisfied with $m = 2$ if and only $i f$ on any open interval, γ(i)0 a nd $\gamma _ { 1 } ^ { ( i ) }$ are not proportional.
|
| 147 |
+
|
| 148 |
+
Thus, a very simple HMM leads to these conditions being verified. Hyvärinen and Morioka (2017) already showed that the conditions (B1) and (B2) also hold in the case of non-Gaussian autoregressive models. Thus, we see that our identifiability theory applies both in the case HMM’s (Fig 1a) and autoregressive models (Fig 1b), the two principal kinds of temporal structure proposed in previous work, while extending them to further cases and combinations such as in Fig 1c,1d.
|
| 149 |
+
|
| 150 |
+
A simplification of (B1,B2) It is also possible to combine the assumptions (B1) and (B2) in one, while slightly weakening the generality. The key is to notice that (6) in (B2) implies the derivative in (B1) is zero, by setting $c = 0$ . But there is still the difference that (B2) considers all but one index while (B1) considers all indices $i$ . If we simply assume (6) does not hold for any $i$ , we can replace (B1) and (B2) by the new condition:
|
| 151 |
+
|
| 152 |
+
• $\mathbf { ( B ^ { \prime } ) }$ For any open subset $A \subset S ^ { m }$ and for any $i \in \{ 1 , \ldots , N \}$ , a function $\alpha : \mathbb { R } ^ { m - 1 } \mathbb { R }$ and a constant $c \in \mathbb { R }$ do not exist such that (6) would hold for all $s \in A$ .
|
| 153 |
+
|
| 154 |
+
Note that Hyvärinen and Morioka (2017) defined uniform dependency and (non-)quasi-Gaussianity as two separate properties, but in fact their assumption of non-quasi-Gaussianity was weaker than ours: it did not consider all open subsets separately, which is why this simplification was not possible for them. We believe their definition of non-quasi-Gaussianity was in fact not quite sufficient to prove their theorem, and our stronger version may be needed, in line with Oberhauser and Schell (2021).
|
| 155 |
+
|
| 156 |
+
# 5 Experiments
|
| 157 |
+
|
| 158 |
+
Estimation method One challenge is that it is not practically possible to learn $\Delta$ -SNICA by exact maximum-likelihood methods. Instead, we perform learning and inference using Structured VAEs (Johnson et al., 2016) – the current state-of-art in variational inference for structured models. Specifically, this consists of assuming that the latent posterior factorizes as per $q ( \mathbf { y } _ { 1 : T } ^ { ( 1 : N ) } , u _ { 1 : T } ^ { ( 1 : N ) } ) =$ $\begin{array} { r } { \prod _ { i = 1 } ^ { N } q ( \mathbf { y } _ { 1 : T } ^ { ( i ) } ) q ( u _ { 1 : T } ^ { ( i ) } ) } \end{array}$ , which allows us to optimize the resulting evidence lower bound (ELBO):
|
| 159 |
+
|
| 160 |
+
$$
|
| 161 |
+
\begin{array} { r l } & { \log \widehat { \mathcal { L } } = \mathbb { E } _ { q } \left[ \displaystyle \sum _ { t = 1 } ^ { T } \log p ( \mathbf { x } _ { t } \mid \mathbf { s } _ { t } ^ { ( 1 ) } , . . . , \mathbf { s } _ { t } ^ { ( N ) } ) \right] + \displaystyle \sum _ { i = 1 } ^ { N } \left( - \mathrm { K L } \Big [ q ( u _ { 1 : T } ^ { ( i ) } ) \Big | p ( u _ { 1 : T } ^ { ( i ) } ) \Big ] + \mathrm { H } \Big [ q ( \mathbf { s } _ { 1 : T } ^ { ( i ) } ) \Big ] \right. } \\ & { \qquad \left. + \mathbb { E } _ { q } \left[ \log p ( \mathbf { s } _ { 1 } ^ { ( i ) } \mid u _ { 1 } ^ { ( i ) } ) \right] + \displaystyle \sum _ { t = 2 } ^ { T } \mathbb { E } _ { q } \left[ \log p ( \mathbf { s } _ { t } ^ { ( i ) } \mid \mathbf { s } _ { t - 1 } ^ { ( i ) } , u _ { t } ^ { ( i ) } ) \right] \right) . } \end{array}
|
| 162 |
+
$$
|
| 163 |
+
|
| 164 |
+
Since all the distributions are in conjugate exponential families (encoder neural network is used to approximate the natural parameters of the nonlinear likelihood term) efficient message passing can be used for inference, and the mixing function is learned as decoder neural network. Even though this method lacks consistency guarantees (but see Wang and Blei (2018)), we find that our model performs very well. A more detailed treatment of estimation and inference of $\Delta$ -SNICA is given in Appendix C. Our code will be openly available at https://github.com/HHalva/snica.
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
Figure 2: (a) Mean absolute correlation coefficients between ground-truth independent components and their estimates by $\Delta$ -SNICA , IIA-HMM, LGSSM and $\mathrm { i V A E ^ { * } }$ , with different orders of complexity (number of layers) and two different dimensions of observed (12, 24) and latent (6, 12) data. (b) Mean absolute correlation coefficient between estimated noise free data and ground-truth noise free data for same set of models except IIA-HMM. Please note the difference in y-axis scales.
|
| 168 |
+
|
| 169 |
+
# 5.1 Experiments on simulated data
|
| 170 |
+
|
| 171 |
+
The identifiability theorems stated above hold in the limit of infinite data. Additionally, a consistent estimator would be required to learn the ground-truth components. In the real world, we are limited by data and estimation methods and hence it is unclear as to what extent we are actually able to estimate identifiable components – and whether identifiability reflects in better performance in real world tasks. To explore this, we first performed experiments on simulated data. We compared the performance of our model to the current state-of-the-art, IIA-HMM (Morioka et al., 2021), as well as identifiable VAE (iVAE) (Khemakhem et al., 2020a) and standard linear Gaussian state-space model (LGSSM). Since iVAE is not able to handle latent auxiliary variables, we allow it to "cheat" by giving it access to the true data generating latent-state, thereby creating a presumably challenging baseline (denoted $\mathrm { i V A E ^ { * } }$ in our figures). LGSSM was included as a naive baseline which is only able to estimate linear mixing function.
|
| 172 |
+
|
| 173 |
+
Investigating identifiability and consistency We simulated 100K long time-sequences from the $\Delta$ - SNICA model and computed the mean absolute correlation coefficient (MCC) between the estimated latent components and ground truth independent components (see Supplementary material for further implementation details). More precisely, to illustrate the dimensionality reduction capabilities we considered two settings where the observed data dimension $M$ , was either 12 or 24 and the number of independent components, $N$ was 3 and 6, respectively. Since IIA-HMM is unable to do dimensionality reduction, we used PCA to get the data dimension to match that of the latent states. We considered four levels of mixing of increasing complexity by randomly initialized MLPs of the following number of layers: 1 (linear ICA), 2, 3, and 5. The results in Figure 2a) illustrate the clearly superior performance of our model. The especially poor performance of IIA-HMM maybe explained by lack of noise model, much simpler latent dynamics, and lost information due to PCA pre-processing. See Appendix D for further discussion and training details.
|
| 174 |
+
|
| 175 |
+
Application to denoising $\Delta$ -SNICA is able to denoise time-series signals by learning the generative model and then performing inference on latent variables. Specifically, SVAE learns the encoder network which is used to perform inference on the posterior of the independent components. We illustrate this using the same settings as above, with the exception that we now use our learned encoder and inference to get the posterior means of the independent components and input these in to the estimated decoder to get predicted noise-free observations, denoted as $\widehat { \mathbf { f } } \left( \mathbf { s } _ { t } \right)$ – we measured the correlation between $\widehat { \mathbf { f } } \left( \mathbf { s } _ { t } \right)$ and the ground-truth $\mathbf { f } \left( \mathbf { s } _ { t } \right)$ . Note that IIA-HMM, is not able to perform this task. The results in Figure 2b) show that the other models, designed to handle denoising, perform well at this task, as would be expected – identifiability of the latent state is not necessary for good denoising performance. For LGSSM, denoising is done with the Kalman Smoother algorithm.
|
| 176 |
+
|
| 177 |
+
# 5.2 Experiments on real MEG data
|
| 178 |
+
|
| 179 |
+
To demonstrate real-data applicability, $\Delta$ -SNICA was applied to multivariate time series of electrical activity in the human brain, measured by magnetoencephalography (MEG). Recently, many studies have demonstrated the existence of fast transient networks measured by MEG in the resting state and the dynamic switching between different brain networks (Baker et al., 2014; Vidaurre et al., 2017). Additionally, such MEG data is high-dimensional and very noisy. Thus this data provides an excellent target for $\Delta$ -SNICA to disentangle the underlying low-dimensional components.
|
| 180 |
+
|
| 181 |
+
Data and Preprocessing We considered a resting state MEG sessions from the Cam-CAN dataset. During the resting state recording, subjects sat still with their eyes closed. In the task-session data, the subjects carried out a (passive) audio–visual task including visual stimuli and auditory stimuli. We exclusively used the resting-session data for the training of the network, and task-session data was only used in the evaluation. The modality of the sensory stimulation provided a class label that we used in the evaluation, giving in total two classes. We band-pass filtered the data between $4 \mathrm { H z }$ and $3 0 \mathrm { H z }$ (see Supplementary Material for the details of data and settings).
|
| 182 |
+
|
| 183 |
+
Methods The resting-state data from all subjects were temporally concatenated and used for training. The number of layers of the decoder and encoder were equal and took values 2, 3, 4. We fixed the number of independent components to 5 so that our result can be fairly compared to those in Morioka et al. (2021). To evaluate the obtained features, we performed classification of the sensory stimulation categories by applying feature extractors trained with (unlabeled) resting-state data to (labeled) task-session data. Classification was performed using a linear support vector machine (SVM) classifier trained on the stimulation modality labels and sliding-window-averaged features obtained for each trial. The performance was evaluated by the generalizability of a classifier across subjects. i.e., one-subject-out cross-validation. For comparison, we evaluated the baseline methods: IIA-HMM and IIA-TCL (Morioka et al., 2021). We also visualized the spatial activity patterns obtained by $\Delta$ -SNICA , using the weight vectors from encoder neural network across each layer.
|
| 184 |
+
|
| 185 |
+
Results Figure 3 a) shows the classification accuracies of the stimulus categories, across different methods and the number of layers for each model. The performances by $\Delta$ -SNICA were consistently higher than those by the other (baseline) methods, which indicates the importance of the modeling of the MEG signals by $\Delta$ -SNICA . Figure $^ { 3 \mathrm { ~ b ~ } }$ ) shows an example of spatial patterns from the encoder network learned by the $\Delta$ -SNICA . We used the visualization method presented in (Hyvärinen and Morioka, 2016). We manually picked one out of the hidden nodes from the third layer in encoder network, and plotted its weighted-averaged sensor signals, We also visualized the most strongly contributing second- and first-layer nodes. We see progressive pooling of L1 units to form left lateral frontal, right lateral frontal and parietal patterns in L2 which are then all pooled together in L3 resulting in a lateral frontoparietal pattern. Most of the spatial patterns in the third layer (not shown) are actually similar to those previously reported using MEG (Brookes et al., 2011). Appendix E provides more detail to the interpretation of the $\Delta$ -SNICA results.
|
| 186 |
+
|
| 187 |
+
# 6 Related work
|
| 188 |
+
|
| 189 |
+
Previous works on nonlinear ICA have exploited autocorrelations (Hyvärinen and Morioka, 2017; Oberhauser and Schell, 2021) and nonstationarities (Hyvärinen and Morioka, 2016; Hälvä and Hyvärinen, 2020) for identifiability. The SNICA setting provides a unifying framework which allows for both types of temporal dependencies, and further, extends identifiability to other temporal structures as well as any arbitrary higher order data structures which has not previously been considered in the context of nonlinear ICA. Another major theoretical contribution here is to show that identifiability with noise of unknown, arbitrary distribution, while previous work on noisy nonlinear ICA assumed noise of known distribution and known variance (Khemakhem et al., 2020a).
|
| 190 |
+
|
| 191 |
+
Importantly, the SNICA framework is fully probabilistic and thus accommodates higher order latent variables, leading to "purely unsupervised" learning. This is in large contrast to previous research which have been developed for the case where we are able to observe some additional auxiliary variable, such as audio signals accompanying video (Hyvärinen et al., 2019; Khemakhem et al., 2020a,b), or heuristically define the auxiliary variable based on time structure (Hyvärinen and Morioka, 2016). In practice this means that we are able to estimate our models using (variational)
|
| 192 |
+
|
| 193 |
+

|
| 194 |
+
Figure 3: $\Delta$ -SNICA on MEG data. (a) Classification accuracies of linear SVMs trained with auditoryvisual data to predict stimulus category, with feature extractors trained by $\Delta$ -SNICA in advance with resting-state data. Each point represents a testing accuracy on a target subject (chance level: $50 \%$ ). Horizontal dotted line is PCA-only baseline. (b) Example of spatial patterns of the components learned by $\Delta$ -SNICA $\left( \mathrm { L } { = } 3 \right)$ . Each topography corresponds to one spatial pattern. L3: approximate total spatial pattern of one third-layer unit. L2: the patterns of the three second-layer units maximally contributing to this L3 unit. L1: for each L2 unit, the two most strongly contributing first-layer units.
|
| 195 |
+
|
| 196 |
+
MLE, which is more principled than the heuristic self-supervised methods in most earlier papers. The only existing frameworks allowing MLE (Hälvä and Hyvärinen, 2020; Khemakhem et al., 2020a) used model restricted to exponential families, and had either no HMM or a very simple one.
|
| 197 |
+
|
| 198 |
+
The switching linear dynamical model, $\Delta$ -SNICA in Section 3.2, shows the above benefits in the form of a single model. That is, unlike previous nonlinear ICA models, it combines: 1) temporal dependencies and "non-stationarity" (or HMM) in a single model 2) dimensionality reduction within a rigorous maximum likelihood learning and inference framework, and 3) a separate observation equation with general observational noise. This results in a very rich, realistic, and principled model for time series.
|
| 199 |
+
|
| 200 |
+
Very recently, Morioka et al. (2021) proposed a related model by considering innovations of time series to be nonstationary. However, their model is noise-free, restricted to exponential families of at least order two, and not applicable to the spatial case, thus making our identifiability results significantly stronger. From a more practical viewpoint, their model suffers from the fact that it either does not allow for dimensionality reduction (if an HMM is used) or requires a manual segmentation (if HMM is not used). Nor does it have a clear distinction into a state dynamics equation and a measurement equation which allows for cleaning or denoising of the data.
|
| 201 |
+
|
| 202 |
+
Limitations Our identifiability theory makes some restrictive assumptions, and it remains to be seen if they could be lifted in future work. In particular, the data is not allowed to have too heavy tails; the noise must be additive, and independent of the signal; and the practical interpretation of some of the assumptions, such as (A3) is difficult. It is also difficult to say whether our assumption of unconditionally independent components is realistic in practice. Regarding practical applications, our specific model only scratches the surface of what is possible in this framework. In particular, we did not develop a model with spatial distributions, nor did we model non-Gaussian observational noise – our main aim was to lay the foundations for the relevant identification theory. Future work should aim to make the estimation more efficient computationally; this is a ubiquitous problem in deep learning, but specific solutions for this concrete problem may be achievable (Gresele et al., 2020).
|
| 203 |
+
|
| 204 |
+
# 7 Conclusion
|
| 205 |
+
|
| 206 |
+
We proposed a new general framework for identifiable disentanglement, based on nonlinear ICA with very general temporal dynamics or spatial structure. Observational noise of arbitrary unknown distribution is further included. We prove identifiability of the models in this framework with high generality and mathematical rigour. For real data analysis, we propose a special case which subsumes the properties of all existing time series models in nonlinear ICA, while generalizing them in many ways (see Section 6 for details). We hope this work will contribute to wide-spread application of identifiable methods for disentanglement in a highly principled, probabilistic framework.
|
md/train/5CGPY2VeEGb/5CGPY2VeEGb.md
ADDED
|
@@ -0,0 +1,297 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Semi-Supervised Semantic Segmentation via Adaptive Equalization Learning
|
| 2 |
+
|
| 3 |
+
Hanzhe $\mathbf { H } \mathbf { u } ^ { 1 , 4 * }$ Fangyun Wei2† Han $\mathbf { H } \mathbf { u } ^ { 2 }$ Qiwei $\mathbf { Y e } ^ { 2 }$ Jinshi Cui1 Liwei Wang1,3†
|
| 4 |
+
|
| 5 |
+
1Key Laboratory of Machine Perception (MOE), School of EECS, Peking University 2Microsoft Research Asia 3Institute for Artificial Intelligence, Peking University 4Zhejiang Lab huhz@pku.edu.cn {fawe, hanhu, qiwye}@microsoft.com {cjs, wanglw}@cis.pku.edu.cn
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Due to the limited and even imbalanced data, semi-supervised semantic segmentation tends to have poor performance on some certain categories, e.g., tailed categories in Cityscapes dataset which exhibits a long-tailed label distribution. Existing approaches almost all neglect this problem, and treat categories equally. Some popular approaches such as consistency regularization or pseudo-labeling may even harm the learning of under-performing categories, that the predictions or pseudo labels of these categories could be too inaccurate to guide the learning on the unlabeled data. In this paper, we look into this problem, and propose a novel framework for semi-supervised semantic segmentation, named adaptive equalization learning (AEL). AEL adaptively balances the training of well and badly performed categories, with a confidence bank to dynamically track category-wise performance during training. The confidence bank is leveraged as an indicator to tilt training towards under-performing categories, instantiated in three strategies: 1) adaptive Copy-Paste and CutMix data augmentation approaches which give more chance for under-performing categories to be copied or cut; 2) an adaptive data sampling approach to encourage pixels from under-performing category to be sampled; 3) a simple yet effective re-weighting method to alleviate the training noise raised by pseudo-labeling. Experimentally, AEL outperforms the state-of-the-art methods by a large margin on the Cityscapes and Pascal VOC benchmarks under various data partition protocols. Code is available at https://github.com/hzhupku/SemiSeg-AEL.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Supervised semantic segmentation requires pixel-level labeling, which is expensive and timeconsuming. This paper is interested in semi-supervised semantic segmentation, which can greatly reduce the efforts of pixel-level annotation, yet may maintain reasonably high accuracy. One problem of common semantic segmentation datasets is that the pixel categories tend to be imbalanced, e.g., the pixel amount of head classes can be hundreds of times larger than that of tailed classes in the widely used Cityscapes dataset [1]. The situation is more serious in the semi-supervised setting where tailed classes may have extremely few samples. We note that recent approaches are mainly dedicated to the design of consistency regularization [2, 3, 4, 5, 6, 7] and pseudo-labeling [8], almost all of which neglect the imbalance problem and treat each category equally, leading to a biased training. These approaches may even harm the learning of tailed classes, as inaccurate predictions or pseudo labels of under-performing categories could falsely guide the learning on unlabeled data.
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
Figure 1: We count the the training samples of each category on Cityscapes train set under 1/16 and 1/32 data partition protocols, and compare the proposed AEL with a strong semi-supervised learning baseline described in Section 3.2 which treats each category equally. Our method strives to tilt training towards tailed categories which usually tend to be under-performing.
|
| 17 |
+
|
| 18 |
+
This paper aims to alleviate this biased training problem. We propose a novel Adaptive Equalization Learning (AEL) framework, which adaptively balance the training of different categories as shown in Figure 1. Our design follows two main principles: 1) increasing the proportion of training samples from the under-performing categories; 2) tilting training towards under-performing categories. Concretely, we maintain a confidence bank to dynamically record the category-wise performance at each training step, which indicates the current performance of each category. Following principle 1), we propose two data augmentation approaches named adaptive Copy-Paste and adaptive CutMix, which give more chance for under-performing categories to be copied or cut. Following principle 2), we present an adaptive equalization sampling strategy to encourage pixels from under-performing categories to be sufficiently trained. In addition, we also introduce a simple yet effective re-weighting strategy which takes the model predictions into account to alleviate the issue that semi-supervised learning usually suffers from the training noise.
|
| 19 |
+
|
| 20 |
+
Experimentally, by using the DeepLabv $^ { 3 + }$ with ResNet-101 backbone, the proposed AEL outperforms state-of-the-art methods by a large margin on the Cityscapes and PASCAL VOC 2012 benchmarks under various data partition protocols. Specifically, it achieves $7 4 . 2 8 \%$ , $7 5 . 8 3 \%$ and $7 7 . 9 0 \%$ on Cityscapes dataset under 1/32, 1/16 and 1/8 protocols, which is $+ 1 6 . 3 9 \%$ , $+ 1 2 . 8 7 \%$ and $+ 8 . 0 9 \%$ better than the supervised baseline. When evaluated on PASCAL VOC 2012 benchmark, it achieves $7 6 . 9 7 \%$ , $7 7 . 2 0 \%$ and $7 7 . 5 7 \%$ under 1/32, 1/16 and 1/8 protocols, which is $+ 6 . 8 3 \%$ , $+ 6 . 6 0 \%$ and $+ 4 . 4 5 \%$ better than the supervised baseline. Moreover, the proposed approach also proves to improve the segmentation model trained on the full Cityscapes train set by $+ 1 . 0 3 \%$ by leveraging $5 , 0 0 0$ images from the Cityscapes coarse set as unlabeled data, achieving $8 1 . 9 5 \%$ .
|
| 21 |
+
|
| 22 |
+
# 2 Related Work
|
| 23 |
+
|
| 24 |
+
Semi-Supervised Learning. Recent years have witnessed a significant progress in the SSL field. Most of them can be categorized into consistency regularization, entropy minimization [9] and pseudo-labeling. Consistency regularization [10, 11, 12] enforces consistency in predictions between different views of unlabeled data. Pseudo-labeling [13, 14] trains the model on the unlabeled data with pseudo labels generated from the model’s own predictions. Furthermore, [10, 15, 16, 17, 18] use a low softmax temperature to sharpen the predictions of unlabeled set. Our method refers to Mean Teacher [11] and FixMatch [14] when designing our basic framework.
|
| 25 |
+
|
| 26 |
+
Semi-Supervised Semantic Segmentation. Existing semi-supervised semantic segmentation methods mainly focus on the design of consistency regularization and pseudo-labeling. Cutmix-Seg [2] applies CutMix augmentation on the unlabeled data. CCT [4] introduces a feature-level perturbation and enforces consistency among the predictions of different decoders. GCT [19] performs network perturbation by using two differently initialized segmentation models and encourages consistency between the predictions from the two models. PseudoSeg [8] focuses on improving the quality of pseudo labels. Though achieving satisfactory improvements over the supervised baseline, none of the aforementioned methods explore the biased learning issue in semi-supervised semantic segmentation.
|
| 27 |
+
|
| 28 |
+

|
| 29 |
+
Figure 2: Overview of AEL. We adopt the teacher-student architecture as our basic framework. The teacher model is updated by the exponential moving average (EMA) of the student model. Confidence bank is uesd to dynamically record the category-wise performance during training. Adaptive CutMix and adaptive Copy-Paste are applied on the unlabeled and labeled data respectively to provide sufficient training samples from the under-performing categories. Adaptive equalization sampling (AES) encourages the training to involve more samples from the under-performing categories to make the training unbiased. Dynamic re-weighting strategy aims to alleviate the noise of pseudo-labeling.
|
| 30 |
+
|
| 31 |
+
Class Imbalance in Semi-Supervised Learning. Although SSL has been extensively studied, class imbalance problem in SSL is relatively under-explored, especially for semantic segmentation. Yang et al. [20] demonstrate that leveraging unlabeled data can alleviate imbalance issue. Hyun et al. [21] propose a suppressed consistency loss for class-imbalanced image classification problems. CReST [22] introduces a self-training framework for imbalanced SSL. Our method, though not explicitly targeting at the class imbalance problem, focuses on improving the performance of underperforming categories which are mostly tailed classes. Moreover, we refer to the ideas of resampling [23, 24] and re-weighting [25, 26], which are designed for class imbalance problem.
|
| 32 |
+
|
| 33 |
+
# 3 Method
|
| 34 |
+
|
| 35 |
+
Given a labeled set $\mathcal { D } ^ { l } = \{ ( \boldsymbol { \mathbf { \mathit { x } } } _ { i } ^ { l } , \boldsymbol { \mathbf { \mathit { y } } } _ { i } ^ { l } ) \}$ and an unlabeled set $\mathcal { D } ^ { u } = \{ \pmb { x } _ { i } ^ { u } \}$ , the objective of semisupervised semantic segmentation is to learn a segmentation model by efficiently leveraging both labeled and unlabeled data. In this section, we first present an overview of the proposed AEL in Section 3.1. Then we describe our basic framework for semi-supervised semantic segmentation in Section 3.2. Finally, the details of AEL are introduced in Section 3.3.
|
| 36 |
+
|
| 37 |
+
# 3.1 Overview
|
| 38 |
+
|
| 39 |
+
Figure 2 displays an overview of AEL, which is a data-efficient framework for semi-supervised semantic segmentation. It is composed of two parts: 1) a basic framework which contains a teacher model for pseudo-labeling and a student model for online learning; 2) dedicated modules which encourages the under-performing categories to be sufficiently trained by effectively leveraging both labeled and unlabeled data. We use the proposed confidence bank to dynamically record the categorywise performance during training, and thus we can easily identify which categories are not sufficiently trained. For those unsatisfactory categories, we present two data augmentation methods to increase their frequency of occurrence in a training batch, namely adaptive CutMix which is applied on the unlabeled data, and adaptive Copy-Paste which is applied on the labeled data. To make the model towards the unbiased learning, we propose the adaptive equalization sampling and dynamic re-weighting strategies to involve enough samples from the under-performing categories into the training, and alleviate the noise raised by pseudo-labeling simultaneously.
|
| 40 |
+
|
| 41 |
+
# 3.2 Basic Framework
|
| 42 |
+
|
| 43 |
+
We first set up a basic framework for semi-supervised semantic segmentation. The framework consists of a student model and a teacher model. The teacher model has the same architecture as the student model, but uses a different set of weights which are updated by exponential moving average (EMA) of the student model [11]. Following FixMatch [14], we use the teacher model to generate a set of pseudo labels $\hat { \mathcal { V } } = \{ \hat { y } _ { i } \}$ on the weakly augmented unlabeled data $\mathcal { D } ^ { u }$ . Subsequently, the student model is trained on both labeled data $\mathcal { D } ^ { l }$ (of weak augmentation) with the ground-truth and unlabeled data $\mathcal { D } ^ { u }$ (of strong augmentation) with the generated pseudo labels $\hat { \mathcal { V } }$ . We use standard random resize and random horizontal flip as the weak augmentation. Strong augmentation includes CutMix [27] and all data augmentation strategies used in the weak augmentation.
|
| 44 |
+
|
| 45 |
+
The overall loss consists of the supervised loss $\mathcal { L } _ { s }$ and the unsupervised loss $\mathcal { L } _ { u }$ :
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
\begin{array} { l } { { \displaystyle { \mathcal { L } } _ { s } = \frac { 1 } { N _ { l } } \sum _ { i = 1 } ^ { N _ { l } } \frac { 1 } { W H } \sum _ { j = 1 } ^ { W H } \ell _ { c e } ( y _ { i j } , { p } _ { i j } ) } , } \\ { { \displaystyle { \mathcal { L } } _ { u } = \frac { 1 } { N _ { u } } \sum _ { i = 1 } ^ { N _ { u } } \frac { 1 } { W H } \sum _ { j = 1 } ^ { W H } \ell _ { c e } ( \hat { y } _ { i j } , { p } _ { i j } ) } , } \end{array}
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
where $\pmb { p } _ { i j }$ is the prediction of the $j$ -th pixel in the $i$ -th labeled (or unlabeled) image, $N _ { l }$ and $N _ { u }$ denote the number of labeled images and unlabeled images in a training batch, $W$ and $H$ represent the width and height of the input image, and $\ell _ { c e }$ denotes the standard pixel-wise cross-entropy loss. We define the overall loss function as:
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\mathcal { L } = \mathcal { L } _ { s } + \alpha \mathcal { L } _ { u } ,
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
where $\alpha$ controls the contribution of the unsupervised loss.
|
| 58 |
+
|
| 59 |
+
# 3.3 Adaptive Equalization Learning
|
| 60 |
+
|
| 61 |
+
The baseline framework, though achieving competitive results compared with previous related works, neglects the key issues in semi-supervised semantic segmentation. Due to the limited labeled data, semi-supervised learning tends to have poor performance on some certain categories, e.g., tailed categories in Cityscapes dataset which exhibits a long-tailed label distribution. Insufficient training on these categories introduces more noise of pseudo labels which can disrupt the learning process. The proposed AEL framework aims to alleviate the degradation of under-performing categories during the semi-supervised training. Concretely, we maintain a confidence bank to record the performance of each category during training. The confidence bank enables us to identify the under-performing categories. To improve the performance of these categories and further make the training unbiased, we propose a series of technologies to efficiently leverage both labeled and unlabeled data, namely adaptive CutMix, adaptive Copy-Paste, adaptive equalization sampling and dynamic re-weighting.
|
| 62 |
+
|
| 63 |
+
Confidence Bank. To tackle the biased training, previous methods [25, 26, 22, 28] always rely on the prior knowledge such as the number of training samples of each category to design the ad hoc sampling and weighting strategies. However, the performance of each category is not always strictly proportional to the number of training samples, because some categories tend to have discriminative features and thus fewer samples are required for training. Inspired by the recent progress [29] which applies active learning on semantic segmentation, we propose to maintain a confidence bank to record the category-wise performance during training. An indicator is needed to assess the performance of each category.
|
| 64 |
+
|
| 65 |
+
We consider several indicators, namely Confidence, Margin and Entropy. Formally, we define Confidence indicator as:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\mathrm { C o n f } ^ { c } = \frac { 1 } { N _ { l } } \sum _ { i = 1 } ^ { N _ { l } } \frac { 1 } { N _ { i } ^ { c } } \sum _ { j = 1 } ^ { N _ { i } ^ { c } } p _ { i j } ^ { c } , c \in \{ 1 , \dots , C \}
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
where $C$ is the category number, $N _ { i } ^ { c }$ denotes the number of pixels belonging to category $c$ according to its ground-truth ${ \bf { \it y } } _ { i } , { \bf { \it p } } _ { i j } ^ { c }$ denotes the $c$ -th channel prediction of the $j$ -th pixel in the $i$ -th image.
|
| 72 |
+
|
| 73 |
+
Define Margin indicator as:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\mathrm { M a r g i n } ^ { c } = \frac { 1 } { N _ { l } } \sum _ { i = 1 } ^ { N _ { l } } \frac { 1 } { N _ { i } ^ { c } } \sum _ { j = 1 } ^ { N _ { i } ^ { c } } ( p _ { i j } ^ { c } - \operatorname * { m a x } _ { c ^ { \prime } \in \{ 1 , \dots , C \} } p _ { i j } ^ { c ^ { \prime } } ) , ~ c \in \{ 1 , \dots , C \}
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $\mathrm { m a x 2 ( \cdot ) }$ denotes the second largest value operator. At last, we define Entropy indicator as:
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
\mathrm { E n t } ^ { c } = - \frac { 1 } { N _ { l } } \sum _ { i = 1 } ^ { N _ { l } } \frac { 1 } { N _ { i } ^ { c } } \sum _ { j = 1 } ^ { N _ { i } ^ { c } } \sum _ { c ^ { \prime } = 1 } ^ { C } p _ { i j } ^ { c ^ { \prime } } \log p _ { i j } ^ { c ^ { \prime } } , c \in \{ 1 , \ldots , C \} .
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
For all of the indicators, we only take into account predictions from labeled data. Experimentally, the confidence indicator serves best in our AEL and thus we adopt it by default (see Section 4.3 for the comparison). We use EMA to update the category-wise confidence at each training step:
|
| 86 |
+
|
| 87 |
+
$$
|
| 88 |
+
\mathrm { C o n f } _ { k } ^ { c } \gets \tau \mathrm { C o n f } _ { k - 1 } ^ { c } + ( 1 - \tau ) \mathrm { C o n f } _ { k } ^ { c } , \ c \in \{ 1 , \ldots , C \} ,
|
| 89 |
+
$$
|
| 90 |
+
|
| 91 |
+
where $k$ denotes the $k$ -th iteration, $\tau \in [ 0 , 1 )$ is the momentum coefficient which is set to 0.999 experimentally. Through the confidence bank, we can easily identify the under-performing categories for the current model.
|
| 92 |
+
|
| 93 |
+
Adaptive CutMix. Here we introduce the proposed adaptive CutMix (see Figure 2 for illustration) which is applied on the unlabeled data. It aims to increase the frequency of occurrence of the under-performing samples from the unlabeled data. We first formulate the original CutMix [27] as:
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
\begin{array} { r } { \hat { I } = \mathbf { C u t M i x } ( \mathbf { C r o p } ( I _ { 1 } ) , I _ { 2 } ) , } \end{array}
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
where $I _ { 1 }$ and $I _ { 2 }$ denote randomly selected unlabeled images, $\hat { I }$ is the augmented image, and Crop(·) represents the random crop operation.
|
| 100 |
+
|
| 101 |
+
Different from the original CutMix where unlabeled images are randmoly selected, the proposed adaptive CutMix gives under-performing categories a higher sampling probability. Specifically, we first convert the category-wise confidence stored in the confidence bank to the normalized sampling probability $\pmb { r } \in \mathbb { R } ^ { C }$ , which can be formulated as:
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
r = \mathrm { S o f t m a x } ( 1 - \mathrm { C o n f } ) .
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
According to the sampling probability, we randomly select an unlabeled image containing the sampled category as $I _ { 1 }$ , and another unlabeled image from the training batch is randomly selected as $I _ { 2 }$ . The Crop(·) operation is performed on the region containing the chosen category. After that, we can generate the augmented image by Eq 8. Since the adaptive CutMix is performed on the unlabeled data without any annotations, we use predictions as approximate ground-truth, which works well in practice.
|
| 108 |
+
|
| 109 |
+
Adaptive Copy-Paste. Copy-Paste [30] is an effective data augmentation strategy for instance segmentation. It yields significant gains on the challenging LVIS benchmark [31], especially for rare object categories. The key idea behind the Copy-Paste augmentation is to paste objects from the source image to the target image. Inspired by this, we further propose the adaptive Copy-Paste (see Figure 2 for illustration) for semi-supervised semantic segmentation. Different from adaptive CutMix, adaptive Copy-Paste augmentation strives for efficiently leveraging the labeled data. Similarly, we involve confidence bank to assess category-wise performance and use $\mathrm { E q } 9$ to compute sampling probability. The under-performing categories have higher probability to be selected for Copy-Paste. Experimentally, the proposed adaptive Copy-Paste augmentation yields slightly better performance in the category level than the instance level. Thus we copy all pixels belonging to the sampled category in the source image and paste them on the target image. Following [30], the augmented image is composed of two randomly selected images from the labeled data and a large scale jittering is applied.
|
| 110 |
+
|
| 111 |
+
Adaptive Equalization Sampling. As described in Section 1, due to the limited and unbalanced labeled data, the training tends to be biased. To alleviate the training bias, we propose a novel adaptive equalization sampling strategy which focuses training on a sparse set of under-performing samples and prevents the vast number of well-trained samples from overwhelming the model during training. Concretely, we define the sampling rate $s ^ { c }$ for category $c$ as:
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
s ^ { c } = \left[ \frac { 1 - \mathrm { C o n f } ^ { c } } { \operatorname* { m a x } _ { c \in \{ 1 , \dots , C \} } \left( 1 - \mathrm { C o n f } ^ { c } \right) } \right] ^ { \beta } , \ c \in \{ 1 , \dots , C \} ,
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
where $\beta$ denotes a tunable parameter. Instead of using all pixels to compute the unsupervised loss, for category $c$ with the sampling rate $s ^ { c }$ , we randomly sample a subset of pixels according to their predictions. Then the unsupervised loss in Eq 2 can be reformulated as:
|
| 118 |
+
|
| 119 |
+
$$
|
| 120 |
+
\mathcal { L } _ { u } = \frac { 1 } { { { N _ { u } } } } { \sum _ { i = 1 } ^ { { N _ { u } } } { \frac { 1 } { { \sum _ { j = 1 } ^ { { W H } } { \mathbb { 1 } _ { i j } } } } \sum _ { j = 1 } ^ { { W H } } { \ell _ { c e } ( { \hat { y } _ { i j } } , { { p _ { i j } } } ) \mathbb { 1 } _ { i j } } } } ,
|
| 121 |
+
$$
|
| 122 |
+
|
| 123 |
+
where $\mathbb { 1 } _ { i j } = 1$ indicates that the $j$ -th pixel in the $i$ -th image is sampled according to the sampling rate, otherwise $\mathbb { 1 } _ { i j }$ is set to 0, the other terms are the same as in $\operatorname { E q }$ .
|
| 124 |
+
|
| 125 |
+
Dynamic Re-Weighting. The performance of the model depends on the quality of pseudo labels. Existing methods [2, 4, 19] usually adopt a higher threshold on classification score to filter out most of the pixels with low-confidence. Though this strategy could alleviate the noise raised by pseudolabeling, the strict criteria leads to lower recall for the pixels from under-performing categories, which hinders the training. Another option is to discard the threshold and involve all pixels into the training. However, much more noise is introduced simultaneously. To alleviate this issue, we propose a dynamic re-weighting strategy which adds a modulating factor to the unsupervised loss in the way of semi-supervised learning. On the basis of Eq 11, we formulate our final unsupervised loss as:
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\begin{array} { r } { \mathcal { L } _ { u } = \displaystyle \frac { 1 } { N _ { u } } \sum _ { i = 1 } ^ { N _ { u } } \frac { 1 } { \sum _ { j = 1 } ^ { W H } w _ { i j } } \sum _ { j = 1 } ^ { W H } w _ { i j } \ell _ { c e } ( \hat { \pmb { y } } _ { i j } , { \pmb { p } } _ { i j } ) , } \\ { w _ { i j } = \displaystyle \operatorname* { m a x } _ { c \in \{ 1 , \dots , C \} } ( p _ { i j } ^ { c } ) ^ { \gamma } \mathbb { 1 } _ { i j } , } \end{array}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
where $\gamma$ is the tunable parameter. Different from the Focal Loss [32] where the modulating factor is used for reducing the loss contribution from easy samples, our formulation aims to allocate more contributions for the convincing samples. The combination of adaptive equalization sampling and dynamic re-weighting not only involves more samples from the under-performing categories into the training, but also alleviate the noise raised by pseudo-labeling.
|
| 132 |
+
|
| 133 |
+
# 4 Experiments
|
| 134 |
+
|
| 135 |
+
# 4.1 Setup
|
| 136 |
+
|
| 137 |
+
Datasets. Cityscapes [1] dataset is designed for urban scene understanding. It contains 30 classes and only 19 classes of them are used for scene parsing evaluation. The dataset contains 5, 000 finely annotated images and 20, 000 coarsely annotated images. The finely annotated 5, 000 images are split into 2, 975, 500 and 1, 525 images for training, validation and testing respectively.
|
| 138 |
+
|
| 139 |
+
PASCAL VOC 2012 [33] dataset is a standard object-centric semantic segmentation dataset. It contains 20 foreground object classes and a background class. The strand training, validation and testing sets consist of 1, 464, 1, 449 and 1, 556 images, respectively. Following common practice, we use the augmented set [34] which contains 10, 582 images as the training set.
|
| 140 |
+
|
| 141 |
+
ADE20K dataset [35] is a large scale scene parsing benchmark which contains dense labels of 150 stuff/object categories. The dataset includes 20K/2K/3K images for training, validation and testing.
|
| 142 |
+
|
| 143 |
+
For both Cityscapes and PASCAL VOC 2012 datasets, 1/2, 1/4, 1/8, 1/16 and 1/32 training images are randomly sampled as the labeled training data, and the remaining images are used as the unlabeled data. For each protocol, AEL provides 5 different data folds and the final performance is the average of 5 folds. In addition, we also evaluate our method on the setting where the full Cityscapes train set is used as the labeled data and 1, 000, 3, 000 and 5, 000 images and randomly selected from the Cityscapes coarse set as the unlabeled data.
|
| 144 |
+
|
| 145 |
+
Evaluation. We use single scale testing and adopt mean of Intersection over Union (mIoU) as the metric to evaluate the performance. We report the results on the Cityscapes val set and PASCAL VOC 2012 val set in comparisons with state-of-the-art methods. All ablation studies are conducted on the Cityscapes val set under 1/16 and 1/32 partition protocols.
|
| 146 |
+
|
| 147 |
+
Implementation Details. We use ResNet-101 pretrained on ImageNet [36] as our backbone, remove the last two down-sampling operations and employ dilated convolutions in the subsequent convolution layers, making the output stride equal to 8. We use DeepLabv $^ { 3 + }$ [37] as the segmentation head. For
|
| 148 |
+
|
| 149 |
+
Table 1: Comparison with state-of-the-art methods on the Cityscapes val set under different partition protocols. All the methods are based on DeepLabv $^ { 3 + }$ with ResNet-101 backbone.
|
| 150 |
+
|
| 151 |
+
<table><tr><td>Method</td><td>1/32 (93)</td><td>1/16 (186)</td><td>1/8 (372)</td><td>1/4 (744)</td><td>1/2 (1488)</td></tr><tr><td>Supervised</td><td>57.89</td><td>62.96</td><td>69.81</td><td>74.23</td><td>77.46</td></tr><tr><td>MT [11]</td><td>64.07</td><td>68.05</td><td>73.56</td><td>76.66</td><td>78.39</td></tr><tr><td>CCT [4]</td><td>66.35</td><td>69.32</td><td>74.12</td><td>75.99</td><td>78.10</td></tr><tr><td>Cutmix-Seg [2]</td><td>69.11</td><td>72.13</td><td>75.83</td><td>77.24</td><td>78.95</td></tr><tr><td>GCT[19]</td><td>63.21</td><td>66.75</td><td>72.66</td><td>76.11</td><td>78.34</td></tr><tr><td>AEL (Ours)</td><td>74.28</td><td>75.83</td><td>77.90</td><td>79.01</td><td>80.28</td></tr></table>
|
| 152 |
+
|
| 153 |
+
Table 2: Comparison with state-of-the-art methods on the PASCAL VOC 2012 val set under different partition protocols. All the methods are based on DeepLabv $^ { 3 + }$ with ResNet-101 backbone.
|
| 154 |
+
|
| 155 |
+
<table><tr><td rowspan=1 colspan=2>Method</td><td rowspan=1 colspan=1>1/32 (331)</td><td rowspan=1 colspan=3>1/16 (662)</td><td rowspan=1 colspan=1>1/8 (1323)</td><td rowspan=1 colspan=1>1/4 (2646)</td><td rowspan=1 colspan=1>1/2 (5291)</td></tr><tr><td rowspan=1 colspan=2>Supervised</td><td rowspan=1 colspan=1>70.14</td><td rowspan=1 colspan=3>70.60</td><td rowspan=1 colspan=1>73.12</td><td rowspan=1 colspan=1>76.35</td><td rowspan=1 colspan=1>77.21</td></tr><tr><td rowspan=2 colspan=2>MT [11]CCT[4]</td><td rowspan=1 colspan=1>70.56</td><td rowspan=1 colspan=3>71.29</td><td rowspan=2 colspan=1>73.3373.68</td><td rowspan=2 colspan=1>76.6176.51</td><td rowspan=2 colspan=1>78.0877.40</td></tr><tr><td rowspan=3 colspan=2>CCT[4]Cutmix-Seg [2]GCT [19]</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=3>71.22</td><td rowspan=1 colspan=1>71.86</td><td rowspan=1 colspan=1></td></tr><tr><td rowspan=2 colspan=1>73.3970.32</td><td rowspan=2 colspan=3>73.5670.90</td><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1>73.96</td><td rowspan=1 colspan=1>77.58</td><td rowspan=1 colspan=1>78.12</td></tr><tr><td rowspan=1 colspan=1>73.29</td><td rowspan=1 colspan=1>76.66</td><td rowspan=1 colspan=1>77.98</td></tr><tr><td rowspan=1 colspan=2>AEL (Ours)</td><td rowspan=1 colspan=1>76.97</td><td rowspan=1 colspan=3>77.20</td><td rowspan=1 colspan=1>77.57</td><td rowspan=1 colspan=1>78.06</td><td rowspan=1 colspan=1>80.29</td></tr></table>
|
| 156 |
+
|
| 157 |
+
Cityscapes dataset, we use stochastic gradient descent (SGD) optimizer with initial learning rate 0.01, weight decay 0.0005 and momentum 0.9. Moreover, we adopt the ‘poly’ learning rate policy, where the initial learning rate is multiplied by $\begin{array} { r } { ( 1 - \frac { \mathrm { i t e r } } { \mathrm { m a x i t e r } } ) ^ { 0 . 9 } } \end{array}$ . We adopt the crop size as $7 6 9 \times 7 6 9$ , batch size as 16 and training iterations as $1 8 \mathrm { k }$ . For PASCAL VOC 2012 dataset, we set the initial learning rate as 0.001, weight decay as 0.0001, crop size as $5 1 3 \times 5 1 3$ , batch size as 16 and training iterations as $3 0 \mathrm { k }$ . We use random horizontal flip and random resize as the default data augmentation if not specified. All the supervised baselines are trained on the labeled data.
|
| 158 |
+
|
| 159 |
+
# 4.2 Comparison with State-of-the-Art Methods
|
| 160 |
+
|
| 161 |
+
We compare our method with recent semi-supervised semantic segmentation methods, including Mean Teacher (MT) [11], Cross-Consistency Training (CCT) [4], Guided Collaborative Training (GCT) [19] and Cutmix-Seg [2]. For a fair comparison, we re-implement all above methods and adopt the same network architecture (DeepLabv $^ { 3 + }$ with ResNet-101 backbone).
|
| 162 |
+
|
| 163 |
+
Results on Cityscapes Dataset. Table 1 compares AEL with state-of-the-art methods on the Cityscapes val set. Without leveraging any unlabeled data, the performance of the supervised baseline is unsatisfactory under various data partition protocols, especially for the fewer data settings, e.g., 1/32 and 1/16 protocols. Our method consistently promotes the baseline, achieving the improvements of $+ 1 6 . 4 \%$ , $+ 1 2 . 9 \%$ , $+ 8 . 1 \%$ , $+ 4 . 8 \%$ and $+ 2 . 8 \%$ under 1/32, 1/16, 1/8, 1/4 and 1/2 partition protocols respectively. Our method also significantly outperforms the existing state-of-the-art methods by a large margin under all data partition protocols. In particular, AEL outperforms the existing best method Cutmix-Seg by $+ 5 . 2 \%$ under extremely few data setting (1/32 protocol), and surpasses Cutmix-Seg by $+ 1 . 3 \%$ under the $1 / 2$ protocol.
|
| 164 |
+
|
| 165 |
+
Results on PASCAL VOC 2012 Dataset. Table 2 shows comparison with state-of-the-art methods on the PASCAL VOC 2012 val dataset. AEL achieves consistent performance gains over the supervised baseline, obtaining an improvements of $+ 6 . 8 \%$ , $+ 7 . 0 \%$ , $+ 4 . 1 \%$ , $+ 1 . 7 \%$ and $+ 3 . 1 \%$ under 1/32, 1/16, 1/8, 1/4 and $1 / 2$ partition protocols respectively. We can see that over all protocols, AEL outperforms the state-of-the-art methods. For example, our method outperforms the previous best method by $+ 3 . 6 \%$ and $+ 2 . 2 \%$ under the 1/32 and $1 / 2$ partition protocols.
|
| 166 |
+
|
| 167 |
+
Table 3: Ablation study on the effectiveness of different components: Dynamic Re-weighting (DR), Adaptive Equalization Sampling(AES), Adaptive CutMix (ACM), Adaptive Copy-Paste (ACP).
|
| 168 |
+
|
| 169 |
+
<table><tr><td rowspan=1 colspan=1>DR</td><td rowspan=1 colspan=1>AES</td><td rowspan=1 colspan=1>ACM</td><td rowspan=1 colspan=2>ACP</td><td rowspan=1 colspan=1>1/32 (93)</td><td rowspan=1 colspan=1>1/16 (186)</td></tr><tr><td rowspan=7 colspan=1>√√√√</td><td rowspan=7 colspan=1>厂√厂√</td><td rowspan=6 colspan=1>4√</td><td rowspan=5 colspan=2>√</td><td rowspan=1 colspan=1>69.11</td><td rowspan=1 colspan=1>72.13</td></tr><tr><td rowspan=1 colspan=1>70.27</td><td rowspan=1 colspan=1>73.85</td></tr><tr><td rowspan=1 colspan=1>71.65</td><td rowspan=2 colspan=1>74.1273.8972.64</td></tr><tr><td rowspan=1 colspan=1>70.4969.69</td></tr><tr><td rowspan=1 colspan=1></td><td rowspan=2 colspan=1>72.5173.43</td><td rowspan=2 colspan=1>74.3975.12</td></tr><tr><td rowspan=1 colspan=2></td></tr><tr><td rowspan=1 colspan=1>√</td><td rowspan=1 colspan=2>√</td><td rowspan=1 colspan=1>74.28</td><td rowspan=1 colspan=1>75.83</td></tr></table>
|
| 170 |
+
|
| 171 |
+
# 4.3 Ablation Study
|
| 172 |
+
|
| 173 |
+
To further understand the advantages of AEL, we conduct a series of ablation studies that examine the effectiveness of different components and different hyper-parameters. All experiments are conducted on the validation set of Cityscapes dataset.
|
| 174 |
+
|
| 175 |
+
The Effectiveness of Different Components. We ablate each component of AEL step by step. Table 3 reports the studies. We use the basic framework described in Section 3.2 as our baseline, which achieves $6 9 . 1 1 \%$ and $7 2 . 1 3 \%$ under 1/32 and 1/16 protocols respectively. We first evaluate the effectiveness of each single component. As shown in the table, Dynamic Re-weighting (DR) improves the baseline by $+ 1 . 1 \%$ and $+ 1 . 7 \%$ under 1/32 and 1/16 partition protocols. Adaptive Equalization Sampling (AES) alleviates the biased training issue, achieving the improvements of $+ 2 . 5 \%$ and $+ 2 . 0 \%$ over the baseline. Adaptive CutMix (ACM) and Adaptive Copy-Paste (ACP) data augmentation approaches give more chance for under-performing categories to be sampled, and bring the improvements of $+ 1 . 3 \% / + 1 . 7 \%$ and $+ 0 . 5 \% / + 0 . 5 \%$ respectively. Furthermore, we present the performance gains in a progressive manner. On top of the DR, by leveraging AES strategy on the unsupervised loss, our method obtains improvements of $+ 2 . 3 \%$ and $+ 0 . 5 \%$ under 1/32 and 1/16 protocols. The two proposed data augmentation approaches further boost the performance to $7 4 . 2 8 \%$ and $7 5 . 8 3 \%$ , demonstrating the effectiveness of our adaptive learning.
|
| 176 |
+
|
| 177 |
+
Ablation Study on Hyper-Parameters. Table 5 ablates the tunable parameter $\gamma$ in dynamic reweighting (in Eq 13), where $\gamma = 2$ yields slightly better performance. Dynamic re-weighting is found to be insensitive to $\gamma$ .
|
| 178 |
+
|
| 179 |
+
Table 6 ablates the influence of different indicators, including Confidence (in Eq 4), Margin (in Eq 5), and Entropy (in Eq 6). We use the Confidence as the default indicator to assess the category-wise performance during training due to its best performance.
|
| 180 |
+
|
| 181 |
+
Adaptive CutMix requires a criteria to identify whether an unlabeled image contains a certain class. We use the ratio between pseudo labels of a certain category and total pixels of the input image as the criteria. Table 7 ablates different ratios.
|
| 182 |
+
|
| 183 |
+
Table 8 studies the number of sampled categories $K$ in the Adaptive Copy-Paste. We find that $K = 3$ achieves the best performance. One potential reason is that a smaller $K$ provides less training samples from the under-performing categories while a larger $K$ may increase the difficulty for training.
|
| 184 |
+
|
| 185 |
+
Table 9 ablates the loss weight $\alpha$ which is used to balance the supervised loss and unsupervised loss as shown in Eq 3. As illustrated in the table, $\alpha = 1$ achieves the best performance. We use $\alpha = 1$ in our approach for all the experiments.
|
| 186 |
+
|
| 187 |
+
# 4.4 Per-class Results
|
| 188 |
+
|
| 189 |
+
Since the class imbalance problem is severe in the Cityscapes dataset, we provide per-class results under 1/32 data partition protocol in Table 4. We choose 9 classes with the least training samples in the Cityscapes dataset as tail classes, i.e. wall, traffic light, traffic sign, rider, truck, bus, train, motorcycle and bicycle. As shown in the table, our method not only achieves the best overall mIoU, but also obtains significant improvements on tail classes. In particular, Our method outperforms the existing best method Cutmix-Seg by $+ 5 . 2 \%$ in overall mIoU and $+ 9 . 2 \%$ in mIoU for tail classes under 1/32 partition protocol.
|
| 190 |
+
|
| 191 |
+
Table 4: Per-class results on Cityscapes val set under 1/32 data partition protocol. All the methods are based on DeepLabv $^ { 3 + }$ with ResNet-101 backbone.
|
| 192 |
+
|
| 193 |
+
<table><tr><td></td><td></td><td></td><td></td><td></td><td>Head Classes</td><td></td><td></td><td></td><td colspan="10">Tail Classes</td></tr><tr><td>Methods</td><td></td><td></td><td>meno </td><td>seeaara Buping </td><td>Vegeee </td><td>Eirllrn 灵</td><td>uosiad</td><td>3u</td><td></td><td>igre</td><td></td><td>rs grgen</td><td></td><td></td><td></td><td></td><td>meroreite</td><td>eaelbir</td></tr><tr><td>Supervised</td><td></td><td>57.9</td><td>39.8 94.6</td><td>72.5 87.4</td><td>42.4 51.6</td><td>88.3 49.8</td><td>91.1</td><td>74.5</td><td>89.4</td><td>21.7</td><td>47.7</td><td>59.1</td><td>33.7</td><td>43.3</td><td>37.2</td><td></td><td>11.4 42.1</td><td>62.2</td></tr><tr><td>GCT[19]</td><td>63.2</td><td>48.1</td><td>96.9</td><td>75.8 89.8</td><td>40.3 57.5 91.1</td><td>53.5</td><td>93.1 78.1</td><td>91.6</td><td></td><td>23.6 58.9</td><td></td><td>70.1</td><td>43.4</td><td>25.8</td><td>45.7</td><td>49.2</td><td>45.0</td><td>71.4</td></tr><tr><td>MT [11]</td><td>64.1</td><td>50.4</td><td>96.7</td><td>75.6 89.5</td><td>40.0 57.3 91.0</td><td>53.2</td><td>92.80 77.9</td><td>91.3</td><td></td><td>26.2 61.1</td><td></td><td>72.3</td><td>45.8</td><td>28.0</td><td>48.1</td><td>51.6</td><td>47.1</td><td>73.8</td></tr><tr><td>CCT [4]</td><td>66.4</td><td>54.2</td><td>95.7</td><td>77.2 88.6</td><td>46.5 58.5 90.1</td><td>55.5</td><td>91.5</td><td>77.9 91.8</td><td></td><td>27.9</td><td>60.5</td><td>71.8</td><td>48.0</td><td>44.5</td><td>61.4</td><td>50.7</td><td>52.0</td><td>70.5</td></tr><tr><td>Cutmix-Seg [2]</td><td>69.1</td><td>58.7</td><td>97.2</td><td>78.6 90.1</td><td>48.1 60.1 91.5</td><td>57.2</td><td>93.0 79.6</td><td>93.3</td><td></td><td>32.4</td><td>64.8</td><td>76.5</td><td>52.3</td><td>49.4</td><td>66.0</td><td>54.8</td><td>56.7</td><td>75.1</td></tr><tr><td>AEL (Ours)</td><td>74.3</td><td>67.9</td><td>97.1</td><td>78.7 90.3</td><td>52.3 62.0 91.7</td><td>59.2</td><td>93.8</td><td>81.6 94.0</td><td></td><td>37.3</td><td>67.9</td><td>77.6</td><td>60.5</td><td>65.6</td><td>83.8</td><td>74.3</td><td>66.9</td><td>77.0</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 194 |
+
|
| 195 |
+
Table 5: Study on $\gamma$ of dynamic re-weighting.
|
| 196 |
+
|
| 197 |
+
<table><tr><td>Y</td><td>1/32</td><td>1/16</td></tr><tr><td>0</td><td>69.11</td><td>72.13</td></tr><tr><td>0.5</td><td>69.74</td><td>73.28</td></tr><tr><td>1</td><td>69.35</td><td>73.67</td></tr><tr><td>2</td><td>70.27</td><td>73.85</td></tr><tr><td>3</td><td>70.26</td><td>73.40</td></tr></table>
|
| 198 |
+
|
| 199 |
+
Table 6: Study on different indicators for AES.
|
| 200 |
+
|
| 201 |
+
<table><tr><td>Indicator</td><td>1/32</td><td>1/16</td></tr><tr><td>None</td><td>70.27</td><td>73.85</td></tr><tr><td>Ent</td><td>71.38</td><td>73.21</td></tr><tr><td>Conf</td><td>72.51</td><td>74.39</td></tr><tr><td>Margin</td><td>70.86</td><td>73.05</td></tr></table>
|
| 202 |
+
|
| 203 |
+
Table 7: Study on different ratios in ACM.
|
| 204 |
+
|
| 205 |
+
<table><tr><td>Ratio</td><td>1/32</td><td>1/16</td></tr><tr><td>0.001</td><td>73.27</td><td>74.28</td></tr><tr><td>0.003</td><td>73.29</td><td>74.36</td></tr><tr><td>0.005</td><td>73.43</td><td>75.12</td></tr><tr><td>0.01</td><td>72.78</td><td>73.66</td></tr></table>
|
| 206 |
+
|
| 207 |
+
# 4.5 Performance on the Full Labeled Set
|
| 208 |
+
|
| 209 |
+
We conduct experiments where the full Cityscapes train set is used as the labeled dataset and the Cityscapes coarse set is used as the unlabeled dataset. We do not leverage any annotations from the coarse set though it provides coarsely annotated ground-truth. We randomly sample 1,000, 3,000 and 5,000 images from the coarse set to verify the proposed method. As shown in Table 10, the proposed AEL can still improve the supervised baselines by leveraging the unlabeled data though a large amount of labeled data is provided.
|
| 210 |
+
|
| 211 |
+
# 4.6 Results on ADE20K Dataset
|
| 212 |
+
|
| 213 |
+
We further provide results on the ADE20K dataset [35]. Since no previous methods in semi-supervised segmentation conducted experiments on ADE20K dataset, we compare our method with supervised baseline and existing best method Cutmix-Seg on the dataset. As shown in Table 11, our method consistently promotes the supervised baseline by $6 . 3 6 \%$ , $5 . 7 0 \%$ , $5 . 6 7 \%$ , $3 . 1 8 \%$ and $1 . 4 5 \%$ , and outperforms the Cutmix-Seg by $2 . 2 5 \%$ , $3 . 3 8 \%$ , $2 . 4 8 \%$ , $1 . 3 1 \%$ and $1 . 2 6 \%$ under 1/32, 1/16, 1/8, 1/4 and 1/2 partition protocols, respectively.
|
| 214 |
+
|
| 215 |
+
# 4.7 Qualitative Results
|
| 216 |
+
|
| 217 |
+
Figure 3 shows the visualization results of different methods evaluated on the Cityscapes val set. We compare the proposed AEL with ground-truth, supervised baseline and our basic framework described in Section 3.2. Benefiting from a series of technologies designed for the balanced training, AEL achieves great performance on not only head categories (e.g. Road), but also tailed categories (e.g. Rider and Bicycle).
|
| 218 |
+
|
| 219 |
+
Table 8: Study on number of sampled categories $K$ in ACP.
|
| 220 |
+
|
| 221 |
+
<table><tr><td>K</td><td>1/32</td><td>1/16</td></tr><tr><td>1</td><td>72.18</td><td>74.85</td></tr><tr><td>2</td><td>72.84</td><td>74.95</td></tr><tr><td>3</td><td>74.28</td><td>75.83</td></tr><tr><td>4</td><td>73.43</td><td>74.10</td></tr></table>
|
| 222 |
+
|
| 223 |
+
Table 9: Study on loss weight $\alpha$ .
|
| 224 |
+
|
| 225 |
+
<table><tr><td>α</td><td>1/32</td><td>1/16</td></tr><tr><td>0.5</td><td>71.85</td><td>74.61</td></tr><tr><td>1.0</td><td>74.28</td><td>75.83</td></tr><tr><td>1.5</td><td>74.10</td><td>73.44</td></tr><tr><td>2.0</td><td>73.79</td><td>72.86</td></tr></table>
|
| 226 |
+
|
| 227 |
+
Table 10: Performance on the full Cityscapes train set.
|
| 228 |
+
|
| 229 |
+
<table><tr><td rowspan=1 colspan=1>Number</td><td rowspan=1 colspan=1>Baseline</td><td rowspan=1 colspan=1>AEL</td></tr><tr><td rowspan=1 colspan=1>0</td><td rowspan=2 colspan=1>80.1680.22</td><td rowspan=2 colspan=1>80.28</td></tr><tr><td rowspan=1 colspan=1>1000</td></tr><tr><td rowspan=1 colspan=1>3000</td><td rowspan=1 colspan=1>80.55</td><td rowspan=1 colspan=1>81.36</td></tr><tr><td rowspan=1 colspan=1>5000</td><td rowspan=1 colspan=1>80.92</td><td rowspan=1 colspan=1>81.95</td></tr></table>
|
| 230 |
+
|
| 231 |
+
Table 11: Comparison with supervised baseline and Cutmix-Seg on the ADE20K val set under different partition protocols. All the methods are based on DeepLabv $^ { 3 + }$ with ResNet-101 backbone.
|
| 232 |
+
|
| 233 |
+
<table><tr><td rowspan=1 colspan=1>Method</td><td rowspan=1 colspan=1>1/32 (631)</td><td rowspan=1 colspan=1>1/16 (1263)</td><td rowspan=1 colspan=1>1/8 (2526)</td><td rowspan=1 colspan=1>1/4 (5052)</td><td rowspan=1 colspan=1>1/2 (10105)</td></tr><tr><td rowspan=1 colspan=1>Supervised</td><td rowspan=1 colspan=1>22.04</td><td rowspan=1 colspan=1>27.52</td><td rowspan=1 colspan=1>32.36</td><td rowspan=1 colspan=1>36.39</td><td rowspan=1 colspan=1>41.97</td></tr><tr><td rowspan=1 colspan=1>Cutmix-Seg [2]</td><td rowspan=1 colspan=1>26.15 一</td><td rowspan=1 colspan=1>29.84</td><td rowspan=1 colspan=1>35.55</td><td rowspan=1 colspan=1>38.26</td><td rowspan=1 colspan=1>42.16</td></tr><tr><td rowspan=1 colspan=1>AEL (Ours)</td><td rowspan=1 colspan=1>28.40</td><td rowspan=1 colspan=1>33.22</td><td rowspan=1 colspan=1>38.03</td><td rowspan=1 colspan=1>39.57</td><td rowspan=1 colspan=1>43.42</td></tr></table>
|
| 234 |
+
|
| 235 |
+

|
| 236 |
+
Figure 3: Qualitative results on the Cityscapes val set. From left to right: input image, ground-truth, predictions of the supervised baseline, predictions of our basic framework and predictions of the proposed AEL. Orange rectangles highlight the unsatisfactory segmentation results.
|
| 237 |
+
|
| 238 |
+
# 5 Conclusion
|
| 239 |
+
|
| 240 |
+
In this paper, we propose a novel Adaptive Equalization Learning (AEL) framework for semisupervised semantic segmentation. Different from the existing methods dedicating to the design of consistency regularization or pseudo-labeling, AEL aims to adaptively balance the training based on the fact that pixel categories in common semantic segmentation datasets tend to be imbalanced. We introduce a confidence bank to dynamically record the category-wise performance at each training step, which enables us to identify the under-performing categories and adaptively tilt training towards these categories. Several technologies are proposed to make the training unbiased, namely adaptive Copy-Paste and CutMix, adaptive equalization sampling and dynamic re-weighting. Through the adaptive design, AEL outperforms the state-of-the-art methods by a large margin on the Cityscapes and Pascal VOC benchmarks under various data partition protocols.
|
| 241 |
+
|
| 242 |
+
# Acknowledgment
|
| 243 |
+
|
| 244 |
+
This work was supported by the National Key R&D Program of China under grant 2017YFB1002804 and National Natural Science Foundation of China (No. 31771230).
|
| 245 |
+
|
| 246 |
+
References
|
| 247 |
+
[1] Marius Cordts, Mohamed Omran, Sebastian Ramos, Timo Rehfeld, Markus Enzweiler, Rodrigo Benenson, Uwe Franke, Stefan Roth, and Bernt Schiele. The cityscapes dataset for semantic urban scene understanding. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pages 3213–3223. IEEE Computer Society, 2016.
|
| 248 |
+
[2] Geoffrey French, Samuli Laine, Timo Aila, Michal Mackiewicz, and Graham D. Finlayson. Semi-supervised semantic segmentation needs strong, varied perturbations. In 31st British Machine Vision Conference 2020, BMVC 2020, Virtual Event, UK, September 7-10, 2020. BMVA Press, 2020.
|
| 249 |
+
[3] Jongmok Kim, Jooyoung Jang, and Hyunwoo Park. Structured consistency loss for semisupervised semantic segmentation. CoRR, abs/2001.04647, 2020.
|
| 250 |
+
[4] Yassine Ouali, Céline Hudelot, and Myriam Tami. Semi-supervised semantic segmentation with cross-consistency training. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 12671–12681. IEEE, 2020.
|
| 251 |
+
[5] Zhanghan Ke, Daoye Wang, Qiong Yan, Jimmy S. J. Ren, and Rynson W. H. Lau. Dual student: Breaking the limits of the teacher in semi-supervised learning. In 2019 IEEE/CVF International Conference on Computer Vision, ICCV 2019, Seoul, Korea (South), October 27 - November 2, 2019, pages 6727–6735. IEEE, 2019.
|
| 252 |
+
[6] Jianlong Yuan, Yifan Liu, Chunhua Shen, Zhibin Wang, and Hao Li. A simple baseline for semi-supervised semantic segmentation with strong data augmentation. arXiv preprint arXiv:2104.07256, 2021.
|
| 253 |
+
[7] Xiaokang Chen, Yuhui Yuan, Gang Zeng, and Jingdong Wang. Semi-supervised semantic segmentation with cross pseudo supervision. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 2613–2622, 2021.
|
| 254 |
+
[8] Yuliang Zou, Zizhao Zhang, Han Zhang, Chun-Liang Li, Xiao Bian, Jia-Bin Huang, and Tomas Pfister. Pseudoseg: Designing pseudo labels for semantic segmentation. arXiv preprint arXiv:2010.09713, 2020.
|
| 255 |
+
[9] Yves Grandvalet, Yoshua Bengio, et al. Semi-supervised learning by entropy minimization. In CAP, pages 281–296, 2005.
|
| 256 |
+
[10] Samuli Laine and Timo Aila. Temporal ensembling for semi-supervised learning. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net, 2017.
|
| 257 |
+
[11] Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. In Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 1195–1204, 2017.
|
| 258 |
+
[12] Takeru Miyato, Shin-ichi Maeda, Masanori Koyama, and Shin Ishii. Virtual adversarial training: A regularization method for supervised and semi-supervised learning. IEEE Trans. Pattern Anal. Mach. Intell., 41(8):1979–1993, 2019.
|
| 259 |
+
[13] Dong-Hyun Lee et al. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. In Workshop on challenges in representation learning, ICML, volume 3, 2013.
|
| 260 |
+
[14] Kihyuk Sohn, David Berthelot, Nicholas Carlini, Zizhao Zhang, Han Zhang, Colin Raffel, Ekin Dogus Cubuk, Alexey Kurakin, and Chun-Liang Li. Fixmatch: Simplifying semisupervised learning with consistency and confidence. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
|
| 261 |
+
|
| 262 |
+
[15] David Berthelot, Nicholas Carlini, Ian J. Goodfellow, Nicolas Papernot, Avital Oliver, and Colin Raffel. Mixmatch: A holistic approach to semi-supervised learning. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 5050–5060, 2019.
|
| 263 |
+
|
| 264 |
+
[16] Qizhe Xie, Zihang Dai, Eduard H. Hovy, Thang Luong, and Quoc Le. Unsupervised data augmentation for consistency training. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
|
| 265 |
+
|
| 266 |
+
[17] David Berthelot, Nicholas Carlini, Ekin D. Cubuk, Alex Kurakin, Kihyuk Sohn, Han Zhang, and Colin Raffel. Remixmatch: Semi-supervised learning with distribution matching and augmentation anchoring. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020.
|
| 267 |
+
|
| 268 |
+
[18] Qizhe Xie, Minh-Thang Luong, Eduard H. Hovy, and Quoc V. Le. Self-training with noisy student improves imagenet classification. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 10684–10695. IEEE, 2020.
|
| 269 |
+
|
| 270 |
+
[19] Zhanghan Ke, Di Qiu, Kaican Li, Qiong Yan, and Rynson W. H. Lau. Guided collaborative training for pixel-wise semi-supervised learning. In Computer Vision - ECCV 2020 - 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part XIII, volume 12358 of Lecture Notes in Computer Science, pages 429–445. Springer, 2020.
|
| 271 |
+
|
| 272 |
+
[20] Yuzhe Yang and Zhi Xu. Rethinking the value of labels for improving class-imbalanced learning. In Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
|
| 273 |
+
|
| 274 |
+
[21] Minsung Hyun, Jisoo Jeong, and Nojun Kwak. Class-imbalanced semi-supervised learning. CoRR, abs/2002.06815, 2020.
|
| 275 |
+
|
| 276 |
+
[22] Chen Wei, Kihyuk Sohn, Clayton Mellina, Alan L. Yuille, and Fan Yang. Crest: A class-rebalancing self-training framework for imbalanced semi-supervised learning. CoRR, abs/2102.09559, 2021.
|
| 277 |
+
|
| 278 |
+
[23] Mateusz Buda, Atsuto Maki, and Maciej A. Mazurowski. A systematic study of the class imbalance problem in convolutional neural networks. Neural Networks, 106:249–259, 2018.
|
| 279 |
+
|
| 280 |
+
[24] Jonathon Byrd and Zachary Chase Lipton. What is the effect of importance weighting in deep learning? In Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pages 872–881. PMLR, 2019.
|
| 281 |
+
|
| 282 |
+
[25] Kaidi Cao, Colin Wei, Adrien Gaidon, Nikos Aréchiga, and Tengyu Ma. Learning imbalanced datasets with label-distribution-aware margin loss. In Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 1565–1576, 2019.
|
| 283 |
+
|
| 284 |
+
[26] Yin Cui, Menglin Jia, Tsung-Yi Lin, Yang Song, and Serge J. Belongie. Class-balanced loss based on effective number of samples. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 9268–9277. Computer Vision Foundation / IEEE, 2019.
|
| 285 |
+
|
| 286 |
+
[27] Sangdoo Yun, Dongyoon Han, Sanghyuk Chun, Seong Joon Oh, Youngjoon Yoo, and Junsuk Choe. Cutmix: Regularization strategy to train strong classifiers with localizable features. In 2019 IEEE/CVF International Conference on Computer Vision, ICCV 2019, Seoul, Korea (South), October 27 - November 2, 2019, pages 6022–6031. IEEE, 2019.
|
| 287 |
+
|
| 288 |
+
[28] Yu Li, Tao Wang, Bingyi Kang, Sheng Tang, Chunfeng Wang, Jintao Li, and Jiashi Feng. Overcoming classifier imbalance for long-tail object detection with balanced group softmax. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), June 2020.
|
| 289 |
+
[29] Gyungin Shin, Weidi Xie, and Samuel Albanie. All you need are a few pixels: semantic segmentation with pixelpick. CoRR, abs/2104.06394, 2021.
|
| 290 |
+
[30] Golnaz Ghiasi, Yin Cui, Aravind Srinivas, Rui Qian, Tsung-Yi Lin, Ekin D. Cubuk, Quoc V. Le, and Barret Zoph. Simple copy-paste is a strong data augmentation method for instance segmentation. CoRR, abs/2012.07177, 2020.
|
| 291 |
+
[31] Agrim Gupta, Piotr Dollar, and Ross Girshick. Lvis: A dataset for large vocabulary instance segmentation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 5356–5364, 2019.
|
| 292 |
+
[32] Tsung-Yi Lin, Priya Goyal, Ross B. Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense object detection. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 2999–3007. IEEE Computer Society, 2017.
|
| 293 |
+
[33] Mark Everingham, Luc Van Gool, Christopher K. I. Williams, John M. Winn, and Andrew Zisserman. The pascal visual object classes (VOC) challenge. Int. J. Comput. Vis., 88(2):303– 338, 2010.
|
| 294 |
+
[34] Bharath Hariharan, Pablo Arbelaez, Lubomir D. Bourdev, Subhransu Maji, and Jitendra Malik. Semantic contours from inverse detectors. In IEEE International Conference on Computer Vision, ICCV 2011, Barcelona, Spain, November 6-13, 2011, pages 991–998. IEEE Computer Society, 2011.
|
| 295 |
+
[35] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ade20k dataset. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 633–641, 2017.
|
| 296 |
+
[36] 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.
|
| 297 |
+
[37] Liang-Chieh Chen, Yukun Zhu, George Papandreou, Florian Schroff, and Hartwig Adam. Encoder-decoder with atrous separable convolution for semantic image segmentation. In Proceedings of the European conference on computer vision (ECCV), pages 801–818, 2018.
|
md/train/5Dl1378QutR/5Dl1378QutR.md
ADDED
|
@@ -0,0 +1,403 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Diversity Policy Gradient for Sample Efficient Quality-Diversity Optimization
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
1 A fascinating aspect of nature lies in its ability to produce a large and diverse
|
| 11 |
+
2 collection of organisms that are all high-performing in their niche. By contrast,
|
| 12 |
+
3 most AI algorithms focus on finding a single efficient solution to a given problem.
|
| 13 |
+
4 Aiming for diversity in addition to performance is a convenient way to deal with the
|
| 14 |
+
5 exploration-exploitation trade-off that plays a central role in learning. It also allows
|
| 15 |
+
6 for increased robustness when the returned collection contains several working
|
| 16 |
+
7 solutions to the considered problem, making it well-suited for real applications such
|
| 17 |
+
8 as robotics. Quality-Diversity (QD) methods are evolutionary algorithms designed
|
| 18 |
+
9 for this purpose. This paper proposes a novel algorithm, QD-PG, which combines
|
| 19 |
+
10 the strength of Policy Gradient algorithms and Quality Diversity approaches to
|
| 20 |
+
11 produce a collection of diverse and high-performing neural policies in continuous
|
| 21 |
+
12 control environments. The main contribution of this work is the introduction of a
|
| 22 |
+
13 Diversity Policy Gradient (DPG) that exploits information at the time-step level to
|
| 23 |
+
14 thrive policies towards more diversity in a sample-efficient manner. Specifically,
|
| 24 |
+
15 QD-PG selects neural controllers from a MAP-Elites grid and uses two gradient
|
| 25 |
+
16 based mutation operators to improve both quality and diversity, resulting in stable
|
| 26 |
+
17 population updates. Our results demonstrate that QD-PG generates collections of di
|
| 27 |
+
18 verse solutions that solve challenging exploration and control problems while being
|
| 28 |
+
19 two orders of magnitude more sample-efficient than its evolutionary competitors.
|
| 29 |
+
|
| 30 |
+
# 20 1 Introduction
|
| 31 |
+
|
| 32 |
+
21 Natural evolution has the fascinating ability to produce diverse organisms that are all well adapted to
|
| 33 |
+
22 their respective niche. Inspired by this ability to produce a tremendous diversity of living systems,
|
| 34 |
+
23 Quality-Diversity (QD) is a new family of optimization algorithms that aims at searching for a
|
| 35 |
+
24 collection of both diverse and high-performing solutions (Pugh et al., 2016; Cully & Demiris, 2017).
|
| 36 |
+
25 While classic optimization methods focus on finding a single efficient solution, QD optimization aims
|
| 37 |
+
26 to cover the range of possible solution types and to return the best solution for each type. This process
|
| 38 |
+
27 is sometimes referred to as “illumination" in opposition to optimization, as it reveals (or illuminates)
|
| 39 |
+
28 a search space of interest often called the behavior descriptor space (Mouret & Clune, 2015).
|
| 40 |
+
29 The principal advantage of QD approaches resides in their intrinsic capacity to deliver a large and
|
| 41 |
+
30 diverse set of working alternatives when a single solution fails (Cully et al., 2015). By producing a
|
| 42 |
+
31 collection of solutions instead of a unique one, QD algorithms allow to obtain different ways to solve
|
| 43 |
+
32 a single problem, leading to greater robustness, which can help to reduce the reality gap when applied
|
| 44 |
+
33 to robotics (Koos et al., 2012). Diversity seeking is the core component that allows QD algorithms to
|
| 45 |
+
34 generate large collections of diverse solutions. By encouraging the emergence of novel behaviors in
|
| 46 |
+
35 the population without focusing on performance alone, diversity seeking algorithms explore regions
|
| 47 |
+
36 of the behavior descriptor space that are unreachable for conventional algorithms (Doncieux et al.,
|
| 48 |
+
37 2019). Another benefit of QD is its ability to solve hard exploration problems where the reward signal
|
| 49 |
+
38 is sparse or deceptive, and on which standard optimization techniques are ineffective (Colas et al.,
|
| 50 |
+
39 2020). This ability can be interpreted as a direct consequence of the structured search for diversity in
|
| 51 |
+
40 the behavior descriptor space.
|
| 52 |
+
41 Quality-Diversity algorithms build on black-box optimization methods such as evolutionary algo
|
| 53 |
+
42 rithms to evolve a population of solutions (Cully & Demiris, 2017). Historically, they rely on random
|
| 54 |
+
43 mutations to explore small search spaces but struggle when facing higher-dimensional problems. As
|
| 55 |
+
44 a result, they often scale poorly to problems where neural networks with many parameters provide
|
| 56 |
+
45 state-of-the-art results (Colas et al., 2020).
|
| 57 |
+
46 Building large and efficient controllers that work with continuous actions has been a long-standing
|
| 58 |
+
47 goal in Artificial Intelligence and in particular in robotics. Deep reinforcement learning (RL), and
|
| 59 |
+
48 especially Policy Gradient (PG) methods have proven efficient at training such large controllers
|
| 60 |
+
49 (Schulman et al., 2017; Lillicrap et al., 2015; Fujimoto et al., 2018; Haarnoja et al., 2018). One of the
|
| 61 |
+
50 keys to this success lies in the fact that PG methods exploit the structure of the objective function
|
| 62 |
+
51 when the problem can be formalized as a Markov Decision Process (MDP), leading to substantial
|
| 63 |
+
52 gains in sample efficiency. Moreover, they also exploit the analytical structure of the controller when
|
| 64 |
+
53 known, which allows the sample complexity of these methods to be independent of parameter space
|
| 65 |
+
54 dimensionality (Vemula et al., 2019). In real-world applications, these gains turn out to be critical
|
| 66 |
+
55 when interacting with the environment is expensive. PG methods usually rely on simple exploration
|
| 67 |
+
56 mechanisms, like adding Gaussian noise (Fujimoto et al., 2018) or maximizing entropy (Haarnoja
|
| 68 |
+
57 et al., 2018) to explore the action space, which happens to be insufficient in hard exploration tasks
|
| 69 |
+
58 where the reward signal is sparse or deceptive (Colas et al., 2018; Nasiriany et al., 2019).
|
| 70 |
+
59 Successful attempts have been made to combine evolutionary methods and reinforcement learning
|
| 71 |
+
60 (Khadka et al., 2019; Khadka & Tumer, 2018; Pourchot & Sigaud, 2018; Shi et al., 2020). However,
|
| 72 |
+
61 all these techniques only focus on building high-performing solutions and do not explicitly encourage
|
| 73 |
+
62 diversity within the population. In this regard, they fail when confronted with hard exploration
|
| 74 |
+
63 problems. To address these problems, one needs to seek both high-performing solutions and diversity
|
| 75 |
+
64 within them.
|
| 76 |
+
|
| 77 |
+

|
| 78 |
+
Figure 1: The agent robot is rewarded for running forward as fast as possible. Following the reward signal without further exploration leads the agent into the trap, which corresponds to a poor local minimum. QD-PG produces a collection of solutions that are diverse and high-performing, allowing to find several working alternatives to solve a deceptive control problem.
|
| 79 |
+
|
| 80 |
+
# 65 Contributions
|
| 81 |
+
|
| 82 |
+
66 In this work, we introduce the idea of a diversity policy gradient (DPG) that thrives solutions towards
|
| 83 |
+
67 more diversity. We show that the DPG can be used in combination with the standard policy gradient,
|
| 84 |
+
68 dubbed quality policy gradient (QPG), to produce high-performing and diverse solutions. Our
|
| 85 |
+
69 algorithm, called QD-PG, builds on MAP-Elites (Mouret & Clune, 2015), demonstrates remarkable
|
| 86 |
+
70 sample efficiency brought by off-policy PG methods, and produces collections of good solutions
|
| 87 |
+
71 in a single run (see Figure 1). We compare QD-PG to state-of-the-art RL algorithms and to several
|
| 88 |
+
72 evolutionary methods known as Evolution Strategies (ESs) augmented with a diversity objective,
|
| 89 |
+
73 namely the NS-ES family (Conti et al., 2018) and the ME-ES algorithm (Colas et al., 2020). We
|
| 90 |
+
74 show that QD-PG generates collections of robust solutions in hard exploration problems while RL
|
| 91 |
+
75 algorithms struggle to produce a single one, and that QD-PG is two orders of magnitude more sample
|
| 92 |
+
76 efficient than the best of its evolutionary competitors.
|
| 93 |
+
|
| 94 |
+
# 77 2 Background
|
| 95 |
+
|
| 96 |
+
# 78 Problem statement
|
| 97 |
+
|
| 98 |
+
79 We consider an MDP $( S , { \mathcal { A } } , { \mathcal { R } } , { \mathcal { T } } , \gamma )$ where $s$ is the state space, $\mathcal { A }$ the action space, $\mathcal { R } : \mathcal { S } \times \mathcal { A } \mathbb { R }$
|
| 99 |
+
80 the reward function, $\mathcal { T } : \mathcal { S } \times \mathcal { A } \mathcal { S }$ the dynamics transition function and $\gamma$ a discount factor.
|
| 100 |
+
81 We assume that both $s$ and $\mathcal { A }$ are continuous and consider a controller, or policy, $\pi _ { \theta } : { \mathcal { S } } A$
|
| 101 |
+
82 parameterized by $\theta \in \Theta$ , which is called a solution to the problem. We say that a solution $\theta$ is
|
| 102 |
+
83 highy-performing if the expectation over the sum of rewards is high when using $\pi _ { \theta }$ . The fitness of a
|
| 103 |
+
84 solution measures its performance $F : \Theta \to \mathbb { R }$ where $F ( \theta ) = \mathbb { E } _ { \pi _ { \theta } } \sum _ { t } \gamma ^ { t } r _ { t }$ .
|
| 104 |
+
85 To characterize the novelty of a solution w.r.t. $J$ other solutions, as in QD methods, we introduce a
|
| 105 |
+
86 behavior descriptor (BD) space $\boldsymbol { B }$ , a behavior descriptor extraction function $\xi : \Theta \to B$ , and define a
|
| 106 |
+
87 distance metric $| | . | | _ { B }$ over $\boldsymbol { B }$ . The novelty $n : \Theta \times \dot { \Theta } ^ { J } \mathbb { R } ^ { + }$ of a solution $\theta$ w.r.t. a list of solutions
|
| 107 |
+
88 $( \theta _ { j } ) _ { j = 1 , \ldots , J }$ is defined as $\begin{array} { r } { n \left( \theta , ( \theta _ { j } ) _ { j = 1 , \dots , J } \right) = \sum _ { j } | | \xi ( \theta ) , \xi ( \theta _ { j } ) | | _ { \mathcal { B } } . } \end{array}$ . In other words, we quantify the
|
| 108 |
+
89 novelty of a solution w.r.t. a list of $J$ solutions as the sum of distances between its behavior descriptor
|
| 109 |
+
90 and the behavior descriptors of all solutions of the list. We also use the distance $| | . | | _ { B }$ to characterize
|
| 110 |
+
91 the diversity of a set of $K$ solutions $\{ \theta _ { k } \} _ { k = 1 , \dots , K }$ . We formally define diversity $d : \Theta ^ { K } \to \mathbb { R } ^ { + }$ as
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
d \left( \{ \theta _ { k } \} _ { k = 1 , \ldots , K } \right) = \sum _ { i = 1 } ^ { K } \operatorname* { m i n } _ { k \neq i } | | { \xi } ( \theta _ { i } ) , { \xi } ( \theta _ { k } ) | | _ { \cal B } ,
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
meaning that a set of solutions is diverse if the solutions are distant with respect to each other in the sense of $| | . | | _ { B }$ .
|
| 117 |
+
|
| 118 |
+
# 94 The MAP-Elites algorithm
|
| 119 |
+
|
| 120 |
+
95 MAP-Elites (Mouret & Clune, 2015) is a simple yet state-of-the-art QD algorithm that has been
|
| 121 |
+
96 successfully applied to a wide range of challenging problems such as robot damage recovery (Cully
|
| 122 |
+
97 et al., 2015), molecular robotic control (Cazenille et al., 2019) and game design (Alvarez et al., 2019).
|
| 123 |
+
98 In MAP-Elites, the behavior descriptor space $\boldsymbol { B }$ is discretized into a grid of cells, also called niches,
|
| 124 |
+
99 with the aim of filling each cell with a high-performing solution. The algorithm starts with an empty
|
| 125 |
+
100 grid and an initial random set of $K$ solutions that are evaluated and added to the grid by following
|
| 126 |
+
101 simple insertion rules. If the cell corresponding to the behavior descriptors of a solution is empty, then
|
| 127 |
+
102 the solution is added to this cell. If there is already a solution in the cell, the new solution replaces it
|
| 128 |
+
103 only if it has greater fitness. At each iteration, $P$ existing solutions are sampled uniformly from the
|
| 129 |
+
104 grid and randomly mutated to create $P$ new solutions. These new solutions are then evaluated and
|
| 130 |
+
105 added to the grid following the same insertion rules. This cycle is repeated until convergence or for a
|
| 131 |
+
106 given budget of iterations.
|
| 132 |
+
107 Though MAP-Elites is a compelling and efficient method, it suffers from a low sample efficiency
|
| 133 |
+
108 as it relies on random mutations. Recently, Colas et al. (2020) tackled this problem by updating
|
| 134 |
+
109 the solutions through an Evolution Strategy known as the Cross-Entropy method. Notably, they
|
| 135 |
+
110 showed that MAP-Elites could be scaled with their method to address complex MUJOCO control
|
| 136 |
+
111 environments at the cost of very large computational resources. In this study, we propose to harness
|
| 137 |
+
112 policy gradients (QPG and DPG) to build a more sample-efficient MAP-Elites approach.
|
| 138 |
+
|
| 139 |
+
# 113 3 Key Principle: Diversity Policy Gradient
|
| 140 |
+
|
| 141 |
+
114 Let us assume that we have a MAP-Elites grid containing $K$ solutions $( \theta _ { 1 } , \ldots , \theta _ { K } )$ . To increase
|
| 142 |
+
115 diversity in the grid using the DPG, we need to update one sampled solution $\theta$ from the grid using
|
| 143 |
+
116 gradient ascent. To do so, we aim to compute the gradient of the population diversity w.r.t. $\theta$ , where
|
| 144 |
+
117 diversity is defined in Equation (1). As the $K$ solutions are independent, order does not matter and
|
| 145 |
+
118 we can consider optimizing arbitrarily $\theta = \theta _ { 1 }$ . To compute the gradient of $d$ w.r.t. $\theta _ { 1 }$ , we need
|
| 146 |
+
119 to separate the terms that depend on $\theta _ { 1 }$ from the others. The terms that depend on $\theta _ { 1 }$ correspond
|
| 147 |
+
120 to the distance of $\theta _ { 1 }$ to its nearest neighbor, which we define as $\theta _ { 2 }$ , and to the distances of $\theta _ { 1 }$ to
|
| 148 |
+
121 122 $\begin{array} { r } { d ( \{ \theta _ { k } \} _ { k = 1 , \ldots , K } ) = \sum _ { j = 2 } ^ { J } | | \xi ( \theta _ { 1 } ) , \xi ( \theta _ { j } ) | | _ { \mathcal { B } } + M } \end{array}$ $\theta \mathrm { s }$ $\theta _ { 1 }$ can ar, where $\begin{array} { r } { M = \sum _ { i \notin \{ 1 , . . . , J \} } \underset { k \neq i } { \operatorname* { m i n } } | | \xi ( \theta _ { i } ) , \xi ( \theta _ { k } ) | | _ { B } . } \end{array}$ $J ^ { 1 }$ .
|
| 149 |
+
123 Only the first term of the sum depends on $\theta = \theta _ { 1 }$ . Furthermore, we observe that this term equals the
|
| 150 |
+
124 novelty of solution $\theta _ { 1 }$ w.r.t. the list $( \theta _ { j } ) _ { 2 \leq j \leq J }$ . Therefore, the gradient of diversity w.r.t. $\theta _ { 1 }$ is
|
| 151 |
+
125 $\nabla _ { \theta _ { 1 } } d \bigl ( \{ \theta _ { k } \} _ { k = 1 , \ldots , K } \bigr ) = \nabla _ { \theta _ { 1 } } n \bigl ( \theta _ { 1 } , \bigl ( \theta _ { j } \bigr ) _ { 2 \leq j \leq J } \bigr ) .$ . That is, we can increase the diversity of the population
|
| 152 |
+
126 by increasing the novelty of $\theta _ { 1 }$ w.r.t. the list $( \theta _ { j } ) _ { 2 \leq j \leq J } .$ . In practice, we replace this list by a list of
|
| 153 |
+
127 nearest neighbors of $\theta _ { 1 }$ , as this is easier to compute and the elements of $( \theta _ { j } ) _ { 2 \leq j \leq J }$ tend to be among
|
| 154 |
+
128 the nearest neighbors of $\theta _ { 1 }$ .
|
| 155 |
+
129 Under this form, the diversity gradient cannot benefit from the variance reduction methods in the RL
|
| 156 |
+
130 literature to efficiently compute policy gradients Sutton et al. (1999). To this end, we need to express
|
| 157 |
+
131 it as a gradient over the expectation of a sum of scalar quantities obtained by policy $\pi _ { \theta _ { 1 } }$ at each step
|
| 158 |
+
132 when interacting with the environment. Therefore, to build a DPG, we need information about the
|
| 159 |
+
133 novelty of a solution at the time step level. To do so, we introduce a novel space $\mathcal { D }$ , dubbed state
|
| 160 |
+
134 descriptor space and a state descriptor extraction function $\psi : { \mathcal { S } } { \mathcal { D } }$ . We assume $\mathcal { D }$ and $\boldsymbol { B }$ have the
|
| 161 |
+
135 same dimension. Similarly to the novelty of a solution, we now define the novelty of a state $s$ w.r.t. $J$
|
| 162 |
+
136 other states $\left( s _ { j } \right) _ { j = 1 , \ldots , J }$ as $n : S \times S ^ { J } \to \mathbb { R }$ such that $\begin{array} { r } { n ( s , ( s _ { j } ) _ { j = 1 , \dots , J } ) = \sum _ { j = 1 } ^ { \tilde { J } } | | \psi ( s ) , \psi ( s _ { j } ) | | _ { \mathcal { D } } } \end{array}$
|
| 163 |
+
137 where $| | . | | _ { \mathcal { D } }$ is a distance metric over $\mathcal { D }$ .
|
| 164 |
+
138 Now, we need to link novelty defined at the time step level to novelty defined at the solution level. We
|
| 165 |
+
139 define the novelty of a state w.r.t. a set of solutions. We say that a state is novel w.r.t. some solutions
|
| 166 |
+
140 if the state is novel w.r.t. to the states visited by these solutions. More formally:
|
| 167 |
+
|
| 168 |
+
$$
|
| 169 |
+
n ( s , ( \theta _ { j } ) _ { j = 1 , \dots , J } ) = \sum _ { j = 1 } ^ { J } \mathbb { E } _ { \pi _ { \theta _ { j } } } \sum _ { t } | | \psi ( s ) , \psi ( s _ { t } ) | | _ { \mathcal { D } } .
|
| 170 |
+
$$
|
| 171 |
+
|
| 172 |
+
141 While we adopt this definition in this paper, one might as well consider other definitions where, for
|
| 173 |
+
142 instance, a state is compared to states that have been visited at the same time step during another
|
| 174 |
+
143 episode. In this context, if the following relation is satisfied:
|
| 175 |
+
|
| 176 |
+
$$
|
| 177 |
+
\mathbb { E } _ { \pi _ { \theta _ { 1 } } } \sum _ { t } n ( s _ { t } , ( \theta _ { j } ) _ { 2 \leq j \leq J } ) = n ( \theta _ { 1 } , ( \theta _ { j } ) _ { 2 \leq j \leq J } ) ,
|
| 178 |
+
$$
|
| 179 |
+
|
| 180 |
+
144 then we can compute the DPG of $d$ w.r.t. $\theta _ { 1 }$ as
|
| 181 |
+
|
| 182 |
+
$$
|
| 183 |
+
\nabla _ { \theta _ { 1 } } ^ { D P G } = \nabla _ { \theta _ { 1 } } \mathbb { E } _ { \pi _ { \theta _ { 1 } } } \sum _ { t } n ( s _ { t } , ( \theta _ { j } ) _ { 2 \leq j \leq J } ) .
|
| 184 |
+
$$
|
| 185 |
+
|
| 186 |
+
145 146 This expression corresponds to the classical policy gradient setting whecorresponding reward signal, here dubbed diversity reward, is computed as $r _ { t } ^ { D } = n ( s _ { t } , ( \theta _ { j } ) _ { \ 2 \leq j \leq J } )$ $\gamma = 1$ .
|
| 187 |
+
147 148 Therefore, this gradient can be comment reward by the diversity reward $r _ { t } ^ { D }$ d using any PG estimation technique replacing the environ-.
|
| 188 |
+
149 Equation (3) enforces a relation between $\boldsymbol { B }$ and $\mathcal { D }$ and between extraction functions $\psi$ and $\xi$ . In
|
| 189 |
+
150 practice, it may be hard to define the behavior descriptor and state descriptor of a solution that satisfy
|
| 190 |
+
151 this relation while being meaningful to the problem at hand and tractable. But a strict equality is not
|
| 191 |
+
152 necessary. It suffices that an increase on the left-hand side implies an increase on the right-hand side
|
| 192 |
+
153 so that we can still update $\theta _ { 1 }$ using (4). Furthermore, when this is not the case, the diversity gradient
|
| 193 |
+
154 update might not result in an increase of diversity in the behavior descriptor space, but in that case the
|
| 194 |
+
155 MAP-Elites insertion rule will remove the corresponding solution. We show in Section 6 that we can
|
| 195 |
+
156 define descriptors that do not satisfy the above relation all the time, but still give satisfactory results.
|
| 196 |
+
|
| 197 |
+
A distinguishing feature of our approach is that we combine diversity seeking at the level of trajectories using behavior descriptors and diversity seeking in the state space using state descriptors. The former is used by MAP-Elites to select solutions from the grid and contributes structural bias towards diversity, whereas the latter is used during policy gradient steps in the RL part, see Figure 2b. We organize the literature review below according to this split between two types of diversity seeking mechanisms.
|
| 198 |
+
|
| 199 |
+
# QD search in the solution space
|
| 200 |
+
|
| 201 |
+
164 Simultaneously maximizing diversity and performance is the central goal of QD methods (Pugh
|
| 202 |
+
165 et al., 2016; Cully & Demiris, 2017). Among the various possible combinations offered by the
|
| 203 |
+
166 QD framework, Novelty Search with Local Competition (NSLC) (Lehman & Stanley, 2011b) and
|
| 204 |
+
167 MAP-Elites (Mouret & Clune, 2015) are the two most popular algorithms. NSLC builds on the Novelty
|
| 205 |
+
168 Search (NS) algorithm (Lehman & Stanley, 2011a) and maintains an unstructured archive of solutions
|
| 206 |
+
169 selected for their local performance while MAP-Elites uniformly samples individuals from a structured
|
| 207 |
+
170 grid that discretizes the BD space. Not clear in its current form. I suggest: "QD-PG uses the standard
|
| 208 |
+
171 grid of MAP-Elites. However, we also show in Appendix F that QD-PG can be used with alternative
|
| 209 |
+
172 archive structures.
|
| 210 |
+
173 With the objective of improving their data-efficiency, QD-ES algorithms that combine QD and ESs,
|
| 211 |
+
174 such as NSR-ES and NSRA-ES, have been applied to challenging continuous control environments in
|
| 212 |
+
175 Conti et al. (2018). But, as outlined in Colas et al. (2020), they suffer from poor sample efficiency
|
| 213 |
+
176 and the diversity and environment reward functions could be mixed in a more efficient way. In that
|
| 214 |
+
177 respect, the most closely related work w.r.t. ours is ME-ES (Colas et al., 2020). The ME-ES algorithm
|
| 215 |
+
178 also optimizes quality and diversity using MAP-Elites and two ES populations. Using these methods
|
| 216 |
+
179 was shown to be critically more efficient than population-based GA algorithms (Salimans et al., 2017),
|
| 217 |
+
180 but our results show that they are still less sample efficient than off-policy deep RL methods, as they
|
| 218 |
+
181 do not leverage the analytical computation of the policy gradient at the time step level. To the best
|
| 219 |
+
182 of our knowledge, no QD or ES algorithm use an explicit critic for both performance and diversity,
|
| 220 |
+
183 resulting in even higher data-efficiency.
|
| 221 |
+
|
| 222 |
+
# QD search in the state or action spaces
|
| 223 |
+
|
| 224 |
+
185 Seeking for diversity in the space of states or actions is generally framed into the RL framework. This
|
| 225 |
+
186 is the case of algorithms maintaining a population of RL agents for exploration without an explicit
|
| 226 |
+
187 diversity criterion (Jaderberg et al., 2017) or algorithms explicitly looking for diversity but in the
|
| 227 |
+
188 action space rather than in the state space like ARAC (Doan et al., 2019), P3S-TD3 (Jung et al., 2020)
|
| 228 |
+
189 and DvD (Parker-Holder et al., 2020).
|
| 229 |
+
190 An exception is Stanton & Clune (2016) who define a notion of intra-life novelty that is similar to
|
| 230 |
+
191 our state novelty defined in Section 3. However, their novelty relies on skills rather than states. Our
|
| 231 |
+
192 work is also related to algorithms using RL mechanisms to search for diversity only (Eysenbach et al.,
|
| 232 |
+
193 2018; Pong et al., 2019; Lee et al., 2019; Islam et al., 2019). These methods have proven useful in
|
| 233 |
+
194 sparse reward situations, but they are inherently limited when the reward signal can orient exploration,
|
| 234 |
+
195 as they ignore it. Other works sequentially combine diversity seeking and RL. The GEP-PG algorithm
|
| 235 |
+
196 Colas et al. (2018) combines a diversity seeking component, namely Goal Exploration Processes
|
| 236 |
+
197 (Forestier et al., 2017) and the DDPG deep RL algorithm (Lillicrap et al., 2015). This sequential
|
| 237 |
+
198 combination of exploration-then-exploitation is also present in GO-EXPLORE (Ecoffet et al., 2019).
|
| 238 |
+
199 Again, this approach is limited when the reward signal can help driving the exploration process to
|
| 239 |
+
200 efficient solutions. These sequential approaches first look for diversity in the behavior descriptor
|
| 240 |
+
201 space, then optimize performance in the state action space, whereas we do so simultaneously in the
|
| 241 |
+
202 behavior descriptor space and in the state space.
|
| 242 |
+
|
| 243 |
+
To the best of our knowledge, QD-PG is the first algorithm optimizing both diversity and performance in the solution and in the state space, using a sample-efficient policy gradient computation method for the latter.
|
| 244 |
+
|
| 245 |
+
# 5 Methods
|
| 246 |
+
|
| 247 |
+
07 Our full algorithm is called QD-PG, its pseudo code is given in Appendix A and its architecture is
|
| 248 |
+
08 depicted in Figure 2. QD-PG is an iterative algorithm based on MAP-Elites that replaces random
|
| 249 |
+
209 mutations with policy gradient updates. As we consider a continuous action space and want to
|
| 250 |
+
210 improve sample efficiency by using an off-policy policy gradient method, we rely on the Twin
|
| 251 |
+
211 Delayed Deterministic Policy Gradient (TD3) algorithm (Fujimoto et al., 2018). See Appendix B for
|
| 252 |
+
212 a detailed description of TD3.
|
| 253 |
+
|
| 254 |
+

|
| 255 |
+
Figure 2: (a): The RL part of QD-PG operates at the time step level while the QD part operates at the controller level, considering the MDP as a black box. (b) One QD-PG iteration consists of three phases: 1) A new population of solutions is sampled from the MAP-Elites grid. 2) These solutions are updated by an off-policy RL agent: half of the solutions are optimized for quality and the other half for diversity. The RL agent leverages one shared critic for each objective. 3) The newly obtained solutions are evaluated in the environment. Transitions are stored in a replay buffer while the updated solutions, their final scores and behavior descriptors are stored in the MAP-Elites grid.
|
| 256 |
+
|
| 257 |
+
QD-PG maintains three permanent structures. In the QD part, a MAP-Elites grid stores the most novel and performing solutions. In the RL part, a replay buffer contains all transitions collected when evaluating solutions and an archive A stores all state descriptors obtained so far. QD-PG starts with an initial population of random solutions, evaluates them and inserts them into the MAP-Elites grid. At each iteration, solutions are sampled from the grid, copied, and updated. The updated solutions are then evaluated through one rollout in the environment and inserted into the grid according to insertion rules. Transitions collected during evaluation are stored in the replay buffer, and state descriptors are stored in the archive A. Note that these state descriptors are first filtered to avoid insertion in the archive of multiple state descriptors that are too close to each other.
|
| 258 |
+
|
| 259 |
+
During the update step, half the population is updated with QPG ascent and the other half with DPG ascent. The choice of whether an agent is updated for quality or diversity is random, meaning that it can be updated for quality and later for diversity if selected again. To justify this design, we show in Section 6 that updating consecutively for quality and diversity outperforms updating based on joint criteria. Both gradients are computed from batches of transitions sampled from the replay buffer. The QPG is computed as usual from rewards whereas for DPG, we get fresh novelty rewards as
|
| 260 |
+
|
| 261 |
+
$$
|
| 262 |
+
r _ { t } ^ { D } = \sum _ { j = 1 } ^ { J } | | \psi ( s _ { t } ) , \psi ( s _ { j } ) | | _ { \mathcal { D } } ,
|
| 263 |
+
$$
|
| 264 |
+
|
| 265 |
+
228 where $\left( s _ { j } \right) _ { j = 1 , \ldots , J }$ are the $J$ nearest neighbors of state $s _ { t }$ in the archive A. Diversity rewards
|
| 266 |
+
229 must be recomputed at each update because A changes during training. Following Equation (2),
|
| 267 |
+
230 diversity rewards should be computed as the sum of the distances between the descriptor of $s _ { t }$ and
|
| 268 |
+
231 the descriptors of all the states visited by a list of $J$ solutions. In practice, we consider the $J$ nearest
|
| 269 |
+
232 neighbors of $s _ { t }$ . This choice simplifies the algorithm and is faster and works well in practice.
|
| 270 |
+
233 TD3 relies on a parameterized critic to reduce the variance of its policy gradient estimate. In QD-PG,
|
| 271 |
+
234 we maintain two parameterized critics $Q _ { w } ^ { D }$ and $Q _ { v } ^ { Q }$ , respectively dubbed diversity and quality critics,
|
| 272 |
+
235 every time a policy gradient is computed, QD-PG also updates the corresponding critic. In fact, as
|
| 273 |
+
236 in TD3, we use pairs of critics and target critics to fight the overestimation bias. We share the critic
|
| 274 |
+
237 parameters among the population as in Pourchot $\&$ Sigaud (2018). Reasons for doing so come from
|
| 275 |
+
238 the fact that diversity is not stationary, as it depends on the current population. If each agent had
|
| 276 |
+
239 its own diversity critic, since an agent may not be selected for a large number of generations before
|
| 277 |
+
240 being selected again, its critic would convey an outdated picture of the evolving diversity. We tried
|
| 278 |
+
241 this solution, and it failed. A side benefit of critic sharing is that both critics become accurate faster as
|
| 279 |
+
242 they combine experience from all agents. Additional details on QD-PG implementation are available
|
| 280 |
+
243 in Appendix C.
|
| 281 |
+
|
| 282 |
+
# 244 6 Experiments
|
| 283 |
+
|
| 284 |
+
In this section, we intend to answer the following matters: 1. Can QD-PG produce collections of diverse and high-performing neural policies and what are the advantages to do so? 2. Is QD-PG more sample efficient than its QD competitors? 3. To what extent are the considered benchmarks difficult for classical policy gradients methods? 4. What is the usefulness of the different components of QD-PG?
|
| 285 |
+
|
| 286 |
+
# Environments
|
| 287 |
+
|
| 288 |
+
We asses QD-PG capabilities in continuous control environments that exhibit high dimensional observation and action spaces as well as strong exploration difficulties. Two types of reward signals, dubbed sparse and deceptive, are known to be particularly difficult for classical RL methods. These rewards appear in many applications such as robotics or combinatorial optimization. Sparse rewards are obtained if a given condition is specified, leading to a majority of null rewards and to credit assignment difficulties. Deceptive rewards are dense signals, i.e., they are non-zero at each time step but can mislead the search process to some local optimum. In such problems, a good approach to the exploration-exploitation trade-off is essential. The agent should learn when to ignore the reward signal and explore to avoid local minima and when to follow it to increase its return. Deceptive environments constitute a natural choice to highlight QD efficiency to balance exploration and exploitation. In this study, we consider three OpenAI Gym environments based on the MUJOCO physics engine that all exhibit strong deceptive rewards (illustrated in Appendix 5). Such environments have been widely used in previous works (Parker-Holder et al., 2020; Colas et al., 2020; Frans et al., 2018; Shi et al., 2020) for their deceptive nature, a characteristic that is absent of more widespread continuous control environments like HALFCHEETAH-V2, HOPPER-V2 or still ANT-V2.
|
| 289 |
+
|
| 290 |
+
In the POINT-MAZE environment, an agent represented as a green sphere must find the exit of the maze depicted in Figure 4a, represented as a red sphere. An observation contains the agent position at time $t$ , and an action corresponds to position increments along the $x$ and $y$ axes. The reward is expressed as the negative Euclidean distance between the center of gravity of the agent and the exit center. The trajectory length cannot exceed 200 steps.
|
| 291 |
+
|
| 292 |
+
The ANT-MAZE environment is modified from OpenAI Gym ANT-V2 (Brockman et al., 2016) and also used in (Colas et al., 2020; Frans et al., 2018). In ANT-MAZE, a four-legged ant has to reach a goal zone located in the lower right part of the maze (colored in green in Figure 4b). Its initial position is sampled in a small circle located in the maze’s extreme bottom left. As in POINT-MAZE, the reward is expressed as the negative Euclidean distance between the ant and the center of the goal zone. Maze walls are organized so that following the gradient of the reward function drives the ant into a dead-end. In ANT-MAZE, the final performance is defined as the maximum reward received during an episode. The environment is considered solved when an agent obtains a score superior to $- 1 0$ , corresponding to reaching the goal zone. An episode consists of 3000 time steps, this horizon is three times larger than in usual MUJOCO environments, making this environment particularly challenging for RL based methods (Vemula et al., 2019).
|
| 293 |
+
|
| 294 |
+
Finally, the ANT-TRAP environment also derives from ANT-V2 and is inspired from (Colas et al., 2020; Parker-Holder et al., 2020). In ANT-TRAP, the four-legged ant initially appears in front of a trap and must bypass it to run as fast as possible in the forward direction (see Figure 4c), as in ANT-V2, the reward is computed as the ant velocity on the x-axis. The trap consists of three walls forming a dead-end directly in front of the ant, leading to a strong deceptive reward. In this environment, the trajectory length cannot exceed 1000 steps. As opposed to POINT-MAZE and ANT-MAZE, where the objective is to reach the exit area, there is no unique way to solve ANT-TRAP and we expect a QD algorithm to generate various effective solutions as depicted in Figure 1.
|
| 295 |
+
|
| 296 |
+
QD-PG is compared to three types of methods. First, to answer question 2, we compare QD-PG to a family of QD baselines, namely ME-ES, NSR-ES, and NSRA-ES (Colas et al., 2020). Appendix E.1 recaps the properties of all these methods. Second, to answer question 3, we compare QD-PG to a family of policy gradient baselines. Soft Actor Critic (SAC) (Haarnoja et al., 2018) and the Twin Delayed Deep Deterministic policy gradient (TD3) (Fujimoto et al., 2018) are continuous control algorithms achieving state-of-the-art results on MUJOCO benchmarks. Random Network Distillation (RND) (Burda et al., 2018) is a curiosity-driven RL agent (Schulman et al., 2017) which was shown to perform well in hard exploration settings. CEM-RL (Pourchot & Sigaud, 2018) mixes Cross-Entropy Methods (CEM) and RL to evolve a population of agents to maximize quality and obtains stateof-the-art results MUJOCO benchmarks. Finally, to answer question 4, we propose to investigate the following matters: Can we replace alternating quality and diversity updates by a single update that optimizes for the sum of both criteria? Are quality gradients updates alone enough to fill the MAP-Elites grid? Are diversity gradients updates alone enough to do so? Consequently, we consider the following ablations of QD-PG: QD-PG SUM computes a gradient to optimize the sum of the quality and diversity rewards, D-PG applies only diversity gradients to the solutions, and Q-PG applies only quality gradients, but both D-PG and Q-PG still use QD selection (see Appendix E.1).
|
| 297 |
+
|
| 298 |
+
We compare QD-PG to its ablations and RL competitors in all environments and show results in Table 1a. Detailed results including graphic charts and coverage maps are given in Appendix E and more details about the evaluation procedure are given in Appendix E.1.
|
| 299 |
+
|
| 300 |
+
# 7 Results
|
| 301 |
+
|
| 302 |
+
# 1. Can QD-PG produce collections of neural policies and what are the advantages to do so?
|
| 303 |
+
|
| 304 |
+
312 Table 1a presents QD-PG performances. In all environments, our algorithm manages to find working
|
| 305 |
+
313 solutions that avoid local minima and reach the overall objective. In addition to its exploration
|
| 306 |
+
314 capabilities, QD-PG generates collections of high performing solutions in a single run. During the
|
| 307 |
+
315 ANT-TRAP experiment, the final collection of solutions returned by QD-PG contained, among others,
|
| 308 |
+
316 5 solutions that were within a $10 \%$ performance margin from the best one. As illustrated in Figure 1,
|
| 309 |
+
317 these agents typically differ in their gaits and preferred trajectories to circumvent the trap.
|
| 310 |
+
|
| 311 |
+
Generating a collection of diverse solutions comes with the benefit of having a repertoire of diverse solutions that can be used as alternatives when the MDP changes (Cully et al., 2015). We show that QD-PG is more robust than conventional policy gradient methods by changing the reward signal of the ANT-MAZE environment. We replace the original goal in the bottom right part of the maze (see Figure 3) with a new randomly located goal in the maze. Instead of running QD-PG to optimize for this new objective, we run a Bayesian optimization process to quickly find a good solution among the ones already stored in the grid. With a budget of only 20 solutions to be tested during the Bayesian optimization process, we are able to quickly recover a good solution for the new objective. We repeat this experiment 100 times, each time with a different random goal, and obtain an average performance of $- 1 0$ with a standard deviation of 9. In other words, 20 interaction episodes (corresponding to 60.000 time steps) suffice for the adaptation process to find a solution that performs well for the new objective without the need to re-train agents. More detailed results can be found in Appendix E.3. 2
|
| 312 |
+
|
| 313 |
+

|
| 314 |
+
Figure 3: QD-PG produces a collection of diverse solutions. In ANT-MAZE, even after setting new randomly located goals, the MAP-Elites grid still contains solutions that are suited for the new objectives.
|
| 315 |
+
|
| 316 |
+
# 2. Is it more sample efficient than its QD competitors?
|
| 317 |
+
|
| 318 |
+
Table 1b compares QD-PG to Deep Neuroevolution algorithms with a diversity seeking component in terms of sample efficiency. QD-PG runs on 10 CPU cores for 2 days while its competitors used 1000 CPU cores for the same duration. Nonetheless, QD-PG matches the asymptotic performance of ME-ES using two orders of magnitude fewer samples, explaining the lower resource requirements.
|
| 319 |
+
|
| 320 |
+
Table 1: Results for all environments. Final Perf. is the minimum distance to the goal in ANT-MAZE and the episode return in POINT-MAZE and ANT-TRAP. The Ratio to ours column compares the sample efficiency of a method to QD-PG.
|
| 321 |
+
|
| 322 |
+
(a) Comparison to ablations and PG baselines.
|
| 323 |
+
|
| 324 |
+
<table><tr><td></td><td colspan="3">Final Perf.(± std)</td></tr><tr><td>Algorithm</td><td>POINT-MAZE</td><td>ANT-MAZE</td><td>ANT-TRAP</td></tr><tr><td>QD-PG</td><td>-24(±0)</td><td>-7(±7)</td><td>1541(±86)</td></tr><tr><td>QD-PG SUM</td><td>-25(±1)</td><td>-5(±3)</td><td>1018(±6)</td></tr><tr><td>D-PG</td><td>-37(±3)</td><td>-2(±0)</td><td>1016(±8)</td></tr><tr><td>Q-PG</td><td>-128(±0)</td><td>-26(±0)</td><td>1175(±79)</td></tr><tr><td>CEM-RL</td><td>-312(±1)</td><td>-26(±0)</td><td>934(±22)</td></tr><tr><td>SAC</td><td>-127(±1)</td><td>-59(±1)</td><td>1049(±21)</td></tr><tr><td>TD3</td><td>-130(±2)</td><td>-26(±0)</td><td>1131(±7)</td></tr><tr><td>RND</td><td>-35(±10)</td><td>-27(±1)</td><td>978(±61)</td></tr></table>
|
| 325 |
+
|
| 326 |
+
(b) Comparison to evolutionary competitors.
|
| 327 |
+
|
| 328 |
+
<table><tr><td></td><td colspan="3">ANT-MAZE</td></tr><tr><td>Algorithm</td><td>Final Perf.</td><td>Steps to goal</td><td>Ratio to ours</td></tr><tr><td>QD-PG</td><td>-7(±7)</td><td>1.15e8</td><td>1</td></tr><tr><td>CEM-RL</td><td>-26(±0)</td><td>8</td><td>8</td></tr><tr><td>ME-ES</td><td>-5(±1)</td><td>2.4e10</td><td>209</td></tr><tr><td>NSR-ES</td><td>-26(±0)</td><td>8</td><td>8</td></tr><tr><td>NSRA-ES</td><td>-2(±1)</td><td>2.1e10</td><td>182</td></tr></table>
|
| 329 |
+
|
| 330 |
+
342 We see three reasons for the improved sample efficiency of QD-PG: 1) QD-PG leverages a replay
|
| 331 |
+
343 buffer and can re-use each sample several times. 2) QD-PG leverages novelty at the state level and
|
| 332 |
+
344 can exploit all collected transitions to maximize quality and diversity. For instance, in ANT-MAZE,
|
| 333 |
+
345 a trajectory brings 3000 samples to QD-PG while standard QD methods would consider it a unique
|
| 334 |
+
346 sample. 3) PG exploits the analytical gradient between the neural network weights and the resulting
|
| 335 |
+
347 policy action distribution and estimates only the impact of the distribution on the return. By contrast,
|
| 336 |
+
348 standard QD methods directly estimate the impact on the return of randomly modifying the weights.
|
| 337 |
+
|
| 338 |
+
# 3. To what extent the considered benchmarks are difficult for policy gradients methods?
|
| 339 |
+
|
| 340 |
+
Table 1a compares QD-PG to state-of-the-art policy gradient algorithms and validates that classical policy gradient methods fail to find optimal solutions in deceptive environments. TD3 quickly converges to local minima of performance resulting from being attracted in dead-ends by the deceptive gradients. While we may expect SAC to better explore due to entropy regularization, it also converges to that same local minima in ANT-TRAP and POINT-MAZE. Besides, despite its exploration mechanism based on CEM, CEM-RL also quickly converges to local optima in all benchmarks, confirming the need for a dedicated diversity seeking component. RND, which adds an exploration bonus used as an intrinsic reward (see Appendix G for more details), also demonstrates performances inferior to QD-PG in all environments but manages to solve POINT-MAZE. In ANT-MAZE and ANT-TRAP, as shown in Appendix G.2, RND extensively explores the BD space but fails to obtain high returns.
|
| 341 |
+
|
| 342 |
+
# 4. What is the usefulness of the different components of QD-PG ?
|
| 343 |
+
|
| 344 |
+
The ablation study in Table 1a shows that when maximising quality only, Q-PG fails due to the deceptive nature of the reward and when maximizing diversity only, D-PG sufficiently explores to solve the problem in both POINT-MAZE and ANT-MAZE but requires more steps and finds lowerperforming solutions. When optimizing simultaneously for quality and diversity, QD-PG SUM fails to learn in ANT-TRAP and manages to solve the task in ANT-MAZE but requires more samples than QD-PG. We hypothesize that quality and diversity rewards may give rise to conflicting gradients. For instance, at the beginning of training in ANT-TRAP, the quality reward drives the ant forward whereas the diversity reward drives it back to escape the trap and explore the environment. Therefore, both rewards cancel each other, preventing any learning. This study validates the usefulness of QD-PG components: 1) optimizing for diversity is required to overcome the deceptive nature of the reward; 2) adding quality optimization provides better asymptotic performance; 3) it is better to disentangle quality and diversity updates.
|
| 345 |
+
|
| 346 |
+
# 8 Conclusion
|
| 347 |
+
|
| 348 |
+
This paper is the first to introduce a diversity gradient to explore diversity both at the state and skill levels. Based on this component we proposed a novel algorithm, QD-PG, inspired from the Quality-Diversity literature, that produces collections of diverse and high-performing neural policies in a sample-efficient manner. We showed experimentally that QD-PG generates several solutions that achieve high returns in challenging exploration problems. Finally, we demonstrated that in a few interactions with the environment, QD-PG finds alternative solutions that still obtain good performance when the MDP changes.
|
| 349 |
+
|
| 350 |
+
# References
|
| 351 |
+
|
| 352 |
+
382 Alvarez, A., Dahlskog, S., Font, J., and Togelius, J. Empowering quality diversity in dungeon design with interactive constrained map-elites. In 2019 IEEE Conference on Games (CoG), pp. 1–8. IEEE, 2019.
|
| 353 |
+
385 Brockman, G., Cheung, V., Pettersson, L., Schneider, J., Schulman, J., Tang, J., and Zaremba, W. Openai gym. arXiv preprint arXiv:1606.01540, 2016.
|
| 354 |
+
87 Burda, Y., Edwards, H., Storkey, A., and Klimov, O. Exploration by random network distillation. arXiv preprint arXiv:1810.12894, 2018.
|
| 355 |
+
389 Cazenille, L., Bredeche, N., and Aubert-Kato, N. Exploring self-assembling behaviors in a swarm of bio-micro-robots using surrogate-assisted map-elites. arXiv preprint arXiv:1910.00230, 2019. Colas, C., Sigaud, O., and Oudeyer, P.-Y. GEP-PG: Decoupling exploration and exploitation in deep reinforcement learning algorithms. arXiv preprint arXiv:1802.05054, 2018. Colas, C., Madhavan, V., Huizinga, J., and Clune, J. Scaling map-elites to deep neuroevolution. In Proceedings of the 2020 Genetic and Evolutionary Computation Conference, pp. 67–75, 2020. Conti, E., Madhavan, V., Such, F. P., Lehman, J., Stanley, K., and Clune, J. Improving exploration in evolution strategies for deep reinforcement learning via a population of novelty-seeking agents. In Advances in neural information processing systems, pp. 5027–5038, 2018. Cully, A. and Demiris, Y. Quality and diversity optimization: A unifying modular framework. IEEE Transactions on Evolutionary Computation, 22(2):245–259, 2017.
|
| 356 |
+
00 Cully, A., Clune, J., Tarapore, D., and Mouret, J.-B. Robots that can adapt like animals. Nature, 521 (7553):503–507, 2015. Doan, T., Mazoure, B., Durand, A., Pineau, J., and Hjelm, R. D. Attraction-repulsion actor-critic for continuous control reinforcement learning. arXiv preprint arXiv:1909.07543, 2019.
|
| 357 |
+
04 Doncieux, S., Laflaquière, A., and Coninx, A. Novelty search: a theoretical perspective. In Proceedings of the Genetic and Evolutionary Computation Conference, pp. 99–106, 2019.
|
| 358 |
+
06 Ecoffet, A., Huizinga, J., Lehman, J., Stanley, K. O., and Clune, J. Go-explore: a new approach for hard-exploration problems. arXiv preprint arXiv:1901.10995, 2019. Eysenbach, B., Gupta, A., Ibarz, J., and Levine, S. Diversity is all you need: Learning skills without a reward function. arXiv preprint arXiv:1802.06070, 2018.
|
| 359 |
+
10 Forestier, S., Mollard, Y., and Oudeyer, P.-Y. Intrinsically motivated goal exploration processes with automatic curriculum learning. arXiv preprint arXiv:1708.02190, 2017.
|
| 360 |
+
412 Frans, K., Ho, J., Chen, X., Abbeel, P., and Schulman, J. Meta learning shared hierarchies. Proc. of ICLR, 2018.
|
| 361 |
+
414 Fujimoto, S., Van Hoof, H., and Meger, D. Addressing function approximation error in actor-critic methods. arXiv preprint arXiv:1802.09477, 2018.
|
| 362 |
+
16 Haarnoja, T., Zhou, A., Hartikainen, K., Tucker, G., Ha, S., Tan, J., Kumar, V., Zhu, H., Gupta, A., Abbeel, P., et al. Soft actor-critic algorithms and applications. arXiv preprint arXiv:1812.05905, 2018.
|
| 363 |
+
419 Islam, R., Ahmed, Z., and Precup, D. Marginalized state distribution entropy regularization in policy optimization. arXiv preprint arXiv:1912.05128, 2019. Jaderberg, M., Dalibard, V., Osindero, S., Czarnecki, W. M., Donahue, J., Razavi, A., Vinyals, O., Green, T., Dunning, I., Simonyan, K., et al. Population-based training of neural networks. arXiv preprint arXiv:1711.09846, 2017.
|
| 364 |
+
424 Jung, W., Park, G., and Sung, Y. Population-guided parallel policy search for reinforcement learning. In International Conference on Learning Representations, 2020.
|
| 365 |
+
426 Khadka, S. and Tumer, K. Evolution-guided policy gradient in reinforcement learning. In Neural Information Processing Systems, 2018.
|
| 366 |
+
428 Khadka, S., Majumdar, S., Miret, S., Tumer, E., Nassar, T., Dwiel, Z., Liu, Y., and Tumer, K. Collaborative evolutionary reinforcement learning. arXiv preprint arXiv:1905.00976, 2019. Koos, S., Mouret, J.-B., and Doncieux, S. The transferability approach: Crossing the reality gap in evolutionary robotics. IEEE Transactions on Evolutionary Computation, 17(1):122–145, 2012. Lee, L., Eysenbach, B., Parisotto, E., Xing, E., Levine, S., and Salakhutdinov, R. Efficient exploration via state marginal matching. arXiv preprint arXiv:1906.05274, 2019.
|
| 367 |
+
434 Lehman, J. and Stanley, K. O. Abandoning objectives: Evolution through the search for novelty alone. Evolutionary computation, 19(2):189–223, 2011a. Lehman, J. and Stanley, K. O. Evolving a diversity of virtual creatures through novelty search and local competition. In Proceedings of the 13th annual conference on Genetic and evolutionary computation, pp. 211–218, 2011b.
|
| 368 |
+
439 Lillicrap, T. P., Hunt, J. J., Pritzel, A., Heess, N., Erez, T., Tassa, Y., Silver, D., and Wierstra, D. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015. Mouret, J.-B. and Clune, J. Illuminating search spaces by mapping elites. arXiv preprint arXiv:1504.04909, 2015. Nasiriany, S., Pong, V. H., Lin, S., and Levine, S. Planning with goal-conditioned policies. arXiv preprint arXiv:1911.08453, 2019. Parker-Holder, J., Pacchiano, A., Choromanski, K., and Roberts, S. Effective diversity in populationbased reinforcement learning. In Neural Information Processing Systems, 2020. Pong, V. H., Dalal, M., Lin, S., Nair, A., Bahl, S., and Levine, S. Skew-fit: State-covering selfsupervised reinforcement learning. arXiv preprint arXiv:1903.03698, 2019.
|
| 369 |
+
449 Pourchot, A. and Sigaud, O. Cem-rl: Combining evolutionary and gradient-based methods for policy search. arXiv preprint arXiv:1810.01222, 2018. Pugh, J. K., Soros, L. B., and Stanley, K. O. Quality diversity: A new frontier for evolutionary computation. Frontiers in Robotics and AI, 3:40, 2016. Salimans, T., Ho, J., Chen, X., Sidor, S., and Sutskever, I. Evolution strategies as a scalable alternative to reinforcement learning. arXiv preprint arXiv:1703.03864, 2017. Schulman, J., Moritz, P., Levine, S., Jordan, M., and Abbeel, P. High-dimensional continuous control using generalized advantage estimation. arXiv preprint arXiv:1506.02438, 2015. Schulman, J., Wolski, F., Dhariwal, P., Radford, A., and Klimov, O. Proximal policy optimization algorithms. arXiv preprint arXiv:1707.06347, 2017.
|
| 370 |
+
459 Shi, L., Li, S., Zheng, Q., Yao, M., and Pan, G. Efficient novelty search through deep reinforcement learning. IEEE Access, 8:128809–128818, 2020. Silver, D., Lever, G., Heess, N., Degris, T., Wierstra, D., and Riedmiller, M. Deterministic policy gradient algorithms. In Proceedings of the 30th International Conference in Machine Learning, 2014. Stanton, C. and Clune, J. Curiosity search: producing generalists by encouraging individuals to continually explore and acquire skills throughout their lifetime. PloS one, 11(9):e0162235, 2016. Sutton, R. S., McAllester, D. A., Singh, S. P., Mansour, Y., et al. Policy gradient methods for reinforcement learning with function approximation. In NIPs, volume 99, pp. 1057–1063. Citeseer, 1999.
|
| 371 |
+
469 Vemula, A., Sun, W., and Bagnell, J. Contrasting exploration in parameter and action space: A zerothorder optimization perspective. In The 22nd International Conference on Artificial Intelligence and Statistics, pp. 2926–2935. PMLR, 2019.
|
| 372 |
+
|
| 373 |
+
1. For all authors...
|
| 374 |
+
|
| 375 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 376 |
+
(b) Did you describe the limitations of your work? [Yes]
|
| 377 |
+
(c) Did you discuss any potential negative societal impacts of your work? [No] We believe that this work, in itself, is not prone to have any negative societal impact.
|
| 378 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 379 |
+
|
| 380 |
+
2. If you are including theoretical results...
|
| 381 |
+
|
| 382 |
+
(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]
|
| 383 |
+
|
| 384 |
+
3. If you ran experiments...
|
| 385 |
+
|
| 386 |
+
(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] The code and instructions to run it are available in the supplementary materials.
|
| 387 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] Implementation details, hardware details and hyperparameters are presented in Appendix C.
|
| 388 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] Yes, we report mean and variance for all experiments, both graphically and in result tables.
|
| 389 |
+
(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] Computational details are provided in Appedix C.
|
| 390 |
+
|
| 391 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 392 |
+
|
| 393 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] We use open sourced RL environments.
|
| 394 |
+
(b) Did you mention the license of the assets? [Yes] We cite the Mujoco physics engine, for which we have licenses.
|
| 395 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] We provide appendices, source code and a demonstration website.
|
| 396 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 397 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 398 |
+
|
| 399 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 400 |
+
|
| 401 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] We did not used crowdsourcing or conducted research with human subjects.
|
| 402 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] This work did not involve research with human subjects
|
| 403 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] This work did not involve research with human subjects
|
md/train/5FRJWsiLRmA/5FRJWsiLRmA.md
ADDED
|
@@ -0,0 +1,416 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# RESERVOIR TRANSFORMERS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We demonstrate that transformers obtain impressive performance even when some of the layers are randomly initialized and never updated. Inspired by old and wellestablished ideas in machine learning, we explore a variety of non-linear “reservoir” layers interspersed with regular transformer layers, and show improvements in wall-clock compute time until convergence, as well as overall performance, on various machine translation and (masked) language modelling tasks.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Transformers (Vaswani et al., 2017) have dominated natural language processing (NLP) in recent years, from large scale machine translation (Ott et al., 2018) to pre-trained (masked) language modeling (Devlin et al., 2018; Radford et al., 2018), and are becoming more popular in other fields as well, from reinforcement learning (Vinyals et al., 2019) to speech recognition (Baevski et al., 2019) and computer vision (Carion et al., 2020). Their success is enabled in part by ever increasing computational demands, which has naturally led to an increased interest in improving their efficiency. Scalability gains in transformers could facilitate bigger, deeper networks with longer contexts (Kitaev et al., 2020; Wang et al., 2020; Beltagy et al., 2020; Kaplan et al., 2020; Tay et al., 2020b). Conversely, improved efficiency could reduce environmental costs (Strubell et al., 2019) and hopefully help democratize the technology.
|
| 12 |
+
|
| 13 |
+
In this work, we explore a simple question: if some layers of the transformer are kept frozen—i.e., never updated after random initialization—can we match the performance of fully learned transformers, while being more efficient? Surprisingly, the answer is resoundingly yes; and what is more, we find that freezing layers may actually improve performance.
|
| 14 |
+
|
| 15 |
+
Beyond desirable efficiency gains, random layers are interesting for several additional reasons. Fixed randomly initialized networks (Gallicchio & Scardapane, 2020) converge to Gaussian processes in the limit of infinite width (Daniely et al., 2016), have intriguing interpretations in metric learning (Rosenfeld & Tsotsos, 2019; Giryes et al., 2016), and have been shown to provide excellent “priors” either for subsequent learning (Ulyanov et al., 2018) or pruning (Frankle & Carbin, 2018). Fixed layers allow for efficient low-cost hardware implementations (Schrauwen et al., 2007) and can be characterized using only a random number generator and its seed, which might have repercussions in distributed training and enables highly efficient deployment to edge devices. The strong performance of networks with fixed layers also sheds new light on the inner workings of BERT (Devlin et al., 2018), and layer-wise interpretations of such models (Rogers et al., 2020; Tenney et al., 2019). It appears that “not all layers are created equal” (Zhang et al., 2019) is true to such an extent that some layers can simply remain random and fixed.
|
| 16 |
+
|
| 17 |
+
These ideas have a long history in machine learning. By Cover’s theorem (Cover, 1965), any highdimensional non-linear transformation is more likely to be linearly separable than its lower-or-equaldimensional input space. By Johnson-Lindenstrauss (Johnson & Lindenstrauss, 1984), random projections distort Euclidean distances very little under mild assumptions, which is useful e.g. for dimensionality reduction and random indexing (Sahlgren, 2005). Fixed random layers in neural networks pre-date deep learning by far (Gamba et al., 1961; Baum, 1988). Indeed, random kernel methods have been an impactful idea in machine learning (Rahimi & Recht, 2008; 2009).
|
| 18 |
+
|
| 19 |
+
One way to think of such layers is as “reservoirs” (Lukosevi ˇ cius & Jaeger, 2009), where a highly ˇ non-linear high-dimensional black box representation is provided to a lightweight “readout” network, as in echo state networks (Jaeger, 2003) and liquid state machines (Maass et al., 2002). The benefit of such an approach is that the reservoir has fixed parameters and is computationally efficient, as it can be pre-computed and does not (necessarily) require backpropagation.
|
| 20 |
+
|
| 21 |
+
In NLP, Wieting & Kiela (2019) showed that random sentence encoders present a strong baseline for text classification, with subsequent work showing applications in a variety of NLP tasks (Enguehard et al., 2019; Garg et al., 2020; Pilault et al., 2020). To our knowledge, this work is the first to examine this phenomenon in transformers, and the first to recursively alternate reservoirs with subsequent transformer layers acting as readout functions. We introduce “reservoir transformers”, wherein fixed random reservoir layers are interspersed with regular updateable transformer layers. The goal of this work is not necessarily to set a new state of the art, but to put our understanding of transformer models on a more solid footing by providing empirical evidence of their capabilities even when some of their parameters are fixed. Our contributions are as follows:
|
| 22 |
+
|
| 23 |
+
• We introduce a new area under the convergence curve metric for measuring performanceefficiency trade-offs, and show that replacing regular transformer layers with reservoir layers leads to better results on that metric.
|
| 24 |
+
• We show that the addition of reservoir layers in fact leads to improved test set generalization on a variety of tasks in a variety of settings.
|
| 25 |
+
We show that pre-trained masked language modelling architectures like BERT and RoBERTa (Liu et al., 2019) can benefit from having some of their layers frozen, both during pre-training as well as when fine-tuning on downstream tasks.
|
| 26 |
+
• In addition, we experiment with different types of reservoir layers, including convolutional and recurrent neural network-based ones. We also show empirical evidence that the backward pass can be entirely skipped by approximating top-layer gradients using an approach we call backskipping, with a relatively small sacrifice in performance.
|
| 27 |
+
|
| 28 |
+
# 2 APPROACH
|
| 29 |
+
|
| 30 |
+
This paper is based on a very simple idea. Neural networks are trained via backpropagation, which involves consecutive steps of matrix addition and multiplication, i.e.,
|
| 31 |
+
|
| 32 |
+
$$
|
| 33 |
+
\theta _ { t + 1 } \theta _ { t } - \eta \frac { \partial J } { \partial \theta _ { t } } ; \frac { \partial J } { \partial \theta _ { t } } = \frac { \partial J } { \partial L _ { n } } \frac { \partial L _ { n } } { \partial L _ { n - 1 } } \cdot \cdot \cdot \frac { \partial L _ { 1 } } { \partial L _ { 0 } } \frac { \partial L _ { 0 } } { \partial x }
|
| 34 |
+
$$
|
| 35 |
+
|
| 36 |
+
for some objective $J$ , parameterization $\theta$ and learning rate $\eta$ , with the gradient computed via the chain rule, where $L _ { i }$ is the $i$ -th layer of the neural network and $x$ is the input. Let $L \ =$ Transformer $( X )$ be a single layer in a Transformer network (Vaswani et al., 2017), i.e.,
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
\begin{array} { r } { H = \mathbf { M } \mathbf { u } ] \mathrm { t i } \mathbf { H e a d } \mathbf { S e l f A t t n } ( \mathbf { L a y e r N o r m } ( X ) ) + X } \\ { L = \mathbf { F F N } ( \mathbf { L a y e r N o r m } ( H ) ) + H } \end{array}
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
Now, during every “backward pass”, we compute the Jacobian for parameters $\theta ^ { L }$ at layer $L$ , which are used to update the parameters of $L$ , $\theta _ { t } ^ { L }$ , as well as to compute the next layer’s Jacobian, thus back-propagating the gradients. In this work however, for some of the layers, we still backpropagate through them to compute gradients for earlier layers, but we never update their parameters. As a result, these layers stay fixed at their random initialization, saving computational resources.
|
| 43 |
+
|
| 44 |
+
# 2.1 BACKGROUND
|
| 45 |
+
|
| 46 |
+
Naturally, never updating some of the parameters is computationally more efficient, as some matrix addition operations can be skipped in the backward pass, but why is this not detrimental to the performance of the network?
|
| 47 |
+
|
| 48 |
+
In the early days of neural networks, the bottom layers were often kept fixed as “associators” (Block, 1962), or what Minsky & Papert (2017) called the Gamba perceptron (Gamba et al., 1961; Borsellino & Gamba, 1961). Fixed random networks (Baum, 1988; Schmidt et al., 1992; Pao et al., 1994) have been explored from many angles, including as “random kitchen sink” kernel machines (Rahimi & Recht, 2008; 2009), “extreme learning machines” (Huang et al., 2006) and reservoir computing (Jaeger, 2003; Maass et al., 2002; Lukosevi ˇ cius & Jaeger, 2009). In reservoir computing, in- ˇ put data are represented through fixed random high-dimensional non-linear representations, called “reservoirs”, which are followed by a regular (often but not necessarily linear) “readout” network to make the final classification decision.
|
| 49 |
+
|
| 50 |
+
The theoretical justification for these approaches lies in two well-known results in machine learning: Cover’s theorem (Cover, 1965) on the separability of patterns states that high-dimensional non-linear transformations are more likely to be linearly separable; and the Johnson-Lindenstrauss lemma (Johnson & Lindenstrauss, 1984) shows that random projections distort Euclidean distances very little under mild assumptions.
|
| 51 |
+
|
| 52 |
+
Practically, random layers can be seen as a cheap way to increase network depth. There are interesting advantages to this approach. Fixed layers are known to have particularly low-cost hardware requirements and can be easily implemented on high-bandwidth FPGAs with low power consumption (Hadaeghi et al., 2017; Tanaka et al., 2019), or on optical devices (Hicke et al., 2013). This might yield interesting possibilities for training in a distributed fashion across multiple devices, as well as for neurmorphic hardware (Neftci et al., 2017). This approach also facilitates lower-latency deployment of neural networks to edge devices, since weights can be shared simply by sending the seed number, assuming the random number generator is known on both ends.
|
| 53 |
+
|
| 54 |
+
# 2.2 RESERVOIR TRANSFORMERS
|
| 55 |
+
|
| 56 |
+
This work explores inserting random non-linear transformations, or what we call reservoir layers, into transformer networks. Specifically, we experiment with a variety of reservoir layers:
|
| 57 |
+
|
| 58 |
+
• Transformer Reservoir: The standard transformer layer as described above, but with all parameters fixed after initialization, including the self-attention module.
|
| 59 |
+
• FFN Reservoir: A transformer-style fixed feed-forward layer without any self-attention, i.e., FFN(LayerNorm(Previous layer)) $^ +$ Previous layer.
|
| 60 |
+
• BiGRU Reservoir: A fixed bidirectional Gated Recurrent Unit (Cho et al., 2014) layer, which is closer in spirit to previous work on reservoir computing, most of which builds on recurrent neural network architectures. CNN Reservoir: A fixed Convolutional Neural Network (LeCun et al., 1998) layer, specifically light dynamical convolution layers (Wu et al., 2019), which are known to be competitive with transformers in sequence-to-sequence tasks.
|
| 61 |
+
|
| 62 |
+
We find that all these approaches work well, to a certain extent. For clarity, we focus primarily on the first two reservoir layers, but include a broader comparison in Appendix A.
|
| 63 |
+
|
| 64 |
+
In each case, contrary to traditional reservoir computing, our reservoir layers are interspersed throughout a regular transformer network, or what we call a reservoir transformer. A good justification for this approach is that while random projections are not learned and might introduce noise, subsequent normal transformer “readout” layers might allow us to recover from any adverse effects of randomness. For example, previous work has shown that ResNets, with all of their parameters fixed except for the scale and shift parameters of batch normalization, can still achieve high performance, simply by scaling and shifting random features (Frankle et al., 2020). Adding noise to the parameters of neural networks is also known to help convergence and generalization (Jim et al., 1995; 1996; Gulcehre et al., 2016; Noh et al., 2017).
|
| 65 |
+
|
| 66 |
+
# 3 EVALUATION
|
| 67 |
+
|
| 68 |
+
We evaluate the proposed approach on a variety of well-known tasks in natural language processing, namely: machine translation, language modelling and masked language model pre-training.
|
| 69 |
+
|
| 70 |
+
In this work, we are not necessarily interested in obtaining the state of the art on any task or even in improving overall task performance via this method. The main objective is to examine efficiency, i.e. the relationship between compute time and task performance. This is closely related to efforts in Green AI, which are concerned with the trade-offs between compute, data, and performance (Schwartz et al., 2019). We propose a new metric for our purposes, the area under the convergence curve (AUCC): similarly to how the area under the receiver operating characteristic (Bradley, 1997, AUC-ROC) measures a classifier’s performance independent of the classification threshold, AUCC measures a model’s performance independent of the specific compute budget. Specifically, AUCC is computed as follows:
|
| 71 |
+
|
| 72 |
+

|
| 73 |
+
Figure 1: Validation BLEU AUCC and test BLEU for IWSLT (high is good). Comparison of regular transformer and reservoir transformer with FFN or Transformer reservoir layers added.
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\int _ { t = 0 } ^ { \hat { T } } \sum _ { x , y \in \mathcal { D } } g _ { t } ( f ( x ) , y )
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
where $f$ is the network and $g$ is the evaluation metric, measured until convergence time $\hat { T }$ , which is the maximum convergence time of all models included in the comparison. Note that time here is wall-clock time, not iterations. By convergence, we mean that validation performance has stopped improving, and hence the convergence curve whose area we measure plots the desired metric over time. Runs are averaged over multiple seeds and reported with standard deviation. We normalize raw AUCC scores by their maximum score to ensure a more easily interpretable $[ 0 - 1 ]$ range.
|
| 80 |
+
|
| 81 |
+
One potential downside of this approach is that the AUCC metric could lead to higher scores for a model that converges quickly but to ultimately worse performance, if measured in a small window. We account for this by making sure that $\hat { T }$ is set sufficiently high. We include the raw validation curves in the appendix and also report test set generalization in each experiment.
|
| 82 |
+
|
| 83 |
+
# 3.1 EXPERIMENTAL SETTINGS AND IMPLEMENTATION DETAILS
|
| 84 |
+
|
| 85 |
+
We evaluate on IWSLT de-en (Cettolo et al., 2015) and WMT en-de (Bojar et al., 2014) for machine translation; enwiki8 (LLC, 2009) for language modelling; and experiment with RoBERTa (Liu et al., 2019) in our pretraining experiments. For IWSLT, we follow the pre-processing steps in Edunov et al. (2018). The train/val/test split is $\_$ sentences. For WMT, we follow the pre-processing steps in Ott et al. (2018). The train/val/test split is $4 . 5 \mathrm { M } / 1 6 . 5 \mathrm { k } / 3 \mathrm { k }$ sentences. For enwiki8, we follow the pre-processing steps in Dai et al. (2019). The train/val/test split is 1M/54k/56k sentences. For RoBERTa pretraining, we follow the pre-processing steps in Liu et al. (2019).
|
| 86 |
+
|
| 87 |
+
We use 8 Volta V100 GPUs for WMT and enwik8, 32 V100 GPUs for RoBERTa and a single V100 for IWSLT. The hyperparameters for IWSLT14 and WMT16 were set to the best-performing values from Ott et al. (2018) and Kasai et al. (2020) respectively. The enwik8 experiment settings followed Bachlechner et al. (2020) and the RoBERTa experiments followed Liu et al. (2019). All experiments were conducted using fairseq (Ott et al., 2019). Our code and experimental settings will be made open source at [ANONYMIZED-GITHUB-URL].
|
| 88 |
+
|
| 89 |
+
Table 1: Wall-clock time (averaged over multiple runs) saved for IWSLT for different model types and encoder depths. Max BLEU is for validation. Number of layers is for encoder, decoder depth is kept fixed at 2. Ratio is computed compared to comparable number of layers in the normal case.
|
| 90 |
+
|
| 91 |
+
<table><tr><td>Model</td><td>#Layers</td><td>Frozen</td><td>Max BLEU</td><td>Train time until max (in hours)</td><td>Ratio</td><td># Params Trainable (Total)</td><td>Train Time each epoch (in seconds)</td></tr><tr><td rowspan="4">Transformer</td><td>6</td><td>0</td><td>34.52 ± 0.07</td><td>2.548 ± 0.06</td><td>1</td><td>26.8M</td><td>122.73 ± 1.16</td></tr><tr><td>8</td><td>0</td><td>34.59 ± 0.11</td><td>2.557 ± 0.05</td><td>1</td><td>31.1M</td><td>142.28 ± 1.87</td></tr><tr><td>10</td><td>0</td><td>34.56 ± 0.05</td><td>3.173 ± 0.04</td><td>1</td><td>35.3M</td><td>161.66 ± 1.54</td></tr><tr><td>12</td><td>0</td><td>34.29 ± 0.12</td><td>3.521 ± 0.09</td><td>1</td><td>39.5M</td><td>172.45 ± 1.98</td></tr><tr><td rowspan="4">TReservoir</td><td>6</td><td>2</td><td>34.37 ± 0.12</td><td>2.422 ± 0.03</td><td>0.95</td><td>22.6M (26.8M)</td><td>120.59 ± 1.32</td></tr><tr><td>8</td><td>2</td><td>34.80 ± 0.07</td><td>2.450 ± 0.06</td><td>0.96</td><td>26.8M (31.1M)</td><td>134.49 ± 1.76</td></tr><tr><td>10</td><td>2</td><td>34.70 ± 0.03</td><td>2.831 ± 0.05</td><td>0.89</td><td>31.1M (35.3M)</td><td>144.42 ± 1.98</td></tr><tr><td>12</td><td>2</td><td>34.78 ± 0.04</td><td>3.476 ± 0.04</td><td>0.98</td><td>35.3M (39.5M)</td><td>159.43 ± 1.67</td></tr><tr><td rowspan="4">FFN Reservoir</td><td>6</td><td>2</td><td>34.43 ± 0.15</td><td>2.120 ± 0.04</td><td>0.83</td><td>22.6M (25.8M)</td><td>107.71 ± 1.73</td></tr><tr><td>8</td><td>2</td><td>34.56 ± 0.16</td><td>2.203 ± 0.06</td><td>0.86</td><td>26.8M (29.1M)</td><td>120.07 ± 1.65</td></tr><tr><td>10</td><td>2</td><td>34.66 ± 0.02</td><td>2.493 ± 0.05</td><td>0.79</td><td>31.1M (33.3M)</td><td>130.11 ± 1.43</td></tr><tr><td>12</td><td>2</td><td>34.76 ± 0.03</td><td>3.241 ± 0.04</td><td>0.92</td><td>35.3M (37.5M)</td><td>156.32 ± 1.87</td></tr><tr><td rowspan="4">LayerDrop</td><td>6</td><td>2</td><td>34.59 ± 0.15</td><td>2.364 ± 0.08</td><td>0.92</td><td>22.6M (26.8M)</td><td>119.30 ± 1.36</td></tr><tr><td>8</td><td>2</td><td>34.58 ± 0.16</td><td>2.554 ± 0.05</td><td>0.99</td><td>26.8M (31.1M)</td><td>138.62 ± 1.44</td></tr><tr><td>10</td><td>2</td><td>34.57 ± 0.07</td><td>3.404 ± 0.06</td><td>1.07</td><td>31.1M (35.3M)</td><td>140.88 ± 1.62</td></tr><tr><td>12</td><td>2</td><td>33.65 ± 0.24</td><td>3.251 ± 0.04</td><td>0.92</td><td>35.3M (39.5M)</td><td>160.85 ± 1.49</td></tr></table>
|
| 92 |
+
|
| 93 |
+
All the experiments in this paper were run with 3 random seeds and the mean and standard deviation are reported. For the relatively small IWSLT, the $\hat { T }$ value in the AUCC metric was set to 4 hours. For WMT, which is larger, we set it to 20 hours. For enwiki8, it was 30 hours; and for the RoBERTa pre-training experiments, it was set to 60 hours.
|
| 94 |
+
|
| 95 |
+
The projection weights in random layers were initialized using orthogonal initialization (Saxe et al., 2013), which makes sense since random orthogonal projections should be most informationpreserving, and which was found to work well empirically for initializing fixed random representations in previous work (Wieting & Kiela, 2019). Biases and layer norm parameters were initialized using their respective PyTorch defaults (based on Xavier init; Glorot & Bengio, 2010).
|
| 96 |
+
|
| 97 |
+
We intersperse reservoir layers in alternating fashion starting from the middle. Specifically, we alternate one reservoir layer with one transformer layer, and place the alternating block in the middle. For example: a 7-layer encoder LLLLLLL in which we replace three layers with reservoirs becomes LRLRLRL, and with two becomes LLRLRLL. See Appendix C for a study comparing this strategy to alternative approaches (e.g., freezing in the bottom, middle or top).
|
| 98 |
+
|
| 99 |
+
# 4 EXPERIMENTS
|
| 100 |
+
|
| 101 |
+
In what follows, we first show our main result: reservoir transformers often have better AUCC metrics, less training time per epoch, less convergence time until the best validation performance is achieved, and even improved test set generalization metrics, on a variety of tasks. As a strong baseline method, we compare to LayerDrop (Fan et al., 2019). LayerDrop can also be seen as a method that dynamically bypasses parts of the computation during Transformer training in an attempt to improve efficiency, and is a suitable comparison to examine our methods.. We also examine whether we can minimize the expectation over the gradients of upper layers in the transformer network such that we do not have to pass the true gradients through the reservoir for further efficiency.
|
| 102 |
+
|
| 103 |
+
# 4.1 MACHINE TRANSLATION
|
| 104 |
+
|
| 105 |
+
Machine translation (MT) is one of the core tasks of NLP. We demonstrate on two well-known MT datasets, IWSLT’14 German-English and WMT’16 English-German, that reservoir transformers obtain a better AUCC. For the raw validation plots over time that were used to calculate the AUCC, please refer to Appendix F.
|
| 106 |
+
|
| 107 |
+
Following Kasai et al. (2020), the architecture of the network is an N-layer reservoir transformer encoder, followed by a regular shallow one- or two-layer decoder. This design choice has been shown to lead to very good speed and efficiency trade-offs, and serves as a good baseline for our experiments. Moreover, shallow decoders make it easier to decide where to place reservoir layers (in the encoder) and makes it more straightforward to identify where performance gains come from.
|
| 108 |
+
|
| 109 |
+

|
| 110 |
+
Figure 2: Validation BLEU AUCC and test BLEU for WMT (high is good). Comparison of regular transformer and reservoir transformer with FFN or Transformer reservoir layers added.
|
| 111 |
+
|
| 112 |
+

|
| 113 |
+
Figure 3: Validation BPC AUCC and test BPC on the enwik8 language modelling task (low is good). Comparison of regular and reservoir transformers for varying depths.
|
| 114 |
+
|
| 115 |
+
Figure 1 shows the results for IWSLT. On the y-axis we show validation AUCC for the BLEU metric; on the $\mathbf { X } ^ { } -$ -axis we show the number of updatable layers in the encoder. The performance of a regular transformer encoder with 6 layers and a reservoir transformer encoder with 6 layers plus N additional reservoir layers are plotted for the same $\mathbf { X }$ -axis value to show the total number of updated layers. Plots for the total number of layers (updatable plus not-updatable, so essentially shifted versions) are shown in Appendix E. Table 1 shows the time it took to achieve the maximum validation BLEU score and how that relates to the regular transformer, demonstrating that reservoir transformers consistently converge faster in terms of wall-clock time, up to $22 \%$ as much with the same number of updateable layers. We save as much as $27 \%$ time until convergence a 24 layer model on WMT, as shown in Table 3. One other noticeable point is that we can see that the T Reservoir achieves similar performance to LayerDrop on IWSLT and WMT in terms of wall-clock per epoch and wall-clock time to the best performance. However, on both tasks, FFN Reservoir performs much better than LayerDrop in terms of efficiency per epoch and achieves better/similar performance in less time in each case. As a point of reference, a half hour gain on IWSLT translates to a gain of several days in the training of bigger transformer models like GPT-3 (Brown et al., 2020).
|
| 116 |
+
|
| 117 |
+
We observe that reservoir transformers consistently perform better than, or are competitive to, regular transformers, both in terms of validation BLEU AUCC as well as test time BLEU, for all examined encoder depths.
|
| 118 |
+
|
| 119 |
+

|
| 120 |
+
Figure 4: Downstream RoBERTa performance on SST-2 (left) and MultiNLI-matched (right).
|
| 121 |
+
|
| 122 |
+
Figure 2 shows a similar trend for WMT. WMT is much larger and requires a much deeper encoder, as illustrated by the fact that a certain minimum depth is required for reservoir transformers to achieve a comparable validation AUCC. At test time, reservoir transformers outperform regular transformers for almost all encoder depths. The FFN reservoir transformer seems to work best in both cases, which is surprising because it does not have any self-attention component at all. This finding shows that self-attention, or the mechanism to summarize context information, should be learned if present. Once the context features have been gathered, a random projection via a fixed FFN module appears to be beneficial, at least for MT.
|
| 123 |
+
|
| 124 |
+
# 4.2 LANGUAGE MODELLING
|
| 125 |
+
|
| 126 |
+
To examine whether the same findings hold for other tasks, we evaluate on the enwiki8 (LLC, 2009) language modelling task. We examine the BPC (bits per character) rate for a variety of network depths (since the task is language modelling, these layers are in the decoder). The results show that we obtain consistently better BPC for lower depths, except for the 64-layer regular transformer, which appears to be particularly optimal for this task. We observe similar trends during test time.
|
| 127 |
+
|
| 128 |
+
# 4.3 MASKED LANGUAGE MODEL PRETRAINING
|
| 129 |
+
|
| 130 |
+
We train RoBERTa (Liu et al., 2019) models from scratch at a variety of depths, both in the normal and reservoir setting. We find that these networks show minor differences in their best perplexity and similar AUCC perplexity (see Appendix D). We then examine the performance of these models when fine-tuned on downstream tasks, specifically the well known SST-2 (Socher et al., 2013) and MultiNLI1 (Williams et al., 2017) tasks. When fine-tuning the reservoir models, we keep the reservoir layers fixed (including them in fine-tuning did not work very well, see Appendix D).
|
| 131 |
+
|
| 132 |
+
Figure 4 shows the results of fine-tuning. We observe that the reservoir transformer outperforms normal RoBERTa at all depths in both tasks. At lower depth, the improvements are substantial. As a sanity check, we also experiment with freezing some of the layers in normal RoBERTa during fine-tuning (Transformer frozen finetuned) and show that this helps a little but is still outperformed by the reservoir transformer.
|
| 133 |
+
|
| 134 |
+
These findings suggest that you can train a RoBERTa model without updating all of the layers, achieve similar perplexity at a similar computational cost, but with better downstream performance. The fact that some layers can be kept random and entirely fixed during training, without sacrificing any performance, raises intriguing questions for “BERTology” (Rogers et al., 2020) and for the study of what different layers in transformers learn.
|
| 135 |
+
|
| 136 |
+

|
| 137 |
+
Figure 5: IWSLT comparison of normal v frozen v backskipped
|
| 138 |
+
|
| 139 |
+
# 4.4 BACKSKIPPING
|
| 140 |
+
|
| 141 |
+
With the reservoir transformers as described above, we obtain better efficiency by skipping the “gradient application” matrix addition step in some of the layers (i.e., updating the weights). One step further would be to investigate skipping the entire backward pass for reservoirs altogether, which would save us from having to do the much more expensive matrix multiplication for these layers that is required for the propagation of gradients. We report on preliminary experiments where in the backward pass we replace the gradients for the layer $L _ { i }$ going into the reservoir $L _ { i + 1 }$ with a noisy estimate (Jaderberg et al., 2017; Czarnecki et al., 2017). Promisingly, Oktay et al. (2020) recently asked “why spend resources on exact gradients when we’re going to use stochastic optimization?” and show that you can do randomized auto-differentiation quite successfully.
|
| 142 |
+
|
| 143 |
+
Here, rather than minimizing the actual gradients $\frac { \partial L _ { i } } { \partial \theta ^ { L _ { i } } }$ , we minimize their expectation and train via continuous-action REINFORCE (Williams, 1992). That is, $L _ { i }$ becomes a policy $\pi _ { a }$ : $s \mu$ whei.e., $\textstyle { \frac { 1 } { n } } \sum _ { i = 0 } ^ { n } ( { \dot { R } } ^ { i } - V ^ { i } ( a ) ) ^ { 2 }$ $a \sim \mathcal { N } ( \mu , 1 )$ . We train to miniREINFORCE loss $\mathbb { E } _ { a } \left[ \log ( { \bar { a } } ) \left( R - { \bar { V } } ( a ) \right) \right]$ ion loss via MSE,, where the value network $V$ acts as the baseline. $R$ is defined as the mean of the gradients of the top layer $L _ { i + 2 }$ , with the sign flipped. Thus, simply put, we train to minimize the expectation of the true gradients at the layer directly following the reservoir. We employ an annealing scheme where we first train the value network and propagate the true gradients during warmup. Afterwards, we anneal the probability of backskipping rather than performing a true backward pass (multiplying the probability by 0.99 every iteration until we only backskip). We experimented with setting $R$ to the negation of the total loss as well but found the current reward to work better. We call this approach backskipping.
|
| 144 |
+
|
| 145 |
+
Figure 5 shows the results as validation BLEU over time. We observe that this approach helps especially during the earlier stages of training. Although it does not match the performance of the approach with true gradients quite yet, it actually performs competitively. Backskipping looks promising as an approach to further reduce computational costs, and would be even more efficient from a hardware perspective since the circuitry for such layers (which do not need to propagate gradients) can effectively be hardwired entirely.
|
| 146 |
+
|
| 147 |
+
# 5 RELATED WORK
|
| 148 |
+
|
| 149 |
+
Recent work has shown that modern NLP models are able to function with different numbers of layers for different examples (Elbayad et al., 2019; Fan et al., 2019); that different layers specialize for different purposes (Zhang et al., 2019); that layers can be compressed (Li et al., 2020); and, that layers can be reordered (Press et al., 2019). There is a growing body of work in efficient self-attention networks (Tay et al., 2020b), such as linear attention (Wang et al., 2020), on how to process long context information (Beltagy et al., 2020) and on approximations to make transformers more scalable (Kitaev et al., 2020; Katharopoulos et al., 2020). BigBIRD (Zaheer et al., 2020) provides random keys as additional inputs to its attention mechanism. Locality sensitive hashing (LSH) as employed e.g. in Reformer (Kitaev et al., 2020) utilizes a fixed random projection. Performer (Choromanski et al., 2020) computes the transformer’s multi-head attention weights as a fixed orthogonal random projection. Closely related to this work, Tay et al. (2020a) showed that randomized alignment matrices in their “Synthesizer” architecture are sufficient for many NLP tasks. While these works focus on random attention, we show that entire layers can be random and fixed. We also show that entire layers can be replaced by fixed random projections that do not have any attention whatsoever.
|
| 150 |
+
|
| 151 |
+
Beyond transformers, random features have been extensively explored. Examples of this include FreezeOut (Brock et al., 2017), deep reservoir computing networks (Scardapane & Wang, 2017; Gallicchio & Micheli, 2017), as well as applications in domains as varied as text classification (Conneau et al., 2017; Zhang & Bowman, 2018; Wieting & Kiela, 2019) or music classification (Pons & Serra, 2019). It is well known that randomly initialized networks can display impressive performance on their own (Ulyanov et al., 2018; Rosenfeld & Tsotsos, 2019; Ramanujan et al., 2020), which underlies, for example, the recently popularized lottery ticket hypothesis (Frankle & Carbin, 2018; Zhou et al., 2019). We know that learning deep overparameterized networks appears to help in general (Li & Liang, 2018; Du et al., 2019). Our method represents an easy and cheap way to add both depth and parameters to transformer networks.
|
| 152 |
+
|
| 153 |
+
# 6 CONCLUSION
|
| 154 |
+
|
| 155 |
+
This work demonstrated that state-of-the-art transformer architectures can be trained without updating all of the layers. This complements a long history in machine learning of harnessing the power of random features. In most cases, “reservoir transformers” achieve better performance-efficiency trade-offs as measured by our newly introduced AUCC metric, and better test set generalization, on a variety of tasks and in a variety of settings. Future work includes further investigating hybrid networks and backskipping architectures, as well as utilizing pruning strategies at inference time, in order to try to obtain even better performance/efficiency trade-offs.
|
| 156 |
+
|
| 157 |
+
# REFERENCES
|
| 158 |
+
|
| 159 |
+
Thomas Bachlechner, Bodhisattwa Prasad Majumder, Huanru Henry Mao, Garrison W Cottrell, and Julian McAuley. Rezero is all you need: Fast convergence at large depth. arXiv preprint arXiv:2003.04887, 2020.
|
| 160 |
+
Alexei Baevski, Steffen Schneider, and Michael Auli. vq-wav2vec: Self-supervised learning of discrete speech representations. arXiv preprint arXiv:1910.05453, 2019.
|
| 161 |
+
Eric B Baum. On the capabilities of multilayer perceptrons. Journal of complexity, 4(3):193–215, 1988.
|
| 162 |
+
Iz Beltagy, Matthew E Peters, and Arman Cohan. Longformer: The long-document transformer. arXiv preprint arXiv:2004.05150, 2020.
|
| 163 |
+
Hans-Dieter Block. The perceptron: A model for brain functioning. i. Reviews of Modern Physics, 34(1):123, 1962.
|
| 164 |
+
Ondˇrej Bojar, Christian Buck, Christian Federmann, Barry Haddow, Philipp Koehn, Johannes Leveling, Christof Monz, Pavel Pecina, Matt Post, Herve Saint-Amand, Radu Soricut, Lucia Specia, and Ales Tamchyna. Findings of the 2014 workshop on statistical machine translation. In ˇ Proceedings of the Ninth Workshop on Statistical Machine Translation, Baltimore, Maryland, USA, June 2014. Association for Computational Linguistics.
|
| 165 |
+
A Borsellino and A Gamba. An outline of a mathematical theory of papa. Il Nuovo Cimento (1955- 1965), 20(2):221–231, 1961.
|
| 166 |
+
Andrew P Bradley. The use of the area under the roc curve in the evaluation of machine learning algorithms. Pattern recognition, 30(7):1145–1159, 1997.
|
| 167 |
+
Andrew Brock, Theodore Lim, James M Ritchie, and Nick Weston. Freezeout: Accelerate training by progressively freezing layers. arXiv preprint arXiv:1706.04983, 2017.
|
| 168 |
+
Tom B Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. arXiv preprint arXiv:2005.14165, 2020.
|
| 169 |
+
|
| 170 |
+
Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. arXiv preprint arXiv:2005.12872, 2020.
|
| 171 |
+
|
| 172 |
+
M. Cettolo, J. Niehues, S. Stuker, L. Bentivogli, and Marcello Federico. Report on the 11 th iwslt ¨ evaluation campaign , iwslt 2014. In Proceedings of IWSLT, 2015.
|
| 173 |
+
|
| 174 |
+
Kyunghyun Cho, Bart Van Merrienboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Hol- ¨ ger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014.
|
| 175 |
+
|
| 176 |
+
Krzysztof Choromanski, Valerii Likhosherstov, David Dohan, Xingyou Song, Jared Davis, Tamas Sarlos, David Belanger, Lucy Colwell, and Adrian Weller. Masked language modeling for proteins via linearly scalable long-context transformers. arXiv preprint arXiv:2006.03555, 2020.
|
| 177 |
+
|
| 178 |
+
Alexis Conneau, Douwe Kiela, Holger Schwenk, Loic Barrault, and Antoine Bordes. Supervised learning of universal sentence representations from natural language inference data. arXiv preprint arXiv:1705.02364, 2017.
|
| 179 |
+
|
| 180 |
+
Thomas M Cover. Geometrical and statistical properties of systems of linear inequalities with applications in pattern recognition. IEEE transactions on electronic computers, (3):326–334, 1965.
|
| 181 |
+
|
| 182 |
+
Wojciech Marian Czarnecki, Grzegorz Swirszcz, Max Jaderberg, Simon Osindero, Oriol Vinyals, ´ and Koray Kavukcuoglu. Understanding synthetic gradients and decoupled neural interfaces. arXiv preprint arXiv:1703.00522, 2017.
|
| 183 |
+
|
| 184 |
+
Zihang Dai, Zhilin Yang, Yiming Yang, Jaime Carbonell, Quoc Le, and Ruslan Salakhutdinov. Transformer-XL: Attentive language models beyond a fixed-length context. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, Florence, Italy, July 2019. Association for Computational Linguistics.
|
| 185 |
+
|
| 186 |
+
Amit Daniely, Roy Frostig, and Yoram Singer. Toward deeper understanding of neural networks: The power of initialization and a dual view on expressivity. In Advances In Neural Information Processing Systems, pp. 2253–2261, 2016.
|
| 187 |
+
|
| 188 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805, 2018.
|
| 189 |
+
|
| 190 |
+
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, pp. 1675– 1685, 2019.
|
| 191 |
+
|
| 192 |
+
Sergey Edunov, Myle Ott, Michael Auli, David Grangier, and Marc’Aurelio Ranzato. Classical structured prediction losses for sequence to sequence learning. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), New Orleans, Louisiana, June 2018. Association for Computational Linguistics.
|
| 193 |
+
|
| 194 |
+
Maha Elbayad, Jiatao Gu, Edouard Grave, and Michael Auli. Depth-adaptive transformer. arXiv preprint arXiv:1910.10073, 2019.
|
| 195 |
+
|
| 196 |
+
Joseph Enguehard, Dan Busbridge, Vitalii Zhelezniak, and Nils Hammerla. Neural language priors. arXiv preprint arXiv:1910.03492, 2019.
|
| 197 |
+
|
| 198 |
+
Angela Fan, Edouard Grave, and Armand Joulin. Reducing transformer depth on demand with structured dropout. arXiv preprint arXiv:1909.11556, 2019.
|
| 199 |
+
|
| 200 |
+
Jonathan Frankle and Michael Carbin. The lottery ticket hypothesis: Finding sparse, trainable neural networks. arXiv preprint arXiv:1803.03635, 2018.
|
| 201 |
+
|
| 202 |
+
Jonathan Frankle, David J Schwab, and Ari S Morcos. Training batchnorm and only batchnorm: On the expressive power of random features in cnns. arXiv preprint arXiv:2003.00152, 2020.
|
| 203 |
+
|
| 204 |
+
Claudio Gallicchio and Alessio Micheli. Echo state property of deep reservoir computing networks. Cognitive Computation, 9(3):337–350, 2017.
|
| 205 |
+
|
| 206 |
+
Claudio Gallicchio and Simone Scardapane. Deep randomized neural networks. In Recent Trends in Learning From Data, pp. 43–68. Springer, 2020.
|
| 207 |
+
|
| 208 |
+
A. Gamba, L. Gamberini, G. Palmieri, and R. Sanna. Further experiments with papa. Il Nuovo Cimento (1955-1965), 20(2):112–115, 1961.
|
| 209 |
+
|
| 210 |
+
Ankush Garg, Yuan Cao, and Qi Ge. Echo state neural machine translation. arXiv preprint arXiv:2002.11847, 2020.
|
| 211 |
+
|
| 212 |
+
Raja Giryes, Guillermo Sapiro, and Alex M Bronstein. Deep neural networks with random gaussian weights: A universal classification strategy? IEEE Transactions on Signal Processing, 64(13): 3444–3457, 2016.
|
| 213 |
+
|
| 214 |
+
Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pp. 249–256, 2010.
|
| 215 |
+
|
| 216 |
+
Caglar Gulcehre, Marcin Moczulski, Misha Denil, and Yoshua Bengio. Noisy activation functions. In International conference on machine learning, pp. 3059–3068, 2016.
|
| 217 |
+
|
| 218 |
+
Fatemeh Hadaeghi, Xu He, and Herbert Jaeger. Unconventional Information Processing Systems, Novel Hardware: A Tour D’Horizon. 2017.
|
| 219 |
+
|
| 220 |
+
Konstantin Hicke, Miguel Escalona-Moran, Daniel Brunner, Miguel Soriano, Ingo Fischer, and Claudio Mirasso. Information processing using transient dynamics of semiconductor lasers subject to delayed feedback. Selected Topics in Quantum Electronics, IEEE Journal of, 19:1501610– 1501610, 07 2013. doi: 10.1109/JSTQE.2013.2241738.
|
| 221 |
+
|
| 222 |
+
Guang-Bin Huang, Qin-Yu Zhu, and Chee-Kheong Siew. Extreme learning machine: theory and applications. Neurocomputing, 70(1-3):489–501, 2006.
|
| 223 |
+
|
| 224 |
+
Max Jaderberg, Wojciech Marian Czarnecki, Simon Osindero, Oriol Vinyals, Alex Graves, David Silver, and Koray Kavukcuoglu. Decoupled neural interfaces using synthetic gradients. In International Conference on Machine Learning, pp. 1627–1635. PMLR, 2017.
|
| 225 |
+
|
| 226 |
+
Herbert Jaeger. Adaptive nonlinear system identification with echo state networks. In Advances in neural information processing systems, 2003.
|
| 227 |
+
|
| 228 |
+
Ganesh Jawahar, Benoˆıt Sagot, and Djame Seddah. What does BERT learn about the structure of ´ language? In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, 2019.
|
| 229 |
+
|
| 230 |
+
Kam Jim, Bill G Horne, and C Lee Giles. Effects of noise on convergence and generalization in recurrent networks. In Advances in neural information processing systems, pp. 649–656, 1995.
|
| 231 |
+
|
| 232 |
+
Kam-Chuen Jim, C Lee Giles, and Bill G Horne. An analysis of noise in recurrent neural networks: convergence and generalization. IEEE Transactions on neural networks, 7(6):1424–1438, 1996.
|
| 233 |
+
|
| 234 |
+
William B Johnson and Joram Lindenstrauss. Extensions of lipschitz mappings into a hilbert space. Contemporary mathematics, 26(189-206):1, 1984.
|
| 235 |
+
|
| 236 |
+
Jared Kaplan, Sam McCandlish, Tom Henighan, Tom B Brown, Benjamin Chess, Rewon Child, Scott Gray, Alec Radford, Jeffrey Wu, and Dario Amodei. Scaling laws for neural language models. arXiv preprint arXiv:2001.08361, 2020.
|
| 237 |
+
|
| 238 |
+
Jungo Kasai, Nikolaos Pappas, Hao Peng, James Cross, and Noah A Smith. Deep encoder, shallow decoder: Reevaluating the speed-quality tradeoff in machine translation. arXiv preprint arXiv:2006.10369, 2020.
|
| 239 |
+
|
| 240 |
+
Angelos Katharopoulos, Apoorv Vyas, Nikolaos Pappas, and Franc¸ois Fleuret. Transformers are rnns: Fast autoregressive transformers with linear attention. arXiv preprint arXiv:2006.16236, 2020.
|
| 241 |
+
|
| 242 |
+
Yoon Kim. Convolutional neural networks for sentence classification. arXiv preprint arXiv:1408.5882, 2014.
|
| 243 |
+
|
| 244 |
+
Nikita Kitaev, Łukasz Kaiser, and Anselm Levskaya. Reformer: The efficient transformer. arXiv preprint arXiv:2001.04451, 2020.
|
| 245 |
+
|
| 246 |
+
Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
|
| 247 |
+
|
| 248 |
+
Yuanzhi Li and Yingyu Liang. Learning overparameterized neural networks via stochastic gradient descent on structured data. In Advances in Neural Information Processing Systems, pp. 8157– 8166, 2018.
|
| 249 |
+
|
| 250 |
+
Zhuohan Li, Eric Wallace, Sheng Shen, Kevin Lin, Kurt Keutzer, Dan Klein, and Joseph E Gonzalez. Train large, then compress: Rethinking model size for efficient training and inference of transformers. arXiv preprint arXiv:2002.11794, 2020.
|
| 251 |
+
|
| 252 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. Roberta: A robustly optimized bert pretraining approach. arXiv preprint arXiv:1907.11692, 2019.
|
| 253 |
+
|
| 254 |
+
MultiMedia LLC. Large text compression benchmark. 2009.
|
| 255 |
+
|
| 256 |
+
Mantas Lukosevi ˇ cius and Herbert Jaeger. Reservoir computing approaches to recurrent neural net- ˇ work training. Computer Science Review, 3(3), 2009.
|
| 257 |
+
|
| 258 |
+
Wolfgang Maass, Thomas Natschlager, and Henry Markram. Real-time computing without stable ¨ states: A new framework for neural computation based on perturbations. Neural computation, 14 (11):2531–2560, 2002.
|
| 259 |
+
|
| 260 |
+
Marvin Minsky and Seymour A Papert. Perceptrons: An introduction to computational geometry. MIT press, 2017.
|
| 261 |
+
|
| 262 |
+
Emre O Neftci, Charles Augustine, Somnath Paul, and Georgios Detorakis. Event-driven random back-propagation: Enabling neuromorphic deep learning machines. Frontiers in neuroscience, 11:324, 2017.
|
| 263 |
+
|
| 264 |
+
Hyeonwoo Noh, Tackgeun You, Jonghwan Mun, and Bohyung Han. Regularizing deep neural networks by noise: Its interpretation and optimization. In Advances in Neural Information Processing Systems, pp. 5109–5118, 2017.
|
| 265 |
+
|
| 266 |
+
Deniz Oktay, Nick McGreivy, Joshua Aduol, Alex Beatson, and Ryan P Adams. Randomized automatic differentiation. arXiv preprint arXiv:2007.10412, 2020.
|
| 267 |
+
|
| 268 |
+
Myle Ott, Sergey Edunov, David Grangier, and Michael Auli. Scaling neural machine translation. arXiv preprint arXiv:1806.00187, 2018.
|
| 269 |
+
|
| 270 |
+
Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan $\mathrm { N g }$ , David Grangier, and Michael Auli. fairseq: A fast, extensible toolkit for sequence modeling. In Proceedings of NAACL-HLT 2019: Demonstrations, 2019.
|
| 271 |
+
|
| 272 |
+
Yoh-Han Pao, Gwang-Hoon Park, and Dejan J Sobajic. Learning and generalization characteristics of the random vector functional-link net. Neurocomputing, 6(2):163–180, 1994.
|
| 273 |
+
|
| 274 |
+
Jonathan Pilault, Jaehong Park, and Christopher Pal. On the impressive performance of randomly weighted encoders in summarization tasks. arXiv preprint arXiv:2002.09084, 2020.
|
| 275 |
+
|
| 276 |
+
Jordi Pons and Xavier Serra. Randomly weighted cnns for (music) audio classification. In ICASSP 2019-2019 IEEE international conference on acoustics, speech and signal processing (ICASSP), pp. 336–340. IEEE, 2019.
|
| 277 |
+
|
| 278 |
+
Ofir Press, Noah A Smith, and Omer Levy. Improving transformer models by reordering their sublayers. arXiv preprint arXiv:1911.03864, 2019.
|
| 279 |
+
|
| 280 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. 2018.
|
| 281 |
+
|
| 282 |
+
Ali Rahimi and Benjamin Recht. Random features for large-scale kernel machines. In Advances in neural information processing systems, pp. 1177–1184, 2008.
|
| 283 |
+
|
| 284 |
+
Ali Rahimi and Benjamin Recht. Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning. In Advances in neural information processing systems, pp. 1313– 1320, 2009.
|
| 285 |
+
|
| 286 |
+
Vivek Ramanujan, Mitchell Wortsman, Aniruddha Kembhavi, Ali Farhadi, and Mohammad Rastegari. What’s hidden in a randomly weighted neural network? In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 11893–11902, 2020.
|
| 287 |
+
|
| 288 |
+
Anna Rogers, Olga Kovaleva, and Anna Rumshisky. A primer in bertology: What we know about how bert works. arXiv preprint arXiv:2002.12327, 2020.
|
| 289 |
+
|
| 290 |
+
Amir Rosenfeld and John K Tsotsos. Intriguing properties of randomly weighted networks: Generalizing while learning next to nothing. In 2019 16th Conference on Computer and Robot Vision (CRV), pp. 9–16. IEEE, 2019.
|
| 291 |
+
|
| 292 |
+
Magnus Sahlgren. An introduction to random indexing. In Methods and applications of semantic indexing workshop at the 7th international conference on terminology and knowledge engineering, 2005.
|
| 293 |
+
|
| 294 |
+
Andrew M Saxe, James L McClelland, and Surya Ganguli. Exact solutions to the nonlinear dynamics of learning in deep linear neural networks. arXiv preprint arXiv:1312.6120, 2013.
|
| 295 |
+
|
| 296 |
+
Simone Scardapane and Dianhui Wang. Randomness in neural networks: an overview. Wiley Interdisciplinary Reviews: Data Mining and Knowledge Discovery, 7(2):e1200, 2017.
|
| 297 |
+
|
| 298 |
+
Wouter F Schmidt, Martin A Kraaijveld, and Robert PW Duin. Feedforward neural networks with random weights. In Proceedings of the 11th International Conference on Pattern Recognition, 1992. Vol. II. Conference B: Pattern Recognition Methodology and Systems, pp. 1–4, 1992.
|
| 299 |
+
|
| 300 |
+
Benjamin Schrauwen, Michiel D’Haene, David Verstraeten, and Jan Campenhout. Compact hardware for real-time speech recognition using a liquid state machine. pp. 1097 – 1102, 09 2007. doi: 10.1109/IJCNN.2007.4371111.
|
| 301 |
+
|
| 302 |
+
Roy Schwartz, Jesse Dodge, Noah A Smith, and Oren Etzioni. Green ai. arXiv preprint arXiv:1907.10597, 2019.
|
| 303 |
+
|
| 304 |
+
Richard Socher, Alex Perelygin, Jean Wu, Jason Chuang, Christopher D Manning, Andrew Y Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of the 2013 conference on empirical methods in natural language processing, pp. 1631–1642, 2013.
|
| 305 |
+
|
| 306 |
+
Emma Strubell, Ananya Ganesh, and Andrew McCallum. Energy and policy considerations for deep learning in nlp. arXiv preprint arXiv:1906.02243, 2019.
|
| 307 |
+
|
| 308 |
+
Gouhei Tanaka, Toshiyuki Yamane, Jean Benoit Heroux, Ryosho Nakane, Naoki Kanazawa, Seiji ´ Takeda, Hidetoshi Numata, Daiju Nakano, and Akira Hirose. Recent advances in physical reservoir computing: A review. Neural Networks, 115:100 – 123, 2019.
|
| 309 |
+
|
| 310 |
+
Yi Tay, Dara Bahri, Donald Metzler, Da-Cheng Juan, Zhe Zhao, and Che Zheng. Synthesizer: Rethinking self-attention in transformer models. arXiv preprint arXiv:2005.00743, 2020a.
|
| 311 |
+
|
| 312 |
+
Yi Tay, Mostafa Dehghani, Dara Bahri, and Donald Metzler. Efficient transformers: A survey. arXiv preprint arXiv:2009.06732, 2020b.
|
| 313 |
+
|
| 314 |
+
Ian Tenney, Dipanjan Das, and Ellie Pavlick. Bert rediscovers the classical nlp pipeline. arXiv preprint arXiv:1905.05950, 2019.
|
| 315 |
+
|
| 316 |
+
Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Deep image prior. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 9446–9454, 2018.
|
| 317 |
+
|
| 318 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
|
| 319 |
+
|
| 320 |
+
Oriol Vinyals, Igor Babuschkin, Wojciech M. Czarnecki, Michael Mathieu, Andrew Dudzik, Juny- ¨ oung Chung, David H. Choi, Richard Powell, Timo Ewalds, Petko Georgiev, Junhyuk Oh, Dan Horgan, Manuel Kroiss, Ivo Danihelka, Aja Huang, Laurent Sifre, Trevor Cai, John P. Agapiou, Max Jaderberg, Alexander S. Vezhnevets, Remi Leblond, Tobias Pohlen, Valentin Dalibard, David ´ Budden, Yury Sulsky, James Molloy, Tom L. Paine, Caglar Gulcehre, Ziyu Wang, Tobias Pfaff, Yuhuai Wu, Roman Ring, Dani Yogatama, Dario Wunsch, Katrina McKinney, Oliver Smith, Tom ¨ Schaul, Timothy Lillicrap, Koray Kavukcuoglu, Demis Hassabis, Chris Apps, and David Silver. Grandmaster level in StarCraft II using multi-agent reinforcement learning. Nature, 575(7782): 350–354, November 2019.
|
| 321 |
+
|
| 322 |
+
Sinong Wang, Belinda Li, Madian Khabsa, Han Fang, and Hao Ma. Linformer: Self-attention with linear complexity. arXiv preprint arXiv:2006.04768, 2020.
|
| 323 |
+
|
| 324 |
+
John Wieting and Douwe Kiela. No training required: Exploring random encoders for sentence classification. arXiv preprint arXiv:1901.10444, 2019.
|
| 325 |
+
|
| 326 |
+
Adina Williams, Nikita Nangia, and Samuel R Bowman. A broad-coverage challenge corpus for sentence understanding through inference. arXiv preprint arXiv:1704.05426, 2017.
|
| 327 |
+
|
| 328 |
+
Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992.
|
| 329 |
+
|
| 330 |
+
Felix Wu, Angela Fan, Alexei Baevski, Yann N Dauphin, and Michael Auli. Pay less attention with lightweight and dynamic convolutions. arXiv preprint arXiv:1901.10430, 2019.
|
| 331 |
+
|
| 332 |
+
Manzil Zaheer, Guru Guruganesh, Avinava Dubey, Joshua Ainslie, Chris Alberti, Santiago Ontanon, Philip Pham, Anirudh Ravula, Qifan Wang, Li Yang, et al. Big bird: Transformers for longer sequences. arXiv preprint arXiv:2007.14062, 2020.
|
| 333 |
+
|
| 334 |
+
Chiyuan Zhang, Samy Bengio, and Yoram Singer. Are all layers created equal? arXiv preprint arXiv:1902.01996, 2019.
|
| 335 |
+
|
| 336 |
+
Kelly Zhang and Samuel Bowman. Language modeling teaches you more than translation does: Lessons learned through auxiliary syntactic task analysis. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, 2018.
|
| 337 |
+
|
| 338 |
+
Hattie Zhou, Janice Lan, Rosanne Liu, and Jason Yosinski. Deconstructing lottery tickets: Zeros, signs, and the supermask. In Advances in Neural Information Processing Systems, pp. 3597–3607, 2019.
|
| 339 |
+
|
| 340 |
+

|
| 341 |
+
Figure 6: IWSLT comparison of different hybrid architectures with different reservoir layers.
|
| 342 |
+
|
| 343 |
+

|
| 344 |
+
Figure 7: IWSLT validation AUCC and test BLEU with 6-layer decoder.
|
| 345 |
+
|
| 346 |
+
A HYBRID NETWORKS AND NON-TRANSFORMER RESERVOIRS
|
| 347 |
+
|
| 348 |
+
We investigate whether reservoir layers need to be transformer-based (or transformers-withoutattention, i.e., FFN). We examine two different alternatives: bidirectional Gated Recurrent Units (Cho et al., 2014) and Convolutional Neural Networks (LeCun et al., 1998; Kim, 2014), specifically light dynamical convolutions (Wu et al., 2019). Figure 6 shows the results for these hybrids: depending on the setting, they may obtain a better AUCC than the regular transformer, but this is less consistent than with the other reservoir layers, most likely because these layers have different computational properties. It’s possible that these hybrids simply require further tuning, as we found e.g. up-projecting to help for BiGRUs, but studying this is outside of the scope of the current work.
|
| 349 |
+
|
| 350 |
+
# B DEEP DECODERS
|
| 351 |
+
|
| 352 |
+
We show that the same results hold for a 6-layer decoder on IWSLT (although less pronounced for AUCC, probably because the decoder is computationally heavier). See Figure 7 and Table 2.
|
| 353 |
+
|
| 354 |
+
# C FREEZING STRATEGY
|
| 355 |
+
|
| 356 |
+
We explored different strategies for the placement of reservoir layers and found the “alternating” strategy reported in the main body of the paper to work best. Generally, we found repetitive application of reservoirs to yield diminishing returns, as might be expected. See Figure 8.
|
| 357 |
+
|
| 358 |
+
Table 2: Wall-clock time (averaged over multiple runs) saved for IWSLT for different model types and encoder depths. Max BLEU is for validation. Number of layers is for encoder, decoder depth is kept fixed at 6. Ratio is computed compared to comparable number of layers in the normal case.
|
| 359 |
+
|
| 360 |
+
<table><tr><td>Model</td><td>#Layers</td><td>Frozen</td><td>Max BLEU</td><td>Train time until max (in hours)</td><td>Ratio</td><td># Params Trainable (Total)</td><td>Train Time each epoch (in seconds)</td></tr><tr><td rowspan="4">Transformer</td><td>6</td><td>0</td><td>34.97 ± 0.05</td><td>1.984 ± 0.02</td><td>1</td><td>39.5M</td><td>177.84 ± 2.98</td></tr><tr><td>8</td><td>0</td><td>34.99 ± 0.08</td><td>2.161 ± 0.03</td><td>1</td><td>43.7M</td><td>206.59 ± 3.47</td></tr><tr><td>10</td><td>0</td><td>34.98 ± 0.04</td><td>2.345± 0.02</td><td>1</td><td>47.9M</td><td>236.72 ± 3.52</td></tr><tr><td>12</td><td>0</td><td>34.78 ± 0.11</td><td>2.535 ± 0.05</td><td>1</td><td>52.0M</td><td>265.90 ± 4.97</td></tr><tr><td rowspan="4">TReservoir</td><td>6</td><td>2</td><td>34.73 ± 0.11</td><td>1.838 ± 0.01</td><td>0.92</td><td>35.3M (39.5M)</td><td>166.11 ± 2.21</td></tr><tr><td>8</td><td>2</td><td>35.07 ± 0.05</td><td>1.912 ± 0.03</td><td>0.88</td><td>39.5M (43.7M)</td><td>190.08 ± 3.73</td></tr><tr><td>10</td><td>2</td><td>35.02 ± 0.01</td><td>1.970 ± 0.04</td><td>0.84</td><td>43.7M (47.9M)</td><td>204.42 ± 2.89</td></tr><tr><td>12</td><td>2</td><td>35.06 ± 0.02</td><td>2.429 ± 0.02</td><td>0.95</td><td>47.8M (52.0M)</td><td>236.41 ± 4.35</td></tr><tr><td rowspan="4">FFN Reservoir</td><td>6</td><td>2</td><td>34.85 ± 0.10</td><td>1.729 ± 0.03</td><td>0.87</td><td>35.3M (37.4M)</td><td>161.72 ± 2.32</td></tr><tr><td>8</td><td>2</td><td>34.99 ± 0.11</td><td>1.751 ± 0.02</td><td>0.81</td><td>39.5M (41.6M)</td><td>180.21 ± 2.68</td></tr><tr><td>10</td><td>2</td><td>34.92 ± 0.03</td><td>1.907 ± 0.02</td><td>0.81</td><td>43.7M (45.8M)</td><td>191.40 ± 2.49</td></tr><tr><td>12</td><td>2</td><td>35.16 ± 0.04</td><td>2.395 ± 0.01</td><td>0.94</td><td>47.8M (49.9M)</td><td>216.08 ± 2.57</td></tr><tr><td rowspan="4">LayerDrop</td><td>6</td><td>22</td><td>34.51 ± 0.12</td><td>1.908 ± 0.04</td><td>0.96</td><td>35.3M (39.5M)</td><td>169.62 ± 3.16</td></tr><tr><td>8</td><td></td><td>34.77 ± 0.11</td><td>2.023 ± 0.02</td><td>0.94</td><td>39.5M (43.7M)</td><td>186.71 ± 2.17</td></tr><tr><td>10</td><td>2</td><td>34.06 ± 0.05</td><td>1.912 ± 0.02</td><td>0.97</td><td>43.7M (47.9M)</td><td>205.52 ± 3.31</td></tr><tr><td>12</td><td>2</td><td>34.08 ± 0.13</td><td>2.524 ± 0.01</td><td>0.99</td><td>47.8M (52.0M)</td><td>222.45 ± 2.21</td></tr></table>
|
| 361 |
+
|
| 362 |
+
<table><tr><td>Model</td><td> # Layers</td><td>Frozen</td><td>Max BLEU</td><td>Train time until max (in hours)</td><td>Ratio</td><td># Params Trainable (Total)</td><td>Train Time each epoch (in hours)</td></tr><tr><td rowspan="4">Transformer</td><td>12</td><td>0</td><td>24.46 ± 0.04</td><td>15.15 ± 0.15</td><td>1</td><td>75.6M</td><td>0.505 ± 0.005</td></tr><tr><td>16</td><td>0</td><td>24.52 ± 0.03</td><td>16.05 ± 0.18</td><td></td><td>88.2M</td><td>0.643 ± 0.006</td></tr><tr><td>24</td><td>0</td><td>24.69 ± 0.05</td><td>17.61 ± 0.85</td><td>1</td><td>113.4M</td><td>0.877 ± 0.029</td></tr><tr><td>32</td><td>0</td><td>24.83 ± 0.04</td><td>18.42 ± 0.28</td><td>1</td><td>138.6M</td><td>1.036 ± 0.010</td></tr><tr><td rowspan="4">TReservoir</td><td>12</td><td>4</td><td>24.26 ± 0.08</td><td>14.11 ± 0.21</td><td>0.93</td><td>72.4M (75.6M)</td><td>0.472 ± 0.007</td></tr><tr><td>16</td><td>4</td><td>24.50 ± 0.05</td><td>15.25 ± 0.28</td><td>0.95</td><td>75.6M (88.2M)</td><td>0.596 ± 0.009</td></tr><tr><td>24</td><td>4</td><td>25.11 ± 0.07</td><td>15.89 ± 0.74</td><td>0.90</td><td>100.8M (113.4M)</td><td>0.776 ± 0.024</td></tr><tr><td>32</td><td>4</td><td>24.66 ± 0.04</td><td>16.38 ± 0.24</td><td>0.88</td><td>126.0M (138.6M)</td><td>0.998 ± 0.009</td></tr><tr><td rowspan="4">FFN Reservoir</td><td>12</td><td>4</td><td>24.42 ± 0.05</td><td>14.01 ± 0.09</td><td>0.92</td><td>72.4M (71.4M)</td><td>0.441 ± 0.003</td></tr><tr><td>16</td><td>4</td><td>24.65 ± 0.07</td><td>14.53 ± 0.17</td><td>0.91</td><td>75.6M (83.9M)</td><td>0.524 ± 0.006</td></tr><tr><td>24</td><td>4</td><td>24.93 ± 0.04</td><td>12.62 ± 1.53</td><td>0.71</td><td>100.8M (109.2M)</td><td>0.743 ± 0.018</td></tr><tr><td>32</td><td>4</td><td>24.98 ± 0.03</td><td>13.96 ± 0.19</td><td>0.73</td><td>126.0M (134.4M)</td><td>0.964 ± 0.007</td></tr><tr><td rowspan="4">LayerDrop</td><td>12</td><td>4</td><td>24.27 ± 0.03</td><td>14.61 ± 0.14</td><td>0.96</td><td>72.4M (75.6M)</td><td>0.489 ± 0.006</td></tr><tr><td>16</td><td>4</td><td>24.15 ± 0.06</td><td>15.55 ± 0.54</td><td>0.97</td><td>75.6M (88.2M)</td><td>0.597 ± 0.017</td></tr><tr><td>24</td><td>4</td><td>24.37 ± 0.05</td><td>16.25 ± 0.36</td><td>0.92</td><td>100.8M (113.4M)</td><td>0.823 ± 0.013</td></tr><tr><td>32</td><td>4</td><td>23.84 ± 0.03</td><td>15.27 ± 0.38</td><td>0.83</td><td>126.0M (138.6M)</td><td>1.028 ± 0.012</td></tr></table>
|
| 363 |
+
|
| 364 |
+
Table 3: Wall-clock time (averaged over multiple runs) saved for WMT for different model types and encoder depths. Max BLEU is for validation. Number of layers is for encoder, decoder depth is kept fixed at 1. Ratio is computed compared to comparable number of layers in the normal case.
|
| 365 |
+
|
| 366 |
+
# D ROBERTA RESULTS
|
| 367 |
+
|
| 368 |
+
Here we present the additional RoBERTa results for convergence plot and AUCC in various decoder depth setting in Figure 10. As stated in the main paper, the difference of AUCC / Convergence Plot between RoBERTa model with or without Reservoir layers are limited. Moreover, we plot the downstream task performance for SST-2 and MNLI compared to the pretraining wall-clock time in Figure 9. It can be seen that the FFN Reservoir can achieve up to $\cdot$ and $10 \%$ pretraining time savings while matching the best performance of vanilla transformers for MNLI-m and SST2, respectively.
|
| 369 |
+
|
| 370 |
+
# E RESERVOIR RESULTS FOR TOTAL LAYERS
|
| 371 |
+
|
| 372 |
+
Here we present the shifted Reservoir Results for IWSLT14, WMT16, Enwik8 and RoBERTa finetuning in Figure 11, 12, 13, 14, respectively. We show the same results also hold when it comes to replace normal transformer blocks with Reservoir blocks at least for MT.
|
| 373 |
+
|
| 374 |
+
Table 4: Wall-clock time (averaged over multiple runs) saved for IWSLT/WMT for different model types and encoder depths. $\cdot$ Max BLEU is for validation.
|
| 375 |
+
|
| 376 |
+
<table><tr><td>Mode1</td><td>#Layers</td><td>IWSLT-Dec2 Train time until 95% max (in hours)</td><td>Max BLEU (95%)</td><td>#Layers</td><td>IWSLT-Dec6 Train time until 95% max (in hours)</td><td>Max BLEU (95%)</td><td>#Layers</td><td>WMT-Dec1 Train time until 95% max (in hours)</td><td>Max BLEU (95%)</td></tr><tr><td rowspan="6">Transformer</td><td>6</td><td>0.647 ± 0.03</td><td>32.89 ± 0.04</td><td>6</td><td>0.642 ± 0.02</td><td>33.36 ± 0.03</td><td>16</td><td>3.788 ± 0.053</td><td>23.36 ± 0.06</td></tr><tr><td></td><td>0.711 ± 0.05</td><td>33.04 ± 0.03</td><td>8</td><td>0.765 ± 0.03</td><td>33.41 ± 0.08</td><td></td><td>3.820 ± 0.072</td><td>23.41 ± 0.05</td></tr><tr><td></td><td>0.808 ± 0.02</td><td>33.96 ± 0.08</td><td>10</td><td>0.898 ± 0.04</td><td>33.32 ± 0.07</td><td></td><td>5.262 ± 0.607</td><td>23.50 ± 0.03</td></tr><tr><td>12</td><td>1.037 ± 0.03</td><td>33.07 ± 0.09</td><td>12</td><td>1.037 ± 0.03</td><td>33.07 ± 0.11</td><td>五</td><td>6.212 ± 0.232</td><td>23.81 ±0.04</td></tr><tr><td></td><td>0.569 ± 0.02</td><td>32.78 ±0.03</td><td>6</td><td>0.599 ± 0.01</td><td>33.09 ± 0.05</td><td></td><td>3.563 ± 0.061</td><td>23.21 ± 0.04</td></tr><tr><td>8</td><td>0.619 ± 0.04</td><td>33.12 ± 0.05</td><td>8</td><td>0.726 ± 0.02</td><td>33.38 ± 0.09</td><td>1</td><td>3.603 ± 0.056</td><td>23.80 ± 0.06</td></tr><tr><td rowspan="5">T Reservoir</td><td></td><td>0.729 ± 0.04</td><td>33.13 ± 0.07</td><td>10</td><td>0.738 ± 0.03</td><td>33.37 ± 0.04</td><td>24</td><td>4.923 ± 0.771</td><td>23.75 ± 0.02</td></tr><tr><td>12</td><td>0.982 ± 0.02</td><td>33.03 ± 0.11</td><td>12</td><td>0.958 ± 0.01</td><td>33.46± 0.09</td><td>32</td><td>5.780 ± 0.214</td><td>23.71 ±0.03</td></tr><tr><td>6</td><td>0.521 ± 0.05</td><td>32.85 ± 0.02</td><td>6</td><td>0.594 ± 0.03</td><td>33.13 ± 0.04</td><td>12</td><td>3.417 ± 0.046</td><td>23.22 ± 0.07</td></tr><tr><td>8</td><td>0.533 ± 0.03</td><td>33.84 ± 0.04</td><td>8</td><td>0.651 ± 0.04</td><td>33.36 ± 0.06</td><td>16</td><td>3.527 ± 0.063</td><td>23.54 ± 0.05</td></tr><tr><td>10</td><td>0.614 ± 0.01</td><td>33.05 ± 0.08</td><td>10</td><td>0.627 ± 0.05</td><td>33.26 ± 0.03</td><td>24</td><td>4.197 ± 0.697</td><td>23.74 ± 0.06</td></tr><tr><td rowspan="5">LayerDrop</td><td>12</td><td>0.811 ± 0.02</td><td>33.26 ± 0.10</td><td>12</td><td>0.780 ± 0.02</td><td>33.46 ± 0.08</td><td>32</td><td>4.984 ± 0.321</td><td>23.82 ± 0.02</td></tr><tr><td></td><td>0.837 ±0.08</td><td>32.87 ± 0.05</td><td>6</td><td>0.706 ±0.01</td><td>33.08 ± 0.03</td><td>12</td><td>3.912 ± 0.068</td><td>23.33 ± 0.08</td></tr><tr><td>6</td><td>0.934 ± 0.07</td><td>33.12 ± 0.03</td><td>8</td><td>0.753 ± 0.04</td><td>33.14 ± 0.05</td><td>16</td><td>3.581 ± 0.076</td><td>23.17 ± 0.04</td></tr><tr><td>10</td><td>0.901 ± 0.06</td><td>33.18 ±0.02</td><td>10</td><td>0.691 ± 0.03</td><td>32.39 ± 0.05</td><td>3</td><td>4.875 ± 0.728</td><td>23.43 ± 0.07</td></tr><tr><td>12</td><td>0.914 ± 0.01</td><td>32.33 ± 0.06</td><td>12</td><td>0.803 ± 0.02</td><td>32.94 ± 0.10</td><td></td><td>5.980 ± 0.219</td><td>22.97 ± 0.08</td></tr></table>
|
| 377 |
+
|
| 378 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">#Layers</td><td colspan="3">IWSLT-Dec2 Train time</td><td colspan="3">IWSLT-Dec6</td><td rowspan="2"></td><td colspan="2">WMT-Dec1</td></tr><tr><td>until 99 % max (in hours)</td><td>Max BLEU (99%)</td><td>#Layers</td><td>Train time until 99 % max (in hours)</td><td>Max BLEU (99%)</td><td>#Layers</td><td>Train time until 99 % max (in hours)</td><td>Max BLEU (99%)</td></tr><tr><td rowspan="5">Transformer</td><td></td><td>1.454 ± 0.06</td><td>34.24 ± 0.05</td><td>6</td><td>1.297 ± 0.03</td><td>34.69 ± 0.05</td><td>1</td><td>9.961 ± 0.053</td><td></td><td>24.27 ± 0.04</td></tr><tr><td></td><td>1.475 ± 0.09</td><td>34.32 ± 0.09</td><td>8</td><td>1.390 ± 0.02</td><td></td><td></td><td></td><td>12.623 ± 0.072</td><td>24.35 ± 0.06</td></tr><tr><td>10</td><td>1.526 ± 0.04</td><td>34.25 ± 0.04</td><td></td><td></td><td>1.622 ± 0.05</td><td>34.75 ± 0.09 34.64 ± 0.03</td><td>3</td><td>13.412 ± 0.837</td><td>24.49 ± 0.07</td></tr><tr><td>12</td><td>2.259 ± 0.07</td><td>34.24 ± 0.11</td><td>10 12</td><td></td><td>1.748 ± 0.01</td><td>34.66 ± 0.08</td><td></td><td>15.117 ± 0.232</td><td>24.56 ± 0.02</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td rowspan="5">TReservoir</td><td></td><td>1.257 ± 0.04</td><td>34.05 ± 0.09</td><td>6</td><td>1.291 ± 0.03</td><td>34.51 ± 0.10</td><td>1</td><td>8.314 ± 0.062</td><td></td><td>24.15 ± 0.06</td></tr><tr><td>10</td><td>1.472 ± 0.06</td><td>34.47 ± 0.05</td><td></td><td>1.339 ± 0.03</td><td>34.80 ± 0.04</td><td></td><td></td><td>9.221 ± 0.073</td><td>24.41 ± 0.05</td></tr><tr><td>12</td><td>1.530 ± 0.03</td><td>34.36 ± 0.02</td><td>10</td><td>1.419 ± 0.04</td><td></td><td>34.72 ± 0.03</td><td></td><td>10.413 ± 0.580</td><td>24.56 ± 0.03</td></tr><tr><td></td><td>2.043 ± 0.05</td><td>34.53 ± 0.07</td><td>12</td><td>1.642 ± 0.02</td><td></td><td>34.87 ± 0.02</td><td>3</td><td>11.465 ± 0.227</td><td>24.49 ±0.01</td></tr><tr><td>680</td><td>1.138 ± 0.03</td><td>34.10 ± 0.13</td><td>6</td><td>1.169 ± 0.02</td><td></td><td>34.71 ± 0.09</td><td></td><td>7.407 ± 0.087</td><td>24.33 ± 0.08</td></tr><tr><td rowspan="5">FFN Reservoir</td><td></td><td>1.101 ± 0.07</td><td>34.32 ± 0.11 34.36 ± 0.03</td><td>8 10</td><td>1.201 ± 0.03 1.276 ± 0.03</td><td>34.79 ±0.08 34.63 ± 0.03</td><td></td><td></td><td>9.336 ± 0.036</td><td>24.42 ± 0.05</td></tr><tr><td>12</td><td>1.281 ± 0.01</td><td></td><td></td><td></td><td></td><td></td><td></td><td>9.978 ± 0.546</td><td>24.91 ± 0.07</td></tr><tr><td></td><td>1.785 ± 0.03</td><td>34.42 ± 0.06</td><td>12</td><td>1.440 ± 0.01</td><td>34.87 ± 0.02</td><td></td><td></td><td>10.524 ± 0.341</td><td>24.96 ± 0.01</td></tr><tr><td>8</td><td>1.363 ± 0.05</td><td>34.58 ± 0.14</td><td>6</td><td>1.253 ± 0.01</td><td></td><td>34.42 ± 0.10</td><td></td><td>8.372 ± 0.059</td><td>24.17 ± 0.04</td></tr><tr><td></td><td>1.468 ± 0.03</td><td>34.50 ± 0.12</td><td>8</td><td>1.244 ± 0.04</td><td>34.44 ± 0.09</td><td></td><td></td><td>9.741 ± 0.043</td><td>23.93 ± 0.08</td></tr><tr><td rowspan="4">LayerDrop</td><td>10</td><td>1.678 ± 0.04</td><td>34.52 ± 0.07</td><td>10</td><td></td><td></td><td>33.83 ±0.06</td><td>16 3</td><td>10.145 ± 0.628</td><td>24.07 ± 0.09</td></tr><tr><td>12</td><td>2.071 ± 0.02</td><td>33.45 ± 0.23</td><td>12</td><td>1.343 ± 0.04 1.423 ± 0.02</td><td>33.97 ± 0.12</td><td></td><td></td><td>10.168 ± 0.329</td><td>23.81 ± 0.03</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 379 |
+
|
| 380 |
+
Table 5: Wall-clock time (averaged over multiple runs) saved for IWSLT/WMT for different model types and encoder depths. $9 9 \%$ Max BLEU is for validation.
|
| 381 |
+
|
| 382 |
+
# F VALIDATION PLOTS
|
| 383 |
+
|
| 384 |
+
Here we present the validation plots for training a 8-layer encoder, 2-layer decoder model for IWSLT14, a 24-layer encoder, 1-layer decoder model for WMT14, a 48-layer decoder model for enwik8 and a 12-layer decoder model for RoBERTa for detailed steps to calculate the AUCC. It can be clearly observed that given the configurations from Section 3.1, all the models have converged. So when we compute the area under the convergence curve, this depicts the training efficiency of the model (basically time x performance) until convergence. Specifically, we set T sufficiently high for computing the AUCC, which is 4h for IWSLT, 20h for WMT, 30h for enwik8 and 60h for RoBERTa pretraning. From the training plot in the appendix, we can see that each model has converged at that point. The Reservoir model in Figure 15 has 2 layers frozen for IWSLT14, 8 layers frozen for enwik8, and 4 layers frozen for WMT14 and RoBERTa.
|
| 385 |
+
|
| 386 |
+
# G ROBERTA PROBING
|
| 387 |
+
|
| 388 |
+
We follow Jawahar et al. (2019) and investigate what the frozen layers in the Reservoir Transformer have actually “learned” (while being forzen) as measured by probing tasks, reported in Table 6. The results are gathered over 3 random seeds for reporting the mean and standard deviation. From the table, we can see that generally probing performance is quite similar between Transformer and the T Reservoir model. We also noticed that the representations collected after the frozen layer (3, 5, 7, 9) in the T Reservoir actually have significantly better performance over the regular Transformer representations across all the probing tasks. This has interesting repercussions for the study of “BERTology”, as it clearly shows, somewhat confusingly, that even completely random and frozen layers represent linguistic phenomena.
|
| 389 |
+
|
| 390 |
+

|
| 391 |
+
Figure 8: IWSLT with 2-layer decoder using different freezing strategy.
|
| 392 |
+
|
| 393 |
+

|
| 394 |
+
Figure 9: RoBERTa Reservoir Results, Pre-training versus downstream task plot for 12 layer RoBERTa. MNLI-m (left). SST-2 (right).
|
| 395 |
+
|
| 396 |
+

|
| 397 |
+
Figure 10: RoBERTa Reservoir Results, Training plot for 12 layer RoBERTa (left). AUCC result (right).
|
| 398 |
+
|
| 399 |
+

|
| 400 |
+
Figure 11: Validation BLEU AUCC and test BLEU for IWSLT (high is good). Comparison of regular transformer and reservoir transformer with FFN or Transformer reservoir layers added.
|
| 401 |
+
|
| 402 |
+

|
| 403 |
+
Figure 12: Validation BLEU AUCC and test BLEU for WMT (high is good). Comparison of regular transformer and reservoir transformer with FFN or Transformer reservoir layers added.
|
| 404 |
+
|
| 405 |
+

|
| 406 |
+
Figure 13: Validation BPC AUCC and test BPC on the enwik8 language modelling task (low is good). Comparison of regular and reservoir transformers for varying depths.
|
| 407 |
+
|
| 408 |
+

|
| 409 |
+
Figure 14: Downstream RoBERTa performance on SST-2 (left) and MultiNLI-matched (right).
|
| 410 |
+
|
| 411 |
+

|
| 412 |
+
Figure 15: IWSLT with 2-layer decoder validation plot (upper left). WMT with 24-layer decoder validation plot (upper right). Enwik8 with 48-layer decoder validation plot (lower left). RoBERTa with 12-layer decoder validation plot (lower right).
|
| 413 |
+
|
| 414 |
+
<table><tr><td>Model</td><td>Layer</td><td>SentLen (Surface)</td><td>TreeDepth (Syntactic)</td><td>TopConst (Syntactic)</td><td>BShift (Syntactic)</td><td>Tense (Semantic)</td><td>SubjNum (Semantic)</td><td>ObjNum (Semantic)</td><td>SOMO (Semantic)</td><td>CoordInv (Semantic)</td></tr><tr><td rowspan="14">Transformer</td><td></td><td>84.56 ± 0.54</td><td>32.30 ± 0.41</td><td>54.40 ± 0.33</td><td>49.99 ± 0.01</td><td>80.98 ± 0.32</td><td>76.26 ± 0.09</td><td>50.01 ± 0.19</td><td>76.38 ± 0.61</td><td>54.33 ± 0.47</td></tr><tr><td></td><td>87.22 ± 0.07</td><td>33.63 ± 0.57</td><td>58.38 ± 0.20</td><td>50.12 ± 0.17</td><td>82.84 ± 0.68</td><td>78.65 ± 0.19</td><td>51.47 ± 0.53</td><td>78.00 ± 1.12</td><td>54.66 ± 0.55</td></tr><tr><td></td><td>84.25 ± 0.16</td><td>32.60 ± 0.17</td><td>54.41 ± 0.10</td><td>50.02 ± 0.01</td><td>81.72 ± 0.59</td><td>77.00 ± 0.13</td><td>51.32 ± 0.64</td><td>76.57 ± 1.13</td><td>54.13 ± 0.51</td></tr><tr><td></td><td>87.37 ± 0.20</td><td>32.59 ± 0.29</td><td>50.06 ± 0.21</td><td>69.76 ± 0.26</td><td>81.63 ± 1.17</td><td>76.47 ± 0.09</td><td>52.41 ± 1.49</td><td>76.15 ± 0.84</td><td>52.62 ± 1.34</td></tr><tr><td>5</td><td>84.61 ± 0.24</td><td>31.14 ± 0.48</td><td>44.76 ± 0.38</td><td>74.82 ± 0.11</td><td>80.16 ± 0.19</td><td>73.66 ± 0.16</td><td>52.95 ± 1.77</td><td>72.90 ± 0.21</td><td>51.26 ± 1.14</td></tr><tr><td>6</td><td>82.56 ± 0.25</td><td>30.31 ± 0.40</td><td>39.30 ± 0.40</td><td>78.80 ±0.38</td><td>81.88 ± 0.47</td><td>75.30 ± 0.07</td><td>56.21 ± 1.26</td><td>74.37 ± 0.16</td><td>51.44 ± 1.04</td></tr><tr><td></td><td>70.85 ± 0.13</td><td>26.65 ± 0.72</td><td>40.70 ± 0.13</td><td>78.98 ± 0.32</td><td>85.11 ± 0.31</td><td>72.03 ± 0.46</td><td>58.15 ± 0.46</td><td>68.71 ± 0.91</td><td>55.39 ± 0.27</td></tr><tr><td>8</td><td>66.23 ± 1.33</td><td>23.46 ± 0.44</td><td>25.19 ± 1.02</td><td>77.42 ± 0.27</td><td>80.35 ± 0.45</td><td>67.55 ± 0.99</td><td>54.94 ± 2.04</td><td>63.69 ± 2.32</td><td>50.58 ± 0.83</td></tr><tr><td>9</td><td>71.17 ± 0.29</td><td>31.21 ± 0.31</td><td>58.42 ± 0.29</td><td>85.55 ± 0.44</td><td>86.77 ± 0.19</td><td>80.30 ± 0.08</td><td>64.36 ± 1.20</td><td>81.68 ± 0.45</td><td>66.90 ± 0.49</td></tr><tr><td>10</td><td>73.19 ± 0.50</td><td>27.74 ± 0.53</td><td>41.01 ± 0.22</td><td>83.56 ± 0.96</td><td>86.13 ± 0.35</td><td>83.04 ± 0.04</td><td>62.01 ± 0.59</td><td>79.73 ± 0.21</td><td>62.60 ± 1.04</td></tr><tr><td>11</td><td>71.37 ± 0.42</td><td>30.22 ± 0.28</td><td>48.58 ± 0.35</td><td>84.40 ± 0.44</td><td>87.28 ± 0.59</td><td>82.34 ± 0.15</td><td>61.10 ± 0.14</td><td>80.00 ± 0.40</td><td>64.44 ± 0.38</td></tr><tr><td>12</td><td>71.66 ± 0.12</td><td>33.43 ± 0.18</td><td>64.38 ± 0.20</td><td>87.38 ± 0.02</td><td>88.41 ± 0.09</td><td>84.46 ± 0.25</td><td>63.01 ± 0.05</td><td>81.80 ± 0.27</td><td>65.72 ± 0.16</td></tr><tr><td></td><td>87.75 ± 0.10</td><td>31.60 ± 0.21</td><td>50.38 ± 0.23</td><td>50.00 ± 0.00</td><td>80.40 ± 0.18</td><td>76.47 ± 0.20</td><td>50.53 ± 0.14</td><td>73.48 ± 0.15</td><td></td></tr><tr><td rowspan="14">TReservoir</td><td>2</td><td>81.28 ± 0.23</td><td>34.20 ± 0.41</td><td></td><td>60.64 ± 0.65</td><td></td><td></td><td></td><td></td><td>53.55 ± 0.70</td></tr><tr><td></td><td></td><td></td><td>61.41 ± 0.42</td><td></td><td>81.50 ± 0.77</td><td>76.33 ± 0.08</td><td>50.73 ± 0.34</td><td>74.28 ± 0.67</td><td>56.82 ± 0.10</td></tr><tr><td>3</td><td>89.28 ± 0.09</td><td>36.42 ± 0.11</td><td>67.36 ± 0.45</td><td>75.64 ± 0.52</td><td>85.42 ± 0.18</td><td>80.53 ± 0.02</td><td>52.50 ± 1.80</td><td>78.47 ± 1.81</td><td>57.16 ± 0.27</td></tr><tr><td></td><td>74.31 ± 0.32</td><td>32.42 ± 0.83</td><td>55.19 ± 0.33</td><td>73.41 ± 0.00</td><td>79.56 ± 0.00</td><td>75.15 ± 0.08</td><td>53.68 ± 0.66</td><td>75.02 ± 0.19</td><td>56.89 ± 0.08</td></tr><tr><td></td><td>88.03 ± 0.22 74.55 ± 0.37</td><td>38.34 ± 0.64 33.13 ± 0.29</td><td>68.65 ± 0.29</td><td>82.25 ± 0.12</td><td>86.80 ± 0.02</td><td>82.27 ± 0.33</td><td>57.95 ± 0.24</td><td>80.82 ± 0.91</td><td>58.05 ± 0.10</td></tr><tr><td></td><td></td><td></td><td>52.70 ± 0.81</td><td>79.21 ± 0.13</td><td>85.70 ± 0.36</td><td>77.43 ± 0.03</td><td>57.26 ± 0.19</td><td>75.38 ± 0.66</td><td>51.95 ± 1.30</td></tr><tr><td></td><td>85.82 ± 0.37 71.69 ± 0.71</td><td>37.63 ± 0.13 30.32 ± 0.01</td><td>70.43 ± 0.05 48.44 ± 0.30</td><td>84.12 ± 0.35 79.12 ± 0.12</td><td>86.88 ± 0.07</td><td>82.86 ± 0.30</td><td>61.17 ± 0.21</td><td>80.79 ± 0.17</td><td>61.83 ± 0.95</td></tr><tr><td>8 9</td><td>85.86 ± 0.12</td><td>37.89 ± 0.03</td><td>69.53 ± 0.37</td><td>85.55 ± 0.12</td><td>84.75 ± 0.09 87.98 ± 0.22</td><td>79.23 ± 0.11 84.13 ± 0.01</td><td>59.53 ± 0.16</td><td>76.80 ± 0.41</td><td>57.34 ± 0.14</td></tr><tr><td></td><td>69.22 ± 0.23</td><td>25.58 ± 0.35</td><td>29.20 ± 0.58</td><td>78.57 ± 0.09</td><td></td><td></td><td>63.06± 0.01</td><td>82.55 ± 0.31</td><td>66.07 ± 0.05</td></tr><tr><td>10</td><td></td><td></td><td>47.56 ± 0.02</td><td></td><td>85.02 ± 0.03</td><td>75.68 ± 0.16</td><td>57.55 ± 1.57</td><td>74.70 ± 0.02</td><td>55.02 ± 0.64</td></tr><tr><td>11</td><td>65.70 ± 0.05</td><td>30.57 ± 0.03</td><td></td><td>81.20 ± 0.00</td><td>86.78 ± 0.02</td><td>83.73 ± 0.05</td><td>60.38 ± 0.17</td><td>80.59 ± 0.15</td><td>62.50 ± 0.11</td></tr><tr><td>12</td><td>70.61 ± 0.18</td><td>34.45± 0.20</td><td>64.19 ± 0.10</td><td>84.53 ± 0.03</td><td>87.48 ± 0.16</td><td>84.86 ± 0.14</td><td>62.75 ± 0.14</td><td>82.08 ± 0.03</td><td>64.73 ± 0.06</td></tr></table>
|
| 415 |
+
|
| 416 |
+
Table 6: RoBERTa Probing Results. The line in bold text are the the frozen layers in the T Reservoir.
|
md/train/5GihaaZKL4/5GihaaZKL4.md
ADDED
|
@@ -0,0 +1,394 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Pairwise Adjusted Mutual Information
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
1 A well-known metric for quantifying the similarity between two clusterings is
|
| 11 |
+
2 the adjusted mutual information. Compared to mutual information, a corrective
|
| 12 |
+
3 term based on random permutations of the labels is introduced, preventing two
|
| 13 |
+
4 clusterings being similar by chance. Unfortunately, this adjustment makes the
|
| 14 |
+
5 metric computationally expensive. In this paper, we propose a novel adjustment
|
| 15 |
+
6 based on pairwise label permutations instead of full label permutations. Specifically,
|
| 16 |
+
7 we consider permutations where only two samples, selected uniformly at random,
|
| 17 |
+
8 exchange their labels. We show that the corresponding adjusted metric, which
|
| 18 |
+
9 can be expressed explicitly, behaves similarly to the standard adjusted mutual
|
| 19 |
+
10 information for assessing the quality of a clustering, while having a much lower
|
| 20 |
+
11 time complexity. Both metrics are compared in terms of quality and performance
|
| 21 |
+
12 on experiments based on synthetic and real data.
|
| 22 |
+
|
| 23 |
+
# 13 1 Introduction
|
| 24 |
+
|
| 25 |
+
14 A well-known metric for quantifying the similarity between two clusterings of the same data is
|
| 26 |
+
15 the adjusted mutual information [Nguyen et al., 2009; Vinh et al., 2010]. Compared to mutual
|
| 27 |
+
16 information, this metric is adjusted against chance, meaning that the similarity cannot be due to
|
| 28 |
+
17 randomness but only to the structure of the dataset, appearing in both clusterings. This is the reason
|
| 29 |
+
18 why this metric is widely used in unsupervised learning, see [Zhang et al., 2013; Thirion et al., 2014;
|
| 30 |
+
19 Taha and Hanbury, 2015; Yang et al., 2016; Wang et al., 2017] for various applications.
|
| 31 |
+
20 The standard way of adjusting mutual information against chance is through random label permuta
|
| 32 |
+
21 tions of one of the clusterings [Vinh et al., 2010]. Unfortunately, this adjustment makes the metric
|
| 33 |
+
22 computationally expensive. Specifically, the time complexity of the metric is in $O ( \operatorname* { m a x } ( k , l ) n )$ ,
|
| 34 |
+
23 where $k , l$ are the numbers of clusters in each clustering and $n$ is the number of samples [Romano et
|
| 35 |
+
24 al., 2014]. As a comparison, the time complexity of mutual information is equal to $O ( k l )$ given the
|
| 36 |
+
25 contingency matrix of the clusterings, i.e., the matrix counting the number of samples in each pair of
|
| 37 |
+
26 clusters, one per clustering. The additional computational effort required by adjustment is significant
|
| 38 |
+
27 as the number of samples $n$ is typically much larger than the numbers of clusters $k , l$ .
|
| 39 |
+
28 In this paper, we propose a novel adjustment based on pairwise permutations. That is, we consider
|
| 40 |
+
29 permutations where only two samples, selected uniformly at random, exchange their labels. We
|
| 41 |
+
30 show that the corresponding adjusted metric, we refer to as pairwise adjusted mutual information,
|
| 42 |
+
31 is as efficient as adjusted mutual information for assessing the quality of a clustering, with a much
|
| 43 |
+
32 lower time complexity. In particular, the time complexity is the same as that of mutual information.
|
| 44 |
+
33 The gain in complexity is significant, as the computation time is now independent of the number of
|
| 45 |
+
34 samples $n$ , given the contingency matrix.
|
| 46 |
+
35 The rest of the paper is organized as follows. We first provide the definition and key properties of
|
| 47 |
+
36 adjusted mutual information in the general setting of information theory. We then introduce mutual
|
| 48 |
+
37 information with pairwise adjustement and explain why the exact same properties are satisfied by
|
| 49 |
+
38 this new notion of adjusted mutual information. The application of both notions of adjustment to
|
| 50 |
+
39 clustering, including the explicit expressions of the corresponding metrics, is presented in section 4.
|
| 51 |
+
40 Experiments on both synthetic and real data are presented in section 5. Section 6 concludes the paper.
|
| 52 |
+
|
| 53 |
+
# 41 2 Adjusted mutual information
|
| 54 |
+
|
| 55 |
+
42 Let $P$ be the uniform probability measure on $\Omega = \{ 1 , \dots , n \}$ , for some positive integer $n$ . Let $X , Y$
|
| 56 |
+
43 be random variables on the probability space $( \Omega , P )$ . Without any loss of generality, we assume that
|
| 57 |
+
44 $X$ and $Y$ are mapping from $\Omega$ to sets consisting of consecutive integers, starting from 1. Denoting by
|
| 58 |
+
45 $H$ the entropy, the mutual information between $X$ and $Y$ is defined by [Cover and Thomas, 1991]:
|
| 59 |
+
|
| 60 |
+
$$
|
| 61 |
+
I ( X , Y ) = H ( X ) + H ( Y ) - H ( X , Y ) .
|
| 62 |
+
$$
|
| 63 |
+
|
| 64 |
+
This is the information shared by $X$ and $Y$ , which is equal to 0 if $X$ and $Y$ are independent. A distance between $X$ and $Y$ can then be defined by:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
d ( X , Y ) = H ( X , Y ) - I ( X , Y ) = H ( X | Y ) + H ( Y | X ) .
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
46 This distance, known as the variation of information, is a metric in the quotient space of random
|
| 71 |
+
47 variables under the equivalence relation $X \sim Y$ if and only if there is some bijection $\varphi$ such that
|
| 72 |
+
48 $X = \varphi ( Y )$ [Meila, 2003]. ˘
|
| 73 |
+
49 Adjusted mutual information. The adjusted mutual information between $X$ and $Y$ , corresponding
|
| 74 |
+
50 to the mutual information between $X$ and $Y$ adjusted against chance, is defined by:
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\Delta I ( X , Y ) = I ( X , Y ) - \operatorname { E } ( I ( X , Y _ { \sigma } ) ) ,
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
51 where $Y _ { \sigma }$ is the random variable $Y \circ \sigma$ , for any permutation $\sigma$ of $\{ 1 , \ldots , n \}$ , and the expectation is
|
| 81 |
+
52 taken over all permutations $\sigma$ , chosen uniformly at random.
|
| 82 |
+
53 Remark 1 (Normalization). It is frequent to also normalize adjusted mutual information, so as to
|
| 83 |
+
54 get a score between $\boldsymbol { \theta }$ and 1 [Vinh et al., 2010; Romano et al., 2014]. In this paper, we only focus on
|
| 84 |
+
55 the adjustment step. Note that normalization can be equally applied to both considered notions of
|
| 85 |
+
56 adjustment and thus be studied separately.
|
| 86 |
+
|
| 87 |
+
57 We have the equivalent definition:
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
\begin{array} { l } { \displaystyle \Delta I ( X , Y ) = \mathrm { E } ( H ( X , Y _ { \sigma } ) ) - H ( X , Y ) , } \\ { \displaystyle = \frac { 1 } { 2 } ( \mathrm { E } ( d ( X , Y _ { \sigma } ) ) - d ( X , Y ) ) . } \end{array}
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
58 This equivalence follows from Proposition 1 and the fact that the definition is symmetric in $X$ and $Y$
|
| 94 |
+
59 All proofs are available in the supplementary material.
|
| 95 |
+
|
| 96 |
+
60 Proposition 1. We have for any random variables $X$ and $Y$ :
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\begin{array} { r l } & { H ( X ) = \operatorname { E } ( H ( X _ { \sigma } ) ) , } \\ & { \operatorname { E } ( H ( X , Y _ { \sigma } ) ) = \operatorname { E } ( H ( X _ { \sigma } , Y ) ) , } \\ & { \operatorname { E } ( I ( X , Y _ { \sigma } ) ) = \operatorname { E } ( I ( X _ { \sigma } , Y ) ) . } \end{array}
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
61 In view of (3), we expect $\Delta I ( X , Y )$ to be positive if $X$ and $Y$ share information, as $X$ is expected to
|
| 103 |
+
62 be closer to $Y$ (for the distance $d$ ) than to $Y _ { \sigma }$ , a randomized version of $Y$ . There are specific cases
|
| 104 |
+
63 where $\Delta I ( X , Y ) = 0$ , as stated in Proposition 2; these cases will be interpreted in terms of clustering
|
| 105 |
+
64 in section 4.
|
| 106 |
+
65 Proposition 2. We have $\Delta I ( X , Y ) = 0$ whenever $Y$ (or $X$ , by symmetry) is constant or equal to
|
| 107 |
+
66 some permutation of $\{ 1 , \ldots , n \}$ .
|
| 108 |
+
|
| 109 |
+
Adjusted entropy. Observing that $H ( X ) = I ( X , X )$ , we define similarly the adjusted entropy of $X$ by:
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\Delta H ( X ) = \Delta I ( X , X ) = H ( X ) - \operatorname { E } ( I ( X , X _ { \sigma } ) ) .
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
67 By (1), we get:
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
\Delta H ( X ) = \operatorname { E } ( H ( X , X _ { \sigma } ) ) - H ( X ) = { \frac { 1 } { 2 } } \operatorname { E } ( d ( X , X _ { \sigma } ) ) .
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
68 Since $d$ is a metric, this shows that the adjusted entropy of $X$ is non-negative.
|
| 122 |
+
|
| 123 |
+
69 Proposition 3. We have $\Delta H ( X ) = 0$ if and only if X is constant or equal to some permutation of
|
| 124 |
+
70 $\{ 1 , \ldots , n \}$ .
|
| 125 |
+
71 Proposition 3 characterizes random variables with zero adjusted entropy. Again, this result will be
|
| 126 |
+
2 interpreted in terms of clustering in section 4.
|
| 127 |
+
|
| 128 |
+
# 73 3 Pairwise adjustment
|
| 129 |
+
|
| 130 |
+
74 In this section, we introduce pairwise adjusted mutual information. The definition is the same as
|
| 131 |
+
75 adjusted mutual information, except that the permutation $\sigma$ is now restricted to the set of pairwise
|
| 132 |
+
76 permutations. Specifically, we consider permutations $\sigma$ for which there exists $i , j \in \{ 1 , \ldots , n \}$
|
| 133 |
+
77 such that $\sigma ( i ) \stackrel { \textstyle - } { = } j$ and $\overset { \cdot } { \boldsymbol { \sigma } ( j ) } = i$ , whereas $\sigma ( t ) = t$ for all $t \neq i , j$ . We consider the set of such
|
| 134 |
+
78 permutations $\sigma$ where the samples $i , j$ are drawn uniformly at random in the set $\{ 1 , \ldots , n \}$ . We
|
| 135 |
+
79 denote by $\sigma _ { \mathrm { p } }$ such a random permutation. Observe that $\sigma _ { \mathrm { p } }$ is the identity with probability $1 / n$ (the
|
| 136 |
+
80 probability that $i = j$ ).
|
| 137 |
+
|
| 138 |
+
Pairwise adjusted mutual information. We define the pairwise adjusted mutual information as:
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
\Delta _ { \mathrm { p } } I ( X , Y ) = I ( X , Y ) - \mathrm { E } ( I ( X , Y _ { \sigma _ { \mathrm { p } } } ) ) .
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
81 This is exactly the same definition as the adjusted mutual information, except for the considered
|
| 145 |
+
82 permutations $\sigma _ { \mathrm { p } }$ . It can be readily verified that the same properties apply, with the exact same proofs,
|
| 146 |
+
83 a key property being that the random permutations $\sigma _ { \mathrm { p } }$ and $\sigma _ { \mathrm { p } } ^ { \mathrm { ~ - 1 ~ } }$ have the same distributions. In
|
| 147 |
+
84 particular, we have the analogue of (3):
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
\begin{array} { l } { { \Delta _ { \mathrm { p } } I ( X , Y ) = \mathrm { E } ( H ( X , Y _ { \sigma _ { \mathrm { p } } } ) ) - H ( X , Y ) , } } \\ { { \ ~ = { \frac { 1 } { 2 } } ( \mathrm { E } ( d ( X , Y _ { \sigma _ { \mathrm { p } } } ) ) - d ( X , Y ) ) . } } \end{array}
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
85 Moreover, $\Delta _ { \mathrm { p } } I ( X , Y ) = 0$ whenever $X$ or $Y$ is constant or equal to some permutation of $\{ 1 , \ldots , n \}$
|
| 154 |
+
|
| 155 |
+
Pairwise adjusted entropy. We also define the pairwise adjusted entropy as:
|
| 156 |
+
|
| 157 |
+
$$
|
| 158 |
+
\Delta _ { \mathrm { p } } H ( X ) = \Delta _ { \mathrm { p } } I ( X , X ) = H ( X ) - \mathrm { E } ( I ( X , X _ { \sigma _ { \mathrm { p } } } ) ) .
|
| 159 |
+
$$
|
| 160 |
+
|
| 161 |
+
86 We have $\Delta _ { \mathrm { p } } H ( X ) \geq 0$ , with equality if and only if $X$ is constant or equal to some permutation of
|
| 162 |
+
87 $\{ 1 , \ldots , n \}$ .
|
| 163 |
+
|
| 164 |
+
# 88 4 Application to clustering
|
| 165 |
+
|
| 166 |
+
89 Let $A = \{ A _ { 1 } , \ldots , A _ { k } \}$ and $B = \{ B _ { 1 } , \ldots , B _ { l } \}$ be two partitions of some finite set $\{ 1 , \ldots , n \}$ into $k$
|
| 167 |
+
90 and $l$ clusters, respectively. Let $\Omega = \{ 1 , \dots , n \}$ and $\mathrm { P }$ be the uniform probability measure over $\Omega$ .
|
| 168 |
+
91 Consider the random variables $X$ and $Y$ defined on $( \Omega , \mathrm { P } )$ by $X ^ { - 1 } ( i ) \doteq A _ { i }$ for all $i = 1 , \ldots , k$ and
|
| 169 |
+
92 $Y ^ { - 1 } ( j ) = B _ { j }$ for all $j = 1 , \dots , l .$ . Note that $X ( \omega )$ and $Y ( \omega )$ can be interpreted as the labels $i$ and $j$
|
| 170 |
+
93 of sample $\omega$ in clusterings $A$ and $B$ , for each $\omega \in \{ 1 , \ldots , n \}$ .
|
| 171 |
+
94 We denote by $a _ { i } ~ = ~ \left| A _ { i } \right|$ the size of cluster $A _ { i }$ , by $b _ { j } ~ = ~ | B _ { j } |$ the size of cluster $B _ { j }$ , and by
|
| 172 |
+
95 $n _ { i j } = | A _ { i } \cap B _ { j } |$ the number of samples both in cluster $A _ { i }$ and cluster $B _ { j }$ , for all $i = 1 , \ldots , k$ and
|
| 173 |
+
96 $j = 1 , \dots , l$ . The matrix $( n _ { i j } ) _ { 1 \leq i \leq k , 1 \leq j \leq l }$ is known as the contingency matrix. Note that $a _ { i }$ and $b _ { j }$
|
| 174 |
+
97 are the sums of row $i$ and column $j$ of the contingency matrix, respectively.
|
| 175 |
+
98 Adjusted mutual information. A well-known metric for assessing the similarity $s ( A , B )$ between
|
| 176 |
+
99 clusterings $A$ and $B$ is the adjusted mutual information 1 $\Delta I ( X , { \bar { Y } } )$ between the corresponding
|
| 177 |
+
100 random variables $X$ and $Y$ . In words, this is the common information shared by clusterings $A$ and $B$
|
| 178 |
+
101 not due to randomness.
|
| 179 |
+
102 By Proposition 2, we have $s ( A , B ) = 0$ whenever clustering $A$ (or $B$ , by symmetry) is trivial, that is,
|
| 180 |
+
103 it consists of a single cluster or of $n$ clusters (one per sample). This is a key property, showing the
|
| 181 |
+
104 interest of the adjustment.
|
| 182 |
+
|
| 183 |
+
105 It is known that [Vinh et al., 2010]:
|
| 184 |
+
|
| 185 |
+
$$
|
| 186 |
+
\begin{array} { l } { { \displaystyle s ( A , B ) = - \sum _ { i = 1 } ^ { k } \sum _ { j = 1 } ^ { l } \frac { n _ { i j } } { n } \log \frac { n _ { i j } } { n } } } \\ { { \displaystyle + \sum _ { i = 1 } ^ { k } \sum _ { j = 1 } ^ { l } \sum _ { c = ( a _ { i } + b _ { j } - n ) ^ { + } } ^ { \operatorname* { m i n } ( a _ { i } , b _ { j } ) } \frac { a _ { i } ! b _ { j } ! ( n - a _ { i } ) ! ( n - b _ { j } ) ! } { n ! c ! ( a _ { i } - c ) ! ( b _ { j } - c ) ! ( n - a _ { i } - b _ { j } + c ) ! } \frac { c } { n } \log \frac { c } { n } } , } \end{array}
|
| 187 |
+
$$
|
| 188 |
+
|
| 189 |
+
with the notation 106 $( \cdot ) ^ { + } = \operatorname* { m a x } ( \cdot , 0 )$ . The time complexity of this formula, which is dominated by the 107 second term, is in $O ( \operatorname* { m a x } ( k , l ) n )$ [Romano et al., 2014]. In particular, it is linear in the number of 108 samples $n$ .
|
| 190 |
+
|
| 191 |
+
109 Interestingly, we can similarly assess the quantity of information $q ( A )$ contained in clustering
|
| 192 |
+
110 $A$ through the adjusted entropy $\Delta H ( X )$ of the corresponding random variable $X$ . This is the
|
| 193 |
+
111 information contained in $A$ not due to randomness. We have $q ( A ) \geq 0$ and, by Proposition 3,
|
| 194 |
+
112 $q ( A ) = 0$ if and only if clustering $A$ is trivial, that is, it consists of a single cluster or of $n$ clusters
|
| 195 |
+
113 (one per sample).
|
| 196 |
+
|
| 197 |
+
114 Since $q ( A ) = s ( A , A )$ , it follows from (6) that:
|
| 198 |
+
|
| 199 |
+
$$
|
| 200 |
+
\mathfrak { r } ( A ) = - \sum _ { i = 1 } ^ { k } \frac { a _ { i } } { n } \log \frac { a _ { i } } { n } + \sum _ { i , j = 1 } ^ { K } \sum _ { c = ( a _ { i } + a _ { j } - n ) ^ { + } } ^ { \operatorname* { m i n } ( a _ { i } , a _ { j } ) } + \frac { a _ { i } ! a _ { j } ! ( n - a _ { i } ) ! ( n - a _ { j } ) ! } { n ! c ! ( a _ { i } - c ) ! ( a _ { j } - c ) ! ( n - a _ { i } - a _ { j } + k ) ! } \frac { c } { n } \log \frac { c } { n } .
|
| 201 |
+
$$
|
| 202 |
+
|
| 203 |
+
115 The time complexity of this formula, also dominated by the second term, is in $O ( k n )$ . Again, this
|
| 204 |
+
116 complexity is linear in the number of samples $n$ .
|
| 205 |
+
117 Pairwise adjusted mutual information. The main contribution of the paper is the following new
|
| 206 |
+
118 measure of similarity $s _ { \mathrm { p } } ( A , B )$ between clusterings $A$ and $B$ , based on the pairwise adjusted mutual
|
| 207 |
+
119 information $\Delta _ { \mathrm { p } } I ( X , Y )$ between the corresponding random variables $X$ and $Y$ . We have an explicit
|
| 208 |
+
120 expression for this similarity:
|
| 209 |
+
|
| 210 |
+
121 Theorem 1. We have for any clusterings $A , B$
|
| 211 |
+
|
| 212 |
+
$$
|
| 213 |
+
\begin{array} { c } { { s _ { \mathrm { p } } ( A , B ) = 2 \displaystyle \sum _ { i = 1 } ^ { k } \displaystyle \sum _ { j = 1 } ^ { l } \displaystyle \frac { n _ { i j } ( n - a _ { i } - b _ { j } + n _ { i j } ) } { n ^ { 2 } } \left( \displaystyle \frac { n _ { i j } } { n } \log \displaystyle \frac { n _ { i j } } { n } - \displaystyle \frac { n _ { i j } - 1 } { n } \log \displaystyle \frac { n _ { i j } - 1 } { n } \right) } } \\ { { + 2 \displaystyle \sum _ { i = 1 } ^ { k } \displaystyle \sum _ { j = 1 } ^ { l } \displaystyle \frac { ( a _ { i } - n _ { i j } ) ( b _ { j } - n _ { i j } ) } { n ^ { 2 } } \left( \displaystyle \frac { n _ { i j } } { n } \log \displaystyle \frac { n _ { i j } } { n } - \displaystyle \frac { n _ { i j } + 1 } { n } \log \displaystyle \frac { n _ { i j } + 1 } { n } \right) . } } \end{array}
|
| 214 |
+
$$
|
| 215 |
+
|
| 216 |
+
122 The time complexity of this formula is in $O ( k l )$ , like mutual information. It is independent of the
|
| 217 |
+
123 number of samples $n$ , given the contingency matrix. Corollary 1 shows that the time complexity
|
| 218 |
+
124 reduces to $O ( m )$ , where $m$ is the number of non-zero entries of the contingency matrix, provided the
|
| 219 |
+
125 latter is stored in sparse format.
|
| 220 |
+
|
| 221 |
+
126 Corollary 1. We have for any clusterings $A , B$ :
|
| 222 |
+
|
| 223 |
+
$$
|
| 224 |
+
{ \begin{array} { l } { { \displaystyle { \boldsymbol { s } } _ { \mathrm { p } } ( A , B ) = 2 \sum _ { i , j : n _ { i j } > 0 } { \frac { n _ { i j } ( n - a _ { i } - b _ { j } + n _ { i j } ) } { n ^ { 2 } } } \left( { \frac { n _ { i j } } { n } } \log { \frac { n _ { i j } } { n } } - { \frac { n _ { i j } - 1 } { n } } \log { \frac { n _ { i j } - 1 } { n } } \right) } } \\ { \displaystyle \qquad + 2 \sum _ { i , j : n _ { i j } > 0 } { \frac { ( a _ { i } - n _ { i j } ) ( b _ { j } - n _ { i j } ) } { n ^ { 2 } } } \left( { \frac { n _ { i j } } { n } } \log { \frac { n _ { i j } } { n } } - { \frac { n _ { i j } + 1 } { n } } \log { \frac { n _ { i j } + 1 } { n } } + { \frac { 1 } { n } } \log { \frac { 1 } { n } } \right) } \\ { \displaystyle \qquad - 2 \left( n ^ { 2 } - \sum _ { i = 1 } ^ { k } a _ { i } ^ { 2 } - \sum _ { j = 1 } ^ { l } b _ { i } ^ { 2 } + \sum _ { i , j : n _ { i j } > 0 } n _ { i j } ^ { 2 } \right) { \frac { 1 } { n } } \log { \frac { 1 } { n } } . } \end{array} }
|
| 225 |
+
$$
|
| 226 |
+
|
| 227 |
+
127 Similarly, we can define the quantity of information $q _ { \mathrm { p } } ( A )$ in clustering $A$ through the pairwise
|
| 228 |
+
128 adjusted entropy $\Delta _ { \mathrm { p } } H ( X )$ of the corresponding random variable $X$ . Again, $q _ { \mathrm { p } } ( A ) \geq 0$ , with
|
| 229 |
+
129 $q _ { \mathrm { p } } \overset { \cdot } { (} A ) = 0$ if and only if clustering $A$ is trivial.
|
| 230 |
+
|
| 231 |
+
$$
|
| 232 |
+
q _ { \mathrm { p } } ( A ) = 2 \sum _ { i = 1 } ^ { k } { \frac { a _ { i } ( n - a _ { i } ) } { n ^ { 2 } } } \left( { \frac { a _ { i } } { n } } \log { \frac { a _ { i } } { n } } - { \frac { a _ { i } - 1 } { n } } \log { \frac { a _ { i } - 1 } { n } } - { \frac { 1 } { n } } \log { \frac { 1 } { n } } \right) .
|
| 233 |
+
$$
|
| 234 |
+
|
| 235 |
+
131 Note that the time complexity of this formula in $O ( k )$ . It only depends on the number of clusters $k$ ,
|
| 236 |
+
132 and not on the number of samples $n$ .
|
| 237 |
+
|
| 238 |
+
# 133 5 Experiments
|
| 239 |
+
|
| 240 |
+
134 In this section, we compare both notions of adjusted mutual information through experiments
|
| 241 |
+
135 involving synthetic and real data. The experiments are run on a computer equipped with an AMD
|
| 242 |
+
136 Ryzen Threadripper 1950X 16-Core Processor and 32 GB of RAM, with a a Debian $1 0 0 \mathrm { S }$ . All codes
|
| 243 |
+
137 and datasets used in the experiments are available in the supplementary material.
|
| 244 |
+
138 Synthetic data. We start with the simple case of $n = 1 0 0$ samples with clusters of even sizes,
|
| 245 |
+
139 consisting of consecutive samples. Specifically, we consider the set of clusterings $A ^ { ( s ) }$ , consisting of
|
| 246 |
+
140 clusters of size $s$ (except possibly the last one), for $s = 1 , 2 , \ldots , 1 0 0$ . In particular, both $A ^ { ( 1 ) }$ and
|
| 247 |
+
141 $A ^ { ( 1 0 0 ) }$ are trivial clusterings while $A ^ { ( 5 ) }$ consists of 20 clusters of size 5.
|
| 248 |
+
142 Figure 1 gives the similarity between clusterings $A ^ { ( 1 0 ) }$ and $A ^ { ( s ) }$ with respect to $s$ in terms of adjusted
|
| 249 |
+
143 mutual information, for both notions of adjustment, i.e., $s ( A ^ { ( 1 0 ) } , A ^ { ( s ) } )$ and $s _ { \mathrm { p } } ( A ^ { ( 1 0 ) } , A ^ { ( s ) } )$ . We
|
| 250 |
+
144 observe very close behaviors, suggesting that both notions of adjustment tend to capture the same
|
| 251 |
+
145 patterns in the clusterings. Note that the maximum similarity is attained for $s = 1 0$ in both cases, as
|
| 252 |
+
146 expected. The similarity is equal to 0 for $s \in \{ 1 , 1 0 0 \}$ for both cases, in agreement with Proposition
|
| 253 |
+
147 2. We also observe local peaks at $s = 2 0 , 3 0 , \ldots , 9 0$ , which can be interpreted by the fact that
|
| 254 |
+
148 clustering $A ^ { ( 1 0 ) }$ is a refinement of clustering $A ^ { ( s ) }$ for these values of $s$ ; similarly, the local peak at
|
| 255 |
+
149 $s = 5$ may be interpreted by the fact that clustering $A ^ { ( 5 ) }$ is a refinement of clustering $A ^ { ( 1 \bar { 0 } ) }$ . The
|
| 256 |
+
Spearman correlation between both metrics over all values of $s$ is equal to 0.99.
|
| 257 |
+
151 We now consider random clusterings. Specifically, we assign $n$ samples to $k$ clusters independently
|
| 258 |
+
152 at random, according to some probability distribution $p = ( p _ { 1 } , \dotsc , p _ { k } )$ , which is itself drawn at
|
| 259 |
+
153 random2. Consider three such random clusterings $A , B$ , $C$ (with the same parameters $n$ and $k$ , but
|
| 260 |
+
154 different probability distributions $p$ ). We would like to know whether $A$ is “closer" to $B$ or to $C$ . In
|
| 261 |
+
155 particular, we are interested in testing whether both notions of adjusted mutual information give the
|
| 262 |
+
156 same ordering in the sense that:
|
| 263 |
+
|
| 264 |
+

|
| 265 |
+
Figure 1: Comparison of metrics on synthetic data $\mathit { n } = 1 0 0 $ ).
|
| 266 |
+
|
| 267 |
+
$$
|
| 268 |
+
( s ( A , B ) - s ( A , C ) ) ( s _ { \mathrm { p } } ( A , B ) - s _ { \mathrm { p } } ( A , C ) ) \geq 0 .
|
| 269 |
+
$$
|
| 270 |
+
|
| 271 |
+
157 We compute the average precision score (fraction of triplets $A , B , C$ for which (7) is true) over 1 000
|
| 272 |
+
158 independent samples of $A , B , C$ , for different values of $n$ and $k$ . We repeat the experiment 100 times
|
| 273 |
+
159 to get the mean and standard deviation. The results are given in Table 1. We observe a very high
|
| 274 |
+
160 precision score, always higher than $9 3 \%$ , showing that both notions of adjusted mutual information
|
| 275 |
+
161 tend to give the same ordering of these random clusterings.
|
| 276 |
+
162 For the performance gain, we compare the computation times of both versions of adjusted mutual
|
| 277 |
+
163 information for the similarity between clusterings $A$ and $B$ , where $A$ consists of $k = 1 0$ clusters
|
| 278 |
+
164 of same size and $B$ is a random clustering, drawn as in the previous experiment. Both versions of
|
| 279 |
+
165 adjusted mutual information are coded in Python, with the standard version imported from scikit-learn.
|
| 280 |
+
166 Figure 2 shows the computation time when the number of samples $n$ grows from $1 0 ^ { 2 }$ to $1 0 ^ { 7 }$ . The
|
| 281 |
+
167 performance gain brought by pairwise adjustement is significant. In particular, the computation time
|
| 282 |
+
168 becomes independent of the number of samples.
|
| 283 |
+
|
| 284 |
+
<table><tr><td>n</td><td>k</td><td>Precision score</td></tr><tr><td>100 100</td><td>2 5</td><td>0.972 ± 0.004 0.952 ± 0.007</td></tr><tr><td>100</td><td>10</td><td>0.943 ± 0.006</td></tr><tr><td>100</td><td>20</td><td>0.955 ± 0.008</td></tr><tr><td>500</td><td>20</td><td>0.936 ± 0.007</td></tr><tr><td>1000 1000</td><td>20 50</td><td>0.933 ± 0.006</td></tr></table>
|
| 285 |
+
|
| 286 |
+

|
| 287 |
+
Table 1: Precision score (mean $\pm$ standard deviation)
|
| 288 |
+
Figure 2: Computation time with respect to $n$ (mean $\pm$ standard deviation).
|
| 289 |
+
|
| 290 |
+
Real data. We first consider the 79 datasets of the benchmark suite [Gagolewski,169 $2 0 2 0 ] ^ { 3 }$ . We apply 170 to each dataset each of the following clustering algorithms:
|
| 291 |
+
|
| 292 |
+
• $k$ -means
|
| 293 |
+
• Affinity propagation
|
| 294 |
+
• Mean shift
|
| 295 |
+
• Spectral clustering
|
| 296 |
+
• Ward
|
| 297 |
+
• Agglomerative clustering
|
| 298 |
+
• DBSCAN
|
| 299 |
+
• OPTICS
|
| 300 |
+
• Birch
|
| 301 |
+
• Gaussian Mixture
|
| 302 |
+
|
| 303 |
+
181 We use the scikit-learn4 implementation of these algorithms, with the corresponding default param
|
| 304 |
+
182 eters5. We get 10 clusterings per dataset. The quality of each clustering is assessed through the
|
| 305 |
+
183 similarity with the available ground-truth labels, using adjusted mutual information with either full
|
| 306 |
+
184 adjustment or pairwise adjustment. We then compute the Spearman correlation of the corresponding
|
| 307 |
+
185 similarities, a value of 1 meaning the exact same ordering of the 10 clusterings with full adjustment
|
| 308 |
+
186 and pairwise adjustment. The results are shown in Figure 3, together with the speed-up in computation
|
| 309 |
+
187 time due to pairwise adjustment. In both cases, the 79 datasets are ordered by the number of samples,
|
| 310 |
+
188 ranging from 105 to 105 600 [Gagolewski, 2020].
|
| 311 |
+
189 We first observe that the correlation is very high, suggesting again that both notions of adjusted mutual
|
| 312 |
+
190 information tend to provide the same results. For 65 datasets among 79, the Spearman correlation is
|
| 313 |
+
191 higher than $9 5 \%$ . As for the computation time, we observe a significant performance gain, by one
|
| 314 |
+
192 order of magnitude for the largest datasets.
|
| 315 |
+
193 We have conducted the same experiments with OpenML [Vanschoren et al., 2013]6. We selected all
|
| 316 |
+
194 datasets with at least 1,000 but no more than 50,000 samples, at most 100 features (all numerical), no
|
| 317 |
+
195 missing data and ground-truth labels forming clusters of at least 5 samples on average. The results
|
| 318 |
+
196 are shown in Figure for the resulting 34 datasets. Again, the datasets are ordered by the number of
|
| 319 |
+
197 samples, here ranging from 1,188 to 45,918. The conclusions are similar. In particular, the Spearman
|
| 320 |
+
198 correlation is higher than $9 5 \%$ for 30 datasets among 34, and the performance gain exceeds 25 for the
|
| 321 |
+
199 largest datasets.
|
| 322 |
+
|
| 323 |
+

|
| 324 |
+
Figure 3: Comparison of metrics on the Gagolewski benchmark.
|
| 325 |
+
|
| 326 |
+

|
| 327 |
+
Figure 4: Comparison of metrics on OpenML datasets.
|
| 328 |
+
|
| 329 |
+
We have proposed another way of adjusting mutual information against chance, through pairwise label permutations. The novel metric, whose explicit expression is given in Theorem 1, has a much lower complexity than the usual adjusted mutual information. Interestingly, both metrics can also be used to assess the quantity of information contained in a clustering, which the common property of being equal to 0 if and only if the clustering is trivial, as stated in Proposition 3; again, the pairwise adjusted entropy, given in Corollary 2, has a much lower complexity. Experiments on synthetic and real data show that pairwise adjusted mutual information tends to provide the same results as the usual adjusted mutual information for comparing clusterings, while involving much less computations.
|
| 330 |
+
|
| 331 |
+
For future work, we plan to extend this idea to other similarity metrics. While the practical interest is less obvious for the Adjusted Rand Index [Hubert and Arabie, 1985], due to the fact that the time complexity of this metric is already independent of the number of samples, it would be worth considering other versions of information theoretic measures, as those studied in [Romano et al., 2016].
|
| 332 |
+
|
| 333 |
+
# References
|
| 334 |
+
|
| 335 |
+
Thomas M Cover and Joy A Thomas. Elements of Information Theory. Wiley, 1991.
|
| 336 |
+
|
| 337 |
+
Marek Gagolewski. Benchmark suite for clustering algorithms – version 1, 2020.
|
| 338 |
+
|
| 339 |
+
Lawrence Hubert and Phipps Arabie. Comparing partitions. Journal of classification, 2(1):193–218, 1985.
|
| 340 |
+
|
| 341 |
+
Marina Meila. Comparing clusterings by the variation of information. In ˘ Learning theory and kernel machines, pages 173–187. Springer, 2003.
|
| 342 |
+
|
| 343 |
+
Xuan Vinh Nguyen, Julien Epps, and James Bailey. Information theoretic measures for clusterings comparison: is a correction for chance necessary? In ICML, 2009.
|
| 344 |
+
|
| 345 |
+
Simone Romano, James Bailey, Vinh Nguyen, and Karin Verspoor. Standardized mutual information for clustering comparisons: one step further in adjustment for chance. In International Conference on Machine Learning, pages 1143–1151, 2014.
|
| 346 |
+
|
| 347 |
+
Simone Romano, Nguyen Xuan Vinh, James Bailey, and Karin Verspoor. Adjusting for chance clustering comparison measures. The Journal of Machine Learning Research, 17(1):4635–4666, 2016.
|
| 348 |
+
|
| 349 |
+
Abdel Aziz Taha and Allan Hanbury. Metrics for evaluating 3d medical image segmentation: analysis, selection, and tool. BMC medical imaging, 15(1):29, 2015.
|
| 350 |
+
|
| 351 |
+
Bertrand Thirion, Gaël Varoquaux, Elvis Dohmatob, and Jean-Baptiste Poline. Which fmri clustering gives good brain parcellations? Frontiers in neuroscience, 8:167, 2014.
|
| 352 |
+
|
| 353 |
+
Joaquin Vanschoren, Jan N. van Rijn, Bernd Bischl, and Luis Torgo. Openml: Networked science in machine learning. SIGKDD Explorations, 15(2):49–60, 2013.
|
| 354 |
+
|
| 355 |
+
Nguyen Xuan Vinh, Julien Epps, and James Bailey. Information theoretic measures for clusterings comparison: Variants, properties, normalization and correction for chance. The Journal of Machine Learning Research, 11:2837–2854, 2010.
|
| 356 |
+
|
| 357 |
+
Bo Wang, Junjie Zhu, Emma Pierson, Daniele Ramazzotti, and Serafim Batzoglou. Visualization and analysis of single-cell rna-seq data by kernel-based similarity learning. Nature methods, 14(4):414–416, 2017.
|
| 358 |
+
|
| 359 |
+
Zhao Yang, René Algesheimer, and Claudio J Tessone. A comparative analysis of community detection algorithms on artificial networks. Scientific reports, 6:30750, 2016.
|
| 360 |
+
|
| 361 |
+
Jiajie Zhang, Paschalia Kapli, Pavlos Pavlidis, and Alexandros Stamatakis. A general species delimitation method with applications to phylogenetic placements. Bioinformatics, 29(22):2869– 2876, 2013.
|
| 362 |
+
|
| 363 |
+
1. For all authors...
|
| 364 |
+
|
| 365 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] A variant of adjusted mutual information.
|
| 366 |
+
(b) Did you describe the limitations of your work? [Yes] Pairwise adjustement only applied to mutual information in the present work, see Section 6.
|
| 367 |
+
(c) Did you discuss any potential negative societal impacts of your work? [N/A]
|
| 368 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 369 |
+
|
| 370 |
+
2. If you are including theoretical results...
|
| 371 |
+
|
| 372 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] No specific assumption is required. Theorem 1, Corollary 2 and 3 give explicit expressions using notations defined at the beginning of Section 4.
|
| 373 |
+
(b) Did you include complete proofs of all theoretical results? [Yes] See the supplementary material.
|
| 374 |
+
|
| 375 |
+
3. If you ran experiments...
|
| 376 |
+
|
| 377 |
+
(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 the Jupyter notebooks in the supplementary material.
|
| 378 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [N/A] This is a metric for unsupervised learning. No data split required, no hyperparameter.
|
| 379 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] See Table 1 and Figure 2 (not applicable to other experiments).
|
| 380 |
+
(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 the running times provided in the Figures; the resources used are detailed at the beginning of section 5.
|
| 381 |
+
|
| 382 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 383 |
+
|
| 384 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] See the references for the datasets.
|
| 385 |
+
(b) Did you mention the license of the assets? [N/A]
|
| 386 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
|
| 387 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 388 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 389 |
+
|
| 390 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 391 |
+
|
| 392 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 393 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 394 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/5KWmB6JePx/5KWmB6JePx.md
ADDED
|
@@ -0,0 +1,357 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# End-to-End Training of Multi-Document Reader and Retriever for Open-Domain Question Answering
|
| 2 |
+
|
| 3 |
+
Devendra Singh Sachan1,2, Siva Reddy1,2, William Hamilton1,2, Chris Dyer3, Dani Yogatama3
|
| 4 |
+
|
| 5 |
+
1Mila - Quebec AI Institute 2School of Computer Science, McGill University 3DeepMind sachande@mila.quebec, {siva, wlh}@cs.mcgill.ca {cdyer, dyogatama}@deepmind.com
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
We present an end-to-end differentiable training method for retrieval-augmented open-domain question answering systems that combine information from multiple retrieved documents when generating answers. We model retrieval decisions as latent variables over sets of relevant documents. Since marginalizing over sets of retrieved documents is computationally hard, we approximate this using an expectation-maximization algorithm. We iteratively estimate the value of our latent variable (the set of relevant documents for a given question) and then use this estimate to update the retriever and reader parameters. We hypothesize that such end-to-end training allows training signals to flow to the reader and then to the retriever better than stage-wise training. This results in a retriever that is able to select more relevant documents for a question and a reader that is trained on more accurate documents to generate an answer. Experiments on three benchmark datasets demonstrate that our proposed method outperforms all existing approaches of comparable size by 2-3 absolute exact match points, achieving new state-of-theart results. Our results also demonstrate the feasibility of learning to retrieve to improve answer generation without explicit supervision of retrieval decisions.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Open-domain question answering (OpenQA) is a question answering task where the goal is to train a language model to produce an answer for a given question. In contrast to many question answering tasks, an OpenQA model is only provided with the question as its input without accompanying documents that contain the answer. One of the most promising approaches to OpenQA is based on augmenting the language model with an external knowledge source such as Wikipedia (often referred to as the evidence documents). In this approach, the model consists of two core components (Chen et al., 2017): (i) an information retrieval system to identify useful pieces of text from the knowledge source (the retriever); and (ii) a system to produce the answer given the retrieved documents and the question (the reader).
|
| 14 |
+
|
| 15 |
+
We can view such a model as a latent variable model, where the latent variables represent retrieved documents that are used to produce answers given questions (Lee et al., 2019). End-to-end (joint) training of this model is challenging since we need to learn both to generate an answer given retrieved documents and what to retrieve. Previous work considers two potential solutions (see Table 1 for a high-level summary). First, they adopt a stage-wise training, where the retriever is trained while freezing the reader and vice versa (Karpukhin et al., 2020, Izacard and Grave, 2021b,a). Another alternative is to constraint the reader to condition on each retrieved document individually1 (Guu et al., 2020)—sometimes with extra supervision for the latent variables in the form of the relevant document for a question (Lewis et al., 2020b).
|
| 16 |
+
|
| 17 |
+
Table 1: Bird’s-eye view of the recent OpenQA approaches. Multi-Doc reader indicates whether the reader architecture uses multiple documents or a single document. Retriever adaptation shows whether the retriever gets feedback from the reader to update its parameters. Disjoint denotes that first the retriever is trained and then the reader is trained. End-to-end denotes that the reader and retriever are trained jointly in one cycle. Multi-step indicates that the reader and retriever are trained iteratively in multiple cycles. Unsupervised retriever indicates whether the retriever is initialized using unsupervised approaches or using supervised data.
|
| 18 |
+
|
| 19 |
+
<table><tr><td></td><td colspan="5">Reader and Retriever Training</td></tr><tr><td>Model</td><td>Multi-Doc Reader</td><td>Retriever Adaptation</td><td>Disjoint End-to-End Multi-Step Unsupervised</td><td></td><td>Retriever</td></tr><tr><td>REALM (Guu et al., 2020)</td><td></td><td>√</td><td></td><td></td><td>√</td></tr><tr><td>DPR (Karpukhin et al., 2020)</td><td></td><td></td><td>√</td><td></td><td></td></tr><tr><td>RAG (Lewis et al., 2020b)</td><td></td><td>√</td><td></td><td></td><td></td></tr><tr><td>FiD (Izacard and Grave, 2021b)</td><td></td><td></td><td>√</td><td></td><td></td></tr><tr><td>FiD-KD (Izacard and Grave, 2021a)</td><td>√</td><td>√</td><td></td><td>√</td><td></td></tr><tr><td>EMDR² (Our Approach)</td><td>√</td><td>√</td><td>√</td><td></td><td>√</td></tr></table>
|
| 20 |
+
|
| 21 |
+
In this paper, we consider a retrieval-augmented question answering model that combines information from multiple documents when generating answers. Expectation-maximization (Dempster et al., 1977) offers a principled template for learning this class of latent variable models. We present EMDR2: End-to-end training of Multi-Document Reader and Retriever (§2). EMDR2 iteratively uses feedback from the model itself as “pseudo labels” of the latent variables for optimizing the retriever and reader parameters. We use two estimates of the latent variables: (i) prior scores for updating the reader parameters and (ii) approximate posterior scores given all observed variables for the retriever parameters.
|
| 22 |
+
|
| 23 |
+
We evaluate our proposed method by experimenting on three commonly used OpenQA datasets: Natural Questions, TriviaQA, and WebQuestions (§3). EMDR2 achieves new state-of-the-art results for models of comparable size on all datasets, outperforming recent approaches by 2-3 absolute exact match points. We also show that EMDR2 is robust to retriever initialization. It achieves high accuracy with unsupervised initialization, suggesting that supervised training of the retriever may not be an essential component of the training process as suggested in prior work (Karpukhin et al., 2020).
|
| 24 |
+
|
| 25 |
+
In summary, our contributions are as follows: (i) we present an end-to-end training method $( \mathrm { E M D R } ^ { 2 } $ ) for retrieval-augmented question-answering systems; (ii) we demonstrate that $\mathrm { E M D R ^ { 2 } }$ outperforms other existing approaches of comparable size without any kind of supervision on the latent variables; (iii) we provide ablation studies for a better understanding of the contributions of different components of our proposed method; and (iv) we release our code and checkpoints to facilitate future work and for reproducibility.2
|
| 26 |
+
|
| 27 |
+
EMDR2 is a framework that can be used to train retrieval-augmented text generation models for any task. We believe that our estimation technique in EMDR2 is also useful for learning similar latent variable models in other domains.
|
| 28 |
+
|
| 29 |
+
# 2 Model
|
| 30 |
+
|
| 31 |
+
Our proposed model EMDR2 consists of two components: (i) a neural retriever and (ii) a neural reader, which we train jointly in an end-to-end setting. Figure 1 shows an illustration of our model and training procedure. We discuss each component and our training objective in detail below.
|
| 32 |
+
|
| 33 |
+
# 2.1 Neural Retriever: Dual Encoder
|
| 34 |
+
|
| 35 |
+
Let the collection of evidence documents be denoted by $\mathcal { D } = \{ d _ { 1 } , \hdots , d _ { M } \}$ . Given a question $\pmb q$ the goal of the retriever module is to select a subset of documents $\mathcal { Z } \subset \mathcal { D }$ to answer the question. We model the retriever as a dual-encoder network (Bromley et al., 1994), where one encoder $f _ { q }$ encodes the question and another $f _ { d }$ encodes the evidence document (to a vector). The retrieval score is defined as the dot product between the two resulting vectors:
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
\begin{array} { r } { \mathrm { s c o r e } ( \pmb { q } , \pmb { d } _ { i } ; \Phi ) = { f } _ { \ b { q } } ( \pmb { q } ; \Phi _ { q } ) ^ { \top } { f } _ { d } ( \pmb { d } _ { i } ; \Phi _ { d } ) , } \end{array}
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
where $\Phi = [ \Phi _ { q } , \Phi _ { d } ]$ denotes the retriever parameters. We select top- $K$ documents for the question $\pmb q$ from $\mathcal { D }$ based on the retrieval scores. We denote the set of retrieved documents by $\mathcal { Z } = \{ z _ { 1 } , \ldots , z _ { K } \}$
|
| 42 |
+
|
| 43 |
+
We use transformer encoders (Vaswani et al., 2017) as our $f _ { q }$ and $f _ { d }$ . Our transformer architecture is similar to BERT with 12 layers and 768 hidden size (Devlin et al., 2019). We use the final representation of the first token (i.e., the standard [CLS] token from BERT’s tokenization) as our question (and similarly document) embedding. Initializing $f _ { q }$ and $f _ { d }$ with BERT weights has been shown to lead to a poor retrieval accuracy (Lee et al., 2019, Sachan et al., 2021). Therefore, we initialize the retriever with an unsupervised training procedure. We discuss our initialization technique in detail in $\ S$ .
|
| 44 |
+
|
| 45 |
+
# 2.2 Neural Reader: Fusion-in-Decoder
|
| 46 |
+
|
| 47 |
+
The reader takes as input a question $\pmb q$ and a set of retrieved documents (to be read) $\mathcal { Z }$ to generate an answer. Our reader is based on the Fusion-in-Decoder (FiD; Izacard and Grave, 2021b) model, which is built on top of T5 (Raffel et al., 2020). T5 is a pretrained sequence-to-sequence transformer that consists of an encoder $g _ { e }$ and a decoder $g _ { d }$ .
|
| 48 |
+
|
| 49 |
+
In FiD, each retrieved document $z _ { k }$ is first appended with its title $( t _ { z _ { k } } )$ and the question:
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\pmb { x } _ { k } = [ \mathbb { C } \mathrm { L S } ] \pmb { q } [ \mathrm { S E P } ] \pmb { t } _ { z _ { k } } [ \mathrm { S E P } ] \pmb { z } _ { k } [ \mathrm { S E P } ] ,
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
where [CLS] is used to indicate the start of a document and [SEP] is used as a separator for the different parts of the document as well as the final token.
|
| 56 |
+
|
| 57 |
+
Each $\scriptstyle { \mathbf { { \mathit { x } } } } _ { k }$ is then independently given as an input to the T5 encoder $g _ { e }$ . The output representations corresponding to all of the retrieved documents are concatenated as:
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
{ \bf X } _ { \mathcal { Z } } = [ g _ { e } ( { \pmb x } _ { 1 } ) ; \dots ; g _ { e } ( { \pmb x } _ { K } ) ] \in \mathbb { R } ^ { ( N \times K ) \times H } ,
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
where $N$ is the number of tokens in each ${ \pmb x } _ { k } { } ^ { 3 }$ and $H$ is the hidden size of the T5 encoder $g _ { e }$ . In this work, we use the T5-base configuration with $N = 5 1 2$ and $H = 7 6 8$ .
|
| 64 |
+
|
| 65 |
+
$\mathbf { X } _ { \mathcal { Z } }$ is then given as an input to the T5 decoder $g _ { d }$ . When generating an answer token, the decoder attends to both previously generated tokens (i.e., causal attention) as well as the tokens encoded in $\mathbf { X } _ { \mathcal { Z } }$ (i.e., cross attention). Since $\mathbf { X } _ { \mathcal { Z } }$ contains information from multiple documents, the decoder has the ability to aggregate useful signals contained in multiple documents and jointly reason over them. We define the probability of the answer as:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
p ( \pmb { a } \mid \pmb { q } , \mathcal { Z } ; \Theta ) = \prod _ { t = 1 } ^ { T } p \left( a _ { t } \mid \pmb { a } _ { < t } , \pmb { q } , \mathcal { Z } ; \Theta \right) ,
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
where $\Theta$ denotes the reader parameters (i.e., T5 encoder and decoder) and $T$ is the number of answer tokens. We keep generating answer tokens until the decoder outputs a special EOS token or a pre-specified maximum answer length is reached.
|
| 72 |
+
|
| 73 |
+
# 2.3 End-to-End Training of Reader and Retriever
|
| 74 |
+
|
| 75 |
+
In contrast to previous work on generative question answering, we train both the reader and the retriever jointly in an end-to-end differentiable fashion.
|
| 76 |
+
|
| 77 |
+
Denote our latent variable which represents a set of retrieved documents by $Z$ and let $\mathcal { Z }$ be a possible value of $Z$ . The marginal likelihood of an answer (marginalizing over all the possible values of $Z$ )
|
| 78 |
+
|
| 79 |
+

|
| 80 |
+
Figure 1: An illustration of the different components of $\mathrm { E M D R } ^ { 2 }$ . Colored blocks indicate components which contain trainable parameters.
|
| 81 |
+
|
| 82 |
+
is: $\begin{array} { r } { p ( \pmb { a } \mid q ; \Theta , \Phi ) = \sum _ { Z = \mathcal { Z } } p ( \pmb { a } \mid q , \mathcal { Z } ; \Theta ) p ( \mathcal { Z } \mid q ; \Phi ) } \end{array}$ . The goal of our training procedure is to find $\Phi$ and $\Theta$ Z that would maximize the above objective. Exactly optimizing Eq. 3 is intractable as it is combinatorial in nature.4 For one particular value $\mathcal { Z }$ , the log-likelihood is simpler to compute: $\log p ( { \pmb a } \mid { \pmb q } , { \mathcal Z } ; { \Theta } ) p ( { \mathcal Z } \mid { \pmb q } ; { \Phi } ) = \log p ( { \pmb a } \mid { \pmb q } , { \mathcal Z } ; { \Theta } ) + \log p ( { \mathcal Z } \mid { \pmb q } ; { \Phi } )$
|
| 83 |
+
|
| 84 |
+
Expectation-maximization (EM) algorithm (Dempster et al., 1977) offers a solution to learning this latent variable model. In classical EM, we iteratively compute the posterior of $Z$ given all observed variables and use it to update $\Theta$ and $\Phi$ .
|
| 85 |
+
|
| 86 |
+
We propose using two estimates of $Z { - } \mathcal { Z } _ { \mathrm { r e a d e r } }$ and $\mathcal { Z } _ { \mathrm { r e t r i e v e r } }$ —for updating the two components of the model (reader parameters $\Theta$ and retriever parameters $\Phi$ ):
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\log \underbrace { p ( a \mid q , \mathcal { Z } _ { \mathrm { r e a d e r } } ; \Theta ) } _ { \mathrm { r e a d e r } } + \log \underbrace { p ( \mathcal { Z } _ { \mathrm { r e t r i e v e r } } \mid q ; \Phi ) } _ { \mathrm { r e t r i e v e r } } .
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
In the first term, we set the value of the latent variable $Z = \mathcal { Z } _ { \mathrm { r e a d e r } }$ based on the prior scores. In the second term, we seek to maximize an approximate posterior of $Z = \mathcal { Z } _ { \mathrm { r e t r i e v e r } }$ . We discuss them in more detail below.
|
| 93 |
+
|
| 94 |
+
Reader parameters $\Theta$ . For updating $\Theta$ (the first term of Eq. 3), we use the top- $K$ documents with the highest individual scores (as computed by Eq. 1 based on the current value of $\Phi$ ) to construct Zreader. This is equivalent to relying on the prior $p ( Z \mid q ; \Phi )$ to estimate ${ \mathcal { Z } } _ { \mathrm { r e a d e r } }$ (without using information from the answer $\textbf { \em a }$ ). We choose to use the prior to train reader parameters since the prior scores are also used at evaluation time to obtain the top- $K$ documents. As a result, there is no mismatch between training and test computations when computing $p ( \pmb { a } \mid \pmb { q } , \mathcal { Z } ; \Theta )$ (i.e., $\mathcal { Z }$ that is used at test time is obtained in exactly the same way as $\mathcal { Z } _ { \mathrm { r e a d e r } } = \mathcal { Z } _ { \mathrm { t o p } - K } ,$ .
|
| 95 |
+
|
| 96 |
+
Retriever parameters $\Phi$ . For updating $\Phi$ (the second term of Eq. 3), we propose to use the posterior estimate. In other words, we use additional information from $\textbf { \em a }$ when evaluating $Z _ { \mathrm { r e t r i e v e r } }$ to train $\Phi$ . Using the posterior allows our retriever to learn from richer training signals as opposed to relying only on the prior.
|
| 97 |
+
|
| 98 |
+
We need to be able to compute $p ( \mathcal { Z } _ { \mathrm { r e t r i e v e r } } \mid q , a ; \Theta , \Phi )$ to maximize the retriever parameters. However, computing this quantity is difficult since it is a probability of a set.5 Consider a set of $K$ documents (e.g., ${ \mathcal { Z } } _ { \mathrm { t o p } - K } ,$ ), where $z _ { k }$ denotes a document in the set. We approximate the maximization of the probability of the set by assuming that its probability is maximized if the sum of the probability of each document in the set is maximized.6 With this approximation, we arrive at a simpler quantity: $\begin{array} { r } { \sum _ { k = 1 } ^ { K } p ( z _ { k } \mid q , \pmb { a } ; \Theta , \Phi ) } \end{array}$ . Note that using Bayes rule, we can rewrite:7
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
p ( z _ { k } \mid q , a ; \Theta , \Phi ) \propto p ( a \mid q , z _ { k } ; \Theta ) p ( z _ { k } \mid q ; \Phi ) .
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
The reader now only conditions on one document when computing the probability of an answer $p ( \pmb { a } \mid \pmb { q } , \pmb { z } _ { k } ; \Theta )$ . This simpler reader uses the same parameters as the more sophisticated one $\Theta$ , but it only uses one document $z _ { k }$ instead of a set of documents.
|
| 105 |
+
|
| 106 |
+
To compute Eq. 4, we first obtain $K$ documents with the highest scores as computed by Eq. 1 based on the current value of $\Phi$ . We compute the probability of document $z _ { k } \in \mathcal { Z } _ { \mathrm { t o p } - K }$ as:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
p ( z _ { k } \mid q , \mathcal { Z } _ { \mathrm { t o p } - K } ; \Phi ) \approx \frac { \exp ( \operatorname { s c o r e } ( q , z _ { k } ) / \tau ; \Phi ) } { \sum _ { j = 1 } ^ { K } \exp ( \operatorname { s c o r e } ( q , z _ { j } ) / \tau ; \Phi ) } ,
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where $\tau$ is a temperature hyperparameter and the approximation assumes that documents beyond the top- $K$ contributes very small scores so we do not need to sum over all evidence documents $M$ in the denominator (which is in the order of tens of millions in our experiments). We then compute $p ( \pmb { a } \mid \pmb { q } , \pmb { z } _ { k } ; \Theta )$ similarly to Eq. 2.
|
| 113 |
+
|
| 114 |
+
Overall training objective of $\mathbf { E M D R } ^ { 2 }$ . Combining the above derivations, our end-to-end training objective that we seek to maximize for a particular example becomes:
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\mathcal { L } = \underbrace { \log p ( a \mid q , \mathcal { Z } _ { \mathrm { t o p } \cdot K } ; \Theta ) } _ { \mathrm { r e a d e r } } + \log \sum _ { k = 1 } ^ { K } \mathbb { S } \mathbb { G } \left( p ( a \mid q , z _ { k } ; \Theta ) \right) p ( z _ { k } \mid q , \mathcal { Z } _ { \mathrm { t o p } \cdot K } ; \Phi ) ,
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
where $\mathbb { S } \mathbb { G }$ is the stop-gradient operator so that the reader parameters $\Theta$ are not updated to also perform well given a single document $z _ { k }$ . The stop-gradient operator in the second term of $\mathrm { E M D R ^ { 2 } }$ has several benefits. First, the FiD reader is trained from the first term of the $\mathrm { E M D R ^ { 2 } }$ objective in which its likelihood is conditioned on all the retrieved documents, similar to how the reader is used at test time. Second, it also makes training faster since the backward pass which is computationally more expensive than the forward pass is not needed, which in turn reduces the usage of GPU RAM as intermediate activations need not be saved.
|
| 121 |
+
|
| 122 |
+
Given a training example, we update $\Theta$ and $\Phi$ by taking gradients of Eq. 6 with respect to $\Theta$ and $\Phi$ in an end-to-end fashion. Intuitively, we train the reader to generate the correct answer given $K$ highest scoring documents ${ \mathcal { Z } } _ { \mathrm { t o p } - K }$ . For the retriever, we train it to select $K$ documents which collectively has a high score of generating an answer (since the sum over $K$ is inside the log in the second term) while taking into account feedback from the reader. Algorithm 1 summarizes our training algorithm.
|
| 123 |
+
|
| 124 |
+
Algorithm 1: End-to-end training of multi-document reader and retriever.
|
| 125 |
+
|
| 126 |
+
Input: Model parameters $\Theta$ and $\Phi$ , evidence documents $\mathcal { D }$
|
| 127 |
+
|
| 128 |
+
while not converged do
|
| 129 |
+
|
| 130 |
+
• Compute ${ \mathcal { Z } } _ { \mathrm { t o p } - K }$ using the current retriever parameters $\Phi$ . // E-step • Compute $p ( \dot { \pmb { a } } \mid \pmb { q } , \pmb { z } _ { k } )$ for each $z _ { k }$ using the current reader parameters $\Theta$ . // E-step • Update model parameters $\Theta$ and $\Phi$ to maximize the log-likelihood in Eq. 6. // M-step
|
| 131 |
+
|
| 132 |
+
end
|
| 133 |
+
|
| 134 |
+
# 3 Experiments
|
| 135 |
+
|
| 136 |
+
# 3.1 Datasets
|
| 137 |
+
|
| 138 |
+
We experiment with three commonly used open-domain question answering datasets:
|
| 139 |
+
|
| 140 |
+
6 The intuition is that each element of the set contributes independently, which greatly simplifies the computation to find the maximum of the set.
|
| 141 |
+
|
| 142 |
+
• Natural Questions (NQ; Kwiatkowski et al., 2019). NQ contains questions asked by users of the Google search engine. Similar to Lee et al. (2019), we use the short answer subset.
|
| 143 |
+
|
| 144 |
+
• TriviaQA (Joshi et al., 2017). TriviaQA is a collection of trivia question-answer pairs that were collected from multiple sources on the web.
|
| 145 |
+
|
| 146 |
+
• WebQuestions (WebQ; Berant et al., 2013). WebQ questions were collected using Google Suggest API and the answers were annotated using Mechanical Turk. We use the version from Chen et al. (2017) where Freebase IDs in the answers are replaced by entity names.
|
| 147 |
+
|
| 148 |
+
Evidence documents $\mathcal { D }$ . We use the preprocessed English Wikipedia dump from December 2018 released by Karpukhin et al. (2020) as our evidence documents. Each Wikipedia article is split into non-overlapping 100 words long segments. Each segment corresponds to a document in our case. There are a total of 21,015,324 documents in total.
|
| 149 |
+
|
| 150 |
+
We provide descriptive statistics and other preprocessing details in Appendix A.
|
| 151 |
+
|
| 152 |
+
# 3.2 Implementation Details
|
| 153 |
+
|
| 154 |
+
Hardware and library. We run all of our experiments on a machine with 96 CPUs, 1.3TB physical memory, and 16 A100 GPUs. We use PyTorch (Paszke et al., 2019) to implement our proposed model and relevant baselines.
|
| 155 |
+
|
| 156 |
+
Model configurations. For both the retriever and reader, we use the base configuration that consists of 12 layers, 768 dimensional hidden size, and 12 attention heads. In all experiments, we retrieve 50 documents, unless stated otherwise. We only use the base configuration in our experiments due to GPU memory constraints. However, we believe that our results would generalize to larger configurations as well.
|
| 157 |
+
|
| 158 |
+
Retrieval. To support fast retrieval, we pre-compute evidence document embeddings and store them in a distributed fashion over all the GPUs. We refer to these document embeddings as the document index. For each question, we retrieve documents in an online (on-the-fly) manner by performing exact maximum inner product search (MIPS), implemented using asynchronous distributed matrix multiplication over the document index. These documents are converted to subwords using BERT’s tokenization and are given as input to the T5 reader. If a tokenized document is shorter than 512 tokens, it is padded using the tokens from the neighboring documents until the maximum token limit is reached. Such padding additionally helps to provide an extended context for answer generation.
|
| 159 |
+
|
| 160 |
+
Initialization and training details. We initialize the parameters of the model with unsupervised pre-training before performing supervised training using the question-answer training examples. Unsupervised pre-training is essential as it helps to warm-start the retriever so that it outputs relevant documents for a given question.
|
| 161 |
+
|
| 162 |
+
We first pre-train the retriever parameters with unsupervised Inverse Cloze Task training (Lee et al., 2019) for 100,000 steps. We then extract sentences containing named entities from the evidence documents. Next, we replace $15 \%$ of the named entity tokens with masked tokens, which are often referred to as masked salient spans (MSS; Guu et al., 2020). The masked sentence can be considered as the question and its salient spans (i.e, named entities) can be considered as the answer to train the model with Eq. 6. We train the model on these question-answer (masked sentence-named entities) pairs for 82,000 steps with a batch size of 64 using Adam (Kingma and Ba, 2015). We refer to this initialization method as unsupervised pre-training with masked salient spans. We provide further description in Appendix C.
|
| 163 |
+
|
| 164 |
+
After MSS training, we finetune the model on the dataset-specific question-answer training examples with EMDR2. We perform training for 10 epochs on NQ and TriviaQA with a batch size of 64, and for 20 epochs on WebQ with a batch size of 16. During training, we save a checkpoint every 500 steps and select the best checkpoint based on its performance on the development set.
|
| 165 |
+
|
| 166 |
+
During end-to-end training, since the parameters of the document encoder $( f _ { d } )$ are also updated at every step, the pre-computed document embeddings become stale as training progresses. We use the most recent document encoder checkpoint to compute fresh document embeddings asynchronously with which the document index is updated after every 500 training steps to prevent staleness.
|
| 167 |
+
|
| 168 |
+
Table 2: Exact match scores on three evaluation datasets. Top- $K$ denotes the number of retrieved documents that are used by the reader to produce an answer. To provide a fair comparison with our reimplementations, we show results from other papers with the base configuration, except for RAG-Sequence that uses BART-large (Lewis et al., 2020a). $\dagger$ indicates that their results on WebQ use NQ training data to pretrain the model.
|
| 169 |
+
|
| 170 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">top-K</td><td colspan="2">NQ</td><td colspan="2">TriviaQA</td><td colspan="2">WebQ</td><td rowspan="2">#of params</td></tr><tr><td>dev</td><td>test</td><td>dev</td><td>test</td><td>dev</td><td>test</td></tr><tr><td colspan="9">Closed-Book QA Models</td></tr><tr><td>T5-base (Roberts et al., 2020)</td><td>0</td><td></td><td>25.7</td><td></td><td>24.2</td><td>=</td><td>28.2</td><td>220M</td></tr><tr><td>T5-large (Roberts et al.,2020)</td><td>0</td><td>-</td><td>27.3</td><td>=</td><td>28.5</td><td></td><td>29.5</td><td>770M</td></tr><tr><td>T5-XXL (Roberts et al., 2020)</td><td>0</td><td></td><td>32.8</td><td></td><td>42.9</td><td></td><td>35.6</td><td>11B</td></tr><tr><td>GPT-3 (Brown et al., 2020)</td><td>0</td><td>-</td><td>29.9</td><td>=</td><td>1</td><td>=</td><td>41.5</td><td>175B</td></tr><tr><td colspan="9">Open-Book QA Models</td></tr><tr><td>BM25 + BERT (Lee et al., 2019)</td><td>5</td><td>24.8</td><td>26.5</td><td>47.2</td><td>47.1</td><td>27.1</td><td>21.3</td><td>220M</td></tr><tr><td>ORQA (Lee et al., 2019)</td><td>5</td><td>31.3</td><td>33.3</td><td>45.1</td><td>45.0</td><td>36.8</td><td>30.1</td><td>330M</td></tr><tr><td>REALM (Guu et al., 2020)</td><td>5</td><td>38.2</td><td>40.4</td><td>1</td><td>1</td><td>1</td><td>40.7</td><td>330M</td></tr><tr><td>DPR (Karpukhin et al., 2020)</td><td>25</td><td>1</td><td>41.5</td><td>-</td><td>56.8</td><td>-</td><td>34.6</td><td>330M</td></tr><tr><td>RECONsIDER (Iyer et al.,2021)t</td><td>30</td><td>-</td><td>43.1</td><td>1</td><td>59.3</td><td>-</td><td>44.4</td><td>440M</td></tr><tr><td>RAG-Sequence (Lewis et al., 2020b)t</td><td>50</td><td>44.0</td><td>44.5</td><td>55.8</td><td>56.8</td><td>44.9</td><td>45.2</td><td>626M</td></tr><tr><td>Individual Top-K (Sachan et al., 2021)</td><td>-</td><td>1</td><td>45.9</td><td>1</td><td>56.3</td><td>1</td><td>1</td><td>440M</td></tr><tr><td>Joint Top-K (Sachan et al., 2021)</td><td>50</td><td>-</td><td>49.2</td><td>1</td><td>64.8</td><td>-</td><td>-</td><td>440M</td></tr><tr><td>FiD (Izacard and Grave, 2021b)</td><td>100</td><td>1</td><td>48.2</td><td>1</td><td>65.0</td><td>=</td><td>=</td><td>440M</td></tr><tr><td>FiD-KD (Izacard and Grave, 2021a)</td><td>100</td><td>48.0</td><td>49.6</td><td>68.6</td><td>68.8</td><td>=</td><td>=</td><td>440M</td></tr><tr><td colspan="9">Our Implementation (Base Configuration)</td></tr><tr><td>FiD /T5-base</td><td>0</td><td>26.0</td><td>25.1</td><td>26.7</td><td>27.8</td><td>31.0</td><td>32.4</td><td>220M</td></tr><tr><td>FiD (DPR retriever, T5 reader)</td><td>1</td><td>37.3</td><td>38.4</td><td>50.8</td><td>50.4</td><td>40.2</td><td>38.3</td><td>440M</td></tr><tr><td>FiD (DPR retriever, T5 reader)</td><td>50</td><td>47.3</td><td>48.3</td><td>65.5</td><td>66.3</td><td>46.0</td><td>45.2</td><td>440M</td></tr><tr><td>FiD (MSS+DPR retriever, T5 reader)</td><td>50</td><td>48.8</td><td>50.4</td><td>68.0</td><td>68.8</td><td>43.5</td><td>46.8</td><td>440M</td></tr><tr><td>FiD (MSS retriever, MSS reader)</td><td>50</td><td>38.5</td><td>40.1</td><td>60.0</td><td>59.8</td><td>39.1</td><td>40.2</td><td>440M</td></tr><tr><td>EMDR² (MSS retriever,MSS reader)</td><td>50</td><td>50.4</td><td>52.5</td><td>71.1</td><td>71.4</td><td>49.9</td><td>48.7</td><td>440M</td></tr></table>
|
| 171 |
+
|
| 172 |
+
Inference. We use greedy decoding for answer generation at inference time.
|
| 173 |
+
|
| 174 |
+
# 3.3 Baselines
|
| 175 |
+
|
| 176 |
+
We compare our model to other approaches for OpenQA that can be categorized under the following two classes:
|
| 177 |
+
|
| 178 |
+
• Closed-book QA models. Large-scale language models capture a lot of world knowledge in their parameters derived from the corpus they have been trained on (Petroni et al., 2019). We compare with the work of Roberts et al. (2020) who show that larger T5 models—when finetuned with question-answer pairs—can perform remarkably well. We also compare with the few-shot results of GPT-3 (Brown et al., 2020).8
|
| 179 |
+
|
| 180 |
+
• Open-book QA models. Similar to this work, these models consist of retriever and reader components and adopt the retrieve then predict approach for answering questions given a collection of evidence documents. These models mainly differ in how the retriever is initialized (ORQA; Lee et al., 2019, DPR; Karpukhin et al., 2020), whether the reader processes a single document (ORQA, DPR, RAG; Lewis et al., 2020b) or multiple documents (FiD; Izacard and Grave, 2021b), or whether the reader and retriever are trained jointly or in a multistage process (REALM; Guu et al., 2020, FiD-KD; Izacard and Grave, 2021a).
|
| 181 |
+
|
| 182 |
+
# 3.4 Results
|
| 183 |
+
|
| 184 |
+
We follow standard conventions and report exact match (EM) scores using the reference answers included in each dataset. Table 2 shows our main results. We divide the table into three main sections: closed-book QA models, open-book QA models, and our implementation. The first two sections contain results from other papers, which we include for comparisons. The last section includes results from our proposed model, as well as our reimplementation of relevant baselines to control for our experimental setup.
|
| 185 |
+
|
| 186 |
+
Our reimplementation of T5-base provides strong baselines when the number of retrieved documents is set to 0 (no retrieval) and 1. From Table 2, we see that the setting of top-1 vastly improves performance over the setting with no retrieved documents, signifying the importance of retrieval for OpenQA tasks. When further increasing the top- $k$ documents to 50, the performance of the FiD models substantially improves over the top-1 retrieval, verifying the observation from (Izacard and Grave, 2021b) about the importance of modeling the retrieved documents as a set.
|
| 187 |
+
|
| 188 |
+
Comparing EMDR2 with our reimplementation of FiD illustrates the benefit of our end-to-end training approach. The underlying model is similar in both cases, but the training method is different. FiD adopts a two-stage approach to first train the retriever and then the reader. We have three variants of FiD: (i) the reader and retriever are initialized with MSS training, (ii) the retriever is initialized with DPR training, which is the setting used in the original paper (Izacard and Grave, 2021b), and (iii) the retriever is initialized with $\mathrm { M S S + D P R }$ training from (Sachan et al., 2021), as it further improves DPR recall. EMDR2 outperforms all the variants by large margins on all the datasets.
|
| 189 |
+
|
| 190 |
+
The current best approach for training multi-document reader and retriever is FiD-KD (Izacard and Grave, 2021a). FiD-KD is a complex training procedure that requires multiple training stages and performs knowledge distillation with inter-attention scores. We take the results from the original paper when comparing our model with FiD-KD. EMDR2 outperforms the reported numbers of FiD-KD by more than 2.5 points on NQ and TriviaQA to obtain new state-of-the-art results on these benchmarks.
|
| 191 |
+
|
| 192 |
+
In addition to better performance, $\mathrm { E M D R } ^ { 2 }$ also has three other advantages compared to FiD-KD: (i) EMDR2 is more efficient since it only uses 50 evidence documents, whereas FiD-KD leverages 100 documents; (ii) FiD-KD is based on a distillation approach which requires multiple cycles of retriever and reader training, while EMDR2 only requires one cycle of end-to-end training; and (iii) FiD-KD relies on supervised initialization of the retriever to achieve its best performance. EMDR2 is more robust to the retriever initialization, as demonstrated by state-of-the-art results even with unsupervised initialization of the retriever.
|
| 193 |
+
|
| 194 |
+
For the WebQ dataset, the training set size is much smaller compared to the other datasets (Table 5). Previous approaches such as RAG rely on supervised transfer (i.e., they finetune a model pre-trained on NQ) to obtain good results. In contrast, EMDR2 improves over the results from this RAG model by 3.5 points without the supervised transfer step. This result demonstrates the applicability of our approach to the low-resource setting where we only have a limited number of training examples.
|
| 195 |
+
|
| 196 |
+
We also perform qualitative analysis of the model outputs, which is included in Appendix E.
|
| 197 |
+
|
| 198 |
+
# 3.5 Ablations
|
| 199 |
+
|
| 200 |
+
Number of retrieved documents. We investigate the performance of $\mathrm { E M D R } ^ { 2 }$ and FiD as we vary the number of retrieved documents $K$ in Figure 2. We observe that when the number of retrieved documents is increased, both $\mathrm { E M D R } ^ { 2 }$ and FiD improve in performance. When $K$ is small, the gap between EMDR2 and FiD is larger. This indicates the efficacy of $\mathrm { E M D R } ^ { 2 }$ in a more constrained setting where we can only retrieve a small number of documents (e.g., due to memory limitations).
|
| 201 |
+
|
| 202 |
+
Retriever initialization. We explore the effect of different parameter initialization strategies when training with $\mathrm { E M D R } ^ { 2 }$ : (i) unsupervised MSS pre-training, (ii) supervised retriever training (DPR), and (iii) MSS pre-training followed by supervised retriever training $( \mathbf { M S S } + \mathbf { D P R }$ ; Sachan et al. (2021)). Table 3 shows our results. We can see that on NQ, MSS pre-training being unsupervised leads to a lower initial retriever recall than DPR. After EMDR2 training, the recall improves by $20 \%$ (highlighted in yellow cells). Training with DPR initialization leads to the same final recall as obtained by MSS pre-training, suggesting that DPR initialization of the retriever may not be an essential component to obtain good performance in OpenQA tasks. Similar trends are also observed on TriviaQA and WebQ. Similarly, $\mathrm { M S S + D P R }$ initialization has a better initial recall but leads to a marginal or no improvements in answer extraction performance over MSS pre-training. Finally, we also observe that MSS pre-training also provides an improvement of 2 points in answer extraction on WebQ when compared to the T5 reader (shown in orange cells), highlighting its importance in the low-resource OpenQA tasks.
|
| 203 |
+
|
| 204 |
+

|
| 205 |
+
|
| 206 |
+
Figure 2: Performance on NQ, TriviaQA, and WebQ as we vary the number of retrieved documents.
|
| 207 |
+
|
| 208 |
+
<table><tr><td></td><td></td><td colspan="2">NQ (dev)</td><td colspan="4">TriviaQA (dev)</td><td colspan="3">WebQ (dev)</td></tr><tr><td>Retriever</td><td>Reader</td><td colspan="2">R@50</td><td>EM</td><td colspan="2">R@50</td><td>EM</td><td colspan="2">R@50</td><td>EM</td></tr><tr><td>Initialization</td><td>Initialization</td><td>B.T.A.T.</td><td></td><td></td><td>B.T.</td><td>A.T.</td><td></td><td>B.T.</td><td>A.T.</td><td></td></tr><tr><td>MSS pre-training</td><td>MSS pre-training</td><td>66.4</td><td>86.3</td><td>50.4</td><td>74.8</td><td>86.2</td><td>71.1</td><td>59.8</td><td>88.6</td><td>49.9</td></tr><tr><td>MSS pre-training</td><td>T5</td><td>66.4</td><td>86.3</td><td>50.3</td><td>74.8</td><td>86.3</td><td>70.9</td><td>59.8</td><td>88.6</td><td>47.7</td></tr><tr><td>DPR training</td><td>T5</td><td>82.3</td><td>86.3</td><td>50.0</td><td>83.2</td><td>86.2</td><td>70.5</td><td>84.2</td><td>88.6</td><td>49.0</td></tr><tr><td>MSS +DPR</td><td>MSS pre-training</td><td>84.5</td><td>86.3</td><td>50.5</td><td>85.3</td><td>86.3</td><td>71.2</td><td>85.0</td><td>88.6</td><td>49.9</td></tr></table>
|
| 209 |
+
|
| 210 |
+
Table 3: $\mathrm { R @ 5 0 }$ denotes the retrieval recall from the top-50 retrieved documents. B.T. and A.T. indicates $\mathrm { R @ 5 0 }$ score Before Training and After Training the model, respectively.
|
| 211 |
+
|
| 212 |
+
# 3.6 Alternative End-to-End Training Objectives
|
| 213 |
+
|
| 214 |
+
We compare $\mathrm { E M D R } ^ { 2 }$ objective (Eq. 6) to two alternative formulations for end-to-end training.
|
| 215 |
+
|
| 216 |
+
In the first alternative formulation, when training the retriever parameters $\Phi$ , we simply factorize $p ( \mathcal { Z } \mid \mathbf { \bar { q } } ; \Phi ) =$ $\textstyle \prod _ { k = 1 } ^ { K } p ( z _ { k } \mid q ; \Phi )$ to arrive at the following objective:
|
| 217 |
+
|
| 218 |
+
$$
|
| 219 |
+
\mathcal { L } _ { \mathrm { a l t - 1 } } = \log p ( \boldsymbol { a } \mid \boldsymbol { q } , \mathcal { Z } ; \boldsymbol { \Theta } ) + \sum _ { k = 1 } ^ { K } \log p ( \boldsymbol { z } _ { k } \mid \boldsymbol { q } , \mathcal { Z } ; \boldsymbol { \Phi } ) .
|
| 220 |
+
$$
|
| 221 |
+
|
| 222 |
+
The second term in this objective is maximised by a uniform retrieval, in other words, by removing any discrimination between documents in the retriever. We include it to show the impact of an adversarial objective.
|
| 223 |
+
|
| 224 |
+
<table><tr><td>Method t top-k</td><td>NQ</td><td>TriviaQA</td><td>WebQ</td></tr><tr><td>FiD EMDR²</td><td>50 47.3 50 50.4</td><td>65.5 71.1</td><td>46.0 49.9</td></tr><tr><td>Lalt-1</td><td>50 14.1</td><td>11.9</td><td>28.0</td></tr><tr><td>Lalt-2</td><td>50 49.9</td><td>69.6</td><td>28.8</td></tr></table>
|
| 225 |
+
|
| 226 |
+
Table 4: EM scores on the development set for alternative training objectives.
|
| 227 |
+
|
| 228 |
+
In the second formulation, for each retrieved document, we approximate its posterior under the assumption that we have a uniform prior over the set of retrieved documents: $\tilde { p } ( z _ { k } \mid q , \pmb { a } , \mathcal { Z } _ { \mathrm { t o p } - K } ; \Theta ) \propto$ $p ( { \pmb a } \mid { \pmb q } , z _ { k } ; \Theta ) \times \frac { 1 } { K }$ . We use this to train reader and retriever parameters as follows:
|
| 229 |
+
|
| 230 |
+
$$
|
| 231 |
+
\mathcal { L } _ { \mathrm { a l t - 2 } } = \log p ( \boldsymbol { a } \mid \boldsymbol { q } , \mathcal { Z } ; \boldsymbol { \Theta } ) + \mathbb { K L } \big ( \mathbb { S } \mathbb { G } \left( \tilde { p } ( \boldsymbol { z } _ { k } \mid \boldsymbol { q } , \boldsymbol { a } , \mathcal { Z } _ { \mathrm { t o p } \cdot K } ; \boldsymbol { \Theta } ) \right) \mid \mid p ( \boldsymbol { z } _ { k } \mid \boldsymbol { q } , \mathcal { Z } ; \boldsymbol { \Phi } ) \big ) .
|
| 232 |
+
$$
|
| 233 |
+
|
| 234 |
+
Intuitively, we try to match the probability of retrieving a document $z _ { k }$ with the “contribution” of that document to the generated answer $\textbf { \em a }$ , regardless of whether the retriever is relatively more or less likely to retreieve the document a priori.
|
| 235 |
+
|
| 236 |
+
Table 4 shows our results on the development set of NQ. We observe that training with the adversarial ${ \mathcal { L } } _ { \mathrm { a l t - 1 } }$ objective diverges, leading to poor performance, as expected. This shows that harming the retriever during training can significantly harm performance of the QA system. In contrast, although it disregards the estimated prior, the ${ \mathcal { L } } _ { \mathrm { a l t - 2 } }$ objective still improves over the FiD baseline for NQ and
|
| 237 |
+
|
| 238 |
+
TriviaQA. However, it still lags behind EMDR2. On WebQ, the ${ \mathcal { L } } _ { \mathrm { a l t - 2 } }$ objective diverges and leads to a poor performance. We leave further analysis on the convergence of ${ \mathcal { L } } _ { \mathrm { a l t - 2 } }$ objective as a part of future work.
|
| 239 |
+
|
| 240 |
+
# 4 Related Work
|
| 241 |
+
|
| 242 |
+
Our work is based on end-to-end training of neural readers and retrievers, which we discuss in $\ S 1 , \ S 2$ and $\ S 3$ . Here we instead focus on discussing previous work related to standalone neural retrievers, neural readers, and their application in other natural language processing tasks.
|
| 243 |
+
|
| 244 |
+
Neural retrievers. There are two broad classes of neural retrievers based on the number of embeddings computed for a document: dual encoders (Yih et al., 2011, Lee et al., 2019) and multivector encoders (Khattab and Zaharia, 2020, Luan et al., 2021). Dual encoders store one embedding for each evidence document. Multivector encoders require multiple embeddings, which can be computationally expensive for large-scale retrieval. Due to the large size of the evidence document collection in OpenQA, our work uses the more efficient dual-encoder. Sachan et al. (2021) show that the performance of supervised dual encoders in OpenQA can be improved when pre-training with the Inverse Cloze Task for the high-resource setting or masked salient spans for the low-resource setting.
|
| 245 |
+
|
| 246 |
+
Neural readers. Neural readers output an answer given retrieved documents as its input. There are also two broad classes of neural readers: extractive and generative. Extractive readers (Clark and Gardner, 2018, de Masson d’Autume et al., 2019, Wang et al., 2019, Guu et al., 2020, Karpukhin et al., 2020) extract a span from a retrieved document to produce an answer. Generative readers (Izacard and Grave, 2021b), on the other hand, generates an answer conditioned on the retrieved documents.
|
| 247 |
+
|
| 248 |
+
Other application areas. In addition to question answering, retrieval-augmented methods have been successfully applied to other natural language processing tasks. In left-to-right language modeling, retrieving similar words from an external memory has been shown to improve perplexity (Khandelwal et al., 2020, Yogatama et al., 2021). In machine translation, retrieving domain-specific target language tokens has improved performance in domain adaptation (Khandelwal et al., 2021). Finally, in dialog modeling, retrieving knowledge-informed text has helped improve factual correctness in the generated conversations (Fan et al., 2021).
|
| 249 |
+
|
| 250 |
+
We provide a detailed comparison of EMDR2 with some of the previous work in Appendix C and D.
|
| 251 |
+
|
| 252 |
+
# 5 Discussion
|
| 253 |
+
|
| 254 |
+
Summary of contributions. We presented EMDR2, an end-to-end training method for retrievalaugmented question answering systems. We showed how to arrive at our training objective using the expectation-maximization algorithm. We demonstrated that EMDR2 achieves state-of-the-art performance on three benchmark OpenQA datasets.
|
| 255 |
+
|
| 256 |
+
Technical limitations. EMDR2 shares a few limitations with other retrieval-augmented question answering models. In particular, as evidence documents are stored in an uncompressed format, maintaining them and searching for relevant documents can be expensive (both in terms of compute and memory consumption). In our experiments, we only focused on open-domain question answering. It would be interesting to see how EMDR2 performs for other text generation models as well. We also note that training is relatively resource-heavy (requiring 16 GPUs), potentially having environmental concerns.
|
| 257 |
+
|
| 258 |
+
Potential negative societal impacts. While EMDR2 has the potential to improve language models in the low-resource setting (as demonstrated by our results on WebQ in $\ S 3 . 4 )$ , it could exhibit typical biases that are associated with large language models. For example, our model does not have an explicit mechanism to generate answers that are calibrated for fairness across all spectra. As a retrieval-augmented method, it also could be more prone to generating fake answers if an attacker manages to have access and modify information in the collection of evidence documents.
|
| 259 |
+
|
| 260 |
+
# Acknowledgements
|
| 261 |
+
|
| 262 |
+
The authors would like to thank the DeepMind Language team, Mila’s students, and anonymous reviewers for providing us valuable feedback and useful suggestions about this work that helped us improve the paper.
|
| 263 |
+
|
| 264 |
+
# Funding Statement
|
| 265 |
+
|
| 266 |
+
DSS was supported by the Canada CIFAR AI Chair held by Prof. William Hamilton.
|
| 267 |
+
|
| 268 |
+
# References
|
| 269 |
+
|
| 270 |
+
Berant, J., Chou, A., Frostig, R., and Liang, P. (2013). Semantic parsing on Freebase from questionanswer pairs. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing.
|
| 271 |
+
Bromley, J., Guyon, I., LeCun, Y., Säckinger, E., and Shah, R. (1994). Signature verification using a "siamese" time delay neural network. In Advances in Neural Information Processing Systems.
|
| 272 |
+
Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J. D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., Agarwal, S., Herbert-Voss, A., Krueger, G., Henighan, T., Child, R., Ramesh, A., Ziegler, D., Wu, J., Winter, C., Hesse, C., Chen, M., Sigler, E., Litwin, M., Gray, S., Chess, B., Clark, J., Berner, C., McCandlish, S., Radford, A., Sutskever, I., and Amodei, D. (2020). Language models are few-shot learners. In Advances in Neural Information Processing Systems.
|
| 273 |
+
Chen, D., Fisch, A., Weston, J., and Bordes, A. (2017). Reading Wikipedia to answer open-domain questions. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).
|
| 274 |
+
Clark, C. and Gardner, M. (2018). Simple and effective multi-paragraph reading comprehension. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).
|
| 275 |
+
de Masson d’Autume, C., Ruder, S., Kong, L., and Yogatama, D. (2019). Episodic memory in lifelong language learning. In Advances in Neural Information Processing Systems.
|
| 276 |
+
Dempster, A., Laird, N., and Rubin, D. (1977). Maximum likelihood from incomplete data via the em algorithm. Journal of the Royal Statistical Society, Series B, 1(39), 1–38.
|
| 277 |
+
Devlin, J., Chang, M.-W., Lee, K., and Toutanova, K. (2019). 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).
|
| 278 |
+
Fan, A., Gardent, C., Braud, C., and Bordes, A. (2021). Augmenting Transformers with KNN-Based Composite Memory for Dialog. Transactions of the Association for Computational Linguistics, 9.
|
| 279 |
+
Guu, K., Lee, K., Tung, Z., Pasupat, P., and Chang, M. (2020). Retrieval augmented language model pre-training. In Proceedings of the 37th International Conference on Machine Learning.
|
| 280 |
+
Iyer, S., Min, S., Mehdad, Y., and Yih, W. (2021). Reconsider: Re-ranking using span-focused cross-attention for open domain question answering. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers).
|
| 281 |
+
Izacard, G. and Grave, E. (2021a). Distilling knowledge from reader to retriever for question answering. In International Conference on Learning Representations.
|
| 282 |
+
Izacard, G. and Grave, E. (2021b). Leveraging passage retrieval with generative models for open domain question answering. In Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume.
|
| 283 |
+
|
| 284 |
+
Joshi, M., Choi, E., Weld, D., and Zettlemoyer, L. (2017). TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers).
|
| 285 |
+
|
| 286 |
+
Karpukhin, V., Oguz, B., Min, S., Wu, L., Edunov, S., Chen, D., and Yih, W.-t. (2020). Dense ˘ passage retrieval for open-domain question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP).
|
| 287 |
+
|
| 288 |
+
Khandelwal, U., Levy, O., Jurafsky, D., Zettlemoyer, L., and Lewis, M. (2020). Generalization through memorization: Nearest neighbor language models. In International Conference on Learning Representations.
|
| 289 |
+
|
| 290 |
+
Khandelwal, U., Fan, A., Jurafsky, D., Zettlemoyer, L., and Lewis, M. (2021). Nearest neighbor machine translation. In International Conference on Learning Representations.
|
| 291 |
+
|
| 292 |
+
Khattab, O. and Zaharia, M. (2020). Colbert: Efficient and effective passage search via contextualized late interaction over bert. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval.
|
| 293 |
+
|
| 294 |
+
Kingma, D. P. and Ba, J. (2015). Adam: A method for stochastic optimization. In The 2015 International Conference for Learning Representations.
|
| 295 |
+
|
| 296 |
+
Kwiatkowski, T., Palomaki, J., Redfield, O., Collins, M., Parikh, A., Alberti, C., Epstein, D., Polosukhin, I., Kelcey, M., Devlin, J., Lee, K., Toutanova, K. N., Jones, L., Chang, M.-W., Dai, A., Uszkoreit, J., Le, Q., and Petrov, S. (2019). Natural questions: a benchmark for question answering research. Transactions of the Association of Computational Linguistics.
|
| 297 |
+
|
| 298 |
+
Lee, K., Chang, M.-W., and Toutanova, K. (2019). Latent retrieval for weakly supervised open domain question answering. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics.
|
| 299 |
+
|
| 300 |
+
Lewis, M., Liu, Y., Goyal, N., Ghazvininejad, M., Mohamed, A., Levy, O., Stoyanov, V., and Zettlemoyer, L. (2020a). BART: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics.
|
| 301 |
+
|
| 302 |
+
Lewis, P., Perez, E., Piktus, A., Petroni, F., Karpukhin, V., Goyal, N., Küttler, H., Lewis, M., Yih, W.-t., Rocktäschel, T., Riedel, S., and Kiela, D. (2020b). Retrieval-augmented generation for knowledge-intensive nlp tasks. In Advances in Neural Information Processing Systems.
|
| 303 |
+
|
| 304 |
+
Luan, Y., Eisenstein, J., Toutanova, K., and Collins, M. (2021). Sparse, Dense, and Attentional Representations for Text Retrieval. Transactions of the Association for Computational Linguistics, 9.
|
| 305 |
+
|
| 306 |
+
Min, S., Chen, D., Hajishirzi, H., and Zettlemoyer, L. (2019). A discrete hard EM approach for weakly supervised question answering. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), Hong Kong, China. Association for Computational Linguistics.
|
| 307 |
+
|
| 308 |
+
Paszke, A., Gross, S., Massa, F., Lerer, A., Bradbury, J., Chanan, G., Killeen, T., Lin, Z., Gimelshein, N., Antiga, L., Desmaison, A., Kopf, A., Yang, E., DeVito, Z., Raison, M., Tejani, A., Chilamkurthy, S., Steiner, B., Fang, L., Bai, J., and Chintala, S. (2019). Pytorch: An imperative style, highperformance deep learning library. In H. Wallach, H. Larochelle, A. Beygelzimer, F. d'Alché-Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems.
|
| 309 |
+
|
| 310 |
+
Petroni, F., Rocktäschel, T., Riedel, S., Lewis, P., Bakhtin, A., Wu, Y., and Miller, A. (2019). Language models as knowledge bases? In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP).
|
| 311 |
+
|
| 312 |
+
Qi, P., Zhang, Y., Zhang, Y., Bolton, J., and Manning, C. D. (2020). Stanza: A Python natural language processing toolkit for many human languages. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations.
|
| 313 |
+
|
| 314 |
+
Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., and Liu, P. J. (2020). Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140), 1–67.
|
| 315 |
+
Roberts, A., Raffel, C., and Shazeer, N. (2020). How much knowledge can you pack into the parameters of a language model? In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP).
|
| 316 |
+
Robertson, S. and Zaragoza, H. (2009). The probabilistic relevance framework: Bm25 and beyond. Foundations and Trends in Information Retrieval.
|
| 317 |
+
Sachan, D. S., Patwary, M., Shoeybi, M., Kant, N., Ping, W., Hamilton, W. L., and Catanzaro, B. (2021). End-to-end training of neural retrievers for open-domain question answering. In Joint Conference of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (ACL-IJCNLP).
|
| 318 |
+
Shoeybi, M., Patwary, M., Puri, R., LeGresley, P., Casper, J., and Catanzaro, B. (2019). Megatron-lm: Training multi-billion parameter language models using gpu model parallelism. arXiv preprint arXiv:1909.08053.
|
| 319 |
+
Vaswani, A., Shazeer, N., Parmar, N., Uszkoreit, J., Jones, L., Gomez, A. N., Kaiser, Ł., and Polosukhin, I. (2017). Attention is all you need. In Advances in Neural Information Processing Systems.
|
| 320 |
+
Wang, S., Yu, M., Guo, X., Wang, Z., Klinger, T., Zhang, W., Chang, S., Tesauro, G., Zhou, B., and Jiang, J. (2018). R3: Reinforced ranker-reader for open-domain question answering. In AAAI.
|
| 321 |
+
Wang, Z., Ng, P., Ma, X., Nallapati, R., and Xiang, B. (2019). Multi-passage BERT: A globally normalized BERT model for open-domain question answering. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP).
|
| 322 |
+
Yih, W.-t., Toutanova, K., Platt, J. C., and Meek, C. (2011). Learning discriminative projections for text similarity measures. In Proceedings of the Fifteenth Conference on Computational Natural Language Learning.
|
| 323 |
+
Yogatama, D., de Masson d’Autume, C., and Kong, L. (2021). Adaptive Semiparametric Language Models. Transactions of the Association for Computational Linguistics, 9, 362–373.
|
| 324 |
+
|
| 325 |
+
# Checklist
|
| 326 |
+
|
| 327 |
+
1. For all authors...
|
| 328 |
+
|
| 329 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] Please see the model (§2) and result (§3) sections that solidify the claims made in the abstract and introduction sections.
|
| 330 |
+
(b) Did you describe the limitations of your work? [Yes] Please see limitations in $\ S$ .
|
| 331 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] Please see negative societal impact in $\ S 5$ .
|
| 332 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 333 |
+
|
| 334 |
+
2. If you are including theoretical results...
|
| 335 |
+
|
| 336 |
+
(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]
|
| 337 |
+
|
| 338 |
+
3. If you ran experiments...
|
| 339 |
+
|
| 340 |
+
(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] We include the code, data, and instructions in the supplemental material and $\ S$ .
|
| 341 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] We specify these details in the appendix included in the supplementary material.
|
| 342 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] Our experiments are compute expensive and it is not feasible to perform multiple runs of the same experiment with different seeds. All our training runs use the same seed value (1234). As an alternative to running multiple seeds, we perform a number of ablation studies (§3.5).
|
| 343 |
+
(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] Please see $\ S 3 . 2$ under hardware and library.
|
| 344 |
+
|
| 345 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 346 |
+
|
| 347 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] Please see $\ S 3 . 1$ for the details.
|
| 348 |
+
(b) Did you mention the license of the assets? [Yes] Our work is based on open-source data and framework. When applicable, we describe the license information in the appendix.
|
| 349 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] We include our code in the supplementary material.
|
| 350 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 351 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 352 |
+
|
| 353 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 354 |
+
|
| 355 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 356 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 357 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/5L8XMh667qz/5L8XMh667qz.md
ADDED
|
@@ -0,0 +1,392 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ENCODED PRIOR SLICED WASSERSTEIN AUTOENCODER FOR LEARNING LATENT MANIFOLD REPRESENTATIONS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
While variational autoencoders have been successful in a variety of tasks, the use of conventional Gaussian or Gaussian mixture priors are limited in their ability to encode underlying structure of data in the latent representation. In this work, we introduce an Encoded Prior Sliced Wasserstein AutoEncoder (EPSWAE) wherein an additional prior-encoder network facilitates learns an embedding of the data manifold which preserves topological and geometric properties of the data, thus improving the structure of latent space. The autoencoder and prior-encoder networks are iteratively trained using the Sliced Wasserstein (SW) distance, which efficiently measures the distance between two arbitrary sampleable distributions without being constrained to a specific form as in the KL divergence, and without requiring expensive adversarial training. To improve the representation, we use (1) a structural consistency term in the loss that encourages isometry between feature space and latent space and (2) a nonlinear variant of the SW distance which averages over random nonlinear shearing. The effectiveness of the learned manifold encoding is best explored by traversing the latent space through interpolations along geodesics which generate samples that lie on the manifold and hence are advantageous compared to standard Euclidean interpolation. To this end, we introduce a graph-based algorithm for interpolating along network-geodesics in latent space by maximizing the density of samples along the path while minimizing total energy. We use the 3D-spiral data to show that the prior does indeed encode the geometry underlying the data and to demonstrate the advantages of the network-algorithm for interpolation. Additionally, we apply our framework to MNIST, and CelebA datasets, and show that outlier generations, latent representations, and geodesic interpolations are comparable to the state of the art.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Generative models have the potential to capture rich representations of data and use them to generate realistic outputs. In particular, Variational AutoEncoders (VAEs) (Kingma & Welling, 2014) can capture important properties of high-dimensional data in their latent embeddings, and sample from a prior distribution to generate realistic images. Whille VAEs have been very successful in a variety of tasks, the use of a simplistic standard normal prior is known to cause problems such as under-fitting and over-regularization, and fails to use the network’s entire modeling capacity (Burda et al., 2016). Gaussian or Gaussian mixture model (GMM) priors are also limited in their ability to represent geometric and topological properties of the underlying data manifold. High-dimensional data can typically be modeled as lying on or near an embedded low-dimensional, nonlinear manifold (Fefferman et al., 2016). Learning improved latent representations of this nonlinear manifold is an important problem, for which a more flexible prior may be desirable.
|
| 12 |
+
|
| 13 |
+
Conventional variational inference uses Kullback-Leibler (KL) divergence as a measure of distance between the posterior and the prior, restricting the prior distribution to cases that have tractable approximations of the KL divergence. Many works such as Guo et al. (2020); Tomczak & Welling (2018); Rezende & Mohamed (2015) etc. have investigated the use of more complicated priors (notably GMMs) which lead to improved latent representation and generation compared to a single Gaussion prior. Alternate approaches such as adversarial training learn arbitrary priors by using a discriminator network to compute a divergence (Wang et al., 2020), however they are reported to be harder to train and are computationally expensive.
|
| 14 |
+
|
| 15 |
+
In this work, we introduce the Encoded Prior Sliced Wasserstein AutoEncoder (EPSWAE), which consists of a conventional autoencoder architecture and an additional prior-encoder network that learns an unconstrained prior distribution that encodes the geometry and topology of any data manifold. We use a type of Sliced Wasserstein (SW) distance (Bonnotte, 2013; Bonneel et al., 2015), a concept from optimal transport theory that is a simple and convenient alternative to the KL divergence for any sampleable distributions. A Sliced Wasserstein AutoEncoder (SWAE) that regularizes an autoencoder using SW distance was proposed in Kolouri et al. (2018a). Several works improve the SW distance through additional optimizations (Deshpande et al., 2019; Chen et al., 2020b; Deshpande et al., 2018), and show improved generation, however involve additional training and use a fixed (usually Gaussian) prior. Kolouri et al. (2019) presents a comparison between max-SW distance, polynomial generalized SW distances, and their combinations. In contrast, we use a simple and efficient nonlinear shearing which requires no additional optimization.
|
| 16 |
+
|
| 17 |
+
Additionally, we introduce a structural consistency term that encourages the latent space to be isometric to the feature space, which is typically measured at the output of the convolutional layers of the data encoder. Variants of this penalty have previously been used to encourage isometry between the latent space and data space (Yu et al., 2013; Benaim & Wolf, 2017; Sainburg et al., 2018). The structural consistency term further encourages the prior to match the encoded data manifold by preserving feature-isometry, which in turn is expected to assist with encoding the geometry of the data manifold , thus leading to improved latent representations.
|
| 18 |
+
|
| 19 |
+
A key contribution of our work is the graph-based geodesic-interpolation algorithm. Conventionally, VAEs use Euclidean interpolation between two points in latent space. However, since manifolds typically have curvature, this is an unintuitive distance metric that can lead to unrealistic intermediate points. Our goal is to learn a true representation of the underlying data manifold, hence it is natural to interpolate along the manifold geodesics in latent space. Several works such as Shao et al. (2018); Miolane & Holmes (2020b) endow the latent space with a Riemannian geometry and measure corresponding distances, however these are difficult and involve explicitly solving expensive ordinary differential equations. In this work, we introduce ‘network-geodesics’, a graph-based method for interpolating along a manifold in latent space, that maximizes sample density along paths while minimizing total energy. This involves first generating a distance graph between samples from the prior. Then this network is non-uniformly thresholded such that the set of allowable paths from a given sample traverse high density regions through short hops. Lastly, we use a shortest path algorithm like Dijkstra’s algorithm (Dijkstra, 1959) to identify the lowest ‘energy’ path between two samples through the allowable paths. Since the prior is trained to learn the data manifold, the resulting network-geodesic curves give a notion of distance on the manifold and can be used to generate realistic interpolation points with relatively few prior samples.
|
| 20 |
+
|
| 21 |
+
The novel contributions of this work are:
|
| 22 |
+
|
| 23 |
+
• We introduce a novel architecture, EPSWAE, that consists of a prior-encoder network that is efficiently trained (without expensive adversarial methods) to generate a prior that encodes the geometric and topological properties of data. We introduce a novel graph-based method for interpolating along network-geodesics in latent space through maximizing sample density while minimizing total energy. We show that it generates natural interpolations through realistic images.
|
| 24 |
+
• Improvements to the latent space representation are obtained by using a structural consistency term in the loss that encourages isometry between feature space and latent space and by using a simple and efficient nonlinear variant of the SW distance.
|
| 25 |
+
|
| 26 |
+
# 2 BACKGROUND AND RELATED WORK
|
| 27 |
+
|
| 28 |
+
Several works have attempted to increase the complexity of the prior in order to obtain better latent representations. Most data can mathematically be thought of as living on a high dimensional manifold. In an image dataset, for instance, if images in high dimensional pixel space are effectively parametrized using a small number of continuous variables, they will lie on or near a low dimensional manifold (Lu et al., 1998). Many works such as Weinberger & Saul (2006); Rahimi et al.
|
| 29 |
+
|
| 30 |
+
(2005) have investigated image and video manifolds. Encoding and exploiting the topological and geometric properties of such data is a question of increasing interest.
|
| 31 |
+
|
| 32 |
+
Some representative works are Dilokthanakul et al. (2016) which shows improved unsupervised clustering of latent space by using GMM priors, Takahashi et al. (2019) which uses the density ratio trick to calculate the KL divergence using implicit priors, Rezende & Mohamed (2015), which maps a Gaussian prior by a series of explicit transformations, Guo et al. (2020) which learns a GMM prior using an approximate ELBO, Goyal et al. (2017) which uses a hierarchical Bayesian framework, and VampPrior Tomczak & Welling (2018) which learns a two-layer hierarchical GMM from aggregated posteriors. Yin & Zhou (2018); Molchanov et al. (2019); Liutkus et al. (2019) expand the variational family to incorporate implicit variational distributions while providing exact theoretical support.
|
| 33 |
+
|
| 34 |
+
The KL divergence is tractable only for Gaussian distributions, however the Wasserstein distance of 1D projections (also called Sliced Wasserstein (SW) distance) has a closed-form for any arbitrary distribution (Kolouri et al., 2018b). Wasserstein distances (Villani, 2003) have several of the same properties as KL divergence, but often lead to better sampling (Gulrajani et al., 2017; Tolstikhin et al., 2018), and have been used in several machine learning applications (e.g. Arjovsky et al. (2017); Tolstikhin et al. (2018); Kolouri et al. (2018b)).
|
| 35 |
+
|
| 36 |
+
A Sliced Wasserstein AutoEncoder (SWAE) that regularizes an autoencoder using SW distance was proposed in Kolouri et al. (2018a). There exist several variants of SW distance that have been successful at improving generative ability - for example, Deshpande et al. (2018); Chen et al. (2020b) train discriminator-like networks to perform nonlinear transformations (instead of purely linear projections) whereas Deshpande et al. (2019) introduces max-SW distance, which looks for the best linear projection, generalized in Nguyen et al. (2020) to finding optimal distributions of projections. Wu et al. (2019) uses a different optimization approach to computing the SW distance based on the Kantorovich dual formulation. All of the above use some form of additional training. In contrast, we use a simple and efficient nonlinear shearing which requires no additional optimization and is sufficient for improving latent representation, however, our method can easily incorporate other SW distances if desired.
|
| 37 |
+
|
| 38 |
+
Alternatively, many works such as Wang et al. (2020); Makhzani et al. (2015); Arjovsky et al. (2017); Sainburg et al. (2018) replace the KL divergence with an adversarial loss, however adversarial methods tend to be significantly more expensive and difficult to optimize. In higher dimensions, using a discriminator network as in adversarial approaches is a natural way of implicitly computing an equivalent of the Wasserstein-1 distance (Arjovsky et al., 2017; Tolstikhin et al., 2018). However, using the SW distance is much simpler and more efficient. Adversarial training for interpolation in Sainburg et al. (2018) uses a structural consistency term that encourages relative distances in data space to be preserved in latent space. Similar distance-preserving terms have also been used successfully in Yu et al. (2013); Benaim & Wolf (2017), however Euclidean distances in data space can be a poor measure of the natural geometry of the data. In our work, we preserve relative distances in latent space and feature space to improve latent encoding, where features are extracted at the output of the last convolutional layer in the data encoder.
|
| 39 |
+
|
| 40 |
+
Several manifold learning techniques such as Dollar et al. (2007); Weinberger & Saul (2006) com-´ pute embeddings of high-dimensional data but are less general and lack generative or interpolation abilities. The hyperspherical VAE Davidson et al. (2018) outperforms the standard VAE for data residing on a hyperspherical manifold. Miolane & Holmes (2020a) formulates a Riemannian VAE, however computing its ELBO is challenging. Along similar lines, Arvanitidis et al. (2017) shows that under certain conditions, a Riemannian metric is naturally induced in the latent space, and uses it to compute geodesics. In Chen et al. (2020a), a flat manifold is approximated by penalizing curvature in latent space, and geodesics are defined through Euclidean distances on the flat manifold.
|
| 41 |
+
|
| 42 |
+
There exists limited work on integrating graphical structures with generative models (Kipf & Welling, 2016). Hadjeres et al. (2017) studies monophonic music using a latent space geodesic regularization that allows interpolations in the latent space to be more meaningful, giving a notion of geodesic distance. Several approaches such as Tenenbaum et al. (2000); Bernstein et al. (2000); Klein & Zachmann (2004); Memoli & Sapiro (2005); Luo & Hu (2020) approximate geodesics on ´ point clouds by, for instance, building a nearest-neighbor network on the manifold and applying a shortest path algorithm, however, these often require many samples in order generate reasonable approximations and aren’t robust to noise (Sober et al., 2020). Inspired by this, we introduce an energy-based network algorithm to identify network-geodesics in latent space with relatively few, noisy samples.
|
| 43 |
+
|
| 44 |
+
# 3 EPSWAE
|
| 45 |
+
|
| 46 |
+
# 3.1 NONLINEAR SLICED WASSERSTEIN DISTANCE
|
| 47 |
+
|
| 48 |
+
Wasserstein distances are a natural metric for measuring distances between probability distributions, however they xare difficult to compute in dimensions two and higher. The Sliced Wasserstein distance $d _ { S W }$ averages over the Wasserstein distance of 1D projections (see Appendix A for derivation). Several works (e.g. Kolouri et al. (2019); Deshpande et al. (2019)) discuss why a conventional SW distance may be sub-optimal as a large number of linear projections may be required to distinguish two distributions. In this work we use a Nonlinear Sliced Wasserstein distance $( d _ { N S W } )$ , an averaging procedure over (random) nonlinear 1D projections, between two distributions $\mu$ and $\nu$ defined as:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
d _ { N S W } ( \mu , \nu ) = \mathbb { E } d _ { S W } ( \mathcal { N } _ { * } ^ { \zeta , \gamma } \mu , \mathcal { N } _ { * } ^ { \zeta , \gamma } \nu ) \approx \frac { 1 } { L } \sum _ { \ell = 1 } ^ { L } d _ { S W } ( \mathcal { N } _ { * } ^ { \zeta _ { \ell } , \gamma _ { \ell } } \mu , \mathcal { N } _ { * } ^ { \zeta _ { \ell } , \gamma _ { \ell } } \nu )
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
where $L$ is the number of nonlinear transformations, and $\zeta , \gamma$ are chosen to be normal random variables with mean 0, and variance matching that of $\mu$ , and $\mathcal { N }$ is defined below. We define the “push-forward” (also known as “random variable transform”) as follows: given any function $f :$ $X Z$ and probability measure $\mu$ , we define $f _ { * } \mu ( A ) = \mu ( f ^ { - 1 } ( A ) )$ for all $A \subset Z$ measurable. Most importantly, to generate samples of $z \sim f _ { * } \mu$ one simply generates $x \sim \mu$ and defines $z =$ $f ( x )$ .
|
| 55 |
+
|
| 56 |
+
The nonlinear transformations are related to a special case of the generalized SW distance (Kolouri et al., 2019) (with the difference that we choose distribution-dependent shear frequencies that are most likely to produce deformations which highlight differences in the measures, thus breaking the homogeneity condition H2 in Kolouri et al. (2019)), and are given by
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\begin{array} { r } { \mathcal { N } ^ { \zeta _ { \ell } , \gamma _ { \ell } } ( x ) = x + \zeta _ { \ell } \sin ( \gamma _ { \ell } \cdot x ) . } \end{array}
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
In all our experiments, we use $L = 5$ nonlinear transformations with 50 linear 1D projections each. Several works such as Deshpande et al. (2018; 2019); Wu et al. (2019); Nguyen et al. (2020); Chen et al. (2020b) improve the SW distance through some form of optimization or training an additional discriminator-like network, and show improved generative results (with Deshpande et al. (2018) being the most similar to our method). We did not implement these other variants, however they could easily be used in conjunction with our method. Our choice of nonlinearity is motivated by certain tail-behavior considerations (such as boundedness and non-saturation of nonlinearity), along with computational efficiency, and for our goals, a simple nonlinearity was sufficient. See section 4.2 and Appendix E for computational time and loss comparisons with some other nonlinearities discussed in Kolouri et al. (2019). For further discussion on NSW distance and derivation see Appendix A.
|
| 63 |
+
|
| 64 |
+
# 3.2 ALGORITHM DETAILS
|
| 65 |
+
|
| 66 |
+
In the Encoded Prior Sliced Wasserstein AutoEncoder (EPSWAE) (see Fig. 1 for schematic), let’s define the data encoder as $\Psi _ { E }$ , the decoder $\Psi _ { D }$ , and the prior-encoder as $\Psi _ { P E }$ , each with parameters $\phi _ { E } , \phi _ { D } , \phi _ { P E }$ respectively. Input samples $\mathbf { x } ^ { ( j ) } \sim P _ { X }$ , where $P _ { X }$ is the probability distribution of the input data, are passed through $\Psi _ { E }$ to generate posterior samples $\mathbf { z } ^ { ( j ) } \sim ( \Psi _ { E } ) _ { * } P _ { X }$ by setting $\mathbf { z } ^ { ( j ) } =$ $\Psi _ { E } ( \mathbf { x } ^ { ( j ) } )$ . Similarly, prior-encoder input samples $\xi ^ { ( j ) } \sim \mu$ , where $\mu$ is the probability distribution of the input to the prior-encoder (chosen to be a mixture of Gaussians) from a distribution, are passed through $\Psi _ { P E }$ to generate prior samples $\mathbf { y } ^ { ( j ) } \sim ( \Psi _ { P E } ) _ { * } \mu$ by setting $\mathbf { y } ^ { ( j ) } = \Psi _ { P E } ( \xi ^ { ( j ) } )$ . The priorencoder network and the autoencoder (data encoder and decoder) network are trained iteratively in a two step process:
|
| 67 |
+
|
| 68 |
+
1. Given a minibatch, parameters of the autoencoder $( \phi _ { E } , \phi _ { D } )$ are trained for $k _ { 1 }$ steps while parameters of the prior encoder $( \phi _ { P E } )$ are fixed. The loss function for the autoencoder consists of the reconstruction error, the NSW distance, and a Feature Structural Consistency (FSC) term $\mathcal { L } _ { F S C }$ (given in Eqn. 4):
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\mathcal { L } _ { A E } = \alpha \mathbb { E } _ { { \mathbf { x } } \sim P _ { X } } \mathcal { L } _ { r e c } \left( { \mathbf { x } } , \bar { \mathbf { x } } \right) + \beta d _ { N S W } ( ( \Psi _ { E } ) _ { * } P _ { X } , ( \Psi _ { P E } ) _ { * } \mu ) + \kappa \mathcal { L } _ { F S C } ,
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
where $\bar { \mathbf { x } } = \Psi _ { D } \big ( \Psi _ { E } ( \mathbf { x } ) \big )$ is the autoencoder output. Note that $d _ { N S W }$ is efficiently computed just from samples of the distributions.
|
| 75 |
+
In this measure theoretic notation, $( \Psi _ { E } ) _ { * } P _ { X }$ is the posterior distribution (denoted as $q _ { \phi _ { E } } ( z | x )$ in Bayesian literature), and $\left( \Psi _ { P E } \right) _ { * } \mu$ is the prior distribution (denoted as $p _ { \phi _ { P E } } ( z )$ in Bayesian literature). Similar to $\beta$ -VAE ((Higgins et al., 2016)), the hyperparameters $\alpha , \beta , \kappa$ are tuneable; in our experiments they are fixed, but it could be advantageous to have them vary over training epochs.
|
| 76 |
+
$\mathcal { L } _ { F S C }$ encourages relative distances in feature space to be preserved in latent space, where features are extracted at the output of the last convolutional layer in the encoder (or at input data if no convolutional layers are present). $\mathcal { L } _ { F S C }$ (adapted from Sainburg et al. (2018)) for two point clouds $F = [ f _ { 1 } , \dots f _ { N } ]$ in feature space and the corresponding points $Z = [ z _ { 1 } , \dotsc z _ { N } ]$ in latent space in a minibatch of size $N$ is given by:
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\mathcal { L } _ { F S C } = \frac { 1 } { N ^ { 2 } } \sum _ { \ell , j = 1 } ^ { N } \left( \log \left( 1 + \frac { \| f _ { j } - f _ { \ell } \| ^ { 2 } } { \frac { 1 } { N ^ { 2 } } \sum _ { m , n } \| f _ { m } - f _ { n } \| ^ { 2 } } \right) - \log \left( 1 + \frac { \| z _ { j } - z _ { \ell } \| ^ { 2 } } { \frac { 1 } { N ^ { 2 } } \sum _ { m , n } \| z _ { m } - z _ { n } \| ^ { 2 } } \right) \right) ^ { 2 } .
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
2. In the second step of minimization, the parameters of the prior-encoder $( \Psi _ { P E } )$ are trained for $k _ { 2 }$ steps while parameters of the autoencoder $( \phi _ { E } , \phi _ { D } )$ are fixed. The loss function for the prior-encoder consists of the NSW distance between the prior and posterior:
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\mathcal { L } _ { P E } ( \mathbf { x } ) = d _ { N S W } ( ( \Psi _ { E } ) _ { * } P _ { X } , ( \Psi _ { P E } ) _ { * } \mu ) .
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
The pseudocode is outlined in Appendix B. Additional architecture and training details for the experiments in this paper are in Appendix C.
|
| 89 |
+
|
| 90 |
+
# 3.3 INTERPOLATION AND APPROXIMATE GEODESICS
|
| 91 |
+
|
| 92 |
+
EPSWAE attempts to learn a representation of the embedded manifold geometry that the data lies along. The question arises: how does one make use of this representation? A natural way of interpolating data which lies on a manifold is through geodesics or paths on the manifold which traverse dense regions. Here we present a network algorithm for efficiently approximating networkgeodesics with relatively few, noisy samples from the prior, by encouraging connections through high density regions of latent space while minimizing total energy.
|
| 93 |
+
|
| 94 |
+
1. Gather samples of the posterior $( \Psi _ { E } ) _ { * } P _ { X }$ , i.e., $\Psi _ { E } ( x )$ with $x$ is a minibatch of data. Additional prior samples can be used to supplement this if desired;
|
| 95 |
+
2. For each sample $j$ , compute the average Euclidean distance $c _ { j }$ of the $\mathbf { k }$ -nearest neighbors;
|
| 96 |
+
3. Generate a thresholded network: Let samples be represented as nodes. For a given threshold value $t$ , sample $j$ is connected to sample $i$ with edge weight $d ^ { h } ( i , j )$ if $d ( \bar { i } , j ) < t \cdot c _ { j }$ . Here $h$ is the energy parameter in the edge weight (chosen to be 1 or 2 in experiments, with $h = 2$ encouraging shorter hops). Sample-specific thresholding, i.e., thresholding dependent on $c _ { j }$ , increases the probability of a ‘central’ node having a connection. Thus, this encourages (1) paths through high density regions, i.e., high-degree nodes, and (2) traversal of latent space through short hops as a consequence of localization of paths, i.e., paths existing only between nearby points due to thresholding.
|
| 97 |
+
4. Continue increasing $t$ until the graph is connected, i.e., there exists a path, direct or indirect, from every sample to every other sample. Then, use Dijkstra’s algorithm (Dijkstra,
|
| 98 |
+
1959) to identify network-geodesics with least total energy through allowable paths on the thresholded network.
|
| 99 |
+
|
| 100 |
+
# 4 EXPERIMENTS
|
| 101 |
+
|
| 102 |
+
We run experiments using EPSWAE on three datasets. First, we use a 3D spiral data, where the latent space can be visualized easily, to demonstrate that the learned prior captures the geometry of the 3D spiral. We also present here the advantages of the network-geodesic interpolation over linear interpolation. Then we present interpolation and generation results on the MNIST (LeCun et al., 2010) and CelebA (Liu et al., 2018) datasets.
|
| 103 |
+
|
| 104 |
+

|
| 105 |
+
Figure 1: (a) is a schematic of the EPSWAE architecture. The red arrows indicate calculation of the loss terms. The prior-encoder generates a prior in latent space. (b) is simple example of a shape where interpolating between points A and B ‘through the manifold’ (red dashed line through point C) is desired, since linear interpolation (black line) leads out of the concave hull.
|
| 106 |
+
|
| 107 |
+
In all of the experiments, the prior-encoder $\Psi _ { P E }$ consists of three fully connected hidden layers with ReLU activation. A sampleable distribution with dimension larger than the dimension of latent space is input to the prior-encoder which yields the prior. In principle, samples from any distribution can be the input $\mu$ to the prior-encoder. In the artificial data set we use a normal distribution, whereas for MNIST and CelebA we use a mixture of 10 Gaussians with random i.i.d means (from Gaussian with $\sigma = 2$ ). The schematic of the architecture is presented in Fig. 1(a). Note that the specifics of the layers shown in this schematic are for the image datasets MNIST and CelebA, the 3D Spiral data does not have convolutional layers. Details of the architecture, training, and hyperparameters for each dataset are given in Appendix C. The optimizer Adam (Kingma & Ba, 2014) with a learning rate of 0.001 was used for learning in both networks: the prior-encoder and the autoencoder.
|
| 108 |
+
|
| 109 |
+
# 4.2 LEARNING A LATENT MANIFOLD
|
| 110 |
+
|
| 111 |
+
We consider a 3D spiral randomly embedded to 40D space with noise as follows: (a) The formula for the spiral is given by $( x ( t ) , \dot { y } ( t ) , z ( t ) ) = ( t \cos 7 \dot { t } \pi / 4 , t \sin 7 t \pi / 4 , 2 t )$ , (b) a random $4 0 \times 3$ matrix is generated with i.i.d normal entries to map the spiral into $\mathbb { R } ^ { 4 0 }$ , and (c) Gaussian noise with standard deviation 0.1 is added. The input to the prior-encoder is a Gaussian in $\mathbb { R } ^ { 4 0 }$ , and the latent space is $\mathbb { R } ^ { 3 }$ . For these tests, the data encoder, prior-encoder, and decoder all consist of three Fully Connected (FC) layers with 40 nodes each and ReLU activations.
|
| 112 |
+
|
| 113 |
+

|
| 114 |
+
Figure 2: (a) side view and (b) top view of samples of the prior (green) and posterior (blue) in 3D latent space generated by EPSWAE after 100 epochs on the high dimensional input. The red line shows the interpolation along network-geodesics between two prior samples. The brown line shows the trajectory of linear interpolation between two points on the spiral.
|
| 115 |
+
|
| 116 |
+
As seen in Figure 2, after training, the posterior matches the spiral almost exactly and the prior learns the geometry of the spiral. A Nonlinear Sliced Wasserstein (NSW) distance and structural consistency term (where latent space is isometric with data space since convolutional layers aren’t used) are used in the loss in Eqns. 3 and 5. A comparison highlighting the effects of these terms is shown in Fig. 5 in the Appendix D. We observe that the use of the NSW distance (as opposed to linear SW distance) improves the accuracy of the learned prior.
|
| 117 |
+
|
| 118 |
+
Manifold interpolation (in red in Fig. 2) uses the network-algorithm outlined in section 3.3. The interpolation is seen to have the desired form on the manifold, i.e., it approximates geodesics on the manifold. The larger the number of samples of the prior, the smoother the corresponding interpolation. In contrast, linear interpolation (brown line) between two points on the spiral does not capture the geometry at all, and goes through regions that are largely empty and untrained. In higher dimensional datasets, this may result in unrealistic interpolation. In order to traverse the manifold, both the prior-encoder (that allows the prior to capture the geometry of the spiral), and the networkinterpolation algorithm are equally essential. Comparisons with baselines SWAE (Kolouri et al., 2018a) and VAE (Kingma & Welling, 2014) are shown in Appendix Fig. 6, and EPSWAE is seen to significantly outperform them in learning an improved latent representation.
|
| 119 |
+
|
| 120 |
+
Computational cost The choice of nonlinearity was, in part, motivated by computational efficiency and simplicity, i.e., not requiring additional optimizations every evaluation or the training of a discriminator-like network to select optimal transformations. Our sinusoidal shear nonlinearity is closely related to a special case of the generalized SW distance defined in Kolouri et al. (2019) (see discussion in section 3.1 for differences ). Here, we present a comparison of computational time with two polynomial-type nonlinearities discussed in Kolouri et al. (2019) - cubic and quintic. Computations done on a laptop with Intel Core i7-10710 CPU, 16GB RAM, and computed over 1000 runs. In practice, the losses were indistinguishable with choice of nonlinearity (see Appendix E), whereas the sine shear is slightly less expensive (see Table 1). However, the complexity of cubic and quintic nonlinearities are exponential in dimension and hence are impractical for larger data.
|
| 121 |
+
|
| 122 |
+
Table 1: Comparison of computational time for nonlinearities in SW distance.
|
| 123 |
+
|
| 124 |
+
<table><tr><td>sine-shear NSW</td><td></td><td>cubic NSW</td><td>quintic NSW</td></tr><tr><td>Computational Cost</td><td>0.0050s ±0.0006s</td><td>0.0054s±0.0007s</td><td>0.0060s ± 0.0008s</td></tr></table>
|
| 125 |
+
|
| 126 |
+
In order to demonstrate one of the advantages of using a prior encoder in improving latent structure, we consider generation with an increased probability of sampling from outliers, i.e., by increasing the standard deviation of the distribution that feeds into the prior encoder. Studying generation from outliers may seem nonstandard, however, it is informative in the study of how data is encoded in the latent space. In Fig. 3 compare our results with the baseline SWAE (Kolouri et al., 2018a) in order to assess the effect of the prior encoder in improving latent structure. It is worth noting that while there exist several recent works that build upon SWAE for better generation, they do not attempt to solve the same problem as ours (learning latent manifolds). As seen in Fig. 3, the behavior of SWAE and EPSWAE at outliers is very different. For large $\sigma$ , SWAE tends to generate unrealistic faces with distorted colorations, whereas EPSWAE is more likely to generate realistic faces (albiet with increased mode collapse at large $\sigma$ ). We see that EPSWAE encodes coherent information in a large region of latent space as a consequence of nonlinear transformations through the prior encoder. Since we are not competing with state of the art in generation here, we use downsized images and a small, unsophisticated model compared to state of the art methods.
|
| 127 |
+
|
| 128 |
+
Both SWAE and EPSWAE use the same data encoder and decoder, and are independently optimized: the encoder is (after downsizing CelebA images to $6 4 x 6 4$ ) Conv (3,16,3) BatchNorm $ \mathrm { { R e L u } } \mathrm { { M a x P o o l } } ( 2 , 2 ) \mathrm { { C o n v } ( 1 6 , 3 2 , 3 ) \mathrm { { B a t c h N o r m } \mathrm { { R e L u } } \mathrm { { M a x P o o l } } } }$ $( 2 , 2 ) $ Conv $( 3 2 , 6 4 , 3 ) ~ ~ \mathrm { { B a t c h N o r m } ~ ~ \mathrm { { R e L u } ~ f o l } }$ llowed by two FC layers of 512 and 256 nodes respectively with a leaky ReLu nonlinearity and the decoder is the reverse (replace Conv layers with Conv-transpose and MaxPool with Upsample). The prior-encoder consists of three FC layers from $1 8 6 \mathrm { D } 1 2 8 \mathrm { D }$ latent space. See Appendix C for more details and hyperparameter values.
|
| 129 |
+
|
| 130 |
+

|
| 131 |
+
Figure 3: Images generated after 100 epochs from prior samples in (a) EPSWAE (b) Baseline SWAE at increasing standard deviations $\sigma$ , i.e., progressively more ‘outlying’.
|
| 132 |
+
|
| 133 |
+
We also present a comparison with SWAE on CelebA generation from samples around the mean in Appendix G, and find that EPSWAE sees a marginal improvement in the quality of faces. Generation on MNIST using EPSWAE (and comparisons with SWAE (Kolouri et al., 2018a) and VAE (Kingma & Welling, 2014)) are shown in Appendix F. MNIST results are obtained with $5 D$ latent space. EPSWAE generation is more natural, whereas both other baselines generate some bloated and unidentifiable numbers.
|
| 134 |
+
|
| 135 |
+
Table 2: FID score comparison generated with 10000 samples (lower is better)
|
| 136 |
+
|
| 137 |
+
<table><tr><td>SWAE</td><td>EPSWAE (bl)</td><td>EPSWAE(FSConly)</td><td>EPSWAE (NSW only)</td><td>ESPWAE (FSC +NSW)</td></tr><tr><td>178.04</td><td>161.55</td><td>162.14</td><td>161.06</td><td>157.86</td></tr></table>
|
| 138 |
+
|
| 139 |
+
For completeness, in Table 4.3 we present Frechet Inception Distance (FID) (Salimans et al., 2016) scores with 10000 images with $\sigma = 1$ (code from Seitzer (2020)). It is important to note that one can have good generation, despite learning a poor latent representation (and vice-versa), so scores like FID may not be the best way to evaluate the latent structure. However, comparison between SWAE and EPSWAE-baseline(bl) indicate that the prior-encoder significantly improves generation.
|
| 140 |
+
|
| 141 |
+
Computational cost : The computational cost of the different terms in the EPSWAE loss on the CelebA dataset is as follows: (1) FSC computation: $0 . 0 0 0 6 6 s \pm 0 . 0 0 0 1 s$ , (2) linear SW distance computation: $0 . 0 1 5 6 1 s \pm 0 . 0 0 0 5 s$ (3) sine-shear NSW computation: $0 . 0 1 5 0 s \pm 0 . 0 0 0 7 s$ (with same number of total projections). All computations for CelebA were done on a workstation with one NVIDIA Tesla P100 GPU, two Intel Xeon E5-26660v4 CPUs, and 64Gb RAM.
|
| 142 |
+
|
| 143 |
+
# 4.4 INTERPOLATION
|
| 144 |
+
|
| 145 |
+
In this paper, we introduce a graph-based algorithm that interpolates over network-geodesics in curved latent manifolds, thus capturing properties of the geometry. Here we show that we obtain smooth interpolation using the network-geodesics algorithm, in contrast with linear interpolations that often tend to generate unrealistic intermediate images.
|
| 146 |
+
|
| 147 |
+
The start and end points correspond to real images (posterior samples). Figure 4(a) presents a comparison of linear interpolation (top) vs interpolation through network-geodesics (bottom) described in section 3.3 on CelebA. One can see that linear interpolations often go through unrealistic images (this corresponds to regions in latent space where training is limited), whereas geodesic interpolations go through more realistic and less blurry faces. This also serves as evidence, that the latent space for CelebA contains some natural structure that can be exploited.
|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
Figure 4: (a) Comparison of linear vs geodesic interpolation using EPSWAE. The top row of each row-pair is linear, and the bottom is geodesic-interpolation. (b) Randomly chosen instances for geodesic interpolations for MNIST and CelebA. The first and last images are reconstructions of real data, and the interpolations traverse through samples of the prior using the network-geodesic algorithm. A total of 400 samples are used in all cases.
|
| 151 |
+
|
| 152 |
+
Figure 4 (b) shows examples of interpolations on MNIST and CelebA datasets. MNIST interpolations are smooth and intuitive, for instance, in the bottom left MNIST panel in Fig. 4(b), the top part of a ‘7’ first changes to a $\mathbf { \nabla } ^ { 6 } 9 ^ { \bullet }$ naturally, followed by transformation of the $\cdot 9 ^ { \cdot }$ to a $\cdot _ { 4 } ,$ . Interpolation along network-geodesics ensures that reconstructions of intermediate samples are realistic. Interpolations on CelebA are smooth and pass through intermediate images that could arguably pass for celebrities these days. The state of the art interpolations along network-geodesics on the manifold indicate that the learned prior does indeed encode the data manifold. For all interpolations shown in Fig. 4, we use energy parameter $h = 2$ . Comparisons between interpolations corresponding to $h = 1$ and $h = 2$ are presented in Appendix 10. In experiments, energy parameter is not found to have a significant impact on the quality of interpolations. Additionally, comparisons of linear interpolation between equivalent networks of EPSWAE and SWAE are presented in Appendix I.
|
| 153 |
+
|
| 154 |
+
# 5 CONCLUSION
|
| 155 |
+
|
| 156 |
+
We introduce the Encoded Prior Sliced Wasserstein AutoEncoder (EPSWAE) that learns improved latent representations through training an encoded prior to approximate an embedding of the data manifold that preserves geometric and topological properties. The learning of an arbitrary shaped prior is facilitated by the use of the Sliced Wasserstein distance, which can be efficiently computed from samples only. We use a nonlinear variant of SW distance to capture differences between two distributions more efficiently, and employ a feature structural consistency term to improve the latent space representation. Finally, we introduce an energy-based algorithm to identify networkgeodesics in latent space that maximize path density while minimizing total energy. We demonstrate EPSWAE’s ability to learn the geometry and topology of a 3D spiral from a noisy 40D embedding. We also show that our model embeds information in large regions of latent space, leading to better outlier generation. Lastly, we show that our geodesic interpolation results on MNIST and CelebA are efficient and comparable to state of the art techniques. Our code is publicly available.
|
| 157 |
+
|
| 158 |
+
# REFERENCES
|
| 159 |
+
|
| 160 |
+
Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein GAN. ´ arXiv preprint arXiv:1701.07875, 2017.
|
| 161 |
+
|
| 162 |
+
Georgios Arvanitidis, Lars Kai Hansen, and Søren Hauberg. Latent space oddity: on the curvature of deep generative models. arXiv preprint arXiv:1710.11379, 2017.
|
| 163 |
+
|
| 164 |
+
Sagie Benaim and Lior Wolf. One-sided unsupervised domain mapping. In Advances in neural information processing systems, pp. 752–762, 2017.
|
| 165 |
+
|
| 166 |
+
Mira Bernstein, Vin De Silva, John C Langford, and Joshua B Tenenbaum. Graph approximations to geodesics on embedded manifolds. Technical report, Citeseer, 2000.
|
| 167 |
+
|
| 168 |
+
Nicolas Bonneel, Julien Rabin, Gabriel Peyre, and Hanspeter Pfister. Sliced and radon wasserstein ´ barycenters of measures. Journal of Mathematical Imaging and Vision, 51(1):22–45, 2015.
|
| 169 |
+
|
| 170 |
+
Nicolas Bonnotte. Unidimensional and evolution methods for optimal transportation. PhD thesis, Paris 11, 2013.
|
| 171 |
+
|
| 172 |
+
Yuri Burda, Roger B. Grosse, and R. Salakhutdinov. Importance weighted autoencoders. CoRR, abs/1509.00519, 2016.
|
| 173 |
+
|
| 174 |
+
Nutan Chen, Alexej Klushyn, Francesco Ferroni, Justin Bayer, and Patrick van der Smagt. Learning flat latent manifolds with vaes. arXiv preprint arXiv:2002.04881, 2020a.
|
| 175 |
+
|
| 176 |
+
Xiongjie Chen, Yongxin Yang, and Yunpeng Li. Augmented sliced wasserstein distances. arXiv preprint arXiv:2006.08812, 2020b.
|
| 177 |
+
|
| 178 |
+
Tim R. Davidson, Luca Falorsi, Nicola De Cao, Thomas Kipf, and Jakub M. Tomczak. Hyperspherical variational auto-encoders. 34th Conference on Uncertainty in Artificial Intelligence (UAI-18), 2018.
|
| 179 |
+
|
| 180 |
+
Ishan Deshpande, Ziyu Zhang, and Alexander G Schwing. Generative modeling using the sliced wasserstein distance. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3483–3491, 2018.
|
| 181 |
+
|
| 182 |
+
Ishan Deshpande, Yuan-Ting Hu, Ruoyu Sun, Ayis Pyrros, Nasir Siddiqui, Sanmi Koyejo, Zhizhen Zhao, David Forsyth, and Alexander G Schwing. Max-sliced Wasserstein distance and its use for GANs. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 10648–10656, 2019.
|
| 183 |
+
|
| 184 |
+
Edsger W Dijkstra. A note on two problems in connexion with graphs. Numerische mathematik, 1 (1):269–271, 1959.
|
| 185 |
+
|
| 186 |
+
Nat Dilokthanakul, Pedro AM Mediano, Marta Garnelo, Matthew CH Lee, Hugh Salimbeni, Kai Arulkumaran, and Murray Shanahan. Deep unsupervised clustering with gaussian mixture variational autoencoders. arXiv preprint arXiv:1611.02648, 2016.
|
| 187 |
+
|
| 188 |
+
Piotr Dollar, Vincent Rabaud, and Serge J Belongie. Learning to traverse image manifolds. In ´ Advances in neural information processing systems, pp. 361–368, 2007.
|
| 189 |
+
|
| 190 |
+
Charles Fefferman, Sanjoy Mitter, and Hariharan Narayanan. Testing the manifold hypothesis. Journal of the American Mathematical Society, 29(4):983–1049, 2016.
|
| 191 |
+
|
| 192 |
+
Prasoon Goyal, Zhiting Hu, Xiaodan Liang, Chenyu Wang, and Eric P Xing. Nonparametric variational auto-encoders for hierarchical representation learning. In Proceedings of the IEEE International Conference on Computer Vision, pp. 5094–5102, 2017.
|
| 193 |
+
|
| 194 |
+
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron C Courville. Improved training of wasserstein gans. In Advances in neural information processing systems, pp. 5767–5777, 2017.
|
| 195 |
+
|
| 196 |
+
Chunsheng Guo, Jialuo Zhou, Huahua Chen, Na Ying, Jianwu Zhang, and Di Zhou. Variational autoencoder with optimizing gaussian mixture model priors. IEEE Access, 8:43992–44005, 2020.
|
| 197 |
+
|
| 198 |
+
Gaetan Hadjeres, Frank Nielsen, and Franc¸ois Pachet. Glsr-vae: Geodesic latent space regularization ¨ for variational autoencoder architectures. In 2017 IEEE Symposium Series on Computational Intelligence (SSCI), pp. 1–7. IEEE, 2017.
|
| 199 |
+
|
| 200 |
+
Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-VAE: Learning basic visual concepts with a constrained variational framework. 2016.
|
| 201 |
+
|
| 202 |
+
D. P. Kingma and M. Welling. Auto-encoding variational bayes. In International Conference on Learning Representations., 2014.
|
| 203 |
+
|
| 204 |
+
Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. International Conference on Learning Representations, 12 2014.
|
| 205 |
+
|
| 206 |
+
Thomas N Kipf and Max Welling. Variational graph auto-encoders. NIPS Workshop on Bayesian Deep Learning, 2016.
|
| 207 |
+
|
| 208 |
+
Jan Klein and Gabriel Zachmann. Point cloud surfaces using geometric proximity graphs. Computers & Graphics, 28(6):839–850, 2004.
|
| 209 |
+
|
| 210 |
+
Soheil Kolouri, Phillip E Pope, Charles E Martin, and Gustavo K Rohde. Sliced wasserstein autoencoders. In International Conference on Learning Representations, 2018a.
|
| 211 |
+
|
| 212 |
+
Soheil Kolouri, Gustavo K Rohde, and Heiko Hoffmann. Sliced wasserstein distance for learning gaussian mixture models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 3427–3436, 2018b.
|
| 213 |
+
|
| 214 |
+
Soheil Kolouri, Kimia Nadjahi, Umut Simsekli, Roland Badeau, and Gustavo Rohde. Generalized sliced wasserstein distances. In Advances in Neural Information Processing Systems, pp. 261– 272, 2019.
|
| 215 |
+
|
| 216 |
+
Yann LeCun, Corinna Cortes, and CJ Burges. Mnist handwritten digit database. ATT Labs [Online]. Available: http://yann.lecun.com/exdb/mnist, 2, 2010.
|
| 217 |
+
|
| 218 |
+
Chen-Yu Lee, Tanmay Batra, Mohammad Haris Baig, and Daniel Ulbricht. Sliced wasserstein discrepancy for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 10285–10295, 2019.
|
| 219 |
+
|
| 220 |
+
Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Large-scale celebfaces attributes (celeba) dataset. Retrieved August, 15:2018, 2018.
|
| 221 |
+
|
| 222 |
+
Antoine Liutkus, Umut Simsekli, Szymon Majewski, Alain Durmus, and Fabian-Robert Stoter. ¨ Sliced-wasserstein flows: Nonparametric generative modeling via optimal transport and diffusions. In International Conference on Machine Learning, pp. 4104–4113. PMLR, 2019.
|
| 223 |
+
|
| 224 |
+
Haw-Minn Lu, Yeshaiahu Fainman, and Robert Hecht-Nielsen. Image manifolds. In Applications of Artificial Neural Networks in Image Processing III, volume 3307, pp. 52–63. International Society for Optics and Photonics, 1998.
|
| 225 |
+
|
| 226 |
+
Shitong Luo and Wei Hu. Differentiable manifold reconstruction for point cloud denoising. arXiv preprint arXiv:2007.13551, 2020.
|
| 227 |
+
|
| 228 |
+
Alireza Makhzani, Jonathon Shlens, Navdeep Jaitly, Ian Goodfellow, and Brendan Frey. Adversarial autoencoders. arXiv preprint arXiv:1511.05644, 2015.
|
| 229 |
+
|
| 230 |
+
Facundo Memoli and Guillermo Sapiro. Distance functions and geodesics on submanifolds of ´ $\mathrm { \nabla \cdot \hat { r } \hat { d } }$ and point clouds. SIAM Journal on Applied Mathematics, 65(4):1227–1260, 2005.
|
| 231 |
+
|
| 232 |
+
Nina Miolane and Susan Holmes. Learning weighted submanifolds with variational autoencoders and riemannian variational autoencoders. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 14503–14511, 2020a.
|
| 233 |
+
|
| 234 |
+
Nina Miolane and Susan Holmes. Learning weighted submanifolds with variational autoencoders and riemannian variational autoencoders. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 14503–14511, 2020b.
|
| 235 |
+
|
| 236 |
+
Dmitry Molchanov, Valery Kharitonov, Artem Sobolev, and Dmitry Vetrov. Doubly semi-implicit variational inference. In The 22nd International Conference on Artificial Intelligence and Statistics, pp. 2593–2602, 2019.
|
| 237 |
+
|
| 238 |
+
Khai Nguyen, Nhat Ho, Tung Pham, and Hung Bui. Distributional sliced-wasserstein and applications to generative modeling. arXiv preprint arXiv:2002.07367, 2020.
|
| 239 |
+
|
| 240 |
+
Ali Rahimi, T Darrell, and B Recht. Learning appearance manifolds from video. In 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05), volume 1, pp. 868–875. IEEE, 2005.
|
| 241 |
+
|
| 242 |
+
Danilo Rezende and Shakir Mohamed. Variational inference with normalizing flows. In International Conference on Machine Learning, pp. 1530–1538, 2015.
|
| 243 |
+
|
| 244 |
+
Tim Sainburg, Marvin Thielk, Brad Theilman, Benjamin Migliori, and Timothy Gentner. Generative adversarial interpolative autoencoding: adversarial training on latent space interpolations encourage convex latent distributions. arXiv preprint arXiv:1807.06650, 2018.
|
| 245 |
+
|
| 246 |
+
Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in neural information processing systems, pp. 2234–2242, 2016.
|
| 247 |
+
|
| 248 |
+
Maximilian Seitzer. pytorch-fid: FID Score for PyTorch. https://github.com/mseitzer/ pytorch-fid, August 2020. Version 0.1.1.
|
| 249 |
+
|
| 250 |
+
Hang Shao, Abhishek Kumar, and P Thomas Fletcher. The riemannian geometry of deep generative models. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pp. 315–323, 2018.
|
| 251 |
+
|
| 252 |
+
Barak Sober, Ingrid Daubechies, and Robert Ravier. Approximating the riemannian metric from point clouds via manifold moving least squares. arXiv preprint arXiv:2007.09885, 2020.
|
| 253 |
+
|
| 254 |
+
Hiroshi Takahashi, Tomoharu Iwata, Yuki Yamanaka, Masanori Yamada, and Satoshi Yagi. Variational autoencoder with implicit optimal priors. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 33, pp. 5066–5073, 2019.
|
| 255 |
+
|
| 256 |
+
Joshua B Tenenbaum, Vin De Silva, and John C Langford. A global geometric framework for nonlinear dimensionality reduction. science, 290(5500):2319–2323, 2000.
|
| 257 |
+
|
| 258 |
+
I. Tolstikhin, O. Bousquet, S. Gelly, and B. Scholkopf. Wasserstein auto-encoders. ¨ ArXiv, abs/1711.01558, 2018.
|
| 259 |
+
|
| 260 |
+
Jakub Tomczak and Max Welling. Vae with a vampprior. In International Conference on Artificial Intelligence and Statistics, pp. 1214–1223, 2018.
|
| 261 |
+
|
| 262 |
+
Cedric Villani. ´ Topics in optimal transportation. Number 58. American Mathematical Soc., 2003.
|
| 263 |
+
|
| 264 |
+
Hui-Po Wang, Wen-Hsiao Peng, and Wei-Jan Ko. Learning priors for adversarial autoencoders. APSIPA Transactions on Signal and Information Processing, 9, 2020.
|
| 265 |
+
|
| 266 |
+
Kilian Q Weinberger and Lawrence K Saul. Unsupervised learning of image manifolds by semidefinite programming. International journal of computer vision, 70(1):77–90, 2006.
|
| 267 |
+
|
| 268 |
+
Jiqing Wu, Zhiwu Huang, Dinesh Acharya, Wen Li, Janine Thoma, Danda Pani Paudel, and Luc Van Gool. Sliced wasserstein generative models. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 3713–3722, 2019.
|
| 269 |
+
|
| 270 |
+
Mingzhang Yin and Mingyuan Zhou. Semi-implicit variational inference. volume 80 of Proceedings of Machine Learning Research, pp. 5660–5669, Stockholmsmssan, Stockholm Sweden, 10–15 Jul 2018. PMLR. URL http://proceedings.mlr.press/v80/yin18b.html.
|
| 271 |
+
|
| 272 |
+
Wenchao Yu, Guangxiang Zeng, Ping Luo, Fuzhen Zhuang, Qing He, and Zhongzhi Shi. Embedding with autoencoder regularization. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 208–223. Springer, 2013.
|
| 273 |
+
|
| 274 |
+
# A BACKGROUND ON THE SLICED WASSERSTEIN DISTANCE
|
| 275 |
+
|
| 276 |
+
Wasserstein distances provide a natural metric for measuring distances between probability distributions based on optimal transport, i.e., the cost of deforming one probability distribution into another. For a measurable cost function $c ( x , y )$ for $x , y \in \mathbb { R } ^ { d }$ , and probability distributions $\mu$ and $\nu$ on $\mathbb { R } ^ { d }$ , we define the $p$ -Wasserstein distance between the distributions as
|
| 277 |
+
|
| 278 |
+
$$
|
| 279 |
+
d _ { W , p } ( \mu , \nu ) = \operatorname* { i n f } _ { \Gamma \in \Pi ( \mu , \nu ) } \left( \int _ { \mathbb { R } ^ { d } \times \mathbb { R } ^ { d } } c ^ { p } ( x , y ) \mathrm { d } \Gamma ( x , y ) \right) ^ { 1 / p } ,
|
| 280 |
+
$$
|
| 281 |
+
|
| 282 |
+
where $\Pi$ is the set of all joint distributions with marginals $\mu$ and $\nu$ (see Villani (2003)).
|
| 283 |
+
|
| 284 |
+
This Wasserstein distance between probability distributions is extremely difficult and computationally intensive in dimensions two and higher, i.e., $d \geq 2$ . However, in dimension one, there exists a closed-form solution (Villani, 2003). A simple algorithm for computing the 1D Wasserstein distance is given as follows (see for example (Kolouri et al., 2018a)): (a) Generate $N$ one dimensional i.i.d samples $x _ { j } \sim \mu$ , $y _ { j } \sim \nu$ ; (b) sort each list $X = [ x _ { 1 } , \ldots , x _ { N } ] , Y = [ y _ { 1 } , \ldots , y _ { N } ]$ into ascending order denoted by $\tilde { X } , \tilde { Y }$ respectively; (c) define the approximation to the 1D p-Wasserstein distance
|
| 285 |
+
|
| 286 |
+
$$
|
| 287 |
+
d _ { W , p } ( \mu , \nu ) \approx \left( \frac { 1 } { N } \sum _ { j = 1 } ^ { N } c ^ { p } ( \tilde { x _ { j } } , \tilde { y _ { j } } ) \right) ^ { 1 / p } ,
|
| 288 |
+
$$
|
| 289 |
+
|
| 290 |
+
where $\tilde { x } _ { j } \in \tilde { X } , \tilde { y } _ { j } \in \tilde { Y }$ . The Sliced Wasserstein (SW) distance defines a metric on probability measures (Bonnotte, 2013) which provides an alternative to Eqn. 6 by exploiting the computational feasibility of the 1D Wasserstein distance in Eqn. 7. It involves averaging over one-dimensional orthogonal projections $\pi ^ { \theta } x : = ( \theta \cdot x ) \theta$ as follows:
|
| 291 |
+
|
| 292 |
+
$$
|
| 293 |
+
d _ { S W } ( \mu , \nu ) = \biggl ( \int _ { \mathbb { S } ^ { d - 1 } } d _ { W , p } ^ { p } ( \pi _ { * } ^ { \theta } \mu , \pi _ { * } ^ { \theta } \nu ) d S ( \theta ) \biggr ) ^ { 1 / p } ,
|
| 294 |
+
$$
|
| 295 |
+
|
| 296 |
+
The SW distance has seen a variety of implementations (Bonneel et al., 2015; Kolouri et al., 2018b;
|
| 297 |
+
Lee et al., 2019).
|
| 298 |
+
|
| 299 |
+
The integral in Eqn. 8 can be easily approximated by sampling $M$ random one-dimensional vectors $\theta _ { k }$ uniformly on $\mathbb { S } ^ { d - 1 }$ and computing
|
| 300 |
+
|
| 301 |
+
$$
|
| 302 |
+
d _ { S W } ( \mu , \nu ) \approx \left( \frac { 1 } { M } \sum _ { k = 1 } ^ { M } d _ { W , p } ^ { p } ( \pi _ { * } ^ { \theta _ { k } } \mu , \pi _ { * } ^ { \theta _ { k } } \nu ) \right) ^ { 1 / p } .
|
| 303 |
+
$$
|
| 304 |
+
|
| 305 |
+
Several works (for example Nguyen et al. (2020); Deshpande et al. (2019)) have discussed reasons why this often does not result in the best computational method. Linear projections may be suboptimal for extracting information about the differences between $\mu$ and $\nu$ , since a large number of linear projections may be required to get an accurate approximation for $d _ { S W }$ . Several works have suggested possible methods for improving the effectiveness of the SW distance (Chen et al., 2020b; Kolouri et al., 2019; Nguyen et al., 2020; Deshpande et al., 2019). In contrast, we use a Nonlinear Sliced Wasserstein (NSW) distance, an averaging procedure over (random) nonlinear transformations. For our goals, the choice of nonlinearity was motivated by the following considerations: (1) a bounded non-linearity would be beneficial since unbounded non-linearities (such as cubic polynomials) have a pronounced deformation on the tails of a measure and may excessively weight outliers. (2) A sigmoid is another potential candidate, but it saturates at high values and we want the non-linearity to be similarly effective everywhere. (3) The use of polynomials has been discussed in Kolouri et al. (2019), however, a full set of all higher order polynomials have exponential complexity and may be prohibitively expensive in high latent dimensions. We compared our method to cubic and quintic polynomials for the simple 3D spiral and found that the choice of the nonlinearity did not have a significant effect on performance, with our choice being the fastest (see section 4.2 and Appendix E for computational time and loss comparisons). In principle, other ensembles of nonlinear transformations could be used.
|
| 306 |
+
|
| 307 |
+
# B PSEUDOCODE
|
| 308 |
+
|
| 309 |
+
# Algorithm 1 Training EPSWAE
|
| 310 |
+
|
| 311 |
+
1: while not converged do
|
| 312 |
+
2: Update the autoencoder $\Psi _ { E } , \Psi _ { D }$ :
|
| 313 |
+
3: for $k _ { 1 }$ substeps do
|
| 314 |
+
4: Sample minibatch from data $\{ \mathbf { x } ^ { ( 1 ) } , . . . , \mathbf { x } ^ { ( N ) } \}$ with $\mathbf { x } ^ { ( j ) } \sim P _ { X }$
|
| 315 |
+
5: Compute feature extractor samples $\mathbf { f } ^ { ( j ) } = \Psi _ { F E } ( \mathbf { x } ^ { ( j ) } )$
|
| 316 |
+
6: Compute posterior samples $\mathbf { z } ^ { ( j ) } = \Psi _ { E } ( \mathbf { x } ^ { ( j ) } )$
|
| 317 |
+
7: Compute decoded output $\mathbf { x } _ { r e c o n } ^ { ( j ) } = \Psi _ { D } ( ( \mathbf { z } ) ^ { j } )$
|
| 318 |
+
8: Generate samples $\{ \xi ^ { ( 1 ) } , . . . \xi ^ { ( J ) } \}$ with $\xi ^ { ( j ) } \sim \mu$
|
| 319 |
+
9: Compute prior samples $\mathbf { y } ^ { ( j ) } = \Psi _ { P E } ( \xi ^ { ( j ) } )$
|
| 320 |
+
10: 11: Compute reconstruction error: Compute NSW distance: LNSW distance $\begin{array} { r } { \mathcal { L } _ { r e c o n } = \frac { 1 } { J } \sum _ { j = 1 } ^ { J } d ( \mathbf { x } ^ { ( j ) } , \mathbf { x } _ { r e c o n } ^ { ( j ) } ) } \end{array}$ $\begin{array} { r } { = d _ { N S W } \big ( \frac { 1 } { N } \sum _ { j = 1 } ^ { N } \delta _ { \mathbf { z } ^ { ( j ) } } , \frac { 1 } { N } \sum _ { j = 1 } ^ { N } \delta _ { \mathbf { y } ^ { ( j ) } } \big ) } \end{array}$
|
| 321 |
+
12: Compute FSC loss: $\mathcal { L } _ { F S C } = d _ { F S C } ( \{ \mathbf { f } ^ { ( 1 ) } , . . . , \mathbf { f } ^ { ( J ) } \} , \{ \mathbf { z } ^ { ( 1 ) } , . . . , \mathbf { z } ^ { ( J ) } \} )$
|
| 322 |
+
13: Compute autoencoder loss $\mathcal { L } _ { A E } = \alpha \mathcal { L } _ { r e c o n } + \beta \mathcal { L } _ { N S W d i s t a n c e } + \kappa \mathcal { L } _ { F S C }$
|
| 323 |
+
14: Compute gradients of $\mathcal { L } _ { A E }$ wrt to $\phi _ { E } , \phi _ { D }$
|
| 324 |
+
15: Update $\phi _ { E } , \phi _ { D }$
|
| 325 |
+
16: end for
|
| 326 |
+
17: Update the prior-encoder $\Psi _ { P E }$ :
|
| 327 |
+
18: for $k _ { 2 }$ substeps do
|
| 328 |
+
19: Sample minibatch from data $\{ \mathbf { x } ^ { ( 1 ) } , . . . , \mathbf { x } ^ { ( J ) } \}$ with $\mathbf { x } ^ { ( j ) } \sim P _ { X }$
|
| 329 |
+
20: Compute posterior samples $\mathbf { z } ^ { ( j ) } = \Psi _ { E } ( \mathbf { x } ^ { ( j ) } )$
|
| 330 |
+
21: Generate samples $\{ \xi ^ { ( 1 ) } , . . . \xi ^ { ( J ) } \}$ with $\xi ^ { ( j ) } \sim \mu$
|
| 331 |
+
22: 23: Compute prior samples Compute prior-encoder $\mathbf { y } ^ { ( j ) } = \Psi _ { P E } ( \xi ^ { ( j ) } )$ $\begin{array} { r } { \mathcal { L } _ { P E } = d _ { N S W } \big ( \frac { 1 } { N } \sum _ { j = 1 } ^ { N } \delta _ { \mathbf { z } ^ { ( j ) } } , \frac { 1 } { N } \sum _ { j = 1 } ^ { N } \delta _ { \mathbf { y } ^ { ( j ) } } \big ) } \end{array}$
|
| 332 |
+
24: Compute gradients of $\mathcal { L } _ { P E }$ wrt to $\phi _ { P E }$
|
| 333 |
+
25: Update $\phi _ { P E }$
|
| 334 |
+
26: end for
|
| 335 |
+
27: end while
|
| 336 |
+
|
| 337 |
+
# C ARCHITECTURE AND TRAINING DETAILS
|
| 338 |
+
|
| 339 |
+
For all datasets, the prior-encoder $\Psi _ { P E }$ consists of three fully connected hidden layers and ReLU activations. For all datasets, the autoencoder and prior-encoder losses (given in Eqns 3 and 5) are trained iteratively using the optimizer Adam (Kingma & Welling, 2014) with a learning rate of 0.001. We experimented with both $p = 1$ and $p = 2$ (corresponding to $\mathsf { p }$ -Wasserstein) in the SW distance and did not find any significant differences; all results in this paper use $p = 2$ . For each calculation of the NSW distance, $L = 5$ random nonlinear transformations were taken followed by $M = 5 0$ one dimensional projections per transformation. Data-specific model and parameter details are given below.
|
| 340 |
+
|
| 341 |
+
3D Spiral dataset: The input to the prior-encoder is a 40D Gaussian, and the latent space is 3D. The input to the autoencoder is a 40D embedding of a 3D spiral manifold with $10 \%$ noise. The dataset consists of 10000 samples, and a batch size of 100 was used. The prior-encoder, the data encoder, and the decoder consist of three Fully Connected (FC) layers with 40 nodes each and ReLU activations. The reconstruction loss is given by the Mean Square Error and $\alpha = 1 , \beta = 0 . 1 , \kappa = 0 . 0 1$ in Eqn 3. In the absence of convolutional layers, the FSC term encourages the pairwise distances of the minibatch in latent space to be similar to the pairwise distances of the minibatch in the data space. The prior-encoder is trained $k _ { 1 } = 2$ times for each training of the autoencoder $k _ { 1 } = 1$ . Power of distance $h = 2$ is used to compute edge weights for computing network-geodesics.
|
| 342 |
+
|
| 343 |
+
MNIST dataset: The input to the prior-encoder is a 40 dimensional mixture of 10 Gaussians, and the latent space is 5 dimensional. The data encoder takes MNIST images as input using a batch size of 100, and consists of the following layers Con $\ v \ ( 1 , 1 0 , 3 ) \ \to \ \mathrm { B a t c h N o r m } \ \to \ \mathrm { R e L u } \to \ \mathrm { M a x P o o l }$ (2,2) → Conv (10,16,3) BatchNorm ReLu followed by two FC layers of 512 and 256 nodes respectively with a leaky ReLu nonlinearity. The encoder outputs a 5 dimensional latent representation. The decoder consists of the reverse, i.e., three fully connected layers of size 256, 512, and 1936 nodes respectively. This is followed by ConvTranspose $( 1 6 , 1 0 , 3 ) $ LeakyReLu Upsample(2,2) ConvTranspose $( 1 0 , 1 , 3 ) $ Sigmoid. The decoder output has size $2 8 ~ \times$ 28. The prior-encoder is trained $k _ { 1 } = 1$ times for each training of the autoencoder $k _ { 2 } = 1$ . The reconstruction loss is given by the Binary Cross Entropy and $\alpha = 1 , \beta = 0 . 1 , \kappa = 0 . 0 0 1$ in Eqn. 3. The FSC loss encourages the pairwise distances of the minibatch in latent space to be similar to the pairwise distances of the minibatch in feature space computed at the output of the last convolutional layer in the data encoder. Energy parameter $h = 2$ is used to compute edge weights for computing network-geodesics.
|
| 344 |
+
|
| 345 |
+
CelebA dataset: The input to the prior-encoder is a 186 dimensional mixture of 10 Gaussians, and the latent space is 128 dimensional. We ran experiments with different latent dimensions and found that the generation ability didn’t vary significantly as a function of latent dimension. We trade-off image quality of the input images for computational speed by downsizing the input and employ a fairly simple network compared to state of the art computer vision architectures that use CelebA. The data encoder takes CelebA images (of size $2 1 8 \times 1 7 8 \times 3 )$ and downsizes them to size $6 4 \times 6 4 \times 3$ . The data encoder consists of the following layers Conv (3,16,3) BatchNorm Re $\mathrm { L u } \to \mathrm { M a x P o o l } ( 2 , 2 ) \to \mathrm { C o n v } ( 1 6 , 3 2 , 3 ) \to \mathrm { B a t c h N o r m } \to \mathrm { R e L u } \to \mathrm { M a x P o o l } ( 2 , 2 ) \to \mathrm { C o n v } ( 1 6 , 3 2 , 3 ) \to \mathrm { C o n v } ( 1 0 , 2 ) .$ $( 2 , 2 ) \to \mathbf { C o n v }$ $( 3 2 , 6 4 , 3 ) \mathrm { B a t c h N o r m } \mathrm { R e }$ Lu followed by two FC layers of 512 and 256 nodes respectively with a leaky ReLu nonlinearity. The encoder outputs a 128 dimensional latent representation. As in the case of MNIST, the decoder consists of the reverse, with convolutions replaced by Convolution Transpose, and MaxPool replaced by Upsample. The output of the decoder is passed through a sigmoid nonlinearity and is of size $6 4 \times 6 4 \times 3$ . The prior-encoder was trained $k _ { 1 } = 1$ times for each training of the autoencoder. The reconstruction loss is given by the Binary Cross Entropy and $\alpha = 5 0 0 , \beta = 5 0 , \kappa = 0 . 0 5$ in Eqn. 3. The FSC loss encourages the pairwise distances of the minibatch in latent space to be similar to the pairwise distances of the minibatch in feature space, i.e., computed at the output of the last convolutional layer in the encoder. Energy parameter $h = 2$ is used to compute edge weights for computing network-geodesics.
|
| 346 |
+
|
| 347 |
+
# D SPIRAL BASELINE COMPARISONS
|
| 348 |
+
|
| 349 |
+

|
| 350 |
+
Figure 5: Comparisons of the EPSWAE model with different loss terms. Top panels present top views, and bottom panels present the corresponding side views. The red curves show interpolation between two randomly selected samples using the network-geodesic algorithm. All figures are generated after 100 epochs with a $\mathrm { l r } { = } 0 . 0 1$ , and batch size $= 1 0 0$ . $k _ { 1 } = 1 , k _ { 2 } = 2$ .
|
| 351 |
+
|
| 352 |
+
Figure 5 shows the effects of the different loss terms in EPSWAE on the geometry of the learned prior and posterior. The position and orientation of the spiral in the 3D plots are random and the views in the image are hand-chosen to be equivalent. (a) shows latent space and interpolations (red) using EPSWAE with a linear Sliced Wasserstein distance in the loss, and no structural consistency term. (b) shows that adding a structural consistency term doesn’t remarkably improve the quality of the manifold learned, however, consistent with other experiments, it seems to improves interpolation slightly. Note here that since we don’t use convolutional layers for the 3D spiral, the stuctural consistency term preserves distance in latent space corresponding to distances in data space. (c) shows that employing the NSW distance term significantly improves the learned structure in latent space. The improvements resulting from incorporation of the NSW and structural consistency terms as seen in these visualizations of the 3D spiral lead us to use both loss terms (as in (d)) on all results in the main paper.
|
| 353 |
+
|
| 354 |
+

|
| 355 |
+
Figure 6: Comparison of EPSWAE with baselines SWAE (Kolouri et al., 2018a) and VAE (Kingma & Welling, 2014). All figures are generated after 100 epochs with a $\mathrm { l r } { = } 0 . 0 1$ , and batch size $= 1 0 0$ . For EPSWAE, $k _ { 1 } = 1 , k _ { 2 } = 2$ , $\alpha = 1 , \beta = 0 . 1$ , $\kappa = 0 . 0 0 1$ .
|
| 356 |
+
|
| 357 |
+
Figure 6 compares the EPSWAE model with baselines VAE and SWAE. The VAE uses KL divergence in the loss, which constrains the prior to be sampled from a Gaussian distribution. While the vanilla SWAE uses the SW distance, the prior remains a Gaussian, leading to an unnatural embedding of the data manifold. In contrast, EPSWAE results in a significantly better learned prior as a consequence of the nonlinear SW distance and the prior-encoder network trained explicitly to improve the latent representation.
|
| 358 |
+
|
| 359 |
+
# E COMPARISON WITH OTHER SLICED WASSERSTEIN NONLINEARITIES
|
| 360 |
+
|
| 361 |
+
Here, we compare our choice of nonlinearity in the SW loss (sinusoidal shear) with some other common nonlinearities. While there exist several methods to improve the SW distance (e.g. maxSW (Deshpande et al., 2019) which has seen several subsequent variations), these involve additional training, and hence aren’t considered (although many such versions of SW distance could be used in conjunction with out method). Instead we consider the polynomial generalized Radon transforms described in (Kolouri et al., 2019). The computational cost of a single polynomial generalized Radon transform is ${ \mathcal { O } } ( d ^ { k } )$ for dimension $d$ and $k ^ { t h }$ order of polynomial, and hence we limit our investigation to cubic and quintic polynomials. We show results on the artificial 3D Spiral dataset trained upto 100 epochs with $\alpha = 1$ , $\beta \ : = \ : 0 . 1$ , $\kappa = 0 . 0 1$ . We see in Fig. 7 that the choice of nonlinearity does not have a significant effect on the loss, however, as seen in Table4.2, the sineshear has slightly lower computational cost.
|
| 362 |
+
|
| 363 |
+

|
| 364 |
+
Figure 7: Loss as a function of training epochs for linear SW, cubic nonlinearity, quintic nonlinearity and our (sine-shear) NSW distance. A full set of cubic and quintic functions terms are considered for computing the generalized Radon transform in the SW distance. $L = 5$ nonlinear transforms with $M = 5 0$ linear 1D projections each taken for all cases.
|
| 365 |
+
|
| 366 |
+
# F MNIST GENERATION RESULTS
|
| 367 |
+
|
| 368 |
+

|
| 369 |
+
Figure 8: Comparison between (a) EPSWAE (b) SWAE and (c) VAE for generation on MNIST. for all three, batch size $= 2 0 0$ , epochs $_ { \mathrm { \scriptsize = } 1 0 0 }$ , $\mathrm { l r } = 0 . 0 0 1$ , for EPSWAE $k _ { 1 } = 2$ , $k _ { 1 } = 1$ , $\alpha = 1 , \beta =$ $0 . 1 , \kappa = 0 . 0 0 1$ .
|
| 370 |
+
|
| 371 |
+
Figures 8 (a,b,c) shows generation on the MNIST dataset after 100 epochs on EPSWAE, baseline SWAE(Kolouri et al., 2018a), and baseline VAE (Kingma & Welling, 2014) respectively. All networks EPSWAE and baselines SWAE and VAE use equivalent architectures (outlined in section of Appendix C), and hyperparameters are optimized individually. As seen in the figure, we observe that EPSWAE generated samples were consistently found to have a lower fraction of ‘false’ digits, i.e., digits that are unrealistic.
|
| 372 |
+
|
| 373 |
+
# G CELEBA GENERATION RESULTS
|
| 374 |
+
|
| 375 |
+

|
| 376 |
+
Figure 9: Images generated from prior samples in (a) EPSWAE (b) Baseline SWAE. Batch size $=$ 200, epochs $_ { \mathrm { { s } = 1 0 0 } }$ , $\mathrm { l r } = 0 . 0 0 1$ . $\alpha = 5 0 0 , \beta = 5 0 , \kappa = 0 . 0 5$ .
|
| 377 |
+
|
| 378 |
+
CelebA raw images are downsized to $6 4 \times 6 4$ pixels, and a simple architecture is employed (see Appendix C). This serves as a proof of principle for a better latent representation and interpolation, without a high computational cost. Naturally, using a more sophisticated network (for instance ResNet, VGG etc.) without downsizing the data would yield higher quality images at a computational cost.
|
| 379 |
+
|
| 380 |
+
Figure 9 shows generation on the CelebA dataset after 100 epochs with (a) EPSWAE and (b) baseline SWAE (right) respectively. Both employ equivalent architectures and take downsized images as input. As seen in the figure, EPSWAE generated images are more realistic. Note that this comparison is for equivalent training epochs and architectural details, and does not make claims about the quality of SWAE images with longer training.
|
| 381 |
+
|
| 382 |
+
# H EFFECT OF ENERGY PARAMETER ON CELEBA INTERPOLATIONS
|
| 383 |
+
|
| 384 |
+
Additional CelebA interpolations are shown in Fig. 10. The length of interpolations is automatically selected by the network algorithm. In some cases, a linearly interpolated point is added between every two samples on the network-geodesic to make smoother transitions; this would be unnecessary with enough samples of the prior, however it could be impractical in high latent dimension to generated sufficiently many prior samples. Note that even if only one intermediate point is selected by the network geodesic, the generated interpolation could be significantly different from a purely linear interpolation (an illustration is provided in Figure 4.1 - the direct linear interpolation from A to B is significantly different from the interpolation through the point C). Fig. 10 presents a comparison between energy parameter $h = 1$ and $h = 2$ . The energy parameter determines the power of the distance metric used to compute the edge weight. One can think of the higher value $h = 2$ ) as corresponding to stronger connections between points, and encouraging shorter hops. In practice, as seen from the figure, there is no clear advantage to choosing a specific value of energy parameter $h$ .
|
| 385 |
+
|
| 386 |
+

|
| 387 |
+
Figure 10: Additional CelebA interpolations. The first and last images are reconstructions of real data, and the interpolations traverse through samples of the prior using the network-geodesic algorithm. (a) Top three panels show interpolations for energy parameter $h = 1$ , and (b) bottom three panels show interpolations for energy parameter $h = 2$ . Latent space is 128 dimensional. Hyperparameters are the same as those used in the paper. A total of a 400 samples in latent space are used.
|
| 388 |
+
|
| 389 |
+

|
| 390 |
+
Figure 11: Comparisons of linear interpolation between EPSWAE and SWAE. The first and last images are reconstructions of randomly picked real data (a) shows long interpolation (over two lines), (b,c) show shorter interpolations. Hyperparameters are the same as those used in the paper. Latent space is 128 dimensional. A total of a 400 samples in latent space are used.
|
| 391 |
+
|
| 392 |
+
We compare here linear interpolations on the CelebA dataset for MNIST and CelebA. The autoencoder networks used are identical and outlined in section C. In contrast, EPSWAE uses the additional prior encoder. Both models are independently optimized, and the interpolations are linear. As seen in Fig. 11, interpolations in EPSWAE are more realistically identifiable as ’faces’ than SWAE, which mixes up the features and generates blurry intermediate images. This is suggestive that the prior-encoder may play a role in improving latent representation.
|
md/train/5NA1PinlGFu/5NA1PinlGFu.md
ADDED
|
@@ -0,0 +1,421 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# COLORIZATION TRANSFORMER
|
| 2 |
+
|
| 3 |
+
Manoj Kumar, Dirk Weissenborn & Nal Kalchbrenner Google Research, Brain Team {mechcoder,diwe,nalk}@google.com
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We present the Colorization Transformer, a novel approach for diverse high fidelity image colorization based on self-attention. Given a grayscale image, the colorization proceeds in three steps. We first use a conditional autoregressive transformer to produce a low resolution coarse coloring of the grayscale image. Our architecture adopts conditional transformer layers to effectively condition grayscale input. Two subsequent fully parallel networks upsample the coarse colored low resolution image into a finely colored high resolution image. Sampling from the Colorization Transformer produces diverse colorings whose fidelity outperforms the previous state-of-the-art on colorising ImageNet based on FID results and based on a human evaluation in a Mechanical Turk test. Remarkably, in more than $60 \%$ of cases human evaluators prefer the highest rated among three generated colorings over the ground truth. The code and pre-trained checkpoints for Colorization Transformer are publicly available at this url.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+

|
| 12 |
+
Figure 1: Samples of our model showing diverse, high-fidelity colorizations.
|
| 13 |
+
|
| 14 |
+
Image colorization is a challenging, inherently stochastic task that requires a semantic understanding of the scene as well as knowledge of the world. Core immediate applications of the technique include producing organic new colorizations of existing image and video content as well as giving life to originally grayscale media, such as old archival images (Tsaftaris et al., 2014), videos (Geshwind, 1986) and black-and-white cartoons (Sykora et al., 2004; Qu et al., 2006; Cinarel & Zhang, 2017). \` Colorization also has important technical uses as a way to learn meaningful representations without explicit supervision (Zhang et al., 2016; Larsson et al., 2016; Vondrick et al., 2018) or as an unsupervised data augmentation technique, whereby diverse semantics-preserving colorizations of labelled images are produced with a colorization model trained on a potentially much larger set of unlabelled images.
|
| 15 |
+
|
| 16 |
+
The current state-of-the-art in automated colorization are neural generative approaches based on log-likelihood estimation (Guadarrama et al., 2017; Royer et al., 2017; Ardizzone et al., 2019). Probabilistic models are a natural fit for the one-to-many task of image colorization and obtain better results than earlier determinisitic approaches avoiding some of the persistent pitfalls (Zhang et al., 2016). Probabilistic models also have the central advantage of producing multiple diverse colorings that are sampled from the learnt distribution.
|
| 17 |
+
|
| 18 |
+
In this paper, we introduce the Colorization Transformer (ColTran), a probabilistic colorization model composed only of axial self-attention blocks (Ho et al., 2019b; Wang et al., 2020). The main advantages of axial self-attention blocks are the ability to capture a global receptive field with only√ two layers and $\mathcal { O } ( D \sqrt { D } )$ instead of $\mathcal { O } ( D ^ { 2 } )$ complexity. They can be implemented efficiently using matrix-multiplications on modern accelerators such as TPUs (Jouppi et al., 2017). In order to enable colorization of high-resolution grayscale images, we decompose the task into three simpler sequential subtasks: coarse low resolution autoregressive colorization, parallel color and spatial super-resolution. For coarse low resolution colorization, we apply a conditional variant of Axial Transformer (Ho et al., 2019b), a state-of-the-art autoregressive image generation model that does not require custom kernels (Child et al., 2019). While Axial Transformers support conditioning by biasing the input, we find that directly conditioning the transformer layers can improve results significantly. Finally, by leveraging the semi-parallel sampling mechanism of Axial Transformers we are able to colorize images faster at higher resolution than previous work (Guadarrama et al., 2017) and as an effect this results in improved colorization fidelity. Finally, we employ fast parallel deterministic upsampling models to super-resolve the coarsely colorized image into the final high resolution output. In summary, our main contributions are:
|
| 19 |
+
|
| 20 |
+
• First application of transformers for high-resolution $( 2 5 6 \times 2 5 6 )$ image colorization.
|
| 21 |
+
• We introduce conditional transformer layers for low-resolution coarse colorization in Section 4.1. The conditional layers incorporate conditioning information via multiple learnable components that are applied per-pixel and per-channel. We validate the contribution of each component with extensive experimentation and ablation studies.
|
| 22 |
+
We propose training an auxiliary parallel prediction model jointly with the low resolution coarse colorization model in Section 4.2. Improved FID scores demonstrate the usefulness of this auxiliary model.
|
| 23 |
+
• We establish a new state-of-the-art on image colorization outperforming prior methods by a large margin on FID scores and a 2-Alternative Forced Choice (2AFC) Mechanical Turk test. Remarkably, in more than $60 \%$ of cases human evaluators prefer the highest rated among three generated colorings over the ground truth.
|
| 24 |
+
|
| 25 |
+
# 2 RELATED WORK
|
| 26 |
+
|
| 27 |
+
Colorization methods have initially relied on human-in-the-loop approaches to provide hints in the form of scribbles (Levin et al., 2004; Ironi et al., 2005; Huang et al., 2005; Yatziv & Sapiro, 2006; Qu et al., 2006; Luan et al., 2007; Tsaftaris et al., 2014; Zhang et al., 2017; Ci et al., 2018) and exemplar-based techniques that involve identifying a reference source image to copy colors from (Reinhard et al., 2001; Welsh et al., 2002; Tai et al., 2005; Ironi et al., 2005; Pitié et al., 2007; Morimoto et al., 2009; Gupta et al., 2012; Xiao et al., 2020). Exemplar based techniques have been recently extended to video as well (Zhang et al., 2019a). In the past few years, the focus has moved on to more automated, neural colorization methods. The deterministic colorization techniques such as CIC (Zhang et al., 2016), LRAC (Larsson et al., 2016), LTBC (Iizuka et al., 2016), Pix2Pix (Isola et al., 2017) and DC (Cheng et al., 2015; Dahl, 2016) involve variations of CNNs to model per-pixel color information conditioned on the intensity.
|
| 28 |
+
|
| 29 |
+
Generative colorization models typically extend unconditional image generation models to incorporate conditioning information from a grayscale image. Specifically, cINN (Ardizzone et al., 2019) use conditional normalizing flows (Dinh et al., 2014), VAE-MDN (Deshpande et al., 2017; 2015) and SCC-DC (Messaoud et al., 2018) use conditional VAEs (Kingma & Welling, 2013), and cGAN (Cao et al., 2017) use GANs (Goodfellow et al., 2014) for generative colorization. Most closely related to ColTran are other autoregressive approaches such as PixColor (Guadarrama et al., 2017) and PIC (Royer et al., 2017) with PixColor obtaining slightly better results than PIC due to its CNN-based upsampling strategy. ColTran is similar to PixColor in the usage of an autoregressive model for low resolution colorization and parallel spatial upsampling. ColTran differs from PixColor in the following ways. We train ColTran in a completely unsupervised fashion, while the conditioning network in PixColor requires pre-training with an object detection network that provides substantial semantic information. PixColor relies on PixelCNN (Oord et al., 2016) that requires a large depth to model interactions between all pixels. ColTran relies on Axial Transformer (Ho et al., 2019b) and can model all interactions between pixels with just 2 layers. PixColor uses different architectures for conditioning, colorization and super-resolution, while ColTran is conceptually simpler as we use self-attention blocks everywhere for both colorization and superresolution. Finally, we train our autoregressive model on a single coarse channel and a separate color upsampling network that improves fidelity (See: 5.3). The multi-stage generation process in ColTran that upsamples in depth and in size is related to that used in Subscale Pixel Networks (Menick & Kalchbrenner, 2018) for image generation, with differences in the order and representation of bits as well as in the use of fully parallel networks. The self-attention blocks that are the building blocks of ColTran were initially developed for machine translation (Vaswani et al., 2017), but are now widely used in a number of other applications including density estimation (Parmar et al., 2018; Child et al., 2019; Ho et al., 2019a; Weissenborn et al., 2019) and GANs (Zhang et al., 2019b)
|
| 30 |
+
|
| 31 |
+
# 3 BACKGROUND: AXIAL TRANSFORMER
|
| 32 |
+
|
| 33 |
+
# 3.1 ROW AND COLUMN SELF-ATTENTION
|
| 34 |
+
|
| 35 |
+
Self-attention (SA) has become a standard building block in many neural architectures. Although the complexity of self-attention is quadratic with the number of input elements (here pixels), it has become quite popular for image modeling recently (Parmar et al., 2018; Weissenborn et al., 2019) due to modeling innovations that don’t require running global self-attention between all pixels. Following the work of (Ho et al., 2019b) we employ standard qkv self-attention (Vaswani et al., 2017) within rows and columns of an image. By alternating row- and column self-attention we effectively allow global exchange of information between all pixel positions. For the sake of brevity we omit the exact equations for multihead self-attention and refer the interested reader to the Appendix H for more details. Row/column attention layers are the core components of our model. We use them in the autoregressive colorizer, the spatial upsampler and the color upsampler.
|
| 36 |
+
|
| 37 |
+
# 3.2 AXIAL TRANSFORMER
|
| 38 |
+
|
| 39 |
+
Ths Axial Transformer (Ho et al., 2019b) is an autoregressive model that applies (masked) row- and column self-attention operations in a way that efficiently summarizes all past information $\mathbf { x } _ { i , < j }$ and $\mathbf x _ { < i , }$ · to model a distribution over pixel $\mathbf { x } _ { i , j }$ at position $i , j$ . Causal masking is employed by setting all $A _ { m , n } = 0$ where $n > m$ during self-attention (see Eq. 15).
|
| 40 |
+
|
| 41 |
+
Outer decoder. The outer decoder computes a state ${ \bf { s } } _ { o }$ over all previous rows $\mathbf { x } _ { \leq i , }$ · by applying $N$ layers of full row self-attention followed by masked column self-attention. (Eq 2). ${ \bf { s } } _ { o }$ is shifted down by a single row, such that the output context $\mathbf { o } _ { i , j }$ at position $i , j$ only contains information about pixels $\mathbf x _ { < i , }$ · from prior rows. (Eq 3)
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
\begin{array} { r l } { \mathbf { e } = \mathrm { E m b e d d i n g s } ( \mathbf { x } ) } \\ { \mathbf { s } _ { o } = \mathrm { M a s k e d C o l u m n } ( \mathrm { R o w } ( \mathbf { e } ) ) } \\ { \mathbf { o } = \mathrm { S h i f t D o w n } ( \mathbf { s } _ { o } ) } \end{array} \quad \quad \times N
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
Inner decoder. The embeddings to the inner decoder are shifted right by a single column to mask the current pixel $\mathbf { x } _ { i , j }$ . The context o from the outer decoder conditions the inner decoder by biasing the shifted embeddings. It then computes a final state $\mathbf { h }$ , by applying $N$ layers of masked row-wise self-attention to infuse additional information from prior pixels of the same row $\mathbf { x } _ { i , < j }$ (Eq 4). $\mathbf { h } _ { i , j }$ comprises information about all past pixels $\mathbf { x } _ { < i }$ and $\mathbf { x } _ { i , < j }$ . A dense layer projects $\mathbf { h }$ into a distribution $p ( \mathbf { x } _ { i j } )$ over the pixel at position $( i , j )$ conditioned on all previous pixels $\mathbf { x } _ { i , < j }$ and $\mathbf { x } _ { < i , \cdot }$ .
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\begin{array} { r l } { \mathbf { z } = \mathbf { o } + \mathrm { S h i f t R i g h t } ( \mathbf { e } ) } & { { } } \\ { \mathbf { h } = \mathbf { M a s k e d R o w } ( \mathbf { z } ) } & { { } \times N } \\ { p ( \mathbf { x } _ { i j } ) = \mathrm { D e n s e } ( \mathbf { h } ) } \end{array}
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
Encoder. As shown above, the outer and inner decoder operate on 2-D inputs, such as a single channel of an image. For multi-channel RGB images, when modeling the "current channel", the Axial Transformer incorporates information from prior channels of an image (as per raster order) with an encoder. The encoder encodes each prior channel independently with a stack of unmasked row/column attention layers. The encoder outputs across all prior channels are summed to output a conditioning context c for the "current channel". The context conditions the outer and inner decoder by biasing the inputs in Eq 1 and Eq 4 respectively.
|
| 54 |
+
|
| 55 |
+

|
| 56 |
+
Figure 2: Depiction of ColTran. It consists of 3 individual models: an autoregressive colorizer (left), a color upsampler (middle) and a spatial upsampler (right). Each model is optimized independently. The autoregressive colorizer (ColTran core) is an instantiation of Axial Transformer (Sec. 3.2, Ho et al. (2019b)) with conditional transformer layers and an auxiliary parallel head proposed in this work (Sec. 4.1). During training, the groundtruth coarse low resolution image is both the input to the decoder and the target. Masked layers ensure that the conditional distributions for each pixel depends solely on previous ground-truth pixels. (See Appendix G for a recap on autoregressive models). ColTran upsamplers are stacked row/column attention layers that deterministically upsample color and space in parallel. Each attention block (in green) is residual and consists of the following operations: layer-norm multihead self-attention $ \mathrm { M L P } .$
|
| 57 |
+
|
| 58 |
+
Sampling. The Axial Transformer natively supports semi-parallel sampling that avoids reevaluation of the entire network to generate each pixel of a RGB image. The encoder is run once per-channel, the outer decoder is run once per-row and the inner decoder is run once per-pixel. The context from the outer decoder and the encoder is initially zero. The encoder conditions the outer decoder (Eq 1) and the encoder $^ +$ outer decoder condition the inner decoder (Eq 4). The inner decoder then generates a row, one pixel at a time via Eqs. (4) to (6). After generating all pixels in a row, the outer decoder recomputes context via Eqs. (1) to (3) and the inner decoder generates the next row. This proceeds till all the pixels in a channel are generated. The encoder, then recomputes context to generate the next channel.
|
| 59 |
+
|
| 60 |
+
# 4 PROPOSED ARCHITECTURE
|
| 61 |
+
|
| 62 |
+
Image colorization is the task of transforming a grayscale image $x ^ { g } \in \mathbb { R } ^ { H \times W \times 1 }$ into a colored image $\boldsymbol { x } \in \mathbb { R } ^ { H \times W \times 3 }$ . The task is inherently stochastic; for a given grayscale image $x ^ { g }$ , there exists a conditional distribution over $x$ , $p ( x | x ^ { g } )$ . Instead of predicting $x$ directly from $x ^ { g }$ , we instead sequentially predict two intermediate low resolution images $x ^ { s \downarrow }$ and $x ^ { s \downarrow c \downarrow }$ with different color depth first. Besides simplifying the task of high-resolution image colorization into simpler tasks, the smaller resolution allows for training larger models.
|
| 63 |
+
|
| 64 |
+
We obtain $x ^ { s \downarrow }$ , a spatially downsampled representation of $x$ , by standard area interpolation. $x ^ { s \downarrow c \downarrow }$ is a 3 bit per-channel representation of $x ^ { s \downarrow }$ , that is, each color channel has only 8 intensities. Thus, there are $8 ^ { \hat { 3 } } = 5 1 2$ coarse colors per pixel which are predicted directly as a single “color” channel. We rewrite the conditional likelihood $p ( x | x ^ { g } )$ to incorporate the intermediate representations as follows:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\begin{array} { r l } & { p ( x | x ^ { g } ) = p ( x | x ^ { g } ) \cdot 1 = p ( x | x ^ { g } ) \cdot p ( x ^ { s \downarrow c \downarrow } , x ^ { s \downarrow } | x , x ^ { g } ) = p ( x ^ { s \downarrow c \downarrow } , x ^ { s \downarrow } , x | x ^ { g } ) } \\ & { \qquad = p ( x | x ^ { s \ast } , x ^ { g } ) \cdot p ( x ^ { s \downarrow } | x ^ { s \downarrow c \downarrow } , x ^ { g } ) \cdot p ( x ^ { s \downarrow c \downarrow } | x ^ { g } ) } \end{array}
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
ColTran core (Section 4.1), a parallel color upsampler and a parallel spatial upsampler (Section 4.3) model $p ( x ^ { s _ { \downarrow } c _ { \downarrow } } | x ^ { g } ) , p ( x ^ { s _ { \downarrow } } | x ^ { s _ { \downarrow } \bar { c } _ { \downarrow } } , x ^ { g } )$ and $p ( x | x ^ { s \downarrow } )$ respectively. In the subsections below, we describe
|
| 71 |
+
|
| 72 |
+
<table><tr><td>Component</td><td>Unconditional</td><td>Conditional</td></tr><tr><td>Self-Attention</td><td>y = Softmax( gkT )v V/D</td><td>qck y = Softmax( )vc √D where ∀z=k,q,ν</td></tr><tr><td>MLP</td><td>y = ReLU(xU1+bi)U2 +b2</td><td>Zc =(cU²) z+(cU²) h = ReLU(xU1 +bi)U2 +b2 y=(cUf)h+(cUf)</td></tr><tr><td>Layer Norm</td><td>y = βNorm(x) +γ</td><td>y = βcNorm(x) +γc whereμ= βc,γc C∈RHXWXDC∈RHWXD μ = (u·c)Ua uERHW</td></tr></table>
|
| 73 |
+
|
| 74 |
+
Table 1: We contrast the different components of unconditional self-attention with self-attention conditioned on context $\mathbf { c } \in \mathbb { R } ^ { M \times N \times D }$ . Learnable parameters specific to conditioning are denoted by $\mathbf { u }$ and $U _ { \cdot } \in \mathbb { R } ^ { D \times D }$ .
|
| 75 |
+
|
| 76 |
+
these individual components in detail. From now on we will refer to all low resolutions as $M \times N$ and high resolution as $H \times W$ . An illustration of the overall architecture is shown in Figure 2.
|
| 77 |
+
|
| 78 |
+
# 4.1 COLTRAN CORE
|
| 79 |
+
|
| 80 |
+
In this section, we describe ColTran core, a conditional variant of the Axial Transformer (Ho et al., 2019b) for low resolution coarse colorization. ColTran Core models a distribution $p _ { c } ( x ^ { s \downarrow c \downarrow } | x ^ { g } )$ over 512 coarse colors for every pixel, conditioned on a low resolution grayscale image in addition to the colors from previously predicted pixels as per raster order (Eq. 9).
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
p _ { c } ( x ^ { s \downarrow c \downarrow } | x ^ { g } ) = \prod _ { i = 1 } ^ { M } \prod _ { j = 1 } ^ { N } p _ { c } ( x _ { i j } ^ { s \downarrow c \downarrow } | x ^ { g } , x _ { < i } ^ { s \downarrow c \downarrow } , x _ { i , < j } ^ { s \downarrow c \downarrow } )
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
Given a context representation $\mathbf { c } \in \mathbb { R } ^ { M \times N \times D }$ we propose conditional transformer layers in Table 1. Conditional transformer layers have conditional versions of all components within the standard attention block (see Appendix H, Eqs. 14-18).
|
| 87 |
+
|
| 88 |
+
Conditional Self-Attention. For every layer in the decoder, we apply six $1 \times 1$ convolutions to c to obtain three scale and shift vectors which we apply element-wise to q, $\mathbf { k }$ and $\mathbf { v }$ of the self-attention operation (Appendix 3.1), respectively.
|
| 89 |
+
|
| 90 |
+
Conditional MLP. A standard component of the transformer architecture is a two layer pointwise feed-forward network after the self-attention layer. We scale and shift to the output of each MLP conditioned on c as for self-attention.
|
| 91 |
+
|
| 92 |
+
Conditional Layer Norm. Layer normalization (Ba et al., 2016) globally scales and shifts a given normalized input using learnable vectors $\beta , \gamma$ . Instead, we predict $\beta _ { c }$ and $\gamma _ { c }$ as a function of c. We first aggregate c into a global 1-D representation $\overline { { \mathbf { c } } } \in \mathbb { R } ^ { L }$ via a learnable, spatial pooling layer. Spatial pooling is initialized as a mean pooling layer. Similar to 1-D conditional normalization layers (Perez et al., 2017; De Vries et al., 2017; Dumoulin et al., 2016; Huang & Belongie, 2017), we then apply a linear projection on c to predict $\beta _ { c }$ and $\gamma _ { c }$ , respectively.
|
| 93 |
+
|
| 94 |
+
A grayscale encoder consisting of multiple, alternating row and column self-attention layers encodes the grayscale image into the initial conditioning context $\mathbf { c } ^ { g }$ . It serves as both context for the conditional layers and as additional input to the embeddings of the outer decoder. The sum of the outer decoder’s output and $\mathbf { c } ^ { g }$ condition the inner decoder. Figure 2 illustrates how conditioning is applied in the autoregressive core of the ColTran architecture.
|
| 95 |
+
|
| 96 |
+
Conditioning every layer via multiple components allows stronger gradient signals through the encoder and as an effect the encoder can learn better contextual representations. We validate this empirically by outperforming the native Axial Transformer that conditions context states by biasing (See Section 5.2 and Section 5.4).
|
| 97 |
+
|
| 98 |
+
We additionally found it beneficial to train an auxiliary parallel prediction model that models $\widetilde { p } _ { c } ( x ^ { s \downarrow c \downarrow } )$ edirectly on top of representations learned by the grayscale encoder which we found beneficial for regularization (Eq. 10)
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\widetilde { p } _ { c } ( x ^ { s \downarrow c \downarrow } | x ^ { g } ) = \prod _ { i = 1 } ^ { M } \prod _ { j = 1 } ^ { N } \widetilde { p } _ { c } ( x _ { i j } ^ { s \downarrow c \downarrow } | x ^ { g } )
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
Intuitively, this forces the model to compute richer representations and global color structure already at the output of the encoder which can help conditioning and therefore has a beneficial, regularizing effect on learning. We apply a linear projection, $U _ { \mathrm { p a r a l l e l } } \in \mathbb { R } ^ { L \times 5 1 2 }$ on top of $\mathbf { c } ^ { g }$ (the output of the grayscale encoder) into a per-pixel distribution over 512 coarse colors. It was crucial to tune the relative contribution of the autoregressive and parallel predictions to improve performance which we study in Section 5.3
|
| 105 |
+
|
| 106 |
+
# 4.3 COLOR & SPATIAL UPSAMPLING
|
| 107 |
+
|
| 108 |
+
In order to produce high-fidelity colorized images from low resolution, coarse color images and a given high resolution grayscale image, we train color and spatial upsampling models. They share the same architecture while differing in their respective inputs and resolution at which they operate. Similar to the grayscale encoder, the upsamplers comprise of multiple alternating layers of row and column self-attention. The output of the encoder is projected to compute the logits underlying the per pixel color probabilities of the respective upsampler. Figure 2 illustrates the architectures
|
| 109 |
+
|
| 110 |
+
Color Upsampler. We convert the coarse image $x ^ { s \downarrow c \downarrow } \in \mathbb { R } ^ { M \times N \times 1 }$ of 512 colors back into a 3 bit RGB image with 8 symbols per channel. The channels are embedded using separate embedding matrices to $\mathbf { x } _ { k } ^ { s \downarrow c \downarrow } \in \bar { \mathbb { R } } ^ { M \times N \times \bar { D } }$ , where $k \in \{ R , G , B \}$ indicates the channel. We upsample each channel individually conditioning only on the respective channel’s embedding. The channel embedding is summed with the respective grayscale embedding for each pixel and serve as input to the subsequent self-attention layers (encoder). The output of the encoder is further projected to per pixel-channel probability distributions $\widetilde { p } _ { c \uparrow } ( x _ { k } ^ { s _ { \downarrow } } | x ^ { s _ { \downarrow } c _ { \downarrow } } , \dot { x } ^ { g } ) \in \mathbb { R } ^ { M \times N \times 2 5 6 }$ over 256 color intensities for all $k \in \{ R , G , B \}$ (Eq. 11).
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
\widetilde { p } _ { c \uparrow } ( x ^ { s _ { \downarrow } } | x ^ { g } ) = \prod _ { i = 1 } ^ { M } \prod _ { j = 1 } ^ { N } \widetilde { p } _ { c \uparrow } ( x _ { i j } ^ { s _ { \downarrow } } | x ^ { g } , x ^ { s _ { \downarrow } c _ { \downarrow } } )
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
Spatial Upsampler. We first naively upsample $\boldsymbol { x } ^ { s _ { \downarrow } } \in \mathbb { R } ^ { M \times N \times 3 }$ into a blurry, high-resolution RGB image using area interpolation. As above, we then embed each channel of the blurry RGB image and run a per-channel encoder exactly the same way as with the color upsampler. The output of the encoder is finally projected to per pixel-channel probability distributions $\bar { \tilde { p } } _ { s \uparrow } ( x _ { k } ^ { - } | x ^ { s \downarrow } , x ^ { g } ) \in \mathbf { \bar { \mathbb { R } } } ^ { H \times W \times 2 5 6 }$ over 256 color intensities for all $k \in \{ R , G , { \bar { B } } \}$ . (Eq. 12)
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\widetilde { p } _ { s \uparrow } ( x | x ^ { g } ) = \prod _ { i = 1 } ^ { H } \prod _ { j = 1 } ^ { W } \widetilde { p } _ { s \uparrow } ( x _ { i j } | x ^ { g } , x ^ { s \downarrow } )
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
In our experiments, similar to (Guadarrama et al., 2017), we found parallel upsampling to be sufficient for high quality colorizations. Parallel upsampling has the huge advantage of fast generation which would be notoriously slow for full autoregressive models on high resolution. To avoid plausible minor color inconsistencies between pixels, instead of sampling each pixel from the predicted distribution in (Eq. 12 and Eq. 11), we just use the argmax. Even though this slightly limits the potential diversity of colorizations, in practice we observe that sampling only coarse colors via ColTran core is enough to produce a great variety of colorizations.
|
| 123 |
+
|
| 124 |
+
Objective. We train our architecture to minimize the negative log-likelihood (Eq. 13) of the data. $p _ { c } / \widetilde { p } _ { c } , \widetilde { p } _ { s \uparrow } , \widetilde { p } _ { c \uparrow }$ are maximized independently and $\lambda$ is a hyperparameter that controls the relative e e econtribution of $p _ { c }$ and $\widetilde { p } _ { c }$
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
\mathcal { L } = ( 1 - \lambda ) \log p _ { c } + \lambda \log \widetilde { p } _ { c } + \log \widetilde { p } _ { c \uparrow } + \log \widetilde { p } _ { s \uparrow }
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+

|
| 131 |
+
Figure 3: Per pixel log-likelihood of coarse colored $6 4 \times 6 4$ images over the validation set as a function of training steps. We ablate the various components of the ColTran core in each plot. Left: ColTran with Conditional Transformer Layers vs a baseline Axial Transformer which conditions via addition (ColTran-B). ColTran-B $2 x$ and ColTran-B $_ { 4 x }$ refer to wider baselines with increased model capacity. Center: Removing each conditional sub-component one at a time (no cLN, no $c M L P$ and no $c A t t$ ). Right: Conditional shifts only (Shift), Conditional scales only (Scale), removal of kq conditioning in cAtt (cAtt, only v) and fixed mean pooling in cLN (cLN, mean pool). See Section 5.2 for more details.
|
| 132 |
+
|
| 133 |
+
# 5 EXPERIMENTS
|
| 134 |
+
|
| 135 |
+
# 5.1 TRAINING AND EVALUATION
|
| 136 |
+
|
| 137 |
+
We evaluate ColTran on colorizing $2 5 6 \times 2 5 6$ grayscale images from the ImageNet dataset (Russakovsky et al., 2015). We train the ColTran core, color and spatial upsamplers independently on 16 TPUv2 chips with a batch-size of 224, 768 and 32 for 600K, 450K and 300K steps respectively. We use 4 axial attention blocks in each component of our architecture, with a hidden size of 512 and 4 heads. We use RMSprop (Tieleman & Hinton, 2012) with a fixed learning rate of $3 e - 4$ . We set apart 10000 images from the training set as a holdout set to tune hyperparameters and perform ablations. To compute FID, we generate 5000 samples conditioned on the grayscale images from this holdout set. We use the public validation set to display qualitative results and report final numbers.
|
| 138 |
+
|
| 139 |
+
# 5.2 ABLATIONS OF COLTRAN CORE
|
| 140 |
+
|
| 141 |
+
The autoregressive core of ColTran models downsampled, coarse-colored images of resolution $6 4 \times 6 4$ with 512 coarse colots, conditioned on the respective grayscale image. In a series of experiments we ablate the different components of the architecture (Figure 3). In the section below, we refer to the conditional self-attention, conditional layer norm and conditional MLP subcomponents as cAtt, cLN and cMLP respectively. We report the per-pixel log-likelihood over 512 coarse colors on the validation set as a function of training steps.
|
| 142 |
+
|
| 143 |
+
Impact of conditional transformer layers. The left side of Figure 3 illustrates the significant improvement in loss that ColTran core (with conditional transformer layers) achieves over the original Axial Transformer (marked ColTran-B). This demonstrates the usefulness of our proposed conditional layers. Because conditional layers introduce a higher number of parameters we additionally compare to and outperform the original Axial Transformer baselines with $2 \mathbf { x }$ and 4x wider MLP dimensions (labeled as ColTran- $. B 2 x$ and ColTran- $B 4 x$ ). Both ColTran- $. B 2 x$ and ColTran- $. B 4 x$ have an increased parameter count which makes for a fair comparison. Our results show that the increased performance cannot be explained solely by the fact that our model has more parameters.
|
| 144 |
+
|
| 145 |
+
Importance of each conditional component. We perform a leave-one-out study to determine the importance of each conditional component. We remove each conditional component one at a time and retrain the new ablated model. The curves no cLN, no cMLP and no $c A t t$ in the middle of Figure 3 quantifies our results. While each conditional component improves final performance, cAtt plays the most important role.
|
| 146 |
+
|
| 147 |
+
Multiplicative vs Additive Interactions. Conditional transformer layers employ both conditional shifts and scales consisting of additive and multiplicative interactions, respectively. The curves Scale and Shift on the right hand side of Figure 3 demonstrate the impact of these interactions via ablated architectures that use conditional shifts and conditional scales only. While both types of interactions are important, multiplicative interactions have a much stronger impact.
|
| 148 |
+
|
| 149 |
+

|
| 150 |
+
Figure 4: Left: FID of generated $6 4 \times 6 4$ coarse samples as a function of training steps for $\lambda = 0 . 0 1$ and $\lambda = 0 . 0$ . Center: Final FID scores as a function of $\lambda$ . Right: FID as a function of log-likelihood.
|
| 151 |
+
|
| 152 |
+
Context-aware dot product attention. Self-attention computes the similarity between pixel representations using a dot product between q and $\mathbf { k }$ (See: Eq 15). cAtt applies conditional shifts and scales on q, k and allow modifying this similarity based on contextual information. The curve $c A t t$ , only $\nu$ on the right of Figure 3 shows that removing this property, by conditioning only on $\mathbf { v }$ leads to worse results.
|
| 153 |
+
|
| 154 |
+
Fixed vs adaptive global representation: cLN aggregates global information with a flexible learnable spatial pooling layer. We experimented with a fixed mean pooling layer forcing all the cLN layers to use the same global representation with the same per-pixel weight. The curve cLN, mean pool on the right of Figure 3 shows that enforcing this constraint causes inferior performance as compared to even having no cLN. This indicates that different aggregations of global representations are important for different cLN layers.
|
| 155 |
+
|
| 156 |
+
# 5.3 OTHER ABLATIONS
|
| 157 |
+
|
| 158 |
+
Auxiliary Parallel Model. We study the effect of the hyperparameter $\lambda$ , which controls the contribution of the auxiliary parallel prediction model described in Section 4.2. For a given $\lambda$ , we now optimize $\hat { p _ { c } } ( \lambda ) = ( 1 - \bar { \lambda } ) \log p _ { c } ( . ) + \lambda \log \widetilde { p } _ { c } ( . )$ instead of just $\log p _ { c } ( . )$ . Note that $\widetilde { p } _ { c } ( . )$ , models e eeach pixel independently, which is more difficult than modelling each pixel conditioned on previous pixels given by $\bar { p } _ { c } ( . )$ . Hence, employing $\hat { p } _ { c } ( \lambda )$ as a holdout metric, would just lead to a trivial soluion at $\lambda = 0$ . Instead, the FID of the generated coarse $6 4 \mathrm { x } 6 4$ samples provides a reliable way to find an optimal value of $\lambda$ . In Figure 4, at $\lambda = 0 . 0 1$ , our model converges to a better FID faster with a marginal but consistent final improvement. At higher values the performance deteriorates quickly.
|
| 159 |
+
|
| 160 |
+
Upsamplers. Upsampling coarse colored, low-resolution images to a higher resolution is much simpler. Given ground truth $6 4 \times 6 4$ coarse images, the ColTran upsamplers map these to fine grained $2 5 6 \times 2 5 6$ images without any visible artifacts and FID of 16.4. For comparison, the FID between two random sets of 5000 samples from our holdout set is 15.5. It is further extremely important to provide the grayscale image as input to each of the individual upsamplers, without which the generated images appear highly smoothed out and the FID drops to 27.0. We also trained a single upsampler for both color and resolution. The FID in this case drops marginally to 16.6.
|
| 161 |
+
|
| 162 |
+
# 5.4 FRECHET INCEPTION DISTANCE
|
| 163 |
+
|
| 164 |
+
We compute FID using colorizations of 5000 grayscale images of resolution $2 5 6 \times 2 5 6$ from the ImageNet validation set as done in (Ardizzone et al., 2019). To compute the FID, we ensure that there is no overlap between the grayscale images that condition ColTran and those in the ground-truth distribution. In addition to ColTran, we report two additional results ColTran-S and ColTran-B. ColTran- $. B$ refers to the baseline Axial Transformer that conditions via addition at the input. PixColor samples smaller $2 8 \times 2 8$ colored images autoregressively as compared to ColTran’s $6 4 \times 6 4$ . As a control experiment, we train an autoregressive model on resolution $2 8 \times 2 8$ (ColTran-S) to disentangle architectural choices and the inherent stochasticity of modelling higher resolution images. ColTran-S and ColTran- $B$ obtains FID scores of 22.06 and 19.98 that significantly improve over the previous best FID of 24.32. Finally, ColTran achieves the best FID score of 19.37. All results are presented in Table 2 left.
|
| 165 |
+
|
| 166 |
+
<table><tr><td>Models</td><td>FID</td></tr><tr><td>ColTran ColTran-B</td><td>19.37 ± 0.09 19.98 ± 0.20</td></tr><tr><td>ColTran-S PixColor[16]</td><td>22.06 ± 0.13 24.32 ± 0.21</td></tr><tr><td>cGAN [3] cINN [1]</td><td>24.41 ± 0.27 25.13 ± 0.3</td></tr><tr><td>VAE-MDN[11]</td><td>25.98 ± 0.28</td></tr><tr><td>Ground truth Grayscale</td><td>14.68 ± 0.15 30.19 ± 0.1</td></tr></table>
|
| 167 |
+
|
| 168 |
+
<table><tr><td>Models</td><td>AMTFooling rate</td></tr><tr><td>ColTran (Oracle) ColTran (Seed 1)</td><td>62.0%±0.99</td></tr><tr><td>ColTran (Seed 2)</td><td>40.5 %± 0.81 42.3 % ± 0.76</td></tr><tr><td>ColTran( (Seed 3)</td><td>41.7 %± 0.83</td></tr><tr><td>PixColor [16] (Oracle)</td><td>38.3%±0.98</td></tr><tr><td>PixColor (Seed 1)</td><td>33.3 %±1.04</td></tr><tr><td>PixColor (Seed 2)</td><td></td></tr><tr><td>PixColor (Seed 3)</td><td>35.4 % ± 1.01</td></tr><tr><td></td><td>33.2 % ± 1.03</td></tr><tr><td>CIC [56]</td><td>29.2 %±0.98</td></tr><tr><td>LRAC [27]</td><td>30.9 % ± 1.02</td></tr><tr><td>LTBC [22]</td><td>25.8 % ± 0.97</td></tr></table>
|
| 169 |
+
|
| 170 |
+

|
| 171 |
+
Table 2: We outperform various state-of-the-art colorization models both on FID (left) and human evaluation (right). We obtain the FID scores from (Ardizzone et al., 2019) and the human evaluation results from (Guadarrama et al., 2017). ColTran-B is a baseline Axial Transformer that conditions via addition and ColTran-S is a control experiment where we train ColTran core (See: 4.1) on smaller $2 8 \times 2 8$ colored images.
|
| 172 |
+
Figure 5: We display the per-pixel, maximum predicted probability over 512 colors as a proxy for uncertainty.
|
| 173 |
+
|
| 174 |
+
Correlation between FID and Log-likelihood. For each architectural variant, Figure 4 right illustrates the correlation between the log-likelihood and FID after 150K training steps. There is a moderately positive correlation of 0.57 between the log-likelihood and FID. Importantly, even an absolute improvement on the order of $0 . 0 1 \textrm { - } 0 . 0 2$ can improve FID significantly. This suggests that designing architectures that achieve better log-likelihood values is likely to lead to improved FID scores and colorization fidelity.
|
| 175 |
+
|
| 176 |
+
# 5.5 QUALITATIVE EVALUATION
|
| 177 |
+
|
| 178 |
+
Human Evaluation. For our qualitative assessment, we follow the protocol used in PixColor (Guadarrama et al., 2017). ColTran colorizes 500 grayscale images, with 3 different colorizations per image, denoted as seeds. Human raters assess the quality of these colorizations with a two alternative-forced choice (2AFC) test. We display both the ground-truth and recolorized image sequentially for one second in random order. The raters are then asked to identify the image with fake colors. For each seed, we report the mean fooling rate over 500 colorizations and 5 different raters. For the oracle methods, we use the human rating to pick the best-of-three colorizations. ColTran’s best seed achieves a fooling rate of $4 2 . 3 \%$ compared to the $3 5 . 4 \%$ of PixColor’s best seed. ColTran Oracle achieves a fooling rate of $62 \%$ , indicating that human raters prefer ColTran’s best-of-three colorizations over the ground truth image itself.
|
| 179 |
+
|
| 180 |
+
Visualizing uncertainty. The autoregressive core model of ColTran should be highly uncertain at object boundaries when colors change. Figure 5 illustrates the per-pixel, maximum predicted probability over 512 colors as a proxy for uncertainty. We observe that the model is indeed highly uncertain at edges and within more complicated textures.
|
| 181 |
+
|
| 182 |
+
# 6 CONCLUSION
|
| 183 |
+
|
| 184 |
+
We presented the Colorization Transformer (ColTran), an architecture that entirely relies on selfattention for image colorization. We introduce conditional transformer layers, a novel building block for conditional, generative models based on self-attention. Our ablations show the superiority of employing this mechanism over a number of different baselines. Finally, we demonstrate that ColTran can generate diverse, high-fidelity colorizations on ImageNet, which are largely indistinguishable from the ground-truth even for human raters.
|
| 185 |
+
|
| 186 |
+
# REFERENCES
|
| 187 |
+
|
| 188 |
+
Lynton Ardizzone, Carsten Lüth, Jakob Kruse, Carsten Rother, and Ullrich Köthe. Guided image generation with conditional invertible neural networks. arXiv preprint arXiv:1907.02392, 2019.
|
| 189 |
+
|
| 190 |
+
Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.
|
| 191 |
+
|
| 192 |
+
Yun Cao, Zhiming Zhou, Weinan Zhang, and Yong Yu. Unsupervised diverse colorization via generative adversarial networks, 2017.
|
| 193 |
+
|
| 194 |
+
Zezhou Cheng, Qingxiong Yang, and Bin Sheng. Deep colorization. In Proceedings of the IEEE International Conference on Computer Vision, pp. 415–423, 2015.
|
| 195 |
+
|
| 196 |
+
Rewon Child, Scott Gray, Alec Radford, and Ilya Sutskever. Generating long sequences with sparse transformers. arXiv preprint arXiv:1904.10509, 2019.
|
| 197 |
+
|
| 198 |
+
Yuanzheng Ci, Xinzhu Ma, Zhihui Wang, Haojie Li, and Zhongxuan Luo. User-guided deep anime line art colorization with conditional adversarial networks. In Proceedings of the 26th ACM international conference on Multimedia, pp. 1536–1544, 2018.
|
| 199 |
+
|
| 200 |
+
Ceyda Cinarel and Byoung-Tak Zhang. Into the colorful world of webtoons: Through the lens of neural networks. In 2017 14th IAPR International Conference on Document Analysis and Recognition (ICDAR), volume 3, pp. 35–40. IEEE, 2017.
|
| 201 |
+
|
| 202 |
+
Ryan Dahl. Automatic colorization, 2016.
|
| 203 |
+
|
| 204 |
+
Harm De Vries, Florian Strub, Jérémie Mary, Hugo Larochelle, Olivier Pietquin, and Aaron C Courville. Modulating early visual processing by language. In Advances in Neural Information Processing Systems, pp. 6594–6604, 2017.
|
| 205 |
+
|
| 206 |
+
Aditya Deshpande, Jason Rock, and David Forsyth. Learning large-scale automatic image colorization. In Proceedings of the IEEE International Conference on Computer Vision, pp. 567–575, 2015.
|
| 207 |
+
|
| 208 |
+
Aditya Deshpande, Jiajun Lu, Mao-Chuang Yeh, Min Jin Chong, and David Forsyth. Learning diverse image colorization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 6837–6845, 2017.
|
| 209 |
+
|
| 210 |
+
Laurent Dinh, David Krueger, and Yoshua Bengio. Nice: Non-linear independent components estimation. arXiv preprint arXiv:1410.8516, 2014.
|
| 211 |
+
|
| 212 |
+
Vincent Dumoulin, Jonathon Shlens, and Manjunath Kudlur. A learned representation for artistic style. arXiv preprint arXiv:1610.07629, 2016.
|
| 213 |
+
|
| 214 |
+
David M Geshwind. Method for colorizing black and white footage, August 19 1986. US Patent 4,606,625.
|
| 215 |
+
|
| 216 |
+
Ian J Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial networks. arXiv preprint arXiv:1406.2661, 2014.
|
| 217 |
+
|
| 218 |
+
Sergio Guadarrama, Ryan Dahl, David Bieber, Mohammad Norouzi, Jonathon Shlens, and Kevin Murphy. Pixcolor: Pixel recursive colorization. arXiv preprint arXiv:1705.07208, 2017.
|
| 219 |
+
|
| 220 |
+
Raj Kumar Gupta, Alex Yong-Sang Chia, Deepu Rajan, Ee Sin Ng, and Huang Zhiyong. Image colorization using similar images. In Proceedings of the 20th ACM international conference on Multimedia, pp. 369–378, 2012.
|
| 221 |
+
|
| 222 |
+
Jonathan Ho, Xi Chen, Aravind Srinivas, Yan Duan, and Pieter Abbeel. Flow $^ { + + }$ : Improving flowbased generative models with variational dequantization and architecture design. arXiv preprint arXiv:1902.00275, 2019a.
|
| 223 |
+
|
| 224 |
+
Jonathan Ho, Nal Kalchbrenner, Dirk Weissenborn, and Tim Salimans. Axial attention in multidimensional transformers. arXiv preprint arXiv:1912.12180, 2019b.
|
| 225 |
+
|
| 226 |
+
Xun Huang and Serge Belongie. Arbitrary style transfer in real-time with adaptive instance normalization. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1501–1510, 2017.
|
| 227 |
+
|
| 228 |
+
Yi-Chin Huang, Yi-Shin Tung, Jun-Cheng Chen, Sung-Wen Wang, and Ja-Ling Wu. An adaptive edge detection based colorization algorithm and its applications. In Proceedings of the 13th annual ACM international conference on Multimedia, pp. 351–354, 2005.
|
| 229 |
+
|
| 230 |
+
Satoshi Iizuka, Edgar Simo-Serra, and Hiroshi Ishikawa. Let there be color! joint end-to-end learning of global and local image priors for automatic image colorization with simultaneous classification. ACM Transactions on Graphics (ToG), 35(4):1–11, 2016.
|
| 231 |
+
|
| 232 |
+
Revital Ironi, Daniel Cohen-Or, and Dani Lischinski. Colorization by example. In Rendering Techniques, pp. 201–210. Citeseer, 2005.
|
| 233 |
+
|
| 234 |
+
Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1125–1134, 2017.
|
| 235 |
+
|
| 236 |
+
Norman P. Jouppi, Cliff Young, Nishant Patil, David Patterson, Gaurav Agrawal, Raminder Bajwa, Sarah Bates, Suresh Bhatia, Nan Boden, Al Borchers, Rick Boyle, Pierre luc Cantin, Clifford Chao, Chris Clark, Jeremy Coriell, Mike Daley, Matt Dau, Jeffrey Dean, Ben Gelb, Tara Vazir Ghaemmaghami, Rajendra Gottipati, William Gulland, Robert Hagmann, C. Richard Ho, Doug Hogberg, John Hu, Robert Hundt, Dan Hurt, Julian Ibarz, Aaron Jaffey, Alek Jaworski, Alexander Kaplan, Harshit Khaitan, Andy Koch, Naveen Kumar, Steve Lacy, James Laudon, James Law, Diemthu Le, Chris Leary, Zhuyuan Liu, Kyle Lucke, Alan Lundin, Gordon MacKean, Adriana Maggiore, Maire Mahony, Kieran Miller, Rahul Nagarajan, Ravi Narayanaswami, Ray Ni, Kathy Nix, Thomas Norrie, Mark Omernick, Narayana Penukonda, Andy Phelps, Jonathan Ross, Matt Ross, Amir Salek, Emad Samadiani, Chris Severn, Gregory Sizikov, Matthew Snelham, Jed Souter, Dan Steinberg, Andy Swing, Mercedes Tan, Gregory Thorson, Bo Tian, Horia Toma, Erick Tuttle, Vijay Vasudevan, Richard Walter, Walter Wang, Eric Wilcox, and Doe Hyun Yoon. In-datacenter performance analysis of a tensor processing unit, 2017.
|
| 237 |
+
|
| 238 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. arXiv preprint arXiv:1312.6114, 2013.
|
| 239 |
+
|
| 240 |
+
Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. Learning representations for automatic colorization. In European conference on computer vision, pp. 577–593. Springer, 2016.
|
| 241 |
+
|
| 242 |
+
Anat Levin, Dani Lischinski, and Yair Weiss. Colorization using optimization. In ACM SIGGRAPH 2004 Papers, pp. 689–694. 2004.
|
| 243 |
+
|
| 244 |
+
Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of the IEEE international conference on computer vision, pp. 3730–3738, 2015.
|
| 245 |
+
|
| 246 |
+
Qing Luan, Fang Wen, Daniel Cohen-Or, Lin Liang, Ying-Qing Xu, and Heung-Yeung Shum. Natural image colorization. In Proceedings of the 18th Eurographics conference on Rendering Techniques, pp. 309–320, 2007.
|
| 247 |
+
|
| 248 |
+
Jacob Menick and Nal Kalchbrenner. Generating high fidelity images with subscale pixel networks and multidimensional upscaling. arXiv preprint arXiv:1812.01608, 2018.
|
| 249 |
+
|
| 250 |
+
Safa Messaoud, David Forsyth, and Alexander G. Schwing. Structural consistency and controllability for diverse colorization. In Proceedings of the European Conference on Computer Vision (ECCV), September 2018.
|
| 251 |
+
|
| 252 |
+
Yuji Morimoto, Yuichi Taguchi, and Takeshi Naemura. Automatic colorization of grayscale images using multiple images on the web. In SIGGRAPH 2009: Talks, pp. 1–1. 2009.
|
| 253 |
+
|
| 254 |
+
Aaron van den Oord, Nal Kalchbrenner, and Koray Kavukcuoglu. Pixel recurrent neural networks. arXiv preprint arXiv:1601.06759, 2016.
|
| 255 |
+
|
| 256 |
+
Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Łukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. arXiv preprint arXiv:1802.05751, 2018.
|
| 257 |
+
|
| 258 |
+
Ethan Perez, Florian Strub, Harm De Vries, Vincent Dumoulin, and Aaron Courville. Film: Visual reasoning with a general conditioning layer. arXiv preprint arXiv:1709.07871, 2017.
|
| 259 |
+
|
| 260 |
+
François Pitié, Anil C Kokaram, and Rozenn Dahyot. Automated colour grading using colour distribution transfer. Computer Vision and Image Understanding, 107(1-2):123–137, 2007.
|
| 261 |
+
|
| 262 |
+
Yingge Qu, Tien-Tsin Wong, and Pheng-Ann Heng. Manga colorization. ACM Transactions on Graphics (TOG), 25(3):1214–1220, 2006.
|
| 263 |
+
|
| 264 |
+
Erik Reinhard, Michael Adhikhmin, Bruce Gooch, and Peter Shirley. Color transfer between images. IEEE Computer graphics and applications, 21(5):34–41, 2001.
|
| 265 |
+
|
| 266 |
+
Amelie Royer, Alexander Kolesnikov, and Christoph H Lampert. Probabilistic image colorization. arXiv preprint arXiv:1705.04258, 2017.
|
| 267 |
+
|
| 268 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision, 115(3):211–252, 2015.
|
| 269 |
+
|
| 270 |
+
Daniel Sykora, Jan Buriánek, and Ji \` ˇrí Žára. Unsupervised colorization of black-and-white cartoons. In Proceedings of the 3rd international symposium on Non-photorealistic animation and rendering, pp. 121–127, 2004.
|
| 271 |
+
|
| 272 |
+
Yu-Wing Tai, Jiaya Jia, and Chi-Keung Tang. Local color transfer via probabilistic segmentation by expectation-maximization. In 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05), volume 1, pp. 747–754. IEEE, 2005.
|
| 273 |
+
|
| 274 |
+
Tijmen Tieleman and Geoffrey Hinton. Lecture 6.5-rmsprop: Divide the gradient by a running average of its recent magnitude. COURSERA: Neural networks for machine learning, 4(2):26–31, 2012.
|
| 275 |
+
|
| 276 |
+
Sotirios A Tsaftaris, Francesca Casadio, Jean-Louis Andral, and Aggelos K Katsaggelos. A novel visualization tool for art history and conservation: Automated colorization of black and white archival photographs of works of art. Studies in conservation, 59(3):125–135, 2014.
|
| 277 |
+
|
| 278 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in neural information processing systems, pp. 5998–6008, 2017.
|
| 279 |
+
|
| 280 |
+
Carl Vondrick, Abhinav Shrivastava, Alireza Fathi, Sergio Guadarrama, and Kevin Murphy. Tracking emerges by colorizing videos. In Proceedings of the European conference on computer vision (ECCV), pp. 391–408, 2018.
|
| 281 |
+
|
| 282 |
+
Huiyu Wang, Yukun Zhu, Bradley Green, Hartwig Adam, Alan Yuille, and Liang-Chieh Chen. Axialdeeplab: Stand-alone axial-attention for panoptic segmentation. arXiv preprint arXiv:2003.07853, 2020.
|
| 283 |
+
|
| 284 |
+
Dirk Weissenborn, Oscar Täckström, and Jakob Uszkoreit. Scaling autoregressive video models. arXiv preprint arXiv:1906.02634, 2019.
|
| 285 |
+
|
| 286 |
+
Tomihisa Welsh, Michael Ashikhmin, and Klaus Mueller. Transferring color to greyscale images. In Proceedings of the 29th annual conference on Computer graphics and interactive techniques, pp. 277–280, 2002.
|
| 287 |
+
|
| 288 |
+
Chufeng Xiao, Chu Han, Zhuming Zhang, Jing Qin, Tien-Tsin Wong, Guoqiang Han, and Shengfeng He. Example-based colourization via dense encoding pyramids. In Computer Graphics Forum, volume 39, pp. 20–33. Wiley Online Library, 2020.
|
| 289 |
+
|
| 290 |
+
Liron Yatziv and Guillermo Sapiro. Fast image and video colorization using chrominance blending. IEEE transactions on image processing, 15(5):1120–1129, 2006.
|
| 291 |
+
|
| 292 |
+
Fisher Yu, Ari Seff, Yinda Zhang, Shuran Song, Thomas Funkhouser, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365, 2015.
|
| 293 |
+
|
| 294 |
+
Bo Zhang, Mingming He, Jing Liao, Pedro V Sander, Lu Yuan, Amine Bermak, and Dong Chen. Deep exemplar-based video colorization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 8052–8061, 2019a.
|
| 295 |
+
|
| 296 |
+
Han Zhang, Ian Goodfellow, Dimitris Metaxas, and Augustus Odena. Self-attention generative adversarial networks. In International Conference on Machine Learning, pp. 7354–7363. PMLR, 2019b.
|
| 297 |
+
|
| 298 |
+
Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In European conference on computer vision, pp. 649–666. Springer, 2016.
|
| 299 |
+
|
| 300 |
+
Richard Zhang, Jun-Yan Zhu, Phillip Isola, Xinyang Geng, Angela S Lin, Tianhe Yu, and Alexei A Efros. Real-time user-guided image colorization with learned deep priors. arXiv preprint arXiv:1705.02999, 2017.
|
| 301 |
+
|
| 302 |
+

|
| 303 |
+
Figure 6: Left: FID vs training steps, with and without polyak averaging. Right: The effect of K in top-K sampling on FID. See Appendix B and E
|
| 304 |
+
|
| 305 |
+
# ACKNOWLEDGEMENTS
|
| 306 |
+
|
| 307 |
+
We would like to thank Mohammad Norouzi, Rianne van den Berg, Mostafa Dehghani for their useful comments on the draft and Avital Oliver for assistance in the Mechanical Turk setup.
|
| 308 |
+
|
| 309 |
+
# CHANGELOG
|
| 310 |
+
|
| 311 |
+
• v2: Dataset Sharding fix across multiple TPU workers. This changed the FID scores of ColTran, ColTran-B and ColTran-S from their v1 values of 19.71, 21.6 and 21.9 to their v2 values of 19.37, 19.98 and 22.06 respecitvely.
|
| 312 |
+
|
| 313 |
+
# A CODE, CHECKPOINTS AND TENSORBOARD FILES
|
| 314 |
+
|
| 315 |
+
Our implementation is open-sourced in the google-research framework at https://github.com/googleresearch/google-research/tree/master/coltran with a zip compressed version here. Our full set of hyperparameters are available here.
|
| 316 |
+
|
| 317 |
+
We provide pre-trained checkpoints of the colorizer and upsamplers on ImageNet at https://console.cloud.google.com/storage/browser/gresearch/coltran. Finally, reference tensorboard files for our training runs are available at colorizer tensorboard, color upsampler tensorboard and spatial upsampler tensorboard.
|
| 318 |
+
|
| 319 |
+
# B EXPONENTIAL MOVING AVERAGE
|
| 320 |
+
|
| 321 |
+
We found using an exponential moving average (EMA) of our checkpoints, extremely crucial to generate high quality samples. In Figure 6, we display the FID as a function of training steps, with and without EMA. On applying EMA, our FID score improves steadily over time.
|
| 322 |
+
|
| 323 |
+
# C NUMBER OF PARAMETERS AND INFERENCE SPEED
|
| 324 |
+
|
| 325 |
+
Inference speed. ColTran core can sample a batch of 20 64x64 grayscale images in around 3.5 -5 minutes on a P100 GPU vs PixColor that takes 10 minutes to colorize $2 8 \mathbf { x } 2 8$ grayscale images on a K40 GPU. Sampling 28x28 colorizations takes around 30 seconds. The upsampler networks take in the order of milliseconds.
|
| 326 |
+
|
| 327 |
+
Further, in our naive implementation, we recompute the activations, $\mathbf { c } U _ { s } ^ { z } , \mathbf { c } U _ { b } ^ { z } , \mathbf { c } U _ { s } ^ { f } , \mathbf { c } U _ { b } ^ { f }$ in Table 1 to generate every pixel in the inner decoder. Instead, we can compute these activations once per-grayscale image in the encoder and once per-row in the outer decoder and reuse them. This is likely to speed up sampling even more and we leave this engineering optimization for future work.
|
| 328 |
+
|
| 329 |
+
Number of parameters. ColTran has a total of ColTran core (46M) + Color Upsampler $\left( 1 4 \mathbf { M } \right) +$ Spatial Upsampler $( 1 4 \mathbf { M } ) = 7 4 \mathbf { M }$ parameters. In comparison, PixColor has Conditioning network $( 4 4 \mathbf { M } ) + \mathbf { \Phi }$ Colorizer network $( 1 1 \mathbf { M } ) + 1$ Refinement Network $( 2 8 \mathbf { M } ) = 8 3 \mathbf { M }$ parameters.
|
| 330 |
+
|
| 331 |
+

|
| 332 |
+
Figure 7: Ablated models. Gated: Gated conditioning layers as done in (Oord et al., 2016) and $c A t t + c M L P ,$ global: Global conditioning instead of pointwise conditioning in cAtt and cLN.
|
| 333 |
+
|
| 334 |
+
# D LOWER COMPUTE REGIME
|
| 335 |
+
|
| 336 |
+
We retrained the autoregressive colorizer and color upsampler on 4 TPUv2 chips (the lowest configuration) with a reduced-batch size of 56 and 192 each. For the spatial upsampler, we found that a batch-size of 8 was sub-optimal and lead to a large deterioration in loss. We thus used a smaller spatial upsampler with 2 axial attention blocks with a batch-size of 16 and trained it also on 4 TPUv2 chips. The FID drops from 19.71 to 20.9 which is still significantly better than the other models in 2. We note that in this experiment, we use only 12 TPUv2 chips in total while PixColor (Guadarrama et al., 2017) uses a total of 16 GPUs.
|
| 337 |
+
|
| 338 |
+
# E IMPROVED FID WITH TOP-K SAMPLING
|
| 339 |
+
|
| 340 |
+
We can improve colorization fidelity and remove artifacts due to unnatural colors via Top-K sampling at the cost of reduced colorization diversity. In this setting, for a given pixel ColTran generates a color from the top-K colors (instead of 512 colors) as determined by the predicted probabilities. Our results in Figure 6 $K = 4$ and $K = 8$ demonstrate a performance improvement over the baseline ColTran model with $K = 5 1 2$
|
| 341 |
+
|
| 342 |
+
# F ADDITIONAL ABLATIONS:
|
| 343 |
+
|
| 344 |
+
Additional ablations of our conditional transformer layers are in Figure 7 which did not help.
|
| 345 |
+
|
| 346 |
+
• Conditional transformer layers based on Gated layers (Oord et al., 2016) (Gated) • A global conditioning layer instead of pointwise conditioning in cAtt and cLN. $c A t t + c M L P ,$ global
|
| 347 |
+
|
| 348 |
+
# G AUTOREGRESSIVE MODELS
|
| 349 |
+
|
| 350 |
+
Autoregressive models are a family of probabilistic methods that model joint distribution of data $P ( x )$ or a sequence of symbols $\left( x _ { 1 } , x _ { 2 } , \ldots x _ { n } \right)$ as a product of conditionals $\textstyle \prod _ { i = 1 } ^ { N } P ( x _ { i } | { x _ { < i } } )$ . During training, the input to autoregressive models are the entire sequence of ground-truth symbols. Masking ensures that the contribution of all "future" symbols in the sequence are zeroed out. The outputs of the autoregressive model are the corresponding conditional distributions. $P ( x _ { i } | \boldsymbol x _ { < i } )$ . Optimizing the parameters of the autoregressive model proceeds by a standard log-likelihood objective.
|
| 351 |
+
|
| 352 |
+
Generation happens sequentially, symbol-by-symbol. Once a symbol $x _ { i }$ is generated, the entire sequence $( x _ { 1 } , x _ { 2 } , \ldots x _ { i } )$ are fed to the autoregressive model to generate $x _ { i + 1 }$ .
|
| 353 |
+
|
| 354 |
+
In the case of autoregressive image generation symbols typically correspond to the 3 RGB pixelchannel. These are generated sequentially in raster-scan order, channel by channel and pixel by pixel.
|
| 355 |
+
|
| 356 |
+

|
| 357 |
+
Figure 8: We train our colorization model on ImageNet and display high resolution colorizations from LSUN
|
| 358 |
+
|
| 359 |
+
# H ROW/COLUMN SELF-ATTENTION
|
| 360 |
+
|
| 361 |
+
In the following we describe row self-attention, that is, we omit the height dimension as all operations are performed in parallel for each column. Given the representation of a single row within of an image $\mathbf { x } _ { i } ,$ · $\in \mathbb { R } ^ { W \times D }$ , row-wise self-attention block is applied as follows:
|
| 362 |
+
|
| 363 |
+
$$
|
| 364 |
+
\begin{array} { r l r } & { [ \mathbf { q } , \mathbf { k } , \mathbf { v } ] = \mathrm { L N } ( \mathbf { x } _ { i , \cdot } ) U _ { q k v } } & { U _ { q k v } \in \mathbb { R } ^ { D \times 3 D _ { h } } } \\ & { A = \mathrm { s o f t m a x } \left( \mathbf { q } \mathbf { k } ^ { \top } / \sqrt { D _ { h } } \right) } & { A \in \mathbb { R } ^ { W \times W } } \\ & { \mathrm { S A } ( \mathbf { x } _ { i , \cdot } ) = A \mathbf { v } } \\ & { \mathrm { M S A } ( \mathbf { x } _ { i , \cdot } ) = \left[ \mathrm { S A } _ { 1 } ( \mathbf { x } _ { i , \cdot } ) , \mathrm { S A } _ { 2 } ( \mathbf { x } _ { i , \cdot } ) , \cdots , \mathrm { S A } _ { k } ( \mathbf { x } _ { i , \cdot } ) \right] U _ { o u t } } & { U _ { o u t } \in \mathbb { R } ^ { k \cdot D _ { h } \times D } } \end{array}
|
| 365 |
+
$$
|
| 366 |
+
|
| 367 |
+
LN refers to the application of layer normalization (Ba et al., 2016). Finally, we apply residual connections and a feed-forward neural network with a single hidden layer and ReLU activation (MLP) after each self-attention block as it is common practice in transformers.
|
| 368 |
+
|
| 369 |
+
$$
|
| 370 |
+
\begin{array} { r } { \hat { \mathbf { x } } _ { i , \cdot } = \mathrm { M L P } ( \mathrm { L N } ( \mathbf { x } _ { i , \cdot } ^ { \prime } ) ) + \mathbf { x } _ { i , \cdot } ^ { \prime } , \qquad \mathbf { x } _ { i , \cdot } ^ { \prime } = \mathrm { M S A } ( \mathbf { x } _ { i , \cdot } ) + \mathbf { x } _ { i , \cdot } } \end{array}
|
| 371 |
+
$$
|
| 372 |
+
|
| 373 |
+
Column-wise self-attention over $\mathbf { x } _ { \cdot , j } \in \mathbb { R } ^ { H \times D }$ works analogously.
|
| 374 |
+
|
| 375 |
+
# I OUT OF DOMAIN COLORIZATIONS
|
| 376 |
+
|
| 377 |
+
We use our trained colorization model on ImageNet to colorize high-resolution grayscale images from LSUN $2 5 6 \times 2 5 6$ ( $\mathrm { Y u }$ et al., 2015) and low-resolution grayscale images from Celeb-A (Liu
|
| 378 |
+
|
| 379 |
+

|
| 380 |
+
Figure 9: We train our colorization model on ImageNet and display low resolution colorizations from Celeb-A
|
| 381 |
+
|
| 382 |
+

|
| 383 |
+
Figure 10: Top: Colorizations Bottom: Ground truth. From left to right, our colorizations have a progressively higher fooling rate.
|
| 384 |
+
|
| 385 |
+
et al., 2015) $6 4 \times 6 4$ . Note that these models were trained only on ImageNet and not finetuned on Celeb-A or LSUN.
|
| 386 |
+
|
| 387 |
+
# J NUMBER OF AXIAL ATTENTION BLOCKS
|
| 388 |
+
|
| 389 |
+
We did a very small hyperparameter sweep using the baseline axial transformer (no conditional layers) with the following configurations:
|
| 390 |
+
|
| 391 |
+
• hidden size $= 5 1 2$ , number of blocks $= 4$ • hidden size $= 1 0 2 4$ , number of blocks $= 2$ • hidden size $= 5 1 2$ , number of blocks $= 2$
|
| 392 |
+
|
| 393 |
+
Once we found the optimal configuration, we fixed this for all future architecture design.
|
| 394 |
+
|
| 395 |
+
# K ANALYSIS OF MTURK RATINGS
|
| 396 |
+
|
| 397 |
+

|
| 398 |
+
Figure 11: In each column, we display the ground truth followed by 3 samples. Left: Diverse and real. Center: Realism improves from left to right. Right: Failure cases
|
| 399 |
+
|
| 400 |
+

|
| 401 |
+
Figure 12: We display the per-pixel, maximum predicted probability over 512 colors as a proxy for uncertainty.
|
| 402 |
+
|
| 403 |
+
We analyzed our samples on the basis of the MTurk ratings in Figure 11. To the left, we show images, where all the samples have a fool rate $> 6 0 \%$ . Our model is able to show diversity in color for both high-level structure and low-level details. In the center, we display samples that have a high variance in MTurk ratings, with a difference of $80 \%$ between the best and the worst sample. All of these are complex objects, that our model is able to colorize reasonably well given multiple attempts. To the right of Figure 11, we show failure cases where all samples have a fool rate of $0 \%$ , For these cases, our model is unable to colorize highly complex structure, that would arguably be difficult even for a human.
|
| 404 |
+
|
| 405 |
+
# L MORE PROBABILITY MAPS
|
| 406 |
+
|
| 407 |
+
We display additional probability maps to visualize uncertainty as done in 5.5.
|
| 408 |
+
|
| 409 |
+
# M MORE SAMPLES
|
| 410 |
+
|
| 411 |
+
We display a wide-diversity of colorizations from ColTran that were not cherry-picked.
|
| 412 |
+
|
| 413 |
+

|
| 414 |
+
|
| 415 |
+

|
| 416 |
+
|
| 417 |
+

|
| 418 |
+
|
| 419 |
+

|
| 420 |
+
|
| 421 |
+

|
md/train/5PiSFHhRe2C/5PiSFHhRe2C.md
ADDED
|
@@ -0,0 +1,374 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# META AUXILIARY LABELS WITH CONSTITUENTBASED TRANSFORMER FOR ASPECT-BASED SENTIMENT ANALYSIS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
Aspect based sentiment analysis (ABSA) is a challenging natural language processing task that could benefit from syntactic information. Previous work exploit dependency parses to improve performance on the task, but this requires the existence of good dependency parsers. In this paper, we build a constituent-based transformer for ABSA that can induce constituents without constituent parsers. We also apply meta auxiliary learning to generate labels on edges between tokens, supervised by the objective of the ABSA task. Without input from dependency parsers, our models outperform previous work on three Twitter data sets and match previous work closely on two review data sets.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Aspect-based Sentiment Analysis (ABSA) is the task of predicting sentiment polarity towards observed aspects in a sentence. Recent work (Bai et al., 2020; Huang & Carley, 2019; Sun et al., 2019; Wang et al., 2020) used syntactic information from dependency parses to achieve new stateof-the-art results on benchmark ABSA data sets. However, these works (i) assumed the existence of good dependency parsers, and (ii) could not further optimize the pre-defined dependency labels for downstream performance of ABSA. Motivated by these limitations, we propose to induce syntactic information with supervision from the ABSA task.
|
| 12 |
+
|
| 13 |
+
To take syntax into account, we aim to induce the necessary syntactic information for the ABSA task with inductive biases. We first design a Constituent-based Transformer (ConsTrans) to group tokens into constituents supervised by the ABSA objective. We argue that the formation of constituents provides a hierarchical structure of the sentence that is suitable for sentiment analysis. For example, in the sentence “Chinese dumplings in this restaurant taste very good” with the aspect term “Chinese dumplings”, it is important to accurately assign the phrase “taste very good” to the aspect.
|
| 14 |
+
|
| 15 |
+
Next, as seen in Figure 1, even though the dependency graph structures for both sentences are identical, the sentiment towards “Chelsea” is positive for the input sentence on the left and negative for the one on the right. Therefore, the type of syntactic relationship between tokens would be useful to identify the sentiment towards the aspect term. Hence, we further extend ConsTrans into a Relational Constituent-based Transformer (RelConsTrans) to learn relation embeddings between every pair of tokens in the input sentence. We find that simply adding relation embedding fails to outperform ConsTrans. Inspired by Liu et al. (2019), we further extend RelConsTrans to supervise the relation embedding with an auxiliary label generator (RelConsTransLG). In previous work (e.g. Bai et al., 2020; Huang & Carley, 2019), the dependency parser played the role of the auxiliary label generator. However, such dependency parsers were not trained to provide auxiliary labels meant to improve ABSA. RelConsTransLG enables us to train the auxiliary label generator alongside the primary task to generate auxiliary labels that could directly enhance the performance of ABSA.
|
| 16 |
+
|
| 17 |
+
We evaluate our models on five data sets - restaurant and laptop reviews (Pontiki et al., 2014), ACL14 Twitter14 data (Dong et al., 2014), Twitter15 and Twitter17 from a multi-modal ABSA data set (Yu & Jiang, 2019). Compared against previous work which used dependency parsers, our models outperform them on all the Twitter data sets and matched previous work closely on the review data sets even without the use of constituent or dependency parser.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
Figure 1: Dependency parse labels as auxiliary labels that help sentiment disambiguation. Tokens in bold and underlined are the aspect terms. Example taken from Bai et al. (2020).
|
| 23 |
+
(a) ConsTrans Encoder Stack: dotted arrows refer to lower attention weights between tokens from different constituents.
|
| 24 |
+
(b) A lower ConsTrans layer: the shaded region is different from the vanilla Transformer.
|
| 25 |
+
|
| 26 |
+
# 2 MODEL FORMULATION
|
| 27 |
+
|
| 28 |
+
Given a sentence of $m$ tokens, $s = \{ w _ { 0 } , \ldots , w _ { m - 1 } \}$ , and a target aspect, $t = \left\{ w _ { j } , \ldots , w _ { j + q - 1 } \right\}$ of length $q$ , the objective of ABSA is to predict the sentiment polarity $y \in \{$ {negative, neutral, positive $\}$ towards the target aspect $t$ mentioned in sentence $s$ . In all our models, we use the pretrained BERT (Devlin et al., 2018) model (BERT-base-uncased) to obtain contextual embeddings as inputs to our model, and we fine tune it together with the model. We format the input to the BERT model as a e pair: obtai $[ C L S ] + s + [ S E P ] + t + [ S E P ]$ . We represent each tokenas input to our model. O $w _ { i }$ with the representationbase model is a 4-layer $h _ { i } ^ { b e r t , 1 2 }$
|
| 29 |
+
transformer on this representation, similar to the baseline Transformer(B) in Bai et al. (2020). In the rest of this section, we describe the modifications we make to this transformer to build our three proposed models, ConsTrans, RelConsTrans and RelConsTransLG.
|
| 30 |
+
|
| 31 |
+
# 2.1 CONSTITUENT-BASED TRANSFORMER (ConsTrans)
|
| 32 |
+
|
| 33 |
+
ConsTrans contains a stack of 4 Transformer encoder layers (Vaswani et al., 2017) with Multi-Head Attention (MHA) and a point-wise feed forward sub-layer in each layer. As illustrated in Figure 2a, the encoder stack of ConsTrans is grouped into two parts - the lower layers and the upper layers. In all our experiments, we have 2 layers each in both the lower and upper layers. The main difference between a vanilla Transformer network and ConsTrans is that the attention scores computed in the MHA layer between a pair of tokens are adjusted based on the probability that the two tokens belong to the same constituent. In the lower layers, attention weights are adjusted such that greater attention weights are assigned to tokens within the same constituent. This adjustment is not imposed at upper layers of the encoder to allow for longer range interactions.
|
| 34 |
+
|
| 35 |
+
Figure 2b shows a single encoder layer from the lower layers of the encoder stack. The shaded region in the figure, which emphasizes the difference from a vanilla Transformer encoder layer, contains three components: the MHA which provides the vanilla attention scores, the constituent probability scorer, and finally the adjusted MHA scorer that computes the final attention.
|
| 36 |
+
|
| 37 |
+
Constituent Probability Scorer Kim et al. (2020b) found that tokens from the same constituent tend to exhibit similar attention distributions. Hence we propose to determine the probability that a pair of tokens belong to the same constituent by the similarity of their attention distributions. We use the scaled dot-product attention (Vaswani et al., 2017) in the MHA layer to first obtain the attention
|
| 38 |
+
|
| 39 |
+
distributions of a token:
|
| 40 |
+
|
| 41 |
+
$$
|
| 42 |
+
\alpha _ { i , j } ^ { l z } = \frac { \exp { F ^ { l z } ( h _ { i } ^ { l } , h _ { j } ^ { l } ) } } { \sum _ { j ^ { \prime } } \exp { F ^ { l z } ( h _ { i } ^ { l } , h _ { j ^ { \prime } } ^ { l } ) } } ; \quad F ^ { l z } ( h _ { i } ^ { l } , h _ { j } ^ { l } ) = \frac { ( W _ { Q } ^ { l z } h _ { i } ^ { l } ) ( W _ { K } ^ { l z } h _ { j } ^ { l } ) ^ { T } } { \sqrt { d _ { k } } } ,
|
| 43 |
+
$$
|
| 44 |
+
|
| 45 |
+
where $W _ { Q } ^ { l z } \in \mathbb { R } ^ { d _ { m o d e l } , d _ { q } }$ and $W _ { K } ^ { l z } \in \mathbb { R } ^ { d _ { m o d e l } , d _ { k } }$ are projection layers that project the query and key to the various attention heads with dimension $d _ { q }$ and $d _ { k }$ respectively. The attention distribution for token $i$ at layer $l$ and attention head $z$ is then defined to be the vector $\alpha _ { i } ^ { l z } = [ \alpha _ { i j } ^ { l z } ] _ { j }$ . To obtain the attention distribution similarity for two tokens, $i$ and $j$ , we concatenate the attention patterns of the pair before passing it through a projection layer:
|
| 46 |
+
|
| 47 |
+
$$
|
| 48 |
+
s i m _ { i , j } ^ { l z } = \sqrt { \sigma ( W _ { \alpha } [ \alpha _ { i } ^ { l z } , \alpha _ { j } ^ { l z } ] ) \times \sigma ( W _ { \alpha } [ \alpha _ { j } ^ { l z } , \alpha _ { i } ^ { l z } ] ) }
|
| 49 |
+
$$
|
| 50 |
+
|
| 51 |
+
where $s i m _ { i , j } ^ { l z }$ refers to the attention distribution similarity score for token $i$ and token $j$ in layer $l$ for attention head $z$ , $W _ { \alpha } \in \mathbb { R } ^ { d , 1 }$ is a linear projection, [: , :] refers to the concatenation function and $\sigma$ the sigmoid function so that $s i m _ { i , j } ^ { l z } \in [ \bar { 0 , 1 } ]$ . We also note that this ensures $s i m _ { i , j } ^ { l z } = s i m _ { j , i } ^ { l z }$
|
| 52 |
+
|
| 53 |
+
We then use the attention distribution similarity scores to compute the probability that a pair of tokens belong to the same constituent. The base probability $c _ { i , j } ^ { ' l z }$ , that tokens $i$ and $j$ belong to the same constituent, is computed as follows:
|
| 54 |
+
|
| 55 |
+
$$
|
| 56 |
+
c _ { i , j } ^ { ' l z } = \left\{ \prod _ { k = 0 } ^ { j - i } s i m _ { i + k , i + k + 1 } ^ { l z } \quad j \leq i \right.
|
| 57 |
+
$$
|
| 58 |
+
|
| 59 |
+
This formulation considers the probability that tokens spanned by the two tokens $i$ and $j$ form a contiguous constituent. Moreover, since $\dot { s } i m _ { i , j } ^ { l z } \in [ 0 , 1 ]$ , the probability that two tokens are in the same constituent would decrease monotonically with the distance between $i$ and $j$ . To encourage the induced constituents to be consistent across layers, the final constituent probabilities obtained at the current layer would be the weighted sum of itself and constituent probabilities from the previous layer:
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
c _ { i , j } ^ { l z } = \lambda * c _ { i , j } ^ { ' l z } + \left( 1 - \lambda \right) * c _ { i , j } ^ { ' l - 1 , z } ,
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
where $\lambda \in [ 0 , 1 ]$ is a hyper-parameter that we tune.
|
| 66 |
+
|
| 67 |
+
Adjusted Attention in the Lower Constituent Layers Finally, we adjust the attention scores between a pair of tokens according to the probability that the pair belongs to the same constituent, through a softmax layer:
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
\alpha _ { i , j } ^ { ' l z } = \frac { \exp c _ { i , j } ^ { l z } * \alpha _ { i , j } ^ { l z } } { \sum _ { j ^ { \prime } } \exp c _ { i , j } ^ { l z } * \alpha _ { i , j ^ { \prime } } ^ { l z } }
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
where $\alpha _ { i , j } ^ { ' l z }$ denotes the adjusted attention score for token $i$ and $j$ for layer $l$ and attention head $z$
|
| 74 |
+
|
| 75 |
+
# 2.2 RELATIONAL CONSTITUENT-BASED TRANSFORMER (RelConsTrans)
|
| 76 |
+
|
| 77 |
+
We extend ConsTrans with the objective of learning relation embedding between pairs of tokens. For each pair of tokens, the goal is to learn an embedding that represents the syntactic relation between the pair. To generate the relation embedding, we learn a non-linear projection for the concatenation of the representation for the tokens:
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
r _ { i , j } = W _ { r 2 } E L U ( W _ { r 1 } [ h _ { i } , h _ { j } ] ) ,
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
where $r _ { i , j }$ is the learnt embedding for token $i$ and token $j$ , $E L U$ is the exponential linear unit, $h _ { i }$ and $h _ { j }$ are BERT embeddings for token $i$ and $j$ respectively. The learnt embedding would be included in two ways - during attention computation and during information propagation stage.
|
| 84 |
+
|
| 85 |
+
Relation-aware Attention Computation To perform relation-aware attention computation, we make the following changes to the adjusted scaled dot-product attention formulation in Equation 1 before adjusting the attention scores with constituent probability as in Equation 5:
|
| 86 |
+
|
| 87 |
+

|
| 88 |
+
Figure 3: Oveview of Relational Constituent-based Transformer and Relation Label Generator.
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\alpha _ { i , j } ^ { l z } = \frac { \exp F ^ { l z } ( h _ { i } ^ { l } , h _ { j } ^ { l } ) } { \sum _ { j ^ { \prime } } \exp F ^ { l z } ( h _ { i } ^ { l } , h _ { j ^ { \prime } } ^ { l } ) } ; \quad F ^ { l z } ( h _ { i } ^ { l } , h _ { j } ^ { l } ) = \frac { ( W _ { Q } ^ { l z } h _ { i } ^ { l } ) ( W _ { K } ^ { l z } h _ { j } ^ { l } + W _ { K r } ^ { l } r _ { i j } ) ^ { T } } { \sqrt { d _ { k } } }
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
where $W _ { K r } ^ { l } \in \mathbb { R } ^ { d _ { r } , d _ { k } }$ projects the learnt relation embedding $r _ { i j }$ and is shared across attention heads. The attention weights would be determined by both textual features, $h _ { j } ^ { l }$ , and syntactic relation represented by $r _ { i j }$ .
|
| 95 |
+
|
| 96 |
+
Relation-aware information propagation The attention weights obtained from Equation 7 would then be used to weigh the contribution of other tokens in updating the representation of a token, $h _ { i } ^ { l }$ with the following equation:
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
h _ { i } ^ { l + 1 } = W _ { p } ^ { l } [ \sum _ { j } \alpha _ { i , j } ^ { ' l 1 } * ( W _ { V } ^ { l z } h _ { j } ^ { l } + W _ { V r } ^ { l } r _ { i j } ) ] _ { z }
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
where $W _ { V } ^ { l z } \in \mathbb R ^ { d _ { m o d e l } , d _ { v } }$ is a projection layer that project the value vector to various attention heads with dimension $d _ { v }$ . $W _ { p } ^ { l } \in \mathbb R ^ { d _ { v } , d _ { m o d e l } }$ projects the concatenation of vectors from each attention head to size $d _ { m o d e l }$ for layer $l$ . $W _ { V r } ^ { l } \in \mathbb { R } ^ { d _ { r } , d _ { v } }$ is a projection layer and is shared across attention heads. Therefore, both textual and syntactic and features would be propagated from one token to another.
|
| 103 |
+
|
| 104 |
+
# 2.3 RelConsTrans WITH LABEL GENERATOR (RelConsTransLG)
|
| 105 |
+
|
| 106 |
+
We found that RelConsTrans fails to outperform ConsTrans, possibly due to a lack of guidance on how the relation embedding should be learned. Previous work (e.g., Bai et al., 2020) used the dependency parser as an auxiliary label generator to improve ABSA. To avoid the need for a dependency parser, we propose to meta learn a relation label generator that would be trained alongside the primary task to generate auxiliary labels optimal for enhancing the performance of ABSA. An overview of the Relational Constituent-based Transformer with the Relation Generator (RelConsTransLG) is shown in Figure 3. The relation label generator, trained in a self-supervised manner (Liu et al., 2019), would produce relation labels to guide the learning of the relation embedding.
|
| 107 |
+
|
| 108 |
+
As syntax information has been shown to be useful for ABSA in previous work (e.g., Bai et al., 2020), we design our relation label generator to encourage the generation of syntax related labels as relation labels with supervision from the ABSA task. Hewitt & Manning (2019) showed that the L2 distance of a linear projection of token embeddings obtained from BERT could recover the parse tree distances between the tokens. Therefore, we learn a linear transformation of the word representation space with the intention of learning syntactic relatedness. The learned syntactic relatedness would then be used as the ground truth for the L2 norm of the relation embedding. Different from Hewitt & Manning (2019), we do not use ground truth labels to train the relation label generator. Instead, we learn this linear projection in a meta learning manner.
|
| 109 |
+
|
| 110 |
+
For a pair of tokens $i$ and $j$ , we learn a linear projection for the BERT representation:
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
l _ { i j } = W _ { 1 } ( h _ { i } ^ { b e r t , n } - h _ { j } ^ { b e r t , n } ) + b _ { 1 } ,
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+
where $l _ { i j }$ is a scalar relation label for token $i$ and $j$ , $W _ { 1 }$ and $b _ { 1 }$ are the weights and bias of the linear transformation layer. hbert,ni r epresents the embedding of token $i$ from the $n ^ { t h }$ layer of the BERT
|
| 117 |
+
|
| 118 |
+
<table><tr><td rowspan="2">Data Set</td><td colspan="3">Positive</td><td colspan="3">Neutral</td><td colspan="3">Negative</td></tr><tr><td>Train</td><td>Dev</td><td>Test</td><td>Train</td><td>Dev</td><td>Test</td><td>Train</td><td>Dev</td><td>Test</td></tr><tr><td>Restaurant</td><td>2164</td><td>-</td><td>728</td><td>637</td><td>-</td><td>196</td><td>807</td><td>-</td><td>196</td></tr><tr><td>Laptop</td><td>994</td><td>、</td><td>341</td><td>464</td><td>-</td><td>169</td><td>870</td><td>-</td><td>128</td></tr><tr><td>Twitter14</td><td>1561</td><td>-</td><td>173</td><td>3127</td><td>-</td><td>346</td><td>1560</td><td>1</td><td>173</td></tr><tr><td>Twitter15</td><td>928</td><td>303</td><td>317</td><td>1883</td><td>670</td><td>607</td><td>368</td><td>149</td><td>113</td></tr><tr><td>Twitter17</td><td>1508</td><td>515</td><td>493</td><td>1638</td><td>517</td><td>573</td><td>416</td><td>144</td><td>168</td></tr><tr><td>Twitter14 (AS)</td><td>1538</td><td>-</td><td>190</td><td>3300</td><td>-</td><td>173</td><td>1445</td><td>-</td><td>288</td></tr></table>
|
| 119 |
+
|
| 120 |
+
Table 1: Statistics of the 5 benchmark data sets. TS refers to splitting the data by aspect.
|
| 121 |
+
|
| 122 |
+
model. As different layers of BERT appear to represent different types of information as shown by Tenney et al. (2019), we could recover different information by selecting different BERT layers (different $n$ ). In our experiments, we fixed the value of $n$ to 6 for all data sets.
|
| 123 |
+
|
| 124 |
+
Meta Training Relation Label Generator To guide the training of the embedding, we minimize the mean square error (MSE) of the generated label and the L2 norm of the relation embedding:
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
M S E ( l , r ) = \sum _ { i . j } ( \| r _ { i j } \| _ { 2 } - l _ { i j } ) ^ { 2 } .
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
Drawing inspiration from recent work by Liu et al. (2019), we train our label generator using the loss from ABSA with the goal of generating relation labels $l _ { i j }$ to directly optimize for the performance of the main task.
|
| 131 |
+
|
| 132 |
+
Let $\theta _ { m a i n }$ be the parameters of our main model, RelConsTrans. To update the parameters of $\theta _ { m a i n }$ , we aim to minimize a multi-task loss – cross-entropy loss, $L$ from the ABSA prediction task and the MSE loss described in Equation 10:
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
\operatorname * { a r g m i n } _ { \theta _ { m a i n } } ( L ( \hat { y } , y ) + M S E ( l , r ) ) .
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
Let $\theta _ { m a i n } ^ { + }$ be the weights of the RelConsTrans after one gradient update step of gradient descent:
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
\theta _ { m a i n } ^ { + } = \theta _ { m a i n } - \alpha _ { m a i n } \nabla _ { \theta _ { m a i n } } \underset { \theta _ { m a i n } } { \arg \operatorname* { m i n } } ( L ( \hat { y } , y ) + M S E ( l , r ) ) ,
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
where $\alpha _ { m a i n }$ is the learning rate to train the RelConsTrans. Note that the MSE from the relation embedding would not be used to train the relation label generator. Therefore, the parameters of the relation label generator, $\theta _ { a u x }$ should be updated by solely the loss from ABSA:
|
| 145 |
+
|
| 146 |
+
$$
|
| 147 |
+
\underset { \theta _ { a u x } } { \arg \operatorname* { m i n } } ( L ( \hat { y } , y ) ) ,
|
| 148 |
+
$$
|
| 149 |
+
|
| 150 |
+
To update the weights of the generator, a second order derivative is computed. While this formulation was inspired by Liu et al. (2019), the second-order derivative trick used in our model was also used in a number of other meta-learning frameworks such as Finn et al. (2017).
|
| 151 |
+
|
| 152 |
+
We train the two models in tandem, over a few iterations. We found it useful to train $\theta _ { m a i n }$ and $\theta _ { a u x }$ with separate training sets. For each data set, we took a subset of the cases which contain two or more aspects (meta-train set) in the same sentence for training $\theta _ { a u x }$ . This subset is removed from the main training set (train set) used to train the main RelConsTrans. More details of the meta-train set would be provided in the appendix A.1.
|
| 153 |
+
|
| 154 |
+
# 3 RESULTS AND ANALYSIS
|
| 155 |
+
|
| 156 |
+
We conducted experiments on 5 benchmark data sets - restaurant reviews, laptop reviews from SemEval 2014 (Pontiki et al., 2014), ACL14 Twitter14 data set (Dong et al., 2014) and Twitter15 and Twitter17 from a multi-modal ABSA data set by (Yu & Jiang, 2019). For analysis, we ran additional experiments on a split of the Twitter14 data set by aspect. We summarize the statistics of the data in Table 1. For data sets with development sets, we perform model selection on the development sets.
|
| 157 |
+
|
| 158 |
+
For Restaurant, Laptop and Twitter14, we compare against published results from BERT-PT $\mathrm { { \Delta X u } }$ et al., 2019), BERT-SPC (Song et al., 2019), AEN-BERT (Song et al., 2019), SDGCN-BERT (Zhao et al., 2020), Transformer(B) (Bai et al., 2020), RGAT-Bai (Bai et al., 2020), RGAT-Wang (Wang et al., 2020), DGEDT-BERT (Tang et al., 2020) and LCFS-ASC-CDW (Phan & Ogunbona, 2020). The Transformer(B) is a baseline model used by Bai et al. (2020), and is the baseline vanilla Transformer on which ConsTrans is built upon. For Twitter 15 and Twitter17, we compare against published results in (Yu & Jiang, 2019): MemNet (Tang et al., 2016), RAM (Chen et al., 2017), MGAN (Fan et al., 2018), BERT, BERT $^ +$ BL (Yu & Jiang, 2019) and TomBERT (Yu & Jiang, 2019).
|
| 159 |
+
|
| 160 |
+
Table 2: Accuracy and F-score (F1) for 5 data sets: In the left (resp. right) table, systems marked \* are those that used dependency parses (resp. multi-modal information). The best Macro F1 for each data set is in bold. For significance tests, we compare against RGAT-Wang(re-run), TomBERT and BERT $\scriptstyle + \mathrm { B L }$ . Our results are significant against RGAT-Wang(re-run) and BERT $\scriptstyle \cdot + \mathbf { B } \mathbf { L }$ . Twitter17 was significant against TomBERT (which used image data in addition to text data) but not Twitter15.
|
| 161 |
+
|
| 162 |
+
<table><tr><td>Data Set</td><td colspan="2">Restaurant</td><td colspan="2">Laptop</td><td colspan="2">Twitter14</td></tr><tr><td>Model</td><td>Acc</td><td>F1</td><td>Acc</td><td>F1</td><td>Acc</td><td>F1</td></tr><tr><td>BERT-PT</td><td>85.0</td><td>77.0</td><td>78.1</td><td>75.1</td><td></td><td>-</td></tr><tr><td>BERT-SPC</td><td>84.5</td><td>77.0</td><td>79.0</td><td>75.0</td><td>73.6</td><td>72.1</td></tr><tr><td>AEN-BERT</td><td>83.1</td><td>73.8</td><td>79.9</td><td>76.3</td><td>74.7</td><td>73.1</td></tr><tr><td>SDGCN-BERT</td><td>83.6</td><td>76.5</td><td>81.4</td><td>78.3</td><td>=</td><td>-</td></tr><tr><td>Transformer(B)</td><td>84.9</td><td>77.9</td><td>79.3</td><td>76.1</td><td>-</td><td>-</td></tr><tr><td>RGAT-Bai*</td><td>86.6</td><td>80.5</td><td>81.3</td><td>78.6</td><td>75.8</td><td>74.7</td></tr><tr><td>RGAT-Wang*</td><td>86.6</td><td>81.4</td><td>78.2</td><td>74.1</td><td>76.2</td><td>74.9</td></tr><tr><td>RGAT-Wang (re-run)*</td><td>85.7</td><td>79.1</td><td>79.0</td><td>75.6</td><td>73.6</td><td>73.1</td></tr><tr><td>DGEDT-BERT*</td><td>86.3</td><td>80.0</td><td>79.8</td><td>75.6</td><td>77.9</td><td>75.4</td></tr><tr><td>LCFS-ASC-CDW*</td><td>86.7</td><td>80.3</td><td>80.5</td><td>77.1</td><td>-</td><td>-</td></tr><tr><td>ConsTrans</td><td>85.8</td><td>80.8</td><td>80.6</td><td>77.2</td><td>76.6</td><td>75.0</td></tr><tr><td>RelConsTrans</td><td>85.4</td><td>79.3</td><td>80.1</td><td>76.4</td><td>75.9</td><td>74.7</td></tr><tr><td>RelConsTransLG</td><td>86.7</td><td>81.4</td><td>81.0</td><td>78.1</td><td>76.9</td><td>75.5</td></tr></table>
|
| 163 |
+
|
| 164 |
+
<table><tr><td>Data Set Model</td><td>Twitter15 Acc</td><td>F1</td><td>Twitter17 Acc</td><td>F1</td></tr><tr><td>AE-LSTM</td><td>70.3</td><td>63.4</td><td>61.7</td><td>58.0</td></tr><tr><td>MemNet</td><td>70.1</td><td>61.8</td><td>64.2</td><td>60.9</td></tr><tr><td>RAM</td><td>70.7</td><td>63.1</td><td>64.4</td><td>61.0</td></tr><tr><td>MGAN</td><td>71.2</td><td>64.2</td><td>64.8</td><td>61.5</td></tr><tr><td>BERT</td><td>74.2</td><td>68.9</td><td>68.2</td><td>65.2</td></tr><tr><td>BERT+BL</td><td>74.3</td><td>70.0</td><td>68.9</td><td>66.1</td></tr><tr><td>TomBERT*</td><td>77.2</td><td>71.8</td><td>70.5</td><td>68.0</td></tr><tr><td>ConsTrans</td><td>76.5</td><td>72.5</td><td>69.3</td><td>68.2</td></tr><tr><td>RelConsTrans</td><td>76.9</td><td>71.6</td><td>69.0</td><td>67.7</td></tr><tr><td>RelConsTransLG</td><td>76.8</td><td>73.3</td><td>69.8</td><td>68.5</td></tr></table>
|
| 165 |
+
|
| 166 |
+
For the Restaurant and Twitter14 data sets, we outperform all previous work that did not require dependency parsers by competitive margins (4.8 F-score for Restaurant and $2 . 4 \mathrm { F } \cdot$ -score for Twitter14). Our results on the Laptop data (78.1) is also close to the state-of-the-art results (78.3) achieved by SDGCN-BERT. Furthermore, comparing results with models that require a dependency parser, we also outperform a number of models while closely matching the results of others. For Twitter15 and Twitter17, we see in Table 2 that our best model outperforms previous work that uses only textual content by a margin (3.3 F-score for Twitter15 and 2.4 F-Score for Twitter17). Our model also outperforms TomBERT, the multi-modal models for Twitter15 and Twitter17.
|
| 167 |
+
|
| 168 |
+
To conduct statistical significance tests, we attempt to reproduce the results published for RGATWang, TomBERT and BERT $\mathrm { + B L }$ . For RGAT-Wang, we could not reproduce their published results (with their recommended settings), and hence we can only conduct the test against the results we obtain with their open source code, shown as RGAT-Wang(re-run) in Table 2. We run the randomization test (Yeh, 2000) with 100,000 shuffles. We found that RelConsTransLG outperforms RGATWang(re-run) and BERT $\scriptstyle + \mathrm { B L }$ significantly $( p < 0 . 1 5 )$ . RelConsTransLG significantly outperforms TomBERT (which has additional access to image data) for Twitter17, but not Twitter15.
|
| 169 |
+
|
| 170 |
+
When comparing our proposed ConsTrans model to a vanilla Transformer, we observe that ConsTrans outperforms the vanilla Transformer model for both the Restaurant and Laptop data sets. This suggests that it is indeed useful to induce constituents for ABSA. Lastly, comparing ConsTrans and RelConsTransLG, we observe that RelConsTransLG consistently outperforms ConsTrans for all the data sets. This suggests that our meta-learnt label generator is able to generate useful auxiliary labels for ConsTrans for the ABSA task.
|
| 171 |
+
|
| 172 |
+
# 3.1 ANALYSIS
|
| 173 |
+
|
| 174 |
+
In this section, we provide findings from ablation studies and analysis of our proposed models.
|
| 175 |
+
|
| 176 |
+
Grammar Induction We derive constituent trees with the constituent probabilities to verify if the derived trees resemble ground truth constituent trees. In Figure 4, we show an example where our derived constituent tree shows a similar structure to the ground truth constituency tree. Notably, we are able to accurately recall the aspect term, “jessica alba” as a constituent. The algorithm to derive constituent trees and more examples are provided in Appendix A.4 and A.6 respectively.
|
| 177 |
+
|
| 178 |
+

|
| 179 |
+
Figure 4: Example of derived constituent Tree by ConsTrans (Left) and constituent Tree from Berkeley Neural Parser (Kitaev & Klein, 2018) (Right).
|
| 180 |
+
|
| 181 |
+
We postulate that the ability of ConsTrans to group aspect terms into noun phrases should improve its ABSA accuracy. To study our hypothesis, we looked at ConsTrans’s ability to recall the entire aspect term as a noun phrase. For simplicity, we only look at records where aspect terms were not broken down into sub-word tokens. For Twitter17, we found that ConsTrans achieves 67.8 recall rate for correctly predicted instances and 62.2 for incorrect instances. The Pearson correlation coefficient between prediction accuracy and recall rate was significant (with $\mathfrak { p } < 0 . 2 )$ ), indicating the usefulness of being able to induce good constituents for ABSA.
|
| 182 |
+
|
| 183 |
+
Generalibility of RelConsTransLG The key argument by Liu et al. (2019) for designing an additional label generator is to increase the generalizability of the main model. To test the generalizability of RelConsTransLG, we create a more challenging version of Twitter14 by splitting the data such that the train and test set comprises of different aspect terms. The statistics of the data after splitting by aspect (denoted by AS) is shown in Table 1. We further split the train set by aspect terms to create a meta-train set to train the label generator in RelConsTransLG. Therefore, the relation label generator is trained to generate relation labels that enhance the performance of data with foreign aspect terms. In this AS setting, RelConsTransLG achieves a F-score of 64.3 while ConsTrans achieved a F-score of 62.8. Our designed framework mimics the actual train and test setting and is therefore able to increase the generalizabillity of RelConsTransLG.
|
| 184 |
+
|
| 185 |
+
Different layers of BERT as input Tenney et al. (2019) found that different BERT layers encapsulate different information useful for various NLP tasks. Therefore, we experimented with using all 12 layers of BERT as input to the label generator to study the impact on the F-score. The graph for the F-score against BERT layer $( n )$ is provided in Appendix A.3. Using representation from the $6 ^ { t h }$ layer of BERT yields the best results for the restaurant data set and we are able to consistently outperform models that do not use dependency parses for all value of $n$ chosen. Furthermore, this is an indication that syntactic information is indeed useful for ABSA since lower layers of BERT were found to encapsulate syntactic information.
|
| 186 |
+
|
| 187 |
+
Interpreting learnt relation labels Our relation label generator is designed to encourage the generation of syntax related labels. To verify the hypothesis that generated relation label is related to syntax, we reconstruct the dependency parses using the learnt relation embedding. Interestingly, while Dozat & Manning (2017) have found that the L2 norm of relation embedding resembles syntactic distance (i.e., a lower norm means stronger dependency), we found that our learned relation embedding exhibits an opposite phenomenon: a higher L2 norm indicates a stronger dependency. We hypothesize that relation embedding with higher L2 norm would influence attention weights to a greater extent. Therefore, the L2 norm of our learnt relation embedding would represent syntactic relatedness rather than syntactic distance. We then construct parse trees by linking tokens with highest L2 norm of their relation embedding as detailed in Appendix A.5.
|
| 188 |
+
|
| 189 |
+
Manual inspection of these records suggest that while a full parse tree was not induced, we are able to recover most of adjective-noun relations. As seen in Figure 5, we are able to retrieve the relation of (“pleasant”, “staff”) and (“friendly”, “staff”). This is expected since understanding adjectivenoun relations would be most important to ABSA compared to other types of relations. Therefore, training RelConsTransLG with supervision from solely ABSA would yield this behaviour.
|
| 190 |
+
|
| 191 |
+
Furthermore, to look at the ability of RelConsTransLG to link relevant adjective terms, we engaged two annotators to annotate the adjective terms relevant to each aspect term for the test set for the
|
| 192 |
+
|
| 193 |
+

|
| 194 |
+
Figure 5: Examples of induced dependency parses Tree by RelConsTransLG (Top arrows) and ground truth dependency parses (bottom arrows) from StanfordNLP https://corenlp.run/. Arrows in grey are for opinion terms accurately linked to the aspect term “staff”.
|
| 195 |
+
|
| 196 |
+
Restaurant data. The annotators reconciled their differing opinions and gave each record a final label. Records with no clear opinion terms was given a ”None” label. There were 1,120 records annotated and 811 had annotated adjective terms. We rank the relatedness of tokens with the aspect term by the L2 norm of the relation embedding and compare it with ground truth ranks. Ground truth ranks were obtained by ranking tokens with their syntactic distance obtained from StanfordNLP dependency parser (Chen & Manning, 2014) with tied rank taken into account. For records where the adjective term was more than 1 syntactic distance away, we obtain an equal or smaller rank than the syntactic distance in $6 3 . 5 \%$ of the cases. Compared against position offset ranks, we obtain an equal or small rank than the number of position offsets in $6 5 . 0 \%$ of the cases.
|
| 197 |
+
|
| 198 |
+
# 4 RELATED WORK
|
| 199 |
+
|
| 200 |
+
Sentiment analysis (Pang & Lee, 2008) is a well studied natural language processing problem. Early works applied sentiment analysis to product reviews as a text classification problem. However, a review or social media post could express different sentiments to different aspects, and the task of aspect-based sentiment analysis aims at a finer classification of sentiment towards specific aspects (Dong et al., 2014) or aspects (Pontiki et al., 2016).
|
| 201 |
+
|
| 202 |
+
Recent work on ABSA has shown that the use of dependency parses for ABSA helps to improve performance (Bai et al., 2020; Huang & Carley, 2019; Sun et al., 2019; Wang et al., 2020). However, supervised dependency parsers require a substantial amount of annotated data, and might perform badly for out-of-domain (e.g., social media) or low-resource languages. On the other hand, it has been shown that contextual embeddings such as BERT (Devlin et al., 2018) contain significant information that could be useful to parsers (Clark et al., 2019; Kim et al., 2020a). Previous work such as Hewitt & Manning (2019) have shown that a linear projection is sufficient to recover syntactic information from BERT embedding. In this paper, we show that we can achieve similar ABSA performance without supervised parsers, by leveraging on BERT which was trained with raw data.
|
| 203 |
+
|
| 204 |
+
Previous work on unsupervised grammar induction such as Shen et al. (2019); Kim et al. (2019) aims to induce grammar from raw data. Our primary objective is not to induce grammar, but to encourage the model to learn to perform the ABSA task by learning the causal edge dependencies between constituents. We show that our approach is able to achieve results that rivals those obtained by models that have access to supervised dependency parsers.
|
| 205 |
+
|
| 206 |
+
In this work, we applied meta auxiliary learning (Liu et al., 2019) which learns to generate auxiliary labels, supervised by the primary task. While Liu et al. (2019) failed to interpret the auxiliary labels for the computer vision tasks they worked on, we showed that in our case, the induced auxiliary labels can be interpreted as syntactic relatedness to a certain extent.
|
| 207 |
+
|
| 208 |
+
# 5 CONCLUSION
|
| 209 |
+
|
| 210 |
+
In this paper, we apply a meta auxiliary learning approach to the ABSA task, and we show that the induced relations between phrases are interpretable and supports the primary task of sentiment analysis. We show that learning the auxiliary labels improve results over our baselines on all five data sets. Without using dependency parsers, our approach performs competitively compared to previous work that used dependency parses as input.
|
| 211 |
+
|
| 212 |
+
# REFERENCES
|
| 213 |
+
|
| 214 |
+
Xuefeng Bai, Pengbo Liu, and Yue Zhang. Exploiting typed syntactic dependencies for targeted sentiment classification using graph attention neural network. CoRR, abs/2002.09685, 2020. URL https://arxiv.org/abs/2002.09685.
|
| 215 |
+
|
| 216 |
+
Danqi Chen and Christopher Manning. A fast and accurate dependency parser using neural networks. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 740–750, Doha, Qatar, October 2014. Association for Computational Linguistics. doi: 10.3115/v1/D14-1082. URL https://www.aclweb.org/anthology/ D14-1082.
|
| 217 |
+
|
| 218 |
+
Peng Chen, Zhongqian Sun, Lidong Bing, and Wei Yang. Recurrent attention network on memory for aspect sentiment analysis. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 452–461, Copenhagen, Denmark, September 2017. Association for Computational Linguistics. doi: 10.18653/v1/D17-1047. URL https://www. aclweb.org/anthology/D17-1047.
|
| 219 |
+
|
| 220 |
+
Kevin Clark, Urvashi Khandelwal, Omer Levy, and Christopher D. Manning. What does BERT look at? an analysis of bert’s attention. CoRR, abs/1906.04341, 2019. URL http://arxiv.org/ abs/1906.04341.
|
| 221 |
+
|
| 222 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: pre-training of deep bidirectional transformers for language understanding. CoRR, abs/1810.04805, 2018. URL http://arxiv.org/abs/1810.04805.
|
| 223 |
+
|
| 224 |
+
Li Dong, Furu Wei, Chuanqi Tan, Duyu Tang, Ming Zhou, and Ke Xu. Adaptive recursive neural network for target-dependent twitter sentiment classification. In Proceedings of the 52nd Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers), pp. 49–54, Baltimore, Maryland, June 2014. Association for Computational Linguistics. doi: 10.3115/v1/ P14-2009. URL https://www.aclweb.org/anthology/P14-2009.
|
| 225 |
+
|
| 226 |
+
Timothy Dozat and Christopher D. Manning. Deep biaffine attention for neural dependency parsing. In 5th International Conference on Learning Representations, ICLR 2017, Toulon, France, April 24-26, 2017, Conference Track Proceedings. OpenReview.net, 2017. URL https: //openreview.net/forum?id ${ . } = { }$ Hk95PK9le.
|
| 227 |
+
|
| 228 |
+
Feifan Fan, Yansong Feng, and Dongyan Zhao. Multi-grained attention network for aspect-level sentiment classification. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 3433–3442, Brussels, Belgium, October-November 2018. Association for Computational Linguistics. doi: 10.18653/v1/D18-1380. URL https://www.aclweb. org/anthology/D18-1380.
|
| 229 |
+
|
| 230 |
+
Chelsea Finn, Pieter Abbeel, and Sergey Levine. Model-agnostic meta-learning for fast adaptation of deep networks. CoRR, abs/1703.03400, 2017. URL http://arxiv.org/abs/1703. 03400.
|
| 231 |
+
|
| 232 |
+
John Hewitt and Christopher D. Manning. A structural probe for finding syntax in word representations. 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), pp. 4129–4138, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1419. URL https://www.aclweb.org/anthology/ N19-1419.
|
| 233 |
+
|
| 234 |
+
Binxuan Huang and Kathleen Carley. Syntax-aware aspect level sentiment classification with graph attention networks. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 5469–5477, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1549. URL https://www.aclweb.org/ anthology/D19-1549.
|
| 235 |
+
|
| 236 |
+
Taeuk Kim, Jihun Choi, Daniel Edmiston, and Sang goo Lee. Are pre-trained language models aware of phrases? simple but strong baselines for grammar induction. In International Conference on Learning Representations, 2020a. URL https://openreview.net/forum?id= H1xPR3NtPB.
|
| 237 |
+
|
| 238 |
+
Taeuk Kim, Jihun Choi, Daniel Edmiston, and Sang goo Lee. Are pre-trained language models aware of phrases? simple but strong baselines for grammar induction. In International Conference on Learning Representations, 2020b. URL https://openreview.net/forum?id $=$ H1xPR3NtPB.
|
| 239 |
+
|
| 240 |
+
Yoon Kim, Alexander Rush, Lei Yu, Adhiguna Kuncoro, Chris Dyer, and Gabor Melis. Unsu- ´ pervised recurrent neural network grammars. 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), pp. 1105–1117, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1114. URL https://www.aclweb.org/anthology/N19-1114.
|
| 241 |
+
|
| 242 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Yoshua Bengio and Yann LeCun (eds.), 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015. URL http: //arxiv.org/abs/1412.6980.
|
| 243 |
+
|
| 244 |
+
Nikita Kitaev and Dan Klein. Constituency parsing with a self-attentive encoder. CoRR, abs/1805.01052, 2018. URL http://arxiv.org/abs/1805.01052.
|
| 245 |
+
|
| 246 |
+
Shikun Liu, Andrew J. Davison, and Edward Johns. Self-supervised generalisation with meta auxiliary learning. CoRR, abs/1901.08933, 2019. URL http://arxiv.org/abs/1901.08933.
|
| 247 |
+
|
| 248 |
+
Bo Pang and Lillian Lee. Opinion mining and sentiment analysis. Foundations and Trends in Information Retrieval, 2(1-2):1–135, 2008.
|
| 249 |
+
|
| 250 |
+
Minh Hieu Phan and Philip O. Ogunbona. Modelling context and syntactical features for aspectbased sentiment analysis. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 3211–3220, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.293. URL https://www.aclweb.org/ anthology/2020.acl-main.293.
|
| 251 |
+
|
| 252 |
+
Maria Pontiki, Dimitris Galanis, John Pavlopoulos, Harris Papageorgiou, Ion Androutsopoulos, and Suresh Manandhar. SemEval-2014 task 4: Aspect based sentiment analysis. In Proceedings of the 8th International Workshop on Semantic Evaluation (SemEval 2014), pp. 27–35, Dublin, Ireland, August 2014. Association for Computational Linguistics. doi: 10.3115/v1/S14-2004. URL https://www.aclweb.org/anthology/S14-2004.
|
| 253 |
+
|
| 254 |
+
Maria Pontiki, Dimitrios Galanis, Haris Papageorgiou, Ion Androutsopoulos, Suresh Manandhar, Mohammad Al-Smadi, Mahmoud Al-Ayyoub, Yanyan Zhao, Bing Qin, Orphee De Clercq, et al. ´ Semeval-2016 task 5: Aspect based sentiment analysis. In 10th International Workshop on Semantic Evaluation (SemEval 2016), 2016.
|
| 255 |
+
|
| 256 |
+
Yikang Shen, Shawn Tan, Alessandro Sordoni, and Aaron Courville. Ordered neurons: Integrating tree structures into recurrent neural networks. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } }$ B1l6qiR5F7.
|
| 257 |
+
|
| 258 |
+
Youwei Song, Jiahai Wang, Tao Jiang, Zhiyue Liu, and Yanghui Rao. Attentional encoder network for targeted sentiment classification. CoRR, abs/1902.09314, 2019. URL http://arxiv. org/abs/1902.09314.
|
| 259 |
+
|
| 260 |
+
Kai Sun, Richong Zhang, Samuel Mensah, Yongyi Mao, and Xudong Liu. Aspect-level sentiment analysis via convolution over dependency tree. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 5679–5688, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1569. URL https://www.aclweb.org/anthology/D19-1569.
|
| 261 |
+
|
| 262 |
+
Duyu Tang, Bing Qin, and Ting Liu. Aspect level sentiment classification with deep memory network. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pp. 214–224, Austin, Texas, November 2016. Association for Computational Linguistics. doi: 10.18653/v1/D16-1021. URL https://www.aclweb.org/anthology/ D16-1021.
|
| 263 |
+
|
| 264 |
+
Hao Tang, Donghong Ji, Chenliang Li, and Qiji Zhou. Dependency graph enhanced dualtransformer structure for aspect-based sentiment classification. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 6578–6588, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.588. URL https://www.aclweb.org/anthology/2020.acl-main.588.
|
| 265 |
+
|
| 266 |
+
Ian Tenney, Dipanjan Das, and Ellie Pavlick. BERT rediscovers the classical NLP pipeline. CoRR, abs/1905.05950, 2019. URL http://arxiv.org/abs/1905.05950.
|
| 267 |
+
|
| 268 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. CoRR, abs/1706.03762, 2017. URL http://arxiv.org/abs/1706.03762.
|
| 269 |
+
|
| 270 |
+
Kai Wang, Weizhou Shen, Yunyi Yang, Xiaojun Quan, and Rui Wang. Relational graph attention network for aspect-based sentiment analysis. Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, 2020. doi: 10.18653/v1/2020.acl-main.295. URL http://dx.doi.org/10.18653/v1/2020.acl-main.295.
|
| 271 |
+
|
| 272 |
+
Hu Xu, Bing Liu, Lei Shu, and Philip Yu. BERT post-training for review reading comprehension and aspect-based sentiment analysis. 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), pp. 2324–2335, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1242. URL https://www.aclweb.org/anthology/N19-1242.
|
| 273 |
+
|
| 274 |
+
Alexander Yeh. More accurate tests for the statistical significance of result differences. In Proceedings of the 18th Conference on Computational Linguistics - Volume 2, COLING ’00, pp. 947–953, USA, 2000. Association for Computational Linguistics. doi: 10.3115/992730.992783. URL https://doi.org/10.3115/992730.992783.
|
| 275 |
+
|
| 276 |
+
Jianfei Yu and Jing Jiang. Adapting BERT for target-oriented multimodal sentiment classification. In Sarit Kraus (ed.), Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI 2019, Macao, China, August 10-16, 2019, pp. 5408–5414. ijcai.org, 2019. doi: 10.24963/ijcai.2019/751. URL https://doi.org/10.24963/ijcai.2019/751.
|
| 277 |
+
|
| 278 |
+
Pinlong Zhao, Linlin Hou, and Ou Wu. Modeling sentiment dependencies with graph convolutional networks for aspect-level sentiment classification. Knowledge-Based Systems, 193:105443, 2020.
|
| 279 |
+
|
| 280 |
+
# A APPENDIX
|
| 281 |
+
|
| 282 |
+
# A.1 META-SPLITTING DATA SET
|
| 283 |
+
|
| 284 |
+
To generate the meta-train set, we first obtain a subset of samples with multiple aspects of differing sentiment from the full train set. $80 \%$ of this subset would then be used as the meta-train set. For Twitter2014 (AS), we sampled this meta-train set by aspects. The intention is to train the Relation Label Generator to generate labels that can encourage the model to accurately link relevant opinion terms to the aspect term through challenging samples. The statistics of the meta-train set is provided in Table 3.
|
| 285 |
+
|
| 286 |
+
<table><tr><td>Data set</td><td>Positive</td><td>Neutral</td><td>Negative</td><td>Total</td></tr><tr><td>Restaurant</td><td>195</td><td>163</td><td>162</td><td>520</td></tr><tr><td>Laptop</td><td>85</td><td>98</td><td>61</td><td>244</td></tr><tr><td>Twitter2014</td><td>265</td><td>567</td><td>301</td><td>1133</td></tr><tr><td>Twitter2015</td><td>123</td><td>161</td><td>56</td><td>340</td></tr><tr><td>Twitter2017</td><td>320</td><td>470</td><td>111</td><td>901</td></tr><tr><td>Twitter2014 (AS)</td><td>207</td><td>253</td><td>254</td><td>714</td></tr></table>
|
| 287 |
+
|
| 288 |
+
Table 3: Statistics of the meta-train sets. AS refers to splitting the data by aspect.
|
| 289 |
+
|
| 290 |
+
# A.2 IMPLEMENTATION DETAILS
|
| 291 |
+
|
| 292 |
+
In all experiments, we used the ADAM optimizer (Kingma & Ba, 2015) with a learning rate of $1 0 ^ { - 5 }$ to optimize the models (ConsTrans, RelConsTrans, RelConsTransLG and the relation label generator). The BERT model was fine-tuned together with the main model built on top of it. We used 6 multi-head attention heads and the size of the hidden layer was set to be 384. We stacked 4 encoder layers. Lower layers are defined to be the first 2 layers in the encoder stack while the last 2 layers are higher layers. Dropout was applied to all input embeddings. The L2 penalisation term for the model’s parameters was set to be 1e-5. The size of the learnt embedding for each relation label was set to be 786 and a batch size of 4 was used to train all the models.
|
| 293 |
+
|
| 294 |
+
# A.3 DIFFERENT LAYERS OF BERT
|
| 295 |
+
|
| 296 |
+
The graph for Macro F-score against BERT layer $( n )$ is shown in Figure 6. Using representation from the $6 ^ { t h }$ layer of BERT yields the best results for the restaurant data set and we used the $6 ^ { t h }$ layer of BERT as input to the relation label generator for all the other data sets.
|
| 297 |
+
|
| 298 |
+

|
| 299 |
+
Figure 6: Macro F-score on Restaurant data set with different BERT layer as input to LG.
|
| 300 |
+
|
| 301 |
+
# A.4 ALGORITHM TO DERIVE CONSTITUENT TREES
|
| 302 |
+
|
| 303 |
+
To derive constituent trees, we iteratively split the input constituents into 2 parts till each constituent is only made up of only 1 token. The breaking point is defined to be the point where the probability of being in the same constituent for token $i$ and $i + 1$ is the lowest. We use the constituent probability from the second layer of our encoder stack to find the breaking point.
|
| 304 |
+
|
| 305 |
+
# Algorithm 1 Unsupervised constituent tree derivation
|
| 306 |
+
|
| 307 |
+
1: $m \gets$ Constituent layer chosen
|
| 308 |
+
2: $x \gets$ Input tokens
|
| 309 |
+
3: $p $ Constituent probability from layer m for current constituent
|
| 310 |
+
4: $s t a c k = [ x ]$
|
| 311 |
+
5: constituents = []
|
| 312 |
+
6:
|
| 313 |
+
7: procedure GETCONSTTREE $( x , p )$
|
| 314 |
+
8: while len(stack) $! = 0$ do
|
| 315 |
+
9: current const ← stack[0]
|
| 316 |
+
10: $p _ { 0 } $ constituent probabilities for current const
|
| 317 |
+
11: $\mathbf { b } = \mathbf { a r g m i n } ( b _ { 0 } )$ . Find the breaking poin
|
| 318 |
+
12: l $f t _ { - } c o n s t = \mathbf { x } [ : \mathbf { b } ]$
|
| 319 |
+
13: right const = x[b:]
|
| 320 |
+
14: if len(left const) $> 1$ then
|
| 321 |
+
15: add lef t const to constituents
|
| 322 |
+
16: end if
|
| 323 |
+
17: if len(right const) $> 1$ then
|
| 324 |
+
18: add right const to constituents
|
| 325 |
+
19: end if
|
| 326 |
+
20: add lef t const and right const to constituents
|
| 327 |
+
21: end while
|
| 328 |
+
22: Return constituents
|
| 329 |
+
23: end procedure
|
| 330 |
+
|
| 331 |
+
# A.5 ALGORITHM TO INDUCE DEPENDENCY PARSES
|
| 332 |
+
|
| 333 |
+
To recover parse trees, we iteratively linked tokens to another token with the highest L2 norm for the learnt relation embedding. We do not allow tokens to be linked multiple times.
|
| 334 |
+
|
| 335 |
+
# Algorithm 2 Unsupervised dependency parse tree induction
|
| 336 |
+
|
| 337 |
+
1: procedure GETDEPNTREE $( x , p )$
|
| 338 |
+
2: depen labels $= [ ]$
|
| 339 |
+
3: relation norm The L2 norm of learnt embedding
|
| 340 |
+
4: for $j 1$ to lengthx do
|
| 341 |
+
5: current max $=$ max(relation norm)
|
| 342 |
+
6: $i$ , $j =$ position(current max);
|
| 343 |
+
7: add $( i , j )$ to depen labels
|
| 344 |
+
8: relation norm[:, $\mathrm { j } ] = - \infty$ ;
|
| 345 |
+
9: relation norm[j, $\mathrm { i } ] = - \infty$ ;
|
| 346 |
+
10: end for
|
| 347 |
+
11: Return depen labels
|
| 348 |
+
12: end procedure
|
| 349 |
+
|
| 350 |
+
# A.6 EXAMPLES OF DERIVED CONSTITUENT TREES
|
| 351 |
+
|
| 352 |
+
We provide more examples of constituent trees derived from ConsTrans. In general, while we were not able to fully replicate ground truth constituent trees, we noticed that the model was able to recall noun phrases reasonably.
|
| 353 |
+
|
| 354 |
+

|
| 355 |
+
Figure 7: Example of derived constituent Tree by ConsTrans with aspect term “ $@$ Jullia webber”.
|
| 356 |
+
|
| 357 |
+

|
| 358 |
+
Figure 8: Example of derived constituent Tree by ConsTrans with aspect term “ $@$ golden state warriors”.
|
| 359 |
+
|
| 360 |
+

|
| 361 |
+
Figure 9: Example of derived constituent Tree by ConsTrans with aspect term “sadiq Kahn’s”.
|
| 362 |
+
|
| 363 |
+
# A.7 EXAMPLES OF INDUCED DEPENDENCY PARSE TREES
|
| 364 |
+
|
| 365 |
+
We provide more examples of induced dependency parses from RelConsTransLG. While our induced parse trees were not identical to ground truth parse trees, we were able to link adjective terms to noun phrases reasonably.
|
| 366 |
+
|
| 367 |
+

|
| 368 |
+
Figure 10: Examples of induced dependency parses Tree by RelConsTransLG (Top arrows) and ground truth dependency parses (bottom arrows) from StanfordNLP https://corenlp.run/. Arrows in grey are for opinion terms accurately linked to the aspect term “place”.
|
| 369 |
+
|
| 370 |
+

|
| 371 |
+
Figure 11: Examples of induced dependency parses Tree by RelConsTransLG (Top arrows) and ground truth dependency parses (bottom arrows) from StanfordNLP https://corenlp.run/. Arrows in grey are for opinion terms accurately linked to the aspect term “owner”.
|
| 372 |
+
|
| 373 |
+

|
| 374 |
+
Figure 12: Examples of induced dependency parses Tree by RelConsTransLG (Top arrows) and ground truth dependency parses (bottom arrows) from StanfordNLP https://corenlp.run/. Arrows in grey are for opinion terms accurately linked to the aspect term “calamari”.
|
md/train/5SST78xEh4A/5SST78xEh4A.md
ADDED
|
@@ -0,0 +1,352 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PROSELFLC: PROGRESSIVE SELF LABEL CORRECTION FOR TRAINING ROBUST DEEP NEURAL NETWORKS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
To train robust deep neural networks (DNNs), we systematically study several target modification approaches, which include output regularisation, self and nonself label correction (LC). Two key issues are discovered: (1) Self LC is the most appealing as it exploits its own knowledge and requires no extra models. However, how to automatically decide the trust degree of a learner as training goes is not well answered in the literature? (2) Some methods penalise while the others reward low-entropy predictions, prompting us to ask which one is better?
|
| 8 |
+
|
| 9 |
+
To resolve the first issue, taking two well-accepted propositions–deep neural networks learn meaningful patterns before fitting noise (Arpit et al., 2017) and minimum entropy regularisation principle (Grandvalet & Bengio, 2006)–we propose a novel end-to-end method named ProSelfLC, which is designed according to learning time and entropy. Specifically, given a data point, we progressively increase trust in its predicted label distribution versus its annotated one if a model has been trained for enough time and the prediction is of low entropy (high confidence). For the second issue, according to ProSelfLC, we empirically prove that it is better to redefine a meaningful low-entropy status and optimise the learner toward it. This serves as a defence of entropy minimisation. We demonstrate the effectiveness of ProSelfLC through extensive experiments in both clean and noisy settings.
|
| 10 |
+
|
| 11 |
+
# 1 INTRODUCTION
|
| 12 |
+
|
| 13 |
+
There exist many target (label) modification approaches. They can be roughly divided into two groups: (1) Output regularisation (OR), which is proposed to penalise overconfident predictions for regularising deep neural networks. It includes label smoothing (LS) (Szegedy et al., 2016; Müller et al., 2019) and confidence penalty (CP) (Pereyra et al., 2017); (2) Label correction (LC). On the one hand, LC regularises neural networks by adding the similarity structure information over training classes into one-hot label distributions so that the learning targets become structured and soft. On the other hand, it can correct the semantic classes of noisy label distributions. LC can be further divided into two subgroups: Non-self LC and Self LC. The former requires extra learners, while the latter relies on the model itself. A typical approach of Non-self LC is knowledge distillation (KD), which exploits the predictions of other model(s), usually termed teacher(s) (Hinton et al., 2015). Self LC methods include Pseudo-Label (Lee, 2013), bootstrapping (Boot-soft and Boot-hard) (Reed et al., 2015), Joint Optimisation (Joint-soft and Joint-hard) (Tanaka et al., 2018), and Tf- ${ \mathrm { K D } } _ { s e l f }$ (Yuan et al., 2020). According to an overview in Figure 1 (detailed derivation is in Section 3 and Table 1), in label modification, the output target of a data point is defined by combining a one-hot label distribution and its corresponding prediction or a predefined label distribution.
|
| 14 |
+
|
| 15 |
+
Firstly, we present the drawbacks of existing approaches: (1) OR methods naively penalise confident outputs without leveraging easily accessible knowledge from other learners or itself (Figure 1a); (2) Non-self LC relies on accurate auxiliary models to generate predictions (Figure 1b). (3) Self LC is the most appealing because it exploits its own knowledge and requires no extra learners. However, there is a core question that is not well answered:
|
| 16 |
+
|
| 17 |
+
# In Self LC, how much should we trust a learner to leverage its knowledge?
|
| 18 |
+
|
| 19 |
+
As shown in Figure 1b, in Self LC, for a data point, we have two labels: a predefined one-hot q and a predicted structured p. Its learning target is $( 1 - \epsilon ) \mathbf { q } + \epsilon \mathbf { p }$ , i.e., a trade-off between q and p, where $\epsilon$ defines the trust score of a learner. In existing methods, $\epsilon$ is fixed without considering that a model’s (a) OR includes LS (Szegedy et al., 2016) and CP (Pereyra et al., 2017). LS softens a target by adding a uniform label distribution. CP changes the probability 1 to a smaller value $1 - \epsilon$ in the one-hot target. The double-ended arrow means factual equivalence, because an output is definitely non-negative after a softmax layer.
|
| 20 |
+
|
| 21 |
+

|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
|
| 25 |
+
(b) LC contains Self LC (Lee, 2013; Reed et al., 2015; Tanaka et al., 2018; Yuan et al., 2020) and Non-self LC (Hinton et al., 2015). The parameter defines how much a predicted label distribution is trusted.
|
| 26 |
+
|
| 27 |
+
Figure 1: Target modification includes OR (LS and CP), and LC (Self LC and Non-self LC). Assume there are three training classes. q is the one-hot target. u is a uniform label distribution. p denotes a predicted label distribution. The target combination parameter is $\epsilon \in [ 0 , 1 ]$ .
|
| 28 |
+
|
| 29 |
+
knowledge grows as the training progresses. For example, in bootstrapping, $\epsilon$ is fixed throughout the training process. Joint Optimisation stage-wisely trains a model. It fully trusts predicted labels and uses them to replace old ones when a stage ends, i.e., $\epsilon = 1$ . Tf- ${ \mathrm { K D } } _ { s e l f }$ trains a model by two stages: $\epsilon = 0$ in the first one while $\epsilon$ is tuned for the second stage. Note that $\mathbf { p }$ is generated by a preceding-stage model in stage-wise training, which requires significant human intervention and is time-consuming in practice.
|
| 30 |
+
|
| 31 |
+
To improve Self LC, we propose a novel method named Progressive Self Label Correction (ProSelfLC), which is end-to-end trainable and needs negligible extra cost. Most importantly, ProSelfLC modifies the target progressively and adaptively as training goes. Two design principles of ProSelfLC are: (1) When a model learns from scratch, human annotations are more reliable than its own predictions in the early phase, during which the model is learning simple meaningful patterns before fitting noise, even when severe label noise exists in human annotations (Arpit et al., 2017). (2) As a learner attains confident knowledge as time progresses, we leverage it to revise annotated labels. This is surrounded by minimum entropy regularisation, which is widely evaluated in unsupervised and semi-supervised scenarios (Grandvalet & Bengio, 2005; 2006).
|
| 32 |
+
|
| 33 |
+
Secondly, note that OR methods penalise low entropy while LC rewards it, intuitively leading to a second vital question:
|
| 34 |
+
|
| 35 |
+
Should we penalise a low-entropy status or reward it?
|
| 36 |
+
|
| 37 |
+
Entropy minimisation is the most widely used principle in machine learning (Hartigan & Wong, 1979; Rumelhart et al., 1986; Grandvalet & Bengio, 2005; 2006; LeCun et al., 2015). In standard classification, minimising categorical cross entropy (CCE) optimises a model towards a low-entropy status defined by human annotations, which contain noise in very large-scale machine learning. As a result, confidence penalty becomes popular for reducing noisy fitting. In contrast, we prove that it is better to reward a meaningful low-entropy status redefined by our ProSelfLC. Therefore, our work offers a defence of entropy minimisation against the recent confidence penalty practice (Szegedy et al., 2016; Müller et al., 2019; Pereyra et al., 2017; Dubey et al., 2018).
|
| 38 |
+
|
| 39 |
+
Finally, we summarise our main contributions:
|
| 40 |
+
|
| 41 |
+
• We provide a theoretical study on popular target modification methods through entropy and KL divergence (Kullback & Leibler, 1951). Accordingly, we reveal their drawbacks and propose ProSelfLC as a solution. ProSelfLC can: (1) enhance the similarity structure information over training classes; (2) correct the semantic classes of noisy label distributions. ProSelfLC is the first method to trust self knowledge progressively and adaptively. Our extensive experiments: (1) defend the entropy minimisation principle; (2) demonstrate the effectiveness of ProSelfLC in both clean and noisy settings.
|
| 42 |
+
|
| 43 |
+
# 2 RELATED WORK
|
| 44 |
+
|
| 45 |
+
Label noise and semi-supervised learning. We test target modification approaches in the setting of label noise because it is generic and connected with semi-supervised learning, where only a subset of training examples are annotated, leading to missing labels. Then the key to semi-supervised training is to reliably fill them. When these missing labels are incorrectly filled, the challenge of semisupervised learning changes to noisy labels. For a further comparison, in semi-supervised learning, the annotated set is clean and reliable, because the label noise only exists in the unannotated set. While in our experimental setting, we are not given information on whether an example is trusted or not, thus being even more challenging. We summarise existing approaches for solving label noise: (1) Loss correction, in which we are given or we need to estimate a noise-transition matrix, which defines the distribution of noise labels (Li et al., 2017; Goldberger & Ben-Reuven, 2017; Sukhbaatar & Fergus, 2014; Vahdat, 2017; Yao et al., 2019; Han et al., 2018a; Patrini et al., 2017; Xiao et al., 2015). A noise-transition matrix is difficult and complex to estimate in practice; (2) Exploiting an auxiliary trusted training set to differentiate examples (Veit et al., 2017; Lee et al., 2018; Hendrycks et al., 2018). This requires extra annotation cost; (3) Co-training strategies, which train two or more learners (Malach & Shalev-Shwartz, 2017; Jiang et al., 2018; Han et al., 2018b; Yu et al., 2019; Wei et al., 2020; Qiao et al., 2018) and exploit their ‘disagreement’ information to differentiate data points; (4) Label engineering methods (Song et al., 2019; Lee, 2013; Reed et al., 2015; Tanaka et al., 2018; Yao et al., 2019), which relate to our focus in this work. Their strategy is to annotate unlabelled samples or correct noisy labels.
|
| 46 |
+
|
| 47 |
+
LC and knowledge distillation $( K D )$ (Bucila et al., 2006; Hinton et al., 2015). Mathematically, we derive that some KD methods also modify labels. We use the term label correction instead of KD for two reasons: (1) label correction is more descriptive; (2) the scope of KD is not limited to label modification. For example, multiple networks are trained for KD (Furlanello et al., 2018). When two models are trained, the consistency between their predictions of a data point is promoted in (Ba & Caruana, 2014; Zhang et al., 2018), while the distance between their feature maps is reduced in (Romero et al., 2015). Regarding self KD, two examples of the same class are constrained to have consistent output distributions (Xu & Liu, 2019; Yun et al., 2020). In another self KD (Zhang et al., 2019), the deepest classifier provides knowledge for shallower classifiers. In a recent self KD method (Yuan et al., 2020), Tf- $\mathrm { K D } _ { s e l f }$ applies two-stage training. In the second stage, a model is trained by exploiting its knowledge learned in the first stage. Our focus is to improve the end-to-end self LC. Finally, we acknowledge that exploiting ProSelfLC to improve non-self KD and stage-wise approaches is an area for future work, e.g., a better teacher model can be trained using ProSelfLC.
|
| 48 |
+
|
| 49 |
+
# 3 MATHEMATICAL ANALYSIS AND THEORY
|
| 50 |
+
|
| 51 |
+
Let $\mathbf { X } = \{ ( \mathbf { x } _ { i } , y _ { i } ) \} _ { i = 1 } ^ { N }$ represent $N$ training examples, where $\left( \mathbf { x } _ { i } , y _ { i } \right)$ denotes $i -$ th sample with input $\mathbf { x } _ { i } \in \mathbb { R } ^ { D }$ and label $y _ { i } \in \{ 1 , 2 , . . . , C \}$ . $C$ is the number of classes. A deep neural network $z$ consists of an embedding network $f ( \cdot ) : \bar { \mathbb { R } } ^ { D } \mathbb { R } ^ { K }$ and a linear classifier $\begin{array} { r } { g ( \cdot ) \dot { \mathbf { \Psi } } : \mathbb { R } ^ { K } \mathbb { R } ^ { C } } \end{array}$ , i.e., $\mathbf { z } _ { i } = z ( \mathbf { x } _ { i } ) = g ( f ( \mathbf { x } _ { i } ) ) ^ { \mathit { \prime } } : \mathbb { R } ^ { D } \mathbb { R } ^ { C }$ . For the brevity of analysis, we take a data point and omit its subscript so that it is denoted by $\left( \mathbf { x } , y \right)$ . The linear classifier is usually the last fully-connected layer. Its output is named logit vector $\mathbf { z } \in \mathbb { R } ^ { C }$ . We produce its classification probabilities $\mathbf { p }$ by normalising the logits using a softmax function:
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\mathbf { p } ( j | \mathbf { x } ) = \exp ( \mathbf { z } _ { j } ) / { \sum _ { m = 1 } ^ { C } \exp ( \mathbf { z } _ { m } ) } ,
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
where $\mathbf { p } ( j | \mathbf { x } )$ is the probability of $\mathbf { x }$ belonging to class $j$ . Its corresponding ground-truth is usually denoted by a one-hot representation q: $\mathbf { q } ( j | \mathbf { x } ) = 1$ if $j = y$ , $\mathbf { q } ( j | \mathbf { x } ) = 0$ otherwise.
|
| 58 |
+
|
| 59 |
+
# 3.1 SEMANTIC CLASS AND SIMILARITY STRUCTURE IN A LABEL DISTRIBUTION
|
| 60 |
+
|
| 61 |
+
Definition 1 (Semantic Class). Given a target label distribution $\tilde { \mathbf { q } } ( \mathbf { x } ) \in \mathbb { R } ^ { C }$ , the semantic class is defined by arg $\operatorname* { m a x } _ { j } { \tilde { \mathbf { q } } } ( j | \mathbf { x } )$ , i.e., the class whose probability is the largest.
|
| 62 |
+
|
| 63 |
+
Definition 2 (Similarity Structure). In $\tilde { \bf q } ( { \bf x } )$ , $\mathbf { x }$ has $C$ probabilities of being predicted to $C$ classes.
|
| 64 |
+
The similarity structure of $\mathbf { x }$ versus $C$ classes is defined by these probabilities and their differences.
|
| 65 |
+
|
| 66 |
+
Table 1: Summary of CCE, LS, CP and LC.
|
| 67 |
+
|
| 68 |
+
<table><tr><td></td><td>CCE</td><td>LS</td><td>CP</td><td>LC</td></tr><tr><td>Learning Target</td><td>q</td><td>qLs = (1- ε)q +εu</td><td>qcp = (1- e)q -ep</td><td>qLc = (1 - ɕ)q +ep</td></tr><tr><td>Cross Entropy</td><td>Eq(-log_P)</td><td>EaLs(-log_P) (1-e)KL(qlIp)</td><td>Eacp(-log P) (1-c)KL(qllp)</td><td>EqLc(-log P) (1-c)KL(qlIp)</td></tr><tr><td>KL Divergence</td><td>KL(qllp)</td><td>+eKL(ullp)</td><td>+eKL(pllu)</td><td>-eKL(pllu)</td></tr><tr><td>Entropy minimisation</td><td></td><td>Penalise over CCE</td><td>Penalise over CCE</td><td>Reward over CCE</td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td>Semantic class</td><td>Annotated</td><td>Annotated</td><td>Annotated</td><td>Annotated andLearned</td></tr><tr><td>Similarity structure</td><td>No</td><td>No</td><td>No</td><td>Yes</td></tr></table>
|
| 69 |
+
|
| 70 |
+
# 3.2 REVISIT OF CCE, LS, CP AND LC
|
| 71 |
+
|
| 72 |
+
Standard CCE. For any input $\left( \mathbf { x } , y \right)$ , the minimisation objective of standard CCE is:
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
L _ { \mathrm { C C E } } ( \mathbf { q } , \mathbf { p } ) = \mathrm { H } ( \mathbf { q } , \mathbf { p } ) = \mathrm { E } _ { \mathbf { q } } ( - \log \ \mathbf { p } ) ,
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
where $\operatorname { H } ( \cdot , \cdot )$ represents the cross entropy. $\operatorname { E } _ { \mathbf { q } } ( - \log \mathbf { \delta p } )$ denotes the expectation of negative loglikelihood, and $\mathbf { q }$ is the probability mass function.
|
| 79 |
+
|
| 80 |
+
Label smoothing. In LS (Szegedy et al., 2016; Hinton et al., 2015), we soften one-hot targets by adding a uniform distribution: $\tilde { \bf q } _ { \mathrm { L S } } = ( 1 - \epsilon ) { \bf q } + \epsilon { \bf u }$ , $\mathbf { u } \in \mathbb { R } ^ { C }$ , and $\begin{array} { r } { \forall j , \mathbf { u } _ { j } = \frac { 1 } { C } } \end{array}$ . Consequently:
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
L _ { \mathrm { C C E + L S } } ( \mathbf { q } , \mathbf { p } ; \epsilon ) = \mathrm { H } ( \tilde { \mathbf { q } } _ { \mathrm { L S } } , \mathbf { p } ) = \mathrm { E } _ { \tilde { \mathbf { q } } _ { \mathrm { L S } } } ( - \log \mathbf { \delta p } ) = ( 1 - \epsilon ) \mathrm { H } ( \mathbf { q } , \mathbf { p } ) + \epsilon \mathrm { H } ( \mathbf { u } , \mathbf { p } ) .
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
Confidence penalty. CP (Pereyra et al., 2017) penalises highly confident predictions:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
L _ { \mathrm { C C E + C P } } ( \mathbf { q } , \mathbf { p } ; \epsilon ) = ( 1 - \epsilon ) \mathrm { H } ( \mathbf { q } , \mathbf { p } ) - \epsilon \mathrm { H } ( \mathbf { p } , \mathbf { p } ) .
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
Label correction. As illustrated in Figure 1, LC is a family of algorithms, where a one-hot label distribution is modified to a convex combination of itself and a predicted distribution:
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\tilde { \bf q } _ { \mathrm { I C } } = ( 1 - \epsilon ) { \bf q } + \epsilon { \bf p } \Rightarrow L _ { \mathrm { C C E + L C } } ( { \bf q } , { \bf p } ; \epsilon ) = \mathrm { H } ( \tilde { \bf q } _ { \mathrm { L C } } , { \bf p } ) = ( 1 - \epsilon ) \mathrm { H } ( { \bf q } , { \bf p } ) + \epsilon \mathrm { H } ( { \bf p } , { \bf p } ) .
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
We remark: (1) $\mathbf { p }$ provides meaningful information about an example’s relative probabilities of being different training classes; (2) If $\epsilon$ is large, and $\mathbf { p }$ is confident in predicting a different class, i.e., a $\begin{array} { r } { \arg \operatorname* { m a x } _ { j } \mathbf { p } ( j | \mathbf { x } ) \neq \arg \operatorname* { m a x } _ { j } \mathbf { q } ( j | \mathbf { x } ) , } \end{array}$ $\tilde { \bf q } _ { \mathrm { L C } }$ defines a different semantic class from $\mathbf { q }$ .
|
| 99 |
+
|
| 100 |
+
# 3.3 THEORY
|
| 101 |
+
|
| 102 |
+
Proposition 1. LS, CP and $L C$ modify the learning targets of standard CCE
|
| 103 |
+
|
| 104 |
+
Proof. $L _ { \mathrm { C C E + C P } } ( \mathbf { q } , \mathbf { p } ; \epsilon ) = ( 1 - \epsilon ) \mathrm { H } ( \mathbf { q } , \mathbf { p } ) - \epsilon \mathrm { H } ( \mathbf { p } , \mathbf { p } ) = \mathrm { E } _ { ( \mathbf { 1 } - \epsilon ) \mathbf { q } - \epsilon \mathbf { p } } ( - \log \mathbf { \ p } )$ . Therefore, $\mathbf { \tilde { q } } _ { \mathrm { C P } } =$ $( 1 - \epsilon ) \mathbf { q } { - } \epsilon \mathbf { p }$ . Additionally, $\tilde { \mathbf { q } } _ { \mathrm { L S } } = ( 1 - \epsilon ) \mathbf { q } + \epsilon \mathbf { u }$ , $\tilde { \bf q } _ { \mathrm { L C } } = ( 1 - \epsilon ) { \bf q } + \epsilon { \bf p }$ .
|
| 105 |
+
|
| 106 |
+
Proposition 2. Some $K D$ methods, which aim to minimise the KL divergence between predictions of a teacher and a student, belong to the family of label correction.
|
| 107 |
+
|
| 108 |
+
Proof. In general, a loss function of such methods can be defined to be $L _ { \mathrm { K D } } ( \mathbf { q } , \mathbf { p } _ { t } , \mathbf { p } ) = ( 1 -$ $\epsilon ) \mathrm { H } ( \mathbf { q } , \mathbf { p } ) \bar { + } \epsilon \mathrm { K L } ( \mathbf { p } _ { t } | | \mathbf { p } )$ (Yuan et al., 2020). $\operatorname { K L } ( \cdot | | \cdot )$ denotes the KL divergence. As ${ \mathrm { K L } } ( \mathbf { p } _ { t } | | \mathbf { p } ) =$ $\mathrm { H } ( \mathbf { p } _ { t } , \mathbf { p } ) { - } \mathrm { H } ( \mathbf { p } _ { t } , \mathbf { p } _ { t } )$ , $\mathbf { p } _ { t }$ is from a teacher and fixed when training a student. We can omit $\mathrm { H } ( \mathbf { p } _ { t } , \mathbf { p } _ { t } )$ :
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\begin{array} { r } { L _ { \mathrm { K D } } ( \mathbf { q } , \mathbf { p } t , \mathbf { p } ) = ( 1 - \epsilon ) \mathrm { H } ( \mathbf { q } , \mathbf { p } ) + \epsilon \mathrm { H } ( \mathbf { p } t , \mathbf { p } ) = \mathrm { E } _ { ( 1 - \epsilon ) \mathbf { q } + \mathbf { c p } _ { t } } ( - \log \mathbf { p } ) \Rightarrow \tilde { \mathbf { q } } _ { \mathrm { K D } } = ( 1 - \epsilon ) \mathbf { q } + \epsilon \mathbf { p } t . } \end{array}
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
Consistent with LC in Eq (5), $L _ { \mathrm { K D } } ( \mathbf { q } , \mathbf { p } _ { t } , \mathbf { p } )$ revises a label using $\mathbf { p } _ { t }$ .
|
| 115 |
+
|
| 116 |
+
Proposition 3. Compared with CCE, LS and $C P$ penalise entropy minimisation while $L C$ reward it.
|
| 117 |
+
|
| 118 |
+
Proposition 4. In CCE, $L S$ and $C P ,$ a data point x has the same semantic class. In addition, x has an identical probability of belonging to other classes except for its semantic class.
|
| 119 |
+
|
| 120 |
+
The proof of propositions 3 and 4 is presented in the Appendix A. Only LC exploits informative information and has the ability to correct labels, while LS and CP only relax the hard targets. We summarise CCE, LS, CP and LC in Table 1. Constant terms are ignored for concision.
|
| 121 |
+
|
| 122 |
+
# 4 PROSELFLC: PROGRESSIVE AND ADAPTIVE LABEL CORRECTION
|
| 123 |
+
|
| 124 |
+
In standard CCE, a semantic class is considered while the similarity structure is ignored. It is mainly due to the difficulty of annotating the similarity structure for every data point, especially when $C$ is large ( $\mathrm { { X u } }$ et al., 2020). Fortunately, recent progress demonstrates that there are some effective approaches to define the similarity structure of data points without annotation: (1) In KD, an auxiliary teacher model can provide a student model the similarity structure information (Hinton et al., 2015; Müller et al., 2019); (2) In Self LC, e.g., Boot-soft, a model helps itself by exploiting the knowledge it has learned so far. We focus on studying the end-to-end Self LC.
|
| 125 |
+
|
| 126 |
+
Table 2: Instantiating ProSelfLC under different cases. For all terms, we use concrete values for concise interpretation. We bold the special case when the semantic class is changed.
|
| 127 |
+
|
| 128 |
+
<table><tr><td rowspan="2"></td><td colspan="3">l(p): Consistency is defined by whether p and q share the semantic class or not.</td></tr><tr><td></td><td></td><td>0.1(non-confident)0.9(confidently consistent) 0.9(confidently inconsistent)</td></tr><tr><td>Earlier phase g(t) = 0.1</td><td>0.01</td><td>0.09</td><td>0.09</td></tr><tr><td>Later phase g(t) = 0.9</td><td>0.09</td><td>0.81</td><td>0.81</td></tr></table>
|
| 129 |
+
|
| 130 |
+
In Self LC, $\epsilon$ indicates how much a predicted label distribution is trusted. In ProSelfLC, we propose to set it automatically according to learning time $t$ and prediction entropy $\mathrm { H } ( \mathbf { p } )$ , i.e., ProSelfLC trusts self knowledge according to training time and confidence. For any $\mathbf { x }$ , we summarise:
|
| 131 |
+
|
| 132 |
+
Loss: $: L _ { ( \tilde { \bf q } _ { \mathrm { P r o S e l f L C } } , { \bf p } ; \epsilon _ { \mathrm { P r o S e l f L C } } ) } = \mathrm { H } ( \tilde { \bf q } _ { \mathrm { P r o S e l f L C } } , { \bf p } ) = \mathrm { E } _ { \tilde { \bf q } _ { \mathrm { P r o S e l f L C } } } ( - \log { \bf p } ) .$ Label: $\begin{array} { r } { \tilde { \bf q } _ { \mathrm { P r o S e l f L C } } = ( 1 - \epsilon _ { \mathrm { P r o S e l f L C } } ) { \bf q } + \epsilon _ { \mathrm { P r o S e l f L C } } { \bf p } . } \end{array}$ $\mathrm { S e l f ~ t r u s t : } \ \epsilon _ { \mathrm { P r o S e l f L C } } = g ( t ) \times l ( \mathbf { p } ) \left\{ g ( t ) = h ( t / \Gamma - 0 . 5 , B ) \in ( 0 , 1 ) , \right. $
|
| 133 |
+
|
| 134 |
+
$t$ and $\Gamma$ are the iteration counter and the number of total iterations, respectively. $h ( \eta , B ) ~ =$ $1 / ( 1 + \exp ( - \eta \times B ) ) . B$ $B , \Gamma$ are task-dependent and searched on a validation set. We clarify: Global trust score $g ( t )$ denotes how much we trust a learner. It is independent of data points, thus being global. $g ( t )$ grows as $t$ rises. $B$ adjusts the exponentiation’s base and growth speed of $g ( t )$ . The local trust score $l ( \mathbf { p } )$ indicates how much we trust an output distribution $\mathbf { p }$ , which is datadependent. $l ( \mathbf { p } )$ rises as $\mathrm { H } ( \mathbf { p } )$ becomes lower, rewarding a confident distribution.
|
| 135 |
+
|
| 136 |
+
Design reason. (1) Regarding $g ( t )$ , in the earlier learning phase, i.e., $t < \Gamma / 2$ , $g ( t ) < 0 . 5 \Rightarrow$ ProSelfLC $< 0 . 5 , \forall \mathbf { p }$ , so that the human annotations dominate and ProSelfLC only modifies the similarity structure. When a learner has not seen the training data for enough time at the earlier stage, its knowledge is less reliable and a wrong confident prediction may occur. Our design assuages the bad impact of such unexpected cases. When it comes to the later training phase, i.e., $t > \Gamma / 2$ , we have $g ( t ) > 0 . 5$ as it has been trained for more than half of entire iterations. (2) Regarding $l ( \mathbf { p } )$ , it affects the later learning phase. If $\mathbf { p }$ is less confident, $l ( \mathbf { p } )$ will be smaller, then ProSelfLC will be smaller, hence we trust $\mathbf { p }$ less when it is of higher uncertainty. If $\mathbf { p }$ is highly confident, we trust its confident knowledge. Ablation study of our design is in Figure 2, where three variants of are presented. In our experiments, note that when $\epsilon$ is fixed, we try three values (0.125, 0.25, 0.50) and display the best instantiation, i.e., $\epsilon = 0 . 5 0$ .
|
| 137 |
+
|
| 138 |
+
We conduct the case analysis of ProSelfLC in Table 2 and summarise its core tactics as follows: (1) Correct the similarity structure for every data point in all cases, thanks to exploiting the self knowledge of a learner, i.e., $\mathbf { p }$ . (2) Revise the semantic class when $t$ is large enough and $\mathbf { p }$ is confidently inconsistent. As highlighted in Table 2, when two conditions are met, we have $\epsilon _ { \mathrm { P r o S e l f L C } } > 0 . 5$ and $\operatorname { a r g m a x } _ { j } \mathbf { p } ( j | \mathbf { x } ) \ \neq \ \operatorname { a r g m a x } _ { j } \mathbf { q } ( j | \mathbf { x } )$ , then $\mathbf { p }$ redefines the semantic class. For example, if $\mathbf { p } ~ = ~ [ 0 . 9 5 , 0 . 0 1 , 0 . 0 4 ] , \mathbf { q } ~ = ~ [ 0 , 0 , 1 ] ,$ $\epsilon _ { \mathrm { P r o S e l f L C } } ~ = ~ 0 . 8 ~ \Rightarrow ~ \tilde { \bf q } _ { \mathrm { P r o S e l f L C } } ~ = ~ ( 1 ~ -$ $\mathrm { \Delta \ p o S e l f L C } \mathbf { \Psi } ) \mathbf { q } + \epsilon _ { \mathrm { P r o S e l f L C } } \mathbf { p } = [ 0 . 7 6 , 0 . 0 0 8 , 0 . 2 3 2 ]$ . Note that ProSelfLC also becomes robust against lengthy exposure to the training data, as demonstrated in Figures 2 and 3.
|
| 139 |
+
|
| 140 |
+
# 5 EXPERIMENTS
|
| 141 |
+
|
| 142 |
+
In our experiments, we re-implement CCE, LS and CP. Regarding Self LC methods, we reimplement Boot-soft (Reed et al., 2015), where $\epsilon$ is fixed throughout training. We do not reimplement stage-wise Self LC and KD methods, e.g., Joint Optimisation and Tf- $\mathrm { K D } _ { s e l f }$ respectively, because time-consuming tuning is required. We fix the random seed and do not use any random accelerator for an entirely fair comparison. In standard and synthetic cases, we train on $80 \%$ training data (corrupted in synthetic cases) and use $20 \%$ trusted training data as a validation set to search hyperparameters, e.g., $\epsilon , \Gamma , B$ and settings of an optimiser. Note that $\Gamma$ and an optimiser’s settings are searched first and then shared by all methods. Finally, we retrain a model on the entire training data (corrupted in synthetic cases) and report its accuracy on the test data to fairly compare with prior results. In real-world label noise, the used dataset has a separate clean validation set for searching hyperparameters. Code will be released once this work is accepted.
|
| 143 |
+
|
| 144 |
+

|
| 145 |
+
Figure 2: Comparison of setting $\epsilon$ using different schemes. Experiments are done on CIFAR-100 with asymmetric label noise $r = 0 . 4$ . For data-dependent items, mean results are reported.
|
| 146 |
+
|
| 147 |
+
# 5.1 STANDARD IMAGE CLASSIFICATION
|
| 148 |
+
|
| 149 |
+
Datasets and training details. (1) CIFAR-100 (Krizhevsky, 2009) has 20 coarse classes, each containing 5 fine classes. There are 500 and 100 images per class in the training and testing sets, respectively. The image size is $3 2 \times 3 2$ . We apply simple data augmentation (He et al., 2016), i.e., we pad 4 pixels on every side of the image, and then randomly crop it with a size of $3 2 \times 3 2$ . Finally, this crop is horizontally flipped with a probability of 0.5. We choose SGD with its settings as: (a) a learning rate of 0.1; (b) a momentum of 0.9; (c) a weight decay of $5 e - 4$ ; (d) the batch size is 256 and the number of training iterations is $3 0 \mathrm { k }$ . We divide the learning rate by 10 at $1 5 \mathrm { k }$ and $2 2 \mathrm { k }$ iterations, respectively. (2) We train ResNet-50 (He et al., 2016) on ImageNet 2012 classification dataset, which has 1k classes and $5 0 \mathrm { k }$ images in the test set (Russakovsky et al., 2015). We use SGD with a start learning rate of $2 e - 3$ . A polynomial learning rate decay with a power of 2 is used. We set the momentum to 0.95 and the weight decay to $1 e - 4$ . We train on a single V100 GPU and the batch size is 64. We report the final test accuracy when the training ends at 500k iterations. We use the standard data augmentation: an original image is warped to $2 5 6 \times 2 5 6$ , followed by a random crop of $2 2 4 \times 2 2 4$ . This crop is randomly flipped. We fix common settings to fairly compare CCE, LS, CP, Boot-soft and ProSelfLC.
|
| 150 |
+
|
| 151 |
+
Result analysis. In Table 3, we observe the superiority of ProSelfLC in standard setting without considering label noise. Being probably surprising, LS and CP reduce the performance consistently as $\epsilon$ increases on ImageNet. Instead, Boot-soft and ProSelfLC improve versus CCE. We remark that both test sets are large so that their differences are noticeable.
|
| 152 |
+
|
| 153 |
+
# 5.2 SYNTHETIC LABEL NOISE
|
| 154 |
+
|
| 155 |
+
Noise generation. (1) Symmetric label noise: the original label of an image is uniformly changed to one of the other classes with a probability of $r$ ; (2) Asymmetric label noise: we follow (Wang et al., 2019) to generate asymmetric label noise to fairly compare with their reported results. Within each coarse class, we randomly select two fine classes $A$ and $B$ . Then we flip $\overline { { r } } \times 1 0 0 \%$ labels of $A$ to $B$ , and $r \times 1 0 0 \%$ labels of $B$ to $A$ . We remark that the overall label noise rate is smaller than $r$ .
|
| 156 |
+
|
| 157 |
+
Baselines.1 We compare with the results reported recently in SL (Wang et al., 2019). Forward is a loss correction approach that uses a noise-transition matrix (Patrini et al., 2017). D2L monitors the subspace dimensionality change at training (Ma et al., 2018). GCE denotes generalised cross entropy (Zhang & Sabuncu, 2018) and SL is symmetric cross entropy (Wang et al., 2019). They are robust losses designed for solving label noise. Training details are the same as Section 5.1.
|
| 158 |
+
|
| 159 |
+
Result analysis. For all methods, we directly report their final results when training terminates. Therefore, we test the robustness of a model against not only label noise, but also a long time being exposed to the data. In Table 4, we observe that: (1) ProSelfLC outperforms all baselines, which is significant in most cases; (2) In both implementation, Boot-hard and Boot-soft perform worse than the others. However, our ProSelfLC makes Self LC the best solution. Furthermore, learning dynamics are visualised in Figure 3, which helps to understand why ProSelfLC works better.
|
| 160 |
+
|
| 161 |
+
Table 3: Test accuracy $( \% )$ in the standard setting. We report three settings of hyperparameters.
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 3: Comprehensive learning dynamics on CIFAR-100 with asymmetric label noise $r = 0 . 4$ . For data-dependent items, mean results are reported. At training, a learner is NOT GIVEN whether a label is trusted or not. We store intermediate models and analyse them when the training ends.
|
| 165 |
+
|
| 166 |
+
Results of different $B , \epsilon$ are in Table 5. Appendix B shows the learning dynamics when $r$ changes.
|
| 167 |
+
|
| 168 |
+
Revising the semantic class and similarity structure. In Figures 3b and 3c, we show dynamic statistics of different approaches on fitting wrong labels and correcting them. ProSelfLC is much better than its counterparts. Semantic class correction reflects the change of similarity structure.
|
| 169 |
+
|
| 170 |
+
To redefine and reward a low-entropy status. On the one hand, we observe that LS and CP work well, being consistent with prior claims. In Figures 3d and 3e, the entropies of both clean and noisy subsets are much higher in LS and CP, correspondingly their generalisation is the best except for ProSelfLC in Figure 3f. On the other hand, ProSelfLC has the lowest entropy while performs the best, which proves that a learner’s confidence does not necessarily weaken its generalisation performance. Instead, a model needs to be careful with what to be confident in. As shown by Figures 3b and 3c, ProSelfLC has the least wrong fitting and most semantic class correction, which indicates that a meaningful low-entropy status is redefined.
|
| 171 |
+
|
| 172 |
+
# 5.3 REAL-WORLD LABEL NOISE
|
| 173 |
+
|
| 174 |
+
Clothing 1M (Xiao et al., 2015) has around $3 8 . 4 6 \%$ label noise in the training data and about 1 million images of 14 classes from shopping websites. Its internal noise structure is agnostic.
|
| 175 |
+
|
| 176 |
+
Baselines. For loss correction and estimating the noise-transition matrix, S-adaption (Goldberger & Ben-Reuven, 2017) uses an extra softmax layer, while Masking (Han et al., 2018a) exploits human cognition. MD-DYR-SH (Arazo et al., 2019) is a combination of three techniques: dynamic mixup (MD), dynamic bootstrapping together with label regularisation (DYR) and soft to hard (SH). The
|
| 177 |
+
|
| 178 |
+
Table 4: Accuracy $( \% )$ on the CIFAR-100 clean test set. All compared methods use ResNet-44.
|
| 179 |
+
|
| 180 |
+
<table><tr><td rowspan="2"></td><td rowspan="2">Method</td><td colspan="3">Asymmetric Noisy Labels</td><td rowspan="2"></td><td colspan="3">Symmetric Noisy Labels</td></tr><tr><td>r=0.2</td><td>r=0.3</td><td>r=0.4</td><td>r=0.2</td><td>r=0.4</td><td>r=0.6</td></tr><tr><td rowspan="5">Results From SL (Wang et al., 2019)</td><td>Boot-hard</td><td>63.4</td><td>63.2</td><td>62.1</td><td></td><td>57.9</td><td>48.2</td><td>12.3</td></tr><tr><td>Forward</td><td>64.1</td><td>64.0</td><td>60.9</td><td></td><td>59.8</td><td>53.1</td><td>24.7</td></tr><tr><td>D2L</td><td>62.4</td><td>63.2</td><td>61.4</td><td></td><td>59.2</td><td>52.0</td><td>35.3</td></tr><tr><td>GCE</td><td>63.0</td><td>63.2</td><td>61.7</td><td></td><td>59.1</td><td>53.3</td><td>36.2</td></tr><tr><td>SL</td><td>65.6</td><td>65.1</td><td>63.1</td><td></td><td>60.0</td><td>53.7</td><td>41.5</td></tr><tr><td rowspan="5">Our Trained Results</td><td>CCE</td><td>66.6</td><td>63.4</td><td>59.5</td><td></td><td>58.0</td><td>50.1</td><td>37.9</td></tr><tr><td>LS</td><td>67.9</td><td>66.4</td><td>65.0</td><td></td><td>63.8</td><td>57.2</td><td>46.5</td></tr><tr><td>CP</td><td>67.7</td><td>66.0</td><td>64.4</td><td></td><td>64.0</td><td>56.8</td><td>44.1</td></tr><tr><td>Boot-soft</td><td>66.9</td><td>65.3</td><td>61.0</td><td></td><td>63.2</td><td>59.0</td><td>44.8</td></tr><tr><td>ProSelfLC</td><td>68.7</td><td>68.5</td><td>67.9</td><td></td><td>64.8</td><td>59.3</td><td>47.7</td></tr></table>
|
| 181 |
+
|
| 182 |
+
Table 5: The results of different hyperparameters on CIFAR-100 using ResNet-44. Under different noise rates, the best instantiation of each approach is bolded except for CCE.
|
| 183 |
+
|
| 184 |
+
<table><tr><td>Method</td><td>Value of</td><td colspan="3">Asymmetric label noise</td><td colspan="3">Symmetric label noise</td><td rowspan="2">Clean</td></tr><tr><td>(hyperparameter)</td><td>hyperparameter</td><td>20%</td><td>30%</td><td>40%</td><td>20%</td><td>40%</td><td>60%</td></tr><tr><td rowspan="2">CCE</td><td>None or ε = 0</td><td>66.6</td><td>63.4</td><td>59.5</td><td>58.0</td><td>50.1</td><td>37.9</td><td>69.0</td></tr><tr><td>0.125</td><td>66.4</td><td>65.6</td><td>63.1</td><td>61.7</td><td>52.5</td><td>39.1</td><td>69.9</td></tr><tr><td rowspan="3">LS (e)</td><td>0.25</td><td>67.9</td><td>66.4</td><td>65.0</td><td>62.8</td><td>55.9</td><td>40.9</td><td>69.6</td></tr><tr><td>0.50</td><td>66.8</td><td>65.8</td><td>64.6</td><td>63.8</td><td>57.2</td><td>46.5</td><td>68.4</td></tr><tr><td>0.125</td><td>65.7</td><td>64.2</td><td>60.3</td><td>59.8</td><td>52.3</td><td>39.6</td><td>69.5</td></tr><tr><td rowspan="3">CP(e)</td><td>0.25</td><td>66.8</td><td>65.1</td><td>61.6</td><td>61.0</td><td>53.3</td><td>40.9</td><td>69.3</td></tr><tr><td>0.50</td><td>67.7</td><td>66.0</td><td>64.4</td><td>64.0</td><td>56.8</td><td>44.1</td><td>68.7</td></tr><tr><td>0.125</td><td>65.8</td><td>64.1</td><td>60.7</td><td>59.7</td><td>51.2</td><td>40.6</td><td>68.9</td></tr><tr><td rowspan="3">Boot-soft (ε)</td><td>0.25</td><td>66.2</td><td>64.1</td><td>60.3</td><td>61.1</td><td>54.4</td><td>43.3</td><td>69.1</td></tr><tr><td>0.50</td><td>66.9</td><td>65.3</td><td>61.0</td><td>63.2</td><td>59.0</td><td>44.8</td><td>69.1</td></tr><tr><td>8</td><td>67.8</td><td>67.4</td><td>67.9</td><td>64.7</td><td>57.7</td><td>47.7</td><td>70.1</td></tr><tr><td rowspan="4">ProSelfLC (B)</td><td>10</td><td>68.5</td><td>68.5</td><td>66.8</td><td>63.9</td><td>59.0</td><td>47.5</td><td>70.3</td></tr><tr><td>12</td><td>68.6</td><td>67.9</td><td>67.4</td><td>64.0</td><td>59.3</td><td>47.5</td><td>69.8</td></tr><tr><td>14</td><td>68.7</td><td>68.0</td><td>67.8</td><td>64.8</td><td>59.0</td><td>47.4</td><td>69.6</td></tr><tr><td>16</td><td>68.4</td><td>67.2</td><td>67.3</td><td>63.7</td><td>59.0</td><td>32.3</td><td>69.9</td></tr></table>
|
| 185 |
+
|
| 186 |
+
Table 6: Test accuracy $( \% )$ on the real-world noisy dataset Clothing 1M.
|
| 187 |
+
|
| 188 |
+
<table><tr><td rowspan="2">Boot- hard</td><td rowspan="2">Forward</td><td rowspan="2">D2L</td><td rowspan="2">GCE</td><td rowspan="2">SL</td><td rowspan="2">S- adaptation</td><td rowspan="2">Masking</td><td rowspan="2">MD- DYR-SH</td><td rowspan="2">Joint- soft</td><td colspan="4">Our Trained Results</td></tr><tr><td>CCE</td><td>LS</td><td>CP</td><td>Boot-soft ProSelfLC</td></tr><tr><td>68.9</td><td>69.8</td><td>69.5</td><td>69.8</td><td>71.0</td><td>70.3</td><td>71.1</td><td>71.0</td><td>72.2</td><td>71.8</td><td>72.6 72.4</td><td>72.3</td><td>73.4</td></tr></table>
|
| 189 |
+
|
| 190 |
+
other baselines have been introduced heretofore.
|
| 191 |
+
|
| 192 |
+
Training details. We follow (Tanaka et al., 2018) to train ResNet-50 and initialise it by a trained model on ImageNet. We follow Section 5.1 with small changes: the initial learning rate is 0.01 and we train 10k iterations. They are searched on the separate clean validation set.
|
| 193 |
+
|
| 194 |
+
Result analysis. In Table 6, analogously to CIFAR-100, we report our trained results of CCE, LS, CP, Boot-soft and ProSelfLC for an entirely fair comparison. ProSelfLC has the highest accuracy, which demonstrates its effectiveness again.
|
| 195 |
+
|
| 196 |
+
# 6 CONCLUSION
|
| 197 |
+
|
| 198 |
+
We present a thorough mathematical study on several target modification techniques. Through analysis of entropy and KL divergence, we reveal their relationships and limitations.
|
| 199 |
+
|
| 200 |
+
To improve and endorse self label correction, we propose ProSelfLC. Extensive experiments prove its superiority over existing methods under standard and noisy settings. ProSelfLC enhances the similarity structure information over classes, and rectifies the semantic classes of noisy label distributions. ProSelfLC is the first approach to trust self knowledge progressively and adaptively.
|
| 201 |
+
|
| 202 |
+
ProSelfLC redirects and promotes entropy minimisation, which is in marked contrast to recent practices of confidence penalty (Szegedy et al., 2016; Pereyra et al., 2017; Dubey et al., 2018).
|
| 203 |
+
|
| 204 |
+
# REFERENCES
|
| 205 |
+
|
| 206 |
+
Eric Arazo, Diego Ortego, Paul Albert, Noel O’Connor, and Kevin Mcguinness. Unsupervised label noise modeling and loss correction. In ICML, 2019.
|
| 207 |
+
|
| 208 |
+
Devansh Arpit, Stanisław Jastrz˛ebski, Nicolas Ballas, David Krueger, Emmanuel Bengio, Maxinder S. Kanwal, Tegan Maharaj, Asja Fischer, Aaron Courville, Yoshua Bengio, and Simon Lacoste-Julien. A closer look at memorization in deep networks. In ICML, 2017.
|
| 209 |
+
|
| 210 |
+
Jimmy Ba and Rich Caruana. Do deep nets really need to be deep? In NeurIPS, 2014.
|
| 211 |
+
|
| 212 |
+
Cristian Bucila, Rich Caruana, and Alexandru Niculescu-Mizil. Model compression. In KDDM, 2006.
|
| 213 |
+
|
| 214 |
+
Abhimanyu Dubey, Otkrist Gupta, Ramesh Raskar, and Nikhil Naik. Maximum-entropy fine grained classification. In NeurIPS, 2018.
|
| 215 |
+
|
| 216 |
+
Tommaso Furlanello, Zachary Lipton, Michael Tschannen, Laurent Itti, and Anima Anandkumar. Born again neural networks. In ICML, 2018.
|
| 217 |
+
|
| 218 |
+
Jacob Goldberger and Ehud Ben-Reuven. Training deep neural-networks using a noise adaptation layer. In ICLR, 2017.
|
| 219 |
+
|
| 220 |
+
Yves Grandvalet and Yoshua Bengio. Semi-supervised learning by entropy minimization. In NeurIPS, 2005.
|
| 221 |
+
|
| 222 |
+
Yves Grandvalet and Yoshua Bengio. Entropy regularization. Semi-supervised learning, pp. 151– 168, 2006.
|
| 223 |
+
|
| 224 |
+
Bo Han, Jiangchao Yao, Gang Niu, Mingyuan Zhou, Ivor Tsang, Ya Zhang, and Masashi Sugiyama. Masking: A new perspective of noisy supervision. In NeurIPS, 2018a.
|
| 225 |
+
|
| 226 |
+
Bo Han, Quanming Yao, Xingrui Yu, Gang Niu, Miao Xu, Weihua Hu, Ivor Tsang, and Masashi Sugiyama. Co-teaching: Robust training of deep neural networks with extremely noisy labels. In NeurIPS, 2018b.
|
| 227 |
+
|
| 228 |
+
John A Hartigan and Manchek A Wong. Algorithm as 136: A k-means clustering algorithm. Journal of the Royal Statistical Society. Series C (Applied Statistics), 28(1):100–108, 1979.
|
| 229 |
+
|
| 230 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
|
| 231 |
+
|
| 232 |
+
Dan Hendrycks, Mantas Mazeika, Duncan Wilson, and Kevin Gimpel. Using trusted data to train deep networks on labels corrupted by severe noise. In NeurIPS, 2018.
|
| 233 |
+
|
| 234 |
+
Geoffrey Hinton, Oriol Vinyals, and Jeffrey Dean. Distilling the knowledge in a neural network. In NeurIPS Deep Learning and Representation Learning Workshop, 2015.
|
| 235 |
+
|
| 236 |
+
Lu Jiang, Zhengyuan Zhou, Thomas Leung, Li-Jia Li, and Li Fei-Fei. Mentornet: Learning datadriven curriculum for very deep neural networks on corrupted labels. In ICML, 2018.
|
| 237 |
+
|
| 238 |
+
Alex Krizhevsky. Learning multiple layers of features from tiny images. 2009.
|
| 239 |
+
|
| 240 |
+
Solomon Kullback and Richard A Leibler. On information and sufficiency. The annals of mathematical statistics, pp. 79–86, 1951.
|
| 241 |
+
|
| 242 |
+
Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, pp. 436, 2015.
|
| 243 |
+
|
| 244 |
+
Dong-Hyun Lee. Pseudo-label: The simple and efficient semi-supervised learning method for deep neural networks. 2013.
|
| 245 |
+
|
| 246 |
+
Kuang-Huei Lee, Xiaodong He, Lei Zhang, and Linjun Yang. Cleannet: Transfer learning for scalable image classifier training with label noise. In CVPR, 2018.
|
| 247 |
+
|
| 248 |
+
Yuncheng Li, Jianchao Yang, Yale Song, Liangliang Cao, Jiebo Luo, and Li-Jia Li. Learning from noisy labels with distillation. In ICCV, 2017.
|
| 249 |
+
|
| 250 |
+
Xingjun Ma, Yisen Wang, Michael E Houle, Shuo Zhou, Sarah M Erfani, Shu-Tao Xia, Sudanthi Wijewickrema, and James Bailey. Dimensionality-driven learning with noisy labels. In ICML, 2018.
|
| 251 |
+
|
| 252 |
+
Eran Malach and Shai Shalev-Shwartz. Decoupling "when to update" from "how to update". In NeurIPS, 2017.
|
| 253 |
+
|
| 254 |
+
Rafael Müller, Simon Kornblith, and Geoffrey E Hinton. When does label smoothing help? In NeurIPS, 2019.
|
| 255 |
+
|
| 256 |
+
Giorgio Patrini, Alessandro Rozza, Aditya Krishna Menon, Richard Nock, and Lizhen Qu. Making deep neural networks robust to label noise: A loss correction approach. In CVPR, 2017.
|
| 257 |
+
|
| 258 |
+
Gabriel Pereyra, George Tucker, Jan Chorowski, Łukasz Kaiser, and Geoffrey Hinton. Regularizing neural networks by penalizing confident output distributions. In ICLR Workshop, 2017.
|
| 259 |
+
|
| 260 |
+
Siyuan Qiao, Wei Shen, Zhishuai Zhang, Bo Wang, and Alan Yuille. Deep co-training for semisupervised image recognition. In ECCV, 2018.
|
| 261 |
+
|
| 262 |
+
Scott Reed, Honglak Lee, Dragomir Anguelov, Christian Szegedy, Dumitru Erhan, and Andrew Rabinovich. Training deep neural networks on noisy labels with bootstrapping. In ICLR Workshop, 2015.
|
| 263 |
+
|
| 264 |
+
Adriana Romero, Nicolas Ballas, Samira Ebrahimi Kahou, Antoine Chassang, Carlo Gatta, and Yoshua Bengio. Fitnets: Hints for thin deep nets. In ICLR, 2015.
|
| 265 |
+
|
| 266 |
+
David E Rumelhart, Geoffrey E Hinton, and Ronald J Williams. Learning representations by backpropagating errors. Nature, pp. 533–536, 1986.
|
| 267 |
+
|
| 268 |
+
Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, pp. 211–252, 2015.
|
| 269 |
+
|
| 270 |
+
Hwanjun Song, Minseok Kim, and Jae-Gil Lee. Selfie: Refurbishing unclean samples for robust deep learning. In ICML, 2019.
|
| 271 |
+
|
| 272 |
+
Sainbayar Sukhbaatar and Rob Fergus. Learning from noisy labels with deep neural networks. arXiv preprint arXiv:1406.2080, 2014.
|
| 273 |
+
|
| 274 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In CVPR, 2016.
|
| 275 |
+
|
| 276 |
+
Daiki Tanaka, Daiki Ikami, Toshihiko Yamasaki, and Kiyoharu Aizawa. Joint optimization framework for learning with noisy labels. In CVPR, 2018.
|
| 277 |
+
|
| 278 |
+
Arash Vahdat. Toward robustness against label noise in training deep discriminative neural networks. In NeurIPS, 2017.
|
| 279 |
+
|
| 280 |
+
Andreas Veit, Neil Alldrin, Gal Chechik, Ivan Krasin, Abhinav Gupta, and Serge Belongie. Learning from noisy large-scale datasets with minimal supervision. In CVPR, 2017.
|
| 281 |
+
|
| 282 |
+
Yisen Wang, Xingjun Ma, Zaiyi Chen, Yuan Luo, Jinfeng Yi, and James Bailey. Symmetric cross entropy for robust learning with noisy labels. In ICCV, 2019.
|
| 283 |
+
|
| 284 |
+
Hongxin Wei, Lei Feng, Xiangyu Chen, and Bo An. Combating noisy labels by agreement: A joint training method with co-regularization. In CVPR, 2020.
|
| 285 |
+
|
| 286 |
+
Tong Xiao, Tian Xia, Yi Yang, Chang Huang, and Xiaogang Wang. Learning from massive noisy labeled data for image classification. In CVPR, 2015.
|
| 287 |
+
|
| 288 |
+
Lingxi Xie, Jingdong Wang, Zhen Wei, Meng Wang, and Qi Tian. Disturblabel: Regularizing cnn on the loss layer. In CVPR, 2016.
|
| 289 |
+
|
| 290 |
+
Ning Xu, Jun Shu, Yun-Peng Liu, and Xin Geng. Variational label enhancement. In ICML, 2020.
|
| 291 |
+
|
| 292 |
+
Ting-Bing Xu and Cheng-Lin Liu. Data-distortion guided self-distillation for deep neural networks. In AAAI, 2019.
|
| 293 |
+
|
| 294 |
+
Jiangchao Yao, Hao Wu, Ya Zhang, Ivor W Tsang, and Jun Sun. Safeguarded dynamic label regression for noisy supervision. In AAAI, 2019.
|
| 295 |
+
|
| 296 |
+
Xingrui Yu, Bo Han, Jiangchao Yao, Gang Niu, Ivor W Tsang, and Masashi Sugiyama. How does disagreement help generalization against label corruption? In ICML, 2019.
|
| 297 |
+
|
| 298 |
+
Li Yuan, Francis EH Tay, Guilin Li, Tao Wang, and Jiashi Feng. Revisiting knowledge distillation via label smoothing regularization. In CVPR, 2020.
|
| 299 |
+
|
| 300 |
+
Sukmin Yun, Jongjin Park, Kimin Lee, and Jinwoo Shin. Regularizing class-wise predictions via self-knowledge distillation. In CVPR, 2020.
|
| 301 |
+
|
| 302 |
+
Linfeng Zhang, Jiebo Song, Anni Gao, Jingwei Chen, Chenglong Bao, and Kaisheng Ma. Be your own teacher: Improve the performance of convolutional neural networks via self distillation. In ICCV, 2019.
|
| 303 |
+
|
| 304 |
+
Ying Zhang, Tao Xiang, Timothy M Hospedales, and Huchuan Lu. Deep mutual learning. In CVPR, 2018.
|
| 305 |
+
|
| 306 |
+
Zhilu Zhang and Mert R Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. In NeurIPS, 2018.
|
| 307 |
+
|
| 308 |
+
# A PROOF OF PROPOSITIONS
|
| 309 |
+
|
| 310 |
+
Proposition 3. Compared with CCE, LS and $C P$ penalise entropy minimisation while $L C$ reward it. Proof. We can rewrite CCE, LS, CP, and LC from the viewpoint of KL divergence:
|
| 311 |
+
|
| 312 |
+
$$
|
| 313 |
+
L _ { \mathrm { C C E } } ( \mathbf { q } , \mathbf { p } ) = \mathrm { H } ( \mathbf { q } , \mathbf { p } ) = \mathrm { K L } ( \mathbf { q } | | \mathbf { p } ) + \mathrm { H } ( \mathbf { q } , \mathbf { q } ) = \mathrm { K L } ( \mathbf { q } | | \mathbf { p } ) ,
|
| 314 |
+
$$
|
| 315 |
+
|
| 316 |
+
where we have $\mathrm { H } ( \mathbf { q } , \mathbf { q } ) = 0$ because $\mathbf { q }$ is a one-hot distribution.
|
| 317 |
+
|
| 318 |
+
$$
|
| 319 |
+
\begin{array} { r l } & { L _ { \mathrm { C C E + L S } } ( \mathbf { q } , \mathbf { p } ; \epsilon ) = ( 1 - \epsilon ) \mathrm { K L } ( \mathbf { q } | | \mathbf { p } ) + \epsilon \mathrm { K L } ( \mathbf { u } | | \mathbf { p } ) + \epsilon \mathrm { H } ( \mathbf { u } , \mathbf { u } ) } \\ & { \quad \quad \quad = ( 1 - \epsilon ) \mathrm { K L } ( \mathbf { q } | | \mathbf { p } ) + \epsilon \mathrm { K L } ( \mathbf { u } | | \mathbf { p } ) + \epsilon \cdot \mathrm { c o n s t a n t } , } \end{array}
|
| 320 |
+
$$
|
| 321 |
+
|
| 322 |
+
$$
|
| 323 |
+
\begin{array} { r l } & { L _ { \mathrm { C C E + C P } } ( { \mathbf { q } } , { \mathbf { p } } ; \epsilon ) = ( 1 - \epsilon ) \mathrm { K L } ( { \mathbf { q } } | | { \mathbf { p } } ) - \epsilon ( \mathrm { H } ( { \mathbf { p } } , { \mathbf { u } } ) - \mathrm { K L } ( { \mathbf { p } } | | { \mathbf { u } } ) ) } \\ & { \qquad = ( 1 - \epsilon ) \mathrm { K L } ( { \mathbf { q } } | | { \mathbf { p } } ) + \epsilon \mathrm { K L } ( { \mathbf { p } } | | { \mathbf { u } } ) - \epsilon \cdot \mathrm { c o n s t a n t } , } \end{array}
|
| 324 |
+
$$
|
| 325 |
+
|
| 326 |
+
where $\mathrm { H } ( \mathbf { p } , \mathbf { u } ) = \mathrm { H } ( \mathbf { u } , \mathbf { u } ) = { \mathrm { c c } }$ onstant. Analogously, LC in Eq (5) can also be rewritten:
|
| 327 |
+
|
| 328 |
+
$$
|
| 329 |
+
L _ { \mathrm { C C E + L C } } ( \mathbf { q } , \mathbf { p } ; \epsilon ) = ( 1 - \epsilon ) \mathrm { K L } ( \mathbf { q } | | \mathbf { p } ) - \epsilon \mathrm { K L } ( \mathbf { p } | | \mathbf { u } ) + \epsilon \cdot \mathrm { c o n s t a n t } .
|
| 330 |
+
$$
|
| 331 |
+
|
| 332 |
+
In LS and CP, both $+ \mathrm { K L } ( \mathbf { u } | | \mathbf { p } )$ and $+ \mathrm { K L } ( \mathbf { p } | | \mathbf { u } )$ pulls $\mathbf { p }$ towards $\mathbf { u }$ . While in LC, the term $- \mathrm { K L } ( \mathbf { p } | | \mathbf { u } )$ pushes $\mathbf { p }$ away from $\mathbf { u }$ .
|
| 333 |
+
|
| 334 |
+
Proposition 4. In CCE, $L S$ and $C P ,$ a data point x has the same semantic class. In addition, x has an identical probability of belonging to other classes except for its semantic class.
|
| 335 |
+
|
| 336 |
+
Proof. In LS, the target is $\tilde { \mathbf { q } } _ { \mathrm { L S } } = ( 1 - \epsilon ) \mathbf { q } + \epsilon \mathbf { u }$ . For any $0 \leq \epsilon < 1$ , the semantic class is not changed, because $1 - \epsilon + \epsilon * \overset { - } { \underset { C } { \ F } } > \bar { \epsilon } * \frac { 1 } { C }$ . In addition, $\begin{array} { r } { j _ { 1 } \neq y , \dot { j } _ { 2 } \neq y \Rightarrow \tilde { \mathbf { q } } _ { \mathrm { L S } } ( j _ { 1 } | \mathbf { x } ) = \tilde { \mathbf { q } } _ { \mathrm { L S } } ( j _ { 2 } | \mathbf { x } ) = \frac { \epsilon } { C } } \end{array}$ .
|
| 337 |
+
|
| 338 |
+
In CP, $\tilde { \bf q } _ { \mathrm { C P } } = ( 1 - \epsilon ) { \bf q } - \epsilon { \bf p }$ . In terms of label definition, $C P$ is against intuition because these zero-value positions in q are filled with negative values in $\tilde { \mathbf { q } } _ { \mathrm { C P } }$ . A probability has to be not smaller than zero. So we rephrase $\tilde { \mathbf { q } } _ { \mathrm { C P } } ( y | \mathbf { x } ) = ( 1 - \epsilon ) - \epsilon * \mathbf { p } ( y | \mathbf { x } )$ , and $\forall j \neq y , \tilde { \mathbf { q } } _ { \mathrm { C P } } ( j | \mathbf { x } ) = 0$ by replacing negative values with zeros, as illustrated in Figure 1a.
|
| 339 |
+
|
| 340 |
+
# B LEARNING DYNAMICS OF DIFFERENT NOISE RATES
|
| 341 |
+
|
| 342 |
+
In Figure 4, we store a model every 1000 iterations to monitor the learning process.
|
| 343 |
+
|
| 344 |
+
C THE CHANGES OF ENTROPY STATISTICS AND ProSelfLC AT TRAINING
|
| 345 |
+
|
| 346 |
+
In Figure 5, we visualise how the entropies of noisy and clean subsets change at training.
|
| 347 |
+
|
| 348 |
+

|
| 349 |
+
Figure 4: Learning dynamics on CIFAR-100 under asymmetric noisy labels. We show all iterations only in (a) and (d). In the others, we show the second half iterations, which are of higher interest. As the noise rate increases, the superiority of ProSelfLC becomes more significant, i.e., avoiding fitting noise in the 2nd row and leading to better generalisation in the 1st row.
|
| 350 |
+
|
| 351 |
+

|
| 352 |
+
Figure 5: The changes of entropy statistics and ProSelfLC at training. We store a model every 1000 iterations to monitor the learning process. For data-dependent metrics, after training, we split the corrupted training data into clean and noisy subsets according to the information about how the training data is corrupted before training. Finally, we report the mean results of each subset.
|
md/train/5UZ-AcwFDKJ/5UZ-AcwFDKJ.md
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Replay-Guided Adversarial Environment Design
|
| 2 |
+
|
| 3 |
+
Minqi Jiang∗ UCL, FAIR
|
| 4 |
+
|
| 5 |
+
Michael Dennis∗ UC Berkeley
|
| 6 |
+
|
| 7 |
+
Jack Parker-Holder University of Oxford
|
| 8 |
+
|
| 9 |
+
Jakob Foerster FAIR
|
| 10 |
+
|
| 11 |
+
Edward Grefenstette UCL, FAIR
|
| 12 |
+
|
| 13 |
+
Tim Rocktäschel UCL, FAIR
|
| 14 |
+
|
| 15 |
+
# Abstract
|
| 16 |
+
|
| 17 |
+
Deep reinforcement learning (RL) agents may successfully generalize to new settings if trained on an appropriately diverse set of environment and task configurations. Unsupervised Environment Design (UED) is a promising selfsupervised RL paradigm, wherein the free parameters of an underspecified environment are automatically adapted during training to the agent’s capabilities, leading to the emergence of diverse training environments. Here, we cast Prioritized Level Replay (PLR), an empirically successful but theoretically unmotivated method that selectively samples randomly-generated training levels, as UED. We argue that by curating completely random levels, PLR, too, can generate novel and complex levels for effective training. This insight reveals a natural class of UED methods we call Dual Curriculum Design (DCD). Crucially, DCD includes both PLR and a popular UED algorithm, PAIRED, as special cases and inherits similar theoretical guarantees. This connection allows us to develop novel theory for PLR, providing a version with a robustness guarantee at Nash equilibria. Furthermore, our theory suggests a highly counterintuitive improvement to PLR: by stopping the agent from updating its policy on uncurated levels (training on less data), we can improve the convergence to Nash equilibria. Indeed, our experiments confirm that our new method, $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ , obtains better results on a suite of out-of-distribution, zero-shot transfer tasks, in addition to demonstrating that $\mathrm { P L R ^ { \perp } }$ improves the performance of PAIRED, from which it inherited its theoretical framework.
|
| 18 |
+
|
| 19 |
+
# 1 Introduction
|
| 20 |
+
|
| 21 |
+
While deep reinforcement learning (RL) approaches have led to many successful applications in challenging domains like Atari [21], Go [35], Chess [36], Dota [4], and StarCraft [40] in recent years, deep RL agents still prove to be brittle, often failing to transfer to environments only slightly different from those encountered during training [44, 9]. To ensure learning of robust and well-generalizing policies, agents must train on sufficiently diverse and informative variations of environments (e.g. see Section 3.1 of [8]). However, it is not always feasible to specify an appropriate training distribution or a generator thereof. Agents may therefore benefit greatly from methods that automatically adapt the distribution over environment variations throughout training [10, 17]. Throughout this paper we will call a particular environment instance or configuration (e.g. an arrangement of blocks, race tracks, or generally any of the environment’s constituent entities) a level.
|
| 22 |
+
|
| 23 |
+
Two recent works [10, 17] have sought to empirically demonstrate this need for a more targeted agentadaptive mechanism for selecting levels on which to train RL agents, so to ensure efficient learning and generalization to unseen levels—as well as to provide methods implementing such mechanisms. The first method, Protagonist Antagonist Induced Regret Environment Design (PAIRED) [10], introduces a self-supervised RL paradigm called Unsupervised Environment Design (UED). Here, an environment generator (a teacher) is co-evolved with a student policy that trains on levels actively proposed by the teacher, leading to a form of adaptive curriculum learning. The aim of this coevolution is for the teacher to gradually learn to generate environments that exemplify properties of those that might be encountered at deployment time, and for the student to simultaneously learn a good policy that enables zero-shot transfer to such environments. PAIRED’s specific adversarial approach to environment design ensures a useful robustness characterization of the final student policy in the form of a minimax regret guarantee [31]—assuming that its underlying teacher-student multi-agent system arrives at a Nash equilibrium [NE, 24]. In contrast, the second method, Prioritized Level Replay (PLR) [17], embodies an alternative form of dynamic curriculum learning that does not assume control of level generation, but instead, the ability to selectively replay existing levels. PLR tracks levels previously proposed by a black-box environment generator, and for each, estimates the agent’s learning potential in that level, in terms of how useful it would be to gather new experience from that level again in the future. The PLR algorithm exploits these scores to adapt a schedule for revisiting or replaying levels to maximize learning potential. PLR has been shown to produce scalable and robust results, improving both sample complexity of agent training and the generalization of the learned policy in diverse environments. However, unlike PAIRED, PLR is motivated with heuristic arguments and lacks a useful theoretical characterization of its learning behavior.
|
| 24 |
+
|
| 25 |
+

|
| 26 |
+
Figure 1: Randomly drawn samples of CarRacing tracks produced by different methods. (a) Domain Randomization (DR) produces tracks of average complexity, with few sharp turns. (b) PAIRED often overexploits the difference in the students, leading to simple tracks that incidentally favor the antagonist. (c) REPAIRED mitigates this degeneracy, recovering track complexity. (d) $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ selects the most challenging randomly generated tracks, resulting in tracks that more closely resemble human-designed tracks, such as (e) the Nürburgring Grand Prix.
|
| 27 |
+
|
| 28 |
+
In this paper, we argue that PLR is, in and of itself, an effective form of UED: Through curating even randomly generated levels, PLR can generate novel and complex levels for learning robust policies. This insight leads to a natural class of UED methods which we call Dual Curriculum Design (DCD). In DCD, a student policy is challenged by a team of two co-evolving teachers. One teacher actively generates new, challenging levels, while the other passively curates existing levels for replaying, by prioritizing those estimated to be most suitably challenging for the student. We show that PAIRED and PLR are distinct members of the DCD class of algorithms and prove in Section 3 that all DCD algorithms enjoy similar minimax regret guarantees to that of PAIRED.
|
| 29 |
+
|
| 30 |
+
We make use of this result to provide the first theoretical characterization of PLR, which immediately suggests a simple yet highly counterintuitive adjustment to PLR: By only training on trajectories in replay levels, PLR becomes provably robust at NE. We call this resulting variant $\mathrm { P L R ^ { \perp } }$ (Section 4). From this perspective, PLR effectively performs level design in a diametrically opposite manner to PAIRED—through prioritized selection rather than active generation. A second corollary to the provable robustness of DCD algorithms shows that $\mathrm { P L R ^ { \perp } }$ can be extended to make use of the PAIRED teacher as a level generator while preserving the robustness guarantee of PAIRED, resulting in a method we call Replay-Enhanced PAIRED (REPAIRED) (Section 5). We hypothesize that in this arrangement, $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ plays a complementary role to PAIRED in robustifying student policies.
|
| 31 |
+
|
| 32 |
+
Our experiments in Section 6 investigate the learning dynamics of $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ , REPAIRED, and their replay-free counterparts on a challenging maze domain and a novel continuous control UED setting based on the popular CarRacing environment [5]. In both of these highly distinct settings, our methods provide significant improvements over PLR and PAIRED, producing agents that can perform out-of-distribution (OOD) generalization to a variety of human designed mazes and Formula 1 tracks.
|
| 33 |
+
|
| 34 |
+
In summary, we present the following contributions: (i) We establish a common framework, Dual Curriculum Design, that encompasses PLR and PAIRED. This allows us to develop new theory, which provides the first robustness guarantees for PLR at NE as well as for REPAIRED, which augments PAIRED with a PLR-based replay mechanism. (ii) Crucially, our theory suggests a highly counterintuitive improvement to PLR: the convergence to NE should be assisted by training on less data when using PLR—namely by only taking gradient updates from data that originates from the PLR buffer, using the samples from the environment distribution only for computing the prioritization of levels in the buffer. (iii) Our experiments in a maze domain and a novel car racing domain show that our methods significantly outperform their replay-free counterparts in zero-shot generalization. We open source our methods at https://github.com/facebookresearch/dcd.
|
| 35 |
+
|
| 36 |
+
# 2 Background
|
| 37 |
+
|
| 38 |
+
# 2.1 Unsupervised Environment Design
|
| 39 |
+
|
| 40 |
+
Unsupervised Environment Design (UED), as introduced by [10], is the problem of automatically designing a distribution of environments that adapts to the learning agent. UED is defined in terms of an Underspecified POMDP (UPOMDP), given by $\mathcal { M } = \langle A , O , \overset { \vartriangle } { \boldsymbol { \Theta } } , \overset { \vartriangle } { \boldsymbol { S } ^ { \mathcal { M } } } , \mathcal { T } ^ { \mathcal { M } } , \mathcal { T } ^ { \mathcal { M } } , \mathcal { R } ^ { \mathcal { M } } , \gamma \rangle$ , where $A$ is a set of actions, $O$ is a set of observations, $S$ is a set of states, $\mathcal { T } : S \times A \times \Theta \Delta ( S )$ is a transition function, $\mathcal { T } : S O$ is an observation (or inspection) function, $\mathcal { R } : S \mathbb { R }$ is a reward function, and $\gamma$ is a discount factor. This definition is identical to a POMDP with the addition of $\Theta$ to represent the free-parameters of the environment. These parameters can be distinct at every time step and incorporated into the transition function $\mathcal { T } ^ { \mathcal { M } } : S \times \mathbf { \bar { A } } \times \Theta \Delta ( S )$ . For example, $\Theta$ could represent the possible positions of obstacles in a maze. We will refer to the environment resulting from a fixed $\theta \in \Theta$ as $\mathcal { M } _ { \theta }$ , or with a slight abuse of notation, simply $\theta$ when clear from context. We ne the value of . Aligning wit $\pi$ in er $\mathcal { M } _ { \theta }$ to be logy f $\begin{array} { r } { V ^ { \theta } ( \pi ) = \mathbb { E } [ \sum _ { i = 0 } ^ { T } r _ { t } \gamma ^ { t } ] } \end{array}$ where ully-sp $r _ { t }$ are the rewards attained by ified environment as a level. $\pi$ in $\mathcal { M } _ { \theta }$
|
| 41 |
+
|
| 42 |
+
# 2.2 Protagonist Antagonist Induced Regret Environment Design
|
| 43 |
+
|
| 44 |
+
Protagonist Antagonist Induced Regret Environment Design [PAIRED, 10] presents a UED approach consisting of simultaneously training agents in a three player game: the protagonist $\pi _ { A }$ and the antagonist $\pi _ { B }$ are trained in environments generated by the teacher $\tilde { \theta }$ . The objective of this game is defined by $U ( \pi _ { A } , \pi _ { B } , \tilde { \theta } ) = \mathbb { E } _ { \theta \sim \tilde { \theta } } [ \mathrm { R E G R E T } ^ { \theta } ( \pi _ { A } , \pi _ { B } ) ]$ , where regret is defined by $\mathrm { R E G R E T } ^ { \theta } ( \pi _ { A } , \pi _ { B } ) = V ^ { \theta } ( \pi _ { B } ) - V ^ { \theta } ( \pi _ { A } )$ . The protagonist and antagonist are both trained to maximize their discounted environment returns while the teacher is trained to maximize $U$ . Note that by maximizing regret, the teacher is disincentivized from generating unsolvable levels, which will have a maximum regret of 0. As shorthand, we will sometimes refer to the protagonist and antagonist jointly as the student agents. The counterclockwise loop beginning at the student agents in Figure 2 summarizes this approach, with the students being both the protagonist and antagonist.
|
| 45 |
+
|
| 46 |
+
As both student agents grow more adept at solving different levels, the teacher continues to adapt its level designs to exploit the weaknesses of the protagonist in relation to the antagonist. As this dynamic unfolds, PAIRED produces an emergent curriculum of progressively more complex levels along the boundary of the protagonist’s capabilities. PAIRED is a creative method in the sense that the teacher may potentially generate an endless sequence of novel levels. However, as the teacher only adapts through gradient updates, it is inherently slow to adapt to changes in the student policies.
|
| 47 |
+
|
| 48 |
+
# 2.3 Prioritized Level Replay
|
| 49 |
+
|
| 50 |
+
Prioritized Level Replay [PLR, 17] is an active-learning strategy shown to improve a policy’s sample efficiency and generalization to unseen levels when training and evaluating on levels from a common UPOMDP, typically implemented as a seeded simulator. PLR maintains a level buffer $\pmb { \Lambda }$ of the top $K$ visited levels with highest learning potential as estimated by the time-averaged L1 value loss of the learning agent over the last episode on each level. At the start of each training episode, with some predefined replay probability $p$ , PLR uses a bandit to sample the level from $\pmb { \Lambda }$ to maximize the estimated learning potential; otherwise, with probability $1 - p$ , PLR samples a new level from the simulator. In contrast to the generative but slow-adapting PAIRED, PLR does not create new levels, but instead, acts as a fast-adapting curation mechanism for selecting the next training level among previously encountered levels. Also unlike PAIRED, PLR does not provide a robustness guarantee. By extending the theoretical foundation of PAIRED to PLR, we will show how PLR can be modified to provide a robustness guarantee at NE, as well as how PAIRED can exploit PLR’s complementary curation to quickly switch among generated levels to maximize the student’s regret.
|
| 51 |
+
|
| 52 |
+
# 3 The Robustness of Dual Curriculum Design
|
| 53 |
+
|
| 54 |
+

|
| 55 |
+
Figure 2: Overview of Dual Curriculum Design (DCD). The student learns in the presence of two co-adapting teachers that aim to maximize the student’s regret: The generator teacher designs new levels to challenge the agent, and the curator teacher prioritizes a set of levels already created, selectively sampling them for replay.
|
| 56 |
+
|
| 57 |
+
The previous approaches of PAIRED and PLR reveal a natural duality: Approaches that gradually learn to generate levels like PAIRED, and methods which cannot generate levels, but instead, quickly curate existing ones, like PLR. This duality suggests combining slow level generators with fast level curators. We call this novel class of UED algorithms Dual Curriculum Design (DCD). For instance, PLR can be seen as curator with a prioritized sampling mechanism with a random generator, while PAIRED, as a regret-maximizing generator without a curator. DCD can further consider Domain Randomization (DR) as a degenerate case of a random level generator without a curator.
|
| 58 |
+
|
| 59 |
+
To theoretically analyze this space of methods, we model DCD as a three player game among a student agent and two teachers called the dual curriculum game. However, to formalize this game, we must first formalize the single-teacher setting: Suppose the UPOMDP is clear from context. Then, given a utility function for a single teacher, $U _ { t } ( \pi , \theta )$ , we can naturally define the base game between the student $s$ and teacher $t$ as $G = \langle S = S _ { s } \times S _ { t } , U = U _ { s } \times U _ { t } \rangle$ , where $S _ { s } = \Pi$ is the strategy set of the student, $S _ { t } = \Theta$ is the strategy set of the teacher, and $U _ { s } ( \pi , \theta ) = V ^ { \theta } ( \pi )$ is the utility function of the student. In Sections 4 and 5, we will study settings corresponding to different choices of utility functions for the teacher agents, namely the maximum-regret objective $U _ { t } ^ { R } ( \pi , \theta )$ and the uniform objective $U _ { t } ^ { U } ( \pi , \theta )$ . These two objectives are defined as follows (for any constant $C$ ):
|
| 60 |
+
|
| 61 |
+
$$
|
| 62 |
+
\begin{array} { c } { U _ { t } ^ { R } ( \pi , \theta ) = \underset { \pi ^ { * } \in \Pi } { \operatorname { a r g m a x } } \{ V ^ { \theta } ( \pi ^ { * } ) - V ^ { \theta } ( \pi ) \} } \\ { U _ { t } ^ { U } ( \pi , \theta ) = C } \end{array}
|
| 63 |
+
$$
|
| 64 |
+
|
| 65 |
+
In the dual curriculum game $\overline { G }$ , the first teacher plays the game with probability $p$ , and the second, with probability $( 1 - p )$ —or more formally, $\overline { { G } } = \langle \overline { { S } } = S _ { s } \times S _ { t } \times S _ { t } , U = \overline { { U } } _ { s } \times \overline { { U } } _ { t } ^ { 1 } \times \overline { { U } } _ { t } ^ { 2 } \rangle$ , where the utility functions for the student and two teachers respectively, $\overline { { U } } _ { s } , \overline { { U } } _ { t } ^ { 1 } , \overline { { U } } _ { t } ^ { 2 }$ , are defined as follows:
|
| 66 |
+
|
| 67 |
+
$$
|
| 68 |
+
\begin{array} { c } { { \overline { { { U } } } _ { t } ^ { 1 } ( \pi , \theta ^ { 1 } , \theta ^ { 2 } ) = p U _ { t } ^ { 1 } ( \pi , \theta ^ { 1 } ) } } \\ { { \overline { { { U } } } _ { t } ^ { 2 } ( \pi , \theta ^ { 1 } , \theta ^ { 2 } ) = ( 1 - p ) U _ { t } ^ { 2 } ( \pi , \theta ^ { 2 } ) } } \\ { { \overline { { { U } } } _ { s } ( \pi , \theta ^ { 1 } , \theta ^ { 2 } ) = p U _ { s } ( \pi , \theta ^ { 1 } ) + ( 1 - p ) U _ { s } ( \pi , \theta ^ { 2 } ) } } \end{array}
|
| 69 |
+
$$
|
| 70 |
+
|
| 71 |
+
Our main theorem is that NE in the dual curriculum game are approximate NE of both the base game for either of the original teachers and the base game with a teacher maximizing the joint-reward of $p U _ { t } ^ { 1 } + ( 1 - p ) U _ { t } ^ { 2 }$ , where the quality of the approximations depends on the mixing probability $p$ .
|
| 72 |
+
|
| 73 |
+
Theorem 1. Let $B$ be the maximum difference between $\boldsymbol { U } _ { t } ^ { 1 }$ and ${ U } _ { t } ^ { 2 }$ , and let $( \pi , \theta ^ { 1 } , \theta ^ { 2 } )$ be a NE for $\overline { { G } }$ . Then $( \pi , p \theta ^ { 1 } + ( 1 - p ) \theta ^ { 2 } )$ is an approximate NE for the base game with either teacher or for $a$ teacher optimizing their joint objective. More precisely, it is a $2 B p ( 1 - p )$ -approximate NE when $U _ { t } = p U _ { t } ^ { 1 } + ( 1 - p ) U _ { t } ^ { 2 }$ , a $2 B ( 1 - p )$ -approximate NE when $U _ { t } = U _ { t } ^ { 1 }$ , and a $2 B p$ -approximate NE when $U _ { t } = U _ { t } ^ { 2 }$ .
|
| 74 |
+
|
| 75 |
+
The intuition behind this theorem is that, since the two teachers do not affect each other’s behavior, their best response to a fixed $\pi _ { s }$ is to choose a strategy $\theta$ that maximizes $\boldsymbol { U } _ { t } ^ { 1 }$ and ${ U } _ { t } ^ { 2 }$ respectively.
|
| 76 |
+
|
| 77 |
+
Moreover, the two teachers’ strategies can be viewed as a single combined strategy for the base game with the joint-objective, or with each teacher’s own objective. In fact, the teachers provide an approximate best-response to each case of the base game simply by playing their individual best responses. Thus, when we reach a NE of the dual curriculum game, the teachers arrive at approximate best responses for both the base game with the joint objective and with their own objectives, meaning they are also in an approximate NE of the base game with either teacher. The full details of this proof are outlined in Appendix A.
|
| 78 |
+
|
| 79 |
+
# 4 Robustifying PLR
|
| 80 |
+
|
| 81 |
+
In this section, we provide theoretical justification for the empirically observed effectiveness of PLR, and in the process, motivate a counterintuitive adjustment to the algorithm.
|
| 82 |
+
|
| 83 |
+
# Algorithm 1: Robust PLR (PLR⊥)
|
| 84 |
+
|
| 85 |
+
<table><tr><td colspan="2">Randomly initialize policy π()and an empty level buffer,Λ of size K. while not converged do</td></tr><tr><td colspan="2">Sample replay-decision Bernoulli, d ~ PD(d) ifd=O then</td></tr><tr><td colspan="2">Sample levelθ from level generator</td></tr><tr><td colspan="2"></td></tr><tr><td colspan="2">Collect π's trajectory T on θ, with a stop-gradient 𝜙⊥ i.e. Suppress policy update else</td></tr><tr><td colspan="2">Use PLR to sample a replay level from the level store,θ ~Λ</td></tr><tr><td colspan="2">Collect policy trajectory T on θ and update T with rewards R(T)</td></tr><tr><td colspan="2">end</td></tr><tr><td colspan="2">Compute PLR score, S = score(T,π)</td></tr><tr><td colspan="2">Update Λ with θ using score S end</td></tr></table>
|
| 86 |
+
|
| 87 |
+
# 4.1 Achieving Robustness Guarantees with PLR
|
| 88 |
+
|
| 89 |
+
PLR provides strong empirical gains in generalization, but lacks any theoretical guarantees of robustness. One step towards achieving such a guarantee is to replace its L1 value-loss prioritizaton with a regret prioritization, using the methods we discuss in Section 4.2: While L1 value loss may be good for quickly training the value function, it can bias the long-term training behavior toward high-variance policies. However, even with this change, PLR holds weaker theoretical guarantees because the random generating teacher can bias the student away from minimax regret policies and instead, toward policies that sacrifice robustness in order to excel in unstructured levels. We formalize this intuitive argument in the following corollary of Theorem 1.
|
| 90 |
+
|
| 91 |
+
Corollary 1. Let $\overline { G }$ be the dual curriculum game in which the first teacher maximizes regret, so $\begin{array} { r l r } { U _ { t } ^ { 1 } } & { { } = } & { U _ { t } ^ { R } } \end{array}$ , and the second teacher plays randomly, so $\begin{array} { r c l } { \overline { { U } } _ { t } ^ { 2 } } & { = } & { U _ { t } ^ { U } } \end{array}$ . Let $V ^ { \theta } ( \pi )$ be bounded in $[ \bar { B } ^ { - } , B ^ { + } ]$ for all $\theta , \pi$ . Further, suppose that $( \pi , \theta ^ { 1 } , \theta ^ { 2 } )$ is a Nash equilibrium of $\overline { { G } }$ . Let $\begin{array} { r c l } { R ^ { * } } & { = } & { \operatorname* { m i n } _ { \pi _ { A } \in \Pi } \{ \operatorname* { m a x } _ { \theta , \pi _ { B } \in \Theta , \Pi } \{ \mathrm { R E G R E T } ^ { \theta } ( \pi _ { A } , \pi _ { B } ) \} \} } \end{array}$ be the optimal worst-case regret. Then $\pi$ is $2 ( B ^ { + } - B ^ { - } ) ( 1 - p )$ close to having optimal worst-case regret, or formally, $\begin{array} { r } { \operatorname* { m a x } _ { \theta , \pi _ { B } \in \Theta , \Pi } \{ { \mathrm { R E G R E T } } ^ { \theta } ( \pi _ { A } , \pi ) \} \geq R ^ { * } - 2 ( B ^ { + } - B ^ { - } ) ( 1 - p ) . } \end{array}$ . Moreover, there exists environments for all values of $p$ within a constant factor of achieving this bound.
|
| 92 |
+
|
| 93 |
+
The proof of Corollary 1 follows from a direct application of Theorem 1 to show that a NE of $\overline { { G } }$ is an approximate NE for the base game of the first teacher, and through constructing a simple example where the student’s best response in $\overline { G }$ fails to attain the minimax regret in $G$ . These arguments are described in full in Appendix A. This corollary provides some justification for why PLR improves robustness of the equilibrium policy, as it biases the resulting policy toward a minimax regret policy. However, it also points a way towards further improving PLR: If the probability $p$ of using a teachergenerated level directly was set to 0, then in equilibrium, the resulting policy converges to a minimax regret policy. Consequently, we arrive at the counterintuitive idea of avoiding gradient updates from trajectories collected from randomly sampled levels, to ensure that at NE, we find a minimax regret policy. From a robustness standpoint, it is therefore optimal to train on less data. The modified PLR algorithm $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ with this counterintuitive adjustment is summarized in Algorithm 1, in which this small change relative to the original algorithm is highlighted in blue.
|
| 94 |
+
|
| 95 |
+
# 4.2 Estimating Regret
|
| 96 |
+
|
| 97 |
+
In general, levels may differ in maximum achievable returns, making it impossible to know the true regret of a level without access to an oracle. As the L1 value loss typically employed by PLR does not generally correspond to regret, we turn to alternative scoring functions that better approximate regret. Two approaches, both effective in practice, are discussed below.
|
| 98 |
+
|
| 99 |
+
Positive Value Loss Averaging over all transitions with positive value loss amounts to estimating regret as the difference between maximum achieved return and predicted return on an episodic basis. However, this estimate is highly biased, as the value targets are tied to the agent’s current, potentially suboptimal policy. As it only considers positive value losses, this scoring function leads to optimistic sampling of levels with respect to the current policy. When using GAE [33] to estimate bootstrapped value targets, this loss takes the following form, where $\lambda$ and $\gamma$ are the GAE and MDP discount factors respectively, and $\delta _ { t }$ , the TD-error at timestep $t$ :
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\frac { 1 } { T } \sum _ { t = 0 } ^ { T } \operatorname* { m a x } \left( \sum _ { k = t } ^ { T } ( \gamma \lambda ) ^ { k - t } \delta _ { k } , 0 \right) .
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
Maximum Monte Carlo (MaxMC) We can mitigate some of the bias of the positive value loss by replacing the value target with the highest return achieved on the given level so far during training. By using this maximal return, the regret estimates no longer depend on the agent’s current policy. This estimator takes the simple form of $\begin{array} { r } { ( 1 / T ) \sum _ { t = 0 } ^ { T } R _ { \mathrm { m a x } } - \bar { V ( s _ { t } ) } } \end{array}$ . In our dense-reward experiments, we compute this score as the difference between the maximum achieved return and $V ( s _ { 0 } )$ .
|
| 106 |
+
|
| 107 |
+
# 5 Replay-Enhanced PAIRED (REPAIRED)
|
| 108 |
+
|
| 109 |
+
We can replace the random generator teacher used by $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ with the PAIRED teacher. This extension entails a second student agent, the antagonist, also equipped with its own PLR level buffer. In each episode, with probability $p$ , the students evaluate their performances (but do not train) on a newly generated level and, with probability $1 - p$ , train on a level sampled from each student’s own regret-prioritizing PLR buffer. Training only on the highest regret levels should mitigate inefficiencies in the PAIRED teacher’s optimization procedure. We refer to this extension as Replay-Enhanced PAIRED (REPAIRED). An overview of REPAIRED is provided by black arrows in Figure 2, with the students being the protagonist and antagonist, while the full pseudocode is outlined in Appendix B.
|
| 110 |
+
|
| 111 |
+
Since $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ and PAIRED both promote regret in equilibrium, it would be reasonable to believe that the combination of the two does the same. A straightforward corollary of Theorem 1, which we describe in Appendix 1, shows that, in a theoretically ideal setting, combining these two algorithms as is done in REPAIRED indeed finds minimax regret strategies in equilibrium.
|
| 112 |
+
|
| 113 |
+
Corollary 2. Let $\overline { { G } }$ be the dual curriculum game in which both teachers maximize regret, so ${ \cal U } _ { t } ^ { 1 } \ : = \ : { \bar { { \cal U } } } _ { t } ^ { 2 } \ : = \ : { \cal U } _ { t } ^ { R }$ . Further, suppose that $( \bar { \pi } , \theta ^ { 1 } , \theta ^ { 2 } )$ is a Nash equilibrium of $\overline { { G } }$ . Then, $\pi \in$ $\begin{array} { r } { \operatorname * { a r g m i n } _ { \pi _ { A } \in \Pi } \lbrace \operatorname* { m a x } _ { \theta , \pi _ { B } \in \Theta , \Pi } \lbrace { \mathrm { R E G R E T } } ^ { \theta } ( \pi _ { A } , \pi _ { B } ) \rbrace \rbrace } \end{array}$ .
|
| 114 |
+
|
| 115 |
+
This result gives us some amount of assurance that, if our method arrives at NE, then the protagonist has converged to a minimax regret strategy, which has the benefits outlined in [10]: Since a minimax regret policy solves all solvable environments, whenever this is possible and sufficiently well-defined, we should expect policies resulting from the equilibrium behavior of REPAIRED to be robust and versatile across all environments in the domain.
|
| 116 |
+
|
| 117 |
+
# 6 Experiments
|
| 118 |
+
|
| 119 |
+
Our experiments firstly aim to (1) assess the empirical performance of the theoretically motivated $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ , and secondly, seek to better understand the effect of replay on unsupervised environment design, specifically (2) its impact on the zero-shot generalization performance of the induced student policies, and (3) the complexity of the levels designed by the teacher. To do so, we compare PLR and REPAIRED against their replay-free counterparts, DR and PAIRED, in the two highly distinct settings of discrete control with sparse rewards and continuous control with dense rewards. We provide environment descriptions alongside model and hyperparameter choices in Appendix D.
|
| 120 |
+
|
| 121 |
+
# 6.1 Partially-Observable Navigation
|
| 122 |
+
|
| 123 |
+
Each navigation level is a partially-observable maze requiring student agents to take discrete actions to reach a goal and receive a sparse reward. Our agents use PPO [34] with an LSTM-based recurrent policy to handle partial observability. Before each episode, the teacher designs the level in this order: beginning with an empty maze, it places one obstructing block per time step up to a predefined block budget, and finally places the agent followed by the goal.
|
| 124 |
+
|
| 125 |
+

|
| 126 |
+
Figure 3: Zero-shot transfer performance in challenging test environments after 250M training steps. The plots show median and interquartile range of solved rates over 10 runs. An asterisk $( ^ { \ast } )$ next to the maze name indicates the maze is procedurally-generated, and thus each attempt corresponds to a random configuration of the maze.
|
| 127 |
+
|
| 128 |
+
Zero-Shot Generalization We train policies with each method for 250M steps and evaluate zeroshot generalization on several challenging OOD environments, in addition to levels from the full distribution of two procedurally-generated environments, PerfectMaze and LargeCorridor. We also compare against DR and minimax baselines. Our results in Figure 3 and 4 show that $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ and REPAIRED both achieve greater sample-efficiency and zero-shot generalization than their replay-free counterparts. The improved test performance achieved by $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ over both DR and PLR when trained for an equivalent number of gradient updates, aggregated over all test mazes, is statistically significant $( p < 0 . 0 5 )$ , as is the improved test performance of REPAIRED over PAIRED. Well before 250 million steps, both PLR and $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ significantly outperform PAIRED after 3 billion training steps, as reported in [10]. Further, both PLR variants lead to policies exhibiting greater zero-shot transfer than the PAIRED variants. Notably, the $\mathrm { P L R ^ { \perp } }$ agent learns to solve mazes via an approximate right-hand rule. Table 2 in Appendix C.1 reports performance across all test mazes. The success of designing regret-maximizing levels via random search (curation) over learning a generator with RL suggests that for some UPOMDPs, the regret landscape, as a function of the free parameters $\theta$ , has a low effective dimensionality [3]. Foregoing gradient-based learning in favor of random search may then lead to faster adaptation to the changing regret landscape, as the policy evolves throughout training.
|
| 129 |
+
|
| 130 |
+
Emergent Complexity As the student agents improve, the teachers must generate more challenging levels to maintain regret. We measure the resultant emergent complexity by tracking the number of blocks in each level and the shortest path length to the goal (where unsolvable levels are assigned a length of 0). These results, summarized in Figure 4, show that PAIRED slowly adapts the complexity over training while REPAIRED initially quickly grows complexity, before being overtaken by PAIRED. This more rapid onset of complexity may be due to REPAIRED’s fast replay mechanism, and the long-term slowdown relative to PAIRED may be explained by its less frequent gradient updates. Our results over an extended training period in Appendix C confirm that both PAIRED and REPAIRED slowly increase complexity over time, eventually matching that attained in just a fraction of the number of gradient steps by PLR and $\mathrm { P L R ^ { \perp } }$ . This result shows that random search is surprisingly efficient at continually discovering levels of increasing complexity, given an appropriate curation mechanism such as PLR. Figure 5 shows that, similar to methods with a regret-maximizing teacher, PLR finds levels exhibiting complex structure.
|
| 131 |
+
|
| 132 |
+

|
| 133 |
+
Figure 5: Examples of emergent structures generated by each method.
|
| 134 |
+
|
| 135 |
+

|
| 136 |
+
Figure 4: Zero-shot transfer performance during training for PAIRED and REPAIRED variants. The plots show mean and standard error across 10 runs. The dotted lines mark the mean performance of PAIRED after 3B training steps, as reported in [10], while dashed lines indicate median returns.
|
| 137 |
+
|
| 138 |
+
# 6.2 Pixel-Based Car Racing with Continuous Control
|
| 139 |
+
|
| 140 |
+
To test the versatility and scalability of our methods, we turn to an extended version of the CarRacing environment from OpenAI Gym [5]. This environment entails continuous control with dense rewards, a 3-dimensional action space, and partial, pixel observations, with the goal of driving a full lap around a track. To enable UED of any closed-loop track, we reparameterize CarRacing to generate tracks as Bézier curves [22] with arbitrary control points. The teacher generates levels by choosing a sequence of up to 12 control points, which uniquely defines a Bézier track within specific, predefined curvature constraints. After 5M steps of training, we test the zero-shot transfer performance of policies trained by each method on 20 levels replicating official human-designed Formula One (F1) tracks (see Figure 19 in the Appendix for a visualization of the tracks). Note that these tracks are significantly OOD, as they cannot be defined with just 12 control points. In Figure 6 we show the progression of zero-shot transfer performance for the original CarRacing environment, as well as three F1 tracks of varying difficulty, while also including the final performance on the full F1 benchmark. For the final performance, we also evaluated the state-of-the-art CarRacing agent from [38] on our new F1 benchmark.
|
| 141 |
+
|
| 142 |
+

|
| 143 |
+
Figure 6: Zero-shot transfer performance. Plots show mean and standard error over 10 runs.
|
| 144 |
+
|
| 145 |
+
Unlike in the sparse, discrete navigation setting, we find DR leads to moderately successful policies for zero-shot transfer in CarRacing. Dense rewards simplify the learning problem and random Bezier tracks occasionally contain the challenges seen in F1 tracks, such as hairpin turns and observations showing parallel tracks due to high local curvature. Still, we see that policies trained by selectively sampling tracks to maximize regret significantly outperform those trained by uniformly sampling from randomly generated tracks, in terms of zero-shot transfer to the OOD F1 tracks. Remarkably, with a replay rate of 0.5, $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ sees statistically significant $( p < 0 . 0 0 1 )$ gains over PLR in zero-shot performance over the full F1 benchmark, despite directly training on only half the rollout data using half as many gradient updates. Once again, we see that random search with curation via PLR produces a rich selection of levels and an effective curriculum.
|
| 146 |
+
|
| 147 |
+
We also observe that PAIRED struggles to train a robust protagonist in CarRacing. Specifically, PAIRED overexploits the relative strengths of the antagonist over the protagonist, finding curricula that steer the protagonist towards policies that ultimately perform poorly even on simple tracks, leading to a gradual reduction in level complexity. We present training curves revealing this dynamic in Appendix C. As shown in Figure 6, REPAIRED mitigates this degeneracy substantially, though not completely, inducing a policy that significantly outperforms PAIRED $( p < 0 . 0 0 1 )$ in mean performance on the full F1 benchmark, but underperforms DR. Notably, $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ exceeds the performance of the state-of-the-art AttentionAgent [38], despite not using a self-attention policy and training on less than $0 . 2 5 \%$ of the number of environment steps in comparison. These gains come purely from the induced curriculum. Figure 17 in Appendix C further reveals that $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ produces CarRacing policies that tend to achieve higher minimum returns on average compared to the baseline methods, providing further evidence of the benefits of the minimax regret property coupled with a fast replay-based mechanism for efficiently finding high-regret levels.
|
| 148 |
+
|
| 149 |
+
# 7 Related Work
|
| 150 |
+
|
| 151 |
+
In inducing parallel curricula, DCD follows a rich lineage of curriculum learning methods [2, 32, 28, 23]. Many previous curriculum learning algorithms resemble the curator in DCD, sharing similar underlying selective-sampling mechanisms as $\mathrm { P L R ^ { \perp } }$ . Most similar is TSCL [19], which prioritizes levels based on return rather than value loss, and has been shown to overfit to training levels in some settings [17]. In our setting, replayed levels can be viewed as past strategies from a level-generating teacher. This links our replay-based methods to fictitious self-play [FSP, 13], and more closely, Prioritized FSP [40], which selectively samples opponents based on historic win ratios.
|
| 152 |
+
|
| 153 |
+
Recent approaches that make use of a generating adversary include Asymmetric Self-Play [37, 26], wherein one agent proposes tasks for another in the form of environment trajectories, and AMIGo [6], wherein the teacher is rewarded for proposing reachable goals. While our methods do not presuppose a goal-based setting, others have made progress here using generative modeling [12, 29], latent skill learning [14], and exploiting model disagreement [45]. These methods are less generally applicable than $\mathrm { P L R ^ { \perp } }$ , and unlike our DCD methods, they do not provide well-principled robustness guarantees.
|
| 154 |
+
|
| 155 |
+
Other recent algorithms can be understood as forms of UED and like DCD, framed in the lens of decision theory. POET [41, 42], a coevolutionary approach [27], uses a population of minimax (rather than minimax regret) adversaries to construct terrain for a BipedalWalker agent. In contrast to our methods, POET requires training a large population of both agents and environments and consequently, a sizable compute overhead. APT-Gen [11] also procedurally generates tasks, but requires access to target tasks, whereas our methods seek to improve zero-shot transfer.
|
| 156 |
+
|
| 157 |
+
The DCD framework also encompasses adaptive domain randomization methods [DR, 20, 15], which have seen success in assisting sim2real transfer for robotics [39, 16, 1, 25]. DR itself is subsumed by procedural content generation [30], for which UED and DCD may be seen as providing a formal, decision-theoretic framework, enabling development of provably optimal algorithms.
|
| 158 |
+
|
| 159 |
+
# 8 Discussion
|
| 160 |
+
|
| 161 |
+
We established a novel connection between PLR and minimax regret UED approaches like PAIRED, by developing the theory of Dual Curriculum Design (DCD). In this setting, a student policy is challenged by a team of two co-adapting, regret-maximizing teachers: one, a generator that creates new levels, and the other, a curator that selectively samples previously generated levels for replay. This view unifies PLR and PAIRED, which are both instances of DCD. Our theoretical results on DCD then enabled us to prove that PLR attains a minimax regret policy at NE, thereby providing the first theoretical characterization of the robustness of PLR. Notably our theory leads to the counterintuitive result that PLR can be made provably robust by training on less data, specifically, by only using the trajectories on levels sampled for replay. In addition, we developed Replay-Enhanced PAIRED (REPAIRED), which extends the selective replay-based updates of $\mathrm { P L R ^ { \perp } }$ to PAIRED, and proved it shares the same robustness guarantee at NE. Empirically, in two highly distinct environments, we found that $\mathrm { P L R ^ { \perp } }$ significantly improves zero-shot generalization over PLR, and REPAIRED, over PAIRED. As our methods solely modify the order of levels visited during training, they can, in principle, be combined with many other RL methods to yield potentially orthogonal improvements in sample-efficiency and generalization.
|
| 162 |
+
|
| 163 |
+
While these DCD-based improvements to PLR and PAIRED empirically lead to more robust policies, it is important to emphasize that our theoretical results only prove a minimax regret guarantee at NE for these methods; however, they provide no explicit guarantee of convergence to such NE. Further, it is worth highlighting that replay-based methods like $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ are completely dependent on the quality of levels proposed by the generator. Our results show that simply curating high regret levels discovered via random search is enough to outperform the RL-based PAIRED teacher in the domains studied. We expect that advancing methods for defining or adapting the generator’s proposal distribution holds great potential to improve the efficacy of our methods, especially in more complex, higher-dimensional domains, where random search may prove ineffective for finding useful training levels. Importantly, our methods assume an appropriate choice of what constitutes the UPOMDP’s free parameters. Our methods cannot be expected to produce robust policies for zero-shot transfer if the set of environments defined by the free parameters does not sufficiently align with the transfer domain of interest. Designing the environment parameterization for successful zero-shot transfer to a specific target domain can be highly non-trivial, posing an important problem for future research.
|
| 164 |
+
|
| 165 |
+
Looking beyond environment design, we notice that long-running UED processes in expansive UPDOMPs closely resemble continual learning in open-ended domains. The congruency of these settings suggests our contributions around DCD may extend to more general continual learning problems in which agents must learn to master a diverse sequence of tasks with predefined (or inferred) episode boundaries—if tasks are assumed to be designed by a regret-maximizing teacher. Thus, DCD-based methods like $\mathrm { \bf P } \mathrm { \bf L } { \bf R } ^ { \perp }$ may yield more general policies for continual learning. We anticipate many exciting crossovers between these areas of research in the years to come.
|
| 166 |
+
|
| 167 |
+
Given the rapid progress in applying RL to ever more complex domains, we can confidently expect a continued rise in real-world deployments of RL systems in the coming years. Unlike in simulation, in the real world, the environment tends to exhibit much more variability, which may not be explicitly coded into the associated simulator used for training. Deployed RL agents are thus liable to make many mistakes due to unexpected environment variations. Our methods for improving UED lead to more robust RL agents across a potentially wide range of changes to the environment. Thus, our work may prove to be a useful tool in attaining safer, more reliable RL agents, helping to enable the application of RL to more real-world problems.
|
| 168 |
+
|
| 169 |
+
By increasing the applicability of RL to real-world settings, our work may exacerbate the more general risks of deploying machine learning: increased unemployment; overreliance on biased models that potentially reinforce common misconceptions and societal inequalities; and the advancement of automated weapons. Particular to our methods, as discussed in Section 8, aligning the choice of free parameters for the UPOMDP to the target domain of interest is important for successful transfer. While this choice of free parameters then acts as a potential point of failure, the UPOMDP abstraction underlying UED reveals this problem generally impacts all RL methods aiming to train robust policies; a UPOMDP simply makes explicit the otherwise implicit space of environment configurations defined by a standard POMDP. By forcing us to consider where our training environment departs from reality, UED methods encourage designing RL systems in a way that is more aware of the underlying assumptions about the environment, thereby leading to more principled, robust systems.
|
| 170 |
+
|
| 171 |
+
# Acknowledgments and Disclosure of Funding
|
| 172 |
+
|
| 173 |
+
We would like to thank Natasha Jaques, Patrick Labatut, and Heinrich Küttler for fruitful discussions that helped inform this work. Further, we are grateful to our anonymous reviewers for their valuable feedback. MJ is supported by the FAIR PhD program. This work was funded by Facebook.
|
| 174 |
+
|
| 175 |
+
References
|
| 176 |
+
[1] O. M. Andrychowicz, B. Baker, M. Chociej, R. Józefowicz, B. McGrew, J. Pachocki, A. Petron, M. Plappert, G. Powell, A. Ray, J. Schneider, S. Sidor, J. Tobin, P. Welinder, L. Weng, and W. Zaremba. Learning dexterous in-hand manipulation. The International Journal of Robotics Research, 39(1):3–20, 2020.
|
| 177 |
+
[2] Y. Bengio, J. Louradour, R. Collobert, and J. Weston. Curriculum learning. In Proceedings of the 26th Annual International Conference on Machine Learning, ICML ’09, page 41–48, New York, NY, USA, 2009. Association for Computing Machinery.
|
| 178 |
+
[3] J. Bergstra and Y. Bengio. Random search for hyper-parameter optimization. Journal of Machine Learning Research, 13:281–305, 2012.
|
| 179 |
+
[4] C. Berner, G. Brockman, B. Chan, V. Cheung, P. D˛ebiak, C. Dennison, D. Farhi, Q. Fischer, S. Hashme, C. Hesse, et al. Dota 2 with large scale deep reinforcement learning. arXiv preprint arXiv:1912.06680, 2019.
|
| 180 |
+
[5] G. Brockman, V. Cheung, L. Pettersson, J. Schneider, J. Schulman, J. Tang, and W. Zaremba. Openai gym. CoRR, abs/1606.01540, 2016.
|
| 181 |
+
[6] A. Campero, R. Raileanu, H. Kuttler, J. B. Tenenbaum, T. Rocktäschel, and E. Grefenstette. Learning with AMIGo: Adversarially motivated intrinsic goals. In International Conference on Learning Representations, 2021.
|
| 182 |
+
[7] M. Chevalier-Boisvert, L. Willems, and S. Pal. Minimalistic gridworld environment for openai gym. https://github.com/maximecb/gym-minigrid, 2018.
|
| 183 |
+
[8] K. Cobbe, C. Hesse, J. Hilton, and J. Schulman. Leveraging procedural generation to benchmark reinforcement learning. In Proceedings of the 37th International Conference on Machine Learning, pages 2048–2056, 2020.
|
| 184 |
+
[9] K. Cobbe, O. Klimov, C. Hesse, T. Kim, and J. Schulman. Quantifying generalization in reinforcement learning. In K. Chaudhuri and R. Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, Proceedings of Machine Learning Research. PMLR, 2019.
|
| 185 |
+
[10] M. Dennis, N. Jaques, E. Vinitsky, A. Bayen, S. Russell, A. Critch, and S. Levine. Emergent complexity and zero-shot transfer via unsupervised environment design. In Advances in Neural Information Processing Systems, volume 33, 2020.
|
| 186 |
+
[11] K. Fang, Y. Zhu, S. Savarese, and F.-F. Li. Adaptive procedural task generation for hardexploration problems. In International Conference on Learning Representations, 2021.
|
| 187 |
+
[12] C. Florensa, D. Held, X. Geng, and P. Abbeel. Automatic goal generation for reinforcement learning agents. In J. Dy and A. Krause, editors, Proceedings of the 35th International Conference on Machine Learning, volume 80 of Proceedings of Machine Learning Research, pages 1515–1528. PMLR, 10 2018.
|
| 188 |
+
[13] J. Heinrich, M. Lanctot, and D. Silver. Fictitious self-play in extensive-form games. In Proceedings of the 32nd International Conference on Machine Learning, pages 805–813, 2015.
|
| 189 |
+
[14] A. Jabri, K. Hsu, A. Gupta, B. Eysenbach, S. Levine, and C. Finn. Unsupervised curricula for visual meta-reinforcement learning. In Advances in Neural Information Processing Systems, volume 32, 2019.
|
| 190 |
+
[15] N. Jakobi. Evolutionary robotics and the radical envelope-of-noise hypothesis. Adaptive Behavior, 6(2):325–368, 1997.
|
| 191 |
+
[16] S. James, A. J. Davison, and E. Johns. Transferring end-to-end visuomotor control from simulation to real world for a multi-stage task. In 1st Conference on Robot Learning, 2017.
|
| 192 |
+
[17] M. Jiang, E. Grefenstette, and T. Rocktäschel. Prioritized level replay. In Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pages 4940–4950. PMLR, 2021.
|
| 193 |
+
[18] X. Ma. Car racing with pytorch. https://github.com/xtma/pytorch_car_caring, 2019.
|
| 194 |
+
[19] T. Matiisen, A. Oliver, T. Cohen, and J. Schulman. Teacher-student curriculum learning. IEEE Transactions on Neural Networks and Learning Systems, PP, 07 2017.
|
| 195 |
+
[20] B. Mehta, M. Diaz, F. Golemo, C. J. Pal, and L. Paull. Active domain randomization. In L. P. Kaelbling, D. Kragic, and K. Sugiura, editors, 3rd Annual Conference on Robot Learning, CoRL 2019, Osaka, Japan, October 30 - November 1, 2019, Proceedings, volume 100 of Proceedings of Machine Learning Research, pages 1162–1176. PMLR, 2019.
|
| 196 |
+
[21] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
|
| 197 |
+
[22] M. E. Mortenson. Mathematics for Computer Graphics Applications. Industrial Press Inc., 1999.
|
| 198 |
+
[23] S. Narvekar, B. Peng, M. Leonetti, J. Sinapov, M. E. Taylor, and P. Stone. Curriculum learning for reinforcement learning domains: A framework and survey. Journal of Machine Learning Research, 21:181:1–181:50, 2020.
|
| 199 |
+
[24] J. F. Nash et al. Equilibrium points in n-person games. Proceedings of the National Academy of Sciences, 36(1):48–49, 1950.
|
| 200 |
+
[25] OpenAI, I. Akkaya, M. Andrychowicz, M. Chociej, M. Litwin, B. McGrew, A. Petron, A. Paino, M. Plappert, G. Powell, R. Ribas, J. Schneider, N. Tezak, J. Tworek, P. Welinder, L. Weng, Q. Yuan, W. Zaremba, and L. Zhang. Solving rubik’s cube with a robot hand. CoRR, abs/1910.07113, 2019.
|
| 201 |
+
[26] O. OpenAI, M. Plappert, R. Sampedro, T. Xu, I. Akkaya, V. Kosaraju, P. Welinder, R. D’Sa, A. Petron, H. P. de Oliveira Pinto, A. Paino, H. Noh, L. Weng, Q. Yuan, C. Chu, and W. Zaremba. Asymmetric self-play for automatic goal discovery in robotic manipulation, 2021.
|
| 202 |
+
[27] E. Popovici, A. Bucci, R. P. Wiegand, and E. D. De Jong. Coevolutionary Principles, pages 987–1033. Springer Berlin Heidelberg, 2012.
|
| 203 |
+
[28] R. Portelas, C. Colas, L. Weng, K. Hofmann, and P.-Y. Oudeyer. Automatic curriculum learning for deep rl: A short survey. In C. Bessiere, editor, Proceedings of the Twenty-Ninth International Joint Conference on Artificial Intelligence, IJCAI-20, pages 4819–4825. International Joint Conferences on Artificial Intelligence Organization, 7 2020. Survey track.
|
| 204 |
+
[29] S. Racaniere, A. Lampinen, A. Santoro, D. Reichert, V. Firoiu, and T. Lillicrap. Automated curriculum generation through setter-solver interactions. In International Conference on Learning Representations, 2020.
|
| 205 |
+
[30] S. Risi and J. Togelius. Increasing generality in machine learning through procedural content generation. Nature Machine Intelligence, 2(8):428–436, 8 2020.
|
| 206 |
+
[31] L. J. Savage. The theory of statistical decision. Journal of the American Statistical association, 46(253):55–67, 1951.
|
| 207 |
+
[32] J. Schmidhuber. Powerplay: Training an increasingly general problem solver by continually searching for the simplest still unsolvable problem. Frontiers in Psychology, 4:313, 06 2013.
|
| 208 |
+
[33] J. Schulman, P. Moritz, S. Levine, M. I. Jordan, and P. Abbeel. High-dimensional continuous control using generalized advantage estimation. In Y. Bengio and Y. LeCun, editors, 4th International Conference on Learning Representations, ICLR 2016, San Juan, Puerto Rico, May 2-4, 2016, Conference Track Proceedings, 2016.
|
| 209 |
+
[34] J. Schulman, F. Wolski, P. Dhariwal, A. Radford, and O. Klimov. Proximal policy optimization algorithms. CoRR, abs/1707.06347, 2017.
|
| 210 |
+
[35] D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. Van Den Driessche, J. Schrittwieser, I. Antonoglou, V. Panneershelvam, M. Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
|
| 211 |
+
[36] D. Silver, T. Hubert, J. Schrittwieser, I. Antonoglou, M. Lai, A. Guez, M. Lanctot, L. Sifre, D. Kumaran, T. Graepel, et al. A general reinforcement learning algorithm that masters chess, shogi, and go through self-play. Science, 362(6419):1140–1144, 2018.
|
| 212 |
+
[37] S. Sukhbaatar, Z. Lin, I. Kostrikov, G. Synnaeve, A. Szlam, and R. Fergus. Intrinsic motivation and automatic curricula via asymmetric self-play. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net, 2018.
|
| 213 |
+
[38] Y. Tang, D. Nguyen, and D. Ha. Neuroevolution of self-interpretable agents. In Proceedings of the Genetic and Evolutionary Computation Conference, 2020.
|
| 214 |
+
[39] 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, 2017.
|
| 215 |
+
[40] O. Vinyals, I. Babuschkin, W. M. Czarnecki, M. Mathieu, A. Dudzik, J. Chung, D. H. Choi, R. Powell, T. Ewalds, P. Georgiev, et al. Grandmaster level in StarCraft II using multi-agent reinforcement learning. Nature, 575(7782):350–354, 2019.
|
| 216 |
+
[41] R. Wang, J. Lehman, J. Clune, and K. O. Stanley. Paired open-ended trailblazer (POET): endlessly generating increasingly complex and diverse learning environments and their solutions. CoRR, abs/1901.01753, 2019.
|
| 217 |
+
[42] R. Wang, J. Lehman, A. Rawal, J. Zhi, Y. Li, J. Clune, and K. Stanley. Enhanced POET: Open-ended reinforcement learning through unbounded invention of learning challenges and their solutions. In Proceedings of the 37th International Conference on Machine Learning, pages 9940–9951, 2020.
|
| 218 |
+
[43] B. L. Welch. The generalization of ‘student’s’ problem when several different population variances are involved. Biometrika, 34(1-2):28–35, 1947.
|
| 219 |
+
[44] A. Zhang, N. Ballas, and J. Pineau. A dissection of overfitting and generalization in continuous reinforcement learning. arXiv preprint arXiv:1806.07937, 2018.
|
| 220 |
+
[45] Y. Zhang, P. Abbeel, and L. Pinto. Automatic curriculum learning through value disagreement. In Advances in Neural Information Processing Systems, volume 33, pages 7648–7659, 2020.
|
| 221 |
+
|
| 222 |
+
# Checklist
|
| 223 |
+
|
| 224 |
+
1. For all authors...
|
| 225 |
+
|
| 226 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 227 |
+
(b) Did you describe the limitations of your work? [Yes] See Section 8.
|
| 228 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes]
|
| 229 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 230 |
+
|
| 231 |
+
2. If you are including theoretical results...
|
| 232 |
+
|
| 233 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] (b) Did you include complete proofs of all theoretical results? [Yes]
|
| 234 |
+
|
| 235 |
+
3. If you ran experiments...
|
| 236 |
+
|
| 237 |
+
(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]
|
| 238 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Appendix D.1 and D.2.
|
| 239 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes]
|
| 240 |
+
(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 D.1 and D.2.
|
| 241 |
+
|
| 242 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 243 |
+
|
| 244 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes]
|
| 245 |
+
(b) Did you mention the license of the assets? [Yes] The MIT License.
|
| 246 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [Yes]
|
| 247 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 248 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 249 |
+
|
| 250 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 251 |
+
|
| 252 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 253 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 254 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/5Ya8PbvpZ9/5Ya8PbvpZ9.md
ADDED
|
@@ -0,0 +1,314 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# BARTSCORE: Evaluating Generated Text as Text Generation
|
| 2 |
+
|
| 3 |
+
Weizhe Yuan Carnegie Mellon University weizhey@cs.cmu.edu
|
| 4 |
+
|
| 5 |
+
Graham Neubig Carnegie Mellon University gneubig@cs.cmu.edu
|
| 6 |
+
|
| 7 |
+
Pengfei Liu ∗ Carnegie Mellon University pliu3@cs.cmu.edu
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
A wide variety of NLP applications, such as machine translation, summarization, and dialog, involve text generation. One major challenge for these applications is how to evaluate whether such generated texts are actually fluent, accurate, or effective. In this work, we conceptualize the evaluation of generated text as a text generation problem, modeled using pre-trained sequence-to-sequence models. The general idea is that models trained to convert the generated text to/from a reference output or the source text will achieve higher scores when the generated text is better. We operationalize this idea using BART [32], an encoder-decoder based pre-trained model, and propose a metric BARTSCORE with a number of variants that can be flexibly applied in an unsupervised fashion to evaluation of text from different perspectives (e.g. informativeness, fluency, or factuality). BARTSCORE is conceptually simple and empirically effective. It can outperform existing top-scoring metrics in 16 of 22 test settings, covering evaluation of 16 datasets (e.g., machine translation, text summarization) and 7 different perspectives (e.g., informativeness, factuality). Code to calculate BARTScore is available at https://github.com/neulab/BARTScore, and we have released an interactive leaderboard for meta-evaluation at http: //explainaboard.nlpedia.ai/leaderboard/task-meval/ on the EXPLAINABOARD platform [38], which allows us to interactively understand the strengths, weaknesses, and complementarity of each metric.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
One defining feature of recent NLP models is the use of neural representations trained on raw text, using unsupervised objectives such as language modeling [6,53], or denoising autoencoding [9,32,54]. By learning to predict the words or sentences in natural text, these models simultaneously learn to extract features that not only benefit mainstream NLP tasks such as information extraction [23, 37], question answering [1, 26], text summarization [40, 77] but also have proven effective in development of automatic metrics for evaluation of text generation itself [62, 65]. For example, BERTScore [75] and MoverScore [76] take features extracted by BERT [9] and apply unsupervised matching functions to compare system outputs against references. Other works build supervised frameworks that use the extracted features to learn to rank [56] or regress [62] to human evaluation scores.
|
| 16 |
+
|
| 17 |
+
However, in the context of generation evaluation, one may note that there is a decided disconnect between how models are pre-trained using text generation objectives and how they are used as down-stream feature extractors. This leads to potential under-utilization of the pre-trained model parameters. For example, the output prediction layer is not used at all in this case. This disconnect is particularly striking because of the close connection between the pre-training objectives and the generation tasks we want to evaluate.
|
| 18 |
+
|
| 19 |
+
In this paper, we instead argue for a formulation of evaluation of generated text as a text generation problem, directly evaluating text through the lens of its probability of being generated from or generating other textual inputs and outputs. This is a better match with the underlying pre-training tasks and allows us to more fully take advantage of the parameters learned during the pre-training phase. We solve the modeling problem with a pre-trained sequence-to-sequence (seq2seq) model, specifically BART [32], and devise a metric named BARTSCORE, which has the following characteristics: (1) BARTSCORE is parameter- and data-efficient. Architecturally there are no extra parameters beyond those used in pre-training itself, and it is an unsupervised metric that doesn’t require human judgments to train. (2) BARTSCORE can better support evaluation of generated text from different perspectives (e.g., informativeness, coherence, factuality, $\ S 4$ ) by adjusting the inputs and outputs of the conditional text generation problem, as we demonstrate in $\ S 3 . 2$ . This is in contrast to most previous work, which mostly examines correlation of the devised metrics with output quality from a limited number of perspectives. (3) BARTSCORE can be further enhanced by (i) providing textual prompts that bring the evaluation task closer to the pre-training task, or (ii) updating the underlying model by fine-tuning BART based on downstream generation tasks (e.g., text summarization).
|
| 20 |
+
|
| 21 |
+
Experimentally, we evaluate different variants of BARTSCORE from 7 perspectives on 16 datasets. BARTSCORE achieves the best performance in 16 of 22 test settings against existing top-scoring metrics. Empirical results also show the effectiveness of the prompting strategy supported by BARTSCORE. For example, simply adding the phrase “such as” to the translated text when using BARTSCORE can lead to a $3 \%$ point absolute improvement in correlation on “German-English” machine translation (MT) evaluation. Additional analysis shows that BARTSCORE is more robust when dealing with high-quality texts generated by top-performing systems.
|
| 22 |
+
|
| 23 |
+
# 2 Preliminaries
|
| 24 |
+
|
| 25 |
+
# 2.1 Problem Formulation
|
| 26 |
+
|
| 27 |
+
As stated above, our goal is to assess the quality of generated text [3, 46]. In this work, we focus on conditional text generation (e.g., machine translation), where the goal is to generate a hypothesis $( \boldsymbol { h } = h _ { 1 } , \cdots , h _ { m } )$ based on a given source text $( s = s _ { 1 } , \cdots , s _ { n } )$ . Commonly, one or multiple human-created references $( r = r _ { 1 } , \cdots , r _ { l } )$ are provided to aid this evaluation.
|
| 28 |
+
|
| 29 |
+
# 2.2 Gold-standard Human Evaluation
|
| 30 |
+
|
| 31 |
+
In general, the gold-standard method for evaluating such texts is still human evaluation, where human annotators assess the generated texts’ quality. This evaluation can be done from perspectives, and we list a few common varieties below (all are investigated in $\ S 4$ ):
|
| 32 |
+
|
| 33 |
+
1. Informativeness (INFO): How well the generated hypothesis captures the key ideas of the source text [18].
|
| 34 |
+
2. Relevance (REL): How consistent the generated hypothesis is with respect to the source text [19].
|
| 35 |
+
3. Fluency (FLU): Whether the text has no formatting problems, capitalization errors or obviously ungrammatical sentences (e.g., fragments, missing components) that make the text difficult to read [13].
|
| 36 |
+
4. Coherence (COH): Whether the text builds from sentence to sentence to a coherent body of information about a topic [7].
|
| 37 |
+
5. Factuality (FAC): Whether the generated hypothesis contains only statements entailed by the source text [30].
|
| 38 |
+
6. Semantic Coverage (COV): How many semantic content units from reference texts are covered by the generated hypothesis [49].
|
| 39 |
+
7. Adequacy (ADE): Whether the output conveys the same meaning as the input sentence, and none of the message is lost, added, or distorted [29].
|
| 40 |
+
|
| 41 |
+
Most existing evaluation metrics were designed to cover a small subset of these perspectives. For example, BLEU [50] aims to capture the adequacy and fluency of translations, while ROUGE [36] was designed to match the semantic coverage metric. Some metrics, particularly trainable ones, can perform evaluation from different perspectives but generally require maximizing correlation with each type of judgment separately [8].
|
| 42 |
+
|
| 43 |
+

|
| 44 |
+
Figure 1: Evaluation metrics as different tasks, where $s _ { i }$ , $h _ { i }$ and $r _ { j }$ represent source, hypothesis and reference words respectively.
|
| 45 |
+
|
| 46 |
+
As we describe more in $\ S 4$ , BARTSCORE can evaluate text from the great majority of these perspecFactuality Relevance Factuality Relevance tives, significantly expanding its applicability compared to these metrics.
|
| 47 |
+
|
| 48 |
+
# s r2.3 Evaluation as Different Tasks
|
| 49 |
+
|
| 50 |
+
There is a recent trend that leverages neural models for automated evaluation in different ways, as shown in Fig. 1. We first elaborate on their characteristics by highlighting differences in task formulation and evaluation perspectives.
|
| 51 |
+
|
| 52 |
+
T1: Unsupervised Matching. Unsupervised matching metrics aim to measure the semantic equivalence between the reference and hypothesis by using a token-level matching functions in distributed representation space, such as BERTScore [75], MoverScore [76] or discrete string space like ROUGE [35], BLEU [50], CHRF [52]. Although similar matching functions can be used to assess the quality beyond semantic equivalence (e.g, factuality, a relationship between source text and hypothesis), to our knowledge prior research has not attested to the capability of unsupervised matching methods in this regard; we explore this further in our experiments (Tab. 5).
|
| 53 |
+
|
| 54 |
+
T2: Supervised Regression. Regression-based models introduce a parameterized regression layer, which would be learned in a supervised fashion to accurately predict human judgments. Examples include recent metrics BLEURT [62], COMET [56] and traditional metrics like ${ \bar { S } } ^ { 3 }$ [51], VRM [21].
|
| 55 |
+
|
| 56 |
+
T3: Supervised Ranking. Evaluation can also be conceived as a ranking problem, where the main idea is to learn a scoring function that assigns a higher score to better hypotheses than to worse ones. Examples include COMET [56] and BEER [64], where COMET focuses the machine translation task and relies on human judgments to tune parameters in ranking or regression layers, and BEER combines many simple features in a tunable linear model of MT evaluation metrics.
|
| 57 |
+
|
| 58 |
+
T4: Text Generation. In this work, we formulate evaluating generated text as a text generation task from pre-trained language models. The basic idea is that a high-quality hypothesis will be easily generated based on source or reference text or vice-versa. This has not been covered as extensively in previous work, with one notable exception being PRISM [65]. Our work differs from PRISM in several ways: (i) PRISM formulates evaluation as a paraphrasing task, whose definition that two texts are with the same meaning limits its applicable scenarios, like factuality evaluation in text summarization that takes source documents and generated summaries as input whose semantic space are different. (ii) PRISM trained a model from scratch on parallel data while BARTSCORE is based on open-sourced pre-trained seq2seq models. (iii) BARTSCORE supports prompt-based learning [59, 63] which hasn’t been examined in PRISM.
|
| 59 |
+
|
| 60 |
+
# 3 BARTScore
|
| 61 |
+
|
| 62 |
+
# 3.1 Sequence-to-Sequence Pre-trained Models
|
| 63 |
+
|
| 64 |
+
Although pre-trained models differ along different axes, one of the main axes of variation is the training objective, with two main variants: language modeling objectives (e.g., masked language modeling [9]) and seq2seq objectives [54]. In particular, seq2seq pre-trained models are particularly well-suited to conditioned generation tasks since they consist of both an encoder and a decoder, and predictions are made auto-regressively [32]. In this work, we operationalize our idea by using
|
| 65 |
+
|
| 66 |
+
BART [32] as our backbone due to its superior performance in text generation [12, 42, 71]. We also report preliminary experiments comparing BART with T5 [54] and PEGASUS [74] in the Appendix.
|
| 67 |
+
|
| 68 |
+
Given a seq2seq model parameterized by $\theta$ , a source sequence containing $n$ tokens $\mathbf { x } = \{ x _ { 1 } , \cdots , x _ { n } \}$ and a target sequence containing $m$ tokens $\mathbf { y } = \{ y _ { 1 } , \dots , y _ { m } \}$ . We can factorize the generation probability of $\mathbf { y }$ conditioned on $\mathbf { x }$ as follows:
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
p ( \mathbf { y } | \mathbf { x } , \theta ) = \prod _ { t = 1 } ^ { m } p ( \mathbf { y } _ { t } | \mathbf { y } _ { < t } , \mathbf { x } , \theta )
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
By exploring these probabilities, we design metrics that can gauge the quality of the generated text.
|
| 75 |
+
|
| 76 |
+
# 3.2 BARTScore
|
| 77 |
+
|
| 78 |
+
The most general form of our proposed BARTSCORE is shown in Eq. 2, where we use the weighted log probability of one text y given another text $\mathbf { x }$ . The weights are used to put different emphasis on different tokens, which can be instantiated using different methods like Inverse Document Frequency (IDF) [25] etc. In our work, we weigh each token equally.2
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\mathbf { B A R T S C O R E } = \sum _ { t = 1 } ^ { m } \omega _ { t } \log p ( \mathbf { y } _ { t } | \mathbf { y } _ { < t } , \mathbf { x } , \theta )
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
Due to its generation task-based formulation and ability to utilize the entirety of BART’s pre-trained parameters, BARTSCORE can be flexibly used in different evaluation scenarios. We specifically present four methods for using BARTSCORE based on different generation directions, which are,
|
| 85 |
+
|
| 86 |
+
• Faithfulness $s \to h$ ): from source document to hypothesis $p ( \boldsymbol { h } | \boldsymbol { s } , \boldsymbol { \theta } )$ . This direction measures how likely it is that the hypothesis could be generated based on the source text. Potential application scenarios are factuality and relevance introduced in $\ S 2 . 2$ . This measure can also be used for estimating measures of the quality of only the target text, such as coherence and fluency $( \ S 2 . 2 )$ .
|
| 87 |
+
• Precision $( r h )$ ): from reference text to system-generated text $p ( \boldsymbol { h } | \boldsymbol { r } , \boldsymbol { \theta } )$ . This direction assesses how likely the hypothesis could be constructed based on the gold reference and is suitable for the
|
| 88 |
+
precision-focused scenario.
|
| 89 |
+
• Recall $( h \to r$ ): from system-generated text to reference text $p ( \pmb { r } | \pmb { h } , \theta )$ . This version quantifies how easily a gold reference could be generated by the hypothesis and is suitable for pyramid-based evaluation (i.e., semantic coverage introduced in $\ S 2 . 2$ ) in summarization task since pyramid score measures fine-grained Semantic Content Units (SCUs) [49] covered by system-generated texts.
|
| 90 |
+
• $\mathcal { F }$ score $( r h$ ): Consider both directions and use the arithmetic average of Precision and Recall ones. This version can be broadly used to evaluate the semantic overlap (informativeness, adequacy detailed in $\ S 2 . 2 \AA ,$ ) between reference texts and generated texts.
|
| 91 |
+
|
| 92 |
+
# 3.3 BARTScore Variants
|
| 93 |
+
|
| 94 |
+
We also investigate two extensions to BARTSCORE: (i) changing $\mathbf { x }$ and $\mathbf { y }$ through prompting, which can bring the evaluation task closer to the pre-training task. (ii) changing $\theta$ by considering different fine-tuning tasks, which can bring the pre-training domain closer to the evaluation task.
|
| 95 |
+
|
| 96 |
+
# 3.3.1 Prompt
|
| 97 |
+
|
| 98 |
+
Prompting is a practice of adding short phrases to the input or output to encourage pre-trained models to perform specific tasks, which has been proven effective in several other NLP scenarios [24,57,58,60,63]. The generative formulation of BARTSCORE makes it relatively easy to incorporate these insights here as well; we name this variant BARTSCORE-PROMPT.
|
| 99 |
+
|
| 100 |
+
Given a prompt of $l$ tokens $\mathbf { z } = \{ z _ { 1 } , \cdots , z _ { l } \}$ , we can either (i) append it to the source text, in which case we get $\mathbf { x } ^ { \prime } = \{ x _ { 1 } , \cdot \cdot \cdot , x _ { n } , \dot { z } _ { 1 } , \cdot \cdot \cdot , z _ { l } \}$ , and calculate the score based on this new source text using Eq.2. or (ii) prepend it to the target text, getting $\mathbf { y } ^ { \prime } = \{ z _ { 1 } , \cdot \cdot \cdot , z _ { l } , y _ { 1 } , \cdot \cdot \cdot , y _ { m } \}$ . Then we can also use Eq.2 given the new target text.
|
| 101 |
+
|
| 102 |
+
# 3.3.2 Fine-tuning Task
|
| 103 |
+
|
| 104 |
+
Different from BERT-based metrics, which typically use classification-based tasks (e.g., natural language inference) [67] to fine-tune, BARTSCORE can be fine-tuned using generation-based tasks, which will make the pre-training domain closer to the evaluation task. In this paper, we explore two downstream tasks. (1) Summarization. We use BART fine-tuned on CNNDM dataset [20], which is available off-the-shelf in Huggingface Transformers [70]. (2) Paraphrasing. We continue fine-tuning BART from (1) on ParaBank2 dataset [22], which contains a large paraphrase collection. We used a random subset of 30,000 data and fine-tuned for one epoch with a batch size of 20 and a learning rate of $5 e ^ { - 5 }$ . We used two 2080Ti GPUs, and the training time is less than one hour.
|
| 105 |
+
|
| 106 |
+
# 4 Experiment
|
| 107 |
+
|
| 108 |
+
This section aims to evaluate the reliability of different automated metrics, which is commonly achieved by quantifying how well different metrics correlate with human judgments using measures (e.g., Spearman Correlation [72]) defined below (§4.1.2).
|
| 109 |
+
|
| 110 |
+
# 4.1 Baselines and Datasets
|
| 111 |
+
|
| 112 |
+
# 4.1.1 Evaluation Metrics
|
| 113 |
+
|
| 114 |
+
We comprehensively examine metrics outlined in $\ S 2 . 3$ , which either require human judgments to train (i.e., supervised metrics): COMET [56], BLEURT [62], or are human judgment-free (i.e., unsupervised): BLEU [50] ROUGE-1 and ROUGE-2, ROUGE-L, CHRF [52], PRISM [65], MoverScore [76], BERTScore [75]. The detailed comparisons of those metrics can be found in Appendix. We use the official code for each metric.
|
| 115 |
+
|
| 116 |
+
# 4.1.2 Measures for Meta Evaluation
|
| 117 |
+
|
| 118 |
+
Pearson Correlation [15] measures the linear correlation between two sets of data. Spearman Correlation [72] assesses the monotonic relationships between two variables. Kendall’s Tau [27] measures the ordinal association between two measured quantities. Accuracy, in our experiments, measures the percentage of correct ranking between factual texts and non-factual texts. We follow previous works in the choices of measures for different datasets to make a fair comparison.
|
| 119 |
+
|
| 120 |
+
# 4.1.3 Datasets
|
| 121 |
+
|
| 122 |
+
The datasets we use are summarized in Tab. 1. We consider three different tasks: summarization (SUM), machine translation (MT), and data-to-text (D2T).
|
| 123 |
+
|
| 124 |
+
Machine Translation We obtain the source language sentences, machine-translated texts and reference texts from the WMT19 metrics shared task [44]. We use the DARR corpus and consider 7 language pairs, which are de-en, fi-en, gu-en, kk-en, lt-en, ru-en, zh-en.
|
| 125 |
+
|
| 126 |
+
Text Summarization (1) REALSumm [4] is a metaevaluation dataset for text summarization which measures pyramid recall of each system-generated summary. (2) SummEval [13] is a collection of human judgments of model-generated summaries on the CNNDM dataset annotated by both expert judges and crowd-source workers. Each system generated summary is gauged through the lens of coherence, consistency, fluency and relevance.3 (3) NeR18 The
|
| 127 |
+
|
| 128 |
+
Table 1: A summary of tasks, datasets, and evaluation perspectives that we have covered in our experiments. Explanation of evaluation perspectives can be found in $\ S 2 . 2$ .
|
| 129 |
+
|
| 130 |
+
<table><tr><td>Tasks</td><td>Datasets</td><td>Eval. Perspectives</td></tr><tr><td rowspan="5">SUM</td><td>REALSUM</td><td>Cov</td></tr><tr><td>SummEval</td><td>COH FAC FLU INFO</td></tr><tr><td>NeR18</td><td>COH FLU REL INFO</td></tr><tr><td>Rank19 QAGS-C QAGS-X</td><td>FAC</td></tr><tr><td>DE FI GU KK IT RU ZH</td><td>ADE FLU</td></tr><tr><td>MT D2T</td><td>BAGEL SFHOT SFRES</td><td>INFO</td></tr></table>
|
| 131 |
+
|
| 132 |
+
NEWSROOM dataset [18] contains 60 articles with summaries generated by 7 different methods are annotated with human scores in terms of coherence, fluency, informativeness, relevance.
|
| 133 |
+
|
| 134 |
+
Factuality (1) Rank19 [14] is used to meta-evaluate factuality metrics. It is a collection of 373 triples of a source sentence with two summary sentences, one correct and one incorrect. (2) QAGS20 [66] collected 235 test outputs on CNNDM dataset from [16] and 239 test outputs on XSUM dataset [47] from BART fine-tuned on XSUM. Sentences in each summary are annotated with correctness scores w.r.t. factuality.
|
| 135 |
+
|
| 136 |
+
Data to Text We consider the following datasets which target utterance generation for spoken dialogue systems. (1) BAGEL [45] provides information about restaurants. (2) SFHOT [69] provides information about hotels in San Francisco. (3) SFRES [69] provides information about restaurants in San Francisco. They contain 202, 398, and 581 samples respectively, each sample consists of one meaning representation, multiple references, and utterances generated by different systems.
|
| 137 |
+
|
| 138 |
+
# 4.2 Setup
|
| 139 |
+
|
| 140 |
+
# 4.2.1 Prompt Design
|
| 141 |
+
|
| 142 |
+
To perform prompting, we first need to find proper prompts within a search space. Instead of considering a large discrete search space $[ 6 3 ] ^ { 4 }$ or continuous search space [34], we use simple heuristics to narrow our search space. In particular, we use manually devised seed prompts and gather paraphrases to construct our prompt set.5 The seed prompts and some examples of paraphrased prompts are shown in Tab. 2. Details are listed in the Appendix.
|
| 143 |
+
|
| 144 |
+
Table 2: Seed prompts and examples of final prompts. “Number” denotes the size of our final prompt set that was acquired from the seed prompts.
|
| 145 |
+
|
| 146 |
+
<table><tr><td>Usage</td><td>Number</td><td colspan="3">Seed</td><td colspan="5">Example</td></tr><tr><td>s→h</td><td>70</td><td></td><td>in summary</td><td>in short,</td><td>in</td><td>word, a</td><td></td><td>to</td><td>sum up</td><td></td></tr><tr><td>h←r</td><td>34</td><td>in</td><td>other words</td><td>to</td><td>rephrase it,</td><td></td><td>that is</td><td>to</td><td>say,</td><td>i.e.</td></tr></table>
|
| 147 |
+
|
| 148 |
+
# 4.2.2 Settings
|
| 149 |
+
|
| 150 |
+
Variants. We consider four variants of BARTSCORE, which are (1) BARTSCORE, which uses the vanilla BART; (2) BARTSCORE-CNN, which uses the BART fine-tuned on the summarization dataset CNNDM; (3) BARTSCORE-CNN-PARA, where BART is first fine-tuned on CNNDM, then fine-tuned on ParaBank2. (4) BARTSCORE-PROMPT, which is enhanced by adding prompts.
|
| 151 |
+
|
| 152 |
+
Selection of Prompts. For the summarization and data-to-text tasks, we use all entries (either all prompts designed for $s h$ or all prompts designed for $h r$ depending on the BARTScore usage chosen) in the prompt set by prefixing the decoder input and getting different generation scores (calculated by Eq.2) for each hypothesis based on different prompts. We finally get the score for one hypothesis by taking the average of all its generation scores using different prompts ( [24]; details about prompt ensembling can be found in the Appendix). For the machine translation task, due to the more expensive computational cost brought by larger text sets, we first use WMT18 [43] as a development set to search for one best prompt and obtain the phrase “Such as”, which is then used for the test language pairs.
|
| 153 |
+
|
| 154 |
+
Selection of BARTScore Usage. Although BARTSCORE can be used in different ways (shown in $\ S 3 . 2 )$ ), in different tasks, they can be chosen based on how targeted evaluation perspectives are defined (described in $\ S 2 . 2 \AA$ ) as well as the types of tasks. Specifically, (i) For those datasets whose gold standard human evaluation are obtained based on recall-based pyramid method, we adopt recall-based BARTSCORE $( h \to r$ ). (ii) For those datasets whose human judgments focus on linguistic quality (coherence, fluency) and factual correctness (factuality), or the source and hypothesis texts are in the same modality (i.e., language), we use faithfulness-based BARTSCORE $s h$ ). (iii) For data-to-text and machine translation tasks, to make a fair comparison, we use BARTSCORE with the F-score version that other existing works [65] have adopted when evaluating generated texts.
|
| 155 |
+
|
| 156 |
+
Table 3: Kendall’s Tau correlation of different metrics on WMT19 dataset. The highest correlation for each language pair achieved by unsupervised method is bold, and the highest correlation overall is underlined. Avg. denotes the average correlation achieved by a metric across all language pairs.
|
| 157 |
+
|
| 158 |
+
<table><tr><td></td><td>de-en</td><td>fi-en</td><td> gu-en</td><td>kk-en</td><td>lt-en</td><td>ru-en</td><td>zh-en</td><td>Avg.</td></tr><tr><td>SUPERVISED METHODS</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>BLEURT</td><td>0.174</td><td>0.374</td><td>0.313</td><td>0.372</td><td>0.388</td><td>0.220</td><td>0.436</td><td>0.325</td></tr><tr><td>COMET</td><td>0.219</td><td>0.369</td><td>0.316</td><td>0.378</td><td>0.405</td><td>0.226</td><td>0.462</td><td>0.339</td></tr><tr><td>UNSUPERVISED METHODS</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>BLEU</td><td>0.054</td><td>0.236</td><td>0.194</td><td>0.276</td><td>0.249</td><td>0.115</td><td>0.321</td><td>0.206</td></tr><tr><td>CHRF</td><td>0.123</td><td>0.292</td><td>0.240</td><td>0.323</td><td>0.304</td><td>0.177</td><td>0.371</td><td>0.261</td></tr><tr><td>PRISM</td><td>0.199</td><td>0.366</td><td>0.320</td><td>0.362</td><td>0.382</td><td>0.220</td><td>0.434</td><td>0.326</td></tr><tr><td>BERTScore</td><td>0.190</td><td>0.354</td><td>0.292</td><td>0.351</td><td>0.381</td><td>0.221</td><td>0.430</td><td>0.317</td></tr><tr><td>BARTSCORE</td><td>0.156</td><td>0.335</td><td>0.273</td><td>0.324</td><td>0.322</td><td>0.167</td><td>0.389</td><td>0.281</td></tr><tr><td>+CNN</td><td>0.190</td><td>0.365</td><td>0.300</td><td>0.348</td><td>0.384</td><td>0.208</td><td>0.425</td><td>0.317</td></tr><tr><td>+ CNN+Para</td><td>0.205t</td><td>0.370t</td><td>0.316</td><td>0.378t</td><td>0.386†</td><td>0.219</td><td>_0.442t</td><td>0.331</td></tr><tr><td>+ CNN +Para +Prompt</td><td>0.238</td><td>0.374</td><td>0.318</td><td>0.376t</td><td>0.386+</td><td>0.219</td><td>0.447</td><td>0.337</td></tr></table>
|
| 159 |
+
|
| 160 |
+
Table 4: Spearman correlation of different metrics on three human judgement datasets. For promptbased learning, we consider adding prompts to the best-performing BARTSCORE $( \Omega )$ on each dataset. The highest correlation overall for each aspect on each dataset is bold.
|
| 161 |
+
|
| 162 |
+
<table><tr><td rowspan="2"></td><td>REALSumm</td><td colspan="4">SummEval</td><td colspan="4">NeR18</td><td rowspan="2">Avg.</td></tr><tr><td>Cov</td><td>COH</td><td>FAC</td><td>FLU</td><td>INFO</td><td>COH</td><td>FLU</td><td>INFO</td><td>REL</td></tr><tr><td>ROUGE-1</td><td>0.498</td><td>0.167</td><td>0.160</td><td>0.115</td><td>0.326</td><td>0.095</td><td>0.104</td><td>0.130</td><td>0.147</td><td>0.194</td></tr><tr><td>ROUGE-2</td><td>0.423</td><td>0.184</td><td>0.187</td><td>0.159</td><td>0.290</td><td>0.026</td><td>0.048</td><td>0.079</td><td>0.091</td><td>0.165</td></tr><tr><td>ROUGE-L</td><td>0.488</td><td>0.128</td><td>0.115</td><td>0.105</td><td>0.311</td><td>0.064</td><td>0.072</td><td>0.089</td><td>0.106</td><td>0.164</td></tr><tr><td>BERTScore</td><td>0.440</td><td>0.284</td><td>0.110</td><td>0.193</td><td>0.312</td><td>0.147</td><td>0.170</td><td>0.131</td><td>0.163</td><td>0.217</td></tr><tr><td>MoverScore</td><td>0.372</td><td>0.159</td><td>0.157</td><td>0.129</td><td>0.318</td><td>0.161</td><td>0.120</td><td>0.188</td><td>0.195</td><td>0.200</td></tr><tr><td>PRISM</td><td>0.411</td><td>0.249</td><td>0.345</td><td>0.254</td><td>0.212</td><td>0.573</td><td>0.532</td><td>0.561</td><td>0.553</td><td>0.410</td></tr><tr><td>BARTSCORE</td><td>0.441</td><td>0.322†</td><td>0.311</td><td>0.248</td><td>0.264</td><td>0.679†</td><td>0.670t</td><td>0.646†</td><td>0.604t</td><td>0.465</td></tr><tr><td>+ CNN</td><td>0.475</td><td>0.448‡</td><td>0.382†</td><td>0.356t</td><td>0.356t</td><td>0.653†</td><td>0.640t</td><td>0.616†</td><td>0.567</td><td>0.499</td></tr><tr><td>+ CNN+Para</td><td>0.471</td><td>0.424†</td><td>0.401‡</td><td>0.378t</td><td>0.313</td><td>0.657t</td><td>0.652t</td><td>0.614†</td><td>0.562</td><td>0.497</td></tr><tr><td>+Ω+Prompt</td><td>0.488</td><td>0.407</td><td>0.378</td><td>0.338f</td><td>0.368f</td><td>0.701t</td><td>0.679t</td><td>0.686t</td><td>0.620</td><td>0.518</td></tr></table>
|
| 163 |
+
|
| 164 |
+
Significance Tests. To perform rigorous analysis, we adopt the bootstrapping method (p-value $<$ 0.05) [28] for pair-wise significance tests. In all tables, we use $\dagger$ on BARTSCORE if it significantly $( p < 0 . 0 5 )$ outperforms other unsupervised metrics excluding BARTSCORE variants. We use $\ddagger$ on BARTSCORE if it significantly outperforms all other unsupervised metrics including BARTSCORE variants.
|
| 165 |
+
|
| 166 |
+
# 4.3 Experimental Results
|
| 167 |
+
|
| 168 |
+
# 4.3.1 Machine Translation
|
| 169 |
+
|
| 170 |
+
Tab. 3 illustrates Kendall’s Tau correlation of diverse metrics on different language pairs. We can observe that: (1) BARTSCORE enhanced by fine-tuning tasks $\left( \mathrm { C N N + P a r a } \right)$ can significantly outperform all other unsupervised methods on five language pairs and achieve comparable results on the other two. (2) The performance of BARTSCORE can be further improved by simply adding a prompt (i.e., such as) without any other overhead. Notably, on the language pair ${ \tt d e } \mathrm { - } \in \mathrm { n }$ , using the prompt results in a 0.033 improvement, which even significantly surpasses existing state-of-the-art supervised metrics BLEURT and COMET. This suggests a promising future direction for metric design: searching for proper prompts to better leverage knowledge stored in pre-trained language models instead of training on human judgment data [31].
|
| 171 |
+
|
| 172 |
+
# 4.3.2 Text Summarization
|
| 173 |
+
|
| 174 |
+
Tab. 4 shows the meta-evaluation results of different metrics on the summarization task. We can observe that: (1) Simply vanilla BARTSCORE can outperform BERTScore and MoverScore by a large margin on 8 settings except the INFO perspective on SummEval. Strikingly, it achieves improvements of 0.251 and 0.265 over BERTScore and MoverScore respectively. (2) The improvement on REALSum and SummEval datasets can be further improved when introducing fine-tuning tasks. However, fine-tuning does not improve on the NeR18 dataset, likely because this dataset only contains 7 systems with easily distinguishable quality, and vanilla BARTSCORE can already achieve a high level of correlation $( > 0 . 6$ on average). (3) Our prompt combination strategy can consistently improve the performance on informativeness, up to 0.072 Spearman correlation on the NeR18 dataset and 0.055 on SummEval. However, the performance from other perspectives such as fluency and factuality do not show consistent improvements, which we will elaborate on later (§4.4.2).
|
| 175 |
+
|
| 176 |
+
Analysis on Factuality Datasets The goal of these datasets is to judge whether a short generated summary is faithful to the original long documents. As shown in Tab. 5, we observe that (1) BARTSCORE $+ \thinspace C N N$ can almost match human baseline on Rank19 and outperform all other metrics, including the most recent top-performing factuality metrics FactCC and QAGS by a large margin. (2) Using paraphrase as a fine-tuning task will reduce BARTSCORE’s performance, which is reasonable since these two texts (i.e., the summary and document) shouldn’t maintain the paraphrased relationship in general. (3) Introducing prompts does not bring an improvement, even resulting in a performance decrease.
|
| 177 |
+
|
| 178 |
+
Table 5: Results on Rank19 and QAGS datasets. where “Q” represents QAGS. Metrics achieve highest correlation are bold.
|
| 179 |
+
|
| 180 |
+
<table><tr><td></td><td colspan="2">Rank19 Q-CNN</td><td>Q-XSUM</td></tr><tr><td></td><td>Acc.</td><td colspan="2">Pearson</td></tr><tr><td>ROUGE-1</td><td>0.568</td><td>0.338</td><td>-0.008</td></tr><tr><td>ROUGE-2</td><td>0.630</td><td>0.459</td><td>0.097</td></tr><tr><td>ROUGE-L</td><td>0.587</td><td>0.357</td><td>0.024</td></tr><tr><td>BERTScore</td><td>0.713</td><td>0.576</td><td>0.024</td></tr><tr><td>MoverScore</td><td>0.713</td><td>0.414</td><td>0.054</td></tr><tr><td>PRISM</td><td>0.780</td><td>0.479</td><td>0.025</td></tr><tr><td>FactCC [30] QAGS [66]</td><td>0.700 0.721</td><td>1 0.545</td><td>1 0.175</td></tr><tr><td>Human [14] BARTSCORE</td><td>0.839</td><td>1</td><td>1 0.009</td></tr><tr><td>+CNN</td><td>0.684 0.836‡</td><td>0.661† 0.735±</td><td>0.184‡</td></tr><tr><td>+ CNN+Para</td><td></td><td>0.680t</td><td>0.074</td></tr><tr><td></td><td>0.788</td><td></td><td></td></tr><tr><td>+CNN +Prompt</td><td>70.796</td><td>0.719f</td><td>0.094</td></tr></table>
|
| 181 |
+
|
| 182 |
+
# 4.3.3 Data-to-text
|
| 183 |
+
|
| 184 |
+
The experiment results on data-to-text datasets are shown in Tab. 6. We observe that (1) finetuning on the CNNDM dataset can consistently boost the correlation, for example, up to 0.056 gain on BAGEL. (2) Additionally, further finetuning on paraphrase datasets results in even higher performance compared to the version without any fine-tuning, up to 0.083 Spearman correlation on BAGEL dataset. These results surpass all existing top-performing metrics. (3) Our proposed prompt combination strategy can consistently improve correlation, on average 0.028 Spearman correlation. This is consistent with the findings in $\ S 4 . 3 . 2$ that we can improve the aspect of informativeness through proper prompting.
|
| 185 |
+
|
| 186 |
+
Table 6: Results on data-to-text datasets. We report Spearman correlation. Metrics achieve highest correlation are bold.
|
| 187 |
+
|
| 188 |
+
<table><tr><td></td><td>BAGEL</td><td>SFRES</td><td>SFHOT</td><td>Avg.</td></tr><tr><td>ROUGE-1</td><td>0.234</td><td>0.115</td><td>0.118</td><td>0.156</td></tr><tr><td>ROUGE-2</td><td>0.199</td><td>0.116</td><td>0.088</td><td>0.134</td></tr><tr><td>ROUGE-L</td><td>0.189</td><td>0.103</td><td>0.110</td><td>0.134</td></tr><tr><td>BERTScore</td><td>0.289</td><td>0.156</td><td>0.135</td><td>0.193</td></tr><tr><td>MoverScore</td><td>0.284</td><td>0.153</td><td>0.172</td><td>0.203</td></tr><tr><td>PRISM</td><td>0.305</td><td>0.155</td><td>0.196</td><td>0.219</td></tr><tr><td>BARTSCORE</td><td>0.247</td><td>0.164†</td><td>0.158</td><td>0.190</td></tr><tr><td>+ CNN</td><td>0.303</td><td>0.191†</td><td>0.190</td><td>0.228</td></tr><tr><td>+ CNN+Para</td><td>0.330t</td><td>0.185t</td><td>0.211†</td><td>0.242</td></tr><tr><td>+Ω+Prompt</td><td>0.336</td><td>0.238t</td><td>0.235t</td><td>0.270</td></tr></table>
|
| 189 |
+
|
| 190 |
+
# 4.4 Analysis
|
| 191 |
+
|
| 192 |
+
We design experiments to better understand the mechanism by which BARTSCORE obtains these promising results, specifically asking three questions: Q1: Compared to other unsupervised metrics, where does BARTSCORE outperform them? Q2: How does adding prompts benefit evaluation? Q3: Will BARTScore introduce biases in unpredictable ways?
|
| 193 |
+
|
| 194 |
+

|
| 195 |
+
Figure 2: Fine-grained analysis (a,b) and prompt analysis (c). In (a, b), BE, PR, BL, CO, BA represent BERTScore, PRISM, BLEURT, COMET and BARTSCORE respectively. In (c), SEM, LIN, FAC denote semantic overlap, linguistic quality and factual correctness respectively.
|
| 196 |
+
|
| 197 |
+
# 4.4.1 Fine-grained Analysis
|
| 198 |
+
|
| 199 |
+
To answer Q1, we choose the MT task and break down the performance of each metric into different buckets based on different axes.
|
| 200 |
+
|
| 201 |
+
Top-k Systems We report the average correlation across all language pairs achieved by each metric given only translations from top- $k$ systems. We vary the number of $k$ , and the results are shown in Fig. 2-(a). We can see that BARTSCORE can outperform all other metrics (including one supervised metric BLEURT) except the existing state-of-the-art supervised metric COMET for different $k$ , and the decrease in correlation becomes smoother than others when considering top-scoring systems. This indicates that BARTSCORE is robust to high-quality generated texts.
|
| 202 |
+
|
| 203 |
+
Reference Length We break down each test set into four buckets based on the reference length, which are [15, 25), [25, 35), [35, 45), [45, 54] and compute the Kendall’s Tau average correlation of different metrics across all language pairs within each bucket.6 The results are shown in Fig. 2-(b). We observe that BARTSCORE can outperform or tie with other unsupervised metrics over different reference lengths. Also, its correlation with human judgments is more stable compared to all other metrics. This indicates its robustness to different input lengths. More other analyses can be found in Appendix.
|
| 204 |
+
|
| 205 |
+
# 4.4.2 Prompt Analysis
|
| 206 |
+
|
| 207 |
+
For Q2, we choose the summarization and data-to-text tasks for analysis where we used all prompts from our prompt set. We first group all the evaluation perspectives into three categories: (1) semantic overlap (informativeness, pyramid score, and relevance) (2) linguistic quality (fluency, coherence) (3) factual correctness (factuality). We then calculate the percentage of prompts that result in performance improvements for each perspective within a dataset. Finally, we compute the average percentage of prompts that can lead to performance gains for each category. The results are shown in Tab. 2-(c). We can see that for semantic overlap, almost all prompts can lead to the performance increase, while for factuality only a few prompts can improve the performance. This also explains the results in $\ S 4 . 3 . 2$ where we found that combining the results of different prompts can lead to consistent increases in semantic overlap but worse performance in factuality. Regarding linguistic quality, the effect of adding a prompt is not that predictive, which is also consistent with our findings in $\ S 4 . 3 . 2$ .
|
| 208 |
+
|
| 209 |
+
# 4.4.3 Bias Analysis
|
| 210 |
+
|
| 211 |
+
To answer Q3, we conduct bias analysis. Bias would indicate that the scores are too high or too low compared to the scores they are given by human annotators. Therefore, to see whether such biases exist, we inspected the rank differences given by human annotators and BARTScore (fine-tuned on CNNDM dataset) on the REALSumm dataset where 24 systems are considered, including both abstractive models and extractive models as well as models based on pre-trained models and models that are trained from scratch. We list all the systems below. And the resulting rank difference is shown in Fig. 3.
|
| 212 |
+
|
| 213 |
+

|
| 214 |
+
Figure 3: Bias analysis of BARTScore. The “Rank Difference" is the rank obtained using human judgements minus the rank got from BARTScore. Systems beginning with letter “E" are extractive systems while systems beginning with letter “A" are abstractive systems.
|
| 215 |
+
|
| 216 |
+
Extractive Systems E1: BanditSum [11]; E2: Refresh [48]; E3: NeuSum [80]; E4: LSTMPN-RL [79]; E5: BERT-TF-SL [79]; E6: BERT-TF-PN [79]; E7: BERT-LSTM-PN-RL [79]; E8: BERT-LSTM-PN [79]; E9: HeterGraph [68]; E10: MatchSum [78].
|
| 217 |
+
|
| 218 |
+
Abstractive Systems A1: Ptr-Gen [61]; A2: Bottom-up [17]; A3: Fast-Abs-RL [5]; A4: Two-stageRL [73]; A5: BERT-Ext-Abs [41]; A6: BERT-Abs [41]; A7: Trans-Abs [41]; A8: UniLM-1 [10]; A9: UniLM-2 [2]; A10: T5-base [55]; A11: T5-large [55]; A12: T5-11B [55]; A13: BART [33]; A14: SemSim [42].
|
| 219 |
+
|
| 220 |
+
As shown in Fig. 3, BARTScore is less effective at distinguishing the quality of extractive summarization systems while much better at distinguishing the quality of abstractive summarization systems. However, given that there is a trend for using abstractive systems as more and more pre-trained sequence-to-sequence models being proposed, BARTScore’s weaknesses on extractive systems will be mitigated.
|
| 221 |
+
|
| 222 |
+
# 5 Implications and Future Directions
|
| 223 |
+
|
| 224 |
+
In this paper, we proposed a metric BARTSCORE that formulates evaluation of generated text as a text generation task, and empirically demonstrated its efficacy. Without the supervision of human judgments, BARTSCORE can effectively evaluate texts from 7 perspectives and achieve the best performance on 16 of 22 settings against existing top-scoring metrics. We highlight potential future directions based on what we have learned.
|
| 225 |
+
|
| 226 |
+
Prompt-augmented metrics As an easy-to-use but powerful method, prompting [39] has achieved impressive performance particularly on semantic overlap-based evaluation perspectives. However, its effectiveness in factuality and linguistic quality-based perspectives has not been fully demonstrated in this paper. In the future, more works can explore how to make better use of prompts for these and other evaluation scenarios.
|
| 227 |
+
|
| 228 |
+
Co-evolving evaluation metrics and systems BARTSCORE builds the connection between metric design and system design, which allows them to share their technological advances, thereby progressing together. For example, a better BART-based summarization system may be directly used as a more reliable automated metric for evaluating summaries, and this work makes them connected.
|
| 229 |
+
|
| 230 |
+
# Acknowledgments
|
| 231 |
+
|
| 232 |
+
The authors would like to thank the anonymous reviewers for their insightful comments and suggestions. The authors also thank Wei Zhao for assisting with reproducing baseline results. This work was supported by the Air Force Research Laboratory under agreement number FA8750-19-2-0200. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. The views and conclusions contained herein are those of the authors and should not be interpreted as necessarily representing the official policies or endorsements, either expressed or implied, of the Air Force Research Laboratory or the U.S. Government.
|
| 233 |
+
|
| 234 |
+
References
|
| 235 |
+
[1] Akari Asai, Kazuma Hashimoto, Hannaneh Hajishirzi, Richard Socher, and Caiming Xiong. Learning to retrieve reasoning paths over wikipedia graph for question answering. arXiv preprint arXiv:1911.10470, 2019.
|
| 236 |
+
[2] Hangbo Bao, Li Dong, Furu Wei, Wenhui Wang, Nan Yang, Xiaodong Liu, Yu Wang, Jianfeng Gao, Songhao Piao, Ming Zhou, and Hsiao-Wuen Hon. Unilmv2: Pseudo-masked language models for unified language model pre-training. In Proceedings of the 37th International Conference on Machine Learning, ICML 2020, 13-18 July 2020, Virtual Event, volume 119 of Proceedings of Machine Learning Research, pages 642–652. PMLR, 2020.
|
| 237 |
+
[3] Manik Bhandari, Pranav Narayan Gour, Atabak Ashfaq, and Pengfei Liu. Metrics also disagree in the low scoring range: Revisiting summarization evaluation metrics. In Proceedings of the 28th International Conference on Computational Linguistics, pages 5702–5711, Barcelona, Spain (Online), December 2020. International Committee on Computational Linguistics.
|
| 238 |
+
[4] Manik Bhandari, Pranav Narayan Gour, Atabak Ashfaq, Pengfei Liu, and Graham Neubig. Re-evaluating evaluation in text summarization. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 9347–9359, Online, November 2020. Association for Computational Linguistics.
|
| 239 |
+
[5] Yen-Chun Chen and Mohit Bansal. Fast abstractive summarization with reinforce-selected sentence rewriting. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 675–686, Melbourne, Australia, July 2018. Association for Computational Linguistics.
|
| 240 |
+
[6] Andrew M Dai and Quoc V Le. Semi-supervised sequence learning. In C. Cortes, N. Lawrence, D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems, volume 28. Curran Associates, Inc., 2015.
|
| 241 |
+
[7] Hoa Trang Dang. Overview of duc 2005. In Proceedings of the document understanding conference, volume 2005, pages 1–12, 2005.
|
| 242 |
+
[8] Michael Denkowski and Alon Lavie. Extending the METEOR machine translation evaluation metric to the phrase level. In Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics, pages 250–253, Los Angeles, California, June 2010. Association for Computational Linguistics.
|
| 243 |
+
[9] 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, 2019.
|
| 244 |
+
[10] Li Dong, Nan Yang, Wenhui Wang, Furu Wei, Xiaodong Liu, Yu Wang, Jianfeng Gao, Ming Zhou, and Hsiao-Wuen Hon. Unified language model pre-training for natural language understanding and generation. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d’Alché-Buc, Emily B. Fox, and Roman Garnett, editors, Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 13042–13054, 2019.
|
| 245 |
+
[11] Yue Dong, Yikang Shen, Eric Crawford, Herke van Hoof, and Jackie Chi Kit Cheung. BanditSum: Extractive summarization as a contextual bandit. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 3739–3748, Brussels, Belgium, October-November 2018. Association for Computational Linguistics.
|
| 246 |
+
[12] Zi-Yi Dou, Pengfei Liu, Hiroaki Hayashi, Zhengbao Jiang, and Graham Neubig. GSum: A general framework for guided neural abstractive summarization. In Meeting of the North American Chapter of the Association for Computational Linguistics (NAACL), Mexico City, June 2021.
|
| 247 |
+
[13] A. R. Fabbri, Wojciech Kryscinski, Bryan McCann, R. Socher, and Dragomir Radev. Summeval: Re-evaluating summarization evaluation. Trans. Assoc. Comput. Linguistics, 9:391–409, 2021.
|
| 248 |
+
[14] Tobias Falke, Leonardo FR Ribeiro, Prasetya Ajie Utama, Ido Dagan, and Iryna Gurevych. Ranking generated summaries by correctness: An interesting but challenging application for natural language inference. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 2214–2220, 2019.
|
| 249 |
+
[15] David Freedman, Robert Pisani, and Roger Purves. Statistics (international student edition). Pisani, R. Purves, 4th edn. WW Norton & Company, New York, 2007.
|
| 250 |
+
[16] Sebastian Gehrmann, Yuntian Deng, and Alexander Rush. Bottom-up abstractive summarization. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4098–4109, 2018.
|
| 251 |
+
[17] Sebastian Gehrmann, Yuntian Deng, and Alexander Rush. Bottom-up abstractive summarization. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 4098–4109, Brussels, Belgium, October-November 2018. Association for Computational Linguistics.
|
| 252 |
+
[18] Max Grusky, Mor Naaman, and Yoav Artzi. Newsroom: A dataset of 1.3 million summaries with diverse extractive strategies. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 708–719, New Orleans, Louisiana, June 2018. Association for Computational Linguistics.
|
| 253 |
+
[19] Max Grusky, Mor Naaman, and Yoav Artzi. Newsroom: A dataset of 1.3 million summaries with diverse extractive strategies. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), volume 1, pages 708–719, 2018.
|
| 254 |
+
[20] K. Hermann, Tomás Kociský, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and P. Blunsom. Teaching machines to read and comprehend. In NIPS, 2015.
|
| 255 |
+
[21] Tsutomu Hirao, Manabu Okumura, Norihito Yasuda, and Hideki Isozaki. Supervised automatic evaluation for summarization with voted regression model. Information Processing & Management, 43(6):1521–1535, 2007.
|
| 256 |
+
[22] J. Edward Hu, Abhinav Singh, Nils Holzenberger, Matt Post, and Benjamin Van Durme. Largescale, diverse, paraphrastic bitexts via sampling and clustering. In Proceedings of the $2 3 r d$ Conference on Computational Natural Language Learning (CoNLL), pages 44–54, Hong Kong, China, November 2019. Association for Computational Linguistics.
|
| 257 |
+
[23] Sarthak Jain, Madeleine van Zuylen, Hannaneh Hajishirzi, and Iz Beltagy. Scirex: A challenge dataset for document-level information extraction. arXiv preprint arXiv:2005.00512, 2020.
|
| 258 |
+
[24] Zhengbao Jiang, Frank F. Xu, Jun Araki, and Graham Neubig. How can we know what language models know? Transactions of the Association for Computational Linguistics, 8:423–438, 2020.
|
| 259 |
+
[25] Karen Sparck Jones. A statistical interpretation of term specificity and its application in retrieval. Journal of documentation, 1972.
|
| 260 |
+
[26] Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, ˘ Danqi Chen, and Wen-tau Yih. Dense passage retrieval for open-domain question answering. arXiv preprint arXiv:2004.04906, 2020.
|
| 261 |
+
[27] M. G. Kendall. A new measure of rank correlation. Biometrika, 30(1/2):81–93, 1938.
|
| 262 |
+
[28] Philipp Koehn. Statistical significance tests for machine translation evaluation. In Proceedings of the 2004 Conference on Empirical Methods in Natural Language Processing, pages 388–395, Barcelona, Spain, July 2004. Association for Computational Linguistics.
|
| 263 |
+
[29] Philipp Koehn. Statistical machine translation. Cambridge University Press, 2009.
|
| 264 |
+
[30] Wojciech Kryscinski, Bryan McCann, Caiming Xiong, and Richard Socher. Evaluating the factual consistency of abstractive text summarization. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 9332–9346, Online, November 2020. Association for Computational Linguistics.
|
| 265 |
+
[31] Teven Le Scao and Alexander Rush. How many data points is a prompt worth? In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2627–2636, Online, June 2021. Association for Computational Linguistics.
|
| 266 |
+
[32] Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Ves Stoyanov, and Luke Zettlemoyer. Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv preprint arXiv:1910.13461, 2019.
|
| 267 |
+
[33] Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. BART: Denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7871–7880, Online, July 2020. Association for Computational Linguistics.
|
| 268 |
+
[34] Xiang Lisa Li and Percy Liang. Prefix-tuning: Optimizing continuous prompts for generation. ArXiv, abs/2101.00190, 2021.
|
| 269 |
+
[35] Chin-Yew Lin. Rouge: A package for automatic evaluation of summaries. Text Summarization Branches Out, 2004.
|
| 270 |
+
[36] Chin-Yew Lin and Eduard Hovy. Automatic evaluation of summaries using n-gram cooccurrence statistics. In Proceedings of the 2003 Human Language Technology Conference of the North American Chapter of the Association for Computational Linguistics, pages 150–157, 2003.
|
| 271 |
+
[37] Ying Lin, Heng Ji, Fei Huang, and Lingfei Wu. A joint neural model for information extraction with global features. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7999–8009, 2020.
|
| 272 |
+
[38] Pengfei Liu, Jinlan Fu, Yang Xiao, Weizhe Yuan, Shuaicheng Chang, Junqi Dai, Yixin Liu, Zihuiwen Ye, and Graham Neubig. Explainaboard: An explainable leaderboard for nlp. arXiv preprint arXiv:2104.06387, 2021.
|
| 273 |
+
[39] 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, 2021.
|
| 274 |
+
[40] Yang Liu and Mirella Lapata. Text summarization with pretrained encoders. arXiv preprint arXiv:1908.08345, 2019.
|
| 275 |
+
[41] Yang Liu and Mirella Lapata. Text summarization with pretrained encoders. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 3730–3740, Hong Kong, China, November 2019. Association for Computational Linguistics.
|
| 276 |
+
[42] Yixin Liu and Pengfei Liu. Simcls: A simple framework for contrastive learning of abstractive summarization. arXiv preprint arXiv:2106.01890, 2021.
|
| 277 |
+
[43] Qingsong Ma, Ondˇrej Bojar, and Yvette Graham. Results of the WMT18 metrics shared task: Both characters and embeddings achieve good performance. In Proceedings of the Third Conference on Machine Translation: Shared Task Papers, pages 671–688, Belgium, Brussels, October 2018. Association for Computational Linguistics.
|
| 278 |
+
[44] Qingsong Ma, Johnny Wei, Ondˇrej Bojar, and Yvette Graham. Results of the WMT19 metrics shared task: Segment-level and strong MT systems pose big challenges. In Proceedings of the Fourth Conference on Machine Translation (Volume 2: Shared Task Papers, Day 1), pages 62–90, Florence, Italy, August 2019. Association for Computational Linguistics.
|
| 279 |
+
[45] François Mairesse, Milica Gasic, Filip Jurcicek, Simon Keizer, Blaise Thomson, Kai Yu, and Steve Young. Phrase-based statistical language generation using graphical models and active learning. In Proceedings of the 48th Annual Meeting of the Association for Computational Linguistics, pages 1552–1561, 2010.
|
| 280 |
+
[46] Nitika Mathur, Timothy Baldwin, and Trevor Cohn. Tangled up in BLEU: Reevaluating the evaluation of automatic machine translation evaluation metrics. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 4984–4997, Online, July 2020. Association for Computational Linguistics.
|
| 281 |
+
[47] Shashi Narayan, Shay B Cohen, and Mirella Lapata. Don’t give me the details, just the summary! topic-aware convolutional neural networks for extreme summarization. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pages 1797–1807, 2018.
|
| 282 |
+
[48] Shashi Narayan, Shay B. Cohen, and Mirella Lapata. Ranking sentences for extractive summarization with reinforcement learning. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pages 1747–1759, New Orleans, Louisiana, June 2018. Association for Computational Linguistics.
|
| 283 |
+
[49] Ani Nenkova and Rebecca Passonneau. Evaluating content selection in summarization: The pyramid method. In Proceedings of the Human Language Technology Conference of the North American Chapter of the Association for Computational Linguistics: HLT-NAACL 2004, pages 145–152, Boston, Massachusetts, USA, May 2 - May 7 2004. Association for Computational Linguistics.
|
| 284 |
+
[50] Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. Bleu: a method for automatic evaluation of machine translation. In Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics, pages 311–318, Philadelphia, Pennsylvania, USA, July 2002. Association for Computational Linguistics.
|
| 285 |
+
[51] Maxime Peyrard, Teresa Botschen, and Iryna Gurevych. Learning to score system summaries for better content selection evaluation. In Proceedings of the Workshop on New Frontiers in Summarization, pages 74–84, Copenhagen, Denmark, September 2017. Association for Computational Linguistics.
|
| 286 |
+
[52] Maja Popovic. chrF: character n-gram F-score for automatic MT evaluation. In ´ Proceedings of the Tenth Workshop on Statistical Machine Translation, pages 392–395, Lisbon, Portugal, September 2015. Association for Computational Linguistics.
|
| 287 |
+
[53] Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. OpenAI blog, 1(8):9, 2019.
|
| 288 |
+
[54] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. Journal of Machine Learning Research, 21(140):1–67, 2020.
|
| 289 |
+
[55] Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, and Peter J. Liu. Exploring the limits of transfer learning with a unified text-to-text transformer. J. Mach. Learn. Res., 21:140:1–140:67, 2020.
|
| 290 |
+
[56] Ricardo Rei, Craig Stewart, Ana C Farinha, and Alon Lavie. COMET: A neural framework for MT evaluation. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2685–2702, Online, November 2020. Association for Computational Linguistics.
|
| 291 |
+
[57] Laria Reynolds and Kyle McDonell. Prompt programming for large language models: Beyond the few-shot paradigm. In Extended Abstracts of the 2021 CHI Conference on Human Factors in Computing Systems, pages 1–7, 2021.
|
| 292 |
+
[58] Timo Schick and Hinrich Schütze. Exploiting cloze questions for few-shot text classification and natural language inference. arXiv preprint arXiv:2001.07676, 2020.
|
| 293 |
+
[59] Timo Schick and Hinrich Schütze. Few-shot text generation with pattern-exploiting training. arXiv preprint arXiv:2012.11926, 2020.
|
| 294 |
+
[60] Timo Schick and Hinrich Schütze. It’s not just size that matters: Small language models are also few-shot learners. arXiv preprint arXiv:2009.07118, 2020.
|
| 295 |
+
[61] Abigail See, Peter J. Liu, and Christopher D. Manning. Get to the point: Summarization with pointer-generator networks. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 1073–1083, Vancouver, Canada, July 2017. Association for Computational Linguistics.
|
| 296 |
+
[62] Thibault Sellam, Dipanjan Das, and Ankur Parikh. BLEURT: Learning robust metrics for text generation. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 7881–7892, Online, July 2020. Association for Computational Linguistics.
|
| 297 |
+
[63] 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.
|
| 298 |
+
[64] Miloš Stanojevic and Khalil Sima’an. BEER: BEtter evaluation as ranking. In ´ Proceedings of the Ninth Workshop on Statistical Machine Translation, pages 414–419, Baltimore, Maryland, USA, June 2014. Association for Computational Linguistics.
|
| 299 |
+
[65] Brian Thompson and Matt Post. Automatic machine translation evaluation in many languages via zero-shot paraphrasing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 90–121, Online, November 2020. Association for Computational Linguistics.
|
| 300 |
+
[66] Alex Wang, Kyunghyun Cho, and M. Lewis. Asking and answering questions to evaluate the factual consistency of summaries. In ACL, 2020.
|
| 301 |
+
[67] Alex Wang, Amanpreet Singh, Julian Michael, Felix Hill, Omer Levy, and Samuel Bowman. GLUE: A multi-task benchmark and analysis platform for natural language understanding. In Proceedings of the 2018 EMNLP Workshop BlackboxNLP: Analyzing and Interpreting Neural Networks for NLP, pages 353–355, Brussels, Belgium, November 2018. Association for Computational Linguistics.
|
| 302 |
+
[68] Danqing Wang, Pengfei Liu, Yining Zheng, Xipeng Qiu, and Xuanjing Huang. Heterogeneous graph neural networks for extractive document summarization. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6209–6219, Online, July 2020. Association for Computational Linguistics.
|
| 303 |
+
[69] Tsung-Hsien Wen, Milica Gasic, Nikola Mrksic, Pei-Hao Su, David Vandyke, and Steve Young. Semantically conditioned lstm-based natural language generation for spoken dialogue systems. arXiv preprint arXiv:1508.01745, 2015.
|
| 304 |
+
[70] Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Clement Delangue, Anthony Moi, Pierric Cistac, Tim Rault, Remi Louf, Morgan Funtowicz, Joe Davison, Sam Shleifer, Patrick von Platen, Clara Ma, Yacine Jernite, Julien Plu, Canwen Xu, Teven Le Scao, Sylvain Gugger, Mariama Drame, Quentin Lhoest, and Alexander Rush. Transformers: State-of-the-art natural language processing. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations, pages 38–45, Online, October 2020. Association for Computational Linguistics.
|
| 305 |
+
[71] Weizhe Yuan, Pengfei Liu, and Graham Neubig. Can we automate scientific reviewing? arXiv preprint arXiv:2102.00176, 2021.
|
| 306 |
+
[72] Jerrold H Zar. Spearman rank correlation. Encyclopedia of Biostatistics, 7, 2005.
|
| 307 |
+
[73] Haoyu Zhang, Jingjing Cai, Jianjun Xu, and Ji Wang. Pretraining-based natural language generation for text summarization. In Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL), pages 789–797, Hong Kong, China, November 2019. Association for Computational Linguistics.
|
| 308 |
+
[74] Jingqing Zhang, Yao Zhao, Mohammad Saleh, and Peter Liu. Pegasus: Pre-training with extracted gap-sentences for abstractive summarization. In International Conference on Machine Learning, pages 11328–11339. PMLR, 2020.
|
| 309 |
+
[75] Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger, and Yoav Artzi. Bertscore: Evaluating text generation with bert. In International Conference on Learning Representations, 2020.
|
| 310 |
+
[76] Wei Zhao, Maxime Peyrard, Fei Liu, Yang Gao, Christian M. Meyer, and Steffen Eger. MoverScore: Text generation evaluating with contextualized embeddings and earth mover distance. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pages 563–578, Hong Kong, China, November 2019. Association for Computational Linguistics.
|
| 311 |
+
[77] Ming Zhong, Pengfei Liu, Yiran Chen, Danqing Wang, Xipeng Qiu, and Xuanjing Huang. Extractive summarization as text matching. arXiv preprint arXiv:2004.08795, 2020.
|
| 312 |
+
[78] Ming Zhong, Pengfei Liu, Yiran Chen, Danqing Wang, Xipeng Qiu, and Xuanjing Huang. Extractive summarization as text matching. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pages 6197–6208, Online, July 2020. Association for Computational Linguistics.
|
| 313 |
+
[79] Ming Zhong, Pengfei Liu, Danqing Wang, Xipeng Qiu, and Xuanjing Huang. Searching for effective neural extractive summarization: What works and what’s next. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pages 1049–1058, Florence, Italy, July 2019. Association for Computational Linguistics.
|
| 314 |
+
[80] Qingyu Zhou, Nan Yang, Furu Wei, Shaohan Huang, Ming Zhou, and Tiejun Zhao. Neural document summarization by jointly learning to score and select sentences. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 654–663, Melbourne, Australia, July 2018. Association for Computational Linguistics.
|
md/train/5jRVa89sZk/5jRVa89sZk.md
ADDED
|
@@ -0,0 +1,288 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# EMPIRICAL ANALYSIS OF UNLABELED ENTITY PROBLEM IN NAMED ENTITY RECOGNITION
|
| 2 |
+
|
| 3 |
+
Yangming Li, Lemao Liu, & Shuming Shi Tencent AI Lab {newmanli,redmondliu,shumingshi}@tencent.com
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
In many scenarios, named entity recognition (NER) models severely suffer from unlabeled entity problem, where the entities of a sentence may not be fully annotated. Through empirical studies performed on synthetic datasets, we find two causes of performance degradation. One is the reduction of annotated entities and the other is treating unlabeled entities as negative instances. The first cause has less impact than the second one and can be mitigated by adopting pretraining language models. The second cause seriously misguides a model in training and greatly affects its performances. Based on the above observations, we propose a general approach, which can almost eliminate the misguidance brought by unlabeled entities. The key idea is to use negative sampling that, to a large extent, avoids training NER models with unlabeled entities. Experiments on synthetic datasets and real-world datasets show that our model is robust to unlabeled entity problem and surpasses prior baselines. On well-annotated datasets, our model is competitive with the state-of-the-art method1.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Named entity recognition (NER) is an important task in information extraction. Previous methods typically cast it into a sequence labeling problem by adopting IOB tagging scheme (Mesnil et al., 2015; Huang et al., 2015; Ma & Hovy, 2016; Akbik et al., 2018; Qin et al., 2019). A representative model is Bi-LSTM CRF (Lample et al., 2016). The great success achieved by these methods benefits from massive correctly labeled data. However, in some real scenarios, not all the entities in the training corpus are annotated. For example, in some NER tasks (Ling & Weld, 2012), the datasets contain too many entity types or a mention may be associated with multiple labels. Since manual annotation on this condition is too hard, some entities are inevitably neglected by human annotators. Situations in distantly supervised NER (Ren et al., 2015; Fries et al., 2017) are even more serious. To reduce handcraft annotation, distant supervision (Mintz et al., 2009) is applied to automatically produce labeled data. As a result, large amounts of entities in the corpus are missed due to the limited coverage of knowledge resources. We refer this to unlabeled entity problem, which largely degrades performances of NER models.
|
| 12 |
+
|
| 13 |
+
There are several approaches used in prior works to alleviate this problem. Fuzzy CRF and AutoNER (Shang et al., 2018b) allow models to learn from the phrases that may be potential entities. However, since these phrases are obtained through a distantly supervised phrase mining method (Shang et al., 2018a), many unlabeled entities in the training data may still not be recalled. In the context of only resorting to unlabeled corpora and an entity ontology, Mayhew et al. (2019); Peng et al. (2019) employ positive-unlabeled (PU) learning (Li & Liu, 2005) to unbiasedly and consistently estimate the task loss. In implementations, they build distinct binary classifiers for different labels. Nevertheless, the unlabeled entities still impact the classifiers of the corresponding entity types and, importantly, the model can’t disambiguate neighboring entities. Partial CRF (Tsuboi et al., 2008) is an extension of commonly used CRF (Lafferty et al., 2001) that supports learning from incomplete annotations. Yang et al. (2018); Nooralahzadeh et al. (2019); Jie et al. (2019) use it to circumvent training with false negatives. However, as fully annotated corpora are still required to get ground truth training negatives, this approach is not applicable to the situations where little or even no high-quality data is available.
|
| 14 |
+
|
| 15 |
+
In this work, our goal is to study what are the impacts of unlabeled entity problem on the models and how to effectively eliminate them. Initially, we construct some synthetic datasets and introduce degradation rates. The datasets are constructed by randomly removing the annotated named entities in well-annotated datasets, e.g., CoNLL-2003 (Sang & De Meulder, 2003), with different probabilities. The degradation rates measure how severe an impact of unlabeled entity problem degrades the performances of models. Extensive studies are investigated on synthetic datasets. We find two causes: the reduction of annotated entities and treating unlabeled entities as negative instances. The first cause is obvious but has far fewer influences than the second one. Besides, it can be mitigated well by using a pretraining language model, like BERT (Devlin et al., 2019)), as the sentence encoder. The second cause seriously misleads the models in training and exerts a great negative impact on their performances. Even in less severe cases, it can sharply reduce the F1 score by about $2 0 \%$ . Based on the above observations, we propose a novel method that is capable of eliminating the misguidance of unlabeled entities in training. The core idea is to apply negative sampling that avoids training NER models with unlabeled entities.
|
| 16 |
+
|
| 17 |
+
Extensive experiments have been conducted to verify the effectiveness of our approach. Studies on synthetic datasets and real-world datasets (e.g., EC) show that our model well handles unlabeled entities and notably surpasses prior baselines. On well-annotated datasets (e.g., CoNLL-2003), our model is competitive with the state-of-the-art method.
|
| 18 |
+
|
| 19 |
+
# 2 PRELIMINARIES
|
| 20 |
+
|
| 21 |
+
In this section, we formally define the unlabeled entity problem and briefly describe a strong baseline, BERT Tagging (Devlin et al., 2019), used in empirical studies.
|
| 22 |
+
|
| 23 |
+
# 2.1 UNLABELED ENTITY PROBLEM
|
| 24 |
+
|
| 25 |
+
We denote an input sentence as $\mathbf { x } = [ x _ { 1 } , x _ { 2 } , \cdots , x _ { n } ]$ and the annotated named entity set as ${ \bf y } =$ $\{ y _ { 1 } , y _ { 2 } , \cdots , y _ { m } \}$ . $n$ is the sentence length and $m$ is the amount of entities. Each member $y _ { k }$ of set $\mathbf { y }$ is a tuple $( i _ { k } , j _ { k } , l _ { k } )$ . $( i _ { k } , j _ { k } )$ is the span of an entity which corresponds to the phrase $\mathbf { x } _ { i _ { k } , j _ { k } } = [ x _ { i _ { k } } , x _ { i _ { k } + 1 } , \cdot \cdot \cdot , x _ { j _ { k } } ]$ and $l _ { k }$ is its label. The unlabeled entity problem is defined as, due to the limited coverage of machine annotator or the negligence of human annotator, some ground truth entities $\widetilde { \mathbf { y } }$ of the sentence $\mathbf { x }$ are not covered by annotated entity set y.
|
| 26 |
+
|
| 27 |
+
For instance, given a sentence $\mathbf { x } = [ \mathrm { J a c k }$ , and, Mary, are, from, New, York] and a labeled entity set $\mathbf { y } = \{ ( 1 , 1 , \bar { \mathrm { P E R } } ) \}$ , unlabeled entity problem is that some entities, like $( \mathrm { 6 , \dot { 7 } , L O C ) }$ , are neglected by annotators. These unlabeled entities are denoted as $\widetilde { \mathbf { y } } = \{ ( 3 , 3 , \mathrm { P E R } ) , ( 6 , 7 , \mathrm { L O C } ) \}$ .
|
| 28 |
+
|
| 29 |
+
# 2.2 BERT TAGGING
|
| 30 |
+
|
| 31 |
+
BERT Tagging is present in Devlin et al. (2019), which adopts IOB tagging scheme, where each token $x _ { i }$ in a sentence $\mathbf { x }$ is labeled with a fine-grained tag, such as B-ORG, I-LOC, or O. Formally, its output is a $n$ -length label sequence $\mathbf { z } = [ z _ { 1 } , \bar { z } _ { 2 } , \cdot \cdot \cdot , z _ { n } ]$ .
|
| 32 |
+
|
| 33 |
+
Formally, BERT tagging firstly uses BERT to get the representation $\mathbf { h } _ { i }$ for every token $x _ { i }$
|
| 34 |
+
|
| 35 |
+
$$
|
| 36 |
+
[ \mathbf { h } _ { 1 } , \mathbf { h } _ { 2 } , \cdot \cdot \cdot \mathbf { \nabla } , \mathbf { h } _ { n } ] = \mathrm { B E R T } ( \mathbf { x } ) .
|
| 37 |
+
$$
|
| 38 |
+
|
| 39 |
+
Then, the label distribution $\mathbf { q } _ { i }$ is computed as $\mathrm { S o f t m a x } ( \mathbf { W } \mathbf { h } _ { i } )$ . In training, the loss is induced as $\begin{array} { r } { \sum _ { 1 \leq i \leq n } - \log { \mathbf q } _ { i } [ z _ { i } ] } \end{array}$ . At test time, it obtains the label for each token $x _ { i }$ by arg max $\mathbf { q } _ { i }$ .
|
| 40 |
+
|
| 41 |
+
# 3 EMPIRICAL STUDIES
|
| 42 |
+
|
| 43 |
+
To understand the impacts of unlabeled entity problem, we conduct empirical studies over multiple synthetic datasets, different methods, and various metrics.
|
| 44 |
+
|
| 45 |
+

|
| 46 |
+
Figure 1: The empirical studies conducted on CoNLL-2003 dataset.
|
| 47 |
+
|
| 48 |
+

|
| 49 |
+
Figure 2: The empirical studies investigated on OntoNotes 5.0 dataset.
|
| 50 |
+
|
| 51 |
+
# 3.1 PREPARATIONS
|
| 52 |
+
|
| 53 |
+
Synthetic Datasets. We use synthetic datasets to simulate poorly-annotated datasets that contain unlabeled entities. They are obtained by randomly removing the labeled entities of well-annotated datasets with different masking probabilities $p$ . The material datasets are CoNLL-2003 (Sang & De Meulder, 2003) and OntoNotes 5.0 (Pradhan et al., 2013). The probabilities $p$ are respectively set as $0 . 0 , 0 . 1 , 0 . 2 , \cdots , 0 . 9$ . In this way, $2 \times 1 0$ synthetic datasets are constructed.
|
| 54 |
+
|
| 55 |
+
Methods. We adopt two models. One of them is BERT Tagging, which has long been regarded as a strong baseline. The other is LSTM Tagging that replaces the original encoder (i.e., BERT) of BERT Tagging with LSTM (Hochreiter & Schmidhuber, 1997). We use it to study the effect of using pretraining language model. To explore the negative impact brought by unlabeled entities in training, we present an adjusted training loss for above two models:
|
| 56 |
+
|
| 57 |
+
$$
|
| 58 |
+
\Big ( \sum _ { 1 \leq i \leq n } - \log \mathbf { q } _ { i } [ z _ { i } ] \Big ) - \Big ( \sum _ { ( i ^ { \prime } , j ^ { \prime } , l ^ { \prime } ) \in \widetilde { \mathbf { y } } } \sum _ { i ^ { \prime } \leq k \leq j ^ { \prime } } - \log \mathbf { q } _ { k } [ z _ { k } ] \Big ) .
|
| 59 |
+
$$
|
| 60 |
+
|
| 61 |
+
The idea here is to remove the incorrect loss incurred by unlabeled entities. Note that missed entity set $\widetilde { \mathbf { y } }$ is reachable in synthetic datasets but unknown in real-world datasets.
|
| 62 |
+
|
| 63 |
+
Metrics. Following prior works, the F1 scores of models are tested by using conlleval script2. We also design two degradation rates to measure the different impacts of unlabeled entity problem. One is erosion rate $\alpha _ { p }$ and the other is misguidance rate $\beta _ { p }$ :
|
| 64 |
+
|
| 65 |
+
$$
|
| 66 |
+
\alpha _ { p } = \frac { f _ { 0 } ^ { a } - f _ { p } ^ { a } } { f _ { 0 } ^ { a } } , \beta _ { p } = \frac { f _ { p } ^ { a } - f _ { p } } { f _ { p } ^ { a } } .
|
| 67 |
+
$$
|
| 68 |
+
|
| 69 |
+
For a synthetic dataset with the masking probability being $p$ , $f _ { p }$ and $f _ { p } ^ { a }$ are the F1 scores of a model and its adjusted version, respectively. Note that $f _ { 0 } ^ { \alpha }$ corresponds to $p \bar { = } 0$ . Erosion rate $\alpha _ { p }$ measures how severely the reduction of annotated entities degrades the F1 scores of a model. Misguidance rate $\beta _ { p }$ measures how seriously unlabeled entities misguide the model in training.
|
| 70 |
+
|
| 71 |
+

|
| 72 |
+
Figure 3: This demonstrates how our model scores possible entities.
|
| 73 |
+
|
| 74 |
+
# 3.2 OVERALL ANALYSIS
|
| 75 |
+
|
| 76 |
+
The left parts of Fig. 1 and Fig. 2 show the results of empirical studies, where we evaluate the F1 scores of BERT Tagging and LSTM Tagging on 20 synthetic datasets. From them, we can draw the following observations. Firstly, the significant downward trends of solid lines confirm the fact that NER models severely suffer from unlabeled entity problem. For example, by setting the masking probability as 0.4, the performance of LSTM Tagging decreases by $3 3 . 0 1 \%$ on CoNLL2003 and $1 9 . 5 8 \%$ on OntoNotes 5.0. Secondly, in contrast, the dashed lines change very slowly, indicating that the models with adjusted training loss (see Eq. (2)) are much less influenced by the issue. For instance, when masking probability is 0.7, adopting adjusted loss preserves the F1 scores of BERT Tagging by $4 1 . 0 4 \%$ on CoNLL-2003 and $5 7 . 3 8 \%$ on OntoNotes 5.0. Lastly, for high masking probabilities, even though the negative impact of unlabeled entities is eliminated by adjusting the training loss, the performance still declines to a certain extent. For example, when masking probability is set as 0.8, the F1 scores of adjusted LSTM Tagging decrease by $3 1 . 6 4 \%$ on CoNLL-2003 and $1 7 . 2 2 \%$ on OntoNotes 5.0.
|
| 77 |
+
|
| 78 |
+
Reduction of Annotated Entities. From the last observation, we can infer that a cause of performance degradation is the reduction of annotated entities. In the middle parts of Fig. 1 and Fig. 2, we plot the change of erosion rates $\alpha _ { p }$ (see Eq. (2)) with respect to masking probabilities. We can see that its impact is not very serious when in low masking probabilities but can’t be neglected when in high ones. Besides, using pre-training language models greatly mitigates the issue. As an example, when the probability is 0.8, on both CoNLL-2003 and OntoNotes 5.0, the erosion rates of adjusted BERT Tagging are only about half of those of adjusted LSTM Tagging.
|
| 79 |
+
|
| 80 |
+
Misguidance of Unlabeled Entities. From the last two observations, we can conclude that the primary cause is treating unlabeled entities as negative instances, which severely misleads the models during training. To better understand it, in the right parts of Fig. 1 and Fig. 2, we plot the change of misguidance rates $\beta _ { p }$ (see Eq. (3)) with masking probabilities. These rates are essentially the percentage decreases of F1 scores. From them, we can see that the impact of misguidance is very much serious even when in low masking probabilities.
|
| 81 |
+
|
| 82 |
+
# 4 METHODOLOGY
|
| 83 |
+
|
| 84 |
+
Motivated by Sec. 3.2, we present a model that is robust to unlabeled entities.
|
| 85 |
+
|
| 86 |
+
# 4.1 SCORING MODEL WITH BERT
|
| 87 |
+
|
| 88 |
+
Based on the findings in Sec. 3.2, we use BERT as the default encoder to mitigate the reduction of annotated entities. Specifically, given a sentence $\mathbf { x }$ , we firstly obtain the token representations $\mathbf { h } _ { i }$ with Eq. (1). Then, we get the representation for every phrase $\mathbf { x } _ { i , j }$ as
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\mathbf { s } _ { i , j } = \mathbf { h } _ { i } \oplus \mathbf { h } _ { j } \oplus \left( \mathbf { h } _ { i } - \mathbf { h } _ { j } \right) \oplus \big ( \mathbf { h } _ { i } \odot \mathbf { h } _ { j } \big ) ,
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
where $\oplus$ is column-wise vector concatenation and $\odot$ is element-wise vector product. The design here is mainly inspired by Chen et al. (2017).
|
| 95 |
+
|
| 96 |
+
Finally, multi-layer perceptron (MLP) computes the label distribution $\mathbf { o } _ { i , j }$ for a span $( i , j )$
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\begin{array} { r } { \mathbf { o } _ { i , j } = \mathrm { S o f t m a x } ( \mathbf { U } \operatorname { t a n h } ( \mathbf { V } \mathbf { s } _ { i , j } ) ) . } \end{array}
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
The term $\mathbf { o } _ { i , j } [ l ]$ is the predicted score for an entity $( i , j , l )$ .
|
| 103 |
+
|
| 104 |
+
# 4.2 TRAINING VIA NEGATIVE SAMPLING
|
| 105 |
+
|
| 106 |
+
From Sec. 3.2, we know that regarding all the unlabeled spans as negative instances certainly degrades the performances of models, since some of them may be missed entities. Our solution to this issue is negative sampling. Specifically, we randomly sample a small subset of unlabeled spans as the negative instances to induce the training loss.
|
| 107 |
+
|
| 108 |
+
Given the annotated entity set $\mathbf { y }$ , we firstly get all the negative instance candidates as
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\{ ( i , j , 0 ) \mid ( i , j , l ) \not \in { \bf y } , 1 \leq i \leq j \leq n , l \in \mathcal { L } \} ,
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
where $\mathcal { L }$ is the label space and O is the label for non-entity spans.
|
| 115 |
+
|
| 116 |
+
Then, we uniformly sample a subset $\widehat { \mathbf { y } }$ from the whole candidate set. The size of sample set $\widehat { \mathbf { y } }$ is $\lceil \lambda * n \rceil , 0 < \lambda < 1$ , where $\left\lceil \right\rceil$ b is the ceiling function.
|
| 117 |
+
|
| 118 |
+
Ultimately, a span-level cross entropy loss used for training is incurred as
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\Big ( \sum _ { ( i , j , l ) \in \mathbf { y } } - \log ( \mathbf { o } _ { i , j } [ l ] ) \Big ) + \Big ( \sum _ { ( i ^ { \prime } , j ^ { \prime } , l ^ { \prime } ) \in \widehat { \mathbf { y } } } - \log \bigl ( \mathbf { o } _ { i ^ { \prime } , j ^ { \prime } } [ l ^ { \prime } ] \bigr ) \Big ) .
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
Negative sampling incorporates some randomness into the training loss, which reduces the risk of training a NER model with unlabeled entities.
|
| 125 |
+
|
| 126 |
+
# 4.3 INFERENCE
|
| 127 |
+
|
| 128 |
+
At test time, firstly, the label for every span $( i , j )$ is obtained by $\mathrm { \ a r g m a x } _ { l } \mathbf { o } _ { i , j } [ l ]$ . Then, we select the ones whose label $l$ is not $\mathrm { O }$ as predicted entities. When the spans of inferred entities intersects, we preserve the one with the highest predicted score and discard the others.
|
| 129 |
+
|
| 130 |
+
The time complexity of inference is $\mathcal { O } ( n ^ { 2 } )$ , which is majorly contributed by the span selection procedure. While this seems a bit higher compared with our counterparts, we find that, in practical use, its running time is far less than that of the forward computation of neural networks. The algorithm for inference is greedy yet effective. In experiments, we find that the probability of our heuristic selecting a wrong labeled span when resolving the span conflict is very low.
|
| 131 |
+
|
| 132 |
+
# 5 DISCUSSION
|
| 133 |
+
|
| 134 |
+
We show that, through negative sampling, the probability of not treating a specific missed entity in a $n$ -length sentence as the negative instance is larger than $\textstyle 1 - { \frac { 2 } { n - 3 } }$ :
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
\begin{array} { l } { { \displaystyle \prod _ { 0 \le i < \lceil \lambda n \rceil } \left( 1 - \frac { 1 } { \frac { n ( n + 1 ) } { 2 } - m - i } \right) > \left( 1 - \frac { 1 } { \frac { n ( n + 1 ) } { 2 } - m - \lceil \lambda n \rceil } \right) ^ { \lceil \lambda n \rceil } } } \\ { { \displaystyle \qquad > \left( 1 - \frac { 1 } { \frac { n ( n + 1 ) } { 2 } - n - n } \right) ^ { n } \ge \left( 1 - n * \frac { 1 } { \frac { n ( n + 1 ) } { 2 } - n - n } \right) = 1 - \frac { 2 } { n - 3 } } } \end{array} .
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
Herand e n(n+1)2 − m is the amount of negative candidates. Besides, we use the facts, λ < 1, m ≤ n, $( 1 - \bar { z } ) ^ { n } \geq 1 - n z , 0 \leq z \leq 1$ , during the derivation.
|
| 141 |
+
|
| 142 |
+
Note that the above bound is only applicable to the special case where there is just one unlabeled entity in a sentence. We remain the strict proof for general cases to future work.
|
| 143 |
+
|
| 144 |
+
# 6 EXPERIMENTS
|
| 145 |
+
|
| 146 |
+
We have conducted extensive experiments on multiple datasets to verify the effectiveness of our method. Studies on synthetic datasets show that our model can almost eliminate the misguidance
|
| 147 |
+
|
| 148 |
+
Table 1: The experiment results on two synthetic datasets.
|
| 149 |
+
|
| 150 |
+
<table><tr><td rowspan="2">Masking Prob.</td><td colspan="2">CoNLL-2003</td><td colspan="2">OntoNotes 5.0</td></tr><tr><td>BERT Tagging</td><td>Our Model</td><td>BERT Tagging</td><td>Our Model</td></tr><tr><td>0.1</td><td>90.71</td><td>91.37</td><td>87.69</td><td>89.20</td></tr><tr><td>0.2</td><td>89.57</td><td>91.25</td><td>86.86</td><td>89.15</td></tr><tr><td>0.3</td><td>88.95</td><td>90.53</td><td>84.75</td><td>88.73</td></tr><tr><td>0.4</td><td>82.94</td><td>89.73</td><td>82.55</td><td>88.20</td></tr><tr><td>0.5</td><td>78.99</td><td>89.22</td><td>71.07</td><td>88.17</td></tr><tr><td>0.6</td><td>63.84</td><td>87.65</td><td>58.17</td><td>87.53</td></tr></table>
|
| 151 |
+
|
| 152 |
+

|
| 153 |
+
Figure 4: The misguidance rates of BERT Tagging and our model.
|
| 154 |
+
|
| 155 |
+
brought by unlabeled entities in training. On real-world datasets, our model has notably outperformed prior baselines and achieved the state-of-the-art performances. On well-annotated datasets, our model is competitive to current state-of-the-art method.
|
| 156 |
+
|
| 157 |
+
# 6.1 SETTINGS
|
| 158 |
+
|
| 159 |
+
The setup of synthetic datasets and well-annotated datasets are the same as what we describe in Sec. 3.1. For real-world datasets, we use EC and NEWS, both of which are collected by Yang et al. (2018). EC is in e-commerce domain, which has 5 entity types: Brand, Product, Model, Material, and Specification. The data contains 2400 sentences tagged by human annotators and are divided into three parts: 1200 for training, 400 for dev, and 800 for testing. Yang et al. (2018) also construct an entity dictionary of size 927 and apply distant supervision on a raw corpus to obtain additional 2500 sentences for training. NEWS is from MSRA dataset (Levow, 2006). Yang et al. (2018) only adopt the PERSON entity type. Training data of size 3000, dev data of size 3328, and testing data of size 3186 are all sampled from MSRA. They collect an entity dictionary of size 71664 and perform distant supervision on the rest data to obtain extra 3722 training cases by using the dictionary. Both EC and NEWS contain a large amount of incompletely annotated sentences, and hence naturally suffer from the unlabeled entity problem.
|
| 160 |
+
|
| 161 |
+
We adopt the same hyper-parameter configurations of neural networks for all the datasets. L2 regularization and dropout ratio are respectively set as $1 \times 1 0 ^ { - 5 }$ and 0.4 for reducing overfit. The dimension of scoring layers is 256. Ratio $\lambda$ is set as 0.35. When the sentence encoder is LSTM, we set the hidden dimension as 512 and use pretrained word embeddings (Pennington et al., 2014; Song et al., 2018) to initialize word representations. We utilize Adam (Kingma & Ba, 2014) as the optimization algorithm and adopt the suggested hyper-parameters. At evaluation time, we convert the predictions of our models into IOB format and use conlleval script to compute the F1 score. In all the experiments, the improvements of our models over the baselines are statistically significant with rejection probabilities smaller than 0.05.
|
| 162 |
+
|
| 163 |
+
Table 2: The experiment results on two well-annotated datasets.
|
| 164 |
+
|
| 165 |
+
<table><tr><td>Method</td><td>CoNLL-2003</td><td>OntoNotes 5.0</td></tr><tr><td>FlairEmbedding (Akbik etal., 2018)</td><td>93.09</td><td>89.3</td></tr><tr><td>BERT-MRC(Li etal.,2020a)</td><td>93.04</td><td>91.11</td></tr><tr><td>HCR w/BERT (Luo et al., 2020)</td><td>93.37</td><td>90.30</td></tr><tr><td>BERT-Biaffine Model (Yu etal., 2020)</td><td>93.5</td><td>91.3</td></tr><tr><td>Our Model</td><td>93.42</td><td>90.59</td></tr></table>
|
| 166 |
+
|
| 167 |
+
Table 3: The experiment results on two real-world datasets.
|
| 168 |
+
|
| 169 |
+
<table><tr><td colspan="2">Method</td><td>EC</td><td>NEWS</td></tr><tr><td rowspan="6">Yang et al. (2018)</td><td>String Matching via Ontology</td><td>44.02</td><td>47.75</td></tr><tr><td>BiLSTM+CRF</td><td>54.59</td><td>69.09</td></tr><tr><td>BiLSTM+CRFw/RL</td><td>56.23</td><td>73.19</td></tr><tr><td>BiLSTM+PartialCRF</td><td>60.08</td><td>78.38</td></tr><tr><td>BiLSTM+Partial CRF w/RL</td><td>61.45</td><td>79.22</td></tr><tr><td>WeightedPartial CRF</td><td>61.75</td><td>78.64</td></tr><tr><td>Jie et al. (2019) Nooralahzadeh et al. (2019)</td><td>BiLSTM+Partial CRFw/RL</td><td>63.56</td><td>80.04</td></tr><tr><td rowspan="2">This Work</td><td>OurModel</td><td>66.17</td><td>85.39</td></tr><tr><td>OurModel w/o BERT,w/BiLSTM</td><td>64.68</td><td>82.11</td></tr></table>
|
| 170 |
+
|
| 171 |
+
# 6.2 RESULTS ON SYNTHETIC DATASETS
|
| 172 |
+
|
| 173 |
+
In this section, our model is compared with BERT Tagging on the synthetic datasets of the masking probabilities being $0 . 1 , 0 . 2 , \cdots , 0 . 6$ . From Table 1, we can get two conclusions. Firstly, our model significantly outperforms BERT Tagging, especially in high masking probabilities. For example, on CoNLL-2003, our F1 scores outnumber those of BERT Tagging by $1 . 8 8 \%$ when the probability is 0.2 and $2 7 . 1 6 \%$ when the probability is 0.6. Secondly, our model is very robust to the unlabeled entity problem. When increasing the masking probability from 0.1 to 0.5, the results of our model only decrease by $2 . 3 5 \%$ on CoNLL-2003 and $1 . 9 1 \%$ on OntoNotes 5.0.
|
| 174 |
+
|
| 175 |
+
Fig. 4 demonstrates the misguidance rate comparisons between BERT Tagging and our models. The way to adjust our model is reformulating Eq. (7) by defining the negative term via $\{ ( i , j , \mathrm { O } ) \mid \forall l :$ $( i , j , l ) \not \in { \bf y } \cup \widetilde { { \bf y } } \}$ rather than the negatively sampled $\hat { \mathbf { y } }$ . The idea here is to avoid the unlabeled entities being sampled. From Fig. 4, we can discover that, in all masking probabilities, the misguidance rates of our model are far smaller than those of BERT Tagging and are consistently lower than $2 . 5 0 \%$ . These indicate that, in training, our model indeed eliminates the misguidance brought by unlabeled entities to some extent.
|
| 176 |
+
|
| 177 |
+
# 6.3 RESULTS ON FULLY ANNOTATED DATASETS
|
| 178 |
+
|
| 179 |
+
We additionally apply our model with negative sampling on the well-annotated datasets where the issue of incomplete entity annotation is not serious. As shown in Table 2, the F1 scores of our model are very close to current best results. Our model slightly underperforms BERT-Biaffine Model by only $0 . { \dot { 0 } } 9 \%$ on CoNLL-2003 and $0 . 7 8 \%$ on OntoNotes 5.0. Besides, our model surpasses many other strong baselines. On OntoNotes 5.0, our model outperforms HCR w/ BERT by $0 . 3 2 \%$ and Flair Embedding by $1 . 4 4 \%$ . On CoNLL-2003, the improvements of F1 scores are $0 . 4 1 \%$ over BERT-MRC and $0 . 3 5 \%$ over Flair Embedding. All these results indicate that our model is still very effective when applied to high-quality data.
|
| 180 |
+
|
| 181 |
+
# 6.4 RESULTS ON REAL-WORLD DATASETS
|
| 182 |
+
|
| 183 |
+
For two real-world datasets, a large portion of training data is obtained via distant supervision. As stated in Yang et al. (2018), the F1 scores of string matching through an entity dictionary are notably declined in terms of the low recall scores, although its precision scores are higher than those of other methods. Therefore, unlabeled entity problem is serious in the datasets. As shown in Table 3, the baselines come from three works (Yang et al., 2018; Nooralahzadeh et al., 2019; Jie et al.,
|
| 184 |
+
|
| 185 |
+

|
| 186 |
+
Figure 5: The results of our models with different ratio $\lambda$ on synthetic datasets.
|
| 187 |
+
|
| 188 |
+
Table 4: The PCCs between F1 score and degradation rates.
|
| 189 |
+
|
| 190 |
+
<table><tr><td rowspan="2">Metric</td><td colspan="2">CoNLL-2003</td><td colspan="2">OntoNotes 5.0</td></tr><tr><td>BERTTagging</td><td>LSTMTagging</td><td>BERTTagging</td><td>LSTM Tagging</td></tr><tr><td>Erosion Rate αp</td><td>-0.94</td><td>-0.90</td><td>-0.85</td><td>-0.82</td></tr><tr><td>Misguidance Rate βp</td><td>-1.00</td><td>-0.96</td><td>-1.00</td><td>-0.98</td></tr></table>
|
| 191 |
+
|
| 192 |
+
2019). Yang et al. (2018) use Partial CRF to circumvent all possible unlabeled entities and utilize reinforcement learning (RL) to adaptively skip noisy annotation. Jie et al. (2019) and Nooralahzadeh et al. (2019) respectively improve Partial CRF and the policy of RL. All the F1 scores of baselines are copied from Yang et al. (2018); Nooralahzadeh et al. (2019), except for that of Weighted Partial CRF, which is obtained by rerunning its open-source code3.
|
| 193 |
+
|
| 194 |
+
Our model has significantly outperformed prior baselines and obtained new state-of-the-art results. Compared with prior best model (Nooralahzadeh et al., 2019), we achieve the improvements of $3 . 9 4 \%$ on EC and $6 . 2 7 \%$ on NEWS. Compared with strong baseline, BiLSTM $^ +$ Partial CRF, the increases of F1 scores are $9 . 2 0 \%$ and $8 . 2 \bar { 1 } \%$ . To make fair comparisons, we replace BERT with LSTM. Even so, we still outperform (Nooralahzadeh et al., 2019) by $1 . 7 6 \%$ on EC and $2 . 5 2 \%$ on NEWS. All these strongly confirm the effectiveness of our model.
|
| 195 |
+
|
| 196 |
+
# 6.5 RATIO $\lambda$ IN NEGATIVE SAMPLING
|
| 197 |
+
|
| 198 |
+
Intuitively, setting ratio $\lambda$ (see Sec. 4.2) as too large values or too small values both are inappropriate. Large ratios increase the risks of training negatives containing unlabeled entities. Small ratios reduce the number of negative instances used for training, leading to underfitting. Fig. 5 shows the experiments on some synthetic datasets with the ratio $\lambda$ of our method being $0 . 1 , 0 . 2 , \cdots , 0 . 9$ . From it, we can see that all the score curves are roughly arched, which verifies our intuition. Besides, we find that $0 . 3 < \lambda < 0 . 4$ performs well in all the cases.
|
| 199 |
+
|
| 200 |
+
# 6.6 VALIDITY OF DEGRADATION RATES
|
| 201 |
+
|
| 202 |
+
As Table 4 shows, we use Pearson’s correlation coefficient (PCC) to measure the statistical correlations between degradation rates (e.g., misguidance rate $\beta _ { p }$ ) and the F1 score. We can see that the correlation scores are generally close to $- 1$ . For example, for LSTM Tagging, on the synthetic datasets built from CoNLL-2003, the correlation score of erosion rate $\alpha _ { p }$ is $- 0 . 9 0$ and that of misguidance rate $\beta _ { p }$ is $- 0 . 9 6$ . The results indicate that not only degradation rates quantify specific impacts of unlabeled entities but also their negative values change synchronously with the F1 score. We conclude that degradation rates are appropriate metrics for evaluation.
|
| 203 |
+
|
| 204 |
+
# 7 RELATED WORK
|
| 205 |
+
|
| 206 |
+
NER is a classical task in information extraction. Previous works commonly treat it as a sequence labeling problem by using IOB tagging scheme (Huang et al., 2015; Akbik et al., 2018; Luo et al., 2020; Li et al., 2020b;c). Each word in the sentence is labeled as B-tag if it is the beginning of an entity, I-tag if it’s inside but not the first one within the entity, or O otherwise. This approach is extensively studied in prior works. For example, Akbik et al. (2018) propose Flair Embedding that pretrains character embedding in large corpora and uses it rather than token representations to represent a sentence. Recently, there is a growing interest in span-based models (Li et al., 2020a; Yu et al., 2020). They treat the spans, instead of single words, as the basic units for labeling. For example, Li et al. (2020a) present BERT-MRC that regards NER as a MRC task, where named entities are extracted as retrieving answer spans. Span-based models are also prevalent in language modeling (Li et al., 2020d), syntactic analysis (Stern et al., 2017), etc.
|
| 207 |
+
|
| 208 |
+
In some practical applications (e.g., fine-grained NER (Zhang et al., 2020)), NER models are faced with unlabeled entity problem, where the unlabeled entities seriously degrade the performances of models. Several approaches to this issue have been proposed. Fuzzy CRF and AutoNER (Shang et al., 2018b) allow learning from high-quality phrases. However, since these phrases are obtained through distant supervision, the unlabeled entities in the corpora may still be missed. PU learning (Peng et al., 2019; Mayhew et al., 2019) unbiasedly and consistently estimates the training loss. Nevertheless, the unlabeled entities still impact the classifiers of the corresponding entity types and, importantly, the model can’t disambiguate neighboring entities. Partial CRF (Yang et al., 2018; Jie et al., 2019) supports learning from incomplete annotations. However, because fully annotated corpora are still needed to training models with true negative instances, this type of approach is not applicable to the situations where no high-quality data is available.
|
| 209 |
+
|
| 210 |
+
# 8 CONCLUSION
|
| 211 |
+
|
| 212 |
+
In this work, we study what are the impacts of unlabeled entities on NER models and how to effectively eliminate them. Through empirical studies performed on synthetic datasets, we find two causes: the reduction of annotated entities and treating unlabeled entities as training negatives. The first cause has fewer influences than the second one and can be mitigated by adopting pretraining language models. The second cause seriously misleads the models in training and greatly affects their performances. Based on the above observations, we propose a novel method that is capable of eliminating the misguidance of unlabeled entities during training. The core idea is to apply negative sampling that avoids training NER models with unlabeled entities. Experiments on synthetic datasets and real-world datasets demonstrate that our model handles unlabeled entities well and significantly outperforms previous baselines. On well-annotated datasets, our model is competitive with the existing state-of-the-art approach.
|
| 213 |
+
|
| 214 |
+
# REFERENCES
|
| 215 |
+
|
| 216 |
+
Alan Akbik, Duncan Blythe, and Roland Vollgraf. Contextual string embeddings for sequence labeling. In Proceedings of the 27th International Conference on Computational Linguistics, pp. 1638–1649, 2018.
|
| 217 |
+
|
| 218 |
+
Qian Chen, Xiaodan Zhu, Zhen-Hua Ling, Si Wei, Hui Jiang, and Diana Inkpen. Enhanced LSTM for natural language inference. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1657–1668, Vancouver, Canada, July 2017. Association for Computational Linguistics. doi: 10.18653/v1/P17-1152. URL https: //www.aclweb.org/anthology/P17-1152.
|
| 219 |
+
|
| 220 |
+
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), pp. 4171–4186, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1423. URL https: //www.aclweb.org/anthology/N19-1423.
|
| 221 |
+
|
| 222 |
+
Jason Fries, Sen Wu, Alex Ratner, and Christopher Re. Swellshark: A generative model for biomed-´ ical named entity recognition without labeled data. arXiv preprint arXiv:1704.06360, 2017.
|
| 223 |
+
|
| 224 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 9(8): 1735–1780, 1997.
|
| 225 |
+
|
| 226 |
+
Zhiheng Huang, Wei Xu, and Kai Yu. Bidirectional lstm-crf models for sequence tagging. arXiv preprint arXiv:1508.01991, 2015.
|
| 227 |
+
|
| 228 |
+
Zhanming Jie, Pengjun Xie, Wei Lu, Ruixue Ding, and Linlin Li. Better modeling of incomplete annotations for named entity recognition. 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), pp. 729–734, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1079. URL https://www.aclweb.org/anthology/N19-1079.
|
| 229 |
+
|
| 230 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014.
|
| 231 |
+
|
| 232 |
+
John Lafferty, Andrew McCallum, and Fernando CN Pereira. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. 2001.
|
| 233 |
+
|
| 234 |
+
Guillaume Lample, Miguel Ballesteros, Sandeep Subramanian, Kazuya Kawakami, and Chris Dyer. Neural architectures for named entity recognition. In Proceedings of the 2016 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 260–270, San Diego, California, June 2016. Association for Computational Linguistics. doi: 10.18653/v1/N16-1030. URL https://www.aclweb.org/anthology/ N16-1030.
|
| 235 |
+
|
| 236 |
+
Gina-Anne Levow. The third international chinese language processing bakeoff: Word segmentation and named entity recognition. In Proceedings of the Fifth SIGHAN Workshop on Chinese Language Processing, pp. 108–117, 2006.
|
| 237 |
+
|
| 238 |
+
Xiao-Li Li and Bing Liu. Learning from positive and unlabeled examples with different data distributions. In European conference on machine learning, pp. 218–229. Springer, 2005.
|
| 239 |
+
|
| 240 |
+
Xiaoya Li, Jingrong Feng, Yuxian Meng, Qinghong Han, Fei Wu, and Jiwei Li. A unified MRC framework for named entity recognition. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 5849–5859, Online, July 2020a. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.519. URL https: //www.aclweb.org/anthology/2020.acl-main.519.
|
| 241 |
+
|
| 242 |
+
Yangming Li, Han Li, Kaisheng Yao, and Xiaolong Li. Handling rare entities for neural sequence labeling. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 6441–6451, Online, July 2020b. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.574. URL https://www.aclweb.org/anthology/2020. acl-main.574.
|
| 243 |
+
|
| 244 |
+
Yangming Li, Lemao Liu, and Shuming Shi. Segmenting natural language sentences via lexical unit analysis. arXiv preprint arXiv:2012.05418, 2020c.
|
| 245 |
+
|
| 246 |
+
Yangming Li, Kaisheng Yao, Libo Qin, Shuang Peng, Yijia Liu, and Xiaolong Li. Span-based neural buffer: Towards efficient and effective utilization of long-distance context for neural sequence models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 8277– 8284, 2020d.
|
| 247 |
+
|
| 248 |
+
Xiao Ling and Daniel S Weld. Fine-grained entity recognition. In AAAI, volume 12, pp. 94–100, 2012.
|
| 249 |
+
|
| 250 |
+
Ying Luo, Fengshun Xiao, and Hai Zhao. Hierarchical contextualized representation for named entity recognition. In AAAI, pp. 8441–8448, 2020.
|
| 251 |
+
|
| 252 |
+
Xuezhe Ma and Eduard Hovy. End-to-end sequence labeling via bi-directional LSTM-CNNs-CRF. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1064–1074, Berlin, Germany, August 2016. Association for Computational Linguistics. doi: 10.18653/v1/P16-1101. URL https://www.aclweb.org/ anthology/P16-1101.
|
| 253 |
+
|
| 254 |
+
Stephen Mayhew, Snigdha Chaturvedi, Chen-Tse Tsai, and Dan Roth. Named entity recognition with partially annotated training data. In Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL), pp. 645–655, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/K19-1060. URL https://www.aclweb.org/anthology/K19-1060.
|
| 255 |
+
|
| 256 |
+
G. Mesnil, Y. Dauphin, K. Yao, Y. Bengio, L. Deng, D. Hakkani-Tur, X. He, L. Heck, G. Tur, D. Yu, and G. Zweig. Using recurrent neural networks for slot filling in spoken language understanding. IEEE/ACM Transactions on Audio, Speech, and Language Processing, 23(3):530–539, 2015. doi: 10.1109/TASLP.2014.2383614.
|
| 257 |
+
|
| 258 |
+
Mike Mintz, Steven Bills, Rion Snow, and Dan Jurafsky. Distant supervision for relation extraction without labeled data. In Proceedings of the Joint Conference of the 47th Annual Meeting of the ACL and the 4th International Joint Conference on Natural Language Processing of the AFNLP, pp. 1003–1011, 2009.
|
| 259 |
+
|
| 260 |
+
Farhad Nooralahzadeh, Jan Tore Lønning, and Lilja Øvrelid. Reinforcement-based denoising of distantly supervised ner with partial annotation. In Proceedings of the 2nd Workshop on Deep Learning Approaches for Low-Resource NLP (DeepLo 2019), pp. 225–233, 2019.
|
| 261 |
+
|
| 262 |
+
Minlong Peng, Xiaoyu Xing, Qi Zhang, Jinlan Fu, and Xuanjing Huang. Distantly supervised named entity recognition using positive-unlabeled learning. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 2409–2419, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1231. URL https: //www.aclweb.org/anthology/P19-1231.
|
| 263 |
+
|
| 264 |
+
Jeffrey Pennington, Richard Socher, and Christopher D Manning. Glove: Global vectors for word representation. In Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP), pp. 1532–1543, 2014.
|
| 265 |
+
|
| 266 |
+
Sameer Pradhan, Alessandro Moschitti, Nianwen Xue, Hwee Tou Ng, Anders Bjorkelund, Olga ¨ Uryupina, Yuchen Zhang, and Zhi Zhong. Towards robust linguistic analysis using ontonotes. In Proceedings of the Seventeenth Conference on Computational Natural Language Learning, pp. 143–152, 2013.
|
| 267 |
+
|
| 268 |
+
Libo Qin, Wanxiang Che, Yangming Li, Haoyang Wen, and Ting Liu. A stack-propagation framework with token-level intent detection for spoken language understanding. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 2078– 2087, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1214. URL https://www.aclweb.org/anthology/D19-1214.
|
| 269 |
+
|
| 270 |
+
Xiang Ren, Ahmed El-Kishky, Chi Wang, Fangbo Tao, Clare R Voss, and Jiawei Han. Clustype: Effective entity recognition and typing by relation phrase-based clustering. In Proceedings of the 21th ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pp. 995–1004, 2015.
|
| 271 |
+
|
| 272 |
+
Erik F Sang and Fien De Meulder. Introduction to the conll-2003 shared task: Languageindependent named entity recognition. arXiv preprint cs/0306050, 2003.
|
| 273 |
+
|
| 274 |
+
Jingbo Shang, Jialu Liu, Meng Jiang, Xiang Ren, Clare R Voss, and Jiawei Han. Automated phrase mining from massive text corpora. IEEE Transactions on Knowledge and Data Engineering, 30 (10):1825–1837, 2018a.
|
| 275 |
+
|
| 276 |
+
Jingbo Shang, Liyuan Liu, Xiaotao Gu, Xiang Ren, Teng Ren, and Jiawei Han. Learning named entity tagger using domain-specific dictionary. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 2054–2064, Brussels, Belgium, OctoberNovember 2018b. Association for Computational Linguistics. doi: 10.18653/v1/D18-1230. URL https://www.aclweb.org/anthology/D18-1230.
|
| 277 |
+
|
| 278 |
+
Yan Song, Shuming Shi, Jing Li, and Haisong Zhang. Directional skip-gram: Explicitly distinguishing left and right context for word embeddings. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 2 (Short Papers), pp. 175–180, New Orleans, Louisiana, June 2018. Association for Computational Linguistics. doi: 10.18653/v1/N18-2028. URL https://www.aclweb.org/anthology/N18-2028.
|
| 279 |
+
|
| 280 |
+
Mitchell Stern, Jacob Andreas, and Dan Klein. A minimal span-based neural constituency parser. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 818–827, Vancouver, Canada, July 2017. Association for Computational Linguistics. doi: 10.18653/v1/P17-1076. URL https://www.aclweb.org/anthology/ P17-1076.
|
| 281 |
+
|
| 282 |
+
Yuta Tsuboi, Hisashi Kashima, Shinsuke Mori, Hiroki Oda, and Yuji Matsumoto. Training conditional random fields using incomplete annotations. In Proceedings of the 22nd International Conference on Computational Linguistics (Coling 2008), pp. 897–904, 2008.
|
| 283 |
+
|
| 284 |
+
Yaosheng Yang, Wenliang Chen, Zhenghua Li, Zhengqiu He, and Min Zhang. Distantly supervised ner with partial annotation learning and reinforcement learning. In Proceedings of the 27th International Conference on Computational Linguistics, pp. 2159–2169, 2018.
|
| 285 |
+
|
| 286 |
+
Juntao Yu, Bernd Bohnet, and Massimo Poesio. Named entity recognition as dependency parsing. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 6470–6476, Online, July 2020. Association for Computational Linguistics. doi: 10.18653/v1/ 2020.acl-main.577. URL https://www.aclweb.org/anthology/2020.acl-main. 577.
|
| 287 |
+
|
| 288 |
+
Haisong Zhang, Lemao Liu, Haiyun Jiang, Yangming Li, Enbo Zhao, Kun Xu, Linfeng Song, Suncong Zheng, Botong Zhou, Jianchen Zhu, et al. Texsmart: A text understanding system for fine-grained ner and enhanced semantic analysis. arXiv preprint arXiv:2012.15639, 2020.
|
md/train/5jaqt-Hsqir/5jaqt-Hsqir.md
ADDED
|
@@ -0,0 +1,447 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Black-Box Dissector: Towards Erasing-based Hard-Label Model Stealing Attack
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
Previous studies have verified that the functionality of black-box models can be stolen with full probability outputs. However, under the more practical hard-label setting, we observe that existing methods suffer from catastrophic performance degradation. We argue this is due to the lack of rich information in the probability prediction and the overfitting caused by hard labels. To this end, we propose a novel hard-label model stealing method termed black-box dissector, which consists of two erasing-based modules. One is a CAM-driven erasing strategy that is designed to increase the information capacity hidden in hard labels from the victim model. The other is a random-erasing-based self-knowledge distillation module that utilizes soft labels from the substitute model to mitigate overfitting. Extensive experiments on four widely-used datasets consistently demonstrate that our method outperforms state-of-the-art methods, with an improvement of at most $8 . 2 7 \%$ . We also validate the effectiveness and practical potential of our method on real-world APIs and defense methods. Furthermore, our method promotes other downstream tasks, i.e., transfer adversarial attacks.
|
| 11 |
+
|
| 12 |
+
# 16 1 Introduction
|
| 13 |
+
|
| 14 |
+
17 Machine learning models deployed on the cloud can serve users through the application program
|
| 15 |
+
18 interfaces (APIs) to improve productivity. Since developing these cloud models is a product of
|
| 16 |
+
19 intensive labor and monetary effort, these models are valuable intellectual property and AI companies
|
| 17 |
+
20 try to keep them private. However, the exposure of the model’s predictions represents a significant
|
| 18 |
+
21 risk as an adversary can leverage this information to steal the model’s functionality, a.k.a. model
|
| 19 |
+
22 stealing attack [22, 20, 21]. With such an attack, adversaries are able to not only use the stolen model
|
| 20 |
+
23 to make a profit, but also mount further adversarial attacks [34, 29]. Besides, the model stealing
|
| 21 |
+
24 attacks is a kind of black-box knowledge distillation which is a hot research topic. Studying various
|
| 22 |
+
25 mechanisms of model stealing attack is of great interest both to AI companies and researchers.
|
| 23 |
+
26 Previous methods [20, 34, 21] mainly assume the complete probability predictions of the victim
|
| 24 |
+
27 model available, while the real-world APIs usually only return partial probability values (top- $k$
|
| 25 |
+
28 predictions) or even the top-1 prediction (i.e., hard label). In this paper, we focus on the more
|
| 26 |
+
29 challenging and realistic scenario, i.e., the victim model only outputs the hard labels. However, under
|
| 27 |
+
30 this setting, existing methods suffer from a significant performance degradation, even by $3 0 . 5 0 \%$ (as
|
| 28 |
+
31 shown in the Fig. 1 (a) and the appendix Tab. I).
|
| 29 |
+
32 To investigate the reason for the degradation, we evaluate the performance of attack methods with
|
| 30 |
+
33 different numbers of prediction probability categories available and hard labels as in Fig. 1 (b). With
|
| 31 |
+
34 the observation that the performance degrades when the top- $k$ information missing, we conclude
|
| 32 |
+
35 that the top- $k$ predictions are informative as it indicates the similarity of different categories or
|
| 33 |
+
36 multiple objects in the picture, and previous attack methods suffer from such information obscured
|
| 34 |
+
37 by the top-1 prediction under the hard-label setting. It motivates us to re-mine this information by
|
| 35 |
+
38 eliminating the top-1 prediction. Particularly, we design a novel CAM-based erasing method, which
|
| 36 |
+
39 erases the important area on the pictures based on the substitute model’s top-1 class activation maps
|
| 37 |
+
40 (CAM) [24, 33] and queries the victim model for a new prediction. Note that we can dig out other
|
| 38 |
+
41 class information in this sample if the new prediction changes. Otherwise, it proves that the substitute
|
| 39 |
+
42 model pays attention to the wrong area. Then we can align the attention of the substitute and the
|
| 40 |
+
43 victim model by learning clean samples and the corresponding erased samples simultaneously.
|
| 41 |
+
4 Besides, previous works on the
|
| 42 |
+
45 self-Knowledge Distillation (self
|
| 43 |
+
46 KD) [15], calibration [8], and noisy
|
| 44 |
+
47 label [31] have pointed out the
|
| 45 |
+
48 hard and noisy labels will introduce
|
| 46 |
+
49 overfitting and miscalibration. More
|
| 47 |
+
50 specifically, the attack algorithms
|
| 48 |
+
51 cannot access the training data, and
|
| 49 |
+
52 thus can only use the synthetic data or
|
| 50 |
+
53 other datasets as a substitute, which
|
| 51 |
+
54 is noisy. Therefore, the hard-label
|
| 52 |
+
55 setting will suffer from overfitting,
|
| 53 |
+
56 which leads to worse performance,
|
| 54 |
+
57 and we verify it by plotting the loss
|
| 55 |
+
58 curves in Fig. 1 (c). To mitigate
|
| 56 |
+
59 this problem, we introduce a simple
|
| 57 |
+
60 self-knowledge distillation module
|
| 58 |
+
61 with random erasing $( R E )$ to utilize
|
| 59 |
+
62 soft labels for generalization. Partic
|
| 60 |
+
63 ularly, we randomly erase one sample
|
| 61 |
+
64 a certain number of times, query
|
| 62 |
+
65 the substitute model for soft-label
|
| 63 |
+
66 outputs, and take the average value
|
| 64 |
+
67 of these outputs as the pseudo-label.
|
| 65 |
+
68 After that, we use both hard labels
|
| 66 |
+
|
| 67 |
+

|
| 68 |
+
Figure 1: (a) The test accuracies of previous methods with hard labels are much lower than the ones with soft labels. (KN: KnockoffNets, ‘AT’: ActiveThief, $\mathbf { \hat { E } } ^ { \prime }$ : entropy, ‘K’: $\mathbf { k }$ -Center, ‘D’: DFAL) (b) The performance decreases as the number of available classes decreases (dotted line : hardlabel setting). (c) & (d) Loss curves for training/test set during model training without and with self-KD. All results are on the CIFAR10 dataset.
|
| 69 |
+
|
| 70 |
+
from the victim model and pseudo labels from the previous substitute model to train a new substitute model. Therefore, we can also consider the ensemble of the two models as the teacher in knowledge distillation. As in Fig. 1 (d), such a module helps generalization and better performance.
|
| 71 |
+
|
| 72 |
+
72 In summary, we propose a novel model stealing framework termed black-box dissector, which
|
| 73 |
+
73 includes a CAM-driven erasing strategy and a RE-based self-KD module. Our method is orthogonal
|
| 74 |
+
74 to previous approaches [20, 21] and can be integrated with them. The experiments on four widely
|
| 75 |
+
75 used datasets demonstrate our method achieves $4 3 . 0 4 - 9 0 . 5 7 \%$ test accuracy $( 4 7 . 6 0 - 9 1 . 3 7 \%$
|
| 76 |
+
76 agreement) to the victim model, which is at most $8 . 2 7 \%$ higher than the state of the art method.
|
| 77 |
+
77 We also proved that our method can defeat popular defense methods and is effective for real-world
|
| 78 |
+
78 APIs like services provided by Amazon Web Services (AWS). Furthermore, our method promotes
|
| 79 |
+
79 downstream tasks, i.e., transfer adversarial attack, with $4 . 9 1 \% - 1 6 . 2 0 \%$ improvement.
|
| 80 |
+
|
| 81 |
+
# 80 2 Background and Notions
|
| 82 |
+
|
| 83 |
+
81 Model stealing attack is aim to find a substitute model $\hat { f } \colon [ 0 , 1 ] ^ { d } \mapsto \mathbb { R } ^ { N }$ that performs as similarly
|
| 84 |
+
82 as possible to the black-box victim model $f \colon [ 0 , 1 ] ^ { d } \mapsto \mathbb { R } ^ { N }$ (with only outputs accessed). Papernot
|
| 85 |
+
83 et al. [22] first observed that online models could be stolen through multiple queries. After that, due
|
| 86 |
+
84 to the practical threat to real-world APIs, several studies paid attention to this problem and proposed
|
| 87 |
+
85 many attack algorithms.
|
| 88 |
+
86 These algorithms consist of two stages: 1) constructing a transfer dataset $D _ { T }$ (step 1 in Fig. 2) and
|
| 89 |
+
87 2) training a substitute model. The transfer dataset is constructed based on data synthesis or data
|
| 90 |
+
88 selection and then feed into the victim model for labels. Methods based on data synthesis [34, 14, 2]
|
| 91 |
+
89 adopt the GAN-based models to generate a virtual dataset. And the substitute model and the GAN
|
| 92 |
+
90 model are trained alternatively on this virtual dataset by querying the victim model iteratively. The
|
| 93 |
+
91 data selection methods prepare an attack dataset as the data pool, and then sample the most informative
|
| 94 |
+
92 data via machine learning algorithms, e.g., reinforcement learning [20] or active learning strategy [21],
|
| 95 |
+
93 uncertainty-based strategy [17], k-Center strategy [25], and DFAL strategy [5]. Considering that
|
| 96 |
+
94 querying the victim model will be costly, the attacker usually sets a budget on the number of the
|
| 97 |
+
95 queries, so the size of the transfer dataset should be limited as well. Previous methods assume the
|
| 98 |
+
96 victim model returns a complete probability prediction $f ( x )$ , which is less practical.
|
| 99 |
+
97 In this paper, we focus on a more practical scenario that is about hard-label $\phi ( f ( x ) )$ setting, where $\phi$
|
| 100 |
+
98 is the truncation function used to truncate the information contained in the victim’s output and return
|
| 101 |
+
99 the corresponding one-hot vector:
|
| 102 |
+
|
| 103 |
+

|
| 104 |
+
Figure 2: Details of our proposed black-box dissector with a CAM-driven erasing strategy (step 2.1) and a RE-based self-KD module (step 2.2). In step 2.1, the images in transfer set $D _ { T }$ are erased according to the Grad-CAM, and we selected the erased images with the largest difference from the original images according to the substitute model’s outputs. In step 2.2, we randomly erase the unlabeled image $N$ times, and then average the outputs of the $N$ erased images by the substitute model as the pseudo-label.
|
| 105 |
+
|
| 106 |
+
$$
|
| 107 |
+
\phi ( f ( x ) ) _ { i } : = { \left\{ \begin{array} { l l } { 1 } & { { \mathrm { i f ~ } } i = \arg \operatorname* { m a x } _ { n } f ( x ) _ { n } ; } \\ { 0 } & { { \mathrm { o t h e r w i s e } } . } \end{array} \right. }
|
| 108 |
+
$$
|
| 109 |
+
|
| 110 |
+
100 With the transfer dataset, the substitute model is optimized by minimizing a loss function $\mathcal { L }$ (e.g.,
|
| 111 |
+
101 cross-entropy loss function):
|
| 112 |
+
|
| 113 |
+
$$
|
| 114 |
+
\left\{ \begin{array} { l l } { \mathbb { E } _ { x \sim \mathcal { D } _ { T } } \left[ \mathcal { L } \big ( f ( x ) , \hat { f } ( x ) \big ) \right] , } & { \mathrm { f o r ~ s o f t ~ l a b e l s ; } } \\ { \mathbb { E } _ { x \sim \mathcal { D } _ { T } } \left[ \mathcal { L } \big ( \phi ( f ( x ) ) , \hat { f } ( x ) \big ) \right] , } & { \mathrm { f o r ~ h a r d ~ l a b e l s . } } \end{array} \right.
|
| 115 |
+
$$
|
| 116 |
+
|
| 117 |
+
102 Knowledge distillation (KD) has been widely studied in machine learning [10, 1, 6], which transfers
|
| 118 |
+
103 the knowledge from a teacher model to a student model. Model stealing attacks can be regarded as a
|
| 119 |
+
104 black-box KD problem where the victim model is the teacher with only outputs accessible and the
|
| 120 |
+
105 substitute model is the student. The main reason for the success of KD is the valuable information
|
| 121 |
+
106 that defines a rich similarity structure over the data in the probability prediction [10]. However,
|
| 122 |
+
107 for the hard-label setting discussed in this paper, this valuable information is lost. Inspired by KD,
|
| 123 |
+
108 our method tries to dig out the hidden information in the data and models, and then transfers more
|
| 124 |
+
109 knowledge to the substitute model.
|
| 125 |
+
110 The erasing-based method, e.g., random erasing (RE) [32, 3], is currently one of the widely used
|
| 126 |
+
111 data augmentation methods, which generates training images with various levels of occlusion, thereby
|
| 127 |
+
112 reducing the risk of over-fitting and improving the robustness of the model. Our work is inspired
|
| 128 |
+
113 by RE and designs a prior-driven erasing operation, which erases the area corresponding to the hard
|
| 129 |
+
114 label to re-mine missing information.
|
| 130 |
+
116 The overview of our proposed black-box dissector is shown in Fig. 2. In addition to the conventional
|
| 131 |
+
117 process (i.e., the transfer dataset $D _ { T }$ constructing in step 1 and the substitute model training in the
|
| 132 |
+
118 right), we introduce two key modules: a CAM-driven erasing strategy (step 2.1) and a RE-based
|
| 133 |
+
119 self-KD module (step 2.2).
|
| 134 |
+
|
| 135 |
+
# 20 3.1 A CAM-driven erasing strategy
|
| 136 |
+
|
| 137 |
+
121 Since the lack of class similarity infor
|
| 138 |
+
122 mation degrades the performance of
|
| 139 |
+
123 previous methods under the hard-label
|
| 140 |
+
124 setting, we try to re-dig out such hid
|
| 141 |
+
125 den information. Taking an example
|
| 142 |
+
126 from the ILSVRC-2012 dataset for il
|
| 143 |
+
127 lustration as in Fig. 3. Querying the
|
| 144 |
+
128 CUBS200 trained victim model with
|
| 145 |
+
129 this image, we get two classes with
|
| 146 |
+
130 the highest confidence score: “Anna
|
| 147 |
+
131 hummingbird" (0.1364) and “Com
|
| 148 |
+
132 mon yellowthroat" (0.1165), and show
|
| 149 |
+
133 their corresponding attention map in
|
| 150 |
+
134 the first column of Fig. 3. It is easy to
|
| 151 |
+
135 conclude that two different attention
|
| 152 |
+
136 regions response for different classes
|
| 153 |
+
137 according to the attention map. When
|
| 154 |
+
138 training the substitute model with the
|
| 155 |
+
139 hard label “Anna hummingbird" and
|
| 156 |
+
140 without the class similarity informa
|
| 157 |
+
|
| 158 |
+

|
| 159 |
+
Figure 3: An example from the ILSVRC-2012 dataset and its attention map corresponding to two most likely class “Anna humming bird" and “Common yellow throat" on the CUBS200 trained model. The attention areas share similar visual apparent with images of “Anna humming bird" and “Common yellow throat", respectively.
|
| 160 |
+
|
| 161 |
+
tion, the model can not learn from the area related to the “Common yellowthroat" class, which means this area is wasted. To re-dig out the information about the “Common yellowthroat" class, we need to erase the impact of the “Anna hummingbird" class.
|
| 162 |
+
|
| 163 |
+
144 To this end, a natural idea is to erase the response area corresponding to the hard label. Since the
|
| 164 |
+
145 victim model is a black-box model, we use the substitute model to approximately calculate the
|
| 165 |
+
146 attention map instead. If the attention map calculated by the substitute model is inaccurate and the
|
| 166 |
+
147 victim model’s prediction on the erased image does not change, we can also align the attention map of
|
| 167 |
+
148 two models by letting the substitute model learn the original image and the erased one simultaneously.
|
| 168 |
+
149 The attention map is also a kind of supervision signal pushing two models to be similar [30]. To
|
| 169 |
+
150 get the attention map, we utilize the Grad-CAM [24] in this paper. With the input image $x \in [ 0 , 1 ] ^ { d }$
|
| 170 |
+
151 and the trained DNN $\mathcal { F } \colon [ 0 , 1 ] ^ { d } \mapsto \mathbb { R } ^ { N }$ , we let $\alpha _ { k } ^ { c }$ denote the weight of class $c$ corresponding to the
|
| 171 |
+
152 k-th feature map, and calculate it as αck = 1Z Pi Pj , where $Z$ is the number of pixels in the
|
| 172 |
+
153 feature map, $\mathcal { F } ( x ) ^ { c }$ is the score of class $c$ and $A _ { i j } ^ { k }$ is the value of pixel at $( i , j )$ in the $k$ -th feature
|
| 173 |
+
154 map. After obtaining the weights corresponding to all feature maps, the final attention map can be
|
| 174 |
+
155 obtained as $\begin{array} { r } { S _ { \mathrm { G r a d - C A M } } ^ { c } = \tilde { \mathrm { R e L U } } ( \sum _ { k } \hat { \alpha _ { k } ^ { c } } A ^ { k } ) } \end{array}$ via weighted summation.
|
| 175 |
+
156 To erase the corresponding area, inspired by [32], we define a prior-driven erasing operation as
|
| 176 |
+
157 $\psi ( I , P )$ , shown in Alg. 1, which randomly erases a rectangle region in the image $I$ with random
|
| 177 |
+
158 values while the central position of the rectangle region is randomly selected following the prior
|
| 178 |
+
159 probability $P$ . The prior probability $P$ is of the same size as the input image and is used to determine
|
| 179 |
+
160 161 the prior. Let the probability of different pixels being erased. Here, we use the attention map from Grad-CAM as $x \in [ 0 , 1 ] ^ { d }$ denote the input image from the transfer set and $S _ { \mathrm { G r a d - C A M } } ^ { \mathrm { a r g m a x } \hat { f } ( x ) } ( x , \hat { f } )$ denote
|
| 180 |
+
162 the attention map of the substitute model $\hat { f }$ . This CAM-driven erasing operation can be represented:
|
| 181 |
+
|
| 182 |
+
$$
|
| 183 |
+
\psi \left( x , S _ { \mathrm { G r a d - C A M } } ^ { \mathrm { a r g m a x } \hat { f } ( x ) } ( x , \hat { f } ) \right) .
|
| 184 |
+
$$
|
| 185 |
+
|
| 186 |
+
163 We abbreviate it as $\psi ( x , S ( x , { \hat { f } } ) )$ . To alleviate the impact of inaccurate CAM caused by the difference
|
| 187 |
+
164 between the substitute model and the victim one, for each image, we perform this operation $N$ times
|
| 188 |
+
165 $\psi _ { i }$ means the $i$ -th erasing) and select the one with the largest difference from the original label.
|
| 189 |
+
|
| 190 |
+
# Algorithm 1: Prior-driven Erasing Operation $\psi ( I , P )$
|
| 191 |
+
|
| 192 |
+
Input: Input image $I$ , prior probability $P$ , image size $W$ and $H$ , area of image $S$ , erasing area ratio range $s _ { l }$ and $s _ { h }$ , erasing aspect ratio range $r _ { 1 }$ and $r _ { 2 }$ .
|
| 193 |
+
|
| 194 |
+
Output: Erased image $I ^ { \prime }$
|
| 195 |
+
|
| 196 |
+
$S _ { e } \overset { \bar { \mathbf { \sigma } } } { } \operatorname { R a n d } ( s _ { l } , s _ { h } ) \overset { \bar { \mathbf { \sigma } } } { \times } S$ , $r _ { e } \gets \mathrm { R a n d } ( r _ { 1 } , r _ { 2 } ) ^ { 1 }$
|
| 197 |
+
|
| 198 |
+
3 $x _ { e } , y _ { e }$ sampled randomly according to $P$
|
| 199 |
+
4 $I _ { e } \gets ( x _ { e } - W _ { e } , y _ { e } - H _ { e } , x _ { e } + W _ { e } , y _ { e } + H _ { e } )$
|
| 200 |
+
5 $I ( I _ { e } ) \gets \mathrm { R a n d } ( 0 , 2 5 5 )$
|
| 201 |
+
6 $I ^ { \prime } I$
|
| 202 |
+
166 Such a data augment operation helps the erasing process to be more robust. We use the cross-entropy
|
| 203 |
+
167 to calculate the difference between the new label and the original label, and we want to select the
|
| 204 |
+
168 sample with the biggest difference. Formally, we define $\Pi ( x )$ as the function to select the most
|
| 205 |
+
169 different variation of image $x$ :
|
| 206 |
+
|
| 207 |
+
$$
|
| 208 |
+
\begin{array} { r l r } { { \Pi ( x ) : = \psi _ { k } ( x , S ( x , \hat { f } ) ) , } } \\ & { } & { \quad \mathrm { w h e r e } \ k : = \underset { i \in [ N ] } { \arg \operatorname* { m a x } } - \sum _ { j } \phi ( f ( x ) ) _ { j } \cdot \log \Big ( \hat { f } \big ( \psi _ { i } ( x , S ( x , \hat { f } ) ) \big ) _ { j } \Big ) } \\ & { } & { = \underset { i \in [ N ] } { \arg \operatorname* { m a x } } - \log \bigg ( \hat { f } \big ( \psi _ { i } ( x , S ( x , \hat { f } ) ) \big ) _ { \arg \operatorname* { m a x } \phi \big ( f ( x ) \big ) } \bigg ) } \\ & { } & { = \underset { i \in [ N ] } { \arg \operatorname* { m i n } } \hat { f } ( \psi _ { i } ( x , S ( x , \hat { f } ) ) ) _ { \arg \operatorname* { m a x } \phi \big ( f ( x ) \big ) } . } \end{array}
|
| 209 |
+
$$
|
| 210 |
+
|
| 211 |
+
170 Due to the limitation of the number of queries, we cannot query the victim model for each erased
|
| 212 |
+
171 image to obtain a new label. We continuously choose the erased image with the highest substitute’s
|
| 213 |
+
172 confidence until reaching the budget. To measure the confidence of the model, we adopt the Maximum
|
| 214 |
+
173 Softmax Probability (MSP) for its simplicity:
|
| 215 |
+
|
| 216 |
+
$$
|
| 217 |
+
\begin{array} { r l } & { \underset { x \sim \mathcal { D } _ { T } } { \arg \operatorname* { m a x } } M S P \left( \hat { f } \left( \Pi \left( x \right) \right) \right) } \\ & { = \underset { x \sim \mathcal { D } _ { T } } { \arg \operatorname* { m a x } } \hat { f } \left( \Pi \left( x \right) \right) _ { \mathrm { a r g m a x } } \hat { f } ( \Pi ( x ) ) , } \end{array}
|
| 218 |
+
$$
|
| 219 |
+
|
| 220 |
+
174 where $D _ { T }$ is the transfer set. The erased images selected in this way are most likely to change the
|
| 221 |
+
175 prediction class. Then, we query the victim model to get these erased images’ labels and construct
|
| 222 |
+
176 an erased sample set $D _ { E }$ . Note that when the victim model’s predictions on the erased images
|
| 223 |
+
177 change, it means our erasing method does dig out other related class information in the sample. With
|
| 224 |
+
178 the unchanged predictions, it points out the attentions of the substitute model and the victim are
|
| 225 |
+
179 inconsistent. Though wrong attention areas erased, training with these samples benefits aligning the
|
| 226 |
+
180 attentions of two models. As [30] stated, the attention alignment can help more powerful KD.
|
| 227 |
+
|
| 228 |
+
# 181 3.2 A random-erasing-based self-KD module
|
| 229 |
+
|
| 230 |
+
182 We also find that in training with limited hard-label OOD samples, the substitute model is likely
|
| 231 |
+
183 to overfit the training set, which damages its generalization ability [15, 31]. Therefore, based on
|
| 232 |
+
184 the above erasing operation, we further design a simple RE-based self-KD method to improve the
|
| 233 |
+
185 generalization ability of the substitute model.
|
| 234 |
+
186 Formally, let $x \in [ 0 , 1 ] ^ { d }$ denote the unlabeled input image. We perform the erasing operation with a
|
| 235 |
+
187 uniform prior $U$ on it $N$ times, and then average the substitute’s outputs on these erased images as
|
| 236 |
+
188 the pseudo-label of the original image:
|
| 237 |
+
|
| 238 |
+
$$
|
| 239 |
+
y _ { p } ( x , \hat { f } ) = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \hat { f } \big ( \psi _ { i } ( x , U ) \big ) .
|
| 240 |
+
$$
|
| 241 |
+
|
| 242 |
+
${ } ^ { 1 } \mathrm { R a n d } ( a , b )$ returns an evenly distributed random real number in the range of $a$ to $b$ .
|
| 243 |
+
|
| 244 |
+
# Algorithm 2: Black-box Dissector
|
| 245 |
+
|
| 246 |
+
Input: Unlabeled pool $D _ { U }$ , victim model $f$ , maximum number of queries $Q$ .
|
| 247 |
+
Output: Substitute model $\hat { f }$ .
|
| 248 |
+
1 Initialize $q 0 , D _ { T } \emptyset , D _ { E } \emptyset$
|
| 249 |
+
2 while $q < Q$ do
|
| 250 |
+
3 // Step 1
|
| 251 |
+
4 Select samples from $D _ { U }$ according to budget and query $f$ to updata $D _ { T }$
|
| 252 |
+
5 $q = q +$ budget
|
| 253 |
+
6 $\begin{array} { r } { \mathcal { L } = \sum _ { x \in D _ { T } } \mathcal { L } ^ { \prime } \big ( \phi ( f ( x ) ) , \hat { f } ( x ) \big ) } \end{array}$
|
| 254 |
+
7 $\hat { f } \gets u p d a t e ( \hat { f } , \mathcal { L } )$
|
| 255 |
+
8 // A CAM-driven erasing strategy (step 2.1)
|
| 256 |
+
9 Erase samples in $D _ { T }$ according to Eq. 4
|
| 257 |
+
10 Choose samples from erased samples according to Eq. 5 and budget
|
| 258 |
+
11 Query $f$ to get labels and updata $D _ { E }$
|
| 259 |
+
12 $\begin{array} { r } { \mathcal { L } = \sum _ { x \in D _ { T } \cup D _ { E } } \mathcal { L } ^ { \prime } \big ( \phi ( f ( x ) ) , \hat { f } ( x ) \big ) } \end{array}$
|
| 260 |
+
13 $\hat { f } \gets u p d a t e ( \hat { f } , \mathcal { L } )$
|
| 261 |
+
14 $q = q +$ budget
|
| 262 |
+
15 // A random-erasing-based self-KD (step 2.2)
|
| 263 |
+
16 Select samples from $D _ { U }$
|
| 264 |
+
17 Get pseudo-labels according to Eq. 6 and construct a pseudo-label set $D _ { P }$
|
| 265 |
+
18 $\begin{array} { r l } & { \mathcal { L } = \sum _ { x \in D _ { T } \cup D _ { E } } \mathcal { L } ^ { \prime } \big ( \phi ( f ( x ) ) , \hat { f } ( x ) \big ) + \sum _ { x \in D _ { P } } \mathcal { L } ^ { \prime } \big ( y _ { p } ( x , \hat { f } ) , \hat { f } ( x ) \big ) } \\ & { \hat { f } u p d a t e ( \hat { f } , \mathcal { L } ) } \end{array}$
|
| 266 |
+
19
|
| 267 |
+
20 end
|
| 268 |
+
189 This is a type of consistency regularization, which enforces the model to have the same predictions
|
| 269 |
+
190 for the perturbed images and enhances the generalization ability. With Eq.6, we construct a new soft
|
| 270 |
+
191 pseudo label set $D _ { P } = \{ { \bigl ( } x , y _ { p } ( x , { \hat { f } } ) { \bigr ) } , \ldots \}$ .
|
| 271 |
+
192 With the transfer set $D _ { T }$ , the erased sample set $D _ { E }$ , and the pseudo-label set $D _ { P }$ , we train a new
|
| 272 |
+
193 substitute model using the ensemble of the victim model and the previous substitute model as the
|
| 273 |
+
194 teacher. Our final objective function is:
|
| 274 |
+
|
| 275 |
+
$$
|
| 276 |
+
\operatorname* { m i n } \mathcal { L } = \operatorname* { m i n } \big [ \sum _ { x \in D _ { T } \cup D _ { E } } \mathcal { L } ^ { \prime } \big ( \phi ( f ( x ) ) , \hat { f } ( x ) \big ) + \sum _ { x \in D _ { P } } \mathcal { L } ^ { \prime } \big ( y _ { p } ( x , \hat { f } ) , \hat { f } ( x ) \big ) \big ] .
|
| 277 |
+
$$
|
| 278 |
+
|
| 279 |
+
where 195 $\mathcal { L } ^ { \prime }$ can be commonly used loss functions, e.g., cross-entropy loss function.
|
| 280 |
+
|
| 281 |
+
196 To sum up, we built our method on the conventional process of the model stealing attack (step
|
| 282 |
+
197 1), and proposed a CAM-driven erasing strategy (step 2.1) and a RE-based self-KD module (step
|
| 283 |
+
198 2.2) unified by a novel erasing method. The former strategy digs out missing information between
|
| 284 |
+
199 classes and aligns the attention while the latter module helps to mitigate overfitting and enhance the
|
| 285 |
+
200 generalization. We name the whole framework as black-box dissector and present the algorithm
|
| 286 |
+
201 detail of it in Alg. 2.
|
| 287 |
+
|
| 288 |
+
# 4 Experiment
|
| 289 |
+
|
| 290 |
+
# 4.1 Experiment settings
|
| 291 |
+
|
| 292 |
+
Victim model. The victim models we used (ResNet-34 [9]) are trained on four datasets, namely, CIFAR10 [16], SVHN [19], Caltech256 [7], and CUBS200 [28], and their test accuracy are $9 1 . 5 6 \%$ , $9 6 . 4 5 \%$ , $7 8 . 4 0 \%$ , and $7 7 . 1 0 \%$ , respectively. All models are trained using the SGD optimizer with momentum (of 0.5) for 200 epochs with a base learning rate of 0.1 decayed by a factor of 0.1 every 30 epochs. Following [20, 21, 34], we use the same architecture for the substitute model and will analyze the impact of different architectures in the supplementary.
|
| 293 |
+
|
| 294 |
+
210 Attack dataset. We use $1 . 2 M$ images without labels from the ILSVRC-2012 challenge [23] as the
|
| 295 |
+
211 attack dataset. In a real attack scenario, the attacker may use pictures collected from the Internet, and
|
| 296 |
+
212 the ILSVRC-2012 dataset can simulate this scenario well. Note that we resize all images in the attack
|
| 297 |
+
213 dataset to fit the size of the target datasets, which is similar to the existing setting [20, 21, 34].
|
| 298 |
+
|
| 299 |
+
Table 1: The agreement and test accuracy (in $\%$ ) of each method under $3 0 \mathrm { k }$ queries. For our model, we report the average accuracy as well as the standard deviation computed over 5 runs. (Boldface: the best value, italics: the second best value.)
|
| 300 |
+
|
| 301 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">CIFAR10</td><td colspan="2">SVHN</td><td colspan="2">Caltech256</td><td colspan="2">CUBS200</td></tr><tr><td>Agreement</td><td>Acc</td><td>Agreement</td><td>Acc</td><td>Agreement</td><td>Acc</td><td>Agreement</td><td>Acc</td></tr><tr><td>KnockoffNets</td><td>75.32</td><td>74.44</td><td>85.00</td><td>84.50</td><td>57.64</td><td>55.28</td><td>30.01</td><td>28.03</td></tr><tr><td>ActiveThief(Entropy)</td><td>75.26</td><td>74.21</td><td>90.47</td><td>89.85</td><td>56.28</td><td>54.14</td><td>32.05</td><td>29.43</td></tr><tr><td>ActiveThief(k-Center)</td><td>75.71</td><td>74.24</td><td>81.45</td><td>80.79</td><td>61.19</td><td>58.84</td><td>37.68</td><td>34.64</td></tr><tr><td>ActiveThief(DFAL)</td><td>76.72</td><td>75.62</td><td>84.79</td><td>84.17</td><td>46.92</td><td>44.91</td><td>20.31</td><td>18.69</td></tr><tr><td>ActiveThief(DFAL+k-Center)</td><td>74.97</td><td>73.98</td><td>81.40</td><td>80.86</td><td>55.70</td><td>53.69</td><td>26.60</td><td>24.42</td></tr><tr><td>Ours+Random</td><td>82.14±0.16</td><td>80.47±0.02</td><td>92.33±0.47</td><td>91.57±0.29</td><td>62.15±0.52</td><td>59.91±0.58</td><td>38.28±0.31</td><td>35.24±0.49</td></tr><tr><td>Ours+k-Center</td><td>80.84±0.21</td><td>79.27±0.15</td><td>91.47±0.09</td><td>90.68±0.14</td><td>65.12±0.56</td><td>62.72±0.57</td><td>46.69±0.87</td><td>42.91±0.46</td></tr></table>
|
| 302 |
+
|
| 303 |
+

|
| 304 |
+
Figure 4: Curves of the test accuracy versus the number of queries.
|
| 305 |
+
|
| 306 |
+
Training process. We use the SGD optimizer with momentum (of 0.9) for 200 epochs and a base learning rate of $\begin{array} { r } { 0 . 0 2 \times \frac { b a t c h s i z e } { 1 2 8 } } \end{array}$ decayed by a factor of 0.1 every 60 epochs. The weight decay is set to $5 \times 1 0 ^ { - 4 }$ for small datasets (CIFAR10 [16] and SVHN [19]) and 0 for others. We set up a query sequence {0.1K, 0.2K, 0.5K, 0.8K, 1K, 2K, 5K, 10K, 20K, $\mathrm { 3 0 K } \}$ as the iterative maximum query budget, and stop the sampling stage whenever reaching the budget at each iteration.
|
| 307 |
+
|
| 308 |
+
Baselines and evaluation metric. We mainly compare our method with KnockoffNets [20] and ActiveThief [21]. Follow Jagielski et al. [12], we mainly report the test accuracy (Acc) as the evaluation metric. We also report the Agreement metric proposed by Pal et al. [21] which counts how often the prediction of the substitute model is the same as the victim’s as a supplement.
|
| 309 |
+
|
| 310 |
+
# 4.2 Experiment results
|
| 311 |
+
|
| 312 |
+
We first report the performance of our method compared with previous methods. After that, we conduct ablation experiments to analyze the contribution of each module. Finally, we also analyze the performance of our method when encountering defense methods and real-world online APIs. More experiments (e.g., adversarial attack and overfitting analysis) can be found in our supplementary.
|
| 313 |
+
|
| 314 |
+
Effectiveness of our method. As in Tab. 1, the test accuracy and agreement of our method are all better than the previous methods. We also plot the curves of the test accuracy versus the number of queries in Fig. 4. The performance of our method consistently outperforms other methods throughout the process. Since our method does not conflict with the previous sample selection strategy, they can be used simultaneously to further improve the performance of these attacks. Here, we take the $\mathbf { k }$ -Center algorithm as an example. Note that, with or without the sample selection strategy, our method beats the previous methods by a large margin. Particularly, the test accuracies of our method are $4 . 8 5 \%$ , $1 . 7 2 \%$ , $3 . 8 8 \%$ , and $8 . 2 7 \%$ higher than the previous best method, respectively. And the agreement metric shares similar results. It is also interesting that it is less necessary to use the $\mathbf { k }$ -Center algorithm on datasets with a small number of classes (i.e., CIFAR10 and SVHN). While for the datasets with a large number of classes, the k-Center algorithm can make the selected samples better cover each class and improve the effectiveness of the method.
|
| 315 |
+
|
| 316 |
+
240 Ability to evade the SOTA defense method. The SOTA perturbation-based defense method, adap
|
| 317 |
+
241 tive misinformation [13], introduces an Out-Of-Distribution (OOD) detection module based on the
|
| 318 |
+
242 maximum predicted value and punishes the OOD samples with a perturbed model $f ^ { \prime } ( \cdot ; \theta ^ { \prime } )$ . The
|
| 319 |
+
243 model $f ^ { \prime } ( \cdot ; \bar { \theta } ^ { \prime } )$ is trained with arg minθ0 $\mathbb { E } _ { ( x , y ) } [ - \log ( 1 - f ^ { \prime } ( x ; \theta ^ { \prime } ) _ { y } ) ]$ to minimize the probability of
|
| 320 |
+
|
| 321 |
+
Table 2: Ability to evade the state-of-the-art defense method (adaptive misinformation) on CIFAR10 dataset. The larger the threshold, the better the defence effect while the low victim model’s accuracy (threshold 0 means no defence). Our method evades the defense best, and the self-KD part makes a great difference.
|
| 322 |
+
|
| 323 |
+
<table><tr><td rowspan="2">Method</td><td colspan="4">Threshold</td></tr><tr><td>0</td><td>0.5</td><td>0.7</td><td>0.9</td></tr><tr><td>KnockoffNets</td><td>74.44%</td><td>74.13%</td><td>73.61%</td><td>54.98%</td></tr><tr><td>ActiveThief(k-Center)</td><td>74.24%</td><td>69.14%</td><td>59.78%</td><td>50.19%</td></tr><tr><td>ActiveThief(Entropy)</td><td>74.21%</td><td>71.61%</td><td>64.84%</td><td>51.07%</td></tr><tr><td>Ours</td><td>80.47 %</td><td>79.95%</td><td>78.25%</td><td>74.40 %</td></tr><tr><td>Ours w/o self-KD</td><td>79.02%</td><td>78.66%</td><td>73.61%</td><td>61.81%</td></tr><tr><td>victimmodel</td><td>91.56%</td><td>91.23%</td><td>89.10%</td><td>85.14%</td></tr></table>
|
| 324 |
+
|
| 325 |
+
244 the correct class. Finally, the output will be:
|
| 326 |
+
|
| 327 |
+
$$
|
| 328 |
+
y ^ { \prime } = ( 1 - \alpha ) f ( x ; \theta ) + ( \alpha ) f ^ { \prime } ( x ; \theta ^ { \prime } ) ,
|
| 329 |
+
$$
|
| 330 |
+
|
| 331 |
+
245 where $\alpha = 1 / ( 1 + e ^ { \nu ( \operatorname* { m a x } f ( x ; \theta ) - \tau ) } )$ with a hyper-parameter $\nu$ is the coefficient to control how
|
| 332 |
+
246 much correct results will be returned, and $\tau$ is the threshold used for OOD detection. The model
|
| 333 |
+
247 returns incorrect predictions for the OOD samples without having much impact on the in-distribution
|
| 334 |
+
248 samples.
|
| 335 |
+
49 We choose four values of the threshold $\tau$ to compare the effects of our method with the previous
|
| 336 |
+
50 methods. The threshold value of 0 means no defence. The result is shown in Tab. 2. Compared
|
| 337 |
+
51 with other methods, adaptive misinformation is almost invalid to our method. Furthermore, we find
|
| 338 |
+
52 that if we remove the self-KD in our method, the performance is greatly reduced. We conclude that
|
| 339 |
+
53 this is because adaptive misinformation adds noise labels to the substitute model’s training dataset,
|
| 340 |
+
54 and self-KD can alleviate the overfitting of the substitute model to the training dataset, making this
|
| 341 |
+
55 defence method not effective enough.
|
| 342 |
+
|
| 343 |
+
Ablation study. To evaluate the contribution of different modules in our method, we conduct the ablation study on CUBS200 dataset and plot the results in Fig. 5. If the CAM-driven erasing strategy is removed, the performance of our method will be greatly reduced, showing that it has an indispensable position in our method. We also give some visual examples in Fig. 7 to demonstrate that this strategy can help align the attention of two models. As depicted in the Fig. 7, at the beginning time, the substitute model learns the wrong attention map. Along with the iterative training stages, the attention area of the substitute model tends to fit the victim model’s, which conforms to our intention. We further remove the self-KD module to evaluate its performance. It can be found from Fig. 1 and Fig. 5 that the self-KD can improve the generalization of our method and further improve the performance.
|
| 344 |
+
|
| 345 |
+

|
| 346 |
+
Figure 5: Ablation study on CUBS200 dataset for the contribution of the CAM-driven erasing and the self-KD in our method.
|
| 347 |
+
|
| 348 |
+
Stealing functionality of a real-world API. We validate our method is applicable to real-world APIs. The AWS Marketplace is an online store that provides a variety of trained ML models for users. It can only be used in the form of a black-box setting. We choose a popular model (waste classifier 2) as the victim model. We use ILSVRC-2012 dataset as the attack dataset and choose another small public waste classifier dataset 3, containing 2, 527 images as the test dataset. As in Fig. 6, the substitute model obtained by our method achieves $1 2 . 6 3 \%$ and $7 . 3 2 \%$ improvements in test accuracy compared with two previous methods, which show our method has stronger practicality in the real world.
|
| 349 |
+
|
| 350 |
+

|
| 351 |
+
Figure 6: The experiment on AWS online API.
|
| 352 |
+
|
| 353 |
+
Table 3: Transferability of adversarial samples generated with PGD attack on the substitute models.
|
| 354 |
+
Substitute’s CAM of different stages
|
| 355 |
+
|
| 356 |
+
<table><tr><td rowspan="2">Method</td><td colspan="5">Substitute'sarchitecture</td></tr><tr><td>ResNet-34</td><td>ResNet-18</td><td>ResNet-50</td><td>VGG-16</td><td>DenseNet</td></tr><tr><td>KnockoffNets</td><td>57.85%</td><td>63.33%</td><td>52.04%</td><td>42.88%</td><td>60.77%</td></tr><tr><td>ActiveThief(k-Center)</td><td>57.44%</td><td>57.90%</td><td>57.01%</td><td>16.49%</td><td>60.72%</td></tr><tr><td>ActiveThief(Entropy)</td><td>63.56%</td><td>66.76%</td><td>58.19%</td><td>55.43%</td><td>62.05%</td></tr><tr><td>Ours</td><td>76.63%</td><td>74.10%</td><td>74.28%</td><td>67.03%</td><td>66.96%</td></tr></table>
|
| 357 |
+
|
| 358 |
+
Victim’s CAM
|
| 359 |
+
|
| 360 |
+

|
| 361 |
+
Figure 7: The visualized attention maps of the victim model and different stages substitute models using the Grad-CAM. Along with the training stages, the attention map of the substitute model tends to fit the victim model’s.
|
| 362 |
+
|
| 363 |
+
Transferability of adversarial samples. Though with the dominant performance on a wide range of tasks, deep neural networks are shown to be vulnerable to imperceptible perturbations, i.e., adversarial examples [27]. Since the model stealing attack can obtain a functionally similar substitute model, some previous works (e.g., JBDA [22], DaST [34] and ActiveThief [21]) used this substitute model to generate adversarial samples and then performed the transferable adversarial attack on the victim model. We argue that a more similar substitute model leads to a more successful adversarial attacks. We test the transferability of adversarial samples on the test set of the CIFAR10 dataset. Keeping the architecture of the victim model as the ResNet-34, we evaluate the attack success rate of adversarial samples generated from different substitute models (i.e., ResNet-34, ResNet-18, ResNet-50 [9], VGG16 [26], DenseNet [11]). All adversarial samples are generated using Projected Gradient Descent (PGD) attack [18] with maximum $L _ { \infty }$ -norm of perturbations as 8/255. As shown in Tab. 3, the adversarial samples generated by our substitute models have stronger transferability in all substitute’s architectures. This again proves that our method is more practical in real-world scenarios.
|
| 364 |
+
|
| 365 |
+
# 296 5 Conclusion
|
| 366 |
+
|
| 367 |
+
297 We investigated the problem of model stealing attacks under the hard-label setting and pointed out
|
| 368 |
+
298 why previous methods are not effective enough. We presented a new method, termed black-box
|
| 369 |
+
299 dissector, which contains a CAM-driven erasing strategy and a RE-based self-KD module. We
|
| 370 |
+
300 showed its superiority on four widely-used datasets and verified the effectiveness of our method
|
| 371 |
+
301 with defense methods, real-world APIs, and the downstream adversarial attack. Though focusing
|
| 372 |
+
302 on image data in this paper, our method is general for other tasks as long as the CAM and similar
|
| 373 |
+
303 erasing method work, e.g., synonym saliency words replacement for NLP tasks [4]. We believe our
|
| 374 |
+
304 method can be easily extended to other fields and inspire future researchers. Model stealing attack
|
| 375 |
+
305 poses a threat to the deployed machine learning models. We hope this work will draw attention to
|
| 376 |
+
306 the protection of deployed models and furthermore shed more light on the attack mechanisms and
|
| 377 |
+
307 prevention methods.
|
| 378 |
+
|
| 379 |
+
# 308 References
|
| 380 |
+
|
| 381 |
+
frey E Hinton. Large scale distributed neural network training through online distillation. arXiv preprint arXiv:1804.03235, 2018.
|
| 382 |
+
[2] Antonio Barbalau, Adrian Cosma, Radu Tudor Ionescu, and Marius Popescu. Black-box ripper: Copying black-box models using generative evolutionary algorithms. In NeurIPS, 2020.
|
| 383 |
+
[3] Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout. arXiv preprint arXiv:1708.04552, 2017.
|
| 384 |
+
[4] Xinshuai Dong, Anh Tuan Luu, Rongrong Ji, and Hong Liu. Towards robustness against natural language word substitutions. In ICLR, 2021.
|
| 385 |
+
[5] Melanie Ducoffe and Frederic Precioso. Adversarial active learning for deep networks: a margin based approach. In ICML, 2018.
|
| 386 |
+
[6] Tommaso Furlanello, Zachary C Lipton, Michael Tschannen, Laurent Itti, and Anima Anandkumar. Born again neural networks. In ICML, 2018.
|
| 387 |
+
[7] Gregory Griffin, Alex Holub, and Pietro Perona. Caltech-256 object category dataset. 2007.
|
| 388 |
+
[8] Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In ICML, 2017.
|
| 389 |
+
[9] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
|
| 390 |
+
[10] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. In NIPS Deep Learning Workshop, 2015.
|
| 391 |
+
[11] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In CVPR, 2017.
|
| 392 |
+
[12] Matthew Jagielski, Nicholas Carlini, David Berthelot, Alex Kurakin, and Nicolas Papernot. High accuracy and high fidelity extraction of neural networks. In 29th Usenix Security, 2020.
|
| 393 |
+
[13] Sanjay Kariyappa and Moinuddin K Qureshi. Defending against model stealing attacks with adaptive misinformation. In CVPR, 2020.
|
| 394 |
+
[14] Sanjay Kariyappa, Atul Prakash, and Moinuddin Qureshi. Maze: Data-free model stealing attack using zeroth-order gradient estimation. arXiv preprint arXiv:2005.03161, 2020.
|
| 395 |
+
[15] Kyungyul Kim, ByeongMoon Ji, Doyoung Yoon, and Sangheum Hwang. Self-knowledge distillation: A simple way for better generalization. arXiv preprint arXiv:2006.12000, 2020.
|
| 396 |
+
[16] Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. 2009.
|
| 397 |
+
[17] David D Lewis and William A Gale. A sequential algorithm for training text classifiers. In SIGIR, 1994.
|
| 398 |
+
[18] Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In ICLR, 2018.
|
| 399 |
+
[19] Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. In NIPS Workshop on Deep Learning and Unsupervised Feature Learning, 2011.
|
| 400 |
+
[20] Tribhuvanesh Orekondy, Bernt Schiele, and Mario Fritz. Knockoff nets: Stealing functionality of black-box models. In CVPR, 2019.
|
| 401 |
+
[21] Soham Pal, Yash Gupta, Aditya Shukla, Aditya Kanade, Shirish Shevade, and Vinod Ganapathy. Activethief: Model extraction using active learning and unannotated public data. In AAAI, 2020.
|
| 402 |
+
[22] Nicolas Papernot, Patrick McDaniel, Ian Goodfellow, Somesh Jha, Z Berkay Celik, and Ananthram Swami. Practical black-box attacks against machine learning. In ACM AsiACCS, 2017.
|
| 403 |
+
[23] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. IJCV, 2015.
|
| 404 |
+
[24] Ramprasaath R Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra. Grad-cam: Visual explanations from deep networks via gradient-based localization. In ICCV, 2017.
|
| 405 |
+
[25] Ozan Sener and Silvio Savarese. Active learning for convolutional neural networks: A core-set approach. In ICLR, 2018.
|
| 406 |
+
[26] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In ICLR, 2015.
|
| 407 |
+
[27] Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In ICLR, 2014.
|
| 408 |
+
[28] Catherine Wah, Steve Branson, Peter Welinder, Pietro Perona, and Serge Belongie. The caltech-ucsd birds-200-2011 dataset. 2011.
|
| 409 |
+
[29] Jiancheng Yang, Yangzhou Jiang, Xiaoyang Huang, Bingbing Ni, and Chenglong Zhao. Learning black-box attackers with transferable priors and query feedback. In NeurIPS, 2020.
|
| 410 |
+
[30] Sergey Zagoruyko and Nikos Komodakis. Paying more attention to attention: Improving the performance of convolutional neural networks via attention transfer. In ICLR, 2017.
|
| 411 |
+
[31] Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. In ICLR, 2017.
|
| 412 |
+
[32] Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. In AAAI, 2020.
|
| 413 |
+
[33] Bolei Zhou, Aditya Khosla, Agata Lapedriza, Aude Oliva, and Antonio Torralba. Learning deep features for discriminative localization. In CVPR, 2016.
|
| 414 |
+
[34] Mingyi Zhou, Jing Wu, Yipeng Liu, Shuaicheng Liu, and Ce Zhu. Dast: Data-free substitute training for adversarial attacks. In CVPR, 2020.
|
| 415 |
+
|
| 416 |
+
# Checklist
|
| 417 |
+
|
| 418 |
+
1. For all authors...
|
| 419 |
+
|
| 420 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 421 |
+
(b) Did you describe the limitations of your work? [Yes] See section 3
|
| 422 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] See section 5
|
| 423 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 424 |
+
|
| 425 |
+
2. If you are including theoretical results...
|
| 426 |
+
|
| 427 |
+
(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]
|
| 428 |
+
|
| 429 |
+
3. If you ran experiments...
|
| 430 |
+
|
| 431 |
+
(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 the supplemental material
|
| 432 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See section 4.1
|
| 433 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] See Tab. 1
|
| 434 |
+
(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)? [No]
|
| 435 |
+
|
| 436 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 437 |
+
|
| 438 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] See section 4.1 (b) Did you mention the license of the assets? [No] (c) Did you include any new assets either in the supplemental material or as a URL? [No]
|
| 439 |
+
|
| 440 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [No]
|
| 441 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No]
|
| 442 |
+
|
| 443 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 444 |
+
|
| 445 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 446 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 447 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/5k8F6UU39V/5k8F6UU39V.md
ADDED
|
@@ -0,0 +1,376 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# AUTOREGRESSIVE ENTITY RETRIEVAL
|
| 2 |
+
|
| 3 |
+
Nicola De $\mathbf { C a o ^ { 1 , 2 * } }$ , Gautier Izacard $^ { 2 , 3 , 4 }$ , Sebastian Riedel2,5, Fabio Petroni2
|
| 4 |
+
|
| 5 |
+
1University of Amsterdam, 2Facebook AI Research
|
| 6 |
+
3ENS, PSL University, 4Inria, 5University College London
|
| 7 |
+
nicola.decao@gmail.com, {gizacard, sriedel, fabiopetroni}@fb.com
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Entities are at the center of how we represent and aggregate knowledge. For instance, Encyclopedias such as Wikipedia are structured by entities (e.g., one per Wikipedia article). The ability to retrieve such entities given a query is fundamental for knowledge-intensive tasks such as entity linking and open-domain question answering. One way to understand current approaches is as classifiers among atomic labels, one for each entity. Their weight vectors are dense entity representations produced by encoding entity meta information such as their descriptions. This approach leads to several shortcomings: (i) context and entity affinity is mainly captured through a vector dot product, potentially missing fine-grained interactions between the two; (ii) a large memory footprint is needed to store dense representations when considering large entity sets; (iii) an appropriately hard set of negative data has to be subsampled at training time. In this work, we propose GENRE, the first system that retrieves entities by generating their unique names, left to right, token-by-token in an autoregressive fashion and conditioned on the context. This enables us to mitigate the aforementioned technical issues since: (i) the autoregressive formulation allows us to directly capture relations between context and entity name, effectively cross encoding both; (ii) the memory footprint is greatly reduced because the parameters of our encoder-decoder architecture scale with vocabulary size, not entity count; (iii) the exact softmax loss can be efficiently computed without the need to subsample negative data. We show the efficacy of the approach, experimenting with more than 20 datasets on entity disambiguation, end-to-end entity linking and document retrieval tasks, achieving new state-of-the-art or very competitive results while using a tiny fraction of the memory footprint of competing systems. Finally, we demonstrate that new entities can be added by simply specifying their unambiguous name. Code and pre-trained models at https://github.com/facebookresearch/GENRE.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
The ability to retrieve the correct entity from large Knowledge Bases (KBs) given a textual input is a fundamental building block for several applications (Ferrucci, 2012; Slawski, 2015; Yang et al., 2018a). Most commercial recommendation systems, for instance, include in their pipelines components to detect and disambiguate entity mentions in open text, in order to isolate relevant concepts from non-meaningful data (Slawski, 2015; Yang et al., 2018a). Another example are chat-bots and question answering systems, that are often equipped with retrieval components to surface specific KB entries (e.g., Wikipedia articles) to find knowledge for sustaining a conversation or answering a question (Ferrucci, 2012; Chen et al., 2017; Lewis et al., 2020b; Roller et al., 2020).
|
| 16 |
+
|
| 17 |
+
Although there has been extensive previous work on entity retrieval (e.g. Hoffart et al., 2011; Piccinno & Ferragina, 2014; Huang et al., 2015; Le & Titov, 2018; Logeswaran et al., 2019; Broscheit, 2019; Wu et al., 2020, to name just a few) there is a common design choice to most current solutions: entities are associated with a unique atomic label and the retrieval problem can be interpreted as multi-class classification across these labels. The match between input and label is calculated through a bi-encoder (Wu et al., 2020; Karpukhin et al., 2020): a dot product between dense vector encodings of the input and the entity’s meta information (such as title and description).
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Examples of entities correctly retrieved from GENRE (we show only the top-3 rank). On the top three entity disambiguation instances and on the bottom three document retrieval instances, two for open-domain question answering and one for fact checking. All of them are cast as sequenceto-sequence problems while inference is done using constrained beam search. Gold entities in bold. Sub-captions indicate the type of interaction between the input context and the entity names required.
|
| 21 |
+
|
| 22 |
+
Critically, this formulation enables sub-linear search using modern maximum-inner-product-search libraries (Johnson et al., 2019) and hence supports retrieving from large entity databases.
|
| 23 |
+
|
| 24 |
+
Unfortunately, the classifier approach to entity retrieval also has several shortcomings. First, unless a costly cross-encoder is used for re-ranking (Wu et al., 2020), the dot-product can miss fine-grained interactions between input and entity meta information (Humeau et al., 2020). Second, storing dense vectors for the whole KB requires a large memory footprint, especially in real-world scenarios (i.e., ${ \sim } 2 4 \mathrm { G B }$ to store 1024-dimensional vectors for all of the ${ \sim } 6 \mathbf { M }$ Wikipedia pages), and the size linearly grows with the addition of new entities. Third, computing an exact softmax over all entities is very expensive, hence current solutions need to subsample negative data (Logeswaran et al., 2019; Karpukhin et al., 2020) at training time. Tuning an appropriately hard set of negative instances can be challenging and time-consuming. Finally, existing systems can suffer from a cold-start problem since they cannot represent entities about which they have not yet gathered sufficient information, in the form, for instance, of a textual description or a set of relations with the existing entities.
|
| 25 |
+
|
| 26 |
+
The treatment of entity identifiers as atomic labels in a classifier ignores the fact that we often have unambiguous, highly structured and compositional entity names. Wikipedia, for instance, associates unique titles to articles,1 that may be the name of the subject or a description of its topic, as well as potential distinctive information to disambiguate 2 (see Figure 1 for some examples). These entity names often interact with mention contexts in a predictable and regular fashion. For example, often entity names are identical with the mention strings that refer to them (e.g., Fig. 1f). When this is not possible, they might be composed of tokens in the context (e.g., Fig. 1b), include a type specification that can inferred (e.g., Fig. 1a), be the translation of the string mention (e.g., Fig. 1c), require ‘normalization’ such as referring to the correct alias of a mention (e.g., Fig. 1d), or require factual knowledge that might be stored in the parameters of a model (e.g., Fig. 1e). These observations suggest that inputs could be translated into unique entity names, word by word, instead of being classified among a huge set of options.
|
| 27 |
+
|
| 28 |
+
In this paper, we propose GENRE (for Generative ENtity REtrieval), the first entity retriever that exploits a sequence-to-sequence architecture to generate entity names in an autoregressive fashion conditioned on the context. Concretely, GENRE uses a transformer-based architecture, pre-trained with a language modeling objective (i.e., we use BART weights from Lewis et al. (2020a)) and fine-tuned to generate entity names. This architecture has been shown to retain factual knowledge to some extent (Petroni et al., 2019) and language translation skills (Radford et al., 2019) among other things, both desirable properties for an entity retriever. Naturally, the generated output might not always be a valid entity name. To solve this problem, GENRE employs a constrained decoding strategy that forces each generated name to be in a predefined candidate set.
|
| 29 |
+
|
| 30 |
+
The autoregressive formulation allows us to directly capture the aforementioned relations between context and entity name, effectively cross encoding both. Also, the memory footprint required is orders of magnitude smaller than current systems, since the parameters of a sequence-to-sequence model scale linearly with the vocabulary size, not entity count. Moreover, the exact softmax can be computed efficiently for each output token (i.e., all non-gold tokens are considered negative), thereby eliminating the need for negative data downsampling. Finally, our model never accesses any explicit meta-information about the entity beyond their title, hence new entities can be added by simply appending their unambiguous name to the candidate set (e.g., Fig. 1b refers to an entity added after training).
|
| 31 |
+
|
| 32 |
+
We empirically evaluate the performance of GENRE on more than 20 datasets, spanning three families of tasks: (i) entity disambiguation, using popular datasets and settings (both in and out-of– domain); (ii) end-to-end entity linking, with the GERBIL benchmarking tool (Roder et al., 2018), by ¨ using a novel dynamically markup-constrained decoding strategy; (iii) document retrieval, with the recently proposed KILT benchmark (Petroni et al., 2020b) which spans 5 different sub-tasks. Our models achieve state-of-the-art or very competitive results on nearly all datasets, often with substantial improvement $( + 1 3 . 7$ precision points on KILT for retrieval on average). Further, we show that compared with recent models, GENRE requires substantially less memory ${ \sim } 2 0$ times smaller footprint on average). Finally, we demonstrate that our model can be applied in scenarios where the only entity information available is its name.
|
| 33 |
+
|
| 34 |
+
We organize the paper as follows: in Section 2 we describe our problem formulation. Then, in Section 3 we present GENRE and eventually in Section 4 we extensively evaluate our method on the aforementioned settings. We will release code and pre-processed data to reproduce our experiments.
|
| 35 |
+
|
| 36 |
+
# 2 ENTITY RETRIEVAL
|
| 37 |
+
|
| 38 |
+
We assume to have a collection of entities $\mathcal { E }$ (e.g., Wikipedia articles) where each entity is an entry in a Knowledge Base (KB) such as Wikipedia. We want to approach the following retrieval problem: given a textual input source $x$ (e.g., question), a model has to return the most relevant entities from $\mathcal { E }$ with respect to $x$ . We assume that each $e \in { \mathcal { E } }$ is uniquely assigned to a textual representation (i.e., its name): a sequence of tokens $y$ (e.g., Wikipedia pages are identified by their titles).
|
| 39 |
+
|
| 40 |
+
A particular instance of this problem is Entity Disambiguation (ED) (see Figure 1 for an example) where an input $x$ is annotated with a mention and a system has to select either its corresponding entity from $\mathcal { E }$ , or to predict that there is no corresponding entry in the KB. Another instance is pagelevel Document Retrieval (DR) where the input $x$ is intended as a query and $\mathcal { E }$ as a collection of documents identified by their unique titles (e.g., Wikipedia articles).
|
| 41 |
+
|
| 42 |
+
# 3 METHOD
|
| 43 |
+
|
| 44 |
+
We address the retrieval problem with an sequence-to-sequence model that generates textual entity identifiers (i.e., entity names). Concretely, GENRE ranks each $e \in { \mathcal { E } }$ by computing a score with an autoregressive formulation: $\begin{array} { r } { \mathrm { s c o r e } ( e | x ) = p _ { \theta } ( y | x ) = \prod _ { i = 1 } ^ { N } p _ { \theta } ( y _ { i } | y _ { < i } , x ) } \end{array}$ where $y$ is the set of $N$ tokens in the identifier of $e$ , and $\theta$ the parameters of the model. We take advantage of fine-tuning the BART (Lewis et al., 2020a) pre-trained language model. We train GENRE using a standard seq2seq objective, i.e., maximizing the output sequence likelihood with teacher forcing (Sutskever et al., 2011; 2014) and regularized with dropout (Srivastava et al., 2014) and label smoothing (Szegedy et al., 2016). Concretely, we use the objective that is typically used for neural machine translation (NMT, Wu et al., 2016), that is maximizing $\log p \theta ( y | x )$ with respect to model’s parameters $\theta$ which, due to the factorized formulation, can be calculated exactly. We do not need negative sampling to approximate the loss normalizer.
|
| 45 |
+
|
| 46 |
+

|
| 47 |
+
|
| 48 |
+
In 1503, [Leonardo_
|
| 49 |
+
|
| 50 |
+

|
| 51 |
+
|
| 52 |
+
In 1503, [Leonardo](Leonardo_ (a) Outside: we can either continue to generate the input or start a new mention.
|
| 53 |
+
|
| 54 |
+

|
| 55 |
+
|
| 56 |
+
(b) Inside a mention: we can either continue to generate the input or end the current mention.
|
| 57 |
+
|
| 58 |
+
(c) Inside an entity link: we can either generate from the entities prefix trie or close if the generated prefix is a valid entity.
|
| 59 |
+
|
| 60 |
+
Figure 2: Example of dynamically constrained Markup decoding for entity linking using “In 1503, Leonardo began painting the Mona Lisa.” as input. There are 3 cases: when we are outside a mention/entity (a), inside a mention generation step (b), and inside an entity link generation step (c). The model is supposed to output the input source annotating mentions and pointing them to the respective entities: “In 1503, [Leonardo](Leonardo da Vinci) began painting the [Mona Lisa](Mona Lisa)”.
|
| 61 |
+
|
| 62 |
+
# 3.1 INFERENCE WITH CONSTRAINED BEAM SEARCH
|
| 63 |
+
|
| 64 |
+
Naturally, at test time, we could compute a score for every element in $\mathcal { E }$ and then sort them. Unfortunately, this might be prohibitively expensive when $\mathcal { E }$ is very large (e.g., Wikipedia has ${ \sim } 6 \mathbf { M }$ entities). Hence, we exploit Beam Search (BS, Sutskever et al., 2014), an established approximate decoding strategies to efficiently navigate the search space. Instead of explicitly scoring all entities in $\mathcal { E }$ , we search for the top- $k$ entities in $\mathcal { E }$ decoding from our model using BS with $k$ beams. Note that using BS implies that the time cost of our retriever does not depend on the size of $\mathcal { E }$ , but only on the size of the beams and the average length of entity representations as we do autoregressive generation. The average length of entity representations is tractable (e.g., Wikipedia titles have 6 BPE tokens on average) and we follow standard NMT settings where $k$ is small (e.g., 10).
|
| 65 |
+
|
| 66 |
+
Since we want to output only entities from $\mathcal { E }$ we cannot use traditional BS while decoding. Indeed, allowing to generate any token from the vocabulary at every decoding step might lead the model to generate output strings that are not valid identifiers. Hence, we resort to Constrained BS, forcing to only decode valid entity identifiers. BS only considers one step ahead during decoding so we can only constrain the generation of a single next token conditioned on the previous ones. Thus, we define our constrain in terms of a prefix tree $\tau$ (aka trie) (Cormen et al., 2009) where nodes are annotated with tokens from the vocabulary. For each node $t \in \tau$ , its children indicate all the allowed continuations from the prefix defined traversing the trie from the root to $t$ .
|
| 67 |
+
|
| 68 |
+
See Figure 9 in Appendix C for an exampled of a trie. When the number of allowed outputs is tractable (e.g., generating a Wikipedia title among ${ \sim } 6 \mathbf { M } )$ ) the trie is relatively small it can be precomputed and stored into memory (e.g., constraining on Wikipedia titles using the BART tokenizer produces a trie with ${ \sim } 6 \mathbf { M }$ leaves, ${ \sim } 1 7 \mathbf { M }$ internal nodes that occupied ${ \sim } 6 0 0 \mathrm { M B }$ of disk space). We employed the constraints masking the log-probabilities of the invalid tokens and not their logits (i.e., we do not re-normalize the probability over the vocabulary).3
|
| 69 |
+
|
| 70 |
+
# 3.2 AUTOREGRESSIVE END-TO-END ENTITY LINKING
|
| 71 |
+
|
| 72 |
+
We additionally extend our autoregressive framework to address end-to-end Entity Linking (EL) where, given a document, a system has to both detect entity mentions and link those mentions to their respective KB entities. In this setting, we train the model to predict the source input again but with annotated spans. We use a Markup annotation where spans boundaries are flagged with special tokens and accompanied by their corresponding entity identifiers.
|
| 73 |
+
|
| 74 |
+
Differently from a setting where the output space is relatively small (e.g., a pre-defined set $\mathcal { E }$ ), the space of annotated outputs is exponentially large. Hence, it is intractable to pre-compute a trie for decoding, and we compute it dynamically instead. In Figure 2 we show an example. At each generation step, the decoder is either generating a mention span, generating a link to a mention, or continuing from the input source. When outside a mention/entity step the decoder has only two options: (i) to continue by copying the next token from the input source, or (ii) to generate the start of mention token (i.e., ‘[’) which makes the decoder enter the mention generating phase. While generating a mention, the decoder has either to continue with the next token in the input source or to generate the end of mention token (i.e., ‘]’) which makes the decoder enter the entity generating phase. Finally, when generating an entity, the decoder employs the entities trie such that it can only output a valid entity identifier as in Constrained Beam Search explained above.
|
| 75 |
+
|
| 76 |
+
# 4 EXPERIMENTS
|
| 77 |
+
|
| 78 |
+
We extensively evaluate GENRE on more than 20 datasets across 3 tasks: Entity Disambiguation, end-to-end Entity Linking (EL), and page-level Document Retrieval. We describe the experimental settings in Section 4.1 where we discuss results in Section 4.2. All experiments are in English.
|
| 79 |
+
|
| 80 |
+
# 4.1 SETTINGS
|
| 81 |
+
|
| 82 |
+
Entity Disambiguation (ED) We reproduce the setting of Le & Titov (2018) using the same candidate sets, in-domain and out-of-domain datasets, and evaluating using the InKB micro- $F _ { 1 }$ . We train GENRE feeding each document where a single mention is flagged with two special start and end tokens and the target output is the textual representation of the corresponding entity. At test time, we decode using constrained beam search with a trie obtained using the provided candidate set (i.e., a subset of $\mathcal { E }$ ). As large generative models benefit from large amount of data, we first pre-train GENRE on the BLINK data (Wu et al., 2020), i.e., 9M unique triples document-mention-entity from Wikipedia. Then, for the in-domain scenario, we fine-tune using the AIDA-CoNLL dataset (Hoffart et al., 2011). For the out-of-domain scenario, we evaluate on five test sets: MSNBC, AQUAINT, ACE2004, WNED-CWEB (CWEB) and WNED-WIKI (WIKI) (Gabrilovich et al., 2013; Guo & Barbosa, 2018). More task details and hyperparameters setting are reported in Appendix A.1.
|
| 83 |
+
|
| 84 |
+
End-to-End Entity Linking (EL) For EL, we reproduce the setting of Kolitsas et al. (2018) using the same in-domain and out-of-domain datasets as well as evaluating the InKB micro- $F _ { 1 }$ on the GERBIL benchmark platform (Roder et al., 2018). Similarly to the ED setting, we first pre-traine ¨ our model on all abstract sections from Wikipedia4 enriched by a string matching heuristic to solve co-references (i.e., if there is a string that matches exactly with another hyperlink we also add it to the dataset as a mention/entity pairs). Then, for the in-domain scenario, we fine-tune using the AIDACoNLL dataset. We evaluate on seven out-of-domain test sets: MSNBC, Derczynski (Der) (Derczynski et al., 2015), KORE 50 (K50) (Hoffart et al., 2012), N3-Reuters-128 (R128), N3-RSS-500 (R500) (Roder et al., 2014), and OKE challenge 2015 and 2016 (OKE15 and OKE16) (Nuzzolese ¨ et al., 2015). More task details and hyperparameters setting are reported in Appendix A.2.
|
| 85 |
+
|
| 86 |
+
Page-level Document Retrieval (DR) For this setting, we test GENRE on all the KILT benchmark tasks (Petroni et al., 2020b). Here, whole Wikipedia is used as the candidate set and we evaluate using R-precision (Beitzel et al., 2009). KILT consists of five tasks that use the same Wikipedia dump as a knowledge source: fact checking with FEVER (Thorne et al., 2018); open domain question answering using Natural Questions (Kwiatkowski et al., 2019), HotpotQA (Yang et al., 2018b), TriviaQA (Joshi et al., 2017), ELI5 (Fan et al., 2019); slot filling with T-REx (Elsahar et al., 2018), Zero Shot RE (Levy et al., 2017); entity disambiguation on AIDA CoNLL-YAGO, WNED-WIKI and WNED-CWEB; dialogue with Wizard of Wikipedia (Dinan et al., 2019). We train GENRE on BLINK and all KILT data simultaneously with a single model.5 More details on the hyperparameter setting are reported in Appendix A.3.
|
| 87 |
+
|
| 88 |
+
# 4.2 RESULTS
|
| 89 |
+
|
| 90 |
+
Overall, GENRE achieves very competitive results in all of the three settings being the best performing system on average across all of them. See Appendix C for examples of inputs, ground truth and model predictions for all of the three tasks. In the following, we discuss how GENRE compares to SOTA systems as well as showing some quantitative analysis on its memory footprint, how it exploits the structured of the entity name space, and how it behaves on a cold-start scenario where new unseen entities are added to the KB (descriptions of those entities are unobserved).
|
| 91 |
+
|
| 92 |
+
Table 1: Micro $F _ { 1 }$ (InKB) on the in-domain test set and five out-of-domain test sets for the named entity disambiguation task. Bold indicates best model and underline indicates second best (not for ablations). \*WIKI is usually considered out-of-domain but note that all methods use a part of Wikipedia to train. \*\*results taken from https://github.com/facebookresearch/ BLINK and normalized to accommodate entities not in KB.
|
| 93 |
+
|
| 94 |
+
<table><tr><td rowspan="2">Method</td><td rowspan="2">In-domain AIDA</td><td colspan="6">Out-of-domain</td></tr><tr><td>MSNBC</td><td>AQUAINT</td><td>ACE2004</td><td>CWEB</td><td>WIKI*</td><td>Avg.</td></tr><tr><td>Ganea & Hofmann (2017)</td><td>92.2</td><td>93.7</td><td>88.5</td><td>88.5</td><td>77.9</td><td>77.5</td><td>86.4</td></tr><tr><td>Guo & Barbosa (2018)</td><td>89</td><td>92</td><td>87</td><td>88</td><td>77</td><td>84.5</td><td>86.2</td></tr><tr><td>Yang et al. (2018a)</td><td>95.9</td><td>92.6</td><td>89.9</td><td>88.5</td><td>81.8</td><td>79.2</td><td>88.0</td></tr><tr><td>Shahbazi et al. (2019)</td><td>93.5</td><td>92.3</td><td>90.1</td><td>88.7</td><td>78.4</td><td>79.8</td><td>87.1</td></tr><tr><td>Yang et al. (2019)</td><td>93.7</td><td>93.8</td><td>88.2</td><td>90.1</td><td>75.6</td><td>78.8</td><td>86.7</td></tr><tr><td>Le & Titov (2019)</td><td>89.6</td><td>92.2</td><td>90.7</td><td>88.1</td><td>78.2</td><td>81.7</td><td>86.8</td></tr><tr><td>Fang et al. (2019)</td><td>94.3</td><td>92.8</td><td>87.5</td><td>91.2</td><td>78.5</td><td>82.8</td><td>87.9</td></tr><tr><td>BLINK w/o candidate set**</td><td>79.6</td><td>80.0</td><td>80.3</td><td>82.5</td><td>64.2</td><td>75.5</td><td>77.0</td></tr><tr><td>GENRE</td><td>93.3</td><td>94.3</td><td>89.9</td><td>90.1</td><td>77.3</td><td>87.4</td><td>88.8</td></tr><tr><td colspan="8">Ablations</td></tr><tr><td>GENRE only AIDA data</td><td>88.6</td><td>88.1</td><td>77.1</td><td>82.3</td><td>71.9</td><td>71.7</td><td>80.0</td></tr><tr><td>GENRE only BLINK data</td><td>89.3</td><td>93.3</td><td>90.9</td><td>91.1</td><td>76.0</td><td>87.9</td><td>88.1</td></tr><tr><td>GENRE w/o candidate set</td><td>91.2</td><td>86.9</td><td>87.2</td><td>87.5</td><td>71.1</td><td>86.4</td><td>85.1</td></tr><tr><td>GENRE w/o constraints</td><td>86.4</td><td>80.0</td><td>81.7</td><td>82.1</td><td>66.0</td><td>81.1</td><td>79.6</td></tr></table>
|
| 95 |
+
|
| 96 |
+
Comparing GENRE to SOTA systems In ED the difference in average $F _ { 1 }$ score between GENRE and the second best performing system is small (i.e., $+ 0 . 8 )$ however, ED is an established task with more than a decade of research that benchmarked on those datasets. Indeed all systems reported in Table 1 achieved high and similar results even if they were taken from three years back.
|
| 97 |
+
|
| 98 |
+
The improvements on EL are instead more evident. GENRE is the best in-domain system for AIDA while performing remarkably well also on the out-of-domain setting (e.g., $+ 1 3$ $F _ { 1 }$ points on Derczynski, and $+ 4 . 7$ on KORE50). Noticeably, in two datasets (OKE15 and OKE16) our model performs poorly. However, these datasets are annotated with coreference (pronouns and common nouns are linked to entities) while our model was not specifically trained for that. Conversely, most of the other systems, have a mention detection component in their pipelines that can be trained or biased to also solve these cases. We considered out of the aim of this work to additional train and evaluate on coreference and we leave it for future work.
|
| 99 |
+
|
| 100 |
+
On page-level DR, the superiority of GENRE is remarkable. Our model is the best performing system across all 5 KILT tasks and all datasets except on Natural Questions where it is the second best. We achieve $+ 1 3 . 7$ R-precision points on average with respect to the best performing baseline. In Table 3 we compare GENRE against all methods reported in the public leaderboard: DPR (Karpukhin et al., 2020), DPR $+$ BERT (Devlin et al., 2019), DPR $+$ BART, tf-idf (Leskovec et al., 2014), RAG (Lewis et al., 2020b), and BLINK $^ +$ flair (Wu et al., 2020; Akbik et al., 2019). No model except ours was trained on the entire KILT dataset at the same time. A RAG model was trained for every single task as well as for DPR $+$ BERT. Note that this gives and advantage to RAG and DPR $+$ BERT to specialize on single tasks where we have only a single model to solve all of them which still performs better. We speculate that multi-task training could have helped since the all tasks share a common objective to retrieve entities. Both DPR and BLINK $^ +$ flair were not trained specifically on KILT. However, DPR was trained using several QA datasets which include Natural Question and TriviaQA. In Appendix B we report additional results where we do not pre-train or fine-tune our models for both the ED and retrieval setting in Table 1 and 8 respectively. When we train GENRE only in the DPR or BLINK data, our model still outperforms them.
|
| 101 |
+
|
| 102 |
+
<table><tr><td></td><td colspan="9">In-domain</td></tr><tr><td>Method</td><td>AIDA</td><td>MSNBC</td><td>Der</td><td>K50</td><td>R128</td><td>Out-of-domain R500</td><td>OKE15*</td><td>OKE16*</td><td>Avg.</td></tr><tr><td>Hoffart et al. (2011)</td><td>72.8</td><td>65.1</td><td>32.6</td><td>55.4</td><td>46.4</td><td>42.4</td><td>63.1</td><td>0.0</td><td>47.2</td></tr><tr><td>Steinmetz & Sack (2013)</td><td>42.3</td><td>30.9</td><td>26.5</td><td>46.8</td><td>18.1</td><td>20.5</td><td>46.2</td><td>46.4</td><td>34.7</td></tr><tr><td>Moro et al. (2014)</td><td>48.5</td><td>39.7</td><td>29.8</td><td>55.9</td><td>23.0</td><td>29.1</td><td>41.9</td><td>37.7</td><td>38.2</td></tr><tr><td>Kolitsas et al. (2018)</td><td>82.4</td><td>72.4</td><td>34.1</td><td>35.2</td><td>50.3</td><td>38.2</td><td>61.9</td><td>52.7</td><td>53.4</td></tr><tr><td>Broscheit (2019)</td><td>79.3</td><td>1</td><td>1</td><td>-</td><td>1</td><td>1</td><td>-</td><td>1</td><td></td></tr><tr><td>Martins et al. (2019)</td><td>81.9</td><td>-</td><td>-</td><td>-</td><td>1</td><td>1</td><td>1</td><td>1</td><td></td></tr><tr><td>van Hulst et al. (2020)†</td><td>80.5</td><td>72.4</td><td>41.1</td><td>50.7</td><td>49.9</td><td>35.0</td><td>63.1</td><td>58.3</td><td>56.4</td></tr><tr><td>GENRE</td><td>83.7</td><td>73.7</td><td>54.1</td><td>60.7</td><td>46.7</td><td>40.3</td><td>56.1</td><td>50.0</td><td>58.2</td></tr></table>
|
| 103 |
+
|
| 104 |
+
Table 2: Micro $F _ { 1 }$ (InKB) on the in-domain test set and four out-of-domain test sets for the entity linking task. Bold indicates best model and underline indicates second best. \*annotated with coreference (note that we do not train/evaluate our model to link pronouns and common nouns). †results from the Wikipedia 2019 setting as opposed to the 2014 setting (older dump and fewer entities).
|
| 105 |
+
|
| 106 |
+
Memory Footprint GENRE is not only performing better than other SOTA models on DR but it has a significant reduction of memory footprint (disk space). In Figure 4 we compare the number of model/index parameter against DPR, RAG, and BLINK. GENRE uses an order of magnitude less parameters (millions instead of billions) to store the entity index because it just has to use a prefix tree of the entity names as opposed to a dense vector for each entity. Concretely, GENRE occupied 14 times less memory than BLINK and 34 times less memory than DPR.
|
| 107 |
+
|
| 108 |
+
Exploiting the Structured Name Space We investigated some properties of GENRE, comparing two variants of our model to BLINK on the ED task (using WNED-KILT validation set): one trained to generate entity names and another to generate numerical identifiers (IDs). All models are trained on the same data and we report results in Figure 5. When there is an exact match between a mention and its entity name, both BLINK and GENRE almost always make an accurate prediction. Different is the case of partial and no match: GENRE performance is much higher suggesting that our model uses the context more effectively, as the autoregressive formulation allows to cross-encode mention context and entity candidates directly capturing fine-grained interactions between the two. Moreover, when we switch to predicting IDs, the performance drops drastically (-20.3 points on average) indicating that it is important that entity names are meaningful, structured and compositional (as they are in Wikipedia) conversely to atomic IDs. Surprisingly, when there is no overlap between a mention-entity pair, performance are still relatively high by using IDs. This suggests that the model is good at memorizing and recalling identifiers even if numeric.
|
| 109 |
+
|
| 110 |
+
Ablation study We here discuss an ablation study on the entity disambiguation task (see Table 1). Due to space limitation, we discuss an ablation study on document retrieval in Appendix B.2. In Table 1, GENRE only AIDA or BLINK data indicates the ablation for which we only train on one of the two datasets (i.e., only fine-tuning). GENRE (full) is also used with constrained decoding (see Section 3) and in combination with a candidate set (as provided by Le & Titov, 2018). GENRE without candidate set denotes ablating the provided (and small) candidate set and therefore using all the entities in the KB (in our case Wikipedia) as candidates. GENRE without constraints indicates ablating constrained decoding which implies no use of the provided candidates set but also unconstrained generation (i.e., the model may generate entity names that are not in the KB). Eventually, using constrained generation and exploiting the candidate sets proved useful. Training only on AIDA data is insufficient to get high $F _ { 1 }$ (but AIDA is quite small compared to the 9M datapoints of BLINK data).
|
| 111 |
+
|
| 112 |
+
Entity frequency The performance of a model naturally depends on how many times entities appear in the training data. We show the data distribution of the mention-entity frequency in Figure 3. Most of the pairs appears in Wikipedia $( 1 0 9 3 1 / 1 3 3 5 4 )$ where 2423 do not (first bin). The average accuracy is $8 2 . 5 \%$ but noticeable it is higher for mention-entity pairs that are more frequent (right side of the plot). The accuracy for pairs that do not appear in Wikipedia is substantially lower than the average suggesting that those are harder cases (the very end tail of the distribution). The degradation in performance is minimal indicating that our model is good at predicting rare entities.
|
| 113 |
+
|
| 114 |
+
Table 3: R-Precision for page-level retrieval on KILT test data. Bold indicates the best model and underline indicates the second best. For our model, we indicated what datasets we used for training.
|
| 115 |
+
|
| 116 |
+
<table><tr><td>Model</td><td rowspan="2">Fact Check. FEV</td><td colspan="3">Entity Disambiguation</td><td colspan="2">Slot Filling</td><td colspan="3">Open Domain QA</td><td colspan="3">Dial.</td></tr><tr><td></td><td>AY2</td><td>WnWi</td><td>WnCw</td><td>T-REx</td><td>zsRE</td><td>NQ</td><td>HoPo</td><td>TQA</td><td>ELI5</td><td>WoW</td><td>Avg.</td></tr><tr><td>DPR+BERT</td><td>72.9</td><td>-</td><td>-</td><td>-</td><td>1</td><td>40.1</td><td>60.7</td><td>25.0</td><td>43.4</td><td>-</td><td>-</td><td>-</td></tr><tr><td>DPR</td><td>55.3</td><td>1.8</td><td>0.3</td><td>0.5</td><td>13.3</td><td>28.9</td><td>54.3</td><td>25.0</td><td>44.5</td><td>10.7</td><td>25.5</td><td>23.6</td></tr><tr><td>tf-idf</td><td>50.9</td><td>3.7</td><td>0.24</td><td>2.1</td><td>44.7</td><td>60.8</td><td>28.1</td><td>34.1</td><td>46.4</td><td>13.7</td><td>49.0</td><td>30.5</td></tr><tr><td>DPR +BART</td><td>55.3</td><td>75.5</td><td>45.2</td><td>46.9</td><td>13.3</td><td>28.9</td><td>54.3</td><td>25.0</td><td>44.4</td><td>10.7</td><td>25.4</td><td>38.6</td></tr><tr><td>RAG</td><td>61.9</td><td>72.6</td><td>48.1</td><td>47.6</td><td>28.7</td><td>53.7</td><td>59.5</td><td>30.6</td><td>48.7</td><td>11.0</td><td>57.8</td><td>47.3</td></tr><tr><td>BLINK + fair</td><td>63.7</td><td>81.5</td><td>80.2</td><td>68.8</td><td>59.6</td><td>78.8</td><td>24.5</td><td>46.1</td><td>65.6</td><td>9.3</td><td>38.2</td><td>56.0</td></tr><tr><td>GENRE</td><td>83.6</td><td>89.9</td><td>87.4</td><td>71.2</td><td>79.4</td><td>95.8</td><td>60.3</td><td>51.3</td><td>69.2</td><td>15.8</td><td>62.9</td><td>69.7</td></tr></table>
|
| 117 |
+
|
| 118 |
+
Table 4: Comparison between retrieval models on memory (disk space) footprint and number of model/index parameters.
|
| 119 |
+
|
| 120 |
+
<table><tr><td>Model</td><td>Memory</td><td>Param.</td><td>Index</td></tr><tr><td>DPR</td><td>70.9GB</td><td>220M</td><td>15B</td></tr><tr><td>RAG</td><td>40.4GB</td><td>626M</td><td>15B</td></tr><tr><td>BLINK</td><td>30.1GB</td><td>680M</td><td>6B</td></tr><tr><td>GENRE</td><td>2.1GB</td><td>406M</td><td>17M</td></tr></table>
|
| 121 |
+
|
| 122 |
+
Table 5: Different types of matches between mentions and their entity names on the WNED-KILT. \*indicates GENRE trained on numerical identifiers.
|
| 123 |
+
|
| 124 |
+
<table><tr><td>Type (support)</td><td>BLINK</td><td>GENRE</td><td>IDs*</td></tr><tr><td>Exact match (1543)</td><td>97.8</td><td>96.6</td><td>76.0</td></tr><tr><td>Partial match (1531)</td><td>70.7</td><td>86.9</td><td>63.8</td></tr><tr><td>No match (322)</td><td>49.4</td><td>59.9</td><td>55.0</td></tr><tr><td>Total (3396)</td><td>81.0</td><td>88.8</td><td>68.5</td></tr></table>
|
| 125 |
+
|
| 126 |
+
Cold-start We manually collect 50 Wikipedia articles that were created in $2 0 2 0 ^ { 6 }$ to simulate a cold-start setting where new entities are added to the KB and the only entity information available is their names. To create ED instances we resort to hyperlinks pointing to those entities in other Wikipedia articles. 19 out of 50 mentions have an exact match with their respective entity names and all of them were correctly classified by GENRE. In combination with the results from Table 5 we can conclude that GENRE has a bias on exactly copying the mention, and this helps on unseen data. GENRE also correctly classified 14/31 of the remaining mentions $( 4 5 . 2 \% )$ . This demonstrates the ability of our solution to be applied in scenarios where entity metadata is unavailable (apart his name), a setting where, to the best of our knowledge, no existing system is capable to operate.
|
| 127 |
+
|
| 128 |
+
We additionally test how GENRE performs on unseen mention-entity pairs on WikilinksNED Unseen-Mentions data (Onoe & Durrett, 2020) and we report all results in Table 6 in Appendix B.1. Surprisingly, GENRE performs almost the same for seen and unseen entity pairs (64.4 vs 63.2 accuracy) However, in the Onoe & Durrett (2020) setting we cannot guarantee entity descriptions have not been seen by BART during pre-training (given his training data contains Wikipedia).
|
| 129 |
+
|
| 130 |
+
# 5 RELATED WORKS
|
| 131 |
+
|
| 132 |
+
Casting NLP tasks with a structured input or output into sequence-to-sequence problems has been explored for different problems, including semantic parsing (Rongali et al., 2020), semantic role labelling (Daza & Frank, 2018), discourse representation structure parsing (Liu et al., 2018), generation of fluent natural language responses from structured semantic representations (Balakrishnan et al., 2019), generation and parsing of abstract meaning representation (Konstas et al., 2017). In these works a structured representation, a tree or a graph for instance, is linearized into a sequence of symbols compatible with a seq2seq architecture. To the best of our knowledge, we are the first to cast entity retrieval as a sequence-to-sequence problem while decoding with an autoregressive formulation during inference.
|
| 133 |
+
|
| 134 |
+
Related to our constrained generation mechanism, Daza & Frank (2018); Rongali et al. (2020) use a copying mechanism in order to limit lexical deviations between the input and output strings. In these tasks, as well as for our problem, it is natural to promote a copying mechanism due to the input and the output proximity. A different type of constraint, a structural constraint, is used in Balakrishnan et al. (2019) to maintain a valid tree structure. Our constrained beam search encompasses both aspects, a copying mechanism that restrains the vocabulary and a structural constraint to obtain a well-formed annotated output. In addition to these tasks with close input and output, the integration of a mechanism to guide the output of neural networks has been explored in various settings. Lexically constrained decoding has been used to force the inclusion of pre-specified words for machine translation (Hokamp & Liu, 2017; Post & Vilar, 2018), and image captioning (Anderson et al., 2017). To the best of our knowledge, we are the first to exploit constrained generation for entity disambiguation, end-to-end entity linking, and query-based entity retrieval.
|
| 135 |
+
|
| 136 |
+

|
| 137 |
+
Figure 3: Accuracy per mention-entity pair frequency (in Wikipedia) on the validation sets of all Entity Disambiguation tasks in KILT.
|
| 138 |
+
|
| 139 |
+
Nogueira et al. (2020) propose to use a sequence-to-sequence model to re-rank document. Given a query and a document the model is trained to output the words ”true” or ”false” depending on whether the document is relevant or not. Differently from our approach for entity retrieval, it requires a limited list of candidates documents, obtained with BM25 for instance, in order to be computationally possible. Massarelli et al. (2019); Petroni et al. (2020a) explore the idea of using an autoregressive language model as neural retriever, by exploiting the implicit knowledge stored in their parameters to generate relevant sentences given a query. While intriguing, such solutions still lag behind retrievers with an explicit knowledge access (e.g., an explicit Wikipedia index). The idea of using a generative model for entity disambiguation was proposed in Petroni et al. (2020b) as they trained both BART and T5 in a seq2seq fashion on all KILT tasks (including ED). We expanded that intuition generalizing on multiple tasks (end-to-end EL and page-level retrieval) as well as introducing constrained decoding for an efficient and effective search.
|
| 140 |
+
|
| 141 |
+
# 6 CONCLUSIONS
|
| 142 |
+
|
| 143 |
+
In this work, we propose GENRE, a novel paradigm to addresses entity retrieval: generate entity names autoregressively. Entity names have several properties that might help (even humans) retrieving them, including a compositional structure and a predictable interaction with the context. The autoregressive formulation allows us to directly capture some of these properties, leading to several advantages with respect to current solutions, including an efficient way to cross encode mention context and entity candidates, a much smaller memory footprint, and the ability to compute an exact softmax without the need to subsample negative data. We empirically show that these characteristics, combined with constrained decoding strategies, led to state-of-the-art performance on a plethora of entity retrieval datasets, spanning entity disambiguation, end-to-end entity linking, and page-level document retrieval, while resulting in systems with a remarkably contained memory footprint, a space reduction by a factor of twenty on average. We additionally demonstrate that new entities can be effectively considered in our system by simply appending their unambiguous name to the candidate set.
|
| 144 |
+
|
| 145 |
+
# ACKNOWLEDGMENTS
|
| 146 |
+
|
| 147 |
+
Authors thank Patrick Lewis, Aleksandra Piktus, Michael Schlichtkrull, Ivan Titov, Jean Maillard, Edouard Grave, Sergio De Cao, Luisa Quarta for helpful discussions and technical support.
|
| 148 |
+
|
| 149 |
+
# REFERENCES
|
| 150 |
+
|
| 151 |
+
Alan Akbik, Tanja Bergmann, Duncan Blythe, Kashif Rasul, Stefan Schweter, and Roland Vollgraf. FLAIR: An easy-to-use framework for state-of-the-art NLP. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations), pp. 54–59, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-4010. URL https://www.aclweb.org/anthology/ N19-4010.
|
| 152 |
+
|
| 153 |
+
Peter Anderson, Basura Fernando, Mark Johnson, and Stephen Gould. Guided open vocabulary image captioning with constrained beam search. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 936–945, Copenhagen, Denmark, September 2017. Association for Computational Linguistics. doi: 10.18653/v1/D17-1098. URL https://www.aclweb.org/anthology/D17-1098.
|
| 154 |
+
|
| 155 |
+
Anusha Balakrishnan, Jinfeng Rao, Kartikeya Upasani, Michael White, and Rajen Subba. Constrained decoding for neural NLG from compositional representations in task-oriented dialogue. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 831–844, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1080. URL https://www.aclweb.org/anthology/P19-1080.
|
| 156 |
+
|
| 157 |
+
Steven M. Beitzel, Eric C. Jensen, and Ophir Frieder. Average R-Precision, pp. 195–195. Springer US, Boston, MA, 2009. ISBN 978-0-387-39940-9. doi: 10.1007/978-0-387-39940-9 491. URL https://doi.org/10.1007/978-0-387-39940-9_491.
|
| 158 |
+
|
| 159 |
+
Samuel Broscheit. Investigating entity knowledge in BERT with simple neural end-to-end entity linking. In Proceedings of the 23rd Conference on Computational Natural Language Learning (CoNLL), pp. 677–685, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/K19-1063. URL https://www.aclweb.org/anthology/ K19-1063.
|
| 160 |
+
|
| 161 |
+
Danqi Chen, Adam Fisch, Jason Weston, and Antoine Bordes. Reading Wikipedia to answer open-domain questions. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1870–1879, Vancouver, Canada, July 2017. Association for Computational Linguistics. doi: 10.18653/v1/P17-1171. URL https: //www.aclweb.org/anthology/P17-1171.
|
| 162 |
+
|
| 163 |
+
Shuang Chen, Jinpeng Wang, Feng Jiang, and Chin-Yew Lin. Improving entity linking by modeling latent entity type information. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pp. 7529–7537, 2020.
|
| 164 |
+
|
| 165 |
+
Thomas H Cormen, Charles E Leiserson, Ronald L Rivest, and Clifford Stein. Introduction to algorithms. MIT press, 2009.
|
| 166 |
+
|
| 167 |
+
Angel Daza and Anette Frank. A sequence-to-sequence model for semantic role labeling. In Proceedings of The Third Workshop on Representation Learning for NLP, pp. 207–216, Melbourne, Australia, July 2018. Association for Computational Linguistics. doi: 10.18653/v1/W18-3027. URL https://www.aclweb.org/anthology/W18-3027.
|
| 168 |
+
|
| 169 |
+
Leon Derczynski, Diana Maynard, Giuseppe Rizzo, Marieke Van Erp, Genevieve Gorrell, Raphael¨ Troncy, Johann Petrak, and Kalina Bontcheva. Analysis of named entity recognition and linking for tweets. Information Processing & Management, 51(2):32–49, 2015.
|
| 170 |
+
|
| 171 |
+
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), pp. 4171–4186, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1423. URL https: //www.aclweb.org/anthology/N19-1423.
|
| 172 |
+
|
| 173 |
+
Emily Dinan, Stephen Roller, Kurt Shuster, Angela Fan, Michael Auli, and Jason Weston. Wizard of wikipedia: Knowledge-powered conversational agents. Proceedings of the International Conference on Learning Representations (ICLR), 2019.
|
| 174 |
+
|
| 175 |
+
Hady Elsahar, Pavlos Vougiouklis, Arslen Remaci, Christophe Gravier, Jonathon Hare, Elena Simperl, and Frederique Laforest. T-rex: A large scale alignment of natural language with knowledge base triples. LREC, 2018.
|
| 176 |
+
|
| 177 |
+
Angela Fan, Yacine Jernite, Ethan Perez, David Grangier, Jason Weston, and Michael Auli. ELI5: long form question answering. In Anna Korhonen, David R. Traum, and Lluis Marquez (eds.), Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019, Florence, Italy, July 28- August 2, 2019, Volume 1: Long Papers, pp. 3558–3567. Association for Computational Linguistics, 2019. doi: 10.18653/v1/p19-1346. URL https://doi.org/ 10.18653/v1/p19-1346.
|
| 178 |
+
|
| 179 |
+
Zheng Fang, Yanan Cao, Qian Li, Dongjie Zhang, Zhenyu Zhang, and Yanbing Liu. Joint entity linking with deep reinforcement learning. In The World Wide Web Conference, pp. 438–447. ACM, 2019.
|
| 180 |
+
|
| 181 |
+
David A Ferrucci. Introduction to “this is watson”. IBM Journal of Research and Development, 56 (3.4):1–1, 2012.
|
| 182 |
+
|
| 183 |
+
Evgeniy Gabrilovich, Michael Ringgaard, and Amarnag Subramanya. Facc1: Freebase annotation of clueweb corpora, version 1 (release date 2013-06-26, format version 1, correction level 0). Note: http://lemurproject. org/clueweb09/FACC1/Cited by, 5:140, 2013.
|
| 184 |
+
|
| 185 |
+
Octavian-Eugen Ganea and Thomas Hofmann. Deep joint entity disambiguation with local neural attention. In Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing, pp. 2619–2629, Copenhagen, Denmark, September 2017. Association for Computational Linguistics. doi: 10.18653/v1/D17-1277. URL https://www.aclweb.org/anthology/ D17-1277.
|
| 186 |
+
|
| 187 |
+
Zhaochen Guo and Denilson Barbosa. Robust named entity disambiguation with random walks. Semantic Web, 9(4):459–479, 2018.
|
| 188 |
+
|
| 189 |
+
Johannes Hoffart, Mohamed Amir Yosef, Ilaria Bordino, Hagen Furstenau, Manfred Pinkal, Marc ¨ Spaniol, Bilyana Taneva, Stefan Thater, and Gerhard Weikum. Robust disambiguation of named entities in text. In Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing, pp. 782–792, Edinburgh, Scotland, UK., July 2011. Association for Computational Linguistics. URL https://www.aclweb.org/anthology/D11-1072.
|
| 190 |
+
|
| 191 |
+
Johannes Hoffart, Stephan Seufert, Dat Ba Nguyen, Martin Theobald, and Gerhard Weikum. KORE: Keyphrase Overlap Relatedness for Entity Disambiguation. In Proceedings of the 21st ACM International Conference on Information and Knowledge Management, CIKM ’12, pp. 545–554, New York, NY, USA, 2012. Association for Computing Machinery. ISBN 9781450311564. doi: 10.1145/2396761.2396832. URL https://doi.org/10.1145/2396761.2396832.
|
| 192 |
+
|
| 193 |
+
Chris Hokamp and Qun Liu. Lexically constrained decoding for sequence generation using grid beam search. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1535–1546, Vancouver, Canada, July 2017. Association for Computational Linguistics. doi: 10.18653/v1/P17-1141. URL https://www.aclweb. org/anthology/P17-1141.
|
| 194 |
+
|
| 195 |
+
Hongzhao Huang, Larry Heck, and Heng Ji. Leveraging deep neural networks and knowledge graphs for entity disambiguation. arXiv preprint arXiv:1504.07678, 2015.
|
| 196 |
+
|
| 197 |
+
Samuel Humeau, Kurt Shuster, Marie-Anne Lachaux, and Jason Weston. Poly-encoders: Architectures and pre-training strategies for fast and accurate multi-sentence scoring. In International Conference on Learning Representations, 2020. URL https://openreview.net/forum? id $=$ SkxgnnNFvH.
|
| 198 |
+
|
| 199 |
+
Jeff Johnson, Matthijs Douze, and Herve J ´ egou. Billion-scale similarity search with gpus. ´ IEEE Transactions on Big Data, 2019.
|
| 200 |
+
|
| 201 |
+
Mandar Joshi, Eunsol Choi, Daniel Weld, and Luke Zettlemoyer. TriviaQA: A large scale distantly supervised challenge dataset for reading comprehension. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp.
|
| 202 |
+
|
| 203 |
+
1601–1611, Vancouver, Canada, July 2017. Association for Computational Linguistics. doi:
|
| 204 |
+
10.18653/v1/P17-1147. URL https://www.aclweb.org/anthology/P17-1147.
|
| 205 |
+
|
| 206 |
+
Vladimir Karpukhin, Barlas Oguz, Sewon Min, Patrick Lewis, Ledell Wu, Sergey Edunov, Danqi Chen, and Wen-tau Yih. Dense passage retrieval for open-domain question answering. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 6769–6781, Online, November 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.emnlp-main.550. URL https://www.aclweb.org/anthology/ 2020.emnlp-main.550.
|
| 207 |
+
|
| 208 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. Proceedings of the 3rd International Conference on Learning Representations (ICLR), 2014.
|
| 209 |
+
|
| 210 |
+
Nikolaos Kolitsas, Octavian-Eugen Ganea, and Thomas Hofmann. End-to-end neural entity linking. In Proceedings of the 22nd Conference on Computational Natural Language Learning, pp. 519– 529, Brussels, Belgium, October 2018. Association for Computational Linguistics. doi: 10.18653/ v1/K18-1050. URL https://www.aclweb.org/anthology/K18-1050.
|
| 211 |
+
|
| 212 |
+
Ioannis Konstas, Srinivasan Iyer, Mark Yatskar, Yejin Choi, and Luke Zettlemoyer. Neural AMR: Sequence-to-sequence models for parsing and generation. In Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 146–157, Vancouver, Canada, July 2017. Association for Computational Linguistics. doi: 10.18653/v1/ P17-1014. URL https://www.aclweb.org/anthology/P17-1014.
|
| 213 |
+
|
| 214 |
+
Tom Kwiatkowski, Jennimaria Palomaki, Olivia Redfield, Michael Collins, Ankur Parikh, Chris Alberti, Danielle Epstein, Illia Polosukhin, Jacob Devlin, Kenton Lee, Kristina Toutanova, Llion Jones, Matthew Kelcey, Ming-Wei Chang, Andrew M. Dai, Jakob Uszkoreit, Quoc Le, and Slav Petrov. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:452–466, March 2019. doi: 10.1162/tacl a 00276. URL https://www.aclweb.org/anthology/Q19-1026.
|
| 215 |
+
|
| 216 |
+
Phong Le and Ivan Titov. Improving entity linking by modeling latent relations between mentions. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1595–1604, Melbourne, Australia, July 2018. Association for Computational Linguistics. doi: 10.18653/v1/P18-1148. URL https://www.aclweb.org/anthology/ P18-1148.
|
| 217 |
+
|
| 218 |
+
Phong Le and Ivan Titov. Boosting entity linking performance by leveraging unlabeled documents. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 1935–1945, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/ v1/P19-1187. URL https://www.aclweb.org/anthology/P19-1187.
|
| 219 |
+
|
| 220 |
+
Jure Leskovec, Anand Rajaraman, and Jeffrey David Ullman. Mining of Massive Datasets. Cambridge University Press, USA, 2nd edition, 2014. ISBN 1107077230.
|
| 221 |
+
|
| 222 |
+
Omer Levy, Minjoon Seo, Eunsol Choi, and Luke Zettlemoyer. Zero-shot relation extraction via reading comprehension. In Proceedings of the 21st Conference on Computational Natural Language Learning (CoNLL 2017), pp. 333–342, Vancouver, Canada, August 2017. Association for Computational Linguistics. doi: 10.18653/v1/K17-1034. URL https://www.aclweb. org/anthology/K17-1034.
|
| 223 |
+
|
| 224 |
+
Mike Lewis, Yinhan Liu, Naman Goyal, Marjan Ghazvininejad, Abdelrahman Mohamed, Omer Levy, Veselin Stoyanov, and Luke Zettlemoyer. BART: Denoising sequence-to-sequence pretraining for natural language generation, translation, and comprehension. In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics, pp. 7871–7880, Online, July 2020a. Association for Computational Linguistics. doi: 10.18653/v1/2020.acl-main.703. URL https://www.aclweb.org/anthology/2020.acl-main.703.
|
| 225 |
+
|
| 226 |
+
Patrick Lewis, Ethan Perez, Aleksandara Piktus, Fabio Petroni, Vladimir Karpukhin, Naman Goyal, Heinrich Kuttler, Mike Lewis, Wen-tau Yih, Tim Rockt ¨ aschel, et al. Retrieval-augmented gener- ¨ ation for knowledge-intensive NLP tasks. arXiv preprint arXiv:2005.11401, 2020b.
|
| 227 |
+
|
| 228 |
+
Jiangming Liu, Shay B. Cohen, and Mirella Lapata. Discourse representation structure parsing. In Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 429–439, Melbourne, Australia, July 2018. Association for Computational Linguistics. doi: 10.18653/v1/P18-1040. URL https://www.aclweb.org/anthology/ P18-1040.
|
| 229 |
+
|
| 230 |
+
Lajanugen Logeswaran, Ming-Wei Chang, Kenton Lee, Kristina Toutanova, Jacob Devlin, and Honglak Lee. Zero-shot entity linking by reading entity descriptions. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics, pp. 3449–3460, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-1335. URL https://www.aclweb.org/anthology/P19-1335.
|
| 231 |
+
|
| 232 |
+
Pedro Henrique Martins, Zita Marinho, and Andre F. T. Martins. Joint learning of named entity ´ recognition and entity linking. In Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics: Student Research Workshop, pp. 190–196, Florence, Italy, July 2019. Association for Computational Linguistics. doi: 10.18653/v1/P19-2026. URL https: //www.aclweb.org/anthology/P19-2026.
|
| 233 |
+
|
| 234 |
+
Luca Massarelli, Fabio Petroni, Aleksandra Piktus, Myle Ott, Tim Rocktaschel, Vassilis Plachouras, ¨ Fabrizio Silvestri, and Sebastian Riedel. How decoding strategies affect the verifiability of generated text. arXiv preprint arXiv:1911.03587, 2019.
|
| 235 |
+
|
| 236 |
+
Andrea Moro, Alessandro Raganato, and Roberto Navigli. Entity linking meets word sense disambiguation: a unified approach. Transactions of the Association for Computational Linguistics, 2:231–244, 2014. doi: 10.1162/tacl a 00179. URL https://www.aclweb.org/ anthology/Q14-1019.
|
| 237 |
+
|
| 238 |
+
Isaiah Onando Mulang’, Kuldeep Singh, Chaitali Prabhu, Abhishek Nadgeri, Johannes Hoffart, and Jens Lehmann. Evaluating the impact of knowledge graph context on entity disambiguation models. In Proceedings of the 29th ACM International Conference on Information & Knowledge Management, pp. 2157–2160, 2020.
|
| 239 |
+
|
| 240 |
+
Rodrigo Nogueira, Zhiying Jiang, Ronak Pradeep, and Jimmy Lin. Document ranking with a pretrained sequence-to-sequence model. In Findings of the Association for Computational Linguistics: EMNLP 2020, pp. 708–718, Online, November 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.findings-emnlp.63. URL https://www.aclweb.org/ anthology/2020.findings-emnlp.63.
|
| 241 |
+
|
| 242 |
+
Andrea Giovanni Nuzzolese, Anna Lisa Gentile, Valentina Presutti, Aldo Gangemi, Dar´ıo Garigliotti, and Roberto Navigli. Open knowledge extraction challenge. In Semantic Web Evaluation Challenges, pp. 3–15. Springer, 2015.
|
| 243 |
+
|
| 244 |
+
Yasumasa Onoe and Greg Durrett. Fine-grained entity typing for domain independent entity linking. In AAAI, pp. 8576–8583, 2020.
|
| 245 |
+
|
| 246 |
+
Myle Ott, Sergey Edunov, Alexei Baevski, Angela Fan, Sam Gross, Nathan $\mathrm { N g }$ , David Grangier, and Michael Auli. fairseq: A fast, extensible toolkit for sequence modeling. In Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics (Demonstrations), pp. 48–53, 2019.
|
| 247 |
+
|
| 248 |
+
Fabio Petroni, Tim Rocktaschel, Sebastian Riedel, Patrick Lewis, Anton Bakhtin, Yuxiang Wu, and ¨ Alexander Miller. Language models as knowledge bases? In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 2463–2473, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1250. URL https://www.aclweb.org/anthology/D19-1250.
|
| 249 |
+
|
| 250 |
+
Fabio Petroni, Patrick Lewis, Aleksandra Piktus, Tim Rocktaschel, Yuxiang Wu, Alexander H.¨ Miller, and Sebastian Riedel. How context affects language models’ factual predictions. In Automated Knowledge Base Construction, 2020a. URL https://openreview.net/forum? id=025X0zPfn.
|
| 251 |
+
|
| 252 |
+
Fabio Petroni, Aleksandra Piktus, Angela Fan, Patrick Lewis, Majid Yazdani, Nicola De Cao, James Thorne, Yacine Jernite, Vassilis Plachouras, Tim Rocktaschel, et al. KILT: a Benchmark for ¨ Knowledge Intensive Language Tasks. arXiv preprint arXiv:2009.02252, 2020b.
|
| 253 |
+
|
| 254 |
+
Francesco Piccinno and Paolo Ferragina. From tagme to wat: A new entity annotator. In Proceedings of the First International Workshop on Entity Recognition and Disambiguation, ERD ’14, pp. 55–62, New York, NY, USA, 2014. Association for Computing Machinery. ISBN 9781450330237. doi: 10.1145/2633211.2634350. URL https://doi.org/10.1145/ 2633211.2634350.
|
| 255 |
+
|
| 256 |
+
Matt Post and David Vilar. Fast lexically constrained decoding with dynamic beam allocation for neural machine translation. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 1314–1324, New Orleans, Louisiana, June 2018. Association for Computational Linguistics. doi: 10.18653/v1/N18-1119. URL https://www.aclweb.org/ anthology/N18-1119.
|
| 257 |
+
|
| 258 |
+
A. Radford, Jeffrey Wu, R. Child, David Luan, Dario Amodei, and Ilya Sutskever. Language models are unsupervised multitask learners. In Technical report, OpenAI, 2019.
|
| 259 |
+
|
| 260 |
+
Jonathan Raiman and Olivier Raiman. Deeptype: multilingual entity linking by neural type system evolution. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018.
|
| 261 |
+
|
| 262 |
+
Michael Roder, Ricardo Usbeck, Sebastian Hellmann, Daniel Gerber, and Andreas Both.¨ $\mathbf { N } ^ { 3 }$ -a collection of datasets for named entity recognition and disambiguation in the nlp interchange format. In LREC, pp. 3529–3533, 2014.
|
| 263 |
+
|
| 264 |
+
Michael Roder, Ricardo Usbeck, and Axel-Cyrille Ngonga Ngomo. Gerbil–benchmarking named ¨ entity recognition and linking consistently. Semantic Web, 9(5):605–625, 2018.
|
| 265 |
+
|
| 266 |
+
Stephen Roller, Emily Dinan, Naman Goyal, Da Ju, Mary Williamson, Yinhan Liu, Jing Xu, Myle Ott, Kurt Shuster, Eric M Smith, et al. Recipes for building an open-domain chatbot. arXiv preprint arXiv:2004.13637, 2020.
|
| 267 |
+
|
| 268 |
+
Subendhu Rongali, Luca Soldaini, Emilio Monti, and Wael Hamza. Don’t parse, generate! a sequence to sequence architecture for task-oriented semantic parsing. In Proceedings of The Web Conference 2020, WWW ’20, pp. 2962–2968. Association for Computing Machinery, 2020.
|
| 269 |
+
|
| 270 |
+
Hamed Shahbazi, Xiaoli Z Fern, Reza Ghaeini, Rasha Obeidat, and Prasad Tadepalli. Entity-aware ELMo: Learning Contextual Entity Representation for Entity Disambiguation. arXiv preprint arXiv:1908.05762, 2019.
|
| 271 |
+
|
| 272 |
+
Bill Slawski, Sep 2015. URL https://www.seobythesea.com/2015/09/ disambiguate-entities-in-queries-and-pages/.
|
| 273 |
+
|
| 274 |
+
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: A simple way to prevent neural networks from overfitting. Journal of Machine Learning Research, 15(56):1929–1958, 2014. URL http://jmlr.org/papers/v15/ srivastava14a.html.
|
| 275 |
+
|
| 276 |
+
Nadine Steinmetz and Harald Sack. Semantic multimedia information retrieval based on contextual descriptions. In Philipp Cimiano, Oscar Corcho, Valentina Presutti, Laura Hollink, and Sebastian Rudolph (eds.), The Semantic Web: Semantics and Big Data, pp. 382–396, Berlin, Heidelberg, 2013. Springer Berlin Heidelberg. ISBN 978-3-642-38288-8.
|
| 277 |
+
|
| 278 |
+
Ilya Sutskever, James Martens, and Geoffrey E Hinton. Generating text with recurrent neural networks. In Proceedings of the 28th International Conference on Machine Learning (ICML),, pp. 1017—-1024., 2011.
|
| 279 |
+
|
| 280 |
+
Ilya Sutskever, Oriol Vinyals, and Quoc V Le. Sequence to sequence learning with neural networks. In Advances in neural information processing systems, pp. 3104–3112, 2014.
|
| 281 |
+
|
| 282 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 2818–2826, 2016.
|
| 283 |
+
|
| 284 |
+
James Thorne, Andreas Vlachos, Christos Christodoulopoulos, and Arpit Mittal. FEVER: a large-scale dataset for fact extraction and VERification. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 809–819, New Orleans, Louisiana, June 2018. Association for Computational Linguistics. doi: 10.18653/v1/N18-1074. URL https://www.aclweb.org/anthology/N18-1074.
|
| 285 |
+
|
| 286 |
+
Johannes M. van Hulst, Faegheh Hasibi, Koen Dercksen, Krisztian Balog, and Arjen P. de Vries. Rel: An entity linker standing on the shoulders of giants. In Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in Information Retrieval, SIGIR ’20, pp. 2197–2200, New York, NY, USA, 2020. Association for Computing Machinery. ISBN 9781450380164. doi: 10.1145/3397271.3401416. URL https://doi.org/10.1145/ 3397271.3401416.
|
| 287 |
+
|
| 288 |
+
Ledell Wu, Fabio Petroni, Martin Josifoski, Sebastian Riedel, and Luke Zettlemoyer. Scalable zero-shot entity linking with dense entity retrieval. In Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 6397–6407, Online, November 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.emnlp-main.519. URL https://www.aclweb.org/anthology/2020.emnlp-main.519.
|
| 289 |
+
|
| 290 |
+
Yonghui Wu, Mike Schuster, Zhifeng Chen, Quoc V Le, Mohammad Norouzi, Wolfgang Macherey, Maxim Krikun, Yuan Cao, Qin Gao, Klaus Macherey, et al. Google’s neural machine translation system: Bridging the gap between human and machine translation. arXiv preprint arXiv:1609.08144, 2016.
|
| 291 |
+
|
| 292 |
+
Ikuya Yamada, Hiroyuki Shindo, Hideaki Takeda, and Yoshiyasu Takefuji. Joint learning of the embedding of words and entities for named entity disambiguation. In Proceedings of The 20th SIGNLL Conference on Computational Natural Language Learning, pp. 250–259, Berlin, Germany, August 2016. Association for Computational Linguistics. doi: 10.18653/v1/K16-1025. URL https://www.aclweb.org/anthology/K16-1025.
|
| 293 |
+
|
| 294 |
+
Xiyuan Yang, Xiaotao Gu, Sheng Lin, Siliang Tang, Yueting Zhuang, Fei Wu, Zhigang Chen, Guoping Hu, and Xiang Ren. Learning dynamic context augmentation for global entity linking. In Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP), pp. 271–281, Hong Kong, China, November 2019. Association for Computational Linguistics. doi: 10.18653/v1/D19-1026. URL https://www.aclweb.org/anthology/D19-1026.
|
| 295 |
+
|
| 296 |
+
Yi Yang, Ozan Irsoy, and Kazi Shefaet Rahman. Collective entity disambiguation with structured gradient tree boosting. In Proceedings of the 2018 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long Papers), pp. 777–786, New Orleans, Louisiana, June 2018a. Association for Computational Linguistics. doi: 10.18653/v1/N18-1071. URL https://www.aclweb.org/anthology/ N18-1071.
|
| 297 |
+
|
| 298 |
+
Zhilin Yang, Peng Qi, Saizheng Zhang, Yoshua Bengio, William Cohen, Ruslan Salakhutdinov, and Christopher D. Manning. HotpotQA: A dataset for diverse, explainable multi-hop question answering. In Proceedings of the 2018 Conference on Empirical Methods in Natural Language Processing, pp. 2369–2380, Brussels, Belgium, October-November 2018b. Association for Computational Linguistics. doi: 10.18653/v1/D18-1259. URL https://www.aclweb.org/ anthology/D18-1259.
|
| 299 |
+
|
| 300 |
+
# A EXPERIMENTAL DETAILS
|
| 301 |
+
|
| 302 |
+
We implemented, trained, and evaluate our model using the fariseq library (Ott et al., 2019). We trained GENRE for every task using Adam (Kingma & Ba, 2014) with a learning rate $3 \cdot 1 0 ^ { - 5 }$ with a linear warm-up for 500 steps and then liner decay. The objective is sequence-to-sequence categorical cross-entropy loss with 0.1 of label smoothing.
|
| 303 |
+
|
| 304 |
+
# A.1 NAMED ENTITY DISAMBIGUATION
|
| 305 |
+
|
| 306 |
+
Setting Given a document $d _ { j }$ (e.g., a sentence) containing a set of entity mentions $\displaystyle m _ { 1 } , \ldots , m _ { N }$ , a system either has to assign, to each mention $m _ { i }$ , either a KB entity (i.e., $e _ { i } \in \mathcal { E } _ { i }$ ), or predicts that there is no corresponding entry in the KB (i.e., $e _ { i } = \mathrm { N L L } )$ . Moreover, a restricted candidates set $C _ { i } = \{ \hat { e } _ { i 1 } , \dots , \hat { e } _ { i K } \} \subseteq \bar { \mathcal { E } } \cup \{ \hat { \mathrm { N I L } } \}$ for each mention $m _ { i }$ is provided.
|
| 307 |
+
|
| 308 |
+
Training We pre-trained GENRE on BLINK data for $2 0 0 \mathrm { k }$ steps and then we do model selection on the validation set. Afterward, we fine-tuned on AIDA without resetting the learning rate nor the optimizer statistics for $1 0 \mathrm { k }$ steps and we do model selection on the validation set. Following previous works (Yamada et al., 2016; Ganea & Hofmann, 2017; Le & Titov, 2018), we considered only mentions that have entities in the KB (i.e., Wikipedia). Training was done on 32 GPUs (with 32GB of memory) and it completed in ${ \sim } 2 4 \mathrm { h }$ for a total of ${ \sim } 3 2$ GPU/day.
|
| 309 |
+
|
| 310 |
+
Inference At test time, we use Constrained Beam Search with 10 beams, and maximum decoding steps of 15. We restrict the input sequence to be at most 384 tokens cutting the left, right, or both parts of the context around a mention. We normalize the log-probabilities by sequence length.
|
| 311 |
+
|
| 312 |
+
# A.2 ENTITY LINKING
|
| 313 |
+
|
| 314 |
+
Setting Given a document $d _ { j }$ (e.g., a sentence) a system has to return a set of tuples $\langle m _ { i } , e _ { i } \rangle$ where $m _ { i }$ is a entity mentions (a span contained in $d _ { j }$ ) and $e _ { i } \in \mathcal { E }$ its corresponding entity in the KB. Following Kolitsas et al. (2018), we considered only mentions that have entities in the KB (i.e., Wikipedia) and we used their candidate sets with the additions of the table computed by Hoffart et al. (2011).
|
| 315 |
+
|
| 316 |
+
Training We pre-trained GENRE on all abstract sections from Wikipedia7 enriched by a string matching heuristic to solve co-references (i.e., if there is a string that matches exactly with another hyperlink we also add it to the dataset as a mention/entity pairs) data for $2 0 0 \mathrm { k }$ steps. Then we do model selection on the validation set. Afterward, we fine-tuned on AIDA resetting the learning rate and the optimizer statistics for $1 0 \mathrm { k }$ steps and we do model selection on the validation set. Again, following previous works (Kolitsas et al., 2018), we considered only mentions that have entities in Wikipedia. Training was done on 64 GPUs (with 32GB of memory) and it completed in ${ \sim } 3 0 \mathrm { h }$ for a total of ${ \sim } 8 0$ GPU/day.
|
| 317 |
+
|
| 318 |
+
Inference At test time, we use Constrained Beam Search with 6 beams, and a maximum decoding step of 384. When the input sequence is too long, we split the input into multiple chunks of equal size. We normalize the log-probabilities by sequence length.
|
| 319 |
+
|
| 320 |
+
# A.3 PAGE-LEVEL DOCUMENT RETRIEVAL
|
| 321 |
+
|
| 322 |
+
Setting Given a query $q$ (e.g., a question) and a collection of documents $\mathcal { D }$ (in KILT are Wikipedia pages), a system has to rank documents in $\mathcal { D }$ based on their relevance to $q$ .
|
| 323 |
+
|
| 324 |
+
Training We trained GENRE on all KILT data simultaneously for $2 0 0 \mathrm { k }$ steps and we do model selection on the validation set averaging the score across tasks. Training was done on 128 GPUs (with 32GB of memory) and it completed in ${ \sim } 3 3 \mathrm { h }$ for a total of ${ \sim } 1 7 6$ GPU/day.
|
| 325 |
+
|
| 326 |
+
Inference At test time, we use Constrained Beam Search with 10 beams. For the ED sub-task, we restrict the input sequence to be at most 384 tokens cutting the left, right, or both parts of the context around a mention. We normalize the log-probabilities by sequence length.
|
| 327 |
+
|
| 328 |
+
# B ADDITIONAL RESULTS
|
| 329 |
+
|
| 330 |
+
# B.1 NAMED ENTITY DISAMBIGUATION
|
| 331 |
+
|
| 332 |
+
Table 6 reports evaluation of GENRE on on WikilinksNED Unseen-Mentions data (Onoe & Durrett, 2020). We also report additional results on AIDA from the literature in Table 7.
|
| 333 |
+
|
| 334 |
+
<table><tr><td></td><td>Seen</td><td>Unseen</td><td>Total</td></tr><tr><td>Exact match</td><td>87.48 (751)</td><td>70.36 (2227)</td><td>74.68 (2978)</td></tr><tr><td>Partial match</td><td>56.39 (1566)</td><td>61.47 (4838)</td><td>60.23 (6404)</td></tr><tr><td>No match</td><td>41.46 (205)</td><td>45.04 (413)</td><td>43.85 (618)</td></tr><tr><td>Total</td><td>64.43 (2522)</td><td>63.21 (7478)</td><td>63.52 (10k)</td></tr></table>
|
| 335 |
+
|
| 336 |
+
Table 6: Evaluation of GENRE on WikilinksNED Unseen-Mentions data (Onoe & Durrett, 2020). We train on the provided train set and we report accuracy scores (i.e., precision at 1) alongside with the number of supporting datapoints. We report scores splitting the test set in seen and unseen entities as well as in three different matchings between a mention and its gold entity.
|
| 337 |
+
Table 7: Additional results on AIDA. We report Micro InKB $F _ { 1 }$ on test sets.
|
| 338 |
+
|
| 339 |
+
<table><tr><td>Methods</td><td>micro-F1</td></tr><tr><td>Guo & Barbosa (2018)</td><td>89</td></tr><tr><td>Le & Titov (2019)</td><td>89.6</td></tr><tr><td>Yamada et al. (2016)</td><td>91.5</td></tr><tr><td>Ganea & Hofmann (2017)</td><td>92.2</td></tr><tr><td>Shahbazi et al. (2019)</td><td>93.5</td></tr><tr><td>Chen et al. (2020)</td><td>93.5</td></tr><tr><td>Yang et al. (2019)</td><td>93.7</td></tr><tr><td>Fang et al. (2019) Raiman & Raiman (2018)</td><td>94.3</td></tr><tr><td>Mulang' et al. (2020)</td><td>94.9</td></tr><tr><td></td><td>94.9</td></tr><tr><td>Yang et al. (2018a)</td><td>95.9</td></tr><tr><td>GENRE</td><td>93.3</td></tr></table>
|
| 340 |
+
|
| 341 |
+
# B.2 DOCUMENT RETRIEVAL
|
| 342 |
+
|
| 343 |
+
Table 8 extends Table 3 with additional results (i.e., training GENRE on the numerical identifiers) and an ablation study on the document retrieval task. The purpose of the experiment is to see whether GENRE benefits from the entity names to be meaningful as well as compositional. Numerical IDs do not have that property. In both cases, the model uses its memorizing capabilities but when using IDs the performance is significantly low. Indeed, with IDs the model has no way to generalize nor to use “implicit knowledge” acquired during the unsupervised pre-training. We also ablate the training data. DPR data corresponds to training only on Natural Questions (NQ) and TriviaQA (TQA) as DPR was trained only for QA tasks on those datasets and two extra ones. Note that training on BLINK data corresponds to only training for entity disambiguation. However, every other task share similarities with entity disambiguation and thus the model is also capable to address the other tasks with non-zero performance. For the ablations, underlined cells indicate what are the results on the respective task on which a model was trained for (i.e., GENRE only BLINK data was trained only for ED where GENRE only DPR data was trained only for QA). The ablation on data suggests that it is beneficial to train on all tasks simultaneously. GENRE without constraints indicates ablating constrained decoding which implies unconstrained generation (i.e., the model may generate entity names that are not in the KB).
|
| 344 |
+
|
| 345 |
+
<table><tr><td></td><td rowspan="2">Fact Check. FEV</td><td colspan="3">Entity Disambiguation</td><td colspan="3">Slot Filling</td><td colspan="3">Open Domain QA</td><td colspan="3">Dial.</td></tr><tr><td>Model</td><td></td><td>AY2</td><td>WnWi</td><td>WnCw</td><td>T-REx</td><td>zsRE</td><td>NQ</td><td>HoPo</td><td>TQA</td><td>ELI5</td><td>WoW</td><td>|Avg.</td></tr><tr><td>DPR + BERT</td><td>72.9</td><td>1</td><td>1</td><td>1</td><td>1</td><td>40.1</td><td>60.7</td><td>25.0</td><td>43.4</td><td></td><td>1</td><td></td><td>1</td></tr><tr><td>DPR</td><td>55.3</td><td>1.8</td><td>0.3</td><td>0.5</td><td>13.3</td><td>28.9</td><td></td><td>54.3</td><td>25.0</td><td>44.5</td><td>10.7</td><td>25.5</td><td>23.6</td></tr><tr><td>tf-idf</td><td>50.9</td><td>3.7</td><td>0.24</td><td>2.1</td><td>44.7</td><td>60.8</td><td>28.1</td><td></td><td>34.1</td><td>46.4</td><td>13.7</td><td>49.0</td><td>30.5</td></tr><tr><td>DPR + BART</td><td>55.3</td><td>75.5</td><td>45.2</td><td>46.9</td><td>13.3</td><td>28.9</td><td>54.3</td><td></td><td>25.0</td><td>44.4</td><td>10.7</td><td>25.4</td><td>38.6</td></tr><tr><td>RAG</td><td>61.9</td><td>72.6</td><td>48.1</td><td>47.6</td><td>28.7</td><td>53.7</td><td></td><td>59.5</td><td>30.6</td><td>48.7</td><td>11.0</td><td>57.8</td><td>47.3</td></tr><tr><td>BLINK + flair</td><td>63.7</td><td>81.5</td><td>80.2</td><td>68.8</td><td>59.6</td><td>78.8</td><td>24.5</td><td></td><td>46.1</td><td>65.6</td><td>9.3</td><td>38.2</td><td>56.0</td></tr><tr><td>GENRE only BLINK IDs</td><td>1.8</td><td>65.0</td><td>63.5</td><td>58.6</td><td>0.1</td><td>0.2</td><td>0.4</td><td></td><td>0.3</td><td>5.4</td><td>0.3</td><td>13.3</td><td>19.0</td></tr><tr><td>GENRE only DPR data</td><td>70.8</td><td>9.7</td><td>1.9</td><td>7.3</td><td>60.0</td><td>79.7</td><td>58.3</td><td></td><td>40.3</td><td>69.6</td><td>13.2</td><td>52.6</td><td>42.1</td></tr><tr><td>GENRE only BLINK data</td><td>28.1</td><td>82.5</td><td>88.1</td><td>69.9</td><td>44.8</td><td>66.1</td><td>15.0</td><td></td><td>16.4</td><td>25.6</td><td>6.8</td><td>38.7</td><td>43.8</td></tr><tr><td>GENRE w/o constraints</td><td>78.9</td><td>87.2</td><td>83.2</td><td>36.5</td><td>74.4</td><td>93.6</td><td></td><td>53.3</td><td>45.2</td><td>63.7</td><td>14.3</td><td>62.7</td><td>63.0</td></tr><tr><td>GENRE full</td><td>83.6</td><td>89.9</td><td>87.4</td><td>71.2</td><td>79.4</td><td></td><td>95.8</td><td>60.3</td><td>51.3</td><td>69.2</td><td>15.8</td><td>62.9</td><td>69.7</td></tr></table>
|
| 346 |
+
|
| 347 |
+
Table 8: Ablation study on KILT retrieval. We report R-Precision. GENRE only BLINK IDs denotes training on BLINK (Wu et al., 2020) data where instead of using the textual entity representation as target we used a numerical ID.
|
| 348 |
+
|
| 349 |
+

|
| 350 |
+
Figure 4: Accuracy per number of BPE tokens of the Wikipedia title to generate on the validation sets of all KILT datasets except ELI5 (as it is fundamentally different from the others). We also show the data distribution of token lengths. Most of the titles have less than 15 BPE tokens while the mode of the distribution is 5. Here GENRE has an average accuracy of $7 8 . 6 \%$ but it is higher for short titles (e.g., ${ < } 1 0 _ { \circ }$ ) and it is lower for long titles (e.g., ${ \geq } 1 0 _ { \cdot }$ ). Degradation in performance does not directly follow the data distribution of the token lengths. Indeed, even if long titles are rare performance is not heavily affected (e.g., for length ${ > } 1 5$ ).
|
| 351 |
+
|
| 352 |
+

|
| 353 |
+
Figure 5: Accuracy per number of incoming links in Wikipedia on the validation sets of all KILT datasets except ELI5 (as it is fundamentally different from the others). We also show the data distribution of the number of incoming links. Intuitively, a page/entity with few incoming links has been observed less than highly connected pages/entities. Indeed, for pages/entities never linked (first bin on the left) the average accuracy is $20 \%$ lower than the global average $( 7 8 . 6 \% )$ . However, for pages/entities linked at least once it is above the global average. This indicates that GENRE seems effective on linking rare entities.
|
| 354 |
+
|
| 355 |
+
# C EXAMPLES
|
| 356 |
+
|
| 357 |
+
1 ID : ’ 87d95287−707e−4bd9−9633−ca0c611a4a3a World Without Superma : 8 ’
|
| 358 |
+
2 i n p u t s : ’ [ . . ] When Superman l e a v e s E a r t h f o r New K r y p t o n , he a p p o i n t s , n e w l y f r e e d f r o m & the Phantom Zone , t o ta ke h i s pla ce as gua rdian of [ START ENT ] M e t r o p o l i s [ END ENT& Mon−E l assumes t h e s e c r e t i d e n t i t y o f J o h n a t h a n Kent as a t r i b u t e t o C l a r k \ ’ s & a d o p t i v e f a t h e r , p o s i n g as C l a r k \ ’ s c o u s i n . [ . . ]
|
| 359 |
+
3 g o l d o u t p u t : ’ M e t r o p o l i s ( c o m i c s ) ’
|
| 360 |
+
4 p r e d i c t e d o u t p u t s :
|
| 361 |
+
5 ( ’ M e t r o p o l i s ( c o m i c s ) ’ , −0.09) ,
|
| 362 |
+
6 ( ’ T h e m y s c i r a ( DC Comics ) ’ , −1.09) ,
|
| 363 |
+
7 ( ’ M e t r o p o l i s ( d i s a m b i g u a t i o n ) ’ −1.27) ,
|
| 364 |
+
8 ’ Superman ( comic book ) , −1.51) ,
|
| 365 |
+
9 ( ’ Superman ( E a r t h−Two ) ’ , −1.52)
|
| 366 |
+
10 ]
|
| 367 |
+
|
| 368 |
+

|
| 369 |
+
Figure 6: Example of a GENRE prediction for named entity disambiguation on KILT WNED. The input is plain text where a mention is flagged with two special start and end tokens [START ENT] and [END ENT]. The output is a ranked list of entity (where we report the log-likelihood as well).
|
| 370 |
+
Figure 7: Example of GENRE predictions for the retrieval task on KILT. The input is a query and the output is a ranked list of Wikipedia article titles (we also report the log-likelihood of the solutions).
|
| 371 |
+
|
| 372 |
+

|
| 373 |
+
Figure 8: Example of a GENRE prediction for end-to-end entity linking on AIDA. The input is plain text and the output is a Markup string where the links are Wikipedia titles. Spans are in the format $\left. s _ { i } , l _ { i } , t _ { i } \right.$ : start of the mention, length of the mention, and title respectively.
|
| 374 |
+
|
| 375 |
+

|
| 376 |
+
Figure 9: Example of prefix tree (trie) structure where the allowed entities identifiers are ‘English language’, ‘English literature’ and ‘France’. Note that at the root there is the start-of-sequence token SOS and all leaves are end-of-sequence tokens EOS. Since more that one sequence has the same prefix (i.e., ‘English’), this end up being an internal node where branches are the possible continuations.
|
md/train/5kTlVBkzSRx/5kTlVBkzSRx.md
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Twins: Revisiting the Design of Spatial Attention in Vision Transformers
|
| 2 |
+
|
| 3 |
+
Xiangxiang $\mathbf { C h u ^ { 1 } }$ , Zhi Tian1,2, Yuqing Wang1, Bo Zhang1 Haibing Ren1, Xiaolin Wei1, Huaxia Xia1, Chunhua Shen2∗
|
| 4 |
+
|
| 5 |
+
1 Meituan Inc. 2 The University of Adelaide, Australia 1 {chuxiangxiang,wangyuqing06,zhangbo97,renhaibing,weixiaolin02,xiahuaxia}@meituan.com 2 zhi.tian@outlook.com, chunhua@me.com
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Very recently, a variety of vision transformer architectures for dense prediction tasks have been proposed and they show that the design of spatial attention is critical to their success in these tasks. In this work, we revisit the design of the spatial attention and demonstrate that a carefully devised yet simple spatial attention mechanism performs favorably against the state-of-the-art schemes. As a result, we propose two vision transformer architectures, namely, Twins-PCPVT and TwinsSVT. Our proposed architectures are highly efficient and easy to implement, only involving matrix multiplications that are highly optimized in modern deep learning frameworks. More importantly, the proposed architectures achieve excellent performance on a wide range of visual tasks including image-level classification as well as dense detection and segmentation. The simplicity and strong performance suggest that our proposed architectures may serve as stronger backbones for many vision tasks. Our code is available at: https://git.io/Twins.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Recently, Vision Transformers [1–3] have received increasing research interest. Compared to the widely-used convolutional neural networks (CNNs) in visual perception, Vision Transformers enjoy great flexibility in modeling long-range dependencies in vision tasks, introduce less inductive bias, and can naturally process multi-modality input data including images, videos, texts, speech signals, and point clouds. Thus, they have been considered to be a strong alternative to CNNs. It is expected that vision transformers are likely to replace CNNs and serve as the most basic component in the next-generation visual perception systems.
|
| 14 |
+
|
| 15 |
+
One of the prominent problems when applying transformers to vision tasks is the heavy computational complexity incurred by the spatial self-attention operation in transformers, which grows quadratically in the number of pixels of the input image. A workaround is the locally-grouped self-attention (or self-attention in non-overlapped windows as in the recent Swin Transformer [4]), where the input is spatially grouped into non-overlapped windows and the standard self-attention is computed only within each sub-window. Although it can significantly reduce the complexity, it lacks the connections between different windows and thus results in a limited receptive field. As pointed out by many previous works [5–7], a sufficiently large receptive field is crucial to the performance, particularly for dense prediction tasks such as image segmentation and object detection. Swin [4] proposes a shifted window operation to tackle the issue, where the boundaries of these local windows are gradually moved as the network proceeds. Despite being effective, the shifted windows may have uneven sizes. The uneven windows result in difficulties when the models are deployed with ONNX or TensorRT, which prefers the windows of equal sizes. Another solution is proposed in PVT [8]. Unlike the standard self-attention operation, where each query computes the attention weights with all the input tokens, in PVT, each query only computes the attention with a sub-sampled version of the input tokens. Although its computational complexity in theory is still quadratic, it is already manageable in practice.
|
| 16 |
+
|
| 17 |
+
From a unified perspective, the core in the aforementioned vision transformers is how the spatial attention is designed. Thus, in this work, we revisit the design of the spatial attention in vision transformers. Our first finding is that the global sub-sampled attention in PVT is highly effective, and with the applicable positional encodings [9], its performance can be on par or even better than state-of-the-art vision transformers (e.g., Swin). This results in our first proposed architecture, termed Twins-PCPVT. On top of that, we further propose a carefully-designed yet simple spatial attention mechanism, making our architectures more efficient than PVT. Our attention mechanism is inspired by the widely-used separable depthwise convolutions and thus we name it spatially separable self-attention (SSSA). Our proposed SSSA is composed of two types of attention operations—(i) locally-grouped self-attention (LSA), and (ii) global sub-sampled attention (GSA), where LSA captures the fine-grained and short-distance information and GSA deals with the long-distance and global information. This leads to the second proposed vision transformer architecture, termed Twins-SVT. It is worth noting that both attention operations in the architecture are efficient and easy-to-implement with matrix multiplications in a few lines of code. Thus, all of our architectures here have great applicability and can be easily deployed.
|
| 18 |
+
|
| 19 |
+
We benchmark our proposed architectures on a number of visual tasks, ranging from image-level classification to pixel-level semantic/instance segmentation and object detection. Extensive experiments show that both of our proposed architectures perform favorably against other state-of-the-art vision transformers with similar or even reduced computational complexity.
|
| 20 |
+
|
| 21 |
+
# 2 Related Work
|
| 22 |
+
|
| 23 |
+
Convolutional neural networks. Characterized by local connectivity, weight sharing, shiftinvariance and pooling, CNNs have been the de facto standard model for computer vision tasks. The top-performing models [10–13] in image classification also serve as the strong backbones for downstream detection and segmentation tasks.
|
| 24 |
+
|
| 25 |
+
Vision Transformers. Transformer was firstly proposed by [14] for machine translation tasks, and since then they have become the state-of-the-art models for NLP tasks, overtaking the sequence-tosequence approach built on LSTM. Its core component is multi-head self-attention which models the relationship between input tokens and shows great flexibility.
|
| 26 |
+
|
| 27 |
+
In 2020, Transformer was introduced to computer vision for image and video processing [1–3, 9, 15– 17, 17–32]. In the image classification task, ViT [1] and DeiT [2] divide the images into patch embedding sequences and feed them into the standard transformers. Although vision transformers have been proved compelling in image classification compared with CNNs, a challenge remains when it is applied to dense prediction tasks such as object detection and segmentation. These tasks often require feature pyramids for better processing objects of different scales, and take as inputs the highresolution images, which significantly increase the computational complexity of the self-attention operations.
|
| 28 |
+
|
| 29 |
+
Recently, Pyramid Vision Transformer (PVT) [8] is proposed and can output the feature pyramid [33] as in CNNs. PVT has demonstrated good performance in a number of dense prediction tasks. The recent Swin Transformer [4] introduces non-overlapping window partitions and restricts self-attention within each local window, resulting in linear computational complexity in the number of input tokens. To interchange information among different local areas, its window partitions are particularly designed to shift between two adjacent self-attention layers. The semantic segmentation framework OCNet [34] shares some similarities with us and they also interleave the local and global attention. Here, we demonstrate this is a general design paradigm in vision transformer backbones rather than merely an incremental module in semantic segmentation.
|
| 30 |
+
|
| 31 |
+
Grouped and Separable Convolutions. Grouped convolutions are originally proposed in AlexNet [35] for distributed computing. They were proved both efficient and effective in speeding up the networks. As an extreme case, depthwise convolutions [12, 36] use the number of groups that is equal to the input or output channels, which is followed by point-wise convolutions to aggregate the information across different channels. Here, the proposed spatially separable self-attention shares some similarities with them.
|
| 32 |
+
|
| 33 |
+
Positional Encodings. Most vision transformers use absolute/relative positional encodings, depending on downstream tasks, which are based on sinusoidal functions [14] or learnable [1, 2]. In CPVT [9], the authors propose the conditional positional encodings, which are dynamically conditioned on the inputs and show better performance than the absolute and relative ones.
|
| 34 |
+
|
| 35 |
+
# 3 Our Method: Twins
|
| 36 |
+
|
| 37 |
+
We present two simple yet powerful spatial designs for vision transformers. The first method is built upon PVT [8] and CPVT [9], which only uses the global attention. The architecture is thus termed Twins-PCPVT. The second one, termed Twins-SVT, is based on the proposed SSSA which interleaves local and global attention.
|
| 38 |
+
|
| 39 |
+
# 3.1 Twins-PCPVT
|
| 40 |
+
|
| 41 |
+
PVT [8] introduces the pyramid multi-stage design to better tackle dense prediction tasks such as object detection and semantic segmentation. It inherits the absolute positional encoding designed in ViT [1] and DeiT [2]. All layers utilize the global attention mechanism and rely on spatial reduction to cut down the computation cost of processing the whole sequence. It is surprising to see that the recently-proposed Swin transformer [4], which is based on shifted local windows, can perform considerably better than PVT, even on dense prediction tasks where a sufficiently large receptive field is even more crucial to good performance.
|
| 42 |
+
|
| 43 |
+
In this work, we surprisingly found that the less favored performance of PVT is mainly due to the absolute positional encodings employed in PVT [8]. As shown in CPVT [9], the absolute positional encoding encounter difficulties in processing the inputs with varying sizes (which are common in dense prediction tasks). Moreover, this positional encoding also breaks the translation invariance. On the contrary, Swin transformer makes use of the relative positional encodings, which bypasses the above issues. Here, we demonstrate that this is the main cause why Swin outperforms PVT, and we show that if the appropriate positional encodings are used, PVT can actually achieve on par or even better performance than the Swin transformer.
|
| 44 |
+
|
| 45 |
+
Here, we use the conditional position encoding (CPE) proposed in CPVT [9] to replace the absolute PE in PVT. CPE is conditioned on the inputs and can naturally avoid the above issues of the absolute encodings. The position encoding generator (PEG) [9], which generates the CPE, is placed after the first encoder block of each stage. We use the simplest form of PEG, i.e., a 2D depth-wise convolution without batch normalization. For image-level classification, following CPVT, we remove the class token and use global average pooling (GAP) at the end of the stage [9]. For other vision tasks, we follow the design of PVT. Twins-PCPVT inherits the advantages of both PVT and CPVT, which makes it easy to be implemented efficiently. Our extensive experimental results show that this simple design can match the performance of the recent state-of-the-art Swin transformer. We have also attempted to replace the relative PE with CPE in Swin, which however does not result in noticeable performance gains, as shown in our experiments. We conjecture that this maybe due to the use of shifted windows in Swin, which might not work well with CPE.
|
| 46 |
+
|
| 47 |
+
Architecture settings We report the detailed settings of Twins-PCPVT in Table 2 (in supplementary), which are similar to PVT [8]. Therefore, Twins-PCPVT has similar FLOPs and number of parameters to [8].
|
| 48 |
+
|
| 49 |
+
# 3.2 Twins-SVT
|
| 50 |
+
|
| 51 |
+
Vision transformers suffer severely from the heavy computational complexity in dense prediction tasks due to high-resolution inputs. Given an input of $H \times W$ resolution, the complexity of selfattention with dimension $d$ is $\mathcal { O } ( H ^ { 2 } W ^ { 2 } d )$ . Here, we propose the spatially separable self-attention (SSSA) to alleviate this challenge. SSSA is composed of locally-grouped self-attention (LSA) and global sub-sampled attention (GSA).
|
| 52 |
+
|
| 53 |
+

|
| 54 |
+
Figure 1 – Architecture of Twins-SVT-S. “PEG" is the positional encoding generator from CPVT [9].
|
| 55 |
+
|
| 56 |
+
Locally-grouped self-attention (LSA). Motivated by the group design in depthwise convolutions for efficient inference, we first equally divide the 2D feature maps into sub-windows, making self-attention communications only happen within each sub-window. This design also resonates with the multi-head design in selfattention, where the communications only occur within the channels of the same head. To be specific, the feature maps are divided into $m \times n$ sub-windows. Without loss of generality, we assume $H \% m = 0$ and $W \% n = 0$ . Each group contains $\textstyle { \frac { H W } { m n _ { * } } }$ elements, and thus the computation cost of the self-attention in this window is $\begin{array} { r } { \mathcal { O } \big ( \frac { H ^ { 2 } W ^ { 2 } } { m ^ { 2 } n ^ { 2 } } d \big ) } \end{array}$ , and the total cost is $\begin{array} { r } { \mathcal { O } ( \frac { H ^ { 2 } W ^ { 2 } } { m n } d ) } \end{array}$ . If we let $\begin{array} { r } { \dot { k } _ { 1 } = \frac { H } { m } } \end{array}$ and $\textstyle k _ { 2 } \ = \ { \frac { W } { n } }$ , the cost can be
|
| 57 |
+
|
| 58 |
+

|
| 59 |
+
Figure 2 – (a) Twins-SVT interleaves locally-grouped attention (LSA) and global sub-sampled attention (GSA). (b) Schematic view of the locally-grouped attention (LSA) and global sub-sampled attention (GSA).
|
| 60 |
+
|
| 61 |
+
computed as $\mathcal { O } ( k _ { 1 } k _ { 2 } H W d )$ , which is significantly more efficient when $k _ { 1 } \ll H$ and $k _ { 2 } \ll W$ and grows linearly with $H W$ if $k _ { 1 }$ and $k _ { 2 }$ are fixed.
|
| 62 |
+
|
| 63 |
+
Although the locally-grouped self-attention mechanism is computation friendly, the image is divided into non-overlapping sub-windows. Thus, we need a mechanism to communicate between different sub-windows, as in Swin. Otherwise, the information would be limited to be processed locally, which makes the receptive field small and significantly degrades the performance as shown in our experiments. This resembles the fact that we cannot replace all standard convolutions by depth-wise convolutions in CNNs.
|
| 64 |
+
|
| 65 |
+
Global sub-sampled attention (GSA). A simple solution is to add extra standard global selfattention layers after each local attention block, which can enable cross-group information exchange. However, this approach would come with the computation complexity of $\mathcal { O } ( H ^ { 2 } W ^ { 2 } d )$ .
|
| 66 |
+
|
| 67 |
+
Here, we use a single representative to summarize the important information for each of $m \times n$ sub-windows and the representative is used to communicate with other sub-windows (serving as the key in self-attention), which can dramatically reduce the cost to $\begin{array} { r } { \mathcal { O } ( m n H W d ) = \mathcal { O } ( \frac { H ^ { 2 } W ^ { 2 } d } { k _ { 1 } k _ { 2 } } ) } \end{array}$ . This is essentially equivalent to using the sub-sampled feature maps as the key in attention operations, and thus we term it global sub-sampled attention (GSA). If we alternatively use the aforementioned LSA and GSA like separable convolutions (depth-wise $^ +$ point-wise). The total computation cost√ is $\begin{array} { r } { \mathcal { O } ( \frac { H ^ { 2 } W ^ { 2 } d } { k _ { 1 } k _ { 2 } } + k _ { 1 } k _ { 2 } \bar { H } W d ) } \end{array}$ . We have $\begin{array} { r } { \frac { H ^ { 2 } W ^ { 2 } d } { k _ { 1 } k _ { 2 } } + k _ { 1 } k _ { 2 } H W d \geq 2 H W d \sqrt { H W } } \end{array}$ . The minimum is obtained when $\boldsymbol { k } _ { 1 } \cdot \boldsymbol { k } _ { 2 } = \sqrt { H W }$ . We note that $H = W = 2 2 4$ is popular in classification. Without loss of generality, we use square sub-windows, i.e., $k _ { 1 } = k _ { 2 }$ . Therefore, $k _ { 1 } = k _ { 2 } = 1 5$ is close to the global minimum for $H = W = 2 2 4$ . However, our network is designed to include several stages with variable resolutions. Stage 1 has feature maps of $5 6 \times 5 6$ , the minimum is obtained when $k _ { 1 } \stackrel { \cdot } { = } k _ { 2 } = \sqrt { 5 6 } \approx 7 .$ Theoretically, we can calibrate optimal $k _ { 1 }$ and $k _ { 2 }$ for each of the stages. For simplicity, we use $k _ { 1 } = k _ { 2 } = 7$ everywhere. As for stages with lower resolutions, we control the summarizing window-size of GSA to avoid too small amount of generated keys. Specifically, we use the size of 4, 2 and 1 for the last three stages respectively.
|
| 68 |
+
|
| 69 |
+
As for the sub-sampling function, we investigate several options including average pooling, depthwise strided convolutions, and regular strided convolutions. Empirical results show that regular strided convolutions perform best here. Formally, our spatially separable self-attention (SSSA) can be written as
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
\begin{array} { r l } & { \hat { \mathbf { z } } _ { i j } ^ { l } = \mathrm { L S A } \left( \mathrm { L a y e r N o r m } \left( \mathbf { z } _ { i j } ^ { l - 1 } \right) \right) + \mathbf { z } _ { i j } ^ { l - 1 } , } \\ & { \mathbf { z } _ { i j } ^ { l } = \mathrm { F F N } \left( \mathrm { L a y e r N o r m } \left( \hat { \mathbf { z } } _ { i j } ^ { l } \right) \right) + \hat { \mathbf { z } } _ { i j } ^ { l } , } \\ & { \hat { \mathbf { z } } ^ { l + 1 } = \mathrm { G S A } \left( \mathrm { L a y e r N o r m } \left( \mathbf { z } ^ { l } \right) \right) + \mathbf { z } ^ { l } , } \\ & { \mathbf { z } ^ { l + 1 } = \mathrm { F F N } \left( \mathrm { L a y e r N o r m } \left( \hat { \mathbf { z } } ^ { l + 1 } \right) \right) + \hat { \mathbf { z } } ^ { l + 1 } , } \\ & { i \in \{ 1 , 2 , . . . . , m \} , j \in \{ 1 , 2 , . . . . , n \} } \end{array}
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
where LSA means locally-grouped self-attention within a sub-window; GSA is the global sub-sampled attention by interacting with the representative keys (generated by the sub-sampling functions) from each sub-window $\hat { \mathbf { z } } _ { i j } \mathbf { \bar { \Psi } } \in \mathcal { R } ^ { k _ { 1 } \times k _ { 2 } \times \mathbf { \bar { C } } }$ . Both LSA and GSA have multiple heads as in the standard self-attention.The PyTorch code of LSA is given in Algorithm 1 (in supplementary).
|
| 76 |
+
|
| 77 |
+
Again, we use the PEG of CPVT [9] to encode position information and process variable-length inputs on the fly. It is inserted after the first block in each stage.
|
| 78 |
+
|
| 79 |
+
Model variants. The detailed configure of Twins-SVT is shown in Table 3 (in supplementary). We try our best to use the similar settings as in Swin [4] to make sure that the good performance is due to the new design paradigm.
|
| 80 |
+
|
| 81 |
+
Comparison with PVT. PVT entirely utilizes global attentions as DeiT does while our method makes use of spatial separable-like design with LSA and GSA, which is more efficient.
|
| 82 |
+
|
| 83 |
+
Comparison with Swin. Swin utilizes the alternation of local window based attention where the window partitions in successive layers are shifted. This is used to introduce communication among different patches and to increase the receptive field. However, this procedure is relatively complicated and may not be optimized for speed on devices such as mobile devices. Swin Transformer depends on torch.roll() to perform cyclic shift and its reverse on features. This operation is memory unfriendly and rarely supported by popular inference frameworks such as NVIDIA TensorRT, Google TensorflowLite, and Snapdragon Neural Processing Engine SDK (SNPE), etc. This hinders the deployment of Swin either on the server-side or on end devices in a production environment. In contrast, Twins models don’t require such an operation and only involve matrix multiplications that are already optimized well in modern deep learning frameworks. Therefore, it can further benefit from the optimization in a production environment. For example, we converted Twins-SVT-S from PyTorch to TensorRT , and its throughput is boosted by $1 . 7 \times$ . Moreover, our local-global design can better exploit the global context, which is known to play an important role in many vision tasks.
|
| 84 |
+
|
| 85 |
+
Finally, one may note that the network configures (e.g., such as depths, hidden dimensions, number of heads, and the expansion ratio of MLP) of our two variants are sightly different. This is intended because we want to make fair comparisons to the two recent well-known transformers PVT and Swin. PVT prefers a slimmer and deeper design while Swin is wider and shallower. This difference makes PVT have slower training than Swin. Twins-PCPVT is designed to compare with PVT and shows that a proper positional encoding design can greatly boost the performance and make it on par with recent state-of-the-art models like Swin. On the other hand, Twins-SVT demonstrates the potential of a new paradigm as to spatially separable self-attention is highly competitive to recent transformers.
|
| 86 |
+
|
| 87 |
+
# 4 Experiments
|
| 88 |
+
|
| 89 |
+
# 4.1 Classification on ImageNet-1K
|
| 90 |
+
|
| 91 |
+
We first present the ImageNet classification results with our proposed models. We carefully control the experiment settings to make fair comparisons against recent works [2, 8, 9]. All our models are trained for 300 epochs with a batch size of 1024 using the AdamW optimizer [37]. The learning rate is initialized to be 0.001 and decayed to zero within 300 epochs following the cosine strategy. We use a linear warm-up in the first five epochs and the same regularization setting as in [2]. Note that we do not utilize extra tricks in [26, 28] to make fair comparisons although it may further improve the performance of our method. We use increasing stochastic depth [38] augmentation of 0.2, 0.3, 0.5 for small, base and large model respectively. Following Swin [4], we use gradient clipping with a max norm of 5.0 to stabilize the training process, which is especially important for the training of large models.
|
| 92 |
+
|
| 93 |
+
We report the classification results on ImageNet-1K [39] in Table 1. Twins-PCPVT-S outperforms PVT-small by $1 . 4 \%$ and obtains similar result as Swin-T with $18 \%$ fewer FLOPs. Twins-SVT-S is better than Swin-T with about $3 5 \%$ fewer FLOPs. Other models demonstrate similar advantages.
|
| 94 |
+
|
| 95 |
+
It is interesting to see that, without bells and whistles, Twins-PCPVT performs on par with the recent state-of-the-art Swin, which is based on much more sophisticated designs as mentioned above. Moreover, Twins-SVT also achieves similar or better results, compared to Swin, indicating that the spatial separable-like design is an effective and promising paradigm.
|
| 96 |
+
|
| 97 |
+
One may challenge our improvements are due to the use of the better positional encoding PEG. Thus, we also replace the relative PE in Swin-T with PEG [9], but the Swin-T’s performance cannot be improved (being $8 1 . 2 \%$ ).
|
| 98 |
+
|
| 99 |
+
# 4.2 Semantic Segmentation on ADE20K
|
| 100 |
+
|
| 101 |
+
We further evaluate the performance on segmentation tasks. We test on the ADE20K dataset [42], a challenging scene parsing task for semantic segmentation, which is popularly evaluated by recent Transformer-based methods. This dataset contains 20K images for training and 2K images for validation. Following the common practices, we use the training set to train our models and report the mIoU on the validation set. All models are pretrained on the ImageNet-1k dataset.
|
| 102 |
+
|
| 103 |
+
Twins-PCPVT vs. PVT. We compare our Twins-PCPVT with PVT [8] because they have similar design and computational complexity. To make fair comparisons, we use the Semantic FPN framework [43] and exactly the same training settings as in PVT. Specifically, we train 80K steps with a batch size of 16 using AdamW [37]. The learning rate is initialized as $1 \times 1 0 ^ { - 4 }$ and scheduled by the ‘poly’ strategy with the power coefficient of 0.9. We apply the drop-path regularization of 0.2 for the backbone and weight decay 0.0005 for the whole network. Note that we use a stronger drop-path regularization of 0.4 for the large model to avoid over-fitting. For Swin, we use their official code and trained models. We report the results in Table 2. With comparable FLOPs, Twins-PCPVT-S outperforms PVT-Small with a large margin $( + 4 . 5 \%$ mIoU), which also surpasses ResNet-50 by $7 . 6 \%$ mIoU. It also outperforms Swin-T with a clear margin. Besides, Twins-PCPVT-B also achieves $3 . 3 \%$ higher mIoU than PVT-Medium, and Twins-PCPVT-L surpasses PVT-Large with $4 . 3 \%$ higher mIoU.
|
| 104 |
+
|
| 105 |
+
Twins-SVT vs. Swin. We also compare our Twins-SVT with the recent state-of-the-art model Swin [4]. With the Semantic FPN framework and the above settings, Twins-SVT-S achieves better performance $( + 1 . 7 \% )$ than Swin-T. Twins-SVT-B obtains comparable performance with Swin-S and Twins-SVT-L outperforms Swin-B by $0 . 7 \%$ mIoU (left columns in Table 2). In addition, Swin evaluates its performance using the UperNet framework [44]. We transfer our method to this framework and use exactly the same training settings as [4]. To be specific, we use the AdamW optimizer to train all models for $1 6 0 \mathrm { k }$ iterations with a global batch size of 16. The initial learning rate is $6 \times 1 0 ^ { - 5 }$ and linearly decayed to zero. We also utilize warm-up during the first 1500 iterations. Moreover, we apply the drop-path regularization of 0.2 for the backbone and weight decay 0.01 for the whole network. We report the mIoU of both single scale and multi-scale testing (we use scales from 0.5 to 1.75 with step 0.25) in the right columns of Table 2. Both with multi-scale testing, Twins-SVT-S outperforms Swin-T by $1 . 3 \%$ mIoU. Moreover, Twins-SVT-L achieves new state of the art result $5 0 . 2 \%$ mIoU under comparable FLOPs and outperforms Swin-B by $0 . 5 \%$ mIoU. Twins-PCPVT also achieves comparable performance to Swin [4].
|
| 106 |
+
|
| 107 |
+
# 4.3 Object Detection and Segmentation on COCO
|
| 108 |
+
|
| 109 |
+
We evaluate the performance of our method using two representative frameworks: RetinaNet [46] and Mask RCNN [47]. Specifically, we use our transformer models to build the backbones of these detectors. All the models are trained under the same setting as in [8]. Since PVT and Swin report their results using different frameworks, we try to make fair comparison and build consistent settings for future methods. Specifically, we report standard $1 \times$ -schedule (12 epochs) detection results on the COCO 2017 dataset [48] in Tables 3 and 4. As for the evaluation based on RetinaNet, we train all the models using AdamW [37] optimizer for 12 epochs with a batch size of 16. The initial learning rate is $1 \times 1 \bar { 0 } ^ { - 4 }$ , started with 500-iteration warmup and decayed by $1 0 \times$ at the 8th and 11th epoch, respectively. We use stochastic drop path regularization of 0.2 and weight decay 0.0001. The implementation is based on MMDetection [49]. For the Mask R-CNN framework, we use the initial learning rate of $2 \times 1 0 ^ { - 4 }$ as in [8]. All other hyper-parameters follow the default settings in MMDetection. As for $3 \times$ experiments, we follow the common multi-scale training in [3, 4], i.e., randomly resizing the input image so that its shorter side is between 480 and 800 while keeping longer one less than 1333. Moreover, for $3 \times$ training of Mask R-CNN, we use an initial learning rate of 0.0001 and weight decay of 0.05 for the whole network as [4].
|
| 110 |
+
|
| 111 |
+
Table 1 – Comparisons with state-of-the-art methods for ImageNet-1K classification. Throughput is tested on the batch size of 192 on a single V100 GPU. All models are trained and evaluated on $2 2 4 \times 2 2 4$ resolution on ImageNet-1K dataset. †: w/ CPVT’s position encodings [9].
|
| 112 |
+
|
| 113 |
+
<table><tr><td>Method</td><td>Param (M)</td><td>FLOPs (G)</td><td>Throughput (Images/s)</td><td>Top-1 (%)</td></tr><tr><td colspan="5">ConvNet</td></tr><tr><td>RegNetY-4G [40]</td><td>21</td><td>4.0</td><td>1157</td><td>80.0</td></tr><tr><td>RegNetY-8G [40]</td><td>39</td><td>8.0</td><td>592</td><td>81.7</td></tr><tr><td>RegNetY-16G [40]</td><td>84</td><td>16.0</td><td>335</td><td>82.9</td></tr><tr><td colspan="5">Transformer</td></tr><tr><td>DeiT-Small/16 [2]</td><td>22.1</td><td>4.6</td><td>437</td><td>79.9</td></tr><tr><td>CrossViT-S [30]</td><td>26.7</td><td>5.6</td><td>-</td><td>81.0</td></tr><tr><td>T2T-ViT-14 [27]</td><td>22</td><td>5.2</td><td></td><td>81.5</td></tr><tr><td>TNT-S [15]</td><td>23.8</td><td>5.2</td><td>=</td><td>81.3</td></tr><tr><td>CoaTMini [17]</td><td>10</td><td>6.8</td><td></td><td>80.8</td></tr><tr><td>CoaT-Lite Small [17]</td><td>20</td><td>4.0</td><td>-</td><td>81.9</td></tr><tr><td>PVT-Small [8]</td><td>24.5</td><td>3.8</td><td>820</td><td>79.8</td></tr><tr><td>CPVT-Small-GAP [9]</td><td>23</td><td>4.6</td><td>817</td><td>81.5</td></tr><tr><td>Twins-PCPVT-S (ours)</td><td>24.1</td><td>3.8</td><td>815</td><td>81.2 (+1.3)</td></tr><tr><td>Swin-T[4]</td><td>29</td><td>4.5</td><td>766</td><td>81.3</td></tr><tr><td>Swin-T + CPVT†</td><td>28</td><td>4.4</td><td>766</td><td>81.2</td></tr><tr><td>Twins-SVT-S (ours)</td><td>24</td><td>2.9</td><td>1059</td><td>81.7 (+1.8)</td></tr><tr><td>T2T-ViT-19 [27]</td><td>39.2</td><td>8.9</td><td>1</td><td>81.9</td></tr><tr><td>PVT-Medium [8]</td><td>44.2</td><td>6.7</td><td>526</td><td>81.2</td></tr><tr><td>Twins-PCPVT-B(ours)</td><td>43.8</td><td>6.7</td><td>525</td><td>82.7 (+0.8)</td></tr><tr><td>Swin-S [4]</td><td>50</td><td>8.7</td><td>444</td><td>83.0</td></tr><tr><td>Twins-SVT-B (ours)</td><td>56</td><td>8.6</td><td>469</td><td>83.2 (+1.3)</td></tr><tr><td>ViT-Base/16 [1]</td><td>86.6</td><td>17.6</td><td>86</td><td>77.9</td></tr><tr><td>DeiT-Base/16 [2]</td><td>86.6</td><td>17.6</td><td>292</td><td>81.8</td></tr><tr><td>T2T-ViT-24[27]</td><td>64.1</td><td>14.1</td><td>1</td><td>82.3</td></tr><tr><td>Cross ViT-B [30]</td><td>104.7</td><td>21.2</td><td>1</td><td>82.2</td></tr><tr><td>TNT-B [15]</td><td>66</td><td>14.1</td><td>=</td><td>82.8</td></tr><tr><td>CPVT-B [9]</td><td>88</td><td>17.6</td><td>292</td><td>82.3</td></tr><tr><td>PVT-Large [8]</td><td>61.4</td><td>9.8</td><td>367</td><td>81.7</td></tr><tr><td>Twins-PCPVT-L(ours)</td><td>60.9</td><td>9.8</td><td>367</td><td>83.1 (+5.2)</td></tr><tr><td>Swin-B [4]</td><td>88</td><td>15.4</td><td>275</td><td>83.3</td></tr><tr><td>Twins-SVT-L (ours)</td><td>99.2</td><td>15.1</td><td>288</td><td>83.7( (+5.8)</td></tr><tr><td colspan="5">Hybrid</td></tr><tr><td>BoTNet-S1-59 [29]</td><td>33.5</td><td>7.3</td><td></td><td>81.7</td></tr><tr><td>BossNet-T1 [41]</td><td>1</td><td>7.9</td><td></td><td>81.9</td></tr><tr><td>CvT-13 [31]</td><td>20</td><td>4.5</td><td></td><td>81.6</td></tr><tr><td>BoTNet-S1-110 [29]</td><td>54.7</td><td>10.9</td><td></td><td>82.8</td></tr><tr><td>CvT-21 [31]</td><td>32</td><td>7.1</td><td>=</td><td>82.5</td></tr></table>
|
| 114 |
+
|
| 115 |
+
For $1 \times$ schedule object detection with RetinaNet, Twins-PCPVT-S surpasses PVT-Small with $2 . 6 \%$ mAP and Twins-PCPVT-B exceeds PVT-Medium by $2 . 4 \%$ mAP on the COCO val2017 split. Twins-SVT-S outperforms Swin-T with $1 . 5 \%$ mAP while using $12 \%$ fewer FLOPs. Our method outperform the others with similar advantage in $3 \times$ experiments.
|
| 116 |
+
|
| 117 |
+
Table 2 – Performance comparisons with different backbones on ADE20K validation dataset. FLOPs are tested on $5 1 2 \times 5 1 2$ resolution. All backbones are pretrained on ImageNet-1k except SETR [45], which is pretrained on ImageNet-21k dataset.
|
| 118 |
+
|
| 119 |
+
<table><tr><td rowspan="2">Backbone</td><td colspan="3">Semantic FPN 80k (PVT [8] setting)</td><td colspan="3">Upernet 160k (Swin [4] setting)</td></tr><tr><td>FLOPs (G)</td><td>Param (M)</td><td>mIoU (%)</td><td>FLOPs (G)</td><td>Param (M)</td><td>mIoU/MS mIoU (%)</td></tr><tr><td>ResNet50 [10]</td><td>45</td><td>28.5</td><td>36.7</td><td></td><td>1</td><td></td></tr><tr><td>PVT-Small [8]</td><td>40</td><td>28.2</td><td>39.8</td><td>1</td><td>-</td><td>=</td></tr><tr><td>Twins-PCPVT-S (ours)</td><td>40</td><td>28.4</td><td>44.3 (+7.6)</td><td>234</td><td>54.6</td><td>46.2/47.5</td></tr><tr><td>Swin-T[4]</td><td>46</td><td>31.9</td><td>41.5</td><td>237</td><td>59.9</td><td>44.5/45.8</td></tr><tr><td>Twins-SVT-S (ours)</td><td>37</td><td>28.3</td><td>43.2( (+6.5)</td><td>228</td><td>54.4</td><td>46.2/47.1</td></tr><tr><td>ResNet101 [10]</td><td>66</td><td>47.5</td><td>38.8</td><td>258</td><td>86</td><td>-/44.9</td></tr><tr><td>PVT-Medium [8]</td><td>55</td><td>48.0</td><td>41.6</td><td>=</td><td>1</td><td></td></tr><tr><td>Twins-PCPVT-B (ours)</td><td>55</td><td>48.1</td><td>44.9 (+6.1)</td><td>250</td><td>74.3</td><td>47.1/48.4</td></tr><tr><td>Swin-S [4]</td><td>70</td><td>53.2</td><td>45.2</td><td>261</td><td>81.3</td><td>47.6/49.5</td></tr><tr><td>Twins-SVT-B (ours)</td><td>67</td><td>60.4</td><td>45.3 (+6.5)</td><td>261</td><td>88.5</td><td>47.7/48.9</td></tr><tr><td>ResNetXt101-64×4d [13]</td><td>1</td><td>86.4</td><td>40.2</td><td>1</td><td>1</td><td>=</td></tr><tr><td>PVT-Large [8]</td><td>71</td><td>65.1</td><td>42.1</td><td>-</td><td>-</td><td>-</td></tr><tr><td>Twins-PCPVT-L (ours)</td><td>71</td><td>65.3</td><td>46.4 (+6.2)</td><td>269</td><td>91.5</td><td>48.6/49.8</td></tr><tr><td>Swin-B [4]</td><td>107</td><td>91.2</td><td>46.0</td><td>299</td><td>121</td><td>48.1/49.7</td></tr><tr><td>Twins-SVT-L (ours)</td><td>102</td><td>103.7</td><td>46.7 (+6.5)</td><td>297</td><td>133</td><td>48.8/50.2</td></tr><tr><td>Backbone</td><td></td><td></td><td>PUP (SETR [45] setting)</td><td colspan="3">MLA (SETR [45] setting)</td></tr><tr><td>T-Large (SETR) [45]</td><td>-</td><td>310</td><td>50.1</td><td>1</td><td>308</td><td>48.6/50.3</td></tr></table>
|
| 120 |
+
|
| 121 |
+
For $1 \times$ object segmentation with the Mask R-CNN framework, Twins-PCPVT-S brings similar improvements $( + 2 . 5 \%$ mAP) over PVT-Small. Compared with PVT-Medium, Twins-PCPVT-B obtains $2 . 6 \%$ higher mAP, which is also on par with that of Swin. Both Twins-SVT-S and Twins-SVTB achieve better or slightly better performance compared to the counterparts of Swin. As for large models, our results are shown in Table 1 (in supplementary) and we also achieve better performance with comparable FLOPs.
|
| 122 |
+
|
| 123 |
+
Table 3 – Object detection performance on the COCO val2017 split using the RetinaNet framework. $1 \times$ is 12 epochs and $3 \times$ is 36 epochs. “MS”: Multi-scale training. FLOPs are evaluated on $8 0 0 \times 6 0 0$ resolution.
|
| 124 |
+
|
| 125 |
+
<table><tr><td rowspan="2">Backbone</td><td rowspan="2">FLOPsParaml (G)</td><td rowspan="2">(M)</td><td>RetinaNet1×</td><td>RetinaNet 3× +MS</td></tr><tr><td>|AP</td><td>AP50 AP75 APs APm APL|AP AP50 AP75APs APm APL</td></tr><tr><td>ResNet50 [10]</td><td>111</td><td>37.7 36.3</td><td>55.3 38.6 19.3 40.0 48.8|39.0</td><td>58.4 41.8 22.4 42.8 51.6</td></tr><tr><td>PVT-Small [8]</td><td>118</td><td>34.2</td><td>61.3 43.0 25.0 42.9 55.7</td><td>62.7 45.0 26.2 45.2 57.2</td></tr><tr><td>Twins-PCPVT-S (ours)</td><td>118</td><td>34.4</td><td>43.0(+6.7) 64.1 46.0 27.5 46.3 57.3</td><td>45.2(+6.2) 66.5 48.6 30.0 48.8 58.9</td></tr><tr><td>Swin-T[4]</td><td>118</td><td>38.5</td><td>62.1 44.2 25.1 44.9 55.5</td><td>43.9 64.8 47.1 28.4 47.2 57.8</td></tr><tr><td>Twins-SVT-S (ours)</td><td>104</td><td>34.3</td><td>43.0(+6.7) 64.2 46.3 28.0 46.4 57.5</td><td>45.6(+6.6) 67.1 48.6 29.8 49.3 60.0</td></tr><tr><td>ResNet101[10]</td><td>149</td><td>56.7</td><td>57.8 41.2 21.4 42.6 51.1</td><td>60.1 44.0 23.7 45.0 53.8</td></tr><tr><td>ResNeXt101-32×4d[13]</td><td>151</td><td>56.4</td><td>59.642.7 22.344.2 52.5</td><td>61.0 44.3 23.9 45.5 53.7</td></tr><tr><td>PVT-Medium [8]</td><td>151</td><td>53.9</td><td>63.1 44.3 25.0 44.9 57.64</td><td>63.8 46.1 27.3 46.3 58.9</td></tr><tr><td>Twins-PCPVT-B (ours)</td><td>151</td><td>54.1</td><td>41.9 44.3(+5.8) ) 65.6 47.3 27.9 47.9 59.64</td><td>43.2 46.4(+5.5) 67.7 49.8 31.3 50.2 61.4 46.3</td></tr><tr><td>Swin-S [4]</td><td>162</td><td>59.8</td><td>44.5 65.7 47.5 27.4 48.0 59.9</td><td>67.4 49.8 31.1 50.3 60.9</td></tr><tr><td>Twins-SVT-B (ours)</td><td>163</td><td>67.0</td><td>45.3(+6.8) 66.7 48.1 28.5 48.9 60.646.9(+6.0)</td><td>68.0 50.2 31.7 50.3 61.8</td></tr></table>
|
| 126 |
+
|
| 127 |
+
# 4.4 Ablation Studies
|
| 128 |
+
|
| 129 |
+
Configurations of LSA and GSA blocks. We evaluate different combinations of LSA and GSA based on our small model and present the ablation results in Table 5. The models with only locally-grouped attention fail to obtain good performance $( 7 6 . 9 \% )$
|
| 130 |
+
|
| 131 |
+
Table 5 – Classification performance for different combinations of LSA (L) and GSA (G) blocks based on the small model.
|
| 132 |
+
|
| 133 |
+
<table><tr><td>Function Type</td><td>Params (M)</td><td>FLOPs (G)</td><td>Top-1 (%)</td></tr><tr><td>(L,L,L)</td><td>8.8</td><td>2.2</td><td>76.9</td></tr><tr><td>(L, LLG, LLG, G)</td><td>23.5</td><td>2.8</td><td>81.5</td></tr><tr><td>(L, LG, LG, G)</td><td>24.1</td><td>2.8</td><td>81.7</td></tr><tr><td>(L,L,L, G)</td><td>22.2</td><td>2.9</td><td>80.5</td></tr><tr><td>PVT-small(G, G, G, G) [8]</td><td>24.5</td><td>3.8</td><td>79.8</td></tr></table>
|
| 134 |
+
|
| 135 |
+
Table 4 – Object detection and instance segmentation performance on the COCO val2017 dataset using the Mask R-CNN framework. FLOPs are evaluated on a $8 0 0 \times 6 0 0$ image.
|
| 136 |
+
|
| 137 |
+
<table><tr><td rowspan="2">Backbone</td><td rowspan="2">FLOPsParaml (G)</td><td rowspan="2">(M)</td><td colspan="3">Mask R-CNN 1×</td><td colspan="3">Mask R-CNN3× +MS</td></tr><tr><td>|APb</td><td>AP0APAPm</td><td>APAP|APb</td><td></td><td></td><td>AP0APP APm APAPP</td></tr><tr><td>ResNet50 [10]</td><td>174</td><td>44.2</td><td>38.0</td><td>58.6 41.4 34.4</td><td>55.1 36.741.0</td><td></td><td></td><td>61.7 44.9 37.1 58.4 40.1</td></tr><tr><td>PVT-Small [8]</td><td>178</td><td>44.1</td><td>40.4</td><td>62.9 43.8 37.8</td><td>60.1 40.343.0</td><td></td><td></td><td>65.3 46.9 39.9 62.5 42.8</td></tr><tr><td>Twins-PCPVT-S (ours)</td><td>178</td><td>44.3</td><td>42.9(+4.9)</td><td>65.8 47.1 40.0(+5.6)</td><td>62.742.9</td><td></td><td>46.8(+5.8)</td><td>69.3 51.8 42.6 66.3 46.0</td></tr><tr><td>Swin-T[4]</td><td>177</td><td>47.8</td><td>42.2</td><td>64.6 46.2 39.1</td><td></td><td>61.6 42.0 46.0</td><td></td><td>68.2 50.2 41.6 65.1 44.8</td></tr><tr><td>Twins-SVT-S (ours)</td><td>164</td><td>44.0</td><td>43.4(+5.4)</td><td>66.0 47.3 40.3(+5.9)</td><td>63.243.4</td><td></td><td>46.8(+5.8)</td><td>69.2 51.2 42.6 66.3 45.8</td></tr><tr><td>ResNet101[10]</td><td>210</td><td>63.2</td><td>40.4</td><td>61.1 44.2 36.4</td><td></td><td>57.7 38.842.8</td><td></td><td>63.2 47.1 38.5 60.1 41.3</td></tr><tr><td>ResNeXt101-32×4d[13]</td><td>212</td><td>62.8</td><td>41.9</td><td>62.5 45.9 37.5</td><td></td><td>59.4 40.2 44.0</td><td></td><td>64.4 48.0 39.2 61.4 41.9</td></tr><tr><td>PVT-Medium [8]</td><td>211</td><td>63.9</td><td>42.0</td><td>64.4 45.6 39.0</td><td>61.6 42.1</td><td>44.2</td><td></td><td>66.0 48.2 40.5 63.1 43.5</td></tr><tr><td>Twins-PCPVT-B (ours)</td><td>211</td><td>64.0</td><td>44.6(+4.2)</td><td>66.7 48.9 40.9(+4.5)</td><td></td><td>63.844.2</td><td>47.9(+5.1) 70.1</td><td>52.5 43.2 67.2 46.3</td></tr><tr><td>Swin-S [4]</td><td>222</td><td>69.1</td><td>44.8</td><td>66.6 48.9 40.9</td><td></td><td>63.4 44.2 47.6</td><td></td><td>69.4 52.5 42.8 66.5 46.4</td></tr><tr><td>Twins-SVT-B (ours)</td><td>224</td><td>76.3</td><td>45.2(+4.8)</td><td>67.6 49.3 41.5(+5.1) </td><td>64.5 44.8</td><td></td><td>48.0(+5.2)</td><td>69.5 52.7 43.0 66.8 46.6</td></tr></table>
|
| 138 |
+
|
| 139 |
+
because this setting has a limited and small receptive field. An extra global attention layer in the last stage can improve the classification performance by $3 . 6 \%$ . Local-Local-Global (abbr. LLG) also achieves good performance $( 8 1 . 5 \% )$ , but we do not use this design in this work.
|
| 140 |
+
|
| 141 |
+
Sub-sampling functions. We further study how the different sub-sampling functions affect the performance. Specifically, we compare the regular strided convolutions, separable convolutions and average pooling based on the ‘small’ model and present the results in Table 6. The first option performs best and therefore we choose it as our default implementation.
|
| 142 |
+
|
| 143 |
+
Table 6 – ImageNet classification performance of different forms of sub-sampled functions for the global sub-sampled attention (GSA).
|
| 144 |
+
|
| 145 |
+
<table><tr><td>Function Type</td><td>Top-1(%)</td></tr><tr><td>2D Conv.</td><td>81.7</td></tr><tr><td>2D Separable Conv.</td><td>81.2</td></tr><tr><td>Average Pooling</td><td>81.2</td></tr></table>
|
| 146 |
+
|
| 147 |
+
sitional Encodings. We replace the relative positional encoding with CPVT for Swin-T and report the detection performance on COCO with RetinaNet and Mask R-CNN in Table 7. The CPVT-based Swin cannot achieve improved performance with both frameworks, which indicates that our performance improvements should be owing to the paradigm of Twins-SVT instead of the positional encodings.
|
| 148 |
+
|
| 149 |
+
Table 7 – Object detection performance on the COCO using different positional encoding strategies.
|
| 150 |
+
|
| 151 |
+
<table><tr><td rowspan="2">Backbone</td><td colspan="4">RetinaNet</td><td colspan="6">Mask RCNN</td></tr><tr><td>FLOPs(G)</td><td>Param(M) AP</td><td></td><td>AP50</td><td>AP75</td><td>FLOPs(G)</td><td>Param(M)</td><td>AP</td><td>AP50</td><td>AP75</td></tr><tr><td>Swin-T[4]]</td><td>245</td><td>38.5</td><td>41.5</td><td>62.1</td><td>44.2</td><td>264</td><td>47.8</td><td>42.2</td><td>64.6</td><td>46.2</td></tr><tr><td>Swin-T+CPVT</td><td>245</td><td>38.5</td><td>41.3</td><td>62.4</td><td>44.1</td><td>263</td><td>47.8</td><td>42.0</td><td>64.5</td><td>45.9</td></tr></table>
|
| 152 |
+
|
| 153 |
+
# 5 Conclusion
|
| 154 |
+
|
| 155 |
+
In this paper, we have presented two powerful vision transformer backbones for both image-level classification and a few downstream dense prediction tasks. We dub them as twin transformers: Twins-PCPVT and Twins-SVT. The former variant explores the applicability of conditional positional encodings [9] in pyramid vision transformer [8], confirming its potential for improving backbones in many vision tasks. In the latter variant we revisit current attention design to proffer a more efficient attention paradigm. We find that interleaving local and global attention can produce impressive results, yet it comes with higher throughputs. Both transformer models set a new state of the art in image classification, objection detection and semantic/instance segmentation.
|
| 156 |
+
|
| 157 |
+
# References
|
| 158 |
+
|
| 159 |
+
[1] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In Proc. Int. Conf. Learn. Representations, 2021.
|
| 160 |
+
[2] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. arXiv preprint arXiv:2012.12877, 2020. [3] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In Proc. Eur. Conf. Comp. Vis., pages 213–229. Springer, 2020.
|
| 161 |
+
[4] 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 Proc. IEEE Int. Conf. Comp. Vis., pages 10012–10022, 2021. [5] Liang-Chieh Chen, George Papandreou, Iasonas Kokkinos, Kevin Murphy, and Alan L Yuille. Deeplab: Semantic image segmentation with deep convolutional nets, atrous convolution, and fully connected crfs. IEEE Trans. Pattern Anal. Mach. Intell., 40(4):834–848, 2017. [6] Chao Peng, Xiangyu Zhang, Gang Yu, Guiming Luo, and Jian Sun. Large kernel matters– improve semantic segmentation by global convolutional network. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 4353–4361, 2017.
|
| 162 |
+
[7] Wei Liu, Andrew Rabinovich, and Alexander C Berg. Parsenet: Looking wider to see better. arXiv preprint arXiv:1506.04579, 2015. [8] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021. [9] Xiangxiang Chu, Zhi Tian, Bo Zhang, Xinlong Wang, Xiaolin Wei, Huaxia Xia, and Chunhua Shen. Conditional positional encodings for vision transformers. arXiv preprint arXiv:2102.10882, 2021.
|
| 163 |
+
[10] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 770–778, 2016.
|
| 164 |
+
[11] Mingxing Tan and Quoc Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In Proc. Int. Conf. Mach. Learn., pages 6105–6114. PMLR, 2019.
|
| 165 |
+
[12] François Chollet. Xception: Deep learning with depthwise separable convolutions. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 1251–1258, 2017.
|
| 166 |
+
[13] Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 1492–1500, 2017.
|
| 167 |
+
[14] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Proc. Advances in Neural Inf. Process. Syst., pages 6000–6010, 2017.
|
| 168 |
+
[15] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. arXiv preprint arXiv:2103.00112, 2021.
|
| 169 |
+
[16] Prajit Ramachandran, Niki Parmar, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jon Shlens. Stand-alone self-attention in vision models. In Proc. Advances in Neural Inf. Process. Syst., volume 32, pages 68–80, 2019.
|
| 170 |
+
[17] Weijian Xu, Yifan Xu, Tyler Chang, and Zhuowen Tu. Co-scale conv-attentional image transformers, 2021.
|
| 171 |
+
[18] Yuqing Wang, Zhaoliang Xu, Xinlong Wang, Chunhua Shen, Baoshan Cheng, Hao Shen, and Huaxia Xia. End-to-end video instance segmentation with transformers. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., 2021.
|
| 172 |
+
[19] Hanting Chen, Yunhe Wang, Tianyu Guo, Chang Xu, Yiping Deng, Zhenhua Liu, Siwei Ma, Chunjing Xu, Chao Xu, and Wen Gao. Pre-trained image processing transformer. arXiv preprint arXiv:2012.00364, 2020.
|
| 173 |
+
[20] Fuzhi Yang, Huan Yang, Jianlong Fu, Hongtao Lu, and Baining Guo. Learning texture transformer network for image super-resolution. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 5791–5800, 2020.
|
| 174 |
+
[21] Yanhong Zeng, Jianlong Fu, and Hongyang Chao. Learning joint spatial-temporal transformations for video inpainting. In Proc. Eur. Conf. Comp. Vis., pages 528–543. Springer, 2020.
|
| 175 |
+
[22] Zhigang Dai, Bolun Cai, Yugeng Lin, and Junying Chen. UP-DETR: Unsupervised pre-training for object detection with transformers. arXiv preprint arXiv:2011.09094, 2020.
|
| 176 |
+
[23] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. arXiv: Comp. Res. Repository, 2021.
|
| 177 |
+
[24] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip HS Torr, et al. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. arXiv preprint arXiv:2012.15840, 2020.
|
| 178 |
+
[25] Niki Parmar, Ashish Vaswani, Jakob Uszkoreit, Lukasz Kaiser, Noam Shazeer, Alexander Ku, and Dustin Tran. Image transformer. In Proc. Int. Conf. Mach. Learn., volume 80, pages 4055–4064, 2018.
|
| 179 |
+
[26] Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, and Hervé Jégou. Going deeper with image transformers. arXiv preprint arXiv:2103.17239, 2021.
|
| 180 |
+
[27] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Francis Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token ViT: Training vision transformers from scratch on imagenet. arXiv preprint arXiv:2101.11986, 2021.
|
| 181 |
+
[28] Zihang Jiang, Qibin Hou, Li Yuan, Daquan Zhou, Xiaojie Jin, Anran Wang, and Jiashi Feng. Token labeling: Training an $8 5 . 4 \%$ top-1 accuracy vision transformer with 56M parameters on ImageNet. arXiv: Comp. Res. Repository, 2021.
|
| 182 |
+
[29] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. arXiv preprint arXiv:2101.11605, 2021.
|
| 183 |
+
[30] Chun-Fu Chen, Quanfu Fan, and Rameswar Panda. CrossViT: Cross-attention multi-scale vision transformer for image classification. arXiv preprint arXiv:2103.14899, 2021.
|
| 184 |
+
[31] Haiping Wu, Bin Xiao, Noel Codella, Mengchen Liu, Xiyang Dai, Lu Yuan, and Lei Zhang. CvT: Introducing convolutions to vision transformers. arXiv: Comp. Res. Repository, 2021.
|
| 185 |
+
[32] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable detr: Deformable transformers for end-to-end object detection. In Proc. Int. Conf. Learn. Representations, 2021.
|
| 186 |
+
[33] Tsung-Yi Lin, Piotr Dollár, Ross Girshick, Kaiming He, Bharath Hariharan, and Serge Belongie. Feature pyramid networks for object detection. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 2117–2125, 2017.
|
| 187 |
+
[34] Yuhui Yuan, Lang Huang, Jianyuan Guo, Chao Zhang, Xilin Chen, and Jingdong Wang. OCNet: Object context network for scene parsing. arXiv: Comp. Res. Repository, 2021.
|
| 188 |
+
[35] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. ImageNet classification with deep convolutional neural networks. In Proc. Advances in Neural Inf. Process. Syst., volume 25, pages 1097–1105, 2012.
|
| 189 |
+
[36] Laurent Sifre and Stéphane Mallat. Rigid-motion scattering for texture classification. arXiv preprint arXiv:1403.1687, 2014.
|
| 190 |
+
[37] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In Proc. Int. Conf. Learn. Representations, 2019.
|
| 191 |
+
[38] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Weinberger. Deep networks with stochastic depth. In Proc. Eur. Conf. Comp. Vis., pages 646–661. Springer, 2016.
|
| 192 |
+
[39] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International journal of computer vision, 115(3):211–252, 2015.
|
| 193 |
+
[40] Ilija Radosavovic, Raj Prateek Kosaraju, Ross Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 10428–10436, 2020.
|
| 194 |
+
[41] Changlin Li, Tao Tang, Guangrun Wang, Jiefeng Peng, Bing Wang, Xiaodan Liang, and Xiaojun Chang. Bossnas: Exploring hybrid cnn-transformers with block-wisely self-supervised neural architecture search. arXiv preprint arXiv:2103.12424, 2021.
|
| 195 |
+
[42] Bolei Zhou, Hang Zhao, Xavier Puig, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Scene parsing through ADE20k dataset. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 633–641, 2017.
|
| 196 |
+
[43] Alexander Kirillov, Ross Girshick, Kaiming He, and Piotr Dollár. Panoptic feature pyramid networks. In Proc. IEEE Conf. Comp. Vis. Patt. Recogn., pages 6399–6408, 2019.
|
| 197 |
+
[44] Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In Proceedings of the European Conference on Computer Vision (ECCV), pages 418–434, 2018.
|
| 198 |
+
[45] Sixiao Zheng, Jiachen Lu, Hengshuang Zhao, Xiatian Zhu, Zekun Luo, Yabiao Wang, Yanwei Fu, Jianfeng Feng, Tao Xiang, Philip H.S. Torr, and Li Zhang. Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers. In CVPR, 2021.
|
| 199 |
+
[46] Tsung-Yi Lin, Priya Goyal, Ross Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense object detection. In Proc. IEEE Int. Conf. Comp. Vis., pages 2980–2988, 2017.
|
| 200 |
+
[47] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask R-CNN. In Proc. IEEE Int. Conf. Comp. Vis., pages 2961–2969, 2017.
|
| 201 |
+
[48] 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 Proc. Eur. Conf. Comp. Vis., pages 740–755, 2014.
|
| 202 |
+
[49] Kai Chen, Jiaqi Wang, Jiangmiao Pang, Yuhang Cao, Yu Xiong, Xiaoxiao Li, Shuyang Sun, Wansen Feng, Ziwei Liu, Jiarui Xu, Zheng Zhang, Dazhi Cheng, Chenchen Zhu, Tianheng Cheng, Qijie Zhao, Buyu Li, Xin Lu, Rui Zhu, Yue Wu, Jifeng Dai, Jingdong Wang, Jianping Shi, Wanli Ouyang, Chen Change Loy, and Dahua Lin. MMDetection: Open MMLab detection toolbox and benchmark. arXiv preprint arXiv:1906.07155, 2019.
|
md/train/5la5tka8a4-/5la5tka8a4-.md
ADDED
|
@@ -0,0 +1,551 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Proximal and Federated Random Reshuffling
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
Random Reshuffling (RR), also known as Stochastic Gradient Descent (SGD) without replacement, is a popular and theoretically grounded method for finite-sum minimization. We propose two new algorithms: Proximal and Federated Random Reshuffling (ProxRR and FedRR). The first algorithm, ProxRR, solves composite finite-sum minimization problems in which the objective is the sum of a (potentially non-smooth) convex regularizer and an average of $n$ smooth objectives. ProxRR evaluates the proximal operator once per epoch only. When the proximal operator is expensive to compute, this small difference makes ProxRR up to $n$ times faster than algorithms that evaluate the proximal operator in every iteration, such as proximal (stochastic) gradient descent. We give examples of practical optimization tasks where the proximal operator is difficult to compute and ProxRR has a clear advantage. One such task is federated or distributed optimization, where the evaluation of the proximal operator corresponds to communication across the network. We obtain our second algorithm, FedRR, as a special case of ProxRR applied to federated optimization, and prove it has a smaller communication footprint than either distributed gradient descent or Local SGD. Our theory covers both constant and decreasing stepsizes, and allows for importance resampling schemes that can improve conditioning, which may be of independent interest. Our theory covers both convex and nonconvex regimes. Finally, we corroborate our results with experiments on real data sets.
|
| 11 |
+
|
| 12 |
+
# 21 1 Introduction
|
| 13 |
+
|
| 14 |
+
22 Modern theory and practice of training supervised machine learning models is based on the paradigm
|
| 15 |
+
23 of regularized empirical risk minimization (ERM) [Shalev-Shwartz and Ben-David, 2014]. While the
|
| 16 |
+
24 ultimate goal of supervised learning is to train models that generalize well to unseen data, in practice
|
| 17 |
+
25 only a finite data set is available during training. Settling for a model merely minimizing the average
|
| 18 |
+
26 loss on this training set—the empirical risk—is insufficient, as this often leads to over-fitting and poor
|
| 19 |
+
27 generalization performance in practice. Due to this reason, empirical risk is virtually always amended
|
| 20 |
+
28 with a suitably chosen regularizer whose role is to encode prior knowledge about the learning task at
|
| 21 |
+
29 hand, thus biasing the training algorithm towards better performing models.
|
| 22 |
+
30 The regularization framework is quite general and perhaps surprisingly it also allows us to consider
|
| 23 |
+
31 methods for federated learning (FL)—a paradigm in which we aim at training model for a number of
|
| 24 |
+
32 clients that do not want to reveal their data [Konecný et al. ˇ , 2016, McMahan et al., 2017, Kairouz
|
| 25 |
+
33 et al., 2019]. The training in FL usually happens on devices with only a small number of model
|
| 26 |
+
34 updates being shared with a global host. To this end, Federated Averaging algorithm has emerged
|
| 27 |
+
35 that performs Local SGD updates on the clients’ devices and periodically aggregates their average.
|
| 28 |
+
36 Its analysis usually requires special techniques and deliberately constructed sequences hindering the
|
| 29 |
+
37 research in this direction. We shall see, however, that the convergence of our FedRR follows from
|
| 30 |
+
38 merely applying our algorithm for regularized problems to a carefully chosen reformulation.
|
| 31 |
+
|
| 32 |
+
39 Formally, regularized ERM problems are optimization problems of the form
|
| 33 |
+
|
| 34 |
+
$$
|
| 35 |
+
\begin{array} { r } { \underset { x \in \mathbb { R } ^ { d } } { \operatorname* { m i n } } \big [ P ( x ) : = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } f _ { i } ( x ) + \psi ( x ) \big ] , } \end{array}
|
| 36 |
+
$$
|
| 37 |
+
|
| 38 |
+
where 40 $f _ { i } \colon { \mathbb { R } ^ { d } } \to { \mathbb { R } }$ is the loss of model parameterized by vector $x \in \mathbb { R } ^ { d }$ on the $i$ -th training data 41 point, and $\psi : \mathbb { R } ^ { d } \mathbb { R } \cup \{ + \infty \}$ is a regularizer. Let $[ \acute { n } ] : = \{ 1 , 2 , \ldots , n \}$ . We shall make the 42 following assumption throughout the paper without explicitly mentioning it:
|
| 39 |
+
|
| 40 |
+
43 Assumption 1. The functions $f _ { i }$ are $L _ { i }$ -smooth, and the regularizer $\psi$ is proper, closed and convex.
|
| 41 |
+
Let 44 $L _ { \operatorname* { m a x } } : = \operatorname* { m a x } _ { i \in [ n ] } L _ { i }$ .
|
| 42 |
+
|
| 43 |
+
45 In some results we will additionally assume that either the individual functions $f _ { i }$ , or their average
|
| 44 |
+
46 $\begin{array} { r } { f : = \frac { 1 } { n } \sum _ { i } f _ { i } } \end{array}$ , or the regularizer $\psi$ are $\mu$ -strongly convex. Whenever we need such additional
|
| 45 |
+
47 assumptions, we will make this explicitly clear. While all these concepts are standard, we review
|
| 46 |
+
48 them briefly in Section A.
|
| 47 |
+
49 Proximal SGD. When the number $n$ of training data points is huge, as is increasingly common
|
| 48 |
+
50 in practice, the most efficient algorithms for solving (1) are stochastic first-order methods, such
|
| 49 |
+
51 as stochastic gradient descent (SGD) [Bordes et al., 2009], in one or another of its many variants
|
| 50 |
+
52 proposed in the last decade [Shang et al., 2018, Pham et al., 2020]. These method almost invariably
|
| 51 |
+
53 rely on alternating stochastic gradient steps with the evaluation of the proximal operator
|
| 52 |
+
|
| 53 |
+
$$
|
| 54 |
+
\begin{array} { r } { \operatorname { p r o x } _ { \gamma \psi } ( x ) : = \operatorname * { a r g m i n } _ { z \in \mathbb { R } ^ { d } } \left\{ \gamma \psi ( z ) + \frac { 1 } { 2 } \| z - x \| ^ { 2 } \right\} . } \end{array}
|
| 55 |
+
$$
|
| 56 |
+
|
| 57 |
+
54 The simplest of these has the form
|
| 58 |
+
|
| 59 |
+
$$
|
| 60 |
+
\begin{array} { r } { x _ { k + 1 } ^ { \mathrm { S G D } } = \mathrm { p r o x } _ { \gamma _ { k } \psi } ( x _ { k } ^ { \mathrm { S G D } } - \gamma _ { k } \nabla f _ { i _ { k } } ( x _ { k } ^ { \mathrm { S G D } } ) ) , } \end{array}
|
| 61 |
+
$$
|
| 62 |
+
|
| 63 |
+
55 where $i _ { k }$ is an index from $\{ 1 , 2 , \ldots , n \}$ chosen uniformly at random, and $\gamma _ { k } > 0$ is a properly
|
| 64 |
+
56 chosen learning rate. Our understanding of (2) is quite mature; see [Gorbunov et al., 2020] for a
|
| 65 |
+
57 general treatment which considers methods of this form in conjunction with more advanced stochastic
|
| 66 |
+
58 gradient estimators in place of $\nabla f _ { i _ { k } }$ .
|
| 67 |
+
59 Applications such as training sparse linear models [Tibshirani, 1996], nonnegative matrix factoriza
|
| 68 |
+
60 tion [Lee and Seung, 1999], image deblurring [Rudin et al., 1992, Bredies et al., 2010], and training
|
| 69 |
+
61 with group selection [Yuan and Lin, 2006] all rely on the use of hand-crafted regularizes. For most of
|
| 70 |
+
62 them, the proximal operator can be evaluated efficiently, and SGD is near or at the top of the list of
|
| 71 |
+
63 efficient training algorithms.
|
| 72 |
+
64 Random reshuffling. A particularly successful variant of SGD is based on the idea of random
|
| 73 |
+
65 shuffling (permutation) of the training data followed by $n$ iterations of the form (2), with the index
|
| 74 |
+
66 $i _ { k }$ following the pre-selected permutation [Bottou, 2012]. This process is repeated several times,
|
| 75 |
+
67 each time using a new freshly sampled random permutation of the data, and the resulting method is
|
| 76 |
+
68 known under the name Random Reshuffling $( R R )$ . When the same permutation is used throughout,
|
| 77 |
+
69 the technique is known under the name Shuffle-Once $( S O )$ .
|
| 78 |
+
70 One of the main advantages of this approach is rooted in its intrinsic ability to avoid cache misses when
|
| 79 |
+
71 reading the data from memory, which enables a significantly faster implementation. Furthermore,
|
| 80 |
+
72 RR is often observed to converge in fewer iterations than SGD in practice. This can intuitively be
|
| 81 |
+
73 ascribed to the fact that while due to its sampling-with-replacement approach SGD can miss to learn
|
| 82 |
+
74 from some data points in any given epoch, RR will learn from each data point in each epoch.
|
| 83 |
+
75 Understanding the random reshuffling trick, and why it works, has been a non-trivial open problem
|
| 84 |
+
76 for a long time [Bottou, 2009, Recht and Ré, 2012, Gürbüzbalaban et al., 2019, Haochen and Sra,
|
| 85 |
+
77 2019]. Until recent development which lead to a significant simplification of the convergence
|
| 86 |
+
78 analysis technique and proofs [Mishchenko et al., 2020], prior state of the art relied on long and
|
| 87 |
+
79 elaborate proofs requiring sophisticated arguments and tools, such as analysis via the Wasserstein
|
| 88 |
+
80 distance [Nagaraj et al., 2019], and relied on a significant number of strong assumptions about
|
| 89 |
+
81 the objective [Shamir, 2016, Haochen and Sra, 2019]. In alternative recent development, Ahn et al.
|
| 90 |
+
82 [2020] also develop new tools for analyzing the convergence of random reshuffling, in particular using
|
| 91 |
+
83 decreasing stepsizes and for objectives satisfying the Polyak-Łojasiewicz condition, a generalization
|
| 92 |
+
84 of strong convexity [Polyak, 1963, Lojasiewicz, 1963].
|
| 93 |
+
85 The difficulty of analyzing RR has been the main obstacle in the development of even some of the
|
| 94 |
+
86 most seemingly benign extensions of the method. Indeed, while all these are well understood in
|
| 95 |
+
Require: Stepsizes $\gamma _ { t } > 0$ , initial vector $\boldsymbol { x } _ { 0 } \in \mathbb { R } ^ { d }$ , number of epochs $T$
|
| 96 |
+
1: Sample a permutation $\pi = \left( \pi _ { 0 u } , \pi _ { 1 } , . . . , \pi _ { n - 1 } \right)$ of $[ n ]$ (Do step 1 only for ProxSO)
|
| 97 |
+
2: for epochs $t = 0 , 1 , \ldots , T - 1$ do
|
| 98 |
+
3: Sample a permutation $\pi = \left( \pi _ { 0 } , \pi _ { 1 } , \ldots , \pi _ { n - 1 } \right)$ of $[ n ]$ (Do step 3 only for ProxRR)
|
| 99 |
+
4: $x _ { t } ^ { 0 } = x _ { t }$
|
| 100 |
+
5: 6: for i = 0, 1, . . . , n − 1 doxi+1t = xit − γt∇fπi (xit)
|
| 101 |
+
7:
|
| 102 |
+
87 combination with its much simpler-to-analyze cousin SGD, to the best of our knowledge, there exists
|
| 103 |
+
88 no theoretical analysis of proximal, parallel, and importance sampling variants of RR with both
|
| 104 |
+
89 constant and decreasing stepsizes, and in most cases it is not even clear how should such methods be
|
| 105 |
+
90 constructed. Empowered by and building on the recent advances of Mishchenko et al. [2020], in this
|
| 106 |
+
91 paper we address all these challenges.
|
| 107 |
+
|
| 108 |
+
# 92 2 Contributions
|
| 109 |
+
|
| 110 |
+
In this section we outline the key contributions of our work, and also offer a few intuitive explanations motivating some of the development.
|
| 111 |
+
|
| 112 |
+
• New algorithm: ProxRR. Despite rich literature on Proximal SGD [Gorbunov et al., 2020], it is not obvious how one should extend RR to solve problem (1) when a regularizer $\psi$ is present. Indeed, the standard practice for SGD is to apply the proximal operator after each stochastic step [Duchi and Singer, 2009], i.e., in analogy with (2). On the other hand, RR is motivated by the fact that a data pass better approximates the full gradient step. If we applied the proximal operator after each step of RR, we would no longer approximate the full gradient after an epoch, as we illustrate next.
|
| 113 |
+
|
| 114 |
+
Example 1. Let 101 $n = 2$ , $\textstyle \psi ( x ) = { \frac { 1 } { 2 } } \| x \| ^ { 2 }$ , $f _ { 1 } ( x ) = \langle c _ { 1 } , x \rangle$ , $f _ { 2 } ( x ) = \langle c _ { 2 } , x \rangle$ with some $c _ { 1 } , c _ { 2 } \in \mathbb { R } ^ { d }$ , 102 $c _ { 1 } \neq c _ { 2 }$ . Let $\boldsymbol { x } _ { 0 } \in \mathbb { R } ^ { d }$ , $\gamma > 0$ and define $x _ { 1 } = x _ { 0 } - \gamma \nabla f _ { 1 } ( x _ { 0 } )$ , $x _ { 2 } = x _ { 1 } - \gamma \nabla f _ { 2 } ( x _ { 1 } )$ . Then, we 103 have $\mathrm { p r o x } _ { 2 \gamma \psi } ( x _ { 2 } ) = \mathrm { p r o x } _ { 2 \gamma \psi } ( x _ { 0 } - 2 \gamma \nabla f ( x _ { 0 } ) )$ . However, if $\begin{array} { r } { \tilde { x } _ { 1 } = \mathrm { p r o x } _ { \gamma \psi } ( x _ { 0 } - \gamma \nabla f _ { 1 } ( x _ { 0 } ) ) } \end{array}$ and 104 $\begin{array} { r } { \tilde { x } _ { 2 } = \mathrm { p r o x } _ { \gamma \psi } ( x _ { 1 } - \gamma \nabla f _ { 2 } ( \tilde { x } _ { 1 } ) ) } \end{array}$ , then $\tilde { x } _ { 2 } \neq \mathrm { p r o x } _ { 2 \gamma \psi } ( x _ { 0 } - 2 \gamma \nabla f ( x _ { 0 } ) )$ .
|
| 115 |
+
|
| 116 |
+
105 Motivated by this observation, we propose ProxRR (Algorithm 1), in which the proximal operator is
|
| 117 |
+
106 applied at the end of each epoch of RR, i.e., after each pass through all randomly reshuffled data. A
|
| 118 |
+
107 notable property of Algorithm 1 is that only a single proximal operator evaluation is needed during
|
| 119 |
+
108 each data pass. This is in sharp contrast with the way Proximal SGD works, and offers significant
|
| 120 |
+
109 advantages in regimes where the evaluation of the proximal mapping is expensive (e.g., comparable
|
| 121 |
+
110 to the evaluation of $n$ gradients $\nabla f _ { 1 } , \ldots , \nabla f _ { n } )$ .
|
| 122 |
+
111 • Convergence of ProxRR (for strongly convex functions or regularizer). We establish several
|
| 123 |
+
112 convergence results for ProxRR, of which we highlight two here. Both offer a linear convergence rate
|
| 124 |
+
113 with a fixed stepsize to a neighborhood of the solution. In both we reply on Assumption 1. Firstly, in
|
| 125 |
+
114 the case when in addition, each $f _ { i }$ is $\mu$ -strongly convex, we prove the rate (see Theorem 2)
|
| 126 |
+
|
| 127 |
+
$$
|
| 128 |
+
\begin{array} { r } { \mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] \leq \left( 1 - \gamma \mu \right) ^ { n T } \left. x _ { 0 } - x _ { * } \right. ^ { 2 } + \frac { 2 \gamma ^ { 2 } \sigma _ { \mathrm { r a d } } ^ { 2 } } { \mu } , } \end{array}
|
| 129 |
+
$$
|
| 130 |
+
|
| 131 |
+
115 where $\gamma _ { t } = \gamma \leq 1 / L _ { \operatorname* { m a x } }$ is the stepsize, and $\sigma _ { \mathrm { r a d } } ^ { 2 }$ is a shuffling radius constant (for precise definition, 116 see (4)). In Theorem 1 we bound the shuffling radius in terms of $\| \nabla f ( x _ { * } ) \| ^ { 2 }$ , n, $L _ { \mathrm { m a x } }$ and the more common quantity 117 $\begin{array} { r } { \sigma _ { * } ^ { 2 } : = \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \| \nabla f _ { i } ( x _ { * } ) - \nabla f ( x _ { * } ) \| ^ { 2 } } \end{array}$ . Secondly, if $\psi$ is $\mu$ -strongly convex, and 118 we choose the stepsize $\gamma _ { t } \overset { \cdot \cdot } { = } \gamma \leq 1 / L _ { \operatorname* { m a x } }$ , we prove the rate (see Theorem 3)
|
| 132 |
+
|
| 133 |
+
$$
|
| 134 |
+
\begin{array} { r } { \mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] \leq \left( 1 + 2 \gamma \mu n \right) ^ { - T } \left. x _ { 0 } - x _ { * } \right. ^ { 2 } + \frac { \gamma ^ { 2 } \sigma _ { \mathrm { r a d } } ^ { 2 } } { \mu } . } \end{array}
|
| 135 |
+
$$
|
| 136 |
+
|
| 137 |
+
119 Both mentioned rates show exponential (linear in logarithmic scale) convergence to a neighborhood whose size is proportional to 120 $\gamma ^ { 2 } \sigma _ { \mathrm { r a d } } ^ { 2 }$ . Since we can choose $\gamma$ to be arbitrarily small or periodically
|
| 138 |
+
|
| 139 |
+
121 decrease it, this implies that the iterates converge to $x _ { * }$ in the limit. Moreover, we show in Section 4 that when122 $\begin{array} { r } { \gamma = \mathcal { O } ( \frac { 1 } { T } ) } \end{array}$ the error is $\scriptstyle { \mathcal { O } } ( { \frac { 1 } { T ^ { 2 } } } )$ , which is superior to the $\mathcal { O } ( \textstyle { \frac { 1 } { T } } )$ error of SGD.
|
| 140 |
+
|
| 141 |
+
• Results for SO. All of our results apply to the Shuffle-Once algorithm as well. For simplicity, we center the discussion around RR, whose current theoretical guarantees in the nonconvex case are better than that of SO. Nevertheless, the other results are the same for both methods, and ProxRR is identical to ProxSO in terms of our theory too. A study of the empirical differences between RR and SO can be found in [Mishchenko et al., 2020].
|
| 142 |
+
|
| 143 |
+
128 • Application to Federated Learning. In Section 6 we describe an application of our results to
|
| 144 |
+
129 federated learning [Konecný et al. ˇ , 2016, McMahan et al., 2017, Kairouz et al., 2019]. In this way we
|
| 145 |
+
130 obtain the FedRR method, which is similar to Local SGD, except the local solver is a single pass
|
| 146 |
+
131 of RR over the local data. Empirically, FedRR can be vastly superior to Local SGD (see Figure 2).
|
| 147 |
+
132 Remarkably, we also show that the rate of FedRR beats the best known lower bound for Local SGD
|
| 148 |
+
133 due to [Woodworth et al., 2020] (we needed to adapt it from the original online to the finite-sum
|
| 149 |
+
134 setting we consider in this paper) for large enough $n$ . See Section F for more details.
|
| 150 |
+
|
| 151 |
+
• Nonconvex analysis. In the nonconvex regime, and under suitable assumptions, we establish (see Theorems 5 and 8) an $\begin{array} { r } { \mathcal { O } ( \frac { 1 } { \gamma T } ) } \end{array}$ rate up to a neighborhood of size $\mathcal { O } ( \gamma ^ { 2 } )$ . For a certain stepsize it yields an $\begin{array} { r } { \mathcal { O } ( { \frac { 1 } { \varepsilon ^ { 3 } } } ) } \end{array}$ convergence rate.
|
| 152 |
+
|
| 153 |
+
Besides the above results, we describe several extensions in the appendix, which we now outline.
|
| 154 |
+
|
| 155 |
+
• Extension 1: Decreasing stepsizes. The convergence of RR is not always exact and depends on the parameters of the objective. Similarly, if the shuffling radius $\sigma _ { \mathrm { r a d } } ^ { 2 }$ is positive, and we wish to find an $\varepsilon$ -approximate solution, the optimal choice of a fixed stepsize for ProxRR will depend on $\varepsilon$ . This deficiency can be fixed by using decreasing stepsizes in both vanilla RR [Ahn et al., 2020] and in SGD [Stich, 2019]. We adopt the same technique to our setting. However, we depart from [Ahn et al., 2020] by only adjusting the stepsize once per epoch rather than at every iteration, similarly to the concurrent work of Tran et al. [2020] on RR with momentum. For details, see Section I.
|
| 156 |
+
|
| 157 |
+
146 • Extension 2: Importance resampling for Proximal RR. While importance sampling is a well
|
| 158 |
+
147 established technique for speeding up the convergence of SGD [Zhao and Zhang, 2015, Khaled and
|
| 159 |
+
148 Richtárik, 2020], no importance sampling variant of RR has been proposed nor analyzed. This is not
|
| 160 |
+
149 surprising since the key property of importance sampling in SGD—unbiasedness—does not hold for
|
| 161 |
+
150 RR. Our approach to equip ProxRR with importance sampling is via a reformulation of problem (1)
|
| 162 |
+
151 into a similar problem with a larger number of summands. In particular, for each $i \in [ n ]$ we include
|
| 163 |
+
152 $n _ { i }$ copies of the function $\textstyle { \frac { 1 } { n _ { i } } } f _ { i }$ , and then take average of all $\begin{array} { r } { \bar { N } = \sum _ { i } n _ { i } } \end{array}$ functions constructed this
|
| 164 |
+
153 way. The value of $n _ { i }$ depends on the “importance” of $f _ { i }$ , described below. We then apply ProxRR
|
| 165 |
+
154 to this reformulation. If $f _ { i }$ is $L _ { i }$ -smooth for all $i \in [ n ]$ and we let $\begin{array} { r } { \bar { L } : = \frac { 1 } { n } \sum _ { i } L _ { i } } \end{array}$ , then we choose
|
| 166 |
+
155 . It is easy to show that , and hence our reformulation leads to at most a doubling
|
| 167 |
+
156 of the number of functions forming the finite sum. However, the overall complexity of ProxRR
|
| 168 |
+
157 applied to this reformulation will depend on $\bar { L }$ instead of $\operatorname* { m a x } _ { i } L _ { i }$ (see Theorem 10), which can lead
|
| 169 |
+
158 to a significant improvement. For details of the construction and our complexity results, see Section J.
|
| 170 |
+
|
| 171 |
+
# 159 3 Preliminaries
|
| 172 |
+
|
| 173 |
+
160 In our analysis, we build upon the notions of limit points and shuffling variance introduced by 161 Mishchenko et al. [2020] for vanilla (i.e., non-proximal) RR. Given a stepsize $\gamma > 0$ (held constant 162 during each epoch) and a permutation to a neighborhood of intermediate lim $\pi$ of poi $\{ 1 , 2 , \ldots , n \}$ inner loop iterates of RR/SO convergedefined by $x _ { * } ^ { 1 } , x _ { * } ^ { 2 } , \ldots , x _ { * } ^ { n }$
|
| 174 |
+
|
| 175 |
+
$$
|
| 176 |
+
\begin{array} { r } { x _ { * } ^ { i } : = x _ { * } - \gamma \sum _ { j = 0 } ^ { i - 1 } \nabla f _ { \pi _ { j } } ( x _ { * } ) , \quad i = 1 , \ldots , n . } \end{array}
|
| 177 |
+
$$
|
| 178 |
+
|
| 179 |
+
164 The intuition behind this definition is fairly simple: if we performed $i$ steps starting at $x _ { * }$ , we would end up close to 165 $x _ { * } ^ { i }$ . To quantify the closeness, we define the shuffling radius.
|
| 180 |
+
|
| 181 |
+
166 Definition 1 (Shuffling radius). Given a stepsize $\gamma > 0$ and a random permutation $\pi$ of $\{ 1 , 2 , \ldots , n \}$ used in Algorithm 1, define 167 $x _ { * } ^ { i } = x _ { * } ^ { i } ( \gamma , \pi )$ as in (3). Then, the shuffling radius is defined by
|
| 182 |
+
|
| 183 |
+
$$
|
| 184 |
+
\begin{array} { r } { \sigma _ { \mathrm { r a d } } ^ { 2 } ( \gamma ) : = \underset { i = 0 , \ldots , n - 1 } { \operatorname* { m a x } } \left[ \frac { 1 } { \gamma ^ { 2 } } \mathbb { E } _ { \boldsymbol \pi } \left[ D _ { f _ { \pi _ { i } } } ( x _ { * } ^ { i } , x _ { * } ) \right] \right] , } \end{array}
|
| 185 |
+
$$
|
| 186 |
+
|
| 187 |
+
168 where the expectation is taken with respect to the randomness in the permutation $\pi$ . If there are
|
| 188 |
+
169 multiple steradius, i.e., $\sigma _ { \mathrm { r a d } } ^ { 2 } : = \operatorname* { m a x } _ { t \geq 1 } \sigma _ { \mathrm { r a d } } ^ { 2 } ( \gamma _ { t } )$ $\gamma _ { 1 } , \gamma _ { 2 } , \ldots$ lgorithm 1, we take the maximum of all of them as the shuffling.
|
| 189 |
+
171 The shuffling radius is related by a multiplicative factor in the stepsize to the shuffling variance
|
| 190 |
+
172 introduced by Mishchenko et al. [2020]. When the stepsize is held fixed, the difference between the
|
| 191 |
+
173 two notions is minimal. When the stepsize is decreasing, however, the shuffling radius is easier to
|
| 192 |
+
174 work with, since it can be upper bounded by problem constants independent of the stepsizes.
|
| 193 |
+
175 Armed with a special lemma for sampling without replacement, we can upper bound the shuffling
|
| 194 |
+
176 radius using the smoothness constant $L _ { \mathrm { m a x } }$ , size of the vector $\nabla f ( x _ { * } )$ , and the variance $\sigma _ { * } ^ { 2 }$ of the
|
| 195 |
+
177 gradient vectors $\nabla f _ { 1 } ( x _ { * } ) , \ldots , \nabla f _ { n } ( x _ { * } )$ .
|
| 196 |
+
|
| 197 |
+
178 Tof unding twe have $\gamma > 0$ ae any random permutation is a solution of Problem ( $\pi$ $\{ 1 , 2 , \ldots , n \}$ $\begin{array} { r } { \sigma _ { \mathrm { r a d } } ^ { 2 } \leq \frac { L _ { \operatorname* { m a x } } } { 2 } n \big ( n \| \nabla f ( x _ { * } ) \| ^ { 2 } + \frac { 1 } { 2 } \sigma _ { * } ^ { 2 } \big ) } \end{array}$ $x _ { * }$
|
| 198 |
+
180 and $\sigma _ { * } ^ { 2 }$ is the population variance at the optimum
|
| 199 |
+
|
| 200 |
+
$$
|
| 201 |
+
\begin{array} { r } { \sigma _ { * } ^ { 2 } : = \frac { 1 } { n } { \sum _ { i = 1 } ^ { n } } \Vert \nabla f _ { i } ( x _ { * } ) - \nabla f ( x _ { * } ) \Vert ^ { 2 } . } \end{array}
|
| 202 |
+
$$
|
| 203 |
+
|
| 204 |
+
181 All proofs are relegated to the supplementary material. In order to better understand the bound
|
| 205 |
+
182 given by Theorem 1, note that if there is no proximal operator (i.e., $\psi = 0$ ) then $\nabla f ( x _ { * } ) = 0$ and
|
| 206 |
+
183 we get that $\begin{array} { r } { \sigma _ { \mathrm { r a d } } ^ { 2 } \le \frac { L _ { \mathrm { m a x } } n \sigma _ { * } ^ { 2 } } { 4 } } \end{array}$ Lmaxnσ2∗4 . This recovers the existing upper bound on the shuffling variance of
|
| 207 |
+
184 Mishchenko et al. [2020] for vanilla RR. On the other hand, if $\nabla f ( x _ { * } ) \neq 0$ then we get an additive
|
| 208 |
+
185 term of size proportional to the squared norm of $\nabla f ( x _ { * } )$ .
|
| 209 |
+
|
| 210 |
+
# 186 4 Theory for strongly convex losses $f _ { 1 } , \ldots , f _ { n }$
|
| 211 |
+
|
| 212 |
+
187 Our first theorem establishes a convergence rate for Algorithm 1 applied with a constant stepsize to
|
| 213 |
+
188 Problem (1) when each objective $f _ { i }$ is strongly convex. This assumption is commonly satisfied in
|
| 214 |
+
189 machine learning applications where each $f _ { i }$ represents a regularized loss on some data points, as in
|
| 215 |
+
190 $\ell _ { 2 }$ regularized linear regression and $\ell _ { 2 }$ regularized logistic regression.
|
| 216 |
+
191 Theorem 2. Let Assumption 1 be satisfied. Further, assume that each $f _ { i }$ is $\mu$ -strongly convex. If
|
| 217 |
+
192 Algorithm 1 is run with constant stepsize $\gamma _ { t } = \gamma \leq 1 / L _ { \operatorname* { m a x } }$ , then its iterates satisfy
|
| 218 |
+
|
| 219 |
+
$$
|
| 220 |
+
\begin{array} { r } { \mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] \leq \left( 1 - \gamma \mu \right) ^ { n T } \left. x _ { 0 } - x _ { * } \right. ^ { 2 } + \frac { 2 \gamma ^ { 2 } \sigma _ { \mathrm { r a d } } ^ { 2 } } { \mu } . } \end{array}
|
| 221 |
+
$$
|
| 222 |
+
|
| 223 |
+
193 We can convert the guarantee of Theorem 2 to a convergence rate by properly tuning the stepsize
|
| 224 |
+
194 and using the upper bound of Theorem 1 on the shuffling radius. In particular, if we choose the
|
| 225 |
+
195 stepsize as $\begin{array} { r } { \gamma = \operatorname* { m i n } \left\{ \frac { 1 } { L _ { \mathrm { m a x } } } , \frac { \sqrt { \varepsilon \mu } } { \sqrt { 2 } \sigma _ { \mathrm { r a d } } } \right\} } \end{array}$ , and let $\kappa : = L _ { \mathrm { m a x } } / \mu$ and $r _ { 0 } : = \| x _ { 0 } - x _ { * } \| ^ { 2 }$ , then we obtain
|
| 226 |
+
196 $\mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] = \dot { \mathcal { O } } \left( \varepsilon \right)$ provided that the total number of iterations $K _ { \mathrm { R R } } = n T$ is at least
|
| 227 |
+
|
| 228 |
+
$$
|
| 229 |
+
\begin{array} { r } { K _ { \mathrm { R R } } \geq [ ( \kappa + \frac { \sqrt { \kappa n } } { \sqrt { \varepsilon } \mu } ( \sqrt { n } \| \nabla f ( x _ { * } ) \| + \sigma _ { * } ) ] \log \left( \frac { 2 r _ { 0 } } { \varepsilon } \right) . } \end{array}
|
| 230 |
+
$$
|
| 231 |
+
|
| 232 |
+
197 Comparison with vanilla RR. If there is no proximal operator, then $\| \nabla f ( x _ { * } ) \| = 0$ and we recover
|
| 233 |
+
198 the earlier result of Mishchenko et al. [2020] on the convergence of RR without proximal, which is
|
| 234 |
+
199 optimal in $\varepsilon$ up to logarithmic factors. On the other hand, when the proximal operator is nonzero,
|
| 235 |
+
200 we get an extra term in the complexity proportional to $\| \nabla f ( x _ { * } ) \|$ : thus, even when all the functions
|
| 236 |
+
201 are the same (i.e., $\sigma _ { * } = 0$ ), we do not recover the linear convergence of Proximal Gradient Descent
|
| 237 |
+
202 [Karimi et al., 2016, Beck, 2017]. This can be easily explained by the fact that Algorithm 1 performs
|
| 238 |
+
203 $n$ gradient steps per one proximal step. Hence, even if $f _ { 1 } = \cdots = f _ { n }$ , Algorithm 1 does not reduce
|
| 239 |
+
204 to Proximal Gradient Descent. We note that other algorithms for composite optimization which may
|
| 240 |
+
205 not take a proximal step at every iteration (for example, using stochastic projection steps) also suffer
|
| 241 |
+
206 from the same dependence [Patrascu and Irofti, 2021].
|
| 242 |
+
207 Comparison with proximal SGD. In order to compare (6) against the complexity of Proximal SGD
|
| 243 |
+
208 (Algorithm 2), we recall that Proximal SGD achieves $\mathbb { E } \left[ \left. x _ { K } - x _ { * } \right. ^ { 2 } \right] = \mathcal { O } \left( \varepsilon \right)$ if either $f$ or $\psi$ is
|
| 244 |
+
209 $\mu$ -strongly convex and
|
| 245 |
+
|
| 246 |
+
$$
|
| 247 |
+
\begin{array} { r } { K _ { \mathrm { S G D } } \geq \left( \kappa + \frac { \sigma _ { \ast } ^ { 2 } } { \varepsilon \mu ^ { 2 } } \right) \log \left( \frac { 2 r _ { 0 } } { \varepsilon } \right) . } \end{array}
|
| 248 |
+
$$
|
| 249 |
+
|
| 250 |
+
<table><tr><td colspan="2"></td><td>Require: Stepsizes γk > O,initial vector xo ∈ Rd, number of steps K</td><td></td></tr><tr><td colspan="2">1:for steps k=O,1,...,K-1do</td><td></td><td></td></tr><tr><td>2:</td><td>Sample ik uniformly at random from [n]</td><td></td><td></td></tr><tr><td>3:</td><td>Xk+1=prOXγky(xk-γk√fi(xk))</td><td></td><td></td></tr></table>
|
| 251 |
+
|
| 252 |
+
210 This result is standard [Needell et al., 2016, Gower et al., 2019], with the exception that we do not
|
| 253 |
+
211 know any proof in the literature for the case when $\psi$ is strongly convex. For completeness, we prove
|
| 254 |
+
212 it in Appendix C, but since our proof is a minor modification of that in [Gower et al., 2019], we do
|
| 255 |
+
213 not provide it here.
|
| 256 |
+
214 By comparing $K _ { \mathrm { S G D } }$ (given by (7)) and $K _ { \mathrm { R R } }$ (given by (6)), we see that ProxRR has milder
|
| 257 |
+
215 dependence on $\varepsilon$ than Proximal SGD. In particular, ProxRR converges faster whenever the target
|
| 258 |
+
216 accuracy ε is small enough to satisfy ε ≤ 1Lmaxnµ $\begin{array} { r } { \varepsilon \leq \frac { 1 } { L _ { \operatorname* { m a x } } n \mu } \left( \frac { \sigma _ { * } ^ { 4 } } { n \| \nabla f ( x _ { * } ) \| ^ { 2 } + \sigma _ { * } ^ { 2 } } \right) . } \end{array}$ . Furthermore, ProxRR is much
|
| 259 |
+
217 better when we consider proximal iteration complexity $\#$ of proximal operator access), in which case
|
| 260 |
+
218 the complexity of ProxRR (6) is reduced by a factor of $n$ (because we take one proximal step every $n$
|
| 261 |
+
219 iterations), while the proximal iteration complexity of Proximal SGD remains the same as (7). In this
|
| 262 |
+
220 case, ProxRR is better whenever the accuracy $\varepsilon$ satisfies
|
| 263 |
+
|
| 264 |
+
$$
|
| 265 |
+
\begin{array} { r } { \varepsilon \geq \frac { n } { L _ { \operatorname* { m a x } } \mu } \left[ n \| \nabla f ( x _ { * } ) \| ^ { 2 } + \sigma _ { * } ^ { 2 } \right] \qquad \mathrm { o r } \qquad \varepsilon \leq \frac { n } { L _ { \operatorname* { m a x } } \mu } \left[ \frac { \sigma _ { * } ^ { 4 } } { n \| \nabla f ( x _ { * } ) \| ^ { 2 } + \sigma _ { * } ^ { 2 } } \right] . } \end{array}
|
| 266 |
+
$$
|
| 267 |
+
|
| 268 |
+
21 We can see that if the target accuracy is large enough or small enough, and if the cost of proximal operators dominates the computation, ProxRR is much quicker to converge than Proximal SGD.
|
| 269 |
+
|
| 270 |
+
# 5 Theory for strongly convex regularizer $\psi$
|
| 271 |
+
|
| 272 |
+
In Theorem 2, we assume that each $f _ { i }$ is $\mu$ -strongly convex. This is motivated by the common practice of using $\ell _ { 2 }$ regularization in machine learning. However, applying $\ell _ { 2 }$ regularization in every step of Algorithm 1 can be expensive when the data are sparse and the iterates $\ v { x } _ { t } ^ { i }$ are dense, because it requires accessing each coordinate of $\boldsymbol { x } _ { t } ^ { i }$ which can be much more expensive than computing sparse gradients $\nabla f _ { i } ( x _ { t } ^ { i } )$ . Alternatively, we may instead choose to put the $\ell _ { 2 }$ regularization inside $\psi$ and only ask that $\psi$ be strongly convex—this way, we can save a lot of time as we need to access each coordinate of the dense iterates $\boldsymbol { x } _ { t } ^ { i }$ only once per epoch rather than every iteration. Theorem 3 gives a convergence guarantee in this setting.
|
| 273 |
+
|
| 274 |
+
Theorem 3. Let Assumption 1 hold and $f _ { 1 } , \ldots , f _ { n }$ be convex. Further, assume that $\psi$ is $\mu$ -strongly convex. If Algorithm 1 is run with constant stepsize $\gamma _ { t } = \gamma \leq 1 / L _ { \operatorname* { m a x } }$ , where $L _ { \operatorname* { m a x } } = \operatorname* { m a x } _ { i } L _ { i }$ , then its iterates satisfy
|
| 275 |
+
|
| 276 |
+
$$
|
| 277 |
+
\begin{array} { r } { \mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] \leq ( 1 + 2 \gamma \mu n ) ^ { - T } \left. x _ { 0 } - x _ { * } \right. ^ { 2 } + \frac { \gamma ^ { 2 } \sigma _ { \mathrm { r a d } } ^ { 2 } } { \mu } . } \end{array}
|
| 278 |
+
$$
|
| 279 |
+
|
| 280 |
+
235 Using Theorem 3 and choosing the stepsize as
|
| 281 |
+
|
| 282 |
+
$$
|
| 283 |
+
\begin{array} { r } { \gamma = \operatorname* { m i n } \left\{ \frac { 1 } { L _ { \mathrm { m a x } } } , \frac { \sqrt { \varepsilon \mu } } { \sigma _ { \mathrm { r a d } } } \right\} , } \end{array}
|
| 284 |
+
$$
|
| 285 |
+
|
| 286 |
+
we get 236 $\mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] = \mathcal { O } \left( \varepsilon \right)$ provided that the total number of iterations satisfies
|
| 287 |
+
|
| 288 |
+
$$
|
| 289 |
+
\begin{array} { r } { K \geq \left( \kappa + \frac { \sigma _ { \mathrm { r a d } } / \mu } { \sqrt { \varepsilon \mu } } + n \right) \log \left( \frac { 2 r _ { 0 } } { \varepsilon } \right) . } \end{array}
|
| 290 |
+
$$
|
| 291 |
+
|
| 292 |
+
237 This can be converted to a bound similar to (6) by using Theorem 1, in which case the only difference
|
| 293 |
+
238 between the two cases is an extra $n \log \left( { \frac { 1 } { \varepsilon } } \right)$ term when only the regularizer $\psi$ is $\mu$ -strongly convex.
|
| 294 |
+
239 Since for small enough accuracies the $^ 1 / \sqrt { \varepsilon }$ term dominates, this difference is minimal.
|
| 295 |
+
|
| 296 |
+
# 240 6 FedRR: application of ProxRR to federated learning
|
| 297 |
+
|
| 298 |
+
Let us consider now the problem of minimizing the average of 241 $\begin{array} { r } { N = \sum _ { m = 1 } ^ { M } N _ { m } } \end{array}$ PM m=1 Nm functions that are 242 stored on devices, which have $N _ { 1 } , \dots , N _ { M }$ samples correspondingly,
|
| 299 |
+
|
| 300 |
+
$$
|
| 301 |
+
\begin{array} { r } { \underset { x \in \mathbb { R } ^ { d } } { \operatorname* { m i n } } F ( x ) + R ( x ) , \qquad F ( x ) = \frac { 1 } { N } { \sum _ { m = 1 } ^ { M } } F _ { m } ( x ) , \qquad F _ { m } ( x ) = { \sum _ { j = 1 } ^ { N _ { m } } } f _ { m j } ( x ) . } \end{array}
|
| 302 |
+
$$
|
| 303 |
+
|
| 304 |
+
# Algorithm 3 Federated Random Reshuffling (FedRR)
|
| 305 |
+
|
| 306 |
+
<table><tr><td></td><td>Require:Stepsize γ >O,initial vector xo = x ∈ Rd,number of epochs T 1:for epochs t=O,1,...,T-1do</td><td></td><td></td><td></td></tr><tr><td>2:</td><td>for m =1,...,M locally in parallel do</td><td></td><td></td><td></td></tr><tr><td>3:</td><td>xt,m=Xt .0</td><td></td><td></td><td></td></tr><tr><td>4:</td><td>Sample permutation πo,m,π1,m,...,πNm-1,m of {1,2,..., Nm}</td><td></td><td></td><td></td></tr><tr><td>5:</td><td>fori=0,1,...,Nm-1do</td><td></td><td></td><td></td></tr><tr><td>6:</td><td>Ct,m i+1</td><td></td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td></tr><tr><td>7: 8:</td><td></td><td></td><td></td><td></td></tr></table>
|
| 307 |
+
|
| 308 |
+
243 For example, $f _ { m j } ( x )$ can be the loss associated with a single sample $( X _ { m j } , y _ { m j } )$ , where pairs
|
| 309 |
+
244 $( X _ { m j } , y _ { m j } )$ follow a distribution $D _ { m }$ that is specific to device $m$ . An important instance of such for
|
| 310 |
+
245 mulation is federated learning, where $M$ devices train a shared model by communicating periodically
|
| 311 |
+
246 with a server. We normalize the objective in (10) by $N$ as this is the total number of functions after
|
| 312 |
+
247 we expand each $F _ { m }$ into a sum. We denote the solution of (10) by $x _ { * }$ .
|
| 313 |
+
248 Extending the space. To rewrite the problem as an instance of (1), we are going to consider a bigger
|
| 314 |
+
249 product space, which is sometimes used in distributed optimization [Bianchi et al., 2015]. Let us
|
| 315 |
+
250 define $n : = \operatorname* { m a x } \{ N _ { 1 } , \dots , N _ { m } \}$ and introduce $\psi _ { C }$ , the consensus constraint, defined via
|
| 316 |
+
|
| 317 |
+
$$
|
| 318 |
+
\begin{array} { r } { \psi _ { C } ( x _ { 1 } , \dots , x _ { M } ) : = \left\{ \begin{array} { l l } { 0 , } & { x _ { 1 } = \dots = x _ { M } } \\ { + \infty , } & { \mathrm { o t h e r w i s e } } \end{array} \right. . } \end{array}
|
| 319 |
+
$$
|
| 320 |
+
|
| 321 |
+
251 By introducing dummy variables $x _ { 1 } , \ldots , x _ { M }$ and adding the constraint $x _ { 1 } = \cdot \cdot \cdot = x _ { M }$ , we arrive at
|
| 322 |
+
252 the intermediate problem
|
| 323 |
+
|
| 324 |
+
$$
|
| 325 |
+
\operatorname* { m i n } _ { x _ { 1 } , \ldots , x _ { M } \in \mathbb { R } ^ { p } } \frac { 1 } { N } \sum _ { m = 1 } ^ { M } F _ { m } ( x _ { m } ) + ( R + \psi _ { C } ) ( x _ { 1 } , \ldots , x _ { M } ) ,
|
| 326 |
+
$$
|
| 327 |
+
|
| 328 |
+
53 where $R + \psi _ { C }$ is defined, with a slight abuse of notation, as $( R + \psi _ { C } ) ( x _ { 1 } , \dots , x _ { M } ) = R ( x _ { 1 } )$ if
|
| 329 |
+
54 $x _ { 1 } = \cdot \cdot \cdot = x _ { M }$ , and $( R + \psi _ { C } ) ( x _ { 1 } , \dots , x _ { M } ) = + \infty$ otherwise.
|
| 330 |
+
255 Since we have replaced $R$ with a more complicated regularizer $R + \psi _ { C }$ , we need to understand how
|
| 331 |
+
256 to compute the proximal operator of the latter. We show (Lemma 7 in the supplementary) that the
|
| 332 |
+
257 proximal operator of $( R + \psi _ { C } )$ is merely the projection onto $\{ ( x _ { 1 } , . . . , x _ { M } ) ^ { \top } | x _ { 1 } = \cdot \cdot \cdot = x _ { M } \}$
|
| 333 |
+
258 followed by the proximal operator of $R$ with a smaller stepsize.
|
| 334 |
+
|
| 335 |
+
functions, Reformulation. To have $\textstyle \sum _ { j = N _ { m } + 1 } ^ { n } 0$ $f _ { m j } ( x ) \equiv 0$ . We can now stick the vectors together into for any $n$ functions in every $j > N _ { m }$ , so that $F _ { m }$ $\begin{array} { r } { F _ { m } ( x _ { m } ) = \sum _ { j = 1 } ^ { n } f _ { m j } ( x _ { m } ) = \sum _ { j = 1 } ^ { N _ { m } } f _ { m j } ( x _ { m } ) + } \end{array}$ , we write $\pmb { x } = ( x _ { 1 } , \dots , x _ { M } ) \in \mathbb { R } ^ { M \cdot d }$ $F _ { m }$ as a sum with extra $n - N _ { m }$ 1 and multiply zero the objective by $\textstyle { \frac { N } { n } }$ , which gives the following reformulation:
|
| 336 |
+
|
| 337 |
+
$$
|
| 338 |
+
\begin{array} { r } { \underset { { \pmb x } \in \mathbb { R } ^ { M \cdot d } } { \operatorname* { m i n } } \frac { 1 } { n } \sum _ { i = 1 } ^ { n } f _ { i } ( { \pmb x } ) + \psi ( { \pmb x } ) , } \end{array}
|
| 339 |
+
$$
|
| 340 |
+
|
| 341 |
+
where 263 $\begin{array} { r } { \psi ( { \pmb x } ) : = \frac { N } { n } ( R + \psi _ { C } ) } \end{array}$ and
|
| 342 |
+
|
| 343 |
+
$$
|
| 344 |
+
\begin{array} { l } \displaystyle { \begin{array} { l } { { \mathrm { ) ~ a n d } } } \\ { { f _ { i } ( x ) = f _ { i } ( x _ { 1 } , \ldots , x _ { M } ) : = \sum ^ { M } f _ { m i } ( x _ { m } ) . } } \end{array} } \end{array}
|
| 345 |
+
$$
|
| 346 |
+
|
| 347 |
+
264 In other words, function $f _ { i } ( { \pmb x } )$ includes $i$ m=1-th data sample from each device and contains at most
|
| 348 |
+
265 one loss from every device, while $F _ { m } ( x )$ combines all data losses on device $m$ . Note that the
|
| 349 |
+
266 solution of (11) is $\pmb { x } _ { * } : = ( x _ { * } ^ { \top } , \ldots , x _ { * } ^ { \top } ) ^ { \top }$ and the gradient of the extended function $f _ { i } ( { \pmb x } )$ is given
|
| 350 |
+
267 by $\nabla f _ { i } ( { \pmb x } ) = ( \nabla f _ { 1 i } ( x _ { 1 } ) ^ { \top } , \cdots , \nabla f _ { M i } ( x _ { M } ) ^ { \top } ) ^ { \top }$ . Therefore, a stochastic gradient step that uses
|
| 351 |
+
268 $\nabla f _ { i } ( { \pmb x } )$ corresponds to updating all local models with the gradient of $i$ -th data sample, without any
|
| 352 |
+
269 communication.
|
| 353 |
+
270 Algorithm 1 for this specific problem can be written in terms of $x _ { 1 } , \ldots , x _ { M }$ , which results in
|
| 354 |
+
271 Algorithm 3. Note that since $f _ { m i } ( x _ { i } )$ depends only on $x _ { i }$ , computing its gradient does not require
|
| 355 |
+
272 communication. Only once the local epochs are finished, the vectors are averaged as the result of
|
| 356 |
+
273 projecting onto the set $\{ ( x _ { 1 } , \ldots , x _ { M } ) \ | ^ \stackrel { \textstyle - } { x } _ { 1 } = \cdot \cdot \cdot = x _ { M } \}$ .
|
| 357 |
+
274 Reformulation properties. To analyze FedRR, the only thing that we need to do is understand the
|
| 358 |
+
275 properties of the reformulation (11) and then apply Theorem 2 or Theorem 3. The following lemma
|
| 359 |
+
276 gives us the smoothness and strong convexity properties of (11).
|
| 360 |
+
277 Lemma 1. Let function $f _ { m i }$ be $L _ { i }$ -smooth and $\mu$ -strongly convex for every $m$ . Then, $f _ { i }$ from
|
| 361 |
+
278 reformulation (11) is $L _ { i }$ -smooth and $\mu$ -strongly convex.
|
| 362 |
+
279 The previous lemma shows that the conditioning of the reformulation is $\begin{array} { r } { \kappa \ : = \ : \frac { L _ { \mathrm { m a x } } } { \mu } } \end{array}$ just as we
|
| 363 |
+
280 would expect. Moreover, it implies that the requirement on the stepsize remains exactly the same:
|
| 364 |
+
281 $\gamma \leq 1 / L _ { \operatorname* { m a x } }$ . What remains unknown is the value of ProxRR and ProxSO. To find an upper b $\sigma _ { \mathrm { r a d } } ^ { 2 }$ , wh on $\sigma _ { \mathrm { r a d } } ^ { 2 }$ plays a key role in the convergence, let us define
|
| 365 |
+
|
| 366 |
+
$$
|
| 367 |
+
\begin{array} { r } { \sigma _ { m , * } ^ { 2 } : = \frac { 1 } { N _ { m } } \sum _ { j = 1 } ^ { n } \bigl \| \nabla f _ { m j } ( x _ { * } ) - \frac { 1 } { N _ { m } } \nabla F _ { m } ( x _ { * } ) \bigr \| ^ { 2 } , } \end{array}
|
| 368 |
+
$$
|
| 369 |
+
|
| 370 |
+
283 which is the variance of local gradients on device $m$ . This quantity characterizes the convergence rate
|
| 371 |
+
284 of local SGD [Yuan et al., 2020], so we should expect it to appear in our bounds too. The next lemma
|
| 372 |
+
285 explains how to use it to upper bound $\sigma _ { \mathrm { r a d } } ^ { 2 }$ .
|
| 373 |
+
|
| 374 |
+
$\sigma _ { \mathrm { r a d } } ^ { 2 }$
|
| 375 |
+
|
| 376 |
+
$$
|
| 377 |
+
\sigma _ { \mathrm { r a d } } ^ { 2 } \leq L _ { \operatorname* { m a x } } \cdot \sum _ { m = 1 } ^ { M } \Bigl ( \| \nabla F _ { m } ( x _ { * } ) \| ^ { 2 } + \frac { n } { 4 } \sigma _ { m , * } ^ { 2 } \Bigr ) .
|
| 378 |
+
$$
|
| 379 |
+
|
| 380 |
+
287 The lemma shows that the upper bound on $\sigma _ { \mathrm { r a d } } ^ { 2 }$ depends on the sum of local variances $\textstyle \sum _ { m = 1 } ^ { M } \sigma _ { m , * } ^ { 2 }$ as
|
| 381 |
+
288 well as on the local gradient norms PMm= $\begin{array} { r } { \sum _ { m = 1 } ^ { M } \| \nabla F _ { m } ( x _ { * } ) \| ^ { 2 } } \end{array}$ . Both of these sums appear in the existing
|
| 382 |
+
289 literature on convergence of Local GD/SGD [Khaled et al., 2019, Woodworth et al., 2020, Yuan et al.,
|
| 383 |
+
290 2020]. We are now ready to present formal convergence results. For simplicity, we will consider
|
| 384 |
+
291 heterogeneous and homogeneous cases separately and assume that $N _ { 1 } = \cdot \cdot \cdot = N _ { M } = n$ . To further
|
| 385 |
+
292 illustrate generality of our results, we will present the heterogeneous assuming strong convexity $R$
|
| 386 |
+
293 and the homogeneous under strong convexity of functions $f _ { m i }$ .
|
| 387 |
+
294 Heterogeneous data. In the case when the data are heterogeneous, we provide the first local RR
|
| 388 |
+
295 method. We can apply either Theorem 2 or Theorem 3, but for brevity, we give only the corollary
|
| 389 |
+
296 obtained from Theorem 3.
|
| 390 |
+
297 Theorem 4. Assume that functions $f _ { m i }$ are convex and $L _ { i }$ -smooth for each $m$ and $i$ . If $R$ is
|
| 391 |
+
298 $\mu$ -strongly convex and $\gamma \leq 1 / L _ { \operatorname* { m a x } }$ , then we have for the iterates produced by Algorithm 3
|
| 392 |
+
|
| 393 |
+
$$
|
| 394 |
+
\begin{array} { r } { \mathbb { E } \left[ \left. x _ { T } - x _ { * } \right. ^ { 2 } \right] \leq \left( 1 + 2 \gamma \mu n \right) ^ { - T } \left. x _ { 0 } - x _ { * } \right. ^ { 2 } + \frac { \gamma ^ { 2 } L _ { \operatorname* { m a x } } } { M \mu } \sum _ { m = 1 } ^ { M } \Bigl ( \| \nabla F _ { m } ( x _ { * } ) \| ^ { 2 } + \frac { N } { 4 M } \sigma _ { m , * } ^ { 2 } \Bigr ) . } \end{array}
|
| 395 |
+
$$
|
| 396 |
+
|
| 397 |
+
299 For nonconvex analysis, we consider $R \equiv 0$ and require the following standard assumption.
|
| 398 |
+
|
| 399 |
+
300 Assumption 2 (Bounded variance and dissimilarity). There exist constants $\sigma , \zeta > 0$ such that for any 301 $x \in \mathbb { R } ^ { d }$ and
|
| 400 |
+
|
| 401 |
+
$$
|
| 402 |
+
\begin{array} { r l r l } & { \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \left\| \nabla f _ { m i } - \frac { 1 } { n } \nabla F _ { m } ( \boldsymbol { x } ) \right\| ^ { 2 } \leq \sigma ^ { 2 } } & & { \mathrm { a n d } \quad } & { \frac { 1 } { M } \sum _ { m = 1 } ^ { M } \left\| \frac { 1 } { n } \nabla F _ { m } ( \boldsymbol { x } ) - \nabla F ( \boldsymbol { x } ) \right\| ^ { 2 } \leq \zeta ^ { 2 } . } \end{array}
|
| 403 |
+
$$
|
| 404 |
+
|
| 405 |
+
Note that above 02 $\begin{array} { r } { \frac { 1 } { n } \nabla F _ { m } ( x ) \ = \ \frac { 1 } { N _ { m } } \nabla F _ { m } ( x ) } \end{array}$ is the gradient of a local dataset and $\nabla F ( x ) \ =$ 303 $\begin{array} { r } { \frac { 1 } { N } \sum _ { l = 1 } ^ { M } \nabla F _ { l } ( x ) } \end{array}$ is the full gradient on all data.
|
| 406 |
+
|
| 407 |
+
304 Theorem 5 (Nonconvex convergence). Let Assumptions 1 and 2 be satisfied, and $R \equiv 0$ (no prox).
|
| 408 |
+
|
| 409 |
+
Then, the communication complexity to achieve 305 $\mathbb { E } \left[ \left. \nabla F ( x _ { T } ) \right. ^ { 2 } \right] \leq \varepsilon ^ { 2 }$ is
|
| 410 |
+
|
| 411 |
+
$$
|
| 412 |
+
\begin{array} { r } { T = { \cal O } \left( \left( \frac { 1 } { \varepsilon ^ { 2 } } + \frac { \sigma } { \sqrt { n } \varepsilon ^ { 3 } } + \frac { \zeta } { \varepsilon ^ { 3 } } \right) \left( F ( x _ { 0 } ) - F _ { * } \right) \right) . } \end{array}
|
| 413 |
+
$$
|
| 414 |
+
|
| 415 |
+
306 Notice that by replicating the data locally on each device and thereby increasing the value of $n$
|
| 416 |
+
307 without changing the objective, we can improve the second term in the communication complexity.
|
| 417 |
+
308 In particular, if the data are not too dissimilar $( \sigma \gg \zeta )$ and $\varepsilon$ is small $\begin{array} { r } { \big ( \frac { 1 } { \varepsilon ^ { 3 } } \gg \frac { 1 } { \varepsilon ^ { 2 } } \big ) } \end{array}$ , the second term in
|
| 418 |
+
309 the complexity dominates, and it helps to have more local steps. However, if the data are less similar,
|
| 419 |
+
310 the nodes have to communicate more frequently to get more information about other objectives.
|
| 420 |
+
311 Homogeneous data. For simplicity, in the homogeneous (i.e., i.i.d.) data case we provide guarantees
|
| 421 |
+
312 313 $\nabla F _ { m } ( x _ { * } ) = \mathbf { \bar { 0 } }$ oximal op, and thus $\begin{array} { r } { \sigma _ { m , * } ^ { 2 } = \frac { 1 } { n } \sum _ { j = 1 } ^ { n } \| \nabla f _ { m j } ( x _ { * } ) \| ^ { 2 } } \end{array}$ $F _ { 1 } ( x ) = \cdots = F _ { M } ( x )$ , for any hen given $m$ it holds
|
| 422 |
+
|
| 423 |
+
$$
|
| 424 |
+
\begin{array} { r } { \sum _ { m = 1 } ^ { M } \sigma _ { m , * } ^ { 2 } = \frac { 1 } { n } \sum _ { m = 1 } ^ { M } \sum _ { i = 1 } ^ { n } \| \nabla f _ { m i } ( x _ { * } ) \| ^ { 2 } = \frac { N } { n } \sigma _ { * } ^ { 2 } = M \sigma _ { * } ^ { 2 } , } \end{array}
|
| 425 |
+
$$
|
| 426 |
+
|
| 427 |
+
where 314 $\begin{array} { r } { \sigma _ { * } ^ { 2 } : = \frac { 1 } { N } \sum _ { i = 1 } ^ { n } \sum _ { m = 1 } ^ { M } \| \nabla f _ { m i } ( x _ { * } ) \| ^ { 2 } } \end{array}$ is the variance of the gradients over all data.
|
| 428 |
+
|
| 429 |
+

|
| 430 |
+
Figure 1: Experimental results for problem (12). The first two plots show with average and confidence intervals estimated on 20 random seeds and clearly demonstrate that one can save a lot of proximal operator computations with our method. The right plot shows the best/worst convergence of ProxSO over 20,000 sampled permutations.
|
| 431 |
+
|
| 432 |
+

|
| 433 |
+
Figure 2: FedRR vs Local-SGD and Scaffold: i.i.d. data (left) and heterogeneous data (middle and right). We set $\lambda _ { 1 } = 0$ and estimate the averages and standard deviations by running 10 random seeds for each method.
|
| 434 |
+
|
| 435 |
+
315 Theorem 6. Let $R ( x ) \equiv 0$ (no prox) and the data be i.i.d., that is $\nabla F _ { m } ( x _ { * } ) = 0$ for any $m$ , where
|
| 436 |
+
316 $x _ { * }$ is the solution of (10). Let $\begin{array} { r } { \sigma _ { * } ^ { 2 } : = \frac { 1 } { N } \sum _ { i = 1 } ^ { n } \sum _ { m = 1 } ^ { M } \| \nabla f _ { m i } ( x _ { * } ) \| ^ { 2 } } \end{array}$ . If each $f _ { m j }$ is $L _ { \mathrm { m a x } }$ -smooth
|
| 437 |
+
317 and $\mu$ -strongly convex, then the iterates of Algorithm 3 satisfy
|
| 438 |
+
|
| 439 |
+
$$
|
| 440 |
+
\begin{array} { r } { \mathbb { E } \left[ \| x _ { T } - x _ { * } \| ^ { 2 } \right] \leq ( 1 - \gamma \mu ) ^ { n T } \| x _ { 0 } - x _ { * } \| ^ { 2 } + \frac { \gamma ^ { 2 } L _ { \operatorname* { m a x } } N \sigma _ { * } ^ { 2 } } { M \mu } . } \end{array}
|
| 441 |
+
$$
|
| 442 |
+
|
| 443 |
+
The most important part of this result is that the last term in Theorem 6 has a factor of $M$ in the denominator, meaning that the convergence bound improves with the number of devices involved.
|
| 444 |
+
|
| 445 |
+
# 7 Experiments1
|
| 446 |
+
|
| 447 |
+
ProxRR vs SGD. In Figure 1, we look at the logistic regression loss with the elastic net regularization,
|
| 448 |
+
|
| 449 |
+
$$
|
| 450 |
+
\begin{array} { r } { \frac { 1 } { N } \sum _ { i = 1 } ^ { N } f _ { i } ( x ) + \lambda _ { 1 } \| x \| _ { 1 } + \frac { \lambda _ { 2 } } { 2 } \| x \| ^ { 2 } , } \end{array}
|
| 451 |
+
$$
|
| 452 |
+
|
| 453 |
+
where each $f _ { i } : \mathbb { R } ^ { d } \mathbb { R }$ is defined as f ${ \mathfrak { r } } _ { i } ( x ) : = - { \bigl ( } b _ { i } \log { \bigl ( } h ( a _ { i } ^ { \top } x ) { \bigr ) } + ( 1 - b _ { i } ) \log { \bigl ( } 1 - h ( a _ { i } ^ { \top } x ) { \bigr ) } { \bigr ) }$ , and where $( a _ { i } , b _ { i } ) \in \mathbb { R } ^ { d } \times \{ 0 , 1 \}$ , $i = 1 , \ldots , N$ are the data samples, $h \colon t \to 1 / ( 1 + e ^ { - t } )$ is the sigmoid function, and $\lambda _ { 1 } , \lambda _ { 2 } \geq 0$ are parameters. We set minibatch sizes to 32 for all methods and use theoretical stepsizes, without any tuning. We denote the heuristic version of RR that performs proximal operator step after each iteration as ‘RR (iteration prox)’. From the experiments, we can see that all methods behave more or less the same way. However, the algorithm that we propose needs only a small fraction of proximal operator evaluations, which gives it a huge advantage whenever the operator takes more time to compute than stochastic gradients.
|
| 454 |
+
|
| 455 |
+
FedRR vs Local SGD and Scaffold. We also compare the performance of FedRR, Local SGD and Scaffold Karimireddy et al. [2020] on homogeneous (i.e., i.i.d.) and heterogeneous data. Since Local SGD and Scaffold require smaller stepsizes to converge, they are significantly slower in the i.i.d. regime, as can be seen in Figure 2. FedRR, however, does not need small initial stepsize and very quickly converges to a noisy neighborhood of the solution. We obtain heterogeneous regime by sorting data with respect to the labels and mixing the sorted dataset with the unsorted one. In this scenario, we also use the same small stepsize for every method to address the data heterogeneity. Clearly, Scaffold is the best in terms of functional values because it does variance reduction with respect to the data. Extending FedRR in the same way might be useful too, but this goes beyond the scope of our paper and we leave it for future work. We also note that in terms of distances from the optimum, FedRR still performs much better than Local SGD and Scaffold.
|
| 456 |
+
|
| 457 |
+
342 References
|
| 458 |
+
343 Kwangjun Ahn, Chulhee Yun, and Suvrit Sra. SGD with shuffling: optimal rates without component convexity and large epoch requirements. arXiv preprint arXiv:2006.06946. Neural Information Processing Systems (NeurIPS) 2020, 2020. (Cited on pages 2, 4, and 31)
|
| 459 |
+
46 Amir Beck. First-Order Methods in Optimization. Society for Industrial and Applied Mathematics, Philadelphia, PA, 2017. doi: 10.1137/1.9781611974997. (Cited on page 5)
|
| 460 |
+
348 Pascal Bianchi, Walid Hachem, and Franck Iutzeler. A coordinate descent primal-dual algorithm and application to distributed asynchronous optimization. IEEE Transactions on Automatic Control, 61 (10):2947–2957, 2015. (Cited on page 7) Antoine Bordes, Léon Bottou, and Patrick Gallinari. SGD-QN: Careful quasi-Newton stochastic gradient descent. 2009. (Cited on page 2)
|
| 461 |
+
353 Léon Bottou. Curiously fast convergence of some stochastic gradient descent algorithms. Unpublished open problem offered to the attendance of the SLDS 2009 conference, 2009. URL http://leon. bottou.org/papers/bottou-slds-open-problem-2009. (Cited on page 2)
|
| 462 |
+
56 Léon Bottou. Stochastic gradient descent tricks. In Neural Networks: Tricks of the Trade, pages 421–436. Springer, 2012. (Cited on page 2)
|
| 463 |
+
358 Kristian Bredies, Karl Kunisch, and Thomas Pock. Total generalized variation. SIAM Journal on Imaging Sciences, 3(3):492–526, 2010. (Cited on page 2) Gong Chen and Marc Teboulle. Convergence Analysis of a Proximal-Like Minimization Algorithm Using Bregman Functions. SIAM Journal on Optimization, 3(3):538–543, 1993. doi: 10.1137/ 0803026. (Cited on page 19)
|
| 464 |
+
363 John Duchi and Yoram Singer. Efficient online and batch learning using forward backward splitting. Journal of Machine Learning Research, 10(Dec):2899–2934, 2009. (Cited on page 3) Eduard Gorbunov, Filip Hanzely, and Peter Richtárik. A Unified Theory of SGD: Variance Reduction, Sampling, Quantization and Coordinate Descent. volume 108 of Proceedings of Machine Learning Research, pages 680–690, Online, 26–28 Aug 2020. PMLR. (Cited on pages 2, 3, 18, and 34) Robert M. Gower, Nicolas Loizou, Xun Qian, Alibek Sailanbayev, Egor Shulgin, and Peter Richtárik. SGD: General Analysis and Improved Rates. 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 5200–5209, Long Beach, California, USA, 09–15 Jun 2019. PMLR. (Cited on page 6) Robert M. Gower, Peter Richtárik, and Francis Bach. Stochastic quasi-gradient methods: variance reduction via Jacobian sketching. Mathematical Programming, pages 1–58, 2020. ISSN 0025-5610. doi: 10.1007/s10107-020-01506-0. (Cited on page 34)
|
| 465 |
+
76 Mert Gürbüzbalaban, Asuman Özdaglar, and Pablo A. Parrilo. Why random reshuffling beats ˘ stochastic gradient descent. Mathematical Programming, Oct 2019. ISSN 1436-4646. doi: 10.1007/s10107-019-01440-w. (Cited on page 2)
|
| 466 |
+
79 Jeff Haochen and Suvrit Sra. Random Shuffling Beats SGD after Finite Epochs. 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 2624–2633, Long Beach, California, USA, 09–15 Jun 2019. PMLR. (Cited on page 2)
|
| 467 |
+
383 Peter Kairouz et al. Advances and open problems in federated learning. arXiv preprint arXiv:1912.04977, 2019. (Cited on pages 1 and 4)
|
| 468 |
+
85 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, page 795–811, Berlin, Heidelberg, 2016. Springer-Verlag. (Cited on page 5)
|
| 469 |
+
|
| 470 |
+
389 Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank Reddi, Sebastian U. Stich, and
|
| 471 |
+
390 Ananda Theertha Suresh. SCAFFOLD: Stochastic controlled averaging for federated learning. In
|
| 472 |
+
391 International Conference on Machine Learning, pages 5132–5143. PMLR, 2020. (Cited on pages 9
|
| 473 |
+
392 and 30)
|
| 474 |
+
393 Ahmed Khaled and Peter Richtárik. Better theory for SGD in the nonconvex world. arXiv Preprint
|
| 475 |
+
394 arXiv:2002.03329, 2020. (Cited on pages 4 and 31)
|
| 476 |
+
395 Ahmed Khaled, Konstantin Mishchenko, and Peter Richtárik. First Analysis of Local GD on
|
| 477 |
+
396 Heterogeneous Data. arXiv preprint arXiv:1909.04715, 2019. (Cited on page 8)
|
| 478 |
+
397 Ahmed Khaled, Konstantin Mishchenko, and Peter Richtárik. Tighter theory for Local SGD on
|
| 479 |
+
398 identical and heterogeneous data. In International Conference on Artificial Intelligence and
|
| 480 |
+
399 Statistics, pages 4519–4529. PMLR, 2020. (Cited on page 29)
|
| 481 |
+
400 Jakub Konecný, H. Brendan McMahan, Felix Yu, Peter Richtárik, Ananda Theertha Suresh, and Dave ˇ
|
| 482 |
+
401 Bacon. Federated learning: strategies for improving communication efficiency. In NIPS Private
|
| 483 |
+
402 Multi-Party Machine Learning Workshop, 2016. (Cited on pages 1 and 4)
|
| 484 |
+
403 Daniel D. Lee and H. Sebastian Seung. Learning the parts of objects by non-negative matrix
|
| 485 |
+
404 factorization. Nature, 401(6755):788–791, 1999. (Cited on page 2)
|
| 486 |
+
405 Stanislaw Lojasiewicz. A topological property of real analytic subsets. Coll. du CNRS, Les équations
|
| 487 |
+
406 aux dérivées partielles, 117:87–89, 1963. (Cited on page 2)
|
| 488 |
+
407 H. Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Agüera y Arcas.
|
| 489 |
+
408 Communication-efficient learning of deep networks from decentralized data. In Proceedings of the
|
| 490 |
+
409 20th International Conference on Artificial Intelligence and Statistics (AISTATS), 2017. (Cited on
|
| 491 |
+
410 pages 1 and 4)
|
| 492 |
+
411 Konstantin Mishchenko, Ahmed Khaled, and Peter Richtárik. Random Reshuffling: Simple Analysis
|
| 493 |
+
412 with Vast Improvements. arXiv preprint arXiv:2006.05988. Neural Information Processing Systems
|
| 494 |
+
413 (NeurIPS) 2020, 2020. (Cited on pages 2, 3, 4, 5, 16, 19, 20, 25, and 26)
|
| 495 |
+
414 Dheeraj Nagaraj, Prateek Jain, and Praneeth Netrapalli. SGD without Replacement: Sharper Rates
|
| 496 |
+
415 for General Smooth Convex Functions. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors,
|
| 497 |
+
416 Proceedings of the 36th International Conference on Machine Learning, volume 97 of Proceedings
|
| 498 |
+
417 of Machine Learning Research, pages 4703–4711, Long Beach, California, USA, 09–15 Jun 2019.
|
| 499 |
+
418 PMLR. (Cited on page 2)
|
| 500 |
+
419 Deanna Needell, Nathan Srebro, and Rachel Ward. Stochastic gradient descent, weighted sampling,
|
| 501 |
+
420 and the randomized Kaczmarz algorithm. Mathematical Programming, 155(1):549–573, Jan 2016.
|
| 502 |
+
421 ISSN 1436-4646. doi: 10.1007/s10107-015-0864-7. (Cited on pages 6 and 34)
|
| 503 |
+
422 Neal Parikh and Stephen Boyd. Proximal Algorithms. Foundations and Trends in Optimization, 1(3):
|
| 504 |
+
423 127–239, January 2014. ISSN 2167-3888. doi: 10.1561/2400000003. (Cited on pages 16 and 30)
|
| 505 |
+
424 Andrei Patrascu and Paul Irofti. Stochastic proximal splitting algorithm for composite minimization.
|
| 506 |
+
425 Optimization Letters, pages 1–19, 2021. (Cited on page 5)
|
| 507 |
+
426 Nhan H. Pham, Lam M. Nguyen, Dzung T. Phan, and Quoc Tran-Dinh. ProxSARAH: An efficient
|
| 508 |
+
427 algorithmic framework for stochastic composite nonconvex optimization. Journal of Machine
|
| 509 |
+
428 Learning Research, 21(110):1–48, 2020. (Cited on page 2)
|
| 510 |
+
429 Boris T. Polyak. Gradient methods for minimizing functionals. Zhurnal Vychislitel’noi Matematiki i
|
| 511 |
+
430 Matematicheskoi Fiziki, 3(4):643–653, 1963. (Cited on page 2)
|
| 512 |
+
431 Benjamin Recht and Christopher Ré. Toward a noncommutative arithmetic-geometric mean in
|
| 513 |
+
432 equality: Conjectures, case-studies, and consequences. In S. Mannor, N. Srebro, and R. C.
|
| 514 |
+
433 Williamson, editors, Proceedings of the 25th Annual Conference on Learning Theory, volume 23,
|
| 515 |
+
434 page 11.1–11.24, 2012. Edinburgh, Scotland. (Cited on page 2)
|
| 516 |
+
435 Leonid I. Rudin, Stanley Osher, and Emad Fatemi. Nonlinear total variation based noise removal
|
| 517 |
+
436 algorithms. Physica D: nonlinear phenomena, 60(1-4):259–268, 1992. (Cited on page 2)
|
| 518 |
+
|
| 519 |
+
37 Shai Shalev-Shwartz and Shai Ben-David. Understanding machine learning: from theory to algorithms. Cambridge University Press, 2014. (Cited on page 1) Ohad Shamir. Without-replacement sampling for stochastic gradient methods. In Advances in neural information processing systems, pages 46–54, 2016. (Cited on page 2) Fanhua Shang, Licheng Jiao, Kaiwen Zhou, James Cheng, Yan Ren, and Yufei Jin. ASVRG: Accelerated Proximal SVRG. In Jun Zhu and Ichiro Takeuchi, editors, Proceedings of Machine Learning Research, volume 95, pages 815–830. PMLR, 14–16 Nov 2018. (Cited on page 2) Sebastian U. Stich. Unified Optimal Analysis of the (Stochastic) Gradient Method. arXiv preprint arXiv:1907.04232, 2019. (Cited on pages 4 and 31) Ruo-Yu Sun. Optimization for Deep Learning: An Overview. Journal of the Operations Research Society of China, 8(2):249–294, Jun 2020. ISSN 2194-6698. doi: 10.1007/s40305-020-00309-6. (Cited on page 31) Junqi Tang, Karen Egiazarian, Mohammad Golbabaee, and Mike Davies. The practicality of stochastic optimization in imaging inverse problems. IEEE Transactions on Computational Imaging, 6:1471– 1485, 2020. (Cited on page 34) Robert Tibshirani. Regression shrinkage and selection via the Lasso. Journal of the Royal Statistical Society: Series B (Methodological), 58(1):267–288, 1996. (Cited on page 2) Trang H. Tran, Lam M. Nguyen, and Quoc Tran-Dinh. Shuffling gradient-based methods with momentum. arXiv preprint arXiv:2011.11884, 2020. (Cited on pages 4 and 31) Blake Woodworth, Kumar Kshitij Patel, and Nathan Srebro. Minibatch vs Local SGD for Heterogeneous Distributed Learning. arXiv preprint arXiv:2006.04735. Neural Information Processing Systems (NeurIPS) 2020, 2020. (Cited on pages 4, 8, and 24) Honglin Yuan, Manzil Zaheer, and Sashank Reddi. Federated composite optimization. arXiv preprint arXiv:2011.08474, 2020. (Cited on page 8) Ming Yuan and Yi Lin. Model selection and estimation in regression with grouped variables. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 68(1):49–67, 2006. (Cited on page 2) Peilin Zhao and Tong Zhang. Stochastic optimization with importance sampling for regularized loss minimization. In Proceedings of the 32nd International Conference on Machine Learning, PMLR, volume 37, pages 1–9, 2015. (Cited on page 4)
|
| 520 |
+
|
| 521 |
+
1. For all authors...
|
| 522 |
+
|
| 523 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 524 |
+
(b) Did you describe the limitations of your work? [Yes]
|
| 525 |
+
(c) Did you discuss any potential negative societal impacts of your work? [N/A]
|
| 526 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 527 |
+
|
| 528 |
+
2. If you are including theoretical results...
|
| 529 |
+
|
| 530 |
+
(a) Did you state the full set of assumptions of all theoretical results? [Yes] (b) Did you include complete proofs of all theoretical results? [Yes]
|
| 531 |
+
|
| 532 |
+
3. If you ran experiments...
|
| 533 |
+
|
| 534 |
+
(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]
|
| 535 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes]
|
| 536 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes]
|
| 537 |
+
(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]
|
| 538 |
+
|
| 539 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 540 |
+
|
| 541 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes]
|
| 542 |
+
(b) Did you mention the license of the assets? [N/A]
|
| 543 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A]
|
| 544 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 545 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 546 |
+
|
| 547 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 548 |
+
|
| 549 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 550 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 551 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/5lhWG3Hj2By/5lhWG3Hj2By.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/5m3SEczOV8L/5m3SEczOV8L.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/5nLibPckV2N/5nLibPckV2N.md
ADDED
|
@@ -0,0 +1,276 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Fairness via Representation Neutralization
|
| 2 |
+
|
| 3 |
+
Mengnan $\mathbf { D } \mathbf { u } ^ { 1 }$ ∗, Subhabrata Mukherjee2, Guanchu Wang3, Ruixiang Tang3, Ahmed Hassan Awadallah2, Xia $\mathbf { H } \mathbf { u } ^ { 3 }$
|
| 4 |
+
|
| 5 |
+
1Texas A&M University 2Microsoft Research 3Rice University dumengnan@tamu.edu, {submukhe,hassanam}@microsoft.com {guanchu.wang,rt39,xia.hu}@rice.edu
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Existing bias mitigation methods for DNN models primarily work on learning debiased encoders. This process not only requires a lot of instance-level annotations for sensitive attributes, it also does not guarantee that all fairness sensitive information has been removed from the encoder. To address these limitations, we explore the following research question: Can we reduce the discrimination of DNN models by only debiasing the classification head, even with biased representations as inputs? To this end, we propose a new mitigation technique, namely, Representation Neutralization for Fairness (RNF) that achieves fairness by debiasing only the task-specific classification head of DNN models. To this end, we leverage samples with the same ground-truth label but different sensitive attributes, and use their neutralized representations to train the classification head of the DNN model. The key idea of RNF is to discourage the classification head from capturing undesirable correlation between fairness sensitive information in encoder representations with specific class labels. To address low-resource settings with no access to sensitive attribute annotations, we leverage a bias-amplified model to generate proxy annotations for sensitive attributes. Experimental results over several benchmark datasets demonstrate our RNF framework to effectively reduce discrimination of DNN models with minimal degradation in task-specific performance.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Deep neural networks (DNNs) have made significant advances in recent times [1, 2, 3], and have been deployed in many real-world applications. However, DNNs often suffer from biases and show discrimination towards certain demographics, especially in high-stake applications, such as criminal justice, employment, loan approval, credit scoring, etc [4, 5, 6]. For example, COMPAS, an algorithmic recidivism predictor, is likely to associate African-American offenders with higher risk scores compared to Caucasians while having a similar profile [7]. This brings significant harm to both society and individuals, thus leading to recent focus on mitigation techniques to alleviate the adverse effects of DNN biases.
|
| 14 |
+
|
| 15 |
+
Existing debiasing methods usually work on learning debiased representations at the encoderlevel. One representative family of methods perform mitigation by explicitly learning debiased representations, either through adversarial learning [8, 9, 10] or invariant risk minimization [11, 12]. Another family of methods [13, 14, 15] implicitly learn debiased representations by incorporating explanation during model training to suppress it from paying high attention to biased features in the original input. Essentially, the above methods aim to remove the bias from deep representations.
|
| 16 |
+
|
| 17 |
+
Learning debiased representations is a technically challenging problem. Firstly, it is hard to remove all fairness sensitive information in the encoder. The suppression of fairness sensitive information might also remove useful information that is task relevant. Secondly, most existing debiasing methods assume access to additional meta-data such as fairness sensitive attributes and a lot of annotations corresponding to the protected groups to guide the learning of debiased representations. However, such resources are expensive to obtain, if not unavailable, for most real world applications.
|
| 18 |
+
|
| 19 |
+
To address these limitations, we explore the following research question: Can we reduce the discrimination of DNN models by only debiasing the task-specific classification head, even with a biased representation encoder? Our work is motivated by the empirical observation that standard training can result in the classification head capturing undesirable correlation between fairness sensitive information and specific class labels. Some recent works [16, 17, 18] have explored such spurious or shortcut learning behavior of DNNs in various applications. To this end, we propose the RNF (Representation Neutralization for Fairness) framework for mitigation, motivated by the Mixup work [19, 20]. We first train a biased teacher network via standard cross entropy loss. In the second stage, we freeze the representation encoder of the biased teacher, and only update the classification head via representation neutralization. This discourages the model from associating biased features with specific class labels, and enforces the model to focus more on task relevant information. To address low-resource settings, our RNF framework does not require any access to the protected attributes during training. To this end, we train a bias-amplified model using generalized cross entropy loss that is used to generate proxy annotations for sensitive attributes. Experimental results over several benchmark tabular and image datasets demonstrate our RNF framework to significantly reduce discrimination of DNN models with minimal degradation of the task performance. The major contributions of our work can be summarized as follows:
|
| 20 |
+
|
| 21 |
+
• We analyze bias propagation from the encoder representations to the final task-specific layer demonstrating that DNN models heavily rely on undesirable correlations for prediction.
|
| 22 |
+
• We introduce RNF, a bias mitigation framework for DNN models via representation neutralization. Our RNF framework achieves mitigation without any access to instance-level sensitive attribute annotations, and instead relies on self-generated proxy annotations.
|
| 23 |
+
• Experimental results on several benchmark datasets demonstrate the effectiveness of our RNF framework via debiasing only the classification head while using biased representations as input. Additionally, we show RNF to be complementary to existing methods that learn debiased encoders and can be further improved within our framework.
|
| 24 |
+
|
| 25 |
+
# 2 Related Work
|
| 26 |
+
|
| 27 |
+
We briefly review bias mitigation and broader robustness literature which are most relevant to ours.
|
| 28 |
+
|
| 29 |
+
Bias Mitigation. Recent studies have indicated that DNN models exhibit social bias towards certain demographic groups. This has led to increased attention to bias mitigation techniques in recent times [21, 22, 23]. Existing mitigation methods can be generally grouped into three broad categories. The first one is based on adversarial training [8, 9, 10]. It leads to a fair classifier as the predictions cannot carry any group discrimination information that the adversary can exploit. However, this method assumes that the sensitive attribute annotations are known, and uses those annotations to learn debiased representations. The second representative family of mitigation methods is based on explainability [13, 14, 15, 24]. These methods require fine-grained feature-level annotations to specify which subset of features are fairness sensitive. The third category falls under the umbrella of causal fairness [25, 11, 12]. The main idea is to enforce the model to concentrate more on task relevant causal features, and getting rid of superficial correlations [26]. This results in the model capturing debiased representations. For instance, [27] minimizes the correlation between sentence representations and bias words using a contrastive learning framework. We can typically decouple the classification problem into representation learning and classification as the two major parts [28]. Different from the above-mentioned methods that mainly aim to train the debiased representations, our work focuses on the classification head and aims to suppress it from capturing undesirable correlation between fairness sensitive attributes and class labels.
|
| 30 |
+
|
| 31 |
+
Shortcut Learning in DNNs. Our work is motivated by the observation that DNNs with standard training are prone to exploit undesirable correlations (or shortcuts in the dataset) for prediction [16, 29]. Beyond algorithmic discrimination, recent studies show that shortcut learning [17] can result in other undesirable consequences like poor generalization and adversarial vulnerability. Specifically, this leads to a high performance degradation for previously unseen inputs, especially for those data beyond held-out test set. Representative tasks depicting such behavior include reading comprehension [30], natural language inference [18], visual question answering[31] and deepfake detection [32].
|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
Figure 1: Representation analysis of $z$ using Kernel PCA. (a) Protected attribute $a$ (i.e., gender) is a discriminative feature. In this plot, the male group primarily lies in the lower left interval, whereas the female group is located primarily on the upper right interval. (b) Predicted positive label and negative task-label distribution. (c) Representation neutralization (please refer to Sec. 3.3) to reduce the discriminative power of $a$ for dimensions relevant to the sensitive information, comparing to the distribution in (a). (d) Neutralization still preserves the useful task relevant information.
|
| 35 |
+
|
| 36 |
+
The most similar work to ours also regularizes the model training using interpolated samples between groups [33]. Similar to the aforementioned solutions, this work also heavily relies on sensitive attribute annotations in the training set. This limits the application scenarios of the mitigation algorithms, especially for many real-world applications without readily available annotations dealing with sensitive attributes. Our representation neutralization framework achieves comparable or better performance to such techniques without relying on such sensitive annotations by leveraging proxy annotations obtained from a bias-intensified version of our framework, thereby, making it broadly applicable to arbitrary real-world applications.
|
| 37 |
+
|
| 38 |
+
# 3 Representation Neutralization for Fairness
|
| 39 |
+
|
| 40 |
+
In this section, we first analyze the task-specific classification head of a DNN to examine how bias is propagated from the encoder representation layer to the task-specific output layer (Section 3.2). We empirically demonstrate the undesirable correlation between fairness sensitive information in representations with specific class labels. Based on the observation, we introduce the Representation Neutralization for Fairness (RNF) framework to debias DNN models (Section 3.3). Finally, we propose an approach to generate proxy annotations for sensitive attributes, enabling the RNF framework to be applicable to low-resource settings with no access to sensitive attribute annotations (Section 3.4).
|
| 41 |
+
|
| 42 |
+
# 3.1 Notations
|
| 43 |
+
|
| 44 |
+
We first introduce the notations used in this work. Let $\mathcal { X } = \{ x _ { i } , y _ { i } , a _ { i } \} , i \in { 1 , . . . , N }$ be the training set, where $x _ { i }$ is the input feature, $y _ { i }$ denotes the ground truth label, and $a _ { i }$ represents the sensitive attribute (e.g., gender, race, age). For ease of notation, in the following sections, we consider binary sensitive attributes2. Nevertheless, our proposed mitigation framework can also be applied to non-binary sensitive attributes (e.g., age).
|
| 45 |
+
|
| 46 |
+
Consider the classification model $f ( x , \theta ) = c ( g ( x ) )$ , parameterized with $\theta$ as the model parameters. Here $g ( x ) : \mathcal { X } \mathcal { Z }$ represents the feature encoder, and $g ( x ) = z$ is the representation for $x$ obtained from a DNN model. The predictor $c ( z ) : { \mathcal { Z } } \to { \mathcal { Y } }$ is the multi-layer classification head. It is depicted by the top layer(s) of the DNN, which takes the encoded representation $z$ as input and maps it to softmax probability. The final class prediction is denoted by $\tilde { y } = \arg \operatorname* { m a x } c ( z )$ . In this work, we aim to reduce the discrimination of DNN models by only debiasing the classification head $c ( z )$ , with the biased representation encoder $g ( x )$ as input.
|
| 47 |
+
|
| 48 |
+
# 3.2 Analysis of the Classification Head
|
| 49 |
+
|
| 50 |
+
In this section, we examine how bias manifests in the representation space $\mathcal { Z }$ as well as how the classification head $c ( z )$ obtained with standard training scheme propagates bias from the representation layer to the model output layer. To this end, we train a biased network $f _ { T } ( x )$ via standard cross entropy loss, where the following experiment is performed using the Adult dataset [34].
|
| 51 |
+
|
| 52 |
+
Representation Probing Analysis. For the Adult training set, we generate representation vectors for 500 training samples using the biased network $f _ { T } ( x )$ and project them in 2D for visualization. To this end, we utilize the Kernel Principal Component Analysis (KPCA) [35] with a sigmoid kernel, which is a tool to visualize high-dimensional data. Since the classification head $c ( z )$ contains multiple non-linear layers, we choose kernel PCA instead of a linear dimensionality reduction method such as linear PCA. The visualization is shown in Figure 1 (a). The plot depicts that the low dimensional projection separates the two protected groups in two areas, where the male group is primarily located in the lower left area, whereas the female group primarily occupies the upper right area. Comparing the task-label $y$ distribution in Figure 1 (b) with the protected group distribution in Figure 1 (a), we observe that the protected attribute information is a discriminative feature that could be exploited by the task classification head for prediction.
|
| 53 |
+
|
| 54 |
+
Role of the Biased Classification Head. The above demonstrative analysis indicates that the model representation captures both useful task relevant classification information as well as bias information from protected attributes. Specifically, the model captures strong correlation between the fairness sensitive information and the class labels. On analyzing the data distribution, we observe this to be an artifact of the conditional label distribution with respect to the sensitive attributes being skewed. The model relies on this shortcut for prediction, resulting in bias amplification. We observe the male neurons to positively correlate to the desirable label (also refer to the experimental analysis in Sec. 4.3), whereas the female neurons positively correlate to undesirable label. This depicts an undesirable correlation between sensitive information with certain class labels in the model.
|
| 55 |
+
|
| 56 |
+
Our Motivation. Based on the above empirical observations, we propose to neutralize the training samples (Fig 1 (c)) so as to reduce the discriminative power of the fairness sensitive information, while at the same time preserving task relevant information (Fig 1 (d)). With the neutralized training data, we propose to re-train the classification head. Our goal is to adjust the decision boundary to implicitly de-correlate the fairness sensitive information in the representation space with class labels.
|
| 57 |
+
|
| 58 |
+
# 3.3 Representation Neutralization for Debiasing Classification Head
|
| 59 |
+
|
| 60 |
+
Based on the aforementioned empirical observations, in this section we propose a simple yet effective bias mitigation framework via Representation Neutralization for Fairness (RNF). RNF does not require any prior knowledge about existing bias in the representation space; nor does it require any knowledge about specific dimension(s) encoding the sensitive attributes – making it widely useful for arbitrary applications. Our goal is to encourage the model to ignore the sensitive attributes and instead focus more on task relevant information.
|
| 61 |
+
|
| 62 |
+
RNF is implemented in two steps (see Figure 2). In the first step, we train the model using cross entropy loss, and obtain a biased teacher network $f _ { T } ( x )$ . During the second step, we freeze the encoder $g ( x )$ for $f _ { T } ( x )$ , and use it as our backbone encoder for learning representations. We then re-train only the classification head $c ( z )$ using feature neutralization (see Figure 2 (b)).
|
| 63 |
+
|
| 64 |
+
Representation Neutralization. To this end, while training the classification head, for an input sample $\{ x _ { 1 } , y , a _ { 1 } \}$ , we randomly select another sample $\{ x _ { 2 } , y , a _ { 2 } \}$ , with the same class label $y$ but a different sensitive attribute $a _ { 2 }$ compared to $a _ { 1 }$ in the input sample. Now we compute the corresponding representations $z _ { 1 } = g ( x _ { 1 } )$ and $z _ { 2 } = g ( x _ { 2 } )$ and re-train the classification head using the neutralized representation the neutralized $\begin{array} { r } { z = \frac { z _ { 1 } + z _ { 2 } } { 2 } } \end{array}$ as inbility supervision label after temperature $y$ for the classification head, we utilizecaling obtained as follows. Given the $\begin{array} { r } { y = \frac { p _ { 1 } + p _ { 2 } } { 2 } } \end{array}$
|
| 65 |
+
logit vector $z _ { 1 }$ for input $x _ { 1 }$ , the probability for class $i$ is computed as $\begin{array} { r } { p _ { 1 , i } = \frac { \exp ( z _ { 1 , i } / T ) } { \sum _ { j } \exp ( z _ { 1 , j } / T ) } } \end{array}$ , where $T \geq 1$ . This can be regarded as a form of knowledge distillation [36], where $T > 1$ softens the softmax score. A larger temperature prevents the model from assigning over-confident prediction probabilities. A special case for RNF is when $T = 1$ , where $p _ { 1 }$ and $p _ { 2 }$ are the standard softmax probabilities obtained from the biased teacher network $f _ { T } ( x )$ .
|
| 66 |
+
|
| 67 |
+

|
| 68 |
+
Figure 2: Debiasing with representation neutralization. (a) We first train a biased teacher network using only cross entropy loss. For two inputs $x _ { 1 }$ and $x _ { 2 }$ that with the same class label $y$ and different sensitive attribute $a$ , we obtain the representations $z _ { 1 }$ and $z _ { 2 }$ , and softened probabilities $p _ { 1 }$ and $p _ { 2 }$ . (b) We freeze parameters of the biased encoder and only re-train the classification head using the neutralized representation $\frac { z _ { 1 } + z _ { 2 } } { 2 }$ as input, and softened probability $\frac { p _ { 1 } + p _ { 2 } } { 2 }$ as supervision signal.
|
| 69 |
+
|
| 70 |
+
We use the knowledge distillation loss. In particular, the mean squared error (MSE) loss is used as a distance-based metric to measure the similarity between model prediction and the supervision signal.
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\mathcal { L } _ { \mathrm { M S E } } = ( \hat { y } _ { i } - y ) ^ { 2 } = \{ c ( \frac { 1 } { 2 } z _ { 1 } + \frac { 1 } { 2 } z _ { 2 } ) - ( \frac { 1 } { 2 } p _ { 1 } + \frac { 1 } { 2 } p _ { 2 } ) \} ^ { 2 } .
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where, $c$ is the classification head to project representations to softmax prediction probability.
|
| 77 |
+
|
| 78 |
+
There are two main benefits of the aforementioned training scheme. From the input perspective, the neutralization of representations suppresses the model from capturing the undesirable correlation between fairness sensitive information in the representation with the class labels. From the output perspective, the softened label encourages the model to assign similar predictions to different sensitive groups. Optimizing Eq. (1) can lead to reduced generalization gap between the two groups.
|
| 79 |
+
|
| 80 |
+
Theorem 1 Given a well-trained representation encoder $g ( x ) \ = \ z$ satisfying $| | z _ { 1 } - z _ { 2 } | | _ { 2 } \leq$ $\lambda _ { z } | p _ { 1 } - p _ { 2 } |$ for $x _ { 1 } , x _ { 2 } \ \in \ { \mathcal { X } }$ and a bounded loss function $L ( c ( z _ { i } ) , p _ { i } ) = ( 1 - p _ { i } ) l ( c ( z _ { i } ) , y =$ $0 ) + p _ { i } l ( c ( z _ { i } ) , y = 1 )$ , where $l ( c ( z _ { i } ) , y ~ = ~ j ) ~ \le ~ \epsilon _ { L }$ for $x _ { i } ~ \in ~ { \mathcal { X } }$ and $j ~ = ~ 0 , 1$ ; if the classification head c minimizes the loss between neutralized representation and soft probabilities, i.e. $\left| \Big | \nabla _ { z } L ( c ( z ) , p ) \big | _ { z = \frac { z _ { 1 } + z _ { 2 } } 2 , p = \frac { p _ { 1 } + p _ { 2 } } 2 } \Big | \right| _ { 2 } \ \le \ \epsilon _ { c } ,$ , where $z ~ = ~ g ( x )$ , $x _ { 1 } ~ \sim ~ P ( x _ { 1 } ~ \mid ~ a _ { i } ~ = ~ 0 )$ , $x _ { 2 } \sim P ( x _ { 2 } \mid a _ { i } = 1 )$ , $| p _ { 1 } - p _ { 2 } | \le \epsilon _ { p }$ , the gap of generalization loss between groups $a = 0$ and $a = 1$ is bounded by:
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\begin{array} { r } { \left| \mathbb { E } _ { x _ { i } \sim P ( x _ { i } \mid a _ { i } = 0 ) } L ( c ( z _ { i } ) , p _ { i } ) - \mathbb { E } _ { x _ { j } \sim P ( x _ { j } \mid a _ { j } = 1 ) } L ( c ( z _ { j } ) , p _ { j } ) \right| \le \epsilon _ { p } ( \lambda _ { z } \epsilon _ { c } + \epsilon _ { L } ) } \end{array}
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
Here “well-trained” means that the model has learned reasonably good representations to encode sufficient task relevant information. Essentially, after training for a sufficient number of epochs until the validation loss has converged, we have access to a reasonably good representation space (although it might encode a lot of fairness sensitive information). If we use the RNF loss function to further train the classification head, the generalization gap between the different protected groups would be small. For more detailed proof, please refer to Section A in the Appendix.
|
| 87 |
+
|
| 88 |
+
Smoothing Neutralization. To further enforce the model to ignore sensitive attributes, we construct augmented training samples using a hyper-parameter $\lambda$ to control the degree of neutralization of the samples $\{ z _ { 1 } , p _ { 1 } , \bar { y } \}$ and $\left\{ z _ { 2 } , p _ { 2 } , \bar { y } \right\}$ . The augmented neutralized sample is given by $z =$ $\lambda z _ { 1 } + ( 1 - \lambda ) z _ { 2 }$ , $\lambda \in [ \frac { 1 } { 2 } , 1 )$ . We encourage the classification head to give similar prediction scores for the augmented and the neutralized sample (with $\begin{array} { r } { \lambda = \frac { 1 } { 2 } . } \end{array}$ ). The regularization loss is given by:
|
| 89 |
+
|
| 90 |
+
$$
|
| 91 |
+
\mathcal { L } _ { \mathrm { S m o o t h } } = \sum _ { \lambda \in [ \frac { 1 } { 2 } , 1 ) } | c ( \lambda z _ { 1 } + ( 1 - \lambda ) z _ { 2 } ) - c ( \frac { 1 } { 2 } z _ { 1 } + \frac { 1 } { 2 } z _ { 2 } ) | _ { 1 } .
|
| 92 |
+
$$
|
| 93 |
+
|
| 94 |
+
By varying $\lambda$ we control the degree of sensitive information for the augmented samples. It is utilized to penalize the large changes in softmax probability when we move along the interpolation between two samples. We linearly combine the MSE loss in Eq. (1) with the regularization term as follows:
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\begin{array} { r } { \mathcal { L } = \mathcal { L } _ { \mathrm { M S E } } + \alpha \mathcal { L } _ { \mathrm { S m o o t h } } . } \end{array}
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
We train the classification head using the loss function in Eq. (4). Eventually we combine the original encoder of $f _ { T } ( x )$ and re-trained classification head as the debiased student network $f _ { S } ( x )$ . The teacher $f _ { T } ( x )$ is later discarded and the debiased student network $f _ { S } ( x )$ is used for prediction.
|
| 101 |
+
|
| 102 |
+
# 3.4 Generating Proxy Annotations for Sensitive Attributes
|
| 103 |
+
|
| 104 |
+
The aforementioned feature neutralization is limited in that it requires instance-level sensitive attribute annotations $\{ a _ { i } \} _ { i = 1 } ^ { N }$ for all training samples. Such resource-extensive annotations are difficult to obtain for many practical applications particularly due to the nature of the sensitive attributes. To address this limitation, we propose a method to generate proxy annotations $\{ \hat { a } _ { i } \} _ { i = 1 } ^ { N }$ for the sensitive attributes based on the model uncertainty. The key idea is that a biased model generates over-confident predictions for one demographic group, while giving much lower scores for the alternative group. Particularly, the bias-amplified model tends to assign the privileged group more desired outcome, while assigning the under-privileged group less-desired outcome. For instance in the Adult dataset, the average prediction probability of the desired label (higher income) for the male group is much higher than that of the female group. In contrast, the average probability of the less-desired label for the female group is much higher than that of the male group.
|
| 105 |
+
|
| 106 |
+
To better facilitate the model to generate uncertainty scores, we train another biased model by intentionally amplifying the bias via generalized cross entropy loss (GCE) [37]. The bias-amplified model is denoted as $f _ { B } ( x )$ and the loss function is given as follows:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\operatorname { G C E } ( f ( x ; \theta ) , y ) = { \frac { 1 - f _ { y } ( x ; \theta ) ^ { q } } { q } } ,
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where $f _ { y } ( x ; \theta )$ denotes the output probability for ground truth label $y$ . The hyper-parameter $q \in ( 0 , 1 ]$ controls the degree of bias amplification. When $\mathrm { l i m } _ { q \to 0 }$ , the GCE loss in Equation (2) approaches $- \mathrm { l o g } p$ which is equivalent to standard cross entropy loss. The core idea is that for more biased samples, i.e., samples with larger $f _ { y } ( x ; \theta )$ value, the model assigns higher weights $f _ { y } ^ { q }$ while updating the gradient.
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\frac { \partial \mathrm { G C E } ( p , y ) } { \partial \theta } = f _ { y } ^ { q } \frac { \partial \mathrm { C E } ( p , y ) } { \partial \theta } .
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
In this setup, the model $f _ { B } ( x )$ learns more from bias-amplified samples compared to the model $f _ { T } ( x )$ trained with standard cross entropy loss.
|
| 119 |
+
|
| 120 |
+
The confidence score of $f _ { B } ( x )$ is used to indicate whether a sample belongs to a privileged or unprivileged group. Specifically, for a desired ground truth label, samples with over-confident scores are grouped into the privileged group, whereas subsets of samples with low prediction scores are grouped into the unprivileged group. In contrast, for the undesired ground truth label, samples with over-confident scores are grouped into the unprivileged group, and vice versa. Based on this criterion, we generate proxy sensitive attribute annotation $\hat { a }$ for each training sample $x$ to split samples into two groups, which are subsequently used for feature neutralization.
|
| 121 |
+
|
| 122 |
+
The overall process of our RNF mitigation framework is given in Algorithm 1, which contains two stages. In the first stage, we train the biased teacher network $f _ { T } ( x )$ 1 and the biasamplified network $f _ { B } ( x )$ 2 . In the second stage, we first use $f _ { B } ( x )$ 3 to generate proxy sensitive attribute annotations for all training samples. We use the ratio $\gamma$ 4 to partition the training set to gen5 erate proxy annotations for protected attributes 6 that are subsequently used for feature neutralization. Note that the ratio $\gamma$ is determined by the 7 fairness-accuracy trade-off on the validation set. Then we use representation neutralization and the loss function in Eq. (4) to re-train the classification head of $f _ { T } ( x )$ . Eventually, we combine the original encoder $\overset { \cdot } { \boldsymbol { g } } ( \boldsymbol { x } )$ of $f _ { T } ( x )$ and the re
|
| 123 |
+
|
| 124 |
+
# Algorithm 1: RNF mitigation framework.
|
| 125 |
+
|
| 126 |
+
Input: Training data $D = \{ ( x _ { i } , y _ { i } ) \} _ { i = 1 } ^ { N }$ .
|
| 127 |
+
Set hyperparameter $q , \alpha$ .
|
| 128 |
+
while first stage do Train teacher network $f _ { T } ( x )$ and bias-amplified network $f _ { B } ( x )$ .
|
| 129 |
+
|
| 130 |
+
while second stage do
|
| 131 |
+
|
| 132 |
+
Determine the splitting threshold $\gamma$ for $f _ { B } ( { \boldsymbol { x } } )$ ; Calculate proxy annotation $\hat { a } _ { i }$ for each training sample $\{ ( x _ { i } ) \} _ { i = 1 } ^ { N }$ based on $\gamma$ and $f _ { B } ( x )$ ; Use loss function in Eq. (4) to re-train classification head $c ( z )$ of $f _ { T } ( x )$ .
|
| 133 |
+
|
| 134 |
+
Output: The debiased student network $f _ { S } ( x )$
|
| 135 |
+
|
| 136 |
+
fined classification head $c ( z )$ to give us the debiased student network $f _ { S } ( x )$ . It is worth noting that the neutralization is merely performed during the training stage for only debiasing the classification head. At inference time, the features just come in as encoded, and the classification head has learned to not exploit any of the information correlated with the sensitive attribute for prediction.
|
| 137 |
+
|
| 138 |
+
# 4 Experiments
|
| 139 |
+
|
| 140 |
+
In this section, we conduct experiments to evaluate the effectiveness of our RNF framework.
|
| 141 |
+
|
| 142 |
+
# 4.1 Experimental Setup
|
| 143 |
+
|
| 144 |
+
# 4.1.1 Fairness Metrics, Benchmark Datasets and Baselines
|
| 145 |
+
|
| 146 |
+
We use two group fairness metrics: Demographic Parity [38] and Equalized Odds [39]. Demographic Parity (DP) measures the ratio of the probability of favorable outcomes between unprivileged and privileged groups: $\begin{array} { r } { \mathrm { D P } = \frac { p ( \hat { y } = 1 | a = 0 ) } { p ( \hat { y } = 1 | a = 1 ) } } \end{array}$ . Equalized Odds $( \Delta \mathrm { E O } )$ require favorable outcomes to be independent of the protected class attribute $a$ , conditioned on the ground truth label $y$ . Specifically, it calculates the summation of the True Positive Rate difference and False Positive Rate difference:
|
| 147 |
+
|
| 148 |
+
$$
|
| 149 |
+
y = 1 ) \} + \{ P ( \hat { y } = 1 \mid a = 0 , y = 0 ) - P ( \hat { y } = 1 \mid a = 1 , y = 0 ) \}
|
| 150 |
+
$$
|
| 151 |
+
|
| 152 |
+
Under the above metrics, it is desirable to have a DP value closer to 1 and $\Delta \mathrm { E O }$ value closer to 0.
|
| 153 |
+
|
| 154 |
+
Table 1: Dataset statistics.
|
| 155 |
+
|
| 156 |
+
<table><tr><td></td><td>Adult</td><td>MEPS</td><td>CelebA</td></tr><tr><td>#Training</td><td>33120</td><td>11362</td><td>194599</td></tr><tr><td>#Validation</td><td>3000</td><td>1200</td><td>4000</td></tr><tr><td>#Test</td><td>9102</td><td>3168</td><td>8000</td></tr></table>
|
| 157 |
+
|
| 158 |
+
We use two benchmark tabular datasets and one image dataset to evaluate the effectiveness of RNF. For the Adult income dataset (Adult), the goal is to predict whether a person’s income exceeds $\$ 50 K/\mathrm { y r }$ [34]. We consider gender as the protected attribute where vanilla trained models show discrimination towards the female group by predicting females to earn less. For the Medical
|
| 159 |
+
|
| 160 |
+
Expenditure dataset (MEPS), we consider two groups white and non-white [40]. Here the task is to predict whether a person would have a ‘high’ utilization, where vanilla DNN shows discrimination towards the non-white group. The CelebFaces Attributes (CelebA) dataset is used to predict whether the hair in an image is wavy or not [41]. We consider two groups male and female, where vanilla trained models show discrimination towards the male group. We split all datasets into three subsets with statistics reported in Table 1. More details of the datasets are included in Sec. C in the Appendix.
|
| 161 |
+
|
| 162 |
+
We compare two variants of our framework RNF (using proxy sensitive attribute annotations) and $\mathbf { R N F } _ { \mathbf { G T } }$ (using ground truth sensitive attribute annotations) against baselines such as DNNs trained using only cross entropy loss (referred as Vanilla) and two regularization based mitigation methods, namely, adversarial training (Adversarial) [42] and Equalized Odds Regularization (EOR) [43]. Among them, the Adversarial method achieves fairness via learning debiased representations, whereas EOR directly optimizes the EO metric in Eq. (7). All three baselines control the fairness-accuracy trade-off via hyper-parameters. More details on the baselines are included in Sec. D in the Appendix.
|
| 163 |
+
|
| 164 |
+
# 4.1.2 Implementation Details
|
| 165 |
+
|
| 166 |
+
For the image classification task, we use ResNet-18 [1] (we add one more fully connected layer). We set the representation encoder $g ( x )$ as the convolutional layers and use the remaining two fully connected layers as the classification head $c ( z )$ . For tabular datasets, we use a three-layer MLP (multilayer perceptron) as the classification model, where the first layer is set as the encoder and the remaining two layers are used as the classification head. Dropout is used for the first two layers with the dropout probability fixed at 0.2. We use the same batch size of 64 for tabular datasets and 390 for the image dataset. For selecting another random sample $\{ x _ { 2 } , y , a _ { 2 } \}$ to be neutralized with current sample $\mathbf { \bar { \{ } } x _ { 1 } , y , a _ { 1 } \}$ , we perform the selection within the current batch of training data. The hyperparameters (e.g., learning rate and training epoches) are determined based on the model performance on the validation set, and early-stopping based on validation performance is used to avoid overfitting. The optimal temperature $T$ used to calculate the probability is set as 2.0, 5.0, 2.0 for Adult, MEPS and CelebA datasets respectively. For Eq. (3), we sample $\lambda$ from the list [0.6, 0.7, 0.8, 0.9]. The hyper-parameter $q$ in Eq. (5) is set as $0 . 2 , 0 . 6 , 0 . 3$ for Adult, MEPS and CelebA datasets respectively.
|
| 167 |
+
|
| 168 |
+

|
| 169 |
+
Figure 3: The fairness-accuracy curve comparison of RNF and other baselines. The first and second row depict the DP accuracy and $\Delta \mathrm { E O }$ accuracy trade-off curves, respectively. Note that there is a certain level of variance for each baseline method, and we report the average over 10 runs.
|
| 170 |
+
|
| 171 |
+
# 4.2 Mitigation Performance Analysis
|
| 172 |
+
|
| 173 |
+
We compare the mitigation performance of RNF (with proxy attribute annotations) and ${ \mathrm { R N F } } _ { \mathrm { G T } }$ (with ground-truth attribute annotations) with other competing methods and illustrate their fairness-accuracy curves for the three datasets in Figure 3. The hyper-parameter $\alpha$ in Eq. (4) controls the trade-off between accuracy and fairness for RNF. For Adversarial and EOR, we vary their regularization weights to obtain the corresponding performance curves. As the random seeds lead to variance in the accuracy and fairness metrics (please refer to Section E.4 in the Appendix for detailed analysis of the variability effect), we train the model for 10 times with different seeds and report the average result. Overall, we make the following key observations.
|
| 174 |
+
|
| 175 |
+
• Even though RNF does not rely on annotations for the sensitive attributes, it performs similar to baseline methods with access to such information, e.g, Adversarial training, or better than them in some cases. This makes RNF readily usable for real-world applications where protected attributes are not available in the training set.
|
| 176 |
+
• ${ \sf R N F } _ { \mathrm { G T } }$ improves mitigation performance over RNF by $1 0 \%$ on an average across all datasets and metrics, thereby, demonstrating the benefit of using ground truth sensitive attribute annotations.
|
| 177 |
+
• The soft labels of RNF and ${ \mathsf { R N F } } _ { \mathrm { G T } }$ (obtained using a higher temperature $T$ ) discourage the model to assign overconfident predictions, thereby, suppressing it from capturing undesirable correlation between fairness sensitive information and class labels. Penalizing the large changes of probability as we move along the interpolation between two samples further suppresses the model from capturing the undesirable correlation.
|
| 178 |
+
• Direct optimization of the equality of odds metric (i.e., EOR) achieves comparable performance to ${ \mathrm { R N F } } _ { \mathrm { G T } }$ for all the datasets. However, it has limited improvement in terms of the demographic parity metric. Note that EOR requires instance-level annotations for the protected attributes.
|
| 179 |
+
• We observe that Adversarial training also performs effective mitigation by learning debiased representations. However, this happens at the expense of a higher accuracy drop for the task performance. This likely results from the loss of task relevant information while suppressing sensitive information from the representations. Additionally, we observe adversarial training to be unstable, especially for relatively complex task like image classification.
|
| 180 |
+
|
| 181 |
+
# 4.3 Classification Head Analysis
|
| 182 |
+
|
| 183 |
+
In this section, we use explainability and an auxiliary prediction task to analyze the classification head $c ( z )$ for the Adult dataset. Particularly, we leverage explainability as a debugging tool to analyze the attention difference between Vanilla and RNF model with respect to the representations.
|
| 184 |
+
|
| 185 |
+
Auxiliary Sensitive Attribute Prediction Task. We perform a representation analysis using an auxiliary prediction task. To this end, we train another linear classifier to predict sensitive attributes using the biased representation $g ( x ) = z$ as input and the sensitive attribute annotations $\{ a _ { i } \} _ { i = 1 } ^ { N }$ as the supervision signal. The linear classifier is denoted by $L _ { \mathrm { S E N S } } ( z ) = W z + b$ , where $W$ and $b$ represent the weight matrix and bias for the linear classifier respectively. The weight matrix $W$ can be used to measure the degree of bias in each dimension of the representation $z$ .
|
| 186 |
+
|
| 187 |
+
Explanation Analysis. We use post-hoc explainability [44] to analyze the contribution of the classification head $c ( z )$ . Our goal is to figure out the contribution of each dimension within the biased representation $g ( x ) = z$ towards the model prediction $f ( x , \theta ) = c ( g ( x ) )$ . We train a linear classifier $L _ { \mathrm { e x p l a n } } ( z ) = \bar { W } \dot { z } + b$ to mimic the decision boundary of the multi-layer classification head $c ( z )$ .
|
| 188 |
+
|
| 189 |
+
We compare the weight matrix of the two linear classifiers $L _ { \mathrm { S E N S } } ( z )$ and $L _ { \mathrm { e x p l a n } } ( z )$ using cosine similarity. For models trained using Adult dataset, we extract the weight matrix corresponding to the protected attribute Male and task label Positive, and then we calculate the cosine similarity between the Male vector and the Positive vector. This follows from our observation in Figure 1 that the vanilla model makes use of male relevant information to make positive predictions. For the Vanilla model and RNF models listed in Figure 3 (a), we calculate the cosine similarity and report the DP-Similarity performance in Figure 4. We observe that RNF dramatically reduces the cosine similarity between positive predictions and male relevant information compared to Vanilla (from 0.272 to 0.075), by adjusting the decision boundary.
|
| 190 |
+
|
| 191 |
+
This eventually helps the head $c ( z )$ to shift its attention from fairness sensitive information to task relevant information.
|
| 192 |
+
|
| 193 |
+

|
| 194 |
+
Figure 4: Analysis for the classification head.
|
| 195 |
+
|
| 196 |
+
# 4.4 Effectiveness of GCE Loss
|
| 197 |
+
|
| 198 |
+
We use MEPS dataset to examine the GCE loss in terms of generating proxy annotations for the protected attributes. The results are shown in Table 2. Firstly, we compare the fairness performance of GCE loss with standard CE loss (Vanilla). As expected, we observe that GCE is more biased than Vanilla in terms of the fairness metrics with $0 . 2 \%$ accuracy difference. Secondly, we compare RNF with several of its variants: 1) replacing GCE loss with cross entropy (CE) loss to generate proxy labels, and 2) using random annotations for the protected attributes. For a fair comparison, except for the protected attribute annotations, we use the same set of hyper-parameters for different variants. Even though the same level of regularization is performed for the three RNF variants, RNF-GCE has a higher mitigation performance than RNF-CE with $3 . 0 \%$ DP improvement and only $0 . 3 \%$ accuracy difference, thereby, demonstrating the effectiveness of GCE in terms of separating protected groups. Another observation is that even using random annotations, our RNF framework could achieve certain level of mitigation. This is because partial samples contain different sensitive attributes, which still could serve neutralization purpose.
|
| 199 |
+
|
| 200 |
+
Table 2: Ablation analysis.
|
| 201 |
+
|
| 202 |
+
<table><tr><td></td><td colspan="2">MEPS</td></tr><tr><td>Models</td><td>Accuracy</td><td>DP △EO</td></tr><tr><td>Vanilla</td><td>0.862</td><td>0.866 -0.210</td></tr><tr><td>GCE</td><td>0.860</td><td>0.839 -0.249</td></tr><tr><td>RNF-GCE</td><td>0.839</td><td>0.964 -0.099</td></tr><tr><td>RNF-CE</td><td>0.842</td><td>0.936 -0.128</td></tr><tr><td>RNF-Random</td><td>0.856</td><td>0.902 -0.163</td></tr></table>
|
| 203 |
+
|
| 204 |
+
# 4.5 Varying Layers for the Classification Head
|
| 205 |
+
|
| 206 |
+
We use MEPS and CelebA two datasets to study the effect of an important hyper-parameter of our framework in terms of which layers to use for the encoder. Our classification model $f ( x )$ contains the encoder $g ( x )$ and task predictor $c ( z )$ . In this experiment, we vary the depth of the representation layer to examine the effect of
|
| 207 |
+
|
| 208 |
+
Table 3: Varying the layers for classification head.
|
| 209 |
+
|
| 210 |
+
<table><tr><td rowspan="3">Models</td><td colspan="2">MEPS</td><td colspan="3">CelebA</td></tr><tr><td>Accuracy</td><td>DP △EO</td><td>Accuracy</td><td>DP</td><td>△EO</td></tr><tr><td>RNF</td><td>0.839</td><td>0.964 -0.099</td><td>0.668</td><td>0.836</td><td>-0.290</td></tr><tr><td>RNF-Last</td><td>0.837</td><td>0.971 -0.076</td><td>0.641</td><td>0.966</td><td>-0.052</td></tr></table>
|
| 211 |
+
|
| 212 |
+
layer selection. In particular, we investigate the question: can we debias only the very last layer, with the remaining layers as the biased encoder? We report the results for MEPS and CelebA datasets in Table 3, where the second row depicts the result of debiasing only the last layer. On MEPS dataset, RNF-Last has better performance in terms of the two fairness metrics with only $0 . 2 \%$ accuracy difference. Similarly, for CelebA dataset, with $2 . 7 \%$ accuracy difference, RNF-Last has better fairness performance (with $13 \%$ DP improvement). This demonstrates that debiasing only the last layer can achieve similar performance compared to debiasing the last several layers.
|
| 213 |
+
|
| 214 |
+
# 4.6 Representation Neutralization with Debiased Encoder
|
| 215 |
+
|
| 216 |
+
In the discussions so far, we reported the performance of RNF while debiasing only the classification head. In this section, we analyze the impact of RNF built on top of a debiased encoder. We first use Adversarial or EOR training to learn a debiased encoder – which is subsequently used as the backbone encoder for updating the classification head using RNF. This experiment is performed on the MEPS dataset where both Adversarial and EOR methods achieve competitive performance. We use the same hyper-parameters for different RNF variants and report a single point in the fairness-accuracy curve. The results are shown in Table 4. We observe RNF_EOR to achieve better fairness performance over RNF, with DP metric improvement of $1 . 6 \%$ and $\Delta \mathrm { E O }$ metric moves closer to 0. However, such improvement in the fairness metrics incur some loss in the task performance – where the accuracy reduces by $0 . 5 \%$ . We observe a similar trend with the combination of RNF and Adversarial training, where the joint combination improves the fairness metrics DP and $\Delta \mathrm { E O }$ . Similar to the previous case, this fairness improvement is achieved at the expense of some task performance degradation, where the accuracy drops by $1 . 3 \%$ . This indicates that our RNF is complementary to using a debiased encoder where the joint combination performs better than either of them in terms of the fairness metrics with some loss in task performance.
|
| 217 |
+
|
| 218 |
+
Table 4: RNF with debiased encoder.
|
| 219 |
+
|
| 220 |
+
<table><tr><td rowspan="2">Models</td><td colspan="3">MEPS</td></tr><tr><td>Accuracy</td><td>DP</td><td>△EO</td></tr><tr><td>Vanilla</td><td>0.862</td><td>0.866</td><td>-0.210</td></tr><tr><td>RNF</td><td>0.839</td><td>0.964</td><td>-0.099</td></tr><tr><td>RNF_EOR</td><td>0.834</td><td>0.980</td><td>-0.049</td></tr><tr><td>RNF_Adversarial</td><td>0.826</td><td>0.971</td><td>-0.085</td></tr></table>
|
| 221 |
+
|
| 222 |
+
# 5 Conclusions and Future Work
|
| 223 |
+
|
| 224 |
+
In this work, we demonstrate that even when input representations are biased, we can still improve fairness by debiasing only the classification head of the DNN models. We introduce the RNF framework for debiasing the classification head by neutralizing training samples that have the same ground truth label but with different sensitive attribute annotations. To reduce the reliance on sensitive attribute annotations (as used in existing works), we generate proxy annotations by training a biasintensified model and then annotating samples based on its confidence level. Experimental results indicate our RNF framework to dramatically reduce the discrimination of DNN models, without requiring access to annotations for the sensitive attributes for all the training samples. Experimental analysis further demonstrates our RNF framework to further improve in conjunction with other debiasing methods. Specifically, our RNF framework built on top of a debiased backbone encoder leads to better mitigation performance with negligible accuracy drop in the task performance. It is worth noting that our RNF framework could help alleviate the discrimination rather than eliminate it.
|
| 225 |
+
|
| 226 |
+
On the other hand, the experimental analysis indicates a mitigation gap between RNF and ${ \mathrm { R N F } } _ { \mathrm { G T } }$ This is because we assume zero access to the protected attribute annotations when using GCE framework. It is desirable to further boost the quality of the generated proxy annotations. In realworld applications, domain experts could be involved to annotate a small ratio of the samples for the training set. Equipped with this small ratio of high quality protected attribute annotations, we could generate proxy annotations for other training samples with a higher accuracy compared to the proxy annotations generated by GCE framework. As such, we can further boost the mitigation performance of RNF. This is a challenging topic and would be explored in our future research.
|
| 227 |
+
|
| 228 |
+
# 6 Funding Transparency Statement
|
| 229 |
+
|
| 230 |
+
The work is in part supported by NSF grants CNS-1816497, IIS-1900990, and IIS-1939716. The views and conclusions contained in this paper are those of the authors and should not be interpreted as representing any funding agencies.
|
| 231 |
+
|
| 232 |
+
References
|
| 233 |
+
[1] 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 (CVPR), 2016.
|
| 234 |
+
[2] Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. 2019 Annual Conference of the North American Chapter of the Association for Computational Linguistics (NAACL), 2019.
|
| 235 |
+
[3] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems (NeurIPS), 2012.
|
| 236 |
+
[4] Ninareh Mehrabi, Fred Morstatter, Nripsuta Saxena, Kristina Lerman, and Aram Galstyan. A survey on bias and fairness in machine learning. ACM Computing Surveys, 2021.
|
| 237 |
+
[5] Mengnan Du, Fan Yang, Na Zou, and Xia Hu. Fairness in deep learning: A computational perspective. IEEE Intelligent Systems, 2020.
|
| 238 |
+
[6] Rachel KE Bellamy, Kuntal Dey, Michael Hind, Samuel C Hoffman, Stephanie Houde, Kalapriya Kannan, Pranay Lohia, Jacquelyn Martino, Sameep Mehta, Aleksandra Mojsilovic, et al. Ai fairness 360: An extensible toolkit for detecting, understanding, and mitigating unwanted algorithmic bias. arXiv preprint arXiv:1810.01943, 2018.
|
| 239 |
+
[7] Julia Angwin, Jeff Larson, Surya Mattu, and Lauren Kirchner. Machine bias. https://www.propublica.org/article/machine-bias-risk-assessments-in-criminal-sentencing, 2016.
|
| 240 |
+
[8] Byungju Kim, Hyunwoo Kim, Kyungsu Kim, Sungjin Kim, and Junmo Kim. Learning not to learn: Training deep neural networks with biased data. In Proceedings of the IEEE conference on computer vision and pattern recognition (CVPR), 2019.
|
| 241 |
+
[9] Tianlu Wang, Jieyu Zhao, Mark Yatskar, Kai-Wei Chang, and Vicente Ordonez. Balanced datasets are not enough: Estimating and mitigating gender bias in deep image representations. International Conference on Computer Vision (ICCV), 2019.
|
| 242 |
+
[10] Yanai Elazar and Yoav Goldberg. Adversarial removal of demographic attributes from text data. 2018 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2018.
|
| 243 |
+
[11] Martin Arjovsky, Léon Bottou, Ishaan Gulrajani, and David Lopez-Paz. Invariant risk minimization. arXiv preprint arXiv:1907.02893, 2019.
|
| 244 |
+
[12] Kartik Ahuja, Karthikeyan Shanmugam, Kush Varshney, and Amit Dhurandhar. Invariant risk minimization games. In International Conference on Machine Learning (ICML), 2020.
|
| 245 |
+
[13] Krishna Kumar Singh, Dhruv Mahajan, Kristen Grauman, Yong Jae Lee, Matt Feiszli, and Deepti Ghadiyaram. Don’t judge an object by its context: Learning to overcome contextual bias. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), 2020.
|
| 246 |
+
[14] Andrea Zunino, Sarah Adel Bargal, Riccardo Volpi, Mehrnoosh Sameki, Jianming Zhang, Stan Sclaroff, Vittorio Murino, and Kate Saenko. Explainable deep classification models for domain generalization. arXiv preprint arXiv:2003.06498, 2020.
|
| 247 |
+
[15] Laura Rieger, Chandan Singh, W James Murdoch, and Bin Yu. Interpretations are useful: penalizing explanations to align neural networks with prior knowledge. International Conference on Machine Learning (ICML), 2020.
|
| 248 |
+
[16] Mohammad Pezeshki, Sékou-Oumar Kaba, Yoshua Bengio, Aaron Courville, Doina Precup, and Guillaume Lajoie. Gradient starvation: A learning proclivity in neural networks. arXiv preprint arXiv:2011.09468, 2020.
|
| 249 |
+
[17] Robert Geirhos, Jörn-Henrik Jacobsen, Claudio Michaelis, Richard Zemel, Wieland Brendel, Matthias Bethge, and Felix A Wichmann. Shortcut learning in deep neural networks. Nature Machine Intelligence, 2(11):665–673, 2020.
|
| 250 |
+
[18] Timothy Niven and Hung-Yu Kao. Probing neural network comprehension of natural language arguments. 57th Annual Meeting of the Association for Computational Linguistics (ACL), 2019.
|
| 251 |
+
[19] Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. International Conference on Learning Representations (ICLR), 2018.
|
| 252 |
+
[20] Vikas Verma, Alex Lamb, Christopher Beckham, Amir Najafi, Ioannis Mitliagkas, David LopezPaz, and Yoshua Bengio. Manifold mixup: Better representations by interpolating hidden states. In International Conference on Machine Learning (ICML), 2019.
|
| 253 |
+
[21] Hao Wang, Berk Ustun, and Flavio Calmon. Repairing without retraining: Avoiding disparate impact with counterfactual distributions. In International Conference on Machine Learning (ICML), 2019.
|
| 254 |
+
[22] Christina Wadsworth, Francesca Vera, and Chris Piech. Achieving fairness through adversarial learning: an application to recidivism prediction. Fairness, Accountability, and Transparency in Machine Learning (FAT/ML), 2018.
|
| 255 |
+
[23] Harrison Edwards and Amos Storkey. Censoring representations with an adversary. International Conference on Learning Representations (ICLR), 2016.
|
| 256 |
+
[24] Frederick Liu and Besim Avci. Incorporating priors with feature attribution on text classification. 57th Annual Meeting of the Association for Computational Linguistics (ACL), 2019.
|
| 257 |
+
[25] Matt J Kusner, Joshua Loftus, Chris Russell, and Ricardo Silva. Counterfactual fairness. In Advances in neural information processing systems (NeurIPS), 2017.
|
| 258 |
+
[26] Niki Kilbertus, Mateo Rojas Carulla, Giambattista Parascandolo, Moritz Hardt, Dominik Janzing, and Bernhard Schölkopf. Avoiding discrimination through causal reasoning. In Advances in Neural Information Processing Systems (NeurIPS), 2017.
|
| 259 |
+
[27] Pengyu Cheng, Weituo Hao, Siyang Yuan, Shijing Si, and Lawrence Carin. Fairfil: Contrastive neural debiasing method for pretrained text encoders. International Conference on Learning Representations (ICLR), 2021.
|
| 260 |
+
[28] Bingyi Kang, Saining Xie, Marcus Rohrbach, Zhicheng Yan, Albert Gordo, Jiashi Feng, and Yannis Kalantidis. Decoupling representation and classifier for long-tailed recognition. International Conference on Learning Representations (ICLR), 2020.
|
| 261 |
+
[29] Junhyun Nam, Hyuntak Cha, Sungsoo Ahn, Jaeho Lee, and Jinwoo Shin. Learning from failure: Training debiased classifier from biased classifier. Advances in Neural Information Processing Systems (NeurIPS), 2020.
|
| 262 |
+
[30] Robin Jia and Percy Liang. Adversarial examples for evaluating reading comprehension systems. 2017 Conference on Empirical Methods in Natural Language Processing (EMNLP), 2017.
|
| 263 |
+
[31] Aishwarya Agrawal, Dhruv Batra, Devi Parikh, and Aniruddha Kembhavi. Don’t just assume; look and answer: Overcoming priors for visual question answering. In IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2018.
|
| 264 |
+
[32] Ali Khodabakhsh, Raghavendra Ramachandra, Kiran Raja, Pankaj Wasnik, and Christoph Busch. Fake face detection methods: Can they be generalized? In 2018 International Conference of the Biometrics Special Interest Group (BIOSIG), 2018.
|
| 265 |
+
[33] Ching-Yao Chuang and Youssef Mroueh. Fair mixup: Fairness via interpolation. International Conference on Learning Representations (ICLR), 2021.
|
| 266 |
+
[34] Ron Kohavi. Scaling up the accuracy of naive-bayes classifiers: A decision-tree hybrid. In Proceedings of the Second International Conference on Knowledge Discovery and Data Mining (KDD), 1996.
|
| 267 |
+
[35] Gökhan H Bakır, Jason Weston, and Bernhard Schölkopf. Learning to find pre-images. Advances in neural information processing systems (NeurIPS), 2004.
|
| 268 |
+
[36] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. NeurIPS 2014 Deep Learning Workshop, 2015.
|
| 269 |
+
[37] Zhilu Zhang and Mert R Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. Advances in Neural Information Processing Systems (NeurIPS), 2018.
|
| 270 |
+
[38] Michael Feldman, Sorelle A Friedler, John Moeller, Carlos Scheidegger, and Suresh Venkatasubramanian. Certifying and removing disparate impact. In ACM SIGKDD International Conference on Knowledge Discovery and Data Mining (KDD), 2015.
|
| 271 |
+
[39] Moritz Hardt, Eric Price, Nati Srebro, et al. Equality of opportunity in supervised learning. In Advances in neural information processing systems (NeurIPS), 2016.
|
| 272 |
+
[40] Steven B Cohen. Design strategies and innovations in the medical expenditure panel survey. Medical care, pages III5–III12, 2003.
|
| 273 |
+
[41] Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In Proceedings of International Conference on Computer Vision (ICCV), 2015.
|
| 274 |
+
[42] Brian Hu Zhang, Blake Lemoine, and Margaret Mitchell. Mitigating unwanted biases with adversarial learning. In AAAI/ACM Conference on Artificial Intelligence, Ethics, and Society (AIES), 2018.
|
| 275 |
+
[43] Yahav Bechavod and Katrina Ligett. Penalizing unfairness in binary classification. Fairness, Accountability and Transparency in Machine Learning (FAT/ML), 2017.
|
| 276 |
+
[44] Mengnan Du, Ninghao Liu, and Xia Hu. Techniques for interpretable machine learning. Communications of the ACM, 2019.
|
md/train/5qsptDcsdEj/5qsptDcsdEj.md
ADDED
|
@@ -0,0 +1,356 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Continual World: A Robotic Benchmark For Continual Reinforcement Learning
|
| 2 |
+
|
| 3 |
+
Maciej Wołczyk⇤ Jagiellonian University Kraków, Poland maciej.wolczyk@doctoral.uj.edu.pl
|
| 4 |
+
|
| 5 |
+
Michał Zaj ˛ac⇤
|
| 6 |
+
Jagiellonian University
|
| 7 |
+
Kraków, Poland
|
| 8 |
+
emzajac@gmail.com
|
| 9 |
+
Razvan Pascanu
|
| 10 |
+
DeepMind
|
| 11 |
+
London, UK
|
| 12 |
+
razp@google.com
|
| 13 |
+
|
| 14 |
+
Łukasz Kucinski ´ Polish Academy of Sciences Warsaw, Poland lkucinski@impan.pl
|
| 15 |
+
|
| 16 |
+
# Piotr Miłos´
|
| 17 |
+
|
| 18 |
+
Polish Academy of Sciences,
|
| 19 |
+
University of Oxford,
|
| 20 |
+
deepsense.ai
|
| 21 |
+
Warsaw, Poland
|
| 22 |
+
pmilos@impan.pl
|
| 23 |
+
|
| 24 |
+
# Abstract
|
| 25 |
+
|
| 26 |
+
Continual learning (CL) — the ability to continuously learn, building on previously acquired knowledge — is a natural requirement for long-lived autonomous reinforcement learning (RL) agents. While building such agents, one needs to balance opposing desiderata, such as constraints on capacity and compute, the ability to not catastrophically forget, and to exhibit positive transfer on new tasks. Understanding the right trade-off is conceptually and computationally challenging, which we argue has led the community to overly focus on catastrophic forgetting. In response to these issues, we advocate for the need to prioritize forward transfer and propose Continual World, a benchmark consisting of realistic and meaningfully diverse robotic tasks built on top of Meta-World $\bar { \mathbb { B } } \bar { \underline { { 4 } } } \mathbb { I }$ as a testbed. Following an in-depth empirical evaluation of existing CL methods, we pinpoint their limitations and highlight unique algorithmic challenges in the RL setting. Our benchmark aims to provide a meaningful and computationally inexpensive challenge for the community and thus help better understand the performance of existing and future solutions. Information about the benchmark, including the open-source code, is available at https://sites.google.com/view/continualworld.
|
| 27 |
+
|
| 28 |
+
# 1 Introduction
|
| 29 |
+
|
| 30 |
+
Change is ubiquitous. Unsurprisingly, due to evolutionary pressure, humans can quickly adapt and creatively reuse their previous experiences. In contrast, although biologically inspired, deep learning (DL) models excel mostly in static domains that satisfy the i.i.d. assumption, as for example in image processing [28, 49, 10, 40], language modelling $| { \bar { \sqrt { 5 2 } } } , { \overline { { \mathbb { 1 1 } } } } | |$ or biological applications [47]. As the systems are scaled up and deployed in open-ended settings, such assumptions are increasingly questionable; imagine, for example, a robot that needs to adapt to the changing environment and the wear-and-tear of its hardware. Continual learning (CL), an area that explicitly focuses on such problems, has been gaining more attention recently. The progress in this area could offer enormous advantages for deep neural networks $\mathbb { \lVert 1 9 \rVert }$ and move the community closer to the long-term goal of building intelligent machines $\mathbb { \ m }$ .
|
| 31 |
+
|
| 32 |
+
Evaluation of CL methods is challenging. Due to the sequential nature of the problem that disallows parallel computation, evaluation tends to be expensive, which has biased the community to focus on toy tasks. These are mostly in the domain of supervised learning, often relying on MNIST. In this work, we expand on previous discussions on the topic [45, 16, 30, 46] and introduce a new benchmark, Continual World. The benchmark is built on realistic robotic manipulation tasks from Meta-World $\pmb { \Vert 5 4 \Vert }$ , benefiting from its diversity but also being computationally cheap. Moreover, we provide shorter auxiliary sequences, all of which enable a quick research cycle. On the conceptual level, a fundamental difficulty of evaluating CL algorithms comes from the different desiderata for a CL solution. These objectives are often opposing each other, forcing practitioners to explicitly or implicitly make trade-offs in their algorithmic design that are data-dependent. Continual World provides more meaningful relationships between tasks, answering recent calls $\mathbb { \lVert 1 9 \rVert }$ to increase attention on forward transfer.
|
| 33 |
+
|
| 34 |
+
Additionally, we provide an extensive evaluation of a spectrum of commonly used CL methods. It highlights that many approaches can deal relatively well with catastrophic forgetting at the expense of other desiderata, in particular forward transfer. This emphasizes our call for focusing on forward transfer and the need for more benchmarks that allow for common structure among the tasks.
|
| 35 |
+
|
| 36 |
+
The main contribution of this work is a CL benchmark that poses optimizing forward transfer as the central goal and shows that existing methods struggle to outperform simple baselines in terms of the forward transfer capability. We release the code2 both for the benchmark and 7 CL methods, which aims to provide the community helpful tools to better understand the performance of existing and future solutions. We encourage to visit the website3 of the project and participate in the Continual World Challenge.
|
| 37 |
+
|
| 38 |
+
# 2 Related work
|
| 39 |
+
|
| 40 |
+
The field of continual learning has grown considerably in the past years, with numerous works forming new subfields $\mathbb { \left[ \left. 2 3 \right] \right. }$ and finding novel applications $\lVert \overline { { 4 8 } } \rVert$ . For brevity, we focus only on the papers proposing RL-based benchmarks and point to selected surveys of the entire field. $\pmb { \mathbb { D } }$ provide a high-level overview of CL and argue that learning in a non-stationary setting is a fundamental problem for the development of AI, highlighting the frequent connections to neuroscience. On the other hand, $\mathbb { B } 3 \mathbb { B }$ focus on describing, evaluating, and relating CL methods to each other, providing a taxonomy of CL solutions that we use in this work.
|
| 41 |
+
|
| 42 |
+
The possibility of applying CL methods in reinforcement learning scenarios has been explored for a long time, see $[ [ 2 5 ] ]$ for a recent review. However, no benchmark has been widely accepted by the community so far, which is the aim of this work. Below we discuss various benchmarks and environments considered in the literature.
|
| 43 |
+
|
| 44 |
+
Supervised settings MNIST has been widely used to benchmark CL algorithms in two forms $ { \mathbb { \left[ \left[ 2 7 \right] \right] } }$ . In the permuted MNIST, the pixels of images are randomly permuted to form new tasks. In the split MNIST, tasks are defined by classifying non-overlapping subsets of classes, e.g. 0 vs. 1 followed by 2 vs. 3. A similar procedure has been applied to various image classification tasks like CIFAR-10, CIFAR-100, Omniglot or mini-ImageNet [2, 46, 5]. Another benchmark is CORe50 [31], a dataset for continuous object recognition. Recent work $\mathbb { \left. 2 9 \right. }$ proposes a benchmark based on language modeling. We find that many of these benchmarks are challenging and allow to measure forgetting. However, we argue they are not geared towards measuring forward transfer or for highlighting important RL-specific characteristics of the CL problem.
|
| 45 |
+
|
| 46 |
+
Atari The Atari 2600 suite $\textcircled { 8 }$ is a widely accepted RL benchmark. Sequences of different Atari games have been used for evaluating continual learning approaches [43, 27]. Using Atari can be computationally expensive, e.g., training a sequence of ten games typically requires 100M steps or more. More importantly, as $\mathbb { \lVert \boldsymbol { 4 3 } \rVert }$ notes, these games lack a meaningful overlap, limiting their relevance for studying transfers. Continuous control [32, 24] use continuous control tasks such as Humanoid or Walker2D. However, the considered sequences are short, and the range of experiments is limited. [34] use Meta-World tasks, similarly to us, for evaluations of their continual learning method, but the work is not aimed at building a benchmark. As such, it uses the Meta-World’s MT10 preset and does not provide an in-depth analysis of the tasks or other CL methods. Maze navigation A set of 3D maze environments is used in [43]. The map structure and objects that the agent needs to collect change between tasks. It is not clear, though, if the tasks provide enough diversity. [30] propose CRLMaze, 3D navigation scenarios for continual learning, which solely concentrate on changes of the visual aspects. StarCraft $\lVert \rVert \dot { \boldsymbol { \mathrm { ~ ‰ ~ } } }$ present a StarCraft campaign (11 tasks) to evaluate a high-level transfer of skills. The main drawback of this benchmark is excessive computational demand (often more than 1B frames). Minecraft $\mathbb { \left[ \left. 5 0 \right| \right. }$ propose simple scenarios within the Minecraft domain along with a hierarchical learning method. The authors phrase the problem as lifelong learning and do not use typical CL methods. Lifelong Hanabi $\lVert \rVert$ consider a multi-agent reinforcement learning setting based on Hanabi, a cooperative game requiring significant coordination between agents. On the other hand, we focus on the single agent setting with changing environment, which allows us to bypass the computational complexity needed to model interactions between agents and highlight issues connected to learning in a changing world. Causal World $\pmb { \mathbb { B } } \|$ propose an environment for robotic manipulation tasks which share causal structure. Although they investigate issues deeply connected to learning in a changing world, such as generalization to new tasks and curricula, they do not directly consider continual learning. Jelly Bean World $\mathbb { B } 9 \mathbb { I }$ provide interesting procedurally generated grid world environments. The suite is configurable and can host a non-stationary setting. It is unclear, however, if such environments reflect the characteristics of real-world challenges.
|
| 47 |
+
|
| 48 |
+
# 3 Continual learning background
|
| 49 |
+
|
| 50 |
+
Continual learning (CL) is an area of research which focuses on building algorithms capable of handling non-stationarity. They should be able to sequentially acquire new skills and solve novel tasks without forgetting the previous ones. Such systems are desired to accommodate over extended periods swiftly, which is often compared to human capabilities and alternatively dubbed as lifelong learning. CL is intimately related to multi-task learning, curriculum learning, meta-learning, with some key differences. Multi-task assumes constant access to all tasks, thus ignoring non-stationarity. Curriculum learning focuses on controlling the task ordering and often the learning time-span. Metalearning, a large field of its own, sets the objective to develop procedures that allow fast adaptation within a task distribution and usually ignores the issue of non-stationarity.
|
| 51 |
+
|
| 52 |
+
The CL objective is operationalized by the training and evaluation protocols. The former typically consists of a sequence of tasks (their boundaries might be implicit and smooth). The latter usually involves measuring catastrophic forgetting, forward transfer, and backward transfer. The learning system might also have constrained resources: computations, memory, size of neural networks, and the volume of data samples. A fundamental observation is that the above aspects and desiderata are conflicting. For example, given unlimited resources, one might mitigate forgetting simply by storing everything in memory and paying a high computational cost of rehearsing all samples from the past.
|
| 53 |
+
|
| 54 |
+

|
| 55 |
+
Figure 1: Left graph shows task PEG-UNPLUG-SIDEV1 and the right graph presents forward transfer from SHELF-PLACE-V1 to PEG-UNPLUG-SIDE-V1. In this case $F T = 0 . 1 0$ .
|
| 56 |
+
|
| 57 |
+
Another pair of objectives that are problematic for current methods are forgetting and forward transfer. For neural networks, existing methods propose to limit network plasticity. These alleviate the problem of forgetting, however, at the cost of choking the further learning process. We advocate for more nuanced approaches. Importantly, to make the transfer possible, our benchmark is composed of related tasks. We also put modest bounds on resources. This requirement is in line with realistic scenarios, demanding computationally efficient adaptation and inference. In a broader sense, we hope to address a data efficiency challenge, one of the most signif
|
| 58 |
+
|
| 59 |
+
icant limitations of the current deep (reinforcement) learning methods. We conjecture that forward transfer might greatly improve the situation and possibly one day enable us to create systems with human-level cognition capabilities, in line with similar thoughts expressed in [19].
|
| 60 |
+
|
| 61 |
+
# 4 Continual World benchmark
|
| 62 |
+
|
| 63 |
+
Continual World is a new benchmark designed to be a testbed for evaluating RL agents on the challenges advocated by the CL paradigm, described in Section $^ { 3 , }$ as well as highlighting the RLspecific algorithmic challenges for CL (see Section $\boxed { 6 . 1 }$ . As such it is aimed at being valuable to both the CL and RL communities. Continual World consists of realistic robotic manipulation tasks, aligned in a sequence to enable the study of forward transfer. It is designed to be challenging while computationally accessible.4 The benchmark is based on Meta-World, a suite of robotic tasks already established in the community. This enables easy comparisons with the related fields of multi-task and meta-learning reinforcement learning, potentially highlighting one benefit of CL framing, namely that of dealing with different reward scales as we discuss more in detail in Appendix $\mathrm { H } .$ Continual World comes with open-source code that allows for easy development and testing of new algorithms and provides implementations of 7 existing algorithms. Finally, it allows highlighting RL-specific challenges for the CL setting. We believe that our work is a step in the right direction towards reliable benchmarks of CL. We realize, however, that it will need to evolve as the field progresses. We leave a discussion on future directions and limitations to Section 4.4.
|
| 64 |
+
|
| 65 |
+
# 4.1 Metrics
|
| 66 |
+
|
| 67 |
+
To facilitate further discussion, we start with defining metrics. These are rather standard in the CL setting $\mathbb { H } 2 \mathbb { I }$ . Assume $p _ { i } ( t ) \in [ 0 , 1 ]$ to be the performance (success rate) of task $i$ at time $t$ . As a measure of performance, we take the average success rate of achieving a goal specified by a given task when using randomized initial conditions and stochastic policies (see also Section $4 . { \overset { - } { 3 } } ) . { \overset { 5 } { . } } { \overset { . } { } }$ Each task is trained for $\Delta = 1 M$ steps. The main sequence has $N = 2 0$ tasks and the total sample budget is $T = N \cdot \Delta = 2 0 M$ . The $i$ -th task is trained during the interval $t \in [ ( i - 1 ) \cdot \Delta , i \cdot \Delta ]$ . We report the following metrics:
|
| 68 |
+
|
| 69 |
+
Average performance. The average performance at time $t$ is (see Figure 3)
|
| 70 |
+
|
| 71 |
+
$$
|
| 72 |
+
\mathsf { P } ( t ) : = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } p _ { i } ( t ) .
|
| 73 |
+
$$
|
| 74 |
+
|
| 75 |
+
Its final value, $\mathrm { P } ( { \cal T } )$ , is a traditional metric used in the CL research. This is the objective we use for tuning hyperparameters. We have $\mathbf { P } ( t ) \in [ 0 , 1 ]$ for each $t$ .
|
| 76 |
+
|
| 77 |
+
Forward transfer. We measure the forward transfer of a method as the normalized area between its training curve and the training curve of the reference, single-task, experiment, see Figure $1 .$ Let $p _ { i } ^ { b } \in [ 0 , 1 ]$ be the reference performance6 then the forward transfer for the task $i$ , denoted by $\bar { \mathsf { F T } } _ { i }$ , is
|
| 78 |
+
|
| 79 |
+
$$
|
| 80 |
+
\mathsf { F T } _ { i } : = \frac { \mathsf { A U C } _ { i } - \mathsf { A U C } _ { i } ^ { b } } { 1 - \mathsf { A U C } _ { i } ^ { b } } , \quad \mathsf { A U C } _ { i } : = \frac { 1 } { \Delta } \int _ { ( i - 1 ) \cdot \Delta } ^ { i \cdot \Delta } p _ { i } ( t ) \mathrm { d } t , \quad \mathsf { A U C } _ { i } ^ { b } : = \frac { 1 } { \Delta } \int _ { 0 } ^ { \Delta } p _ { i } ^ { b } ( t ) \mathrm { d } t ,
|
| 81 |
+
$$
|
| 82 |
+
|
| 83 |
+
The average forward transfer for all tasks, FT, is defined as
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
\mathrm { F T } = \frac { 1 } { N } \sum _ { i = 1 } ^ { N } \mathrm { F T } _ { i } .
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
We note that $\mathrm { F T } _ { i } \leq 1$ and they might be negative. In our experiments, we also measure backward transfer. As it is negligible, see Appendix E.1.
|
| 90 |
+
|
| 91 |
+
Forgetting. For task $i$ , we measure the decrease of performance after ending its training, i.e.
|
| 92 |
+
|
| 93 |
+
$$
|
| 94 |
+
F _ { i } = p _ { i } ( i \cdot \Delta \bar { \Delta } ) - p _ { i } ( T ) .
|
| 95 |
+
$$
|
| 96 |
+
|
| 97 |
+
Similarly to FT e report $\begin{array} { r } { F = { \frac { 1 } { N } } \sum _ { i = 1 } ^ { N } F _ { i } } \end{array}$ . We have $F _ { i } \leq 1$ for any $i$ and consequently $\mathrm { F T } \leq 1$ . It $F _ { i }$ are negative, which would indicate backward transfer. We do not observe this in practice, see Appendix E.1.
|
| 98 |
+
|
| 99 |
+
# 4.2 Continual World tasks
|
| 100 |
+
|
| 101 |
+
This section describes the composition of Continual World benchmark and the rationale behind its design. We decided to base on Meta-World [54], a fairly new but already established robotic benchmark for multi-task and meta reinforcement learning. From a practical standpoint, Meta-World utilizes the open-source MuJoCo physics engine [51], prized for speed and accuracy. Meta-World provides 50 distinct manipulation tasks with everyday objects using a simulated robotic Sawyer arm. Although the tasks vary significantly, the structure and semantics of observation and action spaces remain the same, allowing for transfer between tasks. Each observation is a 12-dimensional vector containing $( x , y , z )$ coordinates of the robot’s gripper and objects of interest in the scene. The 4-dimensional action space describes the direction of the arm’s movement in the next step and the gripper actuator delta. Reward functions are shaped to make each task solvable. In evaluations, we use a binary success metric based on the distance of the task-relevant object to its goal position. This metric is interpretable and enables comparisons between tasks. For more details about the rewards and evaluation metrics, see [54, Section 4.2, Section 4.3].
|
| 102 |
+
|
| 103 |
+
CW20, CW10, triplets sequences The core of our benchmark is CW20 sequence. Out of 50 tasks defined in Meta-World, we picked those that are not too easy or too hard in the assumed sample budget $\Delta = 1 M$ . Aiming to strike a balance between the difficulty of the benchmark and computational requirements, we selected 10 tasks. The tasks and their ordering were based on the transfer matrix (see the next paragraph), so that there is a high variation of forward transfers (both in the whole list and locally). We refer to these ordered tasks as CW10, and CW20 is CW10 repeated twice. We recommend using CW20 for final evaluation; however, CW10 is already very informative in most cases. Due to brevity constraints, we present an ablation with an alternative ordering of the tasks and a longer sequence of 30 tasks in Appendix $\mathbf { G } ,$ however, these experiments do not alter our findings. Additionally, to facilitate a fast development cycle, we propose a set of triplets, sequences of three tasks which exhibit interesting learning dynamics.
|
| 104 |
+
|
| 105 |
+
The CW10 sequence is: HAMMER-V1, PUSH-WALL-V1, FAUCET-CLOSE-V1, PUSH-BACK-V1, STICK-PULLV1, HANDLE-PRESS-SIDE-V1, PUSH-V1, SHELF-PLACE-V1, WINDOW-CLOSE-V1, PEG-UNPLUG-SIDE-V1.
|
| 106 |
+
|
| 107 |
+
Transfer matrix Generally, the relationship between tasks and its impact on learning dynamics of neural networks is hard to quantify, where semantic similarity does not typically lead to transfer $\textcircled { 1 1 4 } \textcircled { 1 }$ . To this end, we consider a minimal setting, in which we finetune on task $t _ { 2 }$ a model pretrained on $t _ { 1 }$ , using the same protocol as the benchmark (e.g., different output heads, see Section $\boxed { 4 . 3 }$ . This provides neural network-centric insight into the relationship between tasks summarized in Figure $\bar { \bigtriangledown } ,$ and allows us to measure low-level transfer between tasks, i.e., the ability of the model to reuse previously acquired features. See Appendix D for more results and extended discussion.
|
| 108 |
+
|
| 109 |
+

|
| 110 |
+
Figure 2: Transfer matrix, see Section $4 . 2 \cdot$ Each cell represents the forward transfer from the first task to the second one. We shaded the cells for which 0 belongs to their $9 0 \%$ confidence interval.
|
| 111 |
+
|
| 112 |
+
Notice that there are only a few negative forward transfer cases, and those are of a rather small magnitude (perhaps unsurprisingly, as the tasks are related). There are also visible patterns in the matrix. For instance, some tasks such as PEGUNPLUG-SIDE-V1 or PUSH-BACK-V1 benefit from a relatively large forward transfer, (almost) irrespective of the first task. Furthermore, the average forward transfer given the second task (columns) is more variable than the corresponding quantity for the first task (rows).
|
| 113 |
+
|
| 114 |
+
Note that some transfers on the diagonal (i.e., between the same tasks) are relatively small. We made a detailed analysis of possible reasons, which revealed that the biggest negative impact is due to the replay buffer resets, which seems, however, unavoidable for off-diagonal cases, see Section $6 . 1$ for details.
|
| 115 |
+
|
| 116 |
+
Importantly, we use this matrix to estimate what level of forward transfer a good CL method
|
| 117 |
+
|
| 118 |
+
should be able to achieve. We expect that a model which is able to remember all meaningful aspects of previously seen tasks would transfer at least as well as if one were just fine-tuning after learning the best choice between the previous tasks. For a sequence $t _ { 1 } , \ldots , t _ { N }$ we set the reference forward transfer, RT, to be
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\mathrm { R T } : = \frac { 1 } { N } \sum _ { i = 2 } ^ { N } \operatorname* { m a x } _ { j < i } \mathrm { F T } ( t _ { j } , t _ { i } ) ,
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
where $\mathrm { F T } ( t _ { j } , t _ { i } )$ is the transfer matrix value for $t _ { j } , t _ { i }$ . For the CW20 sequence, the value is $\mathrm { R T } = 0 . 4 6$ Note that a model can do better that this by composing knowledge from multiple previous tasks.
|
| 125 |
+
|
| 126 |
+
# 4.3 Training and evaluation details
|
| 127 |
+
|
| 128 |
+
We adapt the standard Meta-World setting to CL needs. First, we use separate policy heads for each task, instead of the original one-hot task ID inputs (we provide ablation experiments for this choice in Appendix $\mathbf { G } )$ . Second, in each episode, we randomize the positions of objects in the scene to encourage learning more robust policies. We use an MLP network with 4 layers of 256 neurons.
|
| 129 |
+
|
| 130 |
+
For training, we use soft actor-critic (SAC) [17], a popular and efficient RL method for continuous domains. SAC is an off-policy algorithm using replay buffer, which is an important aspect for CL, particularly for methods relying on rehearsing old trajectories. SAC is based on the so-called maximum entropy principle; this results in policies which explore better and are more robust to changes in the environment dynamics. Both of these qualities might be beneficial in CL.
|
| 131 |
+
|
| 132 |
+
We note that the size of the neural network and optimization details of the SAC algorithm (like batch size) put constraints on "the amount of compute". Intentionally, these are rather modest, which is in line with CL desiderata, see Section $3 .$ Similarly, we limit the number of timesteps to $1 M$ , which is a humble amount for modern-day deep reinforcement learning. We picked tasks to be challenging but not impossible within this budget. We note that training in the RL setting tends to be less stable than in the supervised one. We recommend using multiple seeds, in our experiments, we typically used 20 and calculate confidence intervals; we used the bootstrap method. We choose hyperparameters that maximize average performance $\mathbb { \underline { { \left( 1 \right) } } }$ . In our experiments, we tune common parameters for SAC and the method-specific hyperparameters separately. All details of the training and evaluation setup are presented in Appendix A.
|
| 133 |
+
|
| 134 |
+
# 4.4 Limitations of Continual World
|
| 135 |
+
|
| 136 |
+
As any benchmark, we are fully aware that ours will not cover the entire spectrum of problems that one might be interested in. Here we summarize a few limitations that we hope to overcome in a future instantiation of this benchmark:
|
| 137 |
+
|
| 138 |
+
Input space We use a small 12 dimensional observation space. This is key to achieve modest computational demand. However, richer inputs could allow for potentially more interesting forms of transfer (e.g., based on visual similarity of objects) and would allow inferring the task from the observation, which is currently impossible.
|
| 139 |
+
|
| 140 |
+
Reliance on SAC We use the SAC algorithm $\textcircled { 1 1 7 }$ , which is considered a standard choice for continuous robotic tasks. However, there is a potential risk of overfitting to the particularities of this algorithm and exploring alternative RL algorithms is important.
|
| 141 |
+
|
| 142 |
+
Task boundaries We rely on task boundaries. One can rely on task inference mechanisms (e.g. [35, 41]) to resolve this limitation, though we acknowledge the importance to extend the benchmark towards allowing and testing for task inference capabilities. Also, testing for algorithms dealing with continuous distributional drift is not possible in the current format.
|
| 143 |
+
|
| 144 |
+
Output heads We rely on using a separate head for each new task, similar to many works on continual learning. We opt for this variant based on its simplicity and better performance than using one-hot encoding to indicate a task. We believe that the lack of semantics of the one-hot encoding would further impede transfer, as the relationship between tasks can not be inferred. We carry ablation studies with using one-hot encoding as an input and a single head architecture, a setting that is already compatible with our benchmark. We regard this aspect as an important future work, and in particular, we are exploring alternative encoding of input to make this choice more natural. A coherent domain, like Continual World, provides a unique opportunity to exploit a consistent output layer as its semantics does not change between tasks.
|
| 145 |
+
|
| 146 |
+

|
| 147 |
+
Figure 3: Training curves for selected CL methods and multi-task. The upper left panel shows the performance on the first task for a subset of methods throughout the whole training. Note that due to the use of different output heads, we do not see a second bump when revisiting this task at time $1 0 M$ . The upper right panel shows the performance on the current task being trained for EWC compared to a reference (a model learning only that task from scratch). The bottom plot shows the average performance. Solid lines show the performance of the model training on the first 10 tasks (where 1 means being able to solve all of them). Dashed lines show the performance of learning the same tasks in the second half of the benchmark. Note that dashed lower are below solid ones, indicating lower performance on the second pass, even if the agent has already previously learned the tasks and has access to relevant features.
|
| 148 |
+
|
| 149 |
+
The difficulty and number of tasks The number of tasks is relatively small. CW20, the main sequence we use, consists of only 10 different tasks, which are then repeated. We believe the repetition of tasks is important for a CL benchmark, leading to interesting observations. We check also that results are quantitatively similar on a sequence of 30 tasks, see Appendix G. However, longer sequences, potentially unbounded, are needed to understand the various limitations of existing algorithms. For example, the importance of graceful forgetting or dealing with systems that run out of capacity, a scenario where there is no multi-task solution for the sequence of observed tasks. This is particularly of interest for methods such as PackNet $\pmb { \mathbb { B 3 } }$ . Additionally, we provide the number of tasks in advance. Dealing with an unknown number of tasks might raise further interesting questions. Finally, in future iterations of the benchmark, it is important to consider more complex tasks or more complex relationships between tasks to remain a challenge to existing methods. Our goal was to provide a benchmark that is approachable by existing methods, as not to stifle progress.
|
| 150 |
+
|
| 151 |
+
Low-level transfer We focus on low-level transfers via neural network features and weights. As such, we do not explicitly explore the ability of the learning process to exploit the compositionality of behavior or to rely on a more interesting semantic level. While we believe such research is crucial, we argue that solving low-level transfer is equally important and might be a prerequisite. So, for now, it is beyond the scope of this work, though future iterations of the benchmark could contain such scenarios.
|
| 152 |
+
|
| 153 |
+
# 5 Methods
|
| 154 |
+
|
| 155 |
+
We now sketch 7 CL methods evaluated on our benchmark. Some of them were developed for RL, while others were meant for the supervised learning context and required non-trivial adaptation. We aimed to cover different families of methods; following $\mathbb { \lVert \rVert 3 \rVert }$ , we consider three classes: regularizationbased, parameter isolation and replay methods. An extended description and discussion of these methods are provided in Appendix B.
|
| 156 |
+
|
| 157 |
+
Regularization-based Methods This family builds on the observation that one can reduce forgetting by protecting parameters that are important for the previous tasks. The most basic approach often dubbed L2 $ { \mathbb { \left[ \left[ 2 7 \right] \right] } }$ simply adds a $L _ { 2 }$ penalty, which regularizes the network not to stray away from the previously learned weights. In this approach, each parameter is equally important. Elastic Weight Consolidation (EWC) $\overline { { \mathbb { R } \mathbb { Z } \mathbb { I } } }$ uses the Fisher information matrix to approximate the importance of each weight. Memory-Aware Synapses (MAS) [4] also utilizes a weighted penalty, but the importance is obtained by approximating the impact each parameter has on the output of the network. Variational Continual Learning (VCL), follows a similar path but uses variational inference to minimize the Kullback-Leibler divergence between the current distribution of parameters (posterior) and the distribution for the previous tasks (prior).
|
| 158 |
+
|
| 159 |
+
Parameter Isolation Methods This family (also called modularity-based) forbids any changes to parameters that are important for the previous tasks. It may be considered as a “hard” equivalent of regularization-based methods. PackNet [33] “packs” multiple tasks into a single network by iteratively pruning, freezing, and retraining parts of the network at task change. PackNet is closely related to progressive neural networks [43], developed in the RL context.
|
| 160 |
+
|
| 161 |
+
Replay Methods Methods of this family keep some samples from the previous tasks and use them for training or as constraints to reduce forgetting. We use a Perfect Memory baseline, a modification of our setting which remembers all the samples from the past (i.e., without resetting the buffer at the task change). We also implemented Averaged Gradient Episodic Memory (A-GEM) [12], which projects gradients from new samples as to not interfere with previous tasks. We find that A-GEM does not perform well on our benchmark.
|
| 162 |
+
|
| 163 |
+
Multi-task learning In multi-task learning, a field closely related to CL, tasks are trained simultaneously. By its design, it does not suffer from forgetting, however, it is considered to be hard as multiple tasks “compete for the attention of a single learning system”, see [21, 44]. We find that using reward normalization as in PopArt $\left[ \left[ 2 1 \right] \right]$ is essential to achieve good performance. See Appendix H.
|
| 164 |
+
|
| 165 |
+
# 6 Experiments
|
| 166 |
+
|
| 167 |
+
Now we present empirical results; these are evaluations of a set of 7 representative CL methods (as described in Section $\textcircled{5}$ on our Continual World benchmark. We focus on forgetting and transfers while keeping fixed constraints on computation, memory, number of samples, and neural network architecture. Our main empirical contributions are experiments on the long CW20 sequence and following high-level conclusions. For a summary see Table 1, Figure 3 and for an extensive discussion, we refer to Appendix $\boxed { \mathrm { E } }$ (including results for the shorter sequence, CW10). In Appendix G we provide various ablations and detailed analysis of sensitivity to the CL-specific hyperparameters.
|
| 168 |
+
|
| 169 |
+
Performance The performance (success rate) averaged over tasks (eq. $\mathbb { \underline { { ( 1 ) } } }$ ) is a typical metric for the CL setting. PackNet seems to outperform other methods, approaching 0.8 from the maximum of 1.0, outperforming multi-task solutions which might struggle with different reward scales, a problem elegantly avoided in the CL framing. Other methods perform considerably worse. A-GEM and Perfect Memory struggle. We further discuss possible reasons in Sectio n 6.1.
|
| 170 |
+
|
| 171 |
+
Table 1: Results on CW20, for CL methods and multi-task training. Metrics are defined in Section 4.1, RT is eq. $( 4 )$ . We used 20 seeds and provide $90 \%$ confidence intervals.
|
| 172 |
+
|
| 173 |
+
<table><tr><td>method</td><td>performance</td><td>forgetting</td><td>f. transfer</td></tr><tr><td>Fine-tuning</td><td>0.05 [0.05,0.06]</td><td>0.73 [0.72, 0.75]</td><td>0.20 [0.17, 0.23]</td></tr><tr><td>L2</td><td>0.43 [0.39, 0.47]</td><td>0.02 [0.00, 0.03]</td><td>-0.71 [-0.87, -0.57]</td></tr><tr><td>EWC</td><td>0.60 [0.57, 0.64]</td><td>0.02 [-0.00, 0.05]</td><td>-0.17 [-0.24, -0.11]</td></tr><tr><td>MAS</td><td>0.51 [0.49, 0.53]</td><td>0.00 [-0.01,0.02]</td><td>-0.52 [-0.59,-0.47]</td></tr><tr><td>VCL</td><td>0.48 [0.46,0.50]</td><td>0.01 [-0.01, 0.02]</td><td>-0.49 [-0.57,-0.42]</td></tr><tr><td>PackNet</td><td>0.80 [0.79, 0.82]</td><td>0.00 [-0.01,0.01]</td><td>0.19 [0.15, 0.23]</td></tr><tr><td>Perfect Memory</td><td>0.12 [0.09, 0.15]</td><td>0.07 [0.05,0.10]</td><td>-1.34 [-1.42, -1.27]</td></tr><tr><td>A-GEM</td><td>0.07 [0.06,0.08]</td><td>0.71 [0.70,0.73]</td><td>0.13 [0.10,0.16]</td></tr><tr><td>MT</td><td>0.51 [0.48, 0.53]</td><td></td><td></td></tr><tr><td>MT (PopArt)</td><td>0.65 [0.63, 0.67]</td><td></td><td></td></tr><tr><td>RT</td><td></td><td></td><td>0.46</td></tr></table>
|
| 174 |
+
|
| 175 |
+
Forgetting We observe that
|
| 176 |
+
|
| 177 |
+
most CL methods are usually efficient in mitigating forgetting. However, we did not notice any boost when revisiting a task (see Figure $3 )$ . Even if a different output head was employed, relearning the internal representation should have had an impact unless it changed considerably when revisiting the task. Additionally, we found A-GEM difficult to tune; consequently, with the best hyperparameter settings, it is relatively similar to the baseline fine-tuning method (see details in Appendix $\bigtriangledown$
|
| 178 |
+
|
| 179 |
+
Transfers For all methods, forward transfer for the second ten tasks (and the same tasks are revisited) drops compared to the first ten tasks. This is in stark contrast to forgetting, which seems to be well under control. Among all methods, only fine-tuning and PackNet are able to achieve positive forward transfer (0.20 and 0.19, resp.) as well as on the first (0.32 and 0.21, resp.) and the second (0.08 and 0.17, resp.) half of tasks. However, these are considerably smaller than $\mathrm { R T } = 0 . 4 6$ , which in principle can even be exceeded, and which should be reached by a model that remembers all meaningful aspects of previously seen tasks, see $\textcircled{4}$ . These results paint a fairly grim picture: we would expect improvement, rather than deterioration in performance, when revisiting previously seen tasks. There could be multiple reasons for this state of affairs. It could be attributed to the loss of plasticity, similar to the effect observed in $\textcircled { 6 }$ . Another reason could be related to the interference between CL mechanisms or setting and RL, for instance, hindering exploration. We did not observe any substantial cases of backward transfer, even though the benchmark is well suited to study this question due to the revisiting of tasks. See Appendix E.1.
|
| 180 |
+
|
| 181 |
+

|
| 182 |
+
Figure 4: How forgetting impacts the forward transfer. Two different triplets of tasks learnt in sequence. An ideal agent learning on a sequence $A B C$ should have at least as good performance on task $C$ as an agent which just learns $A C$ . In reality, an interfering task $B$ reduces this transfer, even when continual learning approaches are used.
|
| 183 |
+
|
| 184 |
+
Triplets experiments We illustrate how forgetting and forward transfer interact with each other in a simpler setting of three task sequences, see Figure $\boxed { \ 4 }$ and Appendix $\boxed { \mathrm { F } }$ We focus on sequences of tasks $A $ $B C$ , where $A \ \ C$ has significant positive forward transfer and $B C$ has a smaller or even negative transfer. An efficient CL agent should be able to use information from $A$ to get good performance on $C$ . However, interference introduced by $B$ reduces the fi
|
| 185 |
+
|
| 186 |
+
nal forward transfer (see Figure $^ { 4 ) }$ . The drive for reducing forgetting in CL agents has been primarily to perform well on previous tasks when we revisit them. With this example, we argue that an equally important reason to improve the memory of CL agents is to efficiently use past experiences to learn faster on new tasks. Currently, the tested CL methods often are not able to outperform the forgetful fine-tuning baseline. Observe that even the modularity-based PackNet approach struggles with this task. This possibly indicates that using the activation mask from task $B$ is enough to deteriorate the performance.
|
| 187 |
+
|
| 188 |
+
PackNet PackNet stands out in our evaluations. We conjecture that developing related methods might be a promising research direction. Besides further increasing performance, one could mitigate the limitations of PackNet. PackNet relies on knowing task identity during evaluation. While this assumption is met in our benchmark, it is an interesting topic for future research to develop methods that cope without task identity. Another nuisance is that PackNet assigns some fixed fraction of parameters to a task. This necessitates knowledge of the length of the sequence in advance. Additionally, when the second ten tasks of CW20 start, PackNet performance degrades, showing its potentially inefficient use of capacity and past knowledge, given that the second ten tasks are identical with the first ten and hence no additional capacity is needed. In a broader context, we speculate that parameter isolation methods might be a promising direction towards better CL methods.
|
| 189 |
+
|
| 190 |
+
Resources usage In practical applications it is important to consider resources usage. All tested methods have relatively small overheads. For example, PackNet needs only $1 5 \%$ more time than the baseline fine-tuning and it requires $5 0 \%$ more neural network parameters (which is negligible when small networks like ours). See Appendix $\underline { { \mathbf { B . 4 } } }$ for details concerning other methods.
|
| 191 |
+
|
| 192 |
+
Other observations In stark contrast with the supervised learning setting, we found that replay based methods (Perfect Memory and A-GEM) suffer from poor performance. This is even though we allow for a generous replay, which could store the whole experience. Explaining and amending this situation is, in our view, an important research question. We conjecture that this happens due to the regularization of the critic network (which was unavoidable for these methods). We found multi-task learning attaining lower scores than PackNet, the best CL method and comparable to the second one, EWC. We think this suggests interesting research directions for multi-task learning.
|
| 193 |
+
|
| 194 |
+
# 6.1 RL-Related Challenges
|
| 195 |
+
|
| 196 |
+
Reinforcement learning brings a set of issues not present in the supervised learning setting, e.g., exploration, varying reward scales, and stochasticity of environments. We argue that it is imperative to have a reliable benchmark to assess the efficiency of CL algorithms with respect to these problems. We find that some current methods are not well adjusted to the RL setting and require non-trivial conceptual considerations and careful tuning of hyperparameters, see details in Appendix C.
|
| 197 |
+
|
| 198 |
+
An important design choice is whether or not to regularize the critic in the actor-critic framework (e.g. in SAC). We find it beneficial to focus on reducing forgetting in the actor while allowing the critic to freely adapt to the current task (note that critic is used only in training of the current task), similar to $\dot { \lVert \ 4 6 \rVert }$ . On the other hand, a forgetful critic is controversial. This can be sharply seen when the same task is repeated and the critic needs to learn from scratch. Additionally, not all methods can be trivially adapted to the ’actor-only regularization’ setting, as for example replay based methods. In Appendix $\mathrm { \Delta C }$ we examine these issues empirically, by showing experiments with critic regularization for EWC.
|
| 199 |
+
|
| 200 |
+
Another aspect is the exploration and its non-trivial impact on transfers. As it was observed, transfers from a given task to the same one are sometimes poor. We show in Appendix $\textstyle \boxed { \mathrm { D . 1 } }$ that this results from the fact that at the task change the replay buffer is emptied and SAC collects new samples from scratch, usually by using the uniform policy. Learning on these random samples reduces performance on the current task and thus the forward transfer. Experimentally, we find that not resetting the buffer or using the current policy for exploration improves the transfer on the diagonal.
|
| 201 |
+
|
| 202 |
+
# 7 Conclusions and Future Work
|
| 203 |
+
|
| 204 |
+
In this work, we present Continual World, a continual reinforcement learning benchmark, and an in-depth analysis of how existing methods perform on it. The benchmark is aimed at facilitating and standardizing the CL system evaluation, and as such, is released with code, including implementation of 7 representative CL algorithms. We argue for more attention to forward transfer and the interaction between forgetting and transfer, as many existing methods seem to sacrifice transfer to alleviate forgetting. In our opinion, this should not be the aim of CL, and we need to strike a different balance between these objectives.
|
| 205 |
+
|
| 206 |
+
We made several observations, both conceptual and empirical, which open future research directions. In particular, we conjecture that parameter isolation methods are a promising direction. Further, we identified a set of critical issues at the intersection of RL and CL. Resolving critic regularization and efficient use of multi-task replays seem to be the most pressing ones. Our benchmark highlights some challenges, which in our view are relevant and tangible now. In the long horizon, achieving high-level transfers, removing task boundaries, and scaling up are among significant goals for future editions of Continual World. Our work is foundational research and does not lead to any direct negative applications.
|
| 207 |
+
|
| 208 |
+
# Acknowledgments and Disclosure of Funding
|
| 209 |
+
|
| 210 |
+
We would like to thank Stanisław Jastrz˛ebski for stimulating talks and help while preparing the manuscript. The work of PM was supported by the Polish National Science Center grant UMO2017/26/E/ST6/00622. The work of MW was funded by Foundation for Polish Science (grant no POIR.04.04.00-00-14DE/18-00 carried out within the Team-Net program co-financed by the European Union under the European Regional Development Fund. This research was supported by the PL-Grid Infrastructure. Our experiments were managed using https://neptune.ai. We would like to thank the Neptune team for providing us access to the team version and technical support.
|
| 211 |
+
|
| 212 |
+
# References
|
| 213 |
+
|
| 214 |
+
[1] Joshua Achiam. Spinning Up in Deep Reinforcement Learning. 2018.
|
| 215 |
+
|
| 216 |
+
[2] Tameem Adel, Han Zhao, and Richard E. Turner. Continual learning with adaptive weights (CLAW). In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020.
|
| 217 |
+
|
| 218 |
+
[3] Ossama Ahmed, Frederik Träuble, Anirudh Goyal, Alexander Neitz, Manuel Wuthrich, Yoshua Bengio, Bernhard Schölkopf, and Stefan Bauer. Causalworld: A robotic manipulation benchmark for causal structure and transfer learning. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net, 2021.
|
| 219 |
+
|
| 220 |
+
[4] Rahaf Aljundi, Francesca Babiloni, Mohamed Elhoseiny, Marcus Rohrbach, and Tinne Tuytelaars. Memory aware synapses: Learning what (not) to forget. In Vittorio Ferrari, Martial Hebert, Cristian Sminchisescu, and Yair Weiss, editors, Computer Vision - ECCV 2018 - 15th European Conference, Munich, Germany, September 8-14, 2018, Proceedings, Part III, volume 11207 of Lecture Notes in Computer Science, pages 144–161. Springer, 2018.
|
| 221 |
+
|
| 222 |
+
[5] Rahaf Aljundi, Eugene Belilovsky, Tinne Tuytelaars, Laurent Charlin, Massimo Caccia, Min Lin, and Lucas Page-Caccia. Online continual learning with maximal interfered retrieval. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d’Alché-Buc, Emily B. Fox, and Roman Garnett, editors, Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 11849–11860, 2019.
|
| 223 |
+
|
| 224 |
+
[6] Jordan T. Ash and Ryan P. Adams. On warm-starting neural network training. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
|
| 225 |
+
|
| 226 |
+
[7] Lei Jimmy Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. Layer normalization. CoRR, abs/1607.06450, 2016.
|
| 227 |
+
|
| 228 |
+
[8] M. G. Bellemare, Y. Naddaf, J. Veness, and M. Bowling. The arcade learning environment: An evaluation platform for general agents. Journal of Artificial Intelligence Research, 47:253–279, jun 2013.
|
| 229 |
+
|
| 230 |
+
[9] Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural network. In Francis R. Bach and David M. Blei, editors, Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, volume 37 of JMLR Workshop and Conference Proceedings, pages 1613–1622. JMLR.org, 2015.
|
| 231 |
+
|
| 232 |
+
[10] Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale GAN training for high fidelity natural image synthesis. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019.
|
| 233 |
+
|
| 234 |
+
[11] Tom B. Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared 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 M. Ziegler, Jeffrey Wu, Clemens Winter, Christopher 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 Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
|
| 235 |
+
|
| 236 |
+
[12] Arslan Chaudhry, Marc’Aurelio Ranzato, Marcus Rohrbach, and Mohamed Elhoseiny. Efficient lifelong learning with A-GEM. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019.
|
| 237 |
+
|
| 238 |
+
[13] Matthias De Lange, Rahaf Aljundi, Marc Masana, Sarah Parisot, Xu Jia, Ales Leonardis, Gregory Slabaugh, and Tinne Tuytelaars. A continual learning survey: Defying forgetting in classification tasks. arXiv preprint arXiv:1909.08383, 2019.
|
| 239 |
+
|
| 240 |
+
[14] Yunshu Du, Wojciech M. Czarnecki, Siddhant M. Jayakumar, Razvan Pascanu, and Balaji Lakshminarayanan. Adapting auxiliary losses using gradient similarity. CoRR, abs/1812.02224, 2018.
|
| 241 |
+
|
| 242 |
+
[15] Bradley Efron and Robert J Tibshirani. An introduction to the bootstrap. CRC press, 1994.
|
| 243 |
+
|
| 244 |
+
[16] Sebastian Farquhar and Yarin Gal. Towards robust evaluations of continual learning. CoRR, abs/1805.09733, 2018.
|
| 245 |
+
|
| 246 |
+
[17] Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In Jennifer G. Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholmsmässan, Stockholm, Sweden, July 10-15, 2018, volume 80 of Proceedings of Machine Learning Research, pages 1856–1865. PMLR, 2018.
|
| 247 |
+
|
| 248 |
+
[18] Tuomas Haarnoja, Aurick Zhou, Kristian Hartikainen, George Tucker, Sehoon Ha, Jie Tan, Vikash Kumar, Henry Zhu, Abhishek Gupta, Pieter Abbeel, and Sergey Levine. Soft actor-critic algorithms and applications. CoRR, abs/1812.05905, 2018.
|
| 249 |
+
|
| 250 |
+
[19] Raia Hadsell, Dushyant Rao, Andrei A. Rusu, and Razvan Pascanu. Embracing change: Continual learning in deep neural networks. Trends in Cognitive Sciences, 24(12):1028 – 1040, 2020.
|
| 251 |
+
|
| 252 |
+
[20] Demis Hassabis, Dharshan Kumaran, Christopher Summerfield, and Matthew Botvinick. Neuroscience-inspired artificial intelligence. Neuron, 95(2):245 – 258, 2017.
|
| 253 |
+
|
| 254 |
+
[21] Matteo Hessel, Hubert Soyer, Lasse Espeholt, Wojciech Czarnecki, Simon Schmitt, and Hado van Hasselt. Multi-task deep reinforcement learning with popart. In The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019, The Thirty-First Innovative Applications of Artificial Intelligence Conference, IAAI 2019, The Ninth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2019, Honolulu, Hawaii, USA, January 27 - February 1, 2019, pages 3796–3803. AAAI Press, 2019.
|
| 255 |
+
|
| 256 |
+
[22] Ferenc Huszár. Note on the quadratic penalties in elastic weight consolidation. Proceedings of the National Academy of Sciences, page 201717042, 2018.
|
| 257 |
+
|
| 258 |
+
[23] Khurram Javed and Martha White. Meta-learning representations for continual learning. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d’Alché-Buc, Emily B. Fox, and Roman Garnett, editors, Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 1818–1828, 2019.
|
| 259 |
+
|
| 260 |
+
[24] Christos Kaplanis, Murray Shanahan, and Claudia Clopath. Policy consolidation for continual reinforcement learning. 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 3242–3251. PMLR, 09–15 Jun 2019.
|
| 261 |
+
|
| 262 |
+
[25] Khimya Khetarpal, Matthew Riemer, Irina Rish, and Doina Precup. Towards continual reinforcement learning: A review and perspectives, 2020.
|
| 263 |
+
|
| 264 |
+
[26] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In Yoshua Bengio and Yann LeCun, editors, 3rd International Conference on Learning Representations, ICLR 2015, San Diego, CA, USA, May 7-9, 2015, Conference Track Proceedings, 2015.
|
| 265 |
+
|
| 266 |
+
[27] James Kirkpatrick, Razvan Pascanu, Neil C. Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A. Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, Demis Hassabis, Claudia Clopath, Dharshan Kumaran, and Raia Hadsell. Overcoming catastrophic forgetting in neural networks. CoRR, abs/1612.00796, 2016.
|
| 267 |
+
|
| 268 |
+
[28] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E. Hinton. Imagenet classification with deep convolutional neural networks. In Peter L. Bartlett, Fernando C. N. Pereira, Christopher J. C. Burges, Léon Bottou, and Kilian Q. Weinberger, editors, Advances in Neural Information Processing Systems 25: 26th Annual Conference on Neural Information Processing Systems 2012. Proceedings of a meeting held December 3-6, 2012, Lake Tahoe, Nevada, United States, pages 1106–1114, 2012.
|
| 269 |
+
|
| 270 |
+
[29] Germán Kruszewski, Ionut-Teodor Sorodoc, and Tomas Mikolov. Evaluating online continual learning with calm, 2021.
|
| 271 |
+
|
| 272 |
+
[30] Vincenzo Lomonaco, Karan Desai, Eugenio Culurciello, and Davide Maltoni. Continual reinforcement learning in 3d non-stationary environments. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR Workshops 2020, Seattle, WA, USA, June 14-19, 2020, pages 999–1008. IEEE, 2020.
|
| 273 |
+
|
| 274 |
+
[31] Vincenzo Lomonaco and Davide Maltoni. Core50: a new dataset and benchmark for continuous object recognition. In 1st Annual Conference on Robot Learning, CoRL 2017, Mountain View, California, USA, November 13-15, 2017, Proceedings, volume 78 of Proceedings of Machine Learning Research, pages 17–26. PMLR, 2017.
|
| 275 |
+
|
| 276 |
+
[32] Kevin Lu, Igor Mordatch, and Pieter Abbeel. Adaptive online planning for continual lifelong learning. CoRR, abs/1912.01188, 2019.
|
| 277 |
+
|
| 278 |
+
[33] Arun Mallya and Svetlana Lazebnik. Packnet: Adding multiple tasks to a single network by iterative pruning. In 2018 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2018, Salt Lake City, UT, USA, June 18-22, 2018, pages 7765–7773. IEEE Computer Society, 2018.
|
| 279 |
+
|
| 280 |
+
[34] Jorge A. Mendez, Boyu Wang, and Eric Eaton. Lifelong policy gradient learning of factored policies for faster training without forgetting. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
|
| 281 |
+
|
| 282 |
+
[35] Kieran Milan, Joel Veness, James Kirkpatrick, Michael H. Bowling, Anna Koop, and Demis Hassabis. The forget-me-not process. In Daniel D. Lee, Masashi Sugiyama, Ulrike von Luxburg, Isabelle Guyon, and Roman Garnett, editors, Advances in Neural Information Processing Systems 29: Annual Conference on Neural Information Processing Systems 2016, December 5-10, 2016, Barcelona, Spain, pages 3702–3710, 2016.
|
| 283 |
+
|
| 284 |
+
[36] Hadi Nekoei, Akilesh Badrinaaraayanan, Aaron C. Courville, and Sarath Chandar. Continuous coordination as a realistic scenario for lifelong learning. In Marina Meila and Tong Zhang, editors, Proceedings of the 38th International Conference on Machine Learning, ICML 2021, 18-24 July 2021, Virtual Event, volume 139 of Proceedings of Machine Learning Research, pages 8016–8024. PMLR, 2021.
|
| 285 |
+
|
| 286 |
+
[37] Cuong V. Nguyen, Yingzhen Li, Thang D. Bui, and Richard E. Turner. Variational continual learning. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net, 2018.
|
| 287 |
+
|
| 288 |
+
[38] German Ignacio Parisi, Ronald Kemker, Jose L. Part, Christopher Kanan, and Stefan Wermter. Continual lifelong learning with neural networks: A review. Neural Networks, 113:54–71, 2019.
|
| 289 |
+
|
| 290 |
+
[39] Emmanouil Antonios Platanios, Abulhair Saparov, and Tom M. Mitchell. Jelly bean world: A testbed for never-ending learning. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020.
|
| 291 |
+
|
| 292 |
+
[40] Aditya Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray, Chelsea Voss, Alec Radford, Mark Chen, and Ilya Sutskever. Zero-shot text-to-image generation. CoRR, abs/2102.12092, 2021.
|
| 293 |
+
|
| 294 |
+
[41] Dushyant Rao, Francesco Visin, Andrei A. Rusu, Razvan Pascanu, Yee Whye Teh, and Raia Hadsell. Continual unsupervised representation learning. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d’Alché-Buc, Emily B. Fox, and Roman Garnett, editors, Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 7645–7655, 2019.
|
| 295 |
+
|
| 296 |
+
[42] Natalia Díaz Rodríguez, Vincenzo Lomonaco, David Filliat, and Davide Maltoni. Don’t forget, there is more than forgetting: new metrics for continual learning. CoRR, abs/1810.13166, 2018.
|
| 297 |
+
|
| 298 |
+
[43] Andrei A. Rusu, Neil C. Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. CoRR, abs/1606.04671, 2016.
|
| 299 |
+
|
| 300 |
+
[44] Tom Schaul, Diana Borsa, Joseph Modayil, and Razvan Pascanu. Ray interference: a source of plateaus in deep reinforcement learning. CoRR, abs/1904.11455, 2019.
|
| 301 |
+
|
| 302 |
+
[45] Jonathan Schwarz, Daniel Altman, Andrew Dudzik, Oriol Vinyals, Yee Whye Teh, and Razvan Pascanu. Towards a natural benchmark for continual learning. In Continual learning Workshop, Neurips 2018, 2018.
|
| 303 |
+
|
| 304 |
+
[46] Jonathan Schwarz, Wojciech Czarnecki, Jelena Luketina, Agnieszka Grabska-Barwinska, Yee Whye Teh, Razvan Pascanu, and Raia Hadsell. Progress & compress: A scalable framework for continual learning. In Jennifer G. Dy and Andreas Krause, editors, Proceedings of the 35th International Conference on Machine Learning, ICML 2018, Stockholmsmässan, Stockholm, Sweden, July 10-15, 2018, volume 80 of Proceedings of Machine Learning Research, pages 4535–4544. PMLR, 2018.
|
| 305 |
+
|
| 306 |
+
[47] Andrew W. Senior, Richard Evans, John Jumper, James Kirkpatrick, Laurent Sifre, Tim Green, Chongli Qin, Augustin Zídek, Alexander W. R. Nelson, Alex Bridgland, Hugo Penedones, Stig Petersen, Karen Simonyan, Steve Crossan, Pushmeet Kohli, David T. Jones, David Silver, Koray Kavukcuoglu, and Demis Hassabis. Improved protein structure prediction using potentials from deep learning. Nat., 577(7792):706–710, 2020.
|
| 307 |
+
|
| 308 |
+
[48] Fan-Keng Sun, Cheng-Hao Ho, and Hung-Yi Lee. LAMOL: language modeling for lifelong language learning. In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020.
|
| 309 |
+
|
| 310 |
+
[49] Mingxing Tan and Quoc V. Le. Efficientnet: Rethinking model scaling for convolutional neural networks. In Kamalika Chaudhuri and Ruslan Salakhutdinov, editors, Proceedings of the 36th International Conference on Machine Learning, ICML 2019, 9-15 June 2019, Long Beach, California, USA, volume 97 of Proceedings of Machine Learning Research, pages 6105–6114. PMLR, 2019.
|
| 311 |
+
|
| 312 |
+
[50] Chen Tessler, Shahar Givony, Tom Zahavy, Daniel J. Mankowitz, and Shie Mannor. A deep hierarchical approach to lifelong learning in minecraft. In Satinder P. Singh and Shaul Markovitch, editors, Proceedings of the Thirty-First AAAI Conference on Artificial Intelligence, February 4-9, 2017, San Francisco, California, USA, pages 1553–1561. AAAI Press, 2017.
|
| 313 |
+
|
| 314 |
+
[51] Emanuel Todorov, Tom Erez, and Yuval Tassa. Mujoco: A physics engine for model-based control. In 2012 IEEE/RSJ International Conference on Intelligent Robots and Systems, IROS 2012, Vilamoura, Algarve, Portugal, October 7-12, 2012, pages 5026–5033. IEEE, 2012.
|
| 315 |
+
|
| 316 |
+
[52] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett, editors, Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 5998–6008, 2017.
|
| 317 |
+
|
| 318 |
+
[53] Jeffrey Scott Vitter. Random sampling with a reservoir. ACM Trans. Math. Softw., 11(1):37–57, 1985.
|
| 319 |
+
|
| 320 |
+
[54] Tianhe Yu, Deirdre Quillen, Zhanpeng He, Ryan Julian, Karol Hausman, Chelsea Finn, and Sergey Levine. Meta-world: A benchmark and evaluation for multi-task and meta reinforcement learning. In Leslie Pack Kaelbling, Danica Kragic, and Komei Sugiura, editors, 3rd Annual
|
| 321 |
+
|
| 322 |
+
Conference on Robot Learning, CoRL 2019, Osaka, Japan, October 30 - November 1, 2019, Proceedings, volume 100 of Proceedings of Machine Learning Research, pages 1094–1100. PMLR, 2019.
|
| 323 |
+
|
| 324 |
+
# Checklist
|
| 325 |
+
|
| 326 |
+
1. For all authors...
|
| 327 |
+
|
| 328 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 329 |
+
(b) Did you describe the limitations of your work? [Yes] see Section 4.4.
|
| 330 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] See Section 7
|
| 331 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 332 |
+
|
| 333 |
+
2. If you are including theoretical results...
|
| 334 |
+
|
| 335 |
+
(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]
|
| 336 |
+
|
| 337 |
+
3. If you ran experiments...
|
| 338 |
+
|
| 339 |
+
(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] The codes is included in the supplemental material.
|
| 340 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] see details in Appendix A.
|
| 341 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] we used 20 random seeds, see also details in Appendix A.6.
|
| 342 |
+
(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 A.7.
|
| 343 |
+
|
| 344 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 345 |
+
|
| 346 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] We base on the MetaWorld benchmark [54], which we clearly indicate a few times, including the abstract.
|
| 347 |
+
(b) Did you mention the license of the assets? [Yes] We use MIT licence; see Appendix A.1
|
| 348 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [Yes]
|
| 349 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A]
|
| 350 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A]
|
| 351 |
+
|
| 352 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 353 |
+
|
| 354 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 355 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 356 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/5rm0b_fsNZ/5rm0b_fsNZ.md
ADDED
|
@@ -0,0 +1,278 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Proportional Participatory Budgeting with Additive Utilities
|
| 2 |
+
|
| 3 |
+
Dominik Peters University of Toronto Toronto, ON, Canada dominik@cs.toronto.edu
|
| 4 |
+
|
| 5 |
+
Grzegorz Pierczynski ´ University of Warsaw Warsaw, Poland g.pierczynski@mimuw.edu.pl
|
| 6 |
+
|
| 7 |
+
Piotr Skowron University of Warsaw Warsaw, Poland p.skowron@mimuw.edu.pl
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
We study voting rules for participatory budgeting, where a group of voters collectively decides which projects should be funded using a common budget. We allow the projects to have arbitrary costs, and the voters to have arbitrary additive valuations over the projects. We formulate two axioms that guarantee proportional representation to groups of voters with common interests. To the best of our knowledge, all known rules for participatory budgeting do not satisfy either of the two axioms; in addition we show that the most prominent proportional rule for committee elections, Proportional Approval Voting, cannot be adapted to arbitrary costs nor to additive valuations so that it would satisfy our axioms of proportionality. We construct a simple and attractive voting rule called the Method of Equal Shares that satisfies one of our axioms (for arbitrary costs and arbitrary additive valuations), and that can be evaluated in polynomial time. We prove that our other stronger axiom is also satisfiable, though by a computationally more expensive and less natural voting rule.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Consider an abstract model where there is a group of agents who have preferences over a set of options. Each option has a cost, and the goal is to select a subset of options whose total cost does not exceed a predefined budget. This model provides a formal framework for a number of real-life scenarios. Perhaps the most natural example is Participatory Budgeting (PB). Through a voting system, PB allows residents of a city (the agents) to decide which projects (the options) will be funded by the government. In recent years, PB has been started in many cities around the world [Cabannes, 2004, Aziz and Shah, 2020], and in some cases is used to decide a significant fraction of the city budget. For example, in Paris, PB has been run every year since 2014, and since 2016 the total amount of funding for PB in Paris has been more than 100 million euros annually. Besides PB, the formal model captures the problem of electing a representative committee for a group of voters, say a faculty board or a parliament [Faliszewski et al., 2017, Lackner and Skowron, 2020], but also appears useful in situations that do not involve humans. For example, our framework describes the problem of selecting validators in consensus protocols, such as the blockchain [Cevallos and Stewart, 2020], the problem of selecting web pages that should be displayed in response to user queries, where the selected set of web pages should be useful for different types of user profiles [Skowron et al., 2017] or the problem of locating public facilities [Skowron et al., 2016, Byrka et al., 2018]. Algorithms for PB can even be used for improving the quality of genetic algorithms [Faliszewski et al., 2016]. While there are numerous applications of the model that we consider, for concreteness we will use terminology referring to participatory budgeting.
|
| 16 |
+
|
| 17 |
+
In this paper, we focus on designing algorithms (which we call aggregation rules) for selecting projects. We are interested in rules that are fair in the sense that each agent has roughly equal influence on the outcome.This implies that the selected subset of projects must proportionally represent the views of the voters, and so every group of voters with similar preferences should have an appropriate portion of the available budget allocated to fulfilling those preferences. Our results contribute to the study of fairness in algorithmic decision making. Notably, while many works on this topic aim to be fair to agents described by feature vectors (that for example contain demographic information), we only use agents’ preferences. Fair algorithms will need to identify cohesive groups of agents on their own.
|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Map of Circleville, showing the locations and costs of the PB project proposals.
|
| 21 |
+
|
| 22 |
+
To understand the constraints that fairness and proportionality place on the decision procedure, let us start by discussing the way cities implement PB today. To count the votes, most cities use a variant of a simple protocol: Each voter is allowed to vote for a certain number of project proposals. Then, the projects with the highest number of votes are funded, until the budget limit is reached. While simple and intuitive, this is a bad voting rule. To see this, consider Circleville, a fictional city divided into four districts. A map of the city is shown in Figure 1. The districts all have similar sizes, but Northside has the largest population. Suppose $\$ 400 k$ have been allocated to PB, and suppose that all the project proposals are of a local character (such as school renovations), and so residents only vote for projects that concern their own district. For example, every Northside resident will cast votes for projects $A , B , C$ , and $D$ , but no one else votes for these. Because Northside is the most populous district, the Northside projects will all receive the highest number of votes, and the voting rule described will spend the entire budget on Northside projects. The 280k residents of the other districts are left empty-handed.
|
| 23 |
+
|
| 24 |
+
To circumvent this obvious issue, many cities have opted to hold separate elections for each district. The budget is divided in advance between the districts (e.g., in proportion to their number of residents), each project is assigned to a district, and voters only vote in their local election. While this avoids the issue of spending the entire budget in Northside, this fix introduces many other problems. For example, projects on the boundary of two districts (such as $A$ and $P$ ) need to be assigned to one of them. Residents of the other district may be in favor of the boundary project, but cannot vote for it. Thus boundary projects are less likely to be funded, even if they would be more valuable overall. Similarly, projects without a specific location that benefit the entire city cannot be handled. Also, interest groups that are not geographic in nature will be underserved; for instance, parents across the city might favor construction of a large playground (project $C$ ), but with separate district elections, parents cannot form a voting block. Similarly, bike riders across the city cannot express their joint interest in the construction of a bike trail along Example River (projects $R , S , H$ , and $G$ ).
|
| 25 |
+
|
| 26 |
+
To solve these problems, it seems desirable to hold a single city-wide election, but use a voting system that ensures that money is spent proportionally. The voting system should automatically and endogenously identify groups of voters who share common interests, and make sure that those groups are appropriately represented. This aim has been identified by several researchers [Aziz et al., 2018b], but no convincing proposal for a proportional voting rule has emerged so far. Indeed, no good formalization of “proportionality” for the PB context has been identified in the literature, except for the concept of the core. However, the core is a very demanding requirement, and there are situations where it fails to exist [Fain et al., 2018].
|
| 27 |
+
|
| 28 |
+
In this paper, we formalize proportionality for participatory budgeting as an axiom called extended justified representation (EJR). The axiom requires that no group of voters with common interests is underserved. We construct a simple and attractive voting rule (the Method of Equal Shares) that satisfies EJR for approval preferences, and that satisfies EJR up to one project for general additive valuations. We then discuss a strengthening of EJR—which we call fully justified representation (FJR)—and show that this strengthening is still satisfiable, albeit by a different voting rule.
|
| 29 |
+
|
| 30 |
+
Both our proportionality axiom and our voting rule are generalizations of concepts that have been introduced in the literature on multi-winner voting [Faliszewski et al., 2017]. That literature can be seen as handling a special case of PB, where all projects cost the same amount of money. This is often called the unit cost assumption. It turns out that the unit cost assumption substantially simplifies the problem. Further, much of the relevant literature studies rules that work with approval ballots, where voters are allowed to approve or disapprove each project. In our paper, we allow any additive valuations (not just 0/1), which is more expressive. The proportionality axioms and voting rules that we introduce all work for general additive valuations. This is notable, since allowing additive valuations introduces significant conceptual difficulty. Indeed, most prominent multi-winner voting rules do not naturally extend to additive valuations (or at least not gracefully).
|
| 31 |
+
|
| 32 |
+
Allowing additive valuations gives voters a way to more precisely describe their preference intensities. This can be valuable information in a PB setting where there are often projects which differ significantly in their cost. In practice, PB elections typically only elicit approval information. Using rules such as ours (defined for general additive valuations), we can interpret this approval information in two different ways: either as $_ { 0 / 1 }$ utilities (so that a voter’s utility for a selected outcome is the number of approved funded projects) or as cost-based utilities (so the utility for an outcome is the total cost of approved funded projects). These two interpretations lead to interestingly different rules, with cost-based utilities favoring more expensive projects and leading to outcomes that are more similar to the outcomes that are selected by the greedy rule typically used by cities today.
|
| 33 |
+
|
| 34 |
+
# 2 Preliminaries
|
| 35 |
+
|
| 36 |
+
For each $t \in \mathbb { N }$ , write $[ t ] = \{ 1 , 2 , \ldots , t \}$ . An election is a tuple $( N , C , \mathrm { c o s t } , \{ u _ { i } \} _ { i \in N } )$ , where:
|
| 37 |
+
|
| 38 |
+
• $N = [ n ]$ and $C = \{ c _ { 1 } , \ldots , c _ { m } \}$ are the sets of voters and candidates (or projects). • cost : $C \to \mathbb { Q } _ { + }$ is a function that for each $c \in C$ assigns the cost that needs to be paid if $c$ is selected. For each $T \subseteq C$ , we write $\begin{array} { r } { \mathrm { c o s t } ( T ) = \sum _ { c \in T } \mathrm { c o s t } ( c ) } \end{array}$ for the total cost of $T$ . • For each voter $i \in N$ , the function $u _ { i } \colon C \to [ 0 , 1 ]$ defines $i$ ’s additive utility function. If a set $T \subseteq C$ of candidates is implemented, $i$ ’s overall utility is $\begin{array} { r } { u _ { i } ( T ) = \sum _ { c \in T } u _ { i } ( c ) } \end{array}$ . For a subset $S \subseteq N$ of voters, we further write $\begin{array} { r } { u _ { S } ( T ) = \sum _ { i \in S } \sum _ { c \in T } u _ { i } ( c ) } \end{array}$ for the total utility enjoyed by $S$ if $T$ is implemented. We assume that $u _ { N } ( c ) > 0$ for each $c \in C$ , so that every candidate is assigned positive utility by at least one voter.
|
| 39 |
+
|
| 40 |
+
The voters have a fixed common budget which we normalize to 1. A subset of candidates $W \subseteq C$ is feasible if $\textstyle \operatorname { c o s t } ( W ) \leq 1$ . Our goal is to choose a feasible subset of candidates, which we call an outcome, based on voters’ utilities. An aggregation rule (or, in short, a rule) is a function $\mathcal { R }$ that for each election $E$ returns a feasible outcome $W = { \mathcal { R } } ( E )$ called the winning outcome. 1
|
| 41 |
+
|
| 42 |
+
There are two interesting special cases of our model:
|
| 43 |
+
|
| 44 |
+
Committee elections. In this case, there exists $k \in \mathbb N$ (the committee size) such that each candidate costs $^ { 1 / k }$ . Then $W$ is an outcome if and only if $| W | \leq k$ . In this special case we also refer to outcomes as committees, and we say that the election satisfies the unit cost assumption.
|
| 45 |
+
|
| 46 |
+
Approval utilities. In this case, for each $i \in N$ and $c \in C$ it holds that $u _ { i } ( c ) \in \{ 0 , 1 \}$ . The approval set of voter $i$ is $A ( i ) : = \{ c \in C \colon u _ { i } ( c ) = 1 \}$ , and we say that $i$ approves candidate $c$ if $c \in A ( i )$ . If $c \in A ( i ) \cap W$ , we say that $c$ is a representative of $i$ .
|
| 47 |
+
|
| 48 |
+
Often we combine of these special cases, and study approval-based committee elections.
|
| 49 |
+
|
| 50 |
+
# 3 The Method of Equal Shares (MES)
|
| 51 |
+
|
| 52 |
+
Recently, Peters and Skowron [2020] introduced an aggregation rule for approval-based committee elections that they called Rule X. In that setting the rule satisfies a combination of appealing proportionality properties. Here, we extend it to the more general model of participatory budgeting, that is, to the model with arbitrary costs and utilities. We will call this rule the Method of Equal Shares (in short, MES).
|
| 53 |
+
|
| 54 |
+
Definition 1 (Method of Equal Shares (MES)). Each voter is initially given an equal fraction of the budget, i.e., each voter is given $^ 1 / n$ dollars. We start with an empty outcome $W = \emptyset$ and sequentially add candidates to $W$ . To add a candidate $c$ to $W$ , we need the voters to pay for $c$ . Write $p _ { i } ( c )$ for the amount that voter $i$ pays for $c$ ; we will need that $\begin{array} { r } { \sum _ { i \in N } p _ { i } ( c ) = \cot ( c ) } \end{array}$ . We write $\begin{array} { r } { p _ { i } ( W ) = \sum _ { c \in W } p _ { i } ( c ) \leq \frac { 1 } { n } } \end{array}$ for the total amount $i$ has paid so far. For $\rho \geq 0$ , we say that a candidate $c \notin W$ is $\rho$ 2 -affordable if
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
\sum _ { i \in N } \operatorname* { m i n } \left( { \textstyle { \frac { 1 } { n } } } - p _ { i } ( W ) , u _ { i } ( c ) \cdot \rho \right) = \operatorname { c o s t } ( c ) .
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
If no candidate is $\rho$ -affordable for any $\rho$ , MES terminates and returns $W$ . Otherwise it selects a candidate $c \notin W$ that is $\rho$ -affordable for a minimum $\rho$ . Individual payments are given by
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\begin{array} { r } { p _ { i } ( c ) = \operatorname* { m i n } \left( \frac { 1 } { n } - p _ { i } ( W ) , u _ { i } ( c ) \cdot \rho \right) } \end{array}
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
Intuitively, when the Method of Equal Shares (MES) adds a candidate $c$ , it asks voters to pay an amount proportional to their utility $u _ { i } ( c )$ for $c$ ; in particular, the cost per unit of utility is $\rho$ . If a voter does not have enough money, the rule asks the voter to pay all the money the voter has left, which is $\textstyle { \frac { 1 } { n } } - p _ { i } ( W )$ . Throughout the execution of MES, the value of $\rho$ increases. Thus, candidates are added in decreasing order of utility per dollar that the voters get from the candidates. In comparison to the work of Peters and Skowron [2020], the new elements in our definition of the rule are (1) the formula according to which the costs of selected projects are divided among the voters, and (2) the algorithm specifying in which order the candidates are selected; these are critical to ensure that the rule is proportional.
|
| 67 |
+
|
| 68 |
+
# 3.1 Extended Justified Representation (EJR)
|
| 69 |
+
|
| 70 |
+
The first notion of proportionality that we examine is Extended Justified Representation (EJR). This axiom was first proposed for approval-based committee elections [Aziz et al., 2017]. Even for the special case of approval-based committee elections, only few rules are known to satisfy EJR [Aziz et al., 2017, 2018a, Peters and Skowron, 2020], but the Method of Equal Shares is one of them. In this section, we introduce a generalization of EJR to the PB model and show that our rule continues to satisfy EJR.
|
| 71 |
+
|
| 72 |
+
We first recall the definition of EJR for approval-based committee elections. Intuitively, this axiom ensures that every large enough group of voters whose approval sets have a large enough intersection must obtain a fair number of representatives. For example, if a group of voters forms an $\alpha$ -fraction of the whole population and if this group agrees on sufficiently many candidates, then it should be allowed to decide about an $\alpha$ -fraction of the elected candidates. Formally, this is achieved by excluding the possibility that each member of the group approves less than $\lfloor \alpha k \rfloor$ elected candidates.
|
| 73 |
+
|
| 74 |
+
Definition 2 (Extended Justified Representation for approval-based committee elections). We say that a group of voters $S$ is $\ell$ -cohesive for $\ell \in \mathbb { N }$ if $| S | \ge \ell / \kappa \cdot n$ and $\begin{array} { r } { | \bigcap _ { i \in S } A ( i ) | \geq \ell } \end{array}$ . A rule $\mathcal { R }$ satisfies extended justified representation if for each election instance $E$ and each $\ell$ -cohesive group $S$ of voters there exists a voter $i \in S$ such that $| A ( i ) \cap \mathcal { R } ( E ) | \geq \ell$ .
|
| 75 |
+
|
| 76 |
+
At first sight it is unintuitive that we only require that at least one voter obtain $\ell$ representatives. However, the strengthening of EJR that requires each member of $S$ to obtain $\ell$ representatives is impossible even on very small instances [Aziz et al., 2017]. Still, even with only the at-least-one guarantee, EJR has plenty of bite [Aziz et al., 2018a, Skowron, 2018, Peters and Skowron, 2020].
|
| 77 |
+
|
| 78 |
+
The generalization of this axiom to the PB model is not straightforward and to the best of our knowledge none has been proposed in the literature.2 To warm up, let’s first relax the unit cost assumption, but stay in the approval-based setting. Then EJR should state the following.
|
| 79 |
+
|
| 80 |
+
Definition 3 (Extended Justified Representation for approval-based elections). We say that a group of voters $S$ is $T$ -cohesive for $T \subseteq C$ if $| S | \geq \mathrm { c o s t } ( T ) \cdot n$ and $\textstyle T \subseteq \bigcap _ { i \in S } A ( i )$ . A rule $\mathcal { R }$ satisfies extended justified representation if for each election instance $E$ and each $T$ -cohesive group $S$ of voters there exists a voter $i \in S$ such that $| A ( i ) \cap \mathcal { R } ( E ) | \geq | T |$ .
|
| 81 |
+
|
| 82 |
+
Thus, cohesiveness now requires that the group $S$ can identify a collection of projects $T$ that they all approve and that is affordable with their fraction of the budget $\mathbf { \bar { \rho } } | S | \geq \mathrm { c o s t } ( T ) \cdot \bar { n } )$ . Note that voters $i \in S$ obtain utility $u _ { i } ( T ) = | T |$ from $T$ ; EJR requires that at least one member of $S$ must attain this utility in the election outcome.
|
| 83 |
+
|
| 84 |
+
To further generalize EJR beyond approvals is more difficult, because the notion of a candidate who is approved by all members of $S$ does not have an analogue. Instead, we quantify cohesion by calculating the minimum utility that any member of $S$ assigns to each project in $T$ .
|
| 85 |
+
|
| 86 |
+
Definition 4 (Extended Justified Representation). A group of voters $S$ is $( \alpha , T )$ -cohesive, where $\alpha \colon C \to [ 0 ; 1 ]$ and $T \subseteq C$ , if $| S | \geq \mathrm { c o s t } ( T ) \cdot n$ and if $u _ { i } ( c ) \geq \alpha ( c )$ for all $i \in S$ and $c \in T$ . A rule $\mathcal { R }$ satisfies extended justified representation if for each election instance $E$ and each $( \alpha , T )$ -cohesive group of voters $S$ there exists a voter $i \in S$ such that $\begin{array} { r } { u _ { i } ( { \mathcal { R } } ( E ) ) \geq \sum _ { c \in T } \alpha ( c ) } \end{array}$ .
|
| 87 |
+
|
| 88 |
+
Again, an $( \alpha , T )$ -cohesive group of voters $S$ can propose the projects in $T$ , since they are affordable with $S$ ’s share of the budget. The values $( \alpha ( c ) ) _ { c \in T }$ denote how much the coalition $S$ agrees about the desirability of the projects in $T$ . In particular, we have $\begin{array} { r } { u _ { i } ( T ) \geq \sum _ { c \in T } \alpha ( c ) } \end{array}$ for each $i \in S$ Consequently, Definition 4 prohibits any outcome in which every voter in $S$ 2 gets utility strictly lower than $\textstyle \sum _ { c \in T } { \dot { \alpha } } ( c )$ ; hence there must exists $i \in S$ such that $\begin{array} { r } { u _ { i } ( \mathcal { R } \bar { ( } E ) ) \geq \sum _ { c \in T } \alpha ( c ) } \end{array}$ .
|
| 89 |
+
|
| 90 |
+
EJR is a demanding property in the PB model. Consider the special case where there is only one voter, $N = \{ 1 \}$ . Then any outcome $W$ satisfying EJR must solve the knapsack problem, i.e. it must maximize $\textstyle \sum _ { c \in W } u _ { 1 } ( c )$ , since otherwise an optimum knapsack $T$ witnesses an EJR violation. Because the knapsack problem is weakly NP-hard, this presents a difficulty for a rule to satisfy EJR.3
|
| 91 |
+
|
| 92 |
+
Proposition 1. Unless $P = N P$ no aggregation rule that can be computed in strongly polynomial time can satisfy EJR in the general PB model.
|
| 93 |
+
|
| 94 |
+
Indeed, the Method of Equal Shares fails EJR in the general PB model. However, we can show that it satisfies a mild relaxation, which requires EJR to hold “up to one project”.
|
| 95 |
+
|
| 96 |
+
Definition 5 (Extended Justified Representation Up To One Project). A rule $\mathcal { R }$ satisfies extended justified representation up to one project if for each election instance $E$ and each $( \alpha , T )$ -cohesive group of voters $S$ there exists a voter $i \in S$ such that either $\begin{array} { r } { u _ { i } ( \mathcal { R } ( E ) ) \geq \sum _ { c \in T } \alpha ( c ) } \end{array}$ or for some $a \in C$ it holds that $\begin{array} { r } { u _ { i } ( \mathcal { R } ( E ) \cup \{ a \} ) > \sum _ { c \in T } \alpha ( c ) } \end{array}$ .
|
| 97 |
+
|
| 98 |
+
It is worth noting that in the approval-based model, Definitions 4 and 5 are actually equivalent, because the “up to one project” option never applies: Consider an $( \alpha , T )$ -cohesive group of voters $S$ . Since voters’ utilities are $_ { 0 / 1 }$ , we may assume that for each $c \in T$ we have $\alpha ( c ) = 1$ : if $\alpha ( c ) > 0$ this is clear; otherwise we can remove $c$ from $T$ without losing cohesiveness. Thus, the cohesiveness condition is equivalent to the condition that every voter approves every candidate in $T$ . Finally, note that in the approval model, due to the strict inequality, both conditions $\begin{array} { r } { u _ { i } ( \mathcal { R } ( E ) ) \geq \sum _ { c \in T } \alpha ( \dot { c } ) } \end{array}$ and $\begin{array} { r } { \exists _ { a \in C \cdot } u _ { i } ( \mathcal { R } ( E ) \cup \{ a \} ) > \sum _ { c \in T } \alpha ( c ) } \end{array}$ boil down to $\begin{array} { r } { | A ( i ) \cap \mathcal { R } ( E ) | \ge \sum _ { c \in T } \alpha ( c ) = | \bar { T } | } \end{array}$ .
|
| 99 |
+
|
| 100 |
+
Our main result is that the Method of Equal Shares satisfies EJR up to one project in the general PB model. By the previous observation, it hence satisfies EJR in the approval-based model (even when not imposing unit costs).
|
| 101 |
+
|
| 102 |
+
Theorem 1. The Method of Equal Shares satisfies EJR up to one project in the participatory budgeting model.
|
| 103 |
+
|
| 104 |
+
Proof. For a contradiction, assume there is an election $E$ , a set $S \subseteq N$ and a set $T \subseteq C$ such that: (i) $\mathrm { c o s t } ( T ) \leq { \mathsf { \Pi } } ^ { | S | } / n$ , (ii) $u _ { i } ( c ) \geq \alpha ( c ) > 0$ (candidates with $\alpha ( c ) = 0$ can be skipped) for each $i \in S$ and $c \in T$ , and (iii) $\begin{array} { r } { u _ { i } ( \mathcal { R } ( E ) \cup \{ a \} ) \leq \sum _ { c \in T } \alpha ( c ) } \end{array}$ for each $i \in S$ and $a \in T$ .
|
| 105 |
+
|
| 106 |
+
Assume for a while that the voters from $S$ have unrestricted initial budgets, and let us analyze how MES would proceed in this case. For simplicity, let us rename the candidates in $T$ so that $T = \{ c _ { 1 } , \ldots , c _ { t } \}$ and so that for $1 \leq i < j \leq t$ candidate $c _ { i }$ is picked by MES before candidate $c _ { j }$ .
|
| 107 |
+
|
| 108 |
+
Whenever a candidate $c \in T$ is selected, the voters pay for this candidate. Voter $i$ pays $p _ { i } ( c )$ dollars for $c$ , and in return, she gets utility $u _ { i } ( c )$ . Thus, the price-per-utility she pays equals $\rho _ { i } ( c ) = p _ { i } ( c ) \big / u _ { i } ( c ) ,$ . MES works in a way that all voters from $S$ who pay for $c$ obtain the same price-per-utility ratio, i.e., for all $i , j \in S$ and $c \in C$ we have that $\rho _ { i } ( c ) = \rho _ { j } ( c )$ . Further, this price-per-utility equals at most $\mathrm { c o s t } ( c ) \big / { u _ { S } ( c ) }$ , independently of whether any voters from $N \backslash S$ pay for $c$ or not (if no voters from $N \backslash S$ pays for $c$ , then the price-per-utility equals exactly $\mathrm { c o s t } ( c ) \big / u _ { S } ( c ) \big )$ :
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\nu _ { i } ( c ) = { \frac { p _ { i } ( c ) } { u _ { i } ( c ) } } = { \frac { p _ { i } ( c ) \cdot { \frac { \sum _ { j \in S } u _ { j } ( c ) } { \sum _ { j \in S } u _ { j } ( c ) } } } { u _ { i } ( c ) } } = { \frac { 1 } { \sum _ { j \in S } u _ { j } ( c ) } } \cdot \sum _ { j \in S } { \frac { p _ { i } ( c ) } { u _ { i } ( c ) } } \cdot u _ { j } ( c ) = { \frac { \sum _ { j \in S } p _ { j } ( c ) } { \sum _ { j \in S } u _ { j } ( c ) } } \leq { \frac { \cos \operatorname { t } ( c ) } { u _ { S } ( c ) } } .
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
Since $u _ { i } ( c ) \geq \alpha ( c )$ for each $i \in S$ and $c \in T$ , the price-per-utility for $c \in T$ equals at most $\mathrm { c o s t } ( c ) \big / | S | \alpha ( c )$ . Now, consider the voter who in the first possible iteration uses more than $^ 1 / n$ dollars4. For this voter, call her $i$ , let us consider the function $f$ defined as follows. For each value $x$ , the function $f$ returns the price that $i$ needs to pay to achieve the utility $x$ . We make this function continuous, by assuming that the candidates are divisible. That is, if the voter pays $p$ for her first paid candidate $c$ with utility $u _ { i } ( c )$ , then $f ( u _ { i } ( c ) / 2 ) = p / 2$ , $f ( u _ { i } ( c ) / 3 ) = P / 3$ , and so on. The key observation is that the function $f$ is convex. This is because MES selects the candidates in increasing order of price-per-utility. This function is depicted below.
|
| 115 |
+
|
| 116 |
+

|
| 117 |
+
|
| 118 |
+
We are interested in the value $f ( \sum _ { c \in T } \alpha ( c ) )$ . This value would be maximized if the fragments of the function with the lowest slope were the shortest. However, we know that the part of the function that corresponds $\rho _ { i } ( c )$ must be of length at least equal to $u _ { i } ( c ) \geq \alpha ( c )$ . Thus:
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
f \left( \sum _ { c \in T } \alpha ( c ) \right) \leq \sum _ { c \in T } \alpha ( c ) \cdot \rho _ { i } ( c ) \leq \sum _ { c \in T } \alpha ( c ) \cdot { \frac { \mathrm { c o s t } ( c ) } { | S | \alpha ( c ) } } = \sum _ { c \in T } { \frac { \mathrm { c o s t } ( c ) } { | S | } } = { \frac { \mathrm { c o s t } ( T ) } { | S | } } \leq { \frac { 1 } { n } } .
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
Now, consider the first moment when $i$ uses more than $^ 1 / n$ dollars. Until this time moment, MES behaves exactly in the same way as if the voters from $S$ had their initial budgets set to $^ 1 / n$ (this follows from how we chose $i$ ). Further, we know that in this moment, if we chose a candidate that would be chosen if the voters had unrestricted budgets, then the utility of voter $i$ would be greater than $\textstyle \sum _ { c \in T } \alpha ( c )$ . This gives a contradiction, and completes the proof. □
|
| 125 |
+
|
| 126 |
+
Theorem 1 establishes the Method of Equal Shares as a prime candidate for voting under a budget constraint, showing that it satisfies a demanding fairness property. This makes it the first known rule that can give such strong proportionality guarantees in the model with additive utilities and arbitrary costs. In the literature on the special case of approval-based committee elections, another rule has received much attention: Proportional Approval Voting (PAV). Let us briefly recall the definition of this rule.
|
| 127 |
+
|
| 128 |
+
Definition 6 (Proportional Approval Voting (PAV)). For an approval-based election, PAV selects a feasible outcome maximizing $\textstyle \sum _ { i \in N } \operatorname { H } ( | \bar { A ( i ) } \cap W | )$ , where $\begin{array} { r } { \dot { \mathrm { H } } ( r ) = \sum _ { j = 1 } ^ { r } \ d ^ { 1 } / j } \end{array}$ is the rth harmonic number.
|
| 129 |
+
|
| 130 |
+
This rule satisfies EJR when assuming unit costs [Aziz et al., 2017]. But without unit costs, PAV fails EJR. In fact, Example 1 shows that, for each $r \geq 0$ , PAV does not even satisfy EJR up to $r$ projects.
|
| 131 |
+
|
| 132 |
+
Example 1. Fix a constant $r \in \mathbb { N } \left( r \geq 2 \right)$ , and consider the following approval-based profile:
|
| 133 |
+
|
| 134 |
+
$$
|
| 135 |
+
\begin{array} { l l } { { r ^ { 2 } - 1 \mathrm { ~ v o t e r s : ~ } } } & { { \qquad \{ a _ { 1 } , a _ { 2 } , \ldots , a _ { r } \} , } } \\ { { \mathrm { ~ 1 ~ v o t e r : ~ } } } & { { \qquad \{ b _ { 1 } , b _ { 2 } , \ldots , b _ { r } \} . } } \end{array}
|
| 136 |
+
$$
|
| 137 |
+
|
| 138 |
+
The candidates $a _ { 1 } , a _ { 2 } , \ldots , a _ { r }$ cost $^ { 1 / r }$ dollars each; the candidates $b _ { 1 } , b _ { 2 } , \dots , b _ { r } \thinspace \mathrm { c o s t } \thinspace 1 / r ^ { 3 }$ dollars each. EJR requires that the one voter who approves candidates $b _ { 1 } , \ldots , b _ { r }$ must approve at least $r$ candidates in the outcome. However, PAV selects $\{ a _ { 1 } , a _ { 2 } , \ldots , a _ { r } \}$ , leaving the voter with nothing. □
|
| 139 |
+
|
| 140 |
+
In fact, in Appendix A, we prove that no rule that globally maximizes an objective function over voter utilities (like PAV) can satisfy proportionality. Further, in Appendix C we argue that another rule for proportional approval-based committee elections, Phragmén’s rule, does not extend to the PB setting.
|
| 141 |
+
|
| 142 |
+
# 3.2 Approximating the Core
|
| 143 |
+
|
| 144 |
+
An important proportionality property that has been proposed for PB is the core [Aziz et al., 2017, Fain et al., 2018], an idea adapted from cooperative game theory.
|
| 145 |
+
|
| 146 |
+
Definition 7 (The Core). For an election $( N , C , \mathrm { c o s t } , \{ u _ { i } \} _ { i \in N } )$ , an outcome $W$ is in the core if for every $S \subseteq N$ and $T \subseteq C$ with $| S | \geq \mathrm { c o s t } ( T ) \cdot n$ there exists $i \in S$ such that $u _ { i } ( W ) \geq u _ { i } ( T )$ .
|
| 147 |
+
|
| 148 |
+
The core is a stronger guarantee than EJR. The core allows any group $S$ to present an arbitrary “counter-proposal” $T$ that they can afford, and guarantees that at least one member $i \in S$ would prefer to stick with the core outcome $W$ , so $u _ { i } ( W ) \geq u _ { i } ( T )$ . EJR only guarantees that $u _ { i } ( W ) \geq$ $\sum _ { \substack { . c \in T } } \operatorname* { m i n } _ { j \in S } u _ { j } ( c )$ . Thus, EJR only respects counter-proposals $T$ if they have broad agreement 2within the coalition $S$ . This is arguably a reasonable restriction, since such coalitions can more easily coordinate to “complain” against the selected $W$ . Still, it would be nice to give the stronger core guarantee. Unfortunately, there are elections where no outcome is in the core, even with unit costs.
|
| 149 |
+
|
| 150 |
+
Example 2.5 We have 6 voters and 6 candidates with unit costs, and $k = 3$ . Utilities satisfy
|
| 151 |
+
|
| 152 |
+
$$
|
| 153 |
+
\begin{array} { r l r l r l } & { u _ { 1 } ( c _ { 1 } ) > u _ { 1 } ( c _ { 2 } ) > 0 , } & & { u _ { 2 } ( c _ { 2 } ) > u _ { 2 } ( c _ { 3 } ) > 0 , } & & { u _ { 3 } ( c _ { 3 } ) > u _ { 3 } ( c _ { 1 } ) > 0 ; } \\ & { u _ { 4 } ( c _ { 4 } ) > u _ { 4 } ( c _ { 5 } ) > 0 , } & & { u _ { 5 } ( c _ { 5 } ) > u _ { 5 } ( c _ { 6 } ) > 0 , } & & { u _ { 6 } ( c _ { 6 } ) > u _ { 6 } ( c _ { 4 } ) > 0 , } \end{array}
|
| 154 |
+
$$
|
| 155 |
+
|
| 156 |
+
and all other utilities are equal to 0. Let $W \subseteq C$ be any feasible outcome, so $| W | \le 3$ . Then either $| W \cap \{ c _ { 1 } , c _ { 2 } , c _ { 3 } \} | \leq 1$ or $| W \cap \{ c _ { 4 } , c _ { 5 } , c _ { 6 } \} | \leq 1$ . Without loss of generality assume the former, and assume that $c _ { 2 } \notin W$ and $c _ { 3 } \notin W$ . Then $\overrightarrow { S } = \{ v _ { 2 } , v _ { 3 } \}$ and $T = { \bar { \{ c _ { 3 } \} } }$ block $W$ , since $2 = | S | \geq$ $\begin{array} { r } { \mathrm { c o s t } ( T ) * n = \frac { 1 } { 3 } \cdot 6 = 2 } \end{array}$ and both $u _ { 2 } ( c _ { 3 } ) > u _ { 2 } ( c _ { 1 } ) \ge u _ { 2 } ( W )$ and $\dot { u } _ { 3 } ( \dot { c } _ { 3 } ) > u _ { 3 } ( c _ { 1 } ) \ge u _ { 3 } ( W )$ .
|
| 157 |
+
|
| 158 |
+
Notably, this example is not approval-based. It is unknown whether the core is always non-empty for approval-based elections (with or without the unit cost assumption).
|
| 159 |
+
|
| 160 |
+
In the committee context, Peters and Skowron [2020] showed that the Method of Equal Shares (MES) returns an outcome that never violates the core too badly. We can generalize this result to the general PB setting: MES provides a multiplicative approximation to the core.6
|
| 161 |
+
|
| 162 |
+
Definition 8. For $\alpha \geq 1$ , we say that an outcome is in the $\alpha$ -core if for every $S \subseteq N$ and $T \subseteq C$ with $| S | \geq \mathrm { c o s t } ( T ) \cdot n$ there exists $i \in S$ and $c \in T$ such that $\begin{array} { r } { u _ { i } ( \mathcal { R } ( E ) \cup \{ c \} ) \geq \frac { u _ { i } ( T ) } { \alpha } } \end{array}$
|
| 163 |
+
|
| 164 |
+
Theorem 2. Given an election $E$ , let $u _ { \mathrm { m a x } }$ be the highest utility a voter can get from a feasible outcome. Let $u _ { \mathrm { m i n } }$ we denote the smallest, yet positive utility a voter can get from a feasible outcome:
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
u _ { \operatorname* { m a x } } = \operatorname* { m a x } _ { i \in N } \operatorname* { m a x } _ { \operatorname { c o s t } ( W ) \leq 1 } u _ { i } ( W ) \qquad a n d \qquad u _ { \operatorname* { m i n } } = \operatorname* { m i n } _ { i \in N } \operatorname* { m i n } _ { u _ { i } ( W ) > 0 } u _ { i } ( W ) .
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
Then the outcome selected by MES is always in the $\alpha$ -core for $\alpha = 4 \log ( 2 \cdot u _ { \mathrm { m a x } } / u _ { \mathrm { m i n } } )$
|
| 171 |
+
|
| 172 |
+
The bound of $\alpha$ is asymptotically tight. All proofs omitted from the main text appear in Appendix D.
|
| 173 |
+
|
| 174 |
+
# 3.3 Other properties of the Method of Equal Shares
|
| 175 |
+
|
| 176 |
+
In Appendices B and C we discuss two other properties: priceability [Peters and Skowron, 2020, Peters et al., 2021] and exhaustiveness. Here, let us only discuss the latter one. Exhaustiveness requires that a voting rule spends its entire budget. Of course, due to the discrete model, we cannot guarantee that the rule will spend exactly 1 dollar (i.e., the entire budget); however, we can require that no additional project is fits within the budget.
|
| 177 |
+
|
| 178 |
+
Definition 9 (Exhaustiveness, Aziz et al., 2018b). An election rule $\mathcal { R }$ is exhaustive if for each election instance $E$ and each non-selected candidate $c \notin \mathcal { R } ( E )$ it holds that $\operatorname { c o s t } ( \mathcal { R } ( E ) \cup \{ c \} ) > 1$ .
|
| 179 |
+
|
| 180 |
+
Notably, the Method of Equal Shares fails to be exhaustive: even if there is enough budget remaining to fund more projects, the rule may reach a state when no project is $\rho$ -affordable. In Appendix C we discuss a few possible ways to make the rule exhaustive. We experimentally compare these modifications in Appendix H.
|
| 181 |
+
|
| 182 |
+
# 4 Greedy Cohesive Rule
|
| 183 |
+
|
| 184 |
+
In Section 3 we discussed the EJR axiom for the PB model, and saw that it is implemented by Method of Equal Shares. We will now propose a strengthening of EJR, and show a rule that satisfies the new strong property. Interestingly, even in the approval-based committee-election model our new property is substantially stronger than EJR, and hence this new rule provides the strongest known proportionality guarantees. On the other hand, compared to MES, it is computationally expensive and arguably less natural.
|
| 185 |
+
|
| 186 |
+
# 4.1 Full Justified Representation (FJR)
|
| 187 |
+
|
| 188 |
+
Our new proportionality axiom strengthens EJR by weakening its requirement that groups must be cohesive. Thus, the new axiom guarantees representation to groups that are only partially cohesive.
|
| 189 |
+
|
| 190 |
+
Definition 10 (Full Justified Representation (FJR)). We say that a group of voters $S$ is weakly $( \beta , T )$ -cohesive for $\beta \in \mathbb { R }$ and $T \subseteq C$ , if $| S | \geq \mathrm { c o s t } ( T ) \cdot n$ and $u _ { i } ( T ) \geq \beta$ for every voter $i \in S$ . A rule $\mathcal { R }$ satisfies full justified representation $( F J R )$ if for each election instance $E$ and each weakly $( \beta , T )$ -cohesive group of voters $S$ there exists a voter $i \in S$ such that $u _ { i } ( \mathcal { R } ( E ) ) \geq \beta$ .
|
| 191 |
+
|
| 192 |
+
In the approval-based committee-election model, FJR boils down to the following requirement: Let $S$ be a group of voters, and suppose that each member of $S$ approves at least $\beta$ candidates from some set $T \subseteq C$ with $| T | \leq \ell$ , and let $| S | \geq \ell / k \cdot n$ . Then at least one voter from $S$ must have at least $\beta$ representatives in the committee. It is clear that in the special case of $\beta = \ell$ , we obtain Definition 2, hence FJR implies EJR. The same implication holds in the general PB model.
|
| 193 |
+
|
| 194 |
+
Proposition 2. FJR implies EJR in the general PB model.
|
| 195 |
+
|
| 196 |
+
It is easy to see that FJR is implied by the core property (cf. Definition 7). It is related to, but stronger than, some other relaxations of the core discussed by Peters and Skowron [2020, Section 5.2].
|
| 197 |
+
|
| 198 |
+
Previously known aggregation rules faill FJR (see Appendix E). Still, it turns out that FJR can always be satisfied: we present a (somewhat artificial) rule satisfying this strong notion of proportionality.
|
| 199 |
+
|
| 200 |
+
Definition 11 (Greedy Cohesive Rule (GCR)). The Greedy Cohesive Rule (GCR) is defined sequentially as follows: we start with an empty outcome $W = \emptyset$ . At each step, we search for a weakly $( \beta , T )$ -cohesive group $S$ . If such a group exists, we find one where $\beta \geq 1$ is maximum,7 add all the candidates from $T$ to $W$ , remove all voters in $S$ from the election and repeat the search. If no such group exists, we stop and return $W$ .
|
| 201 |
+
|
| 202 |
+
Let us first check that the Greedy Cohesive Rule always selects an outcome that does not exceed the budget limit. Indeed, whenever the algorithm adds some set $T$ to $W$ , then by definition of weakly cohesive groups, we have $| S | \geq \mathrm { c o s t } ( T ) \cdot n$ , and hence it removes at least $\mathrm { c o s t } ( T ) \cdot n$ voters after this step. Thus, if GCR selects an outcome with total cost $\operatorname { c o s t } ( W )$ , then it must have removed at least $\cos ( W ) \cdot n$ voters during its execution. Hence $\mathrm { c o s t } ( W ) \leq 1$ .
|
| 203 |
+
|
| 204 |
+
Theorem 3. The Greedy Cohesive Rule satisfies FJR.
|
| 205 |
+
|
| 206 |
+
In Appendix $\mathrm { F }$ we further analyze GCR and discuss ways to extend its outcome when it is not exhaustive. We also present an example where GCR selects a counter-intuitive outcome.
|
| 207 |
+
|
| 208 |
+
# 5 Experiments
|
| 209 |
+
|
| 210 |
+
In this section we evaluate different voting rules on data from real-world participatory budgeting elections carried out in several major cities in Poland. The data we use is taken from Pabulib and was collected by [Stolicki et al., 2020].8 The data is anonymized except for some basic demographic information which we do not use in our experiments.
|
| 211 |
+
|
| 212 |
+
We looked at election instances in which the projects were divided into several groups. One group consists of city-wide projects, and each other group consists of projects that were assigned to a city district. Each voter was allowed to approve at most ten city-wide projects, and at most ten projects from her district. A part of the municipal budget was assigned to city-wide projects and the other part was divided among the districts in proportion to their populations. Currently, the cities that we consider use a rule that selects projects greedily in order of approval score until the budget is exhausted.
|
| 213 |
+
|
| 214 |
+
In our experimental analysis we used two types of voters’ preferences:
|
| 215 |
+
|
| 216 |
+
Approval utilities: corresponding directly to the approval-ballots from our PB data.
|
| 217 |
+
|
| 218 |
+
Cardinal utilities: for each voter $i$ and each project $c _ { j }$ we obtained the utility $u _ { i } ( c _ { j } )$ as follows. If $i$ does not approve $c _ { j }$ , we set $u _ { i } ( c _ { j } ) = 0$ . If $i$ approves $c _ { j }$ , we sample $u _ { i } ( c _ { j } )$ from the normal distribution centred at $\mathrm { c o s t } ( c _ { j } )$ . (We also tested similar models where $u _ { i } ( c _ { j } )$ was sampled from the uniform and exponential distributions, but those led to qualitatively similar conclusions.)
|
| 219 |
+
|
| 220 |
+
We are interested in comparing the Method of Equal Shares, the greedy approval rule currently used for selecting projects, Phragmén’s rule, and the sequential version of PAV (sPAV). (We have limited the experiments to polynomial-time algorithms, since the instances are quite large.) Since Phragmén’s rule does not extend to additive utilities, we only use this rule for approval utilities.
|
| 221 |
+
|
| 222 |
+
In our analysis we evaluated the following metrics:
|
| 223 |
+
|
| 224 |
+
Total utility (UTIL). The total utility of the voters from the selected set $\begin{array} { r } { W \colon \sum _ { i \in N } \sum _ { c \in W } u _ { i } ( c ) } \end{array}$ .
|
| 225 |
+
|
| 226 |
+
Distribution of projects (PROJ-DIS). For each election instance we look at the projects selected from each district. We compute their cost and divide it by the fraction of the budget that is proportional to the population of the district. From those ratios we take a variance.
|
| 227 |
+
|
| 228 |
+
Distribution of utilities (UTIL-DIS). For each election instance and each voter $i$ we compute her normalised utility from the set of selected projects $W$ , which we define as $\begin{array} { r } { \sum _ { i \in N } \sum _ { c \in W } u _ { i } ( c ) } \end{array}$ divided by $\textstyle n \cdot \sum _ { c \in W } u _ { i } ( c )$ . We compute the variance of these values.
|
| 229 |
+
|
| 230 |
+
In Appendix H.1 we discuss in detail the obtained results and provide tables summarizing the measured metrics. Below we only briefly discuss the conclusions from the experimental evaluation.
|
| 231 |
+
|
| 232 |
+
First we checked whether the outcome that was in fact selected by the cities is fair according to the kind of fairness criteria we have been studying. We found that in at least 59 out of 366 elections $( 1 6 \% )$ , EJR was failed. In most cases, the failure was of the form that there was a group of voters who approved 0 of the selected projects but who approved an unelected project in common, and the group was large enough to afford that project. This is even a failure of the PB version of the axiom JR (Justified Representation).
|
| 233 |
+
|
| 234 |
+
Second, we compared three different strategies of making MES exhaustive. We observed substantial differences between different variants of MES. We conclude that MES gives a lot of flexibility to a mechanism designer, as it often selects outcomes that do not spend all of the budget, while still satisfying strong fairness requirements like EJR. Depending on the specific objectives, a mechanism designer can choose to complete this outcome using different strategies. Among the strategies we described in Appendix C, we observed that the outcomes produced by EXH2 are better from a utilitarian perspective. It also divides the budget between different city districts in a substantially fairer way than outcomes produced by EXH1. Therefore we suggest EXH2 as the preferred method.
|
| 235 |
+
|
| 236 |
+
In our third experiment we compared MES, Phragmén’s rule, and PAV. We observed that for approval utilities the results returned by MES and Phragmén’s rule are comparably good, both in terms of the total utility obtained by the voters and in terms of proportionality measured as a distribution of projects and voters’ utilities. On the other hand, if we take a model with more fine-grained utilities, the difference between the two rules becomes apparent. This difference is unsurprising since Phragmén’s rule does not take into account the more fine-grained information on utilities, but operates only on approval ballots. Yet, our results suggest that there is indeed a considerable advantage of using rules (like MES) that take into account the full information contained in cardinal additive utilities. We conclude that MES performs as well as Phragmén’s rule for approval ballots and outperforms it when more fine-grained information on voters’ utilities are available. Somewhat surprisingly, we show that the sequential variant of PAV produces highly disproportional outcomes compared to Phragmén’s rule and MES. Altogether, our experiments confirm our theoretical results and suggest that the Method of Equal Shares outperforms the other two rules in terms of proportionality and/or efficiency.
|
| 237 |
+
|
| 238 |
+
# 6 Conclusion
|
| 239 |
+
|
| 240 |
+
In this paper, we have formulated two axioms, EJR and FJR, that capture the idea of proportionality in the participatory budgeting (PB) model. We have argued that none of the prominent committee election rules extend to the PB model so that it would satisfy even much weaker forms of proportionality. We have designed a simple and natural rule for the PB model, the Method of Equal Shares (MES). It satisfies EJR and other proportionality-related properties, and it is computable in polynomial time. The stronger of our two properties, FJR, is also satisfiable, albeit by a different and arguably less natural voting rule. It is an interesting open question whether there exists a natural voting rule that satisfies FJR and shares other desirable properties of MES.
|
| 241 |
+
|
| 242 |
+
There are numerous results which are not included in the main text. Specifically, in Appendices B and C we discuss other properties of MES, and in Appendix F we provide a more detailed analysis of GCR. In Appendix G we explain that our rules can be directly applied to a model where voters have ordinal preferences, that is, when they rank the candidates from the most to the least preferred one. Notably, in the ordinal model MES satisfies the axiom of proportionality for solid coalitions, which is perhaps the strongest known axiom of proportionality for ordinal preferences.
|
| 243 |
+
|
| 244 |
+
Many cities run PB by dividing the overall budget between districts and running separate elections in each district. In particular, this is true in the Polish cities that provide our experimental election data. We claimed in the introduction that this practice of separate elections leads to inferior outcomes. We designed a final experiment to study this question. Our results show a visible advantage of using global rules such as MES over separate district elections. For example, MES always produces outcomes with a more equal distribution of voter utility, and in most cases also provides a higher total utility in comparison to the rules that are in actual use in the elections we examined.
|
| 245 |
+
|
| 246 |
+
# Acknowledgments
|
| 247 |
+
|
| 248 |
+
Grzegorz Pierczynski and Piotr Skowron were supported by Poland’s National Science Center grant ´ UMO-2019/35/B/ST6/02215.
|
| 249 |
+
|
| 250 |
+
References
|
| 251 |
+
H. Aziz and B. Lee. The expanding approvals rule: improving proportional representation and monotonicity. Social Choice and Welfare, 54(1):1–45, 2020.
|
| 252 |
+
H. Aziz and N. Shah. Participatory budgeting: Models and approaches. In Tamás Rudas and Gábor Péli, editors, Pathways Between Social Science and Computational Social Science: Theories, Methods, and Interpretations. Springer, 2020.
|
| 253 |
+
H. Aziz, M. Brill, V. Conitzer, E. Elkind, R. Freeman, and T. Walsh. Justified representation in approval-based committee voting. Social Choice and Welfare, 48(2):461–485, 2017.
|
| 254 |
+
H. Aziz, E. Elkind, S. Huang, M. Lackner, L. Sánchez-Fernández, and P. Skowron. On the complexity of extended and proportional justified representation. In Proceedings of the 32nd AAAI Conference on Artificial Intelligence (AAAI-2018), pages 902–909, 2018a.
|
| 255 |
+
H. Aziz, B. Lee, and N. Talmon. Proportionally representative participatory budgeting: Axioms and algorithms. In Proceedings of the 16th International Conference on Autonomous Agents and Multiagent Systems (AAMAS-2017), pages 23–31, 2018b.
|
| 256 |
+
G. Benade, S. Nath, A. D. Procaccia, and N. Shah. Preference elicitation for participatory budgeting. In Proceedings of the 31st AAAI Conference on Artificial Intelligence (AAAI-2017), pages 376–382, 2017.
|
| 257 |
+
J. Byrka, P. Skowron, and K. Sornat. Proportional approval voting, harmonic $k$ -median, and negative association. In In proceedings of 45th International Colloquium on Automata, Languages, and Programming (ICALP-2018), pages 26:1–26:14, 2018.
|
| 258 |
+
Y. Cabannes. Participatory budgeting: a significant contribution to participatory democracy. Environment and Urbanization, 16(1):27–46, 2004.
|
| 259 |
+
Alfonso Cevallos and Alistair Stewart. A verifiably secure and proportional committee election rule. arXiv preprint arXiv:2004.12990, 2020.
|
| 260 |
+
Y. Cheng, Z. Jiang, K. Munagala, and K. Wang. Group fairness in committee selection. In Proceedings of the 2019 ACM Conference on Economics and Computation, pages 263–279, 2019.
|
| 261 |
+
B. Fain, K. Munagala, and N. Shah. Fair allocation of indivisible public goods. In Proceedings of the 2018 ACM Conference on Economics and Computation, pages 575–592, 2018. Extended version arXiv:1805.03164.
|
| 262 |
+
P. Faliszewski, J. Sawicki, R. Schaefer, and M. Smolka. Multiwinner voting in genetic algorithms for solving illposed global optimization problems. In Proceedings of the 19th International Conference on the Applications of Evolutionary Computation, pages 409–424, 2016.
|
| 263 |
+
P. Faliszewski, P. Skowron, A. Slinko, and N. Talmon. Multiwinner voting: A new challenge for social choice theory. In U. Endriss, editor, Trends in Computational Social Choice, pages 27–47. AI Access, 2017.
|
| 264 |
+
P. Faliszewski, P. Skowron, S. Szufa, and N. Talmon. Proportional representation in elections: STV vs PAV. In Proceedings of the 18th International Conference on Autonomous Agents and Multiagent Systems (AAMAS-2019), pages 1946–1948, 2019.
|
| 265 |
+
Z. Jiang, K. Munagala, and K. Wang. Approximately stable committee selection. In Proceedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing (STOC), pages 463–472, 2020.
|
| 266 |
+
M. Lackner and P. Skowron. Consistent approval-based multi-winner rules. In Proceedings of the 19th ACM Conference on Economics and Computation (EC-2018), pages 47–48, 2018.
|
| 267 |
+
M. Lackner and P. Skowron. Approval-based committee voting: Axioms, algorithms, and applications. Technical Report arXiv:2007.01795 [cs.GT], arXiv.org, 2020.
|
| 268 |
+
D. Peters and P. Skowron. Proportionality and the limits of welfarism. In Proceedings of the 2020 ACM Conference on Economics and Computation, pages 793–794, 2020. Extended version arXiv:1911.11747.
|
| 269 |
+
D. Peters, G. Pierczynski, N. Shah, and P. Skowron. Market-based explanations of collective decisions. In Proceedings of the 35th AAAI Conference on Artificial Intelligence (AAAI-2021), 2021.
|
| 270 |
+
L. Sánchez-Fernández, E. Elkind, M. Lackner, N. Fernández, J. A. Fisteus, P. Basanta Val, and P. Skowron. Proportional justified representation. In Proceedings of the 31st AAAI Conference on Artificial Intelligence (AAAI-2017), pages 670–676, 2017.
|
| 271 |
+
P. Skowron. Proportionality degree of multiwinner rules. Technical Report arXiv:1810.08799 [cs.GT], arXiv.org, 2018.
|
| 272 |
+
P. Skowron, P. Faliszewski, and J. Lang. Finding a collective set of items: From proportional multirepresentation to group recommendation. Artificial Intelligence, 241:191–216, 2016.
|
| 273 |
+
P. Skowron, M. Lackner, M. Brill, D. Peters, and E. Elkind. Proportional rankings. In Proceedings of the 24th International Joint Conference on Artificial Intelligence (IJCAI-2017), pages 409–415, 2017.
|
| 274 |
+
Dariusz Stolicki, Stanisław Szufa, and Nimrod Talmon. Pabulib: A participatory budgeting library. arXiv preprint arXiv:2012.06539, 2020.
|
| 275 |
+
N. Talmon and P. Faliszewski. A framework for approval-based budgeting methods. In Proceedings of the 33rd AAAI Conference on Artificial Intelligence (AAAI-2019), pages 2181–2188, 2019.
|
| 276 |
+
T. N. Thiele. Om flerfoldsvalg. In Oversigt over det Kongelige Danske Videnskabernes Selskabs Forhandlinger, pages 415–441. 1895.
|
| 277 |
+
N. Tideman and D. Richardson. Better voting methods through technology: The refinementmanageability trade-off in the Single Transferable Vote. Public Choice, 103(1–2):13–34, 2000.
|
| 278 |
+
D. Woodall. Properties of preferential election rules. Voting Matters, 3:Paper 4, 1994.
|
md/train/5vShUEyjmm/5vShUEyjmm.md
ADDED
|
@@ -0,0 +1,389 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# DUAL CONTRADISTINCTIVE GENERATIVE AUTOENCODER
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
We present a new generative autoencoder model with dual contradistinctive losses to improve generative autoencoder that performs simultaneous inference (reconstruction) and synthesis (generation). We name our model dual contradistinctive generative autoencoder (DC-VAE) that integrates an instance-level discriminative loss (maintaining the instance-level fidelity for the reconstruction/synthesis) with a set-level adversarial loss (encouraging the set-level fidelity for the reconstruction/synthesis), both being contradistinctive. There also exists a mathematical connection between the instance-based classification and instance-level conditional distribution. DC-VAE achieves competitive results in three tasks, including image synthesis, image reconstruction, and representation learning. DC-VAE is applicable to various tasks in computer vision and machine learning.
|
| 8 |
+
|
| 9 |
+

|
| 10 |
+
(a) DC-VAE (ours) Reconstruction results. Left: $1 2 8 \times 1 2 8$ . Right: $5 1 2 \times 5 1 2$ .
|
| 11 |
+
|
| 12 |
+

|
| 13 |
+
(b) DC-VAE (ours) Sampling results. Left: $1 2 8 \times 1 2 8$ . Right: $5 1 2 \times 5 1 2$
|
| 14 |
+
Figure 1: DC-VAE Reconstruction (top) and Sampling (bottom) on LSUN Bedroom $\mathrm { Y u }$ et al. (2015) at resolution $1 2 8 \times 1 2 8$ (left) and CelebA-HQ (Karras et al., 2018) at resolution $5 1 2 \times 5 1 2$ (right).
|
| 15 |
+
|
| 16 |
+
# 1 INTRODUCTION
|
| 17 |
+
|
| 18 |
+
Tremendous progress has been made in deep learning for the development of various learning frameworks (Krizhevsky et al., 2012; He et al., 2016; Goodfellow et al., 2014; Vaswani et al., 2017). Autoencoder (AE) (LeCun, 1987; Hinton & Zemel, 1994) aims to compactly represent and faithfully reproduce the original input signal by concatenating an encoder and a decoder in an end-to-end learning framework. The goal of AE is to make the encoded representation semantically efficient and sufficient to reproduce the input signal by its decoder. Autoencoder’s generative companion, variational autoencoder (VAE) (Kingma & Welling, 2014), additionally learns a variational model for the latent variables to capture the underlying sample distribution. For the encoder and decoder models separately, tremendous progress has been made in image classification with deep convolutional neural network (CNN) (Krizhevsky et al., 2012; He et al., 2016) (an encoder) and in image generation with generative adversarial network (GAN) (Goodfellow et al., 2014) (a decoder).
|
| 19 |
+
|
| 20 |
+
The key objective for a generative autoencoder is to maintain two types of fidelities: (1) an instancelevel fidelity to make the reconstruction/synthesis faithful to the individual input data sample, and (2) a set-level fidelity to make the reconstruction/synthesis of the decoder faithful to the entire input data set. The VAE/GAN algorithm (Larsen et al., 2016) combines a reconstruction loss with an adversarial loss. However, the result of VAE/GAN is sub-optimal, as shown in Table 1.
|
| 21 |
+
|
| 22 |
+
The pixel-wise reconstruction loss in the standard VAE (Kingma & Welling, 2014) typically results in blurry images with degenerated semantics. A possible solution to resolving the above conflict lies in two aspects: (1) turning the measure in the pixel space into induced feature space that is more semantically meaningful; (2) changing the L2 distance (per-pixel) into a learned instance-level distance function for the entire image (akin to generative adversarial networks which learn set-level distance functions). Taking these two steps allows us to design an instance-level classification loss that is aligned with the adversarial loss in the GAN model enforcing set-level fidelity. Motivated by the above observations, we develop a new generative autoencoder model with dual contradistinctive losses by adopting a discriminative loss performing instance-level classification (enforcing the instance-level fidelity), which is rooted in metric learning (Kulis et al., 2012) and contrastive learning (Hadsell et al., 2006; Wu et al., 2018; van den Oord et al., 2018). Combined with the adversarial losses for the set-level fidelity, both terms are formulated in the induced feature space performing contradistinction: (1) the instance-level contrastive loss considers each input instance (image) itself as a class, and (2) the set-level adversarial loss treats the entire input set as a positive class. We name our method dual contradistinctive generative autoencoder (DC-VAE) and make the following contributions.
|
| 23 |
+
|
| 24 |
+
• We develop a new algorithm, dual contradistinctive generative autoencoder (DC-VAE), by combining instance-level and set-level classification losses in the VAE framework, and systematically show the significance of these two loss terms in DC-VAE.
|
| 25 |
+
• The effectiveness of DC-VAE is illustrated in three tasks altogether, including image synthesis, image reconstruction, and representation learning.
|
| 26 |
+
|
| 27 |
+
# 2 RELATED WORK
|
| 28 |
+
|
| 29 |
+
Related work can be roughly divided into three categories: (1) generative autoencoder, (2) deep generative model, and (3) contrastive learning.
|
| 30 |
+
|
| 31 |
+
Variational autoencoder (VAE) (Kingma & Welling, 2014) points to an exciting direction of generative models by developing an Evidence Lower BOund (ELBO) objective (Higgins et al., 2017; Ding et al., 2020). However, the VAE reconstruction/synthesis is known to be blurry. To improve the image quality, a sequence of VAE based models have been developed (Larsen et al., 2016; Dumoulin et al., 2017; Huang et al., 2018; Brock et al., 2018; Zhang et al., 2019). VAE/GAN (Larsen et al., 2016) adopts an adversarial loss to improve the quality of the image, but its output for both reconstruction and synthesis (new samples) is still unsatisfactory. IntroVAE Huang et al. (2018) adds a loop from the output back to the input and is able to attain image quality that is on par with some modern GANs in some aspects. However, its full illustration for both reconstruction and synthesis is unclear. PGA (Zhang et al., 2019) adds a constraint to the latent variables.
|
| 32 |
+
|
| 33 |
+
Pioneering works of (Tu, 2007; Gutmann & Hyvärinen, 2012) alleviate the difficulty of learning densities by approximating likelihoods via classification (real (positive) samples vs. fake (pseudonegative or adversarial) samples). Generative adversarial network (GAN) (Goodfellow et al., 2014) builds on neural networks and amortized sampling (a decoder network that maps a noise into an image). The subsequent development after GAN (Radford et al., 2016; Arjovsky et al., 2017; Gulrajani et al., 2017; Karras et al., 2018; Gong et al., 2019; Dumoulin et al., 2017; Donahue et al., 2017) has led to a great leap forward in building decoder-based generative models. It has been widely observed that the adversarial loss in GANs contributes significantly to the improved quality of image synthesis. Energy-based generative models (Salakhutdinov & Hinton, 2009; Xie et al., 2016; Jin et al., 2017; Lee et al., 2018) — which aim to directly model data density — are making a steady improvement for a simultaneously generative and discriminative single model.
|
| 34 |
+
|
| 35 |
+
From another angle, contrastive learning (Hadsell et al., 2006; Wu et al., 2018; He et al., 2020; Chen et al., 2020) has lately shown its particular advantage in unsupervised training of CNN features. It overcomes the limitation in unsupervised learning where class label is missing by turning each image instance into one class. Thus, the softmax function in the standard discriminative classification training can be applied. Contrastive learning can be connected to metric learning (Bromley et al., 1993; Chopra et al., 2005; Chechik et al., 2010).
|
| 36 |
+
|
| 37 |
+
In this paper, we aim to improve VAE (Kingma & Welling, 2014) by introducing a contrastive loss (van den Oord et al., 2018) to address instance-level fidelity between the input and the reconstruction in the induced feature space. Unlike in self-supervised representation learning methods (van den Oord et al., 2018; He et al., 2020; Chen et al., 2020), where self-supervision requires generating a transformed input (via data augmentation operations), the reconstruction naturally fits into the contrastive term that encourages the matching between the reconstruction and the input image instance, while pushing the reconstruction away from the rest of the images in the entire training set. Thus, the instance-level and set-level contradistinctive terms collaborate with each to encourage the high fidelity of the reconstruction and synthesis. In Figure 3, we systematically show the significance of with and without the instance-level and the set-level contradistinctive terms. In addition, we explore multi-scale contrastive learning via two schemes in Section 4.1: 1) deep supervision for contrastive learning in different convolution layers, and 2) patch-based contrastive learning for fine-grained data fidelity. In the experiments, we show competitive results for the proposed dual contradistinctive generative autoencoder (DC-VAE) in a number of benchmarks for three tasks, including image synthesis, image reconstruction, and representation learning.
|
| 38 |
+
|
| 39 |
+
# 3 PRELIMINARIES: VAE AND VAE/GAN
|
| 40 |
+
|
| 41 |
+
Variational autoencoder (VAE) Assume a given training set $S = \{ \mathbf { x } _ { i } \} _ { i = 1 } ^ { n }$ where each $\mathbf { x } _ { i } \in \mathbb { R } ^ { m }$ We suppose that each $\mathbf { x } _ { i }$ is sampled from a generative process $p ( \mathbf { x } | \mathbf { z } )$ . In the literature, vector $\mathbf { z }$ refers to latent variables. In practice, latent variables $\mathbf { z }$ and the generative process $p ( \mathbf { x } | \mathbf { z } )$ are unknown. The objectives of a variational autoencoder (VAE) (Kingma & Welling, 2014) is to simultaneously train an inference network $q _ { \phi } ( \mathbf { z } | \mathbf { x } )$ and a generator network $p _ { \pmb { \theta } } ( \mathbf { x } | \mathbf { z } )$ . In VAE (Kingma $\&$ Welling, 2014), the inference network is a neural network that outputs parameters for Gaussian distribution $q _ { \phi } ( \mathbf { z } | \mathbf { x } ) = \mathcal { N } ( \mu _ { \phi } ( \mathbf { x } ) , \Sigma _ { \phi } ( \mathbf { x } ) )$ . The generator is a deterministic neural network $f _ { \pmb \theta } ( \mathbf z )$ parameterized by $\pmb { \theta }$ . Generative density $p _ { \pmb { \theta } } ( \mathbf { x } | \mathbf { z } )$ is assumed to be subject to a Gaussian distribution: $p _ { \pmb { \theta } } ( \mathbf { x } | \mathbf { z } ) = \dot { \mathcal { N } } ( f _ { \pmb { \theta } } ( \mathbf { z } ) , \sigma ^ { 2 } I )$ . These models can be trained by minimizing the negative of evidence lower bound (ELBO) in Eq. (1) below.
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
\begin{array} { r } { \mathcal { L } _ { \mathrm { E L B O } } ( \pmb { \theta } , \phi ; \mathbf { x } ) = - \mathbb { E } _ { \mathbf { z } \sim q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } [ \mathrm { l o g } ( p _ { \theta } ( \mathbf { x } | \mathbf { z } ) ) ] + K L [ q _ { \phi } ( \mathbf { z } | \mathbf { x } ) | | p ( \mathbf { z } ) ] } \end{array}
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
where $p ( \mathbf { z } )$ is the prior, which is assumed to be $\mathcal { N } ( 0 , I )$ . The first term $- \mathbb { E } _ { q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } [ \log ( p _ { \pmb { \theta } } ( \mathbf { x } | \mathbf { z } ) ) ]$ reduces to standard pixel-wise reconstruction loss $\mathbb { E } _ { q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } [ | | \mathbf { x } - f _ { \theta } ( \mathbf { z } ) | | _ { 2 } ^ { 2 } ]$ (up to a constant) due to the Gaussian assumption. The second term is the regularization term, which prevents the conditional $q _ { \phi } ( \mathbf { z } | \mathbf { x } )$ from deviating from the Gaussian prior $\mathcal { N } ( 0 , I )$ . The inference network and generator network are jointly optimized over training samples by:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
\operatorname* { m i n } _ { \theta , \phi } \operatorname* { \mathbb { E } } _ { \mathbf { x } \sim p _ { \mathrm { d a t a } } ( \mathbf { x } ) } \mathcal { L } _ { \mathrm { E L B O } } ( \theta , \phi ; \mathbf { x } ) .
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
where $p _ { \mathrm { d a t a } }$ is the distribution induced by the training set $S$ .
|
| 54 |
+
|
| 55 |
+
VAE has an elegant formulation. However, it relies on a pixel-wise reconstruction loss, which is known not ideal to be reflective of perceptual realism (Johnson et al., 2016; Isola et al., 2017), often resulting in blurry images. From another viewpoint, it can be thought of as using a kernel density estimator (with an isotropic Gaussian kernel) in the pixel space. Although allowing efficient training and inference, such a non-parametric approach is overly simplistic for modeling the semantics and perception of natural images.
|
| 56 |
+
|
| 57 |
+
VAE/GAN Generative adversarial networks (GANs) (Goodfellow et al., 2014) and its variants (Radford et al., 2016), on the other hand, are shown to be producing highly realistic images. The success was largely attributed to learning a fidelity function (often referred to as a discriminator) that measures how realistic the generated images are. This can be achieved by learning to contrast (classify) the set of training images with the set of generated images (Tu, 2007; Gutmann & Hyvärinen, 2012; Goodfellow et al., 2014).
|
| 58 |
+
|
| 59 |
+
VAE/GAN (Larsen et al., 2016) augments the ELBO objective (Eq. (2)) with the GAN objective. Specifically, the objective of VAE/GAN consists of two terms, namely the modified ELBO (Eq. (3))
|
| 60 |
+
|
| 61 |
+
and the GAN objective. To make the notations later consistent, we now define the set of given training images as ${ \cal { S } } = \{ { \bf { x } } _ { i } \} _ { i = 1 } ^ { n }$ in which a total number of $n$ unlabeled training images are present. For each input image $\mathbf { x } _ { i }$ , the modified ELBO computes the reconstruction loss in the feature space of the discriminator instead of the pixel space:
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
\mathcal { L } _ { \mathrm { E L B O } } ( \theta , \phi , D ; \mathbf { x } _ { i } ) = \mathbb { E } _ { \mathbf { z } \sim q _ { \phi } ( \mathbf { z } | \mathbf { x } _ { i } ) } [ | | F _ { D } ( \mathbf { x } _ { i } ) - F _ { D } ( f _ { \theta } ( \mathbf { z } ) ) | | _ { 2 } ^ { 2 } ] + K L [ q _ { \phi } ( \mathbf { z } | \mathbf { x } _ { i } ) | | p ( \mathbf { z } ) ]
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
where $F _ { D } ( \cdot )$ denotes the feature embedding from the discriminator $D$ . Feature reconstruction loss (also referred to as perceptual loss), similar to that in style transfer (Johnson et al., 2016). The modified GAN objective considers both reconstructed images (latent code from $q _ { \phi } ( \mathbf { z } | \mathbf { x } ) )$ and sampled images (latent code from the prior $p ( \mathbf { z } ) .$ ) as its fake samples:
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
\begin{array} { r } { \mathcal { L } _ { \mathrm { G A N } } ( \pmb { \theta } , \phi , D ; \mathbf { x } _ { i } ) = \log D ( \mathbf { x } _ { i } ) + \mathbb { E } _ { \mathbf { z } \sim q _ { \phi } ( \mathbf { z } | \mathbf { x } _ { i } ) } \log ( 1 - D ( f _ { \theta } ( \mathbf { z } ) ) + \mathbb { E } _ { \mathbf { z } \sim p ( \mathbf { z } ) } \log ( 1 - D ( f _ { \theta } ( \mathbf { z } ) ) . } \end{array}
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
The VAE/GAN objective becomes:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\operatorname* { m i n } _ { \theta , \phi } \operatorname* { m a x } _ { D } \sum _ { i = 1 } ^ { n } \left[ \mathcal { L } _ { \mathrm { E L B O } } ( \theta , \phi , D ; \mathbf { x } _ { i } ) + \mathcal { L } _ { \mathrm { G A N } } ( \theta , \phi , D ; \mathbf { x } _ { i } ) \right] .
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
# 4 DUAL CONTRADISTINCTIVE GENERATIVE AUTOENCODER (DC-VAE)
|
| 80 |
+
|
| 81 |
+
Here we want to address a question: Is the degeneration of the synthesized images by VAE always the case once the decoder is joined with an encoder? Can the problem be remedied by using a more informative loss?
|
| 82 |
+
|
| 83 |
+
Although improving the image qualities of VAE by integrating a set-level contrastive loss (GAN objective of Eq. (4)), VAE/GAN still does not accurately model instance-level fidelity. Inspired by the literature on instance-level classification (Malisiewicz et al., 2011), approximating likelihood by classification (Tu, 2007), and contrastive learning (Hadsell et al., 2006; Wu et al., 2018; He et al., 2020), we propose to model instance-level fidelity by contrastive loss (commonly referred to as InfoNCE loss) (van den Oord et al., 2018). In DC-VAE, we perform the following minimization and loosely call each term a loss.
|
| 84 |
+
|
| 85 |
+
$$
|
| 86 |
+
\mathcal { L } _ { \mathrm { i n s t a n c e } } ( \pmb { \theta } , \phi , D ; i , \{ \mathbf { x } _ { j } \} _ { j = 1 } ^ { n } ) \triangleq - \mathbb { E } _ { \mathbf { z } \sim q _ { \phi } ( \mathbf { z } | \mathbf { x } _ { i } ) } \left[ \log \frac { e ^ { h ( \mathbf { x } _ { i } , f _ { \pmb { \theta } } ( \mathbf { z } ) ) } } { \sum _ { j = 1 } ^ { n } e ^ { h ( \mathbf { x } _ { j } , f _ { \pmb { \theta } } ( \mathbf { z } ) ) } } \right] ,
|
| 87 |
+
$$
|
| 88 |
+
|
| 89 |
+
where $i$ is an index for a training sample (instance), $\{ { \bf x } _ { j } \} _ { j = 1 } ^ { n }$ is the union of positive samples and negative samples, $h ( \mathbf x , \mathbf y )$ is the critic function that measures compatibility between $\mathbf { x }$ and $\mathbf { y }$ . Following the popular choice from (He et al., 2020), $h ( \mathbf x , \mathbf y )$ is the cosine similarity between the embeddings of $\mathbf { x }$ and y: $\begin{array} { r } { h ( \mathbf { x } , \mathbf { y } ) = \frac { F _ { D } ( \mathbf { x } ) ^ { \top } F _ { D } ( \mathbf { y } ) } { | | F _ { D } ( \mathbf { x } ) | | _ { 2 } | | F _ { D } ( \mathbf { y } ) | | _ { 2 } } } \end{array}$ . Note that unlike in contrastive self-supervised learning methods (van den Oord et al., 2018; He et al., 2020; Chen et al., 2020) where two views (independent augmentations) of an instance constitutes a positive pair, an input instance $\mathbf { x } _ { i }$ and its reconstruction $f _ { \pmb \theta } ( \mathbf z )$ comprises a positive pair in DC-VAE. Likewise, the reconstruction $f _ { \pmb \theta } ( \mathbf z )$ and any instance that is not $\mathbf { x } _ { i }$ can be a negative pair.
|
| 90 |
+
|
| 91 |
+
To bridge the gap between the instance-level contrastive loss (Eq. (6)) and log-likelihood in ELBO term (Eq. (1)), we show the following observation.
|
| 92 |
+
|
| 93 |
+
Theorem 1 (From (Ma & Collins, 2018; Poole et al., 2019)) The following objective is minimized, i.e., the optimal critic $h$ is achieved, when $h ( f _ { \pmb \theta } ( \mathbf { z } ) , \mathbf { x } ) = \log { p ( \mathbf { x } | \mathbf { z } ) } + \overset { \cdot } { c } ( \mathbf { x } )$ where $c ( \mathbf { x } )$ is any function that does not depend on $\mathbf { z }$ .
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
I _ { N C E } \triangleq \mathbb { E } _ { { \mathbf { x } } _ { 1 } , \cdots { \mathbf { x } } _ { K } } \mathbb { E } _ { i } \big [ \mathcal { L } _ { i n s t a n c e } ( \pmb { \theta } , \phi , D ; i , \{ { \mathbf { x } } _ { j } \} _ { j = 1 } ^ { n } ) \big ] .
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
From Theorem 1, we see that the contrastive loss of Eq. (6) implicitly estimates the log-likelihood $\log p _ { \theta } ( \mathbf { x } | \mathbf { z } )$ required for the evidence lower bound (ELBO). Hence, we modify the ELBO objective of Eq. (1) as follows and name it as implicit ELBO (IELBO):
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\mathcal { L } _ { \mathrm { I E L B O } } ( \pmb { \theta } , \phi , D ; \mathbf { x } _ { i } ) = \mathcal { L } _ { \mathrm { i n s t a n c e } } ( \pmb { \theta } , \phi , D ; i , \{ \mathbf { x } _ { j } \} _ { j = 1 } ^ { n } ) + K L [ q _ { \phi } ( \mathbf { z } | \mathbf { x } _ { i } ) | | p ( \mathbf { z } ) ] .
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+

|
| 106 |
+
Figure 2: Model architecture for the proposed DC-VAE algorithm.
|
| 107 |
+
|
| 108 |
+
Finally, the combined objective for the proposed DC-VAE algorithm becomes:
|
| 109 |
+
|
| 110 |
+
$$
|
| 111 |
+
\operatorname* { m i n } _ { \theta , \phi } \operatorname* { m a x } _ { D } \sum _ { i = 1 } ^ { n } \left[ \mathcal { L } _ { \mathrm { I E L B O } } ( \theta , \phi , D ; \mathbf { x } _ { i } ) + \mathcal { L } _ { \mathrm { G A N } } ( \theta , \phi , D ; \mathbf { x } _ { i } ) \right] .
|
| 112 |
+
$$
|
| 113 |
+
|
| 114 |
+
The definition of $\mathcal { L } _ { \mathrm { G A N } }$ follows Eq. (4). Note here we also consider the term in Eq. (4) as contrasdistinctive since it tries to minimize the difference/discriminative classification between the input (“real”) image set and the reconstructed/generated (“fake”) image set. Below we highlight the significance of the two contradistinctive terms. Figure 2 shows the model architecture.
|
| 115 |
+
|
| 116 |
+
• Instance-level fidelity. The first item in Eq. (8) is an instance-level fidelity term encouraging the reconstruction to be as close as possible to the input image while being different from all the rest of the images. A key advantage of the contrastive loss in Eq. (8) over the standard reconstruction loss in Eq. (3) is its relaxed and background instances aware formulation. In general, the reconstruction in Eq. (3) wants a perfect match between the reconstruction and the input, whereas the contrastive loss in Eq. (8) requests for being the most similar one among the training samples. This way, the contrastive loss becomes more cooperative with less conflict to the GAN loss, compared with the reconstruction loss. The introduction of the contrastive loss results in a significant improvement over VAE and VAE/GAN in which only matching the reconstruction, and the input instance is enforced.
|
| 117 |
+
|
| 118 |
+
• Set-level fidelity. The second item in Eq. (9) is a set-level fidelity term encouraging the entire set of synthesized images to be non distinguishable from the input image set. Having this term (Eq. (4)) is still important since the instance contrastive loss alone (Eq. (9)) will also lead to a degenerated situation: the input image and its reconstruction can be projected to the same point in the new feature space, but without a guarantee that the reconstruction itself lies on the valid “real” image manifold.
|
| 119 |
+
|
| 120 |
+
As shown in Figure 3 and Table 1 for the comparison with and without the individual terms in Eq. (9). We observe evident effectiveness of the proposed DC-VAE combining both the instance-level fidelity term (Eq. (6)) and the set-level fidelity term (Eq. (4)), compared with VAE (using pixel-wise reconstruction loss without the GAN objective), VAE-GAN (using feature reconstruction loss and the GAN objective), and VAE contrastive (using contrastive loss but without the GAN objective).
|
| 121 |
+
|
| 122 |
+
In the experiments, we show that both terms required to achieve faithful reconstruction (captured by InfoNCE loss) with perceptual realism (captured by the GAN loss).
|
| 123 |
+
|
| 124 |
+
# 4.1 MULTI SCALE CONTRASTIVE LEARNING
|
| 125 |
+
|
| 126 |
+
Inspired by (Lee et al., 2015), we utilize information from feature maps at different scales. In addition to contrasting on the last layer of $D$ in Equation 9, we add contrastive objective on $f _ { l } ( \mathbf { z } )$ where $f _ { l }$ is some function on top of an intermediate layer $l$ of D. We do it in two different ways.
|
| 127 |
+
|
| 128 |
+
1. Deep supervision: We use $1 \times 1$ convolution to reduce the dimension channel-wise, and use a linear layer to obtain $f _ { l }$ .
|
| 129 |
+
2. Local patch: We use a random location across channel at layer $l$ (size: $1 \times 1 \times \mathrm { d }$ , where d is the channel depth).
|
| 130 |
+
|
| 131 |
+
The intuition for the second is that in a convolutional neural network, one location at a feature map corresponds to a receptive area (patch) in the original image. Thus, by contrasting locations across channels in the same feature maps, we are encouraging the original image and the reconstruction to image have locally similar content, while encouraging them to have locally dissimilar content in other images. We use deep supervision for initial training, and add local patch after certain iterations.
|
| 132 |
+
|
| 133 |
+
# 5 EXPERIMENTS
|
| 134 |
+
|
| 135 |
+

|
| 136 |
+
Figure 3: Qualitative results of CIFAR-10 (Krizhevsky et al., 2009) images (resolution $3 2 \times 3 2$ ) for experiments in Table 1 (Krizhevsky et al., 2009).
|
| 137 |
+
|
| 138 |
+
# 5.1 IMPLEMENTATION
|
| 139 |
+
|
| 140 |
+
Datasets To validate our method, we train our method on several different datasets — CIFAR-10 (Krizhevsky et al., 2009), STL-10 (Coates et al., 2011), CelebA (Liu et al., 2015), CelebA-HQ (Karras et al., 2018), and LSUN bedroom (Yu et al., 2015). See the appendix for more detailed descriptions.
|
| 141 |
+
|
| 142 |
+
Network architecture For $3 2 \times 3 2$ resolution, we design the encoder and decoder subnetworks of our model in a similar way to the discriminator and generator found through neural architecture search in AutoGAN (Gong et al., 2019). For the higher resolution experiments $1 2 8 \times 1 2 8$ and $5 1 2 \times 5 1 2$ resolution), we use Progressive GAN (Karras et al., 2018) as the backbone. Network architecture diagram is available in the appendix.
|
| 143 |
+
|
| 144 |
+
Training details The number of negative samples for contrastive learning is 8096 for all datasets. The latent dimension for the VAE decoder is 128 for CIFAR-10, STL-10, and 512 for CelebA, CelebA-HQ and LSUN Bedroom. Learning rate is 0.0002 with Adam parameters of $( \beta _ { 1 } , \beta _ { 2 } ) = ( 0 . 0 , 0 . 9 )$ and a batch size of 128 for CIFAR-10 and STL-10. For CelebA, CelebA-HQ, LSUN Bedroom datasets, we use the optimizer parameters given in (Karras et al., 2018). The contrastive embedding dimension used is 16 for each of the experiments.
|
| 145 |
+
|
| 146 |
+
# 5.2 ABLATION STUDY
|
| 147 |
+
|
| 148 |
+
Table 1: Ablation studies on CIFAR-10 for the proposed DC-VAE algorithm. We follow (Johnson et al., 2016) and measure perceptual distance in an relu4_3 layer of a pretrained VGG network. $\downarrow$ means lower is better. ↑ means higher is better.
|
| 149 |
+
|
| 150 |
+
<table><tr><td>Method</td><td>FID↓/IS↑ Sampling</td><td>FID↓/IS↑ Reconstruction</td><td>Pixel↓ Distance</td><td>Perceptual↓ Distance</td></tr><tr><td>VAE</td><td>115.8 /3.8</td><td>108.4/4.3</td><td>21.8</td><td>65.8</td></tr><tr><td>VAE/GAN</td><td>39.8 /7.4</td><td>29.0 /7.6</td><td>62.7</td><td>57.2</td></tr><tr><td>VAE-Contrastive</td><td>240.4 /1.8</td><td>242 /1.9</td><td>53.6</td><td>104.2</td></tr><tr><td>DC-VAE</td><td>17.9 /8.2</td><td>21.4 / 7.9</td><td>45.9</td><td>52.9</td></tr></table>
|
| 151 |
+
|
| 152 |
+
To demonstrate the necessity of the GAN loss (Eq. 4) and contrastive loss (Eq. 8), we conduct four experiments with the same backbone. These experiments are: VAE (No GAN, no Contrastive),
|
| 153 |
+
|
| 154 |
+
VAE/GAN (with GAN, no Contrastive), VAE-Contrastive (No GAN, with Contrastive, and ours (With GAN, with Contrastive). Here, GAN denotes Eq. 4, and Contrastive denotes Eq. 8.
|
| 155 |
+
|
| 156 |
+
Qualitative analysis From Figure 3, we see that without GAN and contrastive, images are blurry; Without GAN, the contrastive head can classify images, but not on the image manifold; Without Contrastive, reconstruction images are on the image manifold because of the discriminator, but they are different from input images. These experiments show that it is necessary to combine both instance-level and set-level fidelity, and in a contradistinctive manner.
|
| 157 |
+
|
| 158 |
+
Quantitative analysis In Table 1 we observe the same trend. VAE generates blurry images; thus the FID/IS (Inception Score) is not ideal. VAE-Contrastive does not generate images on the natural manifold; thus FID/IS is poor. VAE/GAN combines set-level and instance-level information. However the L2 objective is not ideal; thus the FID/IS is sub-optimal. For both reconstruction and sampling tasks, DC-VAE generates high fidelity images and has a favorable FID and Inception score. This illustrates the advantange of having a contradistinctive objective on both set level and instance level. To measure the faithfulness of the reconstructed image we compute the pixelwise L2 distance and the perceptual distance (Johnson et al. (2016)). For the pixel distance, VAE has the lowest value because it directly optimizes this distance during training; our pixel-wise distance is better than VAE/GAN and VAE-Contrastive. For perceptual distance, our method outperforms other three, which confirms that using contrastive learning helps reconstruct images semantically.
|
| 159 |
+
|
| 160 |
+
Table 2: Comparison on CIFAR-10 and STL-10. Average Inception scores (Salimans et al., 2016) and FID scores (Heusel et al., 2017). Results derived from (Gong et al., 2019). Table style derived from (Lee et al., 2019). †Result from Aneja et al. (2020). ∗Result from (Dieng et al., 2019).
|
| 161 |
+
|
| 162 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">CIFAR-10</td><td colspan="2">STL-10</td></tr><tr><td>Inception Score↑</td><td>FID↓</td><td>Inception Score↑</td><td>FID↓</td></tr><tr><td>Methods based on GAN:</td><td></td><td></td><td></td><td></td></tr><tr><td>DCGAN (Radford et al.,2016)</td><td>6.6</td><td></td><td></td><td>-</td></tr><tr><td>ProbGAN (He et al.,2019)</td><td>7.8</td><td>24.6</td><td>8.9</td><td>46.7</td></tr><tr><td>WGAN-GP ResNet (Gulrajani et al.,2017)</td><td>7.9</td><td>-</td><td>-</td><td>-</td></tr><tr><td>RaGAN (Jolicoeur-Martineau,2018)</td><td>=</td><td>23.5</td><td>=</td><td>■</td></tr><tr><td>SN-GAN (Miyato et al., 2018)</td><td>8.2</td><td>21.7</td><td>9.1</td><td>40.1</td></tr><tr><td>MGAN (Hoang et al., 2018)</td><td>8.3</td><td>26.7</td><td>-</td><td>-</td></tr><tr><td>Progressive GAN (Karras et al.,2018)</td><td>8.8</td><td>-</td><td>■</td><td>=</td></tr><tr><td>Improving MMD GAN(Wang et al.,2019)</td><td>8.3</td><td>16.2</td><td>9.3</td><td>37.6</td></tr><tr><td>PULSGAN (Guo et al., 2020)</td><td>■</td><td>22.3</td><td>=</td><td>-</td></tr><tr><td>AutoGAN (Gong et al., 2019)</td><td>8.6</td><td>12.4</td><td>9.2</td><td>31.0</td></tr><tr><td>MethodsbasedonVAE:</td><td></td><td></td><td></td><td></td></tr><tr><td>VAE</td><td>3.8</td><td>115.8</td><td></td><td></td></tr><tr><td>VAE/GAN</td><td>7.4</td><td>39.8</td><td></td><td></td></tr><tr><td>VEEGAN* (Srivastava et al.,2017)</td><td>-</td><td>95.2</td><td></td><td></td></tr><tr><td>WAE-GAN (Tolstikhin et al., 2017)</td><td></td><td>93.1</td><td></td><td></td></tr><tr><td>NVAE†(Vahdat & Kautz,202O) Sampling</td><td></td><td>50.8</td><td></td><td></td></tr><tr><td>NVAE† (Vahdat & Kautz,2020) Reconstruction</td><td>=</td><td>2.67</td><td>=</td><td></td></tr><tr><td>DC-VAE Sampling (ours)</td><td>8.2</td><td>17.9</td><td>8.1</td><td>41.9</td></tr><tr><td>DC-VAE Reconstruction (ours)</td><td>7.9</td><td>21.4</td><td>8.4</td><td>43.6</td></tr></table>
|
| 163 |
+
|
| 164 |
+
# 5.3 COMPARISON TO EXISTING GENERATIVE MODELS
|
| 165 |
+
|
| 166 |
+
Table 2 gives a comparison of quantitative measurement for CIFAR-10 and STL-10 dataset. In general, there is a large difference in terms of FID and IS between GAN family and VAE family of models. Our model has state-of-the-art results in VAE family, and is comparable to state-of-the-art GAN models on CIFAR-10. Similarly Table 4 shows that DC-VAE is able to generate images that are comparable to GAN based methods even on higher resolution datasets.
|
| 167 |
+
|
| 168 |
+
# 5.4 LATENT SPACE REPRESENTATION: IMAGE AND STYLE INTERPOLATION
|
| 169 |
+
|
| 170 |
+
We further validate the effectiveness of DC-VAE for representation learning. One benefit of having an AE/VAE framework compared with just a decoder as in GAN Goodfellow et al. (2014) is to be able to directly obtain the latent representation from the input images. The encoder and decoder modules in VAE allows us to readily perform image/style interpolation by mixing the latent variables of different images and reconstruct/synthesize new ones. We demonstrate qualitative results on image interpolation (Fig. 5, Appendix Fig. 9), style interpolation (Appendix Fig. 10) and image editing (Fig. 6). We directly use the trained DC-VAE model without disentanglement learning Karras et al. (2019). Additional latent space analysis and the method used for interpolation and editing is provided in the Appendix. We also quantitatively compare the latent space disentanglement through the perceptual path length (PPL) (Karras et al., 2019) (Table 6). We observe that DC-VAE learns a more disentangled latent space representation than the backbone Progressive GAN (Karras et al., 2018) and StyleALAE (Pidhorskyi et al., 2020) that uses a much more capable StyleGAN (Karras et al., 2019) backbone.
|
| 171 |
+
|
| 172 |
+

|
| 173 |
+
(c) DC-VAE Reconstruction (ours, $5 1 2 \times 5 1 2$ ) Figure 4: Comparison of DC-VAE (resolution $5 1 2 \times 5 1 2$ ) with IntroVAE (Huang et al., 2018) (resolution $1 0 2 4 \times 1 0 2 4 )$ ).
|
| 174 |
+
|
| 175 |
+
Table 3: Quality of image generation (FID) comparison on LSUN Bedrooms. $^ \dag 1 2 8 \times 1 2 8$ resolution. $^ \dag 2 5 6 \times 2 5 6$ resolution. $\downarrow$ means lower is better.
|
| 176 |
+
|
| 177 |
+
<table><tr><td>Method</td><td>FID↓</td></tr><tr><td>Progressive GAN‡ (Karras et al.,2018)</td><td>8.3</td></tr><tr><td>SNGANt (Miyato et al.,2018)(from (Chen et al.,2019))</td><td>16.0</td></tr><tr><td>SSGANt(Chen et al., 2019)</td><td>13.3</td></tr><tr><td>StyleALAE(Pidhorskyi et al.,202O) Reconstruction</td><td>15.92</td></tr><tr><td>StyleALAE(Pidhorskyi et al.,2020) Sampling</td><td>17.13</td></tr><tr><td>DC-VAEt (ours) Reconstruction</td><td>10.57</td></tr><tr><td>DC-VAEt (ours) Sampling</td><td>14.3</td></tr></table>
|
| 178 |
+
|
| 179 |
+
Table 4: FID on CelebA. $^ { * } 6 4 \times 6 4$ resolution.
|
| 180 |
+
|
| 181 |
+
<table><tr><td>Method</td><td>FID↓</td></tr><tr><td>Methods based on GAN:</td><td></td></tr><tr><td>PresGAN*(Dieng et al., 2019)</td><td>29.1</td></tr><tr><td>LSGAN(Mao et al.,2017) (from (Hoshen et al.,2019))</td><td>53.9</td></tr><tr><td>COCO-GAN† (Lin et al., 2019)</td><td>5.7</td></tr><tr><td>PGANt (Karras et al.,2018)(from (Lin et al.,2019))</td><td>7.30</td></tr><tr><td>MethodsbasedonVAE:</td><td></td></tr><tr><td>VEE-GAN† (Srivastava et al.,2017) (from (Dieng et al.,2019))</td><td>46.2</td></tr><tr><td>WAE-GAN*(Tolstikhin et al.,2017)</td><td>42</td></tr><tr><td>DC-VAEt (ours) Reconstruction</td><td>14.3</td></tr><tr><td>DC-VAEt (ours) Sampling</td><td>19.9</td></tr></table>
|
| 182 |
+
|
| 183 |
+

|
| 184 |
+
Figure 5: Interpolation results generated by DC-VAE (ours) on CelebA-HQ (Karras et al., 2018) images $( 5 \bar { 1 } 2 \times 5 1 2$ , left) and LSUN Bedroom Yu et al. (2015) images $1 2 8 \times 1 2 8$ , right). More images can be seen in Appendix Figure 9. (Zoom in for a better visualization.)
|
| 185 |
+
|
| 186 |
+
# 5.5 LATENT SPACE REPRESENTATION: CLSSIFICATION
|
| 187 |
+
|
| 188 |
+
To show that our model learns a good representation, we measure the performance on the downstream MNIST classification task (Ding et al., 2020). The VAE models were trained on MNIST dataset (LeCun, 1998). We feed input images into our VAE encoder and get the latent representation. Then we train a linear classifier on the latent representation to classify the classes of the input images. Results in Table 5 show that our model gives the lowest classification error in most cases. This experiment demonstrates that our model not only gains the ability to do faithful synthesis and reconstruction, but also gains better representation ability on the VAE side.
|
| 189 |
+
|
| 190 |
+

|
| 191 |
+
Figure 6: Image editing on CelebA-HQ (Karras et al., 2018) validation set images (resolution $5 1 2 \times 5 1 2$ ). The method used to generate these is outlined in Appendix A.2.
|
| 192 |
+
|
| 193 |
+
Table 5: Comparison to prior VAE-based representation learning methods. Classification error on MNIST dataset. ↓: lower is better. $9 5 \ \%$ confidence intervals are from 5 trials. Results derived from (Ding et al., 2020).
|
| 194 |
+
Table 6: PPL Comparison of on CelebA-HQ Karras et al. (2018)
|
| 195 |
+
|
| 196 |
+
<table><tr><td>Method</td><td>dz=16↓</td><td>dz=32↓</td><td>dz=64↓</td></tr><tr><td>VAE (Kingma&Welling,2014)</td><td>2.92%±0.12</td><td>3.05%±0.42</td><td>2.98%±0.14</td></tr><tr><td>β-VAE(β=2) (Higgins et al.,2017)</td><td>4.69%±0.18</td><td>5.26%±0.22</td><td>5.40%±0.33</td></tr><tr><td>FactorVAE(y=5) (Kim& Mnih,2018)</td><td>6.07%±0.05</td><td>6.18%±0.20</td><td>6.35%±0.48</td></tr><tr><td>β-TCVAE (α=1,β=5,γ=1) (Chen et al.,2018)</td><td>1.62%±0.07</td><td>1.24%±0.05</td><td>1.32%±0.09</td></tr><tr><td>Guided-VAE (Ding et al.,2020)</td><td>1.85%±0.08</td><td>1.60%±0.08</td><td>1.49%±0.06</td></tr><tr><td>Guided-β-TCVAE (Ding et al.,2020)</td><td>1.47%±0.12</td><td>1.10%±0.03</td><td>1.31%±0.06</td></tr><tr><td>DC-VAE (Ours)</td><td>1.30% ±0.035</td><td>1.27%±0.037</td><td>1.29%±0.034</td></tr><tr><td colspan="4"></td></tr><tr><td>Method</td><td colspan="2">Backbone</td></tr><tr><td>StyleALAE (Pidhorskyi et al., 2020)</td><td colspan="2">StyleGAN</td></tr><tr><td>Progressive GAN (Karras et al., 2018)</td><td colspan="2">Progressive GAN</td></tr><tr><td>DC-VAE (ours)</td><td colspan="2">Progressive GAN</td></tr></table>
|
| 197 |
+
|
| 198 |
+
# 6 CONCLUSION
|
| 199 |
+
|
| 200 |
+
In this paper, we have proposed dual contradistinctive generative autoencoder (DC-VAE), a new framework that integrates an instance-level discriminative loss (InfoNCE) with a set-level adversarial loss (GAN) into a single variational autoencoder framework. Our experiments show competitive results for a single model in several tasks, including image synthesis, image reconstruction, representation learning for image interpolation, and representation learning for classification. DC-VAE points to a encouraging direction that attains high-quality synthesis (decoding) and inference (encoding).
|
| 201 |
+
|
| 202 |
+
# REFERENCES
|
| 203 |
+
|
| 204 |
+
Jyoti Aneja, Alexander Schwing, Jan Kautz, and Arash Vahdat. Ncp-vae: Variational autoencoders with noise contrastive priors, 2020.
|
| 205 |
+
|
| 206 |
+
Martin Arjovsky, Soumith Chintala, and Léon Bottou. Wasserstein generative adversarial networks. In ICML, 2017.
|
| 207 |
+
|
| 208 |
+
Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale gan training for high fidelity natural image synthesis. arXiv preprint arXiv:1809.11096, 2018.
|
| 209 |
+
|
| 210 |
+
Jane Bromley, Isabelle Guyon, Yann LeCun, Eduard Säckinger, and Roopak Shah. Signature verification using a “siamese” time delay neural network. In Neural Information Processing Systems, 1993.
|
| 211 |
+
|
| 212 |
+
Gal Chechik, Varun Sharma, Uri Shalit, and Samy Bengio. Large scale online learning of image similarity through ranking. J. Mach. Learn. Res., 11:1109–1135, March 2010. ISSN 1532-4435.
|
| 213 |
+
|
| 214 |
+
Tian Qi Chen, Xuechen Li, Roger B Grosse, and David K Duvenaud. Isolating sources of disentanglement in variational autoencoders. In Advances in Neural Information Processing Systems, 2018.
|
| 215 |
+
|
| 216 |
+
Ting Chen, Xiaohua Zhai, Marvin Ritter, Mario Lucic, and Neil Houlsby. Self-supervised gans via auxiliary rotation loss. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 12154–12163, 2019.
|
| 217 |
+
|
| 218 |
+
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. arXiv:2002.05709, 2020.
|
| 219 |
+
|
| 220 |
+
Sumit Chopra, Raia Hadsell, and Yann LeCun. Learning a similarity metric discriminatively, with application to face verification. In CVPR, pp. 539–546, 2005. ISBN 0769523722.
|
| 221 |
+
|
| 222 |
+
Adam Coates, Andrew $\mathrm { N g }$ , and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In AISTATS, pp. 215–223, 2011.
|
| 223 |
+
|
| 224 |
+
Adji B Dieng, Francisco JR Ruiz, David M Blei, and Michalis K Titsias. Prescribed generative adversarial networks. arXiv:1910.04302, 2019.
|
| 225 |
+
|
| 226 |
+
Zheng Ding, Yifan Xu, Weijian Xu, Gaurav Parmar, Yang Yang, Max Welling, and Zhuowen Tu. Guided variational autoencoder for disentanglement learning. In CVPR, 2020.
|
| 227 |
+
|
| 228 |
+
Jeff Donahue, Philipp Krähenbühl, and Trevor Darrell. Adversarial feature learning. In ICLR, 2017.
|
| 229 |
+
|
| 230 |
+
Vincent Dumoulin, Ishmael Belghazi, Ben Poole, Alex Lamb, Martin Arjovsky, Olivier Mastropietro, and Aaron Courville. Adversarially learned inference. In ICLR, 2017.
|
| 231 |
+
|
| 232 |
+
Xinyu Gong, Shiyu Chang, Yifan Jiang, and Zhangyang Wang. Autogan: Neural architecture search for generative adversarial networks. In ICCV, 2019.
|
| 233 |
+
|
| 234 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In Advances in neural information processing systems, 2014.
|
| 235 |
+
|
| 236 |
+
Ishaan Gulrajani, Faruk Ahmed, Martin Arjovsky, Vincent Dumoulin, and Aaron C Courville. Improved training of wasserstein gans. In Advances in neural information processing systems, 2017.
|
| 237 |
+
|
| 238 |
+
T. Guo, C. Xu, J. Huang, Y. Wang, B. Shi, C. Xu, and D. Tao. On positive-unlabeled classification in gan. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pp. 8382–8390, Los Alamitos, CA, USA, jun 2020. IEEE Computer Society. doi: 10.1109/CVPR42600.2020.00841. URL https://doi.ieeecomputersociety.org/ 10.1109/CVPR42600.2020.00841.
|
| 239 |
+
|
| 240 |
+
Michael U. Gutmann and Aapo Hyvärinen. Noise-contrastive estimation of unnormalized statistical models, with applications to natural image statistics. J. Mach. Learn. Res., 13(null):307–361, February 2012. ISSN 1532-4435.
|
| 241 |
+
|
| 242 |
+
Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In CVPR, 2006.
|
| 243 |
+
|
| 244 |
+
Hao He, Hao Wang, Guang-He Lee, and Yonglong Tian. Probgan: Towards probabilistic gan with theoretical guarantees. In ICLR, 2019.
|
| 245 |
+
|
| 246 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, 2016.
|
| 247 |
+
|
| 248 |
+
Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020.
|
| 249 |
+
|
| 250 |
+
Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In Advances in Neural Information Processing Systems, 2017.
|
| 251 |
+
|
| 252 |
+
Irina Higgins, Loic Matthey, Arka Pal, Christopher Burgess, Xavier Glorot, Matthew Botvinick, Shakir Mohamed, and Alexander Lerchner. beta-vae: Learning basic visual concepts with a constrained variational framework. In ICLR, 2017.
|
| 253 |
+
|
| 254 |
+
Geoffrey E Hinton and Richard S Zemel. Autoencoders, minimum description length and helmholtz free energy. In Advances in neural information processing systems, 1994.
|
| 255 |
+
|
| 256 |
+
Quan Hoang, Tu Dinh Nguyen, Trung Le, and Dinh Phung. Mgan: training generative adversarial nets with multiple generators. In ICLR, 2018.
|
| 257 |
+
|
| 258 |
+
Yedid Hoshen, Ke Li, and Jitendra Malik. Non-adversarial image synthesis with generative latent nearest neighbors. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 5811–5819, 2019.
|
| 259 |
+
|
| 260 |
+
Huaibo Huang, Ran He, Zhenan Sun, Tieniu Tan, et al. Introvae: Introspective variational autoencoders for photographic image synthesis. In Advances in Neural Information Processing Systems, pp. 52–63, 2018.
|
| 261 |
+
|
| 262 |
+
Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. CVPR, 2017.
|
| 263 |
+
|
| 264 |
+
Long Jin, Justin Lazarow, and Zhuowen Tu. Introspective classification with convolutional nets. In Advances in Neural Information Processing Systems, 2017.
|
| 265 |
+
|
| 266 |
+
Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, 2016.
|
| 267 |
+
|
| 268 |
+
Alexia Jolicoeur-Martineau. The relativistic discriminator: a key element missing from standard gan. arXiv preprint arXiv:1807.00734, 2018.
|
| 269 |
+
|
| 270 |
+
Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of gans for improved quality, stability, and variation. In ICLR, 2018.
|
| 271 |
+
|
| 272 |
+
Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 4401–4410, 2019.
|
| 273 |
+
|
| 274 |
+
Hyunjik Kim and Andriy Mnih. Disentangling by factorising. In ICML, 2018.
|
| 275 |
+
|
| 276 |
+
Diederik P Kingma and Max Welling. Auto-encoding variational bayes. In ICLR, 2014.
|
| 277 |
+
|
| 278 |
+
Alex Krizhevsky, Geoffrey Hinton, et al. Learning multiple layers of features from tiny images. Technical report, Citeseer, 2009.
|
| 279 |
+
|
| 280 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, 2012.
|
| 281 |
+
|
| 282 |
+
Brian Kulis et al. Metric learning: A survey. Foundations and trends in machine learning, 5(4): 287–364, 2012.
|
| 283 |
+
|
| 284 |
+
Anders Boesen Lindbo Larsen, Søren Kaae Sønderby, Hugo Larochelle, and Ole Winther. Autoencoding beyond pixels using a learned similarity metric. In ICML, 2016.
|
| 285 |
+
|
| 286 |
+
Yann LeCun. Modeles connexionnistes de lapprentissage. PhD thesis, PhD thesis, These de Doctorat, Universite Paris 6, 1987.
|
| 287 |
+
|
| 288 |
+
Yann LeCun. The mnist database of handwritten digits. http://yann. lecun. com/exdb/mnist/, 1998.
|
| 289 |
+
|
| 290 |
+
Chen-Yu Lee, Saining Xie, Patrick Gallagher, Zhengyou Zhang, and Zhuowen Tu. Deeply-supervised nets. In Artificial intelligence and statistics, pp. 562–570, 2015.
|
| 291 |
+
|
| 292 |
+
Kwonjoon Lee, Weijian Xu, Fan Fan, and Zhuowen Tu. Wasserstein introspective neural networks. In CVPR, 2018.
|
| 293 |
+
|
| 294 |
+
Kwonjoon Lee, Subhransu Maji, Avinash Ravichandran, and Stefano Soatto. Meta-learning with differentiable convex optimization. In CVPR, 2019.
|
| 295 |
+
|
| 296 |
+
Chieh Hubert Lin, Chia-Che Chang, Yu-Sheng Chen, Da-Cheng Juan, Wei Wei, and Hwann-Tzong Chen. Coco-gan: generation by parts via conditional coordinating. In Proceedings of the IEEE International Conference on Computer Vision, pp. 4512–4521, 2019.
|
| 297 |
+
|
| 298 |
+
Ziwei Liu, Ping Luo, Xiaogang Wang, and Xiaoou Tang. Deep learning face attributes in the wild. In ICCV, 2015.
|
| 299 |
+
|
| 300 |
+
Zhuang Ma and Michael Collins. Noise contrastive estimation and negative sampling for conditional models: Consistency and statistical efficiency. In EMNLP, 2018.
|
| 301 |
+
|
| 302 |
+
Tomasz Malisiewicz, Abhinav Gupta, and Alexei A. Efros. Ensemble of exemplar-svms for object detection and beyond. In ICCV, 2011.
|
| 303 |
+
|
| 304 |
+
Xudong Mao, Qing Li, Haoran Xie, Raymond YK Lau, Zhen Wang, and Stephen Paul Smolley. Least squares generative adversarial networks. In Proceedings of the IEEE international conference on computer vision, pp. 2794–2802, 2017.
|
| 305 |
+
|
| 306 |
+
Takeru Miyato, Toshiki Kataoka, Masanori Koyama, and Yuichi Yoshida. Spectral normalization for generative adversarial networks. In ICLR, 2018.
|
| 307 |
+
|
| 308 |
+
Stanislav Pidhorskyi, Donald Adjeroh, and Gianfranco Doretto. Adversarial latent autoencoders, 2020.
|
| 309 |
+
|
| 310 |
+
Ben Poole, Sherjil Ozair, Aaron Van Den Oord, Alex Alemi, and George Tucker. On variational bounds of mutual information. In ICML, 2019.
|
| 311 |
+
|
| 312 |
+
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016.
|
| 313 |
+
|
| 314 |
+
Ruslan Salakhutdinov and Geoffrey Hinton. Deep boltzmann machines. In David van Dyk and Max Welling (eds.), AISTATS, volume 5, pp. 448–455, 16–18 Apr 2009.
|
| 315 |
+
|
| 316 |
+
Tim Salimans, Ian Goodfellow, Wojciech Zaremba, Vicki Cheung, Alec Radford, and Xi Chen. Improved techniques for training gans. In Advances in Neural Information Processing Systems, 2016.
|
| 317 |
+
|
| 318 |
+
Akash Srivastava, Lazar Valkov, Chris Russell, Michael U Gutmann, and Charles Sutton. Veegan: Reducing mode collapse in gans using implicit variational learning. In Advances in Neural Information Processing Systems, pp. 3308–3318, 2017.
|
| 319 |
+
|
| 320 |
+
Ilya Tolstikhin, Olivier Bousquet, Sylvain Gelly, and Bernhard Schoelkopf. Wasserstein auto-encoders. arXiv preprint arXiv:1711.01558, 2017.
|
| 321 |
+
|
| 322 |
+
Zhuowen Tu. Learning generative models via discriminative approaches. In CVPR, 2007.
|
| 323 |
+
Arash Vahdat and Jan Kautz. NVAE: A deep hierarchical variational autoencoder. In Neural Information Processing Systems (NeurIPS), 2020.
|
| 324 |
+
Aäron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. CoRR, abs/1807.03748, 2018. URL http://arxiv.org/abs/1807.03748.
|
| 325 |
+
Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, 2017.
|
| 326 |
+
Wei Wang, Yuan Sun, and Saman Halgamuge. Improving mmd-gan training with repulsive loss function. In ICLR, 2019.
|
| 327 |
+
Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, pp. 3733–3742, 2018.
|
| 328 |
+
Jianwen Xie, Yang Lu, Song-Chun Zhu, and Yingnian Wu. A theory of generative convnet. In ICML, 2016.
|
| 329 |
+
Fisher Yu, Yinda Zhang, Shuran Song, Ari Seff, and Jianxiong Xiao. Lsun: Construction of a largescale image dataset using deep learning with humans in the loop. arXiv preprint arXiv:1506.03365, 2015.
|
| 330 |
+
Zijun Zhang, Ruixiang Zhang, Zongpeng Li, Yoshua Bengio, and Liam Paull. Perceptual generative autoencoders. In ICLR, 2019.
|
| 331 |
+
|
| 332 |
+
A APPENDIX
|
| 333 |
+
|
| 334 |
+
# A.1 Additional reconstruction results
|
| 335 |
+
|
| 336 |
+

|
| 337 |
+
Figure 7: Additional CelebA-HQ (Karras et al., 2018) reconstruction images (resolution $5 1 2 \times 5 1 2$ ) generated by DC-VAE (ours)
|
| 338 |
+
|
| 339 |
+

|
| 340 |
+
Figure 8: Additional LSUN Bedroom (Yu et al., 2015) reconstruction images (resolution $1 2 8 \times 1 2 8$
|
| 341 |
+
|
| 342 |
+
# A.2 Analysing the latent space
|
| 343 |
+
|
| 344 |
+
In this section we analyse the smoothness of the latent space learnt by DC-VAE. In Figure 9 we qualitatively show the high resolution $( 5 1 2 \times 5 1 2 )$ CelebA-HQ Karras et al. (2018) images generated by an evenly spaced linear blending between two latent vectors. In Fig. 6 we show that DC-VAE is able to perform meaningful attribute editing on images while retaining the original identity. To perform image editing, we first need to compute the direction vector in the latent space that correspond to a desired attribute (e.g. has glasses, has blonde hair, is a woman, has facial hair). We compute these attribute direction vectors by selecting 20 images that have the attribute and 20 images that do not have the attribute, obtaining the corresponding pairs of 20 latent vectors, and calculating the difference of the mean. The results in Fig. 6 show that these direction vectors can be added to a latent vector to add a diverse combination of desired image attributes while retaining the original identity of the individual.
|
| 345 |
+
|
| 346 |
+
Additionally we corroborate the above qualitative results quantitatively by inspecting the Perceptual Path Length (PPL) Karras et al. (2019) of our learn DC-VAE Decoder (Tab. 6) to measures the disentanglement of the latent space. We note that although ProgressiveGAN (ours base model) has a better FID score, DC-VAE has a lower PPL score which indicated that the latent space learnt is more disentangled.
|
| 347 |
+
|
| 348 |
+

|
| 349 |
+
Figure 9: Additional latent space interpolations on CelebA-HQ (Karras et al., 2018) (resolution $5 1 \bar { 2 } \times 5 1 2 $ )
|
| 350 |
+
|
| 351 |
+
# Source A
|
| 352 |
+
|
| 353 |
+

|
| 354 |
+
Figure 10: Latent Mixing results on CelebA-HQ Karras et al. (2018). Each combined image in the grid is generated by replacing an arbitrary subset of Source A latent with the corresponding Source B latent.
|
| 355 |
+
|
| 356 |
+
# A.3 Effect of negative samples
|
| 357 |
+
|
| 358 |
+
In this section we analyse the effect of varying the number of negative samples used for contrastive learning. The figure 11 shows the reconstruction error on the CIFAR-10 Krizhevsky et al. (2009) test set as the negative samples is varied. We observe that a higher number of negative samples results in better reconstruction. We choose 8096 for all of our experiments because of memory constraints.
|
| 359 |
+
|
| 360 |
+
# A.4 Datasets used
|
| 361 |
+
|
| 362 |
+
CIFAR-10 comprises 50,000 training images and 10,000 test images with a spatial resolution of $3 2 \times 3 2$ . STL-10 is a similar dataset that contains 5,000 training images and 100,000 unlabeled images at $9 6 \times 9 6$ resolution. We follow the procedure in AutoGAN(Gong et al., 2019) and resize the STL-10 images to $3 2 \times 3 2$ . The CelebA dataset has 162,770 training images and 19,962 testing images, CelebA-HQ contains 29,000 training images with 1,000 test images of size $1 0 2 4 \times 1 0 2 4$ and LSUN Bedroom has approximately 3M images. We resize all images progressively in these three datasets from $\left( 4 \times 4 \right)$ to $( 5 1 2 \times 5 1 2 )$ for the progressive training.
|
| 363 |
+
|
| 364 |
+

|
| 365 |
+
Figure 11: Pixel reconstruction error on CIFAR-10 Krizhevsky et al. (2009) test set for varying number of negative samples
|
| 366 |
+
|
| 367 |
+
# A.5 Network architecture diagrams
|
| 368 |
+
|
| 369 |
+
In Figures 15 we show the detailed network architecture of DC-VAE for input resolutions of $3 2 \times 3 2$ Note that the comparison results shown in Figure 3 and Table 1 in the main paper, for VAE, VAE/GAN, VAE w/o GAN, and our proposed DC-VAE are all based on the same network architecture (shown in Figure 15 here), for a fair comparison.
|
| 370 |
+
|
| 371 |
+
The network architectures shown in Figure 15 are adapted closely from the networks discovered by (Gong et al., 2019) through Neural Architecture Search. The DC-VAE developed in our paper is not tied to any particular CNN architecture. We choose the AutoGAN architecture (Gong et al., 2019) to start with a strong baseline. The decoder in Figure 15 matches the generator in (Gong et al., 2019). The encoder is built by modifying the output shape of the final linear layer in the discriminator of AutoGAN (Gong et al., 2019) to match the latent dimension and adding spectral normalization. The discriminator is used both for classifying real/fake images, and contrastive learning. For each layer we choose, we first apply 1x1 convolution and a linear layer, and then use this feature as an input to the contrastive module. For experiments at $3 2 \times 3 2$ , we pick two different positions: the output of second residual conv block (lower level) and the output of the first linear layer (higher level). For experiments on higher resolution datasets we use a Progressive GAN (Karras et al., 2018) Generator and Discriminator as our backbone and apply similar modifications as described above.
|
| 372 |
+
|
| 373 |
+
# A.6 Training infrastructure
|
| 374 |
+
|
| 375 |
+
# .7 Further details about the representation learning experiments
|
| 376 |
+
|
| 377 |
+
As seen in Table 4 in the main paper, we show the representation capability of DC-VAE following the procedure outlined in (Ding et al., 2020). We train our model on the MNIST dataset (LeCun, 1998) and measure the transferability though a classification task on the latent embedding vector. Specifically, we first pretrain the DC-VAE model on the training split of the MNIST dataset. Following that we freeze the DC-VAE model and train a linear classifier that takes latent embedding vector as the input and predicts the class label of the original image.
|
| 378 |
+
|
| 379 |
+

|
| 380 |
+
Figure 12: Visualization of the effect of adding each instance level and set level objectives. Table 1 and Figure 3 contain FID (Heusel et al., 2017) results and qualitative comparisons on the CIFAR-10 (Krizhevsky et al., 2009) that correspond to these settings.
|
| 381 |
+
|
| 382 |
+

|
| 383 |
+
Figure 13: DC-VAE synthesis images on LSUN images (Yu et al., 2015) (resolution $1 2 8 \times 1 2 8$ )
|
| 384 |
+
|
| 385 |
+

|
| 386 |
+
Figure 14: DC-VAE reconstruction (a) and synthesis results (b) on STL10 (Coates et al., 2011) images (resolution $3 2 \times 3 2 ,$ ). In (a) the top two rows are input images and the bottom two rows are the corresponding reconstruction images.
|
| 387 |
+
|
| 388 |
+

|
| 389 |
+
Figure 15: Network architecture of DC-VAE for resolution $3 2 \times 3 2$ for CIFAR-10 (Krizhevsky et al., 2009) and STL-10 (Coates et al., 2011). (a) is the Encoder. (b) is the Decoder. (c) is the Discriminator.
|
md/train/63pC59XOZLZ/63pC59XOZLZ.md
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Learning to Iteratively Solve Routing Problems with Dual-Aspect Collaborative Transformer
|
| 2 |
+
|
| 3 |
+
Yining $\mathbf { M } \mathbf { a } ^ { 1 }$ , Jingwen $\mathbf { L i } ^ { 1 }$ , Zhiguang $\mathbf { C a o ^ { 2 , * } }$ , Wen Song3,∗, Le Zhang4, Zhenghua Chen5, Jing Tang6
|
| 4 |
+
|
| 5 |
+
1National University of Singapore 2Singapore Institute of Manufacturing Technology, A\*STAR 3Institute of Marine Science and Technology, Shandong University 4University of Electronic Science and Technology of China 5Institute for Infocomm Research, A\*STAR 6The Hong Kong University of Science and Technology {yiningma, lijingwen}@u.nus.edu, zhiguangcao@outlook.com, wensong@email.sdu.edu.cn, zhangleuestc@gmail.com, chen0832@e.ntu.edu.sg, jingtang@ust.hk
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Recently, Transformer has become a prevailing deep architecture for solving vehicle routing problems (VRPs). However, it is less effective in learning improvement models for VRP because its positional encoding (PE) method is not suitable in representing VRP solutions. This paper presents a novel Dual-Aspect Collaborative Transformer (DACT) to learn embeddings for the node and positional features separately, instead of fusing them together as done in existing ones, so as to avoid potential noises and incompatible correlations. Moreover, the positional features are embedded through a novel cyclic positional encoding (CPE) method to allow Transformer to effectively capture the circularity and symmetry of VRP solutions (i.e., cyclic sequences). We train DACT using Proximal Policy Optimization and design a curriculum learning strategy for better sample efficiency. We apply DACT to solve the traveling salesman problem (TSP) and capacitated vehicle routing problem (CVRP). Results show that our DACT outperforms existing Transformer based improvement models, and exhibits much better generalization performance across different problem sizes on synthetic and benchmark instances, respectively.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Vehicle Routing problems (VRPs), such as the Traveling Salesman Problem (TSP) and the Capacitated Vehicle Routing Problem (CVRP) which consider finding the optimal route for a single or fleet of vehicles to serve a set of customers, have ubiquitous real-world applications [1, 2]. Despite being intensively studied in the Operations Research (OR) community, VRPs still remain challenging due to their NP-hard nature [3]. Recent studies on learning neural heuristics are gathering attention as promising extensions to traditional hand-crafted ones (e.g., [4–14]), where reinforcement learning (RL) [15] is usually exploited to train a deep neural network as an efficient solver without hand-crafted rules. A salient motivation is that deep neural networks may learn better heuristics by identifying useful patterns in an end-to-end and data-driven fashion.
|
| 14 |
+
|
| 15 |
+
Solutions to VRPs, i.e., routes, are sequences of nodes (customer and depot locations). Naturally, deep models for Natural Language Processing (NLP), which deal with sequence data as well, are ideal choices for encoding VRP solutions. Given its remarkable performance in NLP tasks, Transformer [16] is standing at the forefront in the learning based methods for VRPs (e.g., [5, 7, 8, 11–13, 17]). The original Transformer encodes a sentence, i.e., a sequence of words, into a unified set of embeddings by injecting word positional information into its word embeddings through positional encoding (PE). When it comes to VRPs, while is not required in construction models, positional information is critical for deep models that learn improvement heuristics since the input are solutions to be improved.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Transformer frameworks for VRPs. (a) $\mathrm { W u }$ et al. [11] (the original one); (b) DACT (ours).
|
| 19 |
+
|
| 20 |
+
Although some success has been achieved, learning improvement heuristics for VRPs based on the original Transformer encoder is yet lacking from our perspective. Firstly, directly applying addition operation on PE vectors and the embeddings in absolute PE method (i.e., Figure 1(a)) could limit the representation of the model [18], as the mixed correlations2 existing in the self-attention can bring unreasonable noises and random biases to the encoder (details in Appendix A). Secondly, existing PE methods tend to fuse the node and positional information into one unified representation. NLP tasks such as translation may benefit from this owing to the deterministic and instructive nature of the positional information. However, such design may not be optimal for routing tasks because the positional information therein can be non-deterministic and sometimes even random. This may cause disharmony or disturbance in the encoder and may thus deteriorate the performance. Finally, most VRPs seek the shortest loop of the nodes, making their solutions to be cyclic sequences. However, existing PE methods are only designated to encode linear sequences3, which may fail to identify such circular input. As will be shown in our experiments, this could severely damage the generalization performance, since the cyclic feature of VRP solutions is not correctly reflected by the encoder.
|
| 21 |
+
|
| 22 |
+
In this paper, we address the above issues and contribute to the line of using RL to learn neural improvement heuristics for VRPs. We introduce the Dual-Aspect Collaborative Transformer (DACT), where we revisit the solution representations and propose to learn separated groups of embeddings for the node and positional features of a VRP solution as shown in Figure 1(b). Our DACT follows the encoder-decoder structure. In the encoder, each set of embeddings encodes the solution mainly from its own aspect, and at the same time exploits a cross-aspect referential attention mechanism for better perceiving the consistence and differentiation with respect to the other aspect. The decoder then collects action distribution proposals from the two aspects and synthesizes them to output the final one. Meanwhile, we design a novel cyclic positional encoding (CPE) method to capture the circularity and symmetry of VRP solutions, which allows Transformer to encode cyclic inputs, and also boost the generalization performance for solving VRPs. As the last contribution, we design a simple yet effective curriculum learning strategy to improve the sample efficiency. This further leads to faster and more stable convergence of RL training. Extensive experiments show that our DACT can outperform existing Transformer based improvement models with fewer parameters, and also generalizes well across different sizes of synthetic and benchmark instances, respectively.
|
| 23 |
+
|
| 24 |
+
# 2 Related work
|
| 25 |
+
|
| 26 |
+
# 2.1 Positional encoding (PE) in Transformer.
|
| 27 |
+
|
| 28 |
+
The original Transformer adopted the absolute PE method to describe the absolute position of elements in the sequence [16], especially for NLP. As formulated in Eq. (1), each generated positional embedding $p _ { i } \in \mathbb { R } ^ { d }$ is added together with the $i$ -th word embedding $x _ { i }$ in the first layer of the encoder,
|
| 29 |
+
|
| 30 |
+
$$
|
| 31 |
+
\alpha _ { i , j } ^ { \mathrm { A b s } } = \frac { 1 } { \sqrt { d } } ( ( x _ { i } + p _ { i } ) W ^ { Q } ) ( ( x _ { j } + p _ { j } ) W ^ { K } ) ^ { T } .
|
| 32 |
+
$$
|
| 33 |
+
|
| 34 |
+
The relative PE method was further proposed in Shaw et al. [19] to better capture the relative order information. On the basis of absolute PE, it introduces an inductive bias to the attention as follows,
|
| 35 |
+
|
| 36 |
+
$$
|
| 37 |
+
\alpha _ { i , j } ^ { \mathrm { R e l } } = \frac { 1 } { \sqrt { d } } ( ( x _ { i } + p _ { i } ) W ^ { Q } ) ( ( x _ { j } + p _ { j } ) W ^ { K } + a _ { j - i } ) ^ { T } ,
|
| 38 |
+
$$
|
| 39 |
+
|
| 40 |
+
where $a _ { j - i } \in \mathbb { R } ^ { d }$ is learnable parameters for encoding the relative position $j - i$ . To avoid the mixed and noisy correlations between word semantics and positional information in the above two PEs, the Transformer with United Positional Encoding (TUPE) [18] was proposed for NLP which utilizes separated projection metrics $W _ { x }$ and $W _ { p }$ for each information as follows,
|
| 41 |
+
|
| 42 |
+
$$
|
| 43 |
+
\alpha _ { i , j } ^ { \mathrm { T U P E } } = \frac { 1 } { \sqrt { 2 d } } ( x _ { i } W _ { x } ^ { Q } ) ( x _ { j } W _ { x } ^ { K } ) ^ { T } + \frac { 1 } { \sqrt { 2 d } } ( p _ { i } W _ { p } ^ { Q } ) ( p _ { j } W _ { p } ^ { K } ) ^ { T } + b _ { j - i } .
|
| 44 |
+
$$
|
| 45 |
+
|
| 46 |
+
However, as mentioned previously, existing PE methods are less effective for VRPs since they simply fuse the node and positional information into one unified set of embeddings during or after the calculation of the attention correlation $\alpha _ { i , j }$ . Meanwhile, they are also unable to properly encode and handle cyclic input sequences as in VRP solutions.
|
| 47 |
+
|
| 48 |
+
# 2.2 Deep models for VRP.
|
| 49 |
+
|
| 50 |
+
Various deep architectures such as Recurrent Neural Network (RNN), Graph Neural Network (GNN), and Transformer have been employed in solving VRPs.
|
| 51 |
+
|
| 52 |
+
RNN based models. As the pioneering work of neural VRP solvers, Pointer Network adopted RNN and supervised learning to solve TSP [20] (extended to RL in Bello et al. [21] and CVRP in Nazari et al. [22]). While the models in [20–23] learn construction heuristics, NeuRewriter [4] learns improvement heuristic for CVRP using LSTM to encode the positional information of a solution. In Hottung et al. [13], the conditional variational autoencoder was adopted to learn a continuous and latent search space for VRP, where high-quality solutions were taken as input and encoded by RNNs. However, recurrence structures in RNN are less efficient in both representation and computation [5].
|
| 53 |
+
|
| 54 |
+
GNN based models. In Dai et al. [24], GNN was combined with Q-learning for solving TSP. Based on supervised learning, Joshi et al. [6] used GNN to learn heatmaps that prescribe the probability of each edge appearing in the optimal TSP tour. This idea was extended in Fu et al. [25] with additional components such as graph sampling and heatmap merging to enable generalization to larger TSP instances. These models often require post-processing to construct feasible solutions from heatmaps (e.g., beam search [6], Monte-Carlo tree search [25], and dynamic programming [26]).
|
| 55 |
+
|
| 56 |
+
Transformer based models. The Attention Model (AM) by Kool et al. [5] was recognized as the first success of Transformer based models for VRPs. Based on AM, Xin et al. [7] proposed a MultiDecoder AM that learns multiple diverse policies for better performance. In Kwon et al. [8], the RL algorithm of AM was improved which leaded to a new solver, i.e., POMO (Policy Optimization with Multiple Optima), and achieved the state-of-the-art performance. However, POMO is still lacking in generalization. Besides these construction models, Transformer was also explored to learn improvement heuristics. Hottung and Tierney [27] learned first neural large neighborhood search algorithm for VRPs. Lu et al. [12] proposed the L2I model that learns to select local search operators from a pool of traditional ones. Both methods used a Transformer-style encoder, but the positional information is captured in the node features (information of previous and next nodes) instead of using PE methods. Though L2I was shown to outperform LKH3 [28], it is limited to CVRP and the required time is considerably long. Wu et al. [11] proposed a Transformer model which learns to pick node pair in each step to perform a pairwise local operator (e.g., 2-opt). However, it suffers from the inaccurate representation of positional information given the original Transformer encoder.
|
| 57 |
+
|
| 58 |
+

|
| 59 |
+
Figure 3: Architecture of our policy network, dual-aspect collaborative Transformer (DACT).
|
| 60 |
+
|
| 61 |
+
# 3 Problem formulation
|
| 62 |
+
|
| 63 |
+
We define a VRP instance as a group of $N$ nodes to visit, where the node feature $x _ { i }$ of node $i$ contains 2-dim coordinates and other problem-specific features (e.g., customer demand). A solution $\delta$ consists of a sequence of nodes visited in order where we denote $p _ { i }$ to be the position (indices) of node $i$ in the solution which is deemed as the positional feature of node $i$ . The objective is to minimize the total travel distance $D ( \delta )$ under certain problem-specific constraints.
|
| 64 |
+
|
| 65 |
+
Starting with an initial yet complete solution, our neural RL policy tries to improve the solution iteratively. At each step, the policy automatically selects a pair of nodes and locally adjusts the solution using a preset pairwise operator such as 2-opt, insert, or swap. As illustrated in Figure 2, given a node pair $( i , j )$ , the 2-opt operator adjusts a solution by reversing the segment between node $i$ and node $j$ ; the insert operator adjusts a solution by placing node $i$ after node $j$ ; and the swap operator adjusts a solution by exchanging the position of node $i$ and node $j$ . Such operation is repeated until reaching the step limit $T$ and we model it in the form of Markov Decision Process (MDP) as follows.
|
| 66 |
+
|
| 67 |
+

|
| 68 |
+
Figure 2: Illustration examples of three pairwise operators for routing problems when node pair $( i = 2 , j = 1 )$ ) is specified for operating. From left to right: 2-opt, insert, and swap.
|
| 69 |
+
|
| 70 |
+
State. For an instance with $N$ nodes, a state describes current solution $\delta _ { t }$ using its node and positional features of each node, i.e., $s _ { t } = \Psi ( \delta _ { t } ) = \{ x _ { 1 } ^ { t } , . . . , x _ { N } ^ { t } , p _ { 1 } ^ { t } , . . . , p _ { N } ^ { t } \}$ .
|
| 71 |
+
|
| 72 |
+
Action. The action $a _ { t } = ( i , j )$ specifies a node pair $( i , j )$ for the pairwise operator.
|
| 73 |
+
|
| 74 |
+
Reward. The reward function is defined as, $r _ { t } = D ( \delta _ { t } ^ { * } ) - m i n \left[ D ( \delta _ { t + 1 } ) , D ( \delta _ { t } ^ { * } ) \right]$ where $\delta _ { t } ^ { * }$ is the best incumbent solution found until time $t$ . It refers to the immediate reduced cost at each step with respects to the best incumbent solution, which ensures the cumulative reward equal to the total reduced cost over the initial solution. Hence the reward $r _ { t } > 0$ if and only if a better solution is found. Policy. The policy $\pi _ { \theta }$ is parameterized by the proposed DACT model with parameters $\theta$ . At each time step, the action $( i , j )$ is obtained by sampling the stochastic policy for both training and inference.
|
| 75 |
+
|
| 76 |
+
Transition. The next state $s _ { t + 1 }$ is originated from $s _ { t }$ by performing the preset pairwise operator on the given node pair (action). Our state transient is deterministic, in the sense that it always accepts the next solution as the next state (infeasible solutions will be masked), regardless of its objective value. With such simple rule, the RL agent is expected to automatically learn how to combine multiple steps of simple local movements to achieve better solutions, even if some of them may worsen the current solution. Note that the step limit $T$ can be any user-specified value according to the allowed time budget. Hence, our MDP can have infinite horizon and we consider the reward discount factor $\gamma < 1$ .
|
| 77 |
+
|
| 78 |
+
# 4 Dual-aspect collaborative Transformer model
|
| 79 |
+
|
| 80 |
+
We now present the details of our Dual-Aspect Collaborative Transformer (DACT). The concrete architecture of DACT is presented in Figure 3, where we take the TSP with $N$ nodes as an illustration example. Our DACT leverages separate aspects of embeddings to encode a VRP solution. In the DAC encoder, the self-attention correlations are computed individually for each aspect, and a cross-aspect referential attention mechanism is proposed to enable one aspect to effectively exploit attention correlations from the other aspect as optional references. The DAC decoder then collects action distribution proposals from both aspects and synthesize them to the final one.
|
| 81 |
+
|
| 82 |
+

|
| 83 |
+
Figure 5: Comparison of our CPE method with absolute PE method on a TSP instance with 20 nodes. (a) the embedding vectors, (b) the correlations (dot products) between every two embeddings, and (c) the top two principal components after PCA (principal component analysis) projection.
|
| 84 |
+
Figure 4: An example of cyclic Gray code where 4 digits are used to encode $N { = } 1 6$ nodes. The top left shows the base symmetry pattern $\cdot _ { 1 0 0 1 }$ ’ in Gray code, and the top right plots its representation in our method.
|
| 85 |
+
|
| 86 |
+
# 4.1 Dual-aspect solution representation
|
| 87 |
+
|
| 88 |
+
Specifically, we propose to learn two sets of embeddings, i.e., the node feature embeddings (NFEs) for node representation and the positional feature embeddings (PFEs) for positional representation.
|
| 89 |
+
|
| 90 |
+
NFEs. Following [5, 11], the NFE $h _ { i }$ of node $i$ is initialized as the linear projection of its node feature $x _ { i }$ with output dimension4 $d i m = 6 4$ .
|
| 91 |
+
|
| 92 |
+
PFEs. The PFE $g _ { i }$ of the positional feature $p _ { i }$ is initialized as a real-valued vector $( d i m = 6 4 )$ by applying our cyclic positional encoding (CPE), which is designed based on cyclic Gray codes [29].
|
| 93 |
+
|
| 94 |
+
<table><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>7</td><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>9</td><td rowspan=1 colspan=1>10</td><td rowspan=1 colspan=1>11</td><td rowspan=1 colspan=1>12</td><td rowspan=1 colspan=1>13</td><td rowspan=1 colspan=1>14</td><td rowspan=1 colspan=1>15</td><td rowspan=1 colspan=1>16</td></tr><tr><td rowspan=2 colspan=1>11</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>0</td></tr></table>
|
| 95 |
+
|
| 96 |
+
As illustrated in Figure 4, the cyclic Gray codes present a cyclic property (‘1110’ in the last column is adjacent to ‘1111’ in the first column) and an adjacency similarity property (any codes in adjacent columns only differ in one digit), both of which are desirable for cyclic sequences. To preserve these properties in designing our CPE, we follow two observed patterns: 1) each numerical digit contains a periodic cycle with reflectional symmetry, e.g., the $\mathbf { \dot { \rho } } _ { 1 0 | 0 1 } ,$ in the lowest digit; and 2) the higher the numerical digit, the longer the period. Accordingly, we create similar patterns based on the sinusoidal functions in Eq. (4), where a periodic function with period $\frac { 4 \pi } { \omega _ { d } }$ (induced by modulus) is used to generate one base symmetry pattern (the top right in Figure 4),
|
| 97 |
+
|
| 98 |
+
$$
|
| 99 |
+
\begin{array} { r } { \overrightarrow { g _ { i } ^ { \prime } } ^ { ( d ) } : = \left\{ \begin{array} { l l } { s i n ( \omega _ { d } \cdot \mathrm { \Gamma } ( z ( i ) \bmod \frac { 4 \pi } { \omega _ { d } } ) - \frac { 2 \pi } { \omega _ { d } } \mathrm { \Gamma } ) , \mathrm { ~ i f ~ } d \mathrm { ~ i s ~ e v e n } } \\ { c o s ( \omega _ { d } \cdot \mathrm { \Gamma } ( z ( i ) \bmod \frac { 4 \pi } { \omega _ { d } } ) - \frac { 2 \pi } { \omega _ { d } } \mathrm { \Gamma } ) , \mathrm { ~ i f ~ } d \mathrm { ~ i s ~ o d d } } \end{array} \right. } \end{array}
|
| 100 |
+
$$
|
| 101 |
+
|
| 102 |
+
$\begin{array} { r } { z ( i ) = \frac { i - 1 } { N } \frac { 2 \pi } { \omega _ { d } } \left\lceil \frac { N + 1 } { 2 \pi / \omega _ { d } } \right\rceil } \end{array}$ is to make $N$ nodes linearly spaced in the generated pattern; the angular frequency $\omega _ { d }$ is decreasing along the dimension to make the wavelength longer within the range $[ N ^ { \frac { 1 } { [ d i m / 2 ] } } , N ]$ (see Appendix B for details). In Figure 5, we visualize the comparison between the absolute PE and our CPE for encoding a TSP instance of 20 nodes. Figure 5(a) demonstrates that our real-valued base symmetry pattern has a longer cyclic period as the digit grows. Figure 5(b) indicates that our method (blue) is able to correctly reflect the adjacency between the head and tail of the cyclic sequence whereas the PE method (red) fails to do so. Figure 5(c) verifies that our CPE vectors are well distributed in space with desired cyclic and adjacency similarity properties.
|
| 103 |
+
|
| 104 |
+
# 4.2 The encoder
|
| 105 |
+
|
| 106 |
+
The encoder consists of $L = 3$ stacked DAC encoders. In each DAC encoder, we retain relatively independent encoding stream for NFEs and PFEs as in Eq. (5) and Eq. (6), respectively, each of which consists of a shared Dual-Aspect Collaborative Attention (DAC-Att) sub-layer and an independent feed-forward network (FFN) sub-layer. DAC-Att takes both sets of embeddings as input and then outputs their respective enhanced embeddings, i.e., NFEs $\{ \tilde { h } \} _ { i = 1 } ^ { N }$ and PFEs $\{ \tilde { g } \} _ { i = 1 } ^ { N }$ . Each sub-layer is followed by skip connection [30] and layer normalization [31] as same as the original Transformer.
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\begin{array} { r } { h _ { i } ^ { ( l ) } = \mathbf { L N } \Big ( h _ { i } ^ { \prime } + \mathbf { F F N } _ { h } ^ { ( l ) } ( h _ { i } ^ { \prime } ) \Big ) , h _ { i } ^ { \prime } = \mathbf { L N } \Big ( h _ { i } ^ { ( l - 1 ) } + \tilde { h } _ { i } ^ { ( l ) } \Big ) , } \\ { g _ { i } ^ { ( l ) } = \mathbf { L N } \Big ( g _ { i } ^ { \prime } + \mathbf { F F N } _ { g } ^ { ( l ) } ( g _ { i } ^ { \prime } ) \Big ) , g _ { i } ^ { \prime } = \mathbf { L N } \Big ( g _ { i } ^ { ( l - 1 ) } + \tilde { g } _ { i } ^ { ( l ) } \Big ) . } \end{array}
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
DAC-Att. The DAC-Att sub-layer enhances each set of embedding from its own aspect, while leveraging attention correlations from the other aspect to achieve the synergy. Given the two sets of embeddings5, $\{ h _ { i } \} _ { i = 1 } ^ { N }$ and $\{ g _ { i } \} _ { i = 1 } ^ { N }$ , we first compute the self-attention correlation from both aspects,
|
| 113 |
+
|
| 114 |
+
$$
|
| 115 |
+
\alpha _ { i , j } ^ { h } = \frac { 1 } { \sqrt { d _ { k } } } \left( h _ { i } W _ { h } ^ { Q } \right) \left( h _ { j } W _ { h } ^ { K } \right) ^ { T } , \quad \alpha _ { i , j } ^ { g } = \frac { 1 } { \sqrt { d _ { k } } } \left( g _ { i } W _ { g } ^ { Q } \right) \left( g _ { j } W _ { g } ^ { K } \right) ^ { T } ,
|
| 116 |
+
$$
|
| 117 |
+
|
| 118 |
+
where independent matrices $W _ { h } ^ { Q } , W _ { h } ^ { K } , W _ { g } ^ { Q }$ and $W _ { g } ^ { K } \in \mathbb { R } ^ { d i m \times d _ { k } }$ are used to calculate queries and keys. The obtained correlations are further normalized to $\tilde { \alpha } _ { i , j } ^ { h }$ and $\tilde { \alpha } _ { i , j } ^ { g }$ via Softmax. Note that the correlations are computed from their own aspect, which eliminates possible noises and conduces to correctly describe the incompatible node pair relationships in different aspects of VRP solutions.
|
| 119 |
+
|
| 120 |
+
We then exploit a cross-aspect referential attention mechanism, which allows computed correlations to be shared between each other, as additional references for both contradistinction and collaboration,
|
| 121 |
+
|
| 122 |
+
$$
|
| 123 |
+
\mathrm { o u t } _ { i } ^ { h } = \mathrm { C o n c a t } \left[ \sum _ { j = 1 } ^ { N } \tilde { \alpha } _ { i , j } ^ { h } \left( h _ { j } W _ { h } ^ { V } \right) , \sum _ { j = 1 } ^ { N } \tilde { \alpha } _ { i , j } ^ { g } \left( h _ { j } W _ { h } ^ { V r e f } \right) \right] ,
|
| 124 |
+
$$
|
| 125 |
+
|
| 126 |
+
$$
|
| 127 |
+
\mathrm { o u t } _ { i } ^ { g } = \mathrm { C o n c a t } \left[ \sum _ { j = 1 } ^ { N } { \tilde { \alpha } } _ { i , j } ^ { g } \left( g _ { j } W _ { g } ^ { V } \right) , \sum _ { j = 1 } ^ { N } { \tilde { \alpha } } _ { i , j } ^ { h } \left( g _ { j } W _ { g } ^ { V r e f } \right) \right] ,
|
| 128 |
+
$$
|
| 129 |
+
|
| 130 |
+
wheand $W _ { h } ^ { V } , W _ { g } ^ { V } \in \mathbb R ^ { d i m \times d _ { v } }$ are trainable parameter matrices for formulating values in each aspect; are parameter matrices for each aspect to generate referential values. $W _ { h } ^ { V r e f } , W _ { g } ^ { V r e f } \in \mathbb R ^ { d i m \times d _ { v } }$ We finally use the multi-head attention to get NFEs $\tilde { h } _ { i }$ and PFEs $\tilde { g } _ { i }$ as follows,
|
| 131 |
+
|
| 132 |
+
$$
|
| 133 |
+
\begin{array} { r } { \begin{array} { c } { \tilde { h } _ { i } , \tilde { g } _ { i } = \mathbf { D A C - A t t } \left( W ^ { Q } , ~ W ^ { K } , W ^ { V } , W ^ { V _ { r e f } } , W ^ { O } \right) , } \\ { \tilde { h } _ { i } = \mathbf { C o n c a t } \left[ \mathrm { h e a d } _ { i , 1 } ^ { h } , . . . , \mathrm { h e a d } _ { i , m } ^ { h } \right] W _ { h } ^ { O } , ~ \tilde { g } _ { i } = \mathbf { C o n c a t } \left[ \mathrm { h e a d } _ { i , 1 } ^ { g } , . . . , \mathrm { h e a d } _ { i , m } ^ { g } \right] W _ { g } ^ { O } , } \end{array} } \end{array}
|
| 134 |
+
$$
|
| 135 |
+
|
| 136 |
+
where h $\mathbf { e a d } _ { i , k } ^ { h } = o u t _ { i , k } ^ { h }$ , $\mathbf { h e a d } _ { i , k } ^ { g } = o u t _ { i , k } ^ { g }$ , and $W _ { h } ^ { O } , W _ { g } ^ { O } \ \in \ \mathbb { R } ^ { 2 m d _ { v } \times d i m }$ are trainable parameter matrices. In our model, we adopt $m = 4$ and $d _ { k } = d _ { v } = 1 6$ .
|
| 137 |
+
|
| 138 |
+
FFN. Our FFN sub-layer has only one hidden layer with 64 hidden unites and adopts the ReLU activation function. The parameters of $\mathbf { F F N } _ { h }$ and $\mathbf { F F N } _ { g }$ are different for each group of embeddings.
|
| 139 |
+
|
| 140 |
+
# 4.3 The decoder
|
| 141 |
+
|
| 142 |
+
In the DAC decoder, the two sets of embeddings $\{ h _ { i } ^ { ( L ) } \} _ { i = 1 } ^ { N }$ and $\{ g _ { i } ^ { ( L ) } \} _ { i = 1 } ^ { N }$ are first passed through a Max-pooling sub-layer and a multi-head compatibility (MHC) sub-layer to independently generate diversified node-pair selection proposals from their own aspect, which are then aggregated through a feed-forward aggregation (FFA) sub-layer for output.
|
| 143 |
+
|
| 144 |
+
Max-pooling. For each set of embeddings, we adopt the max-pooling sub-layer in Wu et al. [11] to aggregate the global representation of all $N$ embeddings into each respective one6.
|
| 145 |
+
|
| 146 |
+
MHC. The compatibility sub-layer computes the attention correlations for each embedding pair, where the obtained correlations with size $N \times N$ will be deemed as a proposal distribution for node pair selection. Our correlations are computed based on multiple heads for diversity. And we calculate separated attention score matrices $\boldsymbol { Y } _ { k } ^ { h } , \boldsymbol { \dot { Y } } _ { k } ^ { g } \in \mathbb { R } ^ { N \times N }$ (of head $k$ ) from the two aspects independently. Accordingly, the action distribution proposals would be different due to their aspect-specific focus and cognitions of the current solution, which will provide the subsequent FFA layer with a rich pool of proposals and allow our model to be more flexible and robust.
|
| 147 |
+
|
| 148 |
+
FFA. Once all proposals from two aspects are collected, a FFN with four layers (dimensions are $2 m$ , 32, 32 and 1, respectively) and ReLU activation is used to aggregate them,
|
| 149 |
+
|
| 150 |
+
$$
|
| 151 |
+
\tilde { Y } _ { i , j } = \mathbf { F } \mathbf { F } \mathbf { A } \left( Y _ { i , j , 1 } ^ { g } , . . . , Y _ { i , j , m } ^ { g } , Y _ { i , j , 1 } ^ { h } , . . . Y _ { i , j , m } ^ { h } \right) ,
|
| 152 |
+
$$
|
| 153 |
+
|
| 154 |
+
where $m = 4$ is the number of heads; and the output $\tilde { Y } _ { i , j }$ is a scalar indicating the likelihood of selecting node pair $( i , j )$ as an action. Afterwards, we apply $\hat { Y } _ { i j } = C \cdot \mathrm { T a n h } ( \tilde { Y } _ { i , j } )$ with $C = 6$ to control the entropy, and mask 7 the infeasible node pairs $( i ^ { \prime } , j ^ { \prime } )$ as $\hat { Y } _ { i ^ { \prime } j ^ { \prime } } = - \infty$ . Lastly, the likelihoods are normalized using Softmax function to obtain the final action distribution $P _ { i , j }$ .
|
| 155 |
+
|
| 156 |
+
# 4.4 Reinforcement learning algorithm
|
| 157 |
+
|
| 158 |
+
We adopt the proximal policy optimization [32] with $n$ -step return estimation for training (details are given in Appendix C), and design a curriculum learning (CL) strategy for better sample efficiency.
|
| 159 |
+
|
| 160 |
+
Curriculum learning strategy. The strategy in Wu et al. [11] sets a maximum of $T _ { t r a i n }$ steps for training and estimates future returns by bootstrapping [33]. However, due to the concern of training cost, $T _ { t r a i n }$ is usually much smaller than actual $T$ for inference (e.g., 200 v.s. 10k), which may leave the agent a poor chance of observing high-quality solutions (states) during training. Consequently, it may cause high variance for bootstrapping because the value function is mostly fitted on low-quality solutions and may render it less knowledgeable in estimating long-term future returns accurately. In this paper, we tackle this issue by a simple yet efficient strategy which gradually prescribes higher-quality solutions as the initial states for training. In doing so, 1) it increases the probability for the agent to observe better solutions and thus reduce the variance of the value function; 2) it increases the difficulty of the learning task (higher-quality solutions are harder to improve) in a gradual manner and achieves better sample efficiency [34]. In practice, those higher-quality solutions can be easily achieved by improving the randomly generated ones using the current policy for a few $T _ { i n i t }$ steps, where $T _ { i n i t }$ could be slightly increased as the epoch grows.
|
| 161 |
+
|
| 162 |
+
# 5 Experiments
|
| 163 |
+
|
| 164 |
+
We evaluate our DACT model on two representative routing problems, i.e., TSP and CVRP [5, 8, 11]. For each problem, we abide by existing conventions to randomly generate instances on the fly for three sizes, i.e., $N = 2 0$ , 50 and 100. Initial experiments with three operators including 2-opt, swap and insert show that 2-opt performs best for both TSP and CVRP (with insert better than swap), hence we report results of our method based on 2-opt. Following [4, 11, 27] we use randomly generated initial solutions for training and the solutions generated by the greedy algorithm for inference. Since each problem has its own constraints and node features, we adjust the input, feasibility masks, and problem-dependent hyperparameters for each problem, the details of which are provided in Appendix D and E. The DACT is trained and tested on a server equipped with TITAN RTX GPU cards and Intel i9-10940X CPU at $3 . 3 0 \mathrm { G H z }$ . Our code in PyTorch are available here8.
|
| 165 |
+
|
| 166 |
+
Table 1: Comparison with various baselines on TSP and CVRP.
|
| 167 |
+
|
| 168 |
+
<table><tr><td rowspan="2" colspan="2">Method</td><td colspan="3">N=20</td><td colspan="3">N=50</td><td colspan="3">N=100</td></tr><tr><td>Obj.</td><td>Gap</td><td>Time</td><td>Obj.</td><td>Gap</td><td>Time</td><td>Obj.</td><td>Gap</td><td>Time</td></tr><tr><td rowspan="10">LKH P</td><td>Concorde</td><td>3.83</td><td>=</td><td>(3m)</td><td>5.70</td><td></td><td>(10m)</td><td>7.76</td><td></td><td>(1h)</td></tr><tr><td></td><td>3.83</td><td>0.00%</td><td>(38s)</td><td>5.70</td><td>0.00%</td><td>(5m)</td><td>7.76</td><td>0.00%</td><td>(20m)</td></tr><tr><td>OR-Tools</td><td>3.86</td><td>0.94%</td><td>(42s)</td><td>5.85</td><td>2.87%</td><td>(5m)</td><td>8.06</td><td>3.86%</td><td>(23m)</td></tr><tr><td>Neural-2-Opt [23]</td><td>3.84</td><td>0.00%</td><td>(15m)</td><td>5.70</td><td>0.12%</td><td>(29m)</td><td>7.83</td><td>0.87%</td><td>(41m)</td></tr><tr><td>Wu et al. [11] (T=5k)</td><td>3.83</td><td>0.00%</td><td>(1h)</td><td>5.70</td><td>0.20%</td><td>(1.5h)</td><td>7.87</td><td>1.42%</td><td>(2h)</td></tr><tr><td>DACT (T=1k)</td><td>3.83</td><td>0.04%</td><td>{7s}(24s)</td><td>5.70</td><td>0.14%</td><td>{16s}(1m)</td><td>7.89</td><td>1.62%</td><td>{48s}(4m)</td></tr><tr><td>DACT (T=5k)</td><td>3.83</td><td>0.00%</td><td>{32s}(2m)</td><td>5.70</td><td>0.02%</td><td>{2m}(6m)</td><td>7.81</td><td>0.61%</td><td>{4m}(18m)</td></tr><tr><td>DACT (T=10k)</td><td>3.83</td><td>0.00%</td><td>{1m}(5m)</td><td>5.70</td><td>0.01%</td><td>{3m}(13m)</td><td>7.79</td><td>0.37%</td><td>{8m}(40m)</td></tr><tr><td>DACT×4 augment</td><td>3.83</td><td>0.00%</td><td>{3m}(10m)</td><td>5.70</td><td>0.00%</td><td>{10m}(1h)</td><td>7.77</td><td>0.09%</td><td>{29m}(2.5h)</td></tr><tr><td>GCN-BS [6]</td><td>3.84</td><td>0.01%</td><td>(12m)</td><td>5.70</td><td>0.01%</td><td>(18m)</td><td>7.87</td><td>1.39%</td><td>(40m)</td></tr><tr><td>AM-sampling [5]</td><td>3.84</td><td>0.08%</td><td>(5m)</td><td>5.73</td><td>0.52%</td><td>(24m)</td><td>7.94</td><td>2.26%</td><td>(1h)</td></tr><tr><td>MDAM-BS[7]</td><td>3.84t</td><td>0.00%</td><td>(3m)</td><td>5.70</td><td>0.03%</td><td>(14m)</td><td>7.79</td><td>0.38%</td><td>(44m)</td></tr><tr><td>POMO [8]</td><td>3.83</td><td>0.04%</td><td>(1s)</td><td>5.70</td><td>0.21%</td><td>(2s)</td><td>7.80</td><td>0.46%</td><td>(11s)</td></tr><tr><td>POMO×8 augment [8]</td><td>3.83</td><td>0.00%</td><td>(3s)</td><td>5.69t</td><td>0.03%</td><td>(16s)</td><td>7.78</td><td>0.15%</td><td>(1m)</td></tr><tr><td>DPDP(100k) [26]</td><td>-</td><td></td><td></td><td>-</td><td></td><td>=</td><td>7.77+</td><td>0.00%</td><td>(3h)</td></tr><tr><td rowspan="9">LKH OR-Tools NeuRewriter [4] NLNS [27]</td><td rowspan="9">CVAE-Opt-DE [13]</td><td>1</td><td>0.00%#</td><td>11m#</td><td>-</td><td>0.02%#</td><td>22m#</td><td>-</td><td>0.34%#</td><td>55m#</td></tr><tr><td></td><td>0.00%</td><td></td><td></td><td></td><td>4h</td><td>15.68</td><td></td><td></td></tr><tr><td>6.14 6.46</td><td>5.68%</td><td>1h 2m</td><td>10.38 11.27</td><td>0.00% 8.61%</td><td>13m</td><td>17.12</td><td>0.00% 9.54%</td><td>8h 46m</td></tr><tr><td>6.15#</td><td></td><td>6m#</td><td>10.51#</td><td></td><td>11m#</td><td>16.10#</td><td></td><td></td></tr><tr><td>6.19#</td><td>=</td><td>6m#</td><td>10.54#</td><td></td><td>11m#</td><td>15.99#</td><td>=</td><td>17m# 16m#</td></tr><tr><td>Wu et al. [11] (T=5k) 6.12</td><td>0.39%</td><td>(2h)</td><td>10.45</td><td>0.70%</td><td>(4h)</td><td>16.03t</td><td>= 2.47%</td><td></td></tr><tr><td>DACT (T=1k)</td><td>0.28%</td><td>{16s}(33s)</td><td>10.61</td><td>2.13%</td><td>{43s}(2m)</td><td>16.17</td><td>3.18%</td><td>(5h) {2m}(5m)</td></tr><tr><td>DACT (T=5k)</td><td>6.15 6.13 -0.00%</td><td>{1m}(3m)</td><td>10.48</td><td>1.01%</td><td>{3m}(8m)</td><td>15.92</td><td>1.55%</td><td>{8m}(23m)</td></tr><tr><td>DACT (T=10k)</td><td>-0.04%</td><td>{2m}(6m)</td><td>10.46</td><td>0.79%</td><td>{6m}(16m)</td><td>15.85</td><td>1.12%</td><td>{16m}(45m)</td></tr><tr><td rowspan="2">DACT×6 augment</td><td>6.13 6.13</td><td>-0.08%</td><td>{11m}(35m)</td><td>10.39</td><td>0.14%</td><td>{32m}(1.5h)</td><td>15.71</td><td>0.19%</td><td>{1.5h}(4.5h)</td></tr><tr><td>AM-sampling [5]</td><td>1.87%</td><td>(6m)</td><td>10.62</td><td>2.40%</td><td>(28m)</td><td></td><td></td><td></td></tr><tr><td rowspan="2">MDAM-BS[7]</td><td>6.25 6.14</td><td>0.18%</td><td>(5m)</td><td>10.48</td><td>0.98%</td><td>(15m)</td><td>16.23 15.99#</td><td>3.72% 2.23%</td><td>(2h)</td></tr><tr><td></td><td>0.82%</td><td>(1s)</td><td>10.49</td><td>1.14%</td><td>(4s)</td><td>15.83</td><td>0.98%</td><td>(1h) (19s)</td></tr><tr><td>POMO [8] POMO×8 augment [8]</td><td>6.17 6.14</td><td>0.21%</td><td>(5s)</td><td>10.42</td><td>0.45%</td><td>(26s)</td><td>15.73</td><td>0.32%</td><td>(2m)</td></tr><tr><td>DPDP(100k)[26]</td><td></td><td></td><td></td><td></td><td></td><td></td><td>15.69</td><td>0.31%</td><td></td></tr><tr><td>CVAE-Opt-DE [13]</td><td>= 6.14#</td><td></td><td>= 21m#</td><td>= 10.40#</td><td></td><td>41m#</td><td>15.75#</td><td></td><td>(6h) 1.5h#</td></tr></table>
|
| 169 |
+
|
| 170 |
+
# the obj. values, gaps or time are obtained based on 2,000 instances in their original papers, and not directly comparable to ours. ‡ the obj. values obtained by Concorde or LKH may be slightly different from ours since the 10,000 instances are randomly generated. E.g., for TSP50, the optimal values according to our running of Concorde is 5.70, while 5.69 in POMO and Wu et al.. We thus focus more on gaps.
|
| 171 |
+
|
| 172 |
+
# 5.1 Comparison studies
|
| 173 |
+
|
| 174 |
+
In Table 1, we compare our DACT with, (1) learning based improvement methods, including Wu et al. [11], Neural-2-Opt [23] (TSP only), NeuRewriter [4] (CVRP only), NLNS [27] (CVRP only), (2) learning based construction methods, including AM-sampling [5], GCN-BS [6] (TSP only), MDAM-BS [7], POMO [8], (3) conventional optimization algorithms equipped with learning based component(s), including DPDP [26], CVAE-Opt-DE [13], and (4) strong conventional solvers including Concorde [35], LKH [28, 36], and OR-Tools [37]. Though L2I [12] can outstrip LKH on CVRP, we do not inlude it as a baseline since it requires a prohibitively longer inference time than others9. All results are averaged over 10,000 randomly generated instances unless specified otherwise (e.g., the ones marked with # only infer 2,000 instances), and we report the metrics of objective values, (optimality) gaps and run time. Regarding baselines, we follow the results reported in their original papers, which may not include all the three metrics. For TSP, Concorde is adopted to get the optimal solutions, based on which the optimality gaps of other methods are calculated. CVRP is harder to be solved optimally, and the gaps are calculated based on solutions of LKH. Note that even for the baselines which infer 10,000 random instances, their objective values might be slightly different from ours (e.g., the ones marked with $\ddagger .$ ), therefore we focus more on gaps for fair comparison. The run time is also hard to compare due to various factors (e.g., GPU/CPU models, batch sizes, Python v.s. $\mathrm { C } { + + }$ ). For DACT, we report the time for inferring all 10,000 instances with multiple GPU cards in $^ { 6 6 } ( ) "$ , and a small batch (512 instances) with one single GPU card in “{}".
|
| 175 |
+
|
| 176 |
+
Pertaining to TSP, our DACT with inference step limit of 5,000 $\mathrm { ( T = 5 k }$ ) outperforms the traditional solver OR-Tools and all improvement models in terms of optimality gap, including Wu et al. [11] which directly adopted the original Transformer encoder. It also outstrips construction methods
|
| 177 |
+
|
| 178 |
+
Table 2: Generalization performance. (a) DACT v.s. baselines on benchmark datasets (up to 200 customers, see Appendix E.4 for detailed results and discussion); (b) PE v.s. CPE on different sizes.
|
| 179 |
+
|
| 180 |
+
<table><tr><td>Method</td><td>TSPLIB</td><td>CVRPLIB</td></tr><tr><td>OR-Tools [37]</td><td>3.34%</td><td>8.06%</td></tr><tr><td>AM-sampling [5]</td><td>22.83%</td><td>26.66%</td></tr><tr><td>POMO [8]</td><td>10.06%</td><td>6.10%</td></tr><tr><td>Wu et al. [11]</td><td>4.17%</td><td>5.20%</td></tr><tr><td>DACT</td><td>2.07%</td><td>3.41%</td></tr></table>
|
| 181 |
+
|
| 182 |
+
(a)
|
| 183 |
+
|
| 184 |
+
<table><tr><td rowspan="2">Method</td><td colspan="2">N=20</td><td colspan="2">N=100</td></tr><tr><td>Obj.</td><td>Gap</td><td>Obj.</td><td>Gap</td></tr><tr><td>DACT-PE (T=5k)</td><td>3.84</td><td>0.21%</td><td>8.38</td><td>7.93%</td></tr><tr><td>DACT-CPE (T=5k)</td><td>3.83</td><td>0.10%</td><td>7.99</td><td>2.98%</td></tr><tr><td>Wu et al.[11] (T=5k)</td><td>3.91</td><td>2.14%</td><td>9.03</td><td>16.37%</td></tr><tr><td>OR-Tools [37]</td><td>3.83</td><td>0.00%</td><td>8.06</td><td>3.87%</td></tr></table>
|
| 185 |
+
|
| 186 |
+
(b)
|
| 187 |
+
|
| 188 |
+
Table 3: Dual v.s. single aspect representation
|
| 189 |
+
|
| 190 |
+
<table><tr><td>Steps</td><td>Method</td><td>#Params</td><td>N=50</td><td>N=100</td></tr><tr><td rowspan="2">T=1k</td><td>SA-T</td><td>0.37M</td><td>0.35% (1m)</td><td>3.49% (3m)</td></tr><tr><td>DACT</td><td>0.29M</td><td>0.14% (1m)</td><td>1.62% (4m)</td></tr><tr><td rowspan="2">T=5k</td><td>SA-T</td><td>0.37M</td><td>0.05% (5m)</td><td>1.55% (16m)</td></tr><tr><td>DACT</td><td>0.29M</td><td>0.02% (6m)</td><td>0.61% (18m)</td></tr></table>
|
| 191 |
+
|
| 192 |
+
including AM-sampling and GCN-BS on TSP100. With larger step limit $\mathrm { T } { = } 1 0 \mathrm { k }$ , our DACT further boosts the solution qualities and outperforms other construction methods including MDAM-BS (beam search), and POMO (the current state-of-the-art). To further reduce the gaps, we also leverage the data augmentation technique in POMO (which considers flipping node coordinates without changing the optimal solution) to solve same instances multiple times in different ways. Although the inference time increases (we run data augmentation in serial on the same GPUs), our DACT with 4 augments not only outstrips POMO with 8 augments but also achieves the lowest objective values and gaps among all purely learning based models. In particular, our method almost optimally solved TSP20 and TSP50 with gap lower than $0 . 0 0 5 \%$ , and $0 . 0 9 \%$ on TSP100, which is superior to most of the recent neural solvers. Pertaining to CVRP, our DACT with $\mathrm { T } { = } 5 \mathrm { k }$ produces lower gaps than that of improvement models including NeuRewriter and NLNS. It also performs much better than Wu et al. [11] except on CVRP50. With $\mathrm { T } { = } 1 0 \mathrm { k }$ and 6 augments10, our DACT exhibits even better performance than the highly specialized heuristic solver LKH on CVRP20 and delivers the smallest gap of $0 . 1 9 \%$ on CVRP100 against other neural solvers including POMO with 8 augments. Besides, our DACT is also competitive to DPDP which leverages learnt heatmap and dynamic programming to search solutions. Though DPDP (100k) can solve TSP100 instances almost optimally, our DACT is more efficient than DPDP on CVRP100. Compared with CVAE-Opt-DE, despite that it is averaged over fewer instances and integrated with differential evolution, our objective values are still lower.
|
| 193 |
+
|
| 194 |
+
In terms of the inference time, our DACT is highly competitive against all neural solvers except POMO which learns a construction model by sampling diverse trajectories. However, when it comes to the generalization performance on benchmark datasets, i.e., TSPLIB [38] and CVRPLIB [39] in Table 2(a), DACT produces significantly lower average gaps than the POMO with 8 augments, which indicates that our DACT is more advantageous in practice despite its longer inference time. On the other hand, it is possible to adopt a similar diverse rollout strategy for DACT to find better solutions earlier, or explore other model compression techniques such as the knowledge distillation [40] to learn a lighter DACT model for faster inference. Since our focus is to ameliorate Transformer for neural improvement solvers, we will investigate these possibilities in the future.
|
| 195 |
+
|
| 196 |
+
# 5.2 Ablation studies
|
| 197 |
+
|
| 198 |
+
Dual-aspect representation. In Table 3, we evaluate the effectiveness of our dual-aspect representation against the single-aspect one (SA-T) on TSP50 and TSP100, where SA-T mainly follows the Transformer in $\mathbf { W } \mathbf { u }$ et al. [11] but equipped with the CPE, multi-head attentions and CL strategy for fair comparison. We observe that our DACT with fewer parameters consistently outperforms SA-T, which verifies the effectiveness of the dual-aspect representation.
|
| 199 |
+
|
| 200 |
+

|
| 201 |
+
Figure 6: Visualization of the attention scores for the encoder when a trained model is used to solve instances with a larger size. (a) using PE method; (b) using CPE method (ours).
|
| 202 |
+
|
| 203 |
+
Cyclic positional encoding. Here we show that CPE significantly improves the generalization performance across different problem sizes. In Table 2(b), we record the results of our DACT with PE and CPE, and Wu et al. [11], when the model trained on TSP50 is directly used to solve instances from TSP20 and TSP100 with $\mathrm { T } { = } 5 \mathrm { k }$ . We see that even with PE, our DACT outperforms Wu et al. [11]. Further equipped with CPE, DACT outstrips DACT-PE and OR-Tools on TSP100. We continue to compare the two DACT variants by visualizing their attention scores. As depicted in Figure 6(a), although the absolute PE is designed for linear sequences, it did attempt to capture the circularity of
|
| 204 |
+
|
| 205 |
+

|
| 206 |
+
Figure 7: Training curves of PPO with and without CL on CVRP20 (random seeds 1-5).
|
| 207 |
+
|
| 208 |
+
VRP solutions (as highlighted in the green boxes) after training. However, the ability to perceive such properties significantly drops when generalizing over different problem size, which instead engenders random attention scores when generalizing to larger size (see right side of Figure 6(a)). In contrast, our DACT with CPE is able to capture the circularity as depicted in Figure 6(b), which verifies the effectiveness of CPE in representing cyclic sequences (i.e., VRP solutions).
|
| 209 |
+
|
| 210 |
+
Curriculum learning (CL) strategy. In Figure 7, we plot the training curves of PPO algorithm with and without our CL strategy, where the results are averaged over 5 independent runs with $90 \%$ confidence intervals. It shows that our CL strategy significantly improves the sample efficiency while reducing the variance of training, which aligns with our analysis in Section 4.4.
|
| 211 |
+
|
| 212 |
+
# 6 Conclusions and future work
|
| 213 |
+
|
| 214 |
+
In this paper, we present a novel DACT model for routing problems. It learns separate groups of embeddings for the node and positional features, and is equipped with cyclic positional encoding (CPE) to capture the circularity and symmetry of VRP solutions. A curriculum learning (CL) strategy is also exploited to improve the RL training efficiency. Extensive experiments on both synthetic and benchmark datasets justified the effectiveness of DACT in terms of both inference and generalization. A potential limitation is that DACT is more useful for learning improvement models at present. In the future, we will investigate how to extend DACT to construction models, and how to speed up the DACT through diverse rollouts or model compression techniques. It is also interesting to apply the proposed CPE to develop Transformer based model for other tasks where the cyclic property is also important, e.g., encoding circular DNA/RNA structures in computational biology [41, 42].
|
| 215 |
+
|
| 216 |
+
# Acknowledgments and Disclosure of Funding
|
| 217 |
+
|
| 218 |
+
This work was supported in part by the National Natural Science Foundation of China under Grant 61803104 and Grant 62102228, in part by the Young Scholar Future Plan of Shandong University under Grant 62420089964188, and in part by the A\*STAR CyberPhysical Production System (CPPS) - Towards Contextual and Intelligent Response Research Program, under the RIE2020 IAF-PP Grant A19C1a0018, and Model Factory $@$ SIMTech.
|
| 219 |
+
|
| 220 |
+
References
|
| 221 |
+
[1] Paolo Toth and Daniele Vigo. Vehicle routing: problems, methods, and applications. SIAM press, 2014.
|
| 222 |
+
[2] Michael Schneider, Andreas Stenger, and Dominik Goeke. The electric vehicle-routing problem with time windows and recharging stations. Transportation Science, 48(4):500–520, 2014.
|
| 223 |
+
[3] Jan Karel Lenstra and AHG Rinnooy Kan. Complexity of vehicle routing and scheduling problems. Networks, 11(2):221–227, 1981.
|
| 224 |
+
[4] Xinyun Chen and Yuandong Tian. Learning to perform local rewriting for combinatorial optimization. In Advances in Neural Information Processing Systems, volume 32, pages 6281–6292, 2019.
|
| 225 |
+
[5] Wouter Kool, Herke van Hoof, and Max Welling. Attention, learn to solve routing problems! In International Conference on Learning Representations, 2018.
|
| 226 |
+
[6] Chaitanya K Joshi, Thomas Laurent, and Xavier Bresson. An efficient graph convolutional network technique for the travelling salesman problem. arxiv preprint arxiv:1906.01227, ArXiV, 2019.
|
| 227 |
+
[7] Liang Xin, Wen Song, Zhiguang Cao, and Jie Zhang. Multi-decoder attention model with embedding glimpse for solving vehicle routing problems. In Proceedings of 35th AAAI Conference on Artificial Intelligence, pages 12042–12049, 2021.
|
| 228 |
+
[8] Yeong-Dae Kwon, Jinho Choo, Byoungjip Kim, Iljoo Yoon, Youngjune Gwon, and Seungjai Min. POMO: Policy optimization with multiple optima for reinforcement learning. In Advances in Neural Information Processing Systems, volume 33, pages 21188–21198, 2020.
|
| 229 |
+
[9] Liang Xin, Wen Song, Zhiguang Cao, and Jie Zhang. Step-wise deep learning models for solving routing problems. IEEE Transactions on Industrial Informatics, 17(7):4861–4871, 2020.
|
| 230 |
+
[10] Cong Zhang, Wen Song, Zhiguang Cao, Jie Zhang, Puay Siew Tan, and Xu Chi. Learning to dispatch for job shop scheduling via deep reinforcement learning. In Advances in Neural Information Processing Systems, volume 33, pages 1621–1632, 2020.
|
| 231 |
+
[11] Yaoxin Wu, Wen Song, Zhiguang Cao, Jie Zhang, and Andrew Lim. Learning improvement heuristics for solving routing problems. IEEE Transactions on Neural Networks and Learning Systems, 2021.
|
| 232 |
+
[12] Hao Lu, Xingwen Zhang, and Shuang Yang. A learning-based iterative method for solving vehicle routing problems. In International Conference on Learning Representations, 2019.
|
| 233 |
+
[13] André Hottung, Bhanu Bhandari, and Kevin Tierney. Learning a latent search space for routing problems using variational autoencoders. In International Conference on Learning Representations, 2021.
|
| 234 |
+
[14] Jingwen Li, Yining Ma, Ruize Gao, Zhiguang Cao, Andrew Lim, Wen Song, and Jie Zhang. Deep reinforcement learning for solving the heterogeneous capacitated vehicle routing problem. IEEE Transactions on Cybernetics, 2021.
|
| 235 |
+
[15] Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction. MIT press, 2018.
|
| 236 |
+
[16] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems, volume 30, pages 6000–6010, 2017.
|
| 237 |
+
[17] Jingwen Li, Liang Xin, Zhiguang Cao, Andrew Lim, Wen Song, and Jie Zhang. Heterogeneous attentions for solving pickup and delivery problem via deep reinforcement learning. IEEE Transactions on Intelligent Transportation Systems, 2021.
|
| 238 |
+
[18] Guolin Ke, Di He, and Tie-Yan Liu. Rethinking the positional encoding in language pre-training. In International Conference on Learning Representations, 2020.
|
| 239 |
+
[19] Peter Shaw, Jakob Uszkoreit, and Ashish Vaswani. Self-attention with relative position representations. In North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 464–468, 2018.
|
| 240 |
+
[20] Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. In Advances in Neural Information Processing Systems, volume 28, pages 2692–2700, 2015.
|
| 241 |
+
[21] Irwan Bello, Hieu Pham, Quoc V Le, Mohammad Norouzi, and Samy Bengio. Neural combinatorial optimization with reinforcement learning. In International Conference on Machine Learning (Workshop), 2017.
|
| 242 |
+
[22] Mohammadreza Nazari, Afshin Oroojlooy, Martin Takác, and Lawrence V Snyder. Reinforcement learning ˇ for solving the vehicle routing problem. In Advances in Neural Information Processing Systems, pages 9861–9871, 2018.
|
| 243 |
+
[23] Paulo R d O Costa, Jason Rhuggenaath, Yingqian Zhang, and Alp Akcay. Learning 2-opt heuristics for the traveling salesman problem via deep reinforcement learning. In Asian Conference on Machine Learning, pages 465–480, 2020.
|
| 244 |
+
[24] Hanjun Dai, Elias B Khalil, Yuyu Zhang, Bistra Dilkina, and Le Song. Learning combinatorial optimization algorithms over graphs. In Advances in Neural Information Processing Systems, pages 6351–6361, 2017.
|
| 245 |
+
[25] Zhang-Hua Fu, Kai-Bin Qiu, and Hongyuan Zha. Generalize a small pre-trained model to arbitrarily large TSP instances. In AAAI Conference on Artificial Intelligence, 2021.
|
| 246 |
+
[26] Wouter Kool, Herke van Hoof, Joaquim Gromicho, and Max Welling. Deep policy dynamic programming for vehicle routing problems. arXiv preprint arXiv:2102.11756, 2021.
|
| 247 |
+
[27] André Hottung and Kevin Tierney. Neural large neighborhood search for the capacitated vehicle routing problem. In European Conference on Artificial Intelligence, 2020.
|
| 248 |
+
[28] Keld Helsgaun. LKH-3 (version 3.0.6), 2019. URL http://webhotel4.ruc.dk/\~keld/research/ LKH-3/.
|
| 249 |
+
[29] Wikipedia. Gray code, 2021. URL: https://en.wikipedia.org/wiki/Gray_code. Last visited on 2020/05/19.
|
| 250 |
+
[30] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In IEEE conference on computer vision and pattern recognition, pages 770–778, 2016.
|
| 251 |
+
[31] Lei Jimmy Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. Layer normalization. Corr: abs/1607.06450, ArXiV, 2016.
|
| 252 |
+
[32] John Schulman, Filip Wolski, Prafulla Dhariwal, Alec Radford, and Oleg Klimov. Proximal policy optimization algorithms. arxiv preprint arxiv:1707.06347, ArXiV, 2017.
|
| 253 |
+
[33] Fabio Pardo, Arash Tavakoli, Vitaly Levdik, and Petar Kormushev. Time limits in reinforcement learning. In International Conference on Machine Learning, pages 4045–4054, 2018.
|
| 254 |
+
[34] Yoshua Bengio, Jérôme Louradour, Ronan Collobert, and Jason Weston. Curriculum learning. In International Conference on Machine Learning, pages 41–48, 2009.
|
| 255 |
+
[35] David L Applegate, Robert E Bixby, Vašek Chvátal, and William J Cook. Concorde TSP Solver, 2020. URL http://www.math.uwaterloo.ca/tsp/concorde/.
|
| 256 |
+
[36] Keld Helsgaun. LKH (version 2.0.9), 2018. URL http://webhotel4.ruc.dk/\~keld/research/ LKH/.
|
| 257 |
+
[37] Laurent Perron and Vincent Furnon. OR-Tools (version 7.2), 2019. URL https://developers.google. com/optimization/.
|
| 258 |
+
[38] Gerhard Reinelt. TSPLIB-A traveling salesman problem library. ORSA journal on computing, 3(4): 376–384, 1991.
|
| 259 |
+
[39] Eduardo Uchoa, Diego Pecin, Artur Pessoa, Marcus Poggi, Thibaut Vidal, and Anand Subramanian. New benchmark instances for the capacitated vehicle routing problem. European Journal of Operational Research, 257(3):845–858, 2017.
|
| 260 |
+
[40] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network. arXiv preprint arXiv:1503.02531, 2015.
|
| 261 |
+
[41] Chun-Ying Yu, Tung-Cheng Li, Yi-Ying Wu, Chan-Hsien Yeh, Wei Chiang, Ching-Yu Chuang, and Hung-Chih Kuo. The circular rna circbirc6 participates in the molecular circuitry controlling human pluripotency. Nature communications, 8(1):1–15, 2017.
|
| 262 |
+
[42] Chengyu Liu, Yu-Chen Liu, Hsien-Da Huang, and Wei Wang. Biogenesis mechanisms of circular rna can be categorized through feature extraction of a machine learning model. Bioinformatics, 35(23):4867–4870, 2019.
|
| 263 |
+
[43] Logan Engstrom, Andrew Ilyas, Shibani Santurkar, Dimitris Tsipras, Firdaus Janoos, Larry Rudolph, and Aleksander Madry. Implementation matters in deep policy gradients: A case study on PPO and TRPO. In International Conference on Learning Representations, 2020.
|
md/train/66H4g_OHdnl/66H4g_OHdnl.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/68B1ezcffDc/68B1ezcffDc.md
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Subgroup Generalization and Fairness of Graph Neural Networks
|
| 2 |
+
|
| 3 |
+
Jiaqi Ma ∗† jiaqima@umich.edu
|
| 4 |
+
|
| 5 |
+
Junwei Deng ∗† junweid@umich.edu
|
| 6 |
+
|
| 7 |
+
Qiaozhu Mei∗‡ qmei@umich.edu
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Despite enormous successful applications of graph neural networks (GNNs), theoretical understanding of their generalization ability, especially for node-level tasks where data are not independent and identically-distributed (IID), has been sparse. The theoretical investigation of the generalization performance is beneficial for understanding fundamental issues (such as fairness) of GNN models and designing better learning methods. In this paper, we present a novel PAC-Bayesian analysis for GNNs under a non-IID semi-supervised learning setup. Moreover, we analyze the generalization performances on different subgroups of unlabeled nodes, which allows us to further study an accuracy-(dis)parity-style (un)fairness of GNNs from a theoretical perspective. Under reasonable assumptions, we demonstrate that the distance between a test subgroup and the training set can be a key factor affecting the GNN performance on that subgroup, which calls special attention to the training node selection for fair learning. Experiments across multiple GNN models and datasets support our theoretical results4.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Graph Neural Networks (GNNs) [13, 35, 20] are a family of machine learning models that can be used to model non-Euclidean data as well as inter-related samples in a flexible way. In recent years, there have been enormous successful applications of GNNs in various areas, such as drug discovery [18], computer vision [29], transportation forecasting [49], recommender systems [48], etc. Depending on the type of prediction target, the application tasks can be roughly categorized into node-level, edge-level, subgraph-level, and graph-level tasks [46].
|
| 16 |
+
|
| 17 |
+
In contrast to the marked empirical success, theoretical understanding of the generalization ability of GNNs has been rather limited. Among the existing literature, some studies [9, 11, 25] focus on the analysis of graph-level tasks where each sample is an entire graph and the samples of graphs are IID. A very limited number of studies [36, 42] explore GNN generalization for node-level tasks but they assume the nodes (and their associated neighborhoods) are IID samples, which does not align with the commonly seen graph-based semi-supervised learning setups. Baranwal et al. [3] investigate GNN generalization without IID assumptions but under a specific data generating mechanism.
|
| 18 |
+
|
| 19 |
+
In this work, our first contribution is to provide a novel PAC-Bayesian analysis for the generalization ability of GNNs on node-level tasks with non-IID assumptions. In particular, we assume the node features are fixed and the node labels are independently sampled from distributions conditioned on the node features. We also assume the training set and the test set can be chosen as arbitrary subsets of nodes on the graph. We first prove two general PAC-Bayesian generalization bounds (Theorem 1 and Theorem 2) under this non-IID setup. Subsequently, we derive a generalization bound for GNN (Theorem 3) in terms of characteristics of the GNN models and the node features.
|
| 20 |
+
|
| 21 |
+
Notably, the generalization bound for GNN is influenced by the distance between the test nodes and the training nodes in terms of their aggregated node features. This suggests that, given a fixed training set, test nodes that are “far away” from all the training nodes may suffer from larger generalization errors. Based on this analysis, our second contribution is the discovering of a type of unfairness that arises from theoretically predictable accuracy disparity across some subgroups of test nodes. We further conduct a empirical study that investigates the prediction accuracy of four popular GNN models on different subgroups of test nodes. The results on multiple benchmark datasets indicate that there is indeed a significant disparity in test accuracy among these subgroups.
|
| 22 |
+
|
| 23 |
+
We summarize the contributions of this work as follows:
|
| 24 |
+
|
| 25 |
+
(1) We establish a novel PAC-Bayesian analysis for graph-based semi-supervised learning with non-IID assumptions.
|
| 26 |
+
(2) Under this setup, we derive a generalization bound for GNNs that can be applied to an arbitrary subgroup of test nodes.
|
| 27 |
+
(3) As an implication of the generalization bound, we predict that there would be an unfairness of GNN predictions that arises from accuracy disparity across subgroups of test nodes.
|
| 28 |
+
(4) We empirically verify the existence of accuracy disparity of popular GNN models on multiple benchmark datasets, as predicted by our theoretical analysis.
|
| 29 |
+
|
| 30 |
+
# 2 Related Work
|
| 31 |
+
|
| 32 |
+
# 2.1 Generalization of Graph Neural Networks
|
| 33 |
+
|
| 34 |
+
The majority of existing literature that aims to develop theoretical understandings of GNNs have focused on the expressive power of GNNs (see Sato [34] for a survey along this line), while the number of studies trying to understand the generalizability of GNNs is rather limited. Among them, some [9, 11, 25] focus on graph-level tasks, the analyses of which cannot be easily applied to node-level tasks. As far as we know, Scarselli et al. [36], Verma and Zhang [42], and Baranwal et al. [3] are the only existing studies investigating the generalization of GNNs on node-level tasks, even though node-level tasks are more common in reality. Scarselli et al. [36] present an upper bound of the VC-dimension of GNNs; Verma and Zhang [42] derive a stability-based generalization bound for a single-layer GCN [20] model. Yet, both Scarselli et al. [36] and Verma and Zhang [42] (implicitly) assume that the training nodes are IID samples from a certain distribution, which does not align with the common practice of node-level semi-supervised learning. Baranwal et al. [3] investigate the generalization of graph convolution under a specific data generating mechanism (i.e., the contextual stochastic block model [8]). Our work presents the first generalization analysis of GNNs for non-IID node-level tasks without strong assumptions on the data generating mechanism.
|
| 35 |
+
|
| 36 |
+
# 2.2 Fairness of Machine Learning on Graphs
|
| 37 |
+
|
| 38 |
+
The fairness issues of machine learning on graphs start to receive research attention recently. Following conventional machine learning fairness literature, the majority of previous work along this line [1, 5–7, 22, 32, 39, 50] concerns about fairness with respect to a given sensitive attribute, such as gender or race, which defines protected groups. In practice, the fairness issues of learning on graphs are much more complicated due to the asymmetric nature of the graph-structured data. However, only a few studies [19] investigate the unfairness caused by the graph structure without knowing a sensitive feature. Moreover, in a node-level semi-supervised learning task, the non-IID sampling of training nodes brings additional uncertainty to the fairness of the learned models. This work is the first to present a learning theoretic analysis under this setup, which in turn suggests how the graph structure and the selection of training nodes may influence the fairness of machine learning on graphs.
|
| 39 |
+
|
| 40 |
+
# 2.3 PAC-Bayesian Analysis
|
| 41 |
+
|
| 42 |
+
PAC-Bayesian analysis [27] has become one of the most powerful theoretical framework to analyze the generalization ability of machine learning models. We will briefly introduce the background in
|
| 43 |
+
|
| 44 |
+
Section 3.2, and refer the readers to a recent tutorial [14] for a systematic overview of PAC-Bayesian analysis. We note that Liao et al. [25] recently present a PAC-Bayesian generalization bound for GNNs on IID graph-level tasks. Both Liao et al. [25] and this work utilize results from Neyshabur et al. [30], a PAC-Bayesian analysis for ReLU-activated neural networks, in part of our proofs. Compared to Neyshabur et al. [30], the key contribution of Liao et al. [25] is the derivation of perturbation bounds of two types of GNN architectures; while the key contribution of this work is the novel analysis under the setup of non-IID node-level tasks. There is also an existing work of PAC-Bayesian analysis for transductive semi-supervised learning [4]. But it is different from our problem setup and, in particular, it cannot be used to analyze the generalization on subgroups.
|
| 45 |
+
|
| 46 |
+
# 3 Preliminaries
|
| 47 |
+
|
| 48 |
+
In this section, we first formulate the problem of node-level semi-supervised learning. We also provide a brief introduction of the PAC-Bayesian framework.
|
| 49 |
+
|
| 50 |
+
# 3.1 The Problem Formulation and Notations
|
| 51 |
+
|
| 52 |
+
Semi-supervised node classification. Let $G = ( V , E ) \in \mathcal G _ { N }$ be an undirected graph, with $V = \{ 1 , \bar { 2 } , \dots , N \}$ being the set of $N$ nodes and $E \subseteq V \times V$ being the set of edges. And $\mathcal { G } _ { N }$ is the space of all undirected graphs with $N$ nodes. The nodes are associated with node features $\boldsymbol { X } \in \mathbb { R } ^ { \hat { \boldsymbol { N } } \times \boldsymbol { D } }$ and node labels $y \in \{ 1 , 2 , \ldots , K \} ^ { N }$ .
|
| 53 |
+
|
| 54 |
+
In this work, we focus on the transductive node classification setting [47], where the node features $X$ and the graph $G$ are observed prior to learning, and every quantity of interest in the analysis will be conditioned on $X$ and $G$ . Without loss of generality, we treat $X$ and $G$ as fixed throughout our analysis, and the randomness comes from the labels $y$ . In particular, we assume that for each node $i \in V$ , its label $y _ { i }$ is generated from an unknown conditional distribution $\mathrm { P r } ( y _ { i } \mid Z _ { i } )$ , where $Z = g ( X , G )$ and $g : \mathbb { R } ^ { N \times D } \times \mathcal { G } _ { N } \mathbb { R } ^ { N \times D ^ { \prime } }$ is an aggregation function that aggregates the features over (multi-hop) local neighborhoods5. We also assume that the node labels are generated independently conditional on their respective aggregated features $Z _ { i }$ ’s.
|
| 55 |
+
|
| 56 |
+
Given a small set of the labeled nodes, $V _ { 0 } \subseteq V$ , the task of node-level semi-supervised learning is to learn a classifier $h : \mathbb { R } ^ { N \times D } \times \mathcal { G } _ { N } \mathbb { R } ^ { N \times K }$ from a function family $\mathcal { H }$ and perform it on the remaining unlabeled nodes. Given a classifier $h$ , the classification for a node $i$ is obtained by
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\hat { y } _ { i } = \underset { k \in \{ 1 , \dots , K \} } { \mathrm { a r g m a x } } h _ { i } ( X , G ) [ k ] ,
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where $h _ { i } ( X , G )$ is the $i$ -th row of $h ( X , G )$ and $h _ { i } ( X , G ) [ k ]$ refers to the $k$ -th element of $h _ { i } ( X , G )$ .
|
| 63 |
+
|
| 64 |
+
Subgroups. In Section 4, we will present an analysis of the GNN generalization performance on any subgroup of the set of unlabeled nodes, $V \setminus \bar { V _ { 0 } }$ . Note that the analysis on any subgroup is a stronger result than that on the entire unlabeled set, as any set is a subset of itself. Later we will show that the analysis on subgroups (rather than on the entire set) further allows us to investigate the accuracy disparity across subgroups. We denote a collection of subgroups of interest as $V _ { 1 } , \bar { V } _ { 2 } , \ldots , V _ { M } \subseteq \bar { V } \setminus \bar { V } _ { 0 }$ . In practice, a subgroup can be defined based on an attribute of the nodes (e.g., a gender group), certain graph-based properties, or an arbitrary partition of the nodes. We also define the size of each subgroup as $N _ { m } : = | V _ { m } | , m = 0 , \ldots , M$ .
|
| 65 |
+
|
| 66 |
+
Margin loss on each subgroup. Now we can define the empirical and expected margin loss of any classifier $h \in \mathcal H$ on each subgroup $V _ { m } , m = 0 , 1 , \dots , M$ . Given a sample of observed node labels $y _ { i }$ ’s, the empirical margin loss of $h$ on $V _ { m }$ for a margin $\gamma \geq 0$ is defined as
|
| 67 |
+
|
| 68 |
+
$$
|
| 69 |
+
\widehat { \mathcal { L } } _ { m } ^ { \gamma } ( h ) : = \frac { 1 } { N _ { m } } \sum _ { i \in V _ { m } } \mathbb { 1 } \left[ h _ { i } ( X , G ) [ y _ { i } ] \leq \gamma + \operatorname* { m a x } _ { k \neq y _ { i } } h _ { i } ( X , G ) [ k ] \right] ,
|
| 70 |
+
$$
|
| 71 |
+
|
| 72 |
+
where $\mathbb { 1 } \left[ \cdot \right]$ is the indicator function. The expected margin loss is the expectation of Eq. (1), i.e.,
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\begin{array} { r } { \mathcal { L } _ { m } ^ { \gamma } ( h ) : = \mathbb { E } _ { y _ { i } \sim \operatorname* { P r } ( \mathbf { y } \mid Z _ { i } ) , i \in V _ { m } } \widehat { \mathcal { L } } _ { m } ^ { \gamma } ( h ) . } \end{array}
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
To simplify the notation, we define $y ^ { m } : = \{ y _ { i } \} _ { i \in V _ { m } }$ , $\forall m = 0 , \ldots , M$ , so that Eq. (2) can be written as $\bar { \mathcal { L } } _ { m } ^ { \gamma } \bar { ( } h ) \bar { = } \mathbb { E } _ { y ^ { m } } \widehat { \mathcal { L } } _ { m } ^ { \gamma } ( h )$ . We note that the classification risk and empirical risk of $h$ on $V _ { m }$ are respectively equal to $\mathcal { L } _ { m } ^ { 0 } ( h )$ and $\widehat { \mathcal { L } } _ { m } ^ { 0 } ( h )$ .
|
| 79 |
+
|
| 80 |
+
# 3.2 The PAC-Bayesian Framework
|
| 81 |
+
|
| 82 |
+
The PAC-Bayesian framework [27] is an approach to analyze the generalization ability of a stochastic predictor drawn from a distribution $Q$ over the predictor family $\mathcal { H }$ that is learned from the training data. For any stochastic classifier distribution $Q$ and $m = 0 , \ldots , M$ , slightly overloading the notation, we denote the empirical margin loss of $Q$ on $V _ { m }$ as ${ \widehat { \mathcal { L } } } _ { m } ^ { \gamma } ( Q )$ , and the corresponding expected margin loss as $\mathcal { L } _ { m } ^ { \gamma } ( Q )$ . And they are given by
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\widehat { \mathscr { L } } _ { m } ^ { \gamma } ( Q ) : = \mathbb { E } _ { h \sim Q } \widehat { \mathscr { L } } _ { m } ^ { \gamma } ( h ) , \quad \mathscr { L } _ { m } ^ { \gamma } ( Q ) : = \mathbb { E } _ { h \sim Q } \mathscr { L } _ { m } ^ { \gamma } ( h ) .
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
In general, a PAC-Bayesian analysis aims to bound the generalization gap between $\mathcal { L } _ { m } ^ { \gamma } ( Q )$ and $\widehat { \mathcal { L } } _ { m } ^ { \gamma } ( Q )$ . The analysis is usually done by first proving that, for any “prior” distribution6 $P$ over $\mathcal { H }$ that is independent of the training data, the generalization gap can be controlled by the discrepancy between $P$ and $Q$ ; the analysis is then followed by careful choices of $P$ to get concrete upper bounds of the generalization gap. While the PAC-Bayesian framework is built on top of stochastic predictors, there exist standard techniques [23] that can be used to derive generalization bounds for deterministic predictors from PAC-Bayesian bounds.
|
| 89 |
+
|
| 90 |
+
Finally, we denote the Kullback-Leibler $( K L )$ divergence as $\begin{array} { r } { D _ { \mathrm { K L } } ( Q \| P ) : = \int \ln \frac { d Q } { d P } d Q } \end{array}$ , which will be used in the following analysis.
|
| 91 |
+
|
| 92 |
+
# 4 The Generalization Bound and Its Implications for Fairness
|
| 93 |
+
|
| 94 |
+
As we mentioned in Section 2.3, existing PAC-Bayesian analyses cannot be directly applied to the nonIID semi-supervised learning setup where we care about the generalization (and its disparity) across different subgroups of the unlabeled samples. In this section, we first present general PAC-Bayesian theorems for subgroup generalization under our problem setup; then we derive a generalization bound for GNNs and discuss fairness implications of the bound.
|
| 95 |
+
|
| 96 |
+
# 4.1 General PAC-Bayesian Theorems for Subgroup Generalization
|
| 97 |
+
|
| 98 |
+
Stochastic classifier bound. We first present the general PAC-Bayesian theorem (Theorem 1) for subgroup generalization of stochastic classifiers. The generalization bound depends on a notion of expected loss discrepancy between two subgroups as defined below.
|
| 99 |
+
|
| 100 |
+
Definition 1 (Expected Loss Discrepancy). Given a distribution $P$ over $\mathcal { H }$ , for any $\lambda > 0$ and $\gamma \geq 0$ for any two subgroups $V _ { m }$ and $V _ { m ^ { \prime } }$ $0 \leq m , m ^ { \prime } \leq M )$ , define the expected loss discrepancy between $V _ { m }$ and $V _ { 0 }$ with respect to $( P , \gamma , \lambda )$ as
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
D _ { m , m ^ { \prime } } ^ { \gamma } ( P ; \lambda ) : = \ln \mathbb { E } _ { h \sim P } e ^ { \lambda \left( \mathcal { L } _ { m } ^ { \gamma / 2 } ( h ) - \mathcal { L } _ { m ^ { \prime } } ^ { \gamma } ( h ) \right) } ,
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
where $\mathcal { L } _ { m } ^ { \gamma / 2 } ( h )$ and $\mathcal { L } _ { m ^ { \prime } } ^ { \gamma } ( h )$ follow the definition of Eq. (2).
|
| 107 |
+
|
| 108 |
+
Intuitively, $D _ { m , m ^ { \prime } } ^ { \gamma } ( P ; \lambda )$ captures the difference of the expected loss between $V _ { m }$ and $V _ { m ^ { \prime } }$ in an average sense (over $P$ ). Note that $D _ { m , m ^ { \prime } } ^ { \gamma } ( P ; \lambda )$ is asymmetric in terms of $V _ { m }$ and $V _ { m ^ { \prime } }$ , and can be negative if the loss on $V _ { m }$ is mostly smaller than that on $V _ { m ^ { \prime } }$ .
|
| 109 |
+
|
| 110 |
+
For stochastic classifiers, we have the following Theorem 1. Proof can be found in Appendix A.1.
|
| 111 |
+
|
| 112 |
+
Theorem 1 (Subgroup Generalization of Stochastic Classifiers). For any $0 < m \le M$ , for any $\lambda > 0$ and $\gamma \geq 0 _ { ; }$ , for any “prior” distribution $P$ on $\mathcal { H }$ that is independent of the training data on $V _ { 0 }$ , with
|
| 113 |
+
|
| 114 |
+
probability at least $1 - \delta$ over the sample of $y ^ { 0 }$ , for any $Q$ on $\mathcal { H }$ , we have7
|
| 115 |
+
|
| 116 |
+
$$
|
| 117 |
+
\mathcal { L } _ { m } ^ { \gamma / 2 } ( Q ) \leq \widehat { \mathcal { L } } _ { 0 } ^ { \gamma } ( Q ) + \frac { 1 } { \lambda } \left( D _ { \mathrm { K L } } ( Q \| P ) + \ln \frac { 1 } { \delta } + \frac { \lambda ^ { 2 } } { 4 N _ { 0 } } + D _ { m , 0 } ^ { \gamma } ( P ; \lambda ) \right) .
|
| 118 |
+
$$
|
| 119 |
+
|
| 120 |
+
Theorem 1 can be viewed as an adaptation of a result by Alquier et al. [2] from the IID supervised setting to our non-IID semi-supervised setting. The terms $\begin{array} { r } { D _ { \mathrm { K L } } ( Q \| P ) , \mathrm { l n } \frac { 2 } { \delta } } \end{array}$ , and $\frac { \lambda ^ { 2 } } { 4 N _ { 0 } }$ are commonly seen in PAC-Bayesian analysis for IID supervised setting. In particular, when setting $\lambda = \Theta ( \sqrt { N _ { 0 } } )$ , $\begin{array} { r } { \frac { 1 } { \lambda } \left( \ln \frac { 2 } { \delta } + \frac { \lambda ^ { 2 } } { 4 N _ { 0 } } \right) } \end{array}$ vanishes as the training size $N _ { 0 }$ grows. The divergence between $Q$ and $P$ , $D _ { \mathrm { K L } } ( Q \| P )$ , is usually considered as a measurement of the model complexity [14]. And there will be a trade-off between the training loss, $\widehat { \mathcal { L } } _ { 0 } ^ { \gamma } ( Q )$ , and the complexity (how far can the learned “posterior” $Q$ go from the “prior” $P$ ).
|
| 121 |
+
|
| 122 |
+
Uniquely for the non-IID semi-supervised setting, there is an extra term $D _ { m , 0 } ^ { \gamma } ( P ; \lambda )$ , which is the expected loss discrepancy between the target test subgroup $V _ { m }$ and the training set $V _ { 0 }$ . Note that this quantity is independent of the training labels $y ^ { 0 }$ . Not surprisingly, it is difficult to give generalization guarantees if the expected loss on $V _ { m }$ is much larger than that on $V _ { 0 }$ for any stochastic classifier $P$ independent of training data. We have to make some assumptions about the relationship between $V _ { m }$ and $V _ { 0 }$ to obtain a meaningful bound on $\begin{array} { r } { \frac { 1 } { \lambda } D _ { m , 0 } ^ { \gamma } ( P ; \lambda ) } \end{array}$ , which we will discuss in details in Section 4.2.
|
| 123 |
+
|
| 124 |
+
Deterministic classifier bound. Utilizing standard techniques in PAC-Bayesian analysis [23, 27, 30], we can convert the bound for stochastic classifiers in Theorem 1 to a bound for deterministic classifiers as stated in Theorem 2 below (see Appendix A.2 for the proof).
|
| 125 |
+
|
| 126 |
+
Theorem 2 (Subgroup Generalization of Deterministic Classifiers). Let $\tilde { h }$ be any classifier in $\mathcal { H }$ . For any $0 < m \le M$ , for any $\lambda > 0$ and $\gamma \geq 0$ , for any “prior” distribution $P$ on $\mathcal { H }$ that is independent of the training data on $V _ { 0 }$ , with probability at least $1 - \delta$ over the sample of $y ^ { 0 }$ , for any $Q$ on $\mathcal { H }$ such that $\begin{array} { r } { \operatorname* { P r } _ { h \sim Q } \left( \operatorname* { m a x } _ { i \in V _ { 0 } \cup V _ { m } } \| h _ { i } ( X , G ) - \tilde { h } _ { i } ( X , G ) \| _ { \infty } < \frac { \gamma } { 8 } \right) > \frac { 1 } { 2 } } \end{array}$ , we have
|
| 127 |
+
|
| 128 |
+
$$
|
| 129 |
+
\mathcal { L } _ { m } ^ { 0 } ( \widetilde { h } ) \le \widehat { \mathcal { L } } _ { 0 } ^ { \gamma } ( \widetilde { h } ) + \frac { 1 } { \lambda } \left( 2 ( D _ { \mathrm { K L } } ( Q \| P ) + 1 ) + \ln \frac { 1 } { \delta } + \frac { \lambda ^ { 2 } } { 4 N _ { 0 } } + D _ { m , 0 } ^ { \gamma / 2 } ( P ; \lambda ) \right) .
|
| 130 |
+
$$
|
| 131 |
+
|
| 132 |
+
Theorem 1 and 2 are not specific to GNNs and hold for any (respectively stochastic and deterministic) classifier under the semi-supervised setup. In Section 4.2, we will apply Theorem 2 to obtain a subgroup generalization bound that explicitly depends on the characteristics of GNNs and the data.
|
| 133 |
+
|
| 134 |
+
# 4.2 Subgroup Generalization Bound for Graph Neural Networks
|
| 135 |
+
|
| 136 |
+
The GNN model. We consider GNNs where the node feature aggregation step and the prediction step are separate. In particular, we assume the GNN classifier takes the form of $h _ { i } ( X , G ) ~ =$ $f ( \bar { g } _ { i } ( X , G ) ; W _ { 1 } , W _ { 2 } , \underline { { { \cdot \cdot \cdot } } } , W _ { L } )$ , where $g$ is an aggregation function as we described in Section 3.1 and $f$ is a ReLU-activated $L$ -layer Multi-Layer Perceptron (MLP) with $W _ { 1 } , \dots , W _ { L }$ as parameters for each layer8. Denote the largest width of all the hidden layers as $b$ .
|
| 137 |
+
|
| 138 |
+
Remark 1. There is a technical restriction on the possible choice of the aggregation function $g$ . For the following derivation of the generalization bound (6) to be valid, we need the condition that the node labels $y _ { i }$ ’s are independent conditional on their aggregated features $g _ { i } ( X , G )$ ’s, as introduced in the problem formulation in Section 3.1. However, we also note that this condition tends to hold when the aggregated features $g _ { i } ( X , G )$ ’s contain rich information about the labels.
|
| 139 |
+
|
| 140 |
+
Upper-bounding $D _ { m , 0 } ^ { \gamma } ( P ; \lambda )$ . To derive the generalization guarantee, we need to upper-bound the expected loss discrepancy $D _ { m , 0 } ^ { \gamma } ( P ; \lambda )$ . It turns out that we have to make some assumptions on the data in order to get a meaningful upper bound.
|
| 141 |
+
|
| 142 |
+
So far we have not had any restrictions on the conditional label distributions $\operatorname* { P r } ( y _ { i } = k \mid g _ { i } ( X , G ) )$ If the label distributions on $V \backslash V _ { 0 }$ can be arbitrarily different from those on $V _ { 0 }$ , the generalization can be arbitrarily poor. We therefore assume that the label distributions conditional on aggregated features are smooth (Assumption 1).
|
| 143 |
+
|
| 144 |
+
Assumption 1 (Smoothness of Data Distribution). Assume there exist $c$ -Lipschitz continuous functions $\mathring { \eta _ { 1 } } , \eta _ { 2 } , \dotsc , \eta _ { K } : \mathbb { R } ^ { D ^ { \prime } } [ 0 , 1 ]$ , such that, for any node $i \in V$ ,
|
| 145 |
+
|
| 146 |
+
$$
|
| 147 |
+
\operatorname* { P r } ( y _ { i } = k \mid g _ { i } ( X , G ) ) = \eta _ { k } ( g _ { i } ( X , G ) ) , \forall k = 1 , \ldots , K .
|
| 148 |
+
$$
|
| 149 |
+
|
| 150 |
+
We also need to characterize the relationship between a target test subgroup $V _ { m }$ and the training set $V _ { 0 }$ . For this purpose, we define the distance from $V _ { m }$ to $V _ { 0 }$ and the concept of near set below.
|
| 151 |
+
|
| 152 |
+
Definition 2 (Distance To Training Set and Near Set). For each $0 < m \le M$ , define the distance from the subgroup $V _ { m }$ to the training set $V _ { 0 }$ as
|
| 153 |
+
|
| 154 |
+
$$
|
| 155 |
+
\epsilon _ { m } : = \operatorname* { m a x } _ { j \in V _ { m } } \operatorname* { m i n } _ { i \in V _ { 0 } } \| g _ { i } ( X , G ) - g _ { j } ( X , G ) \| _ { 2 } .
|
| 156 |
+
$$
|
| 157 |
+
|
| 158 |
+
Further, for each $i \in V _ { 0 }$ , define the near set of $i$ with respect to $V _ { m }$ as
|
| 159 |
+
|
| 160 |
+
$$
|
| 161 |
+
V _ { m } ^ { ( i ) } : = \{ j \in V _ { m } \mid \| g _ { i } ( X , G ) - g _ { j } ( X , G ) \| _ { 2 } \leq \epsilon _ { m } \} .
|
| 162 |
+
$$
|
| 163 |
+
|
| 164 |
+
Clearly,
|
| 165 |
+
|
| 166 |
+
$$
|
| 167 |
+
V _ { m } = \cup _ { i \in V _ { 0 } } V _ { m } ^ { ( i ) } .
|
| 168 |
+
$$
|
| 169 |
+
|
| 170 |
+
Then, with the Assumption 2 and 3 below, we can bound the expected loss discrepancy $D _ { m , 0 } ^ { \gamma } ( P ; \lambda )$ with the following Lemma 1 (see the proof in Appendix A.3).
|
| 171 |
+
|
| 172 |
+
Assumption 2 (Equal-Sized and Disjoint Near Sets). For any $0 < m \le M$ , assume the near sets of each $i \in V _ { 0 }$ with respect to $V _ { m }$ are disjoint and have the same size $s _ { m } \in \mathbb { N } ^ { + }$ .
|
| 173 |
+
|
| 174 |
+
Assumption 3 (Concentrated Expected Loss Difference). Let $P$ be a distribution on $\mathcal { H }$ , defined by sampling the vectorized MLP parameters from ${ \mathcal { N } } ( 0 , \sigma ^ { 2 } I )$ for some $\begin{array} { r } { \sigma ^ { 2 } \le \frac { ( \gamma / 8 \epsilon _ { m } ) ^ { 2 / L } } { 2 b ( \lambda N _ { 0 } ^ { - \alpha } + \ln { 2 b L } ) } } \end{array}$ For any $L$ - layer GNN classifier $h \in \mathcal H$ with model parameters $W _ { 1 } ^ { h } , \ldots , W _ { L } ^ { h }$ , define $T _ { h } : = \operatorname* { m a x } _ { l = 1 , \ldots , L } \| W _ { l } \| _ { 2 }$ . Assume that there exists some $\textstyle 0 < \alpha < { \frac { 1 } { 4 } }$ satisfying
|
| 175 |
+
|
| 176 |
+
$$
|
| 177 |
+
\operatorname* { P r } _ { h \sim P } \left( \mathcal { L } _ { m } ^ { \gamma / 4 } ( h ) - \mathcal { L } _ { 0 } ^ { \gamma / 2 } ( h ) > N _ { 0 } ^ { - \alpha } + c K \epsilon _ { m } \mid T _ { h } ^ { L } \epsilon _ { m } > \frac { \gamma } { 8 } \right) \le e ^ { - N _ { 0 } ^ { 2 \alpha } } .
|
| 178 |
+
$$
|
| 179 |
+
|
| 180 |
+
Lemma 1 (Bound for $D _ { m , 0 } ^ { \gamma } ( P ; \lambda ) )$ . Under Assumption $I$ , 2 and 3, for any $0 < m \le M$ , any $0 < \lambda \leq N _ { 0 } ^ { 2 \alpha }$ and $\gamma \geq 0$ , assume the “prior” $P$ on $\mathcal { H }$ is defined by sampling the vectorized $M L P$ parameters from ${ \mathcal { N } } ( 0 , \sigma ^ { 2 } I )$ for some $\begin{array} { r } { \sigma ^ { 2 } \le \frac { ( \gamma / 8 \epsilon _ { m } ) ^ { 2 / L } } { 2 b ( \lambda N _ { 0 } ^ { - \alpha } + \ln { 2 b L } ) } } \end{array}$ . We have
|
| 181 |
+
|
| 182 |
+
$$
|
| 183 |
+
D _ { m , 0 } ^ { \gamma / 2 } ( P ; \lambda ) \leq \ln { 3 } + \lambda c K \epsilon _ { m } .
|
| 184 |
+
$$
|
| 185 |
+
|
| 186 |
+
Intuitively, what we need to bound $D _ { m , 0 } ^ { \gamma } ( P ; \lambda )$ is that the training set $V _ { 0 }$ is “representative” for $V _ { m }$ . This is reasonable in practice as it is natural to select the training samples according to the distribution of the population. Specifically, Assumption 2 assumes that $V _ { m }$ can be split into equalsized partitions indexed by the training samples. The elements of each partition $V _ { m } ^ { ( i ) }$ are close to the corresponding training sample $i$ but not so close to training samples other than $i$ . This assumption is stronger than needed to obtain a meaningful bound on $\bar { D } _ { m , 0 } ^ { \gamma } \bar { ( } P ; \lambda )$ , and we can relax it by only assuming that most samples in $V _ { m }$ have proportional “close representatives” in $V _ { 0 }$ . But we keep Assumption 2 in this work, as it is intuitively clear and significantly eases the analysis and notations. Assumption 3 essentially assumes that the expected margin loss on $V _ { m }$ is not much larger than that on $V _ { 0 }$ when the number of samples becomes large. We first note that this assumption becomes trivially true in the degenerate case that all samples in $V _ { m }$ and $V _ { 0 }$ are IID. In this case, $\bar { \mathcal { L } } _ { m } ^ { \gamma / 4 } ( h ) = \bar { \mathcal { L } } _ { 0 } ^ { \gamma / 4 } ( h ) < \bar { \mathcal { L } } _ { 0 } ^ { \gamma / 2 } ( h ) \bar { \ } \leq 0$ for any classifier $h$ . In Appendix A.5, we further provide a simple non-IID example where Assumption 3 holds.
|
| 187 |
+
|
| 188 |
+
The bound (5) suggests that the closer between $V _ { m }$ and $V _ { 0 }$ (smaller $\epsilon _ { m }$ ), the smaller the expected loss discrepancy.
|
| 189 |
+
|
| 190 |
+
Bound for GNNs. Finally, with an additional technical assumption (Assumption 4) that the maximum L2 norm of aggregated node features does not grow too fast in terms of the number of training samples, we obtain a subgroup generalization bound for GNNs in Theorem 3. The proof of Theorem 3 can be found in Appendix A.4.
|
| 191 |
+
|
| 192 |
+
Assumption 4. Define $B _ { m } : = \operatorname* { m a x } _ { i \in V _ { 0 } \cup V _ { m } } \| g _ { i } ( X , G ) \| _ { 2 }$ . For any classifier $\tilde { h } \in \mathcal { H }$ with parameters $\{ \widetilde { W } _ { l } \} _ { l = 1 } ^ { L }$ , assume $\| \widetilde { W } _ { l } \| _ { F } \le C f o r l = 1 , \ldots , L .$ . Assume $B _ { m } , C$ are constants with respect to $N _ { 0 }$ .
|
| 193 |
+
|
| 194 |
+
Theorem 3 (Subgroup Generalization Bound for GNNs). Let $\tilde { h }$ be any classifier in $\mathcal { H }$ with parameters $\{ \widetilde { W } _ { l } \} _ { l = 1 } ^ { L }$ . Under Assumptions 1, 2, 3, and 4, for any $0 < m \le M$ , $\gamma \geq 0$ , and large enough $N _ { 0 }$ , with probability at least $1 - \delta$ over the sample of $y ^ { 0 }$ , we have
|
| 195 |
+
|
| 196 |
+
$$
|
| 197 |
+
\mathcal { L } _ { m } ^ { 0 } ( \widetilde { h } ) \leq \widehat { \mathcal { L } } _ { 0 } ^ { \gamma } ( \widetilde { h } ) + O \left( c K \epsilon _ { m } + \frac { b \sum _ { l = 1 } ^ { L } \| \widetilde { W } _ { l } \| _ { F } ^ { 2 } } { ( \gamma / 8 ) ^ { 2 / L } N _ { 0 } ^ { \alpha } } ( \epsilon _ { m } ) ^ { 2 / L } + \frac { 1 } { N _ { 0 } ^ { 1 - 2 \alpha } } + \frac { 1 } { N _ { 0 } ^ { 2 \alpha } } \ln \frac { L C ( 2 B _ { m } ) ^ { 1 / L } } { \gamma ^ { 1 / L } \delta } \right) .
|
| 198 |
+
$$
|
| 199 |
+
|
| 200 |
+
Next, we investigate the qualitative implications of our theoretical results.
|
| 201 |
+
|
| 202 |
+
# 4.3 Implications for Fairness of Graph Neural Networks
|
| 203 |
+
|
| 204 |
+
Theoretically predictable accuracy disparity. One merit of our analysis is that we can apply Theorem 3 on different subgroups of the unlabeled nodes and compare the subgroup generalization bounds. This allows us to study the accuracy disparity across subgroups from a theoretical perspective.
|
| 205 |
+
|
| 206 |
+
A major factor that affects the generalization bound (6) is $\epsilon _ { m }$ , the aggregated-feature distance (in terms of $g ( X , G ) )$ from the target test subgroup $V _ { m }$ to the training set $V _ { 0 }$ . The generalization bound (6) suggests that there is a better generalization guarantee for subgroups that are closer to the training set. In other words, it is unfair for subgroups that are far away from the training set. While our theoretical analysis can only tell the difference among upper bounds of generalization errors, we empirically verify that, in the following Section 5, the aggregated-feature distance $\epsilon _ { m }$ is indeed a strong predictor for the test accuracy of each subgroup $V _ { m }$ . More specifically, the test accuracy decreases as the distance increases, which is consistent with the theoretical prediction given by the bound (6).
|
| 207 |
+
|
| 208 |
+
Impact of the structural positions of nodes. We further investigate if the aggregated-feature distance can be related to simpler and more interpretable graph characteristics, in order to obtain a more intuitive understanding of how the structural positions of nodes influence the prediction accuracy on them. We find that the geodesic distance (length of the shortest path) between two nodes is positively related to the distance between their aggregated features in some scenarios9, such as when the node features exhibit homophily [28]. Empirically, we also observe that test nodes with larger geodesic distance to the training set tend to suffer from lower accuracy (see Figure 2).
|
| 209 |
+
|
| 210 |
+
In contrast, we find that common node centrality metrics (e.g., degree and PageRank) have less influence on the test accuracy (see Figure 3). These centrality metrics only capture the graph characteristics of the test nodes alone, but do not take their relationship to the training set into account, which is a key factor suggested by our theoretical analysis.
|
| 211 |
+
|
| 212 |
+
Impact of training data selection. Another implication of the theoretical results is that the selection of the training set plays an important role on the fairness of the learned GNN models. First, if the training set is selected unevenly on the graph, leaving part of the test nodes far away, there will likely be a large accuracy disparity. Second, a key ingredient in the proof of Lemma 1 is that the GNN predictions on two nodes tend to be more similar if they are closer in terms of the aggregated node features. This suggests that, if an individual training node is close to many test nodes, it may bias the predictions of the learned GNN on the test nodes towards the class it belongs to.
|
| 213 |
+
|
| 214 |
+
# 5 Experiments
|
| 215 |
+
|
| 216 |
+
In this section, we empirically verify the fairness implications suggested by our theoretical analysis.
|
| 217 |
+
|
| 218 |
+
General setup. We experiment on 4 popular GNN models, GCN [20], GAT [41], SGC [45], and APPNP [21], as well as an MLP model for reference. For all models, we use the implementations by Deep Graph Library [43]. For each experiment setting, 40 independent trials are carried out.
|
| 219 |
+
|
| 220 |
+
# 5.1 Accuracy Disparity Across Subgroups
|
| 221 |
+
|
| 222 |
+
Subgroups. We examine the accuracy disparity with three types of subgroups as described below.
|
| 223 |
+
|
| 224 |
+

|
| 225 |
+
Figure 1: Test accuracy disparity across subgroups by aggregated-feature distance. Each figure corresponds to a dataset, and each bar cluster corresponds to a model. Bars labeled 1 to 5 represent subgroups with increasing distance to training set. Results are averaged over 40 independent trials with different random splits of the data, and the error bar represents the standard error of the mean.
|
| 226 |
+
|
| 227 |
+

|
| 228 |
+
Figure 2: Test accuracy disparity across subgroups by geodesic distance. The experiment and plot settings are the same as Figure 1, except for the bars labeled from 1 to 5 here represent subgroups with increasing shortest-path distance to training set.
|
| 229 |
+
|
| 230 |
+
Subgroup by aggregated-feature distance. In order to directly investigate the effect of $\epsilon _ { m }$ on the generalization bound (6), we first split the test nodes into subgroups by their distance to the training set in terms of the aggregated features. We use the two-step aggregated features to calculate the distance. In particular, denote the adjacency matrix of the graph $G$ as $\breve { A } \in \{ 0 , 1 \} ^ { N \times N }$ and the corresponding degree matrix as D, where D is an N × N diagonal matrix with Dii = PNj=1 Aij , ∀i = 1, . . . , N . Given the feature matrix $X \in \mathbb { R } ^ { N \times D }$ , the two-step aggregated features $Z$ are obtained by $Z =$ $( D + I ) ^ { - 1 } ( A + I ) ( D + I ) ^ { - 1 } ( A + I ) X$ . For each test node $i$ , we calculate its aggregated-feature distance to the training set $V _ { 0 }$ as $\begin{array} { r } { d _ { i } = \operatorname* { m i n } _ { j \in V _ { 0 } } \| Z _ { i } - Z _ { j } \| _ { 2 } } \end{array}$ . Then we sort the test nodes according to this distance and split them into 5 equal-sized subgroups.
|
| 231 |
+
|
| 232 |
+
Strictly speaking, our theory does not directly apply to GCN and GAT as they are not in the form as we defined in Section 4.2. Moreover, the two-step aggregated feature does not match exactly to the feature aggregation function of SGC and APPNP. Nevertheless, we find that even with such approximations, we are still able to observe the expected descending trend of test accuracy with respect to increasing distance in terms of the two-step aggregated features, on all four GNN models.
|
| 233 |
+
|
| 234 |
+
Subgroup by geodesic distance. As we discussed in Section 4.3, geodesic distance on the graph may well relate to the aggregated-feature distance. So we also define subgroups based on geodesic distance. We split the subgroups by replacing the aggregated-feature distance $d _ { i }$ of each test node $i$ with the minimum of the geodesic distances from $i$ to each training node on the graph.
|
| 235 |
+
|
| 236 |
+
Subgroup by node centrality. Lastly, we define subgroups based on 4 types of common node centrality metrics (degree, closeness, betweenness, and PageRank) of the test nodes. We split the subgroups by replacing the aggregated-feature distance $d _ { i }$ of each test node $i$ with the centrality score of $i$ . The purpose of this setup is to show that the common node centrality metrics are not sufficient to capture the monotonic trend of test accuracy.
|
| 237 |
+
|
| 238 |
+
Experiment setup. Following common GNN experiment setup [38], we randomly select 20 nodes in each class for training, 500 nodes for validation, and 1,000 nodes for testing. Once training is done, we report the test accuracy on subgroups defined by aggregated-feature distance, geodesic distance, and node centrality in Figure 1, 2, and 3 respectively10.
|
| 239 |
+
|
| 240 |
+

|
| 241 |
+
Figure 3: Test accuracy disparity across subgroups by node centrality. Each figure corresponds to the results of a pair of model and dataset, and each bar cluster corresponds to the subgroups defined by a certain centrality metric. In each cluster, the bars labeled from 1 to 5 represent subgroups with decreasing node centrality. Other settings are the same as Figure 1.
|
| 242 |
+
|
| 243 |
+
Experiment results. First, as shown in Figure 1, there is a clear trend that the accuracy of a test subgroup decreases as the aggregated-feature distance between the test subgroup and the training set increases. And the trend is consistent for all 4 GNN models on all the datasets we test on (except for APPNP on Cora). This result verifies the existence of accuracy disparity suggested by Theorem 3.
|
| 244 |
+
|
| 245 |
+
Second, we observe in Figure 2 that there is a similar trend when we split subgroups by the geodesic distance. This suggests that the geodesic distance on the graph can sometimes be used as a simpler indicator in practice for machine learning fairness on graph-structured data. Using such a classical graph metric as an indicator also helps us connect graph-based machine learning to network theory, especially to understandings about social networks, to better analyze fairness issues of machine learning on social networks, where high-stake decisions related to human subjects may be involved.
|
| 246 |
+
|
| 247 |
+
Furthermore, as shown in Figure 3, there is no clear monotonic trend for test accuracy when we split subgroups by node centrality, except for some particular combinations of GNN model and dataset. Empirically, the common node centrality metrics are not as good as the geodesic distance in terms of capturing the accuracy disparity. This contrast highlights the importance of the insight provided by our analysis: the “distance” to the training set, rather than some graph characteristics of the test nodes alone, is the key predictor of test accuracy.
|
| 248 |
+
|
| 249 |
+
Finally, it is intriguing that, in both Figure 1 and 2, the test accuracy of MLP (which does not use the graph structure) also decreases as the distance of a subgroup to the training set increases. This result is perhaps not surprising if the subgroups were defined by distance on the original node features, as MLP can be viewed as a special GNN where the feature aggregation function is an identity mapping, so the “aggregated features” for MLP essentially equal to the original features. Our theoretical analysis can then be similarly applied to MLP. The question is why there is also an accuracy disparity w.r.t. the aggregated-feature distance and the geodesic distance. We suspect this is because these datasets present homophily, i.e., original (non-aggregated) features of geodesically closer nodes tend to be more similar. As a result, a subgroup with smaller geodesic distance may also have closer node features to the training set. To verify this hypothesis, we repeat the experiments in Figure 1, but with independent noises added to node features such that they become less homophilious. As in Figure 4, the decreasing pattern of test accuracy across subgroups remains for the 4 GNNs on all datasets; while for MLP, the pattern disappears on Cora and Pubmed and becomes less sharp on Citeseer.
|
| 250 |
+
|
| 251 |
+

|
| 252 |
+
Figure 4: Test accuracy disparity across subgroups by aggregated-feature distance, experimented with noisy features. The experiment and plot settings are the same as Figure 1, except for the node features are perturbed by independent noises such that they are less homophilious.
|
| 253 |
+
|
| 254 |
+

|
| 255 |
+
Figure 5: Relative ratio between the FPR under biased training node selection and the FPR under uniform training node selection. Each bar in each cluster corresponds to a class (there are 7 classes in total). The red shaded bar indicates the class with high centrality training nodes under the biased setup. Each cluster corresponds to a centrality metric being used for the biased node selection.
|
| 256 |
+
|
| 257 |
+
# 5.2 Impact of Biased Training Node Selection
|
| 258 |
+
|
| 259 |
+
In all the previous experiments, we follow the standard GNN training setup where 20 training nodes are uniformly sampled for each class. Next we investigate the impact if the selection of training nodes is biased, verifying our discussions in Section 4.3. We will demonstrate that the node centrality scores of the training nodes play an important role in the learned GNN model.
|
| 260 |
+
|
| 261 |
+
We choose a “dominant class” and construct a manipulated training set. For each class, we still sample 20 training nodes but in a biased way. For the dominant class, the sample is biased towards nodes of high centrality; while for other classes, the sample is biased towards nodes of low centrality. We evaluate the relative ratio of False Positive Rate (FPR) for each class between the setup using manipulated training set and the setup using uniformly sampled training set.
|
| 262 |
+
|
| 263 |
+
As shown in Figure 5, compared to MLP, the GNN models have significantly worse FPR for the dominant class when the training nodes are biased. This is because, after feature aggregation, there will be a larger proportion of test nodes that are closer to the training nodes of higher centrality. And the learned GNN model will be heavily biased towards the training labels of these nodes.
|
| 264 |
+
|
| 265 |
+
# 6 Conclusion
|
| 266 |
+
|
| 267 |
+
We present a novel PAC-Bayesian analysis for the generalization ability of GNNs on node-level semi-supervised learning tasks. As far as we know, this is the first generalization bound for GNNs for non-IID node-level tasks without strong assumptions on the data generating mechanism. One advantage of our analysis is that it can be applied to arbitrary subgroups of the test nodes, which allows us to investigate an accuracy-disparity style of fairness for GNNs. Both the theoretical and empirical results suggest that there is an accuracy disparity across subgroups of test nodes that have varying distance to the training set, and nodes with larger distance to the training nodes suffer from a lower classification accuracy. In the future, we would like to utilize our theory to analyze the fairness of GNNs on real-world applications and develop principled methods to mitigate the unfairness.
|
| 268 |
+
|
| 269 |
+
# Acknowledgements
|
| 270 |
+
|
| 271 |
+
This work was in part supported by the National Science Foundation under grant number 1633370.
|
| 272 |
+
The authors claim no competing interests.
|
| 273 |
+
References
|
| 274 |
+
[1] Chirag Agarwal, Himabindu Lakkaraju, and Marinka Zitnik. Towards a unified framework for fair and stable graph representation learning. CoRR, abs/2102.13186, 2021. URL https: //arxiv.org/abs/2102.13186.
|
| 275 |
+
[2] Pierre Alquier, James Ridgway, and Nicolas Chopin. On the properties of variational approximations of gibbs posteriors. The Journal of Machine Learning Research, 17(1):8374–8414, 2016.
|
| 276 |
+
[3] Aseem Baranwal, Kimon Fountoulakis, and Aukosh Jagannath. Graph convolution for semisupervised classification: Improved linear separability and out-of-distribution generalization. arXiv preprint arXiv:2102.06966, 2021.
|
| 277 |
+
[4] Luc Bégin, Pascal Germain, François Laviolette, and Jean-Francis Roy. Pac-bayesian theory for transductive learning. In Artificial Intelligence and Statistics, pages 105–113. PMLR, 2014.
|
| 278 |
+
[5] Avishek Joey Bose and William L. Hamilton. Compositional fairness constraints for graph embeddings. CoRR, abs/1905.10674, 2019. URL http://arxiv.org/abs/1905.10674.
|
| 279 |
+
[6] Maarten Buyl and Tijl De Bie. The kl-divergence between a graph model and its fair i-projection as a fairness regularizer. CoRR, abs/2103.01846, 2021. URL https://arxiv.org/abs/2103. 01846.
|
| 280 |
+
[7] Enyan Dai and Suhang Wang. Say no to the discrimination: Learning fair graph neural networks with limited sensitive attribute information. In Proceedings of the 14th ACM International Conference on Web Search and Data Mining, WSDM ’21, page 680–688, New York, NY, USA, 2021. Association for Computing Machinery. ISBN 9781450382977. doi: 10.1145/3437963. 3441752. URL https://doi.org/10.1145/3437963.3441752.
|
| 281 |
+
[8] Yash Deshpande, Subhabrata Sen, Andrea Montanari, and Elchanan Mossel. Contextual stochastic block models. In NeurIPS, 2018.
|
| 282 |
+
[9] Simon S Du, Kangcheng Hou, Barnabás Póczos, Ruslan Salakhutdinov, Ruosong Wang, and Keyulu Xu. Graph neural tangent kernel: Fusing graph neural networks with graph kernels. arXiv preprint arXiv:1905.13192, 2019.
|
| 283 |
+
[10] Gintare Karolina Dziugaite, Kyle Hsu, Waseem Gharbieh, Gabriel Arpino, and Daniel Roy. On the role of data in pac-bayes. In International Conference on Artificial Intelligence and Statistics, pages 604–612. PMLR, 2021.
|
| 284 |
+
[11] Vikas Garg, Stefanie Jegelka, and Tommi Jaakkola. Generalization and representational limits of graph neural networks. In International Conference on Machine Learning, pages 3419–3430. PMLR, 2020.
|
| 285 |
+
[12] Pascal Germain, Alexandre Lacasse, Francois Laviolette, Mario March, and Jean-Francis Roy. Risk bounds for the majority vote: From a pac-bayesian analysis to a learning algorithm. Journal of Machine Learning Research, 16(26):787–860, 2015.
|
| 286 |
+
[13] Marco Gori, Gabriele Monfardini, and Franco Scarselli. A new model for learning in graph domains. In Proceedings. 2005 IEEE International Joint Conference on Neural Networks, 2005., volume 2, pages 729–734. IEEE, 2005.
|
| 287 |
+
[14] Benjamin Guedj. A primer on pac-bayesian learning. arXiv preprint arXiv:1901.05353, 2019.
|
| 288 |
+
[15] Wassily Hoeffding. Probability inequalities for sums of bounded random variables. In The Collected Works of Wassily Hoeffding, pages 409–426. Springer, 1994.
|
| 289 |
+
|
| 290 |
+
[16] Yifan Hou, Jian Zhang, James Cheng, Kaili Ma, Richard TB Ma, Hongzhi Chen, and MingChang Yang. Measuring and improving the use of graph information in graph neural networks. In International Conference on Learning Representations, 2019.
|
| 291 |
+
|
| 292 |
+
[17] Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. Open graph benchmark: Datasets for machine learning on graphs. arXiv preprint arXiv:2005.00687, 2020.
|
| 293 |
+
|
| 294 |
+
[18] Wengong Jin, Regina Barzilay, and Tommi Jaakkola. Junction tree variational autoencoder for molecular graph generation. In International Conference on Machine Learning, pages 2323–2332. PMLR, 2018.
|
| 295 |
+
|
| 296 |
+
[19] Ahmad Khajehnejad, Moein Khajehnejad, Mahmoudreza Babaei, Krishna P. Gummadi, Adrian Weller, and Baharan Mirzasoleiman. Crosswalk: Fairness-enhanced node representation learning, 2021.
|
| 297 |
+
|
| 298 |
+
[20] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. arXiv preprint arXiv:1609.02907, 2016.
|
| 299 |
+
|
| 300 |
+
[21] Johannes Klicpera, Aleksandar Bojchevski, and Stephan Günnemann. Predict then propagate: Graph neural networks meet personalized pagerank. In ICLR, 2019.
|
| 301 |
+
|
| 302 |
+
[22] Charlotte Laclau, Ievgen Redko, Manvi Choudhary, and Christine Largeron. All of the fairness for edge prediction with optimal transport. CoRR, abs/2010.16326, 2020. URL https: //arxiv.org/abs/2010.16326.
|
| 303 |
+
|
| 304 |
+
[23] John Langford and John Shawe-Taylor. Pac-bayes & margins. Advances in neural information processing systems, pages 439–446, 2003.
|
| 305 |
+
|
| 306 |
+
[24] Qimai Li, Zhichao Han, and Xiao-Ming Wu. Deeper insights into graph convolutional networks for semi-supervised learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018.
|
| 307 |
+
|
| 308 |
+
[25] Renjie Liao, Raquel Urtasun, and Richard Zemel. A pac-bayesian approach to generalization bounds for graph neural networks. In ICLR, 2021.
|
| 309 |
+
|
| 310 |
+
[26] Yao Ma, Xiaorui Liu, Neil Shah, and Jiliang Tang. Is homophily a necessity for graph neural networks? arXiv preprint arXiv:2106.06134, 2021.
|
| 311 |
+
|
| 312 |
+
[27] David McAllester. Simplified pac-bayesian margin bounds. In Learning theory and Kernel machines, pages 203–215. Springer, 2003.
|
| 313 |
+
|
| 314 |
+
[28] Miller McPherson, Lynn Smith-Lovin, and James M Cook. Birds of a feather: Homophily in social networks. Annual review of sociology, 27(1):415–444, 2001.
|
| 315 |
+
|
| 316 |
+
[29] Federico Monti, Davide Boscaini, Jonathan Masci, Emanuele Rodola, Jan Svoboda, and Michael M Bronstein. Geometric deep learning on graphs and manifolds using mixture model cnns. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 5115–5124, 2017.
|
| 317 |
+
|
| 318 |
+
[30] Behnam Neyshabur, Srinadh Bhojanapalli, and Nathan Srebro. A pac-bayesian approach to spectrally-normalized margin bounds for neural networks. 2018.
|
| 319 |
+
|
| 320 |
+
[31] Hoang NT and Takanori Maehara. Revisiting graph neural networks: All we have is low-pass filters. arXiv preprint arXiv:1905.09550, 2019.
|
| 321 |
+
|
| 322 |
+
[32] Tahleen Rahman, Bartlomiej Surma, Michael Backes, and Yang Zhang. Fairwalk: Towards fair graph embedding. In Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, IJCAI-19, pages 3289–3295. International Joint Conferences on Artificial Intelligence Organization, 7 2019. doi: 10.24963/ijcai.2019/456. URL https: //doi.org/10.24963/ijcai.2019/456.
|
| 323 |
+
|
| 324 |
+
[33] Omar Rivasplata. Subgaussian random variables: An expository note. Internet publication, PDF, 2012.
|
| 325 |
+
|
| 326 |
+
[34] Ryoma Sato. A survey on the expressive power of graph neural networks. arXiv preprint arXiv:2003.04078, 2020.
|
| 327 |
+
[35] Franco Scarselli, Marco Gori, Ah Chung Tsoi, Markus Hagenbuchner, and Gabriele Monfardini. The graph neural network model. IEEE transactions on neural networks, 20(1):61–80, 2008.
|
| 328 |
+
[36] Franco Scarselli, Ah Chung Tsoi, and Markus Hagenbuchner. The vapnik–chervonenkis dimension of graph and recursive neural networks. Neural Networks, 108:248–259, 2018.
|
| 329 |
+
[37] Prithviraj Sen, Galileo Namata, Mustafa Bilgic, Lise Getoor, Brian Galligher, and Tina EliassiRad. Collective classification in network data. AI magazine, 29(3):93–93, 2008.
|
| 330 |
+
[38] Oleksandr Shchur, Maximilian Mumme, Aleksandar Bojchevski, and Stephan Günnemann. Pitfalls of graph neural network evaluation. CoRR, abs/1811.05868, 2018. URL http:// arxiv.org/abs/1811.05868.
|
| 331 |
+
[39] Indro Spinelli, Simone Scardapane, Amir Hussain, and Aurelio Uncini. Biased edge dropout for enhancing fairness in graph representation learning, 2021.
|
| 332 |
+
[40] Joel A Tropp. An introduction to matrix concentration inequalities. Foundations and Trends in Machine Learning, 8(1-2):1–230, 2015.
|
| 333 |
+
[41] Petar Velickovi ˇ c, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Liò, and Yoshua ´ Bengio. Graph attention networks. In ICLR, 2018.
|
| 334 |
+
[42] Saurabh Verma and Zhi-Li Zhang. Stability and generalization of graph convolutional neural networks. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 1539–1548, 2019.
|
| 335 |
+
[43] Minjie Wang, Da Zheng, Zihao Ye, Quan Gan, Mufei Li, Xiang Song, Jinjing Zhou, Chao Ma, Lingfan Yu, Yu Gai, et al. Deep graph library: A graph-centric, highly-performant package for graph neural networks. arXiv preprint arXiv:1909.01315, 2019.
|
| 336 |
+
[44] Duncan J Watts and Steven H Strogatz. Collective dynamics of ‘small-world’networks. nature, 393(6684):440–442, 1998.
|
| 337 |
+
[45] Felix Wu, Amauri Souza, Tianyi Zhang, Christopher Fifty, Tao Yu, and Kilian Weinberger. Simplifying graph convolutional networks. In International conference on machine learning, pages 6861–6871. PMLR, 2019.
|
| 338 |
+
[46] Zonghan Wu, Shirui Pan, Fengwen Chen, Guodong Long, Chengqi Zhang, and S Yu Philip. A comprehensive survey on graph neural networks. IEEE transactions on neural networks and learning systems, 2020.
|
| 339 |
+
[47] Zhilin Yang, William Cohen, and Ruslan Salakhudinov. Revisiting semi-supervised learning with graph embeddings. In International conference on machine learning, pages 40–48. PMLR, 2016.
|
| 340 |
+
[48] Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L Hamilton, and Jure Leskovec. Graph convolutional neural networks for web-scale recommender systems. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 974–983, 2018.
|
| 341 |
+
[49] Bing Yu, Haoteng Yin, and Zhanxing Zhu. Spatio-temporal graph convolutional networks: a deep learning framework for traffic forecasting. In Proceedings of the 27th International Joint Conference on Artificial Intelligence, pages 3634–3640, 2018.
|
| 342 |
+
[50] Ziqian Zeng, Rashidul Islam, Kamrun Naher Keya, James R. Foulds, Yangqiu Song, and Shimei Pan. Fair representation learning for heterogeneous information networks. CoRR, abs/2104.08769, 2021. URL https://arxiv.org/abs/2104.08769.
|
| 343 |
+
[51] Wenda Zhou, Victor Veitch, Morgane Austern, Ryan P Adams, and Peter Orbanz. Nonvacuous generalization bounds at the imagenet scale: a pac-bayesian compression approach. In International Conference on Learning Representations, 2018.
|
md/train/6Ab68Ip4Mu/6Ab68Ip4Mu.md
ADDED
|
@@ -0,0 +1,247 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# ResT: An Efficient Transformer for Visual Recognition
|
| 2 |
+
|
| 3 |
+
Qing-Long Zhang, Yu-Bin Yang State Key Laboratory for Novel Software Technology Nanjing University, Nanjing 21023, China wofmanaf@smail.nju.edu.cn, yangyubin@nju.edu.cn
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
This paper presents an efficient multi-scale vision Transformer, called ResT, that capably served as a general-purpose backbone for image recognition. Unlike existing Transformer methods, which employ standard Transformer blocks to tackle raw images with a fixed resolution, our ResT have several advantages: (1) A memory-efficient multi-head self-attention is built, which compresses the memory by a simple depth-wise convolution, and projects the interaction across the attention-heads dimension while keeping the diversity ability of multi-heads; (2) Positional encoding is constructed as spatial attention, which is more flexible and can tackle with input images of arbitrary size without interpolation or fine-tune; (3) Instead of the straightforward tokenization at the beginning of each stage, we design the patch embedding as a stack of overlapping convolution operation with stride on the token map. We comprehensively validate ResT on image classification and downstream tasks. Experimental results show that the proposed ResT can outperform the recently state-of-the-art backbones by a large margin, demonstrating the potential of ResT as strong backbones. The code and models will be made publicly available at https://github.com/wofmanaf/ResT.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Deep learning backbone architectures have been evolved for years and boost the performance of computer vision tasks such as classification [5, 26, 33, 11], object detection [2, 41, 18, 25], and instance segmentation [10, 24, 31], etc.
|
| 12 |
+
|
| 13 |
+
There are mainly two types of backbone architectures most commonly applied in computer vision: convolutional network (CNN) architectures [11, 38] and Transformer ones [6, 5, 33, 39]. Both of them capture feature information by stacking multiple blocks. The CNN block is generally a bottleneck structure [11], which can be defined as a stack of $1 \times 1$ , $3 \times 3$ , and $1 \times 1$ convolution layers with residual learning (shown in Figure 1a). The $1 \times 1$ layers are responsible for reducing and then increasing channel dimensions, leaving the $3 \times 3$ layer a bottleneck with smaller input/output channel dimensions. The CNN backbones are generally faster and require less inference time thanks to parameter sharing, local information aggregation, and dimension reduction. However, due to the limited and fixed receptive field, CNN blocks may be less effective in scenarios that require modeling long-range dependencies. For example, in instance segmentation, being able to collect and associate scene information from a large neighborhood can be useful in learning relationships across objects [23].
|
| 14 |
+
|
| 15 |
+
To overcome these limitations, Transformer backbones are recently explored for their ability to capture long-distance information [5, 33, 26, 19]. Unlike CNN backbones, the Transformer ones first split an image into a sequence of patches (i.e., tokens), then sum these tokens with positional encoding to represent coarse spatial information, and finally adopt a stack of Transformer blocks to capture feature information. A standard Transformer block [28] comprises a multi-head self-attention (MSA) that employs a query-key-value decomposition to model global relationships between sequence tokens, and a feed-forward network (FFN) to learn wider representations (shown in Figure 1b). As a result, Transformer blocks can dynamically adapt the receptive field according to the image content.
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Examples of backbone blocks. Left: A standard ResNet Bottleneck Block [11]. Middle: A Standard Transformer Block. Right: The proposed Efficient Transformer Block. The only difference compared with standard Transformer block is the replacement of the Multi-Head Self-Attention (MSA) with Efficient Multi-head Self-Attention (EMSA).
|
| 19 |
+
|
| 20 |
+
Despite showing great potential than CNNs, the Transformer backbones still have four major shortcomings: (1) It is difficult to extract the low-level features which form some fundamental structures in images (e.g., corners and edges) since existing Transformer backbones direct perform tokenization of patches from raw input images. (2) The memory and computation for MSA in Transformer blocks scale quadratically with spatial or embedding dimensions (i.e., the number of channels), causing vast overheads for training and inference. (3) Each head in MSA is responsible for only a subset of embedding dimensions, which may impair the performance of the network, particularly when the tokens embedding dimension (for each head) is short, making the dot product of query and key unable to constitute an informative function. (4) The input tokens and positional encoding in existing Transformer backbones are all of a fixed scale, which are unsuitable for vision tasks that require dense prediction.
|
| 21 |
+
|
| 22 |
+
In this paper, we proposed an efficient general-purpose backbone ResT (named after ResNet [11]) for computer vision, which can remedy the above issues. As illustrated in Figure 2, ResT shares exactly the same pipeline of ResNet, i.e., a stem module applied for extracting low-level information and strengthening locality, followed by four stages to construct hierarchical feature maps, and finally a head module for classification. Each stage consists of a patch embedding, a positional encoding module, and multiple Transformer blocks with specific spatial resolution and channel dimension. The patch embedding module creates a multi-scale pyramid of features by hierarchically expanding the channel capacity while reducing the spatial resolution with overlapping convolution operations. Unlike the conventional methods which can only tackle images with a fixed scale, our positional encoding module is constructed as spatial attention which is conditioned on the local neighborhood of the input token. By doing this, the proposed method is more flexible and can process input images of arbitrary size without interpolation or fine-tune. Besides, to improve the efficiency of the MSA, we build an efficient multi-head self-attention (EMSA), which significantly reduce the computation cost by a simple overlapping Depth-wise Conv2d. In addition, we compensate short-length limitations of the input token for each head by projecting the interaction across the attention-heads dimension while keeping the diversity ability of multi-heads.
|
| 23 |
+
|
| 24 |
+
We comprehensively validate the effectiveness of the proposed ResT on the commonly used benchmarks, including image classification on ImageNet-1k and downstream tasks, such as object detection, and instance segmentation on MS COCO2017. Experimental results demonstrate the effectiveness and generalization ability of the proposed ResT compared with the recently state-of-the-art Vision Transformers and CNNs. For example, with a similar model size as ResNet-18 $( 6 9 . 7 \% )$ and PVT-Tiny $( 7 5 . 1 \% )$ , our ResT-Small obtains a Top-1 accuracy of $7 9 . 6 \%$ on ImageNet-1k.
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
Figure 2: The pipeline of the proposed ResT. Similar to ResNet [11], ResT build stages with stacked blocks, making it flexible to serve as the backbone of downstream tasks, such as Object detection, Person ReID, and Instance Segmentation, etc.
|
| 28 |
+
|
| 29 |
+
# 2 ResT
|
| 30 |
+
|
| 31 |
+
As illustrated in Figure 2, ResT shares exactly the same pipeline as ResNet [11], i.e., a stem module applied to extract low-level information, followed by four stages to capture multi-scale feature maps. Each stage consists of three components, one patch embedding module (or stem module), one positional encoding module, and a set of $L$ efficient Transformer blocks. Specifically, at the beginning of each stage, the patch embedding module is adopted to reduce the resolution of the input token and expanding the channel dimension. The positional encoding module is fused to restrain position information and strengthen the feature extracting ability of patch embedding. After that, the input token is fed to the efficient Transformer blocks (illustrated in Figure 1c). In the following sections, we will introduce the intuition behind ResT.
|
| 32 |
+
|
| 33 |
+
# 2.1 Rethinking of Transformer Block
|
| 34 |
+
|
| 35 |
+
The standard Transformer block consists of two sub-layers of MSA and FFN. A residual connection is employed around each sub-layer. Before MSA and FFN, layer normalization (LN [1]) is applied. For a token input $\mathbf { x } \in \mathbb { R } ^ { n \times d _ { m } }$ , where $n$ , $d _ { m }$ indicates the spatial dimension, channel dimension, respectively. The output for each Transformer block is:
|
| 36 |
+
|
| 37 |
+
$$
|
| 38 |
+
\mathrm { y } { = } \mathrm { x } ^ { \prime } + \mathrm { F F N } ( \mathrm { L N } ( \mathrm { x } ^ { \prime } ) ) , \mathrm { a n d } \mathrm { x } ^ { \prime } { = } \mathrm { x } + \mathrm { M S A } ( \mathrm { L N } ( \mathrm { x } ) )
|
| 39 |
+
$$
|
| 40 |
+
|
| 41 |
+
MSA. MSA first obtains query $\mathbf { Q }$ , key $\mathbf { K }$ , and value $\mathbf { V }$ by applying three sets of projections to the input, each consisting of $k$ linear layers (i.e., heads) that map the $d _ { m }$ dimensional input into a $d _ { k }$ dimensional space, where $d _ { k } = d _ { m } / k$ is the head dimension. For the convenience of description, we assume $k = 1$ , then MSA can be simplified to single-head self-attention (SA). The global relationship between the token sequence can be defined as
|
| 42 |
+
|
| 43 |
+
$$
|
| 44 |
+
\mathrm { S A } ( \mathbf { Q } , \mathbf { K } , \mathbf { V } ) = \mathrm { S o f t m a x } ( \frac { \mathbf { Q } \mathbf { K } ^ { \mathrm { T } } } { \sqrt { d _ { k } } } ) \mathbf { V }
|
| 45 |
+
$$
|
| 46 |
+
|
| 47 |
+
The output values of each head are then concatenated and linearly projected to form the final output. The computation costs of MSA are $\mathcal { O } ( 2 d _ { m } n ^ { 2 } + 4 d _ { m } ^ { 2 } n )$ , which scale quadratically with spatial dimension or embedding dimensions according to the input token.
|
| 48 |
+
|
| 49 |
+
FFN. The FFN is applied for feature transformation and non-linearity. It consists of two linear layers with a non-linearity activation. The first layer expands the embedding dimensions of the input from $d _ { m }$ to $d _ { f }$ and the second layer reduce the dimensions from $d _ { f }$ to $d _ { m }$ .
|
| 50 |
+
|
| 51 |
+
$$
|
| 52 |
+
\mathrm { F F N ( x ) } = \sigma ( \mathbf { x W } _ { 1 } + \mathbf { b } _ { 1 } ) \mathbf { W } _ { 2 } + \mathbf { b } _ { 2 }
|
| 53 |
+
$$
|
| 54 |
+
|
| 55 |
+
where $\mathbf { W } _ { 1 } \in \mathbb { R } ^ { d _ { m } \times d _ { f } }$ and $\mathbf { W } _ { 2 } \in \mathbb { R } ^ { d _ { f } \times d _ { m } }$ are weights of the two Linear layers respectively, $\mathbf { b } _ { 1 } \in \mathbb { R } ^ { d _ { f } }$ and $\mathbf { b } _ { 2 } \in \mathbb { R } ^ { d _ { m } }$ are the bias terms, and $\sigma ( \cdot )$ is the activation function GELU [12]. In standard Transformer block, the channel dimensions are expanded by a factor of 4, i.e., $d _ { f } = 4 d _ { m }$ . The computation costs of FFN are $8 n d _ { m } ^ { 2 }$ .
|
| 56 |
+
|
| 57 |
+
# 2.2 Efficient Transformer Block
|
| 58 |
+
|
| 59 |
+
As analyzed above, MSA has two shortcomings: (1) The computation scales quadratically with $d _ { m }$ or $n$ according to the input token, causing vast overheads for training and inference; (2) Each head in
|
| 60 |
+
|
| 61 |
+
MSA only responsible for a subset of embedding dimensions, which may impair the performance of the network, particularly when the tokens embedding dimension (for each head) is short.
|
| 62 |
+
|
| 63 |
+

|
| 64 |
+
Figure 3: Efficient Multi-Head Self-Attention.
|
| 65 |
+
|
| 66 |
+
To remedy these issues, we propose an efficient multi-head self-attention module (illustrated in Figure 3). Here, we make some explanations.
|
| 67 |
+
|
| 68 |
+
(1) Similar to MSA, EMSA first adopt a set of projections to obtain query $\mathbf { Q }$ .
|
| 69 |
+
|
| 70 |
+
(2) To compress memory, the 2D input token $\mathbf { x } \in \mathbb { R } ^ { n \times d _ { m } }$ is reshaped to 3D one along the spatial dimension (i.e., $\hat { \mathbf { x } } \in \mathbb { R } ^ { d _ { m } \times h \times w } )$ and then feed to a depth-wise convolution operation to reduce the height and width dimension by a factor $s$ . To make simple, $s$ is adaptive set by the feature map size or the stage number. The kernel size, stride and padding are $s + 1 , s$ , and $s / 2$ respectively.
|
| 71 |
+
|
| 72 |
+
(3) The new token map after spatial reduction $\hat { \mathbf { x } } \in \mathbb { R } ^ { d _ { m } \times h / s \times w / s }$ is then reshaped to 2D one, i.e., $\hat { \mathbf { x } } \in \mathbb { R } ^ { n ^ { \prime } \times d _ { m } }$ , $n ^ { \prime } = h / s \times w / s$ . Then $\hat { \bf x }$ is feed to two sets of projection to get key $\mathbf { K }$ and value $\mathbf { V }$ .
|
| 73 |
+
|
| 74 |
+
(4) After that, we adopt Eq. 4 to compute the attention function on query Q, $\mathbf { K }$ and value $\mathbf { V }$ .
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\operatorname { E M S A } ( \mathbf { Q } , \mathbf { K } , \mathbf { V } ) = \operatorname { I N } ( \operatorname { S o f t m a x } ( \operatorname { C o n v } ( { \frac { \mathbf { Q } \mathbf { K } ^ { \mathrm { T } } } { \sqrt { d _ { k } } } } ) ) ) \mathbf { V }
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
Here, $\mathrm { C o n v } ( \cdot )$ is a standard $1 \times 1$ convolutional operation, which model the interactions among different heads. As a result, attention function of each head can depend on all of the keys and queries. However, this will impair the ability of MSA to jointly attend to information from different representation subsets at different positions. To restore this diversity ability, we add an Instance Normalization [27] (i.e, IN(·)) for the dot product matrix (after Softmax).
|
| 81 |
+
|
| 82 |
+
(5) Finally, the output values of each head are then concatenated and linearly projected to form the final output.
|
| 83 |
+
|
| 84 |
+
The computation costs of EMSA are O( 2dmn2s2 + 2d2mn(1 + 1s2 ) + dmn (s+1)2s2 + s2 , much lowerhigher. $s > 1$ $s$
|
| 85 |
+
|
| 86 |
+
Also, we add FFN after EMSA for feature transformation and non-linearity. The output for each efficient Transformer block is:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\begin{array} { r } { \mathrm { y } { = } \mathrm { x } ^ { \prime } + \mathrm { F F N } ( \mathrm { L N } ( \mathrm { x } ^ { \prime } ) ) , \mathrm { a n d } \mathrm { x } ^ { \prime } { = } \mathrm { x } + \mathrm { E M S A } ( \mathrm { L N } ( \mathrm { x } ) ) } \end{array}
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
# 2.3 Patch Embedding
|
| 93 |
+
|
| 94 |
+
The standard Transformer receives a sequence of token embeddings as input. Take ViT [5] as an example, the input image $\mathbf { x } \in \mathbb { R } ^ { 3 \times h \times w }$ is split with a patch size of $p \times p$ . These patches are flattened into 2D ones and then mapped to latent embeddings with a size of $c$ , i.e, $\mathbf { x } \in \mathbb { R } ^ { n \times c }$ , where $n = h w / p ^ { 2 }$ . However, this straightforward tokenization is failed to capture low-level feature information (such as edges and corners) [33]. In addition, the length of tokens in ViT are all of a fixed size in different blocks, making it unsuitable for downstream vision tasks such as object detection and instance segmentation that require multi-scale feature map representations.
|
| 95 |
+
|
| 96 |
+
Here, we build an efficient multi-scale backbone, calling ResT, for dense prediction. As introduced above, the efficient Transformer block in each stage operates on the same scale with identical resolution across the channel and spatial dimensions. Therefore, the patch embedding modules are required to progressively expand the channel dimension, while simultaneously reducing the spatial resolution throughout the network.
|
| 97 |
+
|
| 98 |
+
Similar to ResNet, the stem module (can be seen as the first patch embedding module) are adopted to shrunk both the height and width dimension with a reduction factor of 4. To effectively capture the low-feature information with few parameters, here we introduce a simple but effective way, i.e, stacking three $3 \times 3$ standard convolution layers (all with padding 1) with stride 2, stride 1, and stride 2, respectively. Batch Normalization [14] and ReLU activation [7] are applied for the first two layers. In stage 2, stage 3, and stage 4, the patch embedding module is adopted to down-sample the spatial dimension by $4 \times$ and increase the channel dimension by $2 \times$ . This can be done by a standard $3 \times 3$ convolution with stride 2 and padding 1. For example, patch embedding module in stage 2 changes resolution from $h / 4 \times w / 4 \times c$ to $h / 8 \times w / 8 \times 2 c$ (shown in Figure 2).
|
| 99 |
+
|
| 100 |
+
# 2.4 Positional Encoding
|
| 101 |
+
|
| 102 |
+
Positional encodings are crucial to exploiting the order of sequence. In ViT [5], a set of learnable parameters are added into the input tokens to encode positions. Let $\mathbf { x } \in \mathbb { R } ^ { n \times c }$ be the input, $\theta \in \mathbb { R } ^ { n \times c }$ be position parameters, then the encoded input can be represent as
|
| 103 |
+
|
| 104 |
+
$$
|
| 105 |
+
\hat { \mathbf { x } } = \mathbf { x } + \boldsymbol { \theta }
|
| 106 |
+
$$
|
| 107 |
+
|
| 108 |
+
However, the length of positions is exactly the same as the input tokens length, which limits the application scenarios.
|
| 109 |
+
|
| 110 |
+
To remedy this issue, the new positional encodings are required to have variable lengths according to input tokens. Let us look closer to Eq. 6, the summation operation is much like assigning pixel-wise weights to the input. Assume $\theta$ is related with x, i.e., $\theta = \operatorname { G L } ( { \bar { \mathbf { x } } } )$ , where $\mathrm { { G L } } \bar { ( } \cdot \bar { ) }$ is the group linear operation with the group number of $c$ . Then Eq. 6 can be modified to
|
| 111 |
+
|
| 112 |
+
$$
|
| 113 |
+
\hat { \mathbf { x } } = \mathbf { x } + \mathbf { G } \mathbf { L } ( \mathbf { x } )
|
| 114 |
+
$$
|
| 115 |
+
|
| 116 |
+

|
| 117 |
+
Figure 4: Patch and PE in ResT.
|
| 118 |
+
|
| 119 |
+
Besides Eq. 7, $\theta$ can also be obtained by more flexible spatial attention mechanisms. Here, we propose a simple yet effective spatial attention module calling PA(pixel-attention) to encode positions. Specifically, PA applies a $3 \times 3$ depth-wise convolution (with padding 1) operation to get the pixel-wise weight and then scaled by a sigmoid function $\sigma ( \cdot )$ . The positional encoding with PA module can then be represented as
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\hat { \mathbf { x } } = \mathrm { P A } ( \mathrm { x } ) = \mathrm { x } * \sigma ( \mathrm { D W C o n v ( x ) } )
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
Since the input token in each stage is also obtained by a convolution operation, we can embed the positional encoding into the patch embedding module. The whole structure of stage $i$ can be illustrated in Figure 4. Note that PA can be replaced by any spatial attention modules, making the positional encoding flexible in ResT.
|
| 126 |
+
|
| 127 |
+
# 2.5 Classification Head
|
| 128 |
+
|
| 129 |
+
The classification head is performed by a global average pooling layer on the output feature map of the last stage, followed by a linear classifier. The detailed ResT architecture for ImageNet-1k is shown
|
| 130 |
+
|
| 131 |
+
in Table 1, which contains four models, i.e., ResT-Lite, ResT-Small and ResT-Base and ResT-Large, which are bench-marked to ResNet-18, ResNet-18, ResNet-50, and ResNet-101, respectively.
|
| 132 |
+
|
| 133 |
+
Table 1: Architectures for ImageNet-1k. Here, we make some definitions. $\mathrm { \cdot C o n v } - k _ { - } c _ { - } s ^ { \prime }$ " means convolution layers with kernel size $k$ , output channel $c$ and stride $s$ . “MLP_ $. c "$ is the FFN structure with hidden channel $_ { 4 c }$ and output channel $c$ . And “EMSA_ $\boldsymbol { \it n \_ r ^ { \prime \prime } }$ is the EMSA operation with the number of heads $n$ and reduction $r$ . “ $\mathbf { C " }$ is 64 for ResT-Lite and ResT-Small, and 96 for ResT-Base and ResT-Large.“PA" is short for pixel-wise attention, which are introduced in Section 2.4.
|
| 134 |
+
|
| 135 |
+
<table><tr><td>Name</td><td>| Output |</td><td>Lite</td><td></td><td>Small</td><td></td><td>Base</td><td></td><td>Large</td><td></td></tr><tr><td>stem</td><td>[56×56|</td><td colspan="9">patch_embed: Conv-3_C/2_2,Conv-3_C/2_1,Conv-3_C_2,PA</td></tr><tr><td>stage1</td><td>56×56</td><td>EMSA_1_8 MLP_64</td><td>×2</td><td>EMSA_1_8 MLP_64</td><td>×2</td><td>EMSA_1_8 MLP_96</td><td>×2</td><td></td><td>EMSA_1_8 MLP_96</td><td>×2</td></tr><tr><td rowspan="2">stage2</td><td rowspan="2">28×28</td><td colspan="7">patch_embed: Conv-3_2C_2,PA</td><td rowspan="2"></td><td></td></tr><tr><td>EMSA_2_4 MLP_128</td><td>×2</td><td>EMSA_2_4 MLP_128</td><td>×2</td><td>EMSA_2_4 MLP_192</td><td>×2</td><td>EMSA_2_4 MLP_192</td><td>×2</td></tr><tr><td rowspan="2">stage3</td><td rowspan="2">|14× 14|</td><td colspan="8">patch_embed: Conv-3_4C_2,PA</td></tr><tr><td>EMSA_4_2 MLP_256</td><td>×2</td><td>EMSA_4_2 MLP_256</td><td></td><td>×6</td><td>EMSA_4_2 MLP_384</td><td>×6</td><td>EMSA_4_2 MLP_384</td><td>×18</td></tr><tr><td rowspan="2">stage4</td><td rowspan="2">7×7</td><td colspan="8">patch_embed: Conv-3_8C_2,PA</td></tr><tr><td>EMSA_8_1 MLP_512</td><td>×2</td><td>EMSA_8_1 MLP_512</td><td>×2</td><td>MLP_768</td><td>EMSA_8_1</td><td>×2</td><td>EMSA_8_1</td><td>×2</td></tr><tr><td>Classifier|</td><td>[1×1|</td><td colspan="8">MLP_768 average pool,100od fully-connected</td></tr><tr><td colspan="2">GFLOPs</td><td colspan="6">1.4 1.94</td><td colspan="2">7.91</td></tr></table>
|
| 136 |
+
|
| 137 |
+
# 3 Experiments
|
| 138 |
+
|
| 139 |
+
In this section, we conduct experiments on common-used benchmarks, including ImageNet-1k for classification, MS COCO2017 for object detection, and instance segmentation. In the following subsections, we first compared the proposed ResT with the previous state-of-the-arts on the three tasks. Then we adopt ablation studies to validate the important design elements of ResT.
|
| 140 |
+
|
| 141 |
+
# 3.1 Image Classification on ImageNet-1k
|
| 142 |
+
|
| 143 |
+
Settings. For image classification, we benchmark the proposed ResT on ImageNet-1k, which contains 1.28M training images and 50k validation images from 1,000 classes. The setting mostly follows [26]. Specifically, we employ the AdamW [20] optimizer for 300 epochs using a cosine decay learning rate scheduler and 5 epochs of linear warm-up. A batch size of 2048 (using 8 GPUs with 256 images per GPU), an initial learning rate of 5e-4, a weight decay of 0.05, and gradient clipping with a max norm of 5 are used. We include most of the augmentation and regularization strategies of [26] in training, including RandAugment [4], Mixup [35], Cutmix [34], Random erasing [40], and stochastic depth [13]. An increasing degree of stochastic depth augmentation is employed for larger models, i.e., 0.1, 0.1, 0.2, 0.3 for ResT-Lite, Rest-Small, ResT-Base, and ResT-Large, respectively. For the testing on the validation set, the shorter side of an input image is first resized to 256, and a center crop of $2 2 4 \times 2 2 4$ is used for evaluation.
|
| 144 |
+
|
| 145 |
+
Results. Table 2 presents comparisons to other backbones, including both Transformer-based ones and ConvNet-based ones. We can see, compared to the previous state-of-the-art Transformer-based architectures with similar model complexity, the proposed ResT achieves significant improvement by a large margin. For example, for smaller models, ResT noticeably surpass the counterpart PVT architectures with similar complexities: $+ 4 . 5 \%$ for ResT-Small $( 7 9 . 6 \% )$ over PVT-T $( 7 5 . 1 \% )$ . For larger models, ResT also significantly outperform the counterpart Swin architectures with similar complexities: $+ 0 . 3 \%$ for ResT-Base $( 8 1 . 6 \% )$ over Swin-T $( 8 1 . 3 \% )$ , and $+ 0 . 3 \%$ for ResT-Large $( 8 3 . 6 \% )$ over Swin-S $( 8 3 . 3 \% )$ using $2 2 4 \times 2 2 4$ input.
|
| 146 |
+
|
| 147 |
+
Table 2: Comparison with state-of-the-art backbones on ImageNet-1k benchmark. Throughput (images $/ s$ ) is measured on a single V100 GPU, following [26]. All models are trained and evaluated on $2 2 4 \times 2 2 4$ resolution. The best records and the improvements over bench-marked ResNets are marked in bold and blue, respectively.
|
| 148 |
+
|
| 149 |
+
<table><tr><td>Model</td><td>#Params (M)</td><td>FLOPs (G)</td><td>Throughput</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td colspan="6">ConvNet</td></tr><tr><td>ResNet-18 [11]</td><td>11.7</td><td>1.8</td><td>1852</td><td>69.7</td><td>89.1</td></tr><tr><td>ResNet-50 [11]</td><td>25.6</td><td>4.1</td><td>871</td><td>79.0</td><td>94.4</td></tr><tr><td>ResNet-101[11]</td><td>44.7</td><td>7.9</td><td>635</td><td>80.3</td><td>95.2</td></tr><tr><td>RegNetY-4G [22]</td><td>20.6</td><td>4.0</td><td>1156</td><td>79.4</td><td>94.7</td></tr><tr><td>RegNetY-8G [22]</td><td>39.2</td><td>8.0</td><td>591</td><td>79.9</td><td>94.9</td></tr><tr><td>RegNetY-16G [22]</td><td>83.6</td><td>15.9</td><td>334</td><td>80.4</td><td>95.1</td></tr><tr><td colspan="6">Transformer</td></tr><tr><td>DeiT-S [26]</td><td>22.1</td><td>4.6</td><td>940</td><td>79.8</td><td>94.9</td></tr><tr><td>DeiT-B [26]</td><td>86.6</td><td>17.6</td><td>292</td><td>81.8</td><td>95.6</td></tr><tr><td>PVT-T [29]</td><td>13.2</td><td>1.9</td><td>1038</td><td>75.1</td><td>92.4</td></tr><tr><td>PVT-S [29]</td><td>24.5</td><td>3.7</td><td>820</td><td>79.8</td><td>94.9</td></tr><tr><td>PVT-M[29]</td><td>44.2</td><td>6.4</td><td>526</td><td>81.2</td><td>95.6</td></tr><tr><td>PVT-L [29]</td><td>61.4</td><td>9.5</td><td>367</td><td>81.7</td><td>95.9</td></tr><tr><td>Swin-T[19]</td><td>28.29</td><td>4.5</td><td>755</td><td>81.3</td><td>95.5</td></tr><tr><td>Swin-S[19]</td><td>49.61</td><td>8.7</td><td>437</td><td>83.3</td><td>96.2</td></tr><tr><td>Swin-B [19]</td><td>87.77</td><td>15.4</td><td>278</td><td>83.5</td><td>96.5</td></tr><tr><td>ResT-Lite (Ours)</td><td>10.49</td><td>1.4</td><td>1246</td><td>77.2 (个 7.5)</td><td>93.7 (个 4.6)</td></tr><tr><td>ResT-Small (Ours)</td><td>13.66</td><td>1.9</td><td>1043</td><td>79.6 (个 9.9)</td><td>94.9 (个 5.8)</td></tr><tr><td>ResT-Base (Ours)</td><td>30.28</td><td>4.3</td><td>673</td><td>81.6 (个 2.6)</td><td>95.7 (个 1.3)</td></tr><tr><td>ResT-Large (Ours)</td><td>51.63</td><td>7.9</td><td>429</td><td>83.6 (↑ 3.3)</td><td>96.3 (个 1.1)</td></tr></table>
|
| 150 |
+
|
| 151 |
+
Compared with the state-of-the-art ConvNets, i.e., RegNet, the ResT with similar model complexity also achieves better performance: an average improvement of $1 . 7 \%$ in terms of Top-1 Accuracy. Note that RegNet is trained via thorough architecture search, the proposed ResT is adapted from the standard Transformer and has strong potential for further improvement.
|
| 152 |
+
|
| 153 |
+
# 3.2 Object Detection and Instance Segmentation on COCO
|
| 154 |
+
|
| 155 |
+
Settings. Object detection and instance segmentation experiments are conducted on COCO 2017, which contains $1 1 8 \mathrm { k }$ training, 5k validation, and $2 0 \mathrm { k }$ test-dev images. We evaluate the performance of ResT using two representative frameworks: RetinaNet [18] and Mask RCNN [10]. For these two frameworks, we utilize the same settings: multi-scale training (resizing the input such that the shorter side is between 480 and 800 while the longer side is at most 1333), AdamW [20] optimizer (initial learning rate of 1e-4, weight decay of 0.05, and batch size of 16), and $1 \times$ schedule (12 epochs). Unlike CNN backbones, which adopt post normalization and can directly apply to downstream tasks. ResT employs the pre-normalization strategy to accelerate network convergence, which means the output of each stage is not normalized before feeding to FPN [17]. Here, we add a layer normalization (LN [1]) for the output of each stage (before FPN [17]), similar to Swin [19]. Results are reported on the validation split.
|
| 156 |
+
|
| 157 |
+
Object Detection Results. Table 3 lists the results of RetinaNet with different backbones. From these results, it can be seen that for smaller models, ResT-Small is $+ 3 . 6$ box AP higher (40.3 vs. 36.7) than PVT-T with a similar computation cost. For larger models, our ResT-Base surpassing the PVT-S by $+ 1 . 6$ box AP.
|
| 158 |
+
|
| 159 |
+
Table 3: Object detection performance on the COCO val2017 split using the RetinaNet framework.
|
| 160 |
+
|
| 161 |
+
<table><tr><td>Backbones</td><td>AP50:95</td><td>AP50</td><td>AP75</td><td>APs</td><td>APm</td><td>AP1</td><td>Param (M)</td></tr><tr><td>R18[11]</td><td>31.8</td><td>49.6</td><td>33.6</td><td>16.3</td><td>34.3</td><td>43.2</td><td>21.3</td></tr><tr><td>PVT-T[29]</td><td>36.7</td><td>56.9</td><td>38.9</td><td>22.6</td><td>38.8</td><td>50.0</td><td>23.0</td></tr><tr><td>ResT-Smal(Ours)</td><td>40.3</td><td>61.3</td><td>42.7</td><td>25.7</td><td>43.7</td><td>51.2</td><td>23.4</td></tr><tr><td>R50 [11]</td><td>37.4</td><td>56.7</td><td>40.3</td><td>23.1</td><td>41.6</td><td>48.3</td><td>37.9</td></tr><tr><td>PVT-S [29]</td><td>40.4</td><td>61.3</td><td>43.0</td><td>25.0</td><td>42.9</td><td>55.7</td><td>34.2</td></tr><tr><td>Swin-T[19]</td><td>41.5</td><td>62.1</td><td>44.1</td><td>27.0</td><td>44.2</td><td>53.2</td><td>38.5</td></tr><tr><td>ResT-Base (Ours)</td><td>42.0</td><td>63.2</td><td>44.8</td><td>29.1</td><td>45.3</td><td>53.3</td><td>40.5</td></tr><tr><td>R101[11]</td><td>38.5</td><td>57.8</td><td>41.2</td><td>21.4</td><td>42.6</td><td>51.1</td><td>56.9</td></tr><tr><td>PVT-M[29]</td><td>41.9</td><td>63.1</td><td>44.3</td><td>25.0</td><td>44.9</td><td>57.6</td><td>53.9</td></tr><tr><td>Swin-S[19]</td><td>44.5</td><td>65.7</td><td>47.5</td><td>27.4</td><td>48.0</td><td>59.9</td><td>59.8</td></tr><tr><td>ResT-Large (Ours)</td><td>44.8</td><td>66.1</td><td>48.0</td><td>28.3</td><td>48.7</td><td>60.3</td><td>61.8</td></tr></table>
|
| 162 |
+
|
| 163 |
+
Instance Segmentation Results. Table 4 compares the results of ResT with those of previous state-of-the-art models on the Mask RCNN framework. Rest-Small exceeds PVT-T by $+ 2 . 9$ box AP and $+ 2 . 1$ mask AP on the COCO val2017 split. As for larger models, ResT-Base brings consistent $+ 1 . 2$ and $+ 0 . 9$ gains over PVT-S in terms of box AP and mask AP, with slightly larger model size.
|
| 164 |
+
|
| 165 |
+
Table 4: Object detection and instance segmentation performance on the COCO val2017 split using Mask RCNN framework.
|
| 166 |
+
|
| 167 |
+
<table><tr><td>Backbones</td><td>APbox</td><td>APbgx</td><td>APbg</td><td>Apmask</td><td>APmask</td><td>APmask</td><td>Param (M)</td></tr><tr><td>R18[11]</td><td>34.0</td><td>54.0</td><td>36.7</td><td>31.2</td><td>51.0</td><td>32.7</td><td>31.2</td></tr><tr><td>PVT-T [29]</td><td>36.7</td><td>59.2</td><td>39.3</td><td>35.1</td><td>56.7</td><td>37.3</td><td>32.9</td></tr><tr><td>ResT-Small(Ours)</td><td>39.6</td><td>62.9</td><td>42.3</td><td>37.2</td><td>59.8</td><td>39.7</td><td>33.3</td></tr><tr><td>R50[11]</td><td>38.6</td><td>59.5</td><td>42.1</td><td>35.2</td><td>56.3</td><td>37.5</td><td>44.3</td></tr><tr><td>PVT-S[29]</td><td>40.4</td><td>62.9</td><td>43.8</td><td>37.8</td><td>60.1</td><td>40.3</td><td>44.1</td></tr><tr><td>ResT-Base(Ours)</td><td>41.6</td><td>64.9</td><td>45.1</td><td>38.7</td><td>61.6</td><td>41.4</td><td>49.8</td></tr></table>
|
| 168 |
+
|
| 169 |
+
# 3.3 Ablation Study
|
| 170 |
+
|
| 171 |
+
In this section, we report the ablation studies of the proposed ResT, using ImageNet-1k image classification. To thoroughly investigate the important design elements, we only adopt the simplest data augmentation and hyper-parameters settings in [11]. Specifically, the input images are randomly cropped to $2 2 4 \times 2 2 4$ with random horizontal flipping. All the architectures of ResT-Lite are trained with SGD optimizer (with weight decay 1e-4 and momentum 0.9) for 100 epochs, starting from the initial learning rate of $0 . 1 \times$ batch_size/512 (with a linear warm-up of 5 epochs) and decreasing it by a factor of 10 every 30 epochs. Also, a batch size of 2048 (using 8 GPUs with 256 images per GPU) is used.
|
| 172 |
+
|
| 173 |
+
Different types of stem module. Here, we test three type of stem modules: (1) the first patch embedding module in PVT [29], i.e., $4 \times 4$ convolution operation with stride 4 and no padding; (2) the stem module in ResNet [11], i.e., one $7 \times 7$ convolution layer with stride 2 and padding 3, followed by one $3 \times 3$ max-pooling layer; (3) the stem module in the proposed ResT, i.e., three $3 \times 3$ convolutional layers (all with padding 1) with stride 2, stride 1, and stride 2, respectively. We report the results in Table 5. The stem module in the proposed ResT is more effective than that in PVT and ResNet: $+ 0 . 9 2 \%$ and $+ 0 . 6 4 \%$ improvements in terms of Top-1 accuracy, respectively.
|
| 174 |
+
|
| 175 |
+
Ablation study on EMSA. As shown in Figure!3, we adopt a Depth-wise Conv2d to reduce the computation of MSA. Here, we provide the comparison of more strategies with the same reduction stride $s$ . Results are shown in Table 6. As can be seen, average pooling achieves slightly worse results $( - 0 . 2 4 \% )$ compared with the original Depth-wise Conv2d, while the results of the Max Pooling strategy are the worst. Since the pooling operation introduces no extra parameters, therefore, average pooling can be an alternative to Depth-wise Conv2d in practice.
|
| 176 |
+
|
| 177 |
+
Table 5: Comparison of various stem modules on ResT-Lite. Results show that the proposed stem module is more effective than existing ones in PVT and ResNet.
|
| 178 |
+
|
| 179 |
+
<table><tr><td>Stem</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td>PVT[29]</td><td>71.96</td><td>89.87</td></tr><tr><td>ResNet [11]</td><td>72.24</td><td>90.17</td></tr><tr><td>ResT (Ours)</td><td>72.88</td><td>90.62</td></tr></table>
|
| 180 |
+
|
| 181 |
+
Table 6: Comparison of different reduction strategies of EMSA on ResT-Lite. Results show that Average Pooling can be an alternative to Depthwise Conv2d to make a trade-off.
|
| 182 |
+
|
| 183 |
+
<table><tr><td>Reduction</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td>DWConv</td><td>72.88</td><td>90.62</td></tr><tr><td>Avg Pooling</td><td>72.64</td><td>90.41</td></tr><tr><td>Max Pooling</td><td>72.20</td><td>89.97</td></tr></table>
|
| 184 |
+
|
| 185 |
+
Table 7: Ablation study results on the important design elements of EMSA on ResT-Lite, including the $1 \times 1$ convolution operation and Instance Normalization in Eq. 4.
|
| 186 |
+
|
| 187 |
+
<table><tr><td>Methods</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td>origin</td><td>72.88</td><td>90.62</td></tr><tr><td>w/o IN</td><td>71.98</td><td>90.32</td></tr><tr><td>w/o Conv-1&IN</td><td>71.72</td><td>89.93</td></tr></table>
|
| 188 |
+
|
| 189 |
+
Table 8: Comparison of various positional encoding (PE) strategies on ResT-Lite.
|
| 190 |
+
|
| 191 |
+
<table><tr><td>Encoding</td><td>Top-1 (%)</td><td>Top-5 (%)</td></tr><tr><td>w/o position</td><td>71.54</td><td>89.82</td></tr><tr><td>+LE</td><td>71.98</td><td>90.32</td></tr><tr><td>+ GL</td><td>72.04</td><td>90.41</td></tr><tr><td>+ PA</td><td>72.88</td><td>90.62</td></tr></table>
|
| 192 |
+
|
| 193 |
+
In addition, EMSA also adding two important elements to the standard MSA, i.e., one $1 \times 1$ convolution operation to model the interaction among different heads, and the Instance Normalization(IN) to restore diversity of different heads. Here, we validate the effectiveness of these two settings. Results are shown in Table 7. We can see, without IN, the Top-1 accuracy is degraded by $0 . 9 \%$ , we attribute it to the destroying of diversity among different heads because the $1 \times 1$ convolution operation makes all heads focus on all the tokens. In addition, the performance drops $1 . 1 6 \%$ without the convolution operation and IN. This can demonstrate that the combination of long sequence and diversity are both important for attention function.
|
| 194 |
+
|
| 195 |
+
Different types of positional encoding. In section 2.4, we introduced 3 types of positional encoding types, i.e., the original learnable parameters with fixed lengths [5] (LE), the proposed group linear mode(GL), and PA mode. These encodings are added/multiplied to the input patch token at the beginning of each stage. Here, we compared the proposed GL and PA with LE, results are shown in Table 8. We can see, the Top-1 accuracy degrades from $7 2 . 8 8 \%$ to $7 1 . 5 4 \%$ when the PA encoding is removed, this means that positional encoding is crucial for ResT. The LE and GL, achieve similar performance, which means it is possible to construct variable length of positional encoding. Moreover, the PA mode significantly surpasses the GL, achieving $0 . 8 4 \%$ Top-1 accuracy improvement, which indicates that spatial attention can also be modeled as positional encoding.
|
| 196 |
+
|
| 197 |
+
# 4 Conclusion
|
| 198 |
+
|
| 199 |
+
In this paper, we proposed ResT, a new version of multi-scale Transformer which produces hierarchical feature representations for dense prediction. We compressed the memory of standard MSA and model the interaction between multi-heads while keeping the diversity ability. To tackle input images with arbitrary, we further redesign the positional encoding as spatial attention. Experimental results demonstrate that the potential of ResT as strong backbones for dense prediction. We hope that our approach will foster further research in visual recognition.
|
| 200 |
+
|
| 201 |
+
# Acknowledgments and Disclosure of Funding
|
| 202 |
+
|
| 203 |
+
This work is funded by the Natural Science Foundation of China (No. 62176119) and the program B for Outstanding PhD candidate of Nanjing University.
|
| 204 |
+
|
| 205 |
+
# References
|
| 206 |
+
|
| 207 |
+
[1] Lei Jimmy Ba, Jamie Ryan Kiros, and Geoffrey E. Hinton. Layer normalization. CoRR, abs/1607.06450, 2016.
|
| 208 |
+
[2] Nicolas Carion, Francisco Massa, Gabriel Synnaeve, Nicolas Usunier, Alexander Kirillov, and Sergey Zagoruyko. End-to-end object detection with transformers. In Andrea Vedaldi, Horst Bischof, Thomas Brox, and Jan-Michael Frahm, editors, Computer Vision - ECCV 2020 - 16th European Conference, Glasgow, UK, August 23-28, 2020, Proceedings, Part I, volume 12346 of Lecture Notes in Computer Science, pages 213–229. Springer, 2020.
|
| 209 |
+
[3] Hanting Chen, Yunhe Wang, Tianyu Guo, Chang Xu, Yiping Deng, Zhenhua Liu, Siwei Ma, Chunjing Xu, Chao Xu, and Wen Gao. Pre-trained image processing transformer. CoRR, abs/2012.00364, 2020.
|
| 210 |
+
[4] Ekin Dogus Cubuk, Barret Zoph, Jon Shlens, and Quoc Le. Randaugment: Practical automated data augmentation with a reduced search space. In Hugo Larochelle, Marc’Aurelio Ranzato, Raia Hadsell, Maria-Florina Balcan, and Hsuan-Tien Lin, editors, Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS 2020, December 6-12, 2020, virtual, 2020.
|
| 211 |
+
[5] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An image is worth 16x16 words: Transformers for image recognition at scale. In 9th International Conference on Learning Representations, ICLR 2021, Virtual Event, Austria, May 3-7, 2021. OpenReview.net, 2021.
|
| 212 |
+
[6] Peng Gao, Jiasen Lu, Hongsheng Li, Roozbeh Mottaghi, and Aniruddha Kembhavi. Container: Context aggregation network. CoRR, abs/2106.01401, 2021.
|
| 213 |
+
[7] Xavier Glorot, Antoine Bordes, and Yoshua Bengio. Deep sparse rectifier neural networks. In Geoffrey J. Gordon, David B. Dunson, and Miroslav Dudík, editors, Proceedings of the Fourteenth International Conference on Artificial Intelligence and Statistics, AISTATS 2011, Fort Lauderdale, USA, April 11-13, 2011, volume 15 of JMLR Proceedings, pages 315–323. JMLR.org, 2011.
|
| 214 |
+
[8] Kai Han, An Xiao, Enhua Wu, Jianyuan Guo, Chunjing Xu, and Yunhe Wang. Transformer in transformer. CoRR, abs/2103.00112, 2021.
|
| 215 |
+
[9] Karttikeya Mangalam Yanghao Li Zhicheng Yan Jitendra Malik Christoph Feichtenhofer Haoqi Fan, Bo Xiong. Multiscale vision transformers. arXiv:2104.11227, 2021.
|
| 216 |
+
[10] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross B. Girshick. Mask R-CNN. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 2980–2988. IEEE Computer Society, 2017.
|
| 217 |
+
[11] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2016, Las Vegas, NV, USA, June 27-30, 2016, pages 770–778. IEEE Computer Society, 2016.
|
| 218 |
+
[12] Dan Hendrycks and Kevin Gimpel. Bridging nonlinearities and stochastic regularizers with gaussian error linear units. CoRR, abs/1606.08415, 2016.
|
| 219 |
+
[13] Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Q. Weinberger. Deep networks with stochastic depth. In Bastian Leibe, Jiri Matas, Nicu Sebe, and Max Welling, editors, Computer Vision - ECCV 2016 - 14th European Conference, Amsterdam, The Netherlands, October 11-14, 2016, Proceedings, Part IV, volume 9908 of Lecture Notes in Computer Science, pages 646–661. Springer, 2016.
|
| 220 |
+
[14] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Francis R. Bach and David M. Blei, editors, Proceedings of the 32nd International Conference on Machine Learning, ICML 2015, Lille, France, 6-11 July 2015, volume 37 of JMLR Workshop and Conference Proceedings, pages 448–456. JMLR.org, 2015.
|
| 221 |
+
[15] Md. Amirul Islam, Sen Jia, and Neil D. B. Bruce. How much position information do convolutional neural networks encode? In 8th International Conference on Learning Representations, ICLR 2020, Addis Ababa, Ethiopia, April 26-30, 2020. OpenReview.net, 2020.
|
| 222 |
+
[16] Xiang Li, Wenhai Wang, Xiaolin Hu, and Jian Yang. Selective kernel networks. In IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2019, Long Beach, CA, USA, June 16-20, 2019, pages 510–519. Computer Vision Foundation / IEEE, 2019.
|
| 223 |
+
[17] Tsung-Yi Lin, Piotr Dollár, Ross B. Girshick, Kaiming He, Bharath Hariharan, and Serge J. Belongie. Feature pyramid networks for object detection. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 936–944, 2017.
|
| 224 |
+
[18] Tsung-Yi Lin, Priya Goyal, Ross B. Girshick, Kaiming He, and Piotr Dollár. Focal loss for dense object detection. In IEEE International Conference on Computer Vision, ICCV 2017, Venice, Italy, October 22-29, 2017, pages 2999–3007. IEEE Computer Society, 2017.
|
| 225 |
+
[19] 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. CoRR, abs/2103.14030, 2021.
|
| 226 |
+
[20] Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In 7th International Conference on Learning Representations, ICLR 2019, New Orleans, LA, USA, May 6-9, 2019. OpenReview.net, 2019.
|
| 227 |
+
[21] Niki Parmar, Prajit Ramachandran, Ashish Vaswani, Irwan Bello, Anselm Levskaya, and Jon Shlens. Stand-alone self-attention in vision models. In Hanna M. Wallach, Hugo Larochelle, Alina Beygelzimer, Florence d’Alché-Buc, Emily B. Fox, and Roman Garnett, editors, Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019, December 8-14, 2019, Vancouver, BC, Canada, pages 68–80, 2019.
|
| 228 |
+
[22] Ilija Radosavovic, Raj Prateek Kosaraju, Ross B. Girshick, Kaiming He, and Piotr Dollár. Designing network design spaces. In 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition, CVPR 2020, Seattle, WA, USA, June 13-19, 2020, pages 10425–10433. IEEE, 2020.
|
| 229 |
+
[23] Aravind Srinivas, Tsung-Yi Lin, Niki Parmar, Jonathon Shlens, Pieter Abbeel, and Ashish Vaswani. Bottleneck transformers for visual recognition. CoRR, abs/2101.11605, 2021.
|
| 230 |
+
[24] Zhi Tian, Chunhua Shen, and Hao Chen. Conditional convolutions for instance segmentation. In Andrea Vedaldi, Horst Bischof, Thomas Brox, and Jan-Michael Frahm, editors, 16th European Conference on Computer Vision, ECCV 2020, Glasgow, UK, August 23-28, 2020, Proceedings, Part I, volume 12346 of Lecture Notes in Computer Science, pages 282–298. Springer, 2020.
|
| 231 |
+
[25] Zhi Tian, Chunhua Shen, Hao Chen, and Tong He. FCOS: A simple and strong anchor-free object detector. CoRR, abs/2006.09214, 2020.
|
| 232 |
+
[26] Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. CoRR, abs/2012.12877, 2020.
|
| 233 |
+
[27] Dmitry Ulyanov, Andrea Vedaldi, and Victor S. Lempitsky. Instance normalization: The missing ingredient for fast stylization. CoRR, abs/1607.08022, 2016.
|
| 234 |
+
[28] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Isabelle Guyon, Ulrike von Luxburg, Samy Bengio, Hanna M. Wallach, Rob Fergus, S. V. N. Vishwanathan, and Roman Garnett, editors, Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pages 5998–6008, 2017.
|
| 235 |
+
[29] Wenhai Wang, Enze Xie, Xiang Li, Deng-Ping Fan, Kaitao Song, Ding Liang, Tong Lu, Ping Luo, and Ling Shao. Pyramid vision transformer: A versatile backbone for dense prediction without convolutions. arXiv preprint arXiv:2102.12122, 2021.
|
| 236 |
+
[30] Xiaolong Wang, Ross B. Girshick, Abhinav Gupta, and Kaiming He. Non-local neural networks. CoRR, abs/1711.07971, 2017.
|
| 237 |
+
[31] Xinlong Wang, Rufeng Zhang, Tao Kong, Lei Li, and Chunhua Shen. Solov2: Dynamic, faster and stronger. CoRR, abs/2003.10152, 2020.
|
| 238 |
+
[32] Saining Xie, Ross B. Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In 2017 IEEE Conference on Computer Vision and Pattern Recognition, CVPR 2017, Honolulu, HI, USA, July 21-26, 2017, pages 5987–5995. IEEE Computer Society, 2017.
|
| 239 |
+
[33] Li Yuan, Yunpeng Chen, Tao Wang, Weihao Yu, Yujun Shi, Francis E. H. Tay, Jiashi Feng, and Shuicheng Yan. Tokens-to-token vit: Training vision transformers from scratch on imagenet. CoRR, abs/2101.11986, 2021.
|
| 240 |
+
[34] Sangdoo Yun, Dongyoon Han, Sanghyuk Chun, Seong Joon Oh, Youngjoon Yoo, and Junsuk Choe. Cutmix: Regularization strategy to train strong classifiers with localizable features. In 2019 IEEE/CVF International Conference on Computer Vision, ICCV 2019, Seoul, Korea (South), October 27 - November 2, 2019, pages 6022–6031. IEEE, 2019.
|
| 241 |
+
[35] Hongyi Zhang, Moustapha Cissé, Yann N. Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. In 6th International Conference on Learning Representations, ICLR 2018, Vancouver, BC, Canada, April 30 - May 3, 2018, Conference Track Proceedings. OpenReview.net, 2018.
|
| 242 |
+
[36] Hang Zhang, Chongruo Wu, Zhongyue Zhang, Yi Zhu, Zhi Zhang, Haibin Lin, Yue Sun, Tong He, Jonas Mueller, R. Manmatha, Mu Li, and Alexander J. Smola. Resnest: Split-attention networks. CoRR, abs/2004.08955, 2020.
|
| 243 |
+
[37] Qing-Long Zhang, Lu Rao, and Yubin Yang. Group-cam: Group score-weighted visual explanations for deep convolutional networks. CoRR, abs/2103.13859, 2021.
|
| 244 |
+
[38] Qing-Long Zhang and Yu-Bin Yang. Sa-net: Shuffle attention for deep convolutional neural networks. CoRR, abs/2102.00240, 2021.
|
| 245 |
+
[39] Zelin Zhao, Karan Samel, Binghong Chen, and Le Song. Proto: Program-guided transformer for programguided tasks. CoRR, abs/2110.00804, 2021.
|
| 246 |
+
[40] Zhun Zhong, Liang Zheng, Guoliang Kang, Shaozi Li, and Yi Yang. Random erasing data augmentation. In The Thirty-Fourth AAAI Conference on Artificial Intelligence, AAAI 2020, The Thirty-Second Innovative Applications of Artificial Intelligence Conference, IAAI 2020, The Tenth AAAI Symposium on Educational Advances in Artificial Intelligence, EAAI 2020, New York, NY, USA, February 7-12, 2020, pages 13001– 13008. AAAI Press, 2020.
|
| 247 |
+
[41] Xizhou Zhu, Weijie Su, Lewei Lu, Bin Li, Xiaogang Wang, and Jifeng Dai. Deformable DETR: deformable transformers for end-to-end object detection. CoRR, abs/2010.04159, 2020.
|
md/train/6EWOVxvJ5FI/6EWOVxvJ5FI.md
ADDED
|
@@ -0,0 +1,462 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Stateless actor-critic for instance segmentation with high-level priors
|
| 2 |
+
|
| 3 |
+
Anonymous Author(s)
|
| 4 |
+
Affiliation
|
| 5 |
+
Address
|
| 6 |
+
email
|
| 7 |
+
|
| 8 |
+
# Abstract
|
| 9 |
+
|
| 10 |
+
Instance segmentation is an important computer vision problem which remains challenging despite impressive recent advances due to deep learning-based methods. Given sufficient training data, fully supervised methods can yield excellent performance, but annotation of ground-truth data remains a major bottleneck, especially for biomedical applications where it has to be performed by domain experts. The amount of labels required can be drastically reduced by using rules derived from prior knowledge to guide the segmentation. However, these rules are in general not differentiable and thus cannot be used with existing methods. Here, we relax this requirement by using stateless actor critic reinforcement learning, which enables non-differentiable rewards. We formulate the instance segmentation problem as graph partitioning and the actor critic predicts the edge weights driven by the rewards, which are based on the conformity of segmented instances to high-level priors on object shape, position or size. The experiments on toy and real datasets demonstrate that we can achieve excellent performance without any direct supervision based only on a rich set of priors.
|
| 11 |
+
|
| 12 |
+
# 16 1 Introduction
|
| 13 |
+
|
| 14 |
+
17 Instance segmentation is the task of segmenting all objects in an image and assigning each of them
|
| 15 |
+
18 a different label. It forms the necessary first step to the analysis of individual objects in a scene
|
| 16 |
+
19 and is thus of paramount importance in many practical applications of computer vision. Over the
|
| 17 |
+
20 recent years, fully supervised instance segmentation methods have made tremendous progress both
|
| 18 |
+
21 in natural image applications and in scientific imaging, achieving excellent segmentations for very
|
| 19 |
+
22 difficult tasks [1, 2].
|
| 20 |
+
23 A large corpus of training images is hard to avoid when the segmentation method needs to take
|
| 21 |
+
24 into account the full variability of the natural world. However, in many practical segmentation
|
| 22 |
+
25 tasks the appearance of the objects can be expected to conform to certain rules which are known a
|
| 23 |
+
26 priori. Examples include surveillance, industrial quality control and especially medical and biological
|
| 24 |
+
27 imaging applications where full exploitation of such prior knowledge is particularly important as the
|
| 25 |
+
28 training data is sparse and difficult to acquire: pixelwise annotation of the necessary instance-level
|
| 26 |
+
29 groundtruth for a microscopy experiment can take weeks or even months of expert time. The use of
|
| 27 |
+
30 shape priors has a strong history in this domain [3, 4], but the most powerful learned shape models
|
| 28 |
+
31 still require groundtruth [5] and generic shapes are hard to combine with the CNN losses and other,
|
| 29 |
+
32 non-shape, priors. For many high-level priors it has already been demonstrated that integration of
|
| 30 |
+
33 the prior directly into the CNN loss can lead to superior segmentations while significantly reducing
|
| 31 |
+
34 the necessary amounts of training data [6]. However, the requirement of formulating the prior as
|
| 32 |
+
35 a differentiable function poses a severe limitation on the kinds of high-level knowledge that can
|
| 33 |
+
36 be exploited with such an approach. The aim of our contribution is to address this limitation and
|
| 34 |
+
37 establish a framework in which a rich set of non-differentiable rules and expectations can be used to
|
| 35 |
+
38 steer the network training.
|
| 36 |
+
39 To circumvent the requirement of a differentiable loss function, we turn to the reinforcement learning
|
| 37 |
+
40 paradigm, where the rewards can be computed from a non-differentiable cost function. We base
|
| 38 |
+
41 our framework on a stateless actor-critic setup [7], providing one of the first practical applications
|
| 39 |
+
42 of this important theoretical construct. In more detail, we solve the instance segmentation problem
|
| 40 |
+
43 as agglomeration of image superpixels, with the agent predicting the weights of the edges in the
|
| 41 |
+
44 superpixel region adjacency graph. Based on the predicted weights, the segmentation is obtained
|
| 42 |
+
45 through (non-differentiable) graph partitioning and the segmented objects are then evaluated by the
|
| 43 |
+
46 critic, which learns to approximate the rewards based on the object- and image-level reasoning (see
|
| 44 |
+
47 Fig. 1).
|
| 45 |
+
48 The main contributions of this work can be summarized as follows: (i) we formulate instance segmen
|
| 46 |
+
49 tation as a RL problem based on a stateless actor-critic setup, encapsulating the non-differentiable step
|
| 47 |
+
50 of instance extraction into the environment and thus achieving end-to-end learning; (ii) we exploit
|
| 48 |
+
51 prior knowledge on instance appearance and morphology by tying the rewards to the conformity of
|
| 49 |
+
52 the predicted objects to pre-defined rules and learning to approximate the (non-differentiable) reward
|
| 50 |
+
53 function with the critic; (iii) we introduce a strategy for spatial decomposition of rewards based on
|
| 51 |
+
54 fixed-sized subgraphs to enable localized supervision from combinations of object- and image-level
|
| 52 |
+
55 rules. (iv) we demonstrate the feasibility of our approach on synthetic and real images and show
|
| 53 |
+
56 an application to an important segmentation task in developmental biology, where our framework
|
| 54 |
+
57 delivers an excellent segmentation with no supervision other than high-level rules.
|
| 55 |
+
|
| 56 |
+
# 2 Related work
|
| 57 |
+
|
| 58 |
+
Reinforcement learning has so far not found significant adoption in the segmentation domain. The closest to our work are two methods in which RL has been introduced to learn a sequence of segmentation decision steps as a Markov Decision Process. In the actor critic framework of [8], the actor recurrently predicts one instance mask at a time based on the gradient provided by the critic. The training needs fully segmented images as supervision and the overall system, including an LSTM sub-network between the encoder and the decoder, is fairly complex. In [9], the individual decision steps correspond to merges of clusters while their sequence defines a hierarchical agglomeration process on a superpixel graph. The reward function is based on Rand index and thus not differentiable, but the overall framework requires full (super)pixelwise supervision for training.
|
| 59 |
+
|
| 60 |
+
68 Reward decomposition was introduced for multi agent RL by [10] where a global reward is decom
|
| 61 |
+
69 posed into a per agent reward. [11] proves that a stateless RL setup with decomposed rewards requires
|
| 62 |
+
70 far less training samples than a RL setup with a global reward. In [12] reward decomposition is
|
| 63 |
+
71 applied both temporally and spatially for zero-shot inference on unseen environments by training on
|
| 64 |
+
72 locally selected samples to learn the underlying physics of the environment.
|
| 65 |
+
73 The restriction to differentiable losses is present in all application domains of deep learning. Common
|
| 66 |
+
74 ways to address it are usually based on a soft relaxation of the loss that can be differentiated. The
|
| 67 |
+
75 relaxation can be designed specifically for the loss, such as, for example, Area-under-Curve [13] for
|
| 68 |
+
76 classification or Jaccard Index [14] for semantic segmentation. These approaches are not directly
|
| 69 |
+
77 applicable to our use case as we aim to enable the use of a variety of object- and image-level priors
|
| 70 |
+
78 which can easily be combined without handcrafting an approximate loss for each case. More generally,
|
| 71 |
+
79 but still for a concrete task loss, Direct Loss Minimization has been proposed for CNN training in
|
| 72 |
+
80 [15]. For semi-supervised learning of a classification or ranking task, Discriminative Adversarial
|
| 73 |
+
81 Networks have been proposed as a means to learn an approximation to the loss [16]. Most generally,
|
| 74 |
+
82 Grabocka et al. in [17] propose to train a surrogate neural network which will serve as a smooth
|
| 75 |
+
83 approximation of the true loss. In our setup, the critic can informally be viewed as a surrogate network
|
| 76 |
+
84 as it learns to approximate the priors through the rewards by Q-learning.
|
| 77 |
+
85 Incorporation of rules and priors is particularly important in biomedical imaging applications, where
|
| 78 |
+
86 such knowledge can be exploited to augment or even substitute scarce groundtruth annotations.
|
| 79 |
+
87 For example, the shape prior is explicitly encoded in the popular nuclear [18] and cellular [19]
|
| 80 |
+
88 segmentation algorithms based on spatial embedding learning. Learned non-linear representations
|
| 81 |
+
89 of the shape are used in [5], while in [20] the loss for object boundary prediction is made topology
|
| 82 |
+
90 aware. Domain-specific priors can also be exploited in post-processing by graph partitioning [21].
|
| 83 |
+
91 Interestingly, the energy minimization procedure underlying the graph partitioning can also be
|
| 84 |
+
92 incorporated into the learning step [22, 23].
|
| 85 |
+
|
| 86 |
+

|
| 87 |
+
Figure 1: Interaction of the agent with the environment: (a) shows the state which is composed of the raw image and the superpixel over-segmentation; (b) depicts the agent and the superpixel graph, which accumulates the features for nodes of the GNN from pixels which belong to the corresponding superpixels; (c) given the state, the agent performs the actions by predicting edge weights on the superpixel graph; (d) the environment, which includes the graph partitioning built from the weights predicted through agent actions; (e) rewards are obtained by evaluating the segmentation arising from the graph partitioning, based on pre-defined and data dependent rules. The rewards are given back to the agent where they are used for training.
|
| 88 |
+
|
| 89 |
+
# 93 3 Methods
|
| 90 |
+
|
| 91 |
+
The task of instance segmentation can be formalized as transforming an image $x$ into a labeling $y$ where $y$ maps each pixel to a label value. An instance corresponds to the maximal set of pixels with the same label value. Typically, the instance segmentation problem is solved via supervised learning, i.e. using a training set with ground-truth labels $\hat { y }$ . Note that $y$ is invariant under the permutation of label values. In general, it is difficult to formulate instance segmentation in a fully differentiable manner. Most approaches first predict a "soft" representation with a CNN, e.g. affinities [1, 24, 25], boundaries [26, 27] or embeddings [28, 29] and apply non-differentiable post-processing, such as agglomeration [27, 30], clustering [31, 32] or partitioning [33], to obtain the instance segmentation. Alternatively, proposal-based methods predict a bounding-box per instance and then predict the instance mask for each bounding-box [34]. Furthermore, the common evaluation metrics for instance segmentation [35, 36] are also not differentiable.
|
| 92 |
+
|
| 93 |
+
105 Our main motivation to explore RL for the instance segmentation task is to circumvent the restriction
|
| 94 |
+
106 to differentiable losses and - regardless of the loss - to make the whole pipeline differentiable end-to
|
| 95 |
+
107 end even in presence of non-differentiable steps which transform pixelwise CNN predictions into
|
| 96 |
+
108 individual instances.
|
| 97 |
+
109 We formulate the instance segmentation problem using a region adjacency graph $G = ( V , E )$ ,
|
| 98 |
+
110 where the nodes $V$ correspond to superpixels (homogeneous clusters of pixels) and the edges $E$
|
| 99 |
+
111 connect nodes which belong to spatially adjacent superpixels. Given edge weights $W$ , an instance
|
| 100 |
+
112 segmentation can be obtained by partitioning the graph, here using an approximate multicut solver
|
| 101 |
+
113 [37]. Together, the image data, superpixels, graph and the graph partitioning make up the environment
|
| 102 |
+
114 $\mathcal { E }$ of our RL setup. Based on the state $s$ of $\mathcal { E }$ , the agent $\mathcal { A }$ predicts actions $a$ , which are used to
|
| 103 |
+
115 compute the partitioning. The reward $r$ is then computed based on this partitioning. Our agent $\mathcal { A }$ is a
|
| 104 |
+
116 stateless actor-critic [38], represented by two graph neural networks (GNN) [39]. The actor predicts
|
| 105 |
+
117 the actions $a$ based on the graph and its node features $F$ . The node(superpixel) features are computed
|
| 106 |
+
118 by pooling together the corrresponding pixel features based on the raw image data.
|
| 107 |
+
119 Here, we make use of two different setups: Method 1, where the per-pixel features are computed
|
| 108 |
+
120 based on the image data with the feature extractor being part of the agent $\mathcal { A }$ and Method 2 where the
|
| 109 |
+
121 feature extractor is part of the environment $\mathcal { E }$ . The feature extractor is trained end-to-end in Method
|
| 110 |
+
122 1, whereas it is fixed and thus needs to be pre-trained in Method 2. We use a U-Net [40] as feature
|
| 111 |
+
123 extractor and can use hand-crafted features in addition to the learned features. More details about
|
| 112 |
+
124 the pre- training can be found in the Appendix. The agent - environment interaction for Method 1 is
|
| 113 |
+
125 depicted in Figure 1. For Method 2 we refer to the Appendix.
|
| 114 |
+
126 Importantly, this setup enables us to use both a non-differentiable instance segmentation step and
|
| 115 |
+
127 reward function, by encapsulation of the “pixels to instances” step in the environment and learning a
|
| 116 |
+
128 policy based on the rewards with a stateless actor critic.
|
| 117 |
+
|
| 118 |
+
# 29 3.1 Stateless Reinforcement Learning Setup
|
| 119 |
+
|
| 120 |
+
130 Unlike most RL settings [41], our approach does not require an explicitly time dependent state: the
|
| 121 |
+
131 actions returned by the agent correspond to the real-valued edge weights in [0, 1], which are used to
|
| 122 |
+
132 compute the graph partitioning. Any state can be reached by a single step from the initial state and
|
| 123 |
+
133 there exists no time dependency in the state transition. Unlike [9], we predict all edge values at once
|
| 124 |
+
134 which allows us to avoid the iterative strategy of [8] and deliver and evaluate a complete segmentation
|
| 125 |
+
135 in every step. We implement a stateless actor critic formulation with episodes of length 1.
|
| 126 |
+
136 To the best of our knowledge, stateless RL was introduced in [7] to study the connection between
|
| 127 |
+
137 generative adversarial networks and actor critics and our method is one of the first practical applica
|
| 128 |
+
138 tions of this concept. Here, the agent consists of an actor, which predicts the actions $a$ and a critic,
|
| 129 |
+
139 which predicts the action value $Q$ (expected future discounted reward) given the actions. The stateless
|
| 130 |
+
140 approach simplifies the action value function: the action value has to estimate the reward for a single
|
| 131 |
+
141 step instead of estimating the expected sum of discounted future rewards for many steps. We have
|
| 132 |
+
142 explored a multi-step setup as well, but found that it yields inferior results for our application; details
|
| 133 |
+
143 can be found in the Appendix. As described in detail in 3.2, we compute localized sub-graph rewards
|
| 134 |
+
144 instead of relying on a single global reward.
|
| 135 |
+
145 The actor corresponds to a single GNN, which predicts the mean and variance of a normal distribution
|
| 136 |
+
146 for each edge. The actions $a$ are determined by sampling from this distribution and applying a
|
| 137 |
+
147 sigmoid to the result to obtain continuous edge weights in the value range $[ 0 , 1 ]$ . The GNN takes the
|
| 138 |
+
148 state $s = ( G , F )$ as input arguments and its graph convolution for the $i ^ { t h }$ node is defined as in [39]:
|
| 139 |
+
|
| 140 |
+
$$
|
| 141 |
+
f _ { i } = \gamma _ { \pi } \left( f _ { i } , \frac { 1 } { | N ( i ) | } \sum _ { j \in N ( i ) } \phi _ { \pi } \left( f _ { i } , f _ { j } \right) \right)
|
| 142 |
+
$$
|
| 143 |
+
|
| 144 |
+
149 where $\gamma _ { \pi }$ as well as $\phi _ { \pi }$ are MLPs, $( \cdot , \cdot )$ is the concatenation of vectors and $N ( i )$ is the set of neighbors
|
| 145 |
+
150 of node $i$ . The gradient of the loss for the actor is given by:
|
| 146 |
+
|
| 147 |
+
$$
|
| 148 |
+
\nabla _ { \theta } \mathcal { L } _ { a c t o r } = \nabla _ { \theta } \frac { 1 } { | S G | } \sum _ { s g \in G } \left[ \alpha \sum _ { \hat { a } \in s g } l o g ( \pi ^ { \theta } ( \hat { a } | s ) ) - Q _ { s g } ( s , a ) \right]
|
| 149 |
+
$$
|
| 150 |
+
|
| 151 |
+
151 This loss gradient is derived following [38]. We adapt it to the sub-graph reward structure by
|
| 152 |
+
152 calculating the joint action probability of the policy $\bar { \pi ^ { \theta } }$ over each sub-graph $s g$ in the set of all
|
| 153 |
+
153 sub-graphs $_ { S G }$ . Using this loss to optimize the policy parameters $\theta$ minimizes the Kullback-Leibler
|
| 154 |
+
154 divergence between the Gibbs distribution of action values for each sub-graph $Q _ { s g } ( s , a )$ and the
|
| 155 |
+
155 policy with respect to the parameters $\theta$ of the policy. $\alpha$ is a trainable temperature parameter which is
|
| 156 |
+
156 optimized following the method introduced by [38].
|
| 157 |
+
158 The critic predicts the action value $Q _ { s g }$ for each sub-graph $s g \in S G$ . It consists of a GNN $Q _ { s g } ( s , a )$
|
| 158 |
+
159 that takes the state $s = ( G , F )$ as well as the actions $a$ predicted by the actor as input and predicts a
|
| 159 |
+
160 feature vector for each edge. The graph convolution from Equation 2 is slightly modified:
|
| 160 |
+
|
| 161 |
+
$$
|
| 162 |
+
f _ { i } = \gamma _ { Q } \left( f _ { i } , \frac { 1 } { | N ( i ) | } \sum _ { j \in N ( i ) } \phi _ { Q } \left( f _ { i } , f _ { j } , a _ { ( i , j ) } \right) \right)
|
| 163 |
+
$$
|
| 164 |
+
|
| 165 |
+
161 again $\gamma _ { Q }$ and $\phi _ { Q }$ are MLPs. Based on these edge features $Q _ { s g }$ is predicted for each sub-graph via an
|
| 166 |
+
162 MLP. Here, we use a set of subgraph sizes (typically, 6, 12, 32, 128) to generate a supervison signal
|
| 167 |
+
163 for different neighborhood scales. A given MLP is only valid for a fixed graph size, so we employ a
|
| 168 |
+
164 different MLP for each size. The loss for the critic is given by:
|
| 169 |
+
|
| 170 |
+

|
| 171 |
+
Figure 2: The graph is subdivided into subgraphs, each sub-graph is highlighted by a different color. All sub-graphs have the same number of edges (here 3). Overall, we use a variety of sizes covering different notions of locality.
|
| 172 |
+
|
| 173 |
+

|
| 174 |
+
Figure 3: An example reward landscape Circle Hough Transform (CHT) rewards. High rewards are given if the overall number of predicted objects is not too high and if the respective object has a large CHT value. We found an exponential gradient of the reward landscape to work best.
|
| 175 |
+
|
| 176 |
+
$$
|
| 177 |
+
\mathcal { L } _ { c r i t i c } = \frac { 1 } { | S G | } \sum _ { s g \in G } \frac { 1 } { 2 } ( Q _ { s g } ^ { \delta } ( s , a ) - r ) ^ { 2 }
|
| 178 |
+
$$
|
| 179 |
+
|
| 180 |
+
165 Minimizing this loss with respect to the action value function’s parameters $\delta$ minimizes the difference
|
| 181 |
+
166 between the expected reward and action values $Q _ { s g } ^ { \delta } ( s , a )$ .
|
| 182 |
+
|
| 183 |
+
# 3.2 Localized Supervision Signals
|
| 184 |
+
|
| 185 |
+
168 The RL paradigm is to provide a global reward for a given state transition [41]. However, we find
|
| 186 |
+
169 that for our application it is possible and desirable to instead provide several more localized rewards
|
| 187 |
+
170 per state transition: Given a large action space with a policy represented by a complex multivariate
|
| 188 |
+
171 probability distribution, it is beneficial to learn from rewards for the specific actions rather than from
|
| 189 |
+
172 a scalar global reward for the union of all actions. Of course then requirement arises that the union of
|
| 190 |
+
173 local rewards must resemble to the global reward. E.g. the optimal policy is the same for local as for
|
| 191 |
+
174 the global reward.
|
| 192 |
+
175 Our actor critic setup (Section 3.1) expects rewards per sub-graph. A good set of sub-graphs should
|
| 193 |
+
176 fulfill the following requirements: each sub-graph should be connected so that the information
|
| 194 |
+
177 presented to the MLP computing the action value for this sub-graph is correlated. The size of
|
| 195 |
+
178 the sub-graphs, given by the number of edges, should be a parameter and all sub-graphs should
|
| 196 |
+
179 be extracted with exactly that size to serve as valid input for one of the MLPs. The union of all
|
| 197 |
+
180 sub-graphs should cover the complete graph so that each edge contributes to at least one action
|
| 198 |
+
181 value $Q _ { s g }$ . The sub-graphs should overlap to provide a smooth sum of action values. We introduce
|
| 199 |
+
182 Algorithm 1 to extract such a set of sub-graphs (see Appendix). Figure 2 shows the sub-graphs for a
|
| 200 |
+
183 small example graph.
|
| 201 |
+
184 While some of the rewards used in our experiments can be directly defined for the sub-graphs, most
|
| 202 |
+
185 are instead defined per object (see Appendix for details on reward design). We use the following
|
| 203 |
+
186 general procedure to map object-level rewards to sub-graphs: first assign to each superpixel the
|
| 204 |
+
187 reward of its corresponding object, then determine the reward per edge as the maximum value of its
|
| 205 |
+
188 two incident superpixels’ rewards and average the edge rewards to obtain the reward per sub-graph.
|
| 206 |
+
189 Here, we use the maximum because high object scores indicate that all actions contributing to the
|
| 207 |
+
190 respective object should get a high reward. However, for low object scores it is not possible to localize
|
| 208 |
+
191 the specific action responsible for the low score. Hence, by taking the maximum we assign the
|
| 209 |
+
192 higher score to edges whose incident superpixels belong to different objects, because they probably
|
| 210 |
+
193 correspond to a correct split. Note that the uncertainty in the assignment of low rewards can lead to
|
| 211 |
+
194 a noisy reward signal, but the averaging of the edge rewards over the sub-graphs and the overlaps
|
| 212 |
+
|
| 213 |
+
between the sub-graphs smooth and partially denoise the rewards. We have also explored a different actor critic setup that can use object level rewards directly, eliminating the need for the sub-graph extraction and mapping. However, this approach yields inferior results, see the Appendix for details.
|
| 214 |
+
|
| 215 |
+
# 4 Experiments
|
| 216 |
+
|
| 217 |
+
The agent of our setup acts on the superpixel graph and thus depends on the features assigned to the nodes of the graph. We introduced two variants of our algorithm: in the base variant (Method 1) we start from random features and make them part of the agent, allowing them to change through back-propagation (Fig. 1). In contrast, Method 2 acts on predefined features which are provided as part of the environment and are computed before training, e.g. through unsupervised clustering. A very accurate clustering in the features produces an easy problem for the agent to solve where even a global reward for all actions might be sufficient. However, in a real-world setting with no supervision, the noisier the features become the more local the reward has to be. We evaluate Method 2 on synthetic data where self-supervised pretraining can deliver noisy, but meaningful node features. Our full setup with Method 1 is evaluated on a dataset from a light microscopy experiment, where highly regular object shapes are to be expected, but no good feature pre-training is possible.
|
| 218 |
+
|
| 219 |
+
To transform the edge weight predictions of the agent into an instance segmentation we use the Multicut [42] algorithm. Here, other options are also possible such as hierarchical clustering used in [9], but we choose the Multicut for its global optimality property. Hyperparameters of the pipeline were found by cross-validation (see Appendix).
|
| 220 |
+
|
| 221 |
+
# 4.1 Synthetic dataset: circles on structured ground
|
| 222 |
+
|
| 223 |
+
To evaluate the feasibility of our approach, we create a synthetic dataset with prominent structured background. Our aim is to segment irregular disks on such background using only rule-based supervision. We generate the superpixels by the mutex watershed algorithm [25] which we run on the Gaussian gradient image. The node features of the superpixel graph were computed through self-supervised pretraining with contrastive loss as described in Appendix and fixed as part of the environment.
|
| 224 |
+
|
| 225 |
+
221 As we aim to segment disks, we compute the circularity of the segmented objects for the rewards
|
| 226 |
+
222 using the Circle Hough Transform [43]. This object-level reward is combined with the global rough
|
| 227 |
+
223 estimate of the number of objects in the image to create the reward surface depicted in Fig. 3. The
|
| 228 |
+
224 reward for the number of objects provides useful gradient during early training stages: for example,
|
| 229 |
+
225 when too few potential objects are found in the prediction, a low reward can be given to what is
|
| 230 |
+
226 thought to be the background object. On the other hand, if too many potential objects are found, a
|
| 231 |
+
227 low reward can be given to all the foreground objects with a low CHT value.
|
| 232 |
+
228 In more detail, the object rewards $r _ { f g }$ are composed as follows. We define a threshold $\gamma$ on the CHT
|
| 233 |
+
229 value $( \gamma = 0 . 8$ in the reward surface shown in Fig. 3). Let $c \in [ 0 , 1 ]$ be the CHT value corresponding
|
| 234 |
+
230 to the object and let $k$ be the total number of objects that we expect and $n$ be the number of predicted
|
| 235 |
+
231 objects. Then
|
| 236 |
+
|
| 237 |
+
$$
|
| 238 |
+
\begin{array}{c} \begin{array} { r l } & { r _ { l o c a l } = \{ \sigma ( ( \frac { c - \gamma } { 1 - \gamma } - 0 . 5 ) 6 ) 0 . 4 , \mathrm { i f } c \geq \gamma } \\ & { \begin{array} { l l } { 0 , } & { \mathrm { o t w } } \\ { r _ { e x p } ( \frac { k } { n } ) , } & { \mathrm { i f } n \geq k } \end{array} } \\ & { r _ { g l o b a l } = \{ \begin{array} { l l } { \sigma ( \frac { c - \gamma } { 1 - \gamma } - 0 . 5 ) 6 ) 0 . 4 , } & { \mathrm { i f } c \geq \gamma } \\ { 0 . } & { \mathrm { o t o } } \end{array} } \\ & { \quad r _ { f g } = r _ { l o c a l } + r _ { g l o b a l } } \end{array} \end{array}
|
| 239 |
+
$$
|
| 240 |
+
|
| 241 |
+
232 Here $\sigma ( \cdot )$ is the sigmoid function. The input to the sigmoid function is normalized to the interval
|
| 242 |
+
233 $[ - 3 , 3 ]$ which was empirically found to be a good range. The rewards are always in $[ 0 , 1 ]$ here this is
|
| 243 |
+
234 split up into $[ 0 , 0 . 5 ]$ for the local reward as well as for the global reward.
|
| 244 |
+
235 For the largest predicted object we strongly suspect the background object. For this object background
|
| 245 |
+
236 rewards $\boldsymbol { r } _ { b g }$ are calculated by
|
| 246 |
+
|
| 247 |
+
$$
|
| 248 |
+
r _ { b g } = { \left\{ \begin{array} { l l } { r _ { e x p } \left( { \frac { n } { k } } \right) , } & { { \mathrm { i f } } n \leq k } \\ { 1 , } & { { \mathrm { o t w } } } \end{array} \right. }
|
| 249 |
+
$$
|
| 250 |
+
|
| 251 |
+
237 Note that this rewards have a large globally calculated part which makes this setup not fit for Method
|
| 252 |
+
238 1. It needs some feature representation that already gives a good idea for the clustering. The only
|
| 253 |
+
239 useful local information in the reward is the CHT value. Therefore, if the features have a fairly
|
| 254 |
+
240 distinct structure for circles, the agent should be able to find and to correctly cluster them.
|
| 255 |
+
|
| 256 |
+

|
| 257 |
+
Figure 4: The “Circles” dataset. Top left to right: ground truth segmentation, raw data, superpixel oversegmentation and a visualizataion for the actions on every edge, where a merge action is displayed in green and a split action in red. Bottom left to right: the pre-trained pixel embeddings projected to their first 3 PCA components shown as RGB, an edge image of the superpixels, the segmentation resulting from the graph agglomeration on the predicted edge weights and a visualization of the rewards based on the CHT, where light green shows high rewards and dark red low rewards.
|
| 258 |
+
|
| 259 |
+
Fig. 4 shows the output of all algorithm components on a sample image. For comparison, we also computed mutex watershed [25] predictions. Texture within objects and structured background are inherently difficult for region-growing algorithms, but our approach can exploit higher-level reasoning along with low-level information and achieve a good segmentation.
|
| 260 |
+
|
| 261 |
+
# 4.2 Real dataset: light microscopy imaging
|
| 262 |
+
|
| 263 |
+
Biomedical applications often require segmentation of objects of known morphology which are positioned in regular patterns, while extensive prior knowledge is available on variability of both under normal experimental conditions [44]. Such data presents the best use case for our algorithm as the reward function can leverage the known characteristics of individual object shape and texture and the overall similarity of the objects.
|
| 264 |
+
|
| 265 |
+
The dataset used for this experiment contains 317 2D images extracted from a video of a developing fruitfly embryo acquired with a light-sheet microscope [45] (Fig. 5). The image shows boundaries (plasma membranes) of the embryo cells. Across the dataset, 10 images were fully segmented by an expert, we use those for validation.
|
| 266 |
+
|
| 267 |
+
55 Fruitfly embryo is a well-studied system for which we can exploit the prior knowledge on the expected
|
| 268 |
+
56 cell shape and the radial pattern of cells. Furthermore, as the analysis of cell shape dynamics is
|
| 269 |
+
57 a paramount part of many biological experiments, multiple pre-trained networks are available for
|
| 270 |
+
58 the cell segmentation task [18, 19, 46, 47]. Due to the differences in sample preparation and image
|
| 271 |
+
59 acquisition settings, none of these would work out-of-the-box for our data. However, the CNNs in
|
| 272 |
+
60 [47] which are trained to predict boundaries in confocal microscope images of plant tissue, can serve
|
| 273 |
+
61 as a strong edge detector to create superpixels in our images. The superpixels are obtained using the
|
| 274 |
+
62 seeded watershed algorithm on seeds at the local minima of the predicted edge map.
|
| 275 |
+
263 The rewards for this experiment are designed as follows: we set a high reward for merging the
|
| 276 |
+
264 superpixels which are certain to lie in the background (close to the image boundary or the image
|
| 277 |
+
265 center). For the background edges near the foreground area we modulate the reward by the circularity
|
| 278 |
+
266 of the overall foreground contour. Finally, for the edges which are likely to be in the foreground
|
| 279 |
+
267 we compute object-level rewards by fitting a rotated bounding box to each object and comparing its
|
| 280 |
+
268 side lengths as well as its orientation to predefined template values. We do not perform semantic
|
| 281 |
+
269 segmentation to define precise foreground/background boundaries, but instead use a soft weighting
|
| 282 |
+
270 scheme with Gaussian weights to combine object and background rewards based on on the prior
|
| 283 |
+
271 knowledge of the embryo width. An image of the weights for different locations in the image can be
|
| 284 |
+
272 found in the appendix.
|
| 285 |
+
273 More formally the edge rewards $r _ { e d g e }$ are calculated as follows. For each edge, we define the distance
|
| 286 |
+
274 $h$ between the edge and the center of the image as the average distance of the incident objects’ center
|
| 287 |
+
275 of mass and the center $c$ of the image. $j$ is the approximate radius of the circle that lies within the
|
| 288 |
+
276 foreground and $m$ is the maximal distance between $c$ and the image boarder. Let further $\kappa ( \cdot )$ be the
|
| 289 |
+
277 Gaussian kernel function. Then $r _ { e d g e }$ yields
|
| 290 |
+
|
| 291 |
+

|
| 292 |
+
Figure 5: Microscopy dataset experiment. Top left to right: ground truth segmentation; raw data; edge map; superpixel over-segmentation; visualization for the actions on every edge, where a merge action is displayed in green and a split action in red. Bottom left to right: a) handcrafted features; b) learned features accumulated on superpixels; c) learned features projected to their first 3 PCA components shown as RGB; the segmentation resulting from the Multicut on the predicted edge weights; visualization of the rewards, where light green shows high rewards and dark red low rewards.
|
| 293 |
+
|
| 294 |
+
$$
|
| 295 |
+
\begin{array} { l l } { r _ { b g } = \left\{ \begin{array} { l l } { K \left( \frac { | | h - c | | } { \gamma } \right) ( 1 - a ) , } & { \mathrm { ~ i f ~ } h \leq j } \\ { K \left( \frac { | | m - h | | } { \eta } \right) ( 1 - a ) , } & { \mathrm { ~ o t w } } \end{array} \right. } \\ { r _ { f g } = \mathcal { K } \left( \frac { | | h - j | | } { \delta } \right) m a x ( r _ { o 1 } , r _ { o 2 } ) } \\ { r _ { e d g e } = r _ { f g } + r _ { b g } } \end{array}
|
| 296 |
+
$$
|
| 297 |
+
|
| 298 |
+
278 Here $\gamma , \eta , \delta$ are normalization constants. Equation 9 first determines the background probability for
|
| 299 |
+
279 an edge by the kernel values. $1 - a$ constitutes a reward that directly favors merges which is scaled
|
| 300 |
+
280 by the background probability. For each edge, $r _ { o 1 }$ and $r _ { o 2 }$ are the rewards corresponding to the two
|
| 301 |
+
281 objects connected to that edge. The object rewards are given by fitting a rotated bounding box to the
|
| 302 |
+
282 object and then compare rotation and dimensions to template values.
|
| 303 |
+
283 Note that in this experiment no self-supervised pretraining is used for the node features in the
|
| 304 |
+
284 agent’s GNNs. Unlike the “Circles” dataset, all objects in these images have very similar intensity
|
| 305 |
+
285 distributions and can only be separated through the detection of boundaries between them. Instead
|
| 306 |
+
286 of the pretraining, we experiment with using a few hand-crafted features like the polar coordinate
|
| 307 |
+
287 of the node’s respective superpixel’s center of mass with respect to the coordinate system sitting
|
| 308 |
+
288 at the center of the image as well as the superpixel’s mass, and with learning other features by
|
| 309 |
+
289 back-propagation from the agent. The handcrafted features are normalized, concatenated to the
|
| 310 |
+
290 learned features and used as input to the GNN. The projection of the first 3 PCA components of these
|
| 311 |
+
291 features into RGB space is shown in Fig. 5 respectively for learned feature maps, their projection
|
| 312 |
+
292 to node features through the accumulation procedure and finally the concatenation of those and the
|
| 313 |
+
293 handcrafted features. Note that the learned features converge to a representation which resembles a
|
| 314 |
+
294 semantic segmentation of boundaries in the image.
|
| 315 |
+
|
| 316 |
+
Table 1: Quantitative evaluation on the microscopy dataset. Note that the projection of superpixels to the ground truth (sp gt) sets an upper (lower for VI) bound for our method. We use Symmetric Best Dice as well as the Variation of Information metric to compare all results on the validation set.
|
| 317 |
+
|
| 318 |
+
<table><tr><td>Method</td><td>SBD</td><td>VI merge</td><td>VI split</td></tr><tr><td>sp gt</td><td>0.656 ± 0.019</td><td>0.672 ± 0.061</td><td>0.594 ± 0.028</td></tr><tr><td rowspan="2">ours + augmentation noise ours</td><td>0.508 ± 0.031</td><td>1.233 ± 0.156</td><td>1.060 ± 0.258</td></tr><tr><td>0.482 ± 0.020</td><td>0.839 ± 0.118</td><td>1.374 ± 0.357</td></tr><tr><td>ours without edges</td><td>0.446 ± 0.041</td><td>0.953 ± 0.212</td><td>0.994 ± 0.200</td></tr><tr><td>ours only handcrafted</td><td>0.408 ± 0.087</td><td>0.987 ± 0.101</td><td>1.536 ± 0.410</td></tr><tr><td>edge + mc [47]</td><td>0.283 ± 0.023</td><td>3.019 ± 0.040</td><td>0.342 ± 0.045</td></tr><tr><td>contrastive [28]</td><td>0.215 ± 0.009</td><td>1.155 ± 0.037</td><td>3.285 ± 0.084</td></tr><tr><td>contrastive + edge [28]</td><td>0.248 ± 0.014</td><td>1.229 ± 0.048</td><td>3.336 ± 0.073</td></tr></table>
|
| 319 |
+
|
| 320 |
+
We train the complete setup for Method 1 end-to-end on a Nvidia GeForce RTX 3090 GPU for 4 days. For comparison we keep the model which achieved the highest reward on the test set. This makes training as well as the validation independent from ground truth annotations. The evolution of the rewards on the validation set for different random seeds is shown in the Appendix. All of the conducted trainings show a stride for high rewards regardless of different random seeding.
|
| 321 |
+
|
| 322 |
+
300 For the validation scores we use the variation of information (VI) for both input combinations (merge
|
| 323 |
+
301 and split) and the Symmetric Best Dice score. To show the influence of the imperfect superpixels on
|
| 324 |
+
302 the final clustering, we project the superpixels to their respective ground truth clustering ("sp gt" in
|
| 325 |
+
303 Table 1) which sets an upper (lower in case of VI) bound for our method. In this study we use several
|
| 326 |
+
304 versions of our approach. In Table 1 (ours) refers to method 1 as described in section 4.2, (ours $^ +$
|
| 327 |
+
305 augmentation noise) is the same method but add some noise to the input data during training, (ours
|
| 328 |
+
306 without edges) is our method but without the additional edge prediction as an input and (ours only
|
| 329 |
+
307 handcrafted) is our method where we only use the handcrafted features as described in section 4.2.
|
| 330 |
+
308 We find that learned features significantly contribute to the performance of our method.
|
| 331 |
+
309 We compare to the following baseline approaches: $e d g e + m c$ , which solves the Multicut graph
|
| 332 |
+
310 partitioning based on edge weights derived from boundary predictions used for superpixel creation,
|
| 333 |
+
311 contrastive, which predicts a pixel-wise embedding space that is clustered into instances using
|
| 334 |
+
312 $\mathbf { k }$ -means and for which the embeddings are trained using the discriminative loss function of [28] on
|
| 335 |
+
313 the ovules dataset from [47] and contrastive $^ +$ edge, which is similar to contrastive, but receives the
|
| 336 |
+
314 [47] boundary predictions as additional input channel.
|
| 337 |
+
|
| 338 |
+
# 315 5 Discussion
|
| 339 |
+
|
| 340 |
+
316 We introduced an end-to-end instance segmentation algorithm which can exploit non-differentiable
|
| 341 |
+
317 loss functions and high-level prior information. Our RL approach is based on stateless actor-critic
|
| 342 |
+
318 and predicts the full segmentation at every step, allowing us to assign rewards to all objects and
|
| 343 |
+
319 reach stable convergence. The segmentation problem is formulated as graph partitioning; we design
|
| 344 |
+
320 a reward decomposition algorithm which maps object- and image-level rewards to sub-graphs for
|
| 345 |
+
321 localized supervision.
|
| 346 |
+
322 We performed proof-of-concept experiments to demonstrate the feasibility of our approach on
|
| 347 |
+
323 synthetic and real data and showed in particular that our setup can segment microscopy images
|
| 348 |
+
324 with no direct supervision other than high-level reasoning. In the future, we plan to explore other
|
| 349 |
+
325 problems and reward functions as well as a semi-supervised setup (briefly introduced in Appendix)
|
| 350 |
+
326 where we think our approach can be very beneficial. Furthermore, even in case of full supervision
|
| 351 |
+
327 with ample groundtruth, our RL-based formulation enables end-to-end instance segmentation with
|
| 352 |
+
328 direct object-level reasoning, which will allow for post-processing-aware training of the CNN which
|
| 353 |
+
329 predicts object boundaries or embeddings.
|
| 354 |
+
330 References
|
| 355 |
+
331 [1] Kisuk Lee, Jonathan Zung, Peter Li, Viren Jain, and H Sebastian Seung. Superhuman accuracy
|
| 356 |
+
332 on the snemi3d connectomics challenge. arXiv preprint arXiv:1706.00120, 2017.
|
| 357 |
+
333 [2] Liang-Chieh Chen, Huiyu Wang, and Siyuan Qiao. Scaling wide residual networks for panoptic
|
| 358 |
+
334 segmentation, 2021.
|
| 359 |
+
335 [3] S. Osher and N. Paragios. Geometric Level Set Methods in Imaging, Vision, and Graphics.
|
| 360 |
+
336 Springer New York, 2007. ISBN 9780387218106. URL https://books.google.de/books?
|
| 361 |
+
337 id=ZWzrBwAAQBAJ.
|
| 362 |
+
338 [4] Ricard Delgado-Gonzalo, Virginie Uhlmann, Daniel Schmitter, and Michael Unser. Snakes on
|
| 363 |
+
339 a plane: A perfect snap for bioimage analysis. IEEE Signal Processing Magazine, 32(1):41–48,
|
| 364 |
+
340 2014.
|
| 365 |
+
341 [5] Ozan Oktay, Enzo Ferrante, Konstantinos Kamnitsas, Mattias Heinrich, Wenjia Bai, Jose
|
| 366 |
+
342 Caballero, Stuart A. Cook, Antonio de Marvao, Timothy Dawes, Declan P. O‘Regan, Bernhard
|
| 367 |
+
343 Kainz, Ben Glocker, and Daniel Rueckert. Anatomically constrained neural networks (acnns):
|
| 368 |
+
344 Application to cardiac image enhancement and segmentation. IEEE Transactions on Medical
|
| 369 |
+
345 Imaging, 37(2):384–395, 2018. doi: 10.1109/TMI.2017.2743464.
|
| 370 |
+
346 [6] Hoel Kervadec, Jose Dolz, Meng Tang, Eric Granger, Yuri Boykov, and Ismail Ben Ayed.
|
| 371 |
+
347 Constrained-cnn losses for weakly supervised segmentation. Medical Image Analysis, 54:88–99,
|
| 372 |
+
348 2019. ISSN 1361-8415. doi: https://doi.org/10.1016/j.media.2019.02.009.
|
| 373 |
+
349 [7] David Pfau and Oriol Vinyals. Connecting generative adversarial networks and actor-critic
|
| 374 |
+
350 methods. CoRR, abs/1610.01945, 2016. URL http://arxiv.org/abs/1610.01945.
|
| 375 |
+
351 [8] Nikita Araslanov, Constantin Rothkopf, and Stefan Roth. Actor-critic instance segmentation.
|
| 376 |
+
352 In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR),
|
| 377 |
+
353 2019.
|
| 378 |
+
354 [9] Viren Jain, Srinivas Turaga, Kevin Briggman, Moritz Helmstaedter, Winfried Denk, and Hyun
|
| 379 |
+
355 june Seung. Learning to agglomerate superpixel hierarchies. Advances in Neural Information
|
| 380 |
+
356 Processing Systems, 24, 01 2011.
|
| 381 |
+
357 [10] Peter Sunehag, Guy Lever, Audrunas Gruslys, Wojciech Marian Czarnecki, Vinicius Zambaldi,
|
| 382 |
+
358 Max Jaderberg, Marc Lanctot, Nicolas Sonnerat, Joel Z. Leibo, Karl Tuyls, and Thore Graepel.
|
| 383 |
+
359 Value-decomposition networks for cooperative multi-agent learning, 2017.
|
| 384 |
+
360 [11] Drew Bagnell and Andrew Ng. On local rewards and scaling distributed reinforcement learning.
|
| 385 |
+
361 In Y. Weiss, B. Schölkopf, and J. Platt, editors, Advances in Neural Information Processing
|
| 386 |
+
362 Systems, volume 18. MIT Press, 2006. URL https://proceedings.neurips.cc/paper/
|
| 387 |
+
363 2005/file/02180771a9b609a26dcea07f272e141f-Paper.pdf.
|
| 388 |
+
364 [12] Huazhe Xu, Boyuan Chen, Yang Gao, and Trevor Darrell. Scoring-aggregating-planning:
|
| 389 |
+
365 Learning task-agnostic priors from interactions and sparse rewards for zero-shot generalization.
|
| 390 |
+
366 CoRR, abs/1910.08143, 2019. URL http://arxiv.org/abs/1910.08143.
|
| 391 |
+
367 [13] Elad Eban, Mariano Schain, Alan Mackey, Ariel Gordon, Ryan Rifkin, and Gal Elidan. Scalable
|
| 392 |
+
368 learning of non-decomposable objectives. In Artificial intelligence and statistics, pages 832–840.
|
| 393 |
+
369 PMLR, 2017.
|
| 394 |
+
370 [14] Maxim Berman, Amal Rannen Triki, and Matthew B Blaschko. The lovász-softmax loss:
|
| 395 |
+
371 A tractable surrogate for the optimization of the intersection-over-union measure in neural
|
| 396 |
+
372 networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition,
|
| 397 |
+
373 pages 4413–4421, 2018.
|
| 398 |
+
374 [15] Yang Song, Alexander G. Schwing, Richard S. Zemel, and Raquel Urtasun. Training deep
|
| 399 |
+
375 neural networks via direct loss minimization. International Conference on Machine Learning,
|
| 400 |
+
376 2016.
|
| 401 |
+
|
| 402 |
+
77 [16] Cicero Nogueira dos Santos, Kahini Wadhawan, and Bowen Zhou. Learning loss functions for semi-supervised learning via discriminative adversarial networks, 2017.
|
| 403 |
+
379 [17] Josif Grabocka, Randolf Scholz, and Lars Schmidt-Thieme. Learning surrogate losses. arXiv preprint arXiv:1905.10108, 2019. [18] Uwe Schmidt, Martin Weigert, Coleman Broaddus, and Gene Myers. Cell detection with star-convex polygons. In International Conference on Medical Image Computing and ComputerAssisted Intervention, pages 265–273. Springer, 2018. [19] Carsen Stringer, Tim Wang, Michalis Michaelos, and Marius Pachitariu. Cellpose: a generalist algorithm for cellular segmentation. Nature Methods, 18(1):100–106, 2021.
|
| 404 |
+
86 [20] Xiaoling Hu, Fuxin Li, Dimitris Samaras, and Chao Chen. Topology-preserving deep image segmentation. In Advances in Neural Information Processing Systems, volume 32, 2019. URL https://proceedings.neurips.cc/paper/2019/file/ 2d95666e2649fcfc6e3af75e09f5adb9-Paper.pdf. [21] Constantin Pape, Alex Matskevych, Adrian Wolny, Julian Hennies, Giulia Mizzon, Marion Louveaux, Jacob Musser, Alexis Maizel, Detlev Arendt, and Anna Kreshuk. Leveraging domain knowledge to improve microscopy image segmentation with lifted multicuts. Frontiers in Computer Science, 1:6, 2019. [22] Jeremy B Maitin-Shepard, Viren Jain, Michal Januszewski, Peter Li, and Pieter Abbeel. Combinatorial energy learning for image segmentation. 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. URL https://proceedings.neurips.cc/paper/2016/file/ 31857b449c407203749ae32dd0e7d64a-Paper.pdf.
|
| 405 |
+
99 [23] Jie Song, Bjoern Andres, Michael J Black, Otmar Hilliges, and Siyu Tang. End-to-end learning for graph decomposition. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 10093–10102, 2019.
|
| 406 |
+
02 [24] Naiyu Gao, Yanhu Shan, Yupei Wang, Xin Zhao, Yinan Yu, Ming Yang, and Kaiqi Huang. Ssap: Single-shot instance segmentation with affinity pyramid. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 642–651, 2019. [25] Steffen Wolf, Alberto Bailoni, Constantin Pape, Nasim Rahaman, Anna Kreshuk, Ullrich Köthe, and Fred A Hamprecht. The mutex watershed and its objective: Efficient, parameter-free graph partitioning. IEEE transactions on pattern analysis and machine intelligence, 2020. [26] Thorsten Beier, Constantin Pape, Nasim Rahaman, Timo Prange, Stuart Berg, Davi D Bock, Albert Cardona, Graham W Knott, Stephen M Plaza, Louis K Scheffer, et al. Multicut brings automated neurite segmentation closer to human performance. Nature methods, 14(2):101–102, 2017. [27] Jan Funke, Fabian Tschopp, William Grisaitis, Arlo Sheridan, Chandan Singh, Stephan Saalfeld, and Srinivas C Turaga. Large scale image segmentation with structured loss based deep learning for connectome reconstruction. IEEE transactions on pattern analysis and machine intelligence, 41(7):1669–1680, 2018.
|
| 407 |
+
16 [28] Bert De Brabandere, Davy Neven, and Luc Van Gool. Semantic instance segmentation with a discriminative loss function. arXiv preprint arXiv:1708.02551, 2017.
|
| 408 |
+
18 [29] Davy Neven, Bert De Brabandere, Marc Proesmans, and Luc Van Gool. Instance segmentation by jointly optimizing spatial embeddings and clustering bandwidth. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 8837–8845, 2019.
|
| 409 |
+
21 [30] Alberto Bailoni, Constantin Pape, Steffen Wolf, Thorsten Beier, Anna Kreshuk, and Fred A Hamprecht. A generalized framework for agglomerative clustering of signed graphs applied to instance segmentation. arXiv preprint arXiv:1906.11713, 2019.
|
| 410 |
+
[31] Leland McInnes and John Healy. Accelerated hierarchical density based clustering. In 2017 IEEE International Conference on Data Mining Workshops (ICDMW), pages 33–42. IEEE, 2017.
|
| 411 |
+
[32] Dorin Comaniciu and Peter Meer. Mean shift: A robust approach toward feature space analysis. IEEE Transactions on pattern analysis and machine intelligence, 24(5):603–619, 2002.
|
| 412 |
+
[33] Bjoern Andres, Thorben Kroeger, Kevin L Briggman, Winfried Denk, Natalya Korogod, Graham Knott, Ullrich Koethe, and Fred A Hamprecht. Globally optimal closed-surface segmentation for connectomics. In European Conference on Computer Vision, pages 778–791. Springer, 2012.
|
| 413 |
+
[34] Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask r-cnn. In Proceedings of the IEEE international conference on computer vision, pages 2961–2969, 2017.
|
| 414 |
+
[35] Marina Meila. Comparing clusterings by the variation of information. In ˘ Learning theory and kernel machines, pages 173–187. Springer, 2003.
|
| 415 |
+
[36] William M Rand. Objective criteria for the evaluation of clustering methods. Journal of the American Statistical association, 66(336):846–850, 1971.
|
| 416 |
+
[37] Brian W Kernighan and Shen Lin. An efficient heuristic procedure for partitioning graphs. The Bell system technical journal, 49(2):291–307, 1970.
|
| 417 |
+
[38] Tuomas Haarnoja, Aurick Zhou, Kristian Hartikainen, George Tucker, Sehoon Ha, Jie Tan, Vikash Kumar, Henry Zhu, Abhishek Gupta, Pieter Abbeel, and Sergey Levine. Soft actor-critic algorithms and applications. CoRR, abs/1812.05905, 2018. URL http://arxiv.org/abs/ 1812.05905.
|
| 418 |
+
[39] Justin Gilmer, Samuel S. Schoenholz, Patrick F. Riley, Oriol Vinyals, and George E. Dahl. Neural message passing for quantum chemistry. CoRR, abs/1704.01212, 2017. URL http: //arxiv.org/abs/1704.01212.
|
| 419 |
+
[40] Olaf Ronneberger, Philipp Fischer, and Thomas Brox. U-net: Convolutional networks for biomedical image segmentation. CoRR, abs/1505.04597, 2015. URL http://arxiv.org/ abs/1505.04597.
|
| 420 |
+
[41] Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. The MIT Press, second edition, 2018. URL http://incompleteideas.net/book/the-book-2nd. html.
|
| 421 |
+
[42] Jörg Hendrik Kappes, Markus Speth, Björn Andres, Gerhard Reinelt, and Christoph Schn. Globally optimal image partitioning by multicuts. In Yuri Boykov, Fredrik Kahl, Victor Lempitsky, and Frank R. Schmidt, editors, Energy Minimization Methods in Computer Vision and Pattern Recognition, pages 31–44, Berlin, Heidelberg, 2011. Springer Berlin Heidelberg. ISBN 978-3-642-23094-3.
|
| 422 |
+
[43] Allam Shehata Hassanein, Sherien Mohammad, Mohamed Sameer, and Mohammad Ehab Ragab. A survey on hough transform, theory, techniques and applications. CoRR, abs/1502.02160, 2015. URL http://arxiv.org/abs/1502.02160.
|
| 423 |
+
[44] D’Arcy Wentworth Thompson. On Growth and Form. Canto. Cambridge University Press, 1992. doi: 10.1017/CBO9781107325852.
|
| 424 |
+
[45] Sourabh Bhide, Ralf Mikut, Maria Leptin, and Johannes Stegmaier. Semi-automatic generation of tight binary masks and non-convex isosurfaces for quantitative analysis of 3d biological samples, 2020.
|
| 425 |
+
[46] Lucas von Chamier, Romain F Laine, Johanna Jukkala, Christoph Spahn, Daniel Krentzel, Elias Nehme, Martina Lerche, Sara Hernández-Pérez, Pieta K Mattila, Eleni Karinou, Séamus Holden, Ahmet Can Solak, Alexander Krull, Tim-Oliver Buchholz, Martin L Jones, Loïc A Royer, Christophe Leterrier, Yoav Shechtman, Florian Jug, Mike Heilemann, Guillaume Jacquemet, and Ricardo Henriques. Democratising deep learning for microscopy with ZeroCostDL4Mic. Nature Communications, 4 2021.
|
| 426 |
+
[47] Adrian Wolny, Lorenzo Cerrone, Athul Vijayan, Rachele Tofanelli, Amaya Vilches Barro, Marion Louveaux, Christian Wenzl, Sören Strauss, David Wilson-Sánchez, Rena Lymbouridou, et al. Accurate and versatile 3d segmentation of plant tissues at cellular resolution. Elife, 9: e57613, 2020.
|
| 427 |
+
[48] Bert De Brabandere, Davy Neven, and Luc Van Gool. Semantic instance segmentation with a discriminative loss function, 2017.
|
| 428 |
+
[49] Reuben R. Shamir, Yuval Duchin, Jinyoung Kim, Guillermo Sapiro, and Noam Harel. Continuous dice coefficient: a method for evaluating probabilistic segmentations. CoRR, abs/1906.11031, 2019. URL http://arxiv.org/abs/1906.11031.
|
| 429 |
+
|
| 430 |
+
# Checklist
|
| 431 |
+
|
| 432 |
+
1. For all authors...
|
| 433 |
+
|
| 434 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
|
| 435 |
+
(b) Did you describe the limitations of your work? [Yes]
|
| 436 |
+
(c) Did you discuss any potential negative societal impacts of your work? [No] It does not have any negative societal impacts.
|
| 437 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
|
| 438 |
+
|
| 439 |
+
2. If you are including theoretical results...
|
| 440 |
+
|
| 441 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] We do not claim any theoretical assumptions. (b) Did you include complete proofs of all theoretical results? [N/A] See above.
|
| 442 |
+
|
| 443 |
+
3. If you ran experiments...
|
| 444 |
+
|
| 445 |
+
(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] Yes, see the Supplementary.
|
| 446 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See the Supplementary
|
| 447 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] The bars are reported w.r.t. to the samples within the best seed, see Supplementary section for further details
|
| 448 |
+
(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]
|
| 449 |
+
|
| 450 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 451 |
+
|
| 452 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes]
|
| 453 |
+
(b) Did you mention the license of the assets? [Yes]
|
| 454 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] The link to the biological dataset is given in the Supplementary
|
| 455 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? The dataset was provided from the other laboratory as a part of collaboration.
|
| 456 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [No] No human data is used
|
| 457 |
+
|
| 458 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 459 |
+
|
| 460 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A]
|
| 461 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A]
|
| 462 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A]
|
md/train/6MaBrlQ5JM/6MaBrlQ5JM.md
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# THE EFFICACY OF $L _ { 1 }$ REGULARIZATION IN NEURAL NETWORKS
|
| 2 |
+
|
| 3 |
+
Anonymous authors Paper under double-blind review
|
| 4 |
+
|
| 5 |
+
# ABSTRACT
|
| 6 |
+
|
| 7 |
+
A crucial problem in neural networks is to select the most appropriate number of hidden neurons and obtain tight statistical risk bounds. In this work, we present a new perspective towards the bias-variance tradeoff in neural networks. As an alternative to selecting the number of neurons, we theoretically show that $L _ { 1 }$ regularization can control the generalization error and sparsify the input dimension. In particular, with an appropriate $L _ { 1 }$ regularization on the output layer, the network can produce a statistical risk that is near minimax optimal. Moreover, an appropriate $L _ { 1 }$ regularization on the input layer leads to a risk bound that does not involve the input data dimension. Our analysis is based on a new amalgamation of dimension-based and norm-based complexity analysis to bound the generalization error. A consequent observation from our results is that an excessively large number of neurons do not necessarily inflate generalization errors under a suitable regularization.
|
| 8 |
+
|
| 9 |
+
# 1 INTRODUCTION
|
| 10 |
+
|
| 11 |
+
Neural networks have been successfully applied in modeling nonlinear regression functions in various domains of applications. A critical evaluation metric for a predictive learning model is to measure its statistical risk bound. For example, the $L _ { 1 }$ or $L _ { 2 }$ risks of typical parametric models such as linear regressions are at the order of $( d / n ) ^ { 1 / 2 }$ for small $d$ (Seber & Lee, 2012), where $d$ and $n$ denote respectively the input dimension and number of observations. Obtaining the risk bound for a nonparametric regression model such as neural networks is highly nontrivial. It involves an approximation error (or bias) term as well as a generalization error (or variance) term. The standard analysis of generalization error bounds may not be sufficient to describe the overall predictive performance of a model class unless the data is assumed to be generated from it. For the model class of two-layer feedforward networks and a rather general data-generating process, Barron (1993; 1994) proved an approximation error bound of $O ( r ^ { - 1 / 2 } )$ where $r$ denotes the number of neurons. The author further developed a statistical risk error bound of $O ( ( d / n ) ^ { 1 / 4 } )$ , which is the tightest statistical risk bound for the class of two-layer neural networks up to the authors’ knowledge (for $d < n$ ). This risk bound is based on an optimal bias-variance tradeoff involving an deliberate choice of $r$ . Note that the risk is at a convergence rate much slower than the classical parametric rate. We will tackle the same problem from a different perspective, and obtain a much tighter risk bound.
|
| 12 |
+
|
| 13 |
+
A practical challenge closely related to statistical risks is to select the most appropriate neural network architecture for a particular data domain (Ding et al., 2018). For two-layer neural networks, this is equivalent to selecting the number of hidden neurons $r$ . While a small $r$ tends to underfit, researchers have observed that the network is not overfitting even for moderately large $r$ . Nevertheless, recent research has also shown that an overly large $r$ (e.g., when $r > n$ ) does cause overfitting with high probability (Zhang et al., 2016). It can be shown under some non-degeneracy conditions that a two-layer neural network with more than $n$ hidden neurons can perfectly fit $n$ arbitrary data, even in the presence of noise, which inevitably leads to overfitting. A theoretical choice of $r$ suggested by the asymptotic analysis in (Barron, 1994) is at the order of $( n / d ) ^ { 1 / 2 }$ , and a practical choice of $r$ is often from cross-validation with an appropriate splitting ratio (Ding et al., 2018). An alternative perspective that we advocate is to learn from a single neural network with sufficiently many neurons and an appropriate $L _ { 1 }$ regularization on the neuron coefficients, instead of performing a selection from multiple candidate neural models. A potential benefit of this approach is easier hardware implementation and computation since we do not need to implement multiple models separately. Perhaps more importantly, this perspective of training enables much tighter risk bounds, as we will demonstrate. In this work, we focus on the model class of two-layer feedforward neural networks.
|
| 14 |
+
|
| 15 |
+
Our main contributions are summarized below. First, we prove that $L _ { 1 }$ regularization on the coefficients of the output layer can produce a risk bound $O ( ( d / n ) ^ { 1 / 2 } )$ (up to a logarithmic factor) under the $L _ { 1 }$ training loss, which approaches the minimax optimal rate. Such a rate has not been established under the $L _ { 2 }$ training loss so far. The result indicates a potential benefit of using $L _ { 1 }$ regularization for training a neural network, instead of selecting from a number of neurons. Additionally, a key ingredient of our result is a unique amalgamation of dimension-based and norm-based risk analysis, which may be interesting on its own right. The technique leads to an interesting observation that an excessively large $r$ can reduce approximation error while not increasing generalization error under $L _ { 1 }$ regularizations. This implies that an explicit regularization can eliminate overfitting even when the specified number of neurons is enormous. Moreover, we prove that the $L _ { 1 }$ regularization on the input layer can induce sparsity by producing a risk bound that does not involve $d$ , where $d$ may be much larger compared with the true number of significant variables.
|
| 16 |
+
|
| 17 |
+
Related work on neural network analysis. Despite the practical success of neural networks, a systematic understanding of their theoretical limit remains an ongoing challenge and has motivated research from various perspectives. Cybenko (1989) showed that any continuous function could be approximated arbitrarily well by a two-layer perceptron with sigmoid activation functions. Barron (1993; 1994) established an approximation error bound of using two-layer neural networks to fit arbitrary smooth functions and their statistical risk bounds. A dimension-free Rademacher complexity for deep ReLU neural networks was recently developed (Golowich et al., 2017; Barron & Klusowski, 2019). Based on a contraction lemma, a series of norm-based complexities and their corresponding generalization errors are developed (Neyshabur et al., 2015, and the references therein). Another perspective is to assume that the data are generated by a neural network and convert its parameter estimation into a tensor decomposition problem through the score function of the known or estimated input distribution (Anandkumar et al., 2014; Janzamin et al., 2015; Ge et al., 2017; Mondelli & Montanari, 2018). Also, tight error bounds have been established recently by assuming that neural networks of parsimonious structures generate the data. In this direction, Schmidt-Hieber (2017) proved that specific deep neural networks with few non-zero network parameters can achieve minimax rates of convergence. Bauer & Kohler (2019) developed an error bound that is free from the input dimension, by assuming a generalized hierarchical interaction model.
|
| 18 |
+
|
| 19 |
+
Related work on $L _ { 1 }$ regularization. The use of $L _ { 1 }$ regularization has been widely studied in linear regression problems (Hastie et al., 2009, Chapter 3). The use of $L _ { 1 }$ regularization for training neural networks has been recently advocated in deep learning practice. A prominent use of $L _ { 1 }$ regularization was to empirically sparsify weight coefficients and thus compress a network that requires intensive memory usage (Cheng et al., 2017). The extension of $L _ { 1 }$ regularization to group$L _ { 1 }$ regularization (Yuan & Lin, 2006) has also been extensively used in learning various neural networks (Han et al., 2015; Zhao et al., 2015; Wen et al., 2016; Scardapane et al., 2017). Despite the above practice, the efficacy of $L _ { 1 }$ regularization in neural networks deserves more theoretical study. In the context of two-layer neural networks, we will show that the $L _ { 1 }$ regularizations in the output and input layers play two different roles: the former for reducing generalization error caused by excessive neurons while the latter for sparsifying input signals in the presence of substantial redundancy. Unlike previous theoretical work, we consider the $L _ { 1 }$ loss, which ranks among the most popular loss functions in, e.g., learning from ordinal data (Pedregosa et al., 2017) or imaging data (Zhao et al., 2016), and for which the statistical risk has not been studied previously. In practice, the use of $L _ { 1 }$ loss for training has been implemented in prevalent computational frameworks such as Tensorflow (Google, 2016), Pytorch (Ketkar, 2017), and Keras (Gulli & Pal, 2017).
|
| 20 |
+
|
| 21 |
+
# 2 PROBLEM FORMULATION
|
| 22 |
+
|
| 23 |
+
# 2.1 MODEL ASSUMPTION AND EVALUATION
|
| 24 |
+
|
| 25 |
+
Suppose we have $n$ labeled observations $\{ ( x _ { i } , y _ { i } ) \} _ { i = 1 , \dots , n }$ , where $y _ { i }$ ’s are continuously-valued responses or labels. We assume that the underlying data generating model is $y _ { i } = f _ { * } ( \bar { x } _ { i } ) + \varepsilon _ { i }$ for some unknown function $f _ { * } ( \cdot )$ , where $x _ { i }$ ’ $\mathbf { \Phi } _ { \mathbf { \bar { \nu } } } \in \dot { \mathbb { X } } \subset \mathbb { R } ^ { d }$ are independent and identically distributed,
|
| 26 |
+
|
| 27 |
+

|
| 28 |
+
Figure 1: A graph showing the two-layer neural network model considered in (2).
|
| 29 |
+
|
| 30 |
+
and $\varepsilon _ { i }$ ’s are independent and identically distributed that is symmetric at zero and
|
| 31 |
+
|
| 32 |
+
$$
|
| 33 |
+
\mathbb { E } \left( \varepsilon _ { i } ^ { 2 } \mid x _ { i } \right) \leq \tau ^ { 2 } .
|
| 34 |
+
$$
|
| 35 |
+
|
| 36 |
+
Here, $\mathbb { X }$ is a bounded set that contains zero, for example $\{ x : \| x \| _ { \infty } \leq M \}$ for some constant $M$ . Our goal is learn a regression model ${ \hat { f } } _ { n } : x \mapsto { \hat { f } } _ { n } ( x )$ for prediction. The $\hat { f } _ { n }$ is obtained from the following form of neural networks
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
\sum _ { j = 1 } ^ { r } a _ { j } \sigma ( w _ { j } ^ { \top } x + b _ { j } ) + a _ { 0 } ,
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
where $a _ { 0 } , a _ { j } , b _ { j } \in \mathbb { R } , w _ { j } \in \mathbb { R } ^ { d }$ , $\textit { j } = \ 1 , \ldots , r$ , are parameters to estimate. We let $a =$
|
| 43 |
+
$[ a _ { 0 } , a _ { 1 } , \ldots , \bar { a } _ { r } ] ^ { \mathrm { { \scriptscriptstyle T } } }$ denote the output layer coefficients. An illustray accomplished by minimizing the empirical risk plus a regularization term. We first consider th The esti-, for somethe output $\textstyle n ^ { - 1 } \sum _ { i = 1 } ^ { \bar { n } } \ell ( y _ { i } , { \overline { { f ( x _ { i } ) } } } )$ $l ( \cdot )$ $L _ { 1 }$
|
| 44 |
+
layer. In particular, we search for such $f$ by the empirical risk minimization from the function class
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
\mathcal { F } _ { V } = \left\{ f : \mathbb { R } ^ { d } \to \mathbb { R } \Big | f ( x ) = \sum _ { j = 1 } ^ { r } a _ { j } \sigma ( w _ { j } ^ { \top } x + b _ { j } ) + a _ { 0 } , \| a \| _ { 1 } \leq V \right\}
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
where $V$ is a constant. The following statistical risk measures the predictive performance of a learned model $f$ :
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
\begin{array} { r } { \mathcal { R } ( f ) \overset { \Delta } { = } \mathbb { E } \ell ( y , f ( x ) ) - \mathbb { E } \ell ( y , f _ { * } ( x ) ) . } \end{array}
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
The loss function $\ell ( \cdot )$ is pre-determined by data analysts, usually the $L _ { 1 }$ loss defined by $\ell ( y , \tilde { y } ) =$ $| y - \tilde { y } |$ or the $L _ { 2 }$ loss defined by $\ell _ { 2 } ( y , \tilde { y } ) = ( y - \bar { y } ) ^ { 2 }$ . Under the $L _ { 1 }$ loss, the risk is $\textstyle { \mathcal { R } } ( f ) =$ $\mathbb { E } \left| f _ { * } ( x ) + \varepsilon - f ( x ) \right| - \mathbb { E } \left| \varepsilon \right|$ , which is nonnegative for symmetric random variables $\varepsilon$ . It is typical to use the same loss function for both training and evaluation.
|
| 57 |
+
|
| 58 |
+
# 2.2 NOTATION
|
| 59 |
+
|
| 60 |
+
Throughout the paper, we use $n , d , k , r$ to denote the number of observations, the number of input variables or input dimension, the number of significant input variables or sparsity level, the number of neurons (or hidden dimension), respectively. We write $a _ { n } \gtrsim b _ { n }$ , $b _ { n } \lesssim a _ { n }$ , or $b _ { n } = O ( a _ { n } )$ , if $\left| b _ { n } / a _ { n } \right| < c$ for some constant $c$ for all sufficiently large $n$ . We write $a _ { n } \asymp b _ { n }$ if $a _ { n } \gtrsim b _ { n }$ as well as $a _ { n } \lesssim b _ { n }$ . Let $\mathcal { N } ( \boldsymbol { \mu } , V )$ denote Gaussian distribution with mean $\pmb { \mu }$ and covariance $V$ . Let $\| \cdot \| _ { 1 }$ and $\| \cdot \| _ { 2 }$ denote the common $L _ { 1 }$ and $L _ { 2 }$ vector norms, respectively. Let $\mathbb { X }$ denote the essential support of $X$ . For any vector $z \in \mathbb { R } ^ { d }$ , we define $\begin{array} { r } { \| \boldsymbol { z } \| _ { \mathbb { X } } \triangleq \operatorname* { s u p } _ { \boldsymbol { x } \in \mathbb { X } } | \boldsymbol { x } ^ { \top } \boldsymbol { z } | } \end{array}$ , which may or may not be infinity. If $\mathbb { X } = \{ x : \| x \| _ { \infty } \leq M \}$ , $\| \boldsymbol { z } \| _ { \mathbb { X } }$ is equivalent to $M \| z \| _ { 1 }$ . Throughout the paper, $\hat { f } _ { n }$ denotes the estimated regression function with $n$ being the number of observations.
|
| 61 |
+
|
| 62 |
+
# 2.3 ASSUMPTIONS AND CLASSICAL RESULTS
|
| 63 |
+
|
| 64 |
+
We introduce some technical assumptions necessary for our analysis, and state-of-the-art statistical risk bounds built through dimension-based complexity analysis.
|
| 65 |
+
|
| 66 |
+
Assumption 1. The activation function $\sigma ( \cdot )$ is a bounded function on the real line satisfying $\sigma ( x ) $ 1 as $x \to \infty$ and $\sigma ( x ) 0$ as $x \to - \infty$ , and it is $L$ -Lipschitz for some constant $L$ .
|
| 67 |
+
|
| 68 |
+
Assumption 2. The regularization constant $V$ is larger than $2 C + f _ { * } ( 0 )$ , where $C$ is any constant such that the Fourier transform of $f _ { * }$ , denoted by $F$ , satisfies
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\int _ { \mathbb { R } ^ { d } } \| \omega \| _ { \mathbb { X } } F ( d \omega ) \leq C .
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
Assumption 3. $\sigma ( x )$ approaches its limits at least polynomially fast, meaning that $| \sigma ( x ) - \mathbf { 1 } \{ x >$ $0 \} | < \varepsilon$ for all $| x | > x _ { \varepsilon }$ where $x _ { \varepsilon }$ is a polynomial of $1 / \varepsilon$ . Also, the value of $\eta \triangleq \operatorname* { s u p } _ { j } \| w _ { j } \| _ { \mathbb { X } }$ scales with $n$ polynomially meaning that $\log \eta = O ( \log n )$ as $n \to \infty$ .
|
| 75 |
+
|
| 76 |
+
Assumption 4. There exists a constant $c > 0$ and a bounded subset ${ \mathcal { S } } \subset \mathbb { R }$ such that $\mathbb { P } ( X \in { \mathcal { S } } ) > c$ and $\mathrm { i n f } _ { x \in S } \sigma ^ { \prime } ( x ) > c$ for $X \sim \mathcal { N } ( 0 , 1 )$ .
|
| 77 |
+
|
| 78 |
+
We explain each assumption below. The above notation of $C , V$ follow those in (Barron, 1993; 1994). Assumption 1 specifies the class of the activation functions we consider. A specific case is the popular activation function $\sigma ( x ) = 1 / \{ 1 { + } \exp ( - x ) \}$ . Assumption 2, first introduced in (Barron, 1993), specifies the smoothness condition for $f _ { * }$ to ensure the approximation property of neural networks (see Theorem 2.1). In Assumption 3, the condition for $w$ is for technical convenience. It could also be replaced with the following alternative condition: There exists a constant $c > 0$ such that the distribution of $x$ satisfies
|
| 79 |
+
|
| 80 |
+
$$
|
| 81 |
+
\operatorname* { s u p } _ { w : \| w \| _ { 2 } = 1 } \mathbb { P } \big ( \log ( | w ^ { \top } x | ) < c \log \varepsilon \big ) < \varepsilon
|
| 82 |
+
$$
|
| 83 |
+
|
| 84 |
+
for any $\varepsilon \in ( 0 , 1 )$ . Simply speaking, the input data $x$ is not too small with high probability. This condition is rather mild. For example, it holds when each component of $x$ has a a bounded density function. This alternative condition ensures that for some small constant $\varepsilon > 0$ and any $w \in \mathbb { R } ^ { \tilde { d } }$ , there exists a surrogate of $w$ $, \hat { w } \in \mathbb R ^ { d }$ with $\log \| \hat { w } \| _ { 2 } = O ( - \log \varepsilon )$ , such that
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\mathbb { P } ( | \sigma ( w ^ { \top } x ) - \sigma ( \hat { w } ^ { \top } x ) | > \varepsilon ) < \varepsilon .
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
And this can be used to surrogate the assumption of $w$ in Assumption 3 throughout the proofs in the appendix. Assumption 4 means that $\sigma ( \cdot )$ is not a nearly-constant function. This condition is only used to bound the minimax lower bound in Theorem 3.2.
|
| 91 |
+
|
| 92 |
+
Theorem 2.1 (Approximation error bound (Barron, 1993)). Suppose that Assumptions 1, 2, 3 hold. We have
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
\operatorname* { i n f } _ { f \in \mathcal { F } _ { V } } \left\{ \int _ { \mathbb { X } } ( f ( x ) - f _ { * } ( x ) ) ^ { 2 } \mu ( d x ) \right\} ^ { 1 / 2 } \leq 2 C \left( \frac { 1 } { \sqrt { r } } + \delta _ { \eta } \right) ,
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
where $\mu$ denotes a probability measure on $\mathbb { X } ,$
|
| 99 |
+
|
| 100 |
+
$$
|
| 101 |
+
\delta _ { \eta } = \operatorname* { i n f } _ { 0 < \varepsilon < 1 / 2 } \biggl \{ 2 \varepsilon + \operatorname* { s u p } _ { | x | > \varepsilon } \bigl | \sigma ( \eta x ) - \mathbf { 1 } \bigl \{ x > 0 \bigr \} \bigr | \biggr \} ,
|
| 102 |
+
$$
|
| 103 |
+
|
| 104 |
+
$\eta$ is defined in Assumption 3, and $C$ is defined in (4).
|
| 105 |
+
|
| 106 |
+
Theorem 2.2 (Statistical risk bound (Barron, 1994)). Suppose that Assumptions $^ { l }$ , 2, 3 hold. Then the $L _ { 2 }$ estimator ${ \hat { f } } _ { n }$ in $\mathcal { F } _ { V }$ satisfies $\mathbb { E } \left\{ \hat { f } _ { n } ( x ) - f _ { * } ( x ) \right\} ^ { 2 } \lesssim V ^ { 2 } / r + ( r d \log n ) / n$ . In particular, $i f$ we choose $r \asymp V { \sqrt { n / ( d \log n ) } }$ , then ${ \mathbb E } \left\{ \hat { f } _ { n } ( x ) - f _ { * } ( x ) \right\} ^ { 2 } \lesssim V \sqrt { ( d \log n ) / n }$ .
|
| 107 |
+
|
| 108 |
+
It is known that a typical parametric rate under the $L _ { 2 }$ loss is at the order of $O ( d / n )$ , much faster than the above result. This gap is mainly due to excessive model complexity in bounding generalization errors. We will show in Section 3 that the gap in the rate of convergence can be filled when using $L _ { 1 }$ loss. Our technique will be based on the machinery of Rademacher complexity, and we bound this complexity through a joint analysis of the norm of coefficients (‘norm-based’) as well as dimension of parameters (‘dimension-based’).
|
| 109 |
+
|
| 110 |
+
# 2.4 MODEL COMPLEXITY AND GENERALIZATION ERROR
|
| 111 |
+
|
| 112 |
+
The statistical risk consists of two parts. The first part is an approximation error term non-increasing in the number of neurons $r$ , and the second part describes generalization errors. The key issue for risk analysis is to bound the second term using a suitable model complexity and then tradeoff with the first term. We will develop our theory based on the following measure of complexity.
|
| 113 |
+
|
| 114 |
+
Let $\mathcal { F }$ denote a class of functions each mapping from $\mathbb { X }$ to $\mathbb { R }$ , and $x _ { 1 } , x _ { 2 } , \ldots , x _ { n } \in \mathbb { X }$ . Following a similar terminology as in (Neyshabur et al., 2015), the Rademacher complexity, or simply ‘complexity’, of a function class $\mathcal { F }$ is defined by $\begin{array} { r } { \mathbb { E } \operatorname* { s u p } _ { f \in \mathcal { F } } | n ^ { - 1 } \sum _ { i = 1 } ^ { n } \xi _ { i } f ( x _ { i } ) | } \end{array}$ , where $\xi _ { i } , i = 1 , 2 , \ldots , n$ are independent symmetric Bernoulli random variables.
|
| 115 |
+
|
| 116 |
+
Lemma 2.3 (Rademacher complexity of $\mathcal { F } _ { V }$ ). Suppose that Assumptions $^ { l }$ , 3 hold. Then for the Rademacher complexity of $\mathcal { F } _ { V }$ , we have
|
| 117 |
+
|
| 118 |
+
$$
|
| 119 |
+
\mathbb { E } \operatorname* { s u p } _ { f \in \mathcal { F } _ { V } } \left| \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } f ( x _ { i } ) \right| \lesssim \frac { V \sqrt { d \log n } } { \sqrt { n } } .
|
| 120 |
+
$$
|
| 121 |
+
|
| 122 |
+
The proof is included in Appendix A.1. The bound in (6) is derived from an amalgamation of dimension-based and norm-based analysis elaborated in the appendix. It is somewhat surprising that the bound does not explicitly involve the approximation error part (that depends on $r$ and $\eta$ ). This Rademacher complexity bound enables us to derive tight statistical risk bounds in the following section.
|
| 123 |
+
|
| 124 |
+
# 3 MAIN RESULTS
|
| 125 |
+
|
| 126 |
+
3.1 STATISTICAL RISK BOUND FOR THE $L _ { 1 }$ REGULARIZED NETWORKS IN (3)
|
| 127 |
+
|
| 128 |
+
Theorem 3.1 (Statistical risk bound). Suppose that Assumptions 1, 2, 3 hold. Then the constrained $L _ { 1 }$ estimator $\hat { f } _ { n }$ over $\mathcal { F } _ { V }$ satisfies
|
| 129 |
+
|
| 130 |
+
$$
|
| 131 |
+
\mathcal { R } ( \hat { f } _ { n } ) \lesssim \bigg ( \frac { 1 } { \sqrt { r } } + \delta _ { \eta } \bigg ) C + \frac { V \sqrt { d \log n } + \tau } { \sqrt { n } } ,
|
| 132 |
+
$$
|
| 133 |
+
|
| 134 |
+
where $\delta _ { \eta }$ is defined in (5), and $\tau$ was introduced in $( l )$ . Moreover, choosing the parameters $r , \eta$ large enough, we have
|
| 135 |
+
|
| 136 |
+
$$
|
| 137 |
+
\mathcal { R } ( \hat { f } _ { n } ) \lesssim \frac { V \sqrt { d \log n } + \tau } { \sqrt { n } } .
|
| 138 |
+
$$
|
| 139 |
+
|
| 140 |
+
The proof is in Appendix A.2. We briefly explain our main idea in deriving the risk bound (7). A standard statistical risk bound contains two parts which correspond to the approximation error and generalization error, respectively. The approximation error part in (7) is the first term, which involves the hidden dimension $r$ and the norm of input coefficients through $\eta$ . This observation motivates us to use the norm of output-layer coefficients through $V$ and the input dimension $d$ to derive a generalization error bound. In this way, the generalization error term does not involve $r$ already used for bounding the approximation error, and thus a bias-variance tradeoff through $r$ is avoided. This thought leads to the generalization error part in (7), which is the second term involving $V$ and $d$ . Its proof combines the machinery of both dimension-based and norm-based complexity analysis. From our analysis, the error bound in Theorem 3.1 is a consequence of the $L _ { 1 }$ loss function and the employed $L _ { 1 }$ regularization. In comparison with the previous result of Theorem 2.2, the bound obtained in Theorem 3.1 is tight and it approaches the parametric rate $\sqrt { d / n }$ for the $d < n$ regime. Though we can only prove for $L _ { 1 }$ loss in this work, we conjecture that the same rate is achieved using $L _ { 2 }$ loss.
|
| 141 |
+
|
| 142 |
+
In the following, we further show that the above risk bound is minimax optimal. The minimax optimality indicates that deep neural networks with more than two layers will not perform much better than shallow neural networks when the underlying regression function belongs to $\mathcal { F } _ { V }$ .
|
| 143 |
+
|
| 144 |
+
Theorem 3.2 (Minimax risk bound). Suppose that Assumptions 1 and 4 hold, and $x _ { 1 } , x _ { 2 } , \dotsc , x _ { n } \stackrel { i : } { \sim }$ id∼ $\mathcal { N } ( 0 , \pmb { I } _ { d } )$ , then $\operatorname { i n f } _ { \hat { f } _ { n } }$ $\begin{array} { r } { \operatorname* { s u p } _ { f \in \mathcal { F } _ { V } } \mathcal { R } ( \hat { f } _ { n } ( x ) ) \gtrsim V \sqrt { d / n } } \end{array}$ .
|
| 145 |
+
|
| 146 |
+
Here the $\mathcal { F } _ { V }$ is the same one as defined in (3). All the smooth functions $f _ { * } ( \cdot )$ that satisfy $V >$ $2 C + f _ { * } ( 0 )$ and (4) belong to $\mathcal { F } _ { V }$ according to Theorem 2.1. The proof is included in Appendix A.3.
|
| 147 |
+
|
| 148 |
+
# 3.2 ADAPTIVENESS TO THE INPUT SPARSITY
|
| 149 |
+
|
| 150 |
+
It is common to input a large dimensional signal to a neural network, while only few components are genuinely significant for prediction. For example, in environmental science, high dimensional weather signals are input for prediction while few are physically related (Shi et al., 2015). In image processing, the image label is relevant to few background pixels (Han et al., 2015). In natural language processing, a large number of redundant sentences sourced from Wikipedia articles are input for language prediction (Diao et al., 2019). The practice motivates our next results to provide a tight risk bound for neural networks whose input signals are highly sparse.
|
| 151 |
+
|
| 152 |
+
Assumption 5. There exists a positive integer $k \leq d$ and an index set $S \subset \{ 1 , \ldots , d \}$ with card $( S ) =$ $k$ , such that $f _ { \ast } ( x ) = g _ { \ast } ( x _ { S } )$ for some function $g _ { * } ( \cdot )$ with probability one.
|
| 153 |
+
|
| 154 |
+
The subset $S$ is generally unknown to data analysts. Nevertheless, if we know $k$ , named the sparsity level, the risk bound could be further improved by a suitable regularization on the input coefficients. We have the following result where $d$ is replaced with $k$ in the risk bound of Theorem 3.1.
|
| 155 |
+
|
| 156 |
+
Proposition 3.3. Suppose that that Assumptions 1, 2, 3, 5 hold. Suppose that $\hat { f } _ { n }$ is the $L _ { 1 }$ estimator over the following function class
|
| 157 |
+
|
| 158 |
+
$$
|
| 159 |
+
\bigg \{ f : \mathbb { R } ^ { d } \to \mathbb { R } \Big | f ( x ) = \sum _ { j = 1 } ^ { r } a _ { j } \sigma ( w _ { j } ^ { \top } x + b _ { j } ) + a _ { 0 } , \| a \| _ { 1 } \leq V , \operatorname* { s u p } _ { j } \| w _ { j } \| _ { 0 } \leq k \bigg \} .
|
| 160 |
+
$$
|
| 161 |
+
|
| 162 |
+
Then $\mathcal { R } ( \hat { f } _ { n } ) \lesssim \sqrt { \{ k \log ( d n ) \} / n }$ .
|
| 163 |
+
|
| 164 |
+
The proof is included in Appendix A.4. The above statistical risk bound is also minimax optimal according to a similar argument in Theorem 3.2. From a practical point of view, the above $L _ { 0 }$ constraint is usually difficult to implement, especially for a large input dimension $d$ . Alternatively, one may impose an $L _ { 1 }$ constraint instead of an $L _ { 0 }$ constraint on the input coefficients. Our next result is concerned with the risk bound when the model is learned from a joint regularization on the output and input layers. For technical convenience, we will assume that $\mathbb { X }$ is a bounded set.
|
| 165 |
+
|
| 166 |
+
Theorem 3.4. Consider the following function class of two-layer neural networks
|
| 167 |
+
|
| 168 |
+
$$
|
| 169 |
+
\mathcal { F } _ { V , \eta } = \Bigg \{ f : \mathbb { R } ^ { d } \mathbb { R } \Big | f ( x ) = \sum _ { j = 1 } ^ { r } a _ { j } \sigma ( w _ { j } ^ { \top } x + b _ { j } ) + a _ { 0 } , \| a \| _ { 1 } \leq V , \operatorname* { s u p } _ { 1 \leq j \leq r } ( \| w _ { j } \| _ { 1 } + | b _ { j } | ) \leq \eta \Bigg \} .
|
| 170 |
+
$$
|
| 171 |
+
|
| 172 |
+
Suppose that $V \gtrsim C$ , where $C$ is defined in (4). Then the constrained $L _ { 1 }$ estimator $\hat { f } _ { n }$ over $\mathcal { F } _ { V , \eta }$ satisfies
|
| 173 |
+
|
| 174 |
+
$$
|
| 175 |
+
\mathcal { R } ( \hat { f } _ { n } ) \lesssim C \left( \frac { 1 } { \sqrt { r } } + \delta _ { \eta } \right) + \frac { V \eta + \tau } { \sqrt { n } } ,
|
| 176 |
+
$$
|
| 177 |
+
|
| 178 |
+
where $\delta _ { \eta }$ is defined in (5). In particular, choosing $r$ large enough, we have
|
| 179 |
+
|
| 180 |
+
$$
|
| 181 |
+
\mathcal { R } ( \hat { f } _ { n } ) \lesssim C \delta _ { \eta } + \frac { V \eta + \tau } { \sqrt { n } }
|
| 182 |
+
$$
|
| 183 |
+
|
| 184 |
+
which does not involve the input dimension $d$ and the number of hidden neurons $r$ . Moreover,
|
| 185 |
+
|
| 186 |
+
$$
|
| 187 |
+
\sigma ( x ) = 1 / ( 1 + e ^ { - x } ) , \quad \eta \asymp \biggl ( n \log ^ { 2 } n \biggr ) ^ { 1 / 3 } , t h e n \mathscr { R } ( \hat { f } _ { n } ) \lesssim V \{ ( \log n ) / n \} ^ { 1 / 3 } .
|
| 188 |
+
$$
|
| 189 |
+
|
| 190 |
+
The proof is included in Appendix A.5. In the above result, the risk bound is at the order of $O ( n ^ { - 1 / 3 } )$ , which is slower than the $O ( n ^ { - 1 / 2 } )$ in the previous Theorem 3.1 and Proposition 3.3 if ignoring $d$ and logarithmic factors of $n$ . However, for a large input dimension $d$ that is even much larger than $n$ , the bound can be much tighter than the previous bounds since it is dimension-free.
|
| 191 |
+
|
| 192 |
+
# 4 CONCLUSION AND FURTHER REMARKS
|
| 193 |
+
|
| 194 |
+
We studied the tradeoff between model complexity and statistical risk in two-layer neural networks from the explicit regularization perspective. We end our paper with two future problems. First, in Theorem 3.4, For a small $d$ , the order of $n ^ { - 1 / 3 }$ seems to be an artifact resulting from our technical arguments. We conjecture that in the small $d$ regime, this risk bound could be improved to $O ( n ^ { - 1 / 2 } )$ by certain adaptive regularizations. Second, it would be interesting to emulate the current approach to yield similarly tight risk bounds for deep forward neural networks.
|
| 195 |
+
|
| 196 |
+
REFERENCES
|
| 197 |
+
Animashree Anandkumar, Rong Ge, Daniel Hsu, Sham M Kakade, and Matus Telgarsky. Tensor decompositions for learning latent variable models. J. Mach. Learn. Res., 15:2773–2832, 2014.
|
| 198 |
+
Andrew R Barron. Universal approximation bounds for superpositions of a sigmoidal function. IEEE Trans. Inf. Theory, 39(3):930–945, 1993.
|
| 199 |
+
Andrew R Barron. Approximation and estimation bounds for artificial neural networks. Machine learning, 14(1):115–133, 1994.
|
| 200 |
+
Andrew R Barron and Jason M Klusowski. Complexity, statistical risk, and metric entropy of deep nets using total path variation. arXiv preprint arXiv:1902.00800, 2019.
|
| 201 |
+
Benedikt Bauer and Michael Kohler. On deep learning as a remedy for the curse of dimensionality in nonparametric regression. Ann. Stat., 47(4):2261–2285, 2019.
|
| 202 |
+
Yu Cheng, Duo Wang, Pan Zhou, and Tao Zhang. A survey of model compression and acceleration for deep neural networks. arXiv preprint arXiv:1710.09282, 2017.
|
| 203 |
+
George Cybenko. Approximations by superpositions of a sigmoidal function. Math. Control Signals Syst., 2:183–192, 1989.
|
| 204 |
+
Enmao Diao, Jie Ding, and Vahid Tarokh. Restricted recurrent neural networks. 2019 IEEE Conf. on Big Data, 2019.
|
| 205 |
+
Jie Ding, Vahid Tarokh, and Yuhong Yang. Model selection techniques: An overview. IEEE Signal Process. Mag., 35(6):16–34, 2018.
|
| 206 |
+
Rong Ge, Jason D Lee, and Tengyu Ma. Learning one-hidden-layer neural networks with landscape design. arXiv preprint arXiv:1711.00501, 2017.
|
| 207 |
+
Noah Golowich, Alexander Rakhlin, and Ohad Shamir. Size-independent sample complexity of neural networks. arXiv preprint arXiv:1712.06541, 2017.
|
| 208 |
+
Research Team Google. Tensorflow: A system for large-scale machine learning. Proc. 12th Symp. Operating Syst. Des. Implementation, pp. 265–283, 2016.
|
| 209 |
+
Antonio Gulli and Sujit Pal. Deep Learning with Keras. Packt Publishing Ltd, 2017.
|
| 210 |
+
Song Han, Jeff Pool, John Tran, and William Dally. Learning both weights and connections for efficient neural network. Advance. Neural Inf. Process. Sys., pp. 1135–1143, 2015.
|
| 211 |
+
Trevor Hastie, Robert Tibshirani, and Jerome Friedman. The elements of statistical learning: data mining, inference, and prediction. Springer Science & Business Media, 2009.
|
| 212 |
+
Majid Janzamin, Hanie Sedghi, and Anima Anandkumar. Beating the perils of non-convexity: Guaranteed training of neural networks using tensor methods. arXiv preprint arXiv:1506.08473, 2015.
|
| 213 |
+
Nikhil Ketkar. Introduction to pytorch. Deep learning with python, pp. 195–208, 2017.
|
| 214 |
+
Marco Mondelli and Andrea Montanari. On the connection between learning two-layers neural networks and tensor decomposition. arXiv preprint arXiv:1802.07301, 2018.
|
| 215 |
+
Behnam Neyshabur, Ryota Tomioka, and Nathan Srebro. Norm-based capacity control in neural networks. Conf. Learning Theory, pp. 1376–1401, 2015.
|
| 216 |
+
Fabian Pedregosa, Francis Bach, and Alexandre Gramfort. On the consistency of ordinal regression methods. J. Mach. Learn. Res., 18(1):1769–1803, 2017.
|
| 217 |
+
Simone Scardapane, Danilo Comminiello, Amir Hussain, and Aurelio Uncini. Group sparse regularization for deep neural networks. Neurocomputing, 241:81–89, 2017.
|
| 218 |
+
Johannes Schmidt-Hieber. Nonparametric regression using deep neural networks with relu activation function. arXiv preprint arXiv:1708.06633, 2017.
|
| 219 |
+
George AF Seber and Alan J Lee. Linear regression analysis, volume 329. John Wiley & Sons, 2012.
|
| 220 |
+
Xingjian Shi, Zhourong Chen, Hao Wang, Dit-Yan Yeung, Wai-kin Wong, and Wang-chun Woo. Convolutional LSTM network: A machine learning approach for precipitation nowcasting. In Advance. Neural Inf. Process. Sys., pp. 802–810, 2015.
|
| 221 |
+
Wei Wen, Chunpeng Wu, Yandan Wang, Yiran Chen, and Hai Li. Learning structured sparsity in deep neural networks. Advance. Neural Inf. Process. Sys., pp. 2074–2082, 2016.
|
| 222 |
+
Yuhong Yang and Andrew Barron. Information-theoretic determination of minimax rates of convergence. Ann. Stat., pp. 1564–1599, 1999.
|
| 223 |
+
Ming Yuan and Yi Lin. Model selection and estimation in regression with grouped variables. J. R. Stat. Soc. Ser. B Methodol., 68(1):49–67, 2006.
|
| 224 |
+
Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. arXiv preprint arXiv:1611.03530, 2016.
|
| 225 |
+
Hang Zhao, Orazio Gallo, Iuri Frosio, and Jan Kautz. Loss functions for image restoration with neural networks. IEEE Trans. Comput., 3(1):47–57, 2016.
|
| 226 |
+
Lei Zhao, Qinghua Hu, and Wenwu Wang. Heterogeneous feature selection with multi-modal deep neural networks and sparse group LASSO. IEEE Trans. Multimed., 17(11):1936–1948, 2015.
|
| 227 |
+
|
| 228 |
+
# A APPENDIX
|
| 229 |
+
|
| 230 |
+
# A.1 PROOF OF LEMMA 2.3
|
| 231 |
+
|
| 232 |
+
We first prove (6), which uses an amalgamation of dimension-based and norm-based analysis. For the output layer, we use the following norm-based analysis
|
| 233 |
+
|
| 234 |
+
$$
|
| 235 |
+
\begin{array} { r l } & { \mathbb { E } \underset { f \in \mathcal { F } _ { V } } { \operatorname* { s u p } } \left| \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } f ( z _ { i } ) \right| = \mathbb { E } \underset { f \in \mathcal { F } _ { V } } { \operatorname* { s u p } } \left| \langle a , \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( W ^ { \top } z _ { i } + b ) \rangle \right| } \\ & { \leq \operatorname* { s u p } \left\| a \right\| _ { 1 } \mathbb { E } \underset { f \in \mathcal { F } _ { V } } { \operatorname* { s u p } } \left\| \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( W ^ { \top } z _ { i } + b ) \right\| _ { \infty } \leq V \mathbb { E } \underset { f \in \mathcal { F } _ { V } } { \operatorname* { s u p } } \underset { j } { \operatorname* { m a x } } \bigg | \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w _ { j } ^ { \top } z _ { i } + b _ { j } ) \bigg | } \\ & { \leq V \mathbb { E } \underset { w \in \mathbb { R } ^ { d } } { \operatorname* { s u p } } \bigg | \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w ^ { \top } z _ { i } + b ) \bigg | . } \end{array}
|
| 236 |
+
$$
|
| 237 |
+
|
| 238 |
+
For notational convenience, we define $w _ { 0 } = 0 , b _ { 0 } = 0$ , and $a _ { 0 } = \sigma ( 0 ) ^ { - 1 } a _ { 0 } \sigma ( w _ { 0 } ^ { \top } z + b _ { 0 } )$ so that $a _ { 0 }$ can be treated in a similar manner as other $a _ { i }$ ’s. Without loss of generality, we do not separately consider $a _ { 0 }$ in the following proofs.
|
| 239 |
+
|
| 240 |
+
Next, we prove that
|
| 241 |
+
|
| 242 |
+
$$
|
| 243 |
+
\mathbb { E } \operatorname* { s u p } _ { w \in \mathbb { R } ^ { d } } \Big | \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w ^ { \top } z _ { i } + b ) \Big | \lesssim \sqrt { \frac { d \log n } { n } } ,
|
| 244 |
+
$$
|
| 245 |
+
|
| 246 |
+
and thus conclude the proof. The proof will be based on an $\varepsilon$ -net argument together with the union bound. For any $\varepsilon$ , let $\bar { W } _ { \varepsilon } \subset \mathbb { R } ^ { d }$ denote the subset
|
| 247 |
+
|
| 248 |
+
$$
|
| 249 |
+
W _ { \varepsilon } = \left\{ w = \frac { \varepsilon } { 2 d } ( i _ { 1 } , i _ { 2 } , \ldots , i _ { d } ) : i _ { j } \in \mathbb { Z } , \| w \| _ { 1 } \leq \eta _ { n } \right\} .
|
| 250 |
+
$$
|
| 251 |
+
|
| 252 |
+
Then, for any $w , b$ , there exists some element $\hat { w } \in W _ { \varepsilon }$ such that
|
| 253 |
+
|
| 254 |
+
$$
|
| 255 |
+
\begin{array} { r l } & { \underset { \tau \in \mathbb X } { \operatorname* { s u p } } | \sigma ( w ^ { \top } z + b ) - \sigma ( \hat { w } ^ { \top } z + \hat { b } ) | \leq \underset { z } { \operatorname* { s u p } } | ( w ^ { \top } z + b ) - ( \hat { w } ^ { \top } z + \hat { b } ) | \leq \underset { z } { \operatorname* { s u p } } | ( w - \hat { w } ) ^ { \top } z | + | b - \hat { b } | } \\ & { \qquad \leq \| w - \hat { w } \| _ { 1 } \underset { z } { \operatorname* { s u p } } \| z \| _ { \infty } + | b - \hat { b } | \leq \varepsilon , } \end{array}
|
| 256 |
+
$$
|
| 257 |
+
|
| 258 |
+
where $\hat { b } = \left( \varepsilon / 2 d \right) \lfloor \left( 2 d b / \varepsilon \right) \rfloor$ and $\lfloor \cdot \rfloor$ is the floor function. By Bernstein’s Inequality, for any $w , b$
|
| 259 |
+
|
| 260 |
+
$$
|
| 261 |
+
\mathbb { P } \bigg ( \vert \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w ^ { \top } z _ { i } + b ) \vert > t \bigg ) \le 2 \exp \Biggl \{ - \frac { n t ^ { 2 } } { 2 ( 1 + t / 3 ) } \Biggr \} .
|
| 262 |
+
$$
|
| 263 |
+
|
| 264 |
+
By taking the union bound over $W _ { \varepsilon }$ , and use the fact that log card $\lfloor ( W _ { \varepsilon } ) \lesssim d \log ( n d / \varepsilon )$ , we obtain
|
| 265 |
+
|
| 266 |
+
$$
|
| 267 |
+
\operatorname* { s u p } _ { w \in \mathbb { R } ^ { d } } \left. \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w ^ { \top } z _ { i } + b ) \right. \lesssim \varepsilon + \sqrt { \frac { d } { n } \log \frac { n d } { \varepsilon } \log \frac { 1 } { \delta } } ,
|
| 268 |
+
$$
|
| 269 |
+
|
| 270 |
+
with probability at least $1 - \delta$ . Then the desired result is obtained by taking $\varepsilon \sim \sqrt { ( d \log n ) / n }$
|
| 271 |
+
|
| 272 |
+
# A.2 PROOF OF THEOREM 3.1
|
| 273 |
+
|
| 274 |
+
The proof is based on the following contraction lemma used in (Neyshabur et al., 2015).
|
| 275 |
+
|
| 276 |
+
Lemma A.1 (Contraction Lemma). Suppose that $g$ is $L$ -Lipschitz and $g ( 0 ) = 0$ . Then for any function class $\mathcal { F }$ mapping from $\mathbb { X }$ to $\mathbb { R }$ and any set $\{ x _ { 1 } , x _ { 2 } , \ldots , x _ { n } \}$ , we have
|
| 277 |
+
|
| 278 |
+
$$
|
| 279 |
+
\mathbb { E } \operatorname* { s u p } _ { f \in \mathcal { F } } \biggl | \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } g ( f ( x _ { i } ) ) \biggr | \leq 2 L \mathbb { E } \operatorname* { s u p } _ { f \in \mathcal { F } } \biggl | \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } f ( x _ { i } ) \biggr | .
|
| 280 |
+
$$
|
| 281 |
+
|
| 282 |
+
With the above lemma, we have the following result.
|
| 283 |
+
|
| 284 |
+
Lemma A.2. The constrained $L _ { 1 }$ estimator ${ \hat { f } } _ { n }$ over $\mathcal { F }$ satisfies
|
| 285 |
+
|
| 286 |
+
$$
|
| 287 |
+
\mathcal { R } ( \hat { f } _ { n } ) \leq \operatorname* { m i n } _ { f \in \mathcal { F } } \mathbb { E } | f ( x ) - f _ { * } ( x ) | + 2 \mathbb { E } \operatorname* { s u p } _ { f \in \mathcal { F } } | \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } f ( z _ { i } ) | + 2 \sqrt { \frac { \mathbb { E } y ^ { 2 } } { n } } .
|
| 288 |
+
$$
|
| 289 |
+
|
| 290 |
+
Proof. Define the empirical risk as:
|
| 291 |
+
|
| 292 |
+
$$
|
| 293 |
+
\mathcal { R } _ { n } ( f ) = \mathbb { E } \left( \frac { 1 } { n } \sum _ { i = 1 } ^ { n } | f _ { * } ( x _ { i } ) + \varepsilon _ { i } - f ( x _ { i } ) | \right) - \mathbb { E } | \varepsilon | .
|
| 294 |
+
$$
|
| 295 |
+
|
| 296 |
+
Since $\hat { f } _ { n }$ minimizes $\begin{array} { r } { n ^ { - 1 } \sum _ { i = 1 } ^ { n } | f _ { * } ( x _ { i } ) + \varepsilon _ { i } - f ( x _ { i } ) | } \end{array}$ in $\mathcal { F }$ , we have
|
| 297 |
+
|
| 298 |
+
$$
|
| 299 |
+
\begin{array} { r } { \mathcal { R } ( \hat { f } _ { n } ) \leq \mathcal { R } ( \hat { f } _ { n } ) - \{ \mathcal { R } _ { n } ( \hat { f } _ { n } ) - \mathcal { R } _ { n } ( \hat { f } ) \} = \{ \mathcal { R } ( \hat { f } _ { n } ) - \mathcal { R } _ { n } ( \hat { f } _ { n } ) \} + \mathcal { R } _ { n } ( f _ { 0 } ) , } \end{array}
|
| 300 |
+
$$
|
| 301 |
+
|
| 302 |
+
where $f _ { 0 } = \arg \operatorname* { m i n } _ { f \in \mathcal { F } } \mathcal { R } ( f )$ . We also have
|
| 303 |
+
|
| 304 |
+
$$
|
| 305 |
+
\mathcal { R } _ { n } ( f _ { 0 } ) = \mathcal { R } ( f _ { 0 } ) = \operatorname* { m i n } _ { f \in \mathcal { F } } \mathbb { E } \left( | f _ { * } ( x ) + \varepsilon - f ( x _ { i } ) | - | \varepsilon | \right) \leq \operatorname* { m i n } _ { f \in \mathcal { F } } \mathbb { E } \left| f ( x ) - f _ { * } ( x ) \right| .
|
| 306 |
+
$$
|
| 307 |
+
|
| 308 |
+
In the following, we will analyze the term $\mathcal { R } ( \hat { f } _ { n } ) - \mathcal { R } _ { n } ( \hat { f } _ { n } )$ in (14). Let $z _ { i }$ ’s denote independent and identically distributed copies of $x _ { i }$ ’s.
|
| 309 |
+
|
| 310 |
+
$$
|
| 311 |
+
\begin{array} { r l } & { \mathcal { R } \big ( \hat { f } _ { n } \big ) - \mathcal { R } _ { n } \big ( \hat { f } _ { n } \big ) = \mathbb { E } \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \bigg \{ | \hat { f } _ { n } ( z _ { i } ) - f _ { * } ( z _ { i } ) - \varepsilon _ { i } | - | \hat { f } _ { n } ( x _ { i } ) - f _ { * } ( x _ { i } ) - \varepsilon _ { i } | \bigg \} } \\ & { \qquad \leq \mathbb { E } \displaystyle \operatorname* { s u p } _ { f \in \mathcal { F } } \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \bigg \{ | f ( z _ { i } ) - f _ { * } ( z _ { i } ) - \varepsilon _ { i } | - | f ( x _ { i } ) - f _ { * } ( x _ { i } ) - \varepsilon _ { i } | \bigg \} } \\ & { \qquad \leq 2 \mathbb { E } \displaystyle \operatorname* { s u p } _ { f \in \mathcal { F } } \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } | f ( z _ { i } ) - f _ { * } ( z _ { i } ) - \varepsilon _ { i } | , } \end{array}
|
| 312 |
+
$$
|
| 313 |
+
|
| 314 |
+
where $\xi _ { 1 } , \ldots , \xi _ { n }$ are independent and identically distributed symmetric Bernoulli random variables that are independent with $z _ { i }$ ’s. According to Lemma A.1, since $g ( x ) \ = \ | x |$ is 1-Lipschitz and $g ( 0 ) = 0$ , we have
|
| 315 |
+
|
| 316 |
+
$$
|
| 317 |
+
\begin{array} { r l } & { \mathbb { E } \underset { f \in \mathcal { F } } { \operatorname* { s u p } } \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } \big | f ( z _ { i } ) - f _ { * } ( z _ { i } ) - \varepsilon _ { i } \big | \leq 2 \mathbb { E } \underset { f \in \mathcal { F } } { \operatorname* { s u p } } \Big | \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } \big ( f ( z _ { i } ) - f _ { * } ( z _ { i } ) - \varepsilon _ { i } \big ) \Big | } \\ & { \qquad \leq 2 \mathbb { E } \underset { f \in \mathcal { F } } { \operatorname* { s u p } } \bigg | \frac { 1 } { n } \displaystyle \sum _ { i = 1 } ^ { n } \xi _ { i } f ( z _ { i } ) \bigg | + 2 \sqrt { \frac { \mathbb { E } y ^ { 2 } } { n } } . } \end{array}
|
| 318 |
+
$$
|
| 319 |
+
|
| 320 |
+
Combining this and (15), we conclude the proof of Lemma A.2.
|
| 321 |
+
|
| 322 |
+
Proof of Theorem 3.1. The proof of (7) is a direct consequence of Lemma 2.3, Lemma A.2, Theorem 2.1 and the fact that the first moment is no more than the second moment. The proof of (8) follows from the fact that $\delta ( \eta ) \to 0$ as $\eta \infty$ .
|
| 323 |
+
|
| 324 |
+
# A.3 PROOF OF THEOREM 3.2
|
| 325 |
+
|
| 326 |
+
Define a subclass of $\mathcal { F } _ { V }$ by
|
| 327 |
+
|
| 328 |
+
$$
|
| 329 |
+
\mathcal { F } _ { 0 } = \Bigg \{ f : \mathbb { R } ^ { d } \mathbb { R } \Big | f ( x ) = V \sigma ( w ^ { \top } x ) , \| w \| _ { 2 } = 1 \Bigg \} .
|
| 330 |
+
$$
|
| 331 |
+
|
| 332 |
+
In the following, we will prove the minimax bound for $\mathcal { F } _ { V }$ by analyzing $\mathcal { F } _ { 0 }$ . Notice that
|
| 333 |
+
|
| 334 |
+
$$
|
| 335 |
+
\begin{array} { r } { \mathbb { E } | \sigma ( w _ { 1 } ^ { \top } x ) - \sigma ( w _ { 2 } ^ { \top } x ) | \geq \mathbb { E } \operatorname* { i n f } _ { u } \sigma ^ { \prime } ( u ) \cdot | w _ { 1 } ^ { \top } x - w _ { 2 } ^ { \top } x | \cdot \mathbb { I } ( w _ { 1 } ^ { \top } x , w _ { 2 } ^ { \top } x \in S ) \gtrsim \| w _ { 1 } - w _ { 2 } \| _ { 2 } . } \end{array}
|
| 336 |
+
$$
|
| 337 |
+
|
| 338 |
+
Let $M _ { 1 } ( \varepsilon )$ denote the packing $\varepsilon$ -entropy of $\mathcal { F } _ { 0 }$ with $L _ { 1 }$ distance, then $M _ { 1 } ( \varepsilon )$ is greater than the packing $\varepsilon$ -entropy of $\mathbb { B } _ { 1 } ^ { \bar { d } }$ with $L _ { 2 }$ distance, which means $M _ { 1 } ( \varepsilon ) \gtrsim d$ . Let $V _ { k } ( \varepsilon )$ denote the covering $\varepsilon$ -entropy of $\mathcal { F } _ { 0 }$ with the square root Kullback-Leibler divergence, then according to its relation with the $L _ { 2 }$ distance shown in (Yang & Barron, 1999), we have
|
| 339 |
+
|
| 340 |
+
$$
|
| 341 |
+
V _ { k } ( \varepsilon ) \leq M _ { 2 } ( \sqrt { 2 } \varepsilon ) \lesssim d \log \frac { 1 } { \varepsilon } ,
|
| 342 |
+
$$
|
| 343 |
+
|
| 344 |
+
where $M _ { 2 } ( \varepsilon )$ denote the packing $\varepsilon$ -entropy of $\mathcal { F } _ { V }$ with $L _ { 2 }$ loss function. The second inequality is proved in a similar way to the proof of Lemma 2.3, which is omitted here for brevity. Hence, according to (Yang & Barron, 1999, Theorem 1),
|
| 345 |
+
|
| 346 |
+
$$
|
| 347 |
+
\operatorname* { i n f } _ { \hat { f } _ { n } } \operatorname* { s u p } _ { f \in { \mathcal { F } } _ { V } } { \mathcal { R } } ( \hat { f } _ { n } ( x ) ) \geq \operatorname* { i n f } _ { \hat { f } _ { n } } \operatorname* { s u p } _ { f \in { \mathcal { F } } _ { 0 } } { \mathcal { R } } ( \hat { f } _ { n } ( x ) ) \gtrsim V { \sqrt { \frac { d } { n } } } ,
|
| 348 |
+
$$
|
| 349 |
+
|
| 350 |
+
This concludes the proof.
|
| 351 |
+
|
| 352 |
+
# A.4 PROOF OF PROPOSITION 3.3
|
| 353 |
+
|
| 354 |
+
To prove the proposition, it is sufficient to verify the following Rademacher complexity bound
|
| 355 |
+
|
| 356 |
+
$$
|
| 357 |
+
\mathbb { E } \operatorname { s u p } \bigg | \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w ^ { \top } z _ { i } + b ) \bigg | \lesssim \sqrt { k \log d \log n } ,
|
| 358 |
+
$$
|
| 359 |
+
|
| 360 |
+
which can be derived easily by adjusting the proof in Lemma 2.3. Then the result follows with a similar analysis as in Theorem 3.1.
|
| 361 |
+
|
| 362 |
+
# A.5 PROOF OF THEOREM 3.4
|
| 363 |
+
|
| 364 |
+
It can be verified from the identity (9) that
|
| 365 |
+
|
| 366 |
+
$$
|
| 367 |
+
\mathbb { E } \underset { f \in \mathcal { F } _ { V } } { \operatorname* { s u p } } \left| \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } f ( x _ { i } ) \right| \leq \sum _ { j = 0 } ^ { r } \mathbb { E } \underset { f \in \mathcal { F } _ { V } } { \operatorname* { s u p } } \left| a _ { j } \right| \left| \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w _ { j } ^ { \top } x _ { i } + b _ { j } ) \right| .
|
| 368 |
+
$$
|
| 369 |
+
|
| 370 |
+
Then according to Lemma A.1, we have
|
| 371 |
+
|
| 372 |
+
$$
|
| 373 |
+
\mathbb { E } \operatorname* { s u p } _ { f \in { \mathcal F } _ { V } } \left| \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } \sigma ( w _ { j } ^ { \top } x _ { i } + b _ { j } ) \right| \lesssim \sqrt { \frac { \log n } { n } } ( \| w _ { j } \| _ { \mathbb { X } } + | b _ { j } | ) .
|
| 374 |
+
$$
|
| 375 |
+
|
| 376 |
+
Combining (16) and (17), we obtain the following lemma that may be interesting on its own right.
|
| 377 |
+
|
| 378 |
+
# Lemma A.3. We have
|
| 379 |
+
|
| 380 |
+
$$
|
| 381 |
+
\mathbb { E } \operatorname* { s u p } _ { f \in \mathcal { F } _ { V } } \left| \frac { 1 } { n } \sum _ { i = 1 } ^ { n } \xi _ { i } f ( x _ { i } ) \right| \lesssim \sqrt { \frac { \log n } { n } } \sum _ { j = 0 } ^ { r } | a _ { j } | ( \| w _ { j } \| _ { \mathfrak { X } } + | b _ { j } | ) \lesssim V \sqrt { \frac { \log n } { n } } \operatorname* { m a x } _ { j } \| w _ { j } \| _ { \mathfrak { X } } .
|
| 382 |
+
$$
|
| 383 |
+
|
| 384 |
+
Since $\| w \| _ { \mathbb { X } } \lesssim \| w \| _ { 1 }$ and $\{ w : \| w \| _ { \mathbb { X } } \lesssim \eta \} \subset \{ w : \| w \| _ { 1 } \lesssim \eta \}$ , the $\| \cdot \| _ { \mathbb { X } }$ can be replaced with $\| \cdot \| _ { 1 }$ in the bounds in Lemmas A.3 and A.2. Then, with a similar argument as in the proof of Theorem 3.1, we conclude the proof of Theorem 3.4.
|
md/train/6NFBvWlRXaG/6NFBvWlRXaG.md
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
md/train/6OoCDvFV4m/6OoCDvFV4m.md
ADDED
|
@@ -0,0 +1,321 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Deep Residual Learning in Spiking Neural Networks
|
| 2 |
+
|
| 3 |
+
Wei Fang1,2, Zhaofei $\mathrm { { Y u ^ { 1 , 2 * } } }$ , Yanqi Chen1,2,
|
| 4 |
+
|
| 5 |
+
Tiejun Huang1,2, Timothée Masquelier3, Yonghong Tian1,2∗
|
| 6 |
+
|
| 7 |
+
1Department of Computer Science and Technology, Peking University 2Peng Cheng Laboratory, Shenzhen 518055, China 3Centre de Recherche Cerveau et Cognition, UMR5549 CNRS - Univ. Toulouse 3 , Toulouse, France
|
| 8 |
+
|
| 9 |
+
# Abstract
|
| 10 |
+
|
| 11 |
+
Deep Spiking Neural Networks (SNNs) present optimization difficulties for gradient-based approaches due to discrete binary activation and complex spatialtemporal dynamics. Considering the huge success of ResNet in deep learning, it would be natural to train deep SNNs with residual learning. Previous Spiking ResNet mimics the standard residual block in ANNs and simply replaces ReLU activation layers with spiking neurons, which suffers the degradation problem and can hardly implement residual learning. In this paper, we propose the spikeelement-wise (SEW) ResNet to realize residual learning in deep SNNs. We prove that the SEW ResNet can easily implement identity mapping and overcome the vanishing/exploding gradient problems of Spiking ResNet. We evaluate our SEW ResNet on ImageNet, DVS Gesture, and CIFAR10-DVS datasets, and show that SEW ResNet outperforms the state-of-the-art directly trained SNNs in both accuracy and time-steps. Moreover, SEW ResNet can achieve higher performance by simply adding more layers, providing a simple method to train deep SNNs. To our best knowledge, this is the first time that directly training deep SNNs with more than 100 layers becomes possible. Our codes are available at https: //github.com/fangwei123456/Spike-Element-Wise-ResNet.
|
| 12 |
+
|
| 13 |
+
# 1 Introduction
|
| 14 |
+
|
| 15 |
+
Artificial Neural Networks (ANNs) have achieved great success in many tasks, including image classification [28, 52, 55], object detection [9, 34, 44], machine translation [2], and gaming [37, 51]. One of the critical factors for ANNs’ success is deep learning [29], which uses multi-layers to learn representations of data with multiple levels of abstraction. It has been proved that deeper networks have advantages over shallower networks in computation cost and generalization ability [3]. The function represented by a deep network can require an exponential number of hidden units by a shallow network with one hidden layer [38]. In addition, the depth of the network is closely related to the network’s performance in practical tasks [52, 55, 27, 52]. Nevertheless, recent evidence [13, 53, 14] reveals that with the network depth increasing, the accuracy gets saturated and then degrades rapidly. To solve this degradation problem, residual learning is proposed [14, 15] and the residual structure is widely exploited in “very deep” networks that achieve the leading performance [22, 59, 18, 57].
|
| 16 |
+
|
| 17 |
+
Spiking Neural Networks (SNNs) are regarded as a potential competitor of ANNs for their high biological plausibility, event-driven property, and low power consumption [45]. Recently, deep learning methods are introduced into SNNs, and deep SNNs have achieved close performance as ANNs in some simple classification datasets [56], but still worse than ANNs in complex tasks, e.g., classifying the ImageNet dataset [47]. To obtain higher performance SNNs, it would be natural to explore deeper network structures like ResNet. Spiking ResNet [25, 60, 21, 17, 49, 12, 30, 64, 48, 42, 43], as the spiking version of ResNet, is proposed by mimicking the residual block in ANNs and replacing ReLU activation layers with spiking neurons. Spiking ResNet converted from ANN achieves state-of-the-art accuracy on nearly all datasets, while the directly trained Spiking ResNet has not been validated to solve the degradation problem.
|
| 18 |
+
|
| 19 |
+
In this paper, we show that Spiking ResNet is inapplicable to all neuron models to achieve identity mapping. Even if the identity mapping condition is met, Spiking ResNet suffers from the problems of vanishing/exploding gradient. Thus, we propose the Spike-Element-Wise (SEW) ResNet to realize residual learning in SNNs. We prove that the SEW ResNet can easily implement identity mapping and overcome the vanishing/exploding gradient problems at the same time. We evaluate Spiking ResNet and SEW ResNet on both the static ImageNet dataset and the neuromorphic DVS Gesture dataset [1], CIFAR10-DVS dataset [32]. The experiment results are consistent with our analysis, indicating that the deeper Spiking ResNet suffers from the degradation problem — the deeper network has higher training loss than the shallower network, while SEW ResNet can achieve higher performance by simply increasing the network’s depth. Moreover, we show that SEW ResNet outperforms the state-of-the-art directly trained SNNs in both accuracy and time-steps. To the best of our knowledge, this is the first time to explore the directly-trained deep SNNs with more than 100 layers.
|
| 20 |
+
|
| 21 |
+
# 2 Related Work
|
| 22 |
+
|
| 23 |
+
# 2.1 Learning Methods of Spiking Neural Networks
|
| 24 |
+
|
| 25 |
+
ANN to SNN conversion (ANN2SNN) [20, 4, 46, 49, 12, 11, 6, 54, 33] and backpropagation with surrogate gradient [40] are the two main methods to get deep SNNs. The ANN2SNN method firstly trains an ANN with ReLU activation, then converts the ANN to an SNN by replacing ReLU with spiking neurons and adding scaling operations like weight normalization and threshold balancing. Some recent conversion methods have achieved near loss-less accuracy with VGG-16 and ResNet [12, 11, 6, 33]. However, the converted SNN needs a longer time to rival the original ANN in precision as the conversion is based on rate-coding [46], which increases the SNN’s latency and restricts the practical application. The backpropagation methods can be classified into two categories [26]. The method in the first category computes the gradient by unfolding the network over the simulation timesteps [31, 19, 58, 50, 30, 40], which is similar to the idea of backpropagation through time (BPTT). As the gradient with respect to the threshold-triggered firing is non-differentiable, the surrogate gradient is often used. The SNN trained by the surrogate method is not limited to rate-coding, and can also be applied on temporal tasks, e.g., classifying neuromorphic datasets [58, 8, 16]. The second method computes the gradients of the timings of existing spikes with respect to the membrane potential at the spike timing [5, 39, 24, 65, 63].
|
| 26 |
+
|
| 27 |
+
# 2.2 Spiking Residual Structure
|
| 28 |
+
|
| 29 |
+
Previous ANN2SNN methods noticed the distinction between plain feedforward ANNs and residual ANNs, and made specific normalization for conversion. Hu et al. [17] were the first to apply the residual structure in ANN2SNN with scaled shortcuts in SNN to match the activations of the original ANN. Sengupta et al. [49] proposed Spike-Norm to balance SNN’s threshold and verified their method by converting VGG and ResNet to SNNs. Existing backpropagation-based methods use nearly the same structure from ResNet. Lee et al. [30] evaluated their custom surrogate methods on shallow ResNets whose depths are no more than ResNet-11. Zheng et al. [64] proposed the threshold-dependent batch normalization (td-BN) to replace naive batch normalization (BN) [23] and successfully trained Spiking ResNet-34 and Spiking ResNet-50 directly with surrogate gradient by adding td-BN in shortcuts.
|
| 30 |
+
|
| 31 |
+
# 3 Methods
|
| 32 |
+
|
| 33 |
+
# 3.1 Spiking Neuron Model
|
| 34 |
+
|
| 35 |
+
The spiking neuron is the fundamental computing unit of SNNs. Similar to Fang et al. [8], we use a unified model to describe the dynamics of all kinds of spiking neurons, which includes the following
|
| 36 |
+
|
| 37 |
+

|
| 38 |
+
Figure 1: Residual blocks in ResNet, Spiking ResNet and SEW ResNet.
|
| 39 |
+
|
| 40 |
+
discrete-time equations:
|
| 41 |
+
|
| 42 |
+
$$
|
| 43 |
+
\begin{array} { l } { { H [ t ] = f ( V [ t - 1 ] , X [ t ] ) , } } \\ { { S [ t ] = \Theta ( H [ t ] - V _ { t h } ) , } } \\ { { V [ t ] = H [ t ] \ ( 1 - S [ t ] ) + V _ { r e s e t } \ S [ t ] , } } \end{array}
|
| 44 |
+
$$
|
| 45 |
+
|
| 46 |
+
where $X [ t ]$ is the input current at time-step $t , H [ t ]$ and $V [ t ]$ denote the membrane potential after neuronal dynamics and after the trigger of a spike at time-step $t$ , respectively. $V _ { t h }$ is the firing threshold, $\Theta ( x )$ is the Heaviside step function and is defined by $\Theta ( x ) = 1$ for $x \geq 0$ and $\Theta ( x ) = { \bar { 0 } }$ for $x < 0 , S [ t ]$ is the output spike at time-step $t$ , which equals 1 if there is a spike and 0 otherwise. $V _ { r e s e t }$ denotes the reset potential. The function $f ( \cdot )$ in Eq. (1) describes the neuronal dynamics and takes different forms for different spiking neuron models. For example, the function $f ( \cdot )$ for the Integrate-and-Fire (IF) model and Leaky Integrate-and-Fire (LIF) model can be described by Eq. (4) and Eq. (5), respectively.
|
| 47 |
+
|
| 48 |
+
$$
|
| 49 |
+
\begin{array} { l } { \displaystyle H [ t ] = V [ t - 1 ] + X [ t ] , } \\ { \displaystyle H [ t ] = V [ t - 1 ] + \frac { 1 } { \tau } ( X [ t ] - ( V [ t - 1 ] - V _ { r e s e t } ) ) , } \end{array}
|
| 50 |
+
$$
|
| 51 |
+
|
| 52 |
+
where $\tau$ represents the membrane time constant. Eq. (2) and Eq. (3) describe the spike generation and resetting processes, which are the same for all kinds of spiking neuron models. In this paper, the surrogate gradient method is used to define $\Theta ^ { \prime } ( x ) \triangleq \sigma ^ { \prime } ( x )$ during error back-propagation, with $\sigma ( x )$ denoting the surrogate function.
|
| 53 |
+
|
| 54 |
+
# 3.2 Drawbacks of Spiking ResNet
|
| 55 |
+
|
| 56 |
+
The residual block is the key component of ResNet. Fig. 1(a) shows the basic block in ResNet [14], where $X ^ { l } , Y ^ { l }$ are the input and output of the $l$ -th block in ResNet, Conv is the convolutional layer, BN denotes batch normalization, and ReLU denotes the rectified linear unit activation layer. The basic block of Spiking ResNet used in [64, 17, 30] simply mimics the block in ANNs by replacing ReLU activation layers with spiking neurons (SN), which is illustrated in Fig. 1(b). Here ${ \dot { S } } ^ { l } [ t { \bar { ] } } , O ^ { l } [ t ]$ are the input and output of the $l$ -th block in Spiking ResNet at time-step $t$ . Based on the above definition, we will analyze the drawbacks of Spiking ResNet below.
|
| 57 |
+
|
| 58 |
+
Spiking ResNet is inapplicable to all neuron models to achieve identity mapping. One of the critical concepts in ResNet is identity mapping. He et al. [14] noted that if the added layers implement the identity mapping, a deeper model should have training error no greater than its shallower counterpart. However, it is unable to train the added layers to implement identity mapping in a feasible time, resulting in deeper models performing worse than shallower models (the degradation problem). To solve this problem, the residual learning is proposed by adding a shortcut connection (shown in Fig. 1(a)). If we use $\mathcal { F } ^ { l }$ to denote the residual mapping, e.g., a stack of two convolutional layers, of the $l$ -th residual block in ResNet and Spiking ResNet, then the residual block in Fig.1(a)
|
| 59 |
+
|
| 60 |
+
and Fig.1(b) can be formulated as
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\begin{array} { r } { Y ^ { l } = \mathrm { R e L U } ( \mathcal { F } ^ { l } ( X ^ { l } ) + X ^ { l } ) , } \\ { O ^ { l } [ t ] = \mathrm { S N } ( \mathcal { F } ^ { l } ( S ^ { l } [ t ] ) + S ^ { l } [ t ] ) . } \end{array}
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
The residual block of Eq. (6) make it easy to implement identity mapping in ANNs. To see this, when $\mathcal { F } ^ { l } ( X ^ { l } ) \equiv 0$ , $Y ^ { l } = \mathrm { R e L U } ( \mathbf { X } ^ { \ l } )$ . In most cases, $X ^ { l }$ is the activation of the previous ReLU layer and $X ^ { l } \ge 0$ . Thus, $Y ^ { l } = \mathrm { R e L U } ( X ^ { l } ) = X ^ { l }$ , which is identity mapping.
|
| 67 |
+
|
| 68 |
+
Different from ResNet, the residual block in Spiking ResNet (Eq. (7)) restricts the models of spiking neuron to implement identity mapping. When $\dot { \mathcal { F } } ^ { l } ( S ^ { \tilde { l } } [ t ] ) \equiv 0$ , $O ^ { l } [ t ] = \operatorname { S N } ( S ^ { l } [ t ] ) \neq S ^ { l } [ t ]$ . To transmit $S ^ { l } [ t ]$ and make $\mathrm { S N } ( S ^ { l } [ t ] ) = S ^ { l } [ t ]$ , the last spiking neuron (SN) in the $l$ -th residual block needs to fire a spike after receiving a spike, and keep silent after receiving no spike at time-step $t$ . It works for IF neuron described by Eq. (4). Specifically, we can set $0 < V _ { t h } \le 1$ and $V [ t - 1 ] = 0$ to ensure that $X [ t ] = 1$ leads to $H [ t ] \geq V _ { t h }$ , and $X [ t ] \stackrel { \cdot } { = } 0$ leads to $H [ t ] < V _ { t h }$ . However, when considering some spiking neuron models with complex neuronal dynamics, it is hard to achieve $\mathrm { S N } ( S ^ { l } [ t ] ) = S ^ { l } [ t ]$ . For example, the LIF neuron used in [66, 8, 61] considers a learnable membrane time constant $\tau$ , the neuronal dynamics of which can be described with Eq. (5). When $X [ t ] = 1$ and $V [ t - 1 ] = 0$ , $\begin{array} { r } { H [ t ] = \frac { 1 } { \tau } } \end{array}$ . It is difficult to find a firing threshold that ensures $H [ t ] > V _ { t h }$ as $\tau$ is being changed in training by the optimizer.
|
| 69 |
+
|
| 70 |
+
Spiking ResNet suffers from the problems of vanishing/exploding gradient. Consider a spiking ResNet with $k$ sequential blocks to transmit $S ^ { l } [ t ]$ , and the identity mapping condition is met, e.g., the spiking neurons are the IF neurons with $0 < V _ { t h } \le 1$ , then we have $S ^ { l } [ t ] = S ^ { l + 1 } [ t ] = \ldots =$ $S ^ { l + k - 1 } [ t ] = O ^ { l + k - 1 } [ t ]$ . Denote the $j$ -th element in $S ^ { l } [ t ]$ and $O ^ { l } [ t ]$ as $S _ { j } ^ { l } [ t ]$ and $O _ { j } ^ { l } [ t ]$ respectively, the gradient of the output of the $( l + k - 1 )$ -th residual block with respect to the input of the $l$ -th residual block can be calculated layer by layer:
|
| 71 |
+
|
| 72 |
+
$$
|
| 73 |
+
\frac { \partial O _ { j } ^ { l + k - 1 } [ t ] } { \partial S _ { j } ^ { l } [ t ] } = \prod _ { i = 0 } ^ { k - 1 } \frac { \partial O _ { j } ^ { l + i } [ t ] } { \partial S _ { j } ^ { l + i } [ t ] } = \prod _ { i = 0 } ^ { k - 1 } \Theta ^ { \prime } ( S _ { j } ^ { l + i } [ t ] - V _ { t h } ) \{ \begin{array} { l l } { 0 , \mathbf { i f } \Theta < \Theta ^ { \prime } ( S _ { j } ^ { l } [ t ] - V _ { t h } ) < 1 } \\ { 1 , \mathbf { i f } \Theta ^ { \prime } ( S _ { j } ^ { l } [ t ] - V _ { t h } ) = 1 } \\ { + \infty , \mathbf { i f } \Theta ^ { \prime } ( S _ { j } ^ { l } [ t ] - V _ { t h } ) > 1 } \end{array} ,
|
| 74 |
+
$$
|
| 75 |
+
|
| 76 |
+
where $\Theta ( x )$ is the Heaviside step function and $\Theta ^ { \prime } ( x )$ is defined by the surrogate gradient. The second equality hold as $O _ { j } ^ { l + i } [ t ] = \mathrm { S N } ( S _ { j } ^ { l + i } [ t ] )$ . In view of the fact that $S _ { j } ^ { l } [ t ]$ can only take 0 or 1, $\Theta ^ { \prime } ( S _ { j } ^ { l } [ t ] - V _ { t h } ) = 1$ is not satisfied for commonly used surrogate functions mentioned in [40]. Thus, the vanishing/exploding gradient problems are prone to happen in deeper Spiking ResNet.
|
| 77 |
+
|
| 78 |
+
Based on the above analysis, we believe that the previous Spiking ResNet ignores the highly nonlinear caused by spiking neurons, and can hardly implement residual learning. Nonetheless, the basic block in Fig. 1(b) is still decent for ANN2SNN with extra normalization [17, 49], as the SNN converted from ANN aims to use firing rates to match the origin ANN’s activations.
|
| 79 |
+
|
| 80 |
+
# 3.3 Spike-Element-Wise ResNet
|
| 81 |
+
|
| 82 |
+
Here we propose the Spike-Element-Wise (SEW) residual block to realize the residual learning in SNNs, which can easily implement identity mapping and overcome the vanishing/exploding gradient problems at the same time. As illustrated in Fig. 1(c), the SEW residual block can be formulated as:
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
O ^ { l } [ t ] = g ( \mathrm { S N } ( \mathcal { F } ^ { l } ( S ^ { l } [ t ] ) ) , S ^ { l } [ t ] ) = g ( A ^ { l } [ t ] , S ^ { l } [ t ] ) ,
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where $g$ represents an element-wise function with two spikes tensor as inputs. Here we use $A ^ { l } [ t ]$ to denote the residual mapping to be learned as $A ^ { l } [ t ] = \mathrm { S N } ( \mathcal { F } ^ { l } ( S ^ { l } [ t ] ) )$ .
|
| 89 |
+
|
| 90 |
+
SEW ResNet can easily implement identity mapping. By utilizing the binary property of spikes, we can find different element-wise functions $g$ that satisfy identity mapping (shown in Tab. 1). To be specific, when choosing $A D D$ and IAND as element-wise functions $g$ , identity mapping is achieved by setting $A ^ { l } [ t ] \equiv 0$ , which can be implemented simply by setting the weights and the bias of the last batch normalization layer (BN) in $\mathcal { F } ^ { l }$ to zero. Then we can get $O ^ { l } [ t ] \stackrel { - } { = } g ( A ^ { l } [ t ] , S ^ { l } [ t ] ) = g ( \mathrm { S N } ( 0 ) , S ^ { l } [ t ] ) = g ( 0 , S ^ { l } [ t ] ) \stackrel { - } { = } S ^ { l } [ t ]$ . This is applicable to all neuron models. When using AND as the element-wise function $g$ , we set $A ^ { l } [ t ] \equiv 1$ to get identity mapping. It can be implemented by setting the last BN’s weights to zero and the bias to a large enough constant to cause spikes, e.g., setting the bias as $V _ { t h }$ when the last SN is IF neurons. Then we have $O ^ { l } [ t ] = 1 \land S ^ { l } [ \dot { t } ] = S ^ { l } [ t ]$ . Note that using AND may suffer from the same problem as Spiking ResNet. It is hard to control some spiking neuron models with complex neuronal dynamics to generate spikes at a specified time-step.
|
| 91 |
+
|
| 92 |
+
Table 1: List of element-wise functions $g$
|
| 93 |
+
|
| 94 |
+
<table><tr><td>Name</td><td>Expression of g(A[t],S[t])</td></tr><tr><td>ADD</td><td>A[t]+S[t]</td></tr><tr><td>AND</td><td>A[t]△s[]=A[]·S[]</td></tr><tr><td>IAND</td><td>(-Al[t])△S‘[t]=(1-A[t])):S[t]</td></tr></table>
|
| 95 |
+
|
| 96 |
+

|
| 97 |
+
Figure 2: Downsample blocks in Spiking ResNet and SEW ResNet.
|
| 98 |
+
|
| 99 |
+
Formulation of downsample block. Remarkably, when the input and output of one block have different dimensions, the shortcut is set as convolutional layers with stride $> 1$ , rather than the identity connection, to perform downsampling. The ResNet and the Spiking ResNet utilize {ConvBN} without ReLU in shortcut (Fig. 2(a)). In contrast, we add a SN in shortcut (Fig. 2(b)).
|
| 100 |
+
|
| 101 |
+
SEW ResNet can overcome vanishing/exploding gradient. The SEW block is similar to ReLU before addition (RBA) block [15] in ANNs, which can be formulated as
|
| 102 |
+
|
| 103 |
+
$$
|
| 104 |
+
Y ^ { l } = \mathrm { R e L U } ( \mathcal { F } ^ { l } ( X ^ { l } ) ) + X ^ { l } .
|
| 105 |
+
$$
|
| 106 |
+
|
| 107 |
+
The RBA block is criticized by He et al. [15] for $X ^ { l + 1 } = Y ^ { l } \geq X ^ { l }$ , which will cause infinite outputs in deep layers. The experiment results in [15] also showed that the performance of the RBA block is worse than the basic block (Fig.1(a)). To some extent, the SEW block is an extension of the RBA block. Note that using $A N D$ and IAND as $g$ will output spikes (i.e. binary tensors), which means that the infinite outputs problem in ANNs will never occur in SNNs with SEW blocks, since all spikes are less or equal than 1. When choosing $A D D$ as $g$ , the infinite outputs problem can be relieved as the output of $k$ sequential SEW blocks will be no larger than $k + 1$ . In addition, a downsample SEW block will regulate the output to be no larger than 2 when $g$ is $A D D$ .
|
| 108 |
+
|
| 109 |
+
When the identity mapping is implemented, the gradient of the output of the $( l + k - 1 )$ -th SEW block with respect to the input of the $l$ -th SEW block can be calculated layer by layer:
|
| 110 |
+
|
| 111 |
+
$$
|
| 112 |
+
\frac { \partial O _ { j } ^ { l + k - 1 } [ t ] } { \partial S _ { j } ^ { l } [ t ] } = \prod _ { i = 0 } ^ { k - 1 } \frac { \partial g ( A _ { j } ^ { l + i } [ t ] , S _ { j } ^ { l + i } [ t ] ) } { \partial S _ { j } ^ { l + i } [ t ] } = \left\{ \prod _ { i = 0 } ^ { k - 1 } \frac { \partial ( ( \boldsymbol { 0 } + S _ { j } ^ { l + i } [ t ] ) } { \partial S _ { j } ^ { l + i } [ t ] } , \mathrm { i f ~ } g = A D D \right. \qquad = 1 .
|
| 113 |
+
$$
|
| 114 |
+
|
| 115 |
+
The second equality holds as identity mapping is achieved by setting $A ^ { l + i } [ t ] \equiv 1$ for $g = A N D$ , and $A ^ { l + i } [ t ] \equiv 0$ for $g = A D D / I A N D$ . Since the gradient in Eq. (11) is a constant, the SEW ResNet can overcome the vanishing/exploding gradient problems.
|
| 116 |
+
|
| 117 |
+
# 4 Experiments
|
| 118 |
+
|
| 119 |
+
# 4.1 ImageNet Classification
|
| 120 |
+
|
| 121 |
+
As the test server of ImageNet 2012 is no longer available, we can not report the actual test accuracy.
|
| 122 |
+
Instead, we use the accuracy on the validation set as the test accuracy, which is the same as [17, 64].
|
| 123 |
+
|
| 124 |
+

|
| 125 |
+
Figure 3: Comparison of the training loss, training accuracy and test accuracy on ImageNet.
|
| 126 |
+
|
| 127 |
+
<table><tr><td rowspan="2">Network</td><td colspan="2">SEWResNet (ADD)</td><td colspan="2">Spiking ResNet</td></tr><tr><td>Acc@1(%)</td><td>Acc@5(%)</td><td>Acc@1(%)</td><td>Acc@5(%)</td></tr><tr><td>ResNet-18</td><td>63.18</td><td>84.53</td><td>62.32</td><td>84.05</td></tr><tr><td>ResNet-34</td><td>67.04</td><td>87.25</td><td>61.86</td><td>83.69</td></tr><tr><td>ResNet-50</td><td>67.78</td><td>87.52</td><td>57.66</td><td>80.43</td></tr><tr><td>ResNet-101</td><td>68.76</td><td>88.25</td><td>31.79</td><td>54.91</td></tr><tr><td>ResNet-152</td><td>69.26</td><td>88.57</td><td>10.03</td><td>23.57</td></tr></table>
|
| 128 |
+
|
| 129 |
+
Table 2: Test accuracy on ImageNet.
|
| 130 |
+
|
| 131 |
+
He et al. [14] evaluated the 18/34/50/101/152-layer ResNets on the ImageNet dataset. For comparison, we consider the SNNs with the same network architectures, except that the basic residual block (Fig.1(a)) is replaced by the spiking basic block (Fig.1(b)) and SEW block (Fig.1(c)) with $g$ as $A D D$ , respectively. We denote the SNN with the basic block as Spiking ResNet and the SNN with the SEW block as SEW ResNet. The IF neuron model is adopted for the static ImageNet dataset. During training on ImageNet, we find that the Spiking ResNet-50/101/152 can not converge unless we use the zero initialization [10], which sets all blocks to be an identity mapping at the start of training. Thus, the results of Spiking ResNet-18/34/50/101/152 reported in this paper are with zero initialization.
|
| 132 |
+
|
| 133 |
+
Spiking ResNet vs. SEW ResNet. We first evaluate the performance of Spiking ResNet and SEW ResNet. Tab. 2 reports the test accuracy on ImageNet validation. The results show that the deeper 34-layer Spiking ResNet has lower test accuracy than the shallower 18-layer Spiking ResNet. As the layer increases, the test accuracy of Spiking ResNet decreases. To reveal the reason, we compare the training loss, training accuracy, and test accuracy of Spiking ResNet during the training procedure, which is shown in Fig. 3. We can find the degradation problem of the Spiking ResNet — the deeper network has higher training loss than the shallower network. In contrast, the deeper 34-layer SEW ResNet has higher test accuracy than the shallower 18-layer SEW ResNet (shown in Tab. 2). More importantly, it can be found from Fig. 3 that the training loss of our SEW ResNet decreases and the training/test accuracy increases with the increase of depth, which indicates that we can obtain higher performance by simply increasing the network’s depth. All these results imply that the degradation problem is well addressed by SEW ResNet.
|
| 134 |
+
|
| 135 |
+
Comparisons with State-of-the-art Methods. In Tab. 3, we compare SEW ResNet with previous Spiking ResNets that achieve the best results on ImageNet. To our best knowledge, the SEW ResNet101 and the SEW ResNet-152 are the only SNNs with more than 100 layers to date, and there are no other networks with the same structure to compare. When the network structure is the same, our SEW ResNet outperforms the state-of-the-art accuracy of directly trained Spiking ResNet, even with fewer time-steps $T$ . The accuracy of SEW ResNet-34 is slightly lower than Spiking ResNet-34 (large) with td-BN $( 6 7 . 0 4 \%$ v.s. $6 7 . 0 5 \%$ ), which uses 1.5 times as many simulating time-steps $T$ (6 v.s. 4) and 4 times as many the number of parameters (85.5M v.s. 21.8M), compared with our SEW ResNet. The state-of-the-art ANN2SNN methods [33, 17] have better accuracy than our SEW ResNet, but they respectively use 64 and 87.5 times as many time-steps as ours.
|
| 136 |
+
|
| 137 |
+
<table><tr><td>Network</td><td>Methods</td><td>Accuracy(%)</td><td>T</td></tr><tr><td>SEW ResNet-34</td><td>Spike-based BP</td><td>67.04</td><td>4</td></tr><tr><td>Spiking ResNet-34(large)† with td-BN [64]</td><td>Spike-based BP</td><td>67.05</td><td>6</td></tr><tr><td>Spiking ResNet-34 with td-BN [64]</td><td>Spike-based BP</td><td>63.72</td><td>6</td></tr><tr><td>Spiking ResNet-34 [12]</td><td>ANN2SNN</td><td>69.89</td><td>4096</td></tr><tr><td>Spiking ResNet-34 [49]</td><td>ANN2SNN</td><td>65.47</td><td>2000</td></tr><tr><td>Spiking ResNet-34 [33]</td><td>ANN2SNN</td><td>74.61</td><td>256</td></tr><tr><td>Spiking ResNet-34 [43]</td><td>ANN2SNN and Spike-based BP</td><td>61.48</td><td>250</td></tr><tr><td>SEW ResNet-50</td><td>Spike-basedBP</td><td>67.78</td><td>4</td></tr><tr><td>Spiking ResNet-50 with td-BN [64]</td><td>Spike-based BP</td><td>64.88</td><td>6</td></tr><tr><td>Spiking ResNet-50 [17]</td><td>ANN2SNN</td><td>72.75</td><td>350</td></tr><tr><td>SEWResNet-101</td><td>Spike-based BP</td><td>68.76</td><td>4</td></tr><tr><td>SEWResNet-152</td><td>Spike-basedBP</td><td>69.26</td><td>4</td></tr></table>
|
| 138 |
+
|
| 139 |
+
Table 3: Comparison with previous Spiking ResNet on ImageNet. † has the same network structure as the standard Spiking ResNet-34, but uses four times as many the number of convolution kernels.
|
| 140 |
+
|
| 141 |
+

|
| 142 |
+
Figure 4: Firing rates of $A ^ { l }$ in SEW blocks on ImageNet.
|
| 143 |
+
|
| 144 |
+
Analysis of spiking response of SEW blocks. Fig. 4 shows the firing rates of $A ^ { l }$ in SEW ResNet18/34/50/101/152 on ImageNet. There are 7 blocks in SEW ResNet-18, 15 blocks in SEW ResNet-34 and SEW ResNet-50, 33 blocks in SEW ResNet-101, and 50 blocks in SEW ResNet-152. The downsample SEW blocks are marked by the triangle down symbol $\bigtriangledown$ . As we choose $A D D$ as elementwise functions $g$ , a lower firing rate means that the SEW block gets closer to implementing identity mapping, except for downsample blocks. Note that the shortcuts of downsample blocks are not identity mapping, which is illustrated in Fig. 2(b). Fig. 4 shows that all spiking neurons in SEW blocks have low firing rates, and the spiking neurons in the last two blocks even have firing rates of almost zero. As the time-steps $T$ is 4 and firing rates are no larger than 0.25, all neurons in SEW ResNet-18/34/50 fire on average no more than one spike during the whole simulation. Besides, all firing rates in SEW ResNet-101/152 are not larger than 0.5, indicating that all neurons fire on average not more than two spikes. In general, the firing rates of $A ^ { l }$ in SEW blocks are at a low level, verifying that most SEW blocks act as identity mapping.
|
| 145 |
+
|
| 146 |
+
Gradients Check on ResNet-152 Structure. Eq. (8) and Eq. (11) analyze the gradients of multiple blocks with identity mapping. To verify that SEW ResNet can overcome vanishing/exploding gradient, we check the gradients of Spiking ResNet-152 and SEW ResNet-152, which are the deepest standard ResNet structure. We consider the same initialization parameters and with/without zero initialization.
|
| 147 |
+
|
| 148 |
+
As the gradients of SNNs are significantly influenced by firing rates (see Sec.A.4), we analyze the firing rate firstly. Fig. 5(a) shows the initial firing rate of $l$ -th block’s output $O ^ { l }$ . The indexes of downsample blocks are marked by vertical dotted lines. The blocks between two adjacent dotted lines represent the identity mapping areas, and have inputs and outputs with the same shape. When using zero initialization, Spiking ResNet, SEW AND ResNet, SEW IAND ResNet, and SEW ADD ResNet have the same firing rates (green curve), which is the zero init curve. Without zero initialization, the silence problem happens in the SEW AND network (red curve), and is relieved by the SEW IAND network (purple curve). Fig. 5(b) shows the firing rate of $A ^ { l }$ , which represents the output of last SN in $l$ -th block. It can be found that although the firing rate of $O ^ { l }$ in SEW ADD ResNet increases linearly in the identity mapping areas, the last SN in each block still maintains a stable firing rate. Note that when $g$ is $A D D$ , the output of the SEW block is not binary, and the firing rate is actually the mean value. The SNs of SEW IAND ResNet maintain an adequate firing rate and decay slightly with depth (purple curve), while SNs in deep layers of SEW AND ResNet keep silent (orange curve). The silence problem can be explained as follows. When using $A N D$ , $O ^ { l } [ \dot { t } ] = \mathrm { S N } ( \mathcal { F } ^ { l } ( \tilde { O } ^ { l - 1 } [ t ] ) ) \wedge O ^ { l - 1 } [ t ] \leq \dot { O } ^ { l - 1 } [ t ] .$ . Since it is hard to keep $\mathrm { S N } ( \mathcal { F } ^ { l } ( O ^ { l - 1 } [ t ] ) ) \equiv 1$ at each time-step $t$ , the silence problem may frequently happen in SEW ResNet with AND as $g$ . Using IAND as a substitute of $A N D$ can relieve this problem because it is easy to keep $\mathrm { S N } ( \mathcal { F } ^ { l } ( O ^ { l - 1 } [ t ] ) ) \equiv \breve { 0 }$ at each time-step $t$ .
|
| 149 |
+
|
| 150 |
+

|
| 151 |
+
Figure 5: The initial firing rates of output $O ^ { l }$ and $A ^ { l }$ in $l$ -th block on 152-layer network.
|
| 152 |
+
|
| 153 |
+
The surrogate gradient function we used in all experiments is $\begin{array} { r } { \sigma ( x ) = \frac { 1 } { \pi } \arctan ( \frac { \pi } { 2 } \alpha x ) + \frac { 1 } { 2 } } \end{array}$ , thus $\begin{array} { r } { \sigma ^ { \prime } ( x ) = \frac { \alpha } { 2 ( 1 + ( \frac { \pi } { 2 } \alpha x ) ^ { 2 } ) } . } \end{array}$ . When $V _ { t h } = 1 , \alpha = 2$ , the gradient amplitude $\Vert \frac { \partial L } { \partial S ^ { l } } \Vert$ of each block is shown in Fig. 6. Note that $\alpha = 2$ , $\sigma ^ { \prime } ( x ) \leq \sigma ^ { \prime } ( 0 ) = \sigma ^ { \prime } ( 1 - V _ { t h } ) = 1$ and $\sigma ^ { \prime } ( 0 - V _ { t h } ) = 0 . 0 9 2 < 1$ . It can be found that the gradients in Spiking ResNet-152 decay from deeper layers to shallower layers in the identity mapping areas without zero initialization, which is caused by $\begin{array} { r } { \dot { \sigma } ^ { \prime } ( x ) \leq 1 } \end{array}$ . It is worth noting that the decay also happens in Spiking ResNet-152 with zero initialization. The small convex $\Lambda$ near the dotted lines is caused by the vanishing gradients of those $S _ { j } ^ { l } [ t ] = 0$ . After these gradients decays to 0 completely, $\Vert \frac { \partial L } { \partial S ^ { l } } \Vert$ will be a constant because the rest gradients are calculated by $S _ { j } ^ { l } [ t ] = 1$ and $\sigma ^ { \prime } ( 1 - V _ { t h } ) = 1$ , which can also explain why the gradient-index curve is horizontal at some areas. When referring to SEW ResNet-152 with zero initialization, it can be found that all gradient-index curves are similar no matter what $g$ we choose. This is caused by that in the identity mapping areas, $S ^ { l }$ is constant for all index $l$ , and the gradient also becomes a constant as it will not flow through SNs. Without zero initialization, the vanishing gradient happens in the SEW AND ResNet-152, which is caused by the silence problem. The gradients of SEW ADD, IAND network increase slowly when propagating from deeper layers to shallower layers, due to the adequate firing rates shown in Fig. 5.
|
| 154 |
+
|
| 155 |
+
When $V _ { t h } = 0 . 5 , \alpha = 2$ , $\sigma ^ { \prime } ( 0 - V _ { t h } ) = \sigma ^ { \prime } ( 1 - V _ { t h } ) = 0 . 2 8 8 < 1$ , indicating that transmitting spikes to SNs is prone to causing vanishing gradient, as shown in Fig. 7. With zero initialization, the decay in Spiking ResNet-152 is more serious because gradient from $\mathcal { F } ^ { l }$ can not contribute. The SEW ResNet-152 will not be affected no matter what $g$ we choose. When $V _ { t h } = 1 , \alpha = 3$ , $\sigma ^ { \prime } ( 1 - V _ { t h } ) = 1 . 5 > 1$ , indicating that transmitting spikes to SNs is prone to causing exploding gradient. Fig. 8 shows the gradient in this situation. Same with the reason in Fig. 6, the change of surrogate function will increase gradients of all networks without zero initialization, but not affect SEW ResNet-152 with zero initialization. The Spiking ResNet-152 meets exploding gradient, while this problem in SEW ADD, IAND ResNet-152 is not serious.
|
| 156 |
+
|
| 157 |
+
# 4.2 DVS Gesture Classification
|
| 158 |
+
|
| 159 |
+
The origin ResNet, which is designed for classifying the complex ImageNet dataset, is too large for the DVS Gesture dataset. Hence, we design a tiny network named 7B-Net, whose structure is c32k3s1-BN-PLIF-{SEW Block-MPk2s2}\*7-FC11. Here c32k3s1 means the convolutional layer with channels 32, kernel size 3, stride 1. MPk2s2 is the max pooling with kernel size 2, stride 2. The symbol $\{ \} ^ { * } $ denotes seven repeated structure, and PLIF denotes the Parametric Leaky-Integrate-andFire Spiking Neuron with a learnable membrane time constant, which is proposed in [8] and can be described by Eq. (5). See Sec.A.1 for AER data pre-processing details.
|
| 160 |
+
|
| 161 |
+

|
| 162 |
+
Figure 7: Gradient amplitude $\Big | \Big | \frac { \partial L } { \partial S ^ { l } } \Big | \Big |$ of $l$ -th block when $V _ { t h } = 0 . 5 , \alpha = 2$
|
| 163 |
+
|
| 164 |
+
Spiking ResNet vs. SEW ResNet. We first compare the performance of SEW ResNet with $A D D$ element-wise function (SEW ADD ResNet) and Spiking ResNet by replacing SEW blocks with basic blocks. As shown in Fig. 9 and Tab. 4, although the training loss of Spiking ResNet (blue curve) is lower than SEW ADD ResNet (orange curve), the test accuracy is lower than SEW ADD ResNet $( 9 0 . 9 7 \%$ v.s. $9 7 . 9 2 \%$ ), which implies that Spiking ResNet is easier to overfit than SEW ADD ResNet.
|
| 165 |
+
|
| 166 |
+
Evaluation of different element-wise functions and plain block. As the training cost of SNNs on the DVS Gesture dataset is much lower than on ImageNet, we carry out more ablation experiments on the DVS Gesture dataset. We replace SEW blocks with the plain blocks (no shortcut connection) and test the performance. We also evaluate all kinds of element-wise functions $g$ in Tab. 1. Fig. 9 shows the training loss and training/test accuracy on DVS Gesture. The sharp fluctuation during early epochs is caused by the large learning rate (see Sec.A.1). We can find that the training loss is SEW IAND $<$ Spiking ResNe $<$ <SEW ADD $<$ Plain Net<SEW AND. Due to the overfitting problem, a lower loss does not guarantee a higher test accuracy.
|
| 167 |
+
|
| 168 |
+
Tab. 4 shows the test accuracy of all networks. The SEW ADD ResNet gets the highest accuracy than others.
|
| 169 |
+
|
| 170 |
+
Comparisons with State-of-the-art Methods. Tab. 5 compares our network with SOTA methods. It can be found that our SEW ResNet outperforms the SOTA works in accuracy, parameter numbers, and simulating time-steps.
|
| 171 |
+
|
| 172 |
+
Table 4: Test accuracy on DVS Gesture. The networks’ order is ranked by accuracy.
|
| 173 |
+
|
| 174 |
+
<table><tr><td>Network</td><td>Element-Wise Function g</td><td>Accuracy(%)</td></tr><tr><td>SEWResNet</td><td>ADD</td><td>97.92</td></tr><tr><td>SEWResNet</td><td>IAND</td><td>95.49</td></tr><tr><td>Plain Net</td><td>1</td><td>91.67</td></tr><tr><td>Spiking ResNet</td><td>1</td><td>90.97</td></tr><tr><td>SEWResNet</td><td>AND</td><td>70.49</td></tr></table>
|
| 175 |
+
|
| 176 |
+
<table><tr><td>Network</td><td>Accuracy(%)</td><td>Parameters</td><td>T</td></tr><tr><td>c32k3s1-BN-PLIF-{SEW Block (c32) -MPk2s2}*7-FC11 (7B-Net)</td><td>97.92</td><td>0.13M</td><td>16</td></tr><tr><td>{c128k3s1-BN-PLIF-MPk2s2}*5-DP-</td><td>97.57</td><td>1.70M</td><td>20</td></tr><tr><td>FC512-PLIF-DP-FC110-PLIF-APk10s10[8]</td><td></td><td>11.18M</td><td></td></tr><tr><td>SpikingResNet-17with td-BN[64] MPk4-c64k3-LIF-c128k3-LIF-APk2-c128k3-LIF-APk2-FC256-LIF-FC11[16]</td><td>96.87 93.40</td><td>23.23M</td><td>40 60</td></tr></table>
|
| 177 |
+
|
| 178 |
+
Table 5: Comparison with the state-of-the-art (SOTA) methods on DVS Gesture dataset.
|
| 179 |
+
|
| 180 |
+
# 4.3 CIFAR10-DVS Classification
|
| 181 |
+
|
| 182 |
+
We also report SEW ResNet on the CIFAR10-DVS dataset, which is obtained by recording the moving images of the CIFAR-10 dataset on a LCD monitor by a DVS camera. As CIFAR10-DVS is more complicated than DVS Gesture, we use the network structure named Wide-7B-Net, which is similar to 7B-Net but with more channels. The structure of Wide-7B-Net is c64k3s1-BN-PLIF-{SEW Block (c64)-MPk2s2}\*4-c128k3s1-BN-PLIF-{SEW Block (c128)-MPk2s2}\*3-FC10.
|
| 183 |
+
|
| 184 |
+

|
| 185 |
+
Figure 8: Gradient amplitude $\Big | \Big | \frac { \partial L } { \partial S ^ { l } } \Big | \Big |$ of $l$ -th block when $V _ { t h } = 1 , \alpha = 3$
|
| 186 |
+
|
| 187 |
+

|
| 188 |
+
Figure 9: Comparison of the training loss, training accuracy and test accuracy on DVS Gesture dataset.
|
| 189 |
+
|
| 190 |
+
<table><tr><td>Network</td><td>Accuracy(%)</td><td>Parameters</td><td>T</td></tr><tr><td>c64k3s1-BN-PLIF-{SEWBlock (c64)-MPk2s2}*4-c128k3s1- BN-PLIF-{SEWBlock (c128)-MPk2s2}*3-FCi0 (Wide-7B-Net)</td><td>64.8, 70.2, 74.4</td><td>1.19M</td><td>4,8,16</td></tr><tr><td>{c128k3s1-BN-PLIF-MPk2s2}*4-DP-FC512-PLIF-DP- FC100-PLIF-APk10s10[8]</td><td>74.8</td><td>17.4M</td><td>20</td></tr><tr><td>Spiking ResNet-19 with td-BN [64]</td><td>67.8</td><td>11.18M</td><td>10</td></tr></table>
|
| 191 |
+
|
| 192 |
+
Table 6: Comparison with the state-of-the-art (SOTA) methods on CIFAR10-DVS dataset.
|
| 193 |
+
|
| 194 |
+
In Tab.6, we compare SEW ResNet with the previous Spiking ResNet. One can find that our method achieves better performance $7 0 . 2 \%$ v.s. $6 7 . 8 \%$ and fewer time-steps (8 v.s. 10) than the Spiking ResNet [64]. We also compare our method with the state-of-the-art (SOTA) supervised learning methods on CIFAR10-DVS. The accuracy of our Wide-7B-Net is slightly lower than the current SOTA method [8] $7 4 . 4 \%$ v.s. $7 4 . 8 \%$ ), which uses 1.25 times as many simulation time-steps $T$ (20 v.s. 16) and 14.6 times as many the number of parameters (17.4M v.s. 1.19M). Moreover, when reducing $T$ shapely to $T = 4$ , our Wide-7B-Net can still get the accuracy of $6 4 . 8 \%$ .
|
| 195 |
+
|
| 196 |
+
# 5 Conclusion
|
| 197 |
+
|
| 198 |
+
In this paper, we analyze the previous Spiking ResNet whose residual block mimics the standard block of ResNet, and find that it can hardly implement identity mapping and suffers from the problems of vanishing/exploding gradient. To solve these problems, we propose the SEW residual block and prove that it can implement the residual learning. The experiment results on ImageNet, DVS Gesture, and CIFAR10-DVS datasets show that our SEW residual block solves the degradation problem, and SEW ResNet can achieve higher accuracy by simply increasing the network’s depth. Our work may shed light on the learning of “very deep” SNNs.
|
| 199 |
+
|
| 200 |
+
# 6 Acknowledgment
|
| 201 |
+
|
| 202 |
+
This work is supported by grants from the National Natural Science Foundation of China under contracts No.62027804, No.61825101, and No.62088102.
|
| 203 |
+
|
| 204 |
+
References
|
| 205 |
+
[1] Arnon Amir, Brian Taba, David Berg, Timothy Melano, Jeffrey McKinstry, Carmelo Di Nolfo, Tapan Nayak, Alexander Andreopoulos, Guillaume Garreau, Marcela Mendoza, Jeff Kusnitz, Michael Debole, Steve Esser, Tobi Delbruck, Myron Flickner, and Dharmendra Modha. A low power, fully event-based gesture recognition system. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 7243–7252, 2017.
|
| 206 |
+
[2] Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. Neural machine translation by jointly learning to align and translate. In International Conference on Learning Representations (ICLR), 2015.
|
| 207 |
+
[3] Yoshua Bengio, Yann LeCun, et al. Scaling learning algorithms towards ai. Large-scale Kernel Machines, 34(5):1–41, 2007.
|
| 208 |
+
[4] Yongqiang Cao, Yang Chen, and Deepak Khosla. Spiking deep convolutional neural networks for energy-efficient object recognition. International Journal of Computer Vision, 113(1):54–66, 2015.
|
| 209 |
+
[5] Iulia M Comsa, Krzysztof Potempa, Luca Versari, Thomas Fischbacher, Andrea Gesmundo, and Jyrki Alakuijala. Temporal coding in spiking neural networks with alpha synaptic function. In International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 8529–8533. IEEE, 2020.
|
| 210 |
+
[6] Shikuang Deng and Shi Gu. Optimal conversion of conventional artificial neural networks to spiking neural networks. In International Conference on Learning Representations (ICLR), 2021.
|
| 211 |
+
[7] Wei Fang, Yanqi Chen, Jianhao Ding, Ding Chen, Zhaofei Yu, Huihui Zhou, Yonghong Tian, and other contributors. Spikingjelly. https://github.com/fangwei123456/ spikingjelly.
|
| 212 |
+
[8] Wei Fang, Zhaofei Yu, Yanqi Chen, Timothee Masquelier, Tiejun Huang, and Yonghong Tian. Incorporating learnable membrane time constant to enhance learning of spiking neural networks. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 2661–2671, 2021.
|
| 213 |
+
[9] Ross Girshick, Jeff Donahue, Trevor Darrell, and Jitendra Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 580–587, 2014.
|
| 214 |
+
[10] Priya Goyal, Piotr Dollár, Ross Girshick, Pieter Noordhuis, Lukasz Wesolowski, Aapo Kyrola, Andrew Tulloch, Yangqing Jia, and Kaiming He. Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677, 2017.
|
| 215 |
+
[11] Bing Han and Kaushik Roy. Deep spiking neural network: Energy efficiency through time based coding. In European Conference on Computer Vision (ECCV), pages 388–404, 2020.
|
| 216 |
+
[12] Bing Han, Gopalakrishnan Srinivasan, and Kaushik Roy. Rmp-snn: Residual membrane potential neuron for enabling deeper high-accuracy and low-latency spiking neural network. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 13558–13567, 2020.
|
| 217 |
+
[13] Kaiming He and Jian Sun. Convolutional neural networks at constrained time cost. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 5353–5360, 2015.
|
| 218 |
+
[14] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 770–778, 2016.
|
| 219 |
+
[15] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Identity mappings in deep residual networks. In European Conference on Computer Vision (ECCV), pages 630–645. Springer, 2016.
|
| 220 |
+
|
| 221 |
+
[16] Weihua He, YuJie Wu, Lei Deng, Guoqi Li, Haoyu Wang, Yang Tian, Wei Ding, Wenhui Wang, and Yuan Xie. Comparing snns and rnns on neuromorphic vision datasets: Similarities and differences. Neural Networks, 132:108–120, 2020.
|
| 222 |
+
|
| 223 |
+
[17] Yangfan Hu, Huajin Tang, Yueming Wang, and Gang Pan. Spiking deep residual network. arXiv preprint arXiv:1805.01352, 2018.
|
| 224 |
+
|
| 225 |
+
[18] Gao Huang, Zhuang Liu, Laurens Van Der Maaten, and Kilian Q Weinberger. Densely connected convolutional networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 4700–4708, 2017.
|
| 226 |
+
|
| 227 |
+
[19] Dongsung Huh and Terrence J Sejnowski. Gradient descent for spiking neural networks. In Advances in Neural Information Processing Systems (NeurIPS), pages 1440–1450, 2018.
|
| 228 |
+
|
| 229 |
+
[20] Eric Hunsberger and Chris Eliasmith. Spiking deep networks with lif neurons. arXiv preprint arXiv:1510.08829, 2015.
|
| 230 |
+
|
| 231 |
+
[21] Sungmin Hwang, Jeesoo Chang, Min-Hye Oh, Kyung Kyu Min, Taejin Jang, Kyungchul Park, Junsu Yu, Jong-Ho Lee, and Byung-Gook Park. Low-latency spiking neural networks using pre-charged membrane potential and delayed evaluation. Frontiers in Neuroscience, 15:135, 2021.
|
| 232 |
+
|
| 233 |
+
[22] Forrest N Iandola, Song Han, Matthew W Moskewicz, Khalid Ashraf, William J Dally, and Kurt Keutzer. Squeezenet: Alexnet-level accuracy with 50x fewer parameters and $< 0 . 5 ~ \mathrm { m b }$ model size. arXiv preprint arXiv:1602.07360, 2016.
|
| 234 |
+
|
| 235 |
+
[23] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In International Conference on Machine Learning (ICML), pages 448–456, 2015.
|
| 236 |
+
|
| 237 |
+
[24] Saeed Reza Kheradpisheh and Timothée Masquelier. Temporal backpropagation for spiking neural networks with one spike per neuron. International Journal of Neural Systems, 30(06):2050027, 2020.
|
| 238 |
+
|
| 239 |
+
[25] Jaehyun Kim, Heesu Kim, Subin Huh, Jinho Lee, and Kiyoung Choi. Deep neural networks with weighted spikes. Neurocomputing, 311:373–386, 2018.
|
| 240 |
+
|
| 241 |
+
[26] Jinseok Kim, Kyungsu Kim, and Jae-Joon Kim. Unifying activation- and timing-based learning rules for spiking neural networks. In Advances in Neural Information Processing Systems (NeurIPS), pages 19534–19544, 2020.
|
| 242 |
+
|
| 243 |
+
[27] Alex Krizhevsky. One weird trick for parallelizing convolutional neural networks. arXiv preprint arXiv:1404.5997, 2014.
|
| 244 |
+
|
| 245 |
+
[28] Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in Neural Information Processing Systems (NeurIPS), pages 1097–1105, 2012.
|
| 246 |
+
|
| 247 |
+
[29] Yann LeCun, Yoshua Bengio, and Geoffrey Hinton. Deep learning. Nature, 521(7553):436–444, 2015.
|
| 248 |
+
|
| 249 |
+
[30] Chankyu Lee, Syed Shakib Sarwar, Priyadarshini Panda, Gopalakrishnan Srinivasan, and Kaushik Roy. Enabling spike-based backpropagation for training deep neural network architectures. Frontiers in Neuroscience, 14, 2020.
|
| 250 |
+
|
| 251 |
+
[31] Jun Haeng Lee, Tobi Delbruck, and Michael Pfeiffer. Training deep spiking neural networks using backpropagation. Frontiers in Neuroscience, 10:508, 2016.
|
| 252 |
+
|
| 253 |
+
[32] Hongmin Li, Hanchao Liu, Xiangyang Ji, Guoqi Li, and Luping Shi. Cifar10-dvs: An eventstream dataset for object classification. Frontiers in Neuroscience, 11:309, 2017.
|
| 254 |
+
|
| 255 |
+
[33] Yuhang Li, Shikuang Deng, Xin Dong, Ruihao Gong, and Shi Gu. A free lunch from ann: Towards efficient, accurate spiking neural networks calibration. In International Conference on Machine Learning (ICML), volume 139, pages 6316–6325, 2021.
|
| 256 |
+
|
| 257 |
+
[34] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy, Scott Reed, Cheng-Yang Fu, and Alexander C Berg. Ssd: Single shot multibox detector. In European Conference on Computer Vision (ECCV), pages 21–37. Springer, 2016.
|
| 258 |
+
|
| 259 |
+
[35] Ilya Loshchilov and Frank Hutter. SGDR: stochastic gradient descent with warm restarts. In International Conference on Learning Representations (ICLR), 2017.
|
| 260 |
+
|
| 261 |
+
[36] Paulius Micikevicius, Sharan Narang, Jonah Alben, Gregory Diamos, Erich Elsen, David Garcia, Boris Ginsburg, Michael Houston, Oleksii Kuchaiev, Ganesh Venkatesh, et al. Mixed precision training. In International Conference on Learning Representations (ICLR), 2018.
|
| 262 |
+
|
| 263 |
+
[37] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rusu, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533, 2015.
|
| 264 |
+
|
| 265 |
+
[38] Guido F Montufar, Razvan Pascanu, Kyunghyun Cho, and Yoshua Bengio. On the number of linear regions of deep neural networks. In Advances in Neural Information Processing Systems (NeurIPS), pages 2924–2932, 2014.
|
| 266 |
+
|
| 267 |
+
[39] Hesham Mostafa. Supervised learning based on temporal coding in spiking neural networks. IEEE Transactions on Neural Networks and Learning Systems, 29(7):3227–3235, 2017.
|
| 268 |
+
|
| 269 |
+
[40] Emre O Neftci, Hesham Mostafa, and Friedemann Zenke. Surrogate gradient learning in spiking neural networks: Bringing the power of gradient-based optimization to spiking neural networks. IEEE Signal Processing Magazine, 36(6):51–63, 2019.
|
| 270 |
+
|
| 271 |
+
[41] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala. Pytorch: An imperative style, high-performance deep learning library. In Advances in Neural Information Processing Systems (NeurIPS), pages 8026–8037, 2019.
|
| 272 |
+
|
| 273 |
+
[42] Nitin Rathi and Kaushik Roy. Diet-snn: Direct input encoding with leakage and threshold optimization in deep spiking neural networks. arXiv preprint arXiv:2008.03658, 2020.
|
| 274 |
+
|
| 275 |
+
[43] Nitin Rathi, Gopalakrishnan Srinivasan, Priyadarshini Panda, and Kaushik Roy. Enabling deep spiking neural networks with hybrid conversion and spike timing dependent backpropagation. In International Conference on Learning Representations (ICLR), 2020.
|
| 276 |
+
|
| 277 |
+
[44] Joseph Redmon, Santosh Divvala, Ross Girshick, and Ali Farhadi. You only look once: Unified, real-time object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 779–788, 2016.
|
| 278 |
+
|
| 279 |
+
[45] Kaushik Roy, Akhilesh Jaiswal, and Priyadarshini Panda. Towards spike-based machine intelligence with neuromorphic computing. Nature, 575(7784):607–617, 2019.
|
| 280 |
+
|
| 281 |
+
[46] Bodo Rueckauer, Iulia-Alexandra Lungu, Yuhuang Hu, Michael Pfeiffer, and Shih-Chii Liu. Conversion of continuous-valued deep networks to efficient event-driven networks for image classification. Frontiers in Neuroscience, 11:682, 2017.
|
| 282 |
+
|
| 283 |
+
[47] Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, et al. Imagenet large scale visual recognition challenge. International Journal of Computer Vision, 115(3):211–252, 2015.
|
| 284 |
+
|
| 285 |
+
[48] Ali Samadzadeh, Fatemeh Sadat Tabatabaei Far, Ali Javadi, Ahmad Nickabadi, and Morteza Haghir Chehreghani. Convolutional spiking neural networks for spatio-temporal feature extraction. arXiv preprint arXiv:2003.12346, 2020.
|
| 286 |
+
|
| 287 |
+
[49] Abhronil Sengupta, Yuting Ye, Robert Wang, Chiao Liu, and Kaushik Roy. Going deeper in spiking neural networks: Vgg and residual architectures. Frontiers in Neuroscience, 13:95, 2019.
|
| 288 |
+
|
| 289 |
+
[50] Sumit Bam Shrestha and Garrick Orchard. Slayer: Spike layer error reassignment in time. In Advances in Neural Information Processing Systems (NeurIPS), pages 1419–1428, 2018.
|
| 290 |
+
|
| 291 |
+
[51] David Silver, Aja Huang, Chris J Maddison, Arthur Guez, Laurent Sifre, George Van Den Driessche, Julian Schrittwieser, Ioannis Antonoglou, Veda Panneershelvam, Marc Lanctot, et al. Mastering the game of go with deep neural networks and tree search. Nature, 529(7587):484–489, 2016.
|
| 292 |
+
|
| 293 |
+
[52] Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In International Conference on Learning Representations (ICLR), 2015.
|
| 294 |
+
|
| 295 |
+
[53] Rupesh Kumar Srivastava, Klaus Greff, and Jürgen Schmidhuber. Highway networks. arXiv preprint arXiv:1505.00387, 2015.
|
| 296 |
+
|
| 297 |
+
[54] Christoph Stöckl and Wolfgang Maass. Optimized spiking neurons can classify images with high accuracy through temporal coding with two spikes. Nature Machine Intelligence, 3(3):230–238, 2021.
|
| 298 |
+
|
| 299 |
+
[55] 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/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 1–9, 2015.
|
| 300 |
+
|
| 301 |
+
[56] Amirhossein Tavanaei, Masoud Ghodrati, Saeed Reza Kheradpisheh, Timothée Masquelier, and Anthony Maida. Deep learning in spiking neural networks. Neural Networks, 111:47–63, 2019.
|
| 302 |
+
|
| 303 |
+
[57] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Ł ukasz Kaiser, and Illia Polosukhin. Attention is all you need. In Advances in Neural Information Processing Systems (NeurIPS), pages 5998–6008, 2017.
|
| 304 |
+
|
| 305 |
+
[58] Yujie Wu, Lei Deng, Guoqi Li, Jun Zhu, and Luping Shi. Spatio-temporal backpropagation for training high-performance spiking neural networks. Frontiers in Neuroscience, 12:331, 2018.
|
| 306 |
+
|
| 307 |
+
[59] Saining Xie, Ross Girshick, Piotr Dollár, Zhuowen Tu, and Kaiming He. Aggregated residual transformations for deep neural networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 5987–5995, 2017.
|
| 308 |
+
|
| 309 |
+
[60] Fu Xing, Ye Yuan, Hong Huo, and Tao Fang. Homeostasis-based cnn-to-snn conversion of inception and residual architectures. In International Conference on Neural Information Processing, pages 173–184. Springer, 2019.
|
| 310 |
+
|
| 311 |
+
[61] Bojian Yin, Federico Corradi, and Sander M Bohté. Effective and efficient computation with multiple-timescale spiking recurrent neural networks. In International Conference on Neuromorphic Systems, pages 1–8, 2020.
|
| 312 |
+
|
| 313 |
+
[62] Friedemann Zenke and Tim P Vogels. The remarkable robustness of surrogate gradient learning for instilling complex function in spiking neural networks. Neural Computation, 33(4):899–925, 2021.
|
| 314 |
+
|
| 315 |
+
[63] Wenrui Zhang and Peng Li. Temporal spike sequence learning via backpropagation for deep spiking neural networks. In Advances in Neural Information Processing Systems (NeurIPS), pages 12022–12033, 2020.
|
| 316 |
+
|
| 317 |
+
[64] Hanle Zheng, Yujie Wu, Lei Deng, Yifan Hu, and Guoqi Li. Going deeper with directly-trained larger spiking neural networks. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 11062–11070, 2021.
|
| 318 |
+
|
| 319 |
+
[65] Shibo Zhou, Xiaohua Li, Ying Chen, Sanjeev T. Chandrasekaran, and Arindam Sanyal. Temporal-coded deep spiking neural network with easy training and robust performance. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 35, pages 11143–11151, 2021.
|
| 320 |
+
|
| 321 |
+
[66] Romain Zimmer, Thomas Pellegrini, Srisht Fateh Singh, and Timothée Masquelier. Technical report: supervised training of convolutional spiking neural networks with pytorch. arXiv preprint arXiv:1911.10124, 2019.
|
md/train/6RB77-6-_oI/6RB77-6-_oI.md
ADDED
|
@@ -0,0 +1,242 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# How Powerful are Performance Predictors in Neural Architecture Search?
|
| 2 |
+
|
| 3 |
+
Colin White1∗, Arber $\mathbf { Z e l a ^ { 2 } }$ , Binxin $\mathbf { R } \mathbf { u } ^ { 3 }$ , Yang $\mathbf { L i u } ^ { 1 }$ , Frank Hutter2,4 1 Abacus.AI, 2 University of Freiburg, 3 University of Oxford, 4 Bosch Center for Artificial Intelligence
|
| 4 |
+
|
| 5 |
+
# Abstract
|
| 6 |
+
|
| 7 |
+
Early methods in the rapidly developing field of neural architecture search (NAS) required fully training thousands of neural networks. To reduce this extreme computational cost, dozens of techniques have since been proposed to predict the final performance of neural architectures. Despite the success of such performance prediction methods, it is not well-understood how different families of techniques compare to one another, due to the lack of an agreed-upon evaluation metric and optimization for different constraints on the initialization time and query time. In this work, we give the first large-scale study of performance predictors by analyzing 31 techniques ranging from learning curve extrapolation, to weight-sharing, to supervised learning, to zero-cost proxies. We test a number of correlation- and rank-based performance measures in a variety of settings, as well as the ability of each technique to speed up predictor-based NAS frameworks. Our results act as recommendations for the best predictors to use in different settings, and we show that certain families of predictors can be combined to achieve even better predictive power, opening up promising research directions. Our code, featuring a library of 31 performance predictors, is available at https://github.com/automl/naslib.
|
| 8 |
+
|
| 9 |
+
# 1 Introduction
|
| 10 |
+
|
| 11 |
+
Neural architecture search (NAS) is a popular area of machine learning, which aims to automate the process of developing neural architectures for a given dataset. Since 2017, a wide variety of NAS techniques have been proposed [78, 45, 32, 49]. While the first NAS techniques trained thousands of architectures to completion and then evaluated the performance using the final validation accuracy [78], modern algorithms use more efficient strategies to estimate the performance of partially-trained or even untrained neural networks [11, 2, 54, 34, 38].
|
| 12 |
+
|
| 13 |
+
Recently, many performance prediction methods have been proposed based on training a model to predict the final validation accuracy of an architecture just from an encoding of the architecture. Popular choices for these models include Gaussian processes [60, 17, 51], neural networks [36, 54, 65, 69], tree-based methods [33, 55], and so on. However, these methods often require hundreds of fully-trained architectures to be used as training data, thus incurring high initialization time. In contrast, learning curve extrapolation methods [11, 2, 20] need little or no initialization time, but each individual prediction requires partially training the architecture, incurring high query time. Very recently, a few techniques have been introduced which are fast both in query time and initialization time [38, 1], computing predictions based on a single minibatch of data. Finally, using shared weights [45, 4, 32] is a popular paradigm for NAS [73, 25], although the effectiveness of these methods in ranking architectures is disputed [53, 74, 76].
|
| 14 |
+
|
| 15 |
+
Despite the widespread use of performance predictors, it is not known how methods from different families compare to one another. While there have been some analyses on the best predictors within each class [41, 72], for many predictors, the only evaluation is from the original work that proposed the method. Furthermore, no work has previously compared the predictors across different families of performance predictors. This leads to two natural questions: how do zero-cost methods, model-based methods, learning curve extrapolation methods, and weight sharing methods compare to one another across different constraints on initialization time and query time? Furthermore, can predictors from different families be combined to achieve even better performance?
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
Figure 1: Categories of performance predictors (left). Kendall Tau rank correlation for performance predictors with respect to initialization time and query time (right). Each type of predictor is plotted differently based on whether it allows variable initialization time and/or variable query time. For example, the sixteen model-based predictors have a fixed query time and variable initialization time, so they are plotted as curves parallel to the X-Z plane.
|
| 19 |
+
|
| 20 |
+
In this work, we answer the above questions by giving the first large-scale study of performance predictors for NAS. We study 31 predictors across four popular search spaces and four datasets: NAS-Bench-201 [13] with CIFAR-10, CIFAR-100, and ImageNet16-120, NAS-Bench-101 [71] and DARTS [32] with CIFAR-10, and NAS-Bench-NLP [21] with Penn TreeBank. In order to give a fair comparison among different classes of predictors, we run a full portfolio of experiments, measuring the Pearson correlation and rank correlation metrics (Spearman, Kendall Tau, and sparse Kendall Tau), across a variety of initialization time and query time budgets. We run experiments using a training and test set of architectures generated both uniformly at random, as well as by mutating the highest-performing architectures (the latter potentially more closely resembling distributions encountered during an actual NAS run). Finally, we test the ability of each predictor to speed up NAS algorithms, namely Bayesian optimization [36, 54, 69, 51] and predictor-guided evolution [66, 59].
|
| 21 |
+
|
| 22 |
+
Since many predictors so far had only been evaluated on one search space, our work shows which predictors have consistent performance across search spaces. Furthermore, by conducting a study with three axes of comparison (see Figure 1), and by comparing various types of predictors, we see a more complete view of the state of performance predictor techniques that leads to interesting insights. Notably, we show that the performance of predictors from different families are complementary and can be combined to achieve significantly higher performance. The success of these experiments opens up promising avenues for future work.
|
| 23 |
+
|
| 24 |
+
Overall, our experiments bridge multiple areas of NAS research and act as recommendations for the best predictors to use under different runtime constraints. Our code, based on the NASLib library [52], can be used as a testing ground for future performance prediction techniques. In order to ensure reproducibility of the original results, we created a table to clarify which of the 31 predictors had previously published results on a NAS-Bench search space, and how these published results compared to our results (Table 7). We also adhere to the NeurIPS 2021 checklist along with the specialized NAS best practices checklist [31].
|
| 25 |
+
|
| 26 |
+
Our contributions. We summarize our main contributions below.
|
| 27 |
+
|
| 28 |
+
• We conduct the first large-scale study of performance predictors for neural architecture search by comparing model-based methods, learning curve extrapolation methods, zero-cost methods, and weight sharing methods across a variety of settings.
|
| 29 |
+
• We release a comprehensive library of 31 performance predictors on four different search spaces.
|
| 30 |
+
• We show that different families of performance predictors can be combined to achieve substantially better predictive power than any single predictor.
|
| 31 |
+
|
| 32 |
+
# 2 Related Work
|
| 33 |
+
|
| 34 |
+
NAS has been studied since at least the 1990s [19, 58], and has been revitalized in the last few years [78]. While initial techniques focused on reinforcement learning [78, 45] and evolutionary search [37, 49], one-shot NAS algorithms [32, 12, 4] and predictor-based NAS algorithms [65, 54, 69] have recently become popular. We give a brief survey of performance prediction techniques in Section 3. For a survey on NAS, see [15]. The most widely used type of search space in prior work is the cell-based search space [79], where the architecture search is over a relatively small directed acyclic graph representing an architecture.
|
| 35 |
+
|
| 36 |
+
A few recent works have compared different performance predictors on popular cell-based search spaces for NAS. Siems et al. [55] studied graph neural networks and tree-based methods, and found that gradient-boosted trees and graph isomorphism networks performed the best. However, the comparison was only on a single search space and dataset, and the explicit goal was to achieve maximum performance given a training set of around 60 000 architectures. Another recent paper [41] studied various aspects of supernetwork training, and separately compared four model-based methods: random forest, MLP, LSTM, and GATES [42]. However, the comparisons were again on a single search space and dataset and did not compare between multiple families of performance predictors. Other papers have proposed new model-based predictors and compared the new predictors to other model-based baselines [34, 65, 54, 69]. Finally, a recent paper analyzed training heuristics to make weight-sharing more effective at ranking architectures [72]. To the best of our knowledge, no prior work has conducted comparisons across multiple families of performance predictors.
|
| 37 |
+
|
| 38 |
+
# 3 Performance Prediction Methods for NAS
|
| 39 |
+
|
| 40 |
+
In NAS, given a search space $\mathcal { A }$ , the goal is to find $a ^ { * } = \operatorname * { a r g m i n } _ { a \in { \mathcal { A } } } f ( a )$ , where $f$ denotes the validation error of architecture $a$ after training on a fixed dataset for a fixed number of epochs $E$ . Since evaluating $f ( a )$ typically takes hours (as it requires training a neural network from scratch), many NAS algorithms make use of performance predictors to speed up this process. A performance predictor $f ^ { \prime }$ is defined generally as any function which predicts the final accuracy or ranking of architectures, without fully training the architectures. That is, evaluating $f ^ { \prime }$ should take less time than evaluating $f$ , and $\{ f ^ { \prime } ( a ) \mid a \in \mathcal { A } \}$ should ideally have high correlation or rank correlation with $\{ f ( a ) \mid a \in { \bar { \mathcal { A } } } \}$ .
|
| 41 |
+
|
| 42 |
+
Each performance predictor is defined by two main routines: an initialization routine which performs general pre-computation, and a query routine which performs the final architecture-specific computation: it takes as input an architecture specification, and outputs its predicted accuracy. For example, one of the simplest performance predictors is early stopping: for any query $( a )$ , train $a$ for $E / 2$ epochs instead of $E$ [77]. In this case, there is no general pre-computation, so initialization time is zero. On the other hand, the query time for each input architecture is high because it involves training the architecture for $E / 2$ epochs. In fact, the runtime of the initialization and query routines varies substantially based on the type of predictor. In the context of NAS algorithms, the initialization routine is typically performed once at the start of the algorithm, and the query routine is typically performed many times throughout the NAS algorithm. Some performance predictors also make use of an update routine, when part of the computation from initialization needs to be updated without running the full procedure again (for example, in a NAS algorithm, a model may be updated periodically based on newly trained architectures). Now we give an overview of the main families of predictors. See Figure 1 (left) for a taxonomy of performance predictors.
|
| 43 |
+
|
| 44 |
+
Model-based (trainable) methods. The most common type of predictor, the model-based predictor, is based on supervised learning. The initialization routine consists of fully training many architectures (i.e., evaluating $f ( a )$ for many architectures $a \in { \mathcal { A } }$ ) to build a training set of datapoints $\{ a , f ( a ) \}$ . Then a model $f ^ { \prime }$ is trained to predict $f ( a )$ given $a$ . While the initialization time for model-based predictors is very high, the query time typically takes less than a second, which allows thousands of predictions to be made throughout a NAS algorithm. The model is also updated regularly based on the new datapoints. These predictors are typically used within BO frameworks [36, 54], evolutionary frameworks [66], or by themselves [67], to perform NAS. Popular choices for the model include tree-based methods (where the features are the adjacency matrix representation of the architectures) [33, 55], graph neural networks [36, 54], Gaussian processes [47, 51], and neural networks based on specialized encodings of the architecture [69, 42].
|
| 45 |
+
|
| 46 |
+
Learning curve-based methods. Another family predicts the final performance of architectures using only a partially trained network, by extrapolating the learning curve. This is accomplished by fitting the partial learning curve to an ensemble of parametric models [11], or by simply summing the training losses observed so far [50]. Early stopping as described earlier is also a learning curve-based method. Learning curve methods do not require any initialization time, yet the query time typically takes minutes or hours, which is orders of magnitude slower than the query time in model-based methods. Learning curve-based methods can be used in conjunction with multi-fidelty algorithms, such as Hyperband or BOHB [27, 16, 24].
|
| 47 |
+
|
| 48 |
+
Hybrid methods. Some predictors are hybrids between learning curve and model-based methods. These predictors train a model at initialization time to predict $f ( a )$ given both $a$ and a partial learning curve of $a$ as features. Models in prior work include an SVR [2], or a Bayesian neural network [20]. Although the query time and initialization time are both high, hybrid predictors tend to have strong performance.
|
| 49 |
+
|
| 50 |
+
Zero-cost methods. Another class of predictors have no initialization time and very short query times (so-called “zero-cost” methods). These predictors compute statistics from just a single forward/backward propagation pass for a single minibatch of data, by computing the correlation of activations within a network [38], or by adapting saliency metrics proposed in pruning-at-initialization literatures [23, 1]. Similar to learning curve-based methods, since the only computation is specific to each architecture, the initialization time is zero. Zero-cost methods have recently been used to warm start NAS algorithms [1].
|
| 51 |
+
|
| 52 |
+
Weight sharing methods. Weight sharing [45] is a popular approach to substantially speed up NAS, especially in conjunction with a one-shot algorithm [32, 12]. In this approach, all architectures in the search space are combined to form a single over-parameterized supernetwork. By training the weights of the supernetwork, all architectures in the search space can be evaluated quickly using this set of weights. To this end, the supernetwork can be used as a performance predictor. This results in NAS algorithms [32, 28] which are significantly faster than sequential NAS algorithms, such as evolution or Bayesian optimization. Recent work has shown that although the shared weights are sometimes not effective at ranking architectures [53, 74, 76], one-shot NAS techniques using shared weights still achieve strong performance [73, 25].
|
| 53 |
+
|
| 54 |
+
Tradeoff between intialization and query time. The main families mentioned above all have different initialization and query times. The tradeoffs between initialization time, query time, and performance depend on a few factors such as the type of NAS algorithm and its total runtime budget, and different settings are needed in different situations. For example, if there are many architectures whose performance we want to estimate, then we should have a low query time, and if we have a high total runtime budget, then we can afford a high initialization time. We may also change our runtime budget throughout the run of a single NAS algorithm. For example, at the start of a NAS algorithm, we may want to have coarse estimates of a large number of architectures (low initialization time, low query time such as zero-cost predictors). As the NAS algorithm progresses, it is more desirable to receive higher-fidelity predictions on a smaller set of architectures (model-based or hybrid predictors). The exact budgets depend on the type of NAS algorithm.
|
| 55 |
+
|
| 56 |
+
Choice of performance predictors. We analyze 31 performance predictors defined in prior work: BANANAS [69], Bayesian Linear Regression [6], BOHAMIANN [57], BONAS [54], DNGO [56], Early Stopping with Val. Acc. (e.g. [77, 27, 16, 79]) Early Stopping with Val. Loss. [50], Fisher [1], Gaussian Process (GP) [48], GCN [75], Grad Norm [1], Grasp [64], Jacobian Covariance [38], LCE [11], LCE-m [20], LcSVR [2], LGBoost/GBDT [33], MLP [69], NAO [35], NGBoost [55], OneShot [73], Random Forest (RF) [55], Random Search with Weight Sharing (RSWS) [26], SemiNAS [34], SNIP [23], SoTL [50], SoTL-E [50], Sparse GP [3], SynFlow [61], Variational Sparse GP [63], and XGBoost [55]. For any method that did not have an architecture encoding already defined (such as the tree-based methods, GP-based methods, and Bayesian Linear Regression), we use the standard adjacency matrix encoding, which consists of the adjacency matrix of the architecture along with a one-hot list of the operations [71, 68]. By open-sourcing our code, we encourage implementing more (existing and future) performance predictors which can then be compared to the 31 which we focus on in this work. In Section B.1, we give descriptions and detailed implementation details for each performance predictor. In Section D, we give a table that describes for which predictors we were able to reproduce published results, and for which predictors it is not possible (e.g., since some predictors were released before the creation of NAS benchmarks).
|
| 57 |
+
|
| 58 |
+

|
| 59 |
+
Figure 2: The performance predictors with the highest Kendall Tau values for all initialization time and query time budgets on NAS-Bench-201, NAS-Bench-101, NAS-Bench-NLP and DARTS. For example, on NAS-Bench-201 CIFAR-10 (left) with an initialization time of $1 0 ^ { 6 }$ seconds and query time of 10 seconds, XGBoost achieves a Kendall Tau value of .73 which is the highest value out of the 31 predictors that we tested at that budget.
|
| 60 |
+
|
| 61 |
+
# 4 Experiments
|
| 62 |
+
|
| 63 |
+
We now discuss our experimental setup and results. We discuss reproducibility in Sections A and D, and our code (based on the NASLib library [52]) is available at https://github.com/automl/ naslib. We split up our experiments into two categories: evaluating the performance of each predictor with respect to various correlation metrics (Section 4.1), and evaluating the ability of each predictor to speed up predictor-based NAS algorithms (Section 4.2). We start by describing the four NAS benchmarks used in our experiments.
|
| 64 |
+
|
| 65 |
+
NAS benchmark datasets. NAS-Bench-101 [71] consists of over 423 000 unique neural architectures with precomputed training, validation, and test accuracies after training for 4, 12, 36, and 108 epochs on CIFAR-10 [71]. The cell-based search space consists of five nodes which can take on any directed acyclic graph (DAG) structure, and each node can be one of three operations. Since learning curve information is only available at four epochs, it is not possible to run most learning curve extrapolation methods on NAS-Bench-101. NAS-Bench-201 [13] consists of 15 625 architectures (out of which 6 466 are unique after removing isomorphisms [13]). Each architecture has full learning curve information for training, validation, and test losses/accuracies for 200 epochs on CIFAR-10 [22], CIFAR-100, and ImageNet-16-120 [10]. The search space consists of a cell which is a complete DAG with 4 nodes. Each edge can take one of five different operations. The DARTS search space [32] is significantly larger with roughly $1 0 ^ { 1 8 }$ architectures. The search space consists of two cells, each with seven nodes. The first two nodes are inputs from previous layers, and the intermediate four nodes can take on any DAG structure such that each node has two incident edges. The last node is the output node. Each edge can take one of eight operations. In our experiments, we make use of the training data from NAS-Bench-301 [55], which consists of 23 000 architectures drawn uniformly at random and trained on CIFAR-10 for 100 epochs. Finally, the NAS-Bench-NLP search space [21] is even larger, at $1 0 ^ { 5 3 }$ LSTM-like cells, each with at most 25 nodes in any DAG structure. Each cell can take one of seven operations. In our experiments, we use the NAS-Bench-NLP dataset, which consists of 14 000 architectures drawn uniformly at random and trained on Penn Tree Bank [40] for 50 epochs.
|
| 66 |
+
|
| 67 |
+
Hyperparameter tuning. Although we used the code directly from the original repositories (sometimes making changes when necessary to adapt to NAS-Bench search spaces), the predictors had significantly different levels of hyperparameter tuning. For example, some of the predictors had undergone heavy hyperparameter tuning on the DARTS search space (used in NAS-Bench-301), while other predictors (particularly those from 2017 or earlier) had never been run on cell-based search spaces. Furthermore, most predictor-based NAS algorithms can utilize cross-validation to tune the predictor periodically throughout the NAS algorithm. This is because the bottleneck for predictorbased NAS algorithms is typically the training of architectures, not fitting the predictor [56, 30, 16]. Therefore, it is fairer and also more informative to compare performance predictors which have had the same level of hyperparameter tuning through cross-validation. For each search space, we run random search on each performance predictor for 5000 iterations, with a maximum total runtime of 15 minutes. The final evaluation uses a separate test set. The hyperparameter value ranges for each predictor can be found in Section B.2.
|
| 68 |
+
|
| 69 |
+
# 4.1 Performance Predictor Evaluation
|
| 70 |
+
|
| 71 |
+
We evaluate each predictor based on three axes of comparison: initialization time, query time, and performance. We measured performance with respect to several different metrics: Pearson correlation and three different rank correlation metrics (Spearman, Kendall Tau, and sparse Kendall Tau [72, 55]). The experimental setup is as follows: the predictors are tested with 11 different initialization time budgets and 14 different query time budgets, leading to a total of 154 settings. On NAS-Bench-201 CIFAR-10, the 11 initialization time budgets are spaced logarithmically from 1 second to $1 . 8 \times 1 0 ^ { 7 }$ seconds on a $1 0 8 0 \mathrm { T i }$ GPU (which corresponds to training 1000 random architectures on average) which is consistent with experiments conducted in prior work [65, 69, 34]. For other search spaces, these times are adjusted based on the average time to train 1000 architectures. The 14 query time budgets are spaced logarithmically from 1 second to $1 . 8 \times 1 0 ^ { 4 }$ seconds (which corresponds to training an architecture for 199 epochs). These times are adjusted for other search spaces based on the training time and different number of epochs. Once the predictor is initialized, we draw a test set of 200 architectures uniformly at random from the search space. For each architecture in the test set, the predictor uses the specified query time budget to make a prediction. We then evaluate the quality of the predictions using the metrics described above. We average the results over 100 trials for each (initialization time, query time) pair.
|
| 72 |
+
|
| 73 |
+
Results and discussion. Figure 1 shows a full three-dimensional plot for NAS-Bench-201 on CIFAR-10 over initialization time, query time, and Kendall Tau rank correlation. Of the 31 predictors we tested, we found that just seven of them are Pareto-optimal with respect to Kendall Tau, initialization time, and query time. That is, only seven algorithms have the highest Kendall Tau value for at least one of the 154 query time/initialization time budgets on NAS-Bench-201 CIFAR-10. This can be seen more clearly in Figure 2 (left), which is a view from above Figure 1: each lattice point displays the predictor with the highest Kendall Tau value for the corresponding budget. In Figure 2 (right), we plot the Pareto-optimal predictors for five different dataset/search space combinations. In Section B.3, we give the full 3D plots and report the variance across trials for each method. In Figure 4 (left), we also plot the Pearson and Spearman correlation coefficients for NAS-Bench-201 CIFAR-10. The trends between these measures are largely the same, although we see that SemiNAS performs better on the rank-based metrics. For the rest of this section, we focus on the popular Kendall Tau metric, giving the full results for the other metrics in Section B.3.
|
| 74 |
+
|
| 75 |
+
We see similar trends across DARTS and the two NAS-Bench-201 datasets. NAS-Bench-NLP also has fairly similar trends, although early stopping performs comparatively stronger. NAS-Bench-101 is different from the other search spaces both in terms of the topology and the benchmark itself, which we discuss later in this section.
|
| 76 |
+
|
| 77 |
+
In the low initialization time, low query time region, Jacobian covariance or SynFlow perform well across NAS-Bench-101 and NAS-Bench-201. However, none of the six zero-cost methods perform well on the larger DARTS search space. Weight sharing (which also has low initialization and low query time, as seen in Figure 1), did not yield high Kendall Tau values for these search spaces, either, which is consistent with recent work [53, 74, 76]. However, rank correlation is not as crucial to one-shot NAS algorithms as it is for black box predictor-based methods, as demonstrated by prior one-shot NAS methods that do perform well [25, 73, 32, 28, 12]. In the low initialization time, high query time region, sum of training losses (SoTL-E) consistently performed the best, outperforming other learning-curve based methods.
|
| 78 |
+
|
| 79 |
+

|
| 80 |
+
Figure 3: Percentage of OMNI’s Kendall Tau value compared to the next-best predictors for each budget constraint.
|
| 81 |
+
|
| 82 |
+
The high initialization time, low query time region (especially the bottom row of the plots, corresponding to a query time of 1 second) is by far the most competitive region in the recent NAS literature. Sixteen of the 31 predictors had query times under one second, because many NAS algorithms are designed to initialize (and continually update) performance predictors that are used to quickly query thousands of candidate architectures. GCN and SemiNAS, the specialized GCN/semi-supervised methods, perform especially well in the first half of this critical region, when the initialization time is relatively low. However, boosted tree methods actually performed best in the second half of the critical region where the initialization time is high, which is consistent with prior work [33, 55]. Recall that for model-based methods, the initialization time corresponds to training architectures to be used as training data for the performance predictor. Therefore, our results suggest that techniques which can extract better latent features of the architectures can make up for a small training dataset, but methods based purely on performance data work better when there is enough such data.
|
| 83 |
+
|
| 84 |
+
Perhaps the most interesting finding is that on NAS-Bench-101/201, SynFlow and Jacobian covariance, which take three seconds each to compute, both outperform all model-based methods even after $3 0$ hours of initialization. Put another way, NAS algorithms that make use of model-based predictors may be able to see substantial improvements by using Jacobian covariance instead of a model-based predictor in the early iterations.
|
| 85 |
+
|
| 86 |
+
The Omnipotent Predictor. One conclusion from Figure 2 is that different types of predictors are specialized for specific initialization time and query time constraints. A natural follow-up question is whether different families are complementary and can be combined to achieve stronger performance. In this section, we run a proof-of-concept to answer this question. We combine the best-performing predictors from three different families in a simple way: the best learning curve method (SoTL-E), and the best zero-cost method (Jacobian covariance), are used as additional input features for a model-based predictor (we separately test SemiNAS and NGBoost). We call this method OMNI, the omnipotent predictor. We give results in Figure 3 and pseudo-code as well as additional experiments in Section B.4. In contrast to all other predictors, the performance of OMNI is strong across almost all budget constraints and search spaces. In some settings, OMNI achieves a Kendall Tau value $30 \%$ higher than the next-best predictors.
|
| 87 |
+
|
| 88 |
+
The success of OMNI verifies that the information learned by different families of predictors are complementary: the information learned by extrapolating a learning curve, by computing a zero-cost proxy, and by encoding the architecture, all improve performance. We further confirm this by running an ablation study for OMNI in Section B.4. We can hypothesize that each predictor type measures distinct quantities: SOTL-E measures the training speed, zero-cost predictors measure the covariance between activations on different datapoints, and model-based predictors simply learn patterns between the architecture encodings and the validation accuracies. Finally, while we showed a proof-of-concept, there are several promising areas for future work such as creating ensembles of the model-based approaches, combining zero-cost methods with model-based methods in more sophisticated ways, and giving a full quantification of the correlation among different families of predictors.
|
| 89 |
+
|
| 90 |
+

|
| 91 |
+
Figure 4: The best predictors on NAS-Bench-201 CIFAR-10 with respect to Pearson (left) and Spearman (middle). Kendall Tau values from a mutation-based training and test set (right).
|
| 92 |
+
|
| 93 |
+
NAS-Bench-101: a more complex search space. In Figure 2, the plot for NAS-Bench-101 looks significantly different than the plots for the other search spaces, for two reasons. The first reason is a technical one: the NAS-Bench-101 API only gives the validation accuracy at four epochs, and does not give the training loss for any epochs. Therefore, we could not implement SoTL or any learning curve extrapolation method. However, all sixteen of the model-based predictors were implemented on NAS-Bench-101. In this case, BANANAS significantly outperformed the next-best predictors (GCN and SemiNAS) across every initialization time. One explanation is due to the complexity of the NAS-Bench-101 search space: while all NAS-Bench-201 architectures have the same graph topology and DARTS architectures’ nodes have exactly two incoming edges, the NAS-Bench-101 search space is much more diverse with architectures ranging from a single node and no edges, to five nodes with nine connecting edges. In fact, the architecture encoding used in BANANAS, the path encoding, was designed specifically to deal with the complexity of the NAS-Bench-101 search space (replacing the standard adjacency matrix encoding). To test this explanation, in Appendix B we run several of the simpler tree-based and GP-based predictors using the path encoding, and we see that these methods now surpass BANANAS in performance.
|
| 94 |
+
|
| 95 |
+
A mutation-based test set. The results from Figure 2 used a test set drawn uniformly at random from the search space (and the training set used by model-based predictors was also drawn uniformly at random). However, neighborhood-based NAS algorithms such as local search, regularized evolution, and some versions of Bayesian optimization consider architectures which are local perturbations of the architectures encountered so far. Therefore, the predictors used in these NAS algorithms must be able to distinguish architectures which are local mutations of a small set of seed architectures.
|
| 96 |
+
|
| 97 |
+
We run an experiment in which the test set is created by mutating architectures from an initial set of seed architectures. Specifically, we draw a set of 50 random architectures and choose the five with the highest validation accuracy as seed architectures. Then we create a set of 200 test architectures by randomly mutating up to three attributes of the seed architectures. Therefore, all architectures in the test set are at most an edit distance of three from a seed architecture, where two architectures are a single edit distance away if they differ by one operation or edge.
|
| 98 |
+
|
| 99 |
+
We create the training set by randomly choosing architectures from the test set and mutating one random attribute. As in all of our experiments, we ensure that the training set and test set are disjoint. In Figure 4 (right), we plot the correlation results for NAS-Bench-201 CIFAR-10. While the zero-cost and learning curve-based approaches have similar performance, the model-based approaches have significantly worse performance compared to the uniform random setting. This is because the average edit distance between architectures in the test set is low, making it significantly harder for model-based predictors to distinguish the performance of these architectures, even when using a training set that is based on mutations of the test set. In fact, interestingly, the performance of many model-based approaches starts to perform worse after $1 0 ^ { 6 }$ seconds. SemiNAS in particular performs much worse in this setting, and boosted trees have comparatively stronger performance in this setting.
|
| 100 |
+
|
| 101 |
+

|
| 102 |
+
Figure 5: Validation error vs. runtime for the predictor-guided evolution framework and the Bayesian optimization $^ +$ predictor framework using different predictors.
|
| 103 |
+
|
| 104 |
+
# 4.2 Predictor-Based NAS Experiments
|
| 105 |
+
|
| 106 |
+
Now we evaluate the ability of each model-based performance predictor to speed up NAS. We use two popular predictor-based NAS methods: the predictor-guided evolution framework [66, 59], and the Bayesian optimization $^ +$ predictor framework [17, 36, 54]. The predictor-guided evolution framework is an iterative procedure in which the best architectures in the current population are mutated to create a set of candidate architectures. A predictor (trained on the entire population) chooses $k$ architectures which are then evaluated. In our experiments, the candidate pool is created by mutating the top five architectures 40 times each, and we set $k = 2 0$ . For each predictor, we run predictor-guided evolution for 25 iterations and average the results over 100 trials. The $\mathrm { B O + }$ predictor framework is similar to the evolution framework, but an ensemble of three performance predictors are used so that uncertainty estimates for each prediction can be computed. In each iteration, the candidate architectures whose predictions maximize an acquisition function are then evaluated. Similar to prior work, we use independent Thompson sampling [69], as the acquisition function, and an ensemble is created by using a different ordering of the training set and different random weight initializations (if applicable) of the same predictor. In each iteration, the top 20 architectures are chosen from a randomly sampled pool of 200 architectures.
|
| 107 |
+
|
| 108 |
+
In Figure 5, we present results for both NAS frameworks on NAS-Bench-201 CIFAR-10 and ImageNet16-120 for the 16 model-based predictors. We also test OMNI, using its lowest query time setting (consisting of NGBoost $^ +$ Jacobian covariance), and another version of OMNI that replaces NGBoost with SemiNAS. Our results show that the model-based predictors with the top Kendall Tau rank correlations in the low query time region from Figure 2 also roughly achieve the best performance when applied for NAS: SemiNAS and NAO perform the best for shorter runtime, and boosted trees perform best for longer runtime. OMNI(NGBoost) consistently outperforms NGBoost, and OMNI(SemiNAS) often achieves top performance. This suggests that using zero-cost methods in conjunction with model-based methods is a promising direction for future study.
|
| 109 |
+
|
| 110 |
+
# 4.3 So, how powerful are performance predictors?
|
| 111 |
+
|
| 112 |
+
Throughout Section 4, we tested performance predictors in a variety of settings, by varying the search spaces, datasets, runtime budgets, and training/test distributions. We saw largely the same trends among all of our experiments. Interesting findings included the success of zero-cost predictors even when compared to model-based predictors and learning curve extrapolation predictors with longer runtime budgets, and the fact that information from different families of predictors are complementary. When choosing a performance predictor for new applications, we recommend deciding on a target initialization time and query time budget, consulting Figures 2 and 6, and then combining the best predictors from the desired runtime setting, similar to OMNI. For example, if a performance predictor with medium initialization time and low runtime is desired for a search space similar to NAS-Bench201 or DARTS, we recommend using NGBoost with Jacobian covariance and SynFlow as additional features.
|
| 113 |
+
|
| 114 |
+
# 5 Societal Impact
|
| 115 |
+
|
| 116 |
+
Our hope is that our work will have a positive impact on the AutoML community by making it quicker and easier to develop and fairly compare performance predictors. For example, AutoML practitioners can consult our experiments to more easily decide on the performance prediction methods best suited to their application, rather than conducting computationally intensive experiments of their own [43]. Furthermore, AutoML researchers can use our library to develop new performance prediction techniques and compare new methods to 31 other algorithms across four search spaces. Since the topic of this work is AutoML, it is a level of abstraction away from real applications. This work may be used to improve deep learning applications, both beneficial (e.g. reducing $\mathrm { C O _ { 2 } }$ emissions), or harmful (e.g. creating language models with heavy bias) to society.
|
| 117 |
+
|
| 118 |
+
# 6 Conclusions and Limitations
|
| 119 |
+
|
| 120 |
+
In this work, we gave the first large-scale study of performance predictors for neural architecture search. We compared 31 different performance predictors, including learning curve extrapolation methods, weight sharing methods, zero-cost methods, and model-based methods. We tested the performance of the predictors in a variety of settings and with respect to different metrics. Although we ran experiments on four different search spaces, it will be interesting to extend our experiments to even more machine learning tasks beyond image classification and language modeling.
|
| 121 |
+
|
| 122 |
+
Our new predictor, OMNI, is the first predictor to combine complementary information from three families of performance preditors, leading to substantially improved performance. While the simplicity of OMNI is appealing, it also opens up new directions for future work by combining different predictors in more sophisticated ways. To facilitate follow-up work, we release our code featuring a library of performance predictors. Our goal is for our repository to grow over time as it is used by the community, so that experiments in our library can be even more comprehensive.
|
| 123 |
+
|
| 124 |
+
# Acknowledgments and Disclosure of Funding
|
| 125 |
+
|
| 126 |
+
This work was done while CW and YL were employed at Abacus.AI. AZ and FH acknowledge support by the European Research Council (ERC) under the European Union Horizon 2020 research and innovation programme through grant no. 716721, and by BMBF grant DeToL. BR was supported by the Clarendon Fund of University of Oxford.
|
| 127 |
+
|
| 128 |
+
References
|
| 129 |
+
[1] Mohamed S Abdelfattah, Abhinav Mehrotra, Łukasz Dudziak, and Nicholas Donald Lane. Zero-cost proxies for lightweight nas. In Proceedings of the International Conference on Learning Representations (ICLR), 2021.
|
| 130 |
+
[2] Bowen Baker, Otkrist Gupta, Ramesh Raskar, and Nikhil Naik. Accelerating neural architecture search using performance prediction. arXiv preprint arXiv:1705.10823, 2017.
|
| 131 |
+
[3] Matthias Bauer, Mark van der Wilk, and Carl Edward Rasmussen. Understanding probabilistic sparse gaussian process approximations. arXiv preprint arXiv:1606.04820, 2016.
|
| 132 |
+
[4] Gabriel Bender, Pieter-Jan Kindermans, Barret Zoph, Vijay Vasudevan, and Quoc Le. Understanding and simplifying one-shot architecture search. In Proceedings of the International Conference on Machine Learning (ICML), pages 550–559, 2018.
|
| 133 |
+
[5] Eli Bingham, Jonathan P Chen, Martin Jankowiak, Fritz Obermeyer, Neeraj Pradhan, Theofanis Karaletsos, Rohit Singh, Paul Szerlip, Paul Horsfall, and Noah D Goodman. Pyro: Deep universal probabilistic programming. The Journal of Machine Learning Research, 20(1):973– 978, 2019.
|
| 134 |
+
[6] Christopher M Bishop. Pattern recognition and machine learning. springer, 2006.
|
| 135 |
+
[7] Han Cai, Ligeng Zhu, and Song Han. Proxylessnas: Direct neural architecture search on target task and hardware. Proceedings of the International Conference on Learning Representations (ICLR), 2019.
|
| 136 |
+
[8] Akshay Chandrashekaran and Ian R Lane. Speeding up hyper-parameter optimization by extrapolation of learning curves using previous builds. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pages 477–492. Springer, 2017.
|
| 137 |
+
[9] Tianqi Chen and Carlos Guestrin. Xgboost: A scalable tree boosting system. In Proceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining, pages 785–794, 2016.
|
| 138 |
+
[10] Patryk Chrabaszcz, Ilya Loshchilov, and Frank Hutter. A downsampled variant of imagenet as an alternative to the CIFAR datasets. CoRR, abs/1707.08819, 2017.
|
| 139 |
+
[11] Tobias Domhan, Jost Tobias Springenberg, and Frank Hutter. Speeding up automatic hyperparameter optimization of deep neural networks by extrapolation of learning curves. In Twenty-Fourth International Joint Conference on Artificial Intelligence, 2015.
|
| 140 |
+
[12] Xuanyi Dong and Yi Yang. Searching for a robust neural architecture in four gpu hours. In Proceedings of the IEEE Conference on computer vision and pattern recognition, pages 1761–1770, 2019.
|
| 141 |
+
[13] Xuanyi Dong and Yi Yang. Nas-bench-201: Extending the scope of reproducible neural architecture search. In Proceedings of the International Conference on Learning Representations (ICLR), 2020.
|
| 142 |
+
[14] Tony Duan, Avati Anand, Daisy Yi Ding, Khanh K Thai, Sanjay Basu, Andrew Ng, and Alejandro Schuler. Ngboost: Natural gradient boosting for probabilistic prediction. In International Conference on Machine Learning, pages 2690–2700. PMLR, 2020.
|
| 143 |
+
[15] Thomas Elsken, Jan Hendrik Metzen, and Frank Hutter. Neural architecture search: A survey. arXiv preprint arXiv:1808.05377, 2018.
|
| 144 |
+
[16] Stefan Falkner, Aaron Klein, and Frank Hutter. Bohb: Robust and efficient hyperparameter optimization at scale. In Proceedings of the International Conference on Machine Learning (ICML), 2018.
|
| 145 |
+
[17] Kirthevasan Kandasamy, Willie Neiswanger, Jeff Schneider, Barnabas Poczos, and Eric P Xing. Neural architecture search with Bayesian optimisation and optimal transport. In Advances in Neural Information Processing Systems, pages 2016–2025, 2018.
|
| 146 |
+
[18] Guolin Ke, Qi Meng, Thomas Finley, Taifeng Wang, Wei Chen, Weidong Ma, Qiwei Ye, and Tie-Yan Liu. Lightgbm: A highly efficient gradient boosting decision tree. Advances in neural information processing systems, 30:3146–3154, 2017.
|
| 147 |
+
[19] Hiroaki Kitano. Designing neural networks using genetic algorithms with graph generation system. Complex systems, 4(4):461–476, 1990.
|
| 148 |
+
[20] Aaron Klein, Stefan Falkner, Jost Tobias Springenberg, and Frank Hutter. Learning curve prediction with Bayesian neural networks. ICLR 2017, 2017.
|
| 149 |
+
[21] Nikita Klyuchnikov, Ilya Trofimov, Ekaterina Artemova, Mikhail Salnikov, Maxim Fedorov, and Evgeny Burnaev. Nas-bench-nlp: neural architecture search benchmark for natural language processing. arXiv preprint arXiv:2006.07116, 2020.
|
| 150 |
+
[22] Alex Krizhevsky. Learning multiple layers of features from tiny images. Technical report, University of Toronto, 2009.
|
| 151 |
+
[23] Namhoon Lee, Thalaiyasingam Ajanthan, and Philip Torr. SNIP: Single-shot network pruning based on connection sensitivity. In Proceedings of the International Conference on Learning Representations (ICLR), 2019.
|
| 152 |
+
[24] Liam Li, Kevin Jamieson, Afshin Rostamizadeh, Ekaterina Gonina, Moritz Hardt, Benjamin Recht, and Ameet Talwalkar. A system for massively parallel hyperparameter tuning. In Proceedings of the Conference on Machine Learning Systems, 2020.
|
| 153 |
+
[25] Liam Li, Mikhail Khodak, Maria-Florina Balcan, and Ameet Talwalkar. Geometry-aware gradient algorithms for neural architecture search. In Proceedings of the International Conference on Learning Representations (ICLR), 2021.
|
| 154 |
+
[26] Liam Li and Ameet Talwalkar. Random search and reproducibility for neural architecture search. arXiv preprint arXiv:1902.07638, 2019.
|
| 155 |
+
[27] Lisha Li, Kevin Jamieson, Giulia DeSalvo, Afshin Rostamizadeh, and Ameet Talwalkar. Hyperband: A novel bandit-based approach to hyperparameter optimization. arXiv preprint arXiv:1603.06560, 2016.
|
| 156 |
+
[28] Hanwen Liang, Shifeng Zhang, Jiacheng Sun, Xingqiu He, Weiran Huang, Kechen Zhuang, and Zhenguo Li. Darts+: Improved differentiable architecture search with early stopping. arXiv preprint arXiv:1909.06035, 2019.
|
| 157 |
+
[29] Andy Liaw, Matthew Wiener, et al. Classification and regression by randomforest. R news, 2(3):18–22, 2002.
|
| 158 |
+
[30] Marius Lindauer, Katharina Eggensperger, Matthias Feurer, Stefan Falkner, André Biedenkapp, and Frank Hutter. Smac v3: Algorithm configuration in python. URL https://github. com/automl/SMAC3, 2017.
|
| 159 |
+
[31] Marius Lindauer and Frank Hutter. Best practices for scientific research on neural architecture search. arXiv preprint arXiv:1909.02453, 2019.
|
| 160 |
+
[32] Hanxiao Liu, Karen Simonyan, and Yiming Yang. Darts: Differentiable architecture search. arXiv preprint arXiv:1806.09055, 2018.
|
| 161 |
+
[33] Renqian Luo, Xu Tan, Rui Wang, Tao Qin, Enhong Chen, and Tie-Yan Liu. Neural architecture search with gbdt. arXiv preprint arXiv:2007.04785, 2020.
|
| 162 |
+
[34] Renqian Luo, Xu Tan, Rui Wang, Tao Qin, Enhong Chen, and Tie-Yan Liu. Semi-supervised neural architecture search. In Proceedings of the Annual Conference on Neural Information Processing Systems (NeurIPS), 2020.
|
| 163 |
+
[35] Renqian Luo, Fei Tian, Tao Qin, Enhong Chen, and Tie-Yan Liu. Neural architecture optimization. In Proceedings of the Annual Conference on Neural Information Processing Systems (NeurIPS), 2018.
|
| 164 |
+
[36] Lizheng Ma, Jiaxu Cui, and Bo Yang. Deep neural architecture search with deep graph Bayesian optimization. In 2019 IEEE/WIC/ACM International Conference on Web Intelligence (WI), pages 500–507. IEEE, 2019.
|
| 165 |
+
[37] Krzysztof Maziarz, Andrey Khorlin, Quentin de Laroussilhe, and Andrea Gesmundo. Evolutionary-neural hybrid agents for architecture search. arXiv preprint arXiv:1811.09828, 2018.
|
| 166 |
+
[38] Joseph Mellor, Jack Turner, Amos Storkey, and Elliot J Crowley. Neural architecture search without training. arXiv preprint arXiv:2006.04647, 2020.
|
| 167 |
+
[39] Szymon Jakub Mikler. Snip: Single-shot network pruning based on connection sensitivity. GitHub repository gahaalt/SNIP-pruning, 2019.
|
| 168 |
+
[40] Tomáš Mikolov, Martin Karafiát, Lukáš Burget, Jan Cernock ˇ y, and Sanjeev Khudanpur. Recur- \` rent neural network based language model. In Annual conference of the international speech communication association, 2010.
|
| 169 |
+
[41] Xuefei Ning, Wenshuo Li, Zixuan Zhou, Tianchen Zhao, Yin Zheng, Shuang Liang, Huazhong Yang, and Yu Wang. A surgery of the neural architecture evaluators. arXiv preprint arXiv:2008.03064, 2020.
|
| 170 |
+
[42] Xuefei Ning, Yin Zheng, Tianchen Zhao, Yu Wang, and Huazhong Yang. A generic graph-based neural architecture encoding scheme for predictor-based nas. arXiv preprint arXiv:2004.01899, 2020.
|
| 171 |
+
[43] David Patterson, Joseph Gonzalez, Quoc Le, Chen Liang, Lluis-Miquel Munguia, Daniel Rothchild, David So, Maud Texier, and Jeff Dean. Carbon emissions and large neural network training. arXiv preprint arXiv:2104.10350, 2021.
|
| 172 |
+
[44] Fabian Pedregosa, Gaël Varoquaux, Alexandre Gramfort, Vincent Michel, Bertrand Thirion, Olivier Grisel, Mathieu Blondel, Peter Prettenhofer, Ron Weiss, Vincent Dubourg, et al. Scikitlearn: Machine learning in python. the Journal of machine Learning research, 12:2825–2830, 2011.
|
| 173 |
+
[45] Hieu Pham, Melody Y Guan, Barret Zoph, Quoc V Le, and Jeff Dean. Efficient neural architecture search via parameter sharing. arXiv preprint arXiv:1802.03268, 2018.
|
| 174 |
+
[46] Joaquin Quiñonero Candela and Carl Edward Rasmussen. A unifying view of sparse approximate gaussian process regression. J. Mach. Learn. Res., 6:1939–1959, December 2005.
|
| 175 |
+
[47] Carl Edward Rasmussen. Gaussian processes in machine learning. In Summer School on Machine Learning, pages 63–71. Springer, 2003.
|
| 176 |
+
[48] Carl Edward Rasmussen. Gaussian processes in machine learning. In Summer School on Machine Learning, pages 63–71. Springer, 2003.
|
| 177 |
+
[49] Esteban Real, Alok Aggarwal, Yanping Huang, and Quoc V Le. Regularized evolution for image classifier architecture search. In Proceedings of the aaai conference on artificial intelligence, volume 33, pages 4780–4789, 2019.
|
| 178 |
+
[50] Binxin Ru, Clare Lyle, Lisa Schut, Mark van der Wilk, and Yarin Gal. Revisiting the train loss: an efficient performance estimator for neural architecture search. arXiv preprint arXiv:2006.04492, 2020.
|
| 179 |
+
[51] Binxin Ru, Xingchen Wan, Xiaowen Dong, and Michael Osborne. Neural architecture search using Bayesian optimisation with weisfeiler-lehman kernel. arXiv preprint arXiv:2006.07556, 2020.
|
| 180 |
+
[52] Michael Ruchte, Arber Zela, Julien Siems, Josif Grabocka, and Frank Hutter. Naslib: a modular and flexible neural architecture search library, 2020.
|
| 181 |
+
[53] Christian Sciuto, Kaicheng Yu, Martin Jaggi, Claudiu Musat, and Mathieu Salzmann. Evaluating the search phase of neural architecture search. arXiv preprint arXiv:1902.08142, 2019.
|
| 182 |
+
[54] Han Shi, Renjie Pi, Hang Xu, Zhenguo Li, James Kwok, and Tong Zhang. Bridging the gap between sample-based and one-shot neural architecture search with bonas. Advances in Neural Information Processing Systems, 33, 2020.
|
| 183 |
+
[55] Julien Siems, Lucas Zimmer, Arber Zela, Jovita Lukasik, Margret Keuper, and Frank Hutter. Nas-bench-301 and the case for surrogate benchmarks for neural architecture search. arXiv preprint arXiv:2008.09777, 2020.
|
| 184 |
+
[56] Jasper Snoek, Oren Rippel, Kevin Swersky, Ryan Kiros, Nadathur Satish, Narayanan Sundaram, Mostofa Patwary, Mr Prabhat, and Ryan Adams. Scalable Bayesian optimization using deep neural networks. In International conference on machine learning, pages 2171–2180, 2015.
|
| 185 |
+
[57] Jost Tobias Springenberg, Aaron Klein, Stefan Falkner, and Frank Hutter. Bayesian optimization with robust Bayesian neural networks. In Advances in Neural Information Processing Systems, pages 4134–4142, 2016.
|
| 186 |
+
[58] Kenneth O Stanley and Risto Miikkulainen. Evolving neural networks through augmenting topologies. Evolutionary computation, 10(2):99–127, 2002.
|
| 187 |
+
[59] Yanan Sun, Xian Sun, Yuhan Fang, and Gary Yen. A new training protocol for performance predictors of evolutionary neural architecture search algorithms. arXiv preprint arXiv:2008.13187, 2020.
|
| 188 |
+
[60] Kevin Swersky, David Duvenaud, Jasper Snoek, Frank Hutter, and Michael Osborne. Raiders of the lost architecture: Kernels for Bayesian optimization in conditional parameter spaces. In NIPS workshop on Bayesian Optimization in Theory and Practice, December 2013.
|
| 189 |
+
[61] Hidenori Tanaka, Daniel Kunin, Daniel LK Yamins, and Surya Ganguli. Pruning neural networks without any data by iteratively conserving synaptic flow. arXiv preprint arXiv:2006.05467, 2020.
|
| 190 |
+
[62] Lucas Theis, Iryna Korshunova, Alykhan Tejani, and Ferenc Huszár. Faster gaze prediction with dense networks and fisher pruning. arXiv preprint arXiv:1801.05787, 2018.
|
| 191 |
+
[63] Michalis Titsias. Variational learning of inducing variables in sparse gaussian processes. In Artificial Intelligence and Statistics, pages 567–574, 2009.
|
| 192 |
+
[64] Chaoqi Wang, Guodong Zhang, and Roger Grosse. Picking winning tickets before training by preserving gradient flow. In Proceedings of the International Conference on Learning Representations (ICLR), 2019.
|
| 193 |
+
[65] Linnan Wang, Yiyang Zhao, Yuu Jinnai, and Rodrigo Fonseca. Alphax: exploring neural architectures with deep neural networks and monte carlo tree search. arXiv preprint arXiv:1805.07440, 2018.
|
| 194 |
+
[66] Chen Wei, Chuang Niu, Yiping Tang, and Jimin Liang. Npenas: Neural predictor guided evolution for neural architecture search. arXiv preprint arXiv:2003.12857, 2020.
|
| 195 |
+
[67] Wei Wen, Hanxiao Liu, Hai Li, Yiran Chen, Gabriel Bender, and Pieter-Jan Kindermans. Neural predictor for neural architecture search. arXiv preprint arXiv:1912.00848, 2019.
|
| 196 |
+
[68] Colin White, Willie Neiswanger, Sam Nolen, and Yash Savani. A study on encodings for neural architecture search. In Proceedings of the Annual Conference on Neural Information Processing Systems (NeurIPS), 2020.
|
| 197 |
+
[69] Colin White, Willie Neiswanger, and Yash Savani. Bananas: Bayesian optimization with neural architectures for neural architecture search. In Proceedings of the AAAI Conference on Artificial Intelligence, 2021.
|
| 198 |
+
[70] Antoine Yang, Pedro M Esperança, and Fabio M Carlucci. Nas evaluation is frustratingly hard. In Proceedings of the International Conference on Learning Representations (ICLR), 2020.
|
| 199 |
+
[71] Chris Ying, Aaron Klein, Esteban Real, Eric Christiansen, Kevin Murphy, and Frank Hutter. Nasbench-101: Towards reproducible neural architecture search. arXiv preprint arXiv:1902.09635, 2019.
|
| 200 |
+
[72] Kaicheng Yu, Rene Ranftl, and Mathieu Salzmann. How to train your super-net: An analysis of training heuristics in weight-sharing nas. arXiv preprint arXiv:2003.04276, 2020.
|
| 201 |
+
[73] Arber Zela, Thomas Elsken, Tonmoy Saikia, Yassine Marrakchi, Thomas Brox, and Frank Hutter. Understanding and robustifying differentiable architecture search. In Proceedings of the International Conference on Learning Representations (ICLR), 2020.
|
| 202 |
+
[74] Arber Zela, Julien Siems, and Frank Hutter. Nas-bench-1shot1: Benchmarking and dissecting one-shot neural architecture search. In Proceedings of the International Conference on Learning Representations (ICLR), 2020.
|
| 203 |
+
[75] Yuge Zhang. Neural predictor for neural architecture search. GitHub repository ultmaster/neuralpredictor.pytorch, 2020.
|
| 204 |
+
[76] Yuge Zhang, Zejun Lin, Junyang Jiang, Quanlu Zhang, Yujing Wang, Hui Xue, Chen Zhang, and Yaming Yang. Deeper insights into weight sharing in neural architecture search. arXiv preprint arXiv:2001.01431, 2020.
|
| 205 |
+
[77] Dongzhan Zhou, Xinchi Zhou, Wenwei Zhang, Chen Change Loy, Shuai Yi, Xuesen Zhang, and Wanli Ouyang. Econas: Finding proxies for economical neural architecture search. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 11396–11404, 2020.
|
| 206 |
+
[78] Barret Zoph and Quoc V. Le. Neural architecture search with reinforcement learning. In Proceedings of the International Conference on Learning Representations (ICLR), 2017.
|
| 207 |
+
[79] Barret Zoph, Vijay Vasudevan, Jonathon Shlens, and Quoc V Le. Learning transferable architectures for scalable image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 8697–8710, 2018.
|
| 208 |
+
|
| 209 |
+
# Checklist
|
| 210 |
+
|
| 211 |
+
1. For all authors...
|
| 212 |
+
|
| 213 |
+
(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] Our abstract and introduction accurately reflect our paper.
|
| 214 |
+
(b) Did you describe the limitations of your work? [Yes] See Section 6.
|
| 215 |
+
(c) Did you discuss any potential negative societal impacts of your work? [Yes] See Section 5.
|
| 216 |
+
(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] We discuss the ethics guidelines in Section 5.
|
| 217 |
+
|
| 218 |
+
2. If you are including theoretical results...
|
| 219 |
+
|
| 220 |
+
(a) Did you state the full set of assumptions of all theoretical results? [N/A] We did not include theoretical results.
|
| 221 |
+
(b) Did you include complete proofs of all theoretical results? [N/A] We did not include theoretical results.
|
| 222 |
+
|
| 223 |
+
3. If you ran experiments...
|
| 224 |
+
|
| 225 |
+
(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] We included all code, data, and instructions in the supplementary material.
|
| 226 |
+
(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] All training details are specified in the supplementary material.
|
| 227 |
+
(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [Yes] We ran 100 trials for all experiments. Our plots that are performance vs. runtime (e.g. Figure 5) have error bars. For our Pareto-optimality plots (e.g. Figure 7), see the supplementary material for the error bars for all 31 predictors.
|
| 228 |
+
(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] We report the compute time and resources used in Section 4 and in the supplementary material.
|
| 229 |
+
|
| 230 |
+
4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
|
| 231 |
+
|
| 232 |
+
(a) If your work uses existing assets, did you cite the creators? [Yes] We cite the creators of all code, data, and models used.
|
| 233 |
+
(b) Did you mention the license of the assets? [Yes] We mention the licenses in the supplementary material.
|
| 234 |
+
(c) Did you include any new assets either in the supplemental material or as a URL? [N/A] We do not include new assets.
|
| 235 |
+
(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes] We did not use or release any datasets with personal data.
|
| 236 |
+
(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] The data we are using does not contain personal information or offensive content.
|
| 237 |
+
|
| 238 |
+
5. If you used crowdsourcing or conducted research with human subjects...
|
| 239 |
+
|
| 240 |
+
(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] We did not run experiments with human subjects.
|
| 241 |
+
(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] We did not run experiments with human subjects.
|
| 242 |
+
(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] We did not run experiments with human subjects.
|
md/train/6Tm1mposlrM/6Tm1mposlrM.md
ADDED
|
@@ -0,0 +1,488 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# SHARPNESS-AWARE MINIMIZATION FOR EFFICIENTLY IMPROVING GENERALIZATION
|
| 2 |
+
|
| 3 |
+
Pierre Foret ∗
|
| 4 |
+
Google Research
|
| 5 |
+
pierreforet@google.com
|
| 6 |
+
Ariel Kleiner
|
| 7 |
+
Google Research
|
| 8 |
+
akleiner@google.com
|
| 9 |
+
|
| 10 |
+
Hossein Mobahi Google Research hmobahi@google.com
|
| 11 |
+
|
| 12 |
+
Behnam Neyshabur Blueshift, Alphabet neyshabur@google.com
|
| 13 |
+
|
| 14 |
+
# ABSTRACT
|
| 15 |
+
|
| 16 |
+
In today’s heavily overparameterized models, the value of the training loss provides few guarantees on model generalization ability. Indeed, optimizing only the training loss value, as is commonly done, can easily lead to suboptimal model quality. Motivated by prior work connecting the geometry of the loss landscape and generalization, we introduce a novel, effective procedure for instead simultaneously minimizing loss value and loss sharpness. In particular, our procedure, Sharpness-Aware Minimization (SAM), seeks parameters that lie in neighborhoods having uniformly low loss; this formulation results in a minmax optimization problem on which gradient descent can be performed efficiently. We present empirical results showing that SAM improves model generalization across a variety of benchmark datasets (e.g., CIFAR- $\{ 1 0 , 1 0 0 \}$ , ImageNet, finetuning tasks) and models, yielding novel state-of-the-art performance for several. Additionally, we find that SAM natively provides robustness to label noise on par with that provided by state-of-the-art procedures that specifically target learning with noisy labels. We open source our code at https: //github.com/google-research/sam.
|
| 17 |
+
|
| 18 |
+
# 1 INTRODUCTION
|
| 19 |
+
|
| 20 |
+
Modern machine learning’s success in achieving ever better performance on a wide range of tasks has relied in significant part on ever heavier overparameterization, in conjunction with developing ever more effective training algorithms that are able to find parameters that generalize well. Indeed, many modern neural networks can easily memorize the training data and have the capacity to readily overfit (Zhang et al., 2016). Such heavy overparameterization is currently required to achieve stateof-the-art results in a variety of domains (Tan & Le, 2019; Kolesnikov et al., 2020; Huang et al., 2018). In turn, it is essential that such models be trained using procedures that ensure that the parameters actually selected do in fact generalize beyond the training set.
|
| 21 |
+
|
| 22 |
+
Unfortunately, simply minimizing commonly used loss functions (e.g., cross-entropy) on the training set is typically not sufficient to achieve satisfactory generalization. The training loss landscapes of today’s models are commonly complex and non-convex, with a multiplicity of local and global minima, and with different global minima yielding models with different generalization abilities (Shirish Keskar et al., 2016). As a result, the choice of optimizer (and associated optimizer settings) from among the many available (e.g., stochastic gradient descent (Nesterov, 1983), Adam (Kingma & Ba, 2014), RMSProp (Hinton et al.), and others (Duchi et al., 2011; Dozat, 2016; Martens & Grosse, 2015)) has become an important design choice, though understanding of its relationship to model generalization remains nascent (Shirish Keskar et al., 2016; Wilson et al., 2017; Shirish Keskar & Socher, 2017; Agarwal et al., 2020; Jacot et al., 2018). Relatedly, a panoply of methods for modifying the training process have been proposed, including dropout (Srivastava et al., 2014), batch normalization (Ioffe & Szegedy, 2015), stochastic depth (Huang et al., 2016), data augmentation (Cubuk et al., 2018), and mixed sample augmentations (Zhang et al., 2017; Harris et al., 2020).
|
| 23 |
+
|
| 24 |
+

|
| 25 |
+
Figure 1: (left) Error rate reduction obtained by switching to SAM. Each point is a different dataset / model / data augmentation. (middle) A sharp minimum to which a ResNet trained with SGD converged. (right) A wide minimum to which the same ResNet trained with SAM converged.
|
| 26 |
+
|
| 27 |
+
The connection between the geometry of the loss landscape—in particular, the flatness of minima— and generalization has been studied extensively from both theoretical and empirical perspectives (Shirish Keskar et al., 2016; Dziugaite & Roy, 2017; Jiang et al., 2019). While this connection has held the promise of enabling new approaches to model training that yield better generalization, practical efficient algorithms that specifically seek out flatter minima and furthermore effectively improve generalization on a range of state-of-the-art models have thus far been elusive (e.g., see (Chaudhari et al., 2016; Izmailov et al., 2018); we include a more detailed discussion of prior work in Section 5).
|
| 28 |
+
|
| 29 |
+
We present here a new efficient, scalable, and effective approach to improving model generalization ability that directly leverages the geometry of the loss landscape and its connection to generalization, and is powerfully complementary to existing techniques. In particular, we make the following contributions:
|
| 30 |
+
|
| 31 |
+
• We introduce Sharpness-Aware Minimization (SAM), a novel procedure that improves model generalization by simultaneously minimizing loss value and loss sharpness. SAM functions by seeking parameters that lie in neighborhoods having uniformly low loss value (rather than parameters that only themselves have low loss value, as illustrated in the middle and righthand images of Figure 1), and can be implemented efficiently and easily.
|
| 32 |
+
• We show via a rigorous empirical study that using SAM improves model generalization ability across a range of widely studied computer vision tasks (e.g., CIFAR- $\{ 1 0 , ~ 1 0 0 \}$ , ImageNet, finetuning tasks) and models, as summarized in the lefthand plot of Figure 1. For example, applying SAM yields novel state-of-the-art performance for a number of alreadyintensely-studied tasks, such as ImageNet, CIFAR- $\mathbf { \bar { \{ 1 0 , ~ 1 0 0 \} } }$ , SVHN, Fashion-MNIST, and the standard set of image classification finetuning tasks (e.g., Flowers, Stanford Cars, Oxford Pets, etc).
|
| 33 |
+
• We show that SAM furthermore provides robustness to label noise on par with that provided by state-of-the-art procedures that specifically target learning with noisy labels.
|
| 34 |
+
• Through the lens provided by SAM, we further elucidate the connection between loss sharpness and generalization by surfacing a promising new notion of sharpness, which we term m-sharpness.
|
| 35 |
+
|
| 36 |
+
Section 2 below derives the SAM procedure and presents the resulting algorithm in full detail. Section 3 evaluates SAM empirically, and Section 4 further analyzes the connection between loss sharpness and generalization through the lens of SAM. Finally, we conclude with an overview of related work and a discussion of conclusions and future work in Sections 5 and 6, respectively.
|
| 37 |
+
|
| 38 |
+
# 2 SHARPNESS-AWARE MINIMIZATION (SAM)
|
| 39 |
+
|
| 40 |
+
Throughout the paper, we denote scalars as $a$ , vectors as $^ { a }$ , matrices as $\pmb { A }$ , sets as $\mathcal { A }$ , and equality by definition as $\triangleq$ . Given a training dataset ${ \mathcal { S } } \triangleq \cup _ { i = 1 } ^ { n } \{ ( \pmb { x } _ { i } , \pmb { y } _ { i } ) \}$ drawn i.i.d. from distribution $\mathcal { D }$ , we seek to learn a model that generalizes well. In particular, consider a family of models parameterized by $\pmb { w } \in \mathcal { W } \subseteq \mathbb { R } ^ { d }$ ; given a per-data-point loss function $l : \mathcal { W } \times \mathcal { X } \times \mathcal { Y } \mathbb { R } _ { + }$ , we define the training set loss Having $\begin{array} { r } { L _ { S } ( \pmb { w } ) \triangleq \frac { 1 } { n } \sum _ { i = 1 } ^ { n } l ( \pmb { w } , \pmb { x } _ { i } , \pmb { y } _ { i } ) } \end{array}$ and the population loss odel training is to select $L _ { \mathcal { D } } ( \pmb { w } ) \triangleq \mathbb { E } _ { ( \pmb { x } , \pmb { y } ) \sim D } [ l ( \pmb { w } , \pmb { x } , \pmb { y } ) ]$ $s$ $\pmb { w }$ population loss $\scriptstyle L _ { \mathcal { D } } ( \pmb { w } )$ .
|
| 41 |
+
|
| 42 |
+
Utilizing $L _ { S } ( w )$ as an estimate of $L _ { \mathcal { D } } ( \mathbf { \boldsymbol { w } } )$ motivates the standard approach of selecting parameters $\pmb { w }$ by solving $\mathrm { m i n } _ { w } L _ { S } ( w )$ (possibly in conjunction with a regularizer on $\pmb { w }$ ) using an optimization procedure such as SGD or Adam. Unfortunately, however, for modern overparameterized models such as deep neural networks, typical optimization approaches can easily result in suboptimal performance at test time. In particular, for modern models, $L _ { S } ( w )$ is typically non-convex in $\pmb { w }$ , with multiple local and even global minima that may yield similar values of $L _ { S } ( w )$ while having significantly different generalization performance (i.e., significantly different values of $L _ { \mathcal { D } } ( \mathbf { \boldsymbol { w } } )$ ).
|
| 43 |
+
|
| 44 |
+
Motivated by the connection between sharpness of the loss landscape and generalization, we propose a different approach: rather than seeking out parameter values $\pmb { w }$ that simply have low training loss value $L _ { S } ( w )$ , we seek out parameter values whose entire neighborhoods have uniformly low training loss value (equivalently, neighborhoods having both low loss and low curvature). The following theorem illustrates the motivation for this approach by bounding generalization ability in terms of neighborhood-wise training loss (full theorem statement and proof in Appendix A):
|
| 45 |
+
|
| 46 |
+
Theorem (stated informally) 1. For any $\rho > 0$ , with high probability over training set $s$ generated from distribution $\mathcal { D }$ ,
|
| 47 |
+
|
| 48 |
+
$$
|
| 49 |
+
L _ { \mathcal { D } } ( \pmb { w } ) \leq \operatorname* { m a x } _ { \| \pmb { \epsilon } \| _ { 2 } \leq \rho } L _ { S } ( \pmb { w } + \pmb { \epsilon } ) + h ( \| \pmb { w } \| _ { 2 } ^ { 2 } / \rho ^ { 2 } ) ,
|
| 50 |
+
$$
|
| 51 |
+
|
| 52 |
+
where $h : \mathbb { R } _ { + } \to \mathbb { R } _ { + }$ is a strictly increasing function (under some technical conditions on $L _ { \mathcal { D } } ( \boldsymbol { w } ) ,$ ).
|
| 53 |
+
|
| 54 |
+
To make explicit our sharpness term, we can rewrite the right hand side of the inequality above as
|
| 55 |
+
|
| 56 |
+
$$
|
| 57 |
+
[ \operatorname* { m a x } _ { \| \epsilon \| _ { 2 } \le \rho } L _ { S } ( \pmb { w } + \epsilon ) - L _ { S } ( \pmb { w } ) ] + L _ { S } ( \pmb { w } ) + h ( \| \pmb { w } \| _ { 2 } ^ { 2 } / \rho ^ { 2 } ) .
|
| 58 |
+
$$
|
| 59 |
+
|
| 60 |
+
The term in square brackets captures the sharpness of $L _ { S }$ at $\pmb { w }$ by measuring how quickly the training loss can be increased by moving from $\pmb { w }$ to a nearby parameter value; this sharpness term is then summed with the training loss value itself and a regularizer on the magnitude of $\pmb { w }$ . Given that the specific function $h$ is heavily influenced by the details of the proof, we substitute the second term with $\lambda | | w | | _ { 2 } ^ { 2 }$ for a hyperparameter $\lambda$ , yielding a standard L2 regularization term. Thus, inspired by the terms from the bound, we propose to select parameter values by solving the following SharpnessAware Minimization (SAM) problem:
|
| 61 |
+
|
| 62 |
+
$$
|
| 63 |
+
\operatorname* { m i n } _ { \pmb { w } } L _ { S } ^ { S A M } ( \pmb { w } ) + \lambda | | \pmb { w } | | _ { 2 } ^ { 2 } \mathrm { w h e r e } L _ { S } ^ { S A M } ( \pmb { w } ) \triangleq \operatorname* { m a x } _ { | | \epsilon | | _ { p } \leq \rho } L _ { S } ( \pmb { w } + \epsilon ) ,
|
| 64 |
+
$$
|
| 65 |
+
|
| 66 |
+
where $\rho \geq 0$ is a hyperparameter and $p \in [ 1 , \infty ]$ (we have generalized slightly from an L2-norm to a $p$ -norm in the maximization over $\epsilon$ , though we show empirically in appendix C.5 that $p = 2$ is typically optimal). Figure 1 shows1 the loss landscape for a model that converged to minima found by minimizing either $L _ { S } ( w )$ or $L _ { S } ^ { S A M } ( w )$ , illustrating that the sharpness-aware loss prevents the model from converging to a sharp minimum.
|
| 67 |
+
|
| 68 |
+
In order to minimize $L _ { S } ^ { S A M } ( w )$ , we derive an efficient and effective approximation to $\nabla _ { \pmb { w } } L _ { S } ^ { S A M } ( \pmb { w } )$ by differentiating through the inner maximization, which in turn enables us to apply stochastic gradient descent directly to the SAM objective. Proceeding down this path, we first approximate the inner maximization problem via a first-order Taylor expansion of $L _ { S } ( w + \epsilon )$ w.r.t. $\epsilon$ around 0, obtaining
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
\epsilon ^ { * } ( w ) \overset { \triangleq } { \underset { \| \epsilon \| _ { p } \leq \rho } { \operatorname { \mathbb { I } } } } \operatorname* { m a x } L _ { S } ( w + \epsilon ) \approx \underset { \| \epsilon \| _ { p } \leq \rho } { \operatorname { \arg m a x } } L _ { S } ( w ) + \epsilon ^ { T } \nabla _ { w } L _ { S } ( w ) = \underset { \| \epsilon \| _ { p } \leq \rho } { \operatorname { \arg m a x } } \epsilon ^ { T } \nabla _ { w } L _ { S } ( w ) .
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
In turn, the value $\hat { \epsilon } ( w )$ that solves this approximation is given by the solution to a classical dual norm problem $( | \cdot | ^ { q - 1 }$ denotes elementwise absolute value and power)2:
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\begin{array} { r } { \hat { \epsilon } ( \pmb { w } ) = \rho \operatorname { s i g n } \left( \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) \right) | \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) | ^ { q - 1 } / \bigg ( \| \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) \| _ { q } ^ { q } \bigg ) ^ { 1 / p } } \end{array}
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
where $1 / p + 1 / q = 1$ . Substituting back into equation (1) and differentiating, we then have
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
\begin{array} { c } { \nabla _ { w } L _ { \mathcal { S } } ^ { S A M } ( { \pmb w } ) \approx \nabla _ { { \pmb w } } L _ { \mathcal { S } } ( { \pmb w } + \hat { \epsilon } ( { \pmb w } ) ) = \displaystyle \frac { d ( { \pmb w } + \hat { \epsilon } ( { \pmb w } ) ) } { d { \pmb w } } \nabla _ { { \pmb w } } L _ { \mathcal { S } } ( { \pmb w } ) | _ { { \pmb w } + \hat { \epsilon } ( { \pmb w } ) } } \\ { = \nabla _ { { \pmb w } } L _ { \mathcal { S } } ( { \pmb w } ) | _ { { \pmb w } + \hat { \epsilon } ( { \pmb w } ) } + \displaystyle \frac { d \hat { \epsilon } ( { \pmb w } ) } { d { \pmb w } } \nabla _ { { \pmb w } } L _ { \mathcal { S } } ( { \pmb w } ) | _ { { \pmb w } + \hat { \epsilon } ( { \pmb w } ) } . } \end{array}
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
This approximation to $\nabla _ { \pmb { w } } L _ { S } ^ { S A M } ( \pmb { w } )$ can be straightforwardly computed via automatic differentiation, as implemented in common libraries such as JAX, TensorFlow, and PyTorch. Though this computation implicitly depends on the Hessian of $L _ { S } ( w )$ because $\hat { \epsilon } ( w )$ is itself a function of $\mathrm { \nabla } \mathrm { \nabla } \varpi { L s } ( w )$ , the Hessian enters only via Hessian-vector products, which can be computed tractably without materializing the Hessian matrix. Nonetheless, to further accelerate the computation, we drop the second-order terms. obtaining our final gradient approximation:
|
| 87 |
+
|
| 88 |
+
$$
|
| 89 |
+
\nabla _ { \pmb { w } } L _ { S } ^ { S A M } ( \pmb { w } ) \approx \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) | _ { \pmb { w } + \hat { \epsilon } ( \pmb { w } ) } .
|
| 90 |
+
$$
|
| 91 |
+
|
| 92 |
+
As shown by the results in Section 3, this approximation (without the second-order terms) yields an effective algorithm. In Appendix C.4, we additionally investigate the effect of instead including the second-order terms; in that initial experiment, including them surprisingly degrades performance, and further investigating these terms’ effect should be a priority in future work.
|
| 93 |
+
|
| 94 |
+
We obtain the final SAM algorithm by applying a standard numerical optimizer such as stochastic gradient descent (SGD) to the SAM objective $\check { L _ { S } ^ { S A M } } ( w )$ , using equation 3 to compute the requisite objective function gradients. Algorithm 1 gives pseudo-code for the full SAM algorithm, using SGD as the base optimizer, and Figure 2 schematically illustrates a single SAM parameter update.
|
| 95 |
+
|
| 96 |
+
Input: Training set $s$ , $\cup _ { i = 1 } ^ { n } \{ ( { \pmb x } _ { i } , { \pmb y } _ { i } ) \}$ , Loss function $l : \mathcal { W } \times \mathcal { X } \times \mathcal { Y } \mathbb { R } _ { + }$ , Batch size $b$ , Step size $\eta > 0$ , Neighborhood size $\rho > 0$ .
|
| 97 |
+
|
| 98 |
+
Output: Model trained with SAM Initialize weights $\pmb { w } _ { 0 }$ , $t = 0$ ; while not converged do
|
| 99 |
+
|
| 100 |
+
Sample batch $B = \{ ( { \pmb x } _ { 1 } , { \pmb y } _ { 1 } ) , . . . ( { \pmb x } _ { b } , { \pmb y } _ { b } ) \}$ ;
|
| 101 |
+
Compute gradient $\nabla _ { w } L _ { B } ( w )$ of the batch’s training loss;
|
| 102 |
+
Compute $\hat { \epsilon } ( w )$ per equation 2;
|
| 103 |
+
Compute gradient approximation for the SAM objective (equation 3): $\pmb { g } = \mathcal { \bar { \nabla } } _ { w } L _ { B } ( \pmb { w } ) | _ { \pmb { w } + \hat { \epsilon } ( \pmb { w } ) }$ ;
|
| 104 |
+
Update weights: $\mathbf { } \mathbf { } \mathbf { } w _ { t + 1 } = \mathbf { } w _ { t } - \eta \mathbf { } g$ ;
|
| 105 |
+
$t = t + 1$ ;
|
| 106 |
+
|
| 107 |
+
end return ${ \pmb w } _ { t }$
|
| 108 |
+
|
| 109 |
+
Algorithm 1: SAM algorithm
|
| 110 |
+
|
| 111 |
+

|
| 112 |
+
Figure 2: Schematic of the SAM parameter update.
|
| 113 |
+
|
| 114 |
+
# 3 EMPIRICAL EVALUATION
|
| 115 |
+
|
| 116 |
+
In order to assess SAM’s efficacy, we apply it to a range of different tasks, including image classification from scratch (including on CIFAR-10, CIFAR-100, and ImageNet), finetuning pretrained models, and learning with noisy labels. In all cases, we measure the benefit of using SAM by simply replacing the optimization procedure used to train existing models with SAM, and computing the resulting effect on model generalization. As seen below, SAM materially improves generalization performance in the vast majority of these cases.
|
| 117 |
+
|
| 118 |
+
# 3.1 IMAGE CLASSIFICATION FROM SCRATCH
|
| 119 |
+
|
| 120 |
+
We first evaluate SAM’s impact on generalization for today’s state-of-the-art models on CIFAR-10 and CIFAR-100 (without pretraining): WideResNets with ShakeShake regularization (Zagoruyko & Komodakis, 2016; Gastaldi, 2017) and PyramidNet with ShakeDrop regularization (Han et al., 2016; Yamada et al., 2018). Note that some of these models have already been heavily tuned in prior work and include carefully chosen regularization schemes to prevent overfitting; therefore, significantly improving their generalization is quite non-trivial. We have ensured that our implementations’ generalization performance in the absence of SAM matches or exceeds that reported in prior work (Cubuk et al., 2018; Lim et al., 2019)
|
| 121 |
+
|
| 122 |
+
All results use basic data augmentations (horizontal flip, padding by four pixels, and random crop). We also evaluate in the setting of more advanced data augmentation methods such as cutout regularization (Devries & Taylor, 2017) and AutoAugment (Cubuk et al., 2018), which are utilized by prior work to achieve state-of-the-art results.
|
| 123 |
+
|
| 124 |
+
SAM has a single hyperparameter $\rho$ (the neighborhood size), which we tune via a grid search over $\{ 0 . 0 1 , 0 . 0 2 , 0 . 0 5 , 0 . 1 , 0 . \bar { 2 } , 0 . 5 \}$ using $10 \%$ of the training set as a validation set3. Please see appendix C.1 for the values of all hyperparameters and additional training details. As each SAM weight update requires two backpropagation operations (one to compute $\hat { \epsilon } ( w )$ and another to compute the final gradient), we allow each non-SAM training run to execute twice as many epochs as each SAM training run, and we report the best score achieved by each non-SAM training run across either the standard epoch count or the doubled epoch count4. We run five independent replicas of each experimental condition for which we report results (each with independent weight initialization and data shuffling), reporting the resulting mean error (or accuracy) on the test set, and the associated $9 5 \%$ confidence interval. Our implementations utilize JAX (Bradbury et al., 2018), and we train all models on a single host having 8 Nvidia $\mathrm { V 1 0 0 \ G P U s }$ . To compute the SAM update when parallelizing across multiple accelerators, we divide each data batch evenly among the accelerators, independently compute the SAM gradient on each accelerator, and average the resulting sub-batch SAM gradients to obtain the final SAM update.
|
| 125 |
+
|
| 126 |
+
As seen in Table 1, SAM improves generalization across all settings evaluated for CIFAR-10 and CIFAR-100. For example, SAM enables a simple WideResNet to attain $1 . 6 \%$ test error, versus $2 . 2 \%$ error without SAM. Such gains have previously been attainable only by using more complex model architectures (e.g., PyramidNet) and regularization schemes (e.g., Shake-Shake, ShakeDrop); SAM provides an easily-implemented, model-independent alternative. Furthermore, SAM delivers improvements even when applied atop complex architectures that already use sophisticated regularization: for instance, applying SAM to a PyramidNet with ShakeDrop regularization yields $1 0 . 3 \%$ error on CIFAR-100, which is, to our knowledge, a new state-of-the-art on this dataset without the use of additional data.
|
| 127 |
+
|
| 128 |
+
Beyond CIFAR- $\{ 1 0 , 1 0 0 \}$ , we have also evaluated SAM on the SVHN (Netzer et al., 2011) and Fashion-MNIST datasets (Xiao et al., 2017). Once again, SAM enables a simple WideResNet to achieve accuracy at or above the state-of-the-art for these datasets: $0 . 9 9 \%$ error for SVHN, and $3 . 5 9 \%$ for Fashion-MNIST. Details are available in appendix B.1.
|
| 129 |
+
|
| 130 |
+
To assess SAM’s performance at larger scale, we apply it to ResNets (He et al., 2015) of different depths (50, 101, 152) trained on ImageNet (Deng et al., 2009). In this setting, following prior work (He et al., 2015; Szegedy et al., 2015), we resize and crop images to 224-pixel resolution, normalize them, and use batch size 4096, initial learning rate 1.0, cosine learning rate schedule, SGD optimizer with momentum 0.9, label smoothing of 0.1, and weight decay 0.0001. When applying SAM, we use $\rho = 0 . 0 5$ (determined via a grid search on ResNet-50 trained for 100 epochs). We train all models on ImageNet for up to 400 epochs using a Google Cloud TPUv3 and report top-1 and top-5 test error rates for each experimental condition (mean and $9 5 \%$ confidence interval across 5 independent runs).
|
| 131 |
+
|
| 132 |
+
<table><tr><td colspan="2"></td><td colspan="2">CIFAR-10</td><td colspan="2">CIFAR-100</td></tr><tr><td>Model</td><td>Augmentation</td><td>SAM</td><td>SGD</td><td>SAM</td><td>SGD</td></tr><tr><td>WRN-28-10 (200 epochs) WRN-28-10 (200 epochs)</td><td>Basic Cutout</td><td>2.7±0.1 2.3±0.1</td><td>3.5±0.1 2.6±0.1</td><td>16.5±0.2 14.9±0.2</td><td>18.8±0.2 16.9±0.1</td></tr><tr><td>WRN-28-10 (200 epochs) WRN-28-10 (1800 epochs)</td><td>AA Basic</td><td>2.1±<0.1 2.4±0.1</td><td>2.3±0.1 3.5±0.1</td><td>13.6±0.2 16.3±0.2</td><td>15.8±0.2 19.1±0.1</td></tr><tr><td>WRN-28-10 (1800 epochs) WRN-28-10 (1800 epochs)</td><td>Cutout AA</td><td>2.1±0.1 1.6±0.1</td><td>2.7±0.1 2.2±<0.1</td><td>14.0±0.1 12.8±0.2</td><td>17.4±0.1 16.1±0.2</td></tr><tr><td>Shake-Shake (26 2x96d) Shake-Shake (26 2x96d)</td><td>Basic Cutout</td><td>2.3±<0.1 2.0±<0.1</td><td>2.7±0.1 2.3±0.1</td><td>15.1±0.1 14.2±0.2</td><td>17.0±0.1 15.7±0.2</td></tr><tr><td>Shake-Shake (26 2x96d)</td><td>AA</td><td>1.6±<0.1</td><td>1.9±0.1</td><td>12.8±0.1</td><td>14.1±0.2</td></tr><tr><td>PyramidNet</td><td>Basic</td><td>2.7±0.1</td><td>4.0±0.1</td><td>14.6±0.4</td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td>19.7±0.3</td></tr><tr><td>PyramidNet</td><td>Cutout</td><td>1.9±0.1</td><td>2.5±0.1</td><td></td><td></td></tr><tr><td></td><td></td><td></td><td></td><td>12.6±0.2</td><td>16.4±0.1</td></tr><tr><td>PyramidNet</td><td>AA</td><td>1.6±0.1</td><td>1.9±0.1</td><td>11.6±0.1</td><td>14.6±0.1</td></tr><tr><td>PyramidNet+ShakeDrop</td><td>Basic</td><td>2.1±0.1</td><td>2.5±0.1</td><td>13.3±0.2</td><td></td></tr><tr><td>PyramidNet+ShakeDrop</td><td>Cutout</td><td></td><td></td><td></td><td>14.5±0.1</td></tr><tr><td></td><td></td><td>1.6±<0.1</td><td>1.9±0.1</td><td>11.3±0.1</td><td>11.8±0.2</td></tr><tr><td>PyramidNet+ShakeDrop</td><td>AA</td><td>1.4±<0.1</td><td>1.6±<0.1</td><td>10.3±0.1</td><td>10.6±0.1</td></tr></table>
|
| 133 |
+
|
| 134 |
+
Table 1: Results for SAM on state-of-the-art models on CIFAR- $\{ 1 0 , 1 0 0 \}$ (WRN $=$ WideResNet;
|
| 135 |
+
AA $=$ AutoAugment; SGD is the standard non-SAM procedure used to train these models).
|
| 136 |
+
|
| 137 |
+
As seen in Table 2, SAM again consistently improves performance, for example improving the ImageNet top-1 error rate of ResNet-152 from $2 0 . 3 \%$ to $1 8 . 4 \%$ . Furthermore, note that SAM enables increasing the number of training epochs while continuing to improve accuracy without overfitting. In contrast, the standard training procedure (without SAM) generally significantly overfits as training extends from 200 to 400 epochs.
|
| 138 |
+
|
| 139 |
+
Table 2: Test error rates for ResNets trained on ImageNet, with and without SAM.
|
| 140 |
+
|
| 141 |
+
<table><tr><td rowspan="2">Model</td><td rowspan="2">Epoch</td><td colspan="2">SAM</td><td colspan="2">Standard Training (No SAM)</td></tr><tr><td>Top-1</td><td>Top-5</td><td>Top-1</td><td>Top-5</td></tr><tr><td rowspan="3">ResNet-50</td><td>100</td><td>22.5±0.1</td><td>6.28±0.08</td><td>22.9±0.1</td><td>6.62±0.11</td></tr><tr><td>200</td><td>21.4±0.1</td><td>5.82±0.03</td><td>22.3±0.1</td><td>6.37±0.04</td></tr><tr><td>400</td><td>20.9±0.1</td><td>5.51±0.03</td><td>22.3±0.1</td><td>6.40±0.06</td></tr><tr><td rowspan="3">ResNet-101</td><td>100</td><td>20.2±0.1</td><td>5.12±0.03</td><td>21.2±0.1</td><td>5.66±0.05</td></tr><tr><td>200</td><td>19.4±0.1</td><td>4.76±0.03</td><td>20.9±0.1</td><td>5.66±0.04</td></tr><tr><td>400</td><td>19.0±<0.01</td><td>4.65±0.05</td><td>22.3±0.1</td><td>6.41±0.06</td></tr><tr><td rowspan="3">ResNet-152</td><td>100</td><td>19.2±<0.01</td><td>4.69±0.04</td><td>20.4±<0.0</td><td>5.39±0.06</td></tr><tr><td>200</td><td>18.5±0.1</td><td>4.37±0.03</td><td>20.3±0.2</td><td>5.39±0.07</td></tr><tr><td>400</td><td>18.4±<0.01</td><td>4.35±0.04</td><td>20.9±<0.0</td><td>5.84±0.07</td></tr></table>
|
| 142 |
+
|
| 143 |
+
# 3.2 FINETUNING
|
| 144 |
+
|
| 145 |
+
Transfer learning by pretraining a model on a large related dataset and then finetuning on a smaller target dataset of interest has emerged as a powerful and widely used technique for producing highquality models for a variety of different tasks. We show here that SAM once again offers considerable benefits in this setting, even when finetuning extremely large, state-of-the-art, already high-performing models.
|
| 146 |
+
|
| 147 |
+
In particular, we apply SAM to finetuning EfficentNet-b7 (pretrained on ImageNet) and EfficientNet-L2 (pretrained on ImageNet plus unlabeled JFT; input resolution 475) (Tan & Le, 2019; Kornblith et al., 2018; Huang et al., 2018). We initialize these models to publicly available checkpoints6 trained with RandAugment $8 4 . 7 \%$ accuracy on ImageNet) and NoisyStudent $8 8 . 2 \%$ accuracy on ImageNet), respectively. We finetune these models on each of several target datasets by training each model starting from the aforementioned checkpoint; please see the appendix for details of the hyperparameters used. We report the mean and $9 5 \%$ confidence interval of top-1 test error over 5 independent runs for each dataset.
|
| 148 |
+
|
| 149 |
+
As seen in Table 3, SAM uniformly improves performance relative to finetuning without SAM. Furthermore, in many cases, SAM yields novel state-of-the-art performance, including $0 . 3 0 \%$ error on CIFAR-10, $3 . 9 2 \%$ error on CIFAR-100, and $1 1 . 3 9 \%$ error on ImageNet.
|
| 150 |
+
|
| 151 |
+
Table 3: Top-1 error rates for finetuning EfficientNet-b7 (left; ImageNet pretraining only) and EfficientNet-L2 (right; pretraining on ImageNet plus additional data, such as JFT) on various downstream tasks. Previous state-of-the-art (SOTA) includes EfficientNet (EffNet) (Tan & Le, 2019), Gpipe (Huang et al., 2018), DAT (Ngiam et al., 2018), BiT-M/L (Kolesnikov et al., 2020), KDforAA (Wei et al., 2020), TBMSL-Net (Zhang et al., 2020), and ViT (Dosovitskiy et al., 2020).
|
| 152 |
+
|
| 153 |
+
<table><tr><td>Dataset</td><td>EffNet-b7 + SAM</td><td>EffNet-b7</td><td>Prev. SOTA (ImageNet only)</td><td>EffNet-L2 + SAM</td><td>EffNet-L2</td><td>Prev. SOTA</td></tr><tr><td>FGVC_Aircraft</td><td>6.80±0.06</td><td>8.15±0.08</td><td>5.3(TBMSL-Net)</td><td>4.82±0.08</td><td>5.80±0.1</td><td>5.3 (TBMSL-Net)</td></tr><tr><td>Flowers</td><td>0.63±0.02</td><td>1.16±0.05</td><td>0.7 (BiT-M)</td><td>0.35±0.01</td><td>0.40±0.02</td><td>0.37 (EffNet)</td></tr><tr><td>Oxford_IIIT_Pets</td><td>3.97±0.04</td><td>4.24±0.09</td><td>4.1 (Gpipe)</td><td>2.90±0.04</td><td>3.08±0.04</td><td>4.1 (Gpipe)</td></tr><tr><td>Stanford_Cars</td><td>5.18±0.02</td><td>5.94±0.06</td><td>5.0 (TBMSL-Net)</td><td>4.04±0.03</td><td>4.93±0.04</td><td>3.8 (DAT)</td></tr><tr><td>CIFAR-10</td><td>0.88±0.02</td><td>0.95±0.03</td><td>1(Gpipe)</td><td>0.30±0.01</td><td>0.34±0.02</td><td>0.63 (BiT-L)</td></tr><tr><td>CIFAR-100</td><td>7.44±0.06</td><td>7.68±0.06</td><td>7.83 (BiT-M)</td><td>3.92±0.06</td><td>4.07±0.08</td><td>6.49 (BiT-L)</td></tr><tr><td>Birdsnap</td><td>13.64±0.15</td><td>14.30±0.18</td><td>15.7 (EffNet)</td><td>9.93±0.15</td><td>10.31±0.15</td><td>14.5 (DAT)</td></tr><tr><td>Food101</td><td>7.02±0.02</td><td>7.17±0.03</td><td>7.0 (Gpipe)</td><td>3.82±0.01</td><td>3.97±0.03</td><td>4.7 (DAT)</td></tr><tr><td>ImageNet</td><td>15.14±0.03</td><td>15.3</td><td>14.2 (KDforAA)</td><td>11.39±0.02</td><td>11.8</td><td>11.45 (ViT)</td></tr></table>
|
| 154 |
+
|
| 155 |
+
The fact that SAM seeks out model parameters that are robust to perturbations suggests SAM’s potential to provide robustness to noise in the training set (which would perturb the training loss landscape). Thus, we assess here the degree of robustness that SAM provides to label noise.
|
| 156 |
+
|
| 157 |
+
In particular, we measure the effect of applying SAM in the classical noisy-label setting for CIFAR-10, in which a fraction of the training set’s labels are randomly flipped; the test set remains unmodified (i.e., clean). To ensure valid comparison to prior work, which often utilizes architectures specialized to the noisy-label setting, we train a simple model of similar size (ResNet-32) for 200 epochs, following Jiang et al. (2019). We evaluate five variants of model training: standard SGD, SGD with Mixup (Zhang et al., 2017), SAM, and ”bootstrapped” variants of SGD with Mixup and SAM (wherein the model is first trained as usual and then retrained from scratch on the labels predicted by the initially trained model). When applying SAM, we use $\rho = 0 . 1$ for all noise levels except $80 \%$ , for which we use $\rho = 0 . 0 5$ for more stable convergence. For the Mixup baselines, we tried all values of $\alpha \in \{ 1 , 8 , 1 6 , 3 2 \}$ and conservatively report the best score for each noise level.
|
| 158 |
+
|
| 159 |
+
Table 4: Test accuracy on the clean test set for models trained on CIFAR-10 with noisy labels. Lower block is our implementation, upper block gives scores from the literature, per Jiang et al. (2019).
|
| 160 |
+
|
| 161 |
+
<table><tr><td rowspan="2">Method</td><td colspan="4">Noise rate (%)</td></tr><tr><td>20</td><td>40</td><td>60</td><td>80</td></tr><tr><td>Sanchez et al. (2019)</td><td>94.0</td><td>92.8</td><td>90.3</td><td>74.1</td></tr><tr><td>Zhang & Sabuncu (2018)</td><td>89.7</td><td>87.6</td><td>82.7</td><td>67.9</td></tr><tr><td>Lee et al. (2019)</td><td>87.1</td><td>81.8</td><td>75.4</td><td>-</td></tr><tr><td>Chen et al. (2019)</td><td>89.7</td><td>-</td><td>-</td><td>52.3</td></tr><tr><td>Huang et al. (2019)</td><td>92.6</td><td>90.3</td><td>43.4</td><td>-</td></tr><tr><td>MentorNet (2017)</td><td>92.0</td><td>91.2</td><td>74.2</td><td>60.0</td></tr><tr><td>Mixup (2017)</td><td>94.0</td><td>91.5</td><td>86.8</td><td>76.9</td></tr><tr><td>MentorMix (2019)</td><td>95.6</td><td>94.2</td><td>91.3</td><td>81.0</td></tr><tr><td>SGD</td><td>84.8</td><td>68.8</td><td>48.2</td><td>26.2</td></tr><tr><td>Mixup</td><td>93.0</td><td>90.0</td><td>83.8</td><td>70.2</td></tr><tr><td>Bootstrap + Mixup</td><td>93.3</td><td>92.0</td><td>87.6</td><td>72.0</td></tr><tr><td>SAM</td><td>95.1</td><td>93.4</td><td>90.5</td><td>77.9</td></tr><tr><td>Bootstrap + SAM</td><td>95.4</td><td>94.2</td><td>91.8</td><td>79.9</td></tr></table>
|
| 162 |
+
|
| 163 |
+
As seen in Table 4, SAM provides a high degree of robustness to label noise, on par with that provided by state-of-the art procedures that specifically target learning with noisy labels. Indeed, simply training a model with SAM outperforms all prior methods specifically targeting label noise robustness, with the exception of MentorMix (Jiang et al., 2019). However, simply bootstrapping SAM yields performance comparable to that of MentorMix (which is substantially more complex).
|
| 164 |
+
|
| 165 |
+

|
| 166 |
+
Figure 3: (left) Evolution of the spectrum of the Hessian during training of a model with standard SGD (lefthand column) or SAM (righthand column). (middle) Test error as a function of $\rho$ for different values of $m$ . (right) Predictive power of $m$ -sharpness for the generalization gap, for different values of $m$ (higher means the sharpness measure is more correlated with actual generalization gap).
|
| 167 |
+
|
| 168 |
+
# 4 SHARPNESS AND GENERALIZATION THROUGH THE LENS OF SAM
|
| 169 |
+
|
| 170 |
+
# 4.1 $m$ -SHARPNESS
|
| 171 |
+
|
| 172 |
+
Though our derivation of SAM defines the SAM objective over the entire training set, when utilizing SAM in practice, we compute the SAM update per-batch (as described in Algorithm 1) or even by averaging SAM updates computed independently per-accelerator (where each accelerator receives a subset of size $m$ of a batch, as described in Section 3). This latter setting is equivalent to modifying the SAM objective (equation 1) to sum over a set of independent $\epsilon$ maximizations, each performed on a sum of per-data-point losses on a disjoint subset of $m$ data points, rather than performing the $\epsilon$ maximization over a global sum over the training set (which would be equivalent to setting $m$ to the total training set size). We term the associated measure of sharpness of the loss landscape $m$ -sharpness.
|
| 173 |
+
|
| 174 |
+
To better understand the effect of $m$ on SAM, we train a small ResNet on CIFAR-10 using SAM with a range of values of $m$ . As seen in Figure 3 (middle), smaller values of $m$ tend to yield models having better generalization ability. This relationship fortuitously aligns with the need to parallelize across multiple accelerators in order to scale training for many of today’s models.
|
| 175 |
+
|
| 176 |
+
Intriguingly, the $m$ -sharpness measure described above furthermore exhibits better correlation with models’ actual generalization gaps as $m$ decreases, as demonstrated by Figure 3 (right)7. In particular, this implies that $m$ -sharpness with $m < n$ yields a better predictor of generalization than the full-training-set measure suggested by Theorem 1 in Section 2 above, suggesting an interesting new avenue of future work for understanding generalization.
|
| 177 |
+
|
| 178 |
+
# 4.2 HESSIAN SPECTRA
|
| 179 |
+
|
| 180 |
+
Motivated by the connection between geometry of the loss landscape and generalization, we constructed SAM to seek out minima of the training loss landscape having both low loss value and low curvature (i.e., low sharpness). To further confirm that SAM does in fact find minima having low curvature, we compute the spectrum of the Hessian for a WideResNet40-10 trained on CIFAR-10 for 300 steps both with and without SAM (without batch norm, which tends to obscure interpretation of the Hessian), at different epochs during training. Due to the parameter space’s dimensionality, we approximate the Hessian spectrum using the Lanczos algorithm of Ghorbani et al. (2019).
|
| 181 |
+
|
| 182 |
+
Figure 3 (left) reports the resulting Hessian spectra. As expected, the models trained with SAM converge to minima having lower curvature, as seen in the overall distribution of eigenvalues, the maximum eigenvalue $\left( \lambda _ { \operatorname* { m a x } } \right)$ at convergence (approximately 24 without SAM, 1.0 with SAM), and the bulk of the spectrum (the ratio $\lambda _ { \operatorname* { m a x } } / \lambda _ { 5 }$ , commonly used as a proxy for sharpness (Jastrzebski et al., 2020); up to 11.4 without SAM, and 2.6 with SAM).
|
| 183 |
+
|
| 184 |
+
# 5 RELATED WORK
|
| 185 |
+
|
| 186 |
+
The idea of searching for “flat” minima can be traced back to Hochreiter & Schmidhuber (1995), and its connection to generalization has seen significant study (Shirish Keskar et al., 2016; Dziugaite & Roy, 2017; Neyshabur et al., 2017; Dinh et al., 2017). In a recent large scale empirical study, Jiang et al. (2019) studied 40 complexity measures and showed that a sharpness-based measure has highest correlation with generalization, which motivates penalizing sharpness. Hochreiter & Schmidhuber (1997) was perhaps the first paper on penalizing the sharpness, regularizing a notion related to Minimum Description Length (MDL). Other ideas which also penalize sharp minima include operating on diffused loss landscape (Mobahi, 2016) and regularizing local entropy (Chaudhari et al., 2016). Another direction is to not penalize the sharpness explicitly, but rather average weights during training; Izmailov et al. (2018) showed that doing so can yield flatter minima that can also generalize better. However, the measures of sharpness proposed previously are difficult to compute and differentiate through. In contrast, SAM is highly scalable as it only needs two gradient computations per iteration. The concurrent work of Sun et al. (2020) focuses on resilience to random and adversarial corruption to expose a model’s vulnerabilities; this work is perhaps closest to ours. Our work has a different basis: we develop SAM motivated by a principled starting point in generalization, clearly demonstrate SAM’s efficacy via rigorous large-scale empirical evaluation, and surface important practical and theoretical facets of the procedure (e.g., $m$ -sharpness). The notion of all-layer margin introduced by Wei & Ma (2020) is closely related to this work; one is adversarial perturbation over the activations of a network and the other over its weights, and there is some coupling between these two quantities.
|
| 187 |
+
|
| 188 |
+
# 6 DISCUSSION AND FUTURE WORK
|
| 189 |
+
|
| 190 |
+
In this work, we have introduced SAM, a novel algorithm that improves generalization by simultaneously minimizing loss value and loss sharpness; we have demonstrated SAM’s efficacy through a rigorous large-scale empirical evaluation. We have surfaced a number of interesting avenues for future work. On the theoretical side, the notion of per-data-point sharpness yielded by $m$ -sharpness (in contrast to global sharpness computed over the entire training set, as has typically been studied in the past) suggests an interesting new lens through which to study generalization. Methodologically, our results suggest that SAM could potentially be used in place of Mixup in robust or semi-supervised methods that currently rely on Mixup (giving, for instance, MentorSAM). We leave to future work a more in-depth investigation of these possibilities.
|
| 191 |
+
|
| 192 |
+
# 7 ACKNOWLEDGMENTS
|
| 193 |
+
|
| 194 |
+
We thank our colleagues at Google — Atish Agarwala, Xavier Garcia, Dustin Tran, Yiding Jiang, Basil Mustafa, Samy Bengio — for their feedback and insightful discussions. We also thank the JAX and FLAX teams for going above and beyond to support our implementation. We are grateful to Sven Gowal for his help in replicating EfficientNet using JAX, and Justin Gilmer for his implementation of the Lanczos algorithm8 used to generate the Hessian spectra. We thank Niru Maheswaranathan for his matplotlib mastery. We also thank David Samuel for providing a PyTorch implementation of $\mathrm { \bf S A M ^ { 9 } }$ .
|
| 195 |
+
|
| 196 |
+
# REFERENCES
|
| 197 |
+
|
| 198 |
+
Naman Agarwal, Rohan Anil, Elad Hazan, Tomer Koren, and Cyril Zhang. Revisiting the generalization of adaptive gradient methods, 2020. URL https://openreview.net/forum? id=BJl6t64tvr.
|
| 199 |
+
|
| 200 |
+
James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, and Skye Wanderman-Milne. JAX: composable transformations of Python+NumPy programs, 2018. URL http://github.com/google/jax.
|
| 201 |
+
|
| 202 |
+
Niladri S Chatterji, Behnam Neyshabur, and Hanie Sedghi. The intriguing role of module criticality in the generalization of deep networks. In International Conference on Learning Representations, 2020.
|
| 203 |
+
|
| 204 |
+
Pratik Chaudhari, Anna Choromanska, Stefano Soatto, Yann LeCun, Carlo Baldassi, Christian Borgs, Jennifer Chayes, Levent Sagun, and Riccardo Zecchina. Entropy-SGD: Biasing Gradient Descent Into Wide Valleys. arXiv e-prints, art. arXiv:1611.01838, November 2016.
|
| 205 |
+
|
| 206 |
+
Pengfei Chen, Benben Liao, Guangyong Chen, and Shengyu Zhang. Understanding and utilizing deep neural networks trained with noisy labels. CoRR, abs/1905.05040, 2019. URL http: //arxiv.org/abs/1905.05040.
|
| 207 |
+
|
| 208 |
+
Ekin Dogus Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoc V. Le. Au- ´ toaugment: Learning augmentation policies from data. CoRR, abs/1805.09501, 2018. URL http://arxiv.org/abs/1805.09501.
|
| 209 |
+
|
| 210 |
+
J. Deng, W. Dong, R. Socher, L.-J. Li, K. Li, and L. Fei-Fei. ImageNet: A Large-Scale Hierarchical Image Database. In CVPR09, 2009.
|
| 211 |
+
|
| 212 |
+
Terrance Devries and Graham W. Taylor. Improved regularization of convolutional neural networks with cutout. CoRR, abs/1708.04552, 2017. URL http://arxiv.org/abs/1708.04552.
|
| 213 |
+
|
| 214 |
+
Laurent Dinh, Razvan Pascanu, Samy Bengio, and Yoshua Bengio. Sharp minima can generalize for deep nets. arXiv preprint arXiv:1703.04933, 2017.
|
| 215 |
+
|
| 216 |
+
Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, Jakob Uszkoreit, and Neil Houlsby. An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale. arXiv e-prints, art. arXiv:2010.11929, October 2020.
|
| 217 |
+
|
| 218 |
+
Timothy Dozat. Incorporating nesterov momentum into adam. 2016.
|
| 219 |
+
|
| 220 |
+
John Duchi, Elad Hazan, and Yoram Singer. Adaptive subgradient methods for online learning and stochastic optimization. Journal of machine learning research, 12(7), 2011.
|
| 221 |
+
|
| 222 |
+
Gintare Karolina Dziugaite and Daniel M Roy. Computing nonvacuous generalization bounds for deep (stochastic) neural networks with many more parameters than training data. arXiv preprint arXiv:1703.11008, 2017.
|
| 223 |
+
|
| 224 |
+
Xavier Gastaldi. Shake-shake regularization. CoRR, abs/1705.07485, 2017. URL http: //arxiv.org/abs/1705.07485.
|
| 225 |
+
|
| 226 |
+
Behrooz Ghorbani, Shankar Krishnan, and Ying Xiao. An Investigation into Neural Net Optimization via Hessian Eigenvalue Density. arXiv e-prints, art. arXiv:1901.10159, January 2019.
|
| 227 |
+
|
| 228 |
+
Dongyoon Han, Jiwhan Kim, and Junmo Kim. Deep pyramidal residual networks. CoRR, abs/1610.02915, 2016. URL http://arxiv.org/abs/1610.02915.
|
| 229 |
+
|
| 230 |
+
Ethan Harris, Antonia Marcu, Matthew Painter, Mahesan Niranjan, Adam Prugel-Bennett, and ¨ Jonathon Hare. FMix: Enhancing Mixed Sample Data Augmentation. arXiv e-prints, art. arXiv:2002.12047, February 2020.
|
| 231 |
+
|
| 232 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. CoRR, abs/1512.03385, 2015. URL http://arxiv.org/abs/1512.03385.
|
| 233 |
+
|
| 234 |
+
Geoffrey Hinton, Nitish Srivastava, and Kevin Swersky. Neural networks for machine learning lecture 6a overview of mini-batch gradient descent.
|
| 235 |
+
|
| 236 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Simplifying neural nets by discovering flat minima. In ¨ Advances in neural information processing systems, pp. 529–536, 1995.
|
| 237 |
+
|
| 238 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Flat minima. ¨ Neural Computation, 9(1):1–42, 1997.
|
| 239 |
+
|
| 240 |
+
Gao Huang, Yu Sun, Zhuang Liu, Daniel Sedra, and Kilian Weinberger. Deep Networks with Stochastic Depth. arXiv e-prints, art. arXiv:1603.09382, March 2016.
|
| 241 |
+
|
| 242 |
+
J. Huang, L. Qu, R. Jia, and B. Zhao. O2u-net: A simple noisy label detection approach for deep neural networks. In 2019 IEEE/CVF International Conference on Computer Vision (ICCV), pp. 3325–3333, 2019.
|
| 243 |
+
|
| 244 |
+
Yanping Huang, Youlong Cheng, Ankur Bapna, Orhan Firat, Mia Xu Chen, Dehao Chen, HyoukJoong Lee, Jiquan Ngiam, Quoc V. Le, Yonghui Wu, and Zhifeng Chen. GPipe: Efficient Training of Giant Neural Networks using Pipeline Parallelism. arXiv e-prints, art. arXiv:1811.06965, November 2018.
|
| 245 |
+
|
| 246 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
|
| 247 |
+
|
| 248 |
+
Pavel Izmailov, Dmitrii Podoprikhin, Timur Garipov, Dmitry Vetrov, and Andrew Gordon Wilson. Averaging Weights Leads to Wider Optima and Better Generalization. arXiv e-prints, art. arXiv:1803.05407, March 2018.
|
| 249 |
+
|
| 250 |
+
Arthur Jacot, Franck Gabriel, and Clement Hongler. Neural tangent kernel: Convergence and gener-´ alization in neural networks. CoRR, abs/1806.07572, 2018. URL http://arxiv.org/abs/ 1806.07572.
|
| 251 |
+
|
| 252 |
+
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. arXiv e-prints, art. arXiv:2002.09572, February 2020.
|
| 253 |
+
|
| 254 |
+
Lu Jiang, Zhengyuan Zhou, Thomas Leung, Li-Jia Li, and Li Fei-Fei. Mentornet: Regularizing very deep neural networks on corrupted labels. CoRR, abs/1712.05055, 2017. URL http: //arxiv.org/abs/1712.05055.
|
| 255 |
+
|
| 256 |
+
Lu Jiang, Di Huang, Mason Liu, and Weilong Yang. Beyond Synthetic Noise: Deep Learning on Controlled Noisy Labels. arXiv e-prints, art. arXiv:1911.09781, November 2019.
|
| 257 |
+
|
| 258 |
+
Yiding Jiang, Behnam Neyshabur, Hossein Mobahi, Dilip Krishnan, and Samy Bengio. Fantastic generalization measures and where to find them. arXiv preprint arXiv:1912.02178, 2019.
|
| 259 |
+
|
| 260 |
+
Diederik P. Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. arXiv e-prints, art. arXiv:1412.6980, December 2014.
|
| 261 |
+
|
| 262 |
+
Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Joan Puigcerver, Jessica Yung, Sylvain Gelly, and Neil Houlsby. Big transfer (bit): General visual representation learning, 2020.
|
| 263 |
+
|
| 264 |
+
Simon Kornblith, Jonathon Shlens, and Quoc V. Le. Do Better ImageNet Models Transfer Better? arXiv e-prints, art. arXiv:1805.08974, May 2018.
|
| 265 |
+
|
| 266 |
+
John Langford and Rich Caruana. (not) bounding the true error. In Advances in Neural Information Processing Systems, pp. 809–816, 2002.
|
| 267 |
+
|
| 268 |
+
Beatrice Laurent and Pascal Massart. Adaptive estimation of a quadratic functional by model selection. Annals of Statistics, pp. 1302–1338, 2000.
|
| 269 |
+
|
| 270 |
+
Kimin Lee, Sukmin Yun, Kibok Lee, Honglak Lee, Bo Li, and Jinwoo Shin. Robust inference via generative classifiers for handling noisy labels, 2019.
|
| 271 |
+
|
| 272 |
+
Hao Li, Zheng Xu, Gavin Taylor, and Tom Goldstein. Visualizing the loss landscape of neural nets. CoRR, abs/1712.09913, 2017. URL http://arxiv.org/abs/1712.09913.
|
| 273 |
+
|
| 274 |
+
Sungbin Lim, Ildoo Kim, Taesup Kim, Chiheon Kim, and Sungwoong Kim. Fast autoaugment. CoRR, abs/1905.00397, 2019. URL http://arxiv.org/abs/1905.00397.
|
| 275 |
+
|
| 276 |
+
James Martens and Roger Grosse. Optimizing Neural Networks with Kronecker-factored Approximate Curvature. arXiv e-prints, art. arXiv:1503.05671, March 2015.
|
| 277 |
+
|
| 278 |
+
David A McAllester. Pac-bayesian model averaging. In Proceedings of the twelfth annual conference on Computational learning theory, pp. 164–170, 1999.
|
| 279 |
+
|
| 280 |
+
Hossein Mobahi. Training recurrent neural networks by diffusion. CoRR, abs/1601.04114, 2016. URL http://arxiv.org/abs/1601.04114.
|
| 281 |
+
|
| 282 |
+
Y. E. Nesterov. A method for solving the convex programming problem with convergence rate $o ( 1 / k ^ { 2 } )$ . Dokl. Akad. Nauk SSSR, 269:543–547, 1983. URL https://ci.nii.ac.jp/ naid/10029946121/en/.
|
| 283 |
+
|
| 284 |
+
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning. 2011.
|
| 285 |
+
|
| 286 |
+
Behnam Neyshabur, Srinadh Bhojanapalli, David McAllester, and Nati Srebro. Exploring generalization in deep learning. In Advances in neural information processing systems, pp. 5947–5956, 2017.
|
| 287 |
+
|
| 288 |
+
Jiquan Ngiam, Daiyi Peng, Vijay Vasudevan, Simon Kornblith, Quoc V. Le, and Ruoming Pang. Domain adaptive transfer learning with specialist models. CoRR, abs/1811.07056, 2018. URL http://arxiv.org/abs/1811.07056.
|
| 289 |
+
|
| 290 |
+
Eric Arazo Sanchez, Diego Ortego, Paul Albert, Noel E. O’Connor, and Kevin McGuinness. Unsupervised label noise modeling and loss correction. CoRR, abs/1904.11238, 2019. URL http://arxiv.org/abs/1904.11238.
|
| 291 |
+
|
| 292 |
+
Nitish Shirish Keskar and Richard Socher. Improving Generalization Performance by Switching from Adam to SGD. arXiv e-prints, art. arXiv:1712.07628, December 2017.
|
| 293 |
+
|
| 294 |
+
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. arXiv e-prints, art. arXiv:1609.04836, September 2016.
|
| 295 |
+
|
| 296 |
+
Nitish Srivastava, Geoffrey Hinton, Alex Krizhevsky, Ilya Sutskever, and Ruslan Salakhutdinov. Dropout: a simple way to prevent neural networks from overfitting. The journal of machine learning research, 15(1):1929–1958, 2014.
|
| 297 |
+
|
| 298 |
+
Xu Sun, Zhiyuan Zhang, Xuancheng Ren, Ruixuan Luo, and Liangyou Li. Exploring the Vulnerability of Deep Neural Networks: A Study of Parameter Corruption. arXiv e-prints, art. arXiv:2006.05620, June 2020.
|
| 299 |
+
|
| 300 |
+
Christian Szegedy, Vincent Vanhoucke, Sergey Ioffe, Jonathon Shlens, and Zbigniew Wojna. Rethinking the inception architecture for computer vision, 2015.
|
| 301 |
+
|
| 302 |
+
Mingxing Tan and Quoc V. Le. EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. arXiv e-prints, art. arXiv:1905.11946, May 2019.
|
| 303 |
+
|
| 304 |
+
Colin Wei and Tengyu Ma. Improved sample complexities for deep neural networks and robust classification via an all-layer margin. In International Conference on Learning Representations, 2020.
|
| 305 |
+
|
| 306 |
+
Longhui Wei, An Xiao, Lingxi Xie, Xin Chen, Xiaopeng Zhang, and Qi Tian. Circumventing Outliers of AutoAugment with Knowledge Distillation. arXiv e-prints, art. arXiv:2003.11342, March 2020.
|
| 307 |
+
|
| 308 |
+
Ashia C Wilson, Rebecca Roelofs, Mitchell Stern, Nati Srebro, and Benjamin Recht. The marginal value of adaptive gradient methods in machine learning. In Advances in neural information processing systems, pp. 4148–4158, 2017.
|
| 309 |
+
|
| 310 |
+
Han Xiao, Kashif Rasul, and Roland Vollgraf. Fashion-mnist: a novel image dataset for benchmarking machine learning algorithms. CoRR, abs/1708.07747, 2017. URL http://arxiv.org/ abs/1708.07747.
|
| 311 |
+
|
| 312 |
+
Yoshihiro Yamada, Masakazu Iwamura, and Koichi Kise. Shakedrop regularization. CoRR, abs/1802.02375, 2018. URL http://arxiv.org/abs/1802.02375.
|
| 313 |
+
|
| 314 |
+
Sergey Zagoruyko and Nikos Komodakis. Wide residual networks. CoRR, abs/1605.07146, 2016. URL http://arxiv.org/abs/1605.07146.
|
| 315 |
+
|
| 316 |
+
Chiyuan Zhang, Samy Bengio, Moritz Hardt, Benjamin Recht, and Oriol Vinyals. Understanding deep learning requires rethinking generalization. CoRR, abs/1611.03530, 2016. URL http: //arxiv.org/abs/1611.03530.
|
| 317 |
+
|
| 318 |
+
Fan Zhang, Meng Li, Guisheng Zhai, and Yizhao Liu. Multi-branch and multi-scale attention learning for fine-grained visual categorization, 2020.
|
| 319 |
+
|
| 320 |
+
Hongyi Zhang, Moustapha Cisse, Yann N Dauphin, and David Lopez-Paz. mixup: Beyond empirical risk minimization. arXiv preprint arXiv:1710.09412, 2017.
|
| 321 |
+
|
| 322 |
+
Zhilu Zhang and Mert R. Sabuncu. Generalized cross entropy loss for training deep neural networks with noisy labels. CoRR, abs/1805.07836, 2018. URL http://arxiv.org/abs/1805. 07836.
|
| 323 |
+
|
| 324 |
+
# A APPENDIX
|
| 325 |
+
|
| 326 |
+
# A.1 PAC BAYESIAN GENERALIZATION BOUND
|
| 327 |
+
|
| 328 |
+
Below, we state a generalization bound based on sharpness.
|
| 329 |
+
|
| 330 |
+
Theorem 2. For any $\rho > 0$ and any distribution $\mathcal { D }$ , with probability $1 - \delta$ over the choice of the training set $s \sim \mathcal { D }$ ,
|
| 331 |
+
|
| 332 |
+
$$
|
| 333 |
+
L _ { \mathcal { D } } ( \boldsymbol { w } ) \leq \operatorname* { m a x } _ { \| \epsilon \| _ { 2 } \leq \rho } L _ { S } ( \boldsymbol { w } + \epsilon ) + \sqrt { \frac { k \log \left( 1 + \frac { \| \boldsymbol { w } \| _ { 2 } ^ { 2 } } { \rho ^ { 2 } } \left( 1 + \sqrt { \frac { \log ( n ) } { k } } \right) ^ { 2 } \right) + 4 \log \frac { n } { \delta } + \tilde { O } ( 1 ) } { n - 1 } }
|
| 334 |
+
$$
|
| 335 |
+
|
| 336 |
+
where $n = | S |$ , $k$ is the number of parameters and we assumed $L _ { \mathcal { D } } ( \boldsymbol { w } ) \leq \mathbb { E } _ { \epsilon _ { i } \sim \mathcal { N } ( 0 , \rho ) } [ L _ { \mathcal { D } } ( \boldsymbol { w } + \boldsymbol { \epsilon } ) ] ,$ .
|
| 337 |
+
|
| 338 |
+
The condition $L _ { \mathcal { D } } ( \boldsymbol { w } ) \le \mathbb { E } _ { \epsilon _ { i } \sim \mathcal { N } ( 0 , \rho ) } [ L _ { \mathcal { D } } ( \boldsymbol { w } + \boldsymbol { \epsilon } ) ]$ means that adding Gaussian perturbation should not decrease the test error. This is expected to hold in practice for the final solution but does not necessarily hold for any $\textbf { \em w }$ .
|
| 339 |
+
|
| 340 |
+
Proof. First, note that the right hand side of the bound in the theorem statement is lower bounded by $\sqrt { k \log ( 1 + \| \pmb { w } \| _ { 2 } ^ { 2 } / \rho ^ { 2 } ) / ( 4 n ) }$ which is greater than 1 when $\| \pmb { w } \| _ { 2 } ^ { 2 } > \rho ^ { 2 } ( \exp ( 4 n / k ) - 1 )$ . In that case, the right hand side becomes greater than 1 in which case the inequality holds trivially. Therefore, in the rest of the proof, we only consider the case when $\| \pmb { w } \| _ { 2 } ^ { 2 } \leq \rho ^ { \bar { 2 } } ( \mathrm { e x p } ( 4 n / k ) - 1 )$ .
|
| 341 |
+
|
| 342 |
+
The proof technique we use here is inspired from Chatterji et al. (2020). Using PAC-Bayesian generalization bound McAllester (1999) and following Dziugaite & Roy (2017), the following generalization bound holds for any prior $\mathcal { P }$ over parameters with probability $1 - \delta$ over the choice of the training set $s$ , for any posterior $\mathcal { Q }$ over parameters:
|
| 343 |
+
|
| 344 |
+
$$
|
| 345 |
+
\mathbb { E } _ { \pmb { w } \sim \mathcal { A } } [ L _ { \mathcal { D } } ( \pmb { w } ) ] \le \mathbb { E } _ { \pmb { w } \sim \mathcal { Q } } [ L _ { S } ( \pmb { w } ) ] + \sqrt { \frac { K L ( \mathcal { Q } | | \mathcal { P } ) + \log \frac { n } { \delta } } { 2 ( n - 1 ) } }
|
| 346 |
+
$$
|
| 347 |
+
|
| 348 |
+
Moreover, if $\mathscr P = \mathcal N ( \mu _ { P } , \sigma _ { P } ^ { 2 } I )$ and $\mathcal { Q } = \mathcal { N } ( \pmb { \mu } _ { Q } , \sigma _ { Q } ^ { 2 } \pmb { I } )$ , then the KL divergence can be written as follows:
|
| 349 |
+
|
| 350 |
+
$$
|
| 351 |
+
K L ( \mathcal { P } | | \mathcal { Q } ) = \frac { 1 } { 2 } \bigg [ \frac { k \sigma _ { Q } ^ { 2 } + \| \pmb { \mu _ { P } } - \pmb { \mu _ { Q } } \| _ { 2 } ^ { 2 } } { \sigma _ { P } ^ { 2 } } - k + k \log \bigg ( \frac { \sigma _ { P } ^ { 2 } } { \sigma _ { Q } ^ { 2 } } \bigg ) \bigg ]
|
| 352 |
+
$$
|
| 353 |
+
|
| 354 |
+
Given a posterior standard deviation $\sigma _ { Q }$ , one could choose a prior standard deviation $\sigma _ { P }$ to minimize the above KL divergence and hence the generalization bound by taking the derivative10 of the above
|
| 355 |
+
|
| 356 |
+
KL with respect to $\sigma _ { P }$ and setting it to zero. We would then have $\sigma _ { P } ^ { * } { } ^ { 2 } = \sigma _ { Q } ^ { 2 } + \| \pmb { \mu } _ { P } - \pmb { \mu } _ { Q } \| _ { 2 } ^ { 2 } / k$ However, since $\sigma _ { P }$ should be chosen before observing the training data $s$ and $\mu _ { Q } , \sigma _ { Q }$ could depend on $s$ , we are not allowed to optimize $\sigma _ { P }$ in this way. Instead, one can have a set of predefined values for $\sigma _ { P }$ and pick the best one in that set. See Langford & Caruana (2002) for the discussion around this technique. Given fixed $a , b > 0$ , let $T = \{ c \exp ( ( 1 - j ) / k ) | j \in \mathbb { N } \}$ be that predefined set of values for $\sigma _ { P } ^ { \dot { 2 } }$ . If for any $j \in \mathbb N$ , the above PAC-Bayesian bound holds for $\sigma _ { P } ^ { 2 } = \dot { c } \exp ( ( 1 -$ $j ) / k )$ with probability $1 - \delta _ { j }$ with $\begin{array} { r } { \delta _ { j } ~ = ~ \frac { 6 \delta } { \pi ^ { 2 } j ^ { 2 } } } \end{array}$ π2j2 , then by the union bound, all above bounds hold simultaneously with probability at least $\begin{array} { r } { 1 - \bar { \sum _ { j = 1 } ^ { \infty } } \frac { 6 \delta } { \pi ^ { 2 } j ^ { 2 } } = 1 - \delta } \end{array}$ .
|
| 357 |
+
|
| 358 |
+
Let $\sigma _ { Q } = \rho$ , $\pmb { \mu } _ { Q } = \pmb { w }$ and $\pmb { \mu } _ { P } = \mathbf { 0 }$ . Therefore, we have:
|
| 359 |
+
|
| 360 |
+
$$
|
| 361 |
+
\sigma _ { Q } ^ { 2 } + \| \pmb { \mu } _ { P } - \pmb { \mu } _ { Q } \| _ { 2 } ^ { 2 } / k \leq \rho ^ { 2 } + \| \pmb { w } \| _ { 2 } ^ { 2 } / k \leq \rho ^ { 2 } ( 1 + \exp ( 4 n / k ) )
|
| 362 |
+
$$
|
| 363 |
+
|
| 364 |
+
We now consider the bound that corresponds to $j = \lfloor 1 - k \log ( ( \rho ^ { 2 } + \| \pmb { w } \| _ { 2 } ^ { 2 } / k ) / c ) \rfloor$ . We can ensure that $j \in \mathbb N$ using inequality equation 7 and by setting $c = \rho ^ { 2 } ( 1 + \exp ( 4 n / k ) )$ . Furthermore, for $\sigma _ { P } ^ { 2 } = c \exp ( ( 1 - j ) / k )$ , we have:
|
| 365 |
+
|
| 366 |
+
$$
|
| 367 |
+
\rho ^ { 2 } + \| \pmb { w } \| _ { 2 } ^ { 2 } / k \leq \sigma _ { P } ^ { 2 } \leq \exp ( 1 / k ) \left( \rho ^ { 2 } + \| \pmb { w } \| _ { 2 } ^ { 2 } / k \right)
|
| 368 |
+
$$
|
| 369 |
+
|
| 370 |
+
Therefore, using the above value for $\sigma _ { P }$ , $\mathrm { K L }$ divergence can be bounded as follows:
|
| 371 |
+
|
| 372 |
+
$$
|
| 373 |
+
\begin{array} { r l } & { K L ( \mathcal { P } | | \mathcal { X } ) = \frac { 1 } { 2 } \bigg [ \frac { k \sigma _ { Q } ^ { 2 } + \| \mu _ { P } - \mu _ { Q } \| _ { 2 } ^ { 2 } } { \sigma _ { P } ^ { 2 } } - k + k \log \bigg ( \frac { \sigma _ { P } ^ { 2 } } { \sigma _ { Q } ^ { 2 } } \bigg ) \bigg ] } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & { \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad \quad } \\ & \quad \quad \quad \ \end{array}
|
| 374 |
+
$$
|
| 375 |
+
|
| 376 |
+
Given the bound that corresponds to $j$ holds with probability $1 - \delta _ { j }$ for $\begin{array} { r } { \delta _ { j } = \frac { 6 \delta } { \pi ^ { 2 } j ^ { 2 } } } \end{array}$ 6δπ2j2 , the log term in the bound can be written as:
|
| 377 |
+
|
| 378 |
+
$$
|
| 379 |
+
\begin{array} { r l } & { \log \frac { n } { \delta _ { j } } = \log \frac { n } { \delta } + \log \frac { \pi ^ { 2 } j ^ { 2 } } { 6 } } \\ & { \qquad \le \log \frac { n } { \delta } + \log \frac { \pi ^ { 2 } k ^ { 2 } \log ^ { 2 } ( c / ( \rho ^ { 2 } + \| w \| _ { 2 } ^ { 2 } / k ) ) } { 6 } } \\ & { \qquad \le \log \frac { n } { \delta } + \log \frac { \pi ^ { 2 } k ^ { 2 } \log ^ { 2 } ( c / \rho ^ { 2 } ) } { 6 } } \\ & { \qquad \le \log \frac { n } { \delta } + \log \frac { \pi ^ { 2 } k ^ { 2 } \log ^ { 2 } ( 1 + \exp ( 4 n / k ) ) } { 6 } } \\ & { \qquad \le \log \frac { n } { \delta } + \log \frac { \pi ^ { 2 } k ^ { 2 } ( 2 + 4 n / k ) ^ { 2 } } { 6 } } \\ & { \qquad \le \log \frac { n } { \delta } + \log \frac { \pi ^ { 2 } k ^ { 2 } ( 2 + 4 n / k ) ^ { 2 } } { 6 } } \\ & { \qquad \le \log \frac { n } { \delta } + 2 \log ( 6 n + 3 k ) } \end{array}
|
| 380 |
+
$$
|
| 381 |
+
|
| 382 |
+
Therefore, the generalization bound can be written as follows:
|
| 383 |
+
|
| 384 |
+
$$
|
| 385 |
+
\begin{array} { r } { \tilde { \Sigma } _ { \epsilon _ { i } \sim N ( 0 , \sigma ) } [ L _ { \mathcal { D } } ( w + \epsilon ) ] \leq \mathbb { E } _ { \epsilon _ { i } \sim \mathcal { N } ( 0 , \sigma ) } [ L _ { S } ( w + \epsilon ) ] + \sqrt { \frac { \frac { 1 } { 4 } k \log \left( 1 + \frac { \| w \| _ { 2 } ^ { 2 } } { k \sigma ^ { 2 } } \right) + \frac { 1 } { 4 } + \log \frac { n } { \delta } + 2 \log \left( 6 n + \sigma \right) } { n - 1 } } } \end{array}
|
| 386 |
+
$$
|
| 387 |
+
|
| 388 |
+
In the above bound, we have $\epsilon _ { i } \sim \mathcal { N } ( 0 , \sigma )$ . Therefore, $\| \epsilon \| _ { 2 } ^ { 2 }$ has chi-square distribution and by Lemma 1 in Laurent & Massart (2000), we have that for any positive $t$ :
|
| 389 |
+
|
| 390 |
+
$$
|
| 391 |
+
P ( \| \epsilon \| _ { 2 } ^ { 2 } - k \sigma ^ { 2 } \ge 2 \sigma ^ { 2 } \sqrt { k t } + 2 t \sigma ^ { 2 } ) \le \exp ( - t )
|
| 392 |
+
$$
|
| 393 |
+
|
| 394 |
+
Therefore, with probability $1 - 1 / \sqrt { n }$ we have that:
|
| 395 |
+
|
| 396 |
+
$$
|
| 397 |
+
\| \epsilon \| _ { 2 } ^ { 2 } \leq \sigma ^ { 2 } ( 2 \ln ( { \sqrt { n } } ) + k + 2 { \sqrt { k \ln ( { \sqrt { n } } ) } } ) \leq \sigma ^ { 2 } k \left( 1 + { \sqrt { \frac { \ln ( n ) } { k } } } \right) ^ { 2 } \leq \rho ^ { 2 }
|
| 398 |
+
$$
|
| 399 |
+
|
| 400 |
+
Substituting the above value for $\sigma$ back to the inequality and using theorem’s assumption gives us following inequality:
|
| 401 |
+
|
| 402 |
+
$$
|
| 403 |
+
\begin{array} { r l } & { L _ { \mathcal { G } } ( w ) \leq ( 1 - 1 / \sqrt { n } ) \displaystyle \operatorname* { m a x } _ { \| c \| \geq \rho } L s ( w + \epsilon ) + 1 / \sqrt { n } } \\ & { \quad \quad + \sqrt { \frac { 1 } { 4 } k \log \left( 1 + \frac { \| w \| _ { 2 } ^ { 2 } } { \rho ^ { 2 } } \left( 1 + \sqrt { \frac { \log ( n ) } { k } } \right) ^ { 2 } \right) + \log \frac { n } { \delta } + 2 \log ( 6 n + 3 k ) } } \\ & { \quad \quad \leq \displaystyle \operatorname* { m a x } _ { \| \epsilon \| \geq \rho } L s ( w + \epsilon ) + } \\ & { \quad \quad + \sqrt { \displaystyle \operatorname* { k i m } _ { \rho } \left( 1 + \frac { \| w \| _ { 2 } ^ { 2 } } { \rho ^ { 2 } } \left( 1 + \sqrt { \frac { \log ( n ) } { k } } \right) ^ { 2 } \right) + 4 \log \frac { n } { \delta } + 8 \log ( 6 n + 3 k ) } } \end{array}
|
| 404 |
+
$$
|
| 405 |
+
|
| 406 |
+
# B ADDITIONAL EXPERIMENTAL RESULTS
|
| 407 |
+
|
| 408 |
+
# B.1 SVHN AND FASHION-MNIST
|
| 409 |
+
|
| 410 |
+
We report in table 5 results obtained on SVHN and Fashion-MNIST datasets. On these datasets, SAM allows a simple WideResnet to reach or push state-of-the-art accuracy $0 . 9 9 \%$ error rate for SVHN, $3 . 5 9 \%$ for Fashion-MNIST).
|
| 411 |
+
|
| 412 |
+
For SVHN, we used all the available data (73257 digits for training $\sec + 5 3 1 1 3 1$ additional samples). For auto-augment, we use the best policy found on this dataset as described in (Cubuk et al., 2018) plus cutout (Devries & Taylor, 2017). For Fashion-MNIST, the auto-augmentation line correspond to cutout only.
|
| 413 |
+
|
| 414 |
+
Table 5: Results on SVHN and Fashion-MNIST.
|
| 415 |
+
|
| 416 |
+
<table><tr><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1>SVHN</td><td rowspan=1 colspan=1>Fashion-MNIST</td></tr><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Augmentation</td><td rowspan=1 colspan=1>SAM Baseline</td><td rowspan=1 colspan=1>SAM Baseline</td></tr><tr><td rowspan=1 colspan=1>Wide-ResNet-28-10Wide-ResNet-28-10</td><td rowspan=1 colspan=1>BasicAuto augment</td><td rowspan=1 colspan=1>1.42±0.02 1.58±0.030.99±0.01 1.14±0.04</td><td rowspan=1 colspan=1>3.98±0.05 4.57±0.073.61±0.06 3.86±0.14</td></tr><tr><td rowspan=1 colspan=1>Shake-Shake (26 2x96d)Shake-Shake (26 2x96d)</td><td rowspan=1 colspan=1>BasicAuto augment</td><td rowspan=1 colspan=1>1.44±0.02 1.58±0.051.07±0.02 1.03±0.02</td><td rowspan=1 colspan=1>3.97±0.09 4.37±0.063.59±0.01 3.76±0.07</td></tr></table>
|
| 417 |
+
|
| 418 |
+
# C EXPERIMENT DETAILS
|
| 419 |
+
|
| 420 |
+
# C.1 HYPERPARAMETERS FOR EXPERIMENTS
|
| 421 |
+
|
| 422 |
+
We report in table 6 the hyper-parameters selected by gridsearch for the CIFAR experiments, and the ones for SVHN and Fashion-MNIST in 7. For CIFAR10, CIFAR100, SVHN and Fashion-MNIST, we use a batch size of 256 and determine the learning rate and weight decay used to train each model via a joint grid search prior to applying SAM; all other model hyperparameter values are identical to those used in prior work.
|
| 423 |
+
|
| 424 |
+
For the Imagenet results (Resnet models), the models are trained for 100, 200 or 400 epochs on Google Cloud TPUv3 32 cores with a batch size of 4096. The initial learning rate is set to 1.0 and decayed using a cosine schedule. Weight decay is set to 0.0001 with SGD optimizer and momentum $= 0 . 9$ .
|
| 425 |
+
|
| 426 |
+
Table 6: Hyper-parameter used to produce the CIFAR- $\{ 1 0 , 1 0 0 \}$ results
|
| 427 |
+
|
| 428 |
+
<table><tr><td>CIFAR Dataset</td><td>LR</td><td>WD</td><td>p (CIFAR-10)</td><td>p (CIFAR-100)</td></tr><tr><td>WRN 28-10 (200 epochs)</td><td>0.1</td><td>0.0005</td><td>0.05</td><td>0.1</td></tr><tr><td>WRN 28-10 (1800 epochs)</td><td>0.05</td><td>0.001</td><td>0.05</td><td>0.1</td></tr><tr><td>WRN26-2x6ShakeShake</td><td>0.02</td><td>0.0010</td><td>0.02</td><td>0.05</td></tr><tr><td>Pyramid vanilla</td><td>0.05</td><td>0.0005</td><td>0.05</td><td>0.2</td></tr><tr><td>Pyramid ShakeDrop (CIFAR-10)</td><td>0.02</td><td>0.0005</td><td>0.05</td><td>1</td></tr><tr><td>Pyramid ShakeDrop (CIFAR-100)</td><td>0.05</td><td>0.0005</td><td>1</td><td>0.05</td></tr></table>
|
| 429 |
+
|
| 430 |
+
Table 7: Hyper-parameter used to produce the SVHN and Fashion-MNIST results
|
| 431 |
+
|
| 432 |
+
<table><tr><td></td><td>LR</td><td>WD</td><td>p</td></tr><tr><td rowspan="2">SVHN</td><td>WRN 0.01</td><td>0.0005</td><td>0.01</td></tr><tr><td>ShakeShake 0.01</td><td>0.0005</td><td>0.01</td></tr><tr><td rowspan="2">Fashion</td><td>WRN 0.1</td><td>0.0005</td><td>0.05</td></tr><tr><td>ShakeShake 0.1</td><td>0.0005</td><td>0.02</td></tr></table>
|
| 433 |
+
|
| 434 |
+
Finally, for the noisy label experiments, we also found $\rho$ by gridsearch, computing the accuracy on a (non-noisy) validation set composed of a random subset of $10 \%$ of the usual CIFAR training samples. We report the validation accuracy of the bootstrapped version of SAM for different levels of noise and different $\rho$ in table 8.
|
| 435 |
+
|
| 436 |
+
<table><tr><td></td><td>20%</td><td>40%</td><td>60%</td><td>80%</td></tr><tr><td>0</td><td>15.0%</td><td>31.2%</td><td>52.3%</td><td>73.5%</td></tr><tr><td>0.01</td><td>13.7%</td><td>28.7%</td><td>50.1%</td><td>72.9%</td></tr><tr><td>0.02</td><td>12.8%</td><td>27.8%</td><td>48.9%</td><td>73.1%</td></tr><tr><td>0.05</td><td>11.6%</td><td>25.6%</td><td>47.1%</td><td>21.0%</td></tr><tr><td>0.1</td><td>4.6%</td><td>6.0%</td><td>8.7%</td><td>56.1%</td></tr><tr><td>0.2</td><td>5.3%</td><td>7.4%</td><td>23.3%</td><td>77.1%</td></tr><tr><td>0.5</td><td>17.6%</td><td>40.9%</td><td>80.1%</td><td>89.9%</td></tr></table>
|
| 437 |
+
|
| 438 |
+
Table 8: Validation accuracy of the bootstrapped-SAM for different levels of noise and different $\rho$
|
| 439 |
+
|
| 440 |
+
# C.2 FINETUNING DETAILS
|
| 441 |
+
|
| 442 |
+
Weights are initialized to the values provided by the publicly available checkpoints, except the last dense layer, which change size to accomodate the new number of classes, that is randomly initialized. We train all models with weight decay $1 e ^ { - 5 }$ as suggested in (Tan & Le, 2019), but we reduce the learning rate to 0.016 as the models tend to diverge for higher values. We use a batch size of 1024 on Google Cloud TPUv3 64 cores and cosine learning rate decay. Because other works train with batch size of 256, we train for 5k steps instead of $2 0 \mathrm { k }$ . We freeze the batch norm statistics and use them for normalization, effectively using the batch norm as we would at test time 11 We train the models using SGD with momentum 0.9 and cosine learning rate decay. For Efficientnet-L2, we use this time a batch size 512 to save memory and adjusted the number of training steps accordingly. For CIFAR, we use the same autoaugment policy as in the previous experiments. We do not use data augmentation for the other datasets, applying the same preprocessing as for the Imagenet experiments. We also scale down the learning rate to 0.008 as the batch size is now twice as small. We used Google Cloud TPUv3 128 cores. All other parameters stay the same. For Imagenet, we trained both models from checkpoint for 10 epochs using a learning rate of 0.1 and $\rho = 0 . 0 5$ . We do not randomly initialize the last layer as we did for the other datasets, but instead use the weights included in the checkpoint.
|
| 443 |
+
|
| 444 |
+
# C.3 EXPERIMENTAL RESULTS WITH $\rho = 0 . 0 5$
|
| 445 |
+
|
| 446 |
+
A big sensitivity to the choice of hyper-parameters would make a method less easy to use. To demonstrate that SAM performs even when $\rho$ is not finely tuned, we compiled the table for the CIFAR and the finetuning experiments using $\rho = 0 . 0 5$ . Please note that we already used $\rho = 0 . 0 5$ for all Imagenet experiments. We report those scores in table 9 and 10.
|
| 447 |
+
|
| 448 |
+
Table 9: Results for the Cifar10/Cifar100 experiments, using $\rho \quad = \quad 0 . 0 5$ for all models/datasets/augmentations
|
| 449 |
+
|
| 450 |
+
<table><tr><td rowspan=1 colspan=2></td><td rowspan=1 colspan=1>Cifar10</td><td rowspan=1 colspan=3>Cifar100</td></tr><tr><td rowspan=1 colspan=2>Model Augmentation</td><td rowspan=1 colspan=1>p=0.05 SGD</td><td rowspan=1 colspan=3>rho=0.05 SGD</td></tr><tr><td rowspan=4 colspan=1>WRN-28-10 (200 epochs)WRN-28-10 (200 epochs)WRN-28-10 (200 epochs)</td><td rowspan=4 colspan=1>BasicCutoutAA</td><td rowspan=4 colspan=1>2.7 3.52.3 2.62.1 2.3</td><td rowspan=1 colspan=3>16.5 18.8</td></tr><tr><td rowspan=1 colspan=1></td><td></td><td rowspan=1 colspan=1>14.9 16.9</td></tr><tr><td rowspan=2 colspan=1></td><td></td><td></td></tr><tr><td rowspan=1 colspan=3>13.6 15.8</td></tr><tr><td rowspan=2 colspan=1>WRN-28-10 (1800 epochs)WRN-28-10 (1800 ep0chs)WRN-28-10 (1800 epochs)</td><td rowspan=2 colspan=1>BasicCutoutAA</td><td rowspan=2 colspan=1>2.4 3.52.1 2.71.6 2.2</td><td rowspan=1 colspan=2>16.3</td><td rowspan=1 colspan=1>16.3 19.1</td></tr><tr><td rowspan=1 colspan=3>14.0 17.412.8 16.1</td><td rowspan=1 colspan=2>14.0 17.4</td></tr><tr><td rowspan=2 colspan=1>WRN 26-2x6 ssWRN 26-2x6 ssWRN 26-2x6 ss</td><td rowspan=2 colspan=1>BasicCutoutAA</td><td rowspan=2 colspan=1>2.4 2.72.0 2.31.7 1.9</td><td rowspan=1 colspan=3>15.1 17.0</td></tr><tr><td rowspan=1 colspan=3>14.2 15.712.8 14.1</td></tr><tr><td rowspan=3 colspan=1>PyramidNetPyramidNetPyramidNet</td><td rowspan=3 colspan=1>BasicCutoutAA</td><td rowspan=3 colspan=1>2.1 4.01.6 2.51.4 1.9</td><td rowspan=1 colspan=3>15.4 19.7</td></tr><tr><td rowspan=1 colspan=3>13.1 16.4</td></tr><tr><td rowspan=1 colspan=3>12.1 14.6</td></tr><tr><td rowspan=3 colspan=1>PyramidNet+ShakeDropPyramidNet+ShakeDropPyramidNet+ShakeDrop</td><td rowspan=3 colspan=1>BasicCutoutAA</td><td rowspan=1 colspan=1>2.1 2.5</td><td rowspan=1 colspan=3>13.3 14.5</td></tr><tr><td rowspan=2 colspan=1>1.6 1.91.4 1.6</td><td rowspan=1 colspan=3>11.3 11.8</td></tr><tr><td rowspan=1 colspan=3>10.3 10.6</td></tr></table>
|
| 451 |
+
|
| 452 |
+
Table 10: Results for the the finetuning experiments, using $\rho = 0 . 0 5$ for all datasets.
|
| 453 |
+
|
| 454 |
+
<table><tr><td>Dataset</td><td>Efficientnet-b7 + SAM (optimal)</td><td>Efficientnet-b7 + SAM (p= 0.05)</td><td>Efficientnet-b7</td></tr><tr><td>FGVC_Aircraft</td><td>6.80</td><td>7.06</td><td>8.15</td></tr><tr><td>Flowers</td><td>0.63</td><td>0.81</td><td>1.16</td></tr><tr><td>Oxford_IIIT_Pets</td><td>3.97</td><td>4.15</td><td>4.24</td></tr><tr><td>Stanford_Cars</td><td>5.18</td><td>5.57</td><td>5.94</td></tr><tr><td>cifar10</td><td>0.88</td><td>0.88</td><td>0.95</td></tr><tr><td>cifar100</td><td>7.44</td><td>7.56</td><td>7.68</td></tr><tr><td>Birdsnap</td><td>13.64</td><td>13.64</td><td>14.30</td></tr><tr><td>Food101</td><td>7.02</td><td>7.06</td><td>7.17</td></tr></table>
|
| 455 |
+
|
| 456 |
+
# C.4 ABLATION OF THE SECOND ORDER TERMS
|
| 457 |
+
|
| 458 |
+
As described in section 2, computing the gradient of the sharpness aware objective yield some second order terms that are more expensive to compute. To analyze this ablation more in depth, we trained a Wideresnet- $4 0 { \mathrm { x } } 2 $ on CIFAR-10 using SAM with and without discarding the second order terms during training. We report the cosine similarity of the two updates in figure 5, along the training trajectory of both experiments. We also report the training error rate (evaluated at $\pmb { w } + \hat { \epsilon } ( \pmb { w } ) )$ ) and the test error rate (evaluated at $\pmb { w }$ ).
|
| 459 |
+
|
| 460 |
+
We observe that during the first half of the training, discarding the second order terms does not impact the general direction of the training, as the cosine similarity between the first and second order updates are very close to 1. However, when the model nears convergence, the similarity between both types of updates becomes weaker. Fortunately, the model trained without the second order terms reaches a lower test error, showing that the most efficient method is also the one providing the best generalization on this example. The reason for this is quite unclear and should be analyzed in follow up work.
|
| 461 |
+
|
| 462 |
+

|
| 463 |
+
Figure 4: Training and test error for the first and second order version of the algorithm.
|
| 464 |
+
|
| 465 |
+

|
| 466 |
+
Figure 5: Cosine similarity between the first and second order updates.
|
| 467 |
+
|
| 468 |
+
# C.5 CHOICE OF P-NORM
|
| 469 |
+
|
| 470 |
+
Our theorem is derived for $p = 2$ , although generalizations can be considered for $p \in [ 1 , + \infty ]$ (the expression of the bound becoming way more involved). Empirically, we validate that the choice $p = 2$ is optimal by training a wide resnet on cifar10 with SAM for $p = \infty$ (in which case we have $\hat { \epsilon } ( \pmb { w } ) = \bar { \rho } \mathrm { s i g n } ( \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) ) )$ and $p = 2$ (giving $\begin{array} { r } { \hat { \pmb { \epsilon } } ( \pmb { w } ) = \frac { \rho } { | | \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) | | _ { 2 } ^ { 2 } } \big ( \nabla _ { \pmb { w } } L _ { S } ( \pmb { w } ) \big ) \big ) } \end{array}$ . We do not consider the case $p = 1$ which would give us a perturbation on a single weight. As an additional ablation study, we also use random weight perturbations of a fixed Euclidean norm: $\begin{array} { r } { \hat { \epsilon } ( w ) = \frac { \rho } { | | z | | _ { 2 } ^ { 2 } } z } \end{array}$ with $\boldsymbol { z } \sim \mathcal { N } ( \mathbf { 0 } , \boldsymbol { I } _ { d } )$ . We report the test accuracy of the model in figure 6.
|
| 471 |
+
|
| 472 |
+

|
| 473 |
+
Figure 6: Test accuracy for a wide resnet trained on CIFAR10 with SAM, for different perturbation norms.
|
| 474 |
+
|
| 475 |
+
We observe that adversarial perturbations outperform random perturbations, and that using $p = 2$ yield superior accuracy on this example.
|
| 476 |
+
|
| 477 |
+
# C.6 SEVERAL ITERATIONS IN THE INNER MAXIMIZATION
|
| 478 |
+
|
| 479 |
+
To empirically verify that the linearization of the inner problem is sensible, we trained a WideResnet on the CIFAR datasets using a variant of SAM that performs several iterations of projected gradient ascent to estimate max $L ( w + \epsilon )$ . We report the evolution of max $L ( w + \epsilon ) - L ( w )$ during training (where $L$ stands for the training error rate computed on the current batch) in Figure 7, along with the test accuracy and the estimated sharpness $\begin{array} { r } { ( \operatorname* { m a x } _ { \epsilon } L ( w + \epsilon ) - L ( w ) ) } \end{array}$ at the end of training in Table 11; we report means and standard deviations across 20 runs.
|
| 480 |
+
|
| 481 |
+
For most of the training, one projected gradient step (as used in standard SAM) is sufficient to obtain a good approximation of the $\epsilon$ found with multiple inner maximization steps. We however observe that this approximation becomes weaker near convergence, where doing several iterations of projected gradient ascent yields a better $\epsilon$ (for example, on CIFAR-10, the maximum loss found on each batch is about $3 \%$ more when doing 5 steps of inner maximization, compared to when doing a single step). That said, as seen in Table 11, the test accuracy is not strongly affected by the number of inner maximization iterations, though on CIFAR-100 it does seem that several steps outperform a single step in a statistically significant way.
|
| 482 |
+
|
| 483 |
+

|
| 484 |
+
Figure 7: Evolution of $\operatorname* { m a x } _ { \epsilon } L ( w + \epsilon ) - L ( w )$ vs. training step, for different numbers of inner projected gradient steps.
|
| 485 |
+
|
| 486 |
+
<table><tr><td rowspan="2">Numberof projected gradient steps</td><td colspan="2">CIFAR-10</td><td colspan="2">CIFAR-100</td></tr><tr><td>Test error</td><td>Estimated sharpness</td><td>Test error</td><td>Estimated sharpness</td></tr><tr><td>1</td><td>2.77±0.03</td><td>0.17±0.03</td><td>16.72±0.08</td><td>0.82±0.05</td></tr><tr><td>2</td><td>2.76±0.03</td><td>0.82±0.03</td><td>16.59±0.08</td><td>1.83±0.05</td></tr><tr><td>3</td><td>2.73±0.04</td><td>1.49±0.05</td><td>16.62±0.09</td><td>2.36±0.03</td></tr><tr><td>5</td><td>2.77±0.03</td><td>2.26±0.05</td><td>16.60±0.06</td><td>2.82±0.04</td></tr></table>
|
| 487 |
+
|
| 488 |
+
Table 11: Test error rate and estimated sharpness $\begin{array} { r } { ( \operatorname* { m a x } _ { \epsilon } L ( w + \epsilon ) - L ( w ) ) } \end{array}$ at the end of the training.
|
md/train/6UdQLhqJyFD/6UdQLhqJyFD.md
ADDED
|
@@ -0,0 +1,412 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PARAMETER EFFICIENT MULTIMODAL TRANSFORMERS FOR VIDEO REPRESENTATION LEARNING
|
| 2 |
+
|
| 3 |
+
Sangho Lee, Youngjae Yu, Gunhee Kim
|
| 4 |
+
Seoul National University
|
| 5 |
+
{sangho.lee,yj.yu}@vision.snu.ac.kr, gunhee@snu.ac.kr
|
| 6 |
+
|
| 7 |
+
Thomas Breuel, Jan Kautz NVIDIA Research {tbreuel,jkautz}@nvidia.com
|
| 8 |
+
|
| 9 |
+
Yale Song
|
| 10 |
+
Microsoft Research
|
| 11 |
+
yalesong@microsoft.com
|
| 12 |
+
|
| 13 |
+
# ABSTRACT
|
| 14 |
+
|
| 15 |
+
The recent success of Transformers in the language domain has motivated adapting it to a multimodal setting, where a new visual model is trained in tandem with an already pretrained language model. However, due to the excessive memory requirements from Transformers, existing work typically fixes the language model and train only the vision module, which limits its ability to learn cross-modal information in an end-to-end manner. In this work, we focus on reducing the parameters of multimodal Transformers in the context of audio-visual video representation learning. We alleviate the high memory requirement by sharing the parameters of Transformers across layers and modalities; we decompose the Transformer into modality-specific and modality-shared parts so that the model learns the dynamics of each modality both individually and together, and propose a novel parameter sharing scheme based on low-rank approximation. We show that our approach reduces parameters of the Transformers up to $9 7 \%$ , allowing us to train our model end-to-end from scratch. We also propose a negative sampling approach based on an instance similarity measured on the CNN embedding space that our model learns together with the Transformers. To demonstrate our approach, we pretrain our model on 30-second clips (480 frames) from Kinetics-700 and transfer it to audio-visual classification tasks.
|
| 16 |
+
|
| 17 |
+
# 1 INTRODUCTION
|
| 18 |
+
|
| 19 |
+
Learning multimodal representation from unlabeled videos has received considerable attention (Baltrušaitis et al., 2018). Audio-visual learning is of particular interest due to the abundance of videos with natural audio-visual co-occurrence (Owens & Efros, 2018; Owens et al., 2018; Arandjelovic & Zisserman, 2018; Ephrat et al., 2018; Gao & Grauman, 2019; Alwassel et al., 2019). However, existing approaches learn localized representations from short videos (hundreds of milliseconds to just under a few seconds), capturing only short-term dependencies in data. While this is useful for certain applications, e.g., source separation (Ephrat et al., 2018) and atomic action recognition (Gu et al., 2018), learning representation that captures long-term dependencies is equally important, e.g., for activity recognition (Kay et al., 2017; Carreira et al., 2019; Sigurdsson et al., 2016). Unfortunately, processing long videos requires large memory resource and capturing long-term dependencies is a long-standing problem (Hochreiter & Schmidhuber, 1997; Cho et al., 2014; Vaswani et al., 2017).
|
| 20 |
+
|
| 21 |
+
In language understanding, strong progress has been made in large-scale learning of contextualized language representations using Transformers (Vaswani et al., 2017; Howard & Ruder, 2018; Peters et al., 2018; Radford et al., 2018; 2019; Devlin et al., 2019; Liu et al., 2019; Yang et al., 2019). Riding on the success of Transformers, several recent works have extended it to the multimodal setting by adding an additional vision module to the Transformer framework (Sun et al., 2019b; Lu et al., 2019). However, these models are typically not end-to-end trained; they rely on a language-pretrained BERT (Devlin et al., 2019), which is fixed throughout, and train only the visual components. While the pretrained BERT helps accelerate convergence and brings reliable extra supervision signal to the vision component, this partial learning setup can be undesirable if the text data comes from different distributions (of topics, dialects, or foreign languages) or if we want to apply it to different modalities (e.g., audio-visual). Unfortunately, end-to-end training of such multimodal Transformer architectures is challenging for most existing compute environments due to the excessive memory requirement.
|
| 22 |
+
|
| 23 |
+

|
| 24 |
+
Figure 1: (Left) Our model consists of CNNs encoding short-term dynamics of each modality and Transformers encoding long-term dynamics of audio-visual information from videos. (Right) To alleviate excessive memory requirements, we propose an efficient parameter sharing scheme based on matrix decomposition with low-rank approximation, which allows us to train our model end-to-end.
|
| 25 |
+
|
| 26 |
+
In this work, we make three key contributions. First, we propose an end-to-end trainable bidirectional transformer architecture that learns contextualized audio-visual representations of long videos. Our model, shown in Figure 1, consists of audio/visual CNNs, audio/visual Transformers, and a multimodal Transformer. The CNNs operate on short (e.g., one second) video clips and are intended to capture short-term dynamics within each modality. The Transformer layers operate on long video sequences (e.g., 30 seconds), capturing long-term dynamics. To enable end-to-end training, we propose a novel parameter reduction technique that shares parts of weight parameters across Transformers and across layers within each Transformer. We show that this results in up to $9 7 \%$ parameter reduction, enabling end-to-end training of our model, with a minimal performance degradation. To the best of our knowledge, our work is the first to report end-to-end trained multimodal Transformers, and the first to apply Transformers for audio-visual representation learning.
|
| 27 |
+
|
| 28 |
+
The quality of negative samples is crucial in contrastive learning, which is part of our learning objective. As our second contribution, we propose a content-aware negative sampling strategy that favors negatives sufficiently similar to a positive instance. Our approach measures the similarity by reusing the CNN embeddings obtained during model training, and thus do not introduce extra parameters to learn. We show that this improves performance over the standard sampling strategies.
|
| 29 |
+
|
| 30 |
+
Our third contribution is a systematic evaluation of different modality fusion strategies. Existing works on multimodal BERT (all using vision-and-language data) typically apply one fusion strategy without thoroughly comparing with alternatives, e.g., some works perform early fusion (Sun et al., 2019b; Su et al., 2020) while others perform mid-level fusion (Lu et al., 2019; Tan & Bansal, 2019). As a result, it is unclear how different fusion methods affect the final performance. In this work, we compare three fusion strategies (early, mid, late) and show the superiority of mid-level fusion.
|
| 31 |
+
|
| 32 |
+
To demonstrate our approach, we pretrain our model on long (30-second) video clips from Kinetics700 (Carreira et al., 2019) and finetune it on various video classification tasks. One benefit of the modular design of our architecture is flexibility: once pretrained, we can use any of the subnetworks for downstream tasks depending on the modalities involved (audio-only, visual-only, audio-visual) and video lengths (short and long). To show this, we evaluate our model on UCF101 (Soomro et al., 2012) and ESC-50 (Gemmeke et al., 2017) for short-term visual/audio classification, and Charades (Sigurdsson et al., 2016) and Kinetics-Sounds (Arandjelovic & Zisserman, 2017) for long-term audio-visual action recognition.
|
| 33 |
+
|
| 34 |
+
# 2 APPROACH
|
| 35 |
+
|
| 36 |
+
Figure 1 shows an overview of the proposed model architecture. The input to our model is a sequence of visual clips $\mathbf { v } _ { 1 : T }$ and the corresponding sequence of audio streams $\mathbf { a } _ { 1 : T }$ . For example, each sequence is a 30 second-long video divided into 30 non-overlapping clips (each clip is one second long). We divide our model into three parts with different characteristics, which are explained below.
|
| 37 |
+
|
| 38 |
+
Local Feature Embedding. We feed each of $T$ video clips to a visual CNN $f _ { V } ( \mathbf { v } _ { t } )$ to obtain $\mathbf { x } _ { 1 : T } ^ { v } \in \mathbb { R } ^ { T \times D }$ , and each audio stream to an audio CNN $f _ { A } ( \mathbf { a } _ { t } )$ to obtain $\mathbf { x } _ { 1 : T } ^ { a } \in \mathbb { R } ^ { T \times D }$ .1 Intuitively, the CNN outputs are temporally local embeddings as they have access to only a short-range temporal window of the entire video sequence. Thus, they are suitable for representing short-range atomic actions (e.g., sit down, raise arms) that constitute long-range events (e.g., gym workout). We use the SlowFast network (Feichtenhofer et al., 2019) with a ResNet-50 backbone (He et al., 2016) as a visual CNN $f _ { V }$ , and a ResNet-50 as an audio CNN $f _ { A }$ . The weights of both CNNs are randomly initialized and trained end-to-end with the Transformer layers.
|
| 39 |
+
|
| 40 |
+
Unimodal Contextualized Embedding. The local feature embeddings capture short-term dynamics but lack long-term contextual information. We use Transformers (Vaswani et al., 2017) to enrich the embeddings with sequence-level context. We start by learning unimodal contextualized representations using the visual Transformer $g _ { V }$ and the audio Transformer $g _ { A }$ , respectively.
|
| 41 |
+
|
| 42 |
+
The Transformer consists of $\mathrm { L }$ layers, each with two sub-layers: a multi-head attention layer and a feed-forward layer. Given an input sequence of embeddings $\mathbf { x } \in \mathbb { R } ^ { T \times D }$ and $A$ attention heads, the $j$ -th head in the attention layer computes the output embedding sequence $\mathbf { a } _ { j } \in \mathbb { R } ^ { T \times \gamma } , \gamma = D / A$ as
|
| 43 |
+
|
| 44 |
+
$$
|
| 45 |
+
{ \bf a } _ { j } = \mathrm { s o f t m a x } \left( \frac { Q _ { j } K _ { j } ^ { \top } } { \sqrt { \gamma } } \right) V _ { j } , \qquad Q _ { j } = { \bf x } W _ { j } ^ { q } , K _ { j } = { \bf x } W _ { j } ^ { k } , V _ { j } = { \bf x } W _ { j } ^ { v }
|
| 46 |
+
$$
|
| 47 |
+
|
| 48 |
+
where $W _ { j . } ^ { q } , W _ { j } ^ { k } , W _ { j . } ^ { v } \in \mathbb { R } ^ { D \times \gamma }$ are weight matrices for computing the (query, key, value) triplet given the input $\mathbf { x }$ . This operation is repeated for each attention head, and the outputs are combined (with concatenation followed by one linear layer with weights $W ^ { b } \in \mathbb { R } ^ { D \times D } )$ , producing $\mathbf { a } \in \mathbb { R } ^ { T \times D }$ . Next, the feed-forward layer takes this intermediate output and computes $\mathbf { o } \in \mathbb { R } ^ { T \times D }$ using a twolayer fully-connected network with weights $W ^ { c } \in \mathbb { R } ^ { D \times E }$ and $W ^ { d } \in \mathbb { R } ^ { E \times D }$ . The output of each sub-layer is computed using a residual function followed by layer normalization (Ba et al., 2016), i.e., LayerNorm $( { \overline { { x } } } + { \mathrm { S u b l a y e r } } ( x ) )$ . In this work, we set the number of layers $L = 6$ , the number of attention heads $A = 1 2$ , the feature dimension $D = 7 6 8$ and the intermediate dimension $E = 3 0 7 2$ . For simplicity, we use this design for all layers across all three Transformers in our model.
|
| 49 |
+
|
| 50 |
+
Before feeding local embeddings $\mathbf { x } ^ { v }$ and $\mathbf { x } ^ { a }$ to unimodal Transformers, we augment them with “positional” embeddings. Specifically, we append to the beginning of each sequence a special vector BOS (beginning of sequence), i.e., $\mathbf { x } _ { 0 } ^ { v }$ for visual and $\mathbf { x } _ { 0 } ^ { a }$ for audio streams; their dimensions are same as $\mathbf { x } _ { t } ^ { v }$ and $\mathbf { x } _ { t } ^ { a }$ , respectively. We also define positional embeddings $\mathbf { p } _ { 0 : T }$ encoding time indices (we call this “time” embedding). This is necessary to preserve information about temporal ordering of local feature embeddings, which is otherwise lost in Eqn. 1. We combine them via layer normalization,
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
\begin{array} { r } { \mathbf { u } _ { t } ^ { v } = \mathrm { L a y e r N o r m } ( \mathbf { x } _ { t } ^ { v } + \mathbf { p } _ { t } ^ { v } ) , \quad \mathbf { u } _ { t } ^ { a } = \mathrm { L a y e r N o r m } ( \mathbf { x } _ { t } ^ { a } + \mathbf { p } _ { t } ^ { a } ) , \quad \forall t \in [ 0 , T ] } \end{array}
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
We initialize $\{ \mathbf { x } _ { 0 } ^ { v } , \mathbf { x } _ { 0 } ^ { a } , \mathbf { p } _ { 0 : T } ^ { v } , \mathbf { p } _ { 0 : T } ^ { a } \}$ to the normal distribution and train them with the rest of the model.
|
| 57 |
+
|
| 58 |
+
We feed the augmented visual embeddings into the visual Transformer $g _ { V }$ and obtain ${ \bf y } _ { 0 : T } ^ { v } =$ $g _ { V } \big ( \mathbf { u } _ { 0 : T } ^ { v } \big )$ , and similarly obtain ${ \bf y } _ { 0 : T } ^ { a } = g _ { A } ( { \bf u } _ { 0 : T } ^ { a } )$ . The embeddings at each time step has a direct access to the entire input sequence regardless of their position (it has a one-step signal path during forward and backward inference). Multiple layers of such feature transformation thus allow the resulting embedding to be deeply contextualized in the time dimension. We denote the output embeddings corresponding to the BOS positions by ${ \sf B O S } _ { g } ^ { v } = { \bf y } _ { 0 } ^ { v }$ and $\mathbf { B } 0 \mathbf { S } _ { g } ^ { a } = \mathbf { y } _ { 0 } ^ { a }$ , and designate them as the summary embeddings representing the sequence of each modality.
|
| 59 |
+
|
| 60 |
+
Multimodal Contextualized Embedding. The unimodal embeddings capture long-term temporal context but miss out on cross-modal information. The final step in forward inference is to use a multimodal Transformer $h _ { A V }$ to obtain embeddings contextualized in the audio-visual space.
|
| 61 |
+
|
| 62 |
+
We first augment the embeddings $\mathbf { y } _ { 0 : T } ^ { v }$ and ${ \bf y } _ { 0 : T } ^ { a }$ with modality and time embeddings. The modality embeddings $\mathbf { m } ^ { v }$ and $\mathbf { m } ^ { a }$ are vectors of the same dimension as $\mathbf { y } _ { t } ^ { v }$ and $\mathbf { y } _ { t } ^ { a }$ , respectively. We share $\mathbf { m } ^ { v }$ (and $\mathbf { m } ^ { a }$ ) across all the unimodal embeddings $\mathbf { y } _ { 0 : T } ^ { v }$ (and ${ \bf y } _ { 0 : T } ^ { a } )$ ; thus, they add modality-discriminative information to the Transformer. We also add time embeddings $\mathbf { p } _ { 0 : T }$ as before; however, unlike in the previous step, we share the same $\mathbf { p } _ { 0 : T }$ between embeddings from the two modalities to correctly indicate the time indices. We augment the modality and time embeddings via layer normalization,
|
| 63 |
+
|
| 64 |
+
$$
|
| 65 |
+
\mathbf { w } _ { t } ^ { v } = \mathrm { L a y e r N o r m } ( \mathbf { y } _ { t } ^ { v } + \mathbf { p } _ { t } + \mathbf { m } ^ { v } ) , \mathbf { w } _ { t } ^ { a } = \mathrm { L a y e r N o r m } ( \mathbf { y } _ { t } ^ { a } + \mathbf { p } _ { t } + \mathbf { m } ^ { a } ) , \forall t \in [ 0 , T ]
|
| 66 |
+
$$
|
| 67 |
+
|
| 68 |
+
We feed the augmented visual embeddings $\mathbf { w } _ { 0 : T } ^ { v }$ and audio embeddings $\mathbf { w } _ { 0 : T } ^ { a }$ to the multimodal Transformer $h _ { A V }$ , one after another, and obtain $\mathbf { \bar { z } } _ { 0 : ( 2 T + 1 ) } = h _ { A V } \big ( \bigl [ \mathbf { w } _ { 0 : T } ^ { v } ; \mathbf { w } _ { 0 : T } ^ { a } \bigr ] \big )$ . We again denote the output embeddings corresponding to the BOS positions by ${ \tt B O S } _ { h } ^ { v } = { \bf z } _ { 0 } ^ { v } ( = { \bf z } _ { 0 } )$ and ${ \tt B O S } _ { h } ^ { a } = { \bf z } _ { 0 } ^ { a } ( =$ ${ \bf z } _ { T + 1 } ,$ ), and use them as summary embeddings encoding multimodal context.
|
| 69 |
+
|
| 70 |
+
We emphasize the importance of feeding $\mathbf { w } _ { 0 : T } ^ { v }$ and ${ \bf w } _ { 0 : T } ^ { a }$ one after another. An alternative would be concatenating them before feeding them to $h _ { A V }$ and obtaining an output $\mathbf { z } _ { 0 : T }$ (instead of $\mathbf { z } _ { 0 : ( 2 T + 1 ) } )$ . However, this restricts the Transformer to access audio-visual embeddings only from the same time slices, which could be problematic when there is a temporally asynchronous relationship between the two modalities (e.g., a visual clip matches with sound captured a few times steps before) (Kazakos et al., 2019; Morgado et al., 2020). By arranging the two sequences one after the other, the Transformer can mix-and-match appropriate audio-visual embeddings in an asynchronous manner. Another practical concern with the alternative approach is that it significantly increases the model size; the weight matrices $W _ { q } , W _ { k } , W _ { v }$ grow quadratically with the input feature dimension $D$ . Serializing the input resolves both issues.
|
| 71 |
+
|
| 72 |
+
# 2.1 SELF-SUPERVISED PRETRAINING OBJECTIVES
|
| 73 |
+
|
| 74 |
+
Task 1: Masked Embedding Prediction (MEP). BERT (Devlin et al., 2019) is trained using the masked language model (MLM) task, which randomly selects input tokens and replaces them with a mask token. The model is then trained to predict the original (unmasked) tokens by solving a classification task with a cross-entropy loss. However, inputs to our model are real-valued audiovisual signals (rather than discrete tokens),2 so applying the MLM task requires input discretization, which causes information loss (Lu et al., 2019; Sun et al., 2019a). We instead train our model to identify the correct visual clip or audio stream compared to a set of negative samples in a contrastive manner, which does not require input discretization.
|
| 75 |
+
|
| 76 |
+
We formulate our MEP task using InfoNCE (Oord et al., 2018), which is the softmax version of the noise contrastive estimation (NCE) (Gutmann & Hyvärinen, 2010). Let $\tilde { \bf { o } } _ { t }$ be the $t$ -th output of any of the three Transformers obtained by masking the $t$ -th input $\mathbf { x } _ { t }$ . Our InfoNCE loss is then defined as
|
| 77 |
+
|
| 78 |
+
$$
|
| 79 |
+
\mathcal { L } _ { \mathrm { N C E } } ( \mathbf { x } , \tilde { \mathbf { o } } ) = - \mathbb { E } _ { \mathbf { x } } \left[ \sum _ { t } \log \frac { \mathrm { I } ( \mathbf { x } _ { t } , \tilde { \mathbf { o } } _ { t } ) } { \mathrm { I } ( \mathbf { x } _ { t } , \tilde { \mathbf { o } } _ { t } ) + \sum _ { j \in \mathrm { n e g } ( t ) } \mathrm { I } ( \mathbf { x } _ { j } , \tilde { \mathbf { o } } _ { t } ) } \right] ,
|
| 80 |
+
$$
|
| 81 |
+
|
| 82 |
+
where $\mathrm { n e g } ( t )$ are negative sample indices and the compatibility function $\mathbf { I } ( \mathbf { x } _ { t } , \tilde { \mathbf { o } } _ { t } )$ is,
|
| 83 |
+
|
| 84 |
+
$$
|
| 85 |
+
\begin{array} { r } { \operatorname { I } ( \mathbf { x } _ { t } , \tilde { \mathbf { o } } _ { t } ) = \exp \left( \mathrm { F F N } ^ { \top } ( \tilde { \mathbf { o } } _ { t } ) W _ { I } \mathbf { x } _ { t } \right) , } \end{array}
|
| 86 |
+
$$
|
| 87 |
+
|
| 88 |
+
where $W _ { I } \in \mathbb { R } ^ { P \times D }$ $P = 2 5 6 )$ and FFN is a two-layer feed-forward network. The use of a non-linear prediction head has shown to improve the quality of the representations learned in a contrastive learning setup (Chen et al., 2020); following the recent work in Transformers (Devlin et al., 2019; Liu et al., 2019; Lan et al., 2020), we use a GELU non-linear activation function (Hendrycks & Gimpel, 2016) in FFN. Optimizing Eqn. 4 enforces $\mathbf { I } ( \mathbf { x } _ { t } , \tilde { \mathbf { o } } _ { t } )$ to approximate the density ratio $\frac { p ( \mathbf { x } _ { t } | \tilde { \mathbf { o } } _ { t } ) } { p ( \mathbf { x } _ { t } ) }$ ; this can be seen as maximizing the mutual information between $\mathbf { x } _ { t }$ and $\tilde { \bf { o } } _ { t }$ (Oord et al., 2018). Intuitively, this encourages the Transformer to capture the underlying dynamics of $\mathbf { x }$ from each modality without explicitly learning a generative model $p ( \mathbf { x } _ { t } | \tilde { \mathbf { o } } _ { t } )$ .
|
| 89 |
+
|
| 90 |
+
Negative sampling. We find that a good negative sampling strategy is essential for the model’s convergence. Existing approaches either use all but $\mathbf { x } _ { t }$ (positive) within a mini-batch as negative samples or limit it to the current sequence only. However, both these methods ignore the data content and thus can miss useful negatives. Oord et al. (2018) showed that leveraging prior knowledge about data can improve the negative sample quality (e.g., by sampling negatives from the same speaker as the positive). Unfortunately, such prior knowledge is often not available in unlabeled videos.
|
| 91 |
+
|
| 92 |
+

|
| 93 |
+
Figure 2: Comparison of parameter sharing schemes. Ours combines (b) and (c) but decomposes weights in each layer into private and shared parts so only the latter is shared across Transformers.
|
| 94 |
+
|
| 95 |
+
We propose a content-aware negative sampling strategy that favors negatives sufficiently similar to a positive instance in the CNN embedding space; we call our approach CANS-Similar. Our approach is inspired by Ulyanov et al. (2018) who showed that randomly initialized CNNs provide a strong prior over natural images due to the inductive bias already built into the design of the CNNs. This suggests that our local feature embeddings $\mathbf { x } ^ { v }$ (and $\mathbf { x } ^ { a }$ ) can capture the underlying statistical regularities in video clips (and audio streams) right from the beginning, which can be sufficient to assess the similarity/dissimilarity between clips. Therefore, the distance measured on them can approximate content dissimilarity well (and this will improve as the training progresses).
|
| 96 |
+
|
| 97 |
+
Motivated by this, we sample the negatives based on local feature embeddings $\mathbf { x } ^ { v }$ (and $\mathbf { x } ^ { a }$ ). Specifically, we compute a pairwise $\ell _ { 2 }$ distance between $\mathbf { x } _ { t }$ (positive) and all other instances within a mini-batch, and normalize them to the [0, 1] interval. To remove samples that are either too similar or too different from the positive sample, we discard instances that fall outside the $9 5 \%$ confidence interval in the normalized distance space. We then sample the negatives from the remainder using the normalized distance as sampling probability. This makes instances similar to the positive instance have more chance to become negatives. We emphasize the importance of sampling, instead of deterministically taking top most similar samples; the stochasticity allows our model to be robust to potentially inaccurate distance estimates because samples with low probabilities will still have a chance to be selected as negatives.
|
| 98 |
+
|
| 99 |
+
Finally, our MEP loss is the InfoNCE loss computed on all three Transformers,
|
| 100 |
+
|
| 101 |
+
$$
|
| 102 |
+
\mathcal { L } _ { \mathrm { M E P } } = \mathcal { L } _ { \mathrm { N C E } } ( \mathbf { x } ^ { a } , \tilde { \mathbf { y } } ^ { a } ) + \mathcal { L } _ { \mathrm { N C E } } ( \mathbf { x } ^ { v } , \tilde { \mathbf { y } } ^ { v } ) + \mathcal { L } _ { \mathrm { N C E } } ( [ \mathbf { x } ^ { a } ; \mathbf { x } ^ { v } ] , \tilde { \mathbf { z } } )
|
| 103 |
+
$$
|
| 104 |
+
|
| 105 |
+
Task 2: Correct Pair Prediction (CPP). The MEP task encourages our model to learn the underlying dynamics within each modality. To help our model learn cross-modal dynamics, we design a task that predicts whether a pair of audio-visual embeddings is from the same video. Specifically, we define two binary classifiers, one for the two unimodal Transformers and another for the multimodal Transformer. Each classifier takes as input either $\mathbf { s } _ { g } = [ \mathbf { y } _ { 0 } ^ { v } ; \mathbf { y } _ { 0 } ^ { a } ]$ (and $[ \mathbf { z } _ { 0 } ^ { v } ; \mathbf { z } _ { 0 } ^ { a } ] )$ , a pair of audio-visual “summary” embeddings corresponding to the BOS positions, or $\mathbf { s } _ { h } = [ \mathbf { y } _ { t } ^ { v } ; \mathbf { y } _ { t } ^ { a } ]$ (or $[ \mathbf { z } _ { t } ^ { v } ; \mathbf { z } _ { t } ^ { a } ] )$ , the output embeddings sampled at random positions (we take two random positions $t \in [ 1 , T ] )$ . The classifier predicts $p ( c | \mathbf { s } )$ indicating whether the pair is from the same video $\overset { \cdot } { c } = 1$ ) or from different videos $c = 0$ ). We train the classifiers with a binary cross-entropy loss,
|
| 106 |
+
|
| 107 |
+
$$
|
| 108 |
+
\begin{array} { r } { \mathcal { L } _ { C P P } = - \mathbb { E } _ { \mathbf { x } , \mathbf { y } } \left[ c \cdot \log p ( c | \mathbf { s } _ { g } ) + c \cdot \log p ( c | \mathbf { s } _ { h } ) \right] } \end{array}
|
| 109 |
+
$$
|
| 110 |
+
|
| 111 |
+
where $\ast$ is the inner product. We generate a random derangement of the input mini-batch so that the number of positive and negative pairs are guaranteed to be the same.
|
| 112 |
+
|
| 113 |
+
Overall Pretraining Objective. We train our model end-to-end from scratch by optimizing $\mathcal { L } _ { M E P } +$ $\alpha \mathcal { L } _ { C P P }$ with a balancing term $\alpha$ . We find our model is insensitive to this term, so we set $\alpha = 1 . 0$ .
|
| 114 |
+
|
| 115 |
+
# 2.2 PARAMETER REDUCTION
|
| 116 |
+
|
| 117 |
+
Optimizing our model is challenging due to the large memory requirement. The most expensive part is the Transformers, which take up $82 \%$ of model parameters. One could reduce the model size by making the Transformers shallower, but the depth of Transformers has shown to be crucial to get good performance (Devlin et al., 2019). We propose to reduce the model size by aggressively sharing parts of weights across Transformers as well as layers within each Transformer (see Figure 2 (d)).
|
| 118 |
+
|
| 119 |
+
Sharing across Transformers. We first consider sharing weights across Transformers. Each Transformer encodes data coming from different distributions: $g _ { V }$ encodes $\mathbf { x } ^ { v }$ , $g _ { A }$ encodes $\mathbf { x } ^ { a }$ , and $h _ { A V }$ encodes $\left( \mathbf { y } ^ { v } , \mathbf { y } ^ { a } \right)$ . These input distributions may each exhibit different dynamics, yet together share certain regularities because they all come from the same videos. Motivated by this, we decompose Transformer weights into shared and private parts so that different patterns can be learned in a parameter-efficient manner. Recall that each layer of a Transformer contains weights $\{ W ^ { q } , W ^ { k } , \dot { W } ^ { v } , W ^ { b } , W ^ { c } , W ^ { d } \}$ . We decompose each of these weights into $W = U \Sigma V ^ { \top }$ , where $\begin{array} { r } { \dot { W } \in \mathbb { R } ^ { M \times N } , U \in \mathbb { R } ^ { M \times O } , \Sigma \in \mathbb { R } ^ { O \times O } , V \in \mathbb { R } ^ { N \times O } } \end{array}$ . We perform low-rank approximation of $W$ by setting the rank $O \ll M , N$ , and share $U$ across Transformers while keeping $\Sigma$ and $V$ private to each Transformer. This helps reduce parameters because $M O + 3 ( O ^ { 2 } + N O ) { \mathrm { ' } } \ll 3 M N$ . We experimented with different matrix ranks $O$ but the differences were small; we set $O = 1 2 8$ $( M , N = 7 6 8$ or 3072).
|
| 120 |
+
|
| 121 |
+
The decomposition converts a linear projection of input $W \mathbf { x }$ into a series of (unconstrained) linear projections $U \Sigma V ^ { \top } { \bf x }$ . However, this can cause numerical instability during optimization (Nocedal & Wright, 2006). We could perform the Singular Value Decomposition (SVD) over $W$ so that it performs rotation $( V ^ { \top } )$ , stretch $\left( \Sigma \right)$ , and rotation $( U )$ with orthogonal basis vectors in $U$ and $V$ Unfortunately, solving the full SVD has a computational complexity of $\mathcal { O } ( \operatorname* { m a x } ( M , N ) ^ { 2 } )$ (Golub & Van Loan, 2012). Here, we put an orthogonality constraint only on $\Sigma$ and perform projection $( V ^ { \top } )$ , rotation $\left( \Sigma \right)$ , and projection $( U )$ of input $\mathbf { x }$ . In addition, we put $V ^ { \top } { \bf x }$ in a unit sphere (via $\ell _ { 2 }$ - normalization) before rotating it with $\Sigma$ . This not only improves numerical stability, but also removes magnitude information in $V ^ { \top } { \bf x }$ and keeps angular information only, which has been shown to provide sample discriminative information (Chen et al., 2019a). To impose the orthogonality constraint on $\Sigma$ , we use the Padé approximation with a scale-squaring trick of Lezcano-Casado $\&$ Martínez-Rubio (2019). Intuitively, we linearly project $\mathbf { x }$ onto a unit sphere $( V ^ { \top } { \bf x } )$ and rotate it $( \Sigma V ^ { \top } { \bf x } )$ in each Transformer so that it captures the dynamics of each input distribution independently. We then project it to the shared space via $U$ , capturing shared regularities across all three Transformers.
|
| 122 |
+
|
| 123 |
+
Sharing across Layers. Recently, Bai et al. (2019a) showed that sharing parameters across layers in deep neural networks does not hurt the representational power of the network. Furthermore, (Lan et al., 2020) demonstrated that cross-layer parameter sharing in the Transformer leads to a lighter and faster-to-train model without sacrificing the performance on various language understanding benchmarks. Motivated by this, we let each Transformer share parameters across different layers.
|
| 124 |
+
|
| 125 |
+
# 3 EXPERIMENTS
|
| 126 |
+
|
| 127 |
+
We pretrain our model on Kinetics-700 (Carreira et al., 2019) or AudioSet (Gemmeke et al., 2017) and finetune it on various downstream tasks. The official release of Kinetics-700 contains 10-second clips only, so we download 410K original videos from YouTube and take 30-second clips from each video. For fair comparison with prior work, we use 10-second clips from the official release of AudioSet (we used 1.8M clips). We pretrain our model on 64 NVIDIA Tesla V100 GPUs with a batch size of 256 for 220K iterations. For downstream tasks, we evaluate on short-video/audio classification using UCF-101 (Soomro et al., 2012) (13K clips from 101 classes; 7.2 seconds on average) and ESC50 (Gemmeke et al., 2017) (2K clips from 50 classes; 5 seconds), and on long-video classification using Kinetics-Sounds (Arandjelovic & Zisserman, 2017) (23K videos from 32 classes; 10 seconds on average) and Charades (Sigurdsson et al., 2016) (10K videos from 157 classes; 30 seconds on average). We describe various details about experimental setup in Appendix.
|
| 128 |
+
|
| 129 |
+
# 3.1 RESULTS AND DISCUSSION
|
| 130 |
+
|
| 131 |
+
Multimodal Fusion Methods. To evaluate different fusion methods on the quality of learned representation, we test the following settings: (i) Early uses a single multimodal Transformer with $2 \times L$ layers, (ii) Mid is our approach described in Figure 1, (iii) Late uses two unimodal Transformers each with $2 \times L$ layers. All the methods are pretrained on audio-visual data using CPP and MEP losses, except for (iv) $\mathtt { L a t e - w / o - C P P }$ where we use only the MEP loss. We finetune the pretrained models on audio-visual, audio-only, and visual-only scenarios. For fair comparisons across different fusion methods, we do not perform parameter sharing in this ablation setting.
|
| 132 |
+
|
| 133 |
+
Table 1 (a) shows that Early and Mid outperform Late on the audio-visual scenario. This suggests the importance of encoding cross-modal information. Note that Late-w/-CPP gets cross-modal self-supervision, which gives marginal performance improvement over Late-w/o-CPP; however, both methods miss the opportunity to encode any cross-modal relationship, leading to inferior results.
|
| 134 |
+
|
| 135 |
+
Table 1: Ablation study on Kinetics-Sounds comparing: (a; top-left) multimodal fusion methods, (b; top-right) negative sampling strategies, and (c & d; bottom) parameter sharing schemes. X.-L: Cross-layer, X.-T: Cross-Transformer sharing. We report top-1 and top-5 accuracy $\hat { ( \% ) }$ . †: Ours.
|
| 136 |
+
|
| 137 |
+
<table><tr><td colspan="2">a) Fusion Method</td><td>Audio-Visual</td><td colspan="2">Audio-only -/</td><td colspan="2">Visual-only</td><td colspan="2">b) Sampling Method</td><td colspan="2">top-5</td><td colspan="2">89.8</td></tr><tr><td>Early Late-w/-CPP</td><td colspan="2"></td><td colspan="2">64.9/89.8 61.0/88.7</td><td colspan="2">-/-</td><td colspan="2">Current-Sequence</td><td colspan="2">Current-MiniBatch</td><td colspan="2">top-1 64.6 65.5 66.2</td></tr><tr><td>Late-w/o-CPP</td><td></td><td>60.6 /87.6</td><td colspan="2">52.3/80.8 50.5/79.9</td><td colspan="2">41.0 /71.3 40.7/71.7</td><td colspan="2">CANS-Dissimilar</td><td colspan="2"></td><td colspan="2">90.8</td></tr><tr><td>Midt</td><td></td><td>65.7 /89.9</td><td>53.5 /82.7</td><td colspan="2"></td><td colspan="2">42.5 /73.2</td><td colspan="2">CANS-Similart</td><td colspan="2">67.5</td><td>91.1 92.3</td></tr><tr><td></td><td></td><td>X.-T</td><td></td><td colspan="2"></td><td colspan="2"></td><td colspan="2"></td><td colspan="2"></td><td></td></tr><tr><td>c)Model</td><td>X.-L X</td><td>X</td><td>Params</td><td colspan="2">top-1/5</td><td colspan="2">d) Model</td><td colspan="2">X.-L X.-T</td><td colspan="2">Params</td><td>top-1/5</td></tr><tr><td>Multi-2 Multi-6</td><td></td><td>X</td><td>7M 21M</td><td colspan="2">60.3/88.9 65.7 /89.9</td><td colspan="2">Vis-2 Vis-2</td><td colspan="2">X X X</td><td colspan="2">14M 7M</td><td>41.4/71.0 41.2 /72.9</td></tr><tr><td>Multi-6</td><td></td><td>√(Al1)</td><td colspan="2">7M 67.1/92.3</td><td colspan="2">Vis-6</td><td colspan="2">√ X X</td><td colspan="2">43M</td><td colspan="2">43.8/74.2</td></tr><tr><td>Multi-6</td><td>√ √</td><td>(Partt)</td><td colspan="2">4M 67.5 /92.3</td><td colspan="2">Vis-6</td><td colspan="2">√</td><td colspan="2">7M</td><td colspan="2">43.5 /73.7</td></tr></table>
|
| 138 |
+
|
| 139 |
+
While both Early and Late perform similarly in the audio-visual scenario, only Late can be used in unimodal downstream scenarios (c.f., Early requires the presence of both modalities). This has practical implications: Mid and Late can effectively handle missing modalities, i.e., once pretrained on audio-visual data, we can use it on any of audio-visual, audio-only, and visual-only scenarios. Our Mid fusion approach enjoys both the advantages, i.e., learning cross-modal relationship and being robust to missing modalities, achieving overall the best performance.
|
| 140 |
+
|
| 141 |
+
Negative Sampling Strategies. We compare four strategies: (i) Current-Sequence takes all but the positive instance from the same sequence as negatives, (ii) Current-MiniBatch takes all but the positive instance in the mini-batch as negatives; this subsumes Current-Sequence, (iii) CANS-Dissimilar stochastically samples negatives using a modified version of our contentaware negative sampling (CANS) that favors dissimilar samples, and (iv) CANS-Similar is our proposed CANS approach that favors negatives that are similar to the positive instance.
|
| 142 |
+
|
| 143 |
+
Table 1 (b) shows Current-Sequence is the least effective: It makes MEP too difficult because negatives are (sometimes too much) similar to positives. As a result, the training dynamics is dominated by CPP, which is relatively easier, leading to inferior performance. We make quite the contrary observations from Current-MiniBatch: the inclusion of negatives from different videos makes MEP easier and thus makes it dominate the training dynamics. Our CANS approach solves both these issues by eliminating negatives that are either almost identical to or trivial to distinguish from the positives, based on the $9 5 \%$ CI over the CNN embedding distances. It also samples negatives in a stochastic manner so a wide variety of samples can be included as negatives. Our proposed CANS-Similar can be considered as a “softened” version of Current-Sequence; it samples negatives that are similar to positives with a high probability (this can be considered as online hard negative mining), but it also takes instances from different videos with a lower probability. This balances out hard and easy negatives, making the MEP task effective.
|
| 144 |
+
|
| 145 |
+
Parameter Sharing Schemes. Our parameter reduction scheme reduces the number of parameters from 128M to 4M (by $9 7 \%$ ) (Table 1 (c)). We reduce the model size by sharing weights across Transformers and across layers. We validate these ideas in two sets of experiments. Table 1 (c) compares cross-Transformer weight sharing schemes. We use $\mathrm { M u l t i } - 6$ that uses all three Transformers with 6 layers each, and compare four methods that correspond to Figure 2 (a)-(d). Note that No sharing is too large to fit in a Tesla V100 GPU (16GB) even with 2 samples, so we define Multi-2 that uses three Transformers with 2 layers each, and with the reduced number of attention heads $A$ to 5, the feature dimension $D$ to 320 and the intermediate dimension $E$ to 1280. We see that our proposed approach, Part, achieves the best performance with the least number of parameters. One might ask how Part leads to a smaller model when All shares all the weights across Transformers: We decompose weights $W = U \Sigma V ^ { \top }$ with low-rank approximation and share only $U$ across Transformers, while the $\bar { \Sigma } V ^ { \top }$ part learns modality-specific dynamics. Table 1 (d) compares cross-layer weight sharing schemes using the visual Transformer with either 2 $\left( \mathrm { \nabla } \mathrm { i } \mathrm { \mathbf { s } } - 2 \right)$ or $6 \left( \mathrm { V i } \thinspace \mathrm { s } - 6 \right)$ layers. The results show that sharing weights across layers does not hurt the performance, confirming the observations by Lan et al. (2020) in the audio-visual setting.
|
| 146 |
+
|
| 147 |
+
Pretraining Objectives. To evaluate the importance of MEP and CPP tasks, we test two settings: (i) $\mathsf { M i d - w / o - C P P }$ and (ii) Mid-w/o-MEP. On Kinetics-Sounds, these achieve $6 5 . 9 \%$ and $6 4 . 6 \%$ respectively; ours achieve $6 7 . 5 \%$ (top-1 accuracy). The result show that the MEP task plays an important role during pretraining, confirming the findings from Sun et al. (2019a) that the InfoNCE
|
| 148 |
+
|
| 149 |
+
<table><tr><td>a) Model</td><td>Net</td><td>Data</td><td>UCF</td><td>b) Model</td><td>Net</td><td>Data</td><td>ESC</td><td>c)Model</td><td>Charades</td><td>KS</td></tr><tr><td>ST-Puzzle</td><td>3D-R18</td><td>K400</td><td>65.8</td><td>SVM</td><td>MLP</td><td>-</td><td>39.6</td><td>Random</td><td>5.9</td><td>-/-</td></tr><tr><td>ClipOrder</td><td>R(2+1)D</td><td>UCF</td><td>72.4</td><td>ConvAE</td><td>CNN-4</td><td></td><td>39.9</td><td>ATF</td><td>18.3</td><td>-/-</td></tr><tr><td>DPC</td><td>3D-R34</td><td>K400</td><td>75.7</td><td>RF</td><td>MLP</td><td>=</td><td>44.3</td><td>ATF (OF)</td><td>22.4</td><td>-/-</td></tr><tr><td>CBT</td><td>S3D</td><td>K600</td><td>79.5</td><td>ConvNet</td><td>CNN-4</td><td>=</td><td>64.5</td><td>V-CNN</td><td>18.7</td><td>45.8/73.3</td></tr><tr><td>MultiSens</td><td>3D-R18</td><td>AS</td><td>82.1</td><td>SoundNet</td><td>CNN-8</td><td>FS</td><td>74.2</td><td>A-CNN</td><td>18.9</td><td>49.4 /76.9</td></tr><tr><td>AVTS</td><td>MC3-18</td><td>K400</td><td>85.8</td><td>L-Net</td><td>CNN-8</td><td>FS</td><td>79.3</td><td>M-CNN</td><td>23.1</td><td>59.4/83.6</td></tr><tr><td>AVTS</td><td>MC3-18</td><td>AS</td><td>89.0</td><td>DMC</td><td>VGG-ish</td><td>FS</td><td>79.8</td><td>V-BERT</td><td>26.0</td><td>49.5/78.9</td></tr><tr><td>V-CNN↑</td><td>SlowFast</td><td>K700</td><td>85.2</td><td>AVTS</td><td>VGG-M</td><td>AS</td><td>80.6</td><td>A-BERT</td><td>27.4</td><td>58.9 /85.7</td></tr><tr><td>V-CNNt</td><td>SlowFast</td><td>AS</td><td>86.1</td><td>A-CNN</td><td>R50</td><td>AS</td><td>81.5</td><td>M-BERT+</td><td>29.5</td><td>75.6 /94.6</td></tr></table>
|
| 150 |
+
|
| 151 |
+
Datasets. K: Kinetics, AS: AudioSet, FS: Flicker-SoundNet, KS: Kinetics-Sounds. Baselines. ST-Puzzle (Kim et al., 2019), ClipOrder (Xu et al., 2019), DPC (Han et al., 2019), CBT (Sun et al., 2019a), MultiSens (Owens & Efros, 2018), AVTS (Korbar et al., 2018), AE (Aytar et al., 2016), SVM (Piczak, 2015a), RF (Piczak, 2015a), ConvNet (Piczak, 2015b), SoundNet (Aytar et al., 2016), $L ^ { 3 }$ -Net (Arandjelovic & Zisserman, 2017), DMC (Hu et al., 2019), ATF (Sigurdsson et al., 2017)
|
| 152 |
+
|
| 153 |
+
Table 2: (a; left): Short video classification results on UCF101 (mean accuracy $( \% )$ ). (b; center): Short audio classification results on ESC-50 (mean accuracy $( \% )$ ). (c; right): Long video classification results on Charades (mAP) and Kinetics-Sounds (KS; top-1/5 accuracy $( \% )$ ). †: Ours.
|
| 154 |
+
|
| 155 |
+
loss, as deployed in CBT, is effective in the cross-modal setting. The result also shows that augmenting MEP with CPP provides further performance improvement by learning cross-modal correspondence.
|
| 156 |
+
|
| 157 |
+
Downstream Evaluation. We pretrain our model with Mid fusion using MEP and CPP tasks (with CANS-Similar), and employ Part weight sharing. We use either Kinetics-700 or AudioSet for fair comparisons with prior work. Table 2 (a)/(b) shows short-video/audio classification results on UCF-101/ESC-50. For fair comparisons to the baselines, we use only the visual/audio CNN (no Transformers); we finetune a linear classifier on top of the visual CNN end-to-end for UCF-101, and train a multi-class one-vs-all linear SVM on top of the fixed audio CNN for ESC-50. Although our model is pretrained on long video clips with no direct supervision to the CNN layers (gradients must flow through Transformers), it outperforms most of the baselines (except for AVTS on UCF-101) that received direct supervision from short video clips. We note that, similar to ours, CBT (Su et al., 2020) is a multimodal Transformer pretrained on long video clips and thus is the most meaningful comparison to ours; ours outperform CBT on UCF-101 by $5 . 7 \%$ . For sound classification, our approach outperform all existing published results.
|
| 158 |
+
|
| 159 |
+
Table 2 (c) shows long-video classification results on Charades and Kinetics-Sounds (KS) when pretrained on Kinetics-700. We test Visual-only (V), Audio-only (A), and Multimodal (M) settings to verify the benefit of multimodal learning. Because there is no published selfsupervised learning results on these datasets, we demonstrate long-term representations by comparing CNNs (CNN; short-term) to Transformers (BERT; long-term) on KS that contains 10-second clips. Since CNNs process 1-second clips, we feed 10 non-overlapping clips to CNNs and average the prediction output. In all settings, we add a 2-layer MLP with softmax classifier on top. The results show that Transformers outperform CNNs on Kinetics-Sounds, suggesting the superiority of long-term representations. We also see that combining audio-visual information performs the best. We notice that audio representations are generally stronger than visual representations; we believe that learning discriminative visual representations is generally more challenging, especially when the CNNs receive (self-)supervision signals only indirectly through Transformers. We believe that providing (self-)supervision directly to CNNs, e.g., by first pretraining CNNs on 3D rotation prediction (Jing et al., 2018) and then jointly training the whole model (as was done in CBT (Sun et al., 2019a)), could further improve performance. Incorporating contrastive learning (Chen et al., 2020) over the CNN embeddings and training the whole model end-to-end is another promising direction for future work.
|
| 160 |
+
|
| 161 |
+
# 4 RELATED WORK
|
| 162 |
+
|
| 163 |
+
Multimodal BERT. Extending BERT (Devlin et al., 2019) to vision-and-language has been actively studied. Existing work typically adopt early fusion (Li et al., 2019; Alberti et al., 2019; Sun et al., 2019b; Li et al., 2020; Zhou et al., 2020; Su et al., 2020; Chen et al., 2019b; Zhu & Yang, 2020) or mid fusion (Tan & Bansal, 2019; Lu et al., 2019; Sun et al., 2019a; Luo et al., 2020) without thorough validation, and they train only visual components while relying on a language-pretrained BERT. Although there have been some efforts to leverage the Transformer architecture (Vaswani et al., 2017) for audio and visual inputs (Boes & Van hamme, 2019; Tian et al., 2020), our approach is the first to demonstrate multimodal audio-visual BERT trained from scratch in an end-to-end manner. This is enabled by our novel parameter reduction technique, which is one of our main technical contributions.
|
| 164 |
+
|
| 165 |
+
Audio-Visual Learning. Early work in audio-visual learning focused on speech signals, improving audio-visual speech recognition than unimodal approaches (Ngiam et al., 2011; Srivastava & Salakhutdinov, 2012). Recent approaches leverage unlabeled videos from specific domains (Owens et al., 2016; Gao & Grauman, 2019; Zhao et al., 2018; Ephrat et al., 2018; Alwassel et al., 2019; Miech et al., 2020; Piergiovanni et al., 2020) and often demonstrate on audio-visual source separation, localization, and co-segmentation. However, these approaches rely on short-term audio-visual correspondence and thus may not generalize to long-term video recognition that requires global context (as was suggested in (Hjelm et al., 2019)), which this work focuses on.
|
| 166 |
+
|
| 167 |
+
Parameter Reduction. Network pruning (Reed, 1993; Caron et al., 2020) trains a large model and then reduces its size while maintaining performance. Reducing the size of CNNs for mobile applications is an active research area (Rastegari et al., 2016; Howard et al., 2017; 2019; Zhang et al., 2018; Iandola et al., 2016). Our work is closely related to the work that shares parameters across layers in deep neural networks. Trellis network (Bai et al., 2019b) is a temporal convolutional architecture with weight-tying across time and depth. Similar to ours, Universal Transformer (Dehghani et al., 2019), RSNMT (Dabre & Fujita, 2019), DEQ (Bai et al., 2019a), ALBERT (Lan et al., 2020) share weights across layers in Transformers. We combine this idea with our novel cross-Transformer weight sharing, which decomposes weight matrices with low-rank approximation.
|
| 168 |
+
|
| 169 |
+
Negative Sampling. Hard negative mining has been shown to be crucial for contrastive learning (Arandjelovic & Zisserman, 2017; Owens & Efros, 2018; Korbar et al., 2018; Schroff et al., 2015; Zhuang et al., 2019; Morgado et al., 2020; Wu et al., 2020). Korbar et al. (2018) use the time difference between clips to approximate clip similarity (i.e., clips that are further apart are deemed more different). However, such an assumption may not hold for real-world videos, e.g., periodic actions such as push-ups. Unlike this line of approaches, we directly use the feature embeddings learned by our model. Several apparoaches adapted a similar idea (Schroff et al., 2015; Zhuang et al., 2019; Morgado et al., 2020; Wu et al., 2020). Different from prior work, we bring the stochasticity to the sampling procedure by using the content similarity as the sampling probability; this helps reduce potential errors especially during the early stage of training.
|
| 170 |
+
|
| 171 |
+
# 5 CONCLUSION
|
| 172 |
+
|
| 173 |
+
We introduced a multimodal bidirectional Transformer architecture for self-supervised learning of contextualized audio-visual representation from unlabeled videos. Our main technical contributions include: (1) we propose a parameter efficient multimodal Transformers based on matrix decomposition with low-rank approximation; (2) we propose a novel content-aware negative sampling technique for contrastive learning. We demonstrate a successful end-to-end training of multimodal Transformers for audio-visual learning (which is, to the best of our knowledge, the first time in the literature). We also report comprehensive evaluation of various design decisions in multimodal learning.
|
| 174 |
+
|
| 175 |
+
Acknowledgements. This work was partially supported by Institute of Information & communications Technology Planning & Evaluation (IITP) grant funded by the Korea government (MSIT) (No.2017-0-01772, Video Turing Test, No.2019-0-01082, SW StarLab) and the international cooperation program by the NRF of Korea (NRF-2018K2A9A2A11080927).
|
| 176 |
+
|
| 177 |
+
# REFERENCES
|
| 178 |
+
|
| 179 |
+
Chris Alberti, Jeffrey Ling, Michael Collins, and David Reitter. Fusion of Detected Objects in Text for Visual Question Answering. In EMNLP-IJCNLP, 2019.
|
| 180 |
+
|
| 181 |
+
Humam Alwassel, Dhruv Mahajan, Lorenzo Torresani, Bernard Ghanem, and Du Tran. SelfSupervised Learning by Cross-Modal Audio-Video Clustering. arXiv preprint arXiv:1911.12667, 2019.
|
| 182 |
+
|
| 183 |
+
Relja Arandjelovic and Andrew Zisserman. Look, Listen and Learn. In ICCV, 2017.
|
| 184 |
+
|
| 185 |
+
Relja Arandjelovic and Andrew Zisserman. Objects that Sound. In ECCV, 2018.
|
| 186 |
+
|
| 187 |
+
Yusuf Aytar, Carl Vondrick, and Antonio Torralba. SoundNet: Learning Sound Representations from Unlabeled Video. In NeurIPS, 2016.
|
| 188 |
+
|
| 189 |
+
Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer Normalization. In NeurIPS Deep Learning Symposium, 2016.
|
| 190 |
+
|
| 191 |
+
Shaojie Bai, J. Zico Kolter, and Vladlen Koltun. Deep Equilibrium Models. In NeurIPS, 2019a.
|
| 192 |
+
|
| 193 |
+
Shaojie Bai, J Zico Kolter, and Vladlen Koltun. Trellis Networks for Sequence Modeling. In ICLR, 2019b.
|
| 194 |
+
|
| 195 |
+
Tadas Baltrušaitis, Chaitanya Ahuja, and Louis-Philippe Morency. Multimodal Machine Learning: A Survey and Taxonomy. IEEE Transactions on Pattern Analysis and Machine Intelligence, 41(2): 423–443, 2018.
|
| 196 |
+
|
| 197 |
+
Wim Boes and Hugo Van hamme. Audiovisual Transformer Architectures for Large-Scale Classification and Synchronization of Weakly Labeled Audio Events. In ACM MM, 2019.
|
| 198 |
+
|
| 199 |
+
Mathilde Caron, Ari Morcos, Piotr Bojanowski, Julien Mairal, and Armand Joulin. Pruning Convolutional Neural Networks with Self-Supervision. arXiv preprint arXiv:2001.03554, 2020.
|
| 200 |
+
|
| 201 |
+
Joao Carreira, Eric Noland, Chloe Hillier, and Andrew Zisserman. A Short Note on the Kinetics-700 Human Action Dataset. arXiv preprint arXiv:1907.06987, 2019.
|
| 202 |
+
|
| 203 |
+
Beidi Chen, Weiyang Liu Animesh Garg, Zhiding Yu, Anshumali Shrivastava, Jan Kautz, and Anima Anandkumar. Angular Visual Hardness. In ICML Workshop on Identifying and Understanding Deep Learning Phenomena, 2019a.
|
| 204 |
+
|
| 205 |
+
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A Simple Framework for Contrastive Learning of Visual Representations. arXiv preprint arXiv:2002.05709, 2020.
|
| 206 |
+
|
| 207 |
+
Yen-Chun Chen, Linjie Li, Licheng Yu, Ahmed El Kholy, Faisal Ahmed, Zhe Gan, Yu Cheng, and Jingjing Liu. UNITER: UNiversal Image-TExt Representation Learning. arXiv preprint arXiv:1909.11740, 2019b.
|
| 208 |
+
|
| 209 |
+
Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning Phrase Representations using RNN Encoder–Decoder for Statistical Machine Translation. In EMNLP, 2014.
|
| 210 |
+
|
| 211 |
+
Raj Dabre and Atsushi Fujita. Recurrent Stacking of Layers for Compact Neural Machine Translation Models. In AAAI, 2019.
|
| 212 |
+
|
| 213 |
+
Mostafa Dehghani, Stephan Gouws, Oriol Vinyals, Jakob Uszkoreit, and Łukasz Kaiser. Universal Transformers. In ICLR, 2019.
|
| 214 |
+
|
| 215 |
+
Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding. In NAACL-HLT, 2019.
|
| 216 |
+
|
| 217 |
+
Ariel Ephrat, Inbar Mosseri, Oran Lang, Tali Dekel, Kevin Wilson, Avinatan Hassidim, William T Freeman, and Michael Rubinstein. Looking to Listen at the Cocktail Party: A Speaker-Independent Audio-Visual Model for Speech Separation. ACM Transactions on Graphics, 37(4), 2018.
|
| 218 |
+
|
| 219 |
+
Christoph Feichtenhofer, Haoqi Fan, Jitendra Malik, and Kaiming He. SlowFast Networks for Video Recognition. In ICCV, 2019.
|
| 220 |
+
|
| 221 |
+
Ruohan Gao and Kristen Grauman. 2.5D Visual Sound. In CVPR, 2019.
|
| 222 |
+
|
| 223 |
+
Jort F. Gemmeke, Daniel P. W. Ellis, Dylan Freedman, Aren Jansen, Wade Lawrence, R. Channing Moore, Manoj Plakal, and Marvin Ritter. Audio Set: An Ontology and Human-Labeled Dataset for Audio Events. In ICASSP, 2017.
|
| 224 |
+
|
| 225 |
+
Gene H Golub and Charles F Van Loan. Matrix Computations, volume 3. JHU press, 2012.
|
| 226 |
+
|
| 227 |
+
Chunhui Gu, Chen Sun, David A Ross, Carl Vondrick, Caroline Pantofaru, Yeqing Li, Sudheendra Vijayanarasimhan, George Toderici, Susanna Ricco, Rahul Sukthankar, et al. AVA: A Video Dataset of Spatio-temporally Localized Atomic Visual Actions. In CVPR, 2018.
|
| 228 |
+
|
| 229 |
+
Michael Gutmann and Aapo Hyvärinen. Noise-Contrastive Estimation: A New Estimation Principle for Unnormalized Statistical Models. In AISTATS, 2010.
|
| 230 |
+
|
| 231 |
+
Tengda Han, Weidi Xie, and Andrew Zisserman. Video Representation Learning by Dense Predictive Coding. In ICCV Workshop on Large Scale Holistic Video Understanding, 2019.
|
| 232 |
+
|
| 233 |
+
Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. In CVPR, 2016.
|
| 234 |
+
|
| 235 |
+
Dan Hendrycks and Kevin Gimpel. Gaussian Error Linear Units (GELUs). arXiv preprint arXiv:1606.08415, 2016.
|
| 236 |
+
|
| 237 |
+
R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Phil Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. In ICLR, 2019.
|
| 238 |
+
|
| 239 |
+
Sepp Hochreiter and Jürgen Schmidhuber. Long Short-Term Memory. Neural computation, 9(8): 1735–1780, 1997.
|
| 240 |
+
|
| 241 |
+
Andrew Howard, Mark Sandler, Grace Chu, Liang-Chieh Chen, Bo Chen, Mingxing Tan, Weijun Wang, Yukun Zhu, Ruoming Pang, Vijay Vasudevan, et al. Searching for MobileNetV3. In ICCV, 2019.
|
| 242 |
+
|
| 243 |
+
Andrew G Howard, Menglong Zhu, Bo Chen, Dmitry Kalenichenko, Weijun Wang, Tobias Weyand, Marco Andreetto, and Hartwig Adam. MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications. arXiv preprint arXiv:1704.04861, 2017.
|
| 244 |
+
|
| 245 |
+
Jeremy Howard and Sebastian Ruder. Universal Language Model Fine-tuning for Text Classification. In ACL, 2018.
|
| 246 |
+
|
| 247 |
+
Di Hu, Feiping Nie, and Xuelong Li. Deep Multimodal Clustering for Unsupervised Audiovisual Learning. In CVPR, 2019.
|
| 248 |
+
|
| 249 |
+
Forrest N Iandola, Song Han, Matthew W Moskewicz, Khalid Ashraf, William J Dally, and Kurt Keutzer. SqueezeNet: AlexNet-level accuracy with 50x fewer parameters and ${ < } 0 . 5 \mathrm { M B }$ model size. arXiv preprint arXiv:1602.07360, 2016.
|
| 250 |
+
|
| 251 |
+
Longlong Jing, Xiaodong Yang, Jingen Liu, and Yingli Tian. Self-Supervised Spatiotemporal Feature Learning via Video Rotation Prediction. arXiv preprint arXiv:1811.11387, 2018.
|
| 252 |
+
|
| 253 |
+
Will Kay, Joao Carreira, Karen Simonyan, Brian Zhang, Chloe Hillier, Sudheendra Vijayanarasimhan, Fabio Viola, Tim Green, Trevor Back, Paul Natsev, et al. The Kinetics Human Action Video Dataset. arXiv preprint arXiv:1705.06950, 2017.
|
| 254 |
+
|
| 255 |
+
Evangelos Kazakos, Arsha Nagrani, Andrew Zisserman, and Dima Damen. EPIC-Fusion: AudioVisual Temporal Binding for Egocentric Action Recognition. In ICCV, 2019.
|
| 256 |
+
|
| 257 |
+
Dahun Kim, Donghyeon Cho, and In So Kweon. Self-Supervised Video Representation Learning with Space-Time Cubic Puzzles. In AAAI, 2019.
|
| 258 |
+
|
| 259 |
+
Bruno Korbar, Du Tran, and Lorenzo Torresani. Cooperative Learning of Audio and Video Models from Self-Supervised Synchronization. In NeurIPS, 2018.
|
| 260 |
+
|
| 261 |
+
Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, and Radu Soricut. ALBERT: A Lite BERT for Self-supervised Learning of Language Representations. In ICLR, 2020.
|
| 262 |
+
|
| 263 |
+
Mario Lezcano-Casado and David Martínez-Rubio. Cheap Orthogonal Constraints in Neural Networks: A Simple Parametrization of the Orthogonal and Unitary Group. In ICML, 2019.
|
| 264 |
+
|
| 265 |
+
Gen Li, Nan Duan, Yuejian Fang, Min Gong, Daxin Jiang, and Ming Zhou. Unicoder-VL: A Universal Encoder for Vision and Language by Cross-modal Pre-training. In AAAI, 2020.
|
| 266 |
+
|
| 267 |
+
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.
|
| 268 |
+
|
| 269 |
+
Yinhan Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, Mike Lewis, Luke Zettlemoyer, and Veselin Stoyanov. RoBERTa: A Robustly Optimized BERT Pretraining Approach. arXiv preprint arXiv:1907.11692, 2019.
|
| 270 |
+
|
| 271 |
+
Ilya Loshchilov and Frank Hutter. Decoupled Weight Decay Regularization. In ICLR, 2019.
|
| 272 |
+
|
| 273 |
+
Jiasen Lu, Dhruv Batra, Devi Parikh, and Stefan Lee. ViLBERT: Pretraining Task-Agnostic Visiolinguistic Representations for Vision-and-Language Tasks. In NeurIPS, 2019.
|
| 274 |
+
|
| 275 |
+
Huaishao Luo, Lei Ji, Botian Shi, Haoyang Huang, Nan Duan, Tianrui Li, Xilin Chen, and Ming Zhou. UniViLM: A Unified Video and Language Pre-Training Model for Multimodal Understanding and Generation. arXiv preprint arXiv:2002.06353, 2020.
|
| 276 |
+
|
| 277 |
+
Antoine Miech, Jean-Baptiste Alayrac, Lucas Smaira, Ivan Laptev, Josef Sivic, and Andrew Zisserman. End-to-End Learning of Visual Representations from Uncurated Instructional Videos. In CVPR, 2020.
|
| 278 |
+
|
| 279 |
+
Pedro Morgado, Nuno Vasconcelos, and Ishan Misra. Audio-Visual Instance Discrimination with Cross-Modal Agreement. arXiv preprint arXiv:2004.12943, 2020.
|
| 280 |
+
|
| 281 |
+
Jiquan Ngiam, Aditya Khosla, Mingyu Kim, Juhan Nam, Honglak Lee, and Andrew Y Ng. Multimodal Deep Learning. In ICML, 2011.
|
| 282 |
+
|
| 283 |
+
Jorge Nocedal and Stephen Wright. Numerical Optimization. Springer Science & Business Media, 2006.
|
| 284 |
+
|
| 285 |
+
Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation Learning with Contrastive Predictive Coding. arXiv preprint arXiv:1807.03748, 2018.
|
| 286 |
+
|
| 287 |
+
Andrew Owens and Alexei A Efros. Audio-Visual Scene Analysis with Self-Supervised Multisensory Features. In ECCV, 2018.
|
| 288 |
+
|
| 289 |
+
Andrew Owens, Phillip Isola, Josh McDermott, Antonio Torralba, Edward H Adelson, and William T Freeman. Visually Indicated Sounds. In CVPR, 2016.
|
| 290 |
+
|
| 291 |
+
Andrew Owens, Jiajun Wu, Josh H McDermott, William T Freeman, and Antonio Torralba. Learning Sight from Sound: Ambient Sound Provides Supervision for Visual Learning. International Journal of Computer Vision, 126(10):1120–1137, 2018.
|
| 292 |
+
|
| 293 |
+
Daniel S Park, William Chan, Yu Zhang, Chung-Cheng Chiu, Barret Zoph, Ekin D Cubuk, and Quoc V Le. SpecAugment: A Simple Data Augmentation Method for Automatic Speech Recognition. In INTERSPEECH, 2019.
|
| 294 |
+
|
| 295 |
+
Mandela Patrick, Yuki M Asano, Ruth Fong, João F Henriques, Geoffrey Zweig, and Andrea Vedaldi. Multi-modal Self-Supervision from Generalized Data Transformations. arXiv preprint arXiv:2003.04298, 2020.
|
| 296 |
+
|
| 297 |
+
Matthew E Peters, Mark Neumann, Mohit Iyyer, Matt Gardner, Christopher Clark, Kenton Lee, and Luke Zettlemoyer. Deep Contextualized Word Representations. In NAACL-HLT, 2018.
|
| 298 |
+
|
| 299 |
+
Karol J. Piczak. ESC: Dataset for Environmental Sound Classification. In ACM-MM, 2015a.
|
| 300 |
+
|
| 301 |
+
Karol J. Piczak. Environmental Sound Classification with Convolutional Neural Networks. In MLSP, 2015b.
|
| 302 |
+
|
| 303 |
+
AJ Piergiovanni, Anelia Angelova, and Michael S Ryoo. Evolving Losses for Unsupervised Video Representation Learning. In CVPR, 2020.
|
| 304 |
+
|
| 305 |
+
Alec Radford, Karthik Narasimhan, Tim Salimans, and Ilya Sutskever. Improving Language Understanding by Generative Pre-Training. Techincal Report, OpenAI, 2018.
|
| 306 |
+
|
| 307 |
+
Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, and Ilya Sutskever. Language Models are Unsupervised Multitask Learners. OpenAI Blog, 1(8), 2019.
|
| 308 |
+
|
| 309 |
+
Mohammad Rastegari, Vicente Ordonez, Joseph Redmon, and Ali Farhadi. XNOR-Net: ImageNet Classification Using Binary Convolutional Neural Networks. In ECCV, 2016.
|
| 310 |
+
|
| 311 |
+
Sashank J Reddi, Satyen Kale, and Sanjiv Kumar. On the Convergence of Adam and Beyond. In ICLR, 2018.
|
| 312 |
+
|
| 313 |
+
Russell Reed. Pruning Algorithms-A Survey. IEEE Transactions on Neural Networks, 4(5):740–747, 1993.
|
| 314 |
+
|
| 315 |
+
Florian Schroff, Dmitry Kalenichenko, and James Philbin. FaceNet: A Unified Embedding for Face Recognition and Clustering. In CVPR, 2015.
|
| 316 |
+
|
| 317 |
+
Gunnar A Sigurdsson, Gül Varol, Xiaolong Wang, Ali Farhadi, Ivan Laptev, and Abhinav Gupta. Hollywood in Homes: Crowdsourcing Data Collection for Activity Understanding. In ECCV, 2016.
|
| 318 |
+
|
| 319 |
+
Gunnar A Sigurdsson, Santosh Divvala, Ali Farhadi, and Abhinav Gupta. Asynchronous Temporal Fields for Action Recognition. In CVPR, 2017.
|
| 320 |
+
|
| 321 |
+
Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. UCF101: A Dataset of 101 Human Action Classes From Videos in The Wild. CRCV-TR-12-01, 2012.
|
| 322 |
+
|
| 323 |
+
Nitish Srivastava and Russ R Salakhutdinov. Multimodal Learning with Deep Boltzmann Machines. In NeurIPS, 2012.
|
| 324 |
+
|
| 325 |
+
Weijie Su, Xizhou Zhu, Yue Cao, Bin Li, Lewei Lu, Furu Wei, and Jifeng Dai. VL-BERT: Pre-training of Generic Visual-Linguistic Representations. In ICLR, 2020.
|
| 326 |
+
|
| 327 |
+
Chen Sun, Fabien Baradel, Kevin Murphy, and Cordelia Schmid. Learning Video Representations using Contrastive Bidirectional Transformer. arXiv preprint arXiv:1906.05743, 2019a.
|
| 328 |
+
|
| 329 |
+
Chen Sun, Austin Myers, Carl Vondrick, Kevin Murphy, and Cordelia Schmid. VideoBERT: A Joint Model for Video and Language Representation Learning. In ICCV, 2019b.
|
| 330 |
+
|
| 331 |
+
Hao Tan and Mohit Bansal. LXMERT: Learning Cross-Modality Encoder Representations from Transformers. In EMNLP-IJCNLP, 2019.
|
| 332 |
+
|
| 333 |
+
Yapeng Tian, Dingzeyu Li, and Chenliang Xu. Unified Multisensory Perception: Weakly-Supervised Audio-Visual Video Parsing. In ECCV, 2020.
|
| 334 |
+
|
| 335 |
+
Dmitry Ulyanov, Andrea Vedaldi, and Victor Lempitsky. Deep Image Prior. In CVPR, 2018.
|
| 336 |
+
|
| 337 |
+
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.
|
| 338 |
+
|
| 339 |
+
Mike Wu, Chengxu Zhuang, Milan Mosse, Daniel Yamins, and Noah Goodman. On Mutual Information in Contrastive Learning for Visual Representations. arXiv preprint arXiv:2005.13149, 2020.
|
| 340 |
+
|
| 341 |
+
Dejing Xu, Jun Xiao, Zhou Zhao, Jian Shao, Di Xie, and Yueting Zhuang. Self-supervised Spatiotemporal Learning via Video Clip Order Prediction. In CVPR, 2019.
|
| 342 |
+
|
| 343 |
+
Zhilin Yang, Zihang Dai, Yiming Yang, Jaime Carbonell, Russ R Salakhutdinov, and Quoc V Le. XLNet: Generalized Autoregressive Pretraining for Language Understanding. In NeurIPS, 2019.
|
| 344 |
+
|
| 345 |
+
Xiangyu Zhang, Xinyu Zhou, Mengxiao Lin, and Jian Sun. ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devices. In CVPR, 2018.
|
| 346 |
+
|
| 347 |
+
Hang Zhao, Chuang Gan, Andrew Rouditchenko, Carl Vondrick, Josh McDermott, and Antonio Torralba. The Sound of Pixels. In ECCV, 2018.
|
| 348 |
+
|
| 349 |
+
Luowei Zhou, Hamid Palangi, Lei Zhang, Houdong Hu, Jason J Corso, and Jianfeng Gao. Unified Vision-Language Pre-Training for Image Captioning and VQA. In AAAI, 2020.
|
| 350 |
+
|
| 351 |
+
Linchao Zhu and Yi Yang. ActBERT: Learning Global-Local Video-Text Representations. In CVPR, 2020.
|
| 352 |
+
|
| 353 |
+
Chengxu Zhuang, Alex Lin Zhai, and Daniel Yamins. Local Aggregation for Unsupervised Learning of Visual Embeddings. In ICCV, 2019.
|
| 354 |
+
|
| 355 |
+
# A IMPLEMENTATION DETAILS
|
| 356 |
+
|
| 357 |
+
# A.1 ARCHITECTURES OF VISUAL/AUDIO CNNS
|
| 358 |
+
|
| 359 |
+
Table 3 shows the architectures of visual and audio CNNs we use for our model. For the visual CNN, we use the SlowFast network (Feichtenhofer et al., 2019) with a ResNet-50 backbone (He et al., 2016). We use the speed ratio $\alpha = 8$ and the channel ratio $\beta = 1 / 8$ for the SlowFast architecture, so $T _ { f } = 8 \times T _ { s }$ . We use different values of $T _ { s }$ and $T _ { f }$ for different tasks. During pretraining, we set $\dot { T } _ { s } = 4$ and $T _ { f } = 3 2$ . During finetuning, we use $\mathrm { { \dot { } } } T _ { s } = 8$ and $T _ { f } = 6 4$ for short-video action classification on UCF101 (Soomro et al., 2012) while we use $T _ { s } = 4$ and $T _ { f } = 3 2$ for long-video action classification on Charades (Sigurdsson et al., 2016) and Kinetics-Sounds (Arandjelovic & Zisserman, 2017). For the audio CNN, we use a ResNet-50 without the downsampling layer $\mathsf { p o o l } _ { 1 }$ to preserve information along both frequency and time axis in early stages. We use different values of $T _ { a }$ for different training phases. We set $T _ { a } = 2 2 0$ for one-second clip during pretraining while we use $T _ { a } = 4 4 0$ for two-second clip during finetuning.
|
| 360 |
+
|
| 361 |
+
Table 3: The architectures of visual and audio CNNs. For the visual CNN, the input dimensions are denoted by {channel size, temporal size, spatial $s i z e ^ { 2 } \}$ , kernels are denoted by {temporal size, spatial $s i z e ^ { 2 }$ , channel size} and strides are denoted by {temporal stride, spatial stride $\mathrm { ~ \bar { ~ } { ~ } ~ } ^ { 2 } \}$ . For the audio CNN, the input dimensions are denoted by {frequency size, temporal size}, kernels are denoted by {frequency size, time size, channel size} and strides are denoted by {frequency stride, temporal stride}.
|
| 362 |
+
|
| 363 |
+
<table><tr><td rowspan=2 colspan=1> Stage</td><td rowspan=1 colspan=6>Visual CNN</td><td rowspan=2 colspan=2>Audio CNN</td></tr><tr><td rowspan=1 colspan=3>Slow pathway</td><td rowspan=1 colspan=3>Fast pathway</td></tr><tr><td rowspan=1 colspan=1>raw clip</td><td rowspan=1 colspan=3>3×Ts×112²</td><td rowspan=1 colspan=3>3×Tf × 112²</td><td rowspan=1 colspan=2>128×Ta</td></tr><tr><td rowspan=1 colspan=1>conV1</td><td rowspan=1 colspan=3>1 × 7²,64stride 1,2</td><td rowspan=1 colspan=3>5×7²,8stride 1, 22</td><td rowspan=1 colspan=2>9×9,32stride 1, 1</td></tr><tr><td rowspan=1 colspan=1>pool</td><td rowspan=1 colspan=3>1 ×3²,maxstride 1, 2²</td><td rowspan=1 colspan=3>1 × 3²,maxstride 1,22</td><td rowspan=1 colspan=2></td></tr><tr><td rowspan=1 colspan=1>res2</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>1×1²,641×3²,641 ×1²,256</td><td rowspan=1 colspan=1>x3</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>3×1²,81×3²,81 × 1²,32</td><td rowspan=1 colspan=1>×3</td><td rowspan=1 colspan=2>[1×1,32]3×3,32×3[1 × 1,128]</td></tr><tr><td rowspan=1 colspan=1>res3</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>1 ×1²,1281 ×3²,128[1 × 1²,512</td><td rowspan=1 colspan=1>×4</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>3×1²,161×3²,161 × 1²,64</td><td rowspan=1 colspan=1>×4</td><td rowspan=1 colspan=2>[1×1,64]3×3,64×4[1 × 1,256]</td></tr><tr><td rowspan=1 colspan=1>res4</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>3 ×1²,2561 × 3²,2561 × 1²,1024</td><td rowspan=1 colspan=1>×6</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>3×1²,321×3²,321 × 1²,128</td><td rowspan=1 colspan=1>×6</td><td rowspan=1 colspan=1>[1 ×1,128]3×3,128[1 × 1,512]</td><td rowspan=1 colspan=1>×6</td></tr><tr><td rowspan=1 colspan=1>res5</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>3 × 1²,5121× 3²,5121 ×1²,2048</td><td rowspan=1 colspan=1>×3</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>3×1²,641× 3²,641 ×1²,256</td><td rowspan=1 colspan=1>×3</td><td rowspan=1 colspan=2>[1×1,256]3×3,256×3[1×1,1024]</td></tr></table>
|
| 364 |
+
|
| 365 |
+
# A.2 DATA PREPROCESSING
|
| 366 |
+
|
| 367 |
+
We preprocess the data by dividing $T$ -second clips into $T$ non-overlapping parts ( $T = 3 0$ for Kinetics700 (Carreira et al., 2019) and $T = 1 0$ for AudioSet (Gemmeke et al., 2017)) and sampling 16 frames from each. For audio stream, we take waveform sampled at $4 4 . 1 \mathrm { k H z }$ and convert it to log-mel-scaled spectrogram. We augment audio data with random frequency/time masking using SpecAugment (Park et al., 2019), and visual data with color normalization, random resizing, random horizontal flip, and random cropping to obtain $1 1 2 \times 1 1 2$ pixel frames; for test data, we resize videos to 128 pixels on the shorter side and take three equidistant crops of $1 2 8 \times 1 2 8$ pixels to cover the entire region. We also apply audio-visual synchronized temporal jittering (Patrick et al., 2020).
|
| 368 |
+
|
| 369 |
+

|
| 370 |
+
Figure 3: Loss curves during pretraining under different ablative settings. (a) compares ContentAware Negative Sampling (CANS) that favors negatives that are dissimilar vs. similar to the positive instance. (b) compares different cross-Transformer weight sharing schemes; see the text for details.
|
| 371 |
+
|
| 372 |
+
# A.3 DOWNSTREAM EVALUATION
|
| 373 |
+
|
| 374 |
+
For evaluation on UCF101, we follow the test protocol of (Feichtenhofer et al., 2019): We sample 10 clips from each test video at a uniform time interval, and for each sampled clip, we take three equidistant spatial crops, resulting in a total of 30 views. We use each of the 30 views as input to our visual CNN and average the prediction scores from all 30 views to obtain the final prediction result. For evaluation on ESC-50 (Piczak, 2015a), we extract 10 equally spaced 2-second clips from each test audio sample. We use each of 10 clips as input to our audio CNN and average the prediction scores to obtain the final prediction result. For evaluation on Charades and Kinetics-Sounds, we use three audio-visual sequences with different spatial crops from a test video and max-pool/average the prediction scores from each sequence, respectively.
|
| 375 |
+
|
| 376 |
+
# A.4 OPTIMIZATION
|
| 377 |
+
|
| 378 |
+
In all experiments, we use the AMSGrad (Reddi et al., 2018) variant of AdamW (Loshchilov & Hutter, 2019) optimizer with $\beta _ { 1 } = 0 . 9$ , $\beta _ { 2 } = 0 . 9 8$ , L2 weight decay of 1e-4. We use a learning rate warm-up for the first $6 \%$ of iterations followed by a linear decay of learning rate.
|
| 379 |
+
|
| 380 |
+
From the observations of Lezcano-Casado and Martínez-Rubio (Lezcano-Casado & Martínez-Rubio, 2019), we have 10 times less learning rate for the orthogonal parameters than that for the nonorthogonal parameters: we use 1e-5 for the former and 1e-4 for the latter.
|
| 381 |
+
|
| 382 |
+
We pretrain our model on Kinetics-700 (Carreira et al., 2019) with a batch size 256 for 220K iterations and AudioSet (Gemmeke et al., 2017) with a batch size 300 for 220K iterations in the main experiments; for the ablation study, we use a much smaller batch size of 4 and pretrain our model on Kinetics-700 for 80K iterations.
|
| 383 |
+
|
| 384 |
+
For finetuning on UCF101, we train our model for 40K iterations with a batch size of 64 and learning rate of 0.02. For evaluation on ESC-50, we train a multi-class one-vs-all linear SVM on top of our fixed audio CNN for 38K iterations with a batch size of 128 and learning rate of 0.003. For finetuning on Charades, we train for 40K iterations with a batch size of 8, with learning rate of 0.001 for the classifier and CNN parameters, 1e-5 for the orthogonal parameters and 1e-4 for the rest parameters. For finetuning on Kinetics-Sounds, we train for 24K iterations with a batch size of 32, with learning rate of 0.005 for the classifier and CNN parameters, 1e-4 for the orthogonal parameters and 1e-3 for the rest parameters.
|
| 385 |
+
|
| 386 |
+
# B EXTRA RESULTS FROM THE ABLATION STUDY
|
| 387 |
+
|
| 388 |
+
# B.1 NEGATIVE SAMPLING STRATEGIES
|
| 389 |
+
|
| 390 |
+
We proposed the content-aware negative sampling strategy (CANS) using pairwise $l _ { 2 }$ distances between CNN embeddings. We introduced two variants of CANS: CANS-Dissimilar that favors negatives that are dissimilar to the positive instance and CANS-Similar that favors negatives that are similar to the positive instance. We chose to use CANS-Similar based on the results from our ablation study presented in the main paper, Table 1 (b).
|
| 391 |
+
|
| 392 |
+
Figure 3 (a) in this appendix provides additional evidence that supports our decision. We see that the loss of CANS-Disimilar initially drops rapidly but starts increasing around iteration 7K and continues to increase until around 15K; this is mainly caused by the visual MEP loss shown in Figure 3 (a-2). One explanation for this might that CANS-Disimilar is easier to solve than CANS-Similar, which causes the loss landscape of CANS-Disimilar to contain too many shallow local minima compared to that of CANS-Similar. Recall that we use a learning rate warm-up for the first $6 \%$ of iterations during pretraining; this roughly equals to the first 13K (out of 220K) iterations. Given this, we speculate that the model got out of a local minima around iteration 7K (most likely due to the increasing learning rate), and then eventually settled in another (bad) local minima after the warm-up period ended. Compared to this, we observe much milder learning dynamics with CANS-Similar: the loss decreases relatively slowly but steadily, and eventually leaps around 35K to go below the loss of CANS-Disimilar. We, again, believe that this is because CANS-Similar is more difficult to solve than CANS-Disimilar (as shown by the slower decrease in loss values), which caused the resulting loss landscape to contain steeper local minima. Our model eventually found one of those after round 40K of iterations, resulting in a better performing model in the downstream tasks shown in Table 1 (b) of the main paper (the loss kept slowly decreasing after iteration 50K).
|
| 393 |
+
|
| 394 |
+
# B.2 PARAMETER SHARING SCHEMES
|
| 395 |
+
|
| 396 |
+
We proposed a cross-Transformer weight sharing technique, which decomposes weight matrices with low-rank approximation. Recall that each layer of a Transformer contains the multi-head attention layer weights $\{ W ^ { q } , W ^ { k } , W ^ { v } , W ^ { b } \}$ and the feed-forward layer weights $\{ W ^ { c } , W ^ { d } \}$ . We chose to share all six weight matrices across Transformers, though we could have shared any combination of them. To justify this design choice, we empirically compared three variants: (i) $\mathrm { M u l t i } - 6$ that do not share parameters across Transformers, (ii) Multi-6-Part_Att that shares only $\{ W ^ { q } , W ^ { k } , W ^ { v } , W ^ { b } \}$ (but not $\{ W ^ { c } , W ^ { d } \} _ { \ r }$ ) and (iii) $\mathtt { M u l t i - 6 - P a r t }$ that shares all six weight matrices. Figure 3 (b) shows that there is not much difference between all the variants in terms of the loss curves; we chose to use Multi-6-Part that requires the least number of parameters. We showed that our approach outperforms Multi-6 in the ablation study (Table 1 (c-left) in the main paper).
|
| 397 |
+
|
| 398 |
+
# B.3 JUSTIFICATION FOR THE MEP LOSS FORMULATION
|
| 399 |
+
|
| 400 |
+
Since the multimodal Transformer $h _ { A V }$ has access to both visual and audio inputs, one might think that the model could “leak” information about visual input into $\mathbf { z } ^ { a }$ and information about audio input into $\mathbf { z } ^ { v }$ , which could make MEP trivial to solve. Here we show that this is not the case. By construction, we mask the same positions in audio and visual streams when designing the MEP task, so the model has no access to the masked input even in a cross-modal manner. Empirically, removing the third term in Eq. 6 $( \mathcal { L } _ { \mathrm { N C E } } \big ( \big [ \mathbf { x } ^ { a } ; \mathbf { x } ^ { v } \big ] , \tilde { \mathbf { z } } \big ) )$ leads to performance degradation in Kinetics-Sounds, i.e., top-1 accuracy $6 6 . 7 \%$ vs. ours $6 7 . 5 \%$ (see Table 1), which suggests that solving the MEP task in the multimodal Transformer is beneficial to our model.
|
| 401 |
+
|
| 402 |
+
# B.4 JUSTIFICATION FOR THE CPP LOSS FORMULATION
|
| 403 |
+
|
| 404 |
+
Recall that our CPP loss has two terms; the first term uses the summary embeddings ${ \bf s } _ { g }$ and the second term uses output embeddings ${ \mathbf { s } } _ { h }$ sampled at random positions; see Eq. 7. One could argue that the two terms are redundant as bidirectional Transformers have “one-step” access to all the input embeddings, and thus solving CPP only with the summary embeddings (the first term) would be enough. This is not the case. We encode ${ \bf s } _ { h }$ with position-specific information through the time embeddings $\mathbf { p } _ { t }$ , which makes every ${ \mathbf { s } } _ { h }$ different compared to ${ \bf s } _ { g }$ . Empirically, we find that removing the second term of Eqn. 7 $\left( \mathbf { s } _ { h } \right)$ in our CPP loss leads to an inferior accuracy $6 6 . 9 \%$ vs. ours $67 . 5 \%$ on Kinetics-Sounds, suggesting its importance in learning.
|
| 405 |
+
|
| 406 |
+
# B.5 USE OF MODALITY EMBEDDINGS IN THE MULTIMODAL TRANSFORMER
|
| 407 |
+
|
| 408 |
+
We use modality embeddings $\mathbf { m } ^ { v }$ and $\mathbf { m } ^ { a }$ as part of input to the multimodal Transformer in order to distinguish embeddings coming from visual and audio Transformers. They are learnable weights trained end-to-end with other parameters. Conceptually, incorporating modality-discriminative embeddings is crucial because of our aggressive weight sharing scheme. Without them, the multimodal Transformer will see the output from audio/visual Transformers $\boldsymbol y ^ { a }$ and $y ^ { v }$ ) as if they are coming from the same distribution because the two Transformers share a large part of weights. Using modality embeddings encourages our model to preserve modality-specific information in the final output, and this empirically leads to performance improvements: ours $6 7 . 5 \%$ vs. without modality embeddings $6 7 . 1 \%$ on Kinetics-Sounds.
|
| 409 |
+
|
| 410 |
+
# B.6 ON THE IMPORTANCE OF END-TO-END PRETRAINING
|
| 411 |
+
|
| 412 |
+
Previous work in multimodal visual-and-language tasks (Tan & Bansal, 2019; Lu et al., 2019) point out that using partially fixed Transformers of different modalities is detrimental to multimodal representation learning (c.f., Sun et al. (2019a;b)). We make the same observation in our audiovisual learning scenario. We compare two variants of Multi-6 Part in Table 1 (c), each of which pretrains only the audio (or visual) CNN/Transformer in the first half of pretraining stage and then continues pretraining the remaining weights while fixing the weights of the audio (or visual) CNN/Transformer in the second half. This leads to inferior performance (audio-fixed $6 2 . 8 \%$ and visual-fixed $6 3 . 1 \%$ vs. ours $6 7 . 5 \%$ ), which is consistent with the results reported in Tan & Bansal (2019); Lu et al. (2019).
|
md/train/6YEQUn0QICG/6YEQUn0QICG.md
ADDED
|
@@ -0,0 +1,578 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# FEDBN: FEDERATED LEARNING ON NON-IID FEATURES VIA LOCAL BATCH NORMALIZATION
|
| 2 |
+
|
| 3 |
+
Xiaoxiao Li
|
| 4 |
+
Department of Computer Science Princeton University
|
| 5 |
+
xiaoxiao.li@aya.yale.edu
|
| 6 |
+
|
| 7 |
+
Meirui Jiang Department of Computer Science and Engineering The Chinese University of Hong Kong mrjiang@cse.cuhk.edu.hk
|
| 8 |
+
|
| 9 |
+
Xiaofei Zhang Department of Statistics Iowa State University xfzhang@iastate.edu
|
| 10 |
+
|
| 11 |
+
Michael Kamp
|
| 12 |
+
Dept of Data Science and AI, Faculty of IT
|
| 13 |
+
Monash University
|
| 14 |
+
michael.kamp@monash.edu
|
| 15 |
+
Qi Dou∗
|
| 16 |
+
Department of Computer Science and Engineering
|
| 17 |
+
The Chinese University of Hong Kong
|
| 18 |
+
qdou@cse.cuhk.edu.hk
|
| 19 |
+
|
| 20 |
+
# ABSTRACT
|
| 21 |
+
|
| 22 |
+
The emerging paradigm of federated learning (FL) strives to enable collaborative training of deep models on the network edge without centrally aggregating raw data and hence improving data privacy. In most cases, the assumption of independent and identically distributed samples across local clients does not hold for federated learning setups. Under this setting, neural network training performance may vary significantly according to the data distribution and even hurt training convergence. Most of the previous work has focused on a difference in the distribution of labels or client shifts. Unlike those settings, we address an important problem of FL, e.g., different scanners/sensors in medical imaging, different scenery distribution in autonomous driving (highway vs. city), where local clients store examples with different distributions compared to other clients, which we denote as feature shift non-iid. In this work, we propose an effective method that uses local batch normalization to alleviate the feature shift before averaging models. The resulting scheme, called FedBN, outperforms both classical FedAvg, as well as the state-of-the-art for non-iid data (FedProx) on our extensive experiments. These empirical results are supported by a convergence analysis that shows in a simplified setting that FedBN has a faster convergence rate than FedAvg. Code is available at https://github.com/med-air/FedBN.
|
| 23 |
+
|
| 24 |
+
# 1 INTRODUCTION
|
| 25 |
+
|
| 26 |
+
Federated learning (FL), has gained popularity for various applications involving learning from distributed data. In FL, a cloud server (the “server”) can communicate with distributed data sources (the “clients”), while the clients hold data separately. A major challenge in FL is the training data statistical heterogeneity among the clients (Kairouz et al., 2019; Li et al., 2020b). It has been shown that standard federated methods such as FedAvg (McMahan et al., 2017) which are not designed particularly taking care of non-iid data significantly suffer from performance degradation or even diverge if deployed over non-iid samples (Karimireddy et al., 2019; Li et al., 2018; 2020a).
|
| 27 |
+
|
| 28 |
+
Recent studies have attempted to address the problem of FL on non-iid data. Most variants of FedAvg primarily tackle the issues of stability, client drift and heterogeneous label distribution over clients (Li et al., 2020b; Karimireddy et al., 2019; Zhao et al., 2018). Instead, we focus on the shift in the feature space, which has not yet been explored in the literature. Specifically, we consider that local data deviates in terms of the distribution in feature space, and identify this scenario as feature shift. This type of non-iid data is a critical problem in many real-world scenarios, typically in cases where the local devices are responisble for a heterogeneity in the feature distributions. For example in cancer diagnosis tasks, medical radiology images collected in different hospitals have uniformly distributed labels (i.e., the cancer types treated are quite similar across the hospitals). However, the image appearance can vary a lot due to different imaging machines and protocols used in hospitals, e.g., different intensity and contrast. In this example, each hospital is a client and hospitals aim to collaboratively train a cancer detection model without sharing privacy-sensitive data.
|
| 29 |
+
|
| 30 |
+

|
| 31 |
+
Figure 1: Training error on local datasets for two clients respectively with and w/o BN, where BN harmonizes the loss surface.
|
| 32 |
+
|
| 33 |
+

|
| 34 |
+
Figure 2: Error surface of a client for model parameter $w \in [ 0 . 0 0 1 , 1 2 ]$ and BN parameter $\gamma \in [ 0 . 0 0 1 , 4 ]$ . Averaging model and BN parameters leads to worse solutions.
|
| 35 |
+
|
| 36 |
+
Tackling non-iid data with feature shift has been explored in classical centralized training in the context of domain adaptation. Here, an effective approach in practice is utilizing Batch Normalization (BN) (Ioffe & Szegedy, 2015): recent work has proposed BN as a tool to mitigate domain shifts in domain adaptation tasks with promising results achieved (Li et al., 2016; Liu et al., 2020; Chang et al., 2019). Inspired by this, this paper proposes to apply BN for feature shift FL. To illustrate the idea, we present a toy example that illustrates how BN may help harmonizing local feature distributions.
|
| 37 |
+
|
| 38 |
+
Observation of BN in a FL Toy Example: We consider a simple non-convex learning problem: we generate data $x , y \in \mathbb { R }$ with $y = \cos ( w _ { t r u e } x ) + \epsilon$ , where $x \in \mathbb { R }$ is drawn iid from Gaussian distribution and $\epsilon$ is zero-mean Gaussian noise and consider models of the form $f _ { w } ( x ) = \cos ( w x )$ with model parameter $w \in \mathbb { R }$ . Local data deviates in the variance of $x$ . First, we illustrate that local batch normalization harmonizes local data distributions. We consider a simplified form of BN that normalizes the input by scaling it with $\gamma _ { : }$ , i.e., the local empirical standard deviation, and a setting with 2 clients. As Fig. 1 shows, the local squared loss is very different between the two clients. Thus, averaging the model does not lead to a good model. However when applying local BN, the local training error surfaces become similar and averaging the models can be beneficial. To further illustrate the impact of BN, we plot the error surface for one client with respect to both model parameter $w \in \mathbb { R }$ and BN parameter $\gamma \in \mathbb { R }$ in Fig. 2. The figure shows that for an optimal weight $w _ { 1 } ^ { * }$ , changing $\gamma$ deteriorates the model quality. Similarly, for a given optimal BN parameter $\gamma _ { 1 } ^ { * }$ , changing $w$ deteriorates the quality. In particular, the average model $\overline { { w } } \overset { \cdot } { = } ( w _ { 1 } ^ { * } + \overset { \cdot } { w } _ { 2 } ^ { * } ) / 2$ and average BN parameters $\overline { { \gamma } } = ( \gamma _ { 1 } ^ { * } + \gamma _ { 2 } ^ { * } ) / 2$ has a high generalization error. At the same time, the average model $\overline { { w } }$ with local BN parameter $\gamma _ { 1 } ^ { * }$ performs very well.
|
| 39 |
+
|
| 40 |
+
Motivated by the above insight and observation, this paper proposes a novel federated learning method, called FedBN, for addressing non-iid training data which keeps the client BN layers updated locally, without communicating, and aggregating them at the server. In practice, we can simply update the non-BN layers using FedAvg, without modifying any optimization or aggregation scheme. This approach has zero parameters to tune, requires minimal additional computational resources, and can be easily applied to arbitrary neural network architectures with BN layers in FL. Besides the benefit shown in the toy example, we also show the benefits in accelerating convergence by theoretically analyzing the convergence of FedBN in the over-parameterized regime. In addition, we have conducted extensive experiments on a benchmark and three real-world datasets. Compared to classical FedAvg, as well as the state-of-the-art for non-iid data (FedProx), our novel method, FedBN, demonstrates significant practical improvements on the extensive experiments.
|
| 41 |
+
|
| 42 |
+
# 2 RELATED WORK
|
| 43 |
+
|
| 44 |
+
Techniques for Non-IID Challenges in Federated Learning: The widely known aggregation strategy in FL, FedAvg (McMahan et al., 2017), often suffers when data is heterogeneous over local client. Empirical work addressing non-iid issues, mainly focus on label distribution skew, where a non-iid dataset is formed by partitioning a “flat” existing dataset based on the labels. FedProx (Li et al., 2020b), a recent framework tackled the heterogeneity by allowing partial information aggregation and adding a proximal term to FedAvg. Zhao et al. (2018) assumed a subset of the data is globally shared between all the clients, hence generalizes to the problem at hand. FedMA (Wang et al., 2020) proposed an aggregation strategy for non-iid data partition that shares global model in a layer-wise manner. However, so far there are only limited attempts considering non-iid induced from feature shift, which is common in medical data collecting from different equipment and natural image collected in various noisy environment. Very recently, FedRobust (Reisizadeh et al., 2020) assumes data follows an affine distribution shift and tackles this problem by learning the affine transformation. This hampers the generalization when we cannot estimate the explicit affine transformation. Concurrently to our work, SiloBN Andreux et al. (2020) empirically shows that local clients keeping some untrainable BN parameters could improve robustness to data heterogeneity, but provides no theoretical analysis of the approach. FedBN instead keeps all BN parameters strictly local. Recently, an orthogonal approach to the non-iid problem has been proposed that focuses on improving the optimization mechanism (Reddi et al., 2020; Zhang et al., 2020).
|
| 45 |
+
|
| 46 |
+
Batch Normalization in Deep Neural Networks: Batch Normalization (Ioffe & Szegedy, 2015) is an indispensable component in many deep neural networks and has shown its success in neural network training. Relevant literature has uncovered a number of benefits given by batch normalization. Santurkar et al. (2018) showed that BN makes the optimization landscape significantly smoother. Luo et al. (2018) investigated an explicit regularization form of BN such that improving the robustness of optimization. Morcos et al. (2018) suggested that BN implicitly discourages single direction reliance, thus improving model generalizability. Li et al. (2018) took advantage of BN for tackling the domain adaptation problem. However, what a role BN is playing in the scope of federated learning, especially for non-iid training, still remains unexplored to date.
|
| 47 |
+
|
| 48 |
+
# 3 PRELIMINARY
|
| 49 |
+
|
| 50 |
+
Non-IID Data in Federated Learning: We introduce the concept of feature shift in federated learning as a novel category of client’s non-iid data distribution. So far, the categories of non-iid data considered according to Kairouz et al. (2019); Hsieh et al. (2019) can be described by the joint probability between features $\mathbf { x }$ and labels $y$ on each client. We can rewrite $P _ { i } ( \mathbf { x } , y )$ as $P _ { i } ( y | \mathbf { x } ) P _ { i } ( \mathbf { x } )$ and $P _ { i } ( { \bf x } | y ) P _ { i } ( y )$ . We define feature shift as the case that covers: 1) covariate shift: the marginal distributions $P _ { i } ( { \bf x } )$ varies across clients, even if $P _ { i } ( y | \mathbf { x } )$ is the same for all client; and 2) concept shift: the conditional distribution $P _ { i } ( \mathbf { x } | y )$ varies across clients and $P ( y )$ is the same.
|
| 51 |
+
|
| 52 |
+
Federated Averaging (FedAvg): We establish our algorithm on FedAvg introduced by McMahan et al. (2017) which is the most popular existing and easiest to implement federated learning strategy, where clients collaboratively send updates of locally trained models to a global server. Each client runs a local copy of the global model on its local data. The global model’s weights are then updated with an average of local clients’ updates and deployed back to the clients. This builds upon previous distributed learning work by not only supplying local models but also performing training locally on each device. Hence FedAvg potentially empowers clients (especially clients with small dataset) to collaboratively learn a shared prediction model while keeping all training data locally. Although FedAvg has shown successes in classical Federated Learning tasks, it suffers from slow convergence and low accuracy in most non-iid contents (Li et al., 2020b; 2019).
|
| 53 |
+
|
| 54 |
+
# 4 FEDERATED AVERAGING WITH LOCAL BATCH NORMALIZATION
|
| 55 |
+
|
| 56 |
+
# 4.1 PROPOSED METHOD - FEDBN
|
| 57 |
+
|
| 58 |
+
We propose an efficient and effective learning strategy denoted FedBN. Similar to FedAvg, FedBN performs local updates and averages local models. However, FedBN assumes local models have BN layers and excludes their parameters from the averaging step. We present the full algorithm in Appendix C. This simple modification results in significant empirical improvements in non-iid settings. We provide an explanation for these improvements in a simplified scenario, in which we show that FedBN improves the convergence rate under feature shift.
|
| 59 |
+
|
| 60 |
+
# 4.2 PROBLEM SETUP
|
| 61 |
+
|
| 62 |
+
We assume $N \in \mathbb { N }$ clients to jointly train for $T \in \mathbb { N }$ epochs and to communicate after $E \in \mathbb { N }$ local iterations. Thus, the system has $T / _ { E }$ communication rounds over the $T$ epochs. For simplicity, we assume all clients to have $M \in \mathbb { N }$ training examples (a difference in training examples can be account for by weighted averaging (McMahan et al., 2017)) for a regression task, i.e., each client $i \in [ N ] \left( [ N ] \right) = \{ 1 , \cdot \cdot . . , N \} )$ has training examples $\{ ( \mathbf { x } _ { j } ^ { i } , \boldsymbol { y } _ { j } ^ { i } ) \in \mathbb { R } ^ { d } { \times } \mathbb { R } : j \in [ M ] \}$ . Furthermore, we assume a two-layer neural network with ReLU activations trained by gradient descent. Let $\mathbf { v } _ { k } \in \mathbb { R } ^ { d }$ denote the parameters of the first layer, where $k \in [ m ]$ and $m$ is the width of the hidden layer. Let $\| \mathbf { v } \| \mathbf { s } \triangleq \sqrt { \mathbf { v } ^ { \top } \mathbf { S } \mathbf { v } }$ denote the induced vector norm for a positive definite matrix S.
|
| 63 |
+
|
| 64 |
+
We consider a non-iid setting in FL where local feature distributions differ—not label distribution, as considered, e.g., in McMahan et al. (2017); Li et al. (2019). To be more precise, we make the following assumption.
|
| 65 |
+
|
| 66 |
+
Assumption 4.1 (Data Distribution). For each client $i \in [ N ]$ the inputs $\mathbf { x } _ { j } ^ { i }$ are centered $\left( \mathbb { E } \mathbf { x } ^ { i } = \mathbf { 0 } \right)$ ) with covariance matrix $\mathbf { S } _ { i } = \mathbb { E } \mathbf { x } ^ { i } \mathbf { x } ^ { i \top }$ , where $\mathbf { S } _ { i }$ is independent from the label y and may differ for each $i \in [ N ]$ e.g., $\mathbf { S } _ { i }$ are not all identity matrices, and for each index pair $p \neq q$ , $\mathbf { x } _ { p } \neq \boldsymbol { \kappa } \cdot \mathbf { x } _ { q }$ for all $\kappa \in \mathbb { R } \backslash \{ 0 \}$ .
|
| 67 |
+
|
| 68 |
+
With Assumption 4.1, the normalization of the first layer for client $i$ is $\frac { \mathbf { v } _ { k } ^ { \top } \mathbf { x } ^ { i } } { \| \mathbf { v } _ { k } \| _ { \mathbf { s } _ { i } } }$ . FedBN with clientspecified BN parameters trains a model $f ^ { * } : \mathbb { R } ^ { d } \mathbb { R }$ parameterized by $\mathbf { \bar { \Phi } } ( \mathbf { V } , \gamma , \mathbf { c } ) \ \in \ \mathbb { R } ^ { m \times d } \ \times$ $\mathbf { \varmathbb { R } } ^ { m \times N } \times \mathbf { \varmathbb { R } } ^ { m }$ , i.e.,
|
| 69 |
+
|
| 70 |
+
$$
|
| 71 |
+
f ^ { * } ( { \bf x } ; { \bf V } , \gamma , { \bf c } ) = \frac { 1 } { \sqrt { m } } \sum _ { k = 1 } ^ { m } c _ { k } \sum _ { i = 1 } ^ { N } \sigma \left( \gamma _ { k , i } \cdot \frac { { \bf v } _ { k } ^ { \top } { \bf x } } { \| { \bf v } _ { k } \| _ { { \bf s } _ { i } } } \right) \cdot \mathbb { 1 } \left\{ { \bf x } \in \mathrm { c l i e n t ~ } i \right\} ~ ,
|
| 72 |
+
$$
|
| 73 |
+
|
| 74 |
+
where $\gamma$ is the scaling parameter of BN and $\sigma ( s ) = \operatorname* { m a x } \{ s , 0 \}$ is the ReLU activation function, $\mathbf { c }$ is the top layer parameters of the network. Here, we omit learning the shift parameter of $\mathbf { B N } ^ { 1 }$ . FedAvg instead trains a function $f : { \mathbb { R } ^ { d } } \to { \mathbb { R } }$ which is a special case of Eq. 1 with $\gamma _ { k , i } = \gamma _ { k }$ for $\forall i \in [ N ]$ . We take a random initialization of the parameters (Salimans $\&$ Kingma, 2016) in our analysis:
|
| 75 |
+
|
| 76 |
+
$$
|
| 77 |
+
\begin{array} { r } { \mathbf { v } _ { k } ( 0 ) \sim N \left( 0 , \alpha ^ { 2 } \mathbf { I } \right) , \quad c _ { k } \sim U \{ - 1 , 1 \} , \quad \mathrm { a n d } \quad \gamma _ { k } = \gamma _ { k , i } = \| \mathbf { v } _ { k } ( 0 ) \| _ { 2 } / \alpha , } \end{array}
|
| 78 |
+
$$
|
| 79 |
+
|
| 80 |
+
where $\alpha ^ { 2 }$ controls the magnitude of $\mathbf { v } _ { k }$ at initialization. The initialization of the BN parameters $\gamma _ { k }$ and $\gamma _ { k , i }$ are independent of $\alpha$ . The parameters of the network $f ^ { * } ( \mathbf { x } ; \mathbf { V } , \gamma , \mathbf { c } )$ are obtained by minimizing the empirical risk with respect to the squared loss using gradient descent :
|
| 81 |
+
|
| 82 |
+
$$
|
| 83 |
+
L ( f ^ { * } ) = \frac { 1 } { N M } \sum _ { i = 1 } ^ { N } \sum _ { j = 1 } ^ { M } \left( f ^ { * } ( \mathbf { x } _ { j } ^ { i } ) - y _ { j } ^ { i } \right) ^ { 2 } .
|
| 84 |
+
$$
|
| 85 |
+
|
| 86 |
+
# 4.3 CONVERGENCE ANALYSIS
|
| 87 |
+
|
| 88 |
+
Here we study the trajectory of networks FedAvg $( f )$ and FedBN $( f ^ { * } )$ ’s prediction through the neural tangent kernel (NTK) introduced by Jacot et al. (2018). Recent machine learning theory
|
| 89 |
+
|
| 90 |
+
studies (Arora et al., 2019; Du et al., 2018; Allen-Zhu et al., 2019; van den Brand et al., 2020; Dukler et al., 2020) have shown that for finite-width over-parameterized networks, the convergence rate is controlled by the least eigenvalue of the induced kernel in the training evolution.
|
| 91 |
+
|
| 92 |
+
To simplify tracing the optimization dynamics, we consider the case that the number of local updates $E$ is 1. We can decompose the NTK into a magnitude component $\mathbf G ( t )$ and direction component $\mathbf { V } ( t ) / \alpha ^ { 2 }$ following Dukler et al. (2020):
|
| 93 |
+
|
| 94 |
+
$$
|
| 95 |
+
{ \frac { d \mathbf { f } } { d t } } = - \mathbf { \nabla } \mathbf { A } ( t ) ( \mathbf { f } ( t ) - \mathbf { y } ) , \quad { \mathrm { w h e r e } } \quad \mathbf { \nabla } \mathbf { \mathbf { A } } ( t ) : = { \frac { \mathbf { V } ( t ) } { \alpha ^ { 2 } } } + \mathbf { G } ( t ) .
|
| 96 |
+
$$
|
| 97 |
+
|
| 98 |
+
The specific forms of $\mathbf { V } ( t )$ and $\mathbf G ( t )$ are given in Appendix B.1. Let $\lambda _ { m i n } ( A )$ denote the minimal eigenvalue of matrix $A$ . The matrices $\mathbf { V } ( t )$ and $\mathbf G ( t )$ are positive semi-definite, since they can be viewed as covariance matrices. This gives $\lambda _ { \operatorname* { m i n } } ( \mathbf { \boldsymbol { \Lambda } } ( t ) ) \ge \operatorname* { m a x } \left\{ \lambda _ { \operatorname* { m i n } } ( \mathbf { \boldsymbol { V } } ( t ) ) / \alpha ^ { 2 } , \lambda _ { \operatorname* { m i n } } ( \mathbf { \boldsymbol { G } } ( t ) ) \right\}$ . According to NTK, the convergence rate is controlled by $\lambda _ { m i n } ( \pmb { \Lambda } ( t ) \ )$ . Then, for $\alpha > 1$ , convergence is dominated by $\mathbf G ( t )$ . Let $\mathbf { \boldsymbol { \Lambda } } ( t )$ and $\mathbf { \boldsymbol { \Lambda } } ^ { * } ( t )$ denote the evolution dynamics of FedAvg and FedBN and let $\mathbf G ( t )$ and $\mathbf { G } ^ { * } ( t )$ denote the magnitude component in the evolution dynamics of FedAvg and FedBN. For the convergence analysis, we use the auxiliary version of the Gram matrices, which is defined as follows.
|
| 99 |
+
|
| 100 |
+
Definition 4.2. Given sample points $\{ \mathbf { x } _ { p } \} _ { p = 1 } ^ { N M }$ , we define the auxiliary Gram matrices ${ \bf G } ^ { \infty } \in$ $\mathbb { R } ^ { N M \times N M }$ and $\mathbf { G } ^ { \ast \infty } \in \mathbb { R } ^ { N M \times N M }$ as
|
| 101 |
+
|
| 102 |
+
$$
|
| 103 |
+
\begin{array} { r l } & { \mathbf { G } _ { p q } ^ { \infty } : = \mathbb { E } _ { \mathbf { v } \sim N ( 0 , \alpha ^ { 2 } \mathbf { I } ) } \sigma \left( \mathbf { v } ^ { \top } \mathbf { x } _ { p } \right) \sigma \left( \mathbf { v } ^ { \top } \mathbf { x } _ { q } \right) , ~ ( F e d A \nu g ) } \\ & { \mathbf { G } _ { p q } ^ { * \infty } : = \mathbb { E } _ { \mathbf { v } \sim N ( 0 , \alpha ^ { 2 } \mathbf { I } ) } \sigma \left( \mathbf { v } ^ { \top } \mathbf { x } _ { p } \right) \sigma \left( \mathbf { v } ^ { \top } \mathbf { x } _ { q } \right) \mathbb { 1 } \{ i _ { p } = i _ { q } \} , ~ ( F e d B N ) . } \end{array}
|
| 104 |
+
$$
|
| 105 |
+
|
| 106 |
+
Given Assumption 4.1, we use the key results in Dukler et al. (2020) to show that $\mathbf { G } ^ { \infty }$ is positive definite. Further, we show that $\mathbf { G } ^ { * \infty }$ is positive definite. We use the fact that the distance between $\mathbf G ( t )$ and its auxiliary version is small in over-parameterized neural network, such that $\mathbf G ( t )$ remains positive definite.
|
| 107 |
+
|
| 108 |
+
Lemma 4.3. Fix points $\{ \mathbf { x } _ { p } \} _ { p = 1 } ^ { N M }$ satisfying Assumption 4.1. Then Gram matrices $\mathbf { G } ^ { \infty }$ and $\mathbf { G } ^ { * \infty }$ defined as in (4) and (5) are strictly positive definite. Let the least eigenvalues be $\lambda _ { \operatorname* { m i n } } ( \mathbf G ^ { \infty } ) = : \mu _ { 0 }$ and $\lambda _ { \operatorname* { m i n } } ( \mathbf G ^ { * \infty } ) = : \mu _ { 0 } ^ { * }$ , where $\mu _ { 0 } , \mu _ { 0 } ^ { * } > 0$ .
|
| 109 |
+
|
| 110 |
+
Proof sketch The main idea follows Du et al. (2018); Dukler et al. (2020), that given points $\{ \mathbf { x } _ { p } \} _ { p = 1 } ^ { N M }$ , the matrices . More details $\mathbf { G } ^ { \infty }$ and e pr $\mathbf { G } ^ { * \infty }$ can be shown as covariance matrix of linearly independente given in the Appendix B.2.
|
| 111 |
+
|
| 112 |
+
Based on our formulation, the convergence rate of FedAvg (Theorem 4.4) can be derived from Dukler et al. (2020) by considering non-identical covariance matrices. We derive the convergence rate of FedBN in Corollary 4.5. Our key result of comparing the convergence rates between FedAvg and FedBN is culminated in Corollary 4.6.
|
| 113 |
+
|
| 114 |
+
Theorem 4.4 (G-dominated convergence for FedAvg Dukler et al. (2020)). Suppose network (4) is initialized as in (2) with $\alpha > 1$ , trained using gradient descent and Assumptions 4.1 holds. Given the loss function of training the neural network is the square loss with targets y satisfying $\| \mathbf { y } \| _ { \infty } = O ( 1 )$ . If $m = \Omega$ ma $\mathrm { x } \left\{ \tilde { N ^ { 4 } } M ^ { 4 } \log ( N M / \delta ) / \alpha ^ { 4 } \mu _ { 0 } ^ { 4 } , \hat { N ^ { 2 } } M ^ { 2 } \log ( N M / \delta ) \tilde { / } \mu _ { 0 } ^ { 2 } \right\} \nonumber$ , then with probability $1 - \delta$ ,
|
| 115 |
+
|
| 116 |
+
1. For iterations $t = 0 , 1 , \cdots$ , the evolution matrix $\Lambda ( t )$ satisfies $\begin{array} { r } { \lambda _ { \operatorname* { m i n } } ( \mathbf { A } ( t ) ) \geq \frac { \mu _ { 0 } } { 2 } } \end{array}$
|
| 117 |
+
|
| 118 |
+
2. Training with gradient descent of step-size $\begin{array} { r } { \eta = O \left( \frac { 1 } { \left. \mathbf { A } \left( t \right) \right. } \right) } \end{array}$ converges linearly as
|
| 119 |
+
|
| 120 |
+
$$
|
| 121 |
+
\| \mathbf { f } ( t ) - \mathbf { y } \| _ { 2 } ^ { 2 } \leq \Big ( 1 - \frac { \eta \mu _ { 0 } } { 2 } \Big ) ^ { t } \| \mathbf { f } ( 0 ) - \mathbf { y } \| _ { 2 } ^ { 2 } .
|
| 122 |
+
$$
|
| 123 |
+
|
| 124 |
+
Following the key ideas in Dukler et al. (2020), here we further characterize the convergence for FedBN.
|
| 125 |
+
|
| 126 |
+
Corollary 4.5 ( $\mathbf { G }$ -dominated convergence for FedBN). Suppose network (5) and all other conditions in Theorem 4.4. With probability $1 - \delta$ , for iterations $t = 0 , 1 , \cdots$ , the evolution matrix $\mathbf { \boldsymbol { \Lambda } } ^ { * } ( t )$ satisfies $\begin{array} { r } { \lambda _ { \operatorname* { m i n } } ( \mathbf { A } ^ { * } ( t ) ) \geq \frac { \mu _ { 0 } ^ { * } } { 2 } } \end{array}$ and training with gradient descent of step-size $\begin{array} { r } { \eta = O \left( \frac { 1 } { \left. \mathbf { 1 } ^ { * } \left( t \right) \right. } \right) } \end{array}$ converges linearly as $\begin{array} { r } { \| \mathbf { f } ^ { * } ( t ) - \mathbf { y } \| _ { 2 } ^ { 2 } \leq \left( 1 - \frac { \eta \mu _ { 0 } ^ { * } } { 2 } \right) ^ { t } \| \mathbf { f } ^ { * } ( 0 ) - \mathbf { y } \| _ { 2 } ^ { 2 } . } \end{array}$
|
| 127 |
+
|
| 128 |
+

|
| 129 |
+
Figure 3: Convergence of the training loss of FedBN and FedAvg on the digits classification datasets. FedBN exhibits faster and more robust convergence.
|
| 130 |
+
|
| 131 |
+
The exponential factor of convergence for FedAvg $( 1 - \eta \mu _ { 0 } / 2 )$ and FedBN $( 1 - \eta \mu _ { 0 } ^ { * } / 2 )$ are controlled by the smallest eigenvalue of $\mathbf G ( t )$ , respectively $\mathbf { G } ^ { * } ( t )$ . Then we can analyze the convergence performance of FedAvg and FedBN by comparing $\lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { \infty } )$ and $\lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { * \infty } )$ .
|
| 132 |
+
|
| 133 |
+
Corollary 4.6 (Convergence rate comparison between FedAvg and FedBN). For the G-dominated convergence, the convergence rate of FedBN is faster than that of FedAvg.
|
| 134 |
+
|
| 135 |
+
Proof sketch The key is to show $\lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { \infty } ) \leq \lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { * \infty } )$ . Comparing equation (4) and (5), $\mathbf { G } ^ { * \infty }$ takes the $M \times M$ block matrices on the diagonal of $\mathbf { G } ^ { \infty }$ . Let $\mathbf { G } _ { i } ^ { \infty }$ be the $i$ -th $M \times M$ block matrices on the diagonal of $\mathbf { G } ^ { \infty }$ . By linear algebra, $\lambda _ { \operatorname* { m i n } } ( \mathbf { G } _ { i } ^ { \infty } ) \geq \lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { \infty } )$ for $i \in [ N ]$ . Since $\mathbf { G } ^ { * \infty } = d i a g ( \mathbf { G } _ { 1 } ^ { \infty } , \cdot \cdot \cdot , \mathbf { G } _ { N } ^ { \infty } )$ , we have $\begin{array} { r } { \lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { * \infty } ) = \operatorname* { m i n } _ { i \in [ N ] } \left\{ \lambda _ { \operatorname* { m i n } } ( \mathbf { G } _ { i } ^ { \infty } ) \right\} } \end{array}$ . Therefore, we have the result $\lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { * \infty } ) \geq \lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { \infty } )$ .
|
| 136 |
+
|
| 137 |
+
# 5 EXPERIMENTS
|
| 138 |
+
|
| 139 |
+
In this section, we demonstrate that using local BN parameters is beneficial in the presence of feature shift across clients with heterogeneity data. Our novel local parameter sharing strategy, FedBN, achieves more robust and faster convergence for feature shift non-iid datasets and obtains better model performance compared to alternative methods. This is shown on both benchmark and large real-world datasets.
|
| 140 |
+
|
| 141 |
+
# 5.1 BENCHMARK EXPERIMENTS
|
| 142 |
+
|
| 143 |
+
Settings: We perform an extensive empirical analysis using a benchmark digits classification task containing different data sources with feature shift where each dataset is from a different domain. Data of different domains have heterogeneous appearance but share the same labels and label distribution. Specifically, we use the following five datasets: SVHN Netzer et al. (2011), USPS Hull (1994), SynthDigits Ganin & Lempitsky (2015), MNIST-M Ganin & Lempitsky (2015) and MNIST LeCun et al. (1998). To match the setup in Section 4, we truncate the sample size of the five datasets to their smallest number with random sampling, resulting in 7438 training samples in each dataset 2. Testing samples are held out and kept the same for all the experiments on this benchmark dataset. Our classification model is a convolutional neural network where BN layers are added following each feature extraction layer (i.e., both convolutional and fully-connected). The architecture is detailed in Appendix D.2. For model training, we use the cross-entropy loss and SGD optimizer with a learning rate of $1 0 ^ { - 2 }$ . If not specified, our default setting for local update epochs is $E = 1$ , and the default setting for the amount of data at each client is $1 0 \%$ 3 of the dataset original size. For the default non-iid setting, the FL system contains five clients. Each client exclusively owns data sampled from one of the five datasets. More details are listed in Appendix D.2.
|
| 144 |
+
|
| 145 |
+

|
| 146 |
+
Figure 4: Analytical experimental results on: (a) Analysis on different local updating epochs. FedBN consistently outperforms FedAvg in testing accuracy. (b) Model performance over varying dataset size on local clients. (c) Testing accuracy on different levels of heterogeneity.
|
| 147 |
+
|
| 148 |
+
Overviews: In the following paragraphs, we present a comprehensive investigation on the properties of the proposed FedBN approach, including: (1) convergence rate; (2) behavior with respect to the choices of local update epochs; (3) performance on various amounts of data at each client; (4) effects at different level of heterogeneity; (5) comparison to state of the art (FedProx (Li et al., 2020b)), and two baselines (FedAvg and SingleSet, i.e., training an individual model within each client). In Appendix G, we also provide empirical results for including a new client with data from an unknown domain into the learning system.
|
| 149 |
+
|
| 150 |
+
Convergence Rate: We analyze the training loss curve of FedBN in comparison with FedAvg, as shown in Fig. 3. The loss of FedBN goes down faster and smoother than FedAvg, indicating that FedBN has a larger convergence rate. Moreover, compared to FedAvg, FedBN presents smoother and more stable loss curves during learning. These experimental observations show consensus with what given by Corollary 4.6. In addition, we present a more comprehensive comparison with different local update epochs $E$ on convergence rate of FedBN and FedAvg (see Appendix E.1). The results show similar patterns as in Fig 3.
|
| 151 |
+
|
| 152 |
+
Analysis of Local Updating Epochs: Aggregating at different frequencies may affect the learning behaviour. Although our theory and the default setting for the other experiment takes $E = 1$ , we demonstrate FedBN is effective for cases when $E > 1$ . In Fig.4 (a), we explore $E = 1 , 4 , 8 , 1 6$ and compare FedBN to baseline FedAvg. As expected, an inverse relationship between the local updating epochs $E$ and testing accuracy implied for both FedBN and FedAvg shown in Fig.4 (a). Zooming into the final testing accuracy, FedBN’s accuracy stably exceeds the accuracy of FedAvg on various $E$ .
|
| 153 |
+
|
| 154 |
+
Analysis of Local Dataset Size: We vary the data amount for each client from $1 0 0 \%$ to $1 \%$ of its original dataset size, in order to observe FedBN behaviour over different data capacities at each client. The results in Fig.4 (b) present the accuracy of FedBN and SingleSet 4. Testing accuracy starts to significantly drop when each of the local client is only attributed $20 \%$ percentage of data from its original data amount. The improvement margin gained from FedBN increases as local dataset sizes decrease. The results indicate that FedBN can effectively benefit from collaborative training on distributed data, especially when each client only holds a small amount of data which are non-iid.
|
| 155 |
+
|
| 156 |
+
Effects of Statistical Heterogeneity: A salient question that arises is: to what degree of heterogeneity on feature shift FedBN is superior to FedAvg. To answer the question, we simulate a federated settings with varying heterogeneity as described below. We parcel each dataset into 10 subsets, one for each clients, with equal number of data samples and the same label distribution. We treat the clients generated from the same dataset as iid clients, while the clients generated from different datasets as non-iid clients.
|
| 157 |
+
|
| 158 |
+
<table><tr><td rowspan="2">Method</td><td colspan="4">Caltech-10</td><td colspan="6">DomainNet</td><td colspan="4">ABIDE (medical)</td></tr><tr><td>A</td><td>C</td><td>D</td><td>W</td><td>C</td><td>I</td><td>P</td><td>Q</td><td>R</td><td>S</td><td>NYU</td><td>USM</td><td>UM</td><td>UCLA</td></tr><tr><td>SingleSet</td><td>54.9 (1.5)</td><td>40.2 (1.6)</td><td>78.7 (1.3)</td><td>86.4 (2.4)</td><td>41.0 (0.9)</td><td>23.8 (1.2)</td><td>36.2 (2.7)</td><td>73.1 (0.9)</td><td>48.5 (1.9)</td><td>34.0 (1.1)</td><td>58.0 (3.3)</td><td>73.4 (2.2)</td><td>64.3 (1.4)</td><td>57.3 (2.4)</td></tr><tr><td>FedAvg</td><td>54.1 (1.1)</td><td>44.8 (1.0)</td><td>66.9 (1.5)</td><td>85.1 (2.9)</td><td>48.8 (1.9)</td><td>24.9 (0.7)</td><td>36.5 (1.1)</td><td>56.1 (1.6)</td><td>46.3 (1.4)</td><td>36.6 (2.5)</td><td>62.7 (1.7)</td><td>73.1 (2.4)</td><td>70.7 (0.5)</td><td>64.7 (0.7)</td></tr><tr><td>FedProx</td><td>54.2 (2.5)</td><td>44.5 (0.5)</td><td>65.0 (3.6)</td><td>84.4 (1.7)</td><td>48.9 (0.8)</td><td>24.9 (1.0)</td><td>36.6 (1.8)</td><td>54.4 (3.1)</td><td>47.8 (0.8)</td><td>36.9 (2.1)</td><td>63.3 (1.0)</td><td>73.0 (1.8)</td><td>70.5 (1.1)</td><td>64.5 (1.2)</td></tr><tr><td>FedBN</td><td>63.0 (1.6)</td><td>45.3 (1.5)</td><td>83.1 (2.5)</td><td>90.5 (2.3)</td><td>51.2 (1.4)</td><td>26.8 (0.5)</td><td>41.5 (1.4)</td><td>71.3 (0.7)</td><td>54.8 (0.8)</td><td>42.1 (1.3)</td><td>65.6 (1.1)</td><td>75.1 (1.4)</td><td>68.6 (2.9)</td><td>65.5 (1.0)</td></tr></table>
|
| 159 |
+
|
| 160 |
+
Table 1: We report results on three different real-world datasets with format mean(std) from 5-trial run. For Office-Caltech $1 0 , A , C , D , H$ are abbreviations for Amazon, Caltech, DSLR and WebCam, for DomainNet, $C , I , P , Q , R , i$ $s$ are abbreviations for Clipart, Infograph, Painting, Quickdraw, Real and Sketch. For ABIDE, we list the abbreviations for the clients (i.e., medical institutions).
|
| 161 |
+
|
| 162 |
+
We start with including one client from each dataset in FL system. Then, we simultaneously add one client from each datasets while keep the existing clients $n$ times, for $n \in \{ 1 , \ldots , 9 \} ^ { 5 }$ . For each setting, we train models from scratch. More clients correspond to less heterogenity. We show the testing accuracy under different level of heterogeneity in Fig. 4 (c) and include a comparison with FedAvg, which is designed for iid FL. Our FedBN achieves substantially higher testing accuracy than FedAvg over all levels of heterogeneity.
|
| 163 |
+
|
| 164 |
+
Comparison with State-of-theart: To further validate our method, we compare FedBN with one of the current state-of-the-art methods for non-iid FL, FedProx Li et al. (2020b), which also shares the benefit of easy adaptation to current FL frameworks in practice. We also include training on SingleSet and FedAvg as baselines. For each strategy, we split an independent testing datasets on clients and report the accuracy on the testing datasets. We perform 5-trial repeating experiment with different random seeds. The mean and standard deviation of the
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
Figure 5: Performance on benchmark experiments
|
| 168 |
+
|
| 169 |
+
accuracy on each dataset over trials are shown in Fig. $5 ^ { 6 }$ . From the results, we can make the following observation: (1) FedBN achieves the highest accuracy, consistently outperforming the state-of-the-art and baseline methods; (2) FedBN achieves the most significant improvements on SVHN whose image appearance is very different from others (i.e., presenting more obvious feature shift); (3) FedBN shows a smaller variance in error over multiple runs, indicating its stability.
|
| 170 |
+
|
| 171 |
+
# 5.2 EXPERIMENTS ON REAL-WORLD DATASETS
|
| 172 |
+
|
| 173 |
+
To better understand how our proposed algorithm can be beneficial in real-word feature-shift noniid, we have extensively validated the effectiveness of FedBN in comparison with other methods on three real-world datasets: image classification on Office-Caltech10 (Gong et al., 2012) with images acquired in different cameras or environments; image classification on DomainNet (Peng et al., 2019) with different image styles; and a neurodisorder diagnosis task on ABIDE I (Di Martino et al., 2014) with patients from different medical institutions7.
|
| 174 |
+
|
| 175 |
+
Datasets and Setup: (1) We conduct the classification task on natural images from OfficeCaltech10, which has four data sources composing Office-31 Saenko et al. (2010) (three data sources) and Caltech-256 datasets (one data source) Griffin et al. (2007), which are acquired using different camera devices or in different real environment with various background. Each client joining the FL system is assigned data from one of the four data sources. Thus data is non-iid across the clients. (2) Our second dataset is DomainNet, which contains natural images coming from six different data sources: Clipart, Infograph, Painting, Quickdraw, Real, and Sketch. Similar to (1), each client contains iid data from one of the data sources, but clients with different data sources have different feature distributions. (3) We include four medical institutions (NYU, USM, UM, UCLA; each is viewed as a client) from ABIDE I that collects functional brain images using different imaging equipment and protocols. We validate on a medical application for binary classification between autism spectrum disorders patients and healthy control subjects.
|
| 176 |
+
|
| 177 |
+
The Office-Caltech10 contains ten categories of objects. The DomainNet extensively contains 345 object categories and we use the top ten most common classes to form a sub-dataset for our experiments. Our classification models adopt AlexNet (Krizhevsky et al., 2012) architecture with BN added after each convolution and fully-connected layer. Before feeding into the network, all images are resized to $2 5 6 \times 2 5 6 \times 3$ . For ABIDE I, each instance is represented as a 5995-dimensional vector through brain connectome computation. We use a three-layer fully connected neural network as the classifier with the hidden layers of 16 with two BN layers after the first two fully connected layers. Same as the above benchmark, we perform 5 repeated runs for each experiment.
|
| 178 |
+
|
| 179 |
+
Results and Analysis: The experimental results are shown in Table 1 in the form of mean (std). On Office-Caltech10, FedBN significantly outperforms the state-of-the-art method of FedProx, and improves at least $6 \%$ on mean accuracy compared with all the alternative methods. On DomainNet, FedBN achieved supreme accuracy over most of the datasets. Interestingly, we find the alternative FL methods achieves comparable results with SingleSet except Quickdraw, and FedBN outperforms them over $1 0 \%$ . Surprisingly, for the above two tasks, the alternative FL strategies are ineffective in the feature shift non-iid datasets, even worse than using single client data for training for most of the clients. In ABIDE I, FedBN excell by a non-negligible margin on three clients regarding the mean testing accuracy. The results are inspiring and bring the hope of deploying FedBN to healthcare field, where data are often limited, isolated and heterogeneous on features.
|
| 180 |
+
|
| 181 |
+
# 6 CONCLUSION AND DISCUSSION
|
| 182 |
+
|
| 183 |
+
This work proposes a novel federated learning aggregation method called FedBN that keeps the local Batch Normalization parameters not synchronized with the global model, such that it mitigates feature shifts in non-IID data. We provide convergence guarantees for FedBN in realistic federated settings under the overparameterized neural networks regime, while also accounting for practical issues. In our experiments, our evaluation across a suite of federated datasets has demonstrated that FedBN can significantly improve the convergence behavior and model performance of non-IID datasets. We also demonstrate the effectiveness of FedBN in scenarios that where a new client with an unknown domain joins the FL system (see Appendix G).
|
| 184 |
+
|
| 185 |
+
FedBN is independent of the communication and aggregation strategy and thus can in practice be readily combined with different optimization algorithms, communication schemes, and aggregation techniques. The theoretical analysis of such combinations is an interesting direction for future work. We also note that since FedBN makes only lightweight modifications to FedAvg and has much flexibility to be combined with other strategies, these merits allow us to easily integrate FedBN into existing tool-kits/systems, such as Pysyft (Ryffel et al., 2018), Google TFF (Google, 2020), Flower (Beutel et al., 2020), dlplatform (Kamp & Adilova, 2020) and FedML (He et al., 2020)8.
|
| 186 |
+
|
| 187 |
+
We believe that FedBN can improve a wide range of applications such as healthcare (Rieke et al., 2020) and autonomous driving (Kamp et al., 2018). A few interesting directions for future work include analyzing what types of differences in local data can benefit from FedBN and explore the limits of FedBN. Moreover, privacy is an essential concern in FL. Invisible BN parameters in FedBN should make attacks on local data more challenging. It would be interesting to quantify the privacypreservation improvement in FedBN.
|
| 188 |
+
|
| 189 |
+
# REFERENCES
|
| 190 |
+
|
| 191 |
+
Zeyuan Allen-Zhu, Yuanzhi Li, and Zhao Song. A convergence theory for deep learning via overparameterization. In International Conference on Machine Learning, pp. 242–252. PMLR, 2019.
|
| 192 |
+
|
| 193 |
+
Mathieu Andreux, Jean Ogier du Terrail, Constance Beguier, and Eric W Tramel. Siloed federated learning for multi-centric histopathology datasets. In Domain Adaptation and Representation Transfer, and Distributed and Collaborative Learning, pp. 129–139. Springer, 2020.
|
| 194 |
+
|
| 195 |
+
Sanjeev Arora, Simon S Du, Wei Hu, Zhiyuan Li, and Ruosong Wang. Fine-grained analysis of optimization and generalization for overparameterized two-layer neural networks. arXiv preprint arXiv:1901.08584, 2019.
|
| 196 |
+
|
| 197 |
+
Daniel J Beutel, Taner Topal, Akhil Mathur, Xinchi Qiu, Titouan Parcollet, and Nicholas D Lane. Flower: A friendly federated learning research framework. arXiv preprint arXiv:2007.14390, 2020.
|
| 198 |
+
|
| 199 |
+
Daniel C Castro, Jeremy Tan, Bernhard Kainz, Ender Konukoglu, and Ben Glocker. Morpho-mnist: Quantitative assessment and diagnostics for representation learning. Journal of Machine Learning Research, 20(178):1–29, 2019.
|
| 200 |
+
|
| 201 |
+
Woong-Gi Chang, Tackgeun You, Seonguk Seo, Suha Kwak, and Bohyung Han. Domain-specific batch normalization for unsupervised domain adaptation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 7354–7362, 2019.
|
| 202 |
+
|
| 203 |
+
Adriana Di Martino, Chao-Gan Yan, Qingyang Li, Erin Denio, Francisco X Castellanos, Kaat Alaerts, Jeffrey S Anderson, Michal Assaf, Susan Y Bookheimer, Mirella Dapretto, et al. The autism brain imaging data exchange: towards a large-scale evaluation of the intrinsic brain architecture in autism. Molecular psychiatry, 19(6):659, 2014.
|
| 204 |
+
|
| 205 |
+
Simon S Du, Xiyu Zhai, Barnabas Poczos, and Aarti Singh. Gradient descent provably optimizes over-parameterized neural networks. arXiv preprint arXiv:1810.02054, 2018.
|
| 206 |
+
|
| 207 |
+
Yonatan Dukler, Quanquan Gu, and Guido Montufar. Optimization theory for relu neural networks´ trained with normalization layers, 2020.
|
| 208 |
+
|
| 209 |
+
Yaroslav Ganin and Victor Lempitsky. Unsupervised domain adaptation by backpropagation. In International conference on machine learning, pp. 1180–1189. PMLR, 2015.
|
| 210 |
+
|
| 211 |
+
Boqing Gong, Yuan Shi, Fei Sha, and Kristen Grauman. Geodesic flow kernel for unsupervised domain adaptation. In 2012 IEEE Conference on Computer Vision and Pattern Recognition, pp. 2066–2073. IEEE, 2012.
|
| 212 |
+
|
| 213 |
+
Google. TensorFlow Federated: Machine Learning on Decentralized Data, 2020. https://www. tensorflow.org/federated.
|
| 214 |
+
|
| 215 |
+
Gregory Griffin, Alex Holub, and Pietro Perona. Caltech-256 object category dataset, 2007.
|
| 216 |
+
|
| 217 |
+
Chaoyang He, Songze Li, Jinhyun So, Mi Zhang, Hongyi Wang, Xiaoyang Wang, Praneeth Vepakomma, Abhishek Singh, Hang Qiu, Li Shen, et al. Fedml: A research library and benchmark for federated machine learning. arXiv preprint arXiv:2007.13518, 2020.
|
| 218 |
+
|
| 219 |
+
Kevin Hsieh, Amar Phanishayee, Onur Mutlu, and Phillip B Gibbons. The non-iid data quagmire of decentralized machine learning. arXiv preprint arXiv:1910.00189, 2019.
|
| 220 |
+
|
| 221 |
+
Tzu-Ming Harry Hsu, Hang Qi, and Matthew Brown. Measuring the effects of non-identical data distribution for federated visual classification. arXiv preprint arXiv:1909.06335, 2019.
|
| 222 |
+
|
| 223 |
+
Jonathan J. Hull. A database for handwritten text recognition research. IEEE Transactions on pattern analysis and machine intelligence, 16(5):550–554, 1994.
|
| 224 |
+
|
| 225 |
+
Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167, 2015.
|
| 226 |
+
|
| 227 |
+
Arthur Jacot, Franck Gabriel, and Clement Hongler. Neural tangent kernel: Convergence and gen- ´ eralization in neural networks. In Advances in neural information processing systems, pp. 8571– 8580, 2018.
|
| 228 |
+
|
| 229 |
+
Peter Kairouz, H Brendan McMahan, Brendan Avent, Aurelien Bellet, Mehdi Bennis, Arjun Nitin ´ Bhagoji, Keith Bonawitz, Zachary Charles, Graham Cormode, Rachel Cummings, et al. Advances and open problems in federated learning. arXiv preprint arXiv:1912.04977, 2019.
|
| 230 |
+
|
| 231 |
+
Michael Kamp and Linara Adilova. Distributed Learning Platform, 2020. https://github. com/fraunhofer-iais/dlplatform.
|
| 232 |
+
|
| 233 |
+
Michael Kamp, Linara Adilova, Joachim Sicking, Fabian Huger, Peter Schlicht, Tim Wirtz, and ¨ Stefan Wrobel. Efficient decentralized deep learning by dynamic model averaging. In Joint European Conference on Machine Learning and Knowledge Discovery in Databases, pp. 393– 409. Springer, 2018.
|
| 234 |
+
|
| 235 |
+
Sai Praneeth Karimireddy, Satyen Kale, Mehryar Mohri, Sashank J Reddi, Sebastian U Stich, and Ananda Theertha Suresh. Scaffold: Stochastic controlled averaging for on-device federated learning. arXiv preprint arXiv:1910.06378, 2019.
|
| 236 |
+
|
| 237 |
+
Jonas Kohler, Hadi Daneshmand, Aurelien Lucchi, Thomas Hofmann, Ming Zhou, and Klaus Neymeyr. Exponential convergence rates for batch normalization: The power of length-direction decoupling in non-convex optimization. In The 22nd International Conference on Artificial Intelligence and Statistics, pp. 806–815. PMLR, 2019.
|
| 238 |
+
|
| 239 |
+
Alex Krizhevsky, Ilya Sutskever, and Geoffrey E Hinton. Imagenet classification with deep convolutional neural networks. In Advances in neural information processing systems, pp. 1097–1105, 2012.
|
| 240 |
+
|
| 241 |
+
Yann LeCun, Leon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to ´ document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998.
|
| 242 |
+
|
| 243 |
+
Tian Li, Anit Kumar Sahu, Ameet Talwalkar, and Virginia Smith. Federated learning: Challenges, methods, and future directions. IEEE Signal Processing Magazine, 37(3):50–60, 2020a.
|
| 244 |
+
|
| 245 |
+
Tian Li, Anit Kumar Sahu, Manzil Zaheer, Maziar Sanjabi, Ameet Talwalkar, and Virginia Smith. Federated optimization in heterogeneous networks. In Conference on Machine Learning and Systems, 2020a, 2020b.
|
| 246 |
+
|
| 247 |
+
Xiang Li, Kaixuan Huang, Wenhao Yang, Shusen Wang, and Zhihua Zhang. On the convergence of fedavg on non-iid data. arXiv preprint arXiv:1907.02189, 2019.
|
| 248 |
+
|
| 249 |
+
Yanghao Li, Naiyan Wang, Jianping Shi, Jiaying Liu, and Xiaodi Hou. Revisiting batch normalization for practical domain adaptation. arXiv preprint arXiv:1603.04779, 2016.
|
| 250 |
+
|
| 251 |
+
Yanghao Li, Naiyan Wang, Jianping Shi, Xiaodi Hou, and Jiaying Liu. Adaptive batch normalization for practical domain adaptation. Pattern Recognition, 80:109–117, 2018.
|
| 252 |
+
|
| 253 |
+
Quande Liu, Qi Dou, Lequan Yu, and Pheng Ann Heng. Ms-net: Multi-site network for improving prostate segmentation with heterogeneous mri data. IEEE Transactions on Medical Imaging, 2020.
|
| 254 |
+
|
| 255 |
+
Ping Luo, Xinjiang Wang, Wenqi Shao, and Zhanglin Peng. Towards understanding regularization in batch normalization. arXiv preprint arXiv:1809.00846, 2018.
|
| 256 |
+
|
| 257 |
+
Brendan McMahan, Eider Moore, Daniel Ramage, Seth Hampson, and Blaise Aguera y Arcas. Communication-efficient learning of deep networks from decentralized data. In Artificial Intelligence and Statistics, pp. 1273–1282, 2017.
|
| 258 |
+
|
| 259 |
+
Ari S Morcos, David GT Barrett, Neil C Rabinowitz, and Matthew Botvinick. On the importance of single directions for generalization. arXiv preprint arXiv:1803.06959, 2018.
|
| 260 |
+
|
| 261 |
+
Yuval Netzer, Tao Wang, Adam Coates, Alessandro Bissacco, Bo Wu, and Andrew Y Ng. Reading digits in natural images with unsupervised feature learning, 2011.
|
| 262 |
+
|
| 263 |
+
Xingchao Peng, Qinxun Bai, Xide Xia, Zijun Huang, Kate Saenko, and Bo Wang. Moment matching for multi-source domain adaptation. In Proceedings of the IEEE International Conference on Computer Vision, pp. 1406–1415, 2019.
|
| 264 |
+
|
| 265 |
+
Sashank Reddi, Zachary Charles, Manzil Zaheer, Zachary Garrett, Keith Rush, Jakub Konecnˇ y,\` Sanjiv Kumar, and H Brendan McMahan. Adaptive federated optimization. arXiv preprint arXiv:2003.00295, 2020.
|
| 266 |
+
|
| 267 |
+
Amirhossein Reisizadeh, Farzan Farnia, Ramtin Pedarsani, and Ali Jadbabaie. Robust federated learning: The case of affine distribution shifts. arXiv preprint arXiv:2006.08907, 2020.
|
| 268 |
+
|
| 269 |
+
Nicola Rieke, Jonny Hancox, Wenqi Li, Fausto Milletari, Holger R Roth, Shadi Albarqouni, Spyridon Bakas, Mathieu N Galtier, Bennett A Landman, Klaus Maier-Hein, et al. The future of digital health with federated learning. NPJ digital medicine, 3(1):1–7, 2020.
|
| 270 |
+
|
| 271 |
+
Theo Ryffel, Andrew Trask, Morten Dahl, Bobby Wagner, Jason Mancuso, Daniel Rueckert, and Jonathan Passerat-Palmbach. A generic framework for privacy preserving deep learning. arXiv preprint arXiv:1811.04017, 2018.
|
| 272 |
+
|
| 273 |
+
Kate Saenko, Brian Kulis, Mario Fritz, and Trevor Darrell. Adapting visual category models to new domains. In European conference on computer vision, pp. 213–226. Springer, 2010.
|
| 274 |
+
|
| 275 |
+
Tim Salimans and Durk P Kingma. Weight normalization: A simple reparameterization to accelerate training of deep neural networks. In Advances in neural information processing systems, pp. 901– 909, 2016.
|
| 276 |
+
|
| 277 |
+
Shibani Santurkar, Dimitris Tsipras, Andrew Ilyas, and Aleksander Madry. How does batch normalization help optimization? In Advances in Neural Information Processing Systems, pp. 2483– 2493, 2018.
|
| 278 |
+
|
| 279 |
+
Jan van den Brand, Binghui Peng, Zhao Song, and Omri Weinstein. Training (overparametrized) neural networks in near-linear time. arXiv e-prints, pp. arXiv–2006, 2020.
|
| 280 |
+
|
| 281 |
+
Hongyi Wang, Mikhail Yurochkin, Yuekai Sun, Dimitris Papailiopoulos, and Yasaman Khazaeni. Federated learning with matched averaging. arXiv preprint arXiv:2002.06440, 2020.
|
| 282 |
+
|
| 283 |
+
Xinwei Zhang, Mingyi Hong, Sairaj Dhople, Wotao Yin, and Yang Liu. Fedpd: A federated learning framework with optimal rates and adaptivity to non-iid data. arXiv preprint arXiv:2005.11418, 2020.
|
| 284 |
+
|
| 285 |
+
Yue Zhao, Meng Li, Liangzhen Lai, Naveen Suda, Damon Civin, and Vikas Chandra. Federated learning with non-iid data. arXiv preprint arXiv:1806.00582, 2018.
|
| 286 |
+
|
| 287 |
+
# APPENDIX
|
| 288 |
+
|
| 289 |
+
Roadmap of Appendix The Appendix is organized as follows. We list the notations table in Section A. We provide theoretical proof of convergence in Section B. The algorithm of FedBN is described in Section C. The details of experimental setting are in Section D and additional results on benchmark datasets are in Section E. We show experiment on synthetic data in Section F. We demonstrate the ability of generalizing FedBN to test on a new client in Section G.
|
| 290 |
+
|
| 291 |
+
# A NOTATION TABLE
|
| 292 |
+
|
| 293 |
+
Table 2: Notations occurred in the paper.
|
| 294 |
+
|
| 295 |
+
<table><tr><td>Notations Description</td><td></td></tr><tr><td>X</td><td>features, x ∈ Rd</td></tr><tr><td>d</td><td>dimension of x</td></tr><tr><td>y</td><td></td></tr><tr><td>P()</td><td>labels,y ∈ R</td></tr><tr><td>N</td><td>probability distribution</td></tr><tr><td>T</td><td>total number of clients</td></tr><tr><td>E</td><td>total number of epochs in training</td></tr><tr><td>M</td><td>number of local iteration in FL</td></tr><tr><td>[N]</td><td>number of training samples in each client</td></tr><tr><td>i</td><td>set of numbers,[N] = {1,:..,N}</td></tr><tr><td>j</td><td>indicator for client, i ∈ [N] indicator for sample in each client, j ∈ [M]</td></tr><tr><td>(x,y)</td><td>the j-th training sample in client i</td></tr><tr><td>m</td><td></td></tr><tr><td>k</td><td>number of neurons in the first layer</td></tr><tr><td>Vk</td><td>indicator for neuron, k ∈ [m] parameters for the k-th neuron in the first layer</td></tr><tr><td>=ν |s</td><td>vector norm, Il v lls= √vT Sv, given a matrix S</td></tr><tr><td>Si</td><td>covariance matrix for features in client i, Si = ExixiT</td></tr><tr><td>p,q</td><td>indicator for sample,p,q ∈ [NM]</td></tr><tr><td>f</td><td>two layer ReLU neural network with BN</td></tr><tr><td>f*</td><td>two layer ReLU neural network with BN with client-specified BN parameters</td></tr><tr><td>V</td><td>parameters of the first phase neurons, V ∈ Rm ×d</td></tr><tr><td>Y</td><td></td></tr><tr><td>C</td><td>the scaling parameter of BN</td></tr><tr><td>9()</td><td> top layer parameters of the network</td></tr><tr><td>N(μ,Σ)</td><td>ReLU activation function,σ(·) = max{:, 0}</td></tr><tr><td>U[-1,1]</td><td>Gaussian with mean μ and covariance £</td></tr><tr><td>α</td><td>Rademacher distribution</td></tr><tr><td>L(f)</td><td>variance of Vk at initialization</td></tr><tr><td>A(t)</td><td>empirical risk with square loss for network f</td></tr><tr><td>V(t)</td><td>evolution dynamic for FedAvg at epoch t</td></tr><tr><td></td><td>evolution dynamic with respect to V for FedAvg at epoch t</td></tr><tr><td>G(t)</td><td>evolution dynamic with respect to y for FedAvg at epoch t</td></tr><tr><td>▲*(t)</td><td>evolution dynamic for FedBN at epoch t</td></tr><tr><td>V*(t)</td><td>evolution dynamic with respect to V for FedBN at epoch t</td></tr><tr><td>G*(t)</td><td>evolution dynamic with respect to γy for FedBN at epoch t</td></tr><tr><td>Amin(A)</td><td>the minimal eigenvalue of matrix A</td></tr><tr><td>G8</td><td>expectation of G(t)</td></tr><tr><td>G*80</td><td>expectation of G*(t)</td></tr></table>
|
| 296 |
+
|
| 297 |
+
# B CONVERGENCE PROOF
|
| 298 |
+
|
| 299 |
+
# B.1 EVOLUTION DYNAMICS
|
| 300 |
+
|
| 301 |
+
In this section, we calculate the evolution dynamics $\mathbf { \boldsymbol { \Lambda } } ( t )$ for training with function $f$ and $\mathbf { \boldsymbol { \Lambda } } ^ { * } ( t )$ for training with $f ^ { * }$ . Since the parameters are updated using gradient descent, the optimization dynamics of parameters are
|
| 302 |
+
|
| 303 |
+
$$
|
| 304 |
+
{ \frac { d \mathbf { v } _ { k } } { d t } } = - { \frac { \partial L } { \partial \mathbf { v } _ { k } } } , \quad { \frac { d { \boldsymbol { \gamma } } _ { k } } { d t } } = - { \frac { \partial L } { \partial { \boldsymbol { \gamma } } _ { k } } } .
|
| 305 |
+
$$
|
| 306 |
+
|
| 307 |
+
Let $f _ { p } = f ( \mathbf { x } _ { p } ^ { i _ { p } } )$ . Then, the dynamics of the prediction of the $p$ -th data point in site $i _ { p }$ is
|
| 308 |
+
|
| 309 |
+
$$
|
| 310 |
+
{ \frac { \partial f _ { p } } { \partial t } } = \sum _ { k = 1 } ^ { m } { \frac { \partial f _ { p } } { \partial \mathbf { v } _ { k } } } { \frac { d \mathbf { v } _ { k } } { d t } } + { \frac { \partial f _ { p } } { \partial \gamma _ { k } } } { \frac { d { \boldsymbol { \gamma } } _ { k } } { d t } } = - \underbrace { \sum _ { k = 1 } ^ { m } { \frac { \partial f _ { p } } { \partial \mathbf { v } _ { k } } } { \frac { \partial L } { \partial \mathbf { v } _ { k } } } } _ { T _ { \mathrm { v } } ^ { p } } - \underbrace { \sum _ { k = 1 } ^ { m } { \frac { \partial f _ { p } } { \partial \gamma _ { k } } } { \frac { \partial L } { \partial \gamma _ { k } } } } _ { T _ { \gamma } ^ { p } } .
|
| 311 |
+
$$
|
| 312 |
+
|
| 313 |
+
The gradients of $f _ { p }$ and $L$ with respect to $\mathbf { v } _ { k }$ and $\gamma _ { k }$ are computed as
|
| 314 |
+
|
| 315 |
+
$$
|
| 316 |
+
\begin{array} { r l } & { \frac { \partial f _ { p } } { \partial \mathbf { v } _ { k } } ( t ) = \frac { 1 } { \sqrt { m } } \frac { c _ { k } \cdot \gamma _ { k } ( t ) } { \left. \mathbf { v } _ { k } \right. } _ { \mathbf { s } _ { p } } \cdot \mathbf { x } _ { p } ^ { \mathbf { v } _ { k } ^ { i , p } } ( t ) ^ { \perp } \mathbf { l } _ { p k } ( t ) , } \\ & { \frac { \partial L } { \partial \mathbf { v } _ { k } } ( t ) = \frac { 1 } { \sqrt { m } } \displaystyle \sum _ { q = 1 } ^ { N M } \left( f _ { q } ( t ) - y _ { q } \right) \frac { c _ { k } \cdot \gamma _ { k } ( t ) } { \left. \mathbf { v } _ { k } \right. } _ { \mathbf { l } _ { q } } \mathbf { x } _ { q } ^ { \mathbf { v } _ { k } ^ { i , q } } ( t ) ^ { \perp } \mathbf { l } _ { q k } ( t ) , } \\ & { \frac { \partial f _ { p } } { \partial \gamma _ { k } } ( t ) = \frac { 1 } { \sqrt { m } } \frac { c _ { k } } { \left. \mathbf { v } _ { k } ( t ) \right. _ { \mathbf { s } _ { p } } } \sigma \left( \mathbf { v } _ { k } ( t ) ^ { \top } \mathbf { x } _ { p } \right) , } \\ & { \frac { \partial L } { \partial \gamma _ { k } } ( t ) = \frac { 1 } { \sqrt { m } } \displaystyle \sum _ { q = 1 } ^ { N M } \left( f _ { q } ( t ) - y _ { q } \right) \frac { c _ { k } } { \left. \mathbf { v } _ { k } ( t ) \right. _ { \mathbf { s } _ { q } } } \sigma \left( \mathbf { v } _ { k } ( t ) ^ { \top } \mathbf { x } _ { q } \right) , } \end{array}
|
| 317 |
+
$$
|
| 318 |
+
|
| 319 |
+
where $\begin{array} { r } { f _ { p } = f ( \mathbf { x } _ { p } ^ { i _ { p } } ) , \mathbf { x } _ { p } ^ { \mathbf { v } _ { k } ^ { i _ { p } } ( t ) ^ { \perp } } \triangleq ( \mathbf { I } - \frac { \mathbf { S } _ { i _ { p } } \mathbf { u } \mathbf { u } ^ { \intercal } } { \| \mathbf { u } \| _ { \mathbf { S } _ { i _ { p } } } ^ { 2 } } ) \mathbf { x } } \end{array}$ )x, and 1pk(t) , 1{vk(t)>xp≥0}.
|
| 320 |
+
|
| 321 |
+
We define Gram matrix $\mathbf { V } ( t )$ and $\mathbf G ( t )$ as
|
| 322 |
+
|
| 323 |
+
$$
|
| 324 |
+
\begin{array} { l } { { \displaystyle { \bf V } _ { p q } ( t ) = \frac { 1 } { m } \sum _ { k = 1 } ^ { m } \left( \alpha c _ { k } \cdot \gamma _ { k } ( t ) \right) ^ { 2 } \| { \bf v } _ { k } ( t ) \| _ { { \bf S } _ { i } _ { p } } ^ { - 1 } \left\| { \bf v } _ { k } ( t ) \right\| _ { { \bf S } _ { i } _ { q } } ^ { - 1 } \left. { \bf x } _ { p } ^ { { \bf v } _ { k } ^ { i _ { p } } ( t ) ^ { \perp } } , { \bf x } _ { q } ^ { { \bf v } _ { k } ^ { i _ { q } } ( t ) \perp } \right. \mathbb { 1 } _ { p k } ( t ) \mathbb { 1 } _ { q k } ( t ) } , } \\ { { \displaystyle { \bf G } _ { p q } ( t ) = \frac { 1 } { m } \sum _ { k = 1 } ^ { m } c _ { k } ^ { 2 } \left\| { \bf v } _ { k } ( t ) \right\| _ { { \bf S } _ { i p } } ^ { - 1 } \left\| { \bf v } _ { k } ( t ) \right\| _ { { \bf S } _ { i q } } ^ { - 1 } \sigma \left( { \bf v } _ { k } ( t ) ^ { \top } { \bf x } _ { p } \right) \sigma \left( { \bf v } _ { k } ( t ) ^ { \top } { \bf x } _ { q } \right) . } } \end{array}
|
| 325 |
+
$$
|
| 326 |
+
|
| 327 |
+
It follows that
|
| 328 |
+
|
| 329 |
+
$$
|
| 330 |
+
T _ { \mathbf { v } } ^ { p } ( t ) = \sum _ { q = 1 } ^ { N M } \frac { \mathbf { V } _ { p q } ( t ) } { \alpha ^ { 2 } } \left( f _ { q } ( t ) - y _ { q } \right) , \quad T _ { \gamma } ^ { p } ( t ) = \sum _ { q = 1 } ^ { N M } \mathbf { G } _ { p q } ( t ) \left( f _ { q } ( t ) - y _ { q } \right) .
|
| 331 |
+
$$
|
| 332 |
+
|
| 333 |
+
Let $\mathbf { f } = \left( f _ { 1 } , \ldots , f _ { n } \right) ^ { \intercal } = \left( f \left( \mathbf { x } _ { 1 } \right) , \ldots , f \left( \mathbf { x } _ { N M } \right) \right) ^ { \intercal }$ . The full evolution dynamic is given by
|
| 334 |
+
|
| 335 |
+
$$
|
| 336 |
+
{ \frac { d \mathbf { f } } { d t } } = - \mathbf { A } ( t ) ( \mathbf { f } ( t ) - \mathbf { y } ) , \quad { \mathrm { w h e r e } } \quad \mathbf { A } ( t ) : = { \frac { \mathbf { V } ( t ) } { \alpha ^ { 2 } } } + \mathbf { G } ( t ) .
|
| 337 |
+
$$
|
| 338 |
+
|
| 339 |
+
Similarly, we compute Gram matrix $\mathbf { V } ^ { * } ( t )$ and $\mathbf { G } ^ { * } ( t )$ for FedBN with $f ^ { * }$ as
|
| 340 |
+
|
| 341 |
+
$$
|
| 342 |
+
V _ { p q } ^ { * } ( t ) = \frac { 1 } { m } \sum _ { k = 1 } ^ { m } \left( \alpha c _ { k } \right) ^ { 2 } \gamma _ { k , i _ { p } } ( t ) \gamma _ { k , i _ { q } } ( t ) \left. \mathbf { v } _ { k } ( t ) \right. _ { \mathbf { S } _ { i _ { p } } } ^ { - 1 } \left. \mathbf { v } _ { k } ( t ) \right. _ { \mathbf { S } _ { i _ { q } } } ^ { - 1 } \left. \mathbf { x } _ { p } ^ { \mathbf { v } _ { k } ^ { i _ { p } } ( t ) ^ { \perp } } , \mathbf { x } _ { q } ^ { \mathbf { v } _ { k } ^ { i _ { q } } ( t ) ^ { \perp } } \right. \mathbb { 1 } _ { p k } ( t ) \mathbb { 1 } _ { q k } ( t ) ,
|
| 343 |
+
$$
|
| 344 |
+
|
| 345 |
+
$$
|
| 346 |
+
\mathbf { G } _ { p q } ^ { * } ( t ) = \frac { 1 } { m } \sum _ { k = 1 } ^ { m } c _ { k } ^ { 2 } \left. \mathbf { v } _ { k } ( t ) \right. _ { \mathbf { S } _ { i _ { p } } } ^ { - 1 } \left. \mathbf { v } _ { k } ( t ) \right. _ { \mathbf { S } _ { i _ { q } } } ^ { - 1 } \sigma \left( \mathbf { v } _ { k } ( t ) ^ { \top } \mathbf { x } _ { p } \right) \sigma \left( \mathbf { v } _ { k } ( t ) ^ { \top } \mathbf { x } _ { q } \right) \mathbb { 1 } \{ i _ { p } = i _ { q } \} .
|
| 347 |
+
$$
|
| 348 |
+
|
| 349 |
+
Thus, the full evolution dynamic of FedBN is
|
| 350 |
+
|
| 351 |
+
$$
|
| 352 |
+
\frac { d \mathbf { f } ^ { * } } { d t } = - \mathbf { \boldsymbol { \Lambda } } ^ { * } ( t ) ( \mathbf { f } ^ { * } ( t ) - \mathbf { \boldsymbol { y } } ) , \quad \mathrm { w h e r e } \quad \mathbf { \boldsymbol { \Lambda } } ^ { * } ( t ) : = \frac { \mathbf { \boldsymbol { V } } ^ { * } ( t ) } { \alpha ^ { 2 } } + \mathbf { \boldsymbol { G } } ^ { * } ( t ) .
|
| 353 |
+
$$
|
| 354 |
+
|
| 355 |
+
# B.2 PROOF OF LEMMA 4.3
|
| 356 |
+
|
| 357 |
+
Dukler et al. (2020) proved that the matrix $\mathbf { G } ^ { \infty }$ is strictly positive definite. In their proof, $\mathbf { G } ^ { \infty }$ is the covariance matrix of the functionals $\phi _ { p }$ define as
|
| 358 |
+
|
| 359 |
+
$$
|
| 360 |
+
\phi _ { p } ( \mathbf { v } ) : = \sigma \left( \mathbf { v } ^ { \top } \mathbf { x } _ { p } \right)
|
| 361 |
+
$$
|
| 362 |
+
|
| 363 |
+
over the Hilbert space $\nu$ of $L ^ { 2 } \left( N \left( 0 , \alpha ^ { 2 } \mathbf { I } \right) \right)$ . $\mathbf { G } ^ { * \infty }$ is strictly positive definite by showing that $\phi _ { 1 } , \cdots , \phi _ { N M }$ are linearly independent, which is equivalent to that
|
| 364 |
+
|
| 365 |
+
$$
|
| 366 |
+
c _ { 1 } \phi _ { 1 } + c _ { 2 } \phi _ { 2 } + \cdot \cdot \cdot + c _ { N M } \phi _ { N M } = 0 \mathrm { i n } \mathcal { V }
|
| 367 |
+
$$
|
| 368 |
+
|
| 369 |
+
holds only for $c _ { p } = 0$ for all $p$
|
| 370 |
+
|
| 371 |
+
Let $\mathbf { G } _ { i } ^ { \infty }$ denote the $i$ -th $M \times M$ block matrices on the diagonal of $\mathbf { G } ^ { \infty }$ . Then we have
|
| 372 |
+
|
| 373 |
+
$$
|
| 374 |
+
{ \bf G } ^ { * \infty } = d i a g ( { \bf G } _ { 1 } ^ { \infty } , \cdot \cdot \cdot , { \bf G } _ { N } ^ { \infty } ) .
|
| 375 |
+
$$
|
| 376 |
+
|
| 377 |
+
To prove that $\mathbf { G } ^ { * \infty }$ is strictly positive definite, we will show that $\mathbf { G } _ { i } ^ { \infty }$ is positive definite. Let us define
|
| 378 |
+
|
| 379 |
+
$$
|
| 380 |
+
\phi _ { j , i } ^ { \ast } ( \mathbf { v } ) : = \sigma \left( \mathbf { v } ^ { \top } \mathbf { x } _ { j } \right) \mathbb { 1 } \{ j \in \mathrm { ~ s i t e ~ } i \} , \quad j = 1 , \cdots , M .
|
| 381 |
+
$$
|
| 382 |
+
|
| 383 |
+
Then, we are going to show that
|
| 384 |
+
|
| 385 |
+
$$
|
| 386 |
+
c _ { 1 } \phi _ { 1 , i } ^ { * } + c _ { 2 } \phi _ { 2 , i } ^ { * } + \cdot \cdot \cdot + c _ { M } \phi _ { M , i } ^ { * } = 0
|
| 387 |
+
$$
|
| 388 |
+
|
| 389 |
+
holds only for $c _ { j } = 0 , \forall j \in [ M ]$ . Suppose there exist $c _ { 1 } , \cdots , c _ { M }$ that are not identically 0, satisfying (11). Let the coefficients for client $i$ be $c _ { 1 } , \cdots , c _ { M }$ and let the coefficients for other client be 0. Then, we have a sequence of coefficients satisfying (10), which is a contradiction with that $\mathbf { G } ^ { \infty }$ is strictly positive definite. This implies $\mathbf { G } _ { i } ^ { \infty }$ is strictly positive definite. Namely, $\mathbf { G } _ { i } ^ { \infty }$ ’s eigenvalues are positive. Since the eigenvalues of $\mathbf { G } ^ { * \infty }$ are exactly the union of the eigenvalues of $\mathbf { G } _ { i } ^ { \infty }$ , $\lambda _ { m i n } \bigl ( \mathbf { G } ^ { * \infty } \bigr )$ is positive and thus, $\mathbf { G } ^ { * \infty }$ is strictly positive definite.
|
| 390 |
+
|
| 391 |
+
# B.3 PROOF OF COROLLARY 4.6
|
| 392 |
+
|
| 393 |
+
To compare the convergence rates of FedAvg and FedBN when $E = 1$ , we compare the exponential factor in the convergence rates, which are $\left( 1 - \eta \mu _ { 0 } / 2 \right)$ and $( 1 - \eta \mu _ { 0 } ^ { * } / 2 )$ for FedAvg and FedBN, respectively. Then, it reduces to comparing $\mu _ { 0 } = \lambda _ { \mathrm { m i n } } ( \mathbf G ^ { \infty } )$ and $\mu _ { 0 } ^ { * } = \lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { * \infty } )$ . Comparing equation (7) and (9), $\mathbf { G } ^ { * \infty }$ takes the $M \times M$ block matrices on the diagonal of $\mathbf { G } ^ { \infty }$ :
|
| 394 |
+
|
| 395 |
+
$$
|
| 396 |
+
\mathbf { G } ^ { \infty } = \left[ \begin{array} { c c c c } { \mathbf { G } _ { 1 } ^ { \infty } } & { \mathbf { G } _ { 1 , 2 } ^ { \infty } } & { \cdots } & { \mathbf { G } _ { 1 , N } ^ { \infty } } \\ { \mathbf { G } _ { 1 , 2 } ^ { \infty } } & { \mathbf { G } _ { 2 } ^ { \infty } } & { \cdots } & { \mathbf { G } _ { 2 , N } ^ { \infty } } \\ { \vdots } & { \vdots } & { \ddots } & { \vdots } \\ { \mathbf { G } _ { 1 , N } ^ { \infty } } & { \mathbf { G } _ { 2 , N } ^ { \infty } } & { \cdots } & { \mathbf { G } _ { N } ^ { \infty } } \end{array} \right] , \quad \mathbf { G } ^ { * \infty } = \left[ \begin{array} { c c c c } { \mathbf { G } _ { 1 } ^ { \infty } } & { 0 } & { \cdots } & { 0 } \\ { 0 } & { \mathbf { G } _ { 2 } ^ { \infty } } & { \cdots } & { 0 } \\ { \vdots } & { \vdots } & { \ddots } & { \vdots } \\ { 0 } & { 0 } & { \cdots } & { \mathbf { G } _ { N } ^ { \infty } } \end{array} \right] ,
|
| 397 |
+
$$
|
| 398 |
+
|
| 399 |
+
where $\mathbf { G } _ { i } ^ { \infty }$ is the $i$ -th $M \times M$ block matrices on the diagonal of $\mathbf { G } ^ { \infty }$ . By linear algebra,
|
| 400 |
+
|
| 401 |
+
$$
|
| 402 |
+
\lambda _ { \operatorname* { m i n } } ( \mathbf { G } _ { i } ^ { \infty } ) \geq \lambda _ { \operatorname* { m i n } } ( \mathbf { G } ^ { \infty } ) , \quad \forall i \in [ N ] .
|
| 403 |
+
$$
|
| 404 |
+
|
| 405 |
+
Since the eigenvalues of $\mathbf { G } ^ { * \infty }$ are exactly the union of eigenvalues of $\mathbf { G } _ { i } ^ { \infty }$ , we have
|
| 406 |
+
|
| 407 |
+
$$
|
| 408 |
+
\begin{array} { r l } & { \lambda _ { \operatorname* { m i n } } \bigl ( \mathbf { G } ^ { * \infty } \bigr ) = \underset { i \in [ N ] } { \operatorname* { m i n } } \big \{ \lambda _ { \operatorname* { m i n } } \bigl ( \mathbf { G } _ { i } ^ { \infty } \bigr ) \big \} , } \\ & { \qquad \geq \lambda _ { \operatorname* { m i n } } \bigl ( \mathbf { G } ^ { \infty } \bigr ) . } \end{array}
|
| 409 |
+
$$
|
| 410 |
+
|
| 411 |
+
Thus, $( 1 - \eta \mu _ { 0 } / 2 ) \ge ( 1 - \eta \mu _ { 0 } ^ { * } / 2 )$ and we can conclude that the convergence rate of FedBN is faster than the convergence of FedAvg.
|
| 412 |
+
|
| 413 |
+
# C FEDBN ALGORITHM
|
| 414 |
+
|
| 415 |
+
We describe the details algorithm of our proposed FedBN as following Algorithm 1:
|
| 416 |
+
|
| 417 |
+
# Algorithm 1 Federated Learning using FedBN
|
| 418 |
+
|
| 419 |
+
Notations: The user indexed by $k$ , neural network layer indexed by $l$ , initialized model parameters: $w _ { 0 , k } ^ { ( l ) }$ , local update pace: $E$ , and total optimization round $T$ .
|
| 420 |
+
|
| 421 |
+
1: for each round $t = 1 , 2 , \dots , T$ do
|
| 422 |
+
2: for each user $k$ and each layer $l$ do
|
| 423 |
+
3: $w _ { t + 1 , k } ^ { ( l ) } S G D ( w _ { t , k } ^ { ( l ) } )$
|
| 424 |
+
4: end for
|
| 425 |
+
5: if $\mod ( t , E ) = 0$ then
|
| 426 |
+
6: for each user $k$ and each layer $l$ do
|
| 427 |
+
7: if layer $l$ is not BatchNorm then
|
| 428 |
+
8: $\begin{array} { r } { w _ { t + 1 , k } ^ { ( l ) } \frac { 1 } { K } \sum _ { k = 1 } ^ { K } w _ { t + 1 , k } ^ { ( l ) } } \end{array}$
|
| 429 |
+
9: end if
|
| 430 |
+
10: end for
|
| 431 |
+
11: end if
|
| 432 |
+
12: end for
|
| 433 |
+
|
| 434 |
+
# D EXPERIMENTAL DETAILS
|
| 435 |
+
|
| 436 |
+
# D.1 VISUALIZATION OF BENCHMARK DATASETS
|
| 437 |
+
|
| 438 |
+

|
| 439 |
+
Figure 6: Data visualization. (a) Examples from each dataset (client). (b) Non-iid feature distributions across the datasets (over random 100 samples for each dataset).
|
| 440 |
+
|
| 441 |
+
We show image examples from the five benchmark datasets and the pixel value histogram. It obviously presents the heterogeneous appearances and shifted distributions. Clients formed from the five benchmark datasets are viewed as non-iid.
|
| 442 |
+
|
| 443 |
+
# D.2 MODEL ARCHITECTURE AND TRAINING DETAILS ON BENCHMARK
|
| 444 |
+
|
| 445 |
+
We illustrate our model architecture and training details of the digits classification experiments in this section.
|
| 446 |
+
|
| 447 |
+
Model Architecture. For our benchmark experiment, we use a six-layer Convolutional Neural Network (CNN) and its details are listed in Table 3.
|
| 448 |
+
|
| 449 |
+
<table><tr><td rowspan=1 colspan=1>Layer</td><td rowspan=1 colspan=1>Details</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>Conv2D(3, 64, 5, 1, 2)BN(64), ReLU, MaxPool2D(2,2)</td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Conv2D(64, 64, 5, 1, 2)BN(64), ReLU, MaxPool2D(2, 2)</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>Conv2D(64, 128,5, 1, 2)BN(128), ReLU</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>Conv2D(64, 128,5,1, 2)BN(128), ReLU</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>FC(6272,2048)BN(2048), ReLU</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>FC(2048, 512)BN(512), ReLU</td></tr><tr><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>FC(512, 10)</td></tr></table>
|
| 450 |
+
|
| 451 |
+
Table 3: Model architecture of the benchmark experiment. For convolutional layer (Conv2D), we list parameters with sequence of input and output dimension, kernal size, stride and padding. For max pooling layer (MaxPool2D), we list kernal and stride. For fully connected layer (FC), we list input and output dimension. For BatchNormalization layer (BN), we list the channel dimension.
|
| 452 |
+
|
| 453 |
+
Training Details. We give detailed settings for the experiments conducted in 5.1: (1) convergence rate (Table 4), (2) analysis of local update epochs (Table 5), (3) analysis of local dataset size (Table 6), (4) effects of statistical heterogeneity (Table 7) and (5) comparison with state-of-the-art (Table 8). Each table describes the number of clients, samples and the local update epochs.
|
| 454 |
+
|
| 455 |
+
During training process, we use SGD optimizer with learning rate $1 0 ^ { - 2 }$ and cross-entropy loss, we set batch size to 32 and training epochs to 300. For hyper-parameter $\mu$ , we use the best value $\mu = 1 0 ^ { - 2 }$ founded by grid search from the the default settings in FedProx Li et al. (2020b).
|
| 456 |
+
|
| 457 |
+
Table 4: Settings for convergence rate. Each dataset has 1 client with 743 samples, local update epoch is set to 1.
|
| 458 |
+
|
| 459 |
+
<table><tr><td>Datasets</td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Number of clients</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>Number of samples</td><td>743</td><td>743</td><td>743</td><td>743</td><td>743</td></tr><tr><td>Local update epochs</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></table>
|
| 460 |
+
|
| 461 |
+
<table><tr><td>Datasets</td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Number of clients</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>Number of samples</td><td>743</td><td>743</td><td>743</td><td>743</td><td>743</td></tr><tr><td>Local update epochs</td><td>1,4,8,16</td><td>1,4,8,16</td><td>1,4,8,16</td><td>1,4,8,16</td><td>1,4,8,16</td></tr></table>
|
| 462 |
+
|
| 463 |
+
Table 5: Settings for local update epochs. Each dataset has 1 client with 743 samples, local update epoch for all datasets is set to 1, 4, 8, 16 successively.
|
| 464 |
+
|
| 465 |
+
<table><tr><td>Datasets</td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Number of clients</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>Number of samples</td><td>W</td><td>W</td><td>W</td><td>W</td><td>8</td></tr><tr><td>Local update epochs</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></table>
|
| 466 |
+
|
| 467 |
+
Table 6: Settings for local dataset size, we set local update epochs to 1 and each dataset has 1 client.
|
| 468 |
+
The number of samples $\omega \in \{ 7 4 , 3 7 1$ , 743, 1487, 2975, 4462, 7438 .
|
| 469 |
+
|
| 470 |
+
<table><tr><td>Datasets</td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Number of clients</td><td>[1,10]</td><td>[1,10]</td><td>[1,10]</td><td>[1,10]</td><td>[1,10]</td></tr><tr><td>Number of samples</td><td>[1,10]×743</td><td>[1,10]×743</td><td>[1,10]×743</td><td>[1,10]×743</td><td>[1,10]×743</td></tr><tr><td>Local update epochs</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></table>
|
| 471 |
+
|
| 472 |
+
Table 7: Settings for statistical heterogeneity, [1, 10] for the range from 1 to 10. We increase number of clients step by step and number of samples will increase accordingly.
|
| 473 |
+
|
| 474 |
+
<table><tr><td>Datasets</td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Number of clients</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr><tr><td>Number of samples</td><td>743</td><td>743</td><td>743</td><td>743</td><td>743</td></tr><tr><td>Local update epochs</td><td>1</td><td>1</td><td>1</td><td>1</td><td>1</td></tr></table>
|
| 475 |
+
|
| 476 |
+
Table 8: Settings for comparison with SOTA, we use 1 client with 743 samples and 1 local update epoch for comparison experiment.
|
| 477 |
+
|
| 478 |
+
# D.3 MODEL ARCHITECTURE AND TRANING DETAILS OF IMAGE CLASSIFICATION TASK ON OFFICE-CALTECH10 AND DOMAINNET
|
| 479 |
+
|
| 480 |
+
In this section, we provide the details of our model and training process on both Office-Caltech10 Gong et al. (2012) and DomainNet Peng et al. (2019) dataset.
|
| 481 |
+
|
| 482 |
+
Model Architecture. For the image classification tasks on these two real-worlds datasets OfficeCaltech10 and DomainNet data, we use adapted AlexNet added with BN layer after each convolutional layer and fully-connected layer (except the last layer), architecture is shown in Table 9.
|
| 483 |
+
Table 9: Model architecture for Office-Caltech10 and DomainNet experiment. For convolutional layer (Conv2D), we list parameters with sequence of input and output dimension, kernal size, stride and padding. For max pooling layer (MaxPool2D), we list kernal and stride. For fully connected layer (FC), we list input and output dimension. For BatchNormalization layer (BN), we list the channel dimension.
|
| 484 |
+
|
| 485 |
+
<table><tr><td rowspan=1 colspan=1>Layer</td><td rowspan=1 colspan=1>Details</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>Conv2D(3, 64, 11, 4, 2)BN(64), ReLU,MaxPool2D(3, 2)</td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Conv2D(64,192,5,1,2)BN(192), ReLU,MaxPool2D(3,2)</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>Conv2D(64,128,5, 1,2)BN(128), ReLU</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>Conv2D(192, 384, 3, 1, 1)BN(384), ReLU</td></tr><tr><td rowspan=1 colspan=1>4</td><td rowspan=1 colspan=1>Conv2D(384, 256,3, 1, 1)BN(256), ReLU</td></tr><tr><td rowspan=1 colspan=1>5</td><td rowspan=1 colspan=1>Conv2D(256, 256, 3, 1, 1)BN(256),ReLU,MaxPoll2D(3,2)</td></tr><tr><td rowspan=1 colspan=1>6</td><td rowspan=1 colspan=1>AdaptiveAvgPool2D(6, 6)</td></tr><tr><td rowspan=1 colspan=1>7</td><td rowspan=1 colspan=1>FC(9216,4096)BN(4096), ReLU</td></tr><tr><td rowspan=1 colspan=1>8</td><td rowspan=1 colspan=1>FC(4096, 4096)BN(4096), ReLU</td></tr><tr><td rowspan=1 colspan=1>9</td><td rowspan=1 colspan=1>FC(4096, 10)</td></tr></table>
|
| 486 |
+
|
| 487 |
+
Training Details. Office-Caltech10 selects 10 common objects in Office-31 Saenko et al. (2010) and Caltech-256 datasets Griffin et al. (2007). There are four different data sources, one from Caltech-256 and three from Office-31, namely Amazon(images collected from online shopping website), DSLR and Webcam(images captured in office environment using Digital SLR camera and web camera).
|
| 488 |
+
|
| 489 |
+
We first reshape input images in the two dataset into $2 5 6 \times 2 5 6 \times 3$ , then for training process, we use cross-entropy loss and SGD optimizer with learning rate of $1 0 ^ { - 2 }$ , batch size is set to 32 and training epochs is 300. When comparing with FedProx, we set $\mu$ to $1 0 ^ { - 2 }$ which is tuned from the default settings. The data sample number are kept into the same size according to the smallest dataset, i.e. Office-Caltech10 uses 62 training samples and DomainNet uses 105 training samples on each dataset. In addition, for simplicity, we choose top-10 class based on data amount from DomainNet containing images over 345 categories.
|
| 490 |
+
|
| 491 |
+
# D.4 ABIDE DATASET AND TRAINING DETAILS
|
| 492 |
+
|
| 493 |
+
Here we describe the real-world medical datasets, the preprocessing and training details.
|
| 494 |
+
|
| 495 |
+
Dataset: The study was carried out using resting-state fMRI (rs-fMRI) data from the Autism Brain Imaging Data Exchange dataset (ABIDE I preprocessed, (Di Martino et al., 2014)). ABIDE is a consortium that provides preciously collected rs-fMRI ASD and matched controls data for the purpose of data sharing in the scientific community. We downloaded Regions of Interests (ROIs) fMRI series of the top four largest sites (UM, NYU, USM, UCLA viewed as clients) from the preprocessed ABIDE dataset with Configurable Pipeline for the Analysis of Connectomes (CPAC) and parcellated by Harvard-Oxford (HO) atlas. Skipping subjects lacking filename, resulting in 88, 167, 52, 63 subjects for UM, NYU, USM, UCLA separately. Due to a lack of sufficient data, we used sliding windows (with window size 32 and stride 1) to truncate raw time sequences of fMRI. The compositions of four sites were shown in Table 10. The number of overlapping truncate is the dataset size in a client.
|
| 496 |
+
|
| 497 |
+
Table 10: Data summary of the dataset used in our study.
|
| 498 |
+
|
| 499 |
+
<table><tr><td></td><td>NYU</td><td>UM1</td><td>USM</td><td>UCLA1</td></tr><tr><td>Total Subject</td><td>167</td><td>88</td><td>52</td><td>63</td></tr><tr><td>ASD Subject</td><td>73</td><td>43</td><td>33</td><td>37</td></tr><tr><td>HC Subject</td><td>94</td><td>45</td><td>19</td><td>26</td></tr><tr><td>ASD Percentage</td><td>44%</td><td>49%</td><td>63%</td><td>59%</td></tr><tr><td>fMRIFrames</td><td>176</td><td>296</td><td>236</td><td>116</td></tr><tr><td>Overlapping Trunc</td><td>145</td><td>265</td><td>205</td><td>85</td></tr></table>
|
| 500 |
+
|
| 501 |
+
Training Process : For all the strategies, we set batch size as 100. The total training local epoch is 50 with learning rate $1 0 ^ { - 2 }$ with SGD optimizer. Local update epoch for each client is $E = 1$ . We selected the best parameters $\mu = 0 . 2$ in FedProx through grid search.
|
| 502 |
+
|
| 503 |
+
# E MORE EXPERIMENTAL RESULTS ON BENCHMARK DATASETS
|
| 504 |
+
|
| 505 |
+
# E.1 CONVERGENCE COMPARISON OVER FEDAVG AND FEDBN
|
| 506 |
+
|
| 507 |
+
In this section we conduct an additional convergence analysis experiment over different local update epochs settings: $E = 1 , 4 , 8 , 1 6$ . As shown in Fig. 7, FedBN converges faster than FedAvg under different values of $E$ , which is supportive to our theoretical analysis in Section 4 and experimental results in Section 5.
|
| 508 |
+
|
| 509 |
+

|
| 510 |
+
Figure 7: Training loss over epochs with different local update frequency.
|
| 511 |
+
|
| 512 |
+
# E.2 DETAILED STATISTICS OF FIGURE 5
|
| 513 |
+
|
| 514 |
+
In Figure 5, we compare the performance with respect to accuracy of FedBN and alternative methods. We show the detailed accuracy in the following Table 11.
|
| 515 |
+
|
| 516 |
+
<table><tr><td>Methods</td><td>SVHN</td><td>USPS</td><td>Synth</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Single</td><td>65.25 (1.07)</td><td>95.16 (0.12)</td><td>80.31 (0.38)</td><td>77.77 (0.47)</td><td>94.38 (0.07)</td></tr><tr><td>FedAvg</td><td>62.86 (1.49)</td><td>95.56 (0.27)</td><td>82.27 (0.44)</td><td>76.85 (0.54)</td><td>95.87 (0.20)</td></tr><tr><td>FedProx</td><td>63.08 (1.62)</td><td>95.58 (0.31)</td><td>82.34 (0.37)</td><td>76.64 (0.55)</td><td>95.75 (0.21)</td></tr><tr><td>FedBN</td><td>71.04 (0.31)</td><td>96.97 (0.32)</td><td>83.19 (0.42)</td><td>78.33 (0.66)</td><td>96.57 (0.13)</td></tr></table>
|
| 517 |
+
|
| 518 |
+
Table 11: The detailed statistics reported with format mean (std) of accuracy presented on Fig. 5 .
|
| 519 |
+
|
| 520 |
+
# E.3 COMPARE FEDBN WITH CENTRALIZED TRAINING
|
| 521 |
+
|
| 522 |
+
To better understand the significance of the numbers reported in our main context, we compare FedBN with centralized training, that pools all training data in to a center. We present the testing accuracy on each digit dataset in Table 12. FedBN, federated learning with data-specific BN layers, could achieve comparable performance with vanilla centralized training strategy.
|
| 523 |
+
|
| 524 |
+
<table><tr><td></td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>Centralized</td><td>74.18 (0.44)</td><td>96.46 (0.30)</td><td>84.57 (0.38)</td><td>79.65 (0.24)</td><td>96.53 (0.19)</td></tr><tr><td>FedBN</td><td>71.04 (0.31)</td><td>96.97 (0.32)</td><td>83.19 (0.42)</td><td>78.33 (0.66)</td><td>96.57 (0.13)</td></tr></table>
|
| 525 |
+
|
| 526 |
+
Table 12: Testing accuracy on each testing sets with format mean(std) from 5-trial run.
|
| 527 |
+
|
| 528 |
+
# E.4 DIFFERENT COMBINATIONS OF $E$ AND $B$
|
| 529 |
+
|
| 530 |
+
In this section, we show different combinations of local update epochs $E$ and batch size $B$ . Specifically, $E \in \{ 1 , 4 , 1 6 \}$ and $B \in \{ 1 0 , 5 0 , \infty \}$ , $\infty$ denotes full batch learning. Following the setting in original FedAvg paper McMahan et al. (2017), we present the comparisons between FedBN and FedAvg on each combination of $E$ and $B$ in Table 13. The results are in good agreement that FedBN can consistently outperform FedAvg and robust to batch size selection. Further, we depicts the test sets accuracy vs. local epochs under different combination of $E$ and $B$ in Figure 8.
|
| 531 |
+
|
| 532 |
+
Table 13: Test sets accuracy using different combinations of batch size $B$ and local update epoch $E$ on benchmark experiment with the default non-iid setting.
|
| 533 |
+
|
| 534 |
+
<table><tr><td colspan="2">Setting</td><td>SVHN</td><td>USPS</td><td>SynthDigits</td><td>MNIST-M</td><td>MNIST</td></tr><tr><td>B=10,E=1</td><td>FedAvg FedBN</td><td>65.50 76.18</td><td>97.04 97.37</td><td>84.25 86.51</td><td>81.65 82.81</td><td>96.55 97.41</td></tr><tr><td>B=10,E=4</td><td>FedAvg FedBN</td><td>69.80 76.23</td><td>96.67 97.04</td><td>85.63 86.99</td><td>82.54 83.14</td><td>97.21 97.05</td></tr><tr><td>B=10,E=16</td><td>FedAvg FedBN</td><td>65.05 75.56</td><td>95.05 96.13</td><td>83.74 84.78</td><td>80.79 80.29</td><td>96.71 96.44</td></tr><tr><td>B=50,E=1</td><td>FedAvg FedBN</td><td>62.42 70.70</td><td>95.32 97.04</td><td>81.66 82.74</td><td>75.28 78.38</td><td>96.06 96.57</td></tr><tr><td>B=50,E=4</td><td>FedAvg FedBN</td><td>61.67 69.85</td><td>95.16 97.10</td><td>80.69 81.78</td><td>74.44 77.56</td><td>95.71 96.40</td></tr><tr><td>B=50,E=16</td><td>FedAvg FedBN</td><td>60.00 67.67</td><td>94.68 96.94</td><td>79.37 80.39</td><td>73.39 76.54</td><td>95.28 95.66</td></tr><tr><td>B=0,E=1</td><td>FedAvg FedBN</td><td>60.99 65.98</td><td>94.57 96.29</td><td>79.69 79.75</td><td>74.36 76.79</td><td>95.86 96.15</td></tr><tr><td>B=0,E=4</td><td>FedAvg FedBN</td><td>59.07 65.25</td><td>95.38 96.34</td><td>79.88 79.99</td><td>73.97 73.96</td><td>94.51 95.51</td></tr><tr><td>B=0,E=16</td><td>FedAvg FedBN</td><td>61.88 64.39</td><td>94.68 95.16</td><td>78.69 78.22</td><td>74.36 73.96</td><td>95.46 95.57</td></tr></table>
|
| 535 |
+
|
| 536 |
+

|
| 537 |
+
Figure 8: Test set accuracy curve (average of 5 datasets) of using different local updating epochs $E$ and batch size $B$ for FedBN.
|
| 538 |
+
|
| 539 |
+
# E.5 DETAILED STATISTICS OF VARYING LOCAL DATASET SIZE EXPERIMENT
|
| 540 |
+
|
| 541 |
+
Considering putting all results in one figure (15 lines) might affect readability of the figure, we excluded the statistics of FedAvg in our Fig. 4 (b), the ablation study of our method on the effect of local dataset size. Here, we list the full results in Table 14. It is not too surprising that at Singleset can be the best when the a local client gets a lot of data.
|
| 542 |
+
|
| 543 |
+
Table 14: Model performance over varying dataset sizes on local clients
|
| 544 |
+
|
| 545 |
+
<table><tr><td colspan="2">Setting</td><td>100%</td><td>60%</td><td>40%</td><td>20%</td><td>10%</td><td>5%</td><td>1%</td></tr><tr><td rowspan="3">MNIST</td><td>SingleSet</td><td>98.09</td><td>97.84</td><td>97.22</td><td>96.14</td><td>94.35</td><td>90.86</td><td>75.28</td></tr><tr><td>FedAvg</td><td>98.96</td><td>98.54</td><td>98.13</td><td>97.51</td><td>96.22</td><td>93.79</td><td>79.94</td></tr><tr><td>FedBN</td><td>98.91</td><td>98.63</td><td>98.34</td><td>97.78</td><td>96.72</td><td>94.67</td><td>85.22</td></tr><tr><td rowspan="3">SVHN</td><td>SingleSet</td><td>85.74</td><td>84.62</td><td>82.75</td><td>76.42</td><td>66.81</td><td>52.62</td><td>12.06</td></tr><tr><td>FedAvg</td><td>82.08</td><td>79.56</td><td>77.37</td><td>70.84</td><td>63.80</td><td>49.15</td><td>23.67</td></tr><tr><td>FedBN</td><td>86.93</td><td>84.72</td><td>82.87</td><td>78.20</td><td>71.31</td><td>61.53</td><td>31.98</td></tr><tr><td rowspan="3">USPS</td><td>SingleSet</td><td>98.87</td><td>98.49</td><td>97.85</td><td>96.94</td><td>95.11</td><td>93.01</td><td>80.11</td></tr><tr><td>FedAvg</td><td>98.33</td><td>97.85</td><td>97.42</td><td>96.61</td><td>95.59</td><td>93.76</td><td>79.09</td></tr><tr><td>FedBN</td><td>98.82</td><td>98.92</td><td>98.55</td><td>98.17</td><td>97.58</td><td>96.24</td><td>85.05</td></tr><tr><td rowspan="3">Synth</td><td>SingleSet</td><td>94.33</td><td>92.82</td><td>91.02</td><td>86.77</td><td>80.47</td><td>70.61</td><td>14.10</td></tr><tr><td>FedAvg</td><td>93.98</td><td>92.57</td><td>91.04</td><td>87.03</td><td>82.17</td><td>72.76</td><td>42.11</td></tr><tr><td>FedBN</td><td>94.40</td><td>92.81</td><td>91.75</td><td>88.03</td><td>83.06</td><td>74.85</td><td>43.76</td></tr><tr><td rowspan="3">MNISTM</td><td>SingleSet</td><td>93.30</td><td>91.63</td><td>89.41</td><td>84.34</td><td>77.59</td><td>66.02</td><td>17.23</td></tr><tr><td>FedAvg</td><td>90.59</td><td>88.91</td><td>86.21</td><td>82.11</td><td>76.93</td><td>67.97</td><td>41.71</td></tr><tr><td>FedBN</td><td>91.35</td><td>89.95</td><td>87.79</td><td>83.73</td><td>78.80</td><td>70.04</td><td>44.17</td></tr></table>
|
| 546 |
+
|
| 547 |
+
# E.6 TRAINING ON UNEQUAL DATASET SIZE
|
| 548 |
+
|
| 549 |
+
In our benchmark experiment (Section 5.1), we truncate the sample size of the five datasets to their smallest number. This data preprocessing intends to strictly control non-related factors (e.g., imbalanced sample numbers across clients), so that the experimental findings can more clearly reflect the effect of local BN. In this regard, truncating datasets is a reasonable way to make each client have an equal number of data points and local update steps. It is also possible to keep the data sets in their original size (which is unequal), by allowing clients with less data to repeat sampling. In this way, all clients use the same batch size and same local iterations of each epoch. We add results of such a setting with $10 \%$ and full original datasize in Table 15 and Table 16 respectively. It is observed that FedBN still consistently outperforms other methods.
|
| 550 |
+
|
| 551 |
+
Table 15: Testing accuracy of each clients when clients’ training samples are unequal using $10 \%$ of original data. The number of training samples for each client are denoted under their names.
|
| 552 |
+
|
| 553 |
+
<table><tr><td>Method</td><td>SVHN 7943</td><td>USPS 743</td><td>SynthDigits 39116</td><td>MNIST-M 5600</td><td>MNIST 5600</td></tr><tr><td>FedAvg</td><td>87.00</td><td>98.01</td><td>97.55</td><td>88.69</td><td>98.75</td></tr><tr><td>FedProx</td><td>86.75</td><td>97.90</td><td>97.53</td><td>88.86</td><td>98.86</td></tr><tr><td>FedBN</td><td>89.34</td><td>98.28</td><td>97.83</td><td>90.34</td><td>98.89</td></tr></table>
|
| 554 |
+
|
| 555 |
+
<table><tr><td>Method</td><td>SVHN 79430</td><td>USPS 7430</td><td>SynthDigits 391160</td><td>MNIST-M 56000</td><td>MNIST 56000</td></tr><tr><td>FedAvg</td><td>99.59</td><td>92.27</td><td>98.71</td><td>99.30</td><td>95.27</td></tr><tr><td>FedProx</td><td>99.50</td><td>92.12</td><td>98.66</td><td>99.27</td><td>95.44</td></tr><tr><td>FedBN</td><td>99.62</td><td>94.34</td><td>98.92</td><td>99.54</td><td>96.72</td></tr></table>
|
| 556 |
+
|
| 557 |
+
Table 16: Testing accuracy of each clients when clients’ training samples are unequal using full size data. The number of training samples for each client are denoted under their names.
|
| 558 |
+
|
| 559 |
+
# F SYNTHETIC DATA EXPERIMENT
|
| 560 |
+
|
| 561 |
+
Settings We generate data from two-pair of multi-Gaussian distributions. For one pair, samples $( x , 0 )$ and $( x , 1 )$ are sampled from $\mathcal { N } ( \bar { - } 1 , \Sigma _ { 1 } )$ and $\mathcal { N } ( 1 , \ \Sigma _ { 1 } )$ respectively, with coveriance $\Sigma _ { 1 } \in$ $\dot { \mathbb { R } } ^ { 1 0 \times 1 0 }$ . For another pair, samples $( \widetilde { x } , 0 )$ and $( \widetilde { x } , 1 )$ are sampled from $\mathcal { N } ( - 1 , ~ \Sigma _ { 2 } )$ and $\mathcal { N } ( 1 , \ \Sigma _ { 2 } )$ respectively, with coveriance $\bar { \Sigma } _ { 2 } \in \mathrm { ~ \mathbb { R } ^ { 1 0 \times 1 0 } ~ }$ e. Specifically, we design convariance matrix $\Sigma _ { 1 }$ as an identity diagonal matrix and $\Sigma _ { 2 }$ is different from $\Sigma _ { 1 }$ by having non-zero values on off-diagonal entries. We train a two-layer neural network with 100 hidden neurons for 600 steps using crossentropy loss and SGD optimizer with $1 \times 1 0 ^ { - 5 }$ learning rate. Denote $W _ { k }$ and $b _ { k }$ are the in-connection weigths and bias term of neuron $k$ . We initialize the model parameters with $W _ { k } \sim { \mathcal { N } } ( 0 , \alpha ^ { 2 } \mathbf { I } )$ , $b _ { k } \sim$ ${ \mathcal { N } } ( { \bar { 0 } } , \alpha ^ { 2 } )$ , where $\alpha = 1 0$ .
|
| 562 |
+
|
| 563 |
+
Results. The aim of synthetic experiments is to study the behavior of using FedBN with a controlled setup. We achieve $1 0 0 \%$ accuracy on binary classification for FedAvg and FedBN. Fig. 9 shows comparison of training loss curve over steps using FedAvg and FedBN, presenting that FedBN obtains significantly faster convergence than FedAvg.
|
| 564 |
+
|
| 565 |
+

|
| 566 |
+
Figure 9: Training loss on synthetic data. Data in client 1 is generated from Diagonal Gaussian, client 2 is generated from combination of Diagonal Gaussian and Full Gaussian.
|
| 567 |
+
|
| 568 |
+
# G TRANSFER LEARNING AND TESTING ON UNKNOWN DOMAIN CLIENT
|
| 569 |
+
|
| 570 |
+
In this section, we discuss out-of-domain generalization of FedBN and prove the solutions for the following two scenarios: 1) transferring FedBN to a new unknown domain clients during training; 2) testing an unknown domain client.
|
| 571 |
+
|
| 572 |
+
If a new center from another domain joins training, we can transfer the non-BN layer parameters of the global model to this new center. This new center will compute its own mean and variance statistics, and learn the corresponding local BN parameters.
|
| 573 |
+
|
| 574 |
+
Testing the global model on a new client with unknown statistics outside federation requires allowing access to local BN parameters at testing time (though BN layers are not aggregated at the global server during training). In this way, the new client can use the averaged trainable BN parameters learned at existing FL clients, and compute the (mean, variance) on its own data. Such a solution is also in line with what was done in recent literature, e.g., SiloBN (Andreux et al., 2020). We conduct the experiment with this solution for FedBN and compared its performance with FedAvg and FedProx. Specifically, we use the digits classification task and treat the two unseen datasets – Morpho-global and Morpho-local from Morpho-MNIST (Castro et al., 2019) as the two new clients. The new clients contain substantially perturbed digits. Specifically, Morpho-global containing thinning and thickening versions of MNIST digits, while Morpho-local changes MNIST by swelling and fractures. The results are listed in Table 17. It is observed that the obtained results from three methods are generally comparable in such a challenging setting, with FedBN presenting slightly higher performance on overall average accuracy.
|
| 575 |
+
|
| 576 |
+
<table><tr><td></td><td>Morpho-global</td><td>Morpho-local</td></tr><tr><td>FedBN</td><td>92.45</td><td>94.61</td></tr><tr><td>FedProx</td><td>92.35</td><td>94.31</td></tr><tr><td>FedAvg</td><td>91.28</td><td>93.55</td></tr></table>
|
| 577 |
+
|
| 578 |
+
Table 17: Generalizing the global model to unseen-domain clients.
|
md/train/6YL_BntJrz6/6YL_BntJrz6.md
ADDED
|
@@ -0,0 +1,282 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Dirichlet Energy Constrained Learning for Deep Graph Neural Networks
|
| 2 |
+
|
| 3 |
+
Kaixiong Zhou Rice University Kaixiong.Zhou@rice.edu
|
| 4 |
+
|
| 5 |
+
Xiao Huang The Hong Kong Polytechnic University xiaohuang@comp.polyu.edu.hk
|
| 6 |
+
|
| 7 |
+
Daochen Zha Rice University Daochen.Zha@rice.edu
|
| 8 |
+
|
| 9 |
+
Rui Chen Samsung Research America rui.chen1@samsung.com
|
| 10 |
+
|
| 11 |
+
Li Li Samsung Research America li.li1@samsung.com
|
| 12 |
+
|
| 13 |
+
Soo-Hyun Choi∗ Samsung Electronics soohyunc@gmail.com
|
| 14 |
+
|
| 15 |
+
Xia Hu Rice University xia.hu@rice.edu
|
| 16 |
+
|
| 17 |
+
# Abstract
|
| 18 |
+
|
| 19 |
+
Graph neural networks (GNNs) integrate deep architectures and topological structure modeling in an effective way. However, the performance of existing GNNs would decrease significantly when they stack many layers, because of the oversmoothing issue. Node embeddings tend to converge to similar vectors when GNNs keep recursively aggregating the representations of neighbors. To enable deep GNNs, several methods have been explored recently. But they are developed from either techniques in convolutional neural networks or heuristic strategies. There is no generalizable and theoretical principle to guide the design of deep GNNs. To this end, we analyze the bottleneck of deep GNNs by leveraging the Dirichlet energy of node embeddings, and propose a generalizable principle to guide the training of deep GNNs. Based on it, a novel deep GNN framework – Energetic Graph Neural Networks (EGNN) is designed. It could provide lower and upper constraints in terms of Dirichlet energy at each layer to avoid over-smoothing. Experimental results demonstrate that EGNN achieves state-of-the-art performance by using deep layers.
|
| 20 |
+
|
| 21 |
+
# 1 Introduction
|
| 22 |
+
|
| 23 |
+
Graph neural networks (GNNs) [1] are promising deep learning tools to analyze networked data, such as social networks [2, 3, 4], academic networks [5, 6, 7], and molecular graphs [8, 9, 10, 11]. Based on spatial graph convolutions, GNNs apply a recursive aggregation mechanism to update the representation of each node by incorporating representations of itself and its neighbors [12]. A variety of GNN variations have been explored for different real-world networks and applications [13, 14].
|
| 24 |
+
|
| 25 |
+
A key limitation of GNNs is that when we stack many layers, the performance would decrease significantly. Experiments show that GNNs often achieve the best performance with less than 3 layers [15, 13]. As the layer number increases, the node representations will converge to indistinguishable vectors due to the recursive neighborhood aggregation and non-linear activation [16, 17].
|
| 26 |
+
|
| 27 |
+
Such phenomenon is recognized as over-smoothing issue [18, 19, 20, 21, 22]. It prevents the stacking of many layers and modeling the dependencies to high-order neighbors.
|
| 28 |
+
|
| 29 |
+
A number of algorithms have been proposed to alleviate the over-smoothing issue and construct deep GNNs, including embedding normalization [23, 24, 25], residual connection [26, 27, 28] and random data augmentation [29, 30, 31]. However, some of them are motivated directly by techniques in convolutional neural networks (CNNs) [32], such as the embedding normalization and residual connection. Others are based on heuristic strategies, such as random embedding propagation [30] and dropping edge [29]. Most of them only achieve comparable or even worse performance compared to their shallow models. Recently, a metric of Dirichlet energy has been applied to quantify the over-smoothing [33], which is based on measuring node pair distances. With the increasing of layers, the Dirichlet energy converges to zero since node embeddings become close to each other. But there is a lack of empirical methods to leverage this metric to overcome the over-smoothing issue.
|
| 30 |
+
|
| 31 |
+
Therefore, it remains a non-trivial task to train a deep GNN architecture due to three challenges. First, the existing efforts are developed from diverse perspectives, without a generalizable principle and analysis. The abundance of these components also makes the design of deep GNNs challenging, i.e., how should we choose a suitable one or combinations for real-world scenarios? Second, even if an effective indicator of over-smoothing is given, it is hard to theoretically analyze the bottleneck and propose a generalizable principle to guide the training of deep GNNs. Third, even if theoretical guidance is given, it may be difficult to be utilized and implemented to train GNNs empirically.
|
| 32 |
+
|
| 33 |
+
To this end, in this paper, we target to develop a generalizable framework with a theoretical basis, to handle the over-smoothing issue and enable effective deep GNN architectures. In particular, we will investigate two research questions. 1) Is there a theoretical and generalizable principle to guide the architecture design and training of deep GNNs? 2) How can we develop an effective architecture to achieve state-of-the-art performance by stacking a large number of layers? Following these questions, we make three major contributions as follows.
|
| 34 |
+
|
| 35 |
+
• We propose a generalizable principle – Dirichlet energy constrained learning, to guide the training of deep GNNs by regularizing Dirichlet energy. Without proper training, the Dirichlet energy would be either too small due to the over-smoothing issue, or too large when the node embeddings are over-separating. Our principle carefully defines an appropriate range of Dirichlet energy at each layer. Being regularized within this range, a deep GNN model could be trained by jointly optimizing the task loss and energy value.
|
| 36 |
+
|
| 37 |
+
• We design a novel deep architecture – Energetic Graph Neural Networks (EGNN). It follows the proposed principle and could efficiently learn an optimal Dirichlet energy. It consists of three components, i.e., orthogonal weight controlling, lower-bounded residual connection, and shifted ReLU (SReLU) activation. The trainable weights at graph convolutional layers are orthogonally initialized as diagonal matrices, whose diagonal values are regularized to meet the upper energy limit and eliminate the over-separating. The residual connection strength is determined by the lower energy limit to avoid the over-smoothing. While the widely-used ReLU activation causes the extra loss of Dirichlet energy, the linear mapping worsens the learning ability of GNNs. We apply SReLU with a trainable shift to provide a trade-off between the non-linear and linear mappings.
|
| 38 |
+
|
| 39 |
+
• We show that the proposed principle and EGNN can well explain most of the existing techniques for deep GNNs. Empirical results demonstrate that EGNN could be easily trained to reach 64 layers and achieves surprisingly competitive performance on benchmarks.
|
| 40 |
+
|
| 41 |
+
# 2 Problem Statement
|
| 42 |
+
|
| 43 |
+
Notations. Given an undirected graph consisting of $n$ nodes, it is represented as $G = ( A , X )$ , where $A \in \mathbb { R } ^ { n \times n }$ denotes the adjacency matrix and $\boldsymbol { X } \in \mathbb { R } ^ { n \times d }$ denotes the feature matrix. Let ${ \tilde { A } } : = A + I _ { n }$ and $\tilde { D } : = D + I _ { n }$ be the adjacency and degree matrix of the graph augmented with selfloops. The augmented normalized Laplacian is then given by $\tilde { \Delta } : = I _ { n } - \tilde { P }$ , where $\bar { \tilde { P } } : = \tilde { D } ^ { - \frac { 1 } { 2 } } \tilde { A } \tilde { D } ^ { - \frac { 1 } { 2 } }$ is an augmented normalized adjacency matrix used for the neighborhood aggregation in GNN models.
|
| 44 |
+
|
| 45 |
+
Node classification task. GNNs have been adopted in many applications [6, 11, 34]. Without loss of generality, we take node classification as an example. Given a graph $G = ( A , X )$ and a set of its nodes with labels for training, the goal is to predict the labels of nodes in a test set.
|
| 46 |
+
|
| 47 |
+
We now use the graph convolutional network (GCN) [15] as a typical example, to illustrate how traditional GNNs perform the network analysis task. Formally, the layer-wise forward-propagation operation in GCN at the $k$ -th layer is defined as:
|
| 48 |
+
|
| 49 |
+
$$
|
| 50 |
+
X ^ { ( k ) } = \sigma ( \tilde { P } X ^ { ( k - 1 ) } W ^ { ( k ) } ) .
|
| 51 |
+
$$
|
| 52 |
+
|
| 53 |
+
$X ^ { ( k ) }$ and $X ^ { ( k - 1 ) }$ are node embedding matrices at layers $k$ and $k - 1$ , respectively; $W ^ { ( k ) } \in \mathbb { R } ^ { d \times d }$ denotes trainable weights used for feature transformation; $\sigma$ denotes an activation function such as ReLU; $X ^ { ( 0 ) } = X$ at the initial layer of GCN. The embeddings at the final layer are optimized with a node classification loss function, e.g., cross-entropy loss. The recursive neighborhood aggregation in Eq. (1) will make node embeddings similar to each other as the number of layer $k$ increases. This property, i.e., over-smoothing, prevents traditional GNNs from exploring neighbors many hops away. In practice, the dependencies to high-order neighbors are important to the node classification. The traditional shallow GNNs may have sub-optimal performances in the downstream tasks [16, 28].
|
| 54 |
+
|
| 55 |
+
# 3 Dirichlet Energy Constrained Learning
|
| 56 |
+
|
| 57 |
+
In this paper, we aim to develop an effective principle to alleviate the over-smoothing issue and enable deep GNNs to leverage the high-order neighbors. We first theoretically analyze the over-smoothing issue, and then provide a principle to explain the key constraint in training deep GNNs.
|
| 58 |
+
|
| 59 |
+
Node pair distance has been widely adopted to quantify the over-smoothing based on embedding similarities [19, 23]. Among the series of distance metrics, Dirichlet energy is simple and expressive for the over-smoothing analysis [33]. Thus, we adopt Dirichlet energy and formally define it as below.
|
| 60 |
+
|
| 61 |
+
Definition 1. Given node embedding matrix $X ^ { ( k ) } = [ x _ { 1 } ^ { ( k ) } , \cdots , x _ { n } ^ { ( k ) } ] ^ { \top } \in \mathbb { R } ^ { n \times d }$ learned from GCN at the $k$ -th layer, the Dirichlet energy $E ( X ^ { ( k ) } )$ is defined as follows:
|
| 62 |
+
|
| 63 |
+
$$
|
| 64 |
+
E ( { \boldsymbol { X } } ^ { ( k ) } ) = \operatorname { t r } ( { \boldsymbol { X } } ^ { ( k ) } ^ { \top } \tilde { \Delta } { \boldsymbol { X } } ^ { ( k ) } ) = \frac { 1 } { 2 } \sum a _ { i j } | | \frac { \boldsymbol { x } _ { i } ^ { ( k ) } } { \sqrt { 1 + d _ { i } } } - \frac { { \boldsymbol { x } } _ { j } ^ { ( k ) } } { \sqrt { 1 + d _ { j } } } | | _ { 2 } ^ { 2 } ,
|
| 65 |
+
$$
|
| 66 |
+
|
| 67 |
+
where $\operatorname { t r } ( \cdot )$ denotes trace of a matrix; $a _ { i j }$ is edge weight given by the $( i , j )$ -th element in matrix $A$ ; $d _ { i }$ is node degree given by the $i$ -th diagonal element in matrix $D$ . Dirichlet energy reveals the embedding smoothness with the weighted node pair distance. While a smaller value of $E ( X ^ { ( k ) } )$ is highly related to the over-smoothing, a larger one indicates that the node embeddings are over-separating even for those nodes with the same label. Considering the node classification task, one would prefer to have an appropriate Dirichlet energy at each layer to separate the nodes of different classes while keeping those of the same class close. However, under some conditions, the upper bound of Dirichlet energy is theoretically proved to converge to 0 in the limit of infinite layers [33]. In other words, all nodes converge to a trivial fixed point in the embedding space.
|
| 68 |
+
|
| 69 |
+
Based on the previous analysis, we derive the corresponding lower bound and revisit the oversmoothing/separating problem from the model design and training perspectives. To simplify the derivation process, we remove the non-linear activation $\sigma$ , and re-express GCN as: $X ^ { ( \bar { k } ) } =$ $P \cdot \cdot \cdot P X W ^ { ( 1 ) } \cdot \cdot \cdot W ^ { ( k ) }$ . The impact of non-linear function will be considered in the model design.
|
| 70 |
+
|
| 71 |
+
Lemma 1. The Dirichlet energy at the $k$ -th layer is bounded as follows:
|
| 72 |
+
|
| 73 |
+
$$
|
| 74 |
+
( 1 - \lambda _ { 1 } ) ^ { 2 } s _ { \operatorname* { m i n } } ^ { ( k ) } E ( X ^ { ( k - 1 ) } ) \leq E ( X ^ { ( k ) } ) \leq ( 1 - \lambda _ { 0 } ) ^ { 2 } s _ { \operatorname* { m a x } } ^ { ( k ) } E ( X ^ { ( k - 1 ) } ) .
|
| 75 |
+
$$
|
| 76 |
+
|
| 77 |
+
The detailed proof is provided in the Appendix. $\lambda _ { 1 }$ and $\lambda _ { 0 }$ are the non-zero eigenvalues of matrix $\tilde { \Delta }$ that are most close to values 1 and 0, respectively. $s _ { \mathrm { m i n } } ^ { ( k ) }$ and $s _ { \mathrm { m a x } } ^ { ( k ) }$ are the squares of minimum and maximum singular values of weight $W ^ { ( k ) }$ , respectively. Note that the eigenvalues of $\tilde { \Delta }$ vary with the real-world graphs, and locate within range $[ 0 , 2 )$ . We relax the above bounds as below.
|
| 78 |
+
|
| 79 |
+
Lemma 2. The lower and upper bounds of Dirichlet energy at the $k$ -th layer could be relaxed as:
|
| 80 |
+
|
| 81 |
+
$$
|
| 82 |
+
0 \leq E ( X ^ { ( k ) } ) \leq s _ { \operatorname* { m a x } } ^ { ( k ) } E ( X ^ { ( k - 1 ) } ) .
|
| 83 |
+
$$
|
| 84 |
+
|
| 85 |
+
Besides the uncontrollable eigenvalues determined by the underlying graph, it is shown that the Dirichlet energy can be either too small or too large without proper design and training on weight $W ^ { ( k ) }$ . On one hand, based on the common Glorot initialization [35] and L2 regularization, we empirically find that some of the weight matrices approximate to zero in a deep GCN. The corresponding square singular values are hence close to zero in these intermediate layers. That means the Dirichlet energy will become zero at the higher layers of GCN and causes the over-smoothing issue. On the other hand, without the proper weight initialization and regularization, a large $s _ { \mathrm { m a x } } ^ { ( k ) }$ may lead to the energy explosion and the over-separating.
|
| 86 |
+
|
| 87 |
+
The Dirichlet energy plays a key role in training a deep GNN model. However, the optimal value of Dirichlet energy varies in the different layers and applications. It is hard to be specified ahead and then enforces the node representation learning. Therefore, we propose a principle – Dirichlet energy constrained learning, defined in Proposition 1. It provides appropriate lower and upper limits of Dirichlet energy. Regularized by such a given range, a deep GNN model could be trained by jointly optimizing the node classification loss and Dirichlet energy at each layer.
|
| 88 |
+
|
| 89 |
+
Proposition 1. Dirichlet energy constrained learning defines the lower & upper limits at layer $k$ as:
|
| 90 |
+
|
| 91 |
+
$$
|
| 92 |
+
c _ { \operatorname* { m i n } } E ( X ^ { ( k - 1 ) } ) \leq E ( X ^ { ( k ) } ) \leq c _ { \operatorname* { m a x } } E ( X ^ { ( 0 ) } ) .
|
| 93 |
+
$$
|
| 94 |
+
|
| 95 |
+
We apply the transformed initial feature through trainable function $f$ $\because X ^ { ( 0 ) } = f ( X ) \in \mathbb { R } ^ { n \times d }$ . Both $c _ { \mathrm { m i n } }$ and $c _ { \mathrm { m a x } }$ are positive hyperparameters. From value interval $( 0 , 1 )$ , hyperparameter $c _ { \mathrm { m i n } }$ is selected by satisfying constraint of $E ( X ^ { ( k ) } ) \ge c _ { \mathrm { m i n } } ^ { k } E ( X ^ { ( 0 ) } ) > 0$ . In such a way, the over-smoothing is overcome since the Dirichlet energies of all the layers are larger than appropriate limits related to ckmin. Compared with the initial transformed feature $X ^ { ( 0 ) }$ , the intermediate node embeddings of the same class are expected to be merged closely to have a smaller Dirichlet energy and facilitate the downstream applications. Therefore, we exploit the upper limit $c _ { \mathrm { m a x } } E ( X ^ { ( 0 ) } )$ to avoid overseparating, where $c _ { \mathrm { m a x } }$ is usually selected from $( 0 , 1 ]$ . In the experiment part, we show that the optimal energy accompanied with the minimized classification loss locates within the above range at each layer. Furthermore, hyperparameters $c _ { \mathrm { m i n } }$ and $c _ { \mathrm { m a x } }$ could be easily selected from the large and appropriate value scopes, which do not affect the model performance.
|
| 96 |
+
|
| 97 |
+
Given both the low and upper limits, an intuitive solution to search the optimal energy is to train GNNs by optimizing the following constrained problem:
|
| 98 |
+
|
| 99 |
+
$$
|
| 100 |
+
\begin{array} { r l } & { \operatorname* { m i n } \quad \mathcal { L } _ { \mathrm { t a s k } } + \gamma \sum _ { k } | | W ^ { ( k ) } | | _ { F } , } \\ & { \mathrm { s . t . } \quad c _ { \operatorname* { m i n } } E \big ( X ^ { ( k - 1 ) } \big ) \leq E \big ( X ^ { ( k ) } \big ) \leq c _ { \operatorname* { m a x } } E \big ( X ^ { ( 0 ) } \big ) , \mathrm { f o r } k = 1 , \cdots , K . } \end{array}
|
| 101 |
+
$$
|
| 102 |
+
|
| 103 |
+
$\mathcal { L } _ { \mathrm { t a s k } }$ denotes the cross-entropy loss of node classification task; $K$ is layer number of GNN; $| | \cdot | | _ { F }$ denotes Frobenius norm of a matrix; and $\gamma$ is loss hyperparameter. Note that Dirichlet energy has also been adopted to regularize the node representation learning in shallow neural networks [36, 37, 38]. We instead focus on optimizing deep GNNs as shown in Eq. (6), where $K$ is often large.
|
| 104 |
+
|
| 105 |
+
# 4 Energetic Graph Neural Networks - EGNN
|
| 106 |
+
|
| 107 |
+
It is non-trivial to optimize Problem (6) due to the expensive computation of $E ( X ^ { ( k ) } )$ . Furthermore, the numerous constraints make the problem a very complex optimization hyper-planes, at which the raw task objective tends to fall into local optimums. Instead of directly optimizing Problem (6), we propose an efficient model EGNN to satisfy the constrained learning from three perspectives: weight controlling, residual connection and activation function. We introduce them one by one as follows.
|
| 108 |
+
|
| 109 |
+
# 4.1 Orthogonal Weight Controlling
|
| 110 |
+
|
| 111 |
+
According to Lemma 2, without regularizing the maximum square singular value $s _ { \mathrm { m a x } } ^ { ( k ) }$ of matrix $W ^ { ( k ) }$ , the upper bound of Dirichlet energy can be larger than the upper limit, i.e., $s _ { \mathrm { m a x } } ^ { ( k ) } E ( X ^ { ( k - 1 ) } ) >$ $c _ { \mathrm { m a x } } E ( X ^ { ( 0 ) } )$ . That means the Dirichlet energy of a layer may break the upper limit of constrained learning, and makes Problem (6) infeasible. In this section, we show how to satisfy such limit by controlling the singular values during weight initialization and model regularization.
|
| 112 |
+
|
| 113 |
+
Orthogonal initialization. Since the widely-used initialization methods (e.g., Glorot initialization) fail to restrict the scopes of singular values, we adopt the orthogonal approach that initializes trainable weight $W ^ { ( k ) }$ as a diagonal matrix with explicit singular values [39]. To restrict $s _ { \mathrm { m a x } } ^ { ( k ) }$ and meet the constrained learning, we apply an equality constraint of $s _ { \mathrm { m a x } } ^ { ( k ) } E ( X ^ { ( k - 1 ) } ) = c _ { \mathrm { m a x } } E ( X ^ { ( 0 ) } )$ at each layer. Based on this condition, we derive Proposition 2 to initialize those weights $W ^ { ( k ) }$ and their square singular values for all the layers of EGNN, and give Lemma 3 to show how we can satisfy the upper limit of constrained learning. The detailed derivation and proof are listed in Appendix.
|
| 114 |
+
|
| 115 |
+
Proposition 2. At the first layer, weight $W ^ { ( 1 ) }$ is initialized as a diagonal matrix $\sqrt { c _ { \operatorname* { m a x } } } \cdot I _ { d }$ , where $I _ { d }$ is identity matrix with dimension $d$ and the square singular values are $c _ { \mathrm { m a x } }$ . At the higher layer $k > 1$ , weight $W ^ { ( k ) }$ is initialized with an identity matrix $I _ { d }$ , where the square singular values are 1.
|
| 116 |
+
|
| 117 |
+
Lemma 3. Based on the above orthogonal initialization, at the starting point of training, the Dirichlet energy of EGNN satisfies the upper limit at each layer $k$ : $E ( X ^ { ( k ) } ) \le c _ { \mathrm { { m a x } } } E ( X ^ { ( 0 ) } )$ .
|
| 118 |
+
|
| 119 |
+
Orthogonal regularization. However, without proper regularization, the initialized weights cannot guarantee they will still satisfy the constrained learning during model training. Therefore, we propose a training loss that penalizes the distances between the trainable weights and initialized weights $\sqrt { c _ { \operatorname* { m a x } } } I _ { d }$ or $I _ { d }$ . To be specific, we modify the optimization problem (6) as follows:
|
| 120 |
+
|
| 121 |
+
$$
|
| 122 |
+
\operatorname* { m i n } \mathcal { L } _ { \mathrm { t a s k } } + \gamma | | W ^ { ( 1 ) } - \sqrt { c _ { \operatorname* { m a x } } } I _ { d } | | _ { F } + \gamma \sum _ { k = 2 } ^ { K } | | W ^ { ( k ) } - I _ { d } | | _ { F } .
|
| 123 |
+
$$
|
| 124 |
+
|
| 125 |
+
Comparing with the original problem (6), we instead use the weight penalization to meet the upper limit of constrained learning, and make the model training efficient. While a larger $\gamma$ highly regularizes the trainable weights around the initialized ones to satisfy the constrained learning, a smaller $\gamma$ assigns the model more freedom to adapt to task data and optimize the node classification loss. Considering the above orthogonal initialization where weight $W ^ { ( k ) }$ is diagonal and sparse, we use the simplest distance constraint in Eq. (7) to update weight at the vicinity of its initialization. The singular values of updated sparse weight will be mainly determined by the dominant diagonal values, which are potentially close to the initialized ones. Therefore, we are able to control the singular values and regularize the upper limit of Dirichlet energy even at the model training phase. In the future work, more the advanced orthogonal initialization and regularization approaches could be explored to further boost performance of deep GNNs [40, 41, 42].
|
| 126 |
+
|
| 127 |
+
# 4.2 Lower-bounded Residual Connection
|
| 128 |
+
|
| 129 |
+
Although the square singular values are initialized and regularized properly, we may still fail to guarantee the lower limit of constrained learning in some specific graphs. According to Lemma 1, the lower bound of Dirichlet energy is $( 1 - \lambda _ { 1 } ) ^ { 2 } s _ { \operatorname* { m i n } } ^ { ( k ) } E ( \bar { X ^ { ( k - 1 ) } } )$ . In the real-world applications, may exactly equal to 1 and relaxes the lower bound as zero as shown in Lemma 2. For example, in Erdos–Rényi graph with dense connections [ ˝ 43], the eigenvalues of matrix $\tilde { \Delta }$ converge to 1 with high probability [17]. Even though $s _ { \mathrm { m i n } } ^ { ( k ) } > 0$ , the Dirichlet energy can be smaller than the lower limit and leads to the over-smoothing. To tackle this problem, we adopt residual connections to the initial layer $X ^ { ( 0 ) }$ and the previous layer $X ^ { ( k - 1 ) }$ . To be specific, we define the residual graph convolutions as:
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
X ^ { ( k ) } = \sigma ( [ ( 1 - c _ { \operatorname * { m i n } } ) \tilde { P } X ^ { ( k - 1 ) } + \alpha X ^ { ( k - 1 ) } + \beta X ^ { ( 0 ) } ] W ^ { ( k ) } ) .
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
$\alpha$ and $\beta$ are residual connection strengths determined by the lower limit of constrained learning, i.e., $\alpha + \beta = c _ { \operatorname* { m i n } }$ . We are aware that the residual technique has been used before to set up deep GNNs [26, 44, 28]. However, they either apply the whole residual components, or combine an arbitrary fraction without theoretical insight. Instead, we use an appropriate residual connection according to the lower limit of Dirichlet energy. In the experiment part, we show that while a strong residual connection overwhelms information in the higher layers and reduces the classification performance, a weak one will lead to the over-smoothing. In the following, we justify that both the lower and upper limits in the constrained learning can be satisfied with the proposed lower-bounded residual connection. The detailed proofs are provided in Appendix.
|
| 136 |
+
|
| 137 |
+
Lemma 4. Suppose that $c _ { \operatorname* { m a x } } \geq c _ { \operatorname* { m i n } } / ( 2 c _ { \operatorname* { m i n } } - 1 ) ^ { 2 }$ . Based upon the orthogonal controlling and residual connection, the Dirichlet energy of initialized EGNN is larger than the lower limit at each layer $k$ , i.e., $E ( X ^ { ( k ) } ) \geq c _ { \operatorname* { m i n } } E ( X ^ { ( k - 1 ) } )$ .
|
| 138 |
+
|
| 139 |
+
Lemma 5. Suppose that $\begin{array} { r } { \sqrt { c _ { \mathrm { m a x } } } \ge \frac { \beta } { ( 1 - c _ { \mathrm { m i n } } ) \lambda _ { 0 } + \beta } } \end{array}$ . Being augmented with the orthogonal controlling and residual connection, the Dirichlet energy of initialized EGNN is smaller than the upper limit at each layer $k$ , i.e., $E ( X ^ { ( k ) } ) \le c _ { \mathrm { { m a x } } } E ( X ^ { ( 0 ) } )$ .
|
| 140 |
+
|
| 141 |
+
# 4.3 SReLU Activation
|
| 142 |
+
|
| 143 |
+
Note that the previous theoretical analysis and model design are conducted by ignoring the activation function, which is usually given by ReLU in GNN. In this section, we first theoretically discuss the impact of ReLU on the Dirichlet energy, and then demonstrate the appropriate choice of activation.
|
| 144 |
+
|
| 145 |
+
Lemma 6. We have $E ( \sigma ( X ^ { ( k ) } ) ) \leq E ( X ^ { ( k ) } )$ if activation function $\sigma$ is ReLU or Leaky-ReLU [33].
|
| 146 |
+
|
| 147 |
+
It is shown that the application of ReLU further reduces the Dirichlet energy, since the negative embeddings are non-linearly mapped to zero. Although the trainable weights and residual connections are properly designed, the declining Dirichlet energy may violate the lower limit. On the other hand, a simplified GNN with linear identity activation will have limited model learning ability although it does not change the energy value. For example, simple graph convolution (SGC) model achieves comparable performance with the traditional GCN only with careful hyperparameter tuning [45]. We propose to apply SReLU to achieve a good trade-off between the non-linear and linear activations [46, 47]. SReLU is defined element-wisely as:
|
| 148 |
+
|
| 149 |
+
$$
|
| 150 |
+
\sigma ( X ^ { ( k ) } ) = \operatorname* { m a x } ( b , X ^ { ( k ) } ) ,
|
| 151 |
+
$$
|
| 152 |
+
|
| 153 |
+
where $b$ is a trainable shift shared for each feature dimension of $X ^ { ( k ) }$ . SReLU interpolates between the non-linearity and linearity depending on shift $b$ . While the linear identity activation is approximated if $b$ is close to $\infty$ , the non-linear mapping is activated if node embedding is smaller than the specific $b$ . In our experiments, we initialize $b$ with a negative value to provide an initial trade-off, and adapt it to the given task by back-propagating the training loss.
|
| 154 |
+
|
| 155 |
+
# 4.4 Connections to Previous Work
|
| 156 |
+
|
| 157 |
+
Recently, various techniques have been explored to enable deep GNNs [16, 24, 30]. Some of them are designed heuristically from diverse perspectives, and others are analogous to CNN components without theoretical insight tailored to graph analytics. In the following, we show how our principle and EGNN explain the existing algorithms, and expect to provide reliable theoretical guidance to the future design of deep GNNs.
|
| 158 |
+
|
| 159 |
+
Embedding normalization. The general normalization layers, such as pair [23], batch [25] and group [24] normalizations, have been used to set up deep GNNs. The pair normalization (PairNorm) aims to keep the node pair distances as a constant in the different layers, and hence relieves the oversmoothing. Motivated from CNNs, the batch and group normalizations re-scale the node embeddings of a batch and a group, respectively. Similar to the operation in PairNorm, they learn to maintain the node pair distance in the node batch or group. The adopted Dirichlet energy is also a variant of the node pair distance. The existing normalization methods can be regarded as training GNN model with a constant energy constraint. However, this will prevent GNN from optimizing the energy as analyzed in Section 3. We instead regularize it within the lower and upper energy limits, and let model discover the optimum.
|
| 160 |
+
|
| 161 |
+
Dropping edge. As a data augmentation method, dropping edge (DropEdge) randomly masks a fraction of edges at each epoch [29]. It makes graph connections sparse and relieves the oversmoothing by reducing information propagation. Specially, the contribution of DropEdge could be explained from the perspective of Dirichlet energy. In Erdos–Rényi graph, eigenvalue ˝ $\lambda _ { 0 }$ converges to 1 if the graph connections are more and more dense [17]. DropEdge reduces the value of $\lambda _ { 0 }$ , and helps improve the upper bound of Dirichlet energy $( 1 - \lambda _ { 0 } ) ^ { 2 } s _ { \mathrm { m a x } } ^ { ( k ) } E ( X ^ { ( k - 1 ) } )$ to slow down the energy decreasing speed. In the extreme case where all the edges are dropped in any a graph,
|
| 162 |
+
|
| 163 |
+
Laplacian $\tilde { \Delta }$ becomes a zero matrix. As a result, we have eigenvalue $\lambda _ { 0 }$ of zero and maximize the upper bound. In practice, the dropping rate has to be determined carefully depending on various tasks. Instead, our principle assigns model freedom to optimize the Dirichlet energy within a large and appropriate range.
|
| 164 |
+
|
| 165 |
+
Residual connection. Motivated from CNNs, residual connection has been applied to preserve the previous node embeddings and relieve the over-smoothing. Especially, the embedding from the last layer is reused and combined completely in related work [26, 48, 49]. A fraction of the initial embedding is preserved in model GCNII [28] and APPNP [50]. Networks JKNet [27] and DAGNN [51] aggregate all the previous embeddings at the final layers. The existing work uses the residua connection empirically. In this work, we derive and explain the residual connection to guarantee the lower limit of Dirichlet energy. By modifying hyperparameter $c _ { \mathrm { m i n } }$ , our EGNN can easily evolve to the existing deep residual GNNs, such as GCNII and APPNP.
|
| 166 |
+
|
| 167 |
+
Model simplification. Model SGC [45] removes all the activation and trainable weights to avoid over-fitting issue, and simplifies the training of deep GNNs. It is equivalent to EGNN with $c _ { m a x } = 1$ and $b = - \infty$ , where weights $W ^ { ( k ) }$ and shifts $b$ are remained as constants. Such simplification will reduce the model learning ability. As shown in Eq. (7), we adopt loss hyperparameter $\gamma$ to learn the trade-off between maintaining the orthogonal weights or updating them to model data characteristics.
|
| 168 |
+
|
| 169 |
+
# 5 Experiments
|
| 170 |
+
|
| 171 |
+
In this section, we empirically evaluate the effectiveness of EGNN on real-world datasets. We aim to answer the following questions. Q1: How does our EGNN compare with the state-of-the-art deep GNN models? Q2: Whether or not the Dirichlet energy at each layer of EGNN satisfies the constrained learning? Q3: How does each component of EGNN affect the model performance? Q4: How do the model hyperparameters impact the performance of EGNN?
|
| 172 |
+
|
| 173 |
+
# 5.1 Experiment Setup
|
| 174 |
+
|
| 175 |
+
Datasets. Following the practice of previous work, we evaluate EGNN by performing node classification on four benchmark datasets: Cora, Pubmed [52], Coauthor-Physics [53] and Ogbn-arxiv [54]. The detailed statistics are listed in Appendix.
|
| 176 |
+
|
| 177 |
+
Baselines. We consider seven state-of-the-art baselines: GCN [15], PairNorm [23], DropEdge [29], SGC [45], JKNet [27], APPNP [50], and GCNII [28]. They are implemented based on their open repositories. The detailed descriptions of these baselines are provided in Appendix.
|
| 178 |
+
|
| 179 |
+
Implementation. We implement all the baselines using Pytorch Geometric [55] based on their official implementations. The model hyperparameters are reused according to the public papers or are fine-tuned by ourselves if the classification accuracy could be further improved. Specially, we apply max-pooling to obtain the final node representation at the last layer of JKNet. In Ogbn-arxiv, we additionally include batch normalization between the successive layers in all the considered GNN models except PairNorm. Although more tricks (e.g., label reusing and linear transformation as listed in leader board) could be applied to improve node classification in Ogbn-arxiv, we focus on comparing the original GNN models in enabling deep layer stacking. The training hyperparameters are carefully set by following the previous common setting and are listed in Appendix.
|
| 180 |
+
|
| 181 |
+
We implement our EGNN upon GCN, except for the components of weight initialization and regularization, lower-bounded residual connection and SReLU. We choose hyperparameters $c _ { \mathrm { m a x } }$ $c _ { \mathrm { m i n } }$ , $\gamma$ and $b$ based on the validation set. For the weight initialization, we set $c _ { \mathrm { m a x } }$ to be 1 for all the datasets; that is, the trainable weights are initialized as identity matrices at all the graph convolutional layers. The loss hyperparameter $\gamma$ is 20 in Cora, Pubmed and Coauthor-Physics to strictly regularize towards the orthogonal matrix; and it is $1 0 ^ { - 4 }$ in Ogbn-arxiv to improve the model’s learning ability. For the lower-bounded residual connection, we choose residual strength $c _ { \mathrm { m i n } }$ from range [0.1, 0.75] and list the details in Appendix. The trainable shift $b$ is initialized with $- 1 0$ in Cora and Pubmed; it is initialized to $- 5$ and $- 1$ in Coauthor-Physics and Ogbn-arxiv, respectively. We also study these hyperparameters in the following experiments. All the experiment results are the averages of 10 runs.
|
| 182 |
+
|
| 183 |
+
Table 1: Node classification accuracies in percentage with various depths: 2, 16, 32/64. The highest accuracy at each column is in bold.
|
| 184 |
+
|
| 185 |
+
<table><tr><td>Datasets</td><td colspan="3">Cora</td><td colspan="3">Pubmed</td><td colspan="3">Coauthors-Physics</td><td colspan="3">Ogbn-arxiv</td></tr><tr><td>Layer Num</td><td>2</td><td>16</td><td>64</td><td>2</td><td>16</td><td>64</td><td>2</td><td>16</td><td>32</td><td>2</td><td>16</td><td>32</td></tr><tr><td>GCN</td><td>82.5</td><td>22.0</td><td>21.9</td><td>79.7</td><td>37.9</td><td>38.4</td><td>92.4</td><td>13.5</td><td>13.1</td><td>70.4</td><td>70.6</td><td>68.5</td></tr><tr><td>PairNorm</td><td>74.5</td><td>44.2</td><td>14.2</td><td>73.8</td><td>68.6</td><td>60.0</td><td>86.3</td><td>84.0</td><td>83.6</td><td>67.6</td><td>70.4</td><td>69.6</td></tr><tr><td>DropEdge</td><td>82.7</td><td>23.6</td><td>25.2</td><td>79.6</td><td>45.9</td><td>40.0</td><td>92.5</td><td>85.1</td><td>35.2</td><td>70.5</td><td>70.4</td><td>67.1</td></tr><tr><td>SGC</td><td>75.7</td><td>72.1</td><td>24.1</td><td>76.1</td><td>70.2</td><td>38.2</td><td>92.2</td><td>91.7</td><td>84.8</td><td>69.2</td><td>64.0</td><td>59.5</td></tr><tr><td>JKNet</td><td>80.8</td><td>74.5</td><td>70.0</td><td>77.2</td><td>70.0</td><td>66.1</td><td>92.7</td><td>92.2</td><td>91.6</td><td>70.6</td><td>71.8</td><td>71.4</td></tr><tr><td>APPNP</td><td>82.9</td><td>79.4</td><td>79.5</td><td>79.3</td><td>77.1</td><td>76.8</td><td>92.3</td><td>92.7</td><td>92.6</td><td>68.3</td><td>65.5</td><td>60.7</td></tr><tr><td>GCNII</td><td>82.4</td><td>84.6</td><td>85.4</td><td>77.5</td><td>79.8</td><td>79.9</td><td>92.5</td><td>92.9</td><td>92.9</td><td>70.1</td><td>71.5</td><td>70.5</td></tr><tr><td>EGNN</td><td>83.2</td><td>85.4</td><td>85.7</td><td>79.2</td><td>80.0</td><td>80.1</td><td>92.6</td><td>93.1</td><td>93.3</td><td>68.4</td><td>72.7</td><td>72.7</td></tr></table>
|
| 186 |
+
|
| 187 |
+
# 5.2 Experiment Results
|
| 188 |
+
|
| 189 |
+
Node classification results. To answer research question Q1, Table 1 summarizes the test classification accuracies. Each accuracy is averaged over 10 random trials. We report the results with $2 / 1 6 / 6 4$ layers for Cora and Pubmed, and $2 / \bar { 1 } 6 / 3 2$ layers for Coauthor-Physics and Ogbn-arxiv. Due to space limit, we report the detailed results of mean accuracy and standard deviation in Appendix.
|
| 190 |
+
|
| 191 |
+
We observe that our EGNN generally outperforms all the baselines across the four datasets, especially in the deep cases $K \geq 1 6$ ). Notably, the node classification accuracy is consistently improved with the layer stacking in EGNN until $K = 3 2$ or 64, which demonstrates the benefits of deep graph neural architecture to leverage neighbors multiple hops away. While the state-of-the-art models PairNorm, DropEdge, SGC, JKNet, and APPNP alleviate the over-smoothing issue to some extend, their performances still drop with the increasing of layers. Most of their 32/64-layer models are even worse than their corresponding shallow versions. As the most competitive deep architecture in literature, GCNII augments the transformation matrix as $( 1 - \phi ) I _ { d } + \phi W ^ { ( k ) }$ , where $0 < \phi < 1$ is a hyperparameter to preserve the identity mapping and enhance the minimum singular value of the augmented weight. Instead of explicitly defining the strength of identity mapping, we propose the orthogonal weight initialization based on the upper limit of Dirichlet energy and apply the orthogonal weight regularization. Based on Eq. (7), EGNN automatically learns the optimal trade-off between identity mapping and task adaption. Furthermore, we use SReLU activation and the residual connection to theoretically control the lower limit of Dirichlet energy. The experimental results show that EGNN not only outperforms GCNII in the small graphs Cora, Pubmed and Coauthor-Physics, but also delivers significantly superior performance in the large graph Obgn-arxiv, achieving ${ \mathrm { { 3 . 1 \% } } }$ improvement over GCNII with 32 layers.
|
| 192 |
+
|
| 193 |
+
Dirichelet energy visualization. To answer research question Q2, we show the Dirichlet energy at each layer of a 64-layer EGNN in Cora and Pubmed datasets in Figure 1. To have better visualization purposes, by keeping other default hyperparameters unchanged, EGNN is trained with $c _ { \mathrm { m a x } } / c _ { \mathrm { m i n } } \quad = \quad 0 . 4 / 0 . 1 5$ and $c _ { \mathrm { m a x } } / c _ { \mathrm { m i n } } ~ = ~ 0 . 4 / 0 . 1 1$ in Cora and Pubmed, respectively. We only plot and
|
| 194 |
+
|
| 195 |
+

|
| 196 |
+
Figure 1: Dirichelet energy variation with layers in Cora (Left) and Pubmed (Right). The upper and lower denotes the energy limits.
|
| 197 |
+
|
| 198 |
+
compare with the baseline approaches of GCN and GCNII due to space limit. For other methods, the Dirichlet energy is either close to zero or overly large due to the over-smoothing issue or over-separating issue of node embeddings, respectively.
|
| 199 |
+
|
| 200 |
+
It is shown that the Dirichlet energies of EGNN are strictly constrained within the range determined by the lower and upper limits of the constrained learning. Due to the over-smoothing issue in GCN, all the node embeddings converge to zero vectors. GCNII has comparable or smaller Dirichlet energy by carefully and explicitly designing both the initial connection and identity mapping strengths. In contrast, our EGNN only gives the appropriate limits of Dirichlet energy, and let the model learn the optimal energy at each layer for a specific task. The following hyperparameter studies will show that the values of $c _ { \mathrm { m i n } }$ and $c _ { \mathrm { m a x } }$ could be easily selected from a large appropriate range.
|
| 201 |
+
|
| 202 |
+
Table 2: Ablation studies on weight initialization, lower limit $c _ { \mathrm { m i n } }$ and activation function of EGNN.
|
| 203 |
+
|
| 204 |
+
<table><tr><td rowspan="2">Component</td><td rowspan="2">Type</td><td colspan="3">Cora</td><td colspan="2">Pubmed</td><td colspan="2">Coauthors-Physics|</td><td colspan="3">Ogbn-arxiv</td></tr><tr><td>2</td><td>16</td><td>64 2</td><td>16</td><td>64 2</td><td>16</td><td>32</td><td>2</td><td>16</td><td>32</td></tr><tr><td>Weight</td><td>Glorot</td><td>77.8</td><td>40.2</td><td>23.6</td><td>68.4 62.6</td><td>60.2</td><td>92.6 81.7</td><td>73.4</td><td></td><td>68.472.8</td><td>72.7</td></tr><tr><td rowspan="3">initialization Lower limit setting</td><td>Orthogonal</td><td>83.2</td><td>85.4</td><td>85.7</td><td>79.2 80.0 80.1</td><td></td><td>92.6 93.1</td><td>93.3</td><td></td><td>68.4 72.7 72.7</td><td></td></tr><tr><td>0.</td><td>83.6</td><td>68.6</td><td>12.9</td><td>78.9 77.1</td><td>44.1</td><td>92.8 91.4</td><td>79.7</td><td>70.9</td><td>69.4</td><td>62.4</td></tr><tr><td>0.1~ 0.75</td><td>83.2</td><td>85.4</td><td>85.7</td><td>79.2 80.0 80.1</td><td></td><td>92.6 93.1</td><td>93.3</td><td>68.4</td><td>72.7 72.7</td><td></td></tr><tr><td rowspan="3">Cmin Activation</td><td>0.95</td><td>65.4</td><td>72.0</td><td>71.5</td><td>74.0 75.3</td><td>75.7</td><td>89.4 90.4</td><td>90.5</td><td>56.5</td><td>66.869.5</td><td></td></tr><tr><td>Linear</td><td>83.1</td><td>85.6 85.5</td><td></td><td>79.2 79.9</td><td>79.9</td><td>92.6 93.1</td><td>93.1</td><td></td><td>64.872.5</td><td>71.0</td></tr><tr><td>SReLU</td><td>83.2</td><td>85.4</td><td>85.7</td><td>79.2 80.0 80.1</td><td></td><td>92.6 93.1</td><td>93.3</td><td>68.4</td><td>72.7 72.7</td><td></td></tr><tr><td rowspan="2"></td><td>ReLU</td><td>83.1</td><td>85.2</td><td>85.0</td><td>79.1 79.7 79.9</td><td></td><td>92.6 93.1</td><td>93.1</td><td></td><td>68.6 72.4 72.4</td><td></td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
|
| 205 |
+
|
| 206 |
+

|
| 207 |
+
Figure 2: The impacts of hyperparameters $b$ , $\gamma$ , $c _ { \mathrm { m i n } }$ and $c _ { \mathrm { m a x } }$ on 64-layer EGNN trained in Cora. Y-axis is test accuracy in percent.
|
| 208 |
+
|
| 209 |
+
Ablation studies of EGNN components. To demonstrate how each component affects the training of graph neural architecture and answer research question Q3, we perform the ablation experiments with EGNN on all the datasets. For the component of orthogonal weight initialization and regularization, we compare and replace them with the traditional Glorot initialization and Frobenius norm regularization as shown in Eq. (6). Considering the component of lower-bounded residual connection, we vary the lower limit hyperparameter $c _ { \mathrm { m i n } }$ from 0, $0 . 1 \sim 0 . 7 5$ and 0.95. Within the range of $0 . 1 \sim 0 . 7 5$ , the adoption of specific values is specified for each dataset in Appendix. The component of the activation function is studied from candidates of linear identity activation, SReLU, and ReLU. Table 2 reports the results of the above ablation studies.
|
| 210 |
+
|
| 211 |
+
The orthogonal weight initialization and regularization are crucial to train the deep graph neural architecture. In Cora, Pubmed, and Coauthor-Physics, Glorot initialization and Frobenius norm regularization fail to control the singular values of trainable weights, which may lead to overly large or small Dirichlet energy and affect the node classification performance. In Ogbn-arxiv, the input node features are described by dense word embeddings of a paper [56], where the trainable weights in GNN are required to capture data statistics and optimize the classification task. EGNN applies a small loss hyperparameter $\gamma$ of $1 0 ^ { - 4 }$ to let the model adapt to the given task, which is equivalent to the traditional regularization. Therefore, the two approaches have comparable performances.
|
| 212 |
+
|
| 213 |
+
An appropriate lower limit could enable the deep EGNN. While the Dirichlet energy may approach zero without the residual connection, the overwhelming residual information with $c _ { \operatorname* { m i n } } = 0 . 9 5$ prevents the higher layer from learning the new neighborhood information. Within the large and appropriate range of [0.1, 0.75], $c _ { \mathrm { m i n } }$ could be easily selected to achieve superior performance.
|
| 214 |
+
|
| 215 |
+
Activation SReLU performs slightly better than the linear identity activation and ReLU. This is because SReLU could automatically learn the trade-off between linear and non-linear activations, which prevents the significant dropping of Dirichlet energy and ensures the model learning ability.
|
| 216 |
+
|
| 217 |
+
Hyperparameter analysis. To understand the hyperparameter impacts on a 64-layer EGNN and answer research question Q4, we conduct experiments with different values of initial shift $b$ , loss factor $\gamma$ , lower limit factor $c _ { \mathrm { m i n } }$ and upper one $c _ { \mathrm { m a x } }$ . We present the hyperparameter study in Figure 2 for Cora, and show the others with similar tendencies in Appendix.
|
| 218 |
+
|
| 219 |
+
We observe that our method is not sensitive to the choices of $b$ , $\gamma$ , $c _ { \mathrm { m i n } }$ and $c _ { \mathrm { m a x } }$ in a wide range: (i) The initial shift value should be $b \leq 0$ , in order to avoid the overly nonlinear mapping and Dirichlet energy damage. (ii) It is shown that EGNN approximates the optimal performance once the loss factor $\gamma$ is larger than a specific threshold. The thresholds are 0.3 in Cora, 0.1 in Pubmed and Coauthor-Physics, and 1es-4 in Ogbn-arxiv, respectively. The threshold depends on the specific dataset: while a larger potentially works in the small dataset to strictly regularize Dirichlet energy, a smaller one would be preferred for the large dataset to capture the complex data manifold. (iii) $c _ { \mathrm { m i n } }$ within the appropriate range [0.1, 0.75] allows the model to expand neighborhood size and preserve residual information to avoid the over-smoothing. (iv) As shown in Figure 1, since energy $E ( X ^ { ( k ) } )$ at the hidden layer is much smaller than $E ( X ^ { ( 0 ) } )$ from the input layer, we could easily satisfy the upper limit with $c _ { \mathrm { m a x } }$ in a large range [0.2, 1]. Given these large hyperparameter ranges, EGNN could be easily trained with deep layers.
|
| 220 |
+
|
| 221 |
+
# 6 Conclusions
|
| 222 |
+
|
| 223 |
+
In this paper, we propose a Dirichlet energy constrained learning principle to show the importance of regularizing the Dirichlet energy at each layer within reasonable lower and upper limits. Such energy constraint is theoretically proved to help avoid the over-smoothing and over-separating issues. We then design EGNN based on our theoretical results and empirically demonstrate that the constrained learning plays a key role in guiding the design and training of deep graph neural architecture. The detailed analysis is presented to illustrate how our principle connects and combines the previous deep methods. The experiments on benchmarks show that EGNN could be easily trained to achieve superior node classification performances with deep layer stacking. We believe that the constrained learning principle will help discover deeper and more powerful GNNs in the future.
|
| 224 |
+
|
| 225 |
+
# References
|
| 226 |
+
|
| 227 |
+
[1] Yujia Li, Daniel Tarlow, Marc Brockschmidt, and Richard Zemel. Gated graph sequence neural networks. arXiv preprint arXiv:1511.05493, 2015.
|
| 228 |
+
[2] Rex Ying, Ruining He, Kaifeng Chen, Pong Eksombatchai, William L Hamilton, and Jure Leskovec. Graph convolutional neural networks for web-scale recommender systems. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 974–983, 2018.
|
| 229 |
+
[3] Xiao Huang, Qingquan Song, Yuening Li, and Xia Hu. Graph recurrent networks with attributed random walks. In Proceedings of the 25th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 732–740, 2019.
|
| 230 |
+
[4] Wenqi Fan, Yao Ma, Qing Li, Yuan He, Eric Zhao, Jiliang Tang, and Dawei Yin. Graph neural networks for social recommendation. In The World Wide Web Conference, pages 417–426, 2019.
|
| 231 |
+
[5] Hongyang Gao, Zhengyang Wang, and Shuiwang Ji. Large-scale learnable graph convolutional networks. In Proceedings of the 24th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 1416–1424, 2018.
|
| 232 |
+
[6] Hongyang Gao and Shuiwang Ji. Graph u-nets. In international conference on machine learning, pages 2083–2092. PMLR, 2019.
|
| 233 |
+
[7] Kaixiong Zhou, Qingquan Song, Xiao Huang, and Xia Hu. Auto-gnn: Neural architecture search of graph neural networks. arXiv preprint arXiv:1909.03184, 2019.
|
| 234 |
+
[8] Justin Gilmer, Samuel S Schoenholz, Patrick F Riley, Oriol Vinyals, and George E Dahl. Neural message passing for quantum chemistry. In Proceedings of the 34th International Conference on Machine Learning-Volume 70, pages 1263–1272. JMLR. org, 2017.
|
| 235 |
+
[9] Marinka Zitnik and Jure Leskovec. Predicting multicellular function through multi-layer tissue networks. Bioinformatics, 33(14):i190–i198, 2017.
|
| 236 |
+
[10] Federico Monti, Michael M Bronstein, and Xavier Bresson. Geometric matrix completion with recurrent multi-graph neural networks. arXiv preprint arXiv:1704.06803, 2017.
|
| 237 |
+
[11] Kaixiong Zhou, Qingquan Song, Xiao Huang, Daochen Zha, Na Zou, and Xia Hu. Multi-channel graph neural networks. arXiv preprint arXiv:1912.08306, 2019.
|
| 238 |
+
[12] Will Hamilton, Zhitao Ying, and Jure Leskovec. Inductive representation learning on large graphs. In NeuIPS, pages 1024–1034, 2017.
|
| 239 |
+
[13] Petar Velickovic, Guillem Cucurull, Arantxa Casanova, Adriana Romero, Pietro Lio, and Yoshua Bengio. Graph attention networks. arXiv, 1(2), 2017.
|
| 240 |
+
[14] Keyulu Xu, Weihua Hu, Jure Leskovec, and Stefanie Jegelka. How powerful are graph neural networks? arXiv preprint arXiv:1810.00826, 2018.
|
| 241 |
+
[15] Thomas N Kipf and Max Welling. Semi-supervised classification with graph convolutional networks. ICLR, 2017.
|
| 242 |
+
[16] Qimai Li, Zhichao Han, and Xiao-Ming Wu. Deeper insights into graph convolutional networks for semi-supervised learning. In Thirty-Second AAAI Conference on Artificial Intelligence, 2018.
|
| 243 |
+
[17] Kenta Oono and Taiji Suzuki. Graph neural networks exponentially lose expressive power for node classification. In International Conference on Learning Representations, 2020.
|
| 244 |
+
[18] Hoang NT and Takanori Maehara. Revisiting graph neural networks: All we have is low-pass filters. arXiv preprint arXiv:1905.09550, 2019.
|
| 245 |
+
[19] Deli Chen, Yankai Lin, Wei Li, Peng Li, Jie Zhou, and Xu Sun. Measuring and relieving the over-smoothing problem for graph neural networks from the topological view. arXiv preprint arXiv:1909.03211, 2019.
|
| 246 |
+
[20] Uri Alon and Eran Yahav. On the bottleneck of graph neural networks and its practical implications. arXiv preprint arXiv:2006.05205, 2020.
|
| 247 |
+
[21] Eli Chien, Jianhao Peng, Pan Li, and Olgica Milenkovic. Adaptive universal generalized pagerank graph neural network. In International Conference on Learning Representations. https://openreview. net/forum, 2021.
|
| 248 |
+
[22] Wenbing Huang, Yu Rong, Tingyang Xu, Fuchun Sun, and Junzhou Huang. Tackling oversmoothing for general graph convolutional networks. arXiv e-prints, pages arXiv–2008, 2020.
|
| 249 |
+
[23] Lingxiao Zhao and Leman Akoglu. Pairnorm: Tackling oversmoothing in gnns. arXiv preprint arXiv:1909.12223, 2019.
|
| 250 |
+
[24] Kaixiong Zhou, Xiao Huang, Yuening Li, Daochen Zha, Rui Chen, and Xia Hu. Towards deeper graph neural networks with differentiable group normalization. Advances in Neural Information Processing Systems, 33, 2020.
|
| 251 |
+
[25] Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. ICML, 2015.
|
| 252 |
+
[26] Guohao Li, Matthias Muller, Ali Thabet, and Bernard Ghanem. Deepgcns: Can gcns go as deep as cnns? In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 9267–9276, 2019.
|
| 253 |
+
[27] Keyulu Xu, Chengtao Li, Yonglong Tian, Tomohiro Sonobe, Ken-ichi Kawarabayashi, and Stefanie Jegelka. Representation learning on graphs with jumping knowledge networks. In International Conference on Machine Learning, pages 5453–5462. PMLR, 2018.
|
| 254 |
+
[28] Ming Chen, Zhewei Wei, Zengfeng Huang, Bolin Ding, and Yaliang Li. Simple and deep graph convolutional networks. arXiv preprint arXiv:2007.02133, 2020.
|
| 255 |
+
[29] Yu Rong, Wenbing Huang, Tingyang Xu, and Junzhou Huang. Dropedge: Towards deep graph convolutional networks on node classification. In International Conference on Learning Representations. https://openreview. net/forum, 2020.
|
| 256 |
+
[30] Wenzheng Feng, Jie Zhang, Yuxiao Dong, Yu Han, Huanbo Luan, Qian Xu, Qiang Yang, Evgeny Kharlamov, and Jie Tang. Graph random neural networks for semi-supervised learning on graphs. Advances in Neural Information Processing Systems, 33, 2020.
|
| 257 |
+
[31] Arman Hasanzadeh, Ehsan Hajiramezanali, Shahin Boluki, Mingyuan Zhou, Nick Duffield, Krishna Narayanan, and Xiaoning Qian. Bayesian graph neural networks with adaptive connection sampling. In International Conference on Machine Learning, pages 4094–4104. PMLR, 2020.
|
| 258 |
+
[32] Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In CVPR, pages 770–778, 2016.
|
| 259 |
+
[33] Chen Cai and Yusu Wang. A note on over-smoothing for graph neural networks. arXiv preprint arXiv:2006.13318, 2020.
|
| 260 |
+
[34] Muhan Zhang and Yixin Chen. Link prediction based on graph neural networks. arXiv preprint arXiv:1802.09691, 2018.
|
| 261 |
+
[35] Xavier Glorot and Yoshua Bengio. Understanding the difficulty of training deep feedforward neural networks. In Proceedings of the thirteenth international conference on artificial intelligence and statistics, pages 249–256, 2010.
|
| 262 |
+
[36] Chenhui Deng, Zhiqiang Zhao, Yongyu Wang, Zhiru Zhang, and Zhuo Feng. Graphzoom: A multi-level spectral approach for accurate and scalable graph embedding. arXiv preprint arXiv:1910.02370, 2019.
|
| 263 |
+
[37] Yu Chen, Lingfei Wu, and Mohammed Zaki. Iterative deep graph learning for graph neural networks: Better and robust node embeddings. Advances in Neural Information Processing Systems, 33, 2020.
|
| 264 |
+
[38] Mikhail Belkin and Partha Niyogi. Laplacian eigenmaps and spectral techniques for embedding and clustering. In Nips, volume 14, pages 585–591, 2001.
|
| 265 |
+
[39] Quoc V Le, Navdeep Jaitly, and Geoffrey E Hinton. A simple way to initialize recurrent networks of rectified linear units. arXiv preprint arXiv:1504.00941, 2015.
|
| 266 |
+
[40] Asher Trockman and J Zico Kolter. Orthogonalizing convolutional layers with the cayley transform. arXiv preprint arXiv:2104.07167, 2021.
|
| 267 |
+
[41] Lei Huang, Li Liu, Fan Zhu, Diwen Wan, Zehuan Yuan, Bo Li, and Ling Shao. Controllable orthogonalization in training dnns. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 6429–6438, 2020.
|
| 268 |
+
[42] Jeffrey Pennington, Samuel S Schoenholz, and Surya Ganguli. Resurrecting the sigmoid in deep learning through dynamical isometry: theory and practice. In Proceedings of the 31st International Conference on Neural Information Processing Systems, pages 4788–4798, 2017.
|
| 269 |
+
[43] Paul Erdos and Alfréd Rényi. On the evolution of random graphs. ˝ Publ. Math. Inst. Hung. Acad. Sci, 5(1):17–60, 1960.
|
| 270 |
+
[44] Guohao Li, Chenxin Xiong, Ali Thabet, and Bernard Ghanem. Deepergcn: All you need to train deeper gcns. arXiv preprint arXiv:2006.07739, 2020.
|
| 271 |
+
[45] Felix Wu, Tianyi Zhang, Amauri Holanda de Souza Jr, Christopher Fifty, Tao Yu, and Kilian Q Weinberger. Simplifying graph convolutional networks. arXiv preprint arXiv:1902.07153, 2019.
|
| 272 |
+
[46] Sitao Xiang and Hao Li. On the effects of batch and weight normalization in generative adversarial networks. arXiv preprint arXiv:1704.03971, 2017.
|
| 273 |
+
[47] Haozhi Qi, Chong You, Xiaolong Wang, Yi Ma, and Jitendra Malik. Deep isometric learning for visual recognition. In International Conference on Machine Learning, pages 7824–7835. PMLR, 2020.
|
| 274 |
+
[48] Lei Chen, Le Wu, Richang Hong, Kun Zhang, and Meng Wang. Revisiting graph based collaborative filtering: A linear residual graph convolutional network approach. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 34, pages 27–34, 2020.
|
| 275 |
+
[49] Kuangqi Zhou, Yanfei Dong, Kaixin Wang, Wee Sun Lee, Bryan Hooi, Huan Xu, and Jiashi Feng. Understanding and resolving performance degradation in graph convolutional networks, 2020.
|
| 276 |
+
[50] Johannes Klicpera, Aleksandar Bojchevski, and Stephan Günnemann. Predict then propagate: Graph neural networks meet personalized pagerank. arXiv preprint arXiv:1810.05997, 2018.
|
| 277 |
+
[51] Meng Liu, Hongyang Gao, and Shuiwang Ji. Towards deeper graph neural networks. In Proceedings of the 26th ACM SIGKDD International Conference on Knowledge Discovery & Data Mining, pages 338–348, 2020.
|
| 278 |
+
[52] Zhilin Yang, William W Cohen, and Ruslan Salakhutdinov. Revisiting semi-supervised learning with graph embeddings. arXiv preprint arXiv:1603.08861, 2016.
|
| 279 |
+
[53] Oleksandr Shchur, Maximilian Mumme, Aleksandar Bojchevski, and Stephan Günnemann. Pitfalls of graph neural network evaluation. arXiv preprint arXiv:1811.05868, 2018.
|
| 280 |
+
[54] Weihua Hu, Matthias Fey, Marinka Zitnik, Yuxiao Dong, Hongyu Ren, Bowen Liu, Michele Catasta, and Jure Leskovec. Open graph benchmark: Datasets for machine learning on graphs. arXiv preprint arXiv:2005.00687, 2020.
|
| 281 |
+
[55] Matthias Fey and Jan E. Lenssen. Fast graph representation learning with PyTorch Geometric. In ICLR Workshop, 2019.
|
| 282 |
+
[56] Tomas Mikolov, Ilya Sutskever, Kai Chen, Greg Corrado, and Jeffrey Dean. Distributed representations of words and phrases and their compositionality. arXiv preprint arXiv:1310.4546, 2013.
|
md/train/6nbpPqUCIi7/6nbpPqUCIi7.md
ADDED
|
@@ -0,0 +1,324 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Argmax Flows and Multinomial Diffusion: Learning Categorical Distributions
|
| 2 |
+
|
| 3 |
+
Emiel Hoogeboom1⇤, Didrik Nielsen2⇤, Priyank Jaini1, Patrick Forré3, Max Welling1
|
| 4 |
+
|
| 5 |
+
UvA-Bosch Delta Lab, University of Amsterdam1, Technical University of Denmark2, University of Amsterdam3 didni@dtu.dk, e.hoogeboom@uva.nl, p.jaini@uva.nl, p.d.forre@uva.nl, m.welling@uva.nl
|
| 6 |
+
|
| 7 |
+
# Abstract
|
| 8 |
+
|
| 9 |
+
Generative flows and diffusion models have been predominantly trained on ordinal data, for example natural images. This paper introduces two extensions of flows and diffusion for categorical data such as language or image segmentation: Argmax Flows and Multinomial Diffusion. Argmax Flows are defined by a composition of a continuous distribution (such as a normalizing flow), and an argmax function. To optimize this model, we learn a probabilistic inverse for the argmax that lifts the categorical data to a continuous space. Multinomial Diffusion gradually adds categorical noise in a diffusion process, for which the generative denoising process is learned. We demonstrate that our method outperforms existing dequantization approaches on text modelling and modelling on image segmentation maps in log-likelihood.
|
| 10 |
+
|
| 11 |
+
# 1 Introduction
|
| 12 |
+
|
| 13 |
+
Many sources of high-dimensional data are categorical, for example language and image segmentation. Although natural images have been studied to a large extent with generative flows and diffusion models, categorical data has not had the same extensive treatment. Currently they are primarily modelled by autoregressive models, which are expensive to sample from (Cooijmans et al., 2017; Dai et al., 2019).
|
| 14 |
+
|
| 15 |
+
Normalizing flows are attractive because they can be designed to be fast both in the evaluation and sampling direction. Typically, normalizing flows model continuous distributions. As a result, directly optimizing a flow on discrete data may lead to arbitrarily high likelihoods. In literature this problem is resolved for ordinal data by adding noise in a unit interval around the dis(a) Argmax Flow: Composition of a flow $p ( v )$ and argmax transformation which gives the model $P ( { \pmb x } )$ . The flow maps from a base distribution $p ( z )$ using a bijection $g$ .
|
| 16 |
+
|
| 17 |
+

|
| 18 |
+
|
| 19 |
+

|
| 20 |
+
Figure 1: Overview of generative models.
|
| 21 |
+
|
| 22 |
+
(b) Multinomial Diffusion: Each step $p ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } )$ denoises the signal starting from a uniform categorical base distribution which gives the model $p ( \pmb { x } _ { 0 } )$ .
|
| 23 |
+
|
| 24 |
+
crete value (Uria et al., 2013; Theis et al., 2016; Ho et al., 2019). However, because these methods have been designed for ordinal data, they do not work well on categorical data.
|
| 25 |
+
|
| 26 |
+
Other attractive generative models are diffusion models (Sohl-Dickstein et al., 2015), which are fast to train due to an objective that decomposes over time steps (Ho et al., 2020). Diffusion models typically have a fixed diffusion process that gradually adds noise. This process is complemented by a learnable generative process that denoises the signal. Song et al. (2020); Nichol and Dhariwal (2021) have shown that diffusion models can also be designed for fast sampling. Thus far, diffusion models have been primarily trained to learn ordinal data distributions, such as natural images.
|
| 27 |
+
|
| 28 |
+
Table 1: Surjective flow layers for applying continuous flow models to discrete data. The layers are deterministic in the generative direction, but stochastic in the inference direction. Rounding corresponds to the commonly-used dequantization for ordinal data.
|
| 29 |
+
|
| 30 |
+
<table><tr><td>Layer</td><td>Generation</td><td>Inference</td><td>Applications</td></tr><tr><td>Rounding</td><td>x= [u]</td><td>U ~ q(u|x) with support S(x)={ulac =[u]}</td><td>Ordinal Data e.g. images,audio</td></tr><tr><td>Argmax</td><td>x= arg maxv</td><td>v ~q(vlx)with support S(x)= {ulx = arg max v}</td><td>Categorical Data e.g. text, segmentation</td></tr></table>
|
| 31 |
+
|
| 32 |
+
Therefore, in this paper we introduce extensions of flows and diffusion models for categorical variables (depicted in Figure 1): i) Argmax Flows bridge the gap between categorical data and continuous normalizing flows using an argmax transformation and a corresponding family of probabilistic inverses for the argmax. In addition $i i$ ) we introduce Multinomial Diffusion, which is a diffusion model directly defined on categorical variables. Opposed to normalizing flows, defining diffusion for discrete variables directly does not require gradient approximations, because the diffusion trajectory is fixed. As a result of our work, generative normalizing flows and diffusion models can directly learn categorical data.
|
| 33 |
+
|
| 34 |
+
# 2 Background
|
| 35 |
+
|
| 36 |
+
Normalizing Flows Given $\nu = \mathbb { R } ^ { d }$ and $\mathcal { Z } = \mathbb { R } ^ { d }$ with densities $p _ { V }$ and $p _ { Z }$ respectively, normalizing flows $\underline { { \mathbb { R } } }$ ezende and Mohamed, $\boxed { 2 0 1 5 }$ learn a bijective and differentiable transformation $g : { \mathcal { Z } } \mathcal { V }$ such that the change-of-variables formula gives the density at any point $\pmb { v } \in \mathcal { V }$ :
|
| 37 |
+
|
| 38 |
+
$$
|
| 39 |
+
p _ { V } ( \pmb { v } ) = p _ { Z } ( \pmb { z } ) \cdot \left| \operatorname* { d e t } \frac { \mathrm { d } \pmb { z } } { \mathrm { d } \pmb { v } } \right| , \qquad \pmb { v } = g ( \pmb { z } ) ,
|
| 40 |
+
$$
|
| 41 |
+
|
| 42 |
+
where $p _ { Z }$ can be any density (usually chosen as a standard Gaussian). Thus, normalizing flows provide a powerful framework to learn exact density functions. However, Equation $( 1 )$ is restricted to continuous densities.
|
| 43 |
+
|
| 44 |
+
To learn densities on ordinal discrete data (such as natural images), typically dequantization noise is added (Uria et al., 2013; Theis et al., 2016; Ho et al., 2019). Nielsen et al. (2020) reinterpreted dequantization as a surjective flow layer ${ \boldsymbol { v } } \mapsto { \boldsymbol { x } }$ that is deterministic in one direction $\mathbf { \bar { \boldsymbol { x } } } = \mathsf { r o u n d } ( \pmb { v } ) )$ ) and stochastic in the other ${ \pmb v } = { \pmb x } + { \pmb u }$ where ${ \pmb u } \sim q ( { \pmb u } | { \pmb x } ) )$ . Using this interpretation, dequantization can be seen as a probabilistic right-inverse for the rounding operation in the latent variable model given by:
|
| 45 |
+
|
| 46 |
+
$$
|
| 47 |
+
P ( \pmb { x } ) = \int P ( \pmb { x } | \pmb { v } ) p ( \pmb { v } ) \mathrm { d } \pmb { v } , \quad P ( \pmb { x } | \pmb { v } ) = \delta \big ( \pmb { x } = \mathsf { r o u n d } ( \pmb { v } ) \big ) ,
|
| 48 |
+
$$
|
| 49 |
+
|
| 50 |
+
where round is applied elementwise. In this case, the density model $p ( v )$ is modeled using a normalizing flow. Learning proceeds by introducing the variational distribution $q ( { \pmb v } | { \pmb x } )$ that models the probabilistic right-inverse for the rounding surjection and optimizing the evidence lower bound (ELBO):
|
| 51 |
+
|
| 52 |
+
$$
|
| 53 |
+
\begin{array} { r } { \log P ( \pmb { x } ) \geq \mathbb { E } _ { \pmb { v } \sim q ( \pmb { v } | \mathbf { x } ) } \left[ \log P ( \pmb { x } | \pmb { v } ) + \log p ( \pmb { v } ) - \log q ( \pmb { v } | \pmb { x } ) \right] = \mathbb { E } _ { \pmb { v } \sim q ( \pmb { v } | \mathbf { x } ) } \left[ \log p ( \pmb { v } ) - \log q ( \pmb { v } | \pmb { x } ) \right] . } \end{array}
|
| 54 |
+
$$
|
| 55 |
+
|
| 56 |
+
The last equality holds under the constraint that the support of $q ( { \pmb v } | { \pmb x } )$ is enforced to be only over the region $S = \{ v \in \mathbb { R } ^ { d } : x = \mathsf { r o u n d } ( v ) \}$ which ensures that $P ( \pmb { x } | \pmb { v } ) = 1$ .
|
| 57 |
+
|
| 58 |
+
Diffusion Models Given data $\scriptstyle { \pmb x } _ { 0 }$ , a diffusion model (Sohl-Dickstein et al., $\boxed { 2 0 1 5 }$ consists of predefined variational distributions $q \big ( \mathbf { \boldsymbol { x } } _ { t } | \mathbf { \boldsymbol { x } } _ { t - 1 } \big )$ that gradually add noise over time steps $t \in \{ 1 , \ldots , T \}$ . The diffusion trajectory is defined such that $q \big ( \mathbf { \boldsymbol { x } } _ { t } | \mathbf { \boldsymbol { x } } _ { t - 1 } \big )$ adds a small amount of noise around ${ \mathbf { \mathcal { x } } } _ { t - 1 }$ . This way, information is gradually destroyed such that at the final time step, $\mathbfit { \mathbf { x } } _ { T }$ carries almost no information about $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ . Their generative counterparts consists of learnable distributions $p ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } )$ that learn to denoise the data. When the diffusion process adds sufficiently small amounts of noise, it
|
| 59 |
+
|
| 60 |
+
Input: $p ( v )$ Output: Sample $_ { \textbf { \em x } }$ Sample $\begin{array} { r } { \pmb { v } \sim p ( \pmb { v } ) } \end{array}$ Compute x = arg max v
|
| 61 |
+
|
| 62 |
+
Input: x, p(v), q(v|x)
|
| 63 |
+
Output: ELBO
|
| 64 |
+
Sample v ⇠ q(v|x)
|
| 65 |
+
Compute $\mathcal { L } = \log p ( \pmb { v } ) - \log q ( \pmb { v } | \pmb { x } )$
|
| 66 |
+
|
| 67 |
+
suffices to define the denoising trajectory using distributions that are factorized (without correlation) over the dimension axis. The distribution $p ( { \pmb x } _ { T } )$ is chosen to be similar to the distribution that the diffusion trajectory approaches. Diffusion models can be optimized using variational inference:
|
| 68 |
+
|
| 69 |
+
$$
|
| 70 |
+
\log P ( \pmb { x } _ { 0 } ) \ge \mathbb { E } _ { x _ { 1 } , \ldots x _ { T } \sim q } \Big [ \log p ( \pmb { x } _ { T } ) + \sum _ { t = 1 } ^ { T } \log \frac { p ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } ) } { q ( \pmb { x } _ { t } | \pmb { x } _ { t - 1 } ) } \Big ] .
|
| 71 |
+
$$
|
| 72 |
+
|
| 73 |
+
An important insight in diffusion is that by conditioning on $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ , the posterior probability $\begin{array} { r } { q ( { \pmb x } _ { t - 1 } | { \pmb x } _ { t } , { \pmb x } _ { 0 } ) _ { . } = \breve { q } ( { \pmb x } _ { t } | { \pmb x } _ { t - 1 } ) q ( { \pmb x } _ { t - 1 } | { \pmb x } _ { 0 } ) / q ( \breve { { \pmb x } _ { t } } | { \pmb x } _ { 0 } ) } \end{array}$ is tractable and straightforward to compute, permitting a reformulation in terms of KL divergences that has lower variance (Sohl-Dickstein et al., 2015). Note that $\mathrm { K L } \big ( q ( \pmb { x } _ { T } | \pmb { x } _ { 0 } ) | p ( \pmb { x } _ { T } ) \big ) \approx 0$ if the diffusion trajectory $q$ is defined well:
|
| 74 |
+
|
| 75 |
+
$$
|
| 76 |
+
\log P ( x _ { 0 } ) \geq \mathbb { E } _ { q } \left[ \log p ( x _ { 0 } | x _ { 1 } ) - \mathrm { K L } \big ( q ( x _ { T } | x _ { 0 } ) | p ( x _ { T } ) \big ) - \sum _ { t = 2 } ^ { T } \mathrm { K L } \big ( q ( x _ { t - 1 } | x _ { t } , x _ { 0 } ) | p ( x _ { t - 1 } | x _ { t } ) \big ) \right]
|
| 77 |
+
$$
|
| 78 |
+
|
| 79 |
+
# 3 Argmax Flows
|
| 80 |
+
|
| 81 |
+
Argmax flows define discrete distributions using 1) a density model $p ( v )$ , such as a normalizing flow, and 2) an argmax layer that maps the continuous $\pmb { v } \in \mathbb { R } ^ { D \times } \mathbf { \check { K } }$ to a discrete $\pmb { x } \in \{ 1 , 2 , . . . , K \} ^ { D }$ using
|
| 82 |
+
|
| 83 |
+
$$
|
| 84 |
+
\pmb { x } = \operatorname { a r g m a x } \pmb { v } \quad \mathrm { w h e r e } \quad x _ { d } = \arg \operatorname* { m a x } _ { k } v _ { d k } .
|
| 85 |
+
$$
|
| 86 |
+
|
| 87 |
+
This is a natural choice to model categorical variables, because it divides the entire continuous space of $\pmb { v }$ into symmetric partitions corresponding to categories in $_ { \textbf { \em x } }$ . To sample from an argmax flow sample $v \sim p ( v )$ and compute $\pmb { x } = \arg \operatorname* { m a x } \pmb { v }$ (Algorithm $\textcircled{1}$ . To generate reasonable samples, it is up to the density model $p ( v )$ to capture any complicated dependencies between the different dimensions. While sampling from an argmax flow is straightforward, the main difficulty lies in optimizing this generative model. To compute the likelihood of a datapoint $_ { \textbf { \em x } }$ , we have to compute
|
| 88 |
+
|
| 89 |
+
$$
|
| 90 |
+
P ( \pmb { x } ) = \int P ( \pmb { x } | \pmb { v } ) p ( \pmb { v } ) d \pmb { v } , P ( \pmb { x } | \pmb { v } ) = \delta \big ( \pmb { x } = \arg \operatorname* { m a x } ( \pmb { v } ) \big ) ,
|
| 91 |
+
$$
|
| 92 |
+
|
| 93 |
+
which is intractable. Consequently, we resort to variational inference and specify a variational distribution $q ( { \pmb v } | { \pmb x } )$ . We note that naïvely choosing any variational distribution may lead to samples ${ \pmb v } \sim { \pmb q } ( { \pmb v } | { \pmb x } )$ where $\delta ( { \pmb x } = \arg \operatorname* { m a x } { \pmb v } ) = 0$ , which yields an ELBO of negative infinity. To avoid this, we need a variational distribution $q ( { \pmb v } | { \pmb x } )$ that satisfies what we term the argmax constraint:
|
| 94 |
+
|
| 95 |
+
$$
|
| 96 |
+
\mathbf { \Psi } \mathbf { x } = \arg \operatorname* { m a x } \pmb { v } \quad \mathrm { f o r ~ a l l } \quad \pmb { v } \sim q ( \pmb { v } | \mathbf { x } ) .
|
| 97 |
+
$$
|
| 98 |
+
|
| 99 |
+
That is, the variational distribution $q ( { \pmb v } | { \pmb x } )$ should have support limited to ${ \cal S } ( { \pmb x } ) = \{ { \pmb v } \in \partial \pmb { \Sigma }$ $\mathbb { R } ^ { D \times K } \mathrm { ~ ~ : ~ } { \pmb x } = \arg \operatorname* { m a x } { \pmb v } \}$ . Recall that under this condition, the ELBO simplifies to $\mathbb { E } _ { { \pmb v } \sim { \ b q } ( { \pmb v } | { \pmb x } ) } \left[ \log p ( { \pmb v } ) - \log q ( { \pmb v } | { \pmb x } ) \right]$ , as shown in Algorithm $\bigstar$ For an illustration of the method see Figure 1a.
|
| 100 |
+
|
| 101 |
+
# 3.1 Probabilistic Inverse
|
| 102 |
+
|
| 103 |
+
The argmax layer may be viewed as a surjective flow layer (Nielsen et al., 2020). With this view, the variational distribution $q ( { \pmb v } | { \pmb x } )$ specifies a distribution over the possible right-inverses of the argmax function, also known as a stochastic inverse or probabilistic inverse. Recall that the commonly-used dequantization layer for ordinal data corresponds to the probabilistic inverse of a rounding operation. As summarized in Table 1, this layer may thus be viewed as analogous to the argmax layer, where the round is for ordinal data while the argmax is for categorical data.
|
| 104 |
+
|
| 105 |
+
We are free to specify any variational distribution $q ( { \pmb v } | { \pmb x } )$ that satisfies the argmax constraint. In the next paragraphs we outline three possible approaches. Since operations are performed independently across dimensions, we omit the dimension axis and let $\pmb { v } \in \mathbb { R } ^ { \mathbf { \hat { K } } }$ and $x \in \{ \bar { 1 } , \ldots , K \}$ .
|
| 106 |
+
|
| 107 |
+
# Algorithm 4 Gumbel-based $q ( { \pmb v } | { \pmb x } )$
|
| 108 |
+
|
| 109 |
+
Algorithm 3 Thresholding-based $q ( { \pmb v } | { \pmb x } )$
|
| 110 |
+
|
| 111 |
+
<table><tr><td>Input: x, q(u|x) Output: v, log q(v|x)</td></tr><tr><td>u~ q(ulx)</td></tr><tr><td>Ux=ux</td></tr><tr><td>V-x = threshold(u-x,x) log q(vlx) = logq(ulx) -log|det dv/ dul</td></tr></table>
|
| 112 |
+
|
| 113 |
+
<table><tr><td>Input: x,Φ Output: v,log q(v|x)</td></tr><tr><td>max = log∑i expi</td></tr><tr><td>Ux~ Gumbel(Φmax)</td></tr><tr><td></td></tr><tr><td>U-x ~ TruncGumbel(Φ-x,Ux) log q(vlx) = log Gumbel(vxlΦmax)</td></tr></table>
|
| 114 |
+
|
| 115 |
+
Thresholding $\left( \mathbf { A l g . } | \overline { { 3 } } \right)$ . A straightforward method to construct a distribution $q ( \pmb { v } | \boldsymbol { x } )$ satisfying the argmax constraint is to use thresholding. That is, we first sample an unbounded variable $\bar { \mathbf { \ b { u } } } \in \mathbb { R } ^ { K }$ from $q ( { \pmb u } | { \boldsymbol x } )$ , which can be for example a conditional Gaussian or normalizing flow. Next, we map $\textbf { \em u }$ to $\pmb { v }$ such that element $x$ is the largest:
|
| 116 |
+
|
| 117 |
+
$$
|
| 118 |
+
v _ { x } = u _ { x } \mathrm { a n d } v _ { - x } = \mathrm { t h r e s h o l d } _ { T } ( \mathbf { u } _ { - x } )
|
| 119 |
+
$$
|
| 120 |
+
|
| 121 |
+
where the thresholding is applied elementwise with threshold value $T = v _ { x }$ . This ensures that element $v _ { x }$ is the largest, and consequently that $q ( \pmb { v } | \boldsymbol { x } )$ satisfies the argmax constraint. Note that we require the threshold function to be bijective, thre $\mathrm { s h o l d } _ { T } : \mathbb { R } \overline { { ( - \infty , T ) } }$ , so that we can use the change-of-variables formula to compute $\log q ( { \pmb v } | { \pmb x } )$ . In our implementation, thresholding is implemented using a softplus such that all values are mapped below a limit $T$ :
|
| 122 |
+
|
| 123 |
+
$$
|
| 124 |
+
v = \mathrm { t h r e s h o l d } _ { T } ( u ) = T - \mathrm { s o f t p l u s } ( T - u ) ,
|
| 125 |
+
$$
|
| 126 |
+
|
| 127 |
+
where soft $\operatorname { \mathrm { \lambda } } \operatorname { \mathrm { ) } } \operatorname { \mathrm { l u s } } ( z ) = \log ( 1 + e ^ { z } )$ and for which it is guaranteed that $v \in ( - \infty , T )$ .
|
| 128 |
+
|
| 129 |
+
Gumbel (Alg. $^ { 4 ) }$ . An alternative approach is to let $q ( { \pmb v } | x ) \ = \ \mathrm { G u m b e l } ( { \pmb v } | \phi )$ restricted to arg max $v = x$ , where the location parameters $\phi \mathrm { N N } ( { \boldsymbol { x } } )$ are predicted using a neural network NN. The Gumbel distribution has favourable properties: The arg max and max are independent and the max is also distributed as a Gumbel:
|
| 130 |
+
|
| 131 |
+
$$
|
| 132 |
+
\operatorname* { m a x } _ { i } v _ { i } \sim \mathrm { G u m b e l } ( \phi _ { \mathrm { m a x } } ) ,
|
| 133 |
+
$$
|
| 134 |
+
|
| 135 |
+
where $\begin{array} { r } { \underline { { \phi _ { \operatorname* { m a x } } } } = \log \sum _ { i } \exp \phi _ { i } } \end{array}$ . For a more extensive introduction see $\mathrm { ( \underline { { M a d d i s o n \ e t { \ a l . } } } ) } \big [ \underline { { 2 0 1 } } \underline { { 4 } } \big \} \big [ \mathrm { K o o l } \big ]$ et al., $\boxed { 2 0 1 9 }$ . To sample $\pmb { v } \sim q ( \pmb { v } | \boldsymbol { x } )$ , we thus first sample the maximum $v _ { x }$ according to Eq. 8. Next, given the sample $v _ { x }$ , the remaining values can be sampled using truncated Gumbel distributions:
|
| 136 |
+
|
| 137 |
+
$$
|
| 138 |
+
v _ { i } \sim \mathrm { T r u n c { G u m b e l } } ( \phi _ { i } ; T ) \ \mathrm { w h e r e } \ i \not = x
|
| 139 |
+
$$
|
| 140 |
+
|
| 141 |
+
where the truncation value $T$ is given by $v _ { x }$ which ensures that the argmax constraint $v _ { x } > v _ { i }$ for $i \neq x$ is satisfied. Recall that to optimize Eq. 2 $\ ] \log q ( { \pmb v } | { \pmb x } )$ is also required, which can be computed using the closed-form expressions for the log density functions (see Table $\textcircled{5}$ . Another property of Gumbel distributions is that
|
| 142 |
+
|
| 143 |
+
$$
|
| 144 |
+
P ( \arg \operatorname* { m a x } { \pmb v } = i ) = \exp { \phi _ { i } / \sum _ { i } } \exp { \phi _ { i } } ,
|
| 145 |
+
$$
|
| 146 |
+
|
| 147 |
+
which we use to initialize the location parameters $\phi$ to match the empirical distribution of the first minibatch of the data.
|
| 148 |
+
|
| 149 |
+
Gumbel Thresholding. This method unifies the methods from the previous two sections: Gumbel distributions and thresholding. The key insight is that the Gumbel sampling procedures as defined above can be seen as a reparametrization of a uniform noise distribution $\bar { \boldsymbol { u } } ( 0 , 1 ) ^ { K }$ which is put through the inverse CDF of the Gumbel distributions (see Table 5). From the perspective of changeof-variables, the log likelihood denotes the log volume change of this transformation. To increase expressitivity the uniform distribution can be replaced by a normalizing flow $q ( { \pmb u } | { \boldsymbol x } )$ that has support on the interval $( 0 , 1 ) ^ { K }$ , which can be enforced using a sigmoid transformation. This section shows that a large collection of thresholding functions can be found by studying (truncated) inverse CDFs. In practice we find that performance is reasonably similar as long as the underlying noise $\textbf { \em u }$ is learned.
|
| 150 |
+
|
| 151 |
+
Behavior of the Variational Posterior Although several methods to learn $q$ have been proposed, it is unclear what expressitivity is required. In the following, the interactions between $q ( \pmb { v } | \bar { \pmb { x } } )$ and the density model $p ( v )$ are discussed. Recall that the variational bound that is optimized under expectation of a data distribution $\mathcal { D }$ can be seen as minimizing the KL distance between the aggregated posterior $q ( \pmb { v } ) = \mathbb { E } _ { \pmb { x } \sim \mathcal { D } } q ( \pmb { v } | \pmb { x } )$ and the density model $p ( v )$ , so $\mathrm { K L } ( q ( \pmb { v } ) | p ( \pmb { v } ) )$ . There are two distinct reasons which can cause this distance to be large: Firstly, the density model $p ( v )$ may not have the right probability mass in each argmax region. These desired probabilities solely depend on the data distribution $\mathcal { D }$ . Secondly, the variational posterior $q ( { \pmb v } | { \pmb x } )$ may not have the correct shape compared to $p ( v )$ , within an argmax region. At initialization, the thresholding within $q$ can create low density regions at argmax boundaries.
|
| 152 |
+
|
| 153 |
+
In theory, if $p ( v )$ is a universal density approximator, then the model can be fitted for any wellbehaved $q ( { \pmb v } | { \pmb x } )$ . Then $p ( v )$ can even fit the low density regions in the boundaries. This argument is trivial, as one can simply set $p ( v )$ to $q ( \pmb { v } ) = \mathbb { E } _ { \pmb { x } \sim \mathcal { D } } q ( \pmb { v } | \pmb { x } )$ . In practice, over training steps we find that $q$ does smooth out these boundary artifacts, and counteracts the thresholding so that the aggregated posterior becomes smoother.
|
| 154 |
+
|
| 155 |
+
# 3.2 Cartesian Products of Argmax Flows
|
| 156 |
+
|
| 157 |
+
In the current description, Argmax Flows require the same number of dimensions in $\textbf { { v } }$ as there are classes in $_ { \textbf { \em x } }$ . To alleviate this constraint we introduce Cartesian products of Argmax Flows. To illustrate our method, consider a 256 class problem. One class can be represented using a single number in $\{ 1 , \ldots , 2 5 6 \}$ , but also using two hexadecimal numbers $\{ 1 , \ldots , 1 \bar { 6 } \} ^ { 2 }$ or alternatively using eight binary numbers. Specifically, any base $K$ variable $\pmb { x } ^ { ( K ) } \in \{ 1 , \ldots , K \} ^ { D }$ can be converted to a base $M$ variable $\pmb { x } ^ { ( M ) } \in \{ 1 , \dots , M \} ^ { d _ { m } \times D }$ where $d _ { m } = \lceil \log _ { M } K \rceil$ . Then the variable ${ \pmb x } ^ { ( M ) }$ with dimensionality $M \cdot d _ { m } \cdot D$ represents the variable $\mathbf { \pmb { x } } ^ { ( K ) }$ with dimensionality $K \cdot D$ , trading off symmetry for dimensionality. Even though this may lead to some unused additional classes, the ELBO objective in Equation $\bigtriangledown$ can still be optimized using an $M$ -categorical Argmax Flow. Finally, note that Cartesian products of binary spaces are a special case where the variable can be encoded symmetrically into a single dimension to the positive and negative part using binary dequantization (Winkler et al., $\overline { { 2 0 1 9 } } )$ . In this case, by trading-off symmetry the dimensionality increases only proportional to $\overline { { \log _ { 2 } K } }$ .
|
| 158 |
+
|
| 159 |
+
# 4 Multinomial Diffusion
|
| 160 |
+
|
| 161 |
+
In this section we introduce an alternative likelihood-based model for categorical data: Multinomial Diffusion. In contrast with previous sections, $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ will be represented in one-hot encoded format ${ \pmb x } _ { t } \in \{ 0 , 1 \} ^ { K }$ . Specifically, for category $k$ , $x _ { k } = 1$ and $x _ { j } = 0$ for $j \neq k$ . Note that again the dimension axis is omitted for clarity as all distributions are independent over the dimension axis. We define the multinomial diffusion process using a categorical distribution that has a $\beta _ { t }$ chance of resampling a category uniformly:
|
| 162 |
+
|
| 163 |
+
$$
|
| 164 |
+
q ( \mathbf { x } _ { t } | \mathbf { x } _ { t - 1 } ) = \mathcal { C } ( \mathbf { x } _ { t } | ( 1 - \beta _ { t } ) \mathbf { x } _ { t - 1 } + \beta _ { t } / K ) ,
|
| 165 |
+
$$
|
| 166 |
+
|
| 167 |
+
where $\mathcal { C }$ denotes a categorical distribution with probability parameters after $\mid$ . Further addition (and subtraction) between scalars and vectors is done elementwise. This convention kept throughout this section. Since these distributions form a Markov chain, we can express the probability of any $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ given $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ as:
|
| 168 |
+
|
| 169 |
+
$$
|
| 170 |
+
q ( \pmb { x } _ { t } | \pmb { x } _ { 0 } ) = \mathcal { C } ( \pmb { x } _ { t } | \bar { \alpha } _ { t } \pmb { x } _ { 0 } + ( 1 - \bar { \alpha } _ { t } ) / K )
|
| 171 |
+
$$
|
| 172 |
+
|
| 173 |
+
where $\alpha _ { t } = 1 - \beta _ { t }$ and $\begin{array} { r } { \bar { \alpha } _ { t } = \prod _ { \tau = 1 } ^ { t } \alpha _ { \tau } } \end{array}$ . Intuïtively, for each next timestep, a little amount of uniform noise $\beta _ { t }$ over the $K$ classes is introduced, and with a large probability $( 1 - \beta _ { t } )$ the previous value ${ \mathbf { \mathcal { x } } } _ { t - 1 }$ is sampled. Using Equation 11 and $\boxed { 1 2 }$ the categorical posterior $q ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , \pmb { x } _ { 0 } )$ can be computed in closed-form:
|
| 174 |
+
|
| 175 |
+
$$
|
| 176 |
+
q ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , \pmb { x } _ { 0 } ) = \mathcal { C } ( \pmb { x } _ { t - 1 } | \pmb { \theta } _ { \mathrm { p o s t } } ( \pmb { x } _ { t } , \pmb { x } _ { 0 } ) ) , \mathrm { w h e r e } \theta _ { \mathrm { p o s t } } ( \pmb { x } _ { t } , \pmb { x } _ { 0 } ) = \tilde { \pmb { \theta } } / \sum _ { k = 1 } ^ { K } \tilde { \pmb { \theta } } _ { k }
|
| 177 |
+
$$
|
| 178 |
+
|
| 179 |
+

|
| 180 |
+
Figure 2: Overview of multinomial diffusion. A generative model $p ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } )$ learns to gradually denoise a signal from left to right. An inference diffusion process $q \big ( \mathbf { \boldsymbol { x } } _ { t } | \mathbf { \boldsymbol { x } } _ { t - 1 } \big )$ gradually adds noise form right to left.
|
| 181 |
+
|
| 182 |
+
One of the innovations in $\boxed { \mathrm { H o ~ e t ~ a l . } } \textcircled { 1 2 0 2 0 }$ was the insight to not predict the parameters for the generative trajectory directly, but rather to predict the noise using the posterior equation for $q$ . Although predicting the noise is difficult for discrete data, we predict a probability vector for $\scriptstyle { \hat { \mathbf { x } } } _ { 0 }$ from $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { t } }$ and subsequently parametrize $p ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } )$ using the probability vector from $q ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , \hat { \pmb { x } } _ { 0 } )$ , where $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ is approximated using a neural network $\hat { \pmb { x } } _ { 0 } = \mu ( \pmb { x } _ { t } , t )$ . Equation $\boxed { 1 3 }$ will produce valid probability vectors that are non-negative and sums to one under the condition that the prediction $\scriptstyle { \hat { \mathbf { x } } } _ { 0 }$ is non-negative and sums to one, which is ensured with a softmax function in $\mu$ . To summarize:
|
| 183 |
+
|
| 184 |
+
$\begin{array} { r } { \begin{array} { r } { \rho \big ( { \pmb x } _ { 0 } | { \pmb x } _ { 1 } \big ) = \mathcal { C } \big ( { \pmb x } _ { 0 } | \hat { \pmb x } _ { 0 } \big ) \mathrm { ~ a n d ~ } p \big ( { \pmb x } _ { t - 1 } | { \pmb x } _ { t } \big ) = \mathcal { C } \big ( { \pmb x } _ { t - 1 } | \theta _ { \mathrm { p o s t } } \big ( { \pmb x } _ { t } , \hat { \pmb x } _ { 0 } \big ) \big ) \mathrm { ~ w h e r e ~ } \hat { \pmb x } _ { 0 } = \mu ( { \pmb x } _ { t } , t ) } \end{array} } \end{array}$
|
| 185 |
+
|
| 186 |
+
The KL terms in Equation $\textcircled { 3 }$ can be simply computed by enumerating the probabilities in Equation and 14 and computing the KL divergence for discrete distributions in $L _ { t - 1 } ^ { \star }$ with $t \geq 2$ :
|
| 187 |
+
|
| 188 |
+
$$
|
| 189 |
+
\mathrm { K L } \big ( q ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } , \pmb { x } _ { 0 } ) | p ( \pmb { x } _ { t - 1 } | \pmb { x } _ { t } ) \big ) = \mathrm { K L } \big ( \mathcal { C } ( \pmb { \theta } _ { \mathrm { p o s t } } ( \pmb { x } _ { t } , \pmb { x } _ { 0 } ) ) | \mathcal { C } ( \pmb { \theta } _ { \mathrm { p o s t } } ( \pmb { x } _ { t } , \hat { \pmb { x } } _ { 0 } ) ) \big ) ,
|
| 190 |
+
$$
|
| 191 |
+
|
| 192 |
+
which can be computed using P k ✓post(xt, x0))k · log ✓post(xt,x0))k✓post(xt,xˆ0))k . Furtermore, to compute $\log p ( { \pmb x } _ { 0 } | { \pmb x } _ { 1 } )$ use that $\scriptstyle { \mathbf { { \mathit { x } } } } _ { 0 }$ is onehot:
|
| 193 |
+
|
| 194 |
+
$$
|
| 195 |
+
\log p ( \pmb { x } _ { 0 } | \pmb { x } _ { 1 } ) = \sum _ { k } \pmb { x } _ { 0 , k } \log \hat { \pmb { x } } _ { 0 , k }
|
| 196 |
+
$$
|
| 197 |
+
|
| 198 |
+
# 5 Related Work
|
| 199 |
+
|
| 200 |
+
Deep generative models broadly fall into the categories autoregressive models ARMs (Germain et al., 2015), Variational Autoencoders (VAEs) (Kingma and Welling, 2014; Rezende et al., 2014), Adversarial Network (GANs) (Goodfellow et al., 2014), Normalizing Flows (Rezende and Mohamed, 2015), Energy-Based Models (EBMs) and Diffusion Models (Sohl-Dickstein et al., 2015).
|
| 201 |
+
|
| 202 |
+
Normalizing Flows typically learn a continuous distribution and dequantization is required to train these methods on ordinal data such as images. A large body of work is dedicated to building more expressive continuous normalizing flows (Dinh et al., 2017; Germain et al., 2015; Kingma et al., 2016; Papamakarios et al., 2017; Chen et al., 2018; Song et al., 2019; Perugachi-Diaz et al., 2020). To learn ordinal discrete distributions with normalizing flows, adding uniform noise in-between ordinal classes was proposed in (Uria et al., 2013) and later theoretically justified in (Theis et al., 2016). An extension for more powerful dequantization based on variational inference was proposed in (Ho et al., 2019), and connected to autoregressive models in (Nielsen and Winther, 2020). Dequantization for binary variables was proposed in (Winkler et al., 2019). Tran et al. (2019) propose invertible transformations for categorical variables directly. However, these methods can be difficult to train because of gradient bias and results on images have thus far not been demonstrated. In addition flows for ordinal discrete data (integers) have been explored in (Hoogeboom et al., 2019; van den Berg et al., $\boxed { 2 0 2 0 }$ . In other works, VAEs have been adapted to learn a normalizing flow for the latent space (Ziegler and Rush, 2019; Lippe and Gavves, 2020). However, these approaches typically still utilize an argmax heuristic to sample, even though this is not the distribution specified during training.
|
| 203 |
+
|
| 204 |
+
Diffusion models were first introduced in Sohl-Dickstein et al. (2015), who developed diffusion for Gaussian and Bernoulli distributions. Recently, Denoising Diffusion models $\boxed { \mathrm { H o ~ e t ~ a l . } } \textcircled { 2 0 2 0 }$ have been shown capable of generating high-dimensional images by architectural improvements and reparametrization of the predictions. Diffusion models are relatively fast to train, but slow to sample from as they require iterations over the many timesteps in the chain. $\boxed { \mathrm { S o n g ~ e t ~ a l . } ( \mathbb { 2 0 2 0 } ) }$ ; Nichol and Dhariwal (2021) showed that in practice samples can be generated using significantly fewer steps. Nichol and Dhariwal (2021) demonstrated that importance-weighting the objective components greatly improves log-likelihood performance. In Song et al. $\underline { { ( 2 0 2 0 ) } }$ a continuous-time extension of denoising diffusion models was proposed. After initial release of this paper we discovered that $\boldsymbol { \left| \mathrm { { S o n g } } \right| }$ et al. $\bar { ( | 2 0 2 0 ) }$ concurrently also describe a framework for discrete diffusion, but without empirical evaluation.
|
| 205 |
+
|
| 206 |
+
Table 2: Comparison of a coupling and autoregressive generative flows with uniform (Uria et al., 2013) and variational (Ho et al., 2019) dequantization and our proposed Argmax flows.
|
| 207 |
+
|
| 208 |
+
<table><tr><td>Dequantization</td><td>Flow type</td><td>text8 (bpc)</td><td>enwik8 (bits per raw byte)</td></tr><tr><td>Uniform dequantization</td><td rowspan="3">Autoregressive</td><td>1.90</td><td>2.14</td></tr><tr><td>Variational dequantization</td><td>1.43</td><td>1.44</td></tr><tr><td>Argmax Flow (ours)</td><td>1.38</td><td>1.42</td></tr><tr><td rowspan="3">Uniform dequantization Variational dequantization Argmax Flow (ours)</td><td rowspan="3">Coupling</td><td>2.01</td><td>2.33</td></tr><tr><td>2.08</td><td>2.28</td></tr><tr><td>1.82</td><td>1.93</td></tr></table>
|
| 209 |
+
|
| 210 |
+
# 6 Experiments
|
| 211 |
+
|
| 212 |
+
In our experiments we compare the performance of our methods on language modelling tasks and learning image segmentation maps unconditionally.
|
| 213 |
+
|
| 214 |
+
# 6.1 Language data
|
| 215 |
+
|
| 216 |
+
In this section we compare our methods on two language datasets, text8 and enwik8. text8 contains 27 categories (‘a’ through $\cdot _ { z } ,$ and ‘ ’) and for enwik8 the bytes are directly modelled which results in 256 categories.
|
| 217 |
+
|
| 218 |
+
Model description Two versions of generative argmax flows are tested: using an autoregressive (AR) flow and a coupling-based flow for $p ( v )$ . In these experiments the probabilistic inverse is based on the thresholding approach. Specifically, a conditional diagonal Gaussian $q ( { \pmb u } | { \pmb x } )$ is trained and thresholded which gives the distribution $q ( { \pmb v } | { \pmb x } )$ . The argmax flow is defined on binary Cartesian products. This means that for $K = 2 7$ , a 5-dimensional binary space is used and for $K = 2 5 6$ an 8-dimensional binary space. The argmax flow is compared to the current standard of training generative flows directly on discrete data: dequantization. We compare to both uniform and variational dequantization, where noise on a $( 0 , 1 )$ interval is added to the onehot representation of the categorical data. The autoregressive density model is based on the model proposed in $( \mathbb { L i p p e \ a n d G a v v e s } ) \bar { \lfloor 2 0 2 0 \rfloor }$ . The coupling density model consists of 8 flow layers where each layer consists of a $\overline { { 1 \times 1 } }$ convolution and mixture of logistics transformations $\boxed { \mathrm { H o ~ e t ~ a l . } ( \overline { { 2 0 1 9 } } ) }$ . In the multinomial text diffusion model, the $\mu$ network is modeled by a 12-layer Transformer. For more extensive details about the experiment setup see Appendix B.
|
| 219 |
+
|
| 220 |
+
Table 3: Comparison of different methods on text8 and enwik8. Results are reported in negative log-likelihood with units bits per character (bpc) for text8 and bits per raw byte (bpb) for enwik8.
|
| 221 |
+
|
| 222 |
+
<table><tr><td>Model type</td><td>Model</td><td>text8 (bpc)</td><td>enwik8 (bpb)</td></tr><tr><td rowspan="2">ARM</td><td> 64 Layer Transformer (Al-Rfou et al.2019)</td><td>1.13</td><td>1.06</td></tr><tr><td>TransformerXL (Dai et al.,2019)</td><td>1.08</td><td>0.99</td></tr><tr><td rowspan="3">VAE</td><td> AF/AF* (AR) (Ziegler and Rush,2019)</td><td>1.62</td><td>1.72</td></tr><tr><td>IAF /SCF*( Ziegler and Rush, 2019)</td><td>1.88</td><td>2.03</td></tr><tr><td> CategoricalNF (AR) (Lippe and Gavves,2020)</td><td>1.45</td><td>1</td></tr><tr><td rowspan="2">Generative Flow</td><td>Argmax Flow, AR (ours)</td><td>1.39</td><td>1.42</td></tr><tr><td>Argmax Coupling Flow (ours)</td><td>1.82</td><td>1.93</td></tr><tr><td>Diffusion</td><td>Multinomial Text Diffusion (ours)</td><td>1.72</td><td>1.75</td></tr></table>
|
| 223 |
+
|
| 224 |
+
$\star$ Results obtained by running code from the official repository for the text8 and enwik8 datasets.
|
| 225 |
+
|
| 226 |
+

|
| 227 |
+
|
| 228 |
+
# (a) Samples from Multinomial Text Diffusion.
|
| 229 |
+
|
| 230 |
+
heartedness frege thematically infered by the famous existence of a fu nction f from the laplace definition we can analyze a definition of bin ary operations with additional size so their functionality cannot be re viewed here there is no change because its
|
| 231 |
+
|
| 232 |
+
otal cost of learning objects from language to platonic linguistics exa mines why animate to indicate wild amphibious substances animal and mar ine life constituents of animals and bird sciences medieval biology bio logy and central medicine full discovery re
|
| 233 |
+
|
| 234 |
+
(a) Samples from the Argmax Flow.
|
| 235 |
+
|
| 236 |
+

|
| 237 |
+
|
| 238 |
+
# (b) Samples from Argmax AR Flow.
|
| 239 |
+
|
| 240 |
+
ns fergenur d alpha and le heigu man notabhe leglon lm n two six a gg opa movement as sympathetic dutch the term bilirubhah acquired the bava rian cheeh segt thmamouinaire vhvinus lihnos ineoneartis or medical iod ine the rave wesp published harsy varb hhgh
|
| 241 |
+
|
| 242 |
+
danibah or manuccha but calpere that of the moisture soods and dristi ng attempt to cause any moderator called lk brown or totpdngs is usuall y able to nus and hockecrits borel qbisupnias section rybancase untecce mentation anymore the motion of plays on qr
|
| 243 |
+
|
| 244 |
+
(b) Samples from the Multinomial Diffusion model.
|
| 245 |
+
|
| 246 |
+
(c) Samples from Argmax Coupling Flow.
|
| 247 |
+
|
| 248 |
+

|
| 249 |
+
Figure 4: Samples from models, cityscapes.
|
| 250 |
+
|
| 251 |
+
Figure 3: Samples from models, text8.
|
| 252 |
+
|
| 253 |
+
Comparison with Generative Flows Firstly we compare the performance of generative flows directly trained on language data (Table $\textcircled{2}$ . These experiments are using the same underlying normalizing flow: either a coupling-based flow or an autoregressive flow. Note that Argmax Flows consistently outperform both uniform and variational dequantization. This indicates that it is easier for a generative flow to learn the lifted continuous distribution using an argmax flow. An advantage of Argmax flows that may explain this difference is that they lift the variables into the entire Euclidean space, whereas traditional dequantization only introduce probability density on $( 0 , 1 )$ intervals, leaving gaps with no probability density. The performance improvements of Argmax flows are even more pronounced when comparing coupling-based approaches. Also note that coupling flows have worse performance than autoregressive flows, with a difference that is generally smaller for images. This indicates that designing more expressive coupling layers for text is an interesting future research direction.
|
| 254 |
+
|
| 255 |
+
Comparison with other generative models The performance compared to models in literature is presented in Table 3 alongside the performance of our Argmax Flows and Multinomial Diffusion. The latent variable approaches containing autoregressive components are marked using (AR). Although autoregressive flows still have the same disadvantages as ARMs, they provide perspective on where performance deficiencies are coming from. We find that our autoregressive Argmax Flows achieve better performance than the VAE approaches, they outperform AF/AF (Ziegler and Rush, 2019) and CategoricalNF (Lippe and Gavves, 2020).
|
| 256 |
+
|
| 257 |
+
When comparing non-autoregressive models, Argmax Flows also outperforms the method that lifts the categorical space to a continuous space: IAF / SCF (Ziegler and Rush, 2019). Interestingly, the multinomial text diffusion is a non-autoregressive model that performs even better than the argmax coupling flow, but performs worse than the autoregressive version. For this model it is possible that different diffusion trajectories for $q$ would result in even better performance, because in the current form the denoising model has to be very robust to input noise. These experiments also highlight that there is still a distinct performance gap between standard ARMs and (autoregressive) continuous density model on text, possibly related to the dequantization gap (Nielsen and Winther, 2020). Samples from different models trained on text8 are depicted in Figure 3. Because of difficulties in reproducing results from Discrete Flows, a comparison and analysis of discrete flows are left out of this section. Instead they are extensively discussed in Appendix C. For additional experiments regarding Cartesian products and sampling time see Appendix D.
|
| 258 |
+
|
| 259 |
+
Unsupervised spell-checking An interesting by-product of the text diffusion model is that it can be used to spell-check text using a single forward pass. To demonstrate this, a sentence taken from the test data is corrupted by changing a few characters. This corrupted sequence is given as $\scriptstyle { \mathbf { { \vec { x } } } } _ { 1 }$ to the generative denoising model, which is close to the data at step 0. Then the denoising model predicts $p ( \pmb { x } _ { 0 } | \bar { \pmb { x } _ { 1 } } )$ and the mostlikely $\scriptstyle { \pmb x } _ { 0 }$ can be suggested. Note that this model only works for character-level corruption, not insertions. An example is depicted in Figure $5 .$ Since the model chooses the most-likely matching word, larger corruptions will at some point lead to word changes.
|
| 260 |
+
|
| 261 |
+

|
| 262 |
+
Figure 5: Spell checking with Multinomial Text Diffusion.
|
| 263 |
+
|
| 264 |
+
# 6.2 Segmentation maps
|
| 265 |
+
|
| 266 |
+
For image-type data, we introduce a categorical image dataset: the cityscapes dataset is repurposed for unconditional image segmentation learning. In contrast with the standard setting, the distribution over the segmentation targets needs to be learned without conditioning on the photograph. To reduce computational cost, we rescale the segmentation maps from cityscapes to $3 2 \times 6 4$ images using nearest neighbour interpolation. We utilize the global categories as prediction targets which results in an 8-class problem.
|
| 267 |
+
|
| 268 |
+
Model description The Argmax Flows are defined directly on the $K = 8$ categorical space. The density model $p ( v )$ is defined using affine coupling layers parametrized by DenseNets $\mathrm { ( } \varlimsup \mathrm { a n g ~ e t ~ a l . } \mathrm { ) } \varliminf \bar { 2 0 1 7 } \mathrm { ) }$ . For the probabilistic inverse we learn a conditional flow $q ( { \pmb u } | { \pmb x } )$ which is also based on the affine coupling structure. Depending on the method, either softplus or Gumbel thresholding is applied to obtain $\textbf { { v } }$ . Recall that for our first Gumbel approach it is equivalent to set $q ( { \pmb u } | { \pmb x } )$ to the unit uniform distribution, whereas $\scriptstyle { \dot { q } } ( { \pmb { u } } | { \pmb { x } } )$ is learned for Gumbel
|
| 269 |
+
|
| 270 |
+
Table 4: Performance of different dequantization methods on squares and cityscapes dataset, in bits per pixel, lower is better.
|
| 271 |
+
|
| 272 |
+
<table><tr><td>Cityscapes</td><td>ELBO</td><td>IWBO</td></tr><tr><td>Round / Unif. (Uria et al., 2013)</td><td>1.010</td><td>0.930</td></tr><tr><td>Round / Var.( (Ho et al., 2019)</td><td>0.334</td><td>0.315</td></tr><tr><td>Argmax / Softplus thres.(ours)</td><td>0.303</td><td>0.290</td></tr><tr><td>Argmax /Gumbel dist.(ours) Argmax /Gumbel thres.(ours)</td><td>0.365</td><td>0.341</td></tr><tr><td></td><td>0.307</td><td>0.287</td></tr><tr><td>Multinomial Diffusion (ours)</td><td>0.305</td><td></td></tr></table>
|
| 273 |
+
|
| 274 |
+
thresholding. We compare to existing dequantization strategies in literature: uniform (Uria et al., $\boxed { 2 0 1 3 }$ and variational dequantization $( \bar { \mathrm { H o \ e t \ a l . } } , \bar { 2 0 1 9 } )$ which are applied on the onehot representation. All models utilize the same underlying flow architectures and thus the number of parameters is roughly the same. The exception are uniform dequantization and the Gumbel distribution, since no additional variational flow distribution is needed. For more extensive details see Appendix B.
|
| 275 |
+
|
| 276 |
+
Comparison The results of this experiment are shown in Table $^ 4$ in terms of ELBO and if available the IWBO (importance weighted bound) $\left( \mathrm { B u r d a \ e t \ a l . } \right) , \left[ \mathrm { 2 0 1 6 } \right)$ with 1000 samples measured in bits per pixel. Consistent with the language experiments, the traditional dequantization approaches (uniform / variational) are outperformed by Argmax Flows. Interestingly, although argmax flows with softplus thresholding achieves the best ELBO, the argmax flow with Gumbel thresholding approach achieves a better IWBO. The Multinomial Diffusion model performs somewhat worse with 0.37 bpp on test whereas it scored 0.33 bpp on train. Interestingly, this the only model where overfitting was an issue and data augmentation was required, which may explain this portion of the performance difference. For all other models training performance was comparable to test and validation performance. Samples from the different models trained on cityscapes are depicted in Figure $\mathbb { E }$ Another interesting point is that coupling flows had difficulty producing coherent text samples (Figure $\textcircled { 3 }$ but do not suffer from this problem on the cityscapes data which is more imagelike. As coupling layers where initially designed for images (Dinh et al., 2015), they may require adjustments to increase their expressiveness on text.
|
| 277 |
+
|
| 278 |
+
# 7 Social Impact and Conclusion
|
| 279 |
+
|
| 280 |
+
Social Impact The methods described in this paper can be used to learn categorical distributions. For that reason, they can potentially be used to generate high-dimensional categorical data, such as text or image segmentation maps, faster than iterative approaches. Possibly negative influences are the generation of fake media in the form of text, or very unhelpful automated chat bots for customer service. Our work could positively influence new methods for text generation, or improved segmentation for self-driving cars. In addition, our work may also be used for outlier detection to flag fake content. Also, we believe the method in its current form is still distant from direct applications as the ones mentioned above.
|
| 281 |
+
|
| 282 |
+
Conclusion In this paper we propose two extensions for Normalizing Flows and Diffusion models to learn categorical data: Argmax Flows and Multinomial Diffusion. Our experiments show that our methods outperform comparable models in terms of negative log-likelihood. In addition, our experiments highlight distinct performance gaps in the field: Between standard ARMs, continuous autoregressive models and non-autoregressive continuous models. This indicates that future work could focus on two sources of decreased performance: 1) when discrete variables are lifted to a continuous space and further 2) when removing autoregressive components.
|
| 283 |
+
|
| 284 |
+
# Funding Disclosure
|
| 285 |
+
|
| 286 |
+
There are no additional sources of funding to disclose, beyond the affiliations of the authors.
|
| 287 |
+
|
| 288 |
+
References
|
| 289 |
+
Cooijmans, T.; Ballas, N.; Laurent, C.; Gülçehre, Ç.; Courville, A. C. Recurrent Batch Normalization. 5th International Conference on Learning Representations, ICLR. 2017.
|
| 290 |
+
Dai, Z.; Yang, Z.; Yang, Y.; Carbonell, J. G.; Le, Q. V.; Salakhutdinov, R. Transformer-XL: Attentive Language Models beyond a Fixed-Length Context. Proceedings of the 57th Conference of the Association for Computational Linguistics, ACL 2019. 2019.
|
| 291 |
+
Uria, B.; Murray, I.; Larochelle, H. RNADE: The Real-valued Neural Autoregressive Densityestimator. Advances in Neural Information Processing Systems. 2013; pp 2175–2183.
|
| 292 |
+
Theis, L.; van den Oord, A.; Bethge, M. A note on the evaluation of generative models. International Conference on Learning Representations. 2016.
|
| 293 |
+
Ho, J.; Chen, X.; Srinivas, A.; Duan, Y.; Abbeel, P. Flow $^ { + + }$ : Improving Flow-Based Generative Models with Variational Dequantization and Architecture Design. 36th International Conference on Machine Learning 2019,
|
| 294 |
+
Sohl-Dickstein, J.; Weiss, E. A.; Maheswaranathan, N.; Ganguli, S. Deep Unsupervised Learning using Nonequilibrium Thermodynamics. Proceedings of the 32nd International Conference on Machine Learning, ICML. 2015.
|
| 295 |
+
Ho, J.; Jain, A.; Abbeel, P. Denoising Diffusion Probabilistic Models. CoRR 2020, abs/2006.11239.
|
| 296 |
+
Song, J.; Meng, C.; Ermon, S. Denoising Diffusion Implicit Models. CoRR 2020, abs/2010.02502.
|
| 297 |
+
Nichol, A. Q.; Dhariwal, P. Improved Denoising Diffusion Probabilistic Models. 2021; https: //openreview.net/forum?id=-NEXDKk8gZ.
|
| 298 |
+
Rezende, D.; Mohamed, S. Variational Inference with Normalizing Flows. Proceedings of the 32nd International Conference on Machine Learning. 2015; pp 1530–1538.
|
| 299 |
+
Nielsen, D.; Jaini, P.; Hoogeboom, E.; Winther, O.; Welling, M. SurVAE Flows: Surjections to Bridge the Gap between VAEs and Flows. CoRR 2020, abs/2007.02731.
|
| 300 |
+
Maddison, C. J.; Tarlow, D.; Minka, T. A\* Sampling. Advances in Neural Information Processing Systems 27: Annual Conference on Neural Information Processing Systems. 2014.
|
| 301 |
+
Kool, W.; Van Hoof, H.; Welling, M. Stochastic Beams and Where To Find Them: The GumbelTop-k Trick for Sampling Sequences Without Replacement. Proceedings of the 36th International Conference on Machine Learning. 2019.
|
| 302 |
+
Winkler, C.; Worrall, D. E.; Hoogeboom, E.; Welling, M. Learning Likelihoods with Conditional Normalizing Flows. CoRR 2019, abs/1912.00042.
|
| 303 |
+
Germain, M.; Gregor, K.; Murray, I.; Larochelle, H. Made: Masked autoencoder for distribution estimation. International Conference on Machine Learning. 2015; pp 881–889.
|
| 304 |
+
Kingma, D. P.; Welling, M. Auto-Encoding Variational Bayes. Proceedings of the 2nd International Conference on Learning Representations. 2014.
|
| 305 |
+
Rezende, D. J.; Mohamed, S.; Wierstra, D. Stochastic Backpropagation and Approximate Inference in Deep Generative Models. Proceedings of the 31th International Conference on Machine Learning, ICML. 2014.
|
| 306 |
+
Goodfellow, I.; Pouget-Abadie, J.; Mirza, M.; Xu, B.; Warde-Farley, D.; Ozair, S.; Courville, A.; Bengio, Y. Generative adversarial nets. Advances in neural information processing systems. 2014; pp 2672–2680.
|
| 307 |
+
Dinh, L.; Sohl-Dickstein, J.; Bengio, S. Density estimation using Real NVP. 5th International Conference on Learning Representations, ICLR 2017,
|
| 308 |
+
Kingma, D. P.; Salimans, T.; Jozefowicz, R.; Chen, X.; Sutskever, I.; Welling, M. Improved variational inference with inverse autoregressive flow. Advances in Neural Information Processing Systems. 2016; pp 4743–4751.
|
| 309 |
+
Papamakarios, G.; Murray, I.; Pavlakou, T. Masked autoregressive flow for density estimation. Advances in Neural Information Processing Systems. 2017; pp 2338–2347.
|
| 310 |
+
Chen, T. Q.; Rubanova, Y.; Bettencourt, J.; Duvenaud, D. K. Neural ordinary differential equations. Advances in Neural Information Processing Systems. 2018; pp 6572–6583.
|
| 311 |
+
Song, Y.; Meng, C.; Ermon, S. MintNet: Building Invertible Neural Networks with Masked Convolutions. Advances in Neural Information Processing Systems 32: Annual Conference on Neural Information Processing Systems 2019, NeurIPS 2019. 2019.
|
| 312 |
+
Perugachi-Diaz, Y.; Tomczak, J. M.; Bhulai, S. Invertible DenseNets. CoRR 2020, abs/2010.02125.
|
| 313 |
+
Nielsen, D.; Winther, O. Closing the Dequantization Gap: PixelCNN as a Single-Layer Flow. Advances in Neural Information Processing Systems 33: Annual Conference on Neural Information Processing Systems 2020, NeurIPS. 2020.
|
| 314 |
+
Tran, D.; Vafa, K.; Agrawal, K.; Dinh, L.; Poole, B. Discrete Flows: Invertible Generative Models of Discrete Data. ICLR 2019 Workshop DeepGenStruct 2019,
|
| 315 |
+
Hoogeboom, E.; Peters, J. W. T.; van den Berg, R.; Welling, M. Integer Discrete Flows and Lossless Compression. Neural Information Processing Systems 2019, NeurIPS 2019. 2019; pp 12134– 12144.
|
| 316 |
+
van den Berg, R.; Gritsenko, A. A.; Dehghani, M.; Sønderby, C. K.; Salimans, T. $\mathrm { I D F + + }$ : Analyzing and Improving Integer Discrete Flows for Lossless Compression. CoRR 2020, abs/2006.12459.
|
| 317 |
+
Ziegler, Z. M.; Rush, A. M. Latent Normalizing Flows for Discrete Sequences. Proceedings of the 36th International Conference on Machine Learning, ICML. 2019.
|
| 318 |
+
Lippe, P.; Gavves, E. Categorical Normalizing Flows via Continuous Transformations. CoRR 2020, abs/2006.09790.
|
| 319 |
+
Song, Y.; Sohl-Dickstein, J.; Kingma, D. P.; Kumar, A.; Ermon, S.; Poole, B. Score-Based Generative Modeling through Stochastic Differential Equations. CoRR 2020, abs/2011.13456.
|
| 320 |
+
Al-Rfou, R.; Choe, D.; Constant, N.; Guo, M.; Jones, L. Character-Level Language Modeling with Deeper Self-Attention. The Thirty-Third AAAI Conference on Artificial Intelligence, AAAI 2019. 2019.
|
| 321 |
+
Huang, G.; Liu, Z.; Van Der Maaten, L.; Weinberger, K. Q. Densely connected convolutional networks. Proceedings of the IEEE conference on computer vision and pattern recognition. 2017; pp 4700–4708.
|
| 322 |
+
Burda, Y.; Grosse, R. B.; Salakhutdinov, R. Importance Weighted Autoencoders. 4th International Conference on Learning Representations. 2016.
|
| 323 |
+
Dinh, L.; Krueger, D.; Bengio, Y. NICE: Non-linear independent components estimation. 3rd International Conference on Learning Representations, ICLR, Workshop Track Proceedings 2015,
|
| 324 |
+
Cordts, M.; Omran, M.; Ramos, S.; Rehfeld, T.; Enzweiler, M.; Benenson, R.; Franke, U.; Roth, S.; Schiele, B. The Cityscapes Dataset for Semantic Urban Scene Understanding. 2016 IEEE Conference on Computer Vision and Pattern Recognition, CVPR. 2016; pp 3213–3223.
|
md/train/6puCSjH3hwA/6puCSjH3hwA.md
ADDED
|
@@ -0,0 +1,524 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# A GOOD IMAGE GENERATOR IS WHAT YOU NEED FOR HIGH-RESOLUTION VIDEO SYNTHESIS
|
| 2 |
+
|
| 3 |
+
Yu Tian1∗, Jian $\mathbf { R e n } ^ { 2 }$ , Menglei Chai2, Kyle Olszewski2, Xi Peng3,
|
| 4 |
+
Dimitris N. Metaxas1, Sergey Tulyakov2
|
| 5 |
+
1Rutgers University, 2Snap Inc., 3University of Delaware
|
| 6 |
+
{yt219, dnm}@cs.rutgers.edu,
|
| 7 |
+
{jren, mchai, kolszewski, stulyakov}@snapchat.com
|
| 8 |
+
|
| 9 |
+
# ABSTRACT
|
| 10 |
+
|
| 11 |
+
Image and video synthesis are closely related areas aiming at generating content from noise. While rapid progress has been demonstrated in improving imagebased models to handle large resolutions, high-quality renderings, and wide variations in image content, achieving comparable video generation results remains problematic. We present a framework that leverages contemporary image generators to render high-resolution videos. We frame the video synthesis problem as discovering a trajectory in the latent space of a pre-trained and fixed image generator. Not only does such a framework render high-resolution videos, but it also is an order of magnitude more computationally efficient. We introduce a motion generator that discovers the desired trajectory, in which content and motion are disentangled. With such a representation, our framework allows for a broad range of applications, including content and motion manipulation. Furthermore, we introduce a new task, which we call cross-domain video synthesis, in which the image and motion generators are trained on disjoint datasets belonging to different domains. This allows for generating moving objects for which the desired video data is not available. Extensive experiments on various datasets demonstrate the advantages of our methods over existing video generation techniques. Code will be released at https://github.com/snap-research/MoCoGAN-HD.
|
| 12 |
+
|
| 13 |
+
# 1 INTRODUCTION
|
| 14 |
+
|
| 15 |
+
Video synthesis seeks to generate a sequence of moving pictures from noise. While its closely related counterpart—image synthesis—has seen substantial advances in recent years, allowing for synthesizing at high resolutions (Karras et al., 2017), rendering images often indistinguishable from real ones (Karras et al., 2019), and supporting multiple classes of image content (Zhang et al., 2019), contemporary improvements in the domain of video synthesis have been comparatively modest. Due to the statistical complexity of videos and larger model sizes, video synthesis produces relatively low-resolution videos, yet requires longer training times. For example, scaling the image generator of Brock et al. (2019) to generate $2 5 6 \times 2 5 6$ videos requires a substantial computational budget1. Can we use a similar method to attain higher resolutions? We believe a different approach is needed.
|
| 16 |
+
|
| 17 |
+
There are two desired properties for generated videos: (i) high quality for each individual frame, and (ii) the frame sequence should be temporally consistent, i.e. depicting the same content with plausible motion. Previous works (Tulyakov et al., 2018; Clark et al., 2019) attempt to achieve both goals with a single framework, making such methods computationally demanding when high resolution is desired. We suggest a different perspective on this problem. We hypothesize that, given an image generator that has learned the distribution of video frames as independent images, a video can be represented as a sequence of latent codes from this generator. The problem of video synthesis can then be framed as discovering a latent trajectory that renders temporally consistent images. Hence, we demonstrate that (i) can be addressed by a pre-trained and fixed image generator, and (ii) can be achieved using the proposed framework to create appropriate image sequences.
|
| 18 |
+
|
| 19 |
+
To discover the appropriate latent trajectory, we introduce a motion generator, implemented via two recurrent neural networks, that operates on the initial content code to obtain the motion representation. We model motion as a residual between continuous latent codes that are passed to the image generator for individual frame generation. Such a residual representation can also facilitate the disentangling of motion and content. The motion generator is trained using the chosen image discriminator with contrastive loss to force the content to be temporally consistent, and a patch-based multi-scale video discriminator for learning motion patterns. Our framework supports contemporary image generators such as StyleGAN2 (Karras et al., 2019) and BigGAN (Brock et al., 2019).
|
| 20 |
+
|
| 21 |
+
We name our approach as MoCoGAN-HD (Motion and Content decomposed GAN for HighDefinition video synthesis) as it features several major advantages over traditional video synthesis pipelines. First, it transcends the limited resolutions of existing techniques, allowing for the generation of high-quality videos at resolutions up to $1 0 2 4 \times 1 0 2 4$ . Second, as we search for a latent trajectory in an image generator, our method is computationally more efficient, requiring an order of magnitude less training time than previous video-based works (Clark et al., 2019). Third, as the image generator is fixed, it can be trained on a separate high-quality image dataset. Due to the disentangled representation of motion and content, our approach can learn motion from a video dataset and apply it to an image dataset, even in the case of two datasets belonging to different domains. It thus unleashes the power of an image generator to synthesize high quality videos when a domain (e.g., dogs) contains many high-quality images but no corresponding high-quality videos (see Fig. 4). In this manner, our method can generate realistic videos of objects it has never seen moving during training (such as generating realistic pet face videos using motions extracted from images of talking people). We refer to this new video generation task as cross-domain video synthesis. Finally, we quantitatively and qualitatively evaluate our approach, attaining state-of-the-art performance on each benchmark, and establish a challenging new baseline for video synthesis methods.
|
| 22 |
+
|
| 23 |
+
# 2 RELATED WORK
|
| 24 |
+
|
| 25 |
+
Video Synthesis. Approaches to image generation and translation using Generative Adversarial Networks (GANs) (Goodfellow et al., 2014) have demonstrated the ability to synthesize high quality images (Radford et al., 2016; Zhang et al., 2019; Brock et al., 2019; Donahue & Simonyan, 2019; Jin et al., 2021). Built upon image translation (Isola et al., 2017; Wang et al., 2018b), works on video-to-video translation (Bansal et al., 2018; Wang et al., 2018a) are capable of converting an input video to a high-resolution output in another domain. However, the task of high-fidelity video generation, in the unconditional setting, is still a difficult and unresolved problem. Without the strong conditional inputs such as segmentation masks (Wang et al., 2019) or human poses (Chan et al., 2019; Ren et al., 2020) that are employed by video-to-video translation works, generating videos following the distribution of training video samples is challenging. Earlier works on GANbased video modeling, including MDPGAN (Yushchenko et al., 2019), VGAN (Vondrick et al., 2016), TGAN (Saito et al., 2017), MoCoGAN (Tulyakov et al., 2018), ProgressiveVGAN (Acharya et al., 2018), TGANv2 (Saito et al., 2020) show promising results on low-resolution datasets. Recent efforts demonstrate the capacity to generate more realistic videos, but with significantly more computation (Clark et al., 2019; Weissenborn et al., 2020). In this paper, we focus on generating realistic videos using manageable computational resources. LDVDGAN (Kahembwe & Ramamoorthy, 2020) uses low dimensional discriminator to reduce model size and can generate videos with resolution up to $5 1 2 \times 5 1 2$ , while we decrease training cost by utilizing a pre-trained image generator. The high-quality generation is achieved by using pre-trained image generators, while the motion trajectory is modeled within the latent space. Additionally, learning motion in the latent space allows us to easily adapt the video generation model to the task of video prediction (Denton et al., 2017), in which the starting frame is given (Denton & Fergus, 2018; Zhao et al., 2018; Walker et al., 2017; Villegas et al., 2017b;a; Babaeizadeh et al., 2017; Hsieh et al., 2018; Byeon et al., 2018), by inverting the initial frame through the generator (Abdal et al., 2020), instead of training an extra image encoder (Tulyakov et al., 2018; Zhang et al., 2020).
|
| 26 |
+
|
| 27 |
+
Interpretable Latent Directions. The latent space of GANs is known to consist of semantically meaningful vectors for image manipulation. Both supervised methods, either using human annotations or pre-trained image classifiers (Goetschalckx et al., 2019; Shen et al., 2020), and unsupervised methods (Jahanian et al., 2020; Plumerault et al., 2020), are able to find interpretable directions for image editing, such as supervising directions for image rotation or background removal (Voynov &
|
| 28 |
+
|
| 29 |
+

|
| 30 |
+
Figure 1: Left: Given an initial latent code $\mathbf { z } _ { 1 }$ , a trajectory $\epsilon _ { t }$ , and a PCA basis $\mathbf { V }$ , the motion generator $G _ { \mathrm { M } }$ encodes $\mathbf { z } _ { 1 }$ using $\mathrm { L S T M _ { \mathrm { e n c } } }$ to get the initial hidden state and uses $\mathrm { L S T M _ { d e c } }$ to estimate hidden states for future frames. The image generator $G _ { \mathrm { I } }$ synthesizes images using the predicted latent codes. The discriminator $D _ { \mathrm { { V } } }$ is trained on both real and generated video sequences. Right: For each generated video, the first and subsequent frames are sent to an image discriminator $D _ { \mathrm { I } }$ . An encoder-like network $F$ calculates the features of synthesized images used to compute the contrastive loss ${ \mathcal { L } } _ { \mathrm { c o n t r } }$ with positive (same image content, but different augmentation, shown in blue) and negative pairs (different image content and augmentation, shown in red).
|
| 31 |
+
|
| 32 |
+
Babenko, 2020; Shen & Zhou, 2020). We further consider the motion vectors in the latent space. By disentangling the motion trajectories in an unsupervised fashion, we are able to transfer the motion information from a video dataset to an image dataset in which no temporal information is available.
|
| 33 |
+
|
| 34 |
+
Contrastive Representation Learning is widely studied in unsupervised learning tasks (He et al., 2020; Chen et al., 2020a;b; Henaff et al., 2020; L ´ owe et al., 2019; Oord et al., 2018; Misra & Maaten, ¨ 2020). Related inputs, such as images (Wu et al., 2018) or latent representations (Hjelm et al., 2019), which can vary while training due to data augmentation, are forced to be close by minimizing differences in their representation during training. Recent work (Park et al., 2020) applies noisecontrastive estimation (Gutmann & Hyvarinen, 2010) to image generation tasks by learning the ¨ correspondence between image patches, achieving performance superior to that attained when using cycle-consistency constraints (Zhu et al., 2017; Yi et al., 2017). On the other hand, we learn an image discriminator to create videos with coherent content by leveraging contrastive loss (Hadsell et al., 2006) along with an adversarial loss (Goodfellow et al., 2014).
|
| 35 |
+
|
| 36 |
+
# 3 METHOD
|
| 37 |
+
|
| 38 |
+
In this section, we introduce our method for high-resolution video generation. Our framework is built on top of a pre-trained image generator (Karras et al., 2020a;b; Zhao et al., 2020a;b), which helps to generate high-quality image frames and boosts the training efficiency with manageable computational resources. In addition, with the image generator fixed during training, we can disentangle video motion from image content, and enable video synthesis even when the image content and the video motion come from different domains.
|
| 39 |
+
|
| 40 |
+
More specifically, our inference framework includes a motion generator $G _ { \mathrm { M } }$ and an image generator $G _ { \mathrm { I } }$ . $G _ { \mathrm { M } }$ is implemented with two LSTM networks (Hochreiter & Schmidhuber, 1997) and predicts the latent motion trajectory $\mathbf { Z } = \left\{ \mathbf { z } _ { 1 } , \mathbf { z } _ { 2 } , \cdots , \mathbf { z } _ { n } \right\}$ , where $n$ is the number of frames in the synthesized video. The image generator $G _ { \mathrm { I } }$ can thus synthesize each individual frame from the motion trajectory. The generated video sequence $\tilde { \mathbf { v } }$ is given by $\tilde { \mathbf { v } } = \{ \tilde { \mathbf { x } } _ { 1 } , \tilde { \mathbf { x } } _ { 2 } , \cdots , \tilde { \mathbf { x } } _ { n } \}$ . For each synthesized frame $\tilde { \mathbf { x } } _ { t }$ , we have $\tilde { \mathbf { x } } _ { t } = G _ { \mathrm { I } } ( \mathbf { z } _ { t } )$ for $t = 1 , 2 , \cdots , n$ . We also define the real video clip as $\mathbf { v } = \{ \mathbf { x } _ { 1 } , \mathbf { x } _ { 2 } , \cdots , \mathbf { x } _ { n } \}$ and the training video distribution as $p _ { v }$ .
|
| 41 |
+
|
| 42 |
+
To train the motion generator $G _ { \mathrm { M } }$ to discover the desired motion trajectory, we apply a video discriminator to constrain the generated motion patterns to be similar to those of the training videos, and an image discriminator to force the frame content to be temporally consistent. Our framework is illustrated in Fig. 1. We describe each component in more detail in the following sections.
|
| 43 |
+
|
| 44 |
+
# 3.1 MOTION GENERATOR
|
| 45 |
+
|
| 46 |
+
The motion generator $G _ { \mathrm { M } }$ predicts consecutive latent codes using an input code $\mathbf { z } _ { 1 } \in { \mathcal { Z } }$ , where the latent space $\mathcal { Z }$ is also shared by the image generator. For BigGAN (Brock et al., 2019), we sample $\mathbf { z } _ { 1 }$ from the normal distribution $p _ { z }$ . For StyleGAN2 (Karras et al., 2020b), $p _ { z }$ is the distribution after the multi-layer perceptron (MLP), as the latent codes within this distribution can be semantically disentangled better than when using the normal distribution (Shen et al., 2020; Zhu et al., 2020).
|
| 47 |
+
|
| 48 |
+
Formally, $G _ { \mathrm { M } }$ includes an LSTM encoder $\mathrm { L S T M _ { \mathrm { e n c } } }$ , which encodes $\mathbf { z } _ { 1 }$ to get the initial hidden state, and a LSTM decoder $\mathrm { L S T M _ { d e c } }$ , which estimates $n - 1$ continuous hidden states recursively:
|
| 49 |
+
|
| 50 |
+
$$
|
| 51 |
+
\begin{array} { c } { { { \bf h } _ { 1 } , { \bf c } _ { 1 } = \mathrm { L S T M } _ { \mathrm { e n c } } ( { \bf z } _ { 1 } ) , } } \\ { { { \bf h } _ { t } , { \bf c } _ { t } = \mathrm { L S T M } _ { \mathrm { d e c } } ( \epsilon _ { t } , ( { \bf h } _ { t - 1 } , { \bf c } _ { t - 1 } ) ) , t = 2 , 3 , \cdots , n , } } \end{array}
|
| 52 |
+
$$
|
| 53 |
+
|
| 54 |
+
where $\mathbf { h }$ and c denote the hidden state and cell state respectively, and $\epsilon _ { t }$ is a noise vector sampled from the normal distribution to model the motion diversity at timestamp $t$ .
|
| 55 |
+
|
| 56 |
+
Motion Disentanglement. Prior work (Tulyakov et al., 2018) applies $\mathbf { h } _ { t }$ as the motion code for the frame to be generated, while the content code is fixed for all frames. However, such a design requires a recurrent network to estimate the motion while preserving consistent content from the latent vector, which is difficult to learn in practice. Instead, we propose to use a sequence of motion residuals for estimating the motion trajectory. Specifically, we model the motion residual as the linear combination of a set of interpretable directions in the latent space (Shen & Zhou, 2020; Hark ¨ onen ¨ et al., 2020). We first conduct principal component analysis (PCA) on $m$ randomly sampled latent vectors from $\mathcal { Z }$ to get the basis $\mathbf { V }$ . Then, we estimate the motion direction from the previous frame $\mathbf { z } _ { t - 1 }$ to the current frame $\mathbf { z } _ { t }$ by using $\mathbf { h } _ { t }$ and $\mathbf { V }$ as follows:
|
| 57 |
+
|
| 58 |
+
$$
|
| 59 |
+
\mathbf { z } _ { t } = \mathbf { z } _ { t - 1 } + \lambda \cdot \mathbf { h } _ { t } \cdot \mathbf { V } , t = 2 , 3 , \cdots , n ,
|
| 60 |
+
$$
|
| 61 |
+
|
| 62 |
+
where the hidden state ${ \mathbf h } _ { t } \in [ - 1 , 1 ]$ , and $\lambda$ controls the step given by the residual. With Eqn. 1 and Eqn. 2, we have $G _ { \mathrm { M } } ( \mathbf { z } _ { 1 } ) = \left\{ \mathbf { z } _ { 1 } , \mathbf { z } _ { 2 } , \cdots , \mathbf { z } _ { n } \right\}$ , and the generated video $\tilde { \mathbf { v } }$ is given as $\tilde { { \textbf { v } } } =$ $G _ { \mathrm { I } } ( G _ { \mathrm { M } } ( \mathbf { z } _ { 1 } ) )$ .
|
| 63 |
+
|
| 64 |
+
Motion Diversity. In Eqn. 1, we introduce a noise vector $\epsilon _ { t }$ to control the diversity of motion. However, we observe that the LSTM decoder tends to neglect the $\epsilon _ { t }$ , resulting in motion mode collapse, meaning that $G _ { \mathrm { M } }$ cannot capture the diverse motion patterns from training videos and generate distinct videos from one initial latent code with similar motion patterns for different sequences of noise vectors. To alleviate this issue, we introduce a mutual information loss ${ \mathcal { L } } _ { \mathrm { m } }$ to maximize the mutual information between the hidden vector $\mathbf { h } _ { t }$ and the noise vector $\epsilon _ { t }$ . With $\mathrm { s i m } ( \mathbf { u } , \mathbf { v } ) = \mathbf { u } ^ { T } \mathbf { v } / \left\| \mathbf { u } \right\| \left\| \mathbf { v } \right\|$ denoting the cosine similarity between vectors $\mathbf { u }$ and $\mathbf { v }$ , we define ${ \mathcal { L } } _ { \mathrm { m } }$ as follows:
|
| 65 |
+
|
| 66 |
+
$$
|
| 67 |
+
\mathcal { L } _ { \mathrm { m } } = \frac { 1 } { n - 1 } \sum _ { t = 2 } ^ { n } \sin ( H ( \mathbf { h } _ { t } ) , \epsilon _ { t } ) ,
|
| 68 |
+
$$
|
| 69 |
+
|
| 70 |
+
where $H$ is a 2-layer MLP that serves as a mapping function.
|
| 71 |
+
|
| 72 |
+
Learning. To learn the appropriate parameters for the motion generator $G _ { \mathrm { M } }$ , we apply a multi-scale video discriminator $D _ { \mathrm { { V } } }$ to tell whether a video sequence is real or synthesized. The discriminator is based on the architecture of PatchGAN (Isola et al., 2017). However, we use 3D convolutional layers in $D _ { \mathrm { { V } } }$ , as they can model temporal dynamics better than 2D convolutional layers. We divide input video sequence into small 3D patches, and classify each patch as real or fake. The local responses for the input sequence are averaged to produce the final output. Additionally, each frame in the input video sequence is conditioned on the first frame, as it falls into the distribution of the pre-trained image generator, for more stable training. We thus optimize the following adversarial loss to learn $G _ { \mathrm { M } }$ and $D _ { \mathrm { { V } } }$ :
|
| 73 |
+
|
| 74 |
+
$$
|
| 75 |
+
\mathcal { L } _ { D _ { \mathrm { V } } } = \mathbb { E } _ { { \mathbf { v } } \sim p _ { v } } \left[ \log D _ { \mathrm { v } } ( { \mathbf { v } } ) \right] + \mathbb { E } _ { { \mathbf { z } } _ { 1 } \sim p _ { z } } \left[ \log ( 1 - D _ { \mathrm { V } } ( G _ { \mathrm { I } } ( G _ { \mathrm { M } } ( { \mathbf { z } } _ { 1 } ) ) ) ) \right] .
|
| 76 |
+
$$
|
| 77 |
+
|
| 78 |
+
# 3.2 CONTRASTIVE IMAGE DISCRIMINATOR
|
| 79 |
+
|
| 80 |
+
As our image generator is pre-trained, we may use an image generator that is trained on a given domain, e.g. images of animal faces (Choi et al., 2020), and learn the motion generator parameters using videos from a different domain, such as videos of human facial expressions (Nagrani et al.,
|
| 81 |
+
|
| 82 |
+
2017). With Eqn. 4 alone, however, we lack the ability to explicitly constrain the generated images $\tilde { \mathbf { x } } _ { t \mid t > 1 }$ to possess similar quality and content as the first image $\tilde { \mathbf { x } } _ { 1 }$ , which is sampled from the image space of the image generator and thus has high fidelity. Hence, we introduce a contrastive image discriminator $D _ { \mathrm { I } }$ , which is illustrated in Fig. 1, to match both image quality and content between $\tilde { \mathbf { x } } _ { 1 }$ and $\tilde { \mathbf { x } } _ { t \mid t > 1 }$ .
|
| 83 |
+
|
| 84 |
+
Quality Matching. To increase the perceptual quality, we train $D _ { \mathrm { I } }$ and $G _ { \mathrm { M } }$ adversarially by forwarding $\tilde { \mathbf { x } } _ { t }$ into the discriminator $D _ { \mathrm { I } }$ and using $\tilde { \mathbf { x } } _ { 1 }$ as real sample and $\tilde { \mathbf { X } } _ { t \mid t > 1 }$ as the fake sample.
|
| 85 |
+
|
| 86 |
+
$$
|
| 87 |
+
\mathcal { L } _ { D _ { 1 } } = \mathbb { E } _ { \mathbf { z } _ { 1 } \sim p _ { z } } \left[ \log D _ { \mathrm { I } } ( G _ { \mathrm { I } } ( \mathbf { z } _ { 1 } ) ) \right] + \mathbb { E } _ { \mathbf { z } _ { 1 } \sim p _ { z } , \mathbf { z } _ { t } \sim G _ { \mathrm { M } } ( \mathbf { z } _ { 1 } ) | t > 1 } \left[ \log ( 1 - D _ { \mathrm { I } } ( G _ { \mathrm { I } } ( \mathbf { z } _ { t } ) ) ) \right] .
|
| 88 |
+
$$
|
| 89 |
+
|
| 90 |
+
Content Matching. To learn content similarity between frames within a video, we use the image discriminator as a feature extractor and train it with a form of contrastive loss known as InfoNCE (Oord et al., 2018). The goal is that pairs of images with the same content should be close together in embedding space, while images containing different content should be far apart.
|
| 91 |
+
|
| 92 |
+
Given a minibatch of $N$ generated videos $\{ \tilde { \mathbf { v } } ^ { ( 1 ) } , \tilde { \mathbf { v } } ^ { ( 2 ) } , \cdots , \tilde { \mathbf { v } } ^ { ( N ) } \}$ , we randomly sample one frame $t$ from each video: $\{ \tilde { \mathbf { x } } _ { t } ^ { ( 1 ) } , \tilde { \mathbf { x } } _ { t } ^ { ( 2 ) } , \cdot \cdot \cdot , \tilde { \mathbf { x } } _ { t } ^ { ( N ) } \}$ , and make two randomly augmented versions $( \tilde { \mathbf { x } } _ { t } ^ { ( i a ) } , \tilde { \mathbf { x } } _ { t } ^ { ( i b ) } )$ for each frame $\tilde { \mathbf { x } } _ { t } ^ { ( i ) }$ , resulting in $2 N$ samples. $( \tilde { \mathbf { x } } _ { t } ^ { ( i a ) } , \tilde { \mathbf { x } } _ { t } ^ { ( i b ) } )$ are positive pairs, as they share the same content. $( \tilde { \mathbf { x } } _ { t } ^ { ( i \cdot ) } , \tilde { \mathbf { x } } _ { t } ^ { ( j \cdot ) } )$ are all negative pairs for $i \neq j$ .
|
| 93 |
+
|
| 94 |
+
Let $F$ be an encoder network, which shares the same weights and architecture of $D _ { \mathrm { I } }$ , but excluding the last layer of $D _ { \mathrm { I } }$ and including a 2-layer MLP as a projection head that produces the representation of the input images. We have a contrastive loss function ${ \mathcal { L } } _ { \mathrm { c o n t r } }$ , which is the cross-entropy computed across $2 N$ augmentations as follows:
|
| 95 |
+
|
| 96 |
+
$$
|
| 97 |
+
\mathcal { L } _ { \mathrm { c o n t r } } = - \sum _ { i = 1 } ^ { N } \sum _ { \alpha = a } ^ { b } \log \frac { \exp ( \sin ( F ( \tilde { \mathbf { x } } _ { t } ^ { ( i a ) } ) , F ( \tilde { \mathbf { x } } _ { t } ^ { ( i b ) } ) ) / \tau ) } { \sum _ { j = 1 } ^ { N } \sum _ { \beta = a } ^ { b } \mathbb { 1 } _ { [ j \neq i ] } ( \exp ( \sin ( F ( \tilde { \mathbf { x } } _ { t } ^ { ( i \alpha ) } ) , F ( \tilde { \mathbf { x } } _ { t } ^ { ( j \beta ) } ) ) / \tau ) } ,
|
| 98 |
+
$$
|
| 99 |
+
|
| 100 |
+
where $\sin ( \cdot , \cdot )$ is the cosine similarity function defined in Eqn. 3, $\mathbb { 1 } _ { [ j \neq i ] } \in \{ 0 , 1 \}$ is equal to 1 iff $j \neq i$ , and $\tau$ is a temperature parameter empirically set to 0.07. We use a momentum decoder mechanism similar to that of MoCo (He et al., 2020) by maintaining a memory bank to delete the oldest negative pairs and update the new negative pairs. We apply augmentation methods including translation, color jittering, and cutout (DeVries & Taylor, 2017) on synthesized images. With the positive and negative pairs generated on-the-fly during training, the discriminator can effectively focus on the content of the input samples.
|
| 101 |
+
|
| 102 |
+
The choice of positive pairs in Eqn. 6 is specifically designed for cross-domain video synthesis, as videos of arbitrary content from the image domain is not available. In the case that images and videos are from the same domain, the positive and negative pairs are easier to obtain. We randomly select and augment two frames from a real video to create positive pairs sharing the same content, while the negative pairs contain augmented images from different real videos.
|
| 103 |
+
|
| 104 |
+
Aside from ${ \mathcal { L } } _ { \mathrm { c o n t r } }$ , we also adopt the feature matching loss (Wang et al., 2018b) ${ \mathcal { L } } _ { \mathrm { f } }$ between the generated first frame and other frames by changing the $L _ { 1 }$ regularization to cosine similarity.
|
| 105 |
+
|
| 106 |
+
Full Objective. The overall loss function for training motion generator, video discriminator, and image discriminator is thus defined as:
|
| 107 |
+
|
| 108 |
+
$$
|
| 109 |
+
\operatorname* { m i n } _ { G _ { \mathrm { M } } } ( \operatorname* { m a x } _ { D _ { \mathrm { V } } } \mathcal { L } _ { D _ { \mathrm { V } } } + \operatorname* { m a x } _ { D _ { \mathrm { I } } } \mathcal { L } _ { D _ { \mathrm { I } } } ) + \operatorname* { m a x } _ { G _ { \mathrm { M } } } ( \lambda _ { \mathrm { m } } \mathcal { L } _ { \mathrm { m } } + \lambda _ { \mathrm { f } } \mathcal { L } _ { \mathrm { f } } ) + \operatorname* { m i n } _ { D _ { \mathrm { I } } } ( \lambda _ { \mathrm { c o n t r } } \mathcal { L } _ { \mathrm { c o n t r } } )
|
| 110 |
+
$$
|
| 111 |
+
|
| 112 |
+
where $\lambda _ { \mathrm { m } }$ , $\lambda _ { \mathrm { c o n t r } }$ , and $\lambda _ { \mathrm { f } }$ are hyperparameters to balance losses.
|
| 113 |
+
|
| 114 |
+
# 4 EXPERIMENTS
|
| 115 |
+
|
| 116 |
+
In this section, we evaluate the proposed approach on several benchmark datasets for video generation. We also demonstrate cross-domain video synthesis for various image and video datasets.
|
| 117 |
+
|
| 118 |
+
# 4.1 VIDEO GENERATION
|
| 119 |
+
|
| 120 |
+
We conduct experiments on three datasets including UCF-101 (Soomro et al., 2012), FaceForensics (Rossler et al., 2018), and Sky Time-lapse (Xiong et al., 2018) for unconditional video synthesis. ¨ We use StyleGAN2 as the image generator. Training details can be found in Appx. B.
|
| 121 |
+
|
| 122 |
+
Table 1: IS and FVD on UCF-101.
|
| 123 |
+
|
| 124 |
+
<table><tr><td>Method</td><td>IS (↑)</td><td>FVD (↓)</td></tr><tr><td>VGAN</td><td>8.31 ± .09</td><td></td></tr><tr><td>TGAN</td><td>11.85 ± .07</td><td></td></tr><tr><td>MoCoGAN</td><td>12.42 ± .07</td><td></td></tr><tr><td>ProgressiveVGAN</td><td>14.56 ± .05</td><td></td></tr><tr><td>LDVD-GAN</td><td>22.91 ± .19</td><td></td></tr><tr><td>TGANv2</td><td>26.60 ± .47</td><td>1209 ± 28</td></tr><tr><td>DVD-GAN</td><td>27.38 ± .53</td><td>=</td></tr><tr><td>Ours</td><td>33.95 ± .25</td><td>700 ± 24</td></tr></table>
|
| 125 |
+
|
| 126 |
+
Table 2: FVD, ACD, and Human Preference on FaceForensics.
|
| 127 |
+
|
| 128 |
+
<table><tr><td>Method</td><td>FVD (↓)</td><td>ACD (↓)</td></tr><tr><td>GT</td><td>9.02</td><td>0.2935</td></tr><tr><td>TGANv2 Ours</td><td>58.03 53.26</td><td>0.4914 0.3300</td></tr><tr><td></td><td></td><td></td></tr><tr><td>Method</td><td>Human Preference</td><td>(%)</td></tr><tr><td>Ours /TGANv2</td><td></td><td>73.6 / 26.4</td></tr></table>
|
| 129 |
+
|
| 130 |
+
UCF-101 is widely used in video generation. The dataset includes 13, 320 videos of 101 sport categories. The resolution of each video is $3 2 0 \times 2 4 0$ . To process the data, we crop a rectangle with size of $2 4 0 \times 2 4 0$ from each frame in a video and resize it to $2 5 6 \times 2 5 6$ . We train the motion generator to predict 16 frames. For evaluation, we report Inception Score (IS) (Saito et al., 2020) on 10, 000 generated videos and Fr´echet Video Distance (FVD) (Unterthiner et al., 2018) on 2, 048 videos. The classifier used to calculate IS is a C3D network (Tran et al., 2015) that is trained on the Sports-1M dataset (Karpathy et al., 2014) and fine-tuned on UCF-101, which is the same model used in previous works (Saito et al., 2020; Clark et al., 2019).
|
| 131 |
+
|
| 132 |
+
The quantitative results are shown in Tab. 1. Our method achieves state-of-the-art results for both IS and FVD, and outperforms existing works by a large margin. Interestingly, this result indicates that a well-trained image generator has learned to represent rich motion patterns, and therefore can be used to synthesize high-quality videos when used with a well-trained motion generator.
|
| 133 |
+
|
| 134 |
+
FaceForensics is a dataset containing news videos featuring various reporters. We use all the images from 704 training videos, with a resolution of $2 5 6 \times 2 5 6$ , to learn an image generator, and sequences of 16 consecutive frames to train motion generator. Note that our network can generate even longer continuous sequences, e.g. 64 frames (Fig. 12 in Appx.), though only 16 frames are used for training.
|
| 135 |
+
|
| 136 |
+
We show the FVD between generated and real video clips (16 frames in length) for different methods in Tab. 2. Additionally, we use the Average Content Distance (ACD) from MoCoGAN (Tulyakov et al., 2018) to evaluate the identity consistency for these human face videos. We calculate ACD values over 256 videos. We also report the two metrics for ground truth (GT) videos. To get FVD of GT videos, we randomly sample two groups of real videos and compute the score. Our method achieves better results than TGANv2 (Saito et al., 2020). Both methods have low FVD values, and can generate complex motion patterns
|
| 137 |
+
|
| 138 |
+

|
| 139 |
+
Figure 2: Example generated videos from a model trained on FaceForensics. We can generate natural and photo-realistic videos with various motion patterns, such as eye blink and talking. Four examples show frames 2, 7, 11, and 16.
|
| 140 |
+
|
| 141 |
+
close to the real data. However, the much lower ACD value of our approach, which is close to GT, demonstrates that the videos it synthesizes have much better identity consistency than the videos from TGANv2. Qualitative examples in Fig. 2 illustrate different motions patterns learned from the dataset. Furthermore, we perform perceptual experiments using Amazon Mechanical Turk (AMT) by presenting a pair of videos from the two methods to users and asking them to select a more realistic one. Results in Tab. 2 indicate our method outperforms TGANv2 in $7 3 . 6 \%$ of the comparisons.
|
| 142 |
+
|
| 143 |
+
Sky Time-Lapse is a video dataset consisting of dynamic sky scenes, such as moving clouds. The number of video clips for training and testing is 35, 392 and 2, 815, respectively. We resize images to $1 2 8 \times 1 2 8$ and train the model to generate 16 frames. We compare our methods with the two recent approaches of MDGAN (Xiong et al., 2018) and DTVNet (Zhang et al., 2020), which are specifically designed for this dataset. In Tab. 3, we report the FVD for all three methods. It is clear that our approach significantly outperforms the others. Example sequences are shown in Fig. 3.
|
| 144 |
+
|
| 145 |
+
Following DTVNet (Zhang et al., 2020), we evaluate the proposed model for the task of video prediction. We use the Peak Signal-to-Noise Ratio (PSNR) and Structural Similarity (SSIM) (Wang et al., 2004) as evaluation metrics to measure the frame quality at the pixel level and the structural similarity between synthesized and real video frames. Evaluation is performed on the testing set. We select the first frame $\mathbf { x } _ { 1 }$ from each video clip and project it to the latent space of the image generator (Abdal et al., 2020) to get $\hat { \mathbf { z } } _ { 1 }$ . We use $\hat { \mathbf { z } } _ { 1 }$ as the starting latent code for motion generator to get 16 latent codes, and interpolate them to get 32 latent codes to synthesize a video sequence, where the first frame is given by $G _ { \mathrm { I } } ( \hat { \bf z } _ { 1 } )$ . For a fair comparison, we also use $G _ { \mathrm { I } } ( \hat { \bf z } _ { 1 } )$ as the starting frame for MDGAN and DTVNet to calculate the metrics with ground truth videos. In addition, we calculate the PSNR and SSIM between $\mathbf { x } _ { 1 }$ and $G _ { \mathrm { I } } ( \hat { \bf z } _ { 1 } )$ as the upper bound for all methods, which we denote as Up-B. Tab. 3 shows the video prediction results, which demonstrate that our method’s performance is superior to those of MDGAN and DTVNet. Interestingly, by simply interpolating the motion trajectory, we can easily generate longer video sequence, e.g. from 16 to 32 frames, while retaining high quality.
|
| 146 |
+
|
| 147 |
+
Table 3: Evaluation on Sky Time-lapse for video synthesis and prediction.
|
| 148 |
+
|
| 149 |
+
<table><tr><td>Method</td><td>FVD (↓)</td><td>PSNR (↑)</td><td>SSIM (↑)</td></tr><tr><td>Up-B</td><td>1</td><td>25.367</td><td>0.781</td></tr><tr><td>MDGAN</td><td>840.95</td><td>13.840</td><td>0.581</td></tr><tr><td>DTVNet</td><td>451.14</td><td>21.953</td><td>0.531</td></tr><tr><td>Ours</td><td>77.77</td><td>22.286</td><td>0.688</td></tr></table>
|
| 150 |
+
|
| 151 |
+

|
| 152 |
+
Figure 3: Sample generated frames at several time steps $\mathbf { \rho } ( t )$ for the Sky Time-lapse dataset.
|
| 153 |
+
|
| 154 |
+

|
| 155 |
+
Figure 4: Example sequences for cross-domain video generation. First Row: (FFHQ, VoxCeleb). Second Row: (LSUN-Church, TLVDB). Third Row: (AFHQ-Dog, VoxCeleb). Fourth Row: (AnimeFaces, VoxCeleb). Images in the first and second rows have a resolution of $2 5 6 \times 2 5 6$ , while the third and fourth rows have a resolution of $5 1 2 \times 5 1 2$ .
|
| 156 |
+
|
| 157 |
+
# 4.2 CROSS-DOMAIN VIDEO GENERATION
|
| 158 |
+
|
| 159 |
+
To demonstrate how our approach can disentangle motion from image content and transfer motion patterns from one domain to another, we perform several experiments on various datasets. More specifically, we use the StyleGAN2 model, pre-trained on the FFHQ (Karras et al., 2019), AFHQDog (Choi et al., 2020), AnimeFaces (Branwen, 2019), and LSUN-Church (Yu et al., 2015) datasets, as the image generators. We learn human facial motion from VoxCeleb (Nagrani et al., 2020) and time-lapse transitions in outdoor scenes from TLVDB (Shih et al., 2013). In these experiments, a pair such as (FFHQ, VoxCeleb) indicates that we synthesize videos with image content from FFHQ and motion patterns from VoxCeleb. We generate videos with a resolution of $2 5 6 \times 2 5 6$ and $1 0 2 4 \times 1 0 2 4$ for FFHQ, $5 1 2 \times 5 1 2$ for AFHQ-Dog and AnimeFaces, and $2 5 6 \times 2 5 6$ for LSUN-Church. Qualitative examples for (FFHQ, VoxCeleb), (LSUN-Church, TLVDB), (AFHQ-Dog, VoxCeleb), and (AnimeFaces, VoxCeleb) are shown in Fig. 4, depicting high-quality and temporally consistent videos (more videos, including results with BigGAN as the image generator, are shown in the Appendix).
|
| 160 |
+
|
| 161 |
+
We also demonstrate how the motion and content are disentangled in Fig. 5 and Fig. 6, which portray generated videos with the same identity but performing diverse motion patterns, and the same motion applied to different identities, respectively. We show results from (AFHQ-Dog, VoxCeleb) (first two rows) and (AnimeFaces, VoxCeleb) (last two rows) in these two figures.
|
| 162 |
+
|
| 163 |
+

|
| 164 |
+
Figure 5: The first and second row (also the third and fourth row) share the same initial content code but with different motion codes.
|
| 165 |
+
|
| 166 |
+

|
| 167 |
+
Figure 6: The first and second row (also the third and fourth row) share the same motion code but with different content codes.
|
| 168 |
+
|
| 169 |
+
# 4.3 ABLATION ANALYSIS
|
| 170 |
+
|
| 171 |
+
We first report IS and FVD in Tab. 4 for UCF-101 using the following methods: w/o Eqn. 2 uses $\mathbf { z } _ { t } =$ $\mathbf { h } _ { t }$ instead of estimating the residual as in Eqn. 2; w/o $D _ { \mathrm { I } }$ omits the contrastive image discriminator $D _ { \mathrm { I } }$ and uses the video discriminator $D _ { \mathrm { { V } } }$ only for learning the motion generator; w/o $D _ { \mathrm { { V } } }$ omits $D _ { \mathrm { V } }$ during training; and Full-128 and $F u l l { - } 2 5 6$ indicate that we generate videos using our full method with resolutions of $1 2 8 \times 1 2 8$ and $2 5 6 \times 2 5 6$ , respectively. We resize frames for all methods to $1 2 8 \times 1 2 8$ when calculating IS and FVD. The full method outperforms all others, proving the importance of each module for learning temporally consistent and high-quality videos.
|
| 172 |
+
|
| 173 |
+
We perform further analysis of our cross-domain video generation on (FFHQ, VoxCeleb). We compare our full method $( F u l l )$ with two variants. w/o ${ \mathcal { L } } _ { \mathrm { c o n t r } }$ denotes that we omit the contrastive loss (Eqn. 6) from $D _ { \mathrm { I } }$ , and w/o ${ \mathcal { L } } _ { \mathrm { m } }$ indicates that we omit the mutual information loss (Eqn. 3) for the motion generator. The results in Tab. 5 demonstrate that ${ \mathcal { L } } _ { \mathrm { c o n t r } }$ is beneficial for learning videos with coherent content, as employing ${ \mathcal { L } } _ { \mathrm { c o n t r } }$ results in lower ACD values and higher human preferences. ${ \mathcal { L } } _ { \mathrm { m } }$ also contributes to generating higher quality videos by mitigating motion synchronization. To validate the motion diversity, we show pairs of 9 randomly generated videos from the two methods to users and ask them to choose which one has superior motion diversity, including rotations and facial expressions. User preference suggests that using ${ \mathcal { L } } _ { \mathrm { m } }$ increases motion diversity.
|
| 174 |
+
|
| 175 |
+
Table 4: Ablation study on UCF-101.
|
| 176 |
+
|
| 177 |
+
<table><tr><td>Method</td><td>IS (↑)</td><td>FVD (↓)</td></tr><tr><td>w/o Eqn. 2</td><td>28.20</td><td>790.87</td></tr><tr><td>w/o D1</td><td>33.22</td><td>796.67</td></tr><tr><td>w/o Dv</td><td>33.84</td><td>867.43</td></tr><tr><td>Full-128</td><td>32.36</td><td>838.09</td></tr><tr><td>Full-256</td><td>33.95</td><td>700.00</td></tr></table>
|
| 178 |
+
|
| 179 |
+
Table 5: Ablation study on (FFHQ, VoxCeleb).
|
| 180 |
+
|
| 181 |
+
<table><tr><td>Method</td><td>w/o Lcontr</td><td>w/o Lm</td><td>Full</td></tr><tr><td>ACD (↓)</td><td>0.5328</td><td>0.5158</td><td>0.4353</td></tr><tr><td>Method</td><td></td><td>Human Preference (%)</td><td></td></tr><tr><td>Full vs w/o Lcontr Full vs w/o Lm</td><td></td><td>68.3 / 31.7 64.4 / 35.6</td><td></td></tr></table>
|
| 182 |
+
|
| 183 |
+
# 4.4 LONG SEQUENCE GENERATION
|
| 184 |
+
|
| 185 |
+
Due to the limitation of computational resources, we train MoCoGAN-HD to synthesize 16 consecutive frames. However, we can generate longer video sequences during inference by applying the following two ways.
|
| 186 |
+
|
| 187 |
+
Motion Generator Unrolling. For motion generator, we can run the LSTM decoder for more steps to synthesize long video sequences. In Fig. 7, we show a synthesized video example of 64 frames using the model trained on the FaceForensics dataset. Our method is capable to synthesize videos with more frames than the number of frames used for training.
|
| 188 |
+
|
| 189 |
+

|
| 190 |
+
Figure 7: The generation of a 64-frame video using a model trained with 16-frame on FaceForensics.
|
| 191 |
+
|
| 192 |
+
Motion Interpolation. We can do interpolation on the motion trajectory directly to synthesize long videos. Fig. 8 shows an interpolation example of 32-frame on (AFHQ-Dog, VoxCeleb) dataset.
|
| 193 |
+
|
| 194 |
+

|
| 195 |
+
Figure 8: The generation of a 32-frame video on (AFHQ-Dog, VoxCeleb) by doing the interpolation on motion trajectory.
|
| 196 |
+
|
| 197 |
+
# 5 CONCLUSION
|
| 198 |
+
|
| 199 |
+
In this work, we present a novel approach to video synthesis. Building on contemporary advances in image synthesis, we show that a good image generator and our framework are essential ingredients to boost video synthesis fidelity and resolution. The key is to find a meaningful trajectory in the image generator’s latent space. This is achieved using the proposed motion generator, which produces a sequence of motion residuals, with the contrastive image discriminator and video discriminator. This disentangled representation further extends applications of video synthesis to content and motion manipulation and cross-domain video synthesis. The framework achieves superior results on a variety of benchmarks and reaches resolutions unattainable by prior state-of-the-art techniques.
|
| 200 |
+
|
| 201 |
+
# REFERENCES
|
| 202 |
+
|
| 203 |
+
Rameen Abdal, Yipeng Qin, and Peter Wonka. Image2stylegan $^ { + + }$ : How to edit the embedded images? In CVPR, 2020.
|
| 204 |
+
|
| 205 |
+
Dinesh Acharya, Zhiwu Huang, Danda Pani Paudel, and Luc Van Gool. Towards high resolution video generation with progressive growing of sliced wasserstein gans. arXiv:1810.02419, 2018.
|
| 206 |
+
|
| 207 |
+
Mohammad Babaeizadeh, Chelsea Finn, Dumitru Erhan, Roy H Campbell, and Sergey Levine. Stochastic variational video prediction. In ICLR, 2017.
|
| 208 |
+
|
| 209 |
+
Aayush Bansal, Shugao Ma, Deva Ramanan, and Yaser Sheikh. Recycle-gan: Unsupervised video retargeting. In ECCV, 2018.
|
| 210 |
+
|
| 211 |
+
Gwern Branwen. Making anime faces with stylegan. 2019.
|
| 212 |
+
|
| 213 |
+
Andrew Brock, Jeff Donahue, and Karen Simonyan. Large scale GAN training for high fidelity natural image synthesis. In ICLR, 2019.
|
| 214 |
+
|
| 215 |
+
Wonmin Byeon, Qin Wang, Rupesh Kumar Srivastava, and Petros Koumoutsakos. Contextvp: Fully context-aware video prediction. In ECCV, 2018.
|
| 216 |
+
|
| 217 |
+
Caroline Chan, Shiry Ginosar, Tinghui Zhou, and Alexei A Efros. Everybody dance now. In ICCV, 2019.
|
| 218 |
+
|
| 219 |
+
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. In ICML, 2020a.
|
| 220 |
+
|
| 221 |
+
Ting Chen, Simon Kornblith, Kevin Swersky, Mohammad Norouzi, and Geoffrey Hinton. Big selfsupervised models are strong semi-supervised learners. arXiv:2006.10029, 2020b.
|
| 222 |
+
|
| 223 |
+
Yunjey Choi, Youngjung Uh, Jaejun Yoo, and Jung-Woo Ha. Stargan v2: Diverse image synthesis for multiple domains. In CVPR, 2020.
|
| 224 |
+
|
| 225 |
+
Aidan Clark, Jeff Donahue, and Karen Simonyan. Adversarial video generation on complex datasets. arXiv, 2019.
|
| 226 |
+
|
| 227 |
+
Emily Denton and Rob Fergus. Stochastic video generation with a learned prior. In ICML, 2018.
|
| 228 |
+
|
| 229 |
+
Emily L Denton et al. Unsupervised learning of disentangled representations from video. In Advances in neural information processing systems, pp. 4414–4423, 2017.
|
| 230 |
+
|
| 231 |
+
Terrance DeVries and Graham W Taylor. Improved regularization of convolutional neural networks with cutout. arXiv:1708.04552, 2017.
|
| 232 |
+
|
| 233 |
+
Jeff Donahue and Karen Simonyan. Large scale adversarial representation learning. In NeurIPS, 2019.
|
| 234 |
+
|
| 235 |
+
Frederik Ebert, Chelsea Finn, Alex X Lee, and Sergey Levine. Self-supervised visual planning with temporal skip connections. arXiv preprint arXiv:1710.05268, 2017.
|
| 236 |
+
|
| 237 |
+
Lore Goetschalckx, Alex Andonian, Aude Oliva, and Phillip Isola. Ganalyze: Toward visual definitions of cognitive image properties. In ICCV, 2019.
|
| 238 |
+
|
| 239 |
+
Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. Generative adversarial nets. In NeurIPS, 2014.
|
| 240 |
+
|
| 241 |
+
Michael Gutmann and Aapo Hyvarinen. Noise-contrastive estimation: A new estimation principle ¨ for unnormalized statistical models. In AISTATS, 2010.
|
| 242 |
+
|
| 243 |
+
Raia Hadsell, Sumit Chopra, and Yann LeCun. Dimensionality reduction by learning an invariant mapping. In CVPR, 2006.
|
| 244 |
+
|
| 245 |
+
Erik Hark ¨ onen, Aaron Hertzmann, Jaakko Lehtinen, and Sylvain Paris. Ganspace: Discovering ¨ interpretable gan controls. arXiv:2004.02546, 2020.
|
| 246 |
+
|
| 247 |
+
Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020.
|
| 248 |
+
|
| 249 |
+
Olivier J Henaff, Aravind Srinivas, Jeffrey De Fauw, Ali Razavi, Carl Doersch, SM Eslami, and ´ Aaron van den Oord. Data-efficient image recognition with contrastive predictive coding. In ICML, 2020.
|
| 250 |
+
|
| 251 |
+
Martin Heusel, Hubert Ramsauer, Thomas Unterthiner, Bernhard Nessler, and Sepp Hochreiter. Gans trained by a two time-scale update rule converge to a local nash equilibrium. In NeurIPs, 2017.
|
| 252 |
+
|
| 253 |
+
R Devon Hjelm, Alex Fedorov, Samuel Lavoie-Marchildon, Karan Grewal, Phil Bachman, Adam Trischler, and Yoshua Bengio. Learning deep representations by mutual information estimation and maximization. In ICLR, 2019.
|
| 254 |
+
|
| 255 |
+
Sepp Hochreiter and Jurgen Schmidhuber. Long short-term memory. ¨ Neural computation, 1997.
|
| 256 |
+
|
| 257 |
+
Jun-Ting Hsieh, Bingbin Liu, De-An Huang, Li F Fei-Fei, and Juan Carlos Niebles. Learning to decompose and disentangle representations for video prediction. In NeurIPS, 2018.
|
| 258 |
+
|
| 259 |
+
Phillip Isola, Jun-Yan Zhu, Tinghui Zhou, and Alexei A Efros. Image-to-image translation with conditional adversarial networks. In CVPR, 2017.
|
| 260 |
+
|
| 261 |
+
Ali Jahanian, Lucy Chai, and Phillip Isola. On the”steerability” of generative adversarial networks. In ICLR, 2020.
|
| 262 |
+
|
| 263 |
+
Qing Jin, Jian Ren, Oliver J. Woodford, Jiazhuo Wang, Geng Yuan Yuan, Yanzhi Wang, and Sergey Tulyakov. Teachers do more than teach: Compressing image-to-image models. arXiv preprint arXiv:2103.03467, 2021.
|
| 264 |
+
|
| 265 |
+
Justin Johnson, Alexandre Alahi, and Li Fei-Fei. Perceptual losses for real-time style transfer and super-resolution. In ECCV, 2016.
|
| 266 |
+
|
| 267 |
+
Emmanuel Kahembwe and Subramanian Ramamoorthy. Lower dimensional kernels for video discriminators. Neural Networks, 132:506–520, 2020.
|
| 268 |
+
|
| 269 |
+
Andrej Karpathy, George Toderici, Sanketh Shetty, Thomas Leung, Rahul Sukthankar, and Li FeiFei. Large-scale video classification with convolutional neural networks. In CVPR, 2014.
|
| 270 |
+
|
| 271 |
+
Tero Karras, Timo Aila, Samuli Laine, and Jaakko Lehtinen. Progressive growing of gans for improved quality, stability, and variation. arXiv:1710.10196, 2017.
|
| 272 |
+
|
| 273 |
+
Tero Karras, Samuli Laine, and Timo Aila. A style-based generator architecture for generative adversarial networks. In CVPR, 2019.
|
| 274 |
+
|
| 275 |
+
Tero Karras, Miika Aittala, Janne Hellsten, Samuli Laine, Jaakko Lehtinen, and Timo Aila. Training generative adversarial networks with limited data. arXiv:2006.06676, 2020a.
|
| 276 |
+
|
| 277 |
+
Tero Karras, Samuli Laine, Miika Aittala, Janne Hellsten, Jaakko Lehtinen, and Timo Aila. Analyzing and improving the image quality of stylegan. In CVPR, 2020b.
|
| 278 |
+
|
| 279 |
+
Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv:1412.6980, 2014.
|
| 280 |
+
|
| 281 |
+
Sindy Lowe, Peter O’Connor, and Bastiaan Veeling. Putting an end to end-to-end: Gradient-isolated ¨ learning of representations. In NeurIPS, 2019.
|
| 282 |
+
|
| 283 |
+
Ishan Misra and Laurens van der Maaten. Self-supervised learning of pretext-invariant representations. In CVPR, 2020.
|
| 284 |
+
|
| 285 |
+
A. Nagrani, J. S. Chung, and A. Zisserman. Voxceleb: a large-scale speaker identification dataset. In INTERSPEECH, 2017.
|
| 286 |
+
|
| 287 |
+
Arsha Nagrani, Joon Son Chung, Weidi Xie, and Andrew Zisserman. Voxceleb: Large-scale speaker verification in the wild. Computer Speech & Language, 2020.
|
| 288 |
+
|
| 289 |
+
Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv:1807.03748, 2018.
|
| 290 |
+
Taesung Park, Alexei A. Efros, Richard Zhang, and Jun-Yan Zhu. Contrastive learning for unpaired image-to-image translation. In ECCV, 2020.
|
| 291 |
+
Antoine Plumerault, Herve Le Borgne, and C ´ eline Hudelot. Controlling generative models with ´ continuous factors of variations. In ICLR, 2020.
|
| 292 |
+
Alec Radford, Luke Metz, and Soumith Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In ICLR, 2016.
|
| 293 |
+
Jian Ren, Menglei Chai, Sergey Tulyakov, Chen Fang, Xiaohui Shen, and Jianchao Yang. Human motion transfer from poses in the wild. arXiv:2004.03142, 2020.
|
| 294 |
+
Andreas Rossler, Davide Cozzolino, Luisa Verdoliva, Christian Riess, Justus Thies, and Matthias ¨ Nießner. Faceforensics: A large-scale video dataset for forgery detection in human faces. arXiv:1803.09179, 2018.
|
| 295 |
+
Masaki Saito, Eiichi Matsumoto, and Shunta Saito. Temporal generative adversarial nets with singular value clipping. In ICCV, 2017.
|
| 296 |
+
Masaki Saito, Shunta Saito, Masanori Koyama, and Sosuke Kobayashi. Train sparsely, generate densely: Memory-efficient unsupervised training of high-resolution temporal gan. IJCV, 2020.
|
| 297 |
+
Yujun Shen and Bolei Zhou. Closed-form factorization of latent semantics in gans. arXiv:2007.06600, 2020.
|
| 298 |
+
Yujun Shen, Jinjin Gu, Xiaoou Tang, and Bolei Zhou. Interpreting the latent space of gans for semantic face editing. In CVPR, 2020.
|
| 299 |
+
Yichang Shih, Sylvain Paris, Fredo Durand, and William T Freeman. Data-driven hallucination of ´ different times of day from a single outdoor photo. TOG, 2013.
|
| 300 |
+
Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv:1409.1556, 2014.
|
| 301 |
+
Khurram Soomro, Amir Roshan Zamir, and Mubarak Shah. Ucf101: A dataset of 101 human actions classes from videos in the wild. arXiv:1212.0402, 2012.
|
| 302 |
+
Du Tran, Lubomir Bourdev, Rob Fergus, Lorenzo Torresani, and Manohar Paluri. Learning spatiotemporal features with 3d convolutional networks. In ICCV, 2015.
|
| 303 |
+
Sergey Tulyakov, Ming-Yu Liu, Xiaodong Yang, and Jan Kautz. Mocogan: Decomposing motion and content for video generation. In CVPR, 2018.
|
| 304 |
+
Thomas Unterthiner, Sjoerd van Steenkiste, Karol Kurach, Raphael Marinier, Marcin Michalski, and Sylvain Gelly. Towards accurate generative models of video: A new metric & challenges. arXiv:1812.01717, 2018.
|
| 305 |
+
Ruben Villegas, Jimei Yang, Seunghoon Hong, Xunyu Lin, and Honglak Lee. Decomposing motion and content for natural video sequence prediction. In ICLR, 2017a.
|
| 306 |
+
Ruben Villegas, Jimei Yang, Yuliang Zou, Sungryull Sohn, Xunyu Lin, and Honglak Lee. Learning to generate long-term future via hierarchical prediction. In ICML, 2017b.
|
| 307 |
+
Carl Vondrick, Hamed Pirsiavash, and Antonio Torralba. Generating videos with scene dynamics. In NeurIPS, 2016.
|
| 308 |
+
Andrey Voynov and Artem Babenko. Unsupervised discovery of interpretable directions in the gan latent space. In ICML, 2020.
|
| 309 |
+
Jacob Walker, Kenneth Marino, Abhinav Gupta, and Martial Hebert. The pose knows: Video forecasting by generating pose futures. In ICCV, 2017.
|
| 310 |
+
|
| 311 |
+
Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Guilin Liu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. Video-to-video synthesis. In NeurIPS, 2018a.
|
| 312 |
+
|
| 313 |
+
Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu, Andrew Tao, Jan Kautz, and Bryan Catanzaro. Highresolution image synthesis and semantic manipulation with conditional gans. In CVPR, 2018b.
|
| 314 |
+
|
| 315 |
+
Ting-Chun Wang, Ming-Yu Liu, Andrew Tao, Guilin Liu, Jan Kautz, and Bryan Catanzaro. Fewshot video-to-video synthesis. In NeurIPS, 2019.
|
| 316 |
+
|
| 317 |
+
Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. Image quality assessment: from error visibility to structural similarity. TIP, 2004.
|
| 318 |
+
|
| 319 |
+
Dirk Weissenborn, Oscar Tackstr ¨ om, and Jakob Uszkoreit. Scaling autoregressive video models. In ¨ ICLR, 2020.
|
| 320 |
+
|
| 321 |
+
Zhirong Wu, Yuanjun Xiong, X Yu Stella, and Dahua Lin. Unsupervised feature learning via nonparametric instance discrimination. In CVPR, 2018.
|
| 322 |
+
|
| 323 |
+
Wei Xiong, Wenhan Luo, Lin Ma, Wei Liu, and Jiebo Luo. Learning to generate time-lapse videos using multi-stage dynamic generative adversarial networks. In CVPR, 2018.
|
| 324 |
+
|
| 325 |
+
Zili Yi, Hao Zhang, Ping Tan, and Minglun Gong. Dualgan: Unsupervised dual learning for imageto-image translation. In ICCV, 2017.
|
| 326 |
+
|
| 327 |
+
Fisher Yu, Ari Seff, Yinda Zhang, Shuran Song, Thomas Funkhouser, and Jianxiong Xiao. Lsun: Construction of a large-scale image dataset using deep learning with humans in the loop. arXiv:1506.03365, 2015.
|
| 328 |
+
|
| 329 |
+
Vladyslav Yushchenko, Nikita Araslanov, and Stefan Roth. Markov decision process for video generation. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pp. 0–0, 2019.
|
| 330 |
+
|
| 331 |
+
Han Zhang, Ian Goodfellow, Dimitris Metaxas, and Augustus Odena. Self-attention generative adversarial networks. In ICML, 2019.
|
| 332 |
+
|
| 333 |
+
Jiangning Zhang, Chao Xu, Liang Liu, Mengmeng Wang, Xia Wu, Yong Liu, and Yunliang Jiang. Dtvnet: Dynamic time-lapse video generation via single still image. In ECCV, 2020.
|
| 334 |
+
|
| 335 |
+
Long Zhao, Xi Peng, Yu Tian, Mubbasir Kapadia, and Dimitris Metaxas. Learning to forecast and refine residual motion for image-to-video generation. In Proceedings of the European conference on computer vision (ECCV), pp. 387–403, 2018.
|
| 336 |
+
|
| 337 |
+
Shengyu Zhao, Zhijian Liu, Ji Lin, Jun-Yan Zhu, and Song Han. Differentiable augmentation for data-efficient gan training. arXiv:2006.10738, 2020a.
|
| 338 |
+
|
| 339 |
+
Zhengli Zhao, Zizhao Zhang, Ting Chen, Sameer Singh, and Han Zhang. Image augmentations for gan training. arXiv:2006.02595, 2020b.
|
| 340 |
+
|
| 341 |
+
Jiapeng Zhu, Yujun Shen, Deli Zhao, and Bolei Zhou. In-domain gan inversion for real image editing. In ECCV, 2020.
|
| 342 |
+
|
| 343 |
+
Jun-Yan Zhu, Taesung Park, Phillip Isola, and Alexei A Efros. Unpaired image-to-image translation using cycle-consistent adversarial networks. In ICCV, 2017.
|
| 344 |
+
|
| 345 |
+
# A ADDITIONAL DETAILS FOR THE FRAMEWORK
|
| 346 |
+
|
| 347 |
+
# A.1 ADDITIONAL DETAILS FOR THE MOTION GENERATOR
|
| 348 |
+
|
| 349 |
+
To use StyleGAN2 (Karras et al., 2020b) as the image generator, we randomly sample $1 , 0 0 0 , 0 0 0$ latent codes from the input space $\mathcal { Z }$ and send them to the 8-layer MLPs to get the latent codes in the space of $\mathcal { W }$ . Each latent code is a 512-dimension vector. We perform PCA on these 1, 000, 000 latent codes and select the top 384 principal components to form the matrix $\mathbf { V } \in \mathbb { R } ^ { 3 8 4 \times 5 1 2 }$ , which is used to model the motion residuals in Eqn. 2. The LSTM encoder and the LSTM decoder in the motion generator both have an input size of 512 and a hidden size of 384. The noise vector $\epsilon _ { t }$ in Eqn. 1 is also a 512-dimension vector, and the network $H$ in Eqn. 3 is a 2-layer MLPs with 512 hidden units in each of the two fully-connected layers.
|
| 350 |
+
|
| 351 |
+
For BigGAN (Brock et al., 2019), we sample the latent code directly from the space of $\mathcal { Z }$
|
| 352 |
+
|
| 353 |
+
A.2 ADDITIONAL DETAILS FOR THE DISCRIMINATORS
|
| 354 |
+
|
| 355 |
+
# A.2.1 VIDEO DISCRIMINATOR
|
| 356 |
+
|
| 357 |
+
The input images for the video discriminator $D _ { \mathrm { { V } } }$ are processed at two scales. We downsample the output images from the image generator to the resolution of $1 2 8 \times 1 2 8$ and $6 4 \times 6 4$ . For indomain video synthesis, the input sequences for $D _ { \mathrm { { V } } }$ have the shape of $6 \times ( n - 1 ) \times 1 2 8 \times 1 2 8$ and $6 \times ( n - 1 ) \times \mathbf { \bar { 6 4 } } \times 6 4$ , where $n$ is the sequence length used for training. For each of the $( n - 1 )$ subsequent frames, we concatenate the RGB channels of both the first frame and that subsequent frame, resulting in a 6-channel input. For cross-domain video synthesis, the input sequences for $D _ { \mathrm { { V } } }$ have the shape of $3 \times n \times 1 2 8 \times 1 2 8$ and $3 \times n \times 6 4 \times 6 4$ , as the concatenation of the first frame will make the discriminator aware the domain gaps. Details for $D _ { \mathrm { { V } } }$ are shown in Tab. 6.
|
| 358 |
+
|
| 359 |
+
Table 6: The network architecture for video discriminator.
|
| 360 |
+
|
| 361 |
+
<table><tr><td>Operation</td><td>Kernel</td><td>Strides</td><td># Channels</td><td>Norm Type</td><td>Nonlinearity</td></tr><tr><td>Conv3d</td><td>4×4</td><td>2</td><td>64</td><td></td><td>Leaky ReLU (0.2)</td></tr><tr><td>Conv3d</td><td>4×4</td><td>2</td><td>128</td><td>InstanceNorm3d</td><td>Leaky ReLU (0.2)</td></tr><tr><td>Conv3d</td><td>4×4</td><td>2</td><td>256</td><td>InstanceNorm3d</td><td>Leaky ReLU (0.2)</td></tr><tr><td>Conv3d</td><td>4×4</td><td>1</td><td>512</td><td>InstanceNorm3d</td><td>Leaky ReLU (0.2)</td></tr><tr><td>Conv3d</td><td>4×4</td><td>1</td><td>1</td><td>=</td><td>=</td></tr></table>
|
| 362 |
+
|
| 363 |
+
# A.2.2 IMAGE DISCRIMINATOR
|
| 364 |
+
|
| 365 |
+
The image discriminator $D _ { \mathrm { I } }$ has an architecture based on that of the $\mathrm { B i g G A N }$ discriminator, except that we remove the self-attention layer. The feature extractor $F$ used for contrastive learning has the same architecture as $D _ { \mathrm { I } }$ , except that it does not include the last layer of $D _ { \mathrm { I } }$ but has two additional fully connected (FC) layers as the projection head. The number of hidden units for these two FC layers are both 256.
|
| 366 |
+
|
| 367 |
+
Here we describe in more detail the image augmentation and memory bank techniques used for conducting contrastive learning.
|
| 368 |
+
|
| 369 |
+
Image Augmentation. We perform data augmentation on images to create positive and negative pairs. We normalize the images to $[ - 1 , 1 ]$ and apply the following augmentation techniques.
|
| 370 |
+
|
| 371 |
+
• Affine. We augment each image with an affine transformation defined with three random parameters: rotation $\alpha _ { r } \in \mathcal { U } ( \bar { - } 1 8 0 , 1 8 0 )$ , translation $\alpha _ { t } \in \mathcal { U } ( - 0 . 1 , 0 . 1 )$ , and scale $\alpha _ { s } \in$ $\mathcal { U } ( 0 . 9 5 , 1 . 0 5 )$ .
|
| 372 |
+
• Brightness. We add a random value $\alpha _ { b } \sim \mathcal { U } ( - 0 . 5 , 0 . 5 )$ to all channels of each image.
|
| 373 |
+
• Color. We add a random value $\alpha _ { c } \sim \mathcal { U } ( - 0 . 5 , 0 . 5 )$ to one randomly-selected channel of each image.
|
| 374 |
+
|
| 375 |
+
• Cutout (DeVries & Taylor, 2017). We mask out pixels in a random subregion of each image to 0. Each subregion starts at a random point and with size $( \alpha _ { m } H , \alpha _ { m } W )$ , where $\alpha _ { m } \sim \mathcal { U } ( 0 , 0 . 2 5 )$ and $( H , W )$ is the image resolution.
|
| 376 |
+
|
| 377 |
+
• Flipping. We horizontally flip the image with the probability of 0.5.
|
| 378 |
+
|
| 379 |
+
Memory Bank. It has been shown that contrastive learning benefits from large batch-sizes and negative pairs (Chen et al., 2020b). To increase the number of negative pairs, we incorporate the memory mechanism from MoCo (He et al., 2020), which designates a memory bank to store negative examples. More specifically, we keep an exponential moving average of the image discriminator, and its output of fake video frames are buffered as negative examples. We use a memory bank with a dictionary size of 4, 096.
|
| 380 |
+
|
| 381 |
+
# B MORE DETAILS FOR EXPERIMENTS
|
| 382 |
+
|
| 383 |
+
Image Generators. We train the unconditional StyleGAN2 models from scratch on the UCF-101, FaceForensics, Sky Time-lapse, and AFHQ-Dog datasets. We train the image generators with the official Tensorflow code2 and select the checkpoints that obtain the best Fr´echet inception distance (FID) (Heusel et al., 2017) score to be used as the image generators. The FID score of each image generator is shown in Table 7. For FFHQ, AnimeFaces, and LSUN-Church, we simply use the released pre-trained models.
|
| 384 |
+
|
| 385 |
+
We also train an unconditional BigGAN model on the FFHQ dataset using the public PyTorch code3.
|
| 386 |
+
We train a model with resolution $1 2 8 \times 1 2 8$ and select the last checkpoint as the image generator.
|
| 387 |
+
|
| 388 |
+
Table 7: FID of our trained StyleGAN2 models on different datasets.
|
| 389 |
+
|
| 390 |
+
<table><tr><td></td><td>UCF-101</td><td>FaceForensics</td><td>Sky Time-lapse</td><td>AFHQ-Dog</td></tr><tr><td>FID</td><td>45.63</td><td>10.99</td><td>10.80</td><td>7.85</td></tr></table>
|
| 391 |
+
|
| 392 |
+
Training Time. We train each image generator for UCF-101, FaceForensics, Sky Time-lapse, and AFHQ-Dog in less than 2 days using 8 Tesla V100 GPUs. For FFHQ, AnimeFaces, and LSUNChurch, we use the released models with no training cost. The training time for video generators ranges from $1 . 5 \sim 3$ days depending on the datasets (Due to the memory issue, the training for generating videos with resolution of $1 , 0 2 4 \times 1 , 0 2 4$ was done on 8 Quadro RTX 8000, with 5 days). The total training time for all the datasets is $1 . 5 \sim 5$ days and the estimated cost for training on Google Cloud is $\$ 0.78 \sim \ S 2.3 K$ .
|
| 393 |
+
|
| 394 |
+
Implementation Details. We implement our experiments with PyTorch 1.3.1 and also tested them with PyTorch 1.6. We use the Adam optimizer (Kingma & Ba, 2014) with a learning rate of 0.0001 for $G _ { \mathrm { M } }$ , $D _ { \mathrm { { V } } }$ , and $D _ { \mathrm { I } }$ in all experiments. In Eqn. 2, we set $\lambda = 0 . 5$ for conventional video generation tasks and use a smaller $\lambda = 0 . 2$ for cross-domain video generation, as it improves the content consistency. In Eqn. 7, we set $\lambda _ { \mathrm { m } } = \lambda _ { \mathrm { c o n t r } } = \lambda _ { \mathrm { f } } = 1$ . Grid searching on these hyper-parameters could potentially lead to a performance boost. For TGANv2, we use the released code4 to train the models on UCF-101 and FaceForensics using 8 Tesla V100 with 16GB of GPU memory.
|
| 395 |
+
|
| 396 |
+
Video Prediction. For video prediction, we predict consecutive frames, given the first frame $\mathbf { x }$ from a test video clip as the input. We find the inverse latent code $\hat { \bf z } _ { 1 }$ for $\mathbf { x } _ { 1 }$ by minimizing the following objective:
|
| 397 |
+
|
| 398 |
+
$$
|
| 399 |
+
\hat { \mathbf { z } } _ { 1 } = \underset { \hat { \mathbf { z } } _ { 1 } } { \arg \operatorname* { m i n } } \left\| \mathbf { x } _ { 1 } - G _ { \mathrm { I } } ( \hat { \mathbf { z } } _ { 1 } ) \right\| _ { 2 } + \lambda _ { \mathrm { v g g } } \left\| F _ { \mathrm { v g g } } ( \mathbf { x } _ { 1 } ) - F _ { \mathrm { v g g } } ( G _ { \mathrm { I } } ( \hat { \mathbf { z } } _ { 1 } ) ) \right\| _ { 2 } ,
|
| 400 |
+
$$
|
| 401 |
+
|
| 402 |
+
where $\lambda _ { \mathrm { v g g } }$ is the weight for perceptual loss (Johnson et al., 2016), $F _ { \mathrm { v g g } }$ is the VGG feature extraction model (Simonyan $\&$ Zisserman, 2014). We set $\lambda _ { \mathrm { v g g } } = 1$ and optimize Eqn. 8 for $2 0 , 0 0 0$ iterations. We take $\hat { \mathbf { z } } _ { 1 }$ as the input to our model for video prediction.
|
| 403 |
+
|
| 404 |
+
AMT Experiments. We present more details on the AMT experiments for different experimental settings and datasets. For each experiment, we run 5 iterations to get the averaged score.
|
| 405 |
+
|
| 406 |
+
• FaceForensics, Ours vs TGANv2. We randomly select 300 videos from each method and ask users to select the better one from a pair of videos. • Sky Time-lapse, Ours vs DTVNet. We compare our method with DTVNet on the video prediction task. The testing set of Sky Time-lapse dataset includes 2, 815 short video clips. Considering that many of these video clips share similar content and are sampled from 148 long videos, we select 148 short videos with different content for testing. For these videos, we perform inversion (Eqn. 8) on the first frame to get the latent code and generate videos. For DTVNet, we use the first frame directly as input to produce their results. We ask users to chose the one with better video quality from a pair of videos generated by our method and DTVNet. The results shown in Tab. 8 demonstrate the clear advantage of our approach.
|
| 407 |
+
|
| 408 |
+
Table 8: Human evaluation experiments on Sky Time-lapse dataset.
|
| 409 |
+
|
| 410 |
+
<table><tr><td>Method</td><td>Human Preference (%)</td></tr><tr><td>Ours /DTVNet</td><td>77.3 / 22.7</td></tr></table>
|
| 411 |
+
|
| 412 |
+
• FFHQ, Full vs w/o ${ \mathcal { L } } _ { \mathrm { c o n t r } }$ . We randomly sample 200 videos generated by each method and ask users to select the more realistic one from a pair of videos.
|
| 413 |
+
|
| 414 |
+
• FFHQ, Full vs w/o ${ \mathcal { L } } _ { \mathrm { m } }$ . For each method, we use the same content code $\mathbf { z } _ { 1 }$ to generate 9 videos with different motion trajectories, and organize them into a $3 \times 3$ grid. To conduct AMT experiments, we randomly generate $5 0 3 \times 3$ videos for each method and ask users to choose the one with higher motion diversity from a pair of videos.
|
| 415 |
+
|
| 416 |
+
Cross-Domain Video Generation. We provide more details on the image and video datasets.
|
| 417 |
+
|
| 418 |
+
• Image Datasets:
|
| 419 |
+
|
| 420 |
+
– FFHQ (Karras et al., 2019) consists of 70, 000 high-quality face images at $1 0 2 4 \times 1 0 2 4$ resolution with considerable variation in terms of age, ethnicity, and background.
|
| 421 |
+
– AFHQ-Dog (Choi et al., 2020) contains 5, 239 high-quality dog images at $5 1 2 \times 5 1 2$ resolution with both training and testing sets.
|
| 422 |
+
– AnimeFaces (Branwen, 2019) includes 2, 232, 462 anime face images at $5 1 2 \times 5 1 2$ resolution.
|
| 423 |
+
– LSUN-Church (Yu et al., 2015) includes 126, 227 in-the-wild church images at $2 5 6 \times$ 256 resolution.
|
| 424 |
+
|
| 425 |
+
• Video Datasets:
|
| 426 |
+
|
| 427 |
+
– VoxCeleb (Nagrani et al., 2020) consists of 22, 496 short clips of human speech, extracted from interview videos uploaded to YouTube.
|
| 428 |
+
– TLVDB (Shih et al., 2013) includes 463 time-lapse videos, covering a wide range of landscapes and cityscapes.
|
| 429 |
+
|
| 430 |
+
For the video datasets, we randomly select 32 consecutive frames from training videos and select every other frame to form a 16-frame sequence for training.
|
| 431 |
+
|
| 432 |
+
# C MORE VIDEO RESULTS
|
| 433 |
+
|
| 434 |
+
In this section, we provide more qualitative video results generated by our approach. We show the thumbnail from each video in the figures. Full resolution videos are in the supplementary material. We also provide an HTML page to visualize these videos.
|
| 435 |
+
|
| 436 |
+
UCF-101. In Fig. 9, we show videos generated by our approach on the UCF-101 dataset.
|
| 437 |
+
|
| 438 |
+
FaceForensics. In Fig. 10, we show the generated videos for FaceForensics. In Fig. 11 and Fig. 12, we show that our approach can generate long consecutive results, 32 and 64 frames respectively, even when trained with 16-frame clips. In Fig. 13, we demonstrate that our approach can generate diverse motion patterns using the same content code. In Fig. 14, we apply the same motion codes with different content to get the synthesized videos.
|
| 439 |
+
|
| 440 |
+
Sky Time-lapse. Fig. 15 shows the generated videos for the Sky Time-lapse dataset.
|
| 441 |
+
|
| 442 |
+
(FFHQ, VoxCeleb). Fig. 16, Fig. 17, and Fig. 18 present the generated videos that have motion patterns from VoxCeleb and content from FFHQ, with resolutions of $1 2 8 \times 1 2 8$ , $2 5 6 \times 2 5 6$ , and $1 0 2 4 \times 1 0 2 4$ , respectively. We use BigGAN as the generator for Fig. 16 and StyleGAN2 for Fig. 17 and Fig. 18.
|
| 443 |
+
|
| 444 |
+
(AFHQ-Dog, VoxCeleb). Fig. 19 presents the generated videos that have motion patterns from VoxCeleb and content from AFHQ-Dog. The videos have a resolution of $5 1 2 \times 5 1 2$ . In Fig. 20, we show the interpolation between every two frames to get longer sequences.
|
| 445 |
+
|
| 446 |
+
(AnimeFaces, VoxCeleb). Fig. 21 shows the generated videos that have motion patterns from VoxCeleb and content from AmimeFaces. The videos have a resolution of $5 1 2 \times 5 1 2$ .
|
| 447 |
+
|
| 448 |
+
(LSUN-Church, TLVDB). Fig. 22 presents the generated videos that have time-lapse changing style from TLVDB and content from LSUN-Church.
|
| 449 |
+
|
| 450 |
+

|
| 451 |
+
Figure 9: Example videos generated by our approach on the UCF-101 dataset.
|
| 452 |
+
|
| 453 |
+

|
| 454 |
+
Figure 10: Example videos generated by our approach on the FaceForensics dataset.
|
| 455 |
+
|
| 456 |
+

|
| 457 |
+
Figure 11: The generated videos on the FaceForensics dataset consisting of 32 frames.
|
| 458 |
+
|
| 459 |
+

|
| 460 |
+
Figure 12: The generated videos on the FaceForensics dataset consisting of 64 frames.
|
| 461 |
+
|
| 462 |
+

|
| 463 |
+
Figure 13: Each row is synthesized using the same content code to generate diverse motion patterns. Please see the corresponding supplementary video for a better illustration.
|
| 464 |
+
|
| 465 |
+

|
| 466 |
+
Figure 14: Each row is synthesized with the same motion trajectory but different content codes. Please see the corresponding supplementary video for a better illustration.
|
| 467 |
+
|
| 468 |
+

|
| 469 |
+
Figure 15: Example videos generated by our approach on the Sky Time-lapse dataset. The videos have a resolution of $1 2 8 \times 1 2 8$ .
|
| 470 |
+
|
| 471 |
+

|
| 472 |
+
Figure 16: Cross-domain video generation for (FFHQ, Vox). The videos have a resolution of $1 2 8 \times 1 2 8$ .
|
| 473 |
+
|
| 474 |
+

|
| 475 |
+
Figure 17: Cross-domain video generation for (FFHQ, Vox). The videos have a resolution of $2 5 6 \times 2 5 6$ .
|
| 476 |
+
|
| 477 |
+

|
| 478 |
+
Figure 18: Cross-domain video generation for (FFHQ, Vox). The videos have a resolution of $1 0 2 4 \times 1 0 2 4$ .
|
| 479 |
+
|
| 480 |
+

|
| 481 |
+
Figure 19: Cross-domain video generation for (AFHQ-Dog, Vox). The videos have a resolution of $5 1 2 \times 5 1 2$ .
|
| 482 |
+
|
| 483 |
+

|
| 484 |
+
Figure 20: Cross-domain video generation for (AFHQ-Dog, Vox). We interpolate every two frames to get 32 sequential frames. The videos have a resolution of $5 1 2 \times 5 1 2$ .
|
| 485 |
+
|
| 486 |
+

|
| 487 |
+
Figure 21: Cross-domain video generation for (AnimeFaces, Vox). The videos have a resolution of $5 1 2 \times 5 1 2$ .
|
| 488 |
+
|
| 489 |
+

|
| 490 |
+
Figure 22: Cross-domain video generation for (LSUN-Church, TLVDB). The videos have a resolution of $2 5 6 \times 2 5 6$ .
|
| 491 |
+
|
| 492 |
+
# D MORE ABLATION ANALYSIS FOR MUTUAL INFORMATION LOSS ${ \mathcal { L } } _ { \mathrm { m } }$
|
| 493 |
+
|
| 494 |
+
In addition to Tab. 5, we perform another ablation experiment to show how mutual information loss ${ \mathcal { L } } _ { \mathrm { m } }$ improves motion diversity by considering the following setting. We random sample a content code $z _ { 1 } \in { \mathcal { Z } }$ and use it as an input to synthesize 100 videos, where each video contains 16 frames. We average the generated 100 videos (they share the same first frame) to get one meanvideo, which contains 16 frames. For example, for the last frame in the mean-video, it is obtained by averaging all the last frames from the 100 generated videos. We also calculate the per-pixel standard deviation (std) for each averaged frame in the mean-video. More blurry frames and higher per-pixel std indicate the 100 synthetic videos contain more diverse motion.
|
| 495 |
+
|
| 496 |
+
We evaluate the settings of $F u l l$ and w/o ${ \mathcal { L } } _ { \mathrm { m } }$ (without using the mutual information loss) by running the above experiments for 50 times, e.g., sampling $z _ { 1 }$ for 50 times. Across the 50 trials, for Full model, the mean and std of the per-pixel std for the $1 6 ^ { t h }$ frame (the last frame in a generated video) is $0 . 2 3 3 \pm 0 . 0 3 6$ , which is significantly higher than that of the w/o ${ \mathcal { L } } _ { \mathrm { m } }$ model $( 0 . 1 2 6 \pm 0 . 0 2 5 )$ . In Fig. 23, we show 8 examples of the last frame from the mean-video and the images with per-pixel std (See supplementary material for the whole videos). Our Full model has more diverse motion as the averaged frame is more blurry and the per-pixel std is higher. Note that StyleGAN2 enables noise inputs for extra randomness, we disable it in this ablation study.
|
| 497 |
+
|
| 498 |
+

|
| 499 |
+
Figure 23: Row 1 and 3: The last frame of the mean-video and per-pixel std of w/o ${ \mathcal { L } } _ { \mathrm { m } }$ model. Row 2 and 4: The last frame of the mean-video and per-pixel std of the Full model. The Full model has a more blurry mean-video and higher per-pixel std, which indicates more diverse motion.
|
| 500 |
+
|
| 501 |
+
# E LIMITATIONS
|
| 502 |
+
|
| 503 |
+
Our framework requires a well-trained image generator for frame synthesis. In order to synthesize high-quality and temporally coherent videos, an ideal image generator should satisfy two requirements: R1. The image generator should synthesize high-quality images, otherwise the video discriminator can easily tell the generated videos as the image quality is different from the real videos. R2. The image generator should be able to generate diverse image contents to include enough motion modes for sequence modeling.
|
| 504 |
+
|
| 505 |
+
Example of R1. UCF-101 is a challenging dataset even for the training of an image generator. In Tab. 7, the StyleGAN2 model trained on UCF-101 has FID 45.63, which is much worse than the others. We hypothesis the reason is that UCF-101 dataset has many categories, but within each category, it includes relatively a small amount of videos and these videos share very similar content. Such observation is also discussed in DVDGAN (Clark et al., 2019). Although we can achieve state-of-the-art performance on UCF-101 dataset, the quality of the generated videos is not as good as other datasets (Fig. 9), and the quality of synthesized videos is still not close to real videos.
|
| 506 |
+
|
| 507 |
+
Example of R2. We test our method on BAIR Robot Pushing Dataset (Ebert et al., 2017). We train a $6 4 \times 6 4$ StyleGAN2 image generator with using the frames from BAIR videos. The image generator has FID as 6.12. Based on the image generator, we train a video generation model that can synthesize 16 frames. An example of synthesized video is shown in Fig. 24 (more videos are in the supplementary materials). We can see our method can successfully model shadow changing, the robot arm moving, but it struggles to decouple the robot arm from some small objects in the background, which we show analysis follows.
|
| 508 |
+
|
| 509 |
+

|
| 510 |
+
Figure 24: A synthesized video using BAIR dataset. Note the background changing of the first frame (upper-left) and the last frame (bottom-right).
|
| 511 |
+
|
| 512 |
+
# E.1 ANALYSIS OF THE INFORMATION CONTAINED IN PCA COMPONENTS.
|
| 513 |
+
|
| 514 |
+
Inspired by previous work (Hark ¨ onen et al., 2020), we further investigate the latent space of the ¨ image generator by considering the information contained in each PCA component. Fig. 25 shows the percentage of total variance captured by top PCA components. The image generator on BAIR compresses most of the information on a few components. Specially, the top $2 0 \mathrm { P C A }$ components captures $8 5 \%$ of the variance. In contrast, the latent space of the image generator trained on FFHQ (and FFHQ 1024 for high-resolution image synthesis) uses $1 0 0 ~ \mathrm { P C A }$ components to capture $8 5 \%$ information. This implies the BAIR generator models the dataset in a low-dimension space, and such generator increases the difficulty for fully disentangling all the objects in images for manipulation.
|
| 515 |
+
|
| 516 |
+

|
| 517 |
+
Figure 25: Percentage of variations captured by top PCA components on different models.
|
| 518 |
+
|
| 519 |
+
Moreover, we visualize the video synthesis results by moving along the top $2 0 ~ \mathrm { P C A }$ components. Let $V _ { i }$ denote the $i ^ { t h }$ PCA component. Given content code $z _ { 1 }$ , we synthesize a 5-frame video clip by using the following sequence as input: $\left\{ z _ { 1 } - 2 V _ { i } , z _ { 1 } - V _ { i } , z _ { 1 } , z _ { 1 } + V _ { i } , z _ { 1 } + 2 V _ { i } \right\}$ . In Fig. 26, we show the video synthesis results by moving along the top $2 0 ~ \mathrm { P C A }$ directions. It can be seen that: 1) changing the later components (the $8 ^ { t h }$ and later rows) of BAIR only make small changes; 2) the first 7 components of BAIR have entangled semantic meaning, while the components in FFHQ have more disentangled meaning ( $2 ^ { n d }$ row, rotation; $2 0 ^ { t h }$ row, smile). This indicates the image generator of BAIR may not cover enough (disentangled) motion modes, and it might be hard for the motion generator to fully disentangle all the contents and motion with only a few dominating PCA components, while for the image generator trained on FFHQ, it is much easier for disentangling foreground and background.
|
| 520 |
+
|
| 521 |
+

|
| 522 |
+
Figure 26: Visualization of top 20 principle components of BAIR (left) and FFHQ (right).
|
| 523 |
+
|
| 524 |
+

|