ZHANGYUXUAN-zR commited on
Commit
b06f25f
·
verified ·
1 Parent(s): 8ef5cb8

Add files using upload-large-folder tool

Browse files
parse/dev/0sEIBFb4cs/0sEIBFb4cs.md ADDED
@@ -0,0 +1,383 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # PRACTICAL ADVERSARIAL ATTACKS ON BRAIN– COMPUTER INTERFACES
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ Deep learning has been widely employed in brain–computer interfaces (BCIs) to decode a subject’s intentions based on recorded brain activities enabling direct interaction with computers and machines. BCI systems play a crucial role in motor rehabilitation and have recently experienced a significant market boost as consumer-grade products. Recent studies have shown that deep learning-based BCIs are vulnerable to adversarial attacks. Failures in such systems might cause medical misdiagnoses, physical harm, and financial damages, hence it is of utmost importance to analyze and understand in-depth, potential malicious attacks to develop countermeasures. In this work, we present the first study that analyzes and models adversarial attacks based on physical domain constraints in EEGbased BCIs. Specifically, we assess the robustness of EEGNet which is the current state-of-the-art network for embedded BCIs. We propose new methods to induce denial-of-service attacks and incorporate domain-specific insights and constraints to accomplish two key goals: (i) create smooth adversarial attacks that are physiologically plausible; (ii) consider the realistic case where the attack happens at the origin of the signal acquisition and it propagates on the human head. Our results show that EEGNet is significantly vulnerable to adversarial attacks with an attack success rate of more than $50 \%$ . With our work, we want to raise awareness and incentivize future developments of proper countermeasures.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Recent work has shown that adversarial perturbations can cause state-of-the-art (SoA) deep learning models to misbehave in various domains including vision (Szegedy et al., 2014; Goodfellow et al., 2015), NLP (Li et al., 2019a; Zhang et al., 2020), speech (Qin et al., 2019; Li et al., 2019b), and biomedicine (Finlayson et al., 2019; Han et al., 2020). Neural networks have been applied in brain–computer interfaces (BCIs) achieving impressive results (Lawhern et al., 2018; Dose et al., 2018). A BCI enables direct interactions with external devices based on brain activities, typically recorded using electroencephalographic (EEG) systems. It can provide a communication pathway for severely paralyzed patients or assist in rehabilitation (Chaudhary et al., 2016). Besides medical applications, recent developments in wearable devices have pushed BCIs towards consumer-grade products to improve life quality (Aricò et al., 2020), e.g., the Interaxon Muse headband for stress relief (Arsalan et al., 2019) or the Emotiv headset for controlling drones (Marin et al., 2020) and ground vehicles (Zhuang et al., 2021). Safety in BCI systems is paramount (Dutta, 2020; Bernal et al., 2021), because a failure would cause misdiagnoses, user frustration, or even danger while driving a wheelchair or controlling a drone, causing physical and financial damages.
12
+
13
+ Zhang & Wu (2019) were the first to show that EEG-based BCIs are vulnerable to adversarial attacks by proposing an unsupervised fast gradient sign method (FGSM) (Goodfellow et al., 2015). More recent work has proposed a more practical attack where a universal adversarial perturbation (UAP) is computed once and can be applied to all EEG trials without learning it for every new input (Liu et al., 2021). Both works assume that the acquired signals are sent to a remote compute engine, e.g., a computer, and the attacker can alter the signals during the transmission by attaching a “jamming” module between the signal preprocessing step and the classifier. Recent developments in smart edge computing (Akmandor & Jha, 2018; Beach et al., 2021) eliminate the need for data transmission, making this attack scenario inapplicable. Novel BCI solutions (Kartsch et al., 2019; Wang et al., 2020) embed the signal processing and classification directly at the sensor edge. A more practical adversarial example has been identified by Meng et al. (2021). It consists of a square-shaped signal that can be added to EEG trials before the preprocessing step. However, the attack is proposed as a backdoor key, which means that the attacker has direct access to the training dataset and pollutes it with adversarial examples, which is improbable if the attacker is not directly involved in the data acquisition or in the training of the classifier. Li et al. (2019b) have shown an attack scenario in the audio domain by considering the on-board edge processing of a wake-word detection system, where an adversarial audio trace is delivered to the environment causing denial-of-service (DoS). No similar studies can be currently found in the BCI domain.
14
+
15
+ Challenges: Designing natural attacks and modeling its propagation. Unlike in audio applications where the signal can simply propagate over-the-air and is sensed by a microphone, extra modeling is required to evaluate the signal propagation in BCIs based on the physical properties of the biological tissues. In this work, rather than assuming a “jamming” module between the preprocessing and the classification steps as in related works, we consider a more realistic and practically applicable attack scenario where the adversarial perturbations are introduced at the source of the data acquisition, as showcased in Figure 6 in Appendix A. This can be achieved, for example, via electromagnetic waves delivered to the environment (Dutta, 2020) or via transcranial current stimulation with electrical current delivered directly to the scalp (Bodranghien et al., 2017; Fertonani et al., 2015), by exploiting wearable devices, such as smart glasses or over-ear headsets (Flowneuroscience, 2021; Marin et al., 2020). The adversarial perturbations translate into electrical signals propagating over the scalp and are sensed by the electrodes in addition to the EEG signals.
16
+
17
+ To guarantee the imperceptibility of the attacks, previous works in BCIs create perturbations that are small in amplitude (Zhang & Wu, 2019; Jiang et al., 2019; Liu et al., 2021), limiting the attack success rate (ASR). Increased perturbation’s amplitude yields higher ASR (Meng et al., 2021), but makes the attack more easily detectable. Moreover, the generated perturbations are square-shaped, which is implausible for biosignals. Han et al. (2020) are the first to observe square-wave artifacts in biosignals’ attacks and propose smooth perturbations for electrocardiograms (ECGs). No similar works have been found for EEGs.
18
+
19
+ This work: Practical attacks on BCI models. To address the above technical challenges, and for analyzing the vulnerability of embedded BCI models in practical scenarios, we design a new attack algorithm that generates smooth adversarial examples based on the signals’ first derivative and model its propagation over the scalp based on a realistic head model by taking into consideration the attack source and the electrical and physical properties of the conducting tissues. This enables the creation of practically effective perturbations, that can be delivered by an external device to attack EEG-based BCIs at the source of signal acquisition. We attack the most energy-efficient network that has been embedded on microcontrollers for smart wearable BCIs called EEGNet (Lawhern et al., 2018; Schneider et al., 2020). It is a resource-friendly convolutional neural network (CNN) and is the SoA in terms of accuracy and energy-efficiency trade-off (Belwafi et al., 2018; Malekmohammadi et al., 2019; Wang et al., 2020; Schneider et al., 2020).
20
+
21
+ We evaluate our methods and show experimental results on BCIs based on the motor imagery (MI) paradigm, which is of special interest among others because it can be asynchronously self-paced without external stimuli (Freer & Yang, 2020). By imagining the movement of different body parts, the decoded intention is translated into control signals. It is widely applied in several BCI applications, such as the control of wheelchairss (Yu et al., 2018), prosthetic armss (Elstob & Secco, 2016), ground vehicles (Zhuang et al., 2021), and in communication (Brumberg et al., 2016). It has been proven to be the most difficult task to be attacked among the most common BCI paradigms (Zhang & Wu, 2019; Meng et al., 2021). We evaluate our methods by “fooling” the victim model to always predict “rest” class. This essentially yields a DoS attack, because resting-state EEG signals are generally interpreted as no subject’s intention decoded, i.e., no control action needs to be taken by the BCI system (Yu et al., 2018). While for healthy subjects it might solely cause user frustration and financial losses, for severely paralyzed patients it can lead to loss of communication and independence. We generalize our methodology to an other MI task of BCI Competition IV-2a dataset and believe that it can be easily adapted to other BCI paradigms.
22
+
23
+ Main contributions. Our main contributions are:
24
+
25
+ • We design a new method to generate smooth adversarial perturbations that are physiologically plausible and imperceptible to the human eye.
26
+
27
+ • We consider a practical scenario where the perturbation is added at the signal acquisition source and model its propagation constrained by the physical properties of the human scalp. • The first study of adversarial perturbations in BCI to consider the practical scenario of smart edge computing and physical signal propagation. We create both local and global perturbations and show that our attacks consistently achieve a success rate of $> 5 0 \%$ in different settings pointing to the significant vulnerability of the SoA embedded EEGNet.
28
+
29
+ We hope that our work raises awareness for potential risks and motivates the future development of appropriate countermeasures.
30
+
31
+ # 2 BACKGROUND
32
+
33
+ # 2.1 CLASSIFICATION IN BCIS
34
+
35
+ We first describe the commonly used approach in BCIs for classification, consisting of a preprocessing step and a classifier. The brain activity is recorded with an EEG device which samples $N _ { c h }$ channels at rate $F _ { s }$ . We define one trial $j$ as $( \mathbf { X } ^ { ( j ) } , y ^ { ( j ) } )$ , where $y ^ { ( j ) } \in \{ 0 , 1 , . . . , N _ { c l } - 1 \}$ is the true label of $N _ { c l }$ MI tasks, and $\mathbf { X } ^ { ( j ) } \in \mathbb { R } ^ { N _ { s } \times N _ { c h } }$ the multi-channel recording defined as
36
+
37
+ $$
38
+ \mathbf { X } ^ { ( j ) } : = \left( \mathbf { x } _ { 0 } ^ { ( j ) } , \mathbf { x } _ { 1 } ^ { ( j ) } , . . . , \mathbf { x } _ { N _ { c h } - 1 } ^ { ( j ) } \right) ,
39
+ $$
40
+
41
+ with $\mathbf { x } _ { i } ^ { ( j ) } \in \mathbb { R } ^ { N _ { s } }$ corresponding to the recording of the $j$ -th trial and the $i$ -th channel containing $N _ { s }$ temporal samples. For simplicity, we denote $\mathbf { X } : = \mathbf { X } ^ { ( j ) }$ and $y : = y ^ { ( j ) }$ .
42
+
43
+ The EEG recordings are often preprocessed with a band-pass filter, e.g., using a Fast Fourier Transform (FFT) filter $h _ { b p } ( \cdot )$ , before being fed to a classifier, yielding
44
+
45
+ $$
46
+ \mathbf { X } _ { b p } = H _ { b p } ( \mathbf { X } ) = \left( h _ { b p } ( \mathbf { x } _ { 0 } ) , h _ { b p } ( \mathbf { x } _ { 1 } ) , . . . , h _ { b p } ( \mathbf { x } _ { N _ { c h } - 1 } ) \right) .
47
+ $$
48
+
49
+ Finally, the preprocessed signal $\mathbf { X } _ { b p }$ is classified with a trainable model $f$ and is mapped to $\mathbf { p } : =$ $f \left( { \bf { X } } _ { b p } \right)$ , where $\mathbf { p } \in \mathbb { R } ^ { N _ { c l } }$ contains the output probabilities, e.g., originating from a softmax activation as final operation in $f$ . The model’s final prediction $\hat { y }$ is the index with the maximum score in $\mathbf { p }$ :
50
+
51
+ $$
52
+ \boldsymbol { \hat { y } } = \boldsymbol { \hat { f } } \left( \mathbf { X } _ { b p } \right) = \underset { y \in \{ 0 , \ldots , N _ { c l } - 1 \} } { \mathrm { a r g m a x } } ~ f \left( \mathbf { X } _ { b p } \right) [ y ] .
53
+ $$
54
+
55
+ # 2.2 INSTANCE-BASED ATTACKS
56
+
57
+ Instance-based attacks try to fool an EEG classifier $f$ to misclassify an EEG signal $\mathbf { X }$ to a targeted class $y _ { t }$ . In this section, we describe the attack directly on the classifier $f$ without considering the preprocessing $H _ { b p }$ ; the inclusion of the preprocessing is described in Section 3.3. We define an adversarial example as any $\mathbf { X } ^ { * } = \mathbf { X } + \mathbf { V } \in \mathbb { R } ^ { N _ { s } \times N _ { c h } }$ such that
58
+
59
+ $$
60
+ \hat { f } \left( \mathbf { X } \right) \neq \hat { f } \left( \mathbf { X } ^ { * } \right) = y _ { t } .
61
+ $$
62
+
63
+ FGSM. The FGSM (Goodfellow et al., 2015) generates an adversarial perturbation $\mathbf { V } \in \mathbb { R } ^ { N _ { s } \times N _ { c h } }$ of magnitude $\epsilon$ which points in the negative direction of a loss function’s gradient:
64
+
65
+ $$
66
+ \mathbf { V } = - \epsilon \cdot \mathrm { s i g n } \left( \nabla _ { \mathbf { X } } \cdot l \left( \mathbf { X } , y _ { t } \right) \right) ,
67
+ $$
68
+
69
+ where the loss function contains the negative log likelihood
70
+
71
+ $$
72
+ l ( \mathbf { X } , y _ { t } ) = - \log \left( { \mathbf { p } } [ y _ { t } ] \right) = - \log \left( f \left( \mathbf { X } \right) [ y _ { t } ] \right) .
73
+ $$
74
+
75
+ As $\mathbf { p }$ is the output of the softmax activation function, equation 6 becomes a cross-entropy loss which maximizes the output $\mathbf { p } [ y _ { t } ]$ while minimizing the remaining outputs.
76
+
77
+ PGD. The projected gradient descent (PGD) (Madry et al., 2018) is a variant of the basic iterative method (Kurakin et al.), generally considered to be more effective than FGSM. PGD aims to find a perturbation by iteratively taking small steps of size $\alpha$ in the gradient’s direction and projecting the resulting perturbation back to the sample’s neighborhood after each iteration. We randomly initialize the attack inside the $L _ { \infty }$ ball of radius $\epsilon$ and update the attack $\mathbf { V } _ { t + 1 }$ for any iteration $t$ with
78
+
79
+ $$
80
+ \mathbf { V } _ { t + 1 } = \mathrm { c l i p } _ { \epsilon } \left( \mathbf { V } _ { t } - \alpha \cdot \mathrm { s i g n } \left( \nabla _ { \mathbf { V } } l \left( \mathbf { X } + \mathbf { V } _ { t } , y _ { t } \right) \right) \right) ,
81
+ $$
82
+
83
+ where $\alpha$ is a step size smaller than $\epsilon$ which decays linearly with each iteration and the function $\mathrm { c l i p } _ { \epsilon } \left( \cdot \right)$ clips the signal at the maximum desired amplitude $\epsilon$ .
84
+
85
+ # 2.3 UNIVERSAL ATTACKS
86
+
87
+ UAPs have been introduced by Moosavi-Dezfooli et al. (2017) in the context of natural images, seeking to find an image-agnostic perturbation that fools the classifier on any input image. In the BCI domain (Liu et al., 2021), we seek to find a perturbation $\mathbf { V } \in \mathbb { R } ^ { N _ { s } \times N _ { c h } }$ such that
88
+
89
+ $$
90
+ \begin{array} { r } { \hat { f } \left( \mathbf { X } + \mathbf { V } \right) \neq \hat { f } \left( \mathbf { X } \right) \mathrm { f o r } ^ { * } \mathrm { m o s t } ^ { * } \mathbf { X } \sim D , } \end{array}
91
+ $$
92
+
93
+ where $D$ is the distribution of the EEG data. The UAP can be determined by optimizing the negative log-likelihood loss with respect to $\mathbf { V }$ using batch gradient descent on the trials in the training set.
94
+
95
+ # 3 MODELING PRACTICAL ATTACKS IN BCI
96
+
97
+ This section is the main contribution of the paper: we present a design of practical DoS attacks on MIBCIs that operates at the source of the signal acquisition. We propose a new method to eliminate the square wave artifacts to generate adversarial examples that are natural and physiologically plausible. The perturbation is emitted by a smart, adversarial device placed close to the ear, e.g., a smart glass or in-ear headphones, and is propagated to the individual EEG electrodes over the scalp’s skin. As can be experimentally observed on measured EEG traces (Merlet et al., 2013; Sazgar & Young, 2019), the same electrical source, e.g., electrocardiographic activities, is sensed by each EEG electrode with different degrees of attenuation and delay. We present a practical propagation model that determines the magnitude and delay for every individual electrode based on the distance along the scalp to the adversarial device. The perturbation is trained end-to-end to fool the classifier to always output “rest,” hence DoS, while respecting the spatial model and the amplitude constraints to remain imperceptible.
98
+
99
+ # 3.1 DESIGN AND ASSESSMENT OF PHYSIOLOGICALLY PLAUSIBLE ATTACKS
100
+
101
+ PGD-designed attacks on EEG tend to form perturbation signals which resemble a square-wave artifact (see Figure 2), an effect that has been observed on ECG data, too (Han et al., 2020). However, EEG signals are of random nature and can be modeled as frequency dependent stationary or nonstationary random processes (Karlekar & Gupta, 2014). To this end, we introduce a new loss term in the PGD optimization such that the perturbation resembles the random nature of EEG signals, which we achieve by promoting signal changes represented in the first order derivative. We estimate the per-channel derivative $\begin{array} { r } { \bar { { \bf V } ^ { \prime } } = ( { \bf v } _ { 0 } ^ { \prime } , { \bf v } _ { 1 } ^ { \prime } , . . . , { \bf v } _ { N _ { c h } - 1 } ^ { \prime } ) \in \mathbb { R } ^ { N _ { s } - 1 \times N _ { c h } } } \end{array}$ using the sample-wise difference:
102
+
103
+ $$
104
+ \begin{array} { r } { \mathbf { v } _ { c } ^ { \prime } [ t ] : = \mathbf { v } _ { c } [ t ] - \mathbf { v } _ { c } [ t - 1 ] \quad t \in \{ 1 , 2 , . . . , N _ { s } - 1 \} , c \in \{ 0 , 1 , . . . , N _ { c h } - 1 \} } \end{array}
105
+ $$
106
+
107
+ The additive loss term is determined by $\begin{array} { r } { l _ { 1 } ( { \bf V } ) = - \frac { \beta } { \epsilon } \sum _ { c = 1 } ^ { N _ { c h } } | | { \bf v } _ { c } ^ { \prime } | | _ { 1 } } \end{array}$ − β PNchc=1 ||v0c||1, where || · ||1 is the \`1-norm,  the maximum perturbation amplitude, and $\beta \geq 0$ a weighting factor. When designing a one-dimensional perturbation, the derivative loss becomes $\begin{array} { r } { l _ { 1 } ( \mathbf { v } ) = - \frac { \beta } { \epsilon } | | \mathbf { v } ^ { \prime } | | } \end{array}$ .
108
+
109
+ Measuring the Plausibility of Attacks None of the previous works have given quantitative measures to assess the physiological plausibility of an EEG adversarial attack. In this work, we propose data-driven measures for quantifying the naturalism of an attack. We compute either the cross correlation, the Euclidian distance, or the cosine similarity between the attacked signal and the original EEG, and average the values over the $N _ { c h }$ channels and over the samples in the dataset.
110
+
111
+ # 3.2 SPATIAL PROPAGATION MODEL
112
+
113
+ So far, a perturbation signal was designed for every individual channel. It is unrealistic for an attacker to perturb the signal for all individual channels simultaneously; hence, we consider a more practical use case where the perturbation signal $\mathbf { v } \in \mathbb { R } ^ { N _ { s } }$ is emitted from one location, e.g., from an adversarial device placed on the left side of the subject or close to the left ear. More specifically, in this study, we assume that the EEG electrode at the position T9 according to the international 10-10 system (Sch), which is the closest to the left ear, senses the largest perturbation. The signal subsequently propagates over the skin to each electrode, which results in an individual magnitude and delay depending on the distance between the adversarial device and the electrode. More formally, we model the sensed perturbation at channel $i$ and time instant $t$ as
114
+
115
+ $$
116
+ h _ { i } ( \mathbf { v } , \lambda _ { m } , \lambda _ { d } ) ( t ) : = m ( l _ { i } , \lambda _ { m } ) \cdot \mathbf { v } \left( t - d ( l _ { i } , \lambda _ { d } ) \right) ,
117
+ $$
118
+
119
+ where $m ( l _ { i } , \lambda _ { m } )$ and $d ( l _ { i } , \lambda _ { d } )$ are the magnitude and the delay respectively, both of which depend on the distance $l _ { i }$ and on characteristic parameters $\lambda _ { m }$ and $\lambda _ { d }$ . We define the resulting multi-channel perturbation $\mathbf { V } \in \mathbb { R } ^ { N _ { s } \times N _ { c h } }$ , which is added to the multi-channel EEG signal, as
120
+
121
+ $$
122
+ \begin{array} { r } { { \bf V } ( \lambda _ { m } , \lambda _ { d } ) = H ( { \bf v } , \lambda _ { m } , \lambda _ { d } ) : = \left( h _ { 0 } ( { \bf v } , \lambda _ { m } , \lambda _ { d } ) , h _ { 1 } ( { \bf v } , \lambda _ { m } , \lambda _ { d } ) , . . . , h _ { N _ { c h } - 1 } ( { \bf v } , \lambda _ { m } , \lambda _ { d } ) \right) . } \end{array}
123
+ $$
124
+
125
+ We estimate the distance $l _ { i }$ between the electrode at position T9 and the remaining, attacked positions using the 10-10 system and a head model with a radius of $8 . 7 \mathrm { c m }$ (Algazi et al., 2001). We decouple the distance-dependent modeling of the magnitude and delay, explained in the following paragraphs.
126
+
127
+ Magnitude. For modeling the magnitude, we assume that the adversarial device injects or induces a current $I$ , yielding a potential $V$ measured near T9. The current propagates over the head surface through the skin to each of the remaining attacked electrodes, which can be modeled as a cylindrical resistor with resistance
128
+
129
+ $$
130
+ R _ { i } = \frac { l _ { i } } { \sigma A } ,
131
+ $$
132
+
133
+ where $\sigma$ is the conductivity of the skin which can be in the range of [0.28, 0.87] Siemens/m (Vorwerk et al., 2019), and $A$ is the area of the skin conductor. The potential at electrode $i$ is $V _ { i } = V - I \cdot R _ { i }$ , and hence the magnitude can be described as
134
+
135
+ $$
136
+ m ( l _ { i } , \lambda _ { m } ) = 1 - \frac { V - V _ { i } } { V } = 1 - \frac { I } { V \sigma A } l _ { i } = 1 - \lambda _ { m } l _ { i } ,
137
+ $$
138
+
139
+ where we further constrain $0 \leq m ( l _ { i } , \lambda _ { m } ) \leq 1$ . The characteristic magnitude parameter $\lambda _ { m }$ represents the complex interplay between input current, voltage, conductivity, and area, covering various attack scenarios. We consider different characteristic magnitude parameters $\lambda _ { m } \in [ 1 , 1 5 ]$ . A large $\lambda _ { m }$ represents cases with large attenuation and limited propagation, i.e., a limited set of neighboring electrodes sense the perturbation. Conversely, a small $\lambda _ { m }$ covers cases with lower attenuation where the perturbation can propagate further and infects all electrodes. We consider also an intermediate case where around half of the electrodes are affected by the attack with $\lambda _ { m } = 5$ . Appendix B provides examples of the magnitude of the spatial propagation on the head model.
140
+
141
+ Delay. The propagation of a signal on the head surface yields a position-dependent phase angle or delay, as shown by experimental measurements of related studies (Plutchik & Hirsch, 1963; Qiao et al., 1994). The delay stems from a combination of resistive and capacitive components that are encountered during the propagation of the signal, which can be modeled as an RC-circuit with resistance $R$ , capacity $C$ , and time constant $\tau = R \cdot C$ that relates to the group delay. Specifically, the contacts between the electrodes and the skin are predominantly capacitive whereas the skin itself is both resistive and capacitive (Kim et al., 2010). As explained in the previous part, an increasing distance between the attacker and the target electrode yields a larger resistance $R$ . As a result, the time constant $\tau$ and the delay increase too.
142
+
143
+ Here, we model a linear distance-delay relation. We rely on a study by Plutchik & Hirsch (1963), which conducted human skin impedance and phase angle measurements by placing electrodes at an approximate distance of $1 0 \mathrm { c m }$ and applying voltages with frequencies in the range $2 { \mathrm { - } } 1 0 0 0 \mathrm { { H z } }$ . When assuming a linear frequency-phase relation in low-frequency region (Qiao et al., 1994), one can derive the group delay to be $2 . 8 \mathrm { m s }$ when considering a measured angle of $1 0 ^ { \circ }$ at $1 0 \mathrm { H z }$ . As those measurements were conducted for only one distance, we extrapolate the delay for the remaining distances using a rectified linear model:
144
+
145
+ $$
146
+ \lambda _ { d } \cdot ( l _ { i } - l _ { 0 } ) > 0 \uparrow d ( l _ { i } , \lambda _ { d } ) = \lambda _ { d } \cdot ( l _ { i } - l _ { 0 } ) + d _ { 0 } : d ( l _ { i } , \lambda _ { d } ) = 0 ,
147
+ $$
148
+
149
+ where $d _ { 0 } = 2 . 8 \mathrm { m s }$ is the delay at distance $l _ { 0 } = 1 0 \mathrm { c m }$ . The delay depends not only on the distance, but also on other parameters such as the electrode-to-skin contact, the humidity of the skin, etc. To this end, we evaluate the propagation of the attack with different characteristic delay parameters $\lambda _ { d } \in \left[ 0 . 1 , 0 . 5 6 3 \right] \mathrm { s / m }$ . With $\lambda _ { d } = 0 . 1$ we cover the cases where very little delay happens, while the largest considered $\lambda _ { d } = 0 . 5 6 3 \mathrm { s / m }$ yields a maximum delay of $0 . 1 \mathrm { s }$ at the farthest electrode T10, which is in alignment with the observed EEG measurements (Merlet et al., 2013; Sazgar & Young, 2019). Similarly to $\lambda _ { m }$ , we showcase also for an intermediate value of $\lambda _ { d } = 0 . 3$ which corresponds to a delay of $0 . 0 5 3 \mathrm { m s }$ at T10.
150
+
151
+ Algorithm 1: Generation of physiologically plausible UAP. input : $\mathbf { X } _ { t r a i n }$ , EEG training samples; $\lambda _ { m } , \lambda _ { d }$ , spatial propagation parameters; $\beta$ , weight of derivative loss term; , maximum perturbation amplitude; $G$ , number of PGD iterations; $E$ , number of epochs output :v, adversarial perturbation 1 $\mathbf { v } \mathcal { U } ( - \epsilon , \epsilon ) \in \mathbb { R } ^ { N _ { s } } ;$ ; // Initialisation 2 for $e \gets 1$ to $E$ do 3 Shuffle $\mathbf { X } _ { t r a i n }$ ; 4 for each batch $\mathbf { B } \in \mathbf { X } _ { t r a i n }$ do 5 $\alpha \frac \epsilon 2$ ; 6 for $g \gets 1$ to $G$ do 7 $\mathbf { \bar { V } } H ( \mathbf { v } , \lambda _ { m } , \lambda _ { d } ) ;$ // Spatial propagation 8 $\begin{array} { r } { \dot { \mathbf { p } } f ( H _ { b p } ( \mathbf { B } + \mathbf { V } ) ) } \end{array}$ ; // Model pass with perturbation 9 $\begin{array} { r } { \mathbf { v } \mathbf { v } - \alpha \cdot \mathrm { s i g n } ( \nabla _ { \mathbf { v } } ( l ( \mathbf { p } , y _ { r e s t } ) - \frac { \beta } { \epsilon } | | \mathbf { v } ^ { \prime } | | _ { 1 } ) ) } \end{array}$ ; // Update w/derivative 10 v ← clip (v); // PGD projection 11 $\alpha { \frac { 0 . 1 - { \frac { \epsilon } { 2 } } } { G } } \cdot g + { \frac { \epsilon } { 2 } }$ ; // Learning rate update 12 end 13 end 14 end
152
+
153
+ # 3.3 ATTACK DESIGN
154
+
155
+ We present practical DoS attacks in BCIs that respect domain constraints such as maximum amplitude, spectral distribution, physiological plausibility, and the spatial propagation of the perturbation. To this end, we formulate a general objective function that contains the spatial propagation, the preprocessing step, and the first order derivative loss term:
156
+
157
+ $$
158
+ \mathcal { L } _ { t o t } \left( \mathbf { X } , \mathbf { v } , \lambda _ { m } , \lambda _ { d } \right) = l \left( H _ { b p } \left( \mathbf { X } + H ( \mathbf { v } , \lambda _ { m } , \lambda _ { d } ) \right) , y _ { r e s t } \right) - \frac { \beta } { \epsilon } | | \mathbf { v } ^ { \prime } | | _ { 1 } ,
159
+ $$
160
+
161
+ where $l ( \cdot , \cdot )$ is the negative log-likelihood loss defined in equation 6 and $\beta { = } 1 \mathrm { e } { - } 6$ is a scalar that weights the contribution of the derivative loss term. We compare different attack scenarios:
162
+
163
+ Instance-based attacks. A perturbation is computed using either FGSM or PGD based on the knowledge of the currently attacked EEG signal $\mathbf { X }$ . FGSM computes the perturbation as stated in equation 5, where the $\epsilon$ defines the perturbation amplitude which is varied between $1 { - } 5 0 \mathrm { m V } .$ Alternatively, we compute the perturbation using PGD with $G { = } 1 0$ iterations, where each iteration consists of a gradient-based update of the perturbation and a projection to the $L _ { \infty }$ ball with radius $\epsilon$ (see equation 7). The update rate $\alpha$ is initialized with $\epsilon / 2$ and linearly decreased with each iteration, reaching a final value of $0 . 1 \mathrm { m V }$ at iteration 10. The PGD computation is restarted 5 times with different initial perturbations, which are drawn from a uniform distribution within the range $[ - \epsilon , + \epsilon ]$ .
164
+
165
+ Universal attacks. A universal perturbation is computed for all the samples in the training data. We optimize the UAP objective function
166
+
167
+ $$
168
+ \operatorname* { m i n } _ { \mathbf { v } } E _ { \mathbf { X } \sim D } \mathcal { L } _ { t o t } \left( \mathbf { X } , \mathbf { v } , \lambda _ { m } , \lambda _ { d } \right) \quad \mathrm { ~ s . t . ~ } | | \mathbf { v } | | _ { \infty } \leq \epsilon
169
+ $$
170
+
171
+ using batched PGD. We pass a batch of 16 samples together with the current perturbation through the preprocessing and classifier, compute the loss function, and update the perturbation based on the negative gradient with consecutive projection to the $L _ { \infty }$ ball with radius $\epsilon$ . This step is repeated $G { = } 1 0$ times before processing the next batch. Overall, the UAP is learned for $E { = } 1 0$ epochs.
172
+
173
+ Propagation model. We distinguish between three use cases of spatial propagation model, where in all cases either an instance-specific attack or a universal attack can be computed: Case 1) Ignore the propagation model: a multi-channel perturbation $\mathbf { V }$ is computed, which attacks each channel individually, replacing the terms $H ( \mathbf { v } , \lambda _ { m } , \lambda _ { d } )$ by $\mathbf { V }$ and $\mathbf { v } ^ { \prime }$ by $\mathbf { V } ^ { \prime }$ in equation 15. Case 2) Consider the propagation model: a single-channel perturbation v is computed and tested with a specific propagation configuration $\lambda _ { m }$ and $\lambda _ { d }$ . Case 3) Consider a use-case where the attacker does not know the spatial propagation model and computes the same perturbation $\mathbf { v }$ for all channels. The actual propagation model is applied during testing to model the real-world signal propagation.
174
+
175
+ ![](images/a1324eec3369ab8d3e852dd7a1f3de592be68aba36ad56c69f815c71827712f0.jpg)
176
+ Figure 1: Performance of random noise, FGSM, PGD, and UAP with and without derivative loss term.
177
+
178
+ Table 1: Plausibility metrics for PGD attack (a) without derivative term, (b) with the derivative loss term, and (c) with a Gaussian kernel (Han et al., 2020). The smaller the cross correlation $\eta$ and the Euclidian distance $\ell _ { 2 }$ - norm, and the higher the cosine similarity $\gamma$ , the more natural the generated attack.
179
+
180
+ <table><tr><td></td><td colspan="3">n[10-3v2]</td><td colspan="3">l2-norm [mV]</td><td colspan="3">γ[%]</td></tr><tr><td>ε[mV]</td><td>(a)</td><td>(b)</td><td>(c)</td><td>(a)</td><td>(b)</td><td>(c)</td><td>(a)</td><td>(b)</td><td>(c)</td></tr><tr><td>1</td><td>3.31</td><td>1.98</td><td>3.42</td><td>20.8</td><td>15.2</td><td>21.2</td><td>99.89</td><td>99.93</td><td>99.89</td></tr><tr><td>5</td><td>16.6</td><td>7.76</td><td>17.3</td><td>99.1</td><td>61.2</td><td>102</td><td>97.99</td><td>99.22</td><td>97.87</td></tr><tr><td>10</td><td>32.5</td><td>12.6</td><td>34.1</td><td>191</td><td>112</td><td>198</td><td>93.82</td><td>97.47</td><td>93.49</td></tr><tr><td>25</td><td>74.9</td><td>27.3</td><td>79.2</td><td>461</td><td>263</td><td>475</td><td>79.61</td><td>90.05</td><td>78.92</td></tr><tr><td>50</td><td>125</td><td>39.0</td><td>135</td><td>823</td><td>462</td><td>855</td><td>64.17</td><td>79.70</td><td>63.06</td></tr></table>
181
+
182
+ ![](images/0be065a5743b1cee7251d7d88da8df12f3001691d68088f221c3d7a7df59ba26.jpg)
183
+ Figure 2: A successful attack (a) without and (b) with derivative loss term (PGD, $\scriptstyle \epsilon = 1 0 \mathrm { m V }$ ). The background traces show the original signal before the preprocessing filter.
184
+
185
+ End-to-end algorithm. We illustrate the algorithmic procedure for designing a physiologically plausible UAP in Algorithm 1. Analogously, the proposed methods of derivative loss term and model propagation are applied with PGD. The hyperparameters $\alpha$ , $\beta$ , the number of PGD iterations and the restarts, the batch size and the number of epochs in UAP are determined based on a cross-validated grid search on the training set.
186
+
187
+ # 4 EXPERIMENTS AND RESULTS
188
+
189
+ We evaluate our methods on the Physionet EEG Motor Movement/Imagery Dataset (Goldberger et al., 2000; Sch) tackling inter-subject challenges, and generalize to subject-specific inter-session dataset IV-2a of BCI Competition (Brunner et al., 2008) (See Appendix C).
190
+
191
+ Dataset. The Physionet dataset contains valid EEG recordings of 105 subjects (Dose et al., 2018) and is publicly available under Open Data Commons Attribution License v1.0. We use the MI recordings that contain tasks of the imagination of left against right fist for $3 \mathrm { s }$ . The EEG trials were recorded with $N _ { c h } { = } 6 4$ channels sampled at $F _ { s } { = } 1 6 0 \mathrm { H z }$ , yielding $N _ { s } { = } 3 { \cdot } 1 6 0 { = } 4 8 0$ samples per trial. Additional baseline runs provide resting-state data, where the subjects did not perform any tasks while having eyes open. Overall, we get a total of 6615 trials with $N _ { c l } { = } 3$ balanced classes “left”, “right”, and “rest.”
192
+
193
+ Training and validation. We train and validate both the classification models and the generated adversarial examples with a 5-fold cross-validation, splitting the dataset into 84 subjects used for training and 21 subjects used for validation to effectively test the model on inter-subject variability. Similar to Wang et al. (2020), which achieved SoA performance on this dataset, the baseline model is trained for 100 epochs using Adam with $\beta _ { 1 } { = } 0 . 9$ , $\beta _ { 2 } { = } 0 . 9 9 9$ , and batch size of 16. The learning rate is 0.01 and decreased by a factor of 10 at epochs 20 and 50, achieving an average accuracy of $7 4 . 7 8 \%$ .
194
+
195
+ ![](images/61e50ae1624936e4724c0a3920f25f9cef6e945f75c78ede3ed08a1fb5c4512d.jpg)
196
+ Figure 3: A successful attack with derivative loss term and spatial constraints $\lambda _ { m } = 1$ and $\lambda _ { d } = 0 . 5 6 3$ (PGD, $\scriptstyle \epsilon = 5 0 \mathrm { m V }$ ). The background traces show the original signal before the preprocessing filter.
197
+
198
+ ![](images/1523c7615753b90b2c8e0e94fb41fcac116f3a3069037a001618243cb754a843.jpg)
199
+ Figure 4: ASR of PGD and UAP in Case 2), i.e., computed with head model (w/HM), and in Case 3), i.e., computed without head model (w/oHM).
200
+
201
+ ![](images/2c2e639cc82a57badda6f507c714534618e64bf003ecf1957433ac239f2e7d18.jpg)
202
+ Figure 5: ASR with the PGD attack propagating from different EEG channels with fixed $\lambda _ { d } { = } 0 . 3$ and variable $\lambda _ { m }$ .
203
+
204
+ An FFT band-pass filter $h _ { b p }$ with a customary passband of $0 . 1 { - } 4 0 \mathrm { H z }$ (Lawhern et al., 2018) is used as preprocessing step in both baseline and attack experiments.To determine the ASR, we compute the ratio between the successfully fooled trials, i.e., trials now classified as “rest”, and the total number of attacked trials, where we only consider the ones initially correctly classified as “left”/“right”.
205
+
206
+ Physiologically plausible attacks. We first analyze the instance-based attacks without considering the propagation model (Case 1), depicted in Figure 1. We compare our methods against random noise with amplitude $\epsilon$ as in (Zhang & Wu, 2019), FGSM that is the same as in (Zhang & Wu, 2019) with targeted scenario, and a UAP designed specifically for EEG (Liu et al., 2021). For both FGSM and PGD, the ASR increases together with the maximum amplitude $\epsilon$ of the perturbation. They always outperform the random noise, with PGD performing slightly better than FGSM. They reach the maximum ASR of $9 9 . 9 7 \%$ with $1 0 \mathrm { m V } .$ The post-attack classification accuracy drops from $7 4 . 7 8 \%$ to $48 \%$ for a perturbation amplitude of $2 \mathrm { m V }$ and to $33 \%$ for $1 0 \mathrm { m V }$ and higher amplitudes. Figure 2a shows the signals of a successful attack using PGD. The adversarial perturbation has a squarewave form which negatively affects the natural shape of the EEG signal. By adding the proposed derivative term, the square-wave artifacts are significantly reduced (2b), making the perturbation more physiologically plausible. When comparing the power spectral density of the original and attacked signals, the attacked signal designed without derivative presents large components in low frequencies, making it more easily detectable. Whereas the attack with derivative loss better resembles the power spectral density of the original signal (see Appendix D). Moreover, the introduction of the derivative term does not degrade the ASR (Figure 1). The quantitative measures between the original and the adversarial samples in Table 1 demonstrate that our proposed method with derivative term generates adversarial samples that are more similar to the original EEG, allowing them to remain imperceptible even with high $\epsilon$ (Appendix D). We reproduce the attacks using a Gaussian kernel as in (Han et al., 2020). After tuning the kernel size and variance of the Gaussian kernel, the method could not improve the plausibility metrics. The inferior performance of the Gaussian kernel could stem from the different nature of the signal: it was originally designed for ECGs which have a pseudo-periodic structure.
207
+
208
+ We extend the application of the derivative term to the UAP attack, while still not considering the propagation model (Case 1). Figure 1 shows a comparison in performance for different values of $\epsilon$ The saturation in ASR is reached with higher $\epsilon$ , i.e., $9 9 . 9 4 \%$ with $5 0 \mathrm { m V } .$ . This is expected since the UAP is a more difficult attack where a single set of perturbations per EEG channel is generated for all the test samples. Likewise in PGD, the ASR does not drop with the addition of the derivative term. We reproduce the UAP proposed by (Liu et al., 2021). Our UAP consistently reaches higher ASR.
209
+
210
+ Spatial Propagation. Finally, we introduce the spatial constraints in the signal propagation over the scalp (Case 2). We consider 9 different scenarios by combining 3 realistic attenuation configurations $\lambda _ { m } \ \in \ \{ 1 , 5 , 1 5 \}$ with 3 delay configurations $\lambda _ { d } \ \in \ \{ 0 . 1 , 0 . 3 , 0 . 5 6 3 \}$ , which capture the range described in Section 3.2. For evaluating the highest achievable attack efficiency, we test a scenario where the attacker is assumed to know the propagation model: the adversarial perturbation is generated and evaluated on fixed spatial parameters $\lambda _ { m }$ and $\lambda _ { d }$ , shown in Figure 4, where the ASR reaches up to $6 9 . 2 \%$ with PGD and $4 5 . 6 \%$ with UAP at $5 0 \mathrm { m V } .$ Figure 3 depicts an example of a successful attack with the highest perturbation amplitude. The introduction of the spatial constraints makes the attack problem harder yielding seldom square distortions. However, the resulting EEG signals still resemble physiological random processes typical of EEGs. Next, we ablate the spatial constraints during generation and test the resulting perturbations on the 9 above-mentioned scenarios (Case 3). The ASR drops significantly, especially for $\lambda _ { m } { = } 5$ and $\lambda _ { m } { = } 1 5$ where the attenuation of the perturbation over the scalp is greater (see Figure 7), and with the global UAP attack, where the attacker does not have access to the attacked EEG signals.
211
+
212
+ Our spatial propagation models allows us to identify the vulnerability of the individual EEG channels. Figure 5 shows the ASR when initiating an attack from a specific channel (T9, T10, etc.) and propagating it to the rest of the head. In the case with the greatest attenuation $\left( \lambda _ { m } = 1 5 \right)$ we find the maximum ASR at the electrode $\mathbf { C } \mathbf { z }$ between the regions of the electrodes C3 and C4, which are the most relevant ones for MI of the left and right hand tasks (Pfurtscheller & Lopes da Silva, 1999). We compute the pre- and post-attack confusion matrices for attacks from T9 and T10 (see Appendix E). When the attack propagates from the left side (T9), more samples with ground-truth label “right” can be fooled to “rest”, while the attacks from the right side (T10) are more effective “left” labels.
213
+
214
+ Overall, our methods successfully generates perturbations resembling natural noise in EEGs, that can be added at the source of the signal acquisition and are propagated over the scalp, creating attacked signals that are physiologically plausible. Similar results have been observed on the BCI Competition IV-2a dataset, shown in Appendix C.
215
+
216
+ # 5 CONCLUSION
217
+
218
+ With the incentive of improving security in BCIs, in this work, we demonstrated that DoS attacks are feasible and effective despite physical domain constraints. Experimental results reveal potential risks of realistic attacks on smart wearable BCIs and incentivize the need for future development of defense mechanisms while designing deep learning models to be embedded in smart wearable BCIs. Our detailed analysis on each EEG channel shows that special attention has to be paid, combined with the findings in neuroscience, to the brain regions that are found responsible for a specific task. In future work, the proposed attacks can cover uncertainty in the propagation model and the timing of the MI activity. Moreover, hardware implementations of such attacks can be created to evaluate the proposed methods in real-world, with the ultimate goal of developing effective countermeasures.
219
+
220
+ # ETHICS STATEMENT
221
+
222
+ The sore goal of this work is to raise awareness of potential adversarial attacks in BCIs and incentivize the development of coutermeasures, especially in the current moment when the BCIs are facing an increasing growth in applications of everyday life. The active development of smart wearable BCIs is introducing a paradigm shift where the processing algorithms are embedded near the data acquisition. While this improves the system security to a certain extend, with this work we have shown that it is not the only and ultimate way to a safe and reliable BCI, since we have shown that BCI systems are vulnerable also to attacks at the signals’ source. We hope that our work sheds light on the fact that practical BCI systems are vulnerable, despite the physical constraints, and motivates the design and development of more reliable and robust BCI systems.
223
+
224
+ # REPRODUCIBLITY
225
+
226
+ A link to a anonymous downloadable source code of this work is submitted as supplementary materials.
227
+
228
+ # REFERENCES
229
+
230
+ BCI2000: A general-purpose brain-computer interface (BCI) system.
231
+
232
+ Ayten Ozge Akmandor and Niraj K. Jha. Smart health care: An edge-side computing perspective. IEEE Consumer Electronics Magazine, 7(1):29–37, 2018.
233
+
234
+ Ralph Algazi, Carlos Avendano, and Richard O Duda. Estimation of a spherical-head model from anthropometry. J. Aud. Eng. Soc., 49, 2001.
235
+
236
+ Pietro Aricò, Nicolina Sciaraffa, and Fabio Babiloni. Brain–computer interfaces: Toward a daily life employment. Brain Sciences, 10(3), 2020.
237
+
238
+ Aamir Arsalan, Muhammad Majid, Amna Rauf Butt, and Syed Muhammad Anwar. Classification of perceived mental stress using a commercially available EEG headband. IEEE Journal of Biomedical and Health Informatics, 23(6):2257–2264, 2019.
239
+
240
+ Christopher Beach, Ertan Balaban, and Alexander J. Casson. Chapter 14 - edge algorithms for wearables: an overview of a truly multi-disciplinary problem. In Edward Sazonov (ed.), Wearable Sensors (Second Edition), pp. 379–414. Academic Press, Oxford, second edition edition, 2021.
241
+
242
+ Kais Belwafi, Olivier Romain, Sofien Gannouni, Fakhreddine Ghaffari, Ridha Djemal, and Bouraoui Ouni. An embedded implementation based on adaptive filter bank for brain–computer interface systems. Journal of Neuroscience Methods, 2018.
243
+
244
+ Sergio López Bernal, Alberto Huertas Celdrán, Gregorio Martínez Pérez, Michael Taynnan Barros, and Sasitharan Balasubramaniam. Security in brain-computer interfaces: State-of-the-art, opportunities, and future challenges. ACM Comput. Surv., 54(1), January 2021.
245
+
246
+ Florian C. A. A. Bodranghien, Margot Langlois Mahe, Serge Clément, and Mario U. Manto. A pilot study on the effects of transcranial direct current stimulation on brain rhythms and entropy during self-paced finger movement using the Epoc helmet. Frontiers in Human Neuroscience, 11:201, 2017.
247
+
248
+ Jonathan S. Brumberg, Jeremy D. Burnison, and Kevin M. Pitt. Using motor imagery to control brain-computer interfaces for communication. In Dylan D. Schmorrow and Cali M. Fidopiastis (eds.), Foundations of Augmented Cognition: Neuroergonomics and Operational Neuroscience, pp. 14–25, Cham, 2016. Springer International Publishing.
249
+
250
+ C Brunner, R Leeb, G R Müller-Putz, A Schlögl, and G Pfurtscheller. BCI competition 2008 - Graz data set A, 2008. URL http://bnci-horizon-2020.eu/database/data-sets.
251
+
252
+ Ujwal Chaudhary, Niels Birbaumer, and Ander Ramos-Murguialday. Brain–computer interfaces for communication and rehabilitation. Nature Reviews Neurology, 12, 08 2016.
253
+
254
+ Hauke Dose, Jakob S. Moller, Sadasivan Puthusserypady, and Helle K. Iversen. A deep learning MI - EEG classification model for BCIs. In 2018 26th European Signal Processing Conference (EUSIPCO), pp. 1676–1679. IEEE, 2018.
255
+
256
+ Anirban Dutta. Brain–computer interface spellers for communication: Why we need to address their security and authenticity. Brain Sciences, 10:139, 03 2020.
257
+
258
+ Daniel Elstob and Emanuele Secco. A low cost EEG based BCI prosthetic using motor imagery. International Journal of Information Technology Convergence and Services, 6:23–36, 02 2016.
259
+
260
+ Anna Fertonani, Clarissa Ferrari, and Carlo Miniussi. What do you feel if I apply transcranial electric stimulation? Safety, sensations and secondary induced effects. Clinical Neurophysiology, 126(11): 2181–2188, 2015.
261
+
262
+ Samuel G. Finlayson, John D. Bowers, Joichi Ito, Jonathan L. Zittrain, Andrew L. Beam, and Isaac S. Kohane. Adversarial attacks on medical machine learning. Science, 363(6433):1287–1289, 2019.
263
+
264
+ Flowneuroscience. Flow tDCS device. https://flowneuroscience.com/, 2021. Accessed: 2021-05-27.
265
+
266
+ Daniel Freer and Guang-Zhong Yang. Data augmentation for self-paced motor imagery classification with C-LSTM. Journal of Neural Engineering, 17, 01 2020.
267
+
268
+ Ary L Goldberger, Luis A N Amaral, Leon Glass, Jeffrey M Hausdorff, Plamen Ch Ivanov, Roger G Mark, Joseph E Mietus, George B Moody, Chung-Kang Peng, and H Eugene Stanley. PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals. circulation, 101(23):e215–e220, 2000.
269
+
270
+ Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In Proc. International Conference on Learning Representations, ICLR, 2015.
271
+
272
+ 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, 26 (3):360–363, 2020.
273
+
274
+ Xue Jiang, Xiao Zhang, and Dongrui Wu. Active learning for black-box adversarial attacks in EEGbased brain-computer interfaces. In 2019 IEEE Symposium Series on Computational Intelligence (SSCI), pp. 361–368, 2019.
275
+
276
+ Mandar Karlekar and Anubha Gupta. Stochastic modeling of EEG rhythms with fractional gaussian noise. In 2014 22nd European Signal Processing Conference (EUSIPCO), pp. 2520–2524, 2014.
277
+
278
+ Victor Kartsch, Giuseppe Tagliavini, Marco Guermandi, Simone Benatti, Davide Rossi, and Luca Benini. Biowolf: A sub-10-mW 8-channel advanced brain–computer interface platform with a nine-core processor and BLE connectivity. IEEE Transactions on Biomedical Circuits and Systems, 13(5):893–906, 2019.
279
+
280
+ Min Kim, Youngchang Cho, Suk-Tae Seo, Chang-Sik Son, Hee-Joon Park, and Yoon-Nyun Kim. A new method for non-invasive measurement of skin in the low frequency range. Healthcare informatics research, 16:143–8, 09 2010.
281
+
282
+ Alexey Kurakin, Ian J. Goodfellow, and Samy Bengio. Adversarial examples in the physical world. CoRR, abs/1607.02533.
283
+
284
+ Vernon J Lawhern, Amelia J Solon, Nicholas R Waytowich, Stephen M Gordon, Chou P Hung, and Brent J Lance. EEGNet: a compact convolutional neural network for EEG-based brain–computer interfaces. Journal of Neural Engineering, 15(5):056013, 7 2018.
285
+
286
+ Jinfeng Li, Shouling Ji, Tianyu Du, Bo Li, and Ting Wang. Textbugger: Generating adversarial text against real-world applications. In Proc. Network and Distributed System Security Symposium, NDSS. The Internet Society, 2019a.
287
+
288
+ Juncheng Li, Shuhui Qu, Xinjian Li, Joseph Szurley, J. Zico Kolter, and Florian Metze. Adversarial music: Real world audio adversary against wake-word detection system. In Proc. Neural Information Processing Systems (NeurIPS), pp. 11908–11918, 2019b.
289
+
290
+ Zihan Liu, Lubin Meng, Xiao Zhang, Weili Fang, and Dongrui Wu. Universal adversarial perturbations for CNN classifiers in EEG-based BCIs, 2021.
291
+
292
+ Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In Proc. International Conference on Learning Representations (ICLR), 2018.
293
+
294
+ Alireza Malekmohammadi, Hoda Mohammadzade, Alireza Chamanzar, Mahdi Shabany, and Benyamin Ghojogh. An efficient hardware implementation for a motor imagery brain computer interface system. Scientia Iranica, 26:72–94, 2019.
295
+
296
+ Iuliana Marin, Myssar Jabbar Hammood Al-Battbootti, and Nicolae Goga. Drone control based on mental commands and facial expressions. In 2020 12th International Conference on Electronics, Computers and Artificial Intelligence (ECAI), pp. 1–4, 2020.
297
+
298
+ Lubin Meng, Jian Huang, Zhigang Zeng, Xue Jiang, Shan Yu, Tzyy-Ping Jung, Chin-Teng Lin, Ricardo Chavarriaga, and Dongrui Wu. EEG-based brain-computer interfaces are vulnerable to backdoor attacks, 2021.
299
+
300
+ Isabelle Merlet, Gwénaël Birot, Ricardo Salvador, Behnam Molaee-Ardekani, Abeye Mekonnen, Aureli Soria-Frish, Giulio Ruffini, Pedro C. Miranda, and Fabrice Wendling. From oscillatory transcranial current stimulation to scalp EEG changes: A biophysical and physiological modeling study. PLOS ONE, 8:1–12, 02 2013.
301
+
302
+ Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017.
303
+
304
+ G. Pfurtscheller and F.H. Lopes da Silva. Event-related EEG/MEG synchronization and desynchronization: basic principles. Clinical Neurophysiology, 110(11):1842–1857, 11 1999.
305
+
306
+ Robert Plutchik and Henry R Hirsch. Skin impedance and phase angle as a function of frequency and current. Science, 141(3584):927–928, 1963.
307
+
308
+ ZG Qiao, L Mørkrid, and NK Vøllestad. Characteristics of phase angle, extrapolated conductance and ion relaxation time in the low-frequency admittance locus plot of human palmar skin. Medical and Biological Engineering and Computing, 32(2):161–167, 1994.
309
+
310
+ Yao Qin, Nicholas Carlini, Ian J. Goodfellow, Garrison W. Cottrell, and Colin Raffel. Imperceptible, robust, and targeted adversarial examples for automatic speech recognition. CoRR, abs/1903.10346, 2019.
311
+
312
+ Mona Sazgar and Michael G. Young. EEG Artifacts, pp. 149–162. Springer International Publishing, Cham, 2019.
313
+
314
+ Tibor Schneider, Xiaying Wang, Michael Hersche, Lukas Cavigelli, and Luca Benini. Q-EEGNet: an energy-efficient 8-bit quantized parallel EEGNet implementation for edge motor-imagery brainmachine interfaces. In 2020 IEEE International Conference on Smart Computing (SMARTCOMP), pp. 284–289, 2020.
315
+
316
+ Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian J. Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In Proc. International Conference on Learning Representations, ICLR, 2014.
317
+
318
+ Johannes Vorwerk, Ümit Aydin, Carsten H Wolters, and Christopher R Butson. Influence of head tissue conductivity uncertainties on EEG dipole reconstruction. Frontiers in neuroscience, 13:531, 2019.
319
+
320
+ Xiaying Wang, Michael Hersche, Batuhan Tömekce, Burak Kaya, Michele Magno, and Luca Benini. An accurate EEGNet-based motor-imagery brain–computer interface for low-power edge computing. In 2020 IEEE International Symposium on Medical Measurements and Applications (MeMeA), pp. 1–6, 2020.
321
+
322
+ Yang Yu, Yadong Liu, Jun Jiang, Erwei Yin, Zongtan Zhou, and Dewen Hu. An asynchronous control paradigm based on sequential motor imagery and its application in wheelchair navigation. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 26(12):2367–2375, 2018.
323
+
324
+ Wei Emma Zhang, Quan Z. Sheng, Ahoud Abdulrahmn F. Alhazmi, and Chenliang Li. Adversarial attacks on deep-learning models in natural language processing: A survey. ACM Trans. Intell. Syst. Technol., 11(3):24:1–24:41, 2020.
325
+
326
+ Xiao Zhang and Dongrui Wu. On the vulnerability of CNN classifiers in EEG-based BCIs. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 27(5):814–825, 2019.
327
+
328
+ Jiayu Zhuang, Keke Geng, and Guodong Yin. Ensemble learning based brain–computer interface system for ground vehicle control. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 51(9):5392–5404, 2021.
329
+
330
+ ![](images/673d5d9efd092b4cc8e800ff6a5738b2621fff65b3be06e0ef50d295cf6a25a4.jpg)
331
+
332
+ Figure 6: Practical adversarial attack scenario in BCIs: a smart device close to the ear emits a perturbation signal which propagates over the head surface to the EEG electrodes.
333
+
334
+ ![](images/38b8a7e8b4be2758df986c7eb0277e6018207129bd99c18ee2f96bd9341afb7e.jpg)
335
+ Figure 7: Magnitude of the spatial propagation for different $\lambda _ { m }$ . The perturbation is emitted from the left side of the head and propagates over the head surface. The leftmost electrode senses the highest magnitude (red), which linearly decreases towards zero (white) with growing propagation distance and $\lambda _ { m }$ . The electrodes which sense the perturbations, i.e., magnitude ${ > } 0$ , are marked with dots. The electrodes T9, C3, C4, and T10 are labeled for reference.
336
+
337
+ # A ATTACK AT THE SOURCE OF SIGNAL ACQUISITION
338
+
339
+ Fig. 6 illustrates the new attack scenario where the perturbation is delivered to the human scalp and propagates to the sensing electrodes at the source of the signal acquisition.
340
+
341
+ # B SPATIAL PROPAGATION MODELS
342
+
343
+ Fig. 7 illustrates the magnitude of signal propagation using different propagation parameters $\lambda _ { m } =$ $\{ 1 , 5 , 1 5 \}$ . A large $\lambda _ { m }$ represents cases with large attenuation and limited propagation (e.g., attack over the air) and a small $\lambda _ { m }$ covers cases with lower attenuation where the perturbation can propagate farther (e.g., a smart glass).
344
+
345
+ # C EXPERIMENTS ON BCI COMPETITION IV-2A
346
+
347
+ Dataset. The IV-2a dataset of the BCI Competition contains recordings from nine different subjects and distinguishes between four classes of imagined movements: left and right hand, both feet, and the tongue. 22 different EEG channels were recorded, sampled at $2 5 0 \mathrm { H z }$ . The data was pre-processed with a bandpass filter between 0.1 and $4 0 \mathrm { H z }$ . Each subject completed two recording session on two different days, where the first session is used for training and the second for testing as per the rules of the competition. Each session contains 288 trials.
348
+
349
+ Training and validation. We train a separate baseline model per subject using Adam optimizer with $\beta _ { 1 } { = } 0 . 9$ and $\beta _ { 2 } { = } 0 . 9 9 9$ , a batch size of 32, and 500 epochs. The learning rate is 0.001 achieving an average accuracy of $7 1 . 7 9 \%$ . This dataset does not contain the rest class. We choose to design an attack that aims to fool the classifier to always predict “tongue.” Moreover, we apply a maximum perturbation amplitude of $\epsilon \in [ 0 . 0 1 , 1 0 ] \mathrm { m V }$ due to the lower signal amplitude encountered in this dataset.
350
+
351
+ Results. Fig. 8 compares the ASR of different attacks without considering the propagation model (Case 1). Generally, a minimal perturbation amplitude of $1 \mathrm { m V }$ and $2 \mathrm { m V }$ suffices to achieve $100 \%$ ASR with PGD and UAP, respectively. The addition of the derivative loss term does not give any performance degradation in terms of the ASR. The average post-attack classification accuracy drops from $7 1 . 7 9 \%$ to $50 \%$ for a perturbation amplitude of $0 . 1 5 \mathrm { m V }$ and $2 4 . 7 \%$ for $0 . 6 \mathrm { m V }$ and higher amplitudes, when PGD with derivative is used.
352
+
353
+ ![](images/2754d89a4671045e54c9d9a042e28c5bfceebb00058d60cea27bd8868f79baae.jpg)
354
+ Figure 8: ASR on BCI Competition IV-2a with random noise, FGSM, PGD, and UAP with and without derivative loss term.
355
+
356
+ Fig. 9 shows the ASR for different propagation parameters $\lambda _ { m }$ and $\lambda _ { d , }$ ) and maximum perturbation amplitudes $\epsilon$ . When considering the head model during the design of the attack (Case 2, w/HM), both PGD and UAP reach significantly higher ASR compared to attacks designed without the consideration of the head model (Case 3, w/oHM).
357
+
358
+ # D PLAUSIBILITY OF ATTACKS
359
+
360
+ This section provides power spectral density plots of original signals and attacked signals with and without the derivative loss term, shown in Figure 10. The power spectral density is determined by computing the magnitude squared Fast Fourier Transform of the signals that were illustrated in Figure 2. The attack designed with the derivative loss term has a similar distribution as the original signal, where as the attack without derivative shows large contributions in the low frequency domain $( < 5 \mathrm { H z } )$ , which were not present in the original signal. These low-frequency components stem from the square-wave shaped attack and can be used as a way to detect the attack; hence, this attack cannot be considered imperceptible.
361
+
362
+ Moreover, Figure 13 shows the attacks with and without derivative loss term with increasing maximum amplitude . We can see that for low amplitudes ( $\mathrm { 1 m V }$ and $5 \mathrm { m V }$ ) the generated attacks with and without derivative still look like EEGs. At $1 0 \mathrm { m V } ,$ the attack generated without derivative presents minor square-wave artifacts, which could be still imperceptible to a non-expert. With $2 5 \mathrm { m V }$ and $5 0 \mathrm { m V } ,$ , the ones generated without derivative have strong and perceptible square-wave displacements, while the ones generated with our proposed method can still be mistaken as real EEG signals. While with the instance-based attacks, it is not necessary to have more than $1 0 \mathrm { m V }$ to get a very high ASR (see Figure 1), with the universal attacks and physical constraints, the ASR increases with increasing perturbation amplitude (see Figure 4).
363
+
364
+ The same observations can be drawn from the plausibility metrics, which have been proposed for the first time in this paper to assess quantitatively the EEG attacks. For example, looking at the cosine similarity $( \gamma )$ in Table 1, without the derivative loss term, $\gamma$ drops to $9 7 . 9 9 \%$ with $\epsilon = 5 \mathrm { m V } ,$ , whereas, with the derivative, $\gamma$ drops to about the same value of $9 7 . 4 7 \%$ with $\epsilon = 1 0 \mathrm { m V } ,$ yielding an increase in ASR from $85 \%$ $\mathrm { 5 m V ) }$ to $9 9 \%$ $\mathrm { 1 0 m V ) }$ shown in Figure 1 with PGD.
365
+
366
+ ![](images/ce3b790a23a18be77d8726d791255034fbb41f1cf3028b470ccdc8576c9d615a.jpg)
367
+ Figure 9: Results on BCI Competition IV-2a. ASR of PGD and UAP in Case 2), i.e., computed with head model (w/HM); and in Case 3), i.e., computed without head model (w/oHM).
368
+
369
+ ![](images/24bbf9586d061f5fa7fa0a1b21aa8350f5c5b44b459c9cb84b74008f7c705ba6.jpg)
370
+ Figure 10: Power spectral density comparison of the attack with and without derivative loss term, as well as the original signal shown in Figure 2.
371
+
372
+ # E CLASSIFICATION CONFUSION MATRICES
373
+
374
+ We analyze the confusion matrices before and after the proposed attack. Fig. 11 shows the confusion matrix of EEGNet on the Physionet dataset before the attack, where all classes can be classified with similar accuracy $( 7 2 . 8 \% - 7 3 . 5 \% )$ . Fig. 12 shows the confusion matrices for three different propagation parameters $( \lambda _ { m } \in \{ 1 , 5 , 1 5 \} )$ and two attack positions (T9 and T10) which correspond to the left and right side of the head. When considering the attacks from the left side, shown in Fig. 12a–12c, more samples with ground-truth label “right” can be fooled to “rest”. This is particularly articulated in largely attenuated propagation model $\lambda _ { m } { = } 1 5 )$ . In a similar vein, attacks coming from the right side of the head (T10) are more effective on data with ground-truth label “left” (Fig. 12d–12f).
375
+
376
+ ![](images/1ea1613670bc55b7d890555d5cc7a5add225bf73d62460f527b51eaf42cf5122.jpg)
377
+ Figure 11: Confusion matrix original EEG predictions on Physionet dataset.
378
+
379
+ ![](images/f736298343192e93d83223443cacb3b79a8f52cbc4fc153ebd24626308f0133e.jpg)
380
+ Figure 12: Confusion matrices for the Physionet dataset after attacking EEGNet with the proposed PGD attack with derivative and considering the spatial propagation. The attack is either performed from the left electrode (T9) or from the right electrode (T10). We consider different magnitude propagation parameters $\lambda _ { m }$ and a constant delay parameter $\lambda _ { d } { = } 0 . 3$ .
381
+
382
+ ![](images/6345909357cc6d546532e1d948e55cd4d914328dd323e1190fe1921adc19c884.jpg)
383
+ Figure 13: A successful PGD attack on Physionet dataset (i) without and (ii) with derivative with different values of maximum amplitude $\epsilon$ .
parse/dev/0sEIBFb4cs/0sEIBFb4cs_content_list.json ADDED
@@ -0,0 +1,2013 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "PRACTICAL ADVERSARIAL ATTACKS ON BRAIN– COMPUTER INTERFACES ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 176,
8
+ 99,
9
+ 828,
10
+ 146
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Anonymous authors Paper under double-blind review ",
17
+ "bbox": [
18
+ 183,
19
+ 170,
20
+ 398,
21
+ 198
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "ABSTRACT ",
28
+ "text_level": 1,
29
+ "bbox": [
30
+ 454,
31
+ 234,
32
+ 544,
33
+ 251
34
+ ],
35
+ "page_idx": 0
36
+ },
37
+ {
38
+ "type": "text",
39
+ "text": "Deep learning has been widely employed in brain–computer interfaces (BCIs) to decode a subject’s intentions based on recorded brain activities enabling direct interaction with computers and machines. BCI systems play a crucial role in motor rehabilitation and have recently experienced a significant market boost as consumer-grade products. Recent studies have shown that deep learning-based BCIs are vulnerable to adversarial attacks. Failures in such systems might cause medical misdiagnoses, physical harm, and financial damages, hence it is of utmost importance to analyze and understand in-depth, potential malicious attacks to develop countermeasures. In this work, we present the first study that analyzes and models adversarial attacks based on physical domain constraints in EEGbased BCIs. Specifically, we assess the robustness of EEGNet which is the current state-of-the-art network for embedded BCIs. We propose new methods to induce denial-of-service attacks and incorporate domain-specific insights and constraints to accomplish two key goals: (i) create smooth adversarial attacks that are physiologically plausible; (ii) consider the realistic case where the attack happens at the origin of the signal acquisition and it propagates on the human head. Our results show that EEGNet is significantly vulnerable to adversarial attacks with an attack success rate of more than $50 \\%$ . With our work, we want to raise awareness and incentivize future developments of proper countermeasures. ",
40
+ "bbox": [
41
+ 233,
42
+ 263,
43
+ 766,
44
+ 527
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "1 INTRODUCTION ",
51
+ "text_level": 1,
52
+ "bbox": [
53
+ 176,
54
+ 553,
55
+ 336,
56
+ 568
57
+ ],
58
+ "page_idx": 0
59
+ },
60
+ {
61
+ "type": "text",
62
+ "text": "Recent work has shown that adversarial perturbations can cause state-of-the-art (SoA) deep learning models to misbehave in various domains including vision (Szegedy et al., 2014; Goodfellow et al., 2015), NLP (Li et al., 2019a; Zhang et al., 2020), speech (Qin et al., 2019; Li et al., 2019b), and biomedicine (Finlayson et al., 2019; Han et al., 2020). Neural networks have been applied in brain–computer interfaces (BCIs) achieving impressive results (Lawhern et al., 2018; Dose et al., 2018). A BCI enables direct interactions with external devices based on brain activities, typically recorded using electroencephalographic (EEG) systems. It can provide a communication pathway for severely paralyzed patients or assist in rehabilitation (Chaudhary et al., 2016). Besides medical applications, recent developments in wearable devices have pushed BCIs towards consumer-grade products to improve life quality (Aricò et al., 2020), e.g., the Interaxon Muse headband for stress relief (Arsalan et al., 2019) or the Emotiv headset for controlling drones (Marin et al., 2020) and ground vehicles (Zhuang et al., 2021). Safety in BCI systems is paramount (Dutta, 2020; Bernal et al., 2021), because a failure would cause misdiagnoses, user frustration, or even danger while driving a wheelchair or controlling a drone, causing physical and financial damages. ",
63
+ "bbox": [
64
+ 174,
65
+ 584,
66
+ 825,
67
+ 777
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Zhang & Wu (2019) were the first to show that EEG-based BCIs are vulnerable to adversarial attacks by proposing an unsupervised fast gradient sign method (FGSM) (Goodfellow et al., 2015). More recent work has proposed a more practical attack where a universal adversarial perturbation (UAP) is computed once and can be applied to all EEG trials without learning it for every new input (Liu et al., 2021). Both works assume that the acquired signals are sent to a remote compute engine, e.g., a computer, and the attacker can alter the signals during the transmission by attaching a “jamming” module between the signal preprocessing step and the classifier. Recent developments in smart edge computing (Akmandor & Jha, 2018; Beach et al., 2021) eliminate the need for data transmission, making this attack scenario inapplicable. Novel BCI solutions (Kartsch et al., 2019; Wang et al., 2020) embed the signal processing and classification directly at the sensor edge. A more practical adversarial example has been identified by Meng et al. (2021). It consists of a square-shaped signal that can be added to EEG trials before the preprocessing step. However, the attack is proposed as a backdoor key, which means that the attacker has direct access to the training dataset and pollutes it with adversarial examples, which is improbable if the attacker is not directly involved in the data acquisition or in the training of the classifier. Li et al. (2019b) have shown an attack scenario in the audio domain by considering the on-board edge processing of a wake-word detection system, where an adversarial audio trace is delivered to the environment causing denial-of-service (DoS). No similar studies can be currently found in the BCI domain. ",
74
+ "bbox": [
75
+ 174,
76
+ 785,
77
+ 825,
78
+ 924
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "",
85
+ "bbox": [
86
+ 174,
87
+ 103,
88
+ 825,
89
+ 214
90
+ ],
91
+ "page_idx": 1
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Challenges: Designing natural attacks and modeling its propagation. Unlike in audio applications where the signal can simply propagate over-the-air and is sensed by a microphone, extra modeling is required to evaluate the signal propagation in BCIs based on the physical properties of the biological tissues. In this work, rather than assuming a “jamming” module between the preprocessing and the classification steps as in related works, we consider a more realistic and practically applicable attack scenario where the adversarial perturbations are introduced at the source of the data acquisition, as showcased in Figure 6 in Appendix A. This can be achieved, for example, via electromagnetic waves delivered to the environment (Dutta, 2020) or via transcranial current stimulation with electrical current delivered directly to the scalp (Bodranghien et al., 2017; Fertonani et al., 2015), by exploiting wearable devices, such as smart glasses or over-ear headsets (Flowneuroscience, 2021; Marin et al., 2020). The adversarial perturbations translate into electrical signals propagating over the scalp and are sensed by the electrodes in addition to the EEG signals. ",
96
+ "bbox": [
97
+ 174,
98
+ 222,
99
+ 825,
100
+ 388
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "To guarantee the imperceptibility of the attacks, previous works in BCIs create perturbations that are small in amplitude (Zhang & Wu, 2019; Jiang et al., 2019; Liu et al., 2021), limiting the attack success rate (ASR). Increased perturbation’s amplitude yields higher ASR (Meng et al., 2021), but makes the attack more easily detectable. Moreover, the generated perturbations are square-shaped, which is implausible for biosignals. Han et al. (2020) are the first to observe square-wave artifacts in biosignals’ attacks and propose smooth perturbations for electrocardiograms (ECGs). No similar works have been found for EEGs. ",
107
+ "bbox": [
108
+ 174,
109
+ 395,
110
+ 825,
111
+ 492
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "This work: Practical attacks on BCI models. To address the above technical challenges, and for analyzing the vulnerability of embedded BCI models in practical scenarios, we design a new attack algorithm that generates smooth adversarial examples based on the signals’ first derivative and model its propagation over the scalp based on a realistic head model by taking into consideration the attack source and the electrical and physical properties of the conducting tissues. This enables the creation of practically effective perturbations, that can be delivered by an external device to attack EEG-based BCIs at the source of signal acquisition. We attack the most energy-efficient network that has been embedded on microcontrollers for smart wearable BCIs called EEGNet (Lawhern et al., 2018; Schneider et al., 2020). It is a resource-friendly convolutional neural network (CNN) and is the SoA in terms of accuracy and energy-efficiency trade-off (Belwafi et al., 2018; Malekmohammadi et al., 2019; Wang et al., 2020; Schneider et al., 2020). ",
118
+ "bbox": [
119
+ 173,
120
+ 500,
121
+ 825,
122
+ 652
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "We evaluate our methods and show experimental results on BCIs based on the motor imagery (MI) paradigm, which is of special interest among others because it can be asynchronously self-paced without external stimuli (Freer & Yang, 2020). By imagining the movement of different body parts, the decoded intention is translated into control signals. It is widely applied in several BCI applications, such as the control of wheelchairss (Yu et al., 2018), prosthetic armss (Elstob & Secco, 2016), ground vehicles (Zhuang et al., 2021), and in communication (Brumberg et al., 2016). It has been proven to be the most difficult task to be attacked among the most common BCI paradigms (Zhang & Wu, 2019; Meng et al., 2021). We evaluate our methods by “fooling” the victim model to always predict “rest” class. This essentially yields a DoS attack, because resting-state EEG signals are generally interpreted as no subject’s intention decoded, i.e., no control action needs to be taken by the BCI system (Yu et al., 2018). While for healthy subjects it might solely cause user frustration and financial losses, for severely paralyzed patients it can lead to loss of communication and independence. We generalize our methodology to an other MI task of BCI Competition IV-2a dataset and believe that it can be easily adapted to other BCI paradigms. ",
129
+ "bbox": [
130
+ 173,
131
+ 660,
132
+ 826,
133
+ 853
134
+ ],
135
+ "page_idx": 1
136
+ },
137
+ {
138
+ "type": "text",
139
+ "text": "Main contributions. Our main contributions are: ",
140
+ "bbox": [
141
+ 176,
142
+ 861,
143
+ 500,
144
+ 875
145
+ ],
146
+ "page_idx": 1
147
+ },
148
+ {
149
+ "type": "text",
150
+ "text": "• We design a new method to generate smooth adversarial perturbations that are physiologically plausible and imperceptible to the human eye. ",
151
+ "bbox": [
152
+ 218,
153
+ 882,
154
+ 823,
155
+ 911
156
+ ],
157
+ "page_idx": 1
158
+ },
159
+ {
160
+ "type": "text",
161
+ "text": "• We consider a practical scenario where the perturbation is added at the signal acquisition source and model its propagation constrained by the physical properties of the human scalp. • The first study of adversarial perturbations in BCI to consider the practical scenario of smart edge computing and physical signal propagation. We create both local and global perturbations and show that our attacks consistently achieve a success rate of $> 5 0 \\%$ in different settings pointing to the significant vulnerability of the SoA embedded EEGNet. ",
162
+ "bbox": [
163
+ 217,
164
+ 103,
165
+ 825,
166
+ 191
167
+ ],
168
+ "page_idx": 2
169
+ },
170
+ {
171
+ "type": "text",
172
+ "text": "We hope that our work raises awareness for potential risks and motivates the future development of appropriate countermeasures. ",
173
+ "bbox": [
174
+ 174,
175
+ 198,
176
+ 825,
177
+ 227
178
+ ],
179
+ "page_idx": 2
180
+ },
181
+ {
182
+ "type": "text",
183
+ "text": "2 BACKGROUND ",
184
+ "text_level": 1,
185
+ "bbox": [
186
+ 176,
187
+ 244,
188
+ 328,
189
+ 262
190
+ ],
191
+ "page_idx": 2
192
+ },
193
+ {
194
+ "type": "text",
195
+ "text": "2.1 CLASSIFICATION IN BCIS ",
196
+ "text_level": 1,
197
+ "bbox": [
198
+ 176,
199
+ 275,
200
+ 393,
201
+ 291
202
+ ],
203
+ "page_idx": 2
204
+ },
205
+ {
206
+ "type": "text",
207
+ "text": "We first describe the commonly used approach in BCIs for classification, consisting of a preprocessing step and a classifier. The brain activity is recorded with an EEG device which samples $N _ { c h }$ channels at rate $F _ { s }$ . We define one trial $j$ as $( \\mathbf { X } ^ { ( j ) } , y ^ { ( j ) } )$ , where $y ^ { ( j ) } \\in \\{ 0 , 1 , . . . , N _ { c l } - 1 \\}$ is the true label of $N _ { c l }$ MI tasks, and $\\mathbf { X } ^ { ( j ) } \\in \\mathbb { R } ^ { N _ { s } \\times N _ { c h } }$ the multi-channel recording defined as ",
208
+ "bbox": [
209
+ 173,
210
+ 301,
211
+ 825,
212
+ 361
213
+ ],
214
+ "page_idx": 2
215
+ },
216
+ {
217
+ "type": "equation",
218
+ "img_path": "images/4adef2bd32024f0155b08bd021946820057f4e0a6d08b9b081db9e63f5cb922a.jpg",
219
+ "text": "$$\n\\mathbf { X } ^ { ( j ) } : = \\left( \\mathbf { x } _ { 0 } ^ { ( j ) } , \\mathbf { x } _ { 1 } ^ { ( j ) } , . . . , \\mathbf { x } _ { N _ { c h } - 1 } ^ { ( j ) } \\right) ,\n$$",
220
+ "text_format": "latex",
221
+ "bbox": [
222
+ 385,
223
+ 362,
224
+ 611,
225
+ 388
226
+ ],
227
+ "page_idx": 2
228
+ },
229
+ {
230
+ "type": "text",
231
+ "text": "with $\\mathbf { x } _ { i } ^ { ( j ) } \\in \\mathbb { R } ^ { N _ { s } }$ corresponding to the recording of the $j$ -th trial and the $i$ -th channel containing $N _ { s }$ temporal samples. For simplicity, we denote $\\mathbf { X } : = \\mathbf { X } ^ { ( j ) }$ and $y : = y ^ { ( j ) }$ . ",
232
+ "bbox": [
233
+ 178,
234
+ 393,
235
+ 825,
236
+ 424
237
+ ],
238
+ "page_idx": 2
239
+ },
240
+ {
241
+ "type": "text",
242
+ "text": "The EEG recordings are often preprocessed with a band-pass filter, e.g., using a Fast Fourier Transform (FFT) filter $h _ { b p } ( \\cdot )$ , before being fed to a classifier, yielding ",
243
+ "bbox": [
244
+ 173,
245
+ 430,
246
+ 821,
247
+ 459
248
+ ],
249
+ "page_idx": 2
250
+ },
251
+ {
252
+ "type": "equation",
253
+ "img_path": "images/92578742fa44b8eb625a3c6e4e087ff7ad891f1315813fccd22129d3165cbf68.jpg",
254
+ "text": "$$\n\\mathbf { X } _ { b p } = H _ { b p } ( \\mathbf { X } ) = \\left( h _ { b p } ( \\mathbf { x } _ { 0 } ) , h _ { b p } ( \\mathbf { x } _ { 1 } ) , . . . , h _ { b p } ( \\mathbf { x } _ { N _ { c h } - 1 } ) \\right) .\n$$",
255
+ "text_format": "latex",
256
+ "bbox": [
257
+ 312,
258
+ 460,
259
+ 686,
260
+ 478
261
+ ],
262
+ "page_idx": 2
263
+ },
264
+ {
265
+ "type": "text",
266
+ "text": "Finally, the preprocessed signal $\\mathbf { X } _ { b p }$ is classified with a trainable model $f$ and is mapped to $\\mathbf { p } : =$ $f \\left( { \\bf { X } } _ { b p } \\right)$ , where $\\mathbf { p } \\in \\mathbb { R } ^ { N _ { c l } }$ contains the output probabilities, e.g., originating from a softmax activation as final operation in $f$ . The model’s final prediction $\\hat { y }$ is the index with the maximum score in $\\mathbf { p }$ : ",
267
+ "bbox": [
268
+ 174,
269
+ 479,
270
+ 826,
271
+ 522
272
+ ],
273
+ "page_idx": 2
274
+ },
275
+ {
276
+ "type": "equation",
277
+ "img_path": "images/090de2464ceebb19449b8aaa8df74dfb9fcbf1932b76ec9c09e0616b0fd63a0c.jpg",
278
+ "text": "$$\n\\boldsymbol { \\hat { y } } = \\boldsymbol { \\hat { f } } \\left( \\mathbf { X } _ { b p } \\right) = \\underset { y \\in \\{ 0 , \\ldots , N _ { c l } - 1 \\} } { \\mathrm { a r g m a x } } ~ f \\left( \\mathbf { X } _ { b p } \\right) [ y ] .\n$$",
279
+ "text_format": "latex",
280
+ "bbox": [
281
+ 357,
282
+ 523,
283
+ 638,
284
+ 554
285
+ ],
286
+ "page_idx": 2
287
+ },
288
+ {
289
+ "type": "text",
290
+ "text": "2.2 INSTANCE-BASED ATTACKS ",
291
+ "text_level": 1,
292
+ "bbox": [
293
+ 176,
294
+ 568,
295
+ 405,
296
+ 582
297
+ ],
298
+ "page_idx": 2
299
+ },
300
+ {
301
+ "type": "text",
302
+ "text": "Instance-based attacks try to fool an EEG classifier $f$ to misclassify an EEG signal $\\mathbf { X }$ to a targeted class $y _ { t }$ . In this section, we describe the attack directly on the classifier $f$ without considering the preprocessing $H _ { b p }$ ; the inclusion of the preprocessing is described in Section 3.3. We define an adversarial example as any $\\mathbf { X } ^ { * } = \\mathbf { X } + \\mathbf { V } \\in \\mathbb { R } ^ { N _ { s } \\times N _ { c h } }$ such that ",
303
+ "bbox": [
304
+ 173,
305
+ 593,
306
+ 825,
307
+ 651
308
+ ],
309
+ "page_idx": 2
310
+ },
311
+ {
312
+ "type": "equation",
313
+ "img_path": "images/ae96fbca25561b728f407743e94ef7daae4c068465648eca1989b79f54f18f8f.jpg",
314
+ "text": "$$\n\\hat { f } \\left( \\mathbf { X } \\right) \\neq \\hat { f } \\left( \\mathbf { X } ^ { * } \\right) = y _ { t } .\n$$",
315
+ "text_format": "latex",
316
+ "bbox": [
317
+ 423,
318
+ 652,
319
+ 573,
320
+ 672
321
+ ],
322
+ "page_idx": 2
323
+ },
324
+ {
325
+ "type": "text",
326
+ "text": "FGSM. The FGSM (Goodfellow et al., 2015) generates an adversarial perturbation $\\mathbf { V } \\in \\mathbb { R } ^ { N _ { s } \\times N _ { c h } }$ of magnitude $\\epsilon$ which points in the negative direction of a loss function’s gradient: ",
327
+ "bbox": [
328
+ 173,
329
+ 683,
330
+ 821,
331
+ 710
332
+ ],
333
+ "page_idx": 2
334
+ },
335
+ {
336
+ "type": "equation",
337
+ "img_path": "images/0d4290c3afb9da2ee94681d4b078c69233401f350f53f236fd055d34090accc5.jpg",
338
+ "text": "$$\n\\mathbf { V } = - \\epsilon \\cdot \\mathrm { s i g n } \\left( \\nabla _ { \\mathbf { X } } \\cdot l \\left( \\mathbf { X } , y _ { t } \\right) \\right) ,\n$$",
339
+ "text_format": "latex",
340
+ "bbox": [
341
+ 390,
342
+ 712,
343
+ 604,
344
+ 729
345
+ ],
346
+ "page_idx": 2
347
+ },
348
+ {
349
+ "type": "text",
350
+ "text": "where the loss function contains the negative log likelihood ",
351
+ "bbox": [
352
+ 173,
353
+ 729,
354
+ 566,
355
+ 744
356
+ ],
357
+ "page_idx": 2
358
+ },
359
+ {
360
+ "type": "equation",
361
+ "img_path": "images/76d960042d0c715217ff55097d0087d7852aed951636159758fb7c8f7d3fa671.jpg",
362
+ "text": "$$\nl ( \\mathbf { X } , y _ { t } ) = - \\log \\left( { \\mathbf { p } } [ y _ { t } ] \\right) = - \\log \\left( f \\left( \\mathbf { X } \\right) [ y _ { t } ] \\right) .\n$$",
363
+ "text_format": "latex",
364
+ "bbox": [
365
+ 346,
366
+ 746,
367
+ 650,
368
+ 762
369
+ ],
370
+ "page_idx": 2
371
+ },
372
+ {
373
+ "type": "text",
374
+ "text": "As $\\mathbf { p }$ is the output of the softmax activation function, equation 6 becomes a cross-entropy loss which maximizes the output $\\mathbf { p } [ y _ { t } ]$ while minimizing the remaining outputs. ",
375
+ "bbox": [
376
+ 171,
377
+ 765,
378
+ 823,
379
+ 792
380
+ ],
381
+ "page_idx": 2
382
+ },
383
+ {
384
+ "type": "text",
385
+ "text": "PGD. The projected gradient descent (PGD) (Madry et al., 2018) is a variant of the basic iterative method (Kurakin et al.), generally considered to be more effective than FGSM. PGD aims to find a perturbation by iteratively taking small steps of size $\\alpha$ in the gradient’s direction and projecting the resulting perturbation back to the sample’s neighborhood after each iteration. We randomly initialize the attack inside the $L _ { \\infty }$ ball of radius $\\epsilon$ and update the attack $\\mathbf { V } _ { t + 1 }$ for any iteration $t$ with ",
386
+ "bbox": [
387
+ 173,
388
+ 805,
389
+ 825,
390
+ 876
391
+ ],
392
+ "page_idx": 2
393
+ },
394
+ {
395
+ "type": "equation",
396
+ "img_path": "images/5018cbeb47f39276c0e84f65e695e567cca2809727b109293d37f372e63a064d.jpg",
397
+ "text": "$$\n\\mathbf { V } _ { t + 1 } = \\mathrm { c l i p } _ { \\epsilon } \\left( \\mathbf { V } _ { t } - \\alpha \\cdot \\mathrm { s i g n } \\left( \\nabla _ { \\mathbf { V } } l \\left( \\mathbf { X } + \\mathbf { V } _ { t } , y _ { t } \\right) \\right) \\right) ,\n$$",
398
+ "text_format": "latex",
399
+ "bbox": [
400
+ 326,
401
+ 878,
402
+ 666,
403
+ 895
404
+ ],
405
+ "page_idx": 2
406
+ },
407
+ {
408
+ "type": "text",
409
+ "text": "where $\\alpha$ is a step size smaller than $\\epsilon$ which decays linearly with each iteration and the function $\\mathrm { c l i p } _ { \\epsilon } \\left( \\cdot \\right)$ clips the signal at the maximum desired amplitude $\\epsilon$ . ",
410
+ "bbox": [
411
+ 173,
412
+ 896,
413
+ 828,
414
+ 924
415
+ ],
416
+ "page_idx": 2
417
+ },
418
+ {
419
+ "type": "text",
420
+ "text": "2.3 UNIVERSAL ATTACKS ",
421
+ "text_level": 1,
422
+ "bbox": [
423
+ 176,
424
+ 103,
425
+ 364,
426
+ 117
427
+ ],
428
+ "page_idx": 3
429
+ },
430
+ {
431
+ "type": "text",
432
+ "text": "UAPs have been introduced by Moosavi-Dezfooli et al. (2017) in the context of natural images, seeking to find an image-agnostic perturbation that fools the classifier on any input image. In the BCI domain (Liu et al., 2021), we seek to find a perturbation $\\mathbf { V } \\in \\mathbb { R } ^ { N _ { s } \\times N _ { c h } }$ such that ",
433
+ "bbox": [
434
+ 173,
435
+ 128,
436
+ 826,
437
+ 171
438
+ ],
439
+ "page_idx": 3
440
+ },
441
+ {
442
+ "type": "equation",
443
+ "img_path": "images/831387fcf3fae8922d58bc63c66078fe603ae4b2c440daa59c8a14c9c37671c9.jpg",
444
+ "text": "$$\n\\begin{array} { r } { \\hat { f } \\left( \\mathbf { X } + \\mathbf { V } \\right) \\neq \\hat { f } \\left( \\mathbf { X } \\right) \\mathrm { f o r } ^ { * } \\mathrm { m o s t } ^ { * } \\mathbf { X } \\sim D , } \\end{array}\n$$",
445
+ "text_format": "latex",
446
+ "bbox": [
447
+ 362,
448
+ 176,
449
+ 633,
450
+ 195
451
+ ],
452
+ "page_idx": 3
453
+ },
454
+ {
455
+ "type": "text",
456
+ "text": "where $D$ is the distribution of the EEG data. The UAP can be determined by optimizing the negative log-likelihood loss with respect to $\\mathbf { V }$ using batch gradient descent on the trials in the training set. ",
457
+ "bbox": [
458
+ 173,
459
+ 199,
460
+ 828,
461
+ 228
462
+ ],
463
+ "page_idx": 3
464
+ },
465
+ {
466
+ "type": "text",
467
+ "text": "3 MODELING PRACTICAL ATTACKS IN BCI ",
468
+ "text_level": 1,
469
+ "bbox": [
470
+ 174,
471
+ 247,
472
+ 544,
473
+ 263
474
+ ],
475
+ "page_idx": 3
476
+ },
477
+ {
478
+ "type": "text",
479
+ "text": "This section is the main contribution of the paper: we present a design of practical DoS attacks on MIBCIs that operates at the source of the signal acquisition. We propose a new method to eliminate the square wave artifacts to generate adversarial examples that are natural and physiologically plausible. The perturbation is emitted by a smart, adversarial device placed close to the ear, e.g., a smart glass or in-ear headphones, and is propagated to the individual EEG electrodes over the scalp’s skin. As can be experimentally observed on measured EEG traces (Merlet et al., 2013; Sazgar & Young, 2019), the same electrical source, e.g., electrocardiographic activities, is sensed by each EEG electrode with different degrees of attenuation and delay. We present a practical propagation model that determines the magnitude and delay for every individual electrode based on the distance along the scalp to the adversarial device. The perturbation is trained end-to-end to fool the classifier to always output “rest,” hence DoS, while respecting the spatial model and the amplitude constraints to remain imperceptible. ",
480
+ "bbox": [
481
+ 173,
482
+ 277,
483
+ 826,
484
+ 431
485
+ ],
486
+ "page_idx": 3
487
+ },
488
+ {
489
+ "type": "text",
490
+ "text": "3.1 DESIGN AND ASSESSMENT OF PHYSIOLOGICALLY PLAUSIBLE ATTACKS ",
491
+ "text_level": 1,
492
+ "bbox": [
493
+ 174,
494
+ 446,
495
+ 714,
496
+ 463
497
+ ],
498
+ "page_idx": 3
499
+ },
500
+ {
501
+ "type": "text",
502
+ "text": "PGD-designed attacks on EEG tend to form perturbation signals which resemble a square-wave artifact (see Figure 2), an effect that has been observed on ECG data, too (Han et al., 2020). However, EEG signals are of random nature and can be modeled as frequency dependent stationary or nonstationary random processes (Karlekar & Gupta, 2014). To this end, we introduce a new loss term in the PGD optimization such that the perturbation resembles the random nature of EEG signals, which we achieve by promoting signal changes represented in the first order derivative. We estimate the per-channel derivative $\\begin{array} { r } { \\bar { { \\bf V } ^ { \\prime } } = ( { \\bf v } _ { 0 } ^ { \\prime } , { \\bf v } _ { 1 } ^ { \\prime } , . . . , { \\bf v } _ { N _ { c h } - 1 } ^ { \\prime } ) \\in \\mathbb { R } ^ { N _ { s } - 1 \\times N _ { c h } } } \\end{array}$ using the sample-wise difference: ",
503
+ "bbox": [
504
+ 173,
505
+ 473,
506
+ 826,
507
+ 573
508
+ ],
509
+ "page_idx": 3
510
+ },
511
+ {
512
+ "type": "equation",
513
+ "img_path": "images/ce0c71c6986adead5a7ef4f07c8039c9cf9397e84e03cd7c9175ee0546e8ce8a.jpg",
514
+ "text": "$$\n\\begin{array} { r } { \\mathbf { v } _ { c } ^ { \\prime } [ t ] : = \\mathbf { v } _ { c } [ t ] - \\mathbf { v } _ { c } [ t - 1 ] \\quad t \\in \\{ 1 , 2 , . . . , N _ { s } - 1 \\} , c \\in \\{ 0 , 1 , . . . , N _ { c h } - 1 \\} } \\end{array}\n$$",
515
+ "text_format": "latex",
516
+ "bbox": [
517
+ 253,
518
+ 578,
519
+ 745,
520
+ 594
521
+ ],
522
+ "page_idx": 3
523
+ },
524
+ {
525
+ "type": "text",
526
+ "text": "The additive loss term is determined by $\\begin{array} { r } { l _ { 1 } ( { \\bf V } ) = - \\frac { \\beta } { \\epsilon } \\sum _ { c = 1 } ^ { N _ { c h } } | | { \\bf v } _ { c } ^ { \\prime } | | _ { 1 } } \\end{array}$ − β\u000f PNchc=1 ||v0c||1, where || · ||1 is the \\`1-norm, \u000f the maximum perturbation amplitude, and $\\beta \\geq 0$ a weighting factor. When designing a one-dimensional perturbation, the derivative loss becomes $\\begin{array} { r } { l _ { 1 } ( \\mathbf { v } ) = - \\frac { \\beta } { \\epsilon } | | \\mathbf { v } ^ { \\prime } | | } \\end{array}$ . ",
527
+ "bbox": [
528
+ 173,
529
+ 601,
530
+ 825,
531
+ 650
532
+ ],
533
+ "page_idx": 3
534
+ },
535
+ {
536
+ "type": "text",
537
+ "text": "Measuring the Plausibility of Attacks None of the previous works have given quantitative measures to assess the physiological plausibility of an EEG adversarial attack. In this work, we propose data-driven measures for quantifying the naturalism of an attack. We compute either the cross correlation, the Euclidian distance, or the cosine similarity between the attacked signal and the original EEG, and average the values over the $N _ { c h }$ channels and over the samples in the dataset. ",
538
+ "bbox": [
539
+ 174,
540
+ 661,
541
+ 825,
542
+ 732
543
+ ],
544
+ "page_idx": 3
545
+ },
546
+ {
547
+ "type": "text",
548
+ "text": "3.2 SPATIAL PROPAGATION MODEL ",
549
+ "text_level": 1,
550
+ "bbox": [
551
+ 176,
552
+ 748,
553
+ 428,
554
+ 762
555
+ ],
556
+ "page_idx": 3
557
+ },
558
+ {
559
+ "type": "text",
560
+ "text": "So far, a perturbation signal was designed for every individual channel. It is unrealistic for an attacker to perturb the signal for all individual channels simultaneously; hence, we consider a more practical use case where the perturbation signal $\\mathbf { v } \\in \\mathbb { R } ^ { N _ { s } }$ is emitted from one location, e.g., from an adversarial device placed on the left side of the subject or close to the left ear. More specifically, in this study, we assume that the EEG electrode at the position T9 according to the international 10-10 system (Sch), which is the closest to the left ear, senses the largest perturbation. The signal subsequently propagates over the skin to each electrode, which results in an individual magnitude and delay depending on the distance between the adversarial device and the electrode. More formally, we model the sensed perturbation at channel $i$ and time instant $t$ as ",
561
+ "bbox": [
562
+ 173,
563
+ 773,
564
+ 825,
565
+ 900
566
+ ],
567
+ "page_idx": 3
568
+ },
569
+ {
570
+ "type": "equation",
571
+ "img_path": "images/376c0312852c9f41d7a3778ae583d8e40b0cf5932a3541026cd26602e02373b7.jpg",
572
+ "text": "$$\nh _ { i } ( \\mathbf { v } , \\lambda _ { m } , \\lambda _ { d } ) ( t ) : = m ( l _ { i } , \\lambda _ { m } ) \\cdot \\mathbf { v } \\left( t - d ( l _ { i } , \\lambda _ { d } ) \\right) ,\n$$",
573
+ "text_format": "latex",
574
+ "bbox": [
575
+ 333,
576
+ 904,
577
+ 663,
578
+ 921
579
+ ],
580
+ "page_idx": 3
581
+ },
582
+ {
583
+ "type": "text",
584
+ "text": "where $m ( l _ { i } , \\lambda _ { m } )$ and $d ( l _ { i } , \\lambda _ { d } )$ are the magnitude and the delay respectively, both of which depend on the distance $l _ { i }$ and on characteristic parameters $\\lambda _ { m }$ and $\\lambda _ { d }$ . We define the resulting multi-channel perturbation $\\mathbf { V } \\in \\mathbb { R } ^ { N _ { s } \\times N _ { c h } }$ , which is added to the multi-channel EEG signal, as ",
585
+ "bbox": [
586
+ 174,
587
+ 103,
588
+ 825,
589
+ 146
590
+ ],
591
+ "page_idx": 4
592
+ },
593
+ {
594
+ "type": "equation",
595
+ "img_path": "images/de96e5a139b1fc23afd99dccaff6c949ce6e68096635c4b34caf36537f06be33.jpg",
596
+ "text": "$$\n\\begin{array} { r } { { \\bf V } ( \\lambda _ { m } , \\lambda _ { d } ) = H ( { \\bf v } , \\lambda _ { m } , \\lambda _ { d } ) : = \\left( h _ { 0 } ( { \\bf v } , \\lambda _ { m } , \\lambda _ { d } ) , h _ { 1 } ( { \\bf v } , \\lambda _ { m } , \\lambda _ { d } ) , . . . , h _ { N _ { c h } - 1 } ( { \\bf v } , \\lambda _ { m } , \\lambda _ { d } ) \\right) . } \\end{array}\n$$",
597
+ "text_format": "latex",
598
+ "bbox": [
599
+ 192,
600
+ 152,
601
+ 777,
602
+ 170
603
+ ],
604
+ "page_idx": 4
605
+ },
606
+ {
607
+ "type": "text",
608
+ "text": "We estimate the distance $l _ { i }$ between the electrode at position T9 and the remaining, attacked positions using the 10-10 system and a head model with a radius of $8 . 7 \\mathrm { c m }$ (Algazi et al., 2001). We decouple the distance-dependent modeling of the magnitude and delay, explained in the following paragraphs. ",
609
+ "bbox": [
610
+ 173,
611
+ 184,
612
+ 825,
613
+ 227
614
+ ],
615
+ "page_idx": 4
616
+ },
617
+ {
618
+ "type": "text",
619
+ "text": "Magnitude. For modeling the magnitude, we assume that the adversarial device injects or induces a current $I$ , yielding a potential $V$ measured near T9. The current propagates over the head surface through the skin to each of the remaining attacked electrodes, which can be modeled as a cylindrical resistor with resistance ",
620
+ "bbox": [
621
+ 173,
622
+ 242,
623
+ 825,
624
+ 297
625
+ ],
626
+ "page_idx": 4
627
+ },
628
+ {
629
+ "type": "equation",
630
+ "img_path": "images/df7117bdb4d5c93cccf2e90b25cc3c804499313daf11d78a2ed1cb0219bdb070.jpg",
631
+ "text": "$$\nR _ { i } = \\frac { l _ { i } } { \\sigma A } ,\n$$",
632
+ "text_format": "latex",
633
+ "bbox": [
634
+ 460,
635
+ 301,
636
+ 534,
637
+ 333
638
+ ],
639
+ "page_idx": 4
640
+ },
641
+ {
642
+ "type": "text",
643
+ "text": "where $\\sigma$ is the conductivity of the skin which can be in the range of [0.28, 0.87] Siemens/m (Vorwerk et al., 2019), and $A$ is the area of the skin conductor. The potential at electrode $i$ is $V _ { i } = V - I \\cdot R _ { i }$ , and hence the magnitude can be described as ",
644
+ "bbox": [
645
+ 174,
646
+ 338,
647
+ 825,
648
+ 381
649
+ ],
650
+ "page_idx": 4
651
+ },
652
+ {
653
+ "type": "equation",
654
+ "img_path": "images/be06049f08f97d940ab4e03b5c05093432b85058b4a81d8046d097f375f7225f.jpg",
655
+ "text": "$$\nm ( l _ { i } , \\lambda _ { m } ) = 1 - \\frac { V - V _ { i } } { V } = 1 - \\frac { I } { V \\sigma A } l _ { i } = 1 - \\lambda _ { m } l _ { i } ,\n$$",
656
+ "text_format": "latex",
657
+ "bbox": [
658
+ 320,
659
+ 387,
660
+ 676,
661
+ 419
662
+ ],
663
+ "page_idx": 4
664
+ },
665
+ {
666
+ "type": "text",
667
+ "text": "where we further constrain $0 \\leq m ( l _ { i } , \\lambda _ { m } ) \\leq 1$ . The characteristic magnitude parameter $\\lambda _ { m }$ represents the complex interplay between input current, voltage, conductivity, and area, covering various attack scenarios. We consider different characteristic magnitude parameters $\\lambda _ { m } \\in [ 1 , 1 5 ]$ . A large $\\lambda _ { m }$ represents cases with large attenuation and limited propagation, i.e., a limited set of neighboring electrodes sense the perturbation. Conversely, a small $\\lambda _ { m }$ covers cases with lower attenuation where the perturbation can propagate further and infects all electrodes. We consider also an intermediate case where around half of the electrodes are affected by the attack with $\\lambda _ { m } = 5$ . Appendix B provides examples of the magnitude of the spatial propagation on the head model. ",
668
+ "bbox": [
669
+ 173,
670
+ 422,
671
+ 826,
672
+ 537
673
+ ],
674
+ "page_idx": 4
675
+ },
676
+ {
677
+ "type": "text",
678
+ "text": "Delay. The propagation of a signal on the head surface yields a position-dependent phase angle or delay, as shown by experimental measurements of related studies (Plutchik & Hirsch, 1963; Qiao et al., 1994). The delay stems from a combination of resistive and capacitive components that are encountered during the propagation of the signal, which can be modeled as an RC-circuit with resistance $R$ , capacity $C$ , and time constant $\\tau = R \\cdot C$ that relates to the group delay. Specifically, the contacts between the electrodes and the skin are predominantly capacitive whereas the skin itself is both resistive and capacitive (Kim et al., 2010). As explained in the previous part, an increasing distance between the attacker and the target electrode yields a larger resistance $R$ . As a result, the time constant $\\tau$ and the delay increase too. ",
679
+ "bbox": [
680
+ 173,
681
+ 551,
682
+ 825,
683
+ 678
684
+ ],
685
+ "page_idx": 4
686
+ },
687
+ {
688
+ "type": "text",
689
+ "text": "Here, we model a linear distance-delay relation. We rely on a study by Plutchik & Hirsch (1963), which conducted human skin impedance and phase angle measurements by placing electrodes at an approximate distance of $1 0 \\mathrm { c m }$ and applying voltages with frequencies in the range $2 { \\mathrm { - } } 1 0 0 0 \\mathrm { { H z } }$ . When assuming a linear frequency-phase relation in low-frequency region (Qiao et al., 1994), one can derive the group delay to be $2 . 8 \\mathrm { m s }$ when considering a measured angle of $1 0 ^ { \\circ }$ at $1 0 \\mathrm { H z }$ . As those measurements were conducted for only one distance, we extrapolate the delay for the remaining distances using a rectified linear model: ",
690
+ "bbox": [
691
+ 173,
692
+ 683,
693
+ 826,
694
+ 781
695
+ ],
696
+ "page_idx": 4
697
+ },
698
+ {
699
+ "type": "equation",
700
+ "img_path": "images/8c109f14baba8fdb3fa4ca00a590e185e17699666a46300fe54ae3c09558dc5d.jpg",
701
+ "text": "$$\n\\lambda _ { d } \\cdot ( l _ { i } - l _ { 0 } ) > 0 \\uparrow d ( l _ { i } , \\lambda _ { d } ) = \\lambda _ { d } \\cdot ( l _ { i } - l _ { 0 } ) + d _ { 0 } : d ( l _ { i } , \\lambda _ { d } ) = 0 ,\n$$",
702
+ "text_format": "latex",
703
+ "bbox": [
704
+ 279,
705
+ 787,
706
+ 715,
707
+ 806
708
+ ],
709
+ "page_idx": 4
710
+ },
711
+ {
712
+ "type": "text",
713
+ "text": "where $d _ { 0 } = 2 . 8 \\mathrm { m s }$ is the delay at distance $l _ { 0 } = 1 0 \\mathrm { c m }$ . The delay depends not only on the distance, but also on other parameters such as the electrode-to-skin contact, the humidity of the skin, etc. To this end, we evaluate the propagation of the attack with different characteristic delay parameters $\\lambda _ { d } \\in \\left[ 0 . 1 , 0 . 5 6 3 \\right] \\mathrm { s / m }$ . With $\\lambda _ { d } = 0 . 1$ we cover the cases where very little delay happens, while the largest considered $\\lambda _ { d } = 0 . 5 6 3 \\mathrm { s / m }$ yields a maximum delay of $0 . 1 \\mathrm { s }$ at the farthest electrode T10, which is in alignment with the observed EEG measurements (Merlet et al., 2013; Sazgar & Young, 2019). Similarly to $\\lambda _ { m }$ , we showcase also for an intermediate value of $\\lambda _ { d } = 0 . 3$ which corresponds to a delay of $0 . 0 5 3 \\mathrm { m s }$ at T10. ",
714
+ "bbox": [
715
+ 173,
716
+ 811,
717
+ 826,
718
+ 924
719
+ ],
720
+ "page_idx": 4
721
+ },
722
+ {
723
+ "type": "text",
724
+ "text": "Algorithm 1: Generation of physiologically plausible UAP. input : $\\mathbf { X } _ { t r a i n }$ , EEG training samples; $\\lambda _ { m } , \\lambda _ { d }$ , spatial propagation parameters; $\\beta$ , weight of derivative loss term; \u000f, maximum perturbation amplitude; $G$ , number of PGD iterations; $E$ , number of epochs output :v, adversarial perturbation 1 $\\mathbf { v } \\mathcal { U } ( - \\epsilon , \\epsilon ) \\in \\mathbb { R } ^ { N _ { s } } ;$ ; // Initialisation 2 for $e \\gets 1$ to $E$ do 3 Shuffle $\\mathbf { X } _ { t r a i n }$ ; 4 for each batch $\\mathbf { B } \\in \\mathbf { X } _ { t r a i n }$ do 5 $\\alpha \\frac \\epsilon 2$ ; 6 for $g \\gets 1$ to $G$ do 7 $\\mathbf { \\bar { V } } H ( \\mathbf { v } , \\lambda _ { m } , \\lambda _ { d } ) ;$ // Spatial propagation 8 $\\begin{array} { r } { \\dot { \\mathbf { p } } f ( H _ { b p } ( \\mathbf { B } + \\mathbf { V } ) ) } \\end{array}$ ; // Model pass with perturbation 9 $\\begin{array} { r } { \\mathbf { v } \\mathbf { v } - \\alpha \\cdot \\mathrm { s i g n } ( \\nabla _ { \\mathbf { v } } ( l ( \\mathbf { p } , y _ { r e s t } ) - \\frac { \\beta } { \\epsilon } | | \\mathbf { v } ^ { \\prime } | | _ { 1 } ) ) } \\end{array}$ ; // Update w/derivative 10 v ← clip\u000f (v); // PGD projection 11 $\\alpha { \\frac { 0 . 1 - { \\frac { \\epsilon } { 2 } } } { G } } \\cdot g + { \\frac { \\epsilon } { 2 } }$ ; // Learning rate update 12 end 13 end 14 end ",
725
+ "bbox": [
726
+ 158,
727
+ 106,
728
+ 818,
729
+ 406
730
+ ],
731
+ "page_idx": 5
732
+ },
733
+ {
734
+ "type": "text",
735
+ "text": "3.3 ATTACK DESIGN ",
736
+ "text_level": 1,
737
+ "bbox": [
738
+ 174,
739
+ 435,
740
+ 331,
741
+ 450
742
+ ],
743
+ "page_idx": 5
744
+ },
745
+ {
746
+ "type": "text",
747
+ "text": "We present practical DoS attacks in BCIs that respect domain constraints such as maximum amplitude, spectral distribution, physiological plausibility, and the spatial propagation of the perturbation. To this end, we formulate a general objective function that contains the spatial propagation, the preprocessing step, and the first order derivative loss term: ",
748
+ "bbox": [
749
+ 174,
750
+ 462,
751
+ 826,
752
+ 517
753
+ ],
754
+ "page_idx": 5
755
+ },
756
+ {
757
+ "type": "equation",
758
+ "img_path": "images/fe16bc6e9801b89541c1b4b4d593a5597c8f9ad0f759f089214314544b703deb.jpg",
759
+ "text": "$$\n\\mathcal { L } _ { t o t } \\left( \\mathbf { X } , \\mathbf { v } , \\lambda _ { m } , \\lambda _ { d } \\right) = l \\left( H _ { b p } \\left( \\mathbf { X } + H ( \\mathbf { v } , \\lambda _ { m } , \\lambda _ { d } ) \\right) , y _ { r e s t } \\right) - \\frac { \\beta } { \\epsilon } | | \\mathbf { v } ^ { \\prime } | | _ { 1 } ,\n$$",
760
+ "text_format": "latex",
761
+ "bbox": [
762
+ 266,
763
+ 525,
764
+ 730,
765
+ 555
766
+ ],
767
+ "page_idx": 5
768
+ },
769
+ {
770
+ "type": "text",
771
+ "text": "where $l ( \\cdot , \\cdot )$ is the negative log-likelihood loss defined in equation 6 and $\\beta { = } 1 \\mathrm { e } { - } 6$ is a scalar that weights the contribution of the derivative loss term. We compare different attack scenarios: ",
772
+ "bbox": [
773
+ 174,
774
+ 561,
775
+ 825,
776
+ 590
777
+ ],
778
+ "page_idx": 5
779
+ },
780
+ {
781
+ "type": "text",
782
+ "text": "Instance-based attacks. A perturbation is computed using either FGSM or PGD based on the knowledge of the currently attacked EEG signal $\\mathbf { X }$ . FGSM computes the perturbation as stated in equation 5, where the $\\epsilon$ defines the perturbation amplitude which is varied between $1 { - } 5 0 \\mathrm { m V } .$ Alternatively, we compute the perturbation using PGD with $G { = } 1 0$ iterations, where each iteration consists of a gradient-based update of the perturbation and a projection to the $L _ { \\infty }$ ball with radius $\\epsilon$ (see equation 7). The update rate $\\alpha$ is initialized with $\\epsilon / 2$ and linearly decreased with each iteration, reaching a final value of $0 . 1 \\mathrm { m V }$ at iteration 10. The PGD computation is restarted 5 times with different initial perturbations, which are drawn from a uniform distribution within the range $[ - \\epsilon , + \\epsilon ]$ . ",
783
+ "bbox": [
784
+ 173,
785
+ 604,
786
+ 826,
787
+ 718
788
+ ],
789
+ "page_idx": 5
790
+ },
791
+ {
792
+ "type": "text",
793
+ "text": "Universal attacks. A universal perturbation is computed for all the samples in the training data. We optimize the UAP objective function ",
794
+ "bbox": [
795
+ 173,
796
+ 732,
797
+ 823,
798
+ 761
799
+ ],
800
+ "page_idx": 5
801
+ },
802
+ {
803
+ "type": "equation",
804
+ "img_path": "images/abca44dd6ab1e65427156e0254551c8079b96a3d17410266c428125a6fa67a74.jpg",
805
+ "text": "$$\n\\operatorname* { m i n } _ { \\mathbf { v } } E _ { \\mathbf { X } \\sim D } \\mathcal { L } _ { t o t } \\left( \\mathbf { X } , \\mathbf { v } , \\lambda _ { m } , \\lambda _ { d } \\right) \\quad \\mathrm { ~ s . t . ~ } | | \\mathbf { v } | | _ { \\infty } \\leq \\epsilon\n$$",
806
+ "text_format": "latex",
807
+ "bbox": [
808
+ 338,
809
+ 767,
810
+ 660,
811
+ 790
812
+ ],
813
+ "page_idx": 5
814
+ },
815
+ {
816
+ "type": "text",
817
+ "text": "using batched PGD. We pass a batch of 16 samples together with the current perturbation through the preprocessing and classifier, compute the loss function, and update the perturbation based on the negative gradient with consecutive projection to the $L _ { \\infty }$ ball with radius $\\epsilon$ . This step is repeated $G { = } 1 0$ times before processing the next batch. Overall, the UAP is learned for $E { = } 1 0$ epochs. ",
818
+ "bbox": [
819
+ 173,
820
+ 796,
821
+ 825,
822
+ 853
823
+ ],
824
+ "page_idx": 5
825
+ },
826
+ {
827
+ "type": "text",
828
+ "text": "Propagation model. We distinguish between three use cases of spatial propagation model, where in all cases either an instance-specific attack or a universal attack can be computed: Case 1) Ignore the propagation model: a multi-channel perturbation $\\mathbf { V }$ is computed, which attacks each channel individually, replacing the terms $H ( \\mathbf { v } , \\lambda _ { m } , \\lambda _ { d } )$ by $\\mathbf { V }$ and $\\mathbf { v } ^ { \\prime }$ by $\\mathbf { V } ^ { \\prime }$ in equation 15. Case 2) Consider the propagation model: a single-channel perturbation v is computed and tested with a specific propagation configuration $\\lambda _ { m }$ and $\\lambda _ { d }$ . Case 3) Consider a use-case where the attacker does not know the spatial propagation model and computes the same perturbation $\\mathbf { v }$ for all channels. The actual propagation model is applied during testing to model the real-world signal propagation. ",
829
+ "bbox": [
830
+ 174,
831
+ 867,
832
+ 825,
833
+ 924
834
+ ],
835
+ "page_idx": 5
836
+ },
837
+ {
838
+ "type": "image",
839
+ "img_path": "images/a1324eec3369ab8d3e852dd7a1f3de592be68aba36ad56c69f815c71827712f0.jpg",
840
+ "image_caption": [
841
+ "Figure 1: Performance of random noise, FGSM, PGD, and UAP with and without derivative loss term. "
842
+ ],
843
+ "image_footnote": [],
844
+ "bbox": [
845
+ 183,
846
+ 103,
847
+ 478,
848
+ 262
849
+ ],
850
+ "page_idx": 6
851
+ },
852
+ {
853
+ "type": "table",
854
+ "img_path": "images/e61df40a1bdb0c2d0c3c4f3479777943c9d67c63241455dde0304702d2c127b4.jpg",
855
+ "table_caption": [
856
+ "Table 1: Plausibility metrics for PGD attack (a) without derivative term, (b) with the derivative loss term, and (c) with a Gaussian kernel (Han et al., 2020). The smaller the cross correlation $\\eta$ and the Euclidian distance $\\ell _ { 2 }$ - norm, and the higher the cosine similarity $\\gamma$ , the more natural the generated attack. "
857
+ ],
858
+ "table_footnote": [],
859
+ "table_body": "<table><tr><td></td><td colspan=\"3\">n[10-3v2]</td><td colspan=\"3\">l2-norm [mV]</td><td colspan=\"3\">γ[%]</td></tr><tr><td>ε[mV]</td><td>(a)</td><td>(b)</td><td>(c)</td><td>(a)</td><td>(b)</td><td>(c)</td><td>(a)</td><td>(b)</td><td>(c)</td></tr><tr><td>1</td><td>3.31</td><td>1.98</td><td>3.42</td><td>20.8</td><td>15.2</td><td>21.2</td><td>99.89</td><td>99.93</td><td>99.89</td></tr><tr><td>5</td><td>16.6</td><td>7.76</td><td>17.3</td><td>99.1</td><td>61.2</td><td>102</td><td>97.99</td><td>99.22</td><td>97.87</td></tr><tr><td>10</td><td>32.5</td><td>12.6</td><td>34.1</td><td>191</td><td>112</td><td>198</td><td>93.82</td><td>97.47</td><td>93.49</td></tr><tr><td>25</td><td>74.9</td><td>27.3</td><td>79.2</td><td>461</td><td>263</td><td>475</td><td>79.61</td><td>90.05</td><td>78.92</td></tr><tr><td>50</td><td>125</td><td>39.0</td><td>135</td><td>823</td><td>462</td><td>855</td><td>64.17</td><td>79.70</td><td>63.06</td></tr></table>",
860
+ "bbox": [
861
+ 503,
862
+ 121,
863
+ 825,
864
+ 208
865
+ ],
866
+ "page_idx": 6
867
+ },
868
+ {
869
+ "type": "image",
870
+ "img_path": "images/0be065a5743b1cee7251d7d88da8df12f3001691d68088f221c3d7a7df59ba26.jpg",
871
+ "image_caption": [
872
+ "Figure 2: A successful attack (a) without and (b) with derivative loss term (PGD, $\\scriptstyle \\epsilon = 1 0 \\mathrm { m V }$ ). The background traces show the original signal before the preprocessing filter. "
873
+ ],
874
+ "image_footnote": [],
875
+ "bbox": [
876
+ 178,
877
+ 311,
878
+ 823,
879
+ 410
880
+ ],
881
+ "page_idx": 6
882
+ },
883
+ {
884
+ "type": "text",
885
+ "text": "",
886
+ "bbox": [
887
+ 174,
888
+ 476,
889
+ 825,
890
+ 532
891
+ ],
892
+ "page_idx": 6
893
+ },
894
+ {
895
+ "type": "text",
896
+ "text": "End-to-end algorithm. We illustrate the algorithmic procedure for designing a physiologically plausible UAP in Algorithm 1. Analogously, the proposed methods of derivative loss term and model propagation are applied with PGD. The hyperparameters $\\alpha$ , $\\beta$ , the number of PGD iterations and the restarts, the batch size and the number of epochs in UAP are determined based on a cross-validated grid search on the training set. ",
897
+ "bbox": [
898
+ 174,
899
+ 547,
900
+ 825,
901
+ 617
902
+ ],
903
+ "page_idx": 6
904
+ },
905
+ {
906
+ "type": "text",
907
+ "text": "4 EXPERIMENTS AND RESULTS ",
908
+ "text_level": 1,
909
+ "bbox": [
910
+ 176,
911
+ 638,
912
+ 444,
913
+ 654
914
+ ],
915
+ "page_idx": 6
916
+ },
917
+ {
918
+ "type": "text",
919
+ "text": "We evaluate our methods on the Physionet EEG Motor Movement/Imagery Dataset (Goldberger et al., 2000; Sch) tackling inter-subject challenges, and generalize to subject-specific inter-session dataset IV-2a of BCI Competition (Brunner et al., 2008) (See Appendix C). ",
920
+ "bbox": [
921
+ 174,
922
+ 669,
923
+ 825,
924
+ 712
925
+ ],
926
+ "page_idx": 6
927
+ },
928
+ {
929
+ "type": "text",
930
+ "text": "Dataset. The Physionet dataset contains valid EEG recordings of 105 subjects (Dose et al., 2018) and is publicly available under Open Data Commons Attribution License v1.0. We use the MI recordings that contain tasks of the imagination of left against right fist for $3 \\mathrm { s }$ . The EEG trials were recorded with $N _ { c h } { = } 6 4$ channels sampled at $F _ { s } { = } 1 6 0 \\mathrm { H z }$ , yielding $N _ { s } { = } 3 { \\cdot } 1 6 0 { = } 4 8 0$ samples per trial. Additional baseline runs provide resting-state data, where the subjects did not perform any tasks while having eyes open. Overall, we get a total of 6615 trials with $N _ { c l } { = } 3$ balanced classes “left”, “right”, and “rest.” ",
931
+ "bbox": [
932
+ 173,
933
+ 727,
934
+ 825,
935
+ 824
936
+ ],
937
+ "page_idx": 6
938
+ },
939
+ {
940
+ "type": "text",
941
+ "text": "Training and validation. We train and validate both the classification models and the generated adversarial examples with a 5-fold cross-validation, splitting the dataset into 84 subjects used for training and 21 subjects used for validation to effectively test the model on inter-subject variability. Similar to Wang et al. (2020), which achieved SoA performance on this dataset, the baseline model is trained for 100 epochs using Adam with $\\beta _ { 1 } { = } 0 . 9$ , $\\beta _ { 2 } { = } 0 . 9 9 9$ , and batch size of 16. The learning rate is 0.01 and decreased by a factor of 10 at epochs 20 and 50, achieving an average accuracy of $7 4 . 7 8 \\%$ . ",
942
+ "bbox": [
943
+ 174,
944
+ 839,
945
+ 825,
946
+ 924
947
+ ],
948
+ "page_idx": 6
949
+ },
950
+ {
951
+ "type": "image",
952
+ "img_path": "images/61e50ae1624936e4724c0a3920f25f9cef6e945f75c78ede3ed08a1fb5c4512d.jpg",
953
+ "image_caption": [
954
+ "Figure 3: A successful attack with derivative loss term and spatial constraints $\\lambda _ { m } = 1$ and $\\lambda _ { d } = 0 . 5 6 3$ (PGD, $\\scriptstyle \\epsilon = 5 0 \\mathrm { m V }$ ). The background traces show the original signal before the preprocessing filter. "
955
+ ],
956
+ "image_footnote": [],
957
+ "bbox": [
958
+ 176,
959
+ 102,
960
+ 820,
961
+ 263
962
+ ],
963
+ "page_idx": 7
964
+ },
965
+ {
966
+ "type": "image",
967
+ "img_path": "images/1523c7615753b90b2c8e0e94fb41fcac116f3a3069037a001618243cb754a843.jpg",
968
+ "image_caption": [
969
+ "Figure 4: ASR of PGD and UAP in Case 2), i.e., computed with head model (w/HM), and in Case 3), i.e., computed without head model (w/oHM). "
970
+ ],
971
+ "image_footnote": [],
972
+ "bbox": [
973
+ 179,
974
+ 323,
975
+ 619,
976
+ 631
977
+ ],
978
+ "page_idx": 7
979
+ },
980
+ {
981
+ "type": "image",
982
+ "img_path": "images/2c2e639cc82a57badda6f507c714534618e64bf003ecf1957433ac239f2e7d18.jpg",
983
+ "image_caption": [
984
+ "Figure 5: ASR with the PGD attack propagating from different EEG channels with fixed $\\lambda _ { d } { = } 0 . 3$ and variable $\\lambda _ { m }$ . "
985
+ ],
986
+ "image_footnote": [],
987
+ "bbox": [
988
+ 645,
989
+ 325,
990
+ 816,
991
+ 603
992
+ ],
993
+ "page_idx": 7
994
+ },
995
+ {
996
+ "type": "text",
997
+ "text": "An FFT band-pass filter $h _ { b p }$ with a customary passband of $0 . 1 { - } 4 0 \\mathrm { H z }$ (Lawhern et al., 2018) is used as preprocessing step in both baseline and attack experiments.To determine the ASR, we compute the ratio between the successfully fooled trials, i.e., trials now classified as “rest”, and the total number of attacked trials, where we only consider the ones initially correctly classified as “left”/“right”. ",
998
+ "bbox": [
999
+ 174,
1000
+ 695,
1001
+ 825,
1002
+ 752
1003
+ ],
1004
+ "page_idx": 7
1005
+ },
1006
+ {
1007
+ "type": "text",
1008
+ "text": "Physiologically plausible attacks. We first analyze the instance-based attacks without considering the propagation model (Case 1), depicted in Figure 1. We compare our methods against random noise with amplitude $\\epsilon$ as in (Zhang & Wu, 2019), FGSM that is the same as in (Zhang & Wu, 2019) with targeted scenario, and a UAP designed specifically for EEG (Liu et al., 2021). For both FGSM and PGD, the ASR increases together with the maximum amplitude $\\epsilon$ of the perturbation. They always outperform the random noise, with PGD performing slightly better than FGSM. They reach the maximum ASR of $9 9 . 9 7 \\%$ with $1 0 \\mathrm { m V } .$ The post-attack classification accuracy drops from $7 4 . 7 8 \\%$ to $48 \\%$ for a perturbation amplitude of $2 \\mathrm { m V }$ and to $33 \\%$ for $1 0 \\mathrm { m V }$ and higher amplitudes. Figure 2a shows the signals of a successful attack using PGD. The adversarial perturbation has a squarewave form which negatively affects the natural shape of the EEG signal. By adding the proposed derivative term, the square-wave artifacts are significantly reduced (2b), making the perturbation more physiologically plausible. When comparing the power spectral density of the original and attacked signals, the attacked signal designed without derivative presents large components in low frequencies, making it more easily detectable. Whereas the attack with derivative loss better resembles the power spectral density of the original signal (see Appendix D). Moreover, the introduction of the derivative term does not degrade the ASR (Figure 1). The quantitative measures between the original and the adversarial samples in Table 1 demonstrate that our proposed method with derivative term generates adversarial samples that are more similar to the original EEG, allowing them to remain imperceptible even with high $\\epsilon$ (Appendix D). We reproduce the attacks using a Gaussian kernel as in (Han et al., 2020). After tuning the kernel size and variance of the Gaussian kernel, the method could not improve the plausibility metrics. The inferior performance of the Gaussian kernel could stem from the different nature of the signal: it was originally designed for ECGs which have a pseudo-periodic structure. ",
1009
+ "bbox": [
1010
+ 174,
1011
+ 770,
1012
+ 825,
1013
+ 924
1014
+ ],
1015
+ "page_idx": 7
1016
+ },
1017
+ {
1018
+ "type": "text",
1019
+ "text": "",
1020
+ "bbox": [
1021
+ 174,
1022
+ 103,
1023
+ 825,
1024
+ 256
1025
+ ],
1026
+ "page_idx": 8
1027
+ },
1028
+ {
1029
+ "type": "text",
1030
+ "text": "We extend the application of the derivative term to the UAP attack, while still not considering the propagation model (Case 1). Figure 1 shows a comparison in performance for different values of $\\epsilon$ The saturation in ASR is reached with higher $\\epsilon$ , i.e., $9 9 . 9 4 \\%$ with $5 0 \\mathrm { m V } .$ . This is expected since the UAP is a more difficult attack where a single set of perturbations per EEG channel is generated for all the test samples. Likewise in PGD, the ASR does not drop with the addition of the derivative term. We reproduce the UAP proposed by (Liu et al., 2021). Our UAP consistently reaches higher ASR. ",
1031
+ "bbox": [
1032
+ 174,
1033
+ 263,
1034
+ 825,
1035
+ 347
1036
+ ],
1037
+ "page_idx": 8
1038
+ },
1039
+ {
1040
+ "type": "text",
1041
+ "text": "Spatial Propagation. Finally, we introduce the spatial constraints in the signal propagation over the scalp (Case 2). We consider 9 different scenarios by combining 3 realistic attenuation configurations $\\lambda _ { m } \\ \\in \\ \\{ 1 , 5 , 1 5 \\}$ with 3 delay configurations $\\lambda _ { d } \\ \\in \\ \\{ 0 . 1 , 0 . 3 , 0 . 5 6 3 \\}$ , which capture the range described in Section 3.2. For evaluating the highest achievable attack efficiency, we test a scenario where the attacker is assumed to know the propagation model: the adversarial perturbation is generated and evaluated on fixed spatial parameters $\\lambda _ { m }$ and $\\lambda _ { d }$ , shown in Figure 4, where the ASR reaches up to $6 9 . 2 \\%$ with PGD and $4 5 . 6 \\%$ with UAP at $5 0 \\mathrm { m V } .$ Figure 3 depicts an example of a successful attack with the highest perturbation amplitude. The introduction of the spatial constraints makes the attack problem harder yielding seldom square distortions. However, the resulting EEG signals still resemble physiological random processes typical of EEGs. Next, we ablate the spatial constraints during generation and test the resulting perturbations on the 9 above-mentioned scenarios (Case 3). The ASR drops significantly, especially for $\\lambda _ { m } { = } 5$ and $\\lambda _ { m } { = } 1 5$ where the attenuation of the perturbation over the scalp is greater (see Figure 7), and with the global UAP attack, where the attacker does not have access to the attacked EEG signals. ",
1042
+ "bbox": [
1043
+ 174,
1044
+ 366,
1045
+ 825,
1046
+ 560
1047
+ ],
1048
+ "page_idx": 8
1049
+ },
1050
+ {
1051
+ "type": "text",
1052
+ "text": "Our spatial propagation models allows us to identify the vulnerability of the individual EEG channels. Figure 5 shows the ASR when initiating an attack from a specific channel (T9, T10, etc.) and propagating it to the rest of the head. In the case with the greatest attenuation $\\left( \\lambda _ { m } = 1 5 \\right)$ we find the maximum ASR at the electrode $\\mathbf { C } \\mathbf { z }$ between the regions of the electrodes C3 and C4, which are the most relevant ones for MI of the left and right hand tasks (Pfurtscheller & Lopes da Silva, 1999). We compute the pre- and post-attack confusion matrices for attacks from T9 and T10 (see Appendix E). When the attack propagates from the left side (T9), more samples with ground-truth label “right” can be fooled to “rest”, while the attacks from the right side (T10) are more effective “left” labels. ",
1053
+ "bbox": [
1054
+ 174,
1055
+ 568,
1056
+ 825,
1057
+ 679
1058
+ ],
1059
+ "page_idx": 8
1060
+ },
1061
+ {
1062
+ "type": "text",
1063
+ "text": "Overall, our methods successfully generates perturbations resembling natural noise in EEGs, that can be added at the source of the signal acquisition and are propagated over the scalp, creating attacked signals that are physiologically plausible. Similar results have been observed on the BCI Competition IV-2a dataset, shown in Appendix C. ",
1064
+ "bbox": [
1065
+ 176,
1066
+ 685,
1067
+ 825,
1068
+ 741
1069
+ ],
1070
+ "page_idx": 8
1071
+ },
1072
+ {
1073
+ "type": "text",
1074
+ "text": "5 CONCLUSION ",
1075
+ "text_level": 1,
1076
+ "bbox": [
1077
+ 176,
1078
+ 765,
1079
+ 318,
1080
+ 781
1081
+ ],
1082
+ "page_idx": 8
1083
+ },
1084
+ {
1085
+ "type": "text",
1086
+ "text": "With the incentive of improving security in BCIs, in this work, we demonstrated that DoS attacks are feasible and effective despite physical domain constraints. Experimental results reveal potential risks of realistic attacks on smart wearable BCIs and incentivize the need for future development of defense mechanisms while designing deep learning models to be embedded in smart wearable BCIs. Our detailed analysis on each EEG channel shows that special attention has to be paid, combined with the findings in neuroscience, to the brain regions that are found responsible for a specific task. In future work, the proposed attacks can cover uncertainty in the propagation model and the timing of the MI activity. Moreover, hardware implementations of such attacks can be created to evaluate the proposed methods in real-world, with the ultimate goal of developing effective countermeasures. ",
1087
+ "bbox": [
1088
+ 174,
1089
+ 797,
1090
+ 826,
1091
+ 924
1092
+ ],
1093
+ "page_idx": 8
1094
+ },
1095
+ {
1096
+ "type": "text",
1097
+ "text": "ETHICS STATEMENT ",
1098
+ "text_level": 1,
1099
+ "bbox": [
1100
+ 174,
1101
+ 103,
1102
+ 316,
1103
+ 117
1104
+ ],
1105
+ "page_idx": 9
1106
+ },
1107
+ {
1108
+ "type": "text",
1109
+ "text": "The sore goal of this work is to raise awareness of potential adversarial attacks in BCIs and incentivize the development of coutermeasures, especially in the current moment when the BCIs are facing an increasing growth in applications of everyday life. The active development of smart wearable BCIs is introducing a paradigm shift where the processing algorithms are embedded near the data acquisition. While this improves the system security to a certain extend, with this work we have shown that it is not the only and ultimate way to a safe and reliable BCI, since we have shown that BCI systems are vulnerable also to attacks at the signals’ source. We hope that our work sheds light on the fact that practical BCI systems are vulnerable, despite the physical constraints, and motivates the design and development of more reliable and robust BCI systems. ",
1110
+ "bbox": [
1111
+ 174,
1112
+ 128,
1113
+ 825,
1114
+ 253
1115
+ ],
1116
+ "page_idx": 9
1117
+ },
1118
+ {
1119
+ "type": "text",
1120
+ "text": "REPRODUCIBLITY ",
1121
+ "text_level": 1,
1122
+ "bbox": [
1123
+ 176,
1124
+ 270,
1125
+ 300,
1126
+ 284
1127
+ ],
1128
+ "page_idx": 9
1129
+ },
1130
+ {
1131
+ "type": "text",
1132
+ "text": "A link to a anonymous downloadable source code of this work is submitted as supplementary materials. ",
1133
+ "bbox": [
1134
+ 176,
1135
+ 294,
1136
+ 823,
1137
+ 321
1138
+ ],
1139
+ "page_idx": 9
1140
+ },
1141
+ {
1142
+ "type": "text",
1143
+ "text": "REFERENCES ",
1144
+ "text_level": 1,
1145
+ "bbox": [
1146
+ 176,
1147
+ 343,
1148
+ 285,
1149
+ 359
1150
+ ],
1151
+ "page_idx": 9
1152
+ },
1153
+ {
1154
+ "type": "text",
1155
+ "text": "BCI2000: A general-purpose brain-computer interface (BCI) system. ",
1156
+ "bbox": [
1157
+ 174,
1158
+ 368,
1159
+ 627,
1160
+ 382
1161
+ ],
1162
+ "page_idx": 9
1163
+ },
1164
+ {
1165
+ "type": "text",
1166
+ "text": "Ayten Ozge Akmandor and Niraj K. Jha. Smart health care: An edge-side computing perspective. IEEE Consumer Electronics Magazine, 7(1):29–37, 2018. ",
1167
+ "bbox": [
1168
+ 169,
1169
+ 393,
1170
+ 825,
1171
+ 421
1172
+ ],
1173
+ "page_idx": 9
1174
+ },
1175
+ {
1176
+ "type": "text",
1177
+ "text": "Ralph Algazi, Carlos Avendano, and Richard O Duda. Estimation of a spherical-head model from anthropometry. J. Aud. Eng. Soc., 49, 2001. ",
1178
+ "bbox": [
1179
+ 174,
1180
+ 431,
1181
+ 823,
1182
+ 462
1183
+ ],
1184
+ "page_idx": 9
1185
+ },
1186
+ {
1187
+ "type": "text",
1188
+ "text": "Pietro Aricò, Nicolina Sciaraffa, and Fabio Babiloni. Brain–computer interfaces: Toward a daily life employment. Brain Sciences, 10(3), 2020. ",
1189
+ "bbox": [
1190
+ 173,
1191
+ 470,
1192
+ 821,
1193
+ 500
1194
+ ],
1195
+ "page_idx": 9
1196
+ },
1197
+ {
1198
+ "type": "text",
1199
+ "text": "Aamir Arsalan, Muhammad Majid, Amna Rauf Butt, and Syed Muhammad Anwar. Classification of perceived mental stress using a commercially available EEG headband. IEEE Journal of Biomedical and Health Informatics, 23(6):2257–2264, 2019. ",
1200
+ "bbox": [
1201
+ 173,
1202
+ 510,
1203
+ 826,
1204
+ 554
1205
+ ],
1206
+ "page_idx": 9
1207
+ },
1208
+ {
1209
+ "type": "text",
1210
+ "text": "Christopher Beach, Ertan Balaban, and Alexander J. Casson. Chapter 14 - edge algorithms for wearables: an overview of a truly multi-disciplinary problem. In Edward Sazonov (ed.), Wearable Sensors (Second Edition), pp. 379–414. Academic Press, Oxford, second edition edition, 2021. ",
1211
+ "bbox": [
1212
+ 176,
1213
+ 563,
1214
+ 825,
1215
+ 607
1216
+ ],
1217
+ "page_idx": 9
1218
+ },
1219
+ {
1220
+ "type": "text",
1221
+ "text": "Kais Belwafi, Olivier Romain, Sofien Gannouni, Fakhreddine Ghaffari, Ridha Djemal, and Bouraoui Ouni. An embedded implementation based on adaptive filter bank for brain–computer interface systems. Journal of Neuroscience Methods, 2018. ",
1222
+ "bbox": [
1223
+ 176,
1224
+ 616,
1225
+ 823,
1226
+ 660
1227
+ ],
1228
+ "page_idx": 9
1229
+ },
1230
+ {
1231
+ "type": "text",
1232
+ "text": "Sergio López Bernal, Alberto Huertas Celdrán, Gregorio Martínez Pérez, Michael Taynnan Barros, and Sasitharan Balasubramaniam. Security in brain-computer interfaces: State-of-the-art, opportunities, and future challenges. ACM Comput. Surv., 54(1), January 2021. ",
1233
+ "bbox": [
1234
+ 174,
1235
+ 669,
1236
+ 826,
1237
+ 712
1238
+ ],
1239
+ "page_idx": 9
1240
+ },
1241
+ {
1242
+ "type": "text",
1243
+ "text": "Florian C. A. A. Bodranghien, Margot Langlois Mahe, Serge Clément, and Mario U. Manto. A pilot study on the effects of transcranial direct current stimulation on brain rhythms and entropy during self-paced finger movement using the Epoc helmet. Frontiers in Human Neuroscience, 11:201, 2017. ",
1244
+ "bbox": [
1245
+ 173,
1246
+ 722,
1247
+ 826,
1248
+ 779
1249
+ ],
1250
+ "page_idx": 9
1251
+ },
1252
+ {
1253
+ "type": "text",
1254
+ "text": "Jonathan S. Brumberg, Jeremy D. Burnison, and Kevin M. Pitt. Using motor imagery to control brain-computer interfaces for communication. In Dylan D. Schmorrow and Cali M. Fidopiastis (eds.), Foundations of Augmented Cognition: Neuroergonomics and Operational Neuroscience, pp. 14–25, Cham, 2016. Springer International Publishing. ",
1255
+ "bbox": [
1256
+ 174,
1257
+ 789,
1258
+ 826,
1259
+ 845
1260
+ ],
1261
+ "page_idx": 9
1262
+ },
1263
+ {
1264
+ "type": "text",
1265
+ "text": "C Brunner, R Leeb, G R Müller-Putz, A Schlögl, and G Pfurtscheller. BCI competition 2008 - Graz data set A, 2008. URL http://bnci-horizon-2020.eu/database/data-sets. ",
1266
+ "bbox": [
1267
+ 173,
1268
+ 856,
1269
+ 825,
1270
+ 885
1271
+ ],
1272
+ "page_idx": 9
1273
+ },
1274
+ {
1275
+ "type": "text",
1276
+ "text": "Ujwal Chaudhary, Niels Birbaumer, and Ander Ramos-Murguialday. Brain–computer interfaces for communication and rehabilitation. Nature Reviews Neurology, 12, 08 2016. ",
1277
+ "bbox": [
1278
+ 176,
1279
+ 895,
1280
+ 823,
1281
+ 924
1282
+ ],
1283
+ "page_idx": 9
1284
+ },
1285
+ {
1286
+ "type": "text",
1287
+ "text": "Hauke Dose, Jakob S. Moller, Sadasivan Puthusserypady, and Helle K. Iversen. A deep learning MI - EEG classification model for BCIs. In 2018 26th European Signal Processing Conference (EUSIPCO), pp. 1676–1679. IEEE, 2018. ",
1288
+ "bbox": [
1289
+ 176,
1290
+ 103,
1291
+ 823,
1292
+ 146
1293
+ ],
1294
+ "page_idx": 10
1295
+ },
1296
+ {
1297
+ "type": "text",
1298
+ "text": "Anirban Dutta. Brain–computer interface spellers for communication: Why we need to address their security and authenticity. Brain Sciences, 10:139, 03 2020. ",
1299
+ "bbox": [
1300
+ 171,
1301
+ 154,
1302
+ 823,
1303
+ 183
1304
+ ],
1305
+ "page_idx": 10
1306
+ },
1307
+ {
1308
+ "type": "text",
1309
+ "text": "Daniel Elstob and Emanuele Secco. A low cost EEG based BCI prosthetic using motor imagery. International Journal of Information Technology Convergence and Services, 6:23–36, 02 2016. ",
1310
+ "bbox": [
1311
+ 173,
1312
+ 190,
1313
+ 823,
1314
+ 220
1315
+ ],
1316
+ "page_idx": 10
1317
+ },
1318
+ {
1319
+ "type": "text",
1320
+ "text": "Anna Fertonani, Clarissa Ferrari, and Carlo Miniussi. What do you feel if I apply transcranial electric stimulation? Safety, sensations and secondary induced effects. Clinical Neurophysiology, 126(11): 2181–2188, 2015. ",
1321
+ "bbox": [
1322
+ 173,
1323
+ 227,
1324
+ 823,
1325
+ 270
1326
+ ],
1327
+ "page_idx": 10
1328
+ },
1329
+ {
1330
+ "type": "text",
1331
+ "text": "Samuel G. Finlayson, John D. Bowers, Joichi Ito, Jonathan L. Zittrain, Andrew L. Beam, and Isaac S. Kohane. Adversarial attacks on medical machine learning. Science, 363(6433):1287–1289, 2019. ",
1332
+ "bbox": [
1333
+ 173,
1334
+ 277,
1335
+ 825,
1336
+ 308
1337
+ ],
1338
+ "page_idx": 10
1339
+ },
1340
+ {
1341
+ "type": "text",
1342
+ "text": "Flowneuroscience. Flow tDCS device. https://flowneuroscience.com/, 2021. Accessed: 2021-05-27. ",
1343
+ "bbox": [
1344
+ 173,
1345
+ 315,
1346
+ 825,
1347
+ 344
1348
+ ],
1349
+ "page_idx": 10
1350
+ },
1351
+ {
1352
+ "type": "text",
1353
+ "text": "Daniel Freer and Guang-Zhong Yang. Data augmentation for self-paced motor imagery classification with C-LSTM. Journal of Neural Engineering, 17, 01 2020. ",
1354
+ "bbox": [
1355
+ 169,
1356
+ 352,
1357
+ 825,
1358
+ 381
1359
+ ],
1360
+ "page_idx": 10
1361
+ },
1362
+ {
1363
+ "type": "text",
1364
+ "text": "Ary L Goldberger, Luis A N Amaral, Leon Glass, Jeffrey M Hausdorff, Plamen Ch Ivanov, Roger G Mark, Joseph E Mietus, George B Moody, Chung-Kang Peng, and H Eugene Stanley. PhysioBank, PhysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals. circulation, 101(23):e215–e220, 2000. ",
1365
+ "bbox": [
1366
+ 174,
1367
+ 387,
1368
+ 825,
1369
+ 445
1370
+ ],
1371
+ "page_idx": 10
1372
+ },
1373
+ {
1374
+ "type": "text",
1375
+ "text": "Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In Proc. International Conference on Learning Representations, ICLR, 2015. ",
1376
+ "bbox": [
1377
+ 169,
1378
+ 453,
1379
+ 823,
1380
+ 483
1381
+ ],
1382
+ "page_idx": 10
1383
+ },
1384
+ {
1385
+ "type": "text",
1386
+ "text": "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, 26 (3):360–363, 2020. ",
1387
+ "bbox": [
1388
+ 173,
1389
+ 489,
1390
+ 825,
1391
+ 532
1392
+ ],
1393
+ "page_idx": 10
1394
+ },
1395
+ {
1396
+ "type": "text",
1397
+ "text": "Xue Jiang, Xiao Zhang, and Dongrui Wu. Active learning for black-box adversarial attacks in EEGbased brain-computer interfaces. In 2019 IEEE Symposium Series on Computational Intelligence (SSCI), pp. 361–368, 2019. ",
1398
+ "bbox": [
1399
+ 173,
1400
+ 540,
1401
+ 823,
1402
+ 583
1403
+ ],
1404
+ "page_idx": 10
1405
+ },
1406
+ {
1407
+ "type": "text",
1408
+ "text": "Mandar Karlekar and Anubha Gupta. Stochastic modeling of EEG rhythms with fractional gaussian noise. In 2014 22nd European Signal Processing Conference (EUSIPCO), pp. 2520–2524, 2014. ",
1409
+ "bbox": [
1410
+ 169,
1411
+ 590,
1412
+ 825,
1413
+ 621
1414
+ ],
1415
+ "page_idx": 10
1416
+ },
1417
+ {
1418
+ "type": "text",
1419
+ "text": "Victor Kartsch, Giuseppe Tagliavini, Marco Guermandi, Simone Benatti, Davide Rossi, and Luca Benini. Biowolf: A sub-10-mW 8-channel advanced brain–computer interface platform with a nine-core processor and BLE connectivity. IEEE Transactions on Biomedical Circuits and Systems, 13(5):893–906, 2019. ",
1420
+ "bbox": [
1421
+ 173,
1422
+ 627,
1423
+ 825,
1424
+ 684
1425
+ ],
1426
+ "page_idx": 10
1427
+ },
1428
+ {
1429
+ "type": "text",
1430
+ "text": "Min Kim, Youngchang Cho, Suk-Tae Seo, Chang-Sik Son, Hee-Joon Park, and Yoon-Nyun Kim. A new method for non-invasive measurement of skin in the low frequency range. Healthcare informatics research, 16:143–8, 09 2010. ",
1431
+ "bbox": [
1432
+ 173,
1433
+ 691,
1434
+ 825,
1435
+ 736
1436
+ ],
1437
+ "page_idx": 10
1438
+ },
1439
+ {
1440
+ "type": "text",
1441
+ "text": "Alexey Kurakin, Ian J. Goodfellow, and Samy Bengio. Adversarial examples in the physical world. CoRR, abs/1607.02533. ",
1442
+ "bbox": [
1443
+ 171,
1444
+ 742,
1445
+ 825,
1446
+ 772
1447
+ ],
1448
+ "page_idx": 10
1449
+ },
1450
+ {
1451
+ "type": "text",
1452
+ "text": "Vernon J Lawhern, Amelia J Solon, Nicholas R Waytowich, Stephen M Gordon, Chou P Hung, and Brent J Lance. EEGNet: a compact convolutional neural network for EEG-based brain–computer interfaces. Journal of Neural Engineering, 15(5):056013, 7 2018. ",
1453
+ "bbox": [
1454
+ 174,
1455
+ 780,
1456
+ 825,
1457
+ 824
1458
+ ],
1459
+ "page_idx": 10
1460
+ },
1461
+ {
1462
+ "type": "text",
1463
+ "text": "Jinfeng Li, Shouling Ji, Tianyu Du, Bo Li, and Ting Wang. Textbugger: Generating adversarial text against real-world applications. In Proc. Network and Distributed System Security Symposium, NDSS. The Internet Society, 2019a. ",
1464
+ "bbox": [
1465
+ 173,
1466
+ 830,
1467
+ 823,
1468
+ 873
1469
+ ],
1470
+ "page_idx": 10
1471
+ },
1472
+ {
1473
+ "type": "text",
1474
+ "text": "Juncheng Li, Shuhui Qu, Xinjian Li, Joseph Szurley, J. Zico Kolter, and Florian Metze. Adversarial music: Real world audio adversary against wake-word detection system. In Proc. Neural Information Processing Systems (NeurIPS), pp. 11908–11918, 2019b. ",
1475
+ "bbox": [
1476
+ 174,
1477
+ 881,
1478
+ 825,
1479
+ 924
1480
+ ],
1481
+ "page_idx": 10
1482
+ },
1483
+ {
1484
+ "type": "text",
1485
+ "text": "Zihan Liu, Lubin Meng, Xiao Zhang, Weili Fang, and Dongrui Wu. Universal adversarial perturbations for CNN classifiers in EEG-based BCIs, 2021. ",
1486
+ "bbox": [
1487
+ 171,
1488
+ 103,
1489
+ 823,
1490
+ 132
1491
+ ],
1492
+ "page_idx": 11
1493
+ },
1494
+ {
1495
+ "type": "text",
1496
+ "text": "Aleksander Madry, Aleksandar Makelov, Ludwig Schmidt, Dimitris Tsipras, and Adrian Vladu. Towards deep learning models resistant to adversarial attacks. In Proc. International Conference on Learning Representations (ICLR), 2018. ",
1497
+ "bbox": [
1498
+ 176,
1499
+ 142,
1500
+ 823,
1501
+ 185
1502
+ ],
1503
+ "page_idx": 11
1504
+ },
1505
+ {
1506
+ "type": "text",
1507
+ "text": "Alireza Malekmohammadi, Hoda Mohammadzade, Alireza Chamanzar, Mahdi Shabany, and Benyamin Ghojogh. An efficient hardware implementation for a motor imagery brain computer interface system. Scientia Iranica, 26:72–94, 2019. ",
1508
+ "bbox": [
1509
+ 174,
1510
+ 195,
1511
+ 826,
1512
+ 238
1513
+ ],
1514
+ "page_idx": 11
1515
+ },
1516
+ {
1517
+ "type": "text",
1518
+ "text": "Iuliana Marin, Myssar Jabbar Hammood Al-Battbootti, and Nicolae Goga. Drone control based on mental commands and facial expressions. In 2020 12th International Conference on Electronics, Computers and Artificial Intelligence (ECAI), pp. 1–4, 2020. ",
1519
+ "bbox": [
1520
+ 173,
1521
+ 247,
1522
+ 826,
1523
+ 291
1524
+ ],
1525
+ "page_idx": 11
1526
+ },
1527
+ {
1528
+ "type": "text",
1529
+ "text": "Lubin Meng, Jian Huang, Zhigang Zeng, Xue Jiang, Shan Yu, Tzyy-Ping Jung, Chin-Teng Lin, Ricardo Chavarriaga, and Dongrui Wu. EEG-based brain-computer interfaces are vulnerable to backdoor attacks, 2021. ",
1530
+ "bbox": [
1531
+ 174,
1532
+ 300,
1533
+ 825,
1534
+ 343
1535
+ ],
1536
+ "page_idx": 11
1537
+ },
1538
+ {
1539
+ "type": "text",
1540
+ "text": "Isabelle Merlet, Gwénaël Birot, Ricardo Salvador, Behnam Molaee-Ardekani, Abeye Mekonnen, Aureli Soria-Frish, Giulio Ruffini, Pedro C. Miranda, and Fabrice Wendling. From oscillatory transcranial current stimulation to scalp EEG changes: A biophysical and physiological modeling study. PLOS ONE, 8:1–12, 02 2013. ",
1541
+ "bbox": [
1542
+ 174,
1543
+ 353,
1544
+ 826,
1545
+ 410
1546
+ ],
1547
+ "page_idx": 11
1548
+ },
1549
+ {
1550
+ "type": "text",
1551
+ "text": "Seyed-Mohsen Moosavi-Dezfooli, Alhussein Fawzi, Omar Fawzi, and Pascal Frossard. Universal adversarial perturbations. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), July 2017. ",
1552
+ "bbox": [
1553
+ 174,
1554
+ 420,
1555
+ 825,
1556
+ 463
1557
+ ],
1558
+ "page_idx": 11
1559
+ },
1560
+ {
1561
+ "type": "text",
1562
+ "text": "G. Pfurtscheller and F.H. Lopes da Silva. Event-related EEG/MEG synchronization and desynchronization: basic principles. Clinical Neurophysiology, 110(11):1842–1857, 11 1999. ",
1563
+ "bbox": [
1564
+ 174,
1565
+ 472,
1566
+ 823,
1567
+ 502
1568
+ ],
1569
+ "page_idx": 11
1570
+ },
1571
+ {
1572
+ "type": "text",
1573
+ "text": "Robert Plutchik and Henry R Hirsch. Skin impedance and phase angle as a function of frequency and current. Science, 141(3584):927–928, 1963. ",
1574
+ "bbox": [
1575
+ 173,
1576
+ 512,
1577
+ 825,
1578
+ 540
1579
+ ],
1580
+ "page_idx": 11
1581
+ },
1582
+ {
1583
+ "type": "text",
1584
+ "text": "ZG Qiao, L Mørkrid, and NK Vøllestad. Characteristics of phase angle, extrapolated conductance and ion relaxation time in the low-frequency admittance locus plot of human palmar skin. Medical and Biological Engineering and Computing, 32(2):161–167, 1994. ",
1585
+ "bbox": [
1586
+ 173,
1587
+ 550,
1588
+ 825,
1589
+ 594
1590
+ ],
1591
+ "page_idx": 11
1592
+ },
1593
+ {
1594
+ "type": "text",
1595
+ "text": "Yao Qin, Nicholas Carlini, Ian J. Goodfellow, Garrison W. Cottrell, and Colin Raffel. Imperceptible, robust, and targeted adversarial examples for automatic speech recognition. CoRR, abs/1903.10346, 2019. ",
1596
+ "bbox": [
1597
+ 174,
1598
+ 603,
1599
+ 825,
1600
+ 646
1601
+ ],
1602
+ "page_idx": 11
1603
+ },
1604
+ {
1605
+ "type": "text",
1606
+ "text": "Mona Sazgar and Michael G. Young. EEG Artifacts, pp. 149–162. Springer International Publishing, Cham, 2019. ",
1607
+ "bbox": [
1608
+ 174,
1609
+ 656,
1610
+ 825,
1611
+ 685
1612
+ ],
1613
+ "page_idx": 11
1614
+ },
1615
+ {
1616
+ "type": "text",
1617
+ "text": "Tibor Schneider, Xiaying Wang, Michael Hersche, Lukas Cavigelli, and Luca Benini. Q-EEGNet: an energy-efficient 8-bit quantized parallel EEGNet implementation for edge motor-imagery brainmachine interfaces. In 2020 IEEE International Conference on Smart Computing (SMARTCOMP), pp. 284–289, 2020. ",
1618
+ "bbox": [
1619
+ 174,
1620
+ 694,
1621
+ 826,
1622
+ 752
1623
+ ],
1624
+ "page_idx": 11
1625
+ },
1626
+ {
1627
+ "type": "text",
1628
+ "text": "Christian Szegedy, Wojciech Zaremba, Ilya Sutskever, Joan Bruna, Dumitru Erhan, Ian J. Goodfellow, and Rob Fergus. Intriguing properties of neural networks. In Proc. International Conference on Learning Representations, ICLR, 2014. ",
1629
+ "bbox": [
1630
+ 173,
1631
+ 762,
1632
+ 826,
1633
+ 805
1634
+ ],
1635
+ "page_idx": 11
1636
+ },
1637
+ {
1638
+ "type": "text",
1639
+ "text": "Johannes Vorwerk, Ümit Aydin, Carsten H Wolters, and Christopher R Butson. Influence of head tissue conductivity uncertainties on EEG dipole reconstruction. Frontiers in neuroscience, 13:531, 2019. ",
1640
+ "bbox": [
1641
+ 173,
1642
+ 814,
1643
+ 825,
1644
+ 857
1645
+ ],
1646
+ "page_idx": 11
1647
+ },
1648
+ {
1649
+ "type": "text",
1650
+ "text": "Xiaying Wang, Michael Hersche, Batuhan Tömekce, Burak Kaya, Michele Magno, and Luca Benini. An accurate EEGNet-based motor-imagery brain–computer interface for low-power edge computing. In 2020 IEEE International Symposium on Medical Measurements and Applications (MeMeA), pp. 1–6, 2020. ",
1651
+ "bbox": [
1652
+ 174,
1653
+ 867,
1654
+ 825,
1655
+ 924
1656
+ ],
1657
+ "page_idx": 11
1658
+ },
1659
+ {
1660
+ "type": "text",
1661
+ "text": "Yang Yu, Yadong Liu, Jun Jiang, Erwei Yin, Zongtan Zhou, and Dewen Hu. An asynchronous control paradigm based on sequential motor imagery and its application in wheelchair navigation. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 26(12):2367–2375, 2018. ",
1662
+ "bbox": [
1663
+ 176,
1664
+ 103,
1665
+ 823,
1666
+ 146
1667
+ ],
1668
+ "page_idx": 12
1669
+ },
1670
+ {
1671
+ "type": "text",
1672
+ "text": "Wei Emma Zhang, Quan Z. Sheng, Ahoud Abdulrahmn F. Alhazmi, and Chenliang Li. Adversarial attacks on deep-learning models in natural language processing: A survey. ACM Trans. Intell. Syst. Technol., 11(3):24:1–24:41, 2020. ",
1673
+ "bbox": [
1674
+ 178,
1675
+ 155,
1676
+ 823,
1677
+ 196
1678
+ ],
1679
+ "page_idx": 12
1680
+ },
1681
+ {
1682
+ "type": "text",
1683
+ "text": "Xiao Zhang and Dongrui Wu. On the vulnerability of CNN classifiers in EEG-based BCIs. IEEE Transactions on Neural Systems and Rehabilitation Engineering, 27(5):814–825, 2019. ",
1684
+ "bbox": [
1685
+ 171,
1686
+ 205,
1687
+ 825,
1688
+ 234
1689
+ ],
1690
+ "page_idx": 12
1691
+ },
1692
+ {
1693
+ "type": "text",
1694
+ "text": "Jiayu Zhuang, Keke Geng, and Guodong Yin. Ensemble learning based brain–computer interface system for ground vehicle control. IEEE Transactions on Systems, Man, and Cybernetics: Systems, 51(9):5392–5404, 2021. ",
1695
+ "bbox": [
1696
+ 173,
1697
+ 244,
1698
+ 826,
1699
+ 286
1700
+ ],
1701
+ "page_idx": 12
1702
+ },
1703
+ {
1704
+ "type": "image",
1705
+ "img_path": "images/673d5d9efd092b4cc8e800ff6a5738b2621fff65b3be06e0ef50d295cf6a25a4.jpg",
1706
+ "image_caption": [],
1707
+ "image_footnote": [],
1708
+ "bbox": [
1709
+ 179,
1710
+ 112,
1711
+ 815,
1712
+ 186
1713
+ ],
1714
+ "page_idx": 13
1715
+ },
1716
+ {
1717
+ "type": "text",
1718
+ "text": "Figure 6: Practical adversarial attack scenario in BCIs: a smart device close to the ear emits a perturbation signal which propagates over the head surface to the EEG electrodes. ",
1719
+ "bbox": [
1720
+ 169,
1721
+ 208,
1722
+ 823,
1723
+ 234
1724
+ ],
1725
+ "page_idx": 13
1726
+ },
1727
+ {
1728
+ "type": "image",
1729
+ "img_path": "images/38b8a7e8b4be2758df986c7eb0277e6018207129bd99c18ee2f96bd9341afb7e.jpg",
1730
+ "image_caption": [
1731
+ "Figure 7: Magnitude of the spatial propagation for different $\\lambda _ { m }$ . The perturbation is emitted from the left side of the head and propagates over the head surface. The leftmost electrode senses the highest magnitude (red), which linearly decreases towards zero (white) with growing propagation distance and $\\lambda _ { m }$ . The electrodes which sense the perturbations, i.e., magnitude ${ > } 0$ , are marked with dots. The electrodes T9, C3, C4, and T10 are labeled for reference. "
1732
+ ],
1733
+ "image_footnote": [],
1734
+ "bbox": [
1735
+ 173,
1736
+ 251,
1737
+ 823,
1738
+ 349
1739
+ ],
1740
+ "page_idx": 13
1741
+ },
1742
+ {
1743
+ "type": "text",
1744
+ "text": "A ATTACK AT THE SOURCE OF SIGNAL ACQUISITION ",
1745
+ "text_level": 1,
1746
+ "bbox": [
1747
+ 176,
1748
+ 453,
1749
+ 625,
1750
+ 468
1751
+ ],
1752
+ "page_idx": 13
1753
+ },
1754
+ {
1755
+ "type": "text",
1756
+ "text": "Fig. 6 illustrates the new attack scenario where the perturbation is delivered to the human scalp and propagates to the sensing electrodes at the source of the signal acquisition. ",
1757
+ "bbox": [
1758
+ 173,
1759
+ 483,
1760
+ 823,
1761
+ 512
1762
+ ],
1763
+ "page_idx": 13
1764
+ },
1765
+ {
1766
+ "type": "text",
1767
+ "text": "B SPATIAL PROPAGATION MODELS ",
1768
+ "text_level": 1,
1769
+ "bbox": [
1770
+ 174,
1771
+ 531,
1772
+ 475,
1773
+ 547
1774
+ ],
1775
+ "page_idx": 13
1776
+ },
1777
+ {
1778
+ "type": "text",
1779
+ "text": "Fig. 7 illustrates the magnitude of signal propagation using different propagation parameters $\\lambda _ { m } =$ $\\{ 1 , 5 , 1 5 \\}$ . A large $\\lambda _ { m }$ represents cases with large attenuation and limited propagation (e.g., attack over the air) and a small $\\lambda _ { m }$ covers cases with lower attenuation where the perturbation can propagate farther (e.g., a smart glass). ",
1780
+ "bbox": [
1781
+ 174,
1782
+ 563,
1783
+ 825,
1784
+ 618
1785
+ ],
1786
+ "page_idx": 13
1787
+ },
1788
+ {
1789
+ "type": "text",
1790
+ "text": "C EXPERIMENTS ON BCI COMPETITION IV-2A ",
1791
+ "text_level": 1,
1792
+ "bbox": [
1793
+ 174,
1794
+ 638,
1795
+ 580,
1796
+ 655
1797
+ ],
1798
+ "page_idx": 13
1799
+ },
1800
+ {
1801
+ "type": "text",
1802
+ "text": "Dataset. The IV-2a dataset of the BCI Competition contains recordings from nine different subjects and distinguishes between four classes of imagined movements: left and right hand, both feet, and the tongue. 22 different EEG channels were recorded, sampled at $2 5 0 \\mathrm { H z }$ . The data was pre-processed with a bandpass filter between 0.1 and $4 0 \\mathrm { H z }$ . Each subject completed two recording session on two different days, where the first session is used for training and the second for testing as per the rules of the competition. Each session contains 288 trials. ",
1803
+ "bbox": [
1804
+ 174,
1805
+ 670,
1806
+ 825,
1807
+ 753
1808
+ ],
1809
+ "page_idx": 13
1810
+ },
1811
+ {
1812
+ "type": "text",
1813
+ "text": "Training and validation. We train a separate baseline model per subject using Adam optimizer with $\\beta _ { 1 } { = } 0 . 9$ and $\\beta _ { 2 } { = } 0 . 9 9 9$ , a batch size of 32, and 500 epochs. The learning rate is 0.001 achieving an average accuracy of $7 1 . 7 9 \\%$ . This dataset does not contain the rest class. We choose to design an attack that aims to fool the classifier to always predict “tongue.” Moreover, we apply a maximum perturbation amplitude of $\\epsilon \\in [ 0 . 0 1 , 1 0 ] \\mathrm { m V }$ due to the lower signal amplitude encountered in this dataset. ",
1814
+ "bbox": [
1815
+ 174,
1816
+ 768,
1817
+ 825,
1818
+ 852
1819
+ ],
1820
+ "page_idx": 13
1821
+ },
1822
+ {
1823
+ "type": "text",
1824
+ "text": "Results. Fig. 8 compares the ASR of different attacks without considering the propagation model (Case 1). Generally, a minimal perturbation amplitude of $1 \\mathrm { m V }$ and $2 \\mathrm { m V }$ suffices to achieve $100 \\%$ ASR with PGD and UAP, respectively. The addition of the derivative loss term does not give any performance degradation in terms of the ASR. The average post-attack classification accuracy drops from $7 1 . 7 9 \\%$ to $50 \\%$ for a perturbation amplitude of $0 . 1 5 \\mathrm { m V }$ and $2 4 . 7 \\%$ for $0 . 6 \\mathrm { m V }$ and higher amplitudes, when PGD with derivative is used. ",
1825
+ "bbox": [
1826
+ 174,
1827
+ 867,
1828
+ 823,
1829
+ 924
1830
+ ],
1831
+ "page_idx": 13
1832
+ },
1833
+ {
1834
+ "type": "image",
1835
+ "img_path": "images/2754d89a4671045e54c9d9a042e28c5bfceebb00058d60cea27bd8868f79baae.jpg",
1836
+ "image_caption": [
1837
+ "Figure 8: ASR on BCI Competition IV-2a with random noise, FGSM, PGD, and UAP with and without derivative loss term. "
1838
+ ],
1839
+ "image_footnote": [],
1840
+ "bbox": [
1841
+ 181,
1842
+ 101,
1843
+ 808,
1844
+ 330
1845
+ ],
1846
+ "page_idx": 14
1847
+ },
1848
+ {
1849
+ "type": "text",
1850
+ "text": "",
1851
+ "bbox": [
1852
+ 174,
1853
+ 420,
1854
+ 820,
1855
+ 449
1856
+ ],
1857
+ "page_idx": 14
1858
+ },
1859
+ {
1860
+ "type": "text",
1861
+ "text": "Fig. 9 shows the ASR for different propagation parameters $\\lambda _ { m }$ and $\\lambda _ { d , }$ ) and maximum perturbation amplitudes $\\epsilon$ . When considering the head model during the design of the attack (Case 2, w/HM), both PGD and UAP reach significantly higher ASR compared to attacks designed without the consideration of the head model (Case 3, w/oHM). ",
1862
+ "bbox": [
1863
+ 174,
1864
+ 455,
1865
+ 825,
1866
+ 511
1867
+ ],
1868
+ "page_idx": 14
1869
+ },
1870
+ {
1871
+ "type": "text",
1872
+ "text": "D PLAUSIBILITY OF ATTACKS ",
1873
+ "text_level": 1,
1874
+ "bbox": [
1875
+ 176,
1876
+ 558,
1877
+ 434,
1878
+ 573
1879
+ ],
1880
+ "page_idx": 14
1881
+ },
1882
+ {
1883
+ "type": "text",
1884
+ "text": "This section provides power spectral density plots of original signals and attacked signals with and without the derivative loss term, shown in Figure 10. The power spectral density is determined by computing the magnitude squared Fast Fourier Transform of the signals that were illustrated in Figure 2. The attack designed with the derivative loss term has a similar distribution as the original signal, where as the attack without derivative shows large contributions in the low frequency domain $( < 5 \\mathrm { H z } )$ , which were not present in the original signal. These low-frequency components stem from the square-wave shaped attack and can be used as a way to detect the attack; hence, this attack cannot be considered imperceptible. ",
1885
+ "bbox": [
1886
+ 173,
1887
+ 603,
1888
+ 825,
1889
+ 715
1890
+ ],
1891
+ "page_idx": 14
1892
+ },
1893
+ {
1894
+ "type": "text",
1895
+ "text": "Moreover, Figure 13 shows the attacks with and without derivative loss term with increasing maximum amplitude \u000f. We can see that for low amplitudes ( $\\mathrm { 1 m V }$ and $5 \\mathrm { m V }$ ) the generated attacks with and without derivative still look like EEGs. At $1 0 \\mathrm { m V } ,$ the attack generated without derivative presents minor square-wave artifacts, which could be still imperceptible to a non-expert. With $2 5 \\mathrm { m V }$ and $5 0 \\mathrm { m V } ,$ , the ones generated without derivative have strong and perceptible square-wave displacements, while the ones generated with our proposed method can still be mistaken as real EEG signals. While with the instance-based attacks, it is not necessary to have more than $1 0 \\mathrm { m V }$ to get a very high ASR (see Figure 1), with the universal attacks and physical constraints, the ASR increases with increasing perturbation amplitude (see Figure 4). ",
1896
+ "bbox": [
1897
+ 173,
1898
+ 722,
1899
+ 825,
1900
+ 847
1901
+ ],
1902
+ "page_idx": 14
1903
+ },
1904
+ {
1905
+ "type": "text",
1906
+ "text": "The same observations can be drawn from the plausibility metrics, which have been proposed for the first time in this paper to assess quantitatively the EEG attacks. For example, looking at the cosine similarity $( \\gamma )$ in Table 1, without the derivative loss term, $\\gamma$ drops to $9 7 . 9 9 \\%$ with $\\epsilon = 5 \\mathrm { m V } ,$ , whereas, with the derivative, $\\gamma$ drops to about the same value of $9 7 . 4 7 \\%$ with $\\epsilon = 1 0 \\mathrm { m V } ,$ yielding an increase in ASR from $85 \\%$ $\\mathrm { 5 m V ) }$ to $9 9 \\%$ $\\mathrm { 1 0 m V ) }$ shown in Figure 1 with PGD. ",
1907
+ "bbox": [
1908
+ 174,
1909
+ 854,
1910
+ 825,
1911
+ 924
1912
+ ],
1913
+ "page_idx": 14
1914
+ },
1915
+ {
1916
+ "type": "image",
1917
+ "img_path": "images/ce3b790a23a18be77d8726d791255034fbb41f1cf3028b470ccdc8576c9d615a.jpg",
1918
+ "image_caption": [
1919
+ "Figure 9: Results on BCI Competition IV-2a. ASR of PGD and UAP in Case 2), i.e., computed with head model (w/HM); and in Case 3), i.e., computed without head model (w/oHM). "
1920
+ ],
1921
+ "image_footnote": [],
1922
+ "bbox": [
1923
+ 276,
1924
+ 103,
1925
+ 722,
1926
+ 415
1927
+ ],
1928
+ "page_idx": 15
1929
+ },
1930
+ {
1931
+ "type": "image",
1932
+ "img_path": "images/24bbf9586d061f5fa7fa0a1b21aa8350f5c5b44b459c9cb84b74008f7c705ba6.jpg",
1933
+ "image_caption": [
1934
+ "Figure 10: Power spectral density comparison of the attack with and without derivative loss term, as well as the original signal shown in Figure 2. "
1935
+ ],
1936
+ "image_footnote": [],
1937
+ "bbox": [
1938
+ 305,
1939
+ 472,
1940
+ 692,
1941
+ 642
1942
+ ],
1943
+ "page_idx": 15
1944
+ },
1945
+ {
1946
+ "type": "text",
1947
+ "text": "E CLASSIFICATION CONFUSION MATRICES ",
1948
+ "text_level": 1,
1949
+ "bbox": [
1950
+ 174,
1951
+ 705,
1952
+ 547,
1953
+ 723
1954
+ ],
1955
+ "page_idx": 15
1956
+ },
1957
+ {
1958
+ "type": "text",
1959
+ "text": "We analyze the confusion matrices before and after the proposed attack. Fig. 11 shows the confusion matrix of EEGNet on the Physionet dataset before the attack, where all classes can be classified with similar accuracy $( 7 2 . 8 \\% - 7 3 . 5 \\% )$ . Fig. 12 shows the confusion matrices for three different propagation parameters $( \\lambda _ { m } \\in \\{ 1 , 5 , 1 5 \\} )$ and two attack positions (T9 and T10) which correspond to the left and right side of the head. When considering the attacks from the left side, shown in Fig. 12a–12c, more samples with ground-truth label “right” can be fooled to “rest”. This is particularly articulated in largely attenuated propagation model $\\lambda _ { m } { = } 1 5 )$ . In a similar vein, attacks coming from the right side of the head (T10) are more effective on data with ground-truth label “left” (Fig. 12d–12f). ",
1960
+ "bbox": [
1961
+ 173,
1962
+ 738,
1963
+ 825,
1964
+ 849
1965
+ ],
1966
+ "page_idx": 15
1967
+ },
1968
+ {
1969
+ "type": "image",
1970
+ "img_path": "images/1ea1613670bc55b7d890555d5cc7a5add225bf73d62460f527b51eaf42cf5122.jpg",
1971
+ "image_caption": [
1972
+ "Figure 11: Confusion matrix original EEG predictions on Physionet dataset. "
1973
+ ],
1974
+ "image_footnote": [],
1975
+ "bbox": [
1976
+ 390,
1977
+ 160,
1978
+ 606,
1979
+ 314
1980
+ ],
1981
+ "page_idx": 16
1982
+ },
1983
+ {
1984
+ "type": "image",
1985
+ "img_path": "images/f736298343192e93d83223443cacb3b79a8f52cbc4fc153ebd24626308f0133e.jpg",
1986
+ "image_caption": [
1987
+ "Figure 12: Confusion matrices for the Physionet dataset after attacking EEGNet with the proposed PGD attack with derivative and considering the spatial propagation. The attack is either performed from the left electrode (T9) or from the right electrode (T10). We consider different magnitude propagation parameters $\\lambda _ { m }$ and a constant delay parameter $\\lambda _ { d } { = } 0 . 3$ . "
1988
+ ],
1989
+ "image_footnote": [],
1990
+ "bbox": [
1991
+ 186,
1992
+ 464,
1993
+ 802,
1994
+ 801
1995
+ ],
1996
+ "page_idx": 16
1997
+ },
1998
+ {
1999
+ "type": "image",
2000
+ "img_path": "images/6345909357cc6d546532e1d948e55cd4d914328dd323e1190fe1921adc19c884.jpg",
2001
+ "image_caption": [
2002
+ "Figure 13: A successful PGD attack on Physionet dataset (i) without and (ii) with derivative with different values of maximum amplitude $\\epsilon$ . "
2003
+ ],
2004
+ "image_footnote": [],
2005
+ "bbox": [
2006
+ 178,
2007
+ 179,
2008
+ 823,
2009
+ 797
2010
+ ],
2011
+ "page_idx": 17
2012
+ }
2013
+ ]
parse/dev/0sEIBFb4cs/0sEIBFb4cs_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/0sEIBFb4cs/0sEIBFb4cs_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/2clwrA2tfik/2clwrA2tfik_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/Ix37FJYDkBp/Ix37FJYDkBp_content_list.json ADDED
@@ -0,0 +1,1074 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "SemMAE: Semantic-Guided Masking for Learning Masked Autoencoders ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 189,
8
+ 122,
9
+ 812,
10
+ 171
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Gang $\\mathbf { L i } ^ { 1 , 2 }$ ∗, Heliang Zheng3, Daqing $\\mathbf { L i u ^ { 3 } }$ , Chaoyue Wang3, Bing $\\mathbf { S u ^ { 4 } }$ , Changwen Zheng1† ",
17
+ "bbox": [
18
+ 191,
19
+ 220,
20
+ 815,
21
+ 237
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "Institute of Software, Chinese Academy of Sciences1, University of Chinese Academy of Sciences2, JD Explore Academy3, Renmin University of China4 ucasligang@gmail.com, {zhengheliang,liudaqing1,wangchaoyue9}@jd.com, bingsu@ruc.edu.cn, changwen@iscas.ac.cn ",
28
+ "bbox": [
29
+ 200,
30
+ 238,
31
+ 789,
32
+ 306
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Abstract ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 462,
42
+ 343,
43
+ 535,
44
+ 359
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Recently, significant progress has been made in masked image modeling to catch up to masked language modeling. However, unlike words in NLP, the lack of semantic decomposition of images still makes masked autoencoding (MAE) different between vision and language. In this paper, we explore a potential visual analogue of words, i.e., semantic parts, and we integrate semantic information into the training process of MAE by proposing a Semantic-Guided Masking strategy. Compared to widely adopted random masking, our masking strategy can gradually guide the network to learn various information, i.e., from intra-part patterns to inter-part relations. In particular, we achieve this in two steps. 1) Semantic part learning: we design a self-supervised part learning method to obtain semantic parts by leveraging and refining the multi-head attention of a ViT-based encoder. 2) Semantic-guided MAE (SemMAE) training: we design a masking strategy that varies from masking a portion of patches in each part to masking a portion of (whole) parts in an image. Extensive experiments on various vision tasks show that SemMAE can learn better image representation by integrating semantic information. In particular, SemMAE achieves $8 4 . 5 \\%$ fine-tuning accuracy on ImageNet-1k, which outperforms the vanilla MAE by $1 . 4 \\%$ . In the semantic segmentation and fine-grained recognition tasks, SemMAE also brings significant improvements and yields the state-of-the-art performance. Our code is available at https://github.com/ucasligang/SemMAE. ",
51
+ "bbox": [
52
+ 232,
53
+ 375,
54
+ 766,
55
+ 651
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 Introduction ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 174,
65
+ 678,
66
+ 310,
67
+ 694
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Together with transformers, masked language modeling (MLM) has revolutionized the field of self-supervised learning (SSL) in natural language processing (NLP), which enables training of generalizable NLP models containing over one hundred billion parameters [5]. The concept of MLM is quite intuitive, i.e., a portion of the data is removed and a model is trained to predict the removed content. Recently, significant progress has been made in masked image modeling to catch up to masked language modeling, where the masking mechanism is a key factor. Context encoder [28], an inpainting-based masked image modeling (MIM) pioneer, proposes to use a random and fix-shaped mask; SiT [2] and BEiT [3] use random “blockwise” masks, where patches in the local neighbourhood are masked together (also called GMML: group mask model learning); MAE [19] randomly masks out $7 5 \\%$ patches of an image. Actually, masking mechanisms define the specific pretext task, i.e., what kind of information is to be exploited and what kind of information is to be predicted. Thus ",
74
+ "bbox": [
75
+ 174,
76
+ 709,
77
+ 825,
78
+ 861
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "AttMask [21] studies the problem of which tokens to mask and proposes an attention-guided mask strategy to make informed decisions. ADIOS [30] takes one step further to “learn to mask” by adversarial training. ",
85
+ "bbox": [
86
+ 176,
87
+ 92,
88
+ 823,
89
+ 133
90
+ ],
91
+ "page_idx": 1
92
+ },
93
+ {
94
+ "type": "text",
95
+ "text": "Although promising performance has been achieved, there is still a large gap for masked autoencoding (MAE) between vision and language due to different signal natures. A sentence can be semantically decomposed into words, while the semantic decomposition of an image is not trivial to be obtained. To find a visual analogue of words, we investigate part-based image representation. Specifically, the real world is composed of objects, which consist of different parts. Therefore, part-based image representation is a fundamental image representation method that fits the inherent properties of objects [8, 15, 16, 18, 20]. For example, part-based Pictorial Stracture [16] dominated the image representation field for several years in the early days of computer vision, and Deformable Part Model (DPM) [15] was also a milestone in image recognition and detection. Moreover, GLOM [20] argues that the hierarchical representation with five levels (i.e., the lowest level, sub-part level, part level, object level, and scene level) would be a powerful image representation method in the future. To this end, we argue that semantic parts would be a potential visual analogue of words. With such visual analogue, more controllable hints can be built up to guide the learning of MAE, thus high-level visual representations can be well learned. ",
96
+ "bbox": [
97
+ 174,
98
+ 140,
99
+ 825,
100
+ 332
101
+ ],
102
+ "page_idx": 1
103
+ },
104
+ {
105
+ "type": "text",
106
+ "text": "In this paper, we first propose a self-supervised semantic part learning method to obtain semantic parts for each image. Our insight is that the spatial information to reconstruct an image is highly correlated to the position of semantic parts. In particular, our part learning model consists of a ViT-based encoder together with an attention module that generates a class token and multiple attention maps, and a StyleGAN-based decoder that reconstructs the original image. The attention maps are optimized to provide spatial information, and the class token is integrated into the decoder via AdaIN to provide texture information. We find that the optimized attention maps can indicate part positions, and we conduct an argmax operation to obtain part segmentation maps. After that, we study how semantic parts can facilitate the learning of MAE. We design a masking strategy that varies from masking a portion of patches in each part to masking a portion of (whole) parts in an image. Such a design can gradually guide the network to learn various information, i.e., from intra-part patterns to inter-part relations. Extensive experiments on various vision tasks (e.g., linear probing, fine-tuning, semantic segmentation, and fine-grained recognition) show that SemMAE can learn better image representation by integrating semantics. ",
107
+ "bbox": [
108
+ 174,
109
+ 339,
110
+ 825,
111
+ 531
112
+ ],
113
+ "page_idx": 1
114
+ },
115
+ {
116
+ "type": "text",
117
+ "text": "Our contributions include 1) designing a self-supervised semantic part learning method that can generate promising semantic parts on multi-class datasets, i.e., ImageNet, and 2) verifying that semantic parts can facilitate the learning of MAE by proposing a semantic-guided masking strategy. While more importantly, we hope our attempts can provide insights for the community to study the visual analogue of words and unified vision and language modeling. ",
118
+ "bbox": [
119
+ 174,
120
+ 539,
121
+ 825,
122
+ 608
123
+ ],
124
+ "page_idx": 1
125
+ },
126
+ {
127
+ "type": "text",
128
+ "text": "2 Related work ",
129
+ "text_level": 1,
130
+ "bbox": [
131
+ 174,
132
+ 640,
133
+ 316,
134
+ 657
135
+ ],
136
+ "page_idx": 1
137
+ },
138
+ {
139
+ "type": "text",
140
+ "text": "Semantic part learning. Part-based image representation is a fundamental image representation method that fits the inherent properties of objects [8, 15, 16, 18, 20]. However, due to the tremendous cost of labeling parts, there are still no large-scale datasets containing part labels. Thus previous works are mainly two-fold, i.e., unsupervised/weakly-supervised part learning and few-shot part segmentation. Unsupervised/weakly-supervised part learning methods [10, 22, 39] propose to mine part information by leveraging spatial priors, the semantics of convolutional channels, or designing contrastive proxy tasks. Few-shot part segmentation methods [4, 29, 38] mainly learn an additional classifier over pre-trained features that are trained by GAN, self-supervised contrastive learning, or denoising diffusion probabilistic modeling. Although promising results have been obtained, these models are designed to deal with fine-grained datasets, where all images belong to a single super-class (e.g., birds, cars, or human faces). It is much more challenging to solve the problem of unsupervised part learning on multi-class datasets such as ImageNet. With the development of ViT and self-supervised learning (SSL), some recent works show a potential solution. In particular, DINO [6] and iBOT [42] have observed intuitive semantics in the ViT trained by their SSL methods, where the multi-head attention maps can somehow indicate different semantic parts of an object. Inspired by these works, we design a reconstruction-based method to further refine the attention maps learned by iBOT to obtain semantic parts on the ImageNet dataset. ",
141
+ "bbox": [
142
+ 174,
143
+ 676,
144
+ 825,
145
+ 911
146
+ ],
147
+ "page_idx": 1
148
+ },
149
+ {
150
+ "type": "image",
151
+ "img_path": "images/cbb8251d2beda93c0b0f022dbc58fb0ff4c31d7a644b9d6801d62c9b5eb8f663.jpg",
152
+ "image_caption": [
153
+ "Figure 1: Comparison of different masking strategies. Detailed information for each compared model can be found in Section 2 Masked Image Modeling. "
154
+ ],
155
+ "image_footnote": [],
156
+ "bbox": [
157
+ 176,
158
+ 89,
159
+ 821,
160
+ 316
161
+ ],
162
+ "page_idx": 2
163
+ },
164
+ {
165
+ "type": "text",
166
+ "text": "Masked image modeling. Inspired by the success of Masked Language Modeling (MLM) [5, 12] in pre-training of the NLP field, Masked Image Modeling (MIM) has been proposed recently and exhibits promising potential for visual pre-training [3, 7, 19, 30]. Existing works mainly study the problem of MIM from two directions, i.e., regression targets and masking strategies. In terms of regression targets, BeiT [3], mc-BEiT [24], and PeCo [13] adopt tokens produced by VQ-VAE [32] or its variants. MaskFeat [35] studies a broad spectrum of feature types and proposes to regress Histograms of Oriented Gradients (HOG) features of the masked content. MAE [19] and SimMIM [37] argue that predicting RGB values of raw pixels by direct regression performs no worse than the patch classification approaches with complex designs. In this paper, we follow MAE [19] to adopt the most simple and intuitive raw pixels regression. In terms of masking strategies, SiT [2], MC-SSL0.0 [1] and BeiT [3] use a block-wise masking strategy, where a block of neighbouring tokens arranged spatially are masked. MAE [19] and SimMIM [37] use random masking with a large masked patch size or a large proportion of masked patches. MST [25] and AttMask [21] propose to use attention maps to guide the masking strategy, where the former proposes to mask the nonessential regions to preserve crucial patches while the latter proposes to learn image representations with challenging tasks by masking the most attended tokens. Moreover, ADIOS [30] proposes to learn an optimal mask by adversarial training. Compared to these works, our SemMAE takes one step further and explicitly learn semantic parts to build reasonable hints for masked image modeling. Figure 1 is an illustration of different masking strategies. ",
167
+ "bbox": [
168
+ 174,
169
+ 382,
170
+ 825,
171
+ 643
172
+ ],
173
+ "page_idx": 2
174
+ },
175
+ {
176
+ "type": "text",
177
+ "text": "3 Semantic-guided masked autoencoders ",
178
+ "text_level": 1,
179
+ "bbox": [
180
+ 174,
181
+ 670,
182
+ 529,
183
+ 686
184
+ ],
185
+ "page_idx": 2
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "We propose a Semantic-guided Masked Autoencoder (SemMAE) for self-supervised image representation learning with mask image modeling. The framework of SemMAE is shown in Figure 2, which consists of two key components, i.e., Semantic Part Learning (A) and SemanticGuided Masking (B). First, given an image in Figure 2 (a), we extract the class token in Figure 2 (b) and patch tokens in Figure 2 (c) by an iBOT-pretrained ViT. After that, we learn an embedding over the class token to obtain part tokens in Figure 2 (d). We calculate the correlation of each part token to patch tokens to obtain attention maps in Figure 2 (e), whose texture information is further removed by a large-kernel blur operation. The attention maps are optimized by a diversity constraint and a reconstruction task where the attention maps and the class token are fed into a StyleGAN-based decoder to control the spatial and texture information of the reconstructed image, respectively. Finally, we conduct argmax over the attention maps to obtain part segmentation maps in Figure 2 (f) and used them to guide the mask generation for MAE. Specifically, we design a masking strategy that varies from masking a portion of patches in each part to masking a portion of (whole) parts in an image. Such a design can gradually guide the network to learn various information, i.e., from intra-part patterns to inter-part relations. ",
190
+ "bbox": [
191
+ 174,
192
+ 704,
193
+ 825,
194
+ 911
195
+ ],
196
+ "page_idx": 2
197
+ },
198
+ {
199
+ "type": "image",
200
+ "img_path": "images/90a996e4f562df22d25af9c680404d44a9450d3443e9296a7ba446d8c69e9239.jpg",
201
+ "image_caption": [
202
+ "Figure 2: An illustration of the proposed SemMAE. (A) Semantic Part Learning. A ViT-based encoder takes as input an image in (a) and produces a class token in (b) and patch tokens in (c). Our attention module first learns to embed the class token into part tokens in (d) and then generates an attention map for each part token by calculating the correlation between the part token and patch tokens. As an objective function of the attention maps, our StyleGAN-based decoder learns to reconstruct the original image from attention maps with texture information from the class token. (B) Semantic-Guided Masking. We conduct argmax over the attention maps to obtain part segmentations in (f), which are used to guide the mask generation. During the training of the MAE, the masks vary from a portion of patches in each part to a portion of (whole) parts in an image. "
203
+ ],
204
+ "image_footnote": [],
205
+ "bbox": [
206
+ 173,
207
+ 88,
208
+ 823,
209
+ 286
210
+ ],
211
+ "page_idx": 3
212
+ },
213
+ {
214
+ "type": "text",
215
+ "text": "3.1 Semantic part learning ",
216
+ "text_level": 1,
217
+ "bbox": [
218
+ 174,
219
+ 424,
220
+ 372,
221
+ 439
222
+ ],
223
+ "page_idx": 3
224
+ },
225
+ {
226
+ "type": "text",
227
+ "text": "In this subsection, we introduce our self-supervised semantic part learning method. Previous unsupervised/weakly-supervised part learning methods are mainly designed to deal with singleclass datasets (i.e., fine-grained datasets where images belong to the same superclass). Few methods are able to solve this problem under a multi-class scenario (e.g., ImageNet). While some recent works (i.e., DINO [6] and iBOT [42]) on ViT-based self-supervised learning show that the multi-head attention maps in their model can somehow indicate different semantic parts of an object. In this work, we take advantage of semantics learned in iBOT and design a reconstruction task together with a diversity constraint to refine and obtain semantic parts. ",
228
+ "bbox": [
229
+ 173,
230
+ 449,
231
+ 826,
232
+ 560
233
+ ],
234
+ "page_idx": 3
235
+ },
236
+ {
237
+ "type": "text",
238
+ "text": "In particular, given an image I, we first use an iBOT-pretrained ViT to extract its features, i.e., a class token $\\mathbf { F } _ { \\mathrm { c } } ^ { - } \\in \\mathbb { R } ^ { C \\times 1 }$ and patch tokens $\\mathbf { F } \\in \\mathbb { R } ^ { C \\times H \\mathbf { \\bar { W } } }$ . Then, we embed the class token into $N$ part tokens $\\mathbf { F } _ { \\mathrm { p } } \\in \\mathbb { R } ^ { C \\times N }$ . The main idea of such embedding is to re-weight feature channels of the class token. As shown in previous methods [39], feature channels may be corresponding to specific semantics and channel re-weighting can group channels with similar semantics together to obtain semantic part features. Thus we can obtain part tokens by: ",
239
+ "bbox": [
240
+ 173,
241
+ 565,
242
+ 825,
243
+ 650
244
+ ],
245
+ "page_idx": 3
246
+ },
247
+ {
248
+ "type": "equation",
249
+ "img_path": "images/fd5c810f2aae810694d5d2f889c9c8f999565a162cf8c1e63ba8d9b195377230.jpg",
250
+ "text": "$$\n\\mathbf { F } _ { \\mathrm { p } } ^ { ( i ) } = \\mathbf { F } _ { \\mathrm { c } } \\circ \\mathrm { s i g m o i d } ( \\mathbf { W } _ { \\mathrm { c 2 } } ^ { ( i ) } \\operatorname { t a n h } ( \\mathbf { W } _ { \\mathrm { c 1 } } ^ { ( i ) } \\mathbf { F } _ { \\mathrm { c } } ) ) ,\n$$",
251
+ "text_format": "latex",
252
+ "bbox": [
253
+ 351,
254
+ 656,
255
+ 645,
256
+ 679
257
+ ],
258
+ "page_idx": 3
259
+ },
260
+ {
261
+ "type": "text",
262
+ "text": "where $i \\in [ 1 , 2 , . . . , N ]$ , $\\mathbf { F } _ { \\mathrm { p } } ^ { ( i ) } \\in \\mathbb { R } ^ { C \\times 1 }$ is the $i ^ { t h }$ column vector of $\\mathbf { F } _ { \\mathrm { p } } \\in \\mathbb { R } ^ { C \\times N }$ , $\\circ$ indicates hadamard product, $\\mathbf { W } _ { \\mathrm { c 1 } } ^ { ( i ) }$ and $\\mathbf { W } _ { \\mathrm { c 2 } } ^ { ( i ) }$ are embedding weights, $\\operatorname { t a n h } ( { \\cdot } )$ and sigmoid $( \\cdot )$ are activation functions. ",
263
+ "bbox": [
264
+ 174,
265
+ 688,
266
+ 825,
267
+ 724
268
+ ],
269
+ "page_idx": 3
270
+ },
271
+ {
272
+ "type": "text",
273
+ "text": "After that, we calculate the correlation of each part token to the patch token in each position, thus we can obtain attention maps, i.e., the possibility of a semantic part to appear in each position: ",
274
+ "bbox": [
275
+ 169,
276
+ 728,
277
+ 821,
278
+ 758
279
+ ],
280
+ "page_idx": 3
281
+ },
282
+ {
283
+ "type": "equation",
284
+ "img_path": "images/0477b2d9ccfcf297848285561bda873e8b4c7dcfae41fe72fabaed48fa104e65.jpg",
285
+ "text": "$$\n\\mathbf { M } = \\mathbf { F } _ { \\mathrm { p } } \\otimes \\mathbf { F } : = \\mathrm { s o f t m a x } ( \\mathbf { F } _ { \\mathrm { p } } ^ { T } \\mathbf { W } _ { \\mathrm { p } } ^ { T } \\mathbf { W } \\mathbf { F } ) ,\n$$",
286
+ "text_format": "latex",
287
+ "bbox": [
288
+ 359,
289
+ 763,
290
+ 635,
291
+ 785
292
+ ],
293
+ "page_idx": 3
294
+ },
295
+ {
296
+ "type": "text",
297
+ "text": "where $\\textbf { M } \\in \\ \\mathbb { R } ^ { N \\times H W }$ denotes $N$ attention maps, $\\otimes$ indicates correlation function, which is implemented by softmax $( \\mathbf { F } _ { \\mathrm { p } } ^ { T } \\mathbf { W } _ { \\mathrm { p } } ^ { T } \\mathbf { W } \\mathbf { F } )$ in our work. $\\mathbf { W } _ { \\mathrm { p } }$ and $\\mathbf { W }$ are embedding matrixes. ",
298
+ "bbox": [
299
+ 176,
300
+ 792,
301
+ 823,
302
+ 823
303
+ ],
304
+ "page_idx": 3
305
+ },
306
+ {
307
+ "type": "text",
308
+ "text": "To learn such multi-attention maps (i.e., to optimize the parameters in Equation 1 and Equation 2), we propose a reconstruction task. Our insight is that the spatial information to reconstruct an image is highly correlated to the position of semantic parts. Thus, we adopt a StyleGAN-based decoder to reconstruct the original image based on the spatial information from the attention maps and the texture information from the class token. To ensure the attention maps learn spatial information, we 1) remove texture information from the attention maps by conducting a large-kernel blur operation and 2) further feed the blurred attention maps to stacked convolutional layers. To integrate the texture information from the class token into the decoder, we use Adaptive Instance Normalization (AdaIN) operation, which is widely used to integrate texture/style information: ",
309
+ "bbox": [
310
+ 174,
311
+ 827,
312
+ 825,
313
+ 912
314
+ ],
315
+ "page_idx": 3
316
+ },
317
+ {
318
+ "type": "text",
319
+ "text": "",
320
+ "bbox": [
321
+ 173,
322
+ 90,
323
+ 826,
324
+ 133
325
+ ],
326
+ "page_idx": 4
327
+ },
328
+ {
329
+ "type": "equation",
330
+ "img_path": "images/abd747e4138027d90079dd0b9c7aebc2db9803dfc663a59f1a9ff8473bef97ad.jpg",
331
+ "text": "$$\n[ \\mathbf { F } _ { \\mathrm { d } } ] _ { i } = \\mathrm { A d a l N } ( [ \\mathrm { c o n v } ( \\mathbf { M } ) ] _ { i } , \\mathbf { F } _ { \\mathrm { c } } ) : = [ \\mathbf { W } _ { \\mathrm { s } } \\mathbf { F } _ { \\mathrm { c } } ] _ { i } \\frac { [ \\mathrm { c o n v } ( \\mathbf { M } ) ] _ { i } - \\mu ( [ \\mathrm { c o n v } ( \\mathbf { M } ) ] _ { i } ) } { \\sigma ( [ \\mathrm { c o n v } ( \\mathbf { M } ) ] _ { i } ) } + [ \\mathbf { W } _ { \\mathrm { b } } \\mathbf { F } _ { \\mathrm { c } } ] _ { i } ,\n$$",
332
+ "text_format": "latex",
333
+ "bbox": [
334
+ 191,
335
+ 152,
336
+ 784,
337
+ 188
338
+ ],
339
+ "page_idx": 4
340
+ },
341
+ {
342
+ "type": "text",
343
+ "text": "where each feature channel $[ \\mathrm { c o n v } ( \\mathbf { M } ) ] _ { i }$ is normalized separately, and then scaled and biased using the corresponding scalar components from the embedded class token $\\mathbf { F } _ { \\mathrm { c } }$ . $\\mathbf { F } _ { \\mathrm { d } }$ denotes the convolutional feature in the decoder, ${ \\bf W _ { s } }$ and $\\mathbf { W } _ { \\mathrm { b } }$ are embedding weights, $[ \\cdot ] _ { i }$ denotes the $i ^ { t h }$ feature channel, $\\mathrm { c o n v } ( \\cdot )$ denotes convolutional layers, $\\mu ( \\cdot )$ and $\\sigma ( \\cdot )$ calculate the mean and variance values, respectively. The reconstructed image $\\hat { \\bf I }$ can be obtained by stacking convolutional and AdaIN layers: ",
344
+ "bbox": [
345
+ 174,
346
+ 189,
347
+ 825,
348
+ 262
349
+ ],
350
+ "page_idx": 4
351
+ },
352
+ {
353
+ "type": "equation",
354
+ "img_path": "images/aac52e751a308cd8c169c5d06e7153a36b62c297b8baf3277a736695600d88c2.jpg",
355
+ "text": "$$\n\\hat { \\bf I } = \\mathrm { c o n v } ( \\mathrm { A d a I N } ( \\mathrm { c o n v } ( { \\bf F } _ { \\mathrm { d } } ) , { \\bf F } _ { \\mathrm { c } } ) ) .\n$$",
356
+ "text_format": "latex",
357
+ "bbox": [
358
+ 380,
359
+ 271,
360
+ 614,
361
+ 290
362
+ ],
363
+ "page_idx": 4
364
+ },
365
+ {
366
+ "type": "text",
367
+ "text": "We use the Mean squared error (MSE) loss function to optimize such reconstruction task: ",
368
+ "bbox": [
369
+ 171,
370
+ 290,
371
+ 767,
372
+ 306
373
+ ],
374
+ "page_idx": 4
375
+ },
376
+ {
377
+ "type": "equation",
378
+ "img_path": "images/d11bf60d3ec38e495a03860da6175c584a43cb8d12314ec1f9d8b85ceb7f7808.jpg",
379
+ "text": "$$\n\\mathcal { L } _ { r e c } ( \\mathbf { I } , \\hat { \\mathbf { I } } ) = \\frac { 1 } { H W } \\sum _ { i , j } ^ { H W } ( \\mathbf { I } ( i , j ) - \\hat { \\mathbf { I } } ( i , j ) ) ^ { 2 } .\n$$",
380
+ "text_format": "latex",
381
+ "bbox": [
382
+ 357,
383
+ 308,
384
+ 640,
385
+ 352
386
+ ],
387
+ "page_idx": 4
388
+ },
389
+ {
390
+ "type": "text",
391
+ "text": "Moreover, to obtain diverse multiple attention maps, we follow previous work [40] and add a diversity constraint over attention maps: ",
392
+ "bbox": [
393
+ 176,
394
+ 353,
395
+ 823,
396
+ 382
397
+ ],
398
+ "page_idx": 4
399
+ },
400
+ {
401
+ "type": "equation",
402
+ "img_path": "images/ba25af8755cf6cc6a45b4a75bc0d6ecc9fdd87fdb72f70779ba96887d855bb2e.jpg",
403
+ "text": "$$\n\\mathcal { L } _ { d i v } ( \\mathbf { M } ) = \\frac { 1 } { N ^ { 2 } } ( \\sum _ { i \\neq j } ( 0 - \\frac { \\mathbf { m } _ { i } \\mathbf { m } _ { j } ^ { T } } { \\| \\mathbf { m } _ { i } \\| _ { 2 } \\| \\mathbf { m } _ { j } \\| _ { 2 } } ) ^ { 2 } + \\sum _ { i = j } ( 1 - \\frac { \\mathbf { m } _ { i } \\mathbf { m } _ { j } ^ { T } } { \\| \\mathbf { m } _ { i } \\| _ { 2 } \\| \\mathbf { m } _ { j } \\| _ { 2 } } ) ^ { 2 } ) ,\n$$",
404
+ "text_format": "latex",
405
+ "bbox": [
406
+ 254,
407
+ 382,
408
+ 741,
409
+ 426
410
+ ],
411
+ "page_idx": 4
412
+ },
413
+ {
414
+ "type": "text",
415
+ "text": "where attention maps are optimized to be different from each other, $\\mathbf { m } _ { i }$ and $\\mathbf { m } _ { j }$ denotes the $i ^ { t h }$ and $j ^ { t h }$ attention map, respectively. The overall objective function can be denoted by: ",
416
+ "bbox": [
417
+ 171,
418
+ 430,
419
+ 823,
420
+ 460
421
+ ],
422
+ "page_idx": 4
423
+ },
424
+ {
425
+ "type": "equation",
426
+ "img_path": "images/48722ea13ec2402b69cc957766d54ae532b7eac8fa455bcf98caadb84472a0c6.jpg",
427
+ "text": "$$\n\\mathcal { L } = \\mathcal { L } _ { r e c } ( \\mathbf { I } , \\hat { \\mathbf { I } } ) + \\lambda \\mathcal { L } _ { d i v } ( \\mathbf { M } ) ,\n$$",
428
+ "text_format": "latex",
429
+ "bbox": [
430
+ 400,
431
+ 462,
432
+ 596,
433
+ 481
434
+ ],
435
+ "page_idx": 4
436
+ },
437
+ {
438
+ "type": "text",
439
+ "text": "where $\\lambda$ is the loss weight. ",
440
+ "bbox": [
441
+ 174,
442
+ 483,
443
+ 349,
444
+ 497
445
+ ],
446
+ "page_idx": 4
447
+ },
448
+ {
449
+ "type": "text",
450
+ "text": "3.2 Semantic-guided masking ",
451
+ "text_level": 1,
452
+ "bbox": [
453
+ 176,
454
+ 512,
455
+ 393,
456
+ 529
457
+ ],
458
+ "page_idx": 4
459
+ },
460
+ {
461
+ "type": "text",
462
+ "text": "After finished semantic part learning, we move to the next stage, i.e., semantic-guided MAE training. Our informed masking strategy is based on the part information learned in Subsection 3.1. Specifically, we can obtain multiple attention maps by Equation 2, where each attention map $\\mathbf { m } \\in \\mathbb { R } ^ { H \\times \\hat { W } }$ indicates the possibility of the corresponding semantic part appearing in $H \\times W$ positions. Thus we conduct argmax $( \\cdot )$ operation over attention maps to obtain part segmentation, where each patch is classified into a particular semantic part. The patches in the same semantic part compose a visual analogue of words, which are semantically meaningful. To leverage such visual analogue of words for MAE training, a most intuitive way is to mask a portion of semantic parts and learn to predict the masked semantic parts by other parts. However, due to the learned semantic parts being coarse-grained (e.g., 6 parts for each image), we experimentally find that such a masking strategy makes the task too hard to effectively learn image representations. ",
463
+ "bbox": [
464
+ 173,
465
+ 537,
466
+ 825,
467
+ 690
468
+ ],
469
+ "page_idx": 4
470
+ },
471
+ {
472
+ "type": "text",
473
+ "text": "To this end, we propose an easy-to-hard reconstruction task, which can provide reasonable hints (i.e., visible patches) for the model to predict the masked patches during the training process of the MAE. Specifically, at the beginning of the training process, we mask a portion of patches in each part, thus the masked patches can be predicted based on the visual patches that belong to the same semantic part. Such a design can facilitate the models to learn intra-part patterns. After that, we gradually mask all patches belonging to some parts and a portion of patches belong to the remaining parts. Finally, we mask all patches belonging to a portion of parts and predict the remaining patches belong to the other parts, where inter-part relations or visual reasoning ability can be learned. ",
474
+ "bbox": [
475
+ 173,
476
+ 696,
477
+ 826,
478
+ 809
479
+ ],
480
+ "page_idx": 4
481
+ },
482
+ {
483
+ "type": "text",
484
+ "text": "Algorithm 1 shows the details to obtain the number of masked patches for each semantic part. First, we define two masking settings, i.e., 1) mask a portion of patches in each part and 2) random select some parts to mask (the whole part). The number of masked patches for each semantic part can be calculated for these two settings. After that, we introduce an interpolation hyper-parameter $\\alpha$ . A small $\\alpha$ means the first setting dominates the masking strategy, and vice versa. $\\alpha$ is adjusted based on training iterations and keeps increasing during the training process. Finally, we random mask a certain number of patches based on the calculated masking number. ",
485
+ "bbox": [
486
+ 174,
487
+ 814,
488
+ 825,
489
+ 911
490
+ ],
491
+ "page_idx": 4
492
+ },
493
+ {
494
+ "type": "text",
495
+ "text": "Algorithm 1 Algorithm of Semantic-Guided Masking in a PyTorch-like style. ",
496
+ "text_level": 1,
497
+ "bbox": [
498
+ 174,
499
+ 90,
500
+ 683,
501
+ 106
502
+ ],
503
+ "page_idx": 5
504
+ },
505
+ {
506
+ "type": "text",
507
+ "text": "Input: $L$ , $x$ , num_patches, mask_ratio, total_epoches, epoch # $L$ : the number of patches per image. # $x \\in \\mathbb { R } ^ { L \\times C }$ : the token embeddings of image patches. # num_patches $\\mathbf { \\Psi } \\in \\mathbb { R } ^ { N \\times 1 }$ : the patch number of each part, where $N$ is the number of parts. # mask_ratio: the ratio of masked patches. # total_epoches: the number of pre-training epochs. # epoch: current epoch number. # mask a portion of patches in each part \n1: num_mask1 = mask_ratio \\* num_patches # randomly select some parts to mask (with tricks to ensure a fixed mask ratio) \n2: shuffle_num_patches $=$ shuffle_parts(num_patches) \n3: marks $\\ v { U } = \\mathbf { L } \\ v { \\Sigma } ^ { * }$ mask_ratio-cumsum(shuffle_num_patches)+shuffle_num_patches \n4: marks_remains $=$ where(marks $< 0$ , 0, marks) \n5: num_mask2 $=$ where(marks_remains $<$ shuffle_num_patches, marks_remains, shuffle_num_patches) \n6: num_mask2 $=$ unshuffle_parts(num_mask2) # adaptive masking by interpolating between num_mask1 and num_mask2 \n7: α = ( epochtotal_epoches ) \n8: $\\ n u m \\_ m a s k = ( 1 - \\alpha ) * n u m \\_ m a s k 1 + \\alpha * n u m \\_ m a s k 2$ \n9: return num_mask # $n u m \\_ m a s k \\in \\mathbb { R } ^ { N \\times 1 } ;$ : the number of patches to be masked in each part. ",
508
+ "bbox": [
509
+ 174,
510
+ 109,
511
+ 826,
512
+ 406
513
+ ],
514
+ "page_idx": 5
515
+ },
516
+ {
517
+ "type": "text",
518
+ "text": "4 Experiments ",
519
+ "text_level": 1,
520
+ "bbox": [
521
+ 174,
522
+ 416,
523
+ 313,
524
+ 433
525
+ ],
526
+ "page_idx": 5
527
+ },
528
+ {
529
+ "type": "text",
530
+ "text": "4.1 Experiment setup ",
531
+ "text_level": 1,
532
+ "bbox": [
533
+ 174,
534
+ 446,
535
+ 338,
536
+ 462
537
+ ],
538
+ "page_idx": 5
539
+ },
540
+ {
541
+ "type": "text",
542
+ "text": "Semantic part learning. As introduced in Section 3.1, we use ViT-small [14] as our part learning encoder, which is pre-trained by a self-supervised method iBOT [42]. We follow iBOT [42] to learn 6 semantic parts for each image, as the head number of the multi-head attention in ViT-Small is 6. The size of the blur kernel is experimentally set to be 7, and the loss weight $\\lambda$ in Equation 7 is set to be 0.03. The experiment is performed on ImageNet-1k [11] dataset. The parameters of the ViT-based encoder are fixed, and we only optimize the attention module and the StyleGAN-based decoder. Our model converges fast, which only takes 2 hours on one A100 GPU card. ",
543
+ "bbox": [
544
+ 173,
545
+ 472,
546
+ 826,
547
+ 569
548
+ ],
549
+ "page_idx": 5
550
+ },
551
+ {
552
+ "type": "text",
553
+ "text": "Semantic-guided MAE training. We follow MAE [19] and adopt an encoder-decoder structure to perform MIM. Our method is general for ViT backbones, while most experiments are conducted with a relatively small version, i.e., the original ViT-Base [14], due to the limitation of computation resources. We follow the most comment setting to optimize our model by AdamW [27] with a learning rate of $2 . 4 \\mathrm { e } { - 3 }$ . The batch size is set to be 4096, and the weight decay is set to be 0.05. We use a cosine learning rate strategy [26] with warmup [17]. The warmup number is set to be 40 epochs, and we pre-train our model for 800 epochs. For data augmentation, we only employ random horizontal flipping in our pre-training stage. The hyper-parameter $\\gamma$ in Algorithm 1 is experimentally set to be 2. Our model is trained on 16 A-100 GPUs for 3 days, and more details can be found in our code, which is in the supplemental material and will be made publicly released. ",
554
+ "bbox": [
555
+ 173,
556
+ 575,
557
+ 826,
558
+ 715
559
+ ],
560
+ "page_idx": 5
561
+ },
562
+ {
563
+ "type": "table",
564
+ "img_path": "images/d41f18b4dcae541539a308c24d730def847956866887be5c890e7d121143441d.jpg",
565
+ "table_caption": [
566
+ "Table 1: Quantitative evaluation of the effectiveness of integrating semantic information for MAE. "
567
+ ],
568
+ "table_footnote": [],
569
+ "table_body": "<table><tr><td rowspan=2 colspan=1>Setting</td><td rowspan=1 colspan=2>16×16 patch size</td><td rowspan=1 colspan=2>8×8 patch size</td></tr><tr><td rowspan=1 colspan=1>MAE [19]</td><td rowspan=1 colspan=1>SemMAE</td><td rowspan=1 colspan=1>MAE [19]</td><td rowspan=1 colspan=1>SemMAE</td></tr><tr><td rowspan=1 colspan=1>Linear probing</td><td rowspan=1 colspan=1>63.7</td><td rowspan=1 colspan=1>65.0</td><td rowspan=1 colspan=1>66.8</td><td rowspan=1 colspan=1>68.7</td></tr></table>",
570
+ "bbox": [
571
+ 281,
572
+ 753,
573
+ 717,
574
+ 806
575
+ ],
576
+ "page_idx": 5
577
+ },
578
+ {
579
+ "type": "text",
580
+ "text": "4.2 Semantic-guided MAE ",
581
+ "text_level": 1,
582
+ "bbox": [
583
+ 174,
584
+ 829,
585
+ 372,
586
+ 844
587
+ ],
588
+ "page_idx": 5
589
+ },
590
+ {
591
+ "type": "text",
592
+ "text": "The effectiveness of integrating semantic information. We conduct experiments under two different settings (i.e., with a patch size of $1 6 \\times 1 6$ and $8 \\times 8$ ) to verify the effectiveness of integrating semantic information for training MAE. The results in Table 1 show that integrating semantic information can bring $1 . 3 \\%$ and $1 . 9 \\%$ accuracy gains for linear probing, respectively. As we use $8 \\times 8$ patch size to learn semantic parts, the coarse-grained patch (i.e., large patch size) in the pre-training stage would cause imprecise part segment and suppresses the benefits of semantic parts. To further study the impact of patch size for masked image modeling, we conduct fine-tuning experiments in Table 2. It can be observed that in SimMIM and original MAE, a larger patch size performs better; while in our SemMAE, more precise semantic parts with $8 \\times 8$ patch size can significantly improve the performance. Thus in the following experiments, we adopt $8 \\times 8$ patch size for SemMAE. It is notable that although using a smaller patch size, our parameters and computational cost do not increase during pre-training and linear probing as only 1/4 patches in each image are used. Specifically, we leverage the learned attentions maps to remove $3 / 4$ patches that are most likely to be the background. ",
593
+ "bbox": [
594
+ 174,
595
+ 856,
596
+ 825,
597
+ 911
598
+ ],
599
+ "page_idx": 5
600
+ },
601
+ {
602
+ "type": "table",
603
+ "img_path": "images/cb35c18058f5e2be2e87c69aebaf1c33e5c97332adbd0f65eace83acb2395a3c.jpg",
604
+ "table_caption": [
605
+ "Table 2: The optimal patch size for different models. "
606
+ ],
607
+ "table_footnote": [],
608
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Patch size</td><td rowspan=1 colspan=1>Fine-tuning Acc.(%)</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>Model</td><td rowspan=1 colspan=1>Patch size</td><td rowspan=1 colspan=1>Fine-tuning Acc.(%)</td></tr><tr><td rowspan=4 colspan=1>SimMIM [37]</td><td rowspan=1 colspan=1>32x32</td><td rowspan=1 colspan=1>82.8</td><td rowspan=1 colspan=1></td><td rowspan=2 colspan=1>MAE [19]</td><td rowspan=1 colspan=1>16x16</td><td rowspan=1 colspan=1>83.26</td></tr><tr><td rowspan=1 colspan=1>16x16</td><td rowspan=1 colspan=1>82.7</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>8x8</td><td rowspan=1 colspan=1>83.10</td></tr><tr><td rowspan=1 colspan=1>8x8</td><td rowspan=1 colspan=1>82.1</td><td rowspan=2 colspan=2>SemMAE</td><td rowspan=1 colspan=1>16x16</td><td rowspan=1 colspan=1>83.34</td></tr><tr><td rowspan=1 colspan=1>4x4</td><td rowspan=1 colspan=1>82.0</td><td rowspan=1 colspan=1></td><td rowspan=1 colspan=1>8x8</td><td rowspan=1 colspan=1>84.50</td></tr></table>",
609
+ "bbox": [
610
+ 173,
611
+ 113,
612
+ 836,
613
+ 199
614
+ ],
615
+ "page_idx": 6
616
+ },
617
+ {
618
+ "type": "text",
619
+ "text": "",
620
+ "bbox": [
621
+ 173,
622
+ 204,
623
+ 826,
624
+ 330
625
+ ],
626
+ "page_idx": 6
627
+ },
628
+ {
629
+ "type": "text",
630
+ "text": "A detailed study on masking strategies. Once obtained semantic parts, a most intuitive way to leverage such visual analogue of words for MAE training is to mask a portion of semantic parts and make the model to predict the removed content. However, due to the learned semantic parts being coarse-grained (e.g., 6 parts for each image), we experimentally find that such a masking strategy makes the task too hard to effectively learn image representations. The results can be found in Table 3, where masking $7 5 \\%$ parts cause $1 3 . 9 \\%$ performance drops compared to random masking. Moreover, it can be observed that masking $7 5 \\%$ patches per part achieves comparable results with random masking. The self-supervised learning task of masking $7 5 \\%$ patches per part would encourage the model to learn local contexts/intra-part patterns, and masking $7 5 \\%$ parts would encourage the model to learn inter-part relations. Interestingly, we find that the former task can enable the model to further learn better image representation in the latter task. The results in Table 3 show that our proposed adaptive masking strategy (i.e., varying from masking $7 5 \\%$ patches per part to masking $7 5 \\%$ parts gradually) with $\\gamma = 2$ yields the best performance. ",
631
+ "bbox": [
632
+ 173,
633
+ 335,
634
+ 826,
635
+ 516
636
+ ],
637
+ "page_idx": 6
638
+ },
639
+ {
640
+ "type": "image",
641
+ "img_path": "images/b7d4598335ce52c0e42d64c8d328fb3696e4079b4b81264741277c0a31a90363.jpg",
642
+ "image_caption": [
643
+ "Figure 3: The curves of $\\alpha$ and $\\gamma$ "
644
+ ],
645
+ "image_footnote": [],
646
+ "bbox": [
647
+ 187,
648
+ 534,
649
+ 379,
650
+ 680
651
+ ],
652
+ "page_idx": 6
653
+ },
654
+ {
655
+ "type": "table",
656
+ "img_path": "images/ef059e0910f2f7261eaab084220ebaa4b680cc217bb24adf03fb863443f928ed.jpg",
657
+ "table_caption": [
658
+ "Table 3: Quantitative evaluation of different masking strategies. "
659
+ ],
660
+ "table_footnote": [],
661
+ "table_body": "<table><tr><td rowspan=1 colspan=1>Mask strategy</td><td rowspan=1 colspan=1>a</td><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>Linear probing</td></tr><tr><td rowspan=1 colspan=1>Random masking</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>66.8</td></tr><tr><td rowspan=1 colspan=1>Mask 75% patches</td><td rowspan=1 colspan=1>0</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>66.5</td></tr><tr><td rowspan=1 colspan=1>Mask 75% parts</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>二</td><td rowspan=1 colspan=1>52.9</td></tr><tr><td rowspan=6 colspan=1>Adaptive masking</td><td rowspan=1 colspan=1>1→0</td><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>63.3</td></tr><tr><td rowspan=5 colspan=1>0→1</td><td rowspan=1 colspan=1>1/3</td><td rowspan=1 colspan=1>66.2</td></tr><tr><td rowspan=1 colspan=1>1/2</td><td rowspan=1 colspan=1>67.3</td></tr><tr><td rowspan=1 colspan=1>1</td><td rowspan=1 colspan=1>67.9</td></tr><tr><td rowspan=1 colspan=1>2</td><td rowspan=1 colspan=1>68.7</td></tr><tr><td rowspan=1 colspan=1>3</td><td rowspan=1 colspan=1>68.6</td></tr></table>",
662
+ "bbox": [
663
+ 442,
664
+ 536,
665
+ 807,
666
+ 680
667
+ ],
668
+ "page_idx": 6
669
+ },
670
+ {
671
+ "type": "text",
672
+ "text": "4.3 Semantic part learning ",
673
+ "text_level": 1,
674
+ "bbox": [
675
+ 174,
676
+ 719,
677
+ 372,
678
+ 733
679
+ ],
680
+ "page_idx": 6
681
+ },
682
+ {
683
+ "type": "text",
684
+ "text": "We first evaluate the effectiveness of our proposed semantic part learning method. Both qualitative and quantitative experiments are conducted. Note that most of the previous part learning models are designed for single-class datasets and cannot be effectively applied to ImageNet. iBOT [42] is not proposed for part learning, while the multi-head attention in their model achieves the state-of-the-art part learning performance on ImageNet. Figure 4 shows the qualitative comparison of our model and iBOT [42], and it can be observed that our model can generate more complete semantic part segmentation maps where different parts and the background are better separated with less noise. Moreover, as there is no part segmentation ground truth, we conduct quantitatively evaluation in an indirect way by training SemMAE and analyzing ImageNet classification performance. The results in Table 4 show that the semantic parts obtained by iBOT are not able to benefit the learning of MAE, while our semantic part learning methods can generate more precise part segmentation maps, which are vital to learning a better image representation. ",
685
+ "bbox": [
686
+ 173,
687
+ 746,
688
+ 826,
689
+ 911
690
+ ],
691
+ "page_idx": 6
692
+ },
693
+ {
694
+ "type": "image",
695
+ "img_path": "images/523aa9018548f6cdc8c65ae729be27cf7503ce05af1ee7af051e233f591e0c0c.jpg",
696
+ "image_caption": [
697
+ "Figure 4: Qualitative comparison of semantic part learning. Different color indicates different semantic parts, and it can be observed that our model can better separate different parts and the background with less noise. "
698
+ ],
699
+ "image_footnote": [],
700
+ "bbox": [
701
+ 173,
702
+ 83,
703
+ 825,
704
+ 349
705
+ ],
706
+ "page_idx": 7
707
+ },
708
+ {
709
+ "type": "table",
710
+ "img_path": "images/c956f1a84dc35eba5d5a4e2764ed6fc41cd9248ad057aafa0db27158a3cf2ea6.jpg",
711
+ "table_caption": [
712
+ "Table 4: Quantitative evaluation of semantic part learning in terms of classification accuracy $( \\% )$ . "
713
+ ],
714
+ "table_footnote": [],
715
+ "table_body": "<table><tr><td>Semantic parts for masking Baseline (w/o parts) iBOT-initialized partsOur learned parts</td><td></td><td></td><td></td></tr><tr><td>Linear probing Acc. (%)</td><td>63.7</td><td>63.6</td><td>65.0</td></tr></table>",
716
+ "bbox": [
717
+ 191,
718
+ 411,
719
+ 805,
720
+ 448
721
+ ],
722
+ "page_idx": 7
723
+ },
724
+ {
725
+ "type": "table",
726
+ "img_path": "images/28a8e17684cf20d9adc478f86ced47599a7ef31b5b4a0461d35620781bfcb3dc.jpg",
727
+ "table_caption": [
728
+ "Table 5: System-level comparison on ImageNet-1k in terms of classification accuracy using ViT-Base as the encoder. Note that we list the best performance in previous papers with $2 2 4 \\times 2 2 4$ inputs, and some experiment settings (e.g., training epochs and patch size) may be different. "
729
+ ],
730
+ "table_footnote": [],
731
+ "table_body": "<table><tr><td>Method</td><td></td><td>Pre-train dataset Pre-train epoches Linear probing</td><td></td><td>gFintuning</td></tr><tr><td colspan=\"5\">Traning from scratch</td></tr><tr><td colspan=\"2\">ViT384 [14]</td><td></td><td></td><td>77.9</td></tr><tr><td colspan=\"2\">DeiT[31]</td><td></td><td></td><td>81.8</td></tr><tr><td colspan=\"2\">ViT[19]</td><td>=</td><td></td><td>82.3</td></tr><tr><td colspan=\"5\">Contrastive-based SSL Pre-Training</td></tr><tr><td>AttMask [42]</td><td>ImageNet-1K</td><td>100</td><td>75.7</td><td>1</td></tr><tr><td>DINO [6]</td><td>ImageNet-1K</td><td>300</td><td>78.2</td><td>82.8</td></tr><tr><td>MoCo v3 [9]</td><td>ImageNet-1K</td><td>300</td><td>76.5</td><td>83.2</td></tr><tr><td>iBOT[42]</td><td>ImageNet-1K</td><td>1600</td><td>79.5</td><td>84.0</td></tr><tr><td colspan=\"5\">MIM-based SSL Pre-Training</td></tr><tr><td>BeiT[3]</td><td>ImageNet-1K</td><td>800</td><td>56.7</td><td>83.2</td></tr><tr><td>MAE [19]</td><td>ImageNet-1K</td><td>1600</td><td>68.0</td><td>83.6</td></tr><tr><td>SimMIM [37]</td><td>ImageNet-1K</td><td>800</td><td>56.7</td><td>83.8</td></tr><tr><td> SemMAE</td><td>ImageNet-1K</td><td>800</td><td>68.7</td><td>84.5</td></tr></table>",
732
+ "bbox": [
733
+ 222,
734
+ 501,
735
+ 771,
736
+ 753
737
+ ],
738
+ "page_idx": 7
739
+ },
740
+ {
741
+ "type": "text",
742
+ "text": "4.4 Compared with other methods on ImageNet ",
743
+ "text_level": 1,
744
+ "bbox": [
745
+ 174,
746
+ 775,
747
+ 519,
748
+ 790
749
+ ],
750
+ "page_idx": 7
751
+ },
752
+ {
753
+ "type": "text",
754
+ "text": "Linear probing and fine-tuning on ImageNet-1K classification dataset is the most common setting to evaluate SSL methods. We collect all competitive methods that report their results on ImageNet-1K dataset. For example, we do not include the related work MST [25] and ADIOS [30] as they evaluate their model on other benchmarks. Table 5 shows the comparison of our model and previous models in terms of linear probing and fine-tuning. For a fair comparison, all experiments adopt the same input size, i.e., $2 2 4 \\times 2 2 4$ unless specified otherwise. Compared with “training from scratch”, our SemMAE can significantly improve the performance for both linear probing and fine-tuning. For linear probing, our SemMAE outperforms the most competitive MIM-based methods by $0 . 8 \\%$ even with fewer training epochs. For fine-tuning, our SemMAE achieves $8 4 . 5 \\%$ top-1 classification accuracy, outperforming SimMIM[37] and MAE[19] by $0 . 9 \\%$ and $0 . 7 \\%$ respectively. Moreover, our SemMAE can also surpass previous contrastive learning-based methods[6, 9] for fine-tuning. ",
755
+ "bbox": [
756
+ 173,
757
+ 800,
758
+ 826,
759
+ 911
760
+ ],
761
+ "page_idx": 7
762
+ },
763
+ {
764
+ "type": "text",
765
+ "text": "",
766
+ "bbox": [
767
+ 174,
768
+ 90,
769
+ 825,
770
+ 133
771
+ ],
772
+ "page_idx": 8
773
+ },
774
+ {
775
+ "type": "text",
776
+ "text": "4.5 Downstream tasks ",
777
+ "text_level": 1,
778
+ "bbox": [
779
+ 174,
780
+ 151,
781
+ 341,
782
+ 166
783
+ ],
784
+ "page_idx": 8
785
+ },
786
+ {
787
+ "type": "text",
788
+ "text": "Fine-grained image classification. Table 6 shows our results of transfer learning on fine-grained datasets. Our model can surpass the most competitive MAE [19] with a clear margin, i.e., $0 . 3 \\%$ , $0 . 6 \\%$ , and $0 . 2 \\%$ on the iNaturalists[33], CUB-Bird[34], and Stanford-Cars[23] dataset, respectively. These results show the promising transfer ability of our SemMAE for downstream classification tasks. ",
789
+ "bbox": [
790
+ 174,
791
+ 178,
792
+ 826,
793
+ 233
794
+ ],
795
+ "page_idx": 8
796
+ },
797
+ {
798
+ "type": "table",
799
+ "img_path": "images/4fef3de69cdf88bb00b7e1d2bd4efefb745142c9be0e774e2cad1b559e6b7a0f.jpg",
800
+ "table_caption": [
801
+ "Table 6: Fine-tuning results on fine-grained datasets. "
802
+ ],
803
+ "table_footnote": [],
804
+ "table_body": "<table><tr><td>Method</td><td>iNa19</td><td>CUB</td><td>Cars</td></tr><tr><td>BeiT[3]</td><td>79.2</td><td>-</td><td>94.2</td></tr><tr><td>DINO [3]</td><td>78.6</td><td></td><td>93.0</td></tr><tr><td>iBoT[19]</td><td>79.6</td><td>1</td><td>94.3</td></tr><tr><td>MAE [19]</td><td>81.8</td><td>86.5</td><td>94.2</td></tr><tr><td> SemMAE</td><td>82.1</td><td>87.1</td><td>94.4</td></tr></table>",
805
+ "bbox": [
806
+ 299,
807
+ 273,
808
+ 694,
809
+ 377
810
+ ],
811
+ "page_idx": 8
812
+ },
813
+ {
814
+ "type": "text",
815
+ "text": "Semantic segmentation. Semantic segmentation aims to assign a label to each pixel of the input image. We evaluate our SemMAE on the widely used semantic segmentation dataset ADE20K [41], which contains 25K images and 150 semantic categories. We follow the most common setting to use the task layer in UPerNet [36] and fine-tune the pre-trained ViT-Base model. We use the standard setting that pre-train a ViT-Base model with a patch size of $1 6 \\times 1 6$ and fine-tunes 160K iterations with a batch size of 16. Such an experiment can validate the transfer ability of our SemMAE for semantic segmentation. As shown in Table 7, SeMAE surpasses MAE by 0.2 (46.3 vs. 46.1) mIoU and outperforms the supervised pre-train model by 1.0 mIoU. These results show the promising transfer ability of our SemMAE for dense prediction visual tasks. ",
816
+ "bbox": [
817
+ 173,
818
+ 392,
819
+ 826,
820
+ 517
821
+ ],
822
+ "page_idx": 8
823
+ },
824
+ {
825
+ "type": "table",
826
+ "img_path": "images/ae17428bef1ccedc310ea48d48fc7d401304d83d2b4ceb6d65c7e8d792dbeb52.jpg",
827
+ "table_caption": [
828
+ "Table 7: Semantic segmentation results on ADE-20K. "
829
+ ],
830
+ "table_footnote": [],
831
+ "table_body": "<table><tr><td>Method</td><td>mIoU</td></tr><tr><td>Supervised Pre-Training</td><td>45.3</td></tr><tr><td>Self-Supervised Pre-Training</td><td></td></tr><tr><td>BeiT</td><td>45.8</td></tr><tr><td>MAE(800 epochs)</td><td>46.1</td></tr><tr><td>SemMAE (Ours)</td><td>46.3</td></tr></table>",
832
+ "bbox": [
833
+ 341,
834
+ 556,
835
+ 653,
836
+ 661
837
+ ],
838
+ "page_idx": 8
839
+ },
840
+ {
841
+ "type": "text",
842
+ "text": "5 Conclusion ",
843
+ "text_level": 1,
844
+ "bbox": [
845
+ 173,
846
+ 691,
847
+ 299,
848
+ 708
849
+ ],
850
+ "page_idx": 8
851
+ },
852
+ {
853
+ "type": "text",
854
+ "text": "In this paper, we study the visual analogue of words and propose a semantic-guided masked autoencoder model to reduce the gap between masked language modeling and masked image modeling. Our proposed self-supervised semantic part learning method can generate promising semantic parts on ImageNet and we show that the learned semantic parts can facilitate the learning of MAE. Unlike the main-stream random masking strategy, our semantic-guided mask strategy can effectively integrate semantic information in the pre-training process. Extensive experiments with superior results show the effectiveness of our SemMAE. ",
855
+ "bbox": [
856
+ 173,
857
+ 724,
858
+ 825,
859
+ 821
860
+ ],
861
+ "page_idx": 8
862
+ },
863
+ {
864
+ "type": "text",
865
+ "text": "Limitations: due to the lack of part segmentation labels, the semantic part in our work is kind of coarse (e.g., 6 parts per image), making it not an ideal visual analogue of words yet. Moreover, using a small patch size increases the computational cost in the fine-tuning stage. In the future, we will 1) investigate finer-grained semantic parts (e.g., 20-30 parts per image) by few-shot part segmentation and 2) replace the widely obtained patch-based tokenization with part-based tokenization to further reduce the gap between vision and language modeling. ",
866
+ "bbox": [
867
+ 174,
868
+ 827,
869
+ 825,
870
+ 911
871
+ ],
872
+ "page_idx": 8
873
+ },
874
+ {
875
+ "type": "text",
876
+ "text": "References ",
877
+ "text_level": 1,
878
+ "bbox": [
879
+ 174,
880
+ 90,
881
+ 267,
882
+ 106
883
+ ],
884
+ "page_idx": 9
885
+ },
886
+ {
887
+ "type": "text",
888
+ "text": "[1] Atito, S., Awais, M., Farooq, A., Feng, Z., Kittler, J.: Mc-ssl0. 0: Towards multi-concept self-supervised learning. arXiv preprint arXiv:2111.15340 (2021) \n[2] Atito, S., Awais, M., Kittler, J.: Sit: Self-supervised vision transformer. arXiv preprint arXiv:2104.03602 (2021) \n[3] Bao, H., Dong, L., Piao, S., Wei, F.: BEit: BERT pre-training of image transformers. In: ICLR (2022) \n[4] Baranchuk, D., Rubachev, I., Voynov, A., Khrulkov, V., Babenko, A.: Label-efficient semantic segmentation with diffusion models. In: ICLR (2022) \n[5] Brown, T., Mann, B., Ryder, N., Subbiah, M., Kaplan, J.D., Dhariwal, P., Neelakantan, A., Shyam, P., Sastry, G., Askell, A., et al.: Language models are few-shot learners. NeurIPS 33, 1877–1901 (2020) \n[6] Caron, M., Touvron, H., Misra, I., Jégou, H., Mairal, J., Bojanowski, P., Joulin, A.: Emerging properties in self-supervised vision transformers. In: ICCV. pp. 9650–9660 (2021) \n[7] Chen, M., Radford, A., Child, R., Wu, J., Jun, H., Luan, D., Sutskever, I.: Generative pretraining from pixels. In: ICML. pp. 1691–1703 (2020) \n[8] Chen, X., Mottaghi, R., Liu, X., Fidler, S., Urtasun, R., Yuille, A.L.: Detect what you can: Detecting and representing objects using holistic models and body parts. In: CVPR. pp. 1979– 1986 (2014) \n[9] Chen, X., Xie, S., He, K.: An empirical study of training self-supervised vision transformers. In: ICCV. pp. 9640–9649 (2021) \n[10] Choudhury, S., Laina, I., Rupprecht, C., Vedaldi, A.: Unsupervised part discovery from contrastive reconstruction. NeurIPS 34 (2021) \n[11] Deng, J., Dong, W., Socher, R., Li, L.J., Li, K., Fei-Fei, L.: Imagenet: A large-scale hierarchical image database. In: CVPR. pp. 248–255 (2009) \n[12] Devlin, J., Chang, M.W., Lee, K., Toutanova, K.: Bert: Pre-training of deep bidirectional transformers for language understanding. arXiv preprint arXiv:1810.04805 (2018) \n[13] Dong, X., Bao, J., Zhang, T., Chen, D., Zhang, W., Yuan, L., Chen, D., Wen, F., Yu, N.: Peco: Perceptual codebook for bert pre-training of vision transformers. arXiv preprint arXiv:2111.12710 (2021) \n[14] Dosovitskiy, A., Beyer, L., Kolesnikov, A., Weissenborn, D., Zhai, X., Unterthiner, T., Dehghani, M., Minderer, M., Heigold, G., Gelly, S., Uszkoreit, J., Houlsby, N.: An image is worth 16x16 words: Transformers for image recognition at scale. In: ICLR (2021) \n[15] Felzenszwalb, P.F., Girshick, R.B., McAllester, D., Ramanan, D.: Object detection with discriminatively trained part-based models. TPAMI 32(9), 1627–1645 (2009) \n[16] Fischler, M.A., Elschlager, R.A.: The representation and matching of pictorial structures. TC 100(1), 67–92 (1973) \n[17] Goyal, P., Dollár, P., Girshick, R., Noordhuis, P., Wesolowski, L., Kyrola, A., Tulloch, A., Jia, Y., He, K.: Accurate, large minibatch sgd: Training imagenet in 1 hour. arXiv preprint arXiv:1706.02677 (2017) \n[18] He, J., Yang, S., Yang, S., Kortylewski, A., Yuan, X., Chen, J.N., Liu, S., Yang, C., Yuille, A.: Partimagenet: A large, high-quality dataset of parts. arXiv preprint arXiv:2112.00933 (2021) \n[19] He, K., Chen, X., Xie, S., Li, Y., Dollár, P., Girshick, R.: Masked autoencoders are scalable vision learners. arXiv preprint arXiv:2111.06377 (2021) \n[20] Hinton, G.: How to represent part-whole hierarchies in a neural network. arXiv preprint arXiv:2102.12627 (2021) \n[21] Kakogeorgiou, I., Gidaris, S., Psomas, B., Avrithis, Y., Bursuc, A., Karantzalos, K., Komodakis, N.: What to hide from your students: Attention-guided masked image modeling. arXiv preprint arXiv:2203.12719 (2022) \n[22] Krause, J., Jin, H., Yang, J., Fei-Fei, L.: Fine-grained recognition without part annotations. In: CVPR. pp. 5546–5555 (2015) \n[23] Krause, J., Stark, M., Deng, J., Fei-Fei, L.: 3d object representations for fine-grained categorization. In: Proceedings of the IEEE international conference on computer vision workshops. pp. 554–561 (2013) \n[24] Li, X., Ge, Y., Yi, K., Hu, Z., Shan, Y., Duan, L.Y.: mc-beit: Multi-choice discretization for image bert pre-training. arXiv preprint arXiv:2203.15371 (2022) \n[25] Li, Z., Chen, Z., Yang, F., Li, W., Zhu, Y., Zhao, C., Deng, R., Wu, L., Zhao, R., Tang, M., et al.: Mst: Masked self-supervised transformer for visual representation. NeurIPS 34 (2021) \n[26] Loshchilov, I., Hutter, F.: Sgdr: Stochastic gradient descent with warm restarts. arXiv preprint arXiv:1608.03983 (2016) \n[27] Loshchilov, I., Hutter, F.: Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101 (2017) \n[28] Pathak, D., Krahenbuhl, P., Donahue, J., Darrell, T., Efros, A.A.: Context encoders: Feature learning by inpainting. In: CVPR. pp. 2536–2544 (2016) \n[29] Saha, O., Cheng, Z., Maji, S.: Ganorcon: Are generative models useful for few-shot segmentation? arXiv preprint arXiv:2112.00854 (2021) \n[30] Shi, Y., Siddharth, N., Torr, P.H., Kosiorek, A.R.: Adversarial masking for self-supervised learning. arXiv preprint arXiv:2201.13100 (2022) \n[31] Touvron, H., Cord, M., Douze, M., Massa, F., Sablayrolles, A., Jégou, H.: Training data-efficient image transformers & distillation through attention. In: ICML. pp. 10347–10357 (2021) \n[32] Van Den Oord, A., Vinyals, O., et al.: Neural discrete representation learning. NeurIPS 30 (2017) \n[33] Van Horn, G., Mac Aodha, O., Song, Y., Cui, Y., Sun, C., Shepard, A., Adam, H., Perona, P., Belongie, S.: The inaturalist species classification and detection dataset. In: Proceedings of the IEEE conference on computer vision and pattern recognition. pp. 8769–8778 (2018) \n[34] Wah, C., Branson, S., Welinder, P., Perona, P., Belongie, S.: The caltech-ucsd birds-200-2011 dataset (2011) \n[35] Wei, C., Fan, H., Xie, S., Wu, C.Y., Yuille, A., Feichtenhofer, C.: Masked feature prediction for self-supervised visual pre-training. arXiv preprint arXiv:2112.09133 (2021) \n[36] Xiao, T., Liu, Y., Zhou, B., Jiang, Y., Sun, J.: Unified perceptual parsing for scene understanding. In: ECCV. pp. 418–434 (2018) \n[37] Xie, Z., Zhang, Z., Cao, Y., Lin, Y., Bao, J., Yao, Z., Dai, Q., Hu, H.: Simmim: A simple framework for masked image modeling. arXiv preprint arXiv:2111.09886 (2021) \n[38] Zhang, Y., Ling, H., Gao, J., Yin, K., Lafleche, J.F., Barriuso, A., Torralba, A., Fidler, S.: Datasetgan: Efficient labeled data factory with minimal human effort. In: CVPR. pp. 10145– 10155 (2021) \n[39] Zheng, H., Fu, J., Mei, T., Luo, J.: Learning multi-attention convolutional neural network for fine-grained image recognition. In: CVPR. pp. 5209–5217 (2017) \n[40] Zheng, H., Fu, J., Zha, Z.J., Luo, J.: Learning deep bilinear transformation for fine-grained image representation. NeurIPS 32 (2019) \n[41] Zhou, B., Zhao, H., Puig, X., Fidler, S., Barriuso, A., Torralba, A.: Scene parsing through ade20k dataset. In: CVPR. pp. 633–641 (2017) \n[42] Zhou, J., Wei, C., Wang, H., Shen, W., Xie, C., Yuille, A., Kong, T.: ibot: Image bert pre-training with online tokenizer. arXiv preprint arXiv:2111.07832 (2021) ",
889
+ "bbox": [
890
+ 173,
891
+ 116,
892
+ 828,
893
+ 912
894
+ ],
895
+ "page_idx": 9
896
+ },
897
+ {
898
+ "type": "text",
899
+ "text": "",
900
+ "bbox": [
901
+ 171,
902
+ 55,
903
+ 828,
904
+ 916
905
+ ],
906
+ "page_idx": 10
907
+ },
908
+ {
909
+ "type": "text",
910
+ "text": "",
911
+ "bbox": [
912
+ 169,
913
+ 90,
914
+ 826,
915
+ 160
916
+ ],
917
+ "page_idx": 11
918
+ },
919
+ {
920
+ "type": "text",
921
+ "text": "Checklist ",
922
+ "text_level": 1,
923
+ "bbox": [
924
+ 174,
925
+ 185,
926
+ 254,
927
+ 202
928
+ ],
929
+ "page_idx": 11
930
+ },
931
+ {
932
+ "type": "text",
933
+ "text": "The checklist follows the references. Please read the checklist guidelines carefully for information on how to answer these questions. For each question, change the default [TODO] to [Yes] , [No] , or [N/A] . You are strongly encouraged to include a justification to your answer, either by referencing the appropriate section of your paper or providing a brief inline description. For example: ",
934
+ "bbox": [
935
+ 176,
936
+ 217,
937
+ 825,
938
+ 273
939
+ ],
940
+ "page_idx": 11
941
+ },
942
+ {
943
+ "type": "text",
944
+ "text": "• Did you include the license to the code and datasets? [Yes] See Section ??. \n• Did you include the license to the code and datasets? [No] The code and the data are proprietary. \n• Did you include the license to the code and datasets? [N/A] ",
945
+ "bbox": [
946
+ 217,
947
+ 285,
948
+ 825,
949
+ 353
950
+ ],
951
+ "page_idx": 11
952
+ },
953
+ {
954
+ "type": "text",
955
+ "text": "Please do not modify the questions and only use the provided macros for your answers. Note that the Checklist section does not count towards the page limit. In your paper, please delete this instructions block and only keep the Checklist section heading above along with the questions/answers below. ",
956
+ "bbox": [
957
+ 174,
958
+ 364,
959
+ 825,
960
+ 406
961
+ ],
962
+ "page_idx": 11
963
+ },
964
+ {
965
+ "type": "text",
966
+ "text": "1. For all authors... ",
967
+ "bbox": [
968
+ 214,
969
+ 420,
970
+ 339,
971
+ 433
972
+ ],
973
+ "page_idx": 11
974
+ },
975
+ {
976
+ "type": "text",
977
+ "text": "(a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes] \n(b) Did you describe the limitations of your work? [Yes] See Section 5 \n(c) Did you discuss any potential negative societal impacts of your work? [N/A] \n(d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes] ",
978
+ "bbox": [
979
+ 238,
980
+ 439,
981
+ 825,
982
+ 531
983
+ ],
984
+ "page_idx": 11
985
+ },
986
+ {
987
+ "type": "text",
988
+ "text": "2. If you are including theoretical results... ",
989
+ "bbox": [
990
+ 214,
991
+ 536,
992
+ 493,
993
+ 551
994
+ ],
995
+ "page_idx": 11
996
+ },
997
+ {
998
+ "type": "text",
999
+ "text": "(a) Did you state the full set of assumptions of all theoretical results? [N/A] No theoretical results. (b) Did you include complete proofs of all theoretical results? [N/A] No theoretical results. ",
1000
+ "bbox": [
1001
+ 238,
1002
+ 555,
1003
+ 825,
1004
+ 602
1005
+ ],
1006
+ "page_idx": 11
1007
+ },
1008
+ {
1009
+ "type": "text",
1010
+ "text": "3. If you ran experiments... ",
1011
+ "bbox": [
1012
+ 214,
1013
+ 606,
1014
+ 393,
1015
+ 621
1016
+ ],
1017
+ "page_idx": 11
1018
+ },
1019
+ {
1020
+ "type": "text",
1021
+ "text": "(a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [Yes] In the supplemental material \n(b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes] See Section 4 Experiment Setup. \n(c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] \n(d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)? [Yes] See Section 4 Experiment Setup. ",
1022
+ "bbox": [
1023
+ 238,
1024
+ 625,
1025
+ 825,
1026
+ 758
1027
+ ],
1028
+ "page_idx": 11
1029
+ },
1030
+ {
1031
+ "type": "text",
1032
+ "text": "4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... ",
1033
+ "bbox": [
1034
+ 217,
1035
+ 763,
1036
+ 823,
1037
+ 779
1038
+ ],
1039
+ "page_idx": 11
1040
+ },
1041
+ {
1042
+ "type": "text",
1043
+ "text": "(a) If your work uses existing assets, did you cite the creators? [Yes] \n(b) Did you mention the license of the assets? [Yes] In our code. \n(c) Did you include any new assets either in the supplemental material or as a URL? [Yes] \n(d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [Yes] \n(e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [Yes] ",
1044
+ "bbox": [
1045
+ 238,
1046
+ 784,
1047
+ 823,
1048
+ 892
1049
+ ],
1050
+ "page_idx": 11
1051
+ },
1052
+ {
1053
+ "type": "text",
1054
+ "text": "5. If you used crowdsourcing or conducted research with human subjects... ",
1055
+ "bbox": [
1056
+ 212,
1057
+ 897,
1058
+ 705,
1059
+ 911
1060
+ ],
1061
+ "page_idx": 11
1062
+ },
1063
+ {
1064
+ "type": "text",
1065
+ "text": "(a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] \n(b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] \n(c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] ",
1066
+ "bbox": [
1067
+ 238,
1068
+ 90,
1069
+ 826,
1070
+ 180
1071
+ ],
1072
+ "page_idx": 12
1073
+ }
1074
+ ]
parse/dev/ZQV5iRPAua/ZQV5iRPAua.md ADDED
@@ -0,0 +1,516 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Evaluating Verifiability in Generative Search Engines
2
+
3
+ Nelson F. Liu∗
4
+
5
+ Tianyi Zhang Percy Liang
6
+
7
+ Computer Science Department Stanford University nfliu@cs.stanford.edu
8
+
9
+ # Abstract
10
+
11
+ Generative search engines directly generate responses to user queries, along with in-line citations. A prerequisite trait of a trustworthy generative search engine is verifiability, i.e., systems should cite comprehensively (high citation recall; all statements are fully supported by citations) and accurately (high citation precision; every cite supports its associated statement). We conduct human evaluation to audit four popular generative search engines—Bing Chat, NeevaAI, perplexity.ai, and YouChat— across a diverse set of queries from a variety of sources (e.g., historical Google user queries, dynamically-collected open-ended questions on Reddit, etc.). We find that responses from existing generative search engines are fluent and appear informative, but frequently contain unsupported statements and inaccurate citations: on average, a mere $5 1 . 5 \%$ of generated sentences are fully supported by citations and only $7 4 . 5 \%$ of citations support their associated sentence. We believe that these results are concerningly low for systems that may serve as a primary tool for information-seeking users, especially given their facade of trustworthiness. We hope that our results further motivate the development of trustworthy generative search engines and help researchers and users better understand the shortcomings of existing commercial systems.
12
+
13
+ # 1 Introduction
14
+
15
+ Generative search engines fulfill user information needs by directly generating responses to input queries, along with in-line citations (Figure 1).1 Existing generative search engines are rapidly gaining users—in March 2023, Microsoft reported that “roughly one third of daily preview users are using [Bing] Chat daily”, and that Bing Chat served 45 million chats in the first month of its public preview (Mehdi, 2023). Generative search engines have the potential to transform how people find information online, but generated responses from existing large language model-backed generative search engines may not always be accurate (Maynez et al., 2020). Given their potential and rapid mainstream adoption, it is critical to evaluate these systems to better understand their potential limitations (akin to prior work in algorithmic auditing; Metaxas and Pruksachatkun, 2017; Buolamwini and Gebru, 2018; Kiritchenko and Mohammad, 2018; Robertson et al., 2018; Metaxa et al., 2019; Green and Chen, 2019; Birhane et al., 2022, inter alia).
16
+
17
+ ![](images/6d81eeb2292f474af13ec9b69eb09a99c1ae4855fdd5e4ee0ed9789d67f1d030.jpg)
18
+ Figure 1: Generative search engines answer user queries by generating a tailored response, along with in-line citations. However, not all generated statements are fully supported by citations (citation recall), and not every citation supports its associated statement (citation precision).
19
+
20
+ A prerequisite trait of a trustworthy generative search engine is verifiability,2 that is, each generated statement about the external world should be fully supported by a set of in-line citations, and each provided citation should support its associated statement. Verifiability enables readers to easily check that any generated statement is supported by its cited source.
21
+
22
+ We conduct a human evaluation to audit four popular commercial generative search engines (Bing Chat, NeevaAI, perplexity.ai, and YouChat) across a diverse set of information-seeking queries (e.g., various types of historical Google user queries from NaturalQuestions (Kwiatkowski et al., 2019), dynamically-collected open-ended questions from Reddit; see Appendix A for examples).
23
+
24
+ For each query-response pair, we use human evaluation to measure a variety of dimensions:
25
+
26
+ 1. fluency (whether the generated text is fluent and cohesive; $\ S 2 . 2 )$ ;
27
+ 2. perceived utility (whether the generated answer is helpful and informative; $\ S 2 . 2 )$ ;
28
+ 3. citation recall (the proportion of generated statements about the external world that are fully supported by their citations; $\ S 2 . 3 )$ ; and
29
+ 4. citation precision (the proportion of generated citations that support their associated statements; $\ S 2 . 4 )$ .
30
+
31
+ A trustworthy generative search engine should achieve high citation recall and precision, indicating that its generated citations are comprehensive (every generated statement is fully supported by citation) and correct (every citation supports its associated statement).
32
+
33
+ We find that existing generative search engine responses often have high fluency and perceived utility (§4.1), but frequently contain unsupported statements or inaccurate citations (low citation recall and precision; $\ S 4 . 2 )$ . On average, merely $5 1 . 5 \%$ of generated sentences are fully supported with citations (citation recall), and only $7 4 . 5 \%$ of citations support their associated sentence (citation precision). Furthermore, citation precision is inversely correlated with perceived utility $( r = - 0 . 9 6 )$ ; the responses that seem more helpful are often those with inaccurate citations (§4.3). This facade of trustworthiness increases the potential for existing generative search engines to mislead users. For example, in Figure 1, a user with little background knowledge about the James Webb Space Telescope (motivating a query about its recent discoveries) will likely struggle to identify unsupported statements in the generated response. We hypothesize that citation precision is inversely correlated with perceived utility because generative search engines often copy or closely paraphrase from their cited webpages (§4.4). This improves citation precision because copied text is often supported by the cited webpage, but decreases perceived utility when copied statements are irrelevant to the query or the rest of the generated response.
34
+
35
+ We make the following contributions: first, we define the citation recall and citation precision evaluation metrics, which aim to encourage the development of systems that cite comprehensively and correctly. Second, we conduct a human evaluation of four popular generative search engines, finding that responses are broadly fluent and appear useful, but frequently contain unsupported statements and inaccurate citations, increasing their potential to mislead users. Third, we observe that perceived utility is inversely correlated with citation precision in existing generative search engines, and hypothesize that this inverse correlation occurs when some systems copy or closely paraphrase from cited webpages. To facilitate further work on developing trustworthy generative search engines, we have released our human evaluation annotations.3
36
+
37
+ # 2 Human Evaluation of Fluency, Perceived Utility, and Verifiability
38
+
39
+ In this section, we formalize the inputs and outputs of the generative search engines we study, describe the evaluation of fluency and perceived utility, and define and describe the evaluation of citation recall and precision. Citation recall and precision are designed to reward systems that cite comprehensively (i.e., high recall; all statements are fully supported by citations) and accurately (i.e., high precision; every cite supports its associated statement). We also define citation $F _ { 1 }$ , a metric that combines citation precision and citation recall.
40
+
41
+ # 2.1 Task Formulation
42
+
43
+ Given a user query $q$ as input, a generative search engine produces a text response $r$ , which is a string with embedded in-line citations. For the example in Figure 1, the query $q$ is “What are the latest discoveries from the James Webb Space Telescope?” and the response $r$ is the string paragraph “The James Webb Space Telescope ... used to study the next interstellar interloper [3].”, with embedded citations “[1]”, “[2]”, and “[3]”.
44
+
45
+ To evaluate citation precision and recall, we first segment the $r$ into a set of $n$ statements $\boldsymbol { S } = \{ \boldsymbol { s } _ { 1 } , \ldots , \boldsymbol { s } _ { n } \}$ . In this work, the segmentation $s$ is set of sentences in the response $r$ . For each statement $s _ { i } \in S$ , we construct a (possibly empty) set $\mathcal { C } _ { i } = \{ c _ { i , 1 } , \ldots , c _ { i , k } \}$ of $k$ citations associated with the statement $s _ { i }$ , where $c _ { i , j }$ is the $j$ th citation associated with the ith response statement. For each citation $c _ { i , j }$ , we have a URL $u _ { i , j }$ and its contents $p _ { i , j }$ . In this work, $\mathcal { C } _ { i }$ is set of citations that occur in $s _ { i }$ (e.g., for $s _ { i } =$ “Blueberries[1], cherries[2], and grapes[3] grow on trees.[4]”, $\mathcal { C } _ { i } =$ {[1], [2], [3], [4]}).
46
+
47
+ In practice, a sentence may contain multiple independently-verifiable claims (e.g., conjuncts such as “Cups can be made of glass[1] or plastic[2].”), and a single in-line citation’s scope is often ambiguous (e.g., a cite marker after two statements could be interpreted as either supporting both statements, or merely the final one); we leave finer-grained evaluation to future work.
48
+
49
+ # 2.2 Measuring Fluency and Perceived Utility
50
+
51
+ To measure response fluency, annotators were shown the user query, the generated response, and the claim “The response is fluent and cohesive”. We ask annotators to rate their level of agreement with the claim on a five-point Likert scale from Strongly Disagree to Strongly Agree. We use a similar process to measure perceived utility, asking annotators to rate their level of agreement with the claim “The response is a helpful and informative answer to the query”.
52
+
53
+ # 2.3 Measuring Citation Recall
54
+
55
+ Citation recall is the proportion of verificationworthy statements that are fully supported by their associated citations (see Figure 2 for several examples). Thus, computing citation recall requires (i) identifying the verification-worthy statements in a response and (ii) evaluating whether each verification-worthy statement is fully supported by its associated citations.
56
+
57
+ Identifying verification-worthy statements. Given the statements $s$ in a response $r$ , we first ask annotators to remove statements in the response that are not verification-worthy. We take the position that every generated statement about the external world is verification-worthy, even those that might seem obvious, trivially true, or “common sense”. Generated statements may be incorrect, and statements that seem obvious to some readers may be less than obvious to others (e.g., “The Pope is Catholic”). We believe that systems should aim to provide a source for all generated statements about the external world, enabling readers to easily verify any statement in a generated response.
58
+
59
+ ![](images/c1a86c554e40275f874ccfa912e8eda1c680ad304125656396cfdd2dd82cf442.jpg)
60
+ Figure 2: Examples of calculating citation recall and precision. Citation recall measures the proportion of generated statements that are supported by citations. Citation precision measures the proportion of citations that support their associated statements. Partially-supporting citations only improve citation precision when their associated statement is supported by the union of its citations and no other associated citation fully supports the statement by itself (middle example).
61
+
62
+ In practice, almost all system-generated statements are verification-worthy—notable exceptions include statements about the speaker (the system) itself (e.g., “As a language model, I do not have the ability to ban books.”) and questions posed to the user (e.g.,“Would you like to learn more?”, generated by systems like Bing Chat and YouChat that are deployed in conversational settings).
63
+
64
+ Evaluating whether a verification-worthy statement is fully supported by its associated citations. Given the verification-worthy statements in a response $r$ , annotators evaluate whether each statement is fully supported by its associated citations (see the sentences of generated response in Figure 1 for examples). To collect these binary judgments, we use the attributable to identified sources (AIS) evaluation framework of Rashkin et al. (2022). In particular, a statement $s _ { i }$ is fully supported by its associated citations $\mathcal { C } _ { i }$ if a generic hearer would affirm the statement “According to cited webpages $\mathcal { C } _ { i } , \mathcal { s } _ { i } ^ { \flat }$ , within the context of the query $q$ and response $r$ , and unsupported otherwise.
65
+
66
+ # 2.4 Measuring Citation Precision
67
+
68
+ Citation precision is the proportion of generated citations that support their associated statements (Figure 2). In contrast to citation recall, citation precision rewards systems for citing accurately—a response that cites every webpage on the Internet for each generated statement would have high citation recall, but low citation precision (since many articles are irrelevant and do not support their associated statement). To measure citation precision for a response $r$ , we first ask annotators to judge whether each citation $c _ { i , k }$ contributes full, partial, or no support for its associated statement $s _ { i }$ (see cited webpages in Figure 1 for examples):
69
+
70
+ • Full support: all of the information in the statement is supported by the citation. • Partial support: some of the information in the statement is supported by the citation, but other parts are not supported (e.g., missing or contradictory). • No support: the citation does not support any part of the statement (e.g., the cited webpage is completely irrelevant or contradictory).
71
+
72
+ For statements that have multiple associated citations, we additionally ask annotators whether the union of its associated cited webpages collectively provides full support for the statement (a binary judgment). Similar to citation recall, we use the AIS evaluation framework of Rashkin et al. (2022) to collect these binary judgments.
73
+
74
+ To calculate citation precision, let $T _ { f s }$ be the number of citations that fully support its associated statement, and let $T _ { p s }$ be the number of citations that partially supports its associated statement, where the associated statement is fully supported by the union of its associated citations and no associated citation fully supports the statement by itself.4 Let $N$ be the total number of citations in the response. Then, the citation precision is $( T _ { f s } + T _ { p s } ) / N$ .
75
+
76
+ # 2.5 Citation $F _ { 1 }$
77
+
78
+ Citation $F _ { 1 }$ is a metric that combines citation precision and citation recall by taking their harmonic mean:
79
+
80
+ $$
81
+ F _ { 1 } = 2 \cdot { \frac { \mathrm { c i t a t i o n } \ \mathrm { p r e c i s i o n } \cdot \mathrm { c i t a t i o n } \ \mathrm { r e c a l l } } { \mathrm { c i t a t i o n } \ \mathrm { p r e c i s i o n } + \mathrm { c i t a t i o n } \ \mathrm { r e c a l l } } }
82
+ $$
83
+
84
+ To achieve a high citation $F _ { 1 }$ , systems must have high citation precision and high citation recall.
85
+
86
+ # 3 Evaluation Setup
87
+
88
+ In this section, we describe the evaluated generative search engines (§3.1), the diverse query distributions we use for evaluation (§3.2), and the details of our human evaluation protocol (§3.3).
89
+
90
+ # 3.1 Evaluated Generative Search Engines
91
+
92
+ We evaluate four existing commercial generative search engines: Bing Chat, NeevaAI, perplexity.ai, and YouChat. 5 These systems pattern after prior work (e.g., Nakano et al., 2021; Menick et al., 2022; Glaese et al., 2022; Thoppilan et al., 2022, inter alia) and generate responses by conditioning large language models on the input query and retrieved content (e.g., search results from a conventional search engine). For each input, we save the system’s first complete response (i.e., single-turn). Responses were scraped between late February and late March 2023.
93
+
94
+ Note that evaluated generative search engines have differing abstention rates (Table 1), which can make direct comparison difficult—one might expect that systems with higher abstention rates might also have higher evaluation performance, since they can simply abstain from generating responses to difficult queries (we do not find this to be the case in practice). NeevaAI abstains from responding on nearly $23 \%$ of evaluated queries, since its response is displayed within a conventional search engine results page. In contrast, Bing Chat, perplexity.ai, and YouChat respond to almost every user query.
95
+
96
+ Table 1: Generative search engines may be designed for deployment in different contexts. NeevaAI abstains from responding to $2 2 . 7 \%$ of our 1450 queries, since its response is designed for display within a conventional search results page. In contrast, the conversational interface of Bing Chat, and YouChat means that systems must generate a response for nearly every input user query (excepting, e.g., query character length limits).
97
+
98
+ <table><tr><td></td><td>Abstention Rate (↓)</td></tr><tr><td>Bing Chat</td><td>&lt;0.5%</td></tr><tr><td>NeevaAI</td><td>22.7%</td></tr><tr><td>perplexity.ai</td><td>&lt;0.5%</td></tr><tr><td>YouChat</td><td>&lt;0.5%</td></tr></table>
99
+
100
+ # 3.2 Evaluated Query Distributions
101
+
102
+ To gain a broader understanding of the strengths and weaknesses of existing commercial generative search engines, we evaluate on a diverse set of queries from a variety of sources (e.g., Google user queries, open-ended Reddit questions, how-to queries) requiring knowledge from several different answer types (e.g., short textual spans, long-form paragraph, lists, or tables). See Appendix A for example queries from each distribution. Each system is evaluated on 1450 queries—150 randomlysampled queries from each of AllSouls, davincidebate, ELI5 (KILT / Live), and WikiHowKeywords, and 100 randomly-sampled queries for each of the seven NaturalQuestions subdistributions.
103
+
104
+ AllSouls. We evaluate systems on open-ended essay questions taken from the entrance exam (general paper component) for All Souls College, Oxford University. These questions cover topics including the arts, science, politics, literature, current events, and issues in education and sport.
105
+
106
+ davinci-debate. We evaluate systems on debate topics generated from text-davinci-003. To generate debate queries, we follow the procedure of Bakker et al. (2022); see Appendix B.1 for details.
107
+
108
+ ELI5. We take queries from the “Explain Like I’m Five” (ELI5) subreddit, where users provide long-form layperson-accessible answers to submitted questions. Submitted questions are required to admit objective explanations, and answering them often requires long-form textual responses.
109
+
110
+ We consider two subdistributions of ELI5
111
+ queries: ELI5 (KILT) and ELI5 (Live). ELI5
112
+
113
+ (KILT) uses historical queries from the KILT ELI5 dataset (Fan et al., 2019; Petroni et al., 2021), drawn from posts created before July 2018. A retrieval-based system could hypothetically perform well on ELI5 (KILT) by simply identifying the query’s source Reddit ELI5 post and copying its content. As a result, we also evaluate generative search engines on the ELI5 (Live) subdistribution, which increases ecological validity by evaluating systems on real user queries at their time of creation and reducing the incidence of search results with the query’s exact keywords. 6 We continuously listen to the stream of new Reddit ELI5 posts and immediately query generative search engines for responses whenever a new post is created. This ensures that the source ELI5 post will not have been indexed (and thus, cannot be retrieved) by conventional search engines. minimizing the possibility that the generative search engine has access to the source ELI5 post.
114
+
115
+ WikiHowKeywords. We evaluate systems on queries derived from WikiHow articles. We found that directly querying generative search engines with WikiHow article titles yields responses that largely paraphrase or copy text directly from WikiHow. As a result, we use text-davinci-003 to paraphrase article titles (e.g., “How to Cut An Avocado”) into keyword queries (e.g., “cut avocado”).
116
+
117
+ NaturalQuestions. We evaluate generative search engines on NaturalQuestions (Kwiatkowski et al., 2019) queries, stratified by their answer type. NaturalQuestions contains historical queries issued to the Google search engine coupled with long and short answers extracted from Wikipedia. We evaluate on queries from 7 NaturalQuestions subdistributions: queries with paragraph-type long answers (i) with and (ii) without short answers, queries with list-type long answers (iii) with and (iv) without short answer, queries with table-type long answers (v) with and (vi) without short answers, and finally (vii) queries with no long answer (and thus no short answer either).
118
+
119
+ Summary. In total, we evaluate existing generative search engines on 12 total query distributions. Eight query distributions are taken from prior work (ELI5 (KILT) and the seven NaturalQuestions query distributions), while four query distributions were constructed for this work: AllSouls, davinci-debate, ELI5 (Live), and WikiHowKeywords. These diverse settings provide broad coverage of several potential use cases and information needs, helping us gain a comprehensive understanding of systems’ strengths and weaknesses.
120
+
121
+ # 3.3 Human Evaluation Protocol
122
+
123
+ Annotation process. Evaluating a single queryresponse pair requires human annotators to complete a three-step The first step measures the response’s fluency and perceived utility (§2.2), and the second and third step provide the judgments necessary to measure citation recall (§2.3) and precision (§2.4). See Appendix C for screenshots of the annotation interface and Appendix D for the annotation guidelines.
124
+
125
+ Annotator recruitment and training. Annotation was performed on Amazon Mechanical Turk. Annotators were pre-screened with a qualification study, which required them to read an annotation guidelines document and evaluate five representative query-response pairs. We individually reviewed submitted annotations for qualification study and provided annotators with personalized feedback to help correct any misconceptions or confusion about the task. Annotators who performed well on the qualification study and demonstrated thorough understanding of the task and annotation guidelines were permitted to participate in the main round of human evaluation. We remained in constant contact with annotators throughout the human evaluation process to answer questions about corner-cases and clarify intended behavior. In total, 34 annotators participated in human evaluation.
126
+
127
+ Annotator compensation. Annotators were compensated $\$ 1.00$ per query-response pair for responses with citations, and $\$ 0.38$ per queryresponse pair for responses without citations $\$ 15.00$ per hour, by conservative time estimates). On average, annotators took approximately four minutes to complete all three steps for a single query-response pair for responses that contained at least one citation.
128
+
129
+ Annotation agreement. Each query-response pair is annotated once in the human evaluation process. To measure inter-annotator agreement, we collected three annotations for 250 randomlysampled query-response pairs, finding high agreement rates (greater than $8 2 . 0 \%$ pairwise agreement and $9 1 . 0 \mathrm { F } 1$ for all judgments; see Appendix E).
130
+
131
+ # 4 Results and Analysis
132
+
133
+ This section presents the results of our human evaluation study and discusses our main observations and analyses. We see that fluency and perceived utility are generally high across different generative search engines (§4.1), while citation recall and precision are quite low (§4.2), though performance certainly varies by system and query distribution—the low citation recall and precision, when combined with the facade of trustworthiness from fluency and high perceived utility, increase the potential for existing generative search engines to mislead users. Our results also show that citation precision is inversely correlated with perceived utility in existing generative search engines (§4.3). We hypothesize that this is a byproduct of systems’ propensity to copy or closely paraphrase text from cited webpages, which may increase citation precision and decrease perceived utility (§4.4).
134
+
135
+ # 4.1 Fluency and Perceived Utility
136
+
137
+ See Appendix F for full fluency and perceived utility results for every generative search engine on each of our query distributions.
138
+
139
+ Generated responses are fluent and appear helpful. Averaging across all systems and responses yields an average rating of 4.48 for fluency and 4.50 for perceived utility, indicating that annotators generally found generated responses fluent and helpful for answering the user’s input query.
140
+
141
+ Comparing fluency and perceived utility between generative search engines. Comparing fluency and perceived utility ratings between the generative search engines (aggregated over all responses), we see that Bing Chat receives the lowest fluency / perceived utility ratings $( 4 . 4 0 / 4 . 3 4 )$ , followed by NeevaAI $( 4 . 4 3 / 4 . 4 8 )$ , perplexity.ai (4.51 / 4.56), and YouChat $( 4 . 5 9 / 4 . 6 2 )$ .
142
+
143
+ Comparing fluency across query distributions. Comparing average fluency ratings across different query distributions, we see similar ratings between NaturalQuestions queries that have a long answer (i.e., an extractive answer of some length exists on Wikipedia) and non-NaturalQuestions distributions (4.50 vs. 4.47, respectively). Comparing average fluency ratings between NaturalQuestions subdistributions, we see that generated responses to queries that have a short extractive answer are generally more fluent (4.55) than responses to queries with only a long answer (4.46) or those without a long answer (4.46), perhaps because responses to questions with short answers are generally shorter and often only require factoid knowledge.
144
+
145
+ A notable outlier distribution is NaturalQuestions queries with table-type long answers and no short answers, where system responses are dramatically less fluent (average of 4.36 across systems vs. average of 4.48 across all query distributions). These challenging queries often require aggregating information across table cells or retrieved sources, since the lack of a short answer implies that no single Wikipedia table cell directly answers the question (e.g., the query “how many grammys does beyonce have without destiny’s child”). When the retrieved webpages do not contain a clear extractive answer to the query, but contain facts that seem relevant (e.g., information about Destiny’s Child’s first Grammy, or Beyonce’s total number of career Grammy awards), the generated response is often a stilted agglomeration of statements from various sources, reducing overall fluency.
146
+
147
+ Comparing perceived utility across query distributions. In contrast to fluency, perceived utility can differ substantially between different query distributions. Perceived utility is much higher for NaturalQuestions queries containing a long answer (4.59), as opposed to non-NaturalQuestions queries (4.43). Comparing between different NaturalQuestions subdistributions, we see that perceived utility is highest for queries that have a short answer (4.62), followed by queries that have only a long answer (4.55), and finally by queries that have no long (or short) answer (4.52). Overall, perceived utility decreases as queries require longer-form and lessextractive answers (e.g., factoid NaturalQuestions queries with short answers versus ELI5 queries).
148
+
149
+ # 4.2 Citation Recall and Precision
150
+
151
+ See Appendix G for full citation recall and precision results for every generative search engine on each of our query distributions.
152
+
153
+ Existing generative search engines often do not cite comprehensively or correctly. When averaging across all systems, a mere $5 1 . 5 \%$ of generated statements are fully supported with citations (recall), and only $7 4 . 5 \%$ of citations fully support their associated statements (precision). We believe these results are unacceptably low for systems that are quickly becoming a popular tool for answering user queries and already have millions of users, especially given that generated responses often appear informative and useful.
154
+
155
+ Comparing citation recall and precision between generative search engines. Citation recall and precision varies dramatically between different generative search engines. perplexity.ai achieves the highest average recall (68.7), compared to NeevaAI (67.6), Bing Chat (58.7), and YouChat (11.1). On the other hand, Bing Chat achieves the highest average precision (89.5), followed by perplexity.ai (72.7), NeevaAI (72.0), and YouChat (63.6). A gap of nearly $58 \%$ separates the system with the highest and lowest recall (perplexity.ai vs. YouChat), and the gap between the systems with the highest and lowest precision is almost $2 5 \%$ (Bing Chat vs. YouChat).
156
+
157
+ Comparing citation recall across query distributions. Modifying the evaluation query distribution appears to affect citation recall more than citation precision. For example, the gap in citation recall between NaturalQuestions queries with a long answer and non-NaturalQuestions queries is nearly $11 \%$ (58.5 vs. 47.8, respectively). Similarly, the difference in citation recall between NaturalQuestions queries with and without short answers is nearly $10 \%$ (63.4 for queries with a short answer, 53.6 for queries with only a long answer, and 53.4 for queries with no long or short answer).
158
+
159
+ We hypothesize that citation recall is driven by the relevance of retrieved webpages. In the absence of retrieved evidence that directly answers the input user query, systems generate statements that are unsubstantiated by citations, resulting in lower recall. For example, generative search engines struggle with citation recall when evaluated on the open-ended AllSouls essay questions (average recall of 44.3), because these queries generally have no extractive answer on the Internet.
160
+
161
+ Comparing citation precision across query distributions. Precision on NaturalQuestions queries with long answers is higher than nonNaturalQuestions distributions (76.1 vs. 72.3, respectively). Precision is highest on NaturalQuestions queries with paragraph answer types (precision of 81.5 when a short answer exists and 78.7 when only a long answer exists). On the other hand, citation precision is lowest when systems are evaluated on AllSouls open-ended essay questions (67.8) and davinci-debate queries (70.3). Comparing between NaturalQuestions subdistributions, average system precision is higher on queries with short answers (77.4) than those with only long answers
162
+
163
+ ![](images/24df933ae068ec1268797b13ebf6c11f165840f8f68fe8c130e252b40191da40.jpg)
164
+ Figure 3: Averaged perceived utility plotted against averaged citation $F _ { 1 }$ for each evaluated generative search engine. Different systems make different trade-offs between perceived utility and citation $F _ { 1 }$ . Note that these systems are difficult to directly compare since they may have different abstention rates (Table 1).
165
+
166
+ # (74.8) or no long answer (73.5).
167
+
168
+ Summary. To summarize our human evaluation results, Figure 3 plots average perceived utility against average citation $F _ { 1 }$ . Existing systems make different trade-offs between citation recall, citation precision, and perceived utility. See Appendix H for full citation $F _ { 1 }$ results for every generative search engine on each of our query distributions.
169
+
170
+ # 4.3 Citation Precision is Inversely Related to Perceived Utility
171
+
172
+ We find that citation precision is inversely correlated with perceived utility in existing generative search engines $( r = - 0 . 9 6 )$ . For example, Bing Chat achieves the highest precision, but has the lowest perceived utility. In contrast, YouChat has the lowest citation precision, but its responses attain the highest perceived utility ratings.
173
+
174
+ This inverse relationship between citation precision and perceived utility is symptomatic of a trade-off between faithfulness and abstractiveness (Ladhak et al., 2022). In particular, we find that system-generated statements often closely paraphrase or directly copy from their associated citations (see $\ S 4 . 4$ for further analysis). This results in high citation precision (since extractively copied text is almost always fully supported by the source citation), but lower perceived utility (since the extractive snippets may not actually answer the user’s input query). In contrast, systems that frequently deviate from cited content (resulting in low citation precision) may have greater freedom to generate fluent responses that appear relevant and helpful to the user’s input query.
175
+
176
+ Is cooperation or competition the driving force guiding the evolution of society?
177
+
178
+ # Bing Chat
179
+
180
+ (higher citation precision, lower perceived utility)
181
+
182
+ There are different opinions on this topic. Some researchers believe that cooperation, not struggle for survival, drives evolution [1]. Others think that there are two driving forces of evolution: mutation (change) and competition [2]. What do you think?
183
+
184
+ (\*Some generated statements may not be fully supported by citations, while others are fully supported.)
185
+
186
+ ![](images/fd6ba704c77bb010d278ef4c1a2e08031037be784718da210561fa2469ea7e3c.jpg)
187
+ Figure 4: Citation precision is inversely correlated with perceived utility in existing generative search engines. Bing Chat often achieves high citation precision because it closely paraphrases from cited webpages (bolded). However, since these citations are largely irrelevant to the user’s input query (biological evolution vs. societal evolution), copying this contents results in lower perceived utility.
188
+
189
+ This tradeoff is especially apparent on the AllSouls query distribution, which contains openended essay questions. AllSouls queries often cannot be answered via extraction from a single webpage on the Internet. For example, given the query “Is cooperation or competition the driving force guiding the evolution of society?”, conventional search engine results focus on biological evolution, rather than societal evolution. Bing Chat simply copies irrelevant statements directly from the cited sources, resulting in high citation precision but low perceived utility (Figure 4).
190
+
191
+ # 4.4 Generative Search Engines Closely Paraphrase From Cited Webpages
192
+
193
+ To better understand how generative search engines use citations to support their responses, we analyze the similarity between generated statements and their supporting cited webpages. For citations that provide full or partial support for their associated statement, annotators were asked to provide evidence by copy-pasting the minimal set of sentences from the cited webpage that support their judgment (if any such sentences exist). We compute the BLEU (Papineni et al., 2002) and BERTScore (Zhang et al., 2020) between each generated statement and the annotator-provided evidence from the associated citation. For statements with multiple associated citations, we take the maximum similarity with any associated citation’s evidence.
194
+
195
+ Table 2: Existing generative search engines closely paraphrase from cited articles; generated statements have high similarity with their cited webpages.
196
+
197
+ <table><tr><td>BLEU</td><td>BERTScore (F1)</td></tr><tr><td>Bing Chat</td><td>44.1 78.8 72.9</td></tr><tr><td>NeevaAI</td><td>30.0 22.3</td></tr><tr><td>perplexity.ai</td><td>69.2</td></tr><tr><td>YouChat</td><td>72.0</td></tr><tr><td>Average</td><td>31.3</td></tr></table>
198
+
199
+ Table 2 presents similarity metrics between generated statements and extracted evidence from supporting webpages—when statements are fully or partially supported by their citations, they often copy or closely paraphrase from their cited articles. Furthermore, systems with higher similarity between their generated statements and cited webpages also have higher average citation precision $\mathit { r } = 0 . 8 0$ between each of BLEU and BERTScore with average citation precision), indicating that their improved precision may largely be a byproduct of their increased tendency to copy or paraphrase from cited webpages.
200
+
201
+ # 5 Related Work
202
+
203
+ Existing work has proposed a variety of techniques for building language models that provide references to support generated text. Nakano et al. (2021) use reinforcement learning from human preferences to train language models to answer questions and provide supporting evidence. Similarly, Menick et al. (2022) also use reinforcement learning from human preferences to train language models to answer user questions, but their system generates responses by conditioning on evidence retrieved from a Google search for the given user query. Finally, the LaMDA system of Thoppilan et al. (2022) is trained to provide URLs that support its generated statements. In contrast to the aforementioned line of work on training systems to generate citations, Gao et al. (2022) propose a method for post-editing generated output to reflect and cite retrieved evidence.
204
+
205
+ Existing work has also proposed evaluation protocols and benchmarks for improving verifiability in language generation systems. Rashkin et al.
206
+
207
+ (2022) propose the attributed to identified sources (AIS) evaluation framework to assess whether a particular statement is supported by provided evidence and validate their guidelines on conversational question answering, summarization, and table-totext systems. Bohnet et al. (2023) introduce the task of attributed question answering, where systems are given an input question and must output an answer string with a pointer to evidence text supporting the answer, and propose a reproducible evaluation setup with NaturalQuestions queries (only paragraph answer type containing long and short answers) with Wikipedia as the evidence corpus.
208
+
209
+ In contemporaneous work, Peskoff and Stewart (2023) have domain experts evaluate ChatGPT and YouChat responses to 100 expert-written questions. They find that generated responses are coherent and concise, but frequently undersourced and inaccurate; our results also show that YouChat responses frequently lack citations for generated statements (i.e., low citation recall).
210
+
211
+ # 6 Conclusion
212
+
213
+ In this work, we used human evaluation to audit the verifiability of four popular commercial generative search engines—Bing Chat, NeevaAI, perplexity.ai, and YouChat. We find that responses from existing generative search engines are generally fluent and often appear informative, but frequently contain unsupported statements and inaccurate citations (low citation recall and precision)—a mere $5 1 . 5 \%$ of generated statements are fully supported by citations (recall), and only $7 4 . 5 \%$ of citations support their associated statements (precision). We believe that existing systems’ citation recall and precision are unacceptably low, given that they are quickly becoming a popular tool for answering user queries and already have millions of users. Moreover, we find that citation precision is inversely correlated with perceived utility in existing generative search engines—the responses that seem more helpful are often those with more unsupported statements or inaccurate citations. Analysis suggests that this inverse correlation occurs in existing systems because of their propensity to copy or closely paraphrase from cited webpages, which inflates citation precision at the cost of lower perceived utility. We hope our results and insights further motivate the development of trustworthy generative search engines and help researchers and users better understand their current shortcomings.
214
+
215
+ # Acknowledgements
216
+
217
+ We are grateful to the 34 annotators who participated in our human evaluation study—this work would not have been possible without them. We also thank Rishi Bommasani, Ge Gao, Natasha Klein-Atlas, Vivian Lai, Kevin Lin, John Thickstun, Eric Wallace, and Gerben Wierda for feedback and discussions that helped improve this work. We thank Amazon Web Services for providing Amazon Mechanical Turk credits that helped support this work. This work was supported in part by the AI2050 program at Schmidt Futures (Grant G-22- 63429).
218
+
219
+ # Limitations
220
+
221
+ The primary goal of this work was to assess verifiability in generative search engine responses. However, note that verifiability is not factuality—rather than arbitrating if a generated statement is true (difficult for all but the simplest claims; Rashkin et al., 2022), verifiability enables users to easily check any generated statement’s source, allowing them to draw their own conclusions about whether to trust the generated statement. Studying the factuality of generative search engines (that may or may not provide citations) is an important direction for future work—users may not necessarily bother to check the sources, especially given that responses often seem helpful and sound confident, and we’d thus like responses to be as factual as possible.
222
+
223
+ In our evaluation of verifiability, we consider sentence-level claims. However, sentences often have multiple claims (e.g., “Cats[1] and dogs[2] are common pets.”). However, there is currently no clear linguistic definition on what constitutes a claim. As a result, we use sentences for simplicity and reproducibility. Proposing a concrete definition of a “claim” and performing a finer-grained evaluation is an interesting direction for future work.
224
+
225
+ # References
226
+
227
+ Michiel Bakker, Martin Chadwick, Hannah Sheahan, Michael Tessler, Lucy Campbell-Gillingham, Jan Balaguer, Nat McAleese, Amelia Glaese, John Aslanides, Matt Botvinick, and Christopher Summerfield. 2022. Fine-tuning language models to find agreement among humans with diverse preferences. In Proc. of NeurIPS.
228
+
229
+ Abeba Birhane, Vinay Uday Prabhu, and John Whaley. 2022. Auditing saliency cropping algorithms. In Proc. of WACV.
230
+
231
+ Bernd Bohnet, Vinh Q. Tran, Pat Verga, Roee Aharoni, Daniel Andor, Livio Baldini Soares, Massimiliano Ciaramita, Jacob Eisenstein, Kuzman Ganchev, Jonathan Herzig, Kai Hui, Tom Kwiatkowski, Ji Ma, Jianmo Ni, Lierni Sestorain Saralegui, Tal Schuster, William W. Cohen, Michael Collins, Dipanjan Das, Donald Metzler, Slav Petrov, and Kellie Webster. 2023. Attributed question answering: Evaluation and modeling for attributed large language models. ArXiv:2212.08037.
232
+
233
+ Joy Buolamwini and Timnit Gebru. 2018. Gender shades: Intersectional accuracy disparities in commercial gender classification. In Proc. of FAccT.
234
+
235
+ Sihao Chen, Daniel Khashabi, Wenpeng Yin, Chris Callison-Burch, and Dan Roth. 2019. Seeing things from a different angle: Discovering diverse perspectives about claims. In Proc. of NAACL.
236
+
237
+ Angela Fan, Yacine Jernite, Ethan Perez, David Grangier, Jason Weston, and Michael Auli. 2019. ELI5: Long form question answering. In Proc. of ACL.
238
+
239
+ Luyu Gao, Zhuyun Dai, Panupong Pasupat, Anthony Chen, Arun Tejasvi Chaganty, Yicheng Fan, Vincent Y. Zhao, Ni Lao, Hongrae Lee, Da-Cheng Juan, and Kelvin Guu. 2022. RARR: Researching and revising what language models say, using language models. ArXiv:2210.08726.
240
+
241
+ Amelia Glaese, Nat McAleese, Maja Tr˛ebacz, John Aslanides, Vlad Firoiu, Timo Ewalds, Maribeth Rauh, Laura Weidinger, Martin Chadwick, Phoebe Thacker, Lucy Campbell-Gillingham, Jonathan Uesato, PoSen Huang, Ramona Comanescu, Fan Yang, Abigail See, Sumanth Dathathri, Rory Greig, Charlie Chen, Doug Fritz, Jaume Sanchez Elias, Richard Green, Sona Mokrá, Nicholas Fernando, Boxi Wu, Rachel ˇ Foley, Susannah Young, Iason Gabriel, William Isaac, John Mellor, Demis Hassabis, Koray Kavukcuoglu, Lisa Anne Hendricks, and Geoffrey Irving. 2022. Improving alignment of dialogue agents via targeted human judgements. ArXiv:2209.14375.
242
+
243
+ Ben Green and Yiling Chen. 2019. Disparate interactions: An algorithm-in-the-loop analysis of fairness in risk assessments. In Proc. of FAccT.
244
+
245
+ Svetlana Kiritchenko and Saif Mohammad. 2018. Examining gender and race bias in two hundred sentiment analysis systems. In Proc. of \*SEM.
246
+
247
+ 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. 2019. Natural questions: A benchmark for question answering research. Transactions of the Association for Computational Linguistics, 7:452–466.
248
+
249
+ Faisal Ladhak, Esin Durmus, He He, Claire Cardie, and Kathleen McKeown. 2022. Faithful or extractive? on mitigating the faithfulness-abstractiveness trade-off in abstractive summarization. In Proc. of ACL.
250
+
251
+ Joshua Maynez, Shashi Narayan, Bernd Bohnet, and Ryan McDonald. 2020. On faithfulness and factuality in abstractive summarization. In Proc. of ACL.
252
+
253
+ Yusuf Mehdi. 2023. The new Bing and Edge – progress from our first month | Bing search blog. Accessed on March 28, 2023.
254
+
255
+ Jacob Menick, Maja Trebacz, Vladimir Mikulik, John Aslanides, Francis Song, Martin Chadwick, Mia Glaese, Susannah Young, Lucy CampbellGillingham, Geoffrey Irving, and Nat McAleese. 2022. Teaching language models to support answers with verified quotes. ArXiv:2203.11147.
256
+
257
+ Danaë Metaxa, Joon Sung Park, James A. Landay, and Jeff Hancock. 2019. Search media and elections: A longitudinal investigation of political search results. In Proc. of CSCW.
258
+
259
+ Panagiotis Takis Metaxas and Yada Pruksachatkun. 2017. Manipulation of search engine results during the 2016 us congressional elections.
260
+
261
+ Reiichiro Nakano, Jacob Hilton, Suchir Balaji, Jeff Wu, Long Ouyang, Christina Kim, Christopher Hesse, Shantanu Jain, Vineet Kosaraju, William Saunders, Xu Jiang, Karl Cobbe, Tyna Eloundou, Gretchen Krueger, Kevin Button, Matthew Knight, Benjamin Chess, and John Schulman. 2021. WebGPT: Browser-assisted question-answering with human feedback. ArXiv:2112.09332.
262
+
263
+ Kishore Papineni, Salim Roukos, Todd Ward, and WeiJing Zhu. 2002. BLEU: a method for automatic evaluation of machine translation. In Proc. of ACL.
264
+
265
+ Denis Peskoff and Brandon Stewart. 2023. Credible without credit: Domain experts assess generative language models. In Proc. of ACL.
266
+
267
+ Fabio Petroni, Aleksandra Piktus, Angela Fan, Patrick Lewis, Majid Yazdani, Nicola De Cao, James Thorne, Yacine Jernite, Vladimir Karpukhin, Jean Maillard, Vassilis Plachouras, Tim Rocktäschel, and Sebastian Riedel. 2021. KILT: a benchmark for knowledge intensive language tasks. In Proc. of NAACL.
268
+
269
+ Hannah Rashkin, Vitaly Nikolaev, Matthew Lamm, Lora Aroyo, Michael Collins, Dipanjan Das, Slav Petrov, Gaurav Singh Tomar, Iulia Turc, and David Reitter. 2022. Measuring attribution in natural language generation models. ArXiv:2112.12870.
270
+
271
+ Ronald E. Robertson, David Lazer, and Christo Wilson. 2018. Auditing the personalization and composition of politically-related search engine results pages. In Proc. of WWW.
272
+
273
+ Romal Thoppilan, Daniel De Freitas, Jamie Hall, Noam Shazeer, Apoorv Kulshreshtha, Heng-Tze Cheng, Alicia Jin, Taylor Bos, Leslie Baker, Yu Du, YaGuang Li, Hongrae Lee, Huaixiu Steven Zheng,
274
+
275
+ Amin Ghafouri, Marcelo Menegali, Yanping Huang, Maxim Krikun, Dmitry Lepikhin, James Qin, Dehao Chen, Yuanzhong Xu, Zhifeng Chen, Adam Roberts, Maarten Bosma, Vincent Zhao, Yanqi Zhou, ChungChing Chang, Igor Krivokon, Will Rusch, Marc Pickett, Pranesh Srinivasan, Laichee Man, Kathleen Meier-Hellstern, Meredith Ringel Morris, Tulsee Doshi, Renelito Delos Santos, Toju Duke, Johnny Soraker, Ben Zevenbergen, Vinodkumar Prabhakaran, Mark Diaz, Ben Hutchinson, Kristen Olson, Alejandra Molina, Erin Hoffman-John, Josh Lee, Lora Aroyo, Ravi Rajakumar, Alena Butryna, Matthew Lamm, Viktoriya Kuzmina, Joe Fenton, Aaron Cohen, Rachel Bernstein, Ray Kurzweil, Blaise AgueraArcas, Claire Cui, Marian Croak, Ed Chi, and Quoc Le. 2022. LaMDA: Language models for dialog applications. ArXiv:2201.08239.
276
+
277
+ Tianyi Zhang, Varsha Kishore, Felix Wu, Kilian Q. Weinberger, and Yoav Artzi. 2020. BERTScore: Evaluating text generation with BERT. In Proc. of ICLR.
278
+
279
+ # A Example queries from each evaluated query distribution
280
+
281
+ Table 3: Example queries from each of the evaluated query distributions. Queries come from diverse sources and require knowledge from a variety of answer types (e.g., short text span, long-form paragraph, list, or table). Each system is evaluated on 1450 queries—150 randomly-sampled queries from each of AllSouls, davinci-debate, ELI5 (KILT), ELI5 (Live), and WikiHowKeywords, and 100 randomly-sampled queries for each of the seven NaturalQuestions subdistributions.
282
+
283
+ <table><tr><td>Source</td><td>Example Queries</td></tr><tr><td>AlSouls</td><td>What are the functions of fashion? Should wealth be inheritable?</td></tr><tr><td>davinci-debate</td><td>Should private companies be allowed to manage public utilities ? Should controversial opinions be censored on social media?</td></tr><tr><td>ELI5 (KILT)</td><td>Why is a circle 360 degrees and not 100 degrees? Why can animals drink dirty water safely but humans can&#x27;t?</td></tr><tr><td>ELI5 (Live)</td><td>Why jumping into water from great height feels like landing in concrete? where does the deleted data go</td></tr><tr><td>WikiHowKeywords</td><td>age paper using tea ways to stop stressing over exam results</td></tr><tr><td>NaturalQuestions (paragraph long answer, has short answer)</td><td>who wrote the song god your mama and me what is the queen of spain&#x27;s name</td></tr><tr><td>NaturalQuestions (paragraph long answer, no short answer)</td><td>where did knock on wood superstition come from what is the use of tap and die</td></tr><tr><td>NaturalQuestions (list long answer, has short answer) NaturalQuestions</td><td>what is the most nominated film for the oscars who played guitar on i want you she&#x27;s so heavy</td></tr><tr><td>(list long answer, no short answer) NaturalQuestions</td><td>alicia keys if i ain&#x27;t got you awards is all of florida in the same time zone how many episodes are there in quantum leap</td></tr><tr><td>(table long answer, has short answer) NaturalQuestions</td><td>what kind of music is red hot chili peppers where does copa airlines fly in the united states</td></tr><tr><td>(table long answer, no short answer) NaturalQuestions</td><td>michael jordan career high against every nba team what does the x card mean in uno</td></tr><tr><td>(no long or short answer)</td><td>what changes were made when trinidad and tobago gained independence</td></tr></table>
284
+
285
+ # B Query Distribution Details
286
+
287
+ # B.1 davinci-debate
288
+
289
+ We seed the data generation process with 100 debate questions, which are manually transformed propositions propositions taken from the Perspectrum dataset of Chen et al. (2019) (e.g., the proposition “Vaccination must be made compulsory.” could be rewritten as the question “Should vaccines be mandatory?”).
290
+
291
+ To generate a debate question, we prompt text-davinci-003 with 10 randomly-sampled seed questions. We repeat this procedure until we have generated 150 unique debate questions that also do not appear in our seed set. Finally, generated questions were manually filtered for inappropriate content.
292
+
293
+ # B.2 ELI5
294
+
295
+ To transform ELI5 post titles into queries, we remove ELI5-specific prefixes (e.g., the post title “ELI5: why can’t our brains recall every memory?” becomes the query “Why can’t our brains recall every memory?”).
296
+
297
+ # B.3 WikiHowKeywords
298
+
299
+ To paraphrase article titles into keyword queries, we prompt text-davinci-003 with “Given a question, write a concise Google search query that would answer the question” and two in-context examples.
300
+
301
+ # C Annotation Interface
302
+
303
+ Figures 5-7 show the annotation interface used for human evaluation.
304
+
305
+ In the first step, annotators were shown the query and the generated response (without citations) and asked to rate response fluency and perceived utility on a five-point Likert scale.
306
+
307
+ In the second step, annotators were shown the statements in the generated response (including any generated citations) and asked to filter out statements are not verification-worthy.
308
+
309
+ Finally, in the third step, annotators were shown the statements that were previously judged to require verification (in the prior step), as well as each statement’s associated system-generated citations. For each statement and associated citation, annotators judged whether the citation fully supports, partially supports, or does not support the statement, as interpreted within the broader context of the query and system response. For statements with multiple associated citations, annotators are asked to judge whether the citations, when taken together, fully support the statement; this captures cases where multiple citations support disjoint parts of a statement (e.g., “Health benefits of cycling include improved cardiovascular health[1] and lowered cholesterol levels[2].”).
310
+
311
+ ![](images/ea18cc3ded6877e9a8e101bf788a30ae169db930bd97859f513e56ff7cdfb94c.jpg)
312
+
313
+ Figure 5: First step of the annotation interface, where annotators judge response fluency and perceived utility.
314
+
315
+ Figure 6: Second step of the annotation interface, where annotators uncheck statements that are not verificationworthy. Statements that contain generated citations must be verification-worthy, so we automatically mark them as such in the interface (greyed-out checkboxes next to the 2nd and 4th sentences above).
316
+
317
+ ![](images/3551637d4d782803ad6033c67d0f315d9d26815f083f65eb27cdfbfd40997b8f.jpg)
318
+
319
+ Figure 7: Third step of the annotation interface, where annotators provide judgments on whether each citation supports its associated statement, and whether each statement is supported by the union of its citations (only applicable when a statement has multiple associated citations).
320
+
321
+ # D Annotation Guidelines
322
+
323
+ Figures 8-12 show the annotation guidelines we used for the task. We ask crowd annotators to read these guidelines as part of the qualification study. Only annotators that demonstrated a thorough understanding of the guidelines and task were permitted to participate in the main round of human evaluation.Hi! We are a team of Stanford researchers interested in evaluating the trustworthiness of AI
324
+
325
+ In this task, you will evaluate an AI system's response to a user query. The AI system outputs a paragraph that contains information relevant to the user's query, and we would like to evaluate whether the AI system can accurately cite sources for statements it makes about the external world.
326
+
327
+ At a high level, this task breaks down into three steps:
328
+
329
+ 1. Evaluating response quality
330
+ 2. Filtering sentences that do not require citation.
331
+ 3. Judging whether each statement is fully supported by its citation(s).
332
+
333
+ Please carefully read the guidelines below before starting on the task. The task compensation accounts for the time needed to read the guidelines.
334
+
335
+ # Preliminaries: Logging In
336
+
337
+ When first entering the site, you will be prompted to select a username. Please use your worker ID as the username, so we can keep track of the examples you've annotated. The top of the interface displays your worker ID, the total number of examples submitted from this username, and will show a completion code when you have finished the task.
338
+
339
+ If something is wrong with the example, you may press the "Flag Example" button in the top-right corner to report the error. Please do not submit annotations for such examples.
340
+
341
+ Your task ends after you've completed 5 responses. A completion code will appear at the top of the interface---there is no need to complete more than 5 responses to receive credit for the study.
342
+
343
+ # Step 1: Evaluating response quality
344
+
345
+ You will be shown the user's original query, and the system's response to the query---please carefully read both of them. Then, you will be asked to rate your level of agreement with two questions:
346
+
347
+ 1. The response is fluent and cohesive.
348
+ 2. The response is a helpful and informative answer to the query.
349
+
350
+ Figure 8: First page of the annotation guidelines.
351
+
352
+ Once you have finished selecting a response for each of the two questions, press the "Next Step" button in the top-right corner to continue.
353
+
354
+ # Step 2: Filtering sentences that do not require citation.
355
+
356
+ The goal of this step is to filter the sentences in the system response by removing sentences that do not require citation (unchecking them in the interface). We expect the majority of sentences produced by the system to require citation, so don't worry if you find yourself rarely unchecking sentences.
357
+
358
+ In general, we take the position that all statements about the external world require citation, even if they are trivially true or "common sense" (since users may differ in their background, which affects their basic beliefs). For example, the following sentences require citation:
359
+
360
+ (1a): The House of Lords is a topic of ongoing debate in the UK.
361
+ (1b): However, there is still no consensus on what should replace the Electoral College.
362
+ (1c): The sky is blue.
363
+ (1d): The moon landing was staged.
364
+ (1e): In February 2023, LeBron James took 261,960 total breaths.
365
+ (1f): Patrick Henry once said "Give me liberty, or give me death".
366
+ (1g): Thanksgiving dinners usually taste bad.
367
+ (1h): Voting rights are controversial
368
+
369
+ In particular, note that sentences can require citation despite being nearly impossible to verify. Consider example (e) above. It's highly unlikely that anyone knows exactly how many breaths LeBron James took in February 2023, let alone that such information could be linked to in a citation. However, it's still a statement about the external world, and it's still possible to find out for certain whether the statement is true or false. Thus, the statement requires citation.
370
+
371
+ In contrast, consider the following examples of sentences that do not require citation:
372
+
373
+ (2a): I believe that the moon landing was staged. Explanation: In general, all sentences pertaining to "I" do not require citation. This statement expresses a belief held by the speaker. The speaker is unknown, so this statement does not require citation. Note that the similar-looking statement "The moon landing was staged" (example 1d) require citation and is verifiable.
374
+ (2b): Have you listened to that song? Explanation: Questions do not have information to verify.
375
+ (2c): Pick up the ball on the floor. Explanation: Commands do not have information to verify.
376
+ (2d): It is the year 2300. Robots rule the earth.
377
+
378
+ Explanation: the sentence "Robots rule the earth." does not require citation, since the context ("It is the year 2300") specifies that this is a hypothetical situation and not a statement about the external world.
379
+
380
+ Carefully read each sentence again and decide whether it requires citation. If it does not require citation, uncheck its corresponding checkbox. When you have finished, press the "Next Step" button in the top-right corner to proceed.
381
+
382
+ # Step 3: Judging whether each statement is fully supported by its citation(s).
383
+
384
+ In this step, you will evaluate whether each statement is supported by its corresponding citations. Note that the system responses may appear very fluent and well-formed, but contain slight inaccuracies that are not easy to discern at first glance. Pay close attention to the text. Read it carefully as you would when proofreading.
385
+
386
+ Carefully read the user query and the statement. You may also have to re-read the full system response to understand the statement in its full context. Given the statement's associated citations, your task is to judge whether all of the information provided by the system response is fully supported by the source document.
387
+
388
+ In particular, this question can be answered by considering:
389
+
390
+ (A): What is the information provided by the statement? (B): According to the citation(s), is this statement true?
391
+
392
+ # (A): What is the information provided by the statement?
393
+
394
+ To determine the information provided by the statement, you must consider the query, the statement, and the context of the statement within the full response. The citations should be completely ignored when determining "the information provided by the statement."
395
+
396
+ Consider the following example:
397
+
398
+ Query: Why do so many people want to get married?
399
+ Response (statement highlighted): People get married for many reasons, including love, companionship, financial security, and to share their lives with a partner. Marriage can also be seen as a way to affirm mutual love or start a family.
400
+
401
+ In this case, the statement is stand-alone, and can be interpreted without looking at the query or the rest of the response. However, this is not always the case. Consider the example below:
402
+
403
+ Query: Is it wrong to exaggerate in a letter of recommendation?
404
+
405
+ Figure 10: Third page of the annotation guidelines.
406
+
407
+ Response (statement highlighted): Yes, it is wrong. Letters of recommendation should reflect the author's honest perspective on the candidate.
408
+
409
+ The response "Yes, it is wrong" is uninterpretable on its own, because it is not clear what "it" refers to. However, by using the context of the query, it becomes clear that the statement is equivalent to "Yes, [exaggerating in a letter of recommendation] is wrong".
410
+
411
+ For another example, consider:
412
+
413
+ Query: how many characters are in the prologue of canterbury tales Response (statement highlighted): In Geoffrey Chaucer's The Canterbury Tales, 32 characters make the journey to Canterbury. This includes the narrator, the host, and the Canon's yeoman, who join the group later.
414
+
415
+ The statement "This includes the narrator, the host, and the Canon's yeoman, who join the group later." is uninterpretable on its own, because it is not clear what "This" refers to, or what "group" they join. The preceding sentence of the response is essential for realizing that this sentence is equivalent to "[The 32 characters that make the journey to Canterbury] include the narrator, the host, and the Canon's yeoman, who join the [32 characters] later".
416
+
417
+ In general, use your best judgment to determine the information provided by the system response.
418
+
419
+ # (B): According to the citation(s), is this statement true?
420
+
421
+ Again, you should use your best judgment in determining whether all of the information provided by the statement is supported by the associated citation(s).
422
+
423
+ It may be helpful to ask yourself whether it is accurate to say "according to the citation" with a statement following this phrase. For example, is it accurate to say “according to the citation, in Geoffrey Chaucer's The Canterbury Tales, 32 characters make the journey to Canterbury"?
424
+
425
+ Be sure to check all of the information in the statement. You will be given six options:
426
+
427
+ "Full Support": All of the information in the statement is supported in the document. "Partial Support": Only some of the information is supported in the document, but other parts of the information are missing from the document.
428
+ "No Support": This document does not support any part of the statement.
429
+ "Article Not Accessible": Not able to access the document (e.g., paywall or the link is dead)
430
+ "Citation Has Support but also Refutes Statement": The citation has information that supports the statement, but also has information that refutes the statement.
431
+ "Statement is Unclear, Can't Make Judgment": The statement is so incomprehensible that it cannot be determined if the citation supports the statement.
432
+
433
+ If the citation offers "full support" or "partial support" of a document, you will also be asked to copy and paste the minimal set of sentences from the article that support your judgment. In cases where you can't localize the judgment to particular sentence(s) (e.g., the entire article supports the statement, or the support comes from an image or graphic), feel free to leave this input blank.
434
+
435
+ When a statement has more than one associated citation, you will also judge whether the citations, when taken together, fully support the statement (Yes/No). In other words, if you merged all of these citations into one big webpage (and it became a single citation), would this citation fully support the statement? If the citations contradict each other (e.g., one fully supports the statement, whereas another refutes the statement), then select "Citations Contradict Each Other".
436
+
437
+ or feedback?Figure 12: Fifth page of the annotation guidelines.
438
+
439
+ # E Annotation Quality
440
+
441
+ Table 4 presents inter-annotator agreement statistics, computed on a random sample of 250 query-response pairs that received annotations each. We measure the pairwise agreement between individual pairs of ratings and an F1 score comparing individual ratings to the majority consensus. We compute agreement on judgments of (i) fluency and perceived utility, (ii) whether a statement is verification-worthy, (iii) whether a citation supports its associated statement, and (iv) whether a statement is fully supported by the union of its citations (in the case where multiple webpages are cited). When calculating agreement on fluency and perceived utility judgments, we coarsen the 5-point Likert judgments into three options: “Disagree”, “Neutral”, and “Agree”. Agreement rates between annotators are high (pairwise agreement greater than $8 2 . 0 \%$ and F1 greater than 91.0 for all judgments).
442
+
443
+ Inter-Annotator Agreement (↑)
444
+
445
+ <table><tr><td>Pairwise Agreement %</td><td></td><td>F1</td></tr><tr><td>Fluency</td><td>88.5</td><td>94.1</td></tr><tr><td>Perceived Utility</td><td>86.4</td><td>93.1</td></tr><tr><td>Verifiability</td><td>94.6</td><td>97.3</td></tr><tr><td>Citation Supports</td><td>82.0</td><td>91.0</td></tr><tr><td>Statement Supported</td><td>82.2</td><td>91.1</td></tr></table>
446
+
447
+ Table 4: Inter-annotator agreement statistics. Pairwise Agreement $\%$ computes the proportion of individual judgment pairs that agree, and F1 compares individual judgments to the majority consensus judgment. Interannotator agreement is high (greater than $8 2 . 0 \%$ pairwise agreement $\%$ and $9 1 . 0 \mathrm { F } 1$ for all judgments).
448
+
449
+ # F Fluency and Perceived Utility
450
+
451
+ Table 5 presents the fluency of generative search engine responses on each of our query distributions, and Table 6 presents the perceived utility.
452
+
453
+ <table><tr><td>Fluency (↑)</td></tr><tr><td>Average Over All Queries</td></tr><tr><td>Bing Chat NeevaAI</td></tr><tr><td>4.43 perplexity.ai 4.51</td></tr><tr><td>YouChat 4.59</td></tr><tr><td>Average</td></tr></table>
454
+
455
+ Fluency (↑)
456
+
457
+ <table><tr><td rowspan="2"></td><td rowspan="2">AllSouls</td><td rowspan="2">davinci-debate</td><td colspan="2">ELI5</td><td rowspan="2">WikiHowKeywords</td></tr><tr><td>KILT</td><td>Live</td></tr><tr><td>Bing Chat</td><td>4.31</td><td>4.37</td><td>4.36</td><td>4.30</td><td>4.41</td></tr><tr><td>NeevaAI</td><td>4.50</td><td>4.53</td><td>4.50</td><td>4.42</td><td>4.42</td></tr><tr><td>perplexity.ai</td><td>4.43</td><td>4.54</td><td>4.55</td><td>4.47</td><td>4.45</td></tr><tr><td>YouChat</td><td>4.58</td><td>4.65</td><td>4.56</td><td>4.53</td><td>4.52</td></tr><tr><td>Average</td><td>4.45</td><td>4.52</td><td>4.49</td><td>4.43</td><td>4.45</td></tr></table>
458
+
459
+ <table><tr><td></td><td colspan="7">NaturalQuestions</td></tr><tr><td></td><td colspan="2">List Long Answer</td><td colspan="2">Table Long Ans wer</td><td colspan="2">Paragraph Long Answer</td><td>No Answer</td></tr><tr><td></td><td>Has Short</td><td>No Short</td><td>Has Short</td><td>No Short</td><td>Has Short</td><td>No Short</td><td></td></tr><tr><td>Bing Chat</td><td>4.49</td><td>4.52</td><td>4.46</td><td>4.30</td><td>4.54</td><td>4.41</td><td>4.39</td></tr><tr><td>NeevaAI</td><td>4.45</td><td>4.40</td><td>4.31</td><td>4.28</td><td>4.41</td><td>4.49</td><td>4.43</td></tr><tr><td>perplexity.ai</td><td>4.69</td><td>4.54</td><td>4.59</td><td>4.41</td><td>4.73</td><td>4.43</td><td>4.37</td></tr><tr><td>YouChat</td><td>4.65</td><td>4.56</td><td>4.60</td><td>4.45</td><td>4.66</td><td>4.69</td><td>4.64</td></tr><tr><td>Average</td><td>4.57</td><td>4.50</td><td>4.49</td><td>4.36</td><td>4.58</td><td>4.50</td><td>4.46</td></tr></table>
460
+
461
+ Table 5: Human evaluation results for generated response fluency (five-point Likert ratings). In general, existing generative search engines produce fluent text. Performance is notably lower on NaturalQuestions queries with table-type long answers and no short answers, which often require aggregating information within or across citations.
462
+
463
+ <table><tr><td>Average Over All Queries</td></tr><tr><td>Bing Chat 4.34</td></tr><tr><td>NeevaAI 4.48 4.56</td></tr><tr><td>perplexity.ai YouChat 4.62</td></tr><tr><td>Average 4.50</td></tr></table>
464
+
465
+ <table><tr><td rowspan="2"></td><td rowspan="2">AllSouls</td><td rowspan="2">davinci-debate</td><td colspan="2">ELI5</td><td rowspan="2">WikiHowKeywords</td></tr><tr><td>KILT</td><td>Live</td></tr><tr><td>Bing Chat</td><td>4.15</td><td>4.19</td><td>4.19</td><td>4.09</td><td>4.37</td></tr><tr><td>NeevaAI</td><td>4.44</td><td>4.39</td><td>4.54</td><td>4.46</td><td>4.42</td></tr><tr><td>perplexity.ai</td><td>4.39</td><td>4.60</td><td>4.54</td><td>4.50</td><td>4.51</td></tr><tr><td>YouChat</td><td>4.53</td><td>4.54</td><td>4.53</td><td>4.50</td><td>4.63</td></tr><tr><td>Average</td><td>4.38</td><td>4.43</td><td>4.45</td><td>4.39</td><td>4.48</td></tr></table>
466
+
467
+ Perceived Utility (↑)
468
+
469
+ <table><tr><td></td><td colspan="7">NaturalQuestions</td></tr><tr><td></td><td colspan="2">List Long Answer</td><td colspan="2">Table Long Answer</td><td colspan="2"> Paragraph Long Answer</td><td>No Answer</td></tr><tr><td></td><td>Has Short</td><td>No Short</td><td>Has Short</td><td>No Short</td><td>Has Short</td><td>No Short</td><td></td></tr><tr><td>Bing Chat</td><td>4.63</td><td>4.49</td><td>4.49</td><td>4.47</td><td>4.53</td><td>4.40</td><td>4.38</td></tr><tr><td>NeevaAI</td><td>4.65</td><td>4.57</td><td>4.43</td><td>4.38</td><td>4.43</td><td>4.63</td><td>4.49</td></tr><tr><td>perplexity.ai</td><td>4.71</td><td>4.61</td><td>4.60</td><td>4.55</td><td>4.77</td><td>4.58</td><td>4.50</td></tr><tr><td>YouChat</td><td>4.72</td><td>4.64</td><td>4.70</td><td>4.54</td><td>4.77</td><td>4.77</td><td>4.70</td></tr><tr><td>Average</td><td>4.68</td><td>4.58</td><td>4.55</td><td>4.49</td><td>4.62</td><td>4.60</td><td>4.52</td></tr></table>
470
+
471
+ Table 6: Human evaluation results for perceived utility of generated responses (five-point Likert ratings). In general, responses from existing generative search engines appear informative and useful.
472
+
473
+ # G Citation Recall and Precision
474
+
475
+ Table 7 presents generative search engine citation recall across the evaluated query distributions, and Table 8 presents citation precision.
476
+
477
+ Citation Recall (%; ↑)
478
+
479
+ <table><tr><td>Average Over All Queries</td></tr><tr><td>Bing Chat 58.7 NeevaAI</td></tr><tr><td>67.6 perplexity.ai 68.7</td></tr><tr><td>YouChat 11.1 Average</td></tr></table>
480
+
481
+ Citation Recall (%; ↑)
482
+
483
+ <table><tr><td></td><td>AllSouls</td><td>davinci-debate</td><td colspan="2">ELI5</td><td>WikiHowKeywords</td></tr><tr><td></td><td></td><td></td><td>KILT</td><td>Live</td><td></td></tr><tr><td>Bing Chat</td><td>55.6</td><td>57.1</td><td>59.8</td><td>59.9</td><td>50.7</td></tr><tr><td>NeevaAI</td><td>55.3</td><td>66.3</td><td>66.6</td><td>61.6</td><td>72.5</td></tr><tr><td>perplexity.ai</td><td>63.0</td><td>64.2</td><td>64.8</td><td>58.1</td><td>74.6</td></tr><tr><td>YouChat</td><td>3.2</td><td>3.9</td><td>3.0</td><td>4.6</td><td>12.1</td></tr><tr><td>Average</td><td>44.3</td><td>47.9</td><td>48.5</td><td>46.0</td><td>52.5</td></tr></table>
484
+
485
+ Citation Recall (%; ↑)
486
+
487
+ <table><tr><td></td><td colspan="7">NaturalQuestions</td></tr><tr><td></td><td colspan="2">List Long Ans wer</td><td colspan="2">Table Long Ans wer</td><td colspan="2">Paragraph Long Answer</td><td>No Answer</td></tr><tr><td></td><td>Has Short</td><td>No Short</td><td>Has Short</td><td>No Short</td><td>Has Short</td><td>No Short</td><td></td></tr><tr><td>Bing Chat</td><td>74.1</td><td>60.6</td><td>63.5</td><td>49.2</td><td>72.1</td><td>66.3</td><td>61.9</td></tr><tr><td>NeevaAI</td><td>73.0</td><td>64.2</td><td>69.5</td><td>65.1</td><td>75.0</td><td>74.8</td><td>65.6</td></tr><tr><td>perplexity.ai</td><td>85.3</td><td>74.4</td><td>79.6</td><td>62.4</td><td>84.9</td><td>75.9</td><td>68.4</td></tr><tr><td>YouChat</td><td>21.6</td><td>16.6</td><td>30.6</td><td>11.5</td><td>31.6</td><td>21.8</td><td>17.8</td></tr><tr><td>Average</td><td>63.5</td><td>53.9</td><td>60.8</td><td>47.1</td><td>65.9</td><td>59.7</td><td>53.4</td></tr></table>
488
+
489
+ Table 7: Human evaluation results of citation recall in existing generative search engines. Citation recall is concerningly low (many generated statements are not fully supported by citations), especially given that these systems already have millions of users and may serve as a primary tool for fulfilling user information needs.
490
+
491
+ <table><tr><td>Average Over All Queries</td></tr><tr><td>Bing Chat 89.5 NeevaAI 72.0</td></tr><tr><td>perplexity.ai 72.7 63.6</td></tr><tr><td>YouChat Average 74.5</td></tr></table>
492
+
493
+ <table><tr><td rowspan="2"></td><td rowspan="2">AllSouls</td><td rowspan="2">davinci-debate</td><td colspan="2">ELI5</td><td rowspan="2">WikiHowKeywords</td></tr><tr><td>KILT</td><td>Live</td></tr><tr><td>Bing Chat</td><td>88.8</td><td>88.8</td><td>87.6</td><td>87.2</td><td>92.1</td></tr><tr><td>NeevaAI</td><td>69.8</td><td>74.1</td><td>75.7</td><td>73.8</td><td>74.0</td></tr><tr><td>perplexity.ai</td><td>61.7</td><td>68.4</td><td>64.9</td><td>66.3</td><td>77.4</td></tr><tr><td>YouChat</td><td>51.1</td><td>50.0</td><td>64.7</td><td>57.9</td><td>71.1</td></tr><tr><td>Average</td><td>67.8</td><td>70.3</td><td>73.2</td><td>71.3</td><td>78.7</td></tr></table>
494
+
495
+ Citation Precision (%; ↑)
496
+
497
+ <table><tr><td></td><td colspan="7">NaturalQuestions</td></tr><tr><td></td><td colspan="2">List Long Answer</td><td colspan="2">Table Long Answer</td><td colspan="2"> Paragraph Long Answer</td><td>No Answer</td></tr><tr><td></td><td>Has Short</td><td>No Short</td><td>Has Short</td><td>No Short</td><td>Has Short</td><td>No Short</td><td></td></tr><tr><td>Bing Chat</td><td>86.8</td><td>86.8</td><td>89.0</td><td>92.5</td><td>92.9</td><td>91.3</td><td>90.8</td></tr><tr><td>NeevaAI</td><td>73.2</td><td>67.6</td><td>67.1</td><td>64.2</td><td>73.4</td><td>76.5</td><td>70.8</td></tr><tr><td>perplexity.ai</td><td>82.1</td><td>81.0</td><td>76.0</td><td>71.7</td><td>83.8</td><td>79.7</td><td>74.0</td></tr><tr><td>YouChat</td><td>63.3</td><td>62.7</td><td>64.8</td><td>56.1</td><td>75.7</td><td>67.5</td><td>58.6</td></tr><tr><td>Average</td><td>76.4</td><td>74.5</td><td>74.2</td><td>71.1</td><td>81.5</td><td>78.7</td><td>73.5</td></tr></table>
498
+
499
+ Table 8: Human evaluation results of citation precision in existing generative search engines. Citation precision is concerningly low (many generated citations do not support their associated statements), especially given that these systems already have millions of users and may serve as a primary tool for fulfilling user information needs.
500
+
501
+ # H Citation $F _ { 1 }$
502
+
503
+ Table 9 presents the citation $F _ { 1 }$ for every evaluated generative search engine on each query distribution.
504
+
505
+ Citation F1 (↑)
506
+
507
+ <table><tr><td>Average Over All Queries</td></tr><tr><td>Bing Chat</td></tr><tr><td>NeevaAI 69.8 perplexity.ai 70.6</td></tr><tr><td>YouChat 18.9</td></tr><tr><td>Average 57.6</td></tr></table>
508
+
509
+ Citation F1 (↑)
510
+
511
+ <table><tr><td rowspan="2"></td><td rowspan="2">AllSouls</td><td rowspan="2">davinci-debate</td><td colspan="2">ELI5</td><td rowspan="2">WikiHowKeywords</td></tr><tr><td>KILT</td><td>Live</td></tr><tr><td>Bing Chat</td><td>68.4</td><td>69.5</td><td>71.1</td><td>71.0</td><td>65.4</td></tr><tr><td>NeevaAI</td><td>61.7</td><td>70.0</td><td>70.8</td><td>67.1</td><td>73.2</td></tr><tr><td>perplexity.ai</td><td>62.3</td><td>66.2</td><td>64.8</td><td>62.0</td><td>76.0</td></tr><tr><td>YouChat</td><td>6.0</td><td>7.2</td><td>5.6</td><td>8.5</td><td>20.7</td></tr><tr><td>Average</td><td>49.6</td><td>53.2</td><td>53.1</td><td>52.2</td><td>58.8</td></tr></table>
512
+
513
+ Citation F1 (↑)
514
+ Table 9: Citation $F _ { 1 }$ of generated responses.
515
+
516
+ <table><tr><td></td><td colspan="7">NaturalQuestions</td></tr><tr><td></td><td colspan="2">List Long Answer</td><td colspan="2"> Table Long Answer</td><td colspan="2"> Paragraph Long Answer</td><td>No Answer</td></tr><tr><td></td><td>Has Short</td><td>No Short</td><td>Has Short</td><td>No Short</td><td>Has Short</td><td>No Short</td><td></td></tr><tr><td>Bing Chat</td><td>79.9</td><td>71.4</td><td>74.1</td><td>64.2</td><td>81.2</td><td>76.8</td><td>73.6</td></tr><tr><td>NeevaAI</td><td>73.1</td><td>65.9</td><td>68.3</td><td>64.6</td><td>74.2</td><td>75.7</td><td>68.1</td></tr><tr><td>perplexity.ai</td><td>83.7</td><td>77.5</td><td>77.8</td><td>66.7</td><td>84.3</td><td>77.7</td><td>71.1</td></tr><tr><td>YouChat</td><td>32.2</td><td>26.2</td><td>41.5</td><td>19.2</td><td>44.6</td><td>32.9</td><td>27.4</td></tr><tr><td>Average</td><td>67.2</td><td>60.2</td><td>65.4</td><td>53.7</td><td>71.1</td><td>65.8</td><td>60.0</td></tr></table>
parse/dev/ZQV5iRPAua/ZQV5iRPAua_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/aPXMGv7aeOn/aPXMGv7aeOn_content_list.json ADDED
@@ -0,0 +1,1365 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "type": "text",
4
+ "text": "Compressible-composable NeRF via Rank-residual Decomposition ",
5
+ "text_level": 1,
6
+ "bbox": [
7
+ 281,
8
+ 122,
9
+ 717,
10
+ 172
11
+ ],
12
+ "page_idx": 0
13
+ },
14
+ {
15
+ "type": "text",
16
+ "text": "Jiaxiang Tang1, Xiaokang Chen1, Jingbo Wang2, Gang Zeng1,3 ",
17
+ "bbox": [
18
+ 279,
19
+ 224,
20
+ 720,
21
+ 241
22
+ ],
23
+ "page_idx": 0
24
+ },
25
+ {
26
+ "type": "text",
27
+ "text": "1School of Intelligence Science and Technology, Peking University 2Chinese University of Hong Kong 3Intelligent Terminal Key Laboratory of SiChuan Province {tjx, pkucxk}@pku.edu.cn, wj020@ie.cuhk.edu.hk, zeng@pku.edu.cn ",
28
+ "bbox": [
29
+ 181,
30
+ 241,
31
+ 818,
32
+ 284
33
+ ],
34
+ "page_idx": 0
35
+ },
36
+ {
37
+ "type": "text",
38
+ "text": "Abstract ",
39
+ "text_level": 1,
40
+ "bbox": [
41
+ 462,
42
+ 318,
43
+ 535,
44
+ 335
45
+ ],
46
+ "page_idx": 0
47
+ },
48
+ {
49
+ "type": "text",
50
+ "text": "Neural Radiance Field (NeRF) has emerged as a compelling method to represent 3D objects and scenes for photo-realistic rendering. However, its implicit representation causes difficulty in manipulating the models like the explicit mesh representation. Several recent advances in NeRF manipulation are usually restricted by a shared renderer network, or suffer from large model size. To circumvent the hurdle, in this paper, we present a neural field representation that enables efficient and convenient manipulation of models. To achieve this goal, we learn a hybrid tensor rank decomposition of the scene without neural networks. Motivated by the low-rank approximation property of the SVD algorithm, we propose a rank-residual learning strategy to encourage the preservation of primary information in lower ranks. The model size can then be dynamically adjusted by rank truncation to control the levels of detail, achieving near-optimal compression without extra optimization. Furthermore, different models can be arbitrarily transformed and composed into one scene by concatenating along the rank dimension. The growth of storage cost can also be mitigated by compressing the unimportant objects in the composed scene. We demonstrate that our method is able to achieve comparable rendering quality to state-of-the-art methods, while enabling extra capability of compression and composition. Code is available at https://github.com/ashawkey/CCNeRF. ",
51
+ "bbox": [
52
+ 233,
53
+ 351,
54
+ 766,
55
+ 599
56
+ ],
57
+ "page_idx": 0
58
+ },
59
+ {
60
+ "type": "text",
61
+ "text": "1 Introduction ",
62
+ "text_level": 1,
63
+ "bbox": [
64
+ 176,
65
+ 626,
66
+ 310,
67
+ 643
68
+ ],
69
+ "page_idx": 0
70
+ },
71
+ {
72
+ "type": "text",
73
+ "text": "Photo-realistic rendering and manipulation of 3D scenes have been long standing problems with numerous real-world applications, such as VR/AR, computer games, and video creation. Recently, the volumetric Neural Radiance Field (NeRF) representations [26, 1, 8, 27] show impressive progress in rendering photo-realistic images with rich details. However, due to this implicit representation of geometry and appearance, manipulating the underlying scenes encoded by NeRF still remains a challenging problem. To solve this problem, some works [21, 45, 19] introduce scene-specific features and scene agnostic rendering network, so that scenes trained with a shared rendering network can be composed together. However, the constrained and biased capability of these rendering networks causes difficulty in extending to various objects or scenes. New objects have to be trained with a fixed rendering network to be compatible with the old objects. Other works [36] discard the rendering network and adopt an no-neural-network NeRF representation, which is more convenient to manipulate the reconstructed scenes and is still able to render high-quality images. Nevertheless, the large storage requirement for each single model is detrimental to composing complex scenes with lots of objects. ",
74
+ "bbox": [
75
+ 174,
76
+ 659,
77
+ 825,
78
+ 851
79
+ ],
80
+ "page_idx": 0
81
+ },
82
+ {
83
+ "type": "text",
84
+ "text": "We present a novel approach that allows efficient and convenient manipulation of scenes represented with our model. Two aspects should be fulfilled to achieve this goal. The first is that we can dynamically adjust the model size to support different levels of detail (LOD) in different scenarios. ",
85
+ "bbox": [
86
+ 176,
87
+ 858,
88
+ 825,
89
+ 900
90
+ ],
91
+ "page_idx": 0
92
+ },
93
+ {
94
+ "type": "image",
95
+ "img_path": "images/bafcbe764de067e330aa7da67877ab6d1b420be5d0ac6176fbde4b4a1a8f969c.jpg",
96
+ "image_caption": [
97
+ "Figure 1: Compressibility and Composability of our method. We present a tensor rank decomposition based neural field representation, which supports model compression through rank truncation, and arbitrary composition between different models through rank concatenation. Both of these operations require no extra optimization, or any constraints in training (e.g., a shared renderer). "
98
+ ],
99
+ "image_footnote": [],
100
+ "bbox": [
101
+ 179,
102
+ 90,
103
+ 820,
104
+ 251
105
+ ],
106
+ "page_idx": 1
107
+ },
108
+ {
109
+ "type": "text",
110
+ "text": "This functions similar to mipmaps in graphics and requires no extra optimization step. The second is that all models can be transformed and composed arbitrarily for manipulation with no constraints in training. This promises that our models are always reusable, and support the most basic operations in a 3D editor like blender [9]. We name these two properties as compressibility and composability. ",
111
+ "bbox": [
112
+ 174,
113
+ 345,
114
+ 825,
115
+ 401
116
+ ],
117
+ "page_idx": 1
118
+ },
119
+ {
120
+ "type": "text",
121
+ "text": "For the compressibility, we are motivated by the properties of Singular Value Decomposition (SVD) and High-order SVD (HOSVD) [10]. Our aim is to learn the decomposition of a 3D scene from only 2D observations like TensoRF [8], and further preserve the near-optimal low-rank approximation property. We propose a simple and flexible tensor rank decomposition based neural radiance field, and a rank-residual learning strategy. Each 3D scene is modeled by a 4D feature volume, which can be described with a set of rank components and a matrix storing the weights for each feature channel. The rank components are either vector- or matrix-based, corresponding to the CANDECOMP/PARAFAC (CP) decomposition [14, 4] and a less compact triple plane variant. We introduce a rank-residual learning strategy to encourage the lower ranks to preserve more important information of the whole scene. Combined with an empirical sort-and-truncate strategy, the proposed method achieves nearoptimal low-rank approximation at any targeted rank. Different LODs are represented with different low-rank truncations of the model, allowing dynamic trade-off between model size and rendering quality without retraining. Besides, our model contains no neural networks and thus naturally supports composability. Since there are no MLP renderers in our model, we can compose different objects by simply concatenating their rank components. A transformation matrix is recorded for each object to control its position and orientation in the scene. ",
122
+ "bbox": [
123
+ 174,
124
+ 409,
125
+ 825,
126
+ 628
127
+ ],
128
+ "page_idx": 1
129
+ },
130
+ {
131
+ "type": "text",
132
+ "text": "As demonstrated in Figure 1, we are able to control each model’s LOD and size in a flexible range, and perform arbitrary transformation and composition of different models. Furthermore, these two properties are connected together through the underlying concept of rank, and can be combined in practical use. For example, we can mitigate the growth of model size of a complex scene composed of multiple objects, by compressing the less important objects. Our contributions can be summarized as follows: (1) We propose a simple radiance field representation based on two types of tensor rank decomposition, which allows flexible control of model size and naturally supports transformation and composition of different models. (2) We design a rank-residual learning strategy to enable near-optimal low-rank approximation. After training, our model can be dynamically adjusted to trade off between performance and model size without retraining. (3) The proposed method reaches comparable rendering quality with state-of-the-arts, while additionally enabling both compressibility and composability. ",
133
+ "bbox": [
134
+ 174,
135
+ 636,
136
+ 825,
137
+ 801
138
+ ],
139
+ "page_idx": 1
140
+ },
141
+ {
142
+ "type": "text",
143
+ "text": "2 Related Work ",
144
+ "text_level": 1,
145
+ "bbox": [
146
+ 174,
147
+ 824,
148
+ 321,
149
+ 840
150
+ ],
151
+ "page_idx": 1
152
+ },
153
+ {
154
+ "type": "text",
155
+ "text": "2.1 Scene Representation with NeRF ",
156
+ "text_level": 1,
157
+ "bbox": [
158
+ 176,
159
+ 856,
160
+ 441,
161
+ 871
162
+ ],
163
+ "page_idx": 1
164
+ },
165
+ {
166
+ "type": "text",
167
+ "text": "3D scenes can be represented with various forms, including volumes, point clouds, meshes, and implicit representations [33, 34, 7, 30, 38, 25, 23, 28]. NeRF [26] proposes to use a 5D function to represent the scene and applies volumetric rendering for novel view synthesis, achieving photorealistic results and detailed geometry reconstruction. This powerful representation quickly receives attention and is extensively studied and applied in various fields [50, 24], such as generative settings [6, 37, 29, 5], dynamic scenes [20, 31], and texture mapping [44]. In particular, we categorize recent progress by the design of the underlying functions into three classes: neural network-based, hybrid and no-neural-network. neural network-based representations typically apply an MLP, as the implicit function to encode 3D scenes. The original NeRF [26] and most following works [1, 2, 51, 43, 46, 35] choose this representation for its simplicity. However, the training and inference speed of such a network is generally slow due to the relatively expensive MLP computation. Therefore, hybrid representations try to reduce the size of the MLP, by storing the 3D features in an explicit data structure. Since a dense 3D representation is unaffordable, different methods are explored. For example, NSVF [21] adopts sparse voxel grids, PlenOctrees [49] adopts octrees, instant-ngp [27] adopts a multi-scale hashmap, and TensoRF [8] factorizes the scene into lower-rank components. Querying such hybrid representation is much faster, thus reducing training and inference time and even reaching interactive FPS. Lastly, no-neural-network representations attempt to model the 3D scene without neural networks. Plenoxels [36] shows that only the explicit sparse voxels representation is enough to model complex 3D scenes. Our method also belongs to this representation, sharing the similar tensor rank decomposition idea to TensoRF [8], but we focus on two additional capabilities, i.e., compressibility and composability, which are important yet usually absent in previous work. ",
168
+ "bbox": [
169
+ 176,
170
+ 883,
171
+ 823,
172
+ 911
173
+ ],
174
+ "page_idx": 1
175
+ },
176
+ {
177
+ "type": "text",
178
+ "text": "",
179
+ "bbox": [
180
+ 174,
181
+ 90,
182
+ 825,
183
+ 353
184
+ ],
185
+ "page_idx": 2
186
+ },
187
+ {
188
+ "type": "text",
189
+ "text": "2.2 Tensor Decomposition and Low-rank Approximation ",
190
+ "text_level": 1,
191
+ "bbox": [
192
+ 174,
193
+ 396,
194
+ 581,
195
+ 411
196
+ ],
197
+ "page_idx": 2
198
+ },
199
+ {
200
+ "type": "text",
201
+ "text": "Decomposition of high-order tensors [18] can be considered as the generalizations of matrix singular value decomposition. The Tucker decomposition [40] decomposes a tensor into a core tensor multiplied by a matrix along each mode. The CANDECOMP/PARAFAC (CP) decomposition [14, 4] factorizes a tensor into a sum of component rank-one tensors, and can be viewed as a special case of Tucker where the core tensor is superdiagonal. The high-order singular value decomposition [10] provides a method to compute a specific Tucker decomposition with an all-orthogonal core tensor. Low-rank approximation is a common problem that applies tensor decomposition, and has found various applications such as image compression. Although the truncated HOSVD does not hold the optimal property contrary to the truncated SVD, it still results in a quasi-optimal solution [10, 41, 12], which is enough to yield a sufficiently good solution in practical uses. Tensor rank decomposition and its variants [10, 11] has been used in various vision and learning tasks [47, 8, 48]. Specifically, TensoRF [8] first leverages the CP decomposition and a Vertex-Matrix (VM) decomposition to factorize neural radiance fields, but its other designs (e.g., use of MLP) disturbs the property of tensor rank decomposition and prevents it from achieving compression or composition. Instead, we focus on modeling neural radiance fields only with tensor rank decomposition, and aim to preserve the low-rank approximation property, enabling the compression of a learned neural radiance field similar to the SVD compression of an image. ",
202
+ "bbox": [
203
+ 174,
204
+ 433,
205
+ 825,
206
+ 667
207
+ ],
208
+ "page_idx": 2
209
+ },
210
+ {
211
+ "type": "text",
212
+ "text": "2.3 Manipulation and Composition of NeRF ",
213
+ "text_level": 1,
214
+ "bbox": [
215
+ 174,
216
+ 709,
217
+ 493,
218
+ 724
219
+ ],
220
+ "page_idx": 2
221
+ },
222
+ {
223
+ "type": "text",
224
+ "text": "Manipulation and Composition are important for a 3D representation’s practical usage. Explicit 3D representations, e.g., meshes, are natively editable and composable. However, neural network-based implicit representations like a vanilla NeRF is difficult to perform such operations. NSVF [21] can composite separate objects together, but these objects have to be trained together using a shared MLP, which limits its flexibility and potential usage. Later works [45, 29, 13, 19] learn object-compositional NeRF, but are usually scene-specific and do not allow cross-scene composition without retraining. Geometry and appearance editing [22, 42] of neural fields also requires an extra optimization step to modify the neural network-based representation. With the explicit sparse voxel representation, Plenoxels [36] naturally supports direct composition of different objects, but suffers from the large storage on the dense index matrix. Our method also supports arbitrary affine transformations and compositions without extra optimization. Further, we can efficiently mitigate the model size growth due to the compact tensor rank decomposition and the compressibility. ",
225
+ "bbox": [
226
+ 174,
227
+ 744,
228
+ 825,
229
+ 911
230
+ ],
231
+ "page_idx": 2
232
+ },
233
+ {
234
+ "type": "image",
235
+ "img_path": "images/e1b5dcf7a911e3f2e62b1fa494065264baf201f3c861c31390038eea63a4cad2.jpg",
236
+ "image_caption": [
237
+ "Figure 2: Model structure. Our model is composed of a matrix storing rank weights for different feature channels, and a set of decomposed rank components. Each rank component can be either vectoror matrix-based, and the ratio can be controlled to trade off between model size and performance. To query any 3D coordinate, we first project it to the decomposed vectors or matrices as denoted by the black lines, and then perform weighted interpolation. $| |$ denotes concatenation along the rank dimension. "
238
+ ],
239
+ "image_footnote": [],
240
+ "bbox": [
241
+ 171,
242
+ 97,
243
+ 823,
244
+ 285
245
+ ],
246
+ "page_idx": 3
247
+ },
248
+ {
249
+ "type": "text",
250
+ "text": "3 Methodology ",
251
+ "text_level": 1,
252
+ "bbox": [
253
+ 174,
254
+ 402,
255
+ 315,
256
+ 420
257
+ ],
258
+ "page_idx": 3
259
+ },
260
+ {
261
+ "type": "text",
262
+ "text": "3.1 Preliminaries on Neural Radiance Fields ",
263
+ "text_level": 1,
264
+ "bbox": [
265
+ 173,
266
+ 434,
267
+ 496,
268
+ 449
269
+ ],
270
+ "page_idx": 3
271
+ },
272
+ {
273
+ "type": "text",
274
+ "text": "Neural Radiance Fields (NeRF) [26] represents a 3D volumetric scene with a 5D function $f _ { \\Theta }$ that maps a 3D coordinate $\\mathbf { x } = ( x , y , z )$ and a 2D viewing direction $\\mathbf { d } = ( \\theta , \\phi )$ into a volume density $\\sigma$ and an emitted color $\\mathbf { c } = ( r , g , b )$ . Given a ray $\\mathbf { r }$ originating at $\\mathbf { o }$ with direction $\\mathbf { d }$ , we query $f _ { \\Theta }$ at points $\\mathbf x _ { i } = \\mathbf o + t _ { i } \\mathbf d$ sequentially sampled along the ray to get densities $\\{ \\sigma _ { i } \\}$ and colors $\\{ \\mathbf { c } _ { i } \\}$ . The color of the pixel corresponding to the ray is then estimated by numerical quadrature: ",
275
+ "bbox": [
276
+ 173,
277
+ 459,
278
+ 825,
279
+ 530
280
+ ],
281
+ "page_idx": 3
282
+ },
283
+ {
284
+ "type": "equation",
285
+ "img_path": "images/57c96049d18528dbcd0380f6f995a65ab342eaeab88b59ab594f846b5b28d0be.jpg",
286
+ "text": "$$\n\\hat { \\mathbf { C } } ( \\mathbf { r } ) = \\sum _ { i } T _ { i } \\alpha _ { i } \\mathbf { c } _ { i } , T _ { i } = \\prod _ { j < i } ( 1 - \\alpha _ { j } ) , \\alpha _ { i } = 1 - \\exp ( - \\sigma _ { i } \\delta _ { i } ) , \\delta _ { i } = t _ { i + 1 } - t _ { i }\n$$",
287
+ "text_format": "latex",
288
+ "bbox": [
289
+ 245,
290
+ 535,
291
+ 751,
292
+ 570
293
+ ],
294
+ "page_idx": 3
295
+ },
296
+ {
297
+ "type": "text",
298
+ "text": "where $\\delta _ { i }$ is the step size, $\\alpha _ { i }$ is the opacity, and $T _ { i }$ is the transmittance. Since this volume rendering process is differentiable, NeRF can be optimized only from 2D image supervision by minimizing the L2 difference between each pixel’s predicted color $\\hat { \\mathbf { C } } ( \\mathbf { r } )$ and the ground truth color $\\mathbf { C } ( \\mathbf { r } )$ from the image: ",
299
+ "bbox": [
300
+ 173,
301
+ 577,
302
+ 825,
303
+ 635
304
+ ],
305
+ "page_idx": 3
306
+ },
307
+ {
308
+ "type": "equation",
309
+ "img_path": "images/52cf880befa28fec4f12bf8cacfed972a0733394dce38cb714cf4b055e45c28e.jpg",
310
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { N e R F } } = \\sum _ { \\mathbf { r } } | | \\mathbf { C } ( \\mathbf { r } ) - \\hat { \\mathbf { C } } ( \\mathbf { r } ) | | _ { 2 } ^ { 2 }\n$$",
311
+ "text_format": "latex",
312
+ "bbox": [
313
+ 397,
314
+ 632,
315
+ 602,
316
+ 665
317
+ ],
318
+ "page_idx": 3
319
+ },
320
+ {
321
+ "type": "text",
322
+ "text": "3.2 Preliminaries on Tensor Decomposition ",
323
+ "text_level": 1,
324
+ "bbox": [
325
+ 174,
326
+ 680,
327
+ 488,
328
+ 695
329
+ ],
330
+ "page_idx": 3
331
+ },
332
+ {
333
+ "type": "text",
334
+ "text": "For a 3D tensor $\\mathcal { T } \\in \\mathbb { R } ^ { H \\times W \\times D }$ , each element $\\mathcal { T } _ { i , j , k } \\ \\in \\ \\mathbb { R }$ can be represented via the Tucker decomposition [40] by: ",
335
+ "bbox": [
336
+ 174,
337
+ 704,
338
+ 823,
339
+ 733
340
+ ],
341
+ "page_idx": 3
342
+ },
343
+ {
344
+ "type": "equation",
345
+ "img_path": "images/1a00c5e4e85011a212e2fd8b7889aa7112641062b30e756e499132e4805eacb6.jpg",
346
+ "text": "$$\n\\mathcal { T } _ { i , j , k } = \\sum _ { p = 1 } ^ { P } \\sum _ { q = 1 } ^ { Q } \\sum _ { r = 1 } ^ { R } S _ { p , q , r } \\mathbf { U } _ { i , p } ^ { x } \\mathbf { U } _ { j , q } ^ { y } \\mathbf { U } _ { k , r } ^ { z }\n$$",
347
+ "text_format": "latex",
348
+ "bbox": [
349
+ 362,
350
+ 731,
351
+ 633,
352
+ 777
353
+ ],
354
+ "page_idx": 3
355
+ },
356
+ {
357
+ "type": "text",
358
+ "text": "where $\\pmb { S } \\in \\mathbb { R } ^ { P \\times Q \\times R }$ is the core tensor, $P , Q , R$ are the number of components along each axis, and ${ \\bf U } ^ { x } \\in \\mathbb { R } ^ { H \\times P } , { \\bf U } ^ { y } \\in \\mathbb { R } ^ { W \\times Q } , { \\bf U } ^ { z } \\in \\bar { \\mathbb { R } } ^ { \\bar { D } \\times R }$ are the factor matrices. The CP decomposition can be viewed as a special case of Tucker when $P = Q = R$ and $s$ is superdiagonal [18] (i.e., $S _ { i , j , k } \\neq 0 \\Longleftrightarrow i = j = k )$ ): ",
359
+ "bbox": [
360
+ 173,
361
+ 780,
362
+ 826,
363
+ 837
364
+ ],
365
+ "page_idx": 3
366
+ },
367
+ {
368
+ "type": "equation",
369
+ "img_path": "images/eecf6b0ca6be6b6593d4ed9a70539db079c77bc648a49247e7d6fc3baec90468.jpg",
370
+ "text": "$$\n\\mathcal { T } _ { i , j , k } = \\sum _ { r = 1 } ^ { R } \\mathbf { s } _ { r } \\mathbf { U } _ { i , r } ^ { x } \\mathbf { U } _ { j , r } ^ { y } \\mathbf { U } _ { k , r } ^ { z }\n$$",
371
+ "text_format": "latex",
372
+ "bbox": [
373
+ 401,
374
+ 835,
375
+ 596,
376
+ 878
377
+ ],
378
+ "page_idx": 3
379
+ },
380
+ {
381
+ "type": "text",
382
+ "text": "where $\\mathbf { s } = \\mathrm { d i a g } ( \\mathcal { S } ) \\in \\mathbb { R } ^ { R }$ is the reduced core tensor (or rank weights). Although s is usually absorbed into the factor matrices, we write it out for the convenience of later discussion. ",
383
+ "bbox": [
384
+ 174,
385
+ 882,
386
+ 823,
387
+ 912
388
+ ],
389
+ "page_idx": 3
390
+ },
391
+ {
392
+ "type": "text",
393
+ "text": "3.3 Decompose NeRF without MLP ",
394
+ "text_level": 1,
395
+ "bbox": [
396
+ 174,
397
+ 90,
398
+ 434,
399
+ 106
400
+ ],
401
+ "page_idx": 4
402
+ },
403
+ {
404
+ "type": "text",
405
+ "text": "Hybrid Feature Volume Decomposition. We are interested in multi-feature volumetric encoded as a 4D tensor $\\mathcal { T } \\in \\mathbb { R } ^ { C \\times H \\times W \\times D }$ , where $C$ is the feature dimension (e.g., density, RGB values, or other features), and $( H , W , D )$ is the spatial resolution (usually $C \\ll \\operatorname* { m i n } ( H , W , D ) )$ . A straightforward way is to perform $C$ independent decompositions for each channel. However, different feature channels such as the RGB values are highly correlated in real 3D scenes. A more compact way is to share the factorized matrices like TensoRF [8], and only use different rank weights s for different channels. Therefore, we propose to represent $\\tau$ through the CP decomposition by: ",
406
+ "bbox": [
407
+ 173,
408
+ 116,
409
+ 825,
410
+ 214
411
+ ],
412
+ "page_idx": 4
413
+ },
414
+ {
415
+ "type": "equation",
416
+ "img_path": "images/6e0845825101271666ee39124c31eb927864eede21cb3edf3e7a7a919b09da83.jpg",
417
+ "text": "$$\n\\mathcal { T } _ { i , j , k } = \\mathbf { S } \\cdot ( \\mathbf { U } _ { i } ^ { x } * \\mathbf { U } _ { j } ^ { y } * \\mathbf { U } _ { k } ^ { z } )\n$$",
418
+ "text_format": "latex",
419
+ "bbox": [
420
+ 401,
421
+ 217,
422
+ 596,
423
+ 237
424
+ ],
425
+ "page_idx": 4
426
+ },
427
+ {
428
+ "type": "text",
429
+ "text": "where $\\mathbf { S } \\in \\mathbb { R } ^ { C \\times R }$ is the matrix of rank weights for $C$ channels, and $^ *$ denotes the Hadamard product. Since the above decomposition relies on rank-one vectors (1D tensors), it may require very high ranks to represent complex 3D scenes, which leads to expensive computation at each location. A less compact but more computation-friendly alternative is to adopt matrices (2D tensors) to factorize the 3D scene. This variant in the form of CP decomposition is given by: ",
430
+ "bbox": [
431
+ 173,
432
+ 241,
433
+ 825,
434
+ 310
435
+ ],
436
+ "page_idx": 4
437
+ },
438
+ {
439
+ "type": "equation",
440
+ "img_path": "images/840d97088159bd925036308372f89403a9937893784dea5125fd0f80e9d60b96.jpg",
441
+ "text": "$$\n\\mathcal { T } _ { i , j , k } = \\mathbf { S } \\cdot ( \\mathcal { U } _ { i , j } ^ { x , y } * \\mathcal { U } _ { j , k } ^ { y , z } * \\mathcal { U } _ { i , k } ^ { x , z } )\n$$",
442
+ "text_format": "latex",
443
+ "bbox": [
444
+ 390,
445
+ 314,
446
+ 606,
447
+ 334
448
+ ],
449
+ "page_idx": 4
450
+ },
451
+ {
452
+ "type": "text",
453
+ "text": "where $\\mathcal { U } ^ { x , y } \\in \\mathbb { R } ^ { H \\times W \\times R } , \\mathcal { U } ^ { y , z } \\in \\mathbb { R } ^ { W \\times D \\times R } , \\mathcal { U } ^ { x , z } \\in \\mathbb { R } ^ { H \\times D \\times R }$ are the factorized matrices along three planes, each containing $R$ components. This variant can be comprehended by first slicing and tiling the original 3D space along each axis, and then learning a CP decomposition on $\\mathbb { R } ^ { H W \\times W D \\times H D }$ Although this representation is less compact and takes more storage, recent works [8, 5] have shown that it is able to represent scenes with smaller $R$ and better quality. We denote this variant as the Triple Plane (TP) decomposition. Further, we notice that for each individual rank, the underlying vector- or matrix-based decomposition can be selected independently. Therefore, a hybrid variant (HY) that combines the above CP and TP decomposition is proposed. We can flexibly adjust the ratio of two decompositions by $R = R _ { \\mathrm { v e c } } + R _ { \\mathrm { m a t } }$ to trade off between model size and performance. The model structure is illustrated in Figure 2. ",
454
+ "bbox": [
455
+ 173,
456
+ 337,
457
+ 825,
458
+ 478
459
+ ],
460
+ "page_idx": 4
461
+ },
462
+ {
463
+ "type": "text",
464
+ "text": "Learning the Decomposition via Differentiable Rendering. For simplicity, we take the CP decomposition as an example. Our model only consists of four tensors to optimize, i.e., S $, \\mathbf { U } ^ { x } , \\mathbf { U } ^ { y } , \\mathbf { U } ^ { z }$ . To represent scenes through neural radiance fields, we need to learn the volume density $\\sigma$ and color c at ach location. As the volu with one feature channel only dependent on the 3D coordinate . However, the color is dependent on $\\mathbf { x }$ , we can representth the 3D location $\\mathcal { T } _ { i , j , k } ^ { \\mathrm { d e n s i t y } } \\in \\mathbb { R }$ $\\mathbf { x }$ and the 2D viewing direction $\\mathbf { d }$ , which is a 5D function in total. To represent it within the 3D feature volumes, we adopt the spherical harmonics (SH) functions to approximate the additional 2D viewing directions dependency [49, 36]. In particular, for spherical harmonics of maximum degree $\\ell _ { \\mathrm { m a x } }$ , it takes $( \\ell _ { \\mathrm { m a x } } + 1 ) ^ { 2 }$ SH coefficients to model the view-dependent color per channel. We use $\\mathcal { T } _ { i , j , k } ^ { \\kappa } \\in \\mathbb { R } ^ { ( \\ell _ { \\operatorname* { m a x } } + 1 ) ^ { 2 } } , \\kappa \\in \\{ r , g , b \\}$ to represent these coefficients. The density and color at each location (coordinate indices are omitted for simplicity) can then be represented with: ",
465
+ "bbox": [
466
+ 173,
467
+ 483,
468
+ 825,
469
+ 645
470
+ ],
471
+ "page_idx": 4
472
+ },
473
+ {
474
+ "type": "equation",
475
+ "img_path": "images/c83b3645f588084ecb76c6cb5442fd3faa453b6c900d9ff3d1856a7c0d46f6a1.jpg",
476
+ "text": "$$\n\\sigma = \\phi ( \\mathcal { T } ^ { \\mathrm { d e n s i t y } } ) ; c ^ { \\kappa } = \\psi ( \\sum _ { \\ell = 0 } ^ { \\ell _ { \\mathrm { m a x } } } \\sum _ { m = - \\ell } ^ { \\ell } \\mathcal { T } _ { \\ell , m } ^ { \\kappa } Y _ { \\ell } ^ { m } ( \\mathbf { d } ) ) , \\kappa \\in \\{ r , g , b \\}\n$$",
477
+ "text_format": "latex",
478
+ "bbox": [
479
+ 294,
480
+ 647,
481
+ 702,
482
+ 693
483
+ ],
484
+ "page_idx": 4
485
+ },
486
+ {
487
+ "type": "text",
488
+ "text": "where $\\phi ( \\cdot )$ is the density activation, $\\psi ( \\cdot )$ is the color activation, $\\mathbf { d }$ is the viewing direction, and $Y _ { \\ell } ^ { m }$ are the SH functions. Our model can then be optimized through the standard RGB loss in Equation 2. ",
489
+ "bbox": [
490
+ 173,
491
+ 696,
492
+ 826,
493
+ 726
494
+ ],
495
+ "page_idx": 4
496
+ },
497
+ {
498
+ "type": "text",
499
+ "text": "3.4 Rank-residual Learning for Compressibility ",
500
+ "text_level": 1,
501
+ "bbox": [
502
+ 173,
503
+ 739,
504
+ 517,
505
+ 756
506
+ ],
507
+ "page_idx": 4
508
+ },
509
+ {
510
+ "type": "text",
511
+ "text": "The idea of low-rank approximation is to only keep the most important rank components, where the importance of each rank component can be represented by the singular values in the SVD algorithm. Similarly, we can define the importance of each rank component in our decomposition by the rank weights $\\mathbf { S }$ averaged on all feature channels, and multiplied with the magnitude of three factor matrices along the rank dimension. However, the CP decomposition doesn’t hold this low-rank approximation property [18]. If we directly sort the rank components by the rank importance and truncate the model for compression, the rendering quality drops sharply compared to the optimal model (i.e., model retrained with the same parameters), as illustrated by the baseline method in Figure 3. ",
512
+ "bbox": [
513
+ 173,
514
+ 765,
515
+ 825,
516
+ 877
517
+ ],
518
+ "page_idx": 4
519
+ },
520
+ {
521
+ "type": "text",
522
+ "text": "We propose a rank-residual learning strategy to close this performance gap and achieve near-optimal compression results. This strategy aims to simulate SVD’s low-rank approximation property, where the lower rank components contain more information and contribute more to the approximation. Since the rank components in our method can be flexibly adjusted, a direct solution is to train in a progressive way. Suppose the total number of ranks is $R$ , and the number of training stages is $M$ . The total $R$ rank components can be sequentially divided into $M$ non-empty groups, and we denote the accumulated number of ranks for each group by $R _ { m }$ where $m \\in \\{ 1 , 2 , \\cdots , M \\}$ . We start from training the first $R _ { 1 }$ rank components, and after its convergence, we fix them and append the next $R _ { 2 } - R _ { 1 }$ rank components to train in a new stage. In the last stage, all $R$ ranks are involved. However, this is inefficient since we need to make sure each stage is fully converged before increasing the number of ranks. A more efficient way is to train all stages in parallel. In particular, we simultaneously supervise the sequentially accumulated outputs from all $M$ groups. This can be viewed as supervising the outputs from $M$ truncations of the decomposition with a rank-residual loss: ",
523
+ "bbox": [
524
+ 173,
525
+ 883,
526
+ 823,
527
+ 911
528
+ ],
529
+ "page_idx": 4
530
+ },
531
+ {
532
+ "type": "image",
533
+ "img_path": "images/c5cea6b97e70b34d604315f259907174a09e2041fc8106a010ef6da1143187a5.jpg",
534
+ "image_caption": [
535
+ "Figure 3: Compression at any rank. Combined with the empirical sort-and-truncate strategy, the proposed model achieves nearoptimal compression at any rank. We use the HY-S model on the LEGO dataset as an example, and the dashed lines indicate where we apply rank-residual supervision. "
536
+ ],
537
+ "image_footnote": [],
538
+ "bbox": [
539
+ 174,
540
+ 93,
541
+ 468,
542
+ 208
543
+ ],
544
+ "page_idx": 5
545
+ },
546
+ {
547
+ "type": "image",
548
+ "img_path": "images/0ecc8acb1ad7e105cb053cdc255af16b1c4713ce9161f1548c4826aafe7fb7d9.jpg",
549
+ "image_caption": [
550
+ "Figure 4: Visualization of rank importance. Ranks are sorted column-wisely based on the averaged rank importance. The rank importance is more concentrated in the proposed method (right) compared to the baseline (left), which is crucial for truncationbased compression. We use the HY model on the LEGO dataset as an example, and the dashed lines indicate where we apply rank-residual supervision. "
551
+ ],
552
+ "image_footnote": [],
553
+ "bbox": [
554
+ 486,
555
+ 92,
556
+ 816,
557
+ 191
558
+ ],
559
+ "page_idx": 5
560
+ },
561
+ {
562
+ "type": "text",
563
+ "text": "",
564
+ "bbox": [
565
+ 173,
566
+ 340,
567
+ 826,
568
+ 493
569
+ ],
570
+ "page_idx": 5
571
+ },
572
+ {
573
+ "type": "equation",
574
+ "img_path": "images/6b41b863419f4fd890469a0f7a3e17846d8bbd46eaf8173825dbc02450e7a44b.jpg",
575
+ "text": "$$\n\\mathcal { L } _ { \\mathrm { r e s i d u a l } } = \\sum _ { \\mathbf { r } \\in \\mathcal { R } } \\sum _ { m = 1 } ^ { M } | | \\mathbf { C } ( \\mathbf { r } ) - \\hat { \\mathbf { C } } _ { m } ( \\mathbf { r } ) | | _ { 2 } ^ { 2 }\n$$",
576
+ "text_format": "latex",
577
+ "bbox": [
578
+ 367,
579
+ 500,
580
+ 629,
581
+ 545
582
+ ],
583
+ "page_idx": 5
584
+ },
585
+ {
586
+ "type": "text",
587
+ "text": "where $\\hat { \\mathbf { C } } _ { m } ( \\mathbf { r } )$ is RGB values calculated from the truncated decomposition ${ \\bf S } _ { m } , { \\bf U } _ { m } ^ { x } , { \\bf U } _ { m } ^ { y } , { \\bf U } _ { m } ^ { z }$ which only keeps the first $R _ { m }$ rank components (taking the CP decomposition as an example). During training, each group is able to learn the residual error from previous groups, and eventually leads to the desired low-rank approximation property. Ideally, choosing $M = R$ groups assures this low-rank approximation property to hold at any targeted rank, but usually computationally unaffordable with a large $R$ . In practice we choose $M \\ll R$ , so the property only holds at those dividing ranks $\\{ R _ { m } \\}$ . For any other rank $R ^ { \\prime }$ , assuming $R _ { m } < R ^ { \\prime } < R _ { m + 1 }$ , we first keep the fully covered $R _ { m }$ rank components, and then use the empirical sort-and-truncate strategy to select the remaining $R ^ { \\prime } - R _ { m }$ ranks in the last group $\\{ R _ { m } + 1 , \\bar { R } _ { m } + 2 \\cdots , R _ { m + 1 } \\}$ . By selecting the top rank components with the largest average importance, it is enough to keep the near-optimal low-rank approximation property at any targeted ranks, as shown by the proposed method in Figure 3. ",
588
+ "bbox": [
589
+ 173,
590
+ 554,
591
+ 825,
592
+ 707
593
+ ],
594
+ "page_idx": 5
595
+ },
596
+ {
597
+ "type": "text",
598
+ "text": "The decomposition model trained with our rank-residual learning allows dynamic adjustment of model size and rendering quality with no extra optimization. In practice, we usually need different LODs to adapt to different cases, such as the texture mipmaps. While the other NeRF representations need to retrain for different LODs and store every model separately, we just train once and get a unified model for all LODs. Given a targeted storage upper bound or performance lower bound, we only need to select the targeted rank and truncate the decomposition with the simple slicing operation. ",
599
+ "bbox": [
600
+ 173,
601
+ 713,
602
+ 825,
603
+ 797
604
+ ],
605
+ "page_idx": 5
606
+ },
607
+ {
608
+ "type": "text",
609
+ "text": "3.5 Composability without Constraints ",
610
+ "text_level": 1,
611
+ "bbox": [
612
+ 176,
613
+ 813,
614
+ 457,
615
+ 828
616
+ ],
617
+ "page_idx": 5
618
+ },
619
+ {
620
+ "type": "text",
621
+ "text": "As illustrated in Figure 5, any 3D object or scene represented by our model can be composed without the constraints in previous work [21, 45]. Since our model describes each 3D scene with a set of rank components, composability is naturally accomplished by concatenating along the rank dimension and summing up the number of ranks $\\begin{array} { r } { R = \\sum _ { n = 1 } ^ { N } R _ { n } } \\end{array}$ , where $n$ denotes the object index. In practice, this is implemented by appending new rank components to a parameter list, so that models with different resolution and decomposition forms can be composed together. For each object, we record its number of ranks so we can still distinguish it from the whole scene. Arbitrary affine transformations of individual objects are supported by recording a transformation matrix $\\dot { \\mathbf { T } } _ { n } \\in \\mathbb { R } ^ { 4 \\times 4 }$ for each object, which includes the translation $\\mathbf { t } _ { n } \\in \\mathbb { R } ^ { 3 }$ , rotation ${ \\bf R } _ { n } \\in \\mathrm { S O } ( 3 )$ and scale $\\mathbf { s } _ { n } \\in \\mathbb { R } ^ { 3 }$ . We warp the ray into each object’s coordinate system before querying the density $\\{ \\sigma _ { i , n } \\}$ and color $\\{ \\mathbf { c } _ { i , n } \\}$ at the sampled points: ",
622
+ "bbox": [
623
+ 174,
624
+ 839,
625
+ 825,
626
+ 911
627
+ ],
628
+ "page_idx": 5
629
+ },
630
+ {
631
+ "type": "image",
632
+ "img_path": "images/3fb0d6c3726bc16a007586f8374d2c1c375e3deb063aec6e745877c75f87e36f.jpg",
633
+ "image_caption": [
634
+ "Figure 5: Compressing a scene composed of multiple objects. For a scene composed of lots of different objects, we can compress the less important objects to achieve better efficiency and less storage with a little sacrifice of rendering quality. "
635
+ ],
636
+ "image_footnote": [],
637
+ "bbox": [
638
+ 176,
639
+ 90,
640
+ 821,
641
+ 257
642
+ ],
643
+ "page_idx": 6
644
+ },
645
+ {
646
+ "type": "text",
647
+ "text": "",
648
+ "bbox": [
649
+ 174,
650
+ 334,
651
+ 825,
652
+ 417
653
+ ],
654
+ "page_idx": 6
655
+ },
656
+ {
657
+ "type": "equation",
658
+ "img_path": "images/11a4fd7495d9fdc77553798cd6bba38d0880b02627ac2141094aa636510b3169.jpg",
659
+ "text": "$$\n\\sigma _ { i , n } , \\mathbf { c } _ { i , n } = f _ { \\boldsymbol \\Theta } ( \\mathbf { T } _ { n } \\mathbf { x } _ { i } , \\mathbf { R } _ { n } \\mathbf { d } )\n$$",
660
+ "text_format": "latex",
661
+ "bbox": [
662
+ 401,
663
+ 416,
664
+ 596,
665
+ 434
666
+ ],
667
+ "page_idx": 6
668
+ },
669
+ {
670
+ "type": "text",
671
+ "text": "Here we assume the coordinate $\\mathbf { x } _ { i }$ is homogeneous, and the viewing direction $\\mathbf { d }$ is represented by a unit vector. To correctly handle the occlusion between different objects, we still sample one ray per pixel, and perform the composition at each sample point by: ",
672
+ "bbox": [
673
+ 174,
674
+ 435,
675
+ 825,
676
+ 478
677
+ ],
678
+ "page_idx": 6
679
+ },
680
+ {
681
+ "type": "equation",
682
+ "img_path": "images/fdc6e2d64600b6c208a33842ef454d7a388440e94c26d2407c568bf7889dfbdc.jpg",
683
+ "text": "$$\n\\left\\{ \\begin{array} { l l } { \\alpha _ { i } = 1 - \\exp ( - \\delta _ { i } \\sum _ { n = 1 } ^ { N } \\sigma _ { i , n } ) } \\\\ { \\mathbf { c } _ { i } = \\sum _ { n = 1 } ^ { N } \\varphi _ { N } ( \\sigma _ { i , n } ) \\mathbf { c } _ { i , n } } \\end{array} \\right.\n$$",
684
+ "text_format": "latex",
685
+ "bbox": [
686
+ 379,
687
+ 483,
688
+ 599,
689
+ 526
690
+ ],
691
+ "page_idx": 6
692
+ },
693
+ {
694
+ "type": "text",
695
+ "text": "We sum up the density from all objects to calculate opacity, and weight the color by the density after the softmax function $\\varphi _ { N }$ . The rendering formula in Equation 1 can then be applied to calculate the pixel color. Although the model size and rendering time grows linearly with the total number of ranks (complexity of the scene), we show in experiments that the compression property can be applied to mitigate the growth and improve efficiency. ",
696
+ "bbox": [
697
+ 174,
698
+ 530,
699
+ 825,
700
+ 601
701
+ ],
702
+ "page_idx": 6
703
+ },
704
+ {
705
+ "type": "text",
706
+ "text": "4 Experiments ",
707
+ "text_level": 1,
708
+ "bbox": [
709
+ 174,
710
+ 619,
711
+ 312,
712
+ 636
713
+ ],
714
+ "page_idx": 6
715
+ },
716
+ {
717
+ "type": "text",
718
+ "text": "4.1 Implementation Details ",
719
+ "text_level": 1,
720
+ "bbox": [
721
+ 174,
722
+ 650,
723
+ 377,
724
+ 665
725
+ ],
726
+ "page_idx": 6
727
+ },
728
+ {
729
+ "type": "text",
730
+ "text": "The model is implemented with the PyTorch framework [32]. The degree for SH coefficients is 3, which equals 48 channels for the color feature. We use the Adam optimizer [16] with an initial learning rate of 0.02 for the factorized matrices, and 0.001 for the singular values. All the experiments are performed on one NVIDIA V100 GPU. The resolution of the feature grid is determined by the total number of voxels $N$ and the bounding box, where $N$ is increased from $1 2 8 ^ { 3 }$ to $3 0 0 ^ { 3 }$ for HY models and $5 0 0 ^ { 3 }$ for CP models in early training steps. To accelerate rendering, we adopt the binary occupancy mask pruning technique as in [8, 27], and use separate rank components for density and color to avoid unnecessary querying in empty space. This occupancy mask is also used to shrink the initial bounding box for more precise modeling. We mainly carry out experiments on the NeRF-synthetic dataset [26] (CC BY 3.0 license) and the Tanks and Temples dataset [17] (CC BY-NC-SA 3.0 license). Please check the supplementary materials for more details. ",
731
+ "bbox": [
732
+ 174,
733
+ 674,
734
+ 825,
735
+ 828
736
+ ],
737
+ "page_idx": 6
738
+ },
739
+ {
740
+ "type": "text",
741
+ "text": "4.2 Compression Results ",
742
+ "text_level": 1,
743
+ "bbox": [
744
+ 174,
745
+ 843,
746
+ 357,
747
+ 858
748
+ ],
749
+ "page_idx": 6
750
+ },
751
+ {
752
+ "type": "text",
753
+ "text": "Firstly, We evaluate the compressibility of our model. Since the color components cost most of the total storage, we mainly focus on compressing the color components, and keep the density components fixed. Given the number of ranks $R$ , we first train two models with the original loss ",
754
+ "bbox": [
755
+ 176,
756
+ 869,
757
+ 823,
758
+ 911
759
+ ],
760
+ "page_idx": 6
761
+ },
762
+ {
763
+ "type": "image",
764
+ "img_path": "images/440fb15bcd764ce251c2e9118f22e9b583b824939d158ed24bfd4361e041371b.jpg",
765
+ "image_caption": [
766
+ "Figure 6: Visualization of compression. The baseline method deteriorates significantly, while our proposed method remains high rendering quality. "
767
+ ],
768
+ "image_footnote": [],
769
+ "bbox": [
770
+ 176,
771
+ 90,
772
+ 455,
773
+ 280
774
+ ],
775
+ "page_idx": 7
776
+ },
777
+ {
778
+ "type": "image",
779
+ "img_path": "images/82d225ebc903aee716e3d89e9a9f41b632a5d290ccc78cf2027bb673c04a27e1.jpg",
780
+ "image_caption": [
781
+ "Figure 7: Visualization of composition. We show composition between different models with our method. Our method can successfully handle occlusion and remain high-quality rendering. "
782
+ ],
783
+ "image_footnote": [],
784
+ "bbox": [
785
+ 475,
786
+ 95,
787
+ 815,
788
+ 263
789
+ ],
790
+ "page_idx": 7
791
+ },
792
+ {
793
+ "type": "text",
794
+ "text": "Table 1: Compression Results. We report the PSNR for different compression strategies. CP, $R _ { \\mathrm { v e c } } ^ { \\mathrm { d e n s i t y } } / R _ { \\mathrm { m a t } } ^ { \\mathrm { d e n s i t y } } { - } R _ { \\mathrm { v e c } } ^ { \\mathrm { c o l o r } } / R _ { \\mathrm { m a t } } ^ { \\mathrm { c o l o r } }$ model settings with different range of ranks. Ranks are denoted by. We emphasize how the proposed method improves over the truncate baseline, especially at highly compressed conditions. ",
795
+ "bbox": [
796
+ 174,
797
+ 363,
798
+ 825,
799
+ 421
800
+ ],
801
+ "page_idx": 7
802
+ },
803
+ {
804
+ "type": "table",
805
+ "img_path": "images/30c1eec53f70d7d9995a97cb48b7668ecbb389bc9c44ab215df81f66e429cb70.jpg",
806
+ "table_caption": [],
807
+ "table_footnote": [],
808
+ "table_body": "<table><tr><td>Model</td><td>Ranks</td><td>Resolution</td><td>Size (MB)</td><td>Optimal</td><td>Baseline</td><td>Proposed</td></tr><tr><td rowspan=\"4\">CP</td><td>96/0-384/0</td><td>500</td><td>4.4</td><td>30.78</td><td>30.78</td><td>30.55 (-0.23)</td></tr><tr><td>96/0-288/0</td><td>500</td><td>3.8</td><td>30.68</td><td>28.78</td><td>30.46 (+1.68)</td></tr><tr><td>96/0-192/0</td><td>500</td><td>3.2</td><td>30.38</td><td>26.95</td><td>30.15 (+3.20)</td></tr><tr><td>96/0-96/0</td><td>500</td><td>2.7</td><td>29.78</td><td>24.97</td><td>29.53 (+4.56)</td></tr><tr><td rowspan=\"5\">HY-S</td><td>96/0-96/64</td><td>300</td><td>68.9</td><td>31.54</td><td>31.54</td><td>31.22 (-0.32)</td></tr><tr><td>96/0-96/32</td><td>300</td><td>35.2</td><td>31.36</td><td>27.57</td><td>31.09 (+3.52)</td></tr><tr><td>96/0-96/16</td><td>300</td><td>18.4</td><td>31.04</td><td>25.66</td><td>30.83 (+5.17)</td></tr><tr><td>96/0-96/4</td><td>300</td><td>5.7</td><td>30.40</td><td>24.24</td><td>30.13 (+5.89)</td></tr><tr><td>96/0-96/0</td><td>300</td><td>1.5</td><td>29.49</td><td>23.54</td><td>29.30 (+5.76)</td></tr><tr><td rowspan=\"4\">HY</td><td>64/16-256/64</td><td>300</td><td>88.0</td><td>32.43</td><td>32.43</td><td>32.36(-0.07)</td></tr><tr><td>64/16-192/48</td><td>300</td><td>70.8</td><td>32.42</td><td>30.63</td><td>32.35 (+1.72)</td></tr><tr><td>64/16-128/32</td><td>300</td><td>53.7</td><td>32.31</td><td>28.50</td><td>32.29 (+4.09)</td></tr><tr><td>64/16-64/16</td><td>300</td><td>36.5</td><td>31.96</td><td>26.30</td><td>31.94 (+5.64)</td></tr></table>",
809
+ "bbox": [
810
+ 196,
811
+ 435,
812
+ 803,
813
+ 636
814
+ ],
815
+ "page_idx": 7
816
+ },
817
+ {
818
+ "type": "text",
819
+ "text": "$\\mathcal { L } _ { \\mathrm { N e R F } }$ in Equation 2 and our rank-residual loss $\\mathcal { L } _ { \\mathrm { r e s i d u a l } }$ in Equation 8. We denote them as $\\mathcal { M } _ { R }$ and ${ \\mathcal { M } } _ { R } ^ { \\mathrm { o u r s } }$ , respectively. At any targeted rank $r \\leq R$ to compress, we design three strategies to verify whether the proposed compression is near-optimal: (1) Retrain a model $\\mathcal { M } _ { r }$ with $\\mathcal { L } _ { \\mathrm { N e R F } }$ at the given rank. This requires a retraining from scratch, and can be viewed as the optimal compression result at the given rank. (2) Sort and truncate the rank of the original model $\\mathcal { M } _ { R }$ to ${ \\mathcal { M } } _ { r } ^ { \\mathrm { b a s e } }$ , which can be viewed as the baseline compression result. (3) Sort and truncate the rank of the proposed model ${ \\mathcal { M } } _ { R } ^ { \\mathrm { o u r s } }$ to $\\mathcal { M } _ { r } ^ { \\mathrm { o u r s } }$ . We denote these three settings as ‘Optimal’, ‘Baseline’, and ‘Proposed’ respectively. ",
820
+ "bbox": [
821
+ 174,
822
+ 669,
823
+ 825,
824
+ 767
825
+ ],
826
+ "page_idx": 7
827
+ },
828
+ {
829
+ "type": "text",
830
+ "text": "The quantitative results are listed in Table 1. We find that the performance of the baseline method degrades significantly compared to the optimal method, whereas our proposed method is comparable to the optimal method at all targeted ranks. The visualization in Figure 6 demonstrates how the baseline model gradually deteriorates compared to the proposed model. Note that at the the right-most column where the baseline model is not compressed and the same as the optimal model, the rendering quality of the proposed model is hard to discern from the optimal model. In Figure 3, we show that even though our model is only supervised at 5 discrete ranks, it can remain good compression quality at any other ranks. Figure 3 provides an explanation for the compressibility of our model. With the rank-residual learning, the rank importance is more concentrated to the lower ranks, which benefits the low-rank approximation. ",
831
+ "bbox": [
832
+ 173,
833
+ 772,
834
+ 825,
835
+ 911
836
+ ],
837
+ "page_idx": 7
838
+ },
839
+ {
840
+ "type": "table",
841
+ "img_path": "images/155b87b12df3fa49cedd1ce2889d3a43e6fa55a7c315eb75c40f65f1809c920e.jpg",
842
+ "table_caption": [
843
+ "Table 2: Comparison with recent methods. Our method achieves comparable results while enabling both capability of compression and composition. "
844
+ ],
845
+ "table_footnote": [],
846
+ "table_body": "<table><tr><td></td><td></td><td colspan=\"2\">Capability</td><td colspan=\"2\">Synthetic-NeRF</td><td colspan=\"2\">TanksTemples</td></tr><tr><td>Method</td><td>Size (MB)</td><td>Composable</td><td>Compressible</td><td>PSNR↑</td><td>SSIM↑</td><td>PSNR↑</td><td>SSIM↑</td></tr><tr><td>SRN [38]</td><td>-</td><td>X</td><td>X</td><td>22.26</td><td>0.846</td><td>24.10</td><td>0.847</td></tr><tr><td>NeRF[26]</td><td>5.0</td><td>×</td><td>X</td><td>31.01</td><td>0.947</td><td>25.78</td><td>0.864</td></tr><tr><td>NSVF [21]</td><td>1</td><td>√</td><td>X</td><td>31.75</td><td>0.953</td><td>28.48</td><td>0.901</td></tr><tr><td>SNeRG[15]</td><td>1771.5</td><td>X</td><td>X</td><td>30.38</td><td>0.950</td><td>1</td><td>-</td></tr><tr><td>PlenOctrees [49]</td><td>1976.3</td><td>√</td><td>X</td><td>31.71</td><td>1</td><td>27.99</td><td>0.917</td></tr><tr><td>Plenoxels [36]</td><td>778.1</td><td>√</td><td>X</td><td>31.71</td><td>-</td><td>27.43</td><td>0.906</td></tr><tr><td>DVGO [39]</td><td>612.1</td><td>X</td><td>X</td><td>31.95</td><td>0.975</td><td>28.41</td><td>0.911</td></tr><tr><td>TensoRF-CP-384 [8]</td><td>3.9</td><td>X</td><td>X</td><td>31.56</td><td>0.949</td><td>27.59</td><td>0.897</td></tr><tr><td>TensoRF-VM-192 [8]</td><td>71.8</td><td>X</td><td>X</td><td>33.14</td><td>0.963</td><td>28.56</td><td>0.920</td></tr><tr><td>Instant-NGP [27]</td><td>63.3</td><td>X</td><td>X</td><td>33.18</td><td>1</td><td>-</td><td>-</td></tr><tr><td>Ours-CP</td><td>4.4</td><td>√</td><td>√</td><td>30.55</td><td>0.935</td><td>27.01</td><td>0.878</td></tr><tr><td>Ours-HY-S</td><td>68.9</td><td>√</td><td>√</td><td>31.22</td><td>0.947</td><td>27.52</td><td>0.900</td></tr><tr><td>Ours-HY</td><td>88.0</td><td>√</td><td>√</td><td>32.37</td><td>0.955</td><td>28.08</td><td>0.913</td></tr></table>",
847
+ "bbox": [
848
+ 176,
849
+ 131,
850
+ 820,
851
+ 344
852
+ ],
853
+ "page_idx": 8
854
+ },
855
+ {
856
+ "type": "text",
857
+ "text": "4.3 Composition Results ",
858
+ "text_level": 1,
859
+ "bbox": [
860
+ 174,
861
+ 377,
862
+ 356,
863
+ 392
864
+ ],
865
+ "page_idx": 8
866
+ },
867
+ {
868
+ "type": "text",
869
+ "text": "In Figure 7, we demonstrate the composability of our method. Without extra optimization, we are able to perform affine transformation and composition of different models like composing meshes in a 3D editor. Note that our model can correctly handle the occlusion and collision between different objects. In Figure 5, we combine the compression capability of our model in scene composition. In a complex scene composed of lots of objects, we can compress the less important objects to make a trade-off between the model size and rendering quality. ",
870
+ "bbox": [
871
+ 174,
872
+ 402,
873
+ 825,
874
+ 486
875
+ ],
876
+ "page_idx": 8
877
+ },
878
+ {
879
+ "type": "text",
880
+ "text": "4.4 Comparisons and Discussion ",
881
+ "text_level": 1,
882
+ "bbox": [
883
+ 176,
884
+ 502,
885
+ 413,
886
+ 517
887
+ ],
888
+ "page_idx": 8
889
+ },
890
+ {
891
+ "type": "text",
892
+ "text": "Rendering Quality. We compare our method with some recent works in Table 2. We focus on the extra capabilities to facilitate practical applications, but not boosting the rendering quality over the previous state-of-the-arts, since the vanilla NeRF [26] already reaches photo-realistic rendering in most cases. Although the performance of the proposed method is not the best, the simple model design with the extra compressibility and composability is unique and enables various applications. ",
893
+ "bbox": [
894
+ 174,
895
+ 527,
896
+ 825,
897
+ 598
898
+ ],
899
+ "page_idx": 8
900
+ },
901
+ {
902
+ "type": "text",
903
+ "text": "MLP Renderers. As discussed in [8, 27], the absence of a small MLP renderer network generally leads to worse performance, especially for the specular details. However, these renderers are trained separately and cannot be shared across scenes unless explicitly restricted, which causes inconvenience or limits the potency of composition. We therefore discard the MLP at the cost of a slightly worse rendering quality, but facilitates the composition and compression. ",
904
+ "bbox": [
905
+ 174,
906
+ 603,
907
+ 825,
908
+ 674
909
+ ],
910
+ "page_idx": 8
911
+ },
912
+ {
913
+ "type": "text",
914
+ "text": "Limitations. Although our method can correctly compose the geometry of multiple objects, we don’t consider the lighting conditions. Our model bakes lighting conditions into the color like the vanilla NeRF, and cannot perform re-lighting to achieve consistent lighting effect after composition. A future direction is to integrate the reflectance models [3, 52]. Besides, we only support modeling bounded objects for now. A background model [51] can be combined to simulate unbounded scenes. ",
915
+ "bbox": [
916
+ 174,
917
+ 679,
918
+ 825,
919
+ 750
920
+ ],
921
+ "page_idx": 8
922
+ },
923
+ {
924
+ "type": "text",
925
+ "text": "5 Conclusion ",
926
+ "text_level": 1,
927
+ "bbox": [
928
+ 174,
929
+ 768,
930
+ 299,
931
+ 786
932
+ ],
933
+ "page_idx": 8
934
+ },
935
+ {
936
+ "type": "text",
937
+ "text": "In this work, we present a novel compressible and composable neural radiance field representation. Our model is designed to be simple and flexible, yet still being effective enough to render photorealistic images. A rank-residual learning strategy is proposed to enable near-optimal low-rank approximation, which allows dynamic adjustment of the model size to support different LODs in different scenarios. All models represented with our method can be arbitrarily transformed and composed together like in a 3D editor. Powered by these properties, we are able to efficiently and conveniently manipulate complex scenes with multiple objects. We believe our method will further facilitate the NeRF-based scene representation in real-world applications. ",
938
+ "bbox": [
939
+ 174,
940
+ 800,
941
+ 825,
942
+ 911
943
+ ],
944
+ "page_idx": 8
945
+ },
946
+ {
947
+ "type": "text",
948
+ "text": "Acknowledgements. This work is supported by the National Key Research and Development Program of China (2020YFB1708002), National Natural Science Foundation of China (61632003, 61375022, 61403005), Grant SCITLAB-20017 of Intelligent Terminal Key Laboratory of SiChuan Province, Beijing Advanced Innovation Center for Intelligent Robots and Systems (2018IRS11), and PEK-SenseTime Joint Laboratory of Machine Vision. ",
949
+ "bbox": [
950
+ 174,
951
+ 92,
952
+ 826,
953
+ 161
954
+ ],
955
+ "page_idx": 9
956
+ },
957
+ {
958
+ "type": "text",
959
+ "text": "References ",
960
+ "text_level": 1,
961
+ "bbox": [
962
+ 174,
963
+ 180,
964
+ 267,
965
+ 196
966
+ ],
967
+ "page_idx": 9
968
+ },
969
+ {
970
+ "type": "text",
971
+ "text": "[1] Jonathan T. Barron, Ben Mildenhall, Matthew Tancik, Peter Hedman, Ricardo Martin-Brualla, and Pratul P. Srinivasan. Mip-nerf: A multiscale representation for anti-aliasing neural radiance fields, 2021. \n[2] Jonathan T Barron, Ben Mildenhall, Dor Verbin, Pratul P Srinivasan, and Peter Hedman. Mip-nerf 360: Unbounded anti-aliased neural radiance fields. arXiv preprint arXiv:2111.12077, 2021. \n[3] Mark Boss, Raphael Braun, Varun Jampani, Jonathan T. Barron, Ce Liu, and Hendrik P.A. Lensch. Nerd: Neural reflectance decomposition from image collections. In ICCV, 2021. \n[4] J Douglas Carroll and Jih-Jie Chang. Analysis of individual differences in multidimensional scaling via an n-way generalization of “eckart-young” decomposition. Psychometrika, 35(3):283– 319, 1970. \n[5] Eric R Chan, Connor Z Lin, Matthew A Chan, Koki Nagano, Boxiao Pan, Shalini De Mello, Orazio Gallo, Leonidas Guibas, Jonathan Tremblay, Sameh Khamis, et al. Efficient geometryaware 3d generative adversarial networks. arXiv preprint arXiv:2112.07945, 2021. \n[6] Eric R Chan, Marco Monteiro, Petr Kellnhofer, Jiajun Wu, and Gordon Wetzstein. pi-gan: Periodic implicit generative adversarial networks for 3d-aware image synthesis. In CVPR, pages 5799–5809, 2021. \n[7] Zhiqin Chen and Hao Zhang. Learning implicit fields for generative shape modeling. In CVPR, pages 5939–5948, 2019. \n[8] Anpei Chen, Zexiang Xu, Andreas Geiger, Jingyi Yu, and Hao Su. Tensorf: Tensorial radiance fields. arXiv preprint arXiv:2203.09517, 2022. \n[9] Blender Online Community. Blender - a 3D modelling and rendering package. Blender Foundation, Stichting Blender Foundation, Amsterdam, 2018. \n[10] Lieven De Lathauwer, Bart De Moor, and Joos Vandewalle. A multilinear singular value decomposition. SIAM journal on Matrix Analysis and Applications, 21(4):1253–1278, 2000. \n[11] Lieven De Lathauwer. Decompositions of a higher-order tensor in block terms—part ii: Definitions and uniqueness. SIAM Journal on Matrix Analysis and Applications, 30(3):1033–1066, 2008. \n[12] Lars Grasedyck. Hierarchical singular value decomposition of tensors. SIAM journal on matrix analysis and applications, 31(4):2029–2054, 2010. \n[13] Michelle Guo, Alireza Fathi, Jiajun Wu, and Thomas Funkhouser. Object-centric neural scene rendering. arXiv preprint arXiv:2012.08503, 2020. \n[14] Richard A Harshman et al. Foundations of the parafac procedure: Models and conditions for an\" explanatory\" multimodal factor analysis. 1970. \n[15] Peter Hedman, Pratul P Srinivasan, Ben Mildenhall, Jonathan T Barron, and Paul Debevec. Baking neural radiance fields for real-time view synthesis. In ICCV, pages 5875–5884, 2021. \n[16] Diederik P Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. \n[17] Arno Knapitsch, Jaesik Park, Qian-Yi Zhou, and Vladlen Koltun. Tanks and temples: Benchmarking large-scale scene reconstruction. ACM Transactions on Graphics (ToG), 36(4):1–13, 2017. ",
972
+ "bbox": [
973
+ 171,
974
+ 193,
975
+ 828,
976
+ 915
977
+ ],
978
+ "page_idx": 9
979
+ },
980
+ {
981
+ "type": "text",
982
+ "text": "[18] Tamara G. Kolda and Brett W. Bader. Tensor decompositions and applications. SIAM Rev., 51:455–500, 2009. ",
983
+ "bbox": [
984
+ 171,
985
+ 90,
986
+ 826,
987
+ 119
988
+ ],
989
+ "page_idx": 10
990
+ },
991
+ {
992
+ "type": "text",
993
+ "text": "[19] Verica Lazova, Vladimir Guzov, Kyle Olszewski, Sergey Tulyakov, and Gerard Pons-Moll. Control-nerf: Editable feature volumes for scene rendering and manipulation. arXiv preprint arXiv:2204.10850, 2022. ",
994
+ "bbox": [
995
+ 176,
996
+ 128,
997
+ 825,
998
+ 172
999
+ ],
1000
+ "page_idx": 10
1001
+ },
1002
+ {
1003
+ "type": "text",
1004
+ "text": "[20] Zhengqi Li, Simon Niklaus, Noah Snavely, and Oliver Wang. Neural scene flow fields for space-time view synthesis of dynamic scenes. In CVPR, pages 6498–6508, 2021. ",
1005
+ "bbox": [
1006
+ 173,
1007
+ 181,
1008
+ 821,
1009
+ 212
1010
+ ],
1011
+ "page_idx": 10
1012
+ },
1013
+ {
1014
+ "type": "text",
1015
+ "text": "[21] Lingjie Liu, Jiatao Gu, Kyaw Zaw Lin, Tat-Seng Chua, and Christian Theobalt. Neural sparse voxel fields. NeurIPS, 2020. ",
1016
+ "bbox": [
1017
+ 173,
1018
+ 219,
1019
+ 823,
1020
+ 250
1021
+ ],
1022
+ "page_idx": 10
1023
+ },
1024
+ {
1025
+ "type": "text",
1026
+ "text": "[22] Steven Liu, Xiuming Zhang, Zhoutong Zhang, Richard Zhang, Jun-Yan Zhu, and Bryan Russell. Editing conditional radiance fields. In ICCV, pages 5773–5783, 2021. ",
1027
+ "bbox": [
1028
+ 171,
1029
+ 258,
1030
+ 823,
1031
+ 287
1032
+ ],
1033
+ "page_idx": 10
1034
+ },
1035
+ {
1036
+ "type": "text",
1037
+ "text": "[23] Stephen Lombardi, Tomas Simon, Jason Saragih, Gabriel Schwartz, Andreas Lehrmann, and Yaser Sheikh. Neural volumes: Learning dynamic renderable volumes from images. arXiv preprint arXiv:1906.07751, 2019. ",
1038
+ "bbox": [
1039
+ 174,
1040
+ 296,
1041
+ 825,
1042
+ 340
1043
+ ],
1044
+ "page_idx": 10
1045
+ },
1046
+ {
1047
+ "type": "text",
1048
+ "text": "[24] Ricardo Martin-Brualla, Noha Radwan, Mehdi SM Sajjadi, Jonathan T Barron, Alexey Dosovitskiy, and Daniel Duckworth. Nerf in the wild: Neural radiance fields for unconstrained photo collections. In CVPR, pages 7210–7219, 2021. ",
1049
+ "bbox": [
1050
+ 173,
1051
+ 348,
1052
+ 823,
1053
+ 392
1054
+ ],
1055
+ "page_idx": 10
1056
+ },
1057
+ {
1058
+ "type": "text",
1059
+ "text": "[25] Ben Mildenhall, Pratul P Srinivasan, Rodrigo Ortiz-Cayon, Nima Khademi Kalantari, Ravi Ramamoorthi, Ren Ng, and Abhishek Kar. Local light field fusion: Practical view synthesis with prescriptive sampling guidelines. ACM Transactions on Graphics (TOG), 38(4):1–14, 2019. ",
1060
+ "bbox": [
1061
+ 176,
1062
+ 401,
1063
+ 823,
1064
+ 445
1065
+ ],
1066
+ "page_idx": 10
1067
+ },
1068
+ {
1069
+ "type": "text",
1070
+ "text": "[26] 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 ECCV, 2020. ",
1071
+ "bbox": [
1072
+ 176,
1073
+ 453,
1074
+ 823,
1075
+ 496
1076
+ ],
1077
+ "page_idx": 10
1078
+ },
1079
+ {
1080
+ "type": "text",
1081
+ "text": "[27] Thomas Müller, Alex Evans, Christoph Schied, and Alexander Keller. Instant neural graphics primitives with a multiresolution hash encoding. arXiv:2201.05989, January 2022. ",
1082
+ "bbox": [
1083
+ 169,
1084
+ 506,
1085
+ 825,
1086
+ 535
1087
+ ],
1088
+ "page_idx": 10
1089
+ },
1090
+ {
1091
+ "type": "text",
1092
+ "text": "[28] Jacob Munkberg, Jon Hasselgren, Tianchang Shen, Jun Gao, Wenzheng Chen, Alex Evans, Thomas Müller, and Sanja Fidler. Extracting triangular 3d models, materials, and lighting from images. arXiv preprint arXiv:2111.12503, 2021. ",
1093
+ "bbox": [
1094
+ 174,
1095
+ 544,
1096
+ 821,
1097
+ 587
1098
+ ],
1099
+ "page_idx": 10
1100
+ },
1101
+ {
1102
+ "type": "text",
1103
+ "text": "[29] Michael Niemeyer and Andreas Geiger. Giraffe: Representing scenes as compositional generative neural feature fields. In CVPR, pages 11453–11464, 2021. ",
1104
+ "bbox": [
1105
+ 173,
1106
+ 597,
1107
+ 823,
1108
+ 626
1109
+ ],
1110
+ "page_idx": 10
1111
+ },
1112
+ {
1113
+ "type": "text",
1114
+ "text": "[30] Jeong Joon Park, Peter Florence, Julian Straub, Richard Newcombe, and Steven Lovegrove. Deepsdf: Learning continuous signed distance functions for shape representation. In CVPR, pages 165–174, 2019. ",
1115
+ "bbox": [
1116
+ 176,
1117
+ 635,
1118
+ 825,
1119
+ 678
1120
+ ],
1121
+ "page_idx": 10
1122
+ },
1123
+ {
1124
+ "type": "text",
1125
+ "text": "[31] Keunhong Park, Utkarsh Sinha, Jonathan T Barron, Sofien Bouaziz, Dan B Goldman, Steven M Seitz, and Ricardo Martin-Brualla. Nerfies: Deformable neural radiance fields. In ICCV, pages 5865–5874, 2021. ",
1126
+ "bbox": [
1127
+ 173,
1128
+ 686,
1129
+ 825,
1130
+ 731
1131
+ ],
1132
+ "page_idx": 10
1133
+ },
1134
+ {
1135
+ "type": "text",
1136
+ "text": "[32] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, et al. Pytorch: An imperative style, high-performance deep learning library. NeurIPS, 32, 2019. ",
1137
+ "bbox": [
1138
+ 176,
1139
+ 739,
1140
+ 826,
1141
+ 784
1142
+ ],
1143
+ "page_idx": 10
1144
+ },
1145
+ {
1146
+ "type": "text",
1147
+ "text": "[33] Charles R Qi, Hao Su, Matthias Nießner, Angela Dai, Mengyuan Yan, and Leonidas J Guibas. Volumetric and multi-view cnns for object classification on 3d data. In CVPR, pages 5648–5656, 2016. ",
1148
+ "bbox": [
1149
+ 173,
1150
+ 791,
1151
+ 825,
1152
+ 834
1153
+ ],
1154
+ "page_idx": 10
1155
+ },
1156
+ {
1157
+ "type": "text",
1158
+ "text": "[34] Charles R Qi, Hao Su, Kaichun Mo, and Leonidas J Guibas. Pointnet: Deep learning on point sets for 3d classification and segmentation. In CVPR, pages 652–660, 2017. ",
1159
+ "bbox": [
1160
+ 173,
1161
+ 844,
1162
+ 823,
1163
+ 873
1164
+ ],
1165
+ "page_idx": 10
1166
+ },
1167
+ {
1168
+ "type": "text",
1169
+ "text": "[35] Christian Reiser, Songyou Peng, Yiyi Liao, and Andreas Geiger. Kilonerf: Speeding up neural radiance fields with thousands of tiny mlps. In ICCV, pages 14335–14345, 2021. ",
1170
+ "bbox": [
1171
+ 174,
1172
+ 882,
1173
+ 818,
1174
+ 912
1175
+ ],
1176
+ "page_idx": 10
1177
+ },
1178
+ {
1179
+ "type": "text",
1180
+ "text": "[36] Sara Fridovich-Keil and Alex Yu, Matthew Tancik, Qinhong Chen, Benjamin Recht, and Angjoo Kanazawa. Plenoxels: Radiance fields without neural networks. In CVPR, 2022. ",
1181
+ "bbox": [
1182
+ 171,
1183
+ 90,
1184
+ 823,
1185
+ 119
1186
+ ],
1187
+ "page_idx": 11
1188
+ },
1189
+ {
1190
+ "type": "text",
1191
+ "text": "[37] Katja Schwarz, Yiyi Liao, Michael Niemeyer, and Andreas Geiger. Graf: Generative radiance fields for 3d-aware image synthesis. NeurIPS, 33:20154–20166, 2020. ",
1192
+ "bbox": [
1193
+ 171,
1194
+ 128,
1195
+ 823,
1196
+ 159
1197
+ ],
1198
+ "page_idx": 11
1199
+ },
1200
+ {
1201
+ "type": "text",
1202
+ "text": "[38] Vincent Sitzmann, Michael Zollhöfer, and Gordon Wetzstein. Scene representation networks: Continuous 3d-structure-aware neural scene representations. In NeurIPS, 2019. ",
1203
+ "bbox": [
1204
+ 171,
1205
+ 165,
1206
+ 823,
1207
+ 195
1208
+ ],
1209
+ "page_idx": 11
1210
+ },
1211
+ {
1212
+ "type": "text",
1213
+ "text": "[39] Cheng Sun, Min Sun, and Hwann-Tzong Chen. Direct voxel grid optimization: Super-fast convergence for radiance fields reconstruction. arXiv preprint arXiv:2111.11215, 2021. ",
1214
+ "bbox": [
1215
+ 173,
1216
+ 203,
1217
+ 823,
1218
+ 233
1219
+ ],
1220
+ "page_idx": 11
1221
+ },
1222
+ {
1223
+ "type": "text",
1224
+ "text": "[40] Ledyard R Tucker. Some mathematical notes on three-mode factor analysis. Psychometrika, 31(3):279–311, 1966. ",
1225
+ "bbox": [
1226
+ 173,
1227
+ 241,
1228
+ 825,
1229
+ 270
1230
+ ],
1231
+ "page_idx": 11
1232
+ },
1233
+ {
1234
+ "type": "text",
1235
+ "text": "[41] Nick Vannieuwenhoven, Raf Vandebril, and Karl Meerbergen. A new truncation strategy for the higher-order singular value decomposition. SIAM Journal on Scientific Computing, 34(2):A1027– A1052, 2012. ",
1236
+ "bbox": [
1237
+ 173,
1238
+ 279,
1239
+ 825,
1240
+ 321
1241
+ ],
1242
+ "page_idx": 11
1243
+ },
1244
+ {
1245
+ "type": "text",
1246
+ "text": "[42] Can Wang, Menglei Chai, Mingming He, Dongdong Chen, and Jing Liao. Clip-nerf: Text-andimage driven manipulation of neural radiance fields. arXiv preprint arXiv:2112.05139, 2021. ",
1247
+ "bbox": [
1248
+ 169,
1249
+ 329,
1250
+ 826,
1251
+ 359
1252
+ ],
1253
+ "page_idx": 11
1254
+ },
1255
+ {
1256
+ "type": "text",
1257
+ "text": "[43] Peng Wang, Lingjie Liu, Yuan Liu, Christian Theobalt, Taku Komura, and Wenping Wang. Neus: Learning neural implicit surfaces by volume rendering for multi-view reconstruction. arXiv preprint arXiv:2106.10689, 2021. ",
1258
+ "bbox": [
1259
+ 174,
1260
+ 367,
1261
+ 823,
1262
+ 411
1263
+ ],
1264
+ "page_idx": 11
1265
+ },
1266
+ {
1267
+ "type": "text",
1268
+ "text": "[44] Fanbo Xiang, Zexiang Xu, Milos Hasan, Yannick Hold-Geoffroy, Kalyan Sunkavalli, and Hao Su. Neutex: Neural texture mapping for volumetric neural rendering. In CVPR, pages 7119–7128, 2021. ",
1269
+ "bbox": [
1270
+ 173,
1271
+ 419,
1272
+ 825,
1273
+ 462
1274
+ ],
1275
+ "page_idx": 11
1276
+ },
1277
+ {
1278
+ "type": "text",
1279
+ "text": "[45] Bangbang Yang, Yinda Zhang, Yinghao Xu, Yijin Li, Han Zhou, Hujun Bao, Guofeng Zhang, and Zhaopeng Cui. Learning object-compositional neural radiance field for editable scene rendering. In ICCV, October 2021. ",
1280
+ "bbox": [
1281
+ 171,
1282
+ 469,
1283
+ 823,
1284
+ 513
1285
+ ],
1286
+ "page_idx": 11
1287
+ },
1288
+ {
1289
+ "type": "text",
1290
+ "text": "[46] Lior Yariv, Jiatao Gu, Yoni Kasten, and Yaron Lipman. Volume rendering of neural implicit surfaces. NeurIPS, 34, 2021. ",
1291
+ "bbox": [
1292
+ 171,
1293
+ 521,
1294
+ 823,
1295
+ 551
1296
+ ],
1297
+ "page_idx": 11
1298
+ },
1299
+ {
1300
+ "type": "text",
1301
+ "text": "[47] Jinmian Ye, Linnan Wang, Guangxi Li, Di Chen, Shandian Zhe, Xinqi Chu, and Zenglin Xu. Learning compact recurrent neural networks with block-term tensor decomposition. In CVPR, pages 9378–9387, 2018. ",
1302
+ "bbox": [
1303
+ 173,
1304
+ 559,
1305
+ 825,
1306
+ 602
1307
+ ],
1308
+ "page_idx": 11
1309
+ },
1310
+ {
1311
+ "type": "text",
1312
+ "text": "[48] Miao Yin, Yang Sui, Siyu Liao, and Bo Yuan. Towards efficient tensor decomposition-based dnn model compression with optimization framework. In CVPR, pages 10674–10683, 2021. ",
1313
+ "bbox": [
1314
+ 173,
1315
+ 611,
1316
+ 823,
1317
+ 640
1318
+ ],
1319
+ "page_idx": 11
1320
+ },
1321
+ {
1322
+ "type": "text",
1323
+ "text": "[49] Alex Yu, Ruilong Li, Matthew Tancik, Hao Li, Ren $\\mathrm { N g }$ , and Angjoo Kanazawa. PlenOctrees for real-time rendering of neural radiance fields. In ICCV, 2021. ",
1324
+ "bbox": [
1325
+ 173,
1326
+ 648,
1327
+ 821,
1328
+ 678
1329
+ ],
1330
+ "page_idx": 11
1331
+ },
1332
+ {
1333
+ "type": "text",
1334
+ "text": "[50] Alex Yu, Vickie Ye, Matthew Tancik, and Angjoo Kanazawa. pixelnerf: Neural radiance fields from one or few images. In CVPR, pages 4578–4587, 2021. ",
1335
+ "bbox": [
1336
+ 173,
1337
+ 686,
1338
+ 823,
1339
+ 717
1340
+ ],
1341
+ "page_idx": 11
1342
+ },
1343
+ {
1344
+ "type": "text",
1345
+ "text": "[51] Kai Zhang, Gernot Riegler, Noah Snavely, and Vladlen Koltun. Nerf $^ { + + }$ : Analyzing and improving neural radiance fields. arXiv preprint arXiv:2010.07492, 2020. ",
1346
+ "bbox": [
1347
+ 173,
1348
+ 723,
1349
+ 823,
1350
+ 753
1351
+ ],
1352
+ "page_idx": 11
1353
+ },
1354
+ {
1355
+ "type": "text",
1356
+ "text": "[52] Xiuming Zhang, Pratul P Srinivasan, Boyang Deng, Paul Debevec, William T Freeman, and Jonathan T Barron. Nerfactor: Neural factorization of shape and reflectance under an unknown illumination. ACM Transactions on Graphics (TOG), 40(6):1–18, 2021. ",
1357
+ "bbox": [
1358
+ 174,
1359
+ 761,
1360
+ 823,
1361
+ 804
1362
+ ],
1363
+ "page_idx": 11
1364
+ }
1365
+ ]
parse/dev/lme1MKnSMb/lme1MKnSMb.md ADDED
@@ -0,0 +1,272 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # VCT: A Video Compression Transformer
2
+
3
+ Fabian Mentzer Google Research mentzer@google.com
4
+
5
+ George Toderici Google Research gtoderici@google.com
6
+
7
+ David Minnen Google Research dminnen@google.com
8
+
9
+ Sung Jin Hwang Google Research sjhwang@google.com
10
+
11
+ Sergi Caelles Google Research scaelles@google.com
12
+
13
+ Mario Lucic Google Research lucic@google.com
14
+
15
+ Eirikur Agustsson Google Research eirikur@google.com
16
+
17
+ # Abstract
18
+
19
+ We show how transformers can be used to vastly simplify neural video compression. Previous methods have been relying on an increasing number of architectural biases and priors, including motion prediction and warping operations, resulting in complex models. Instead, we independently map input frames to representations and use a transformer to model their dependencies, letting it predict the distribution of future representations given the past. The resulting video compression transformer outperforms previous methods on standard video compression data sets. Experiments on synthetic data show that our model learns to handle complex motion patterns such as panning, blurring and fading purely from data. Our approach is easy to implement, and we release code to facilitate future research.
20
+
21
+ # 1 Introduction
22
+
23
+ Neural network based video compression techniques have recently emerged to rival their non-neural counter parts in rate-distortion performance [e.g., 1, 17, 30, 42]. These novel methods tend to incorporate various architectural biases and priors inspired by the classic, non-neural approaches. While many authors tend to draw a line between “hand-crafted” classical codecs and neural approaches, the neural approaches themselves are increasingly “hand-crafted”, with authors introducing complex connections between the many sub-components. The resulting methods are complicated, challenging to implement, and constrain themselves to work well only on data that matches the architectural biases. In particular, many methods rely on some form of motion prediction followed by a warping operation [e.g., 1, 17, 19, 23, 42, 41]. These methods warp previous reconstructions with the predicted flow, and calculate a residual.
24
+
25
+ In this paper, we replace flow prediction, warping, and residual compensation, with an elegantly simple but powerful transformer-based temporal entropy model. The resulting video compression transformer (VCT) outperforms previous methods on standard video compression data sets, while being free from their architectural biases and priors. Furthermore, we create synthetic data to explore the effect of architectural biases, and show that we compare favourably to previous approaches on the types videos that the architectural components were designed for (panning on static frames, or blurring), despite our transformer not relying on any of these components. More crucially, we outperform previous approaches on videos that have no obvious matching architectural component (sharpening, fading between scenes), showing the benefit of removing hand-crafted elements and letting a transformer learn everything from data.
26
+
27
+ We use transformers to compress videos in two steps (see Fig. 1): First, using lossy transform coding [3], we map frames $x _ { i }$ from image space to quantized representations $y _ { i }$ , independently for each frame. From $y _ { i }$ we can recover a reconstruction $\hat { x } _ { i }$ . Second, we let a transformer leverage temporal redundancies to model the distributions of the representations. We use these predicted distributions to losslessly compress the quantized $y _ { i }$ using entropy coding [43, Sec 2.2.1]. The better the transformer predicts the distributions, the fewer bits are required to store the representations.
28
+
29
+ ![](images/9d05efaaeaa6d925c946375fa7258683783ac18f5abc26c2850e1ae5f48bd2dc.jpg)
30
+ Figure 1: We independently and lossily map input frames $x$ into quantized representations $y$ . From $y$ we can recover a reconstruction $\hat { x }$ . To store $y _ { i }$ with few bits, we use transformers to model temporal dependencies and to predict a distribution for $y _ { i }$ given previously transmitted representations. We use $P$ to losslessly compress the quantized $y _ { i }$ using entropy coding. The better the transformer predicts $P$ , the fewer bits are required to store $y _ { i }$ . We note that we have no hard-coded components such as motion prediction or warping.
31
+
32
+ This setup avoids complex state transitions or warping operations by letting the transformer learn to leverage arbitrary relationships between frames. As a bonus, we get rid of temporal error propagation by construction since the reconstruction ${ \hat { x } } _ { i }$ does not depend on previous reconstructions. Contrast with warping-based approaches, where $\hat { x } _ { i }$ is a function of the warped $\hat { x } _ { i - 1 }$ meaning that any visual errors in ${ \hat { x } } _ { i }$ will be propagated forward and require additional bits to correct with residuals.
33
+
34
+ VCT is based on the original language translation transformer [35]: We can view our problem as “translating” two previous representations $y _ { i - 2 } , y _ { i - 1 }$ to $y _ { i }$ . However, there are various challenges in the way of directly applying the NLP formulation. Consider a $1 0 8 0 \mathrm { p }$ video frame; using a typical neural image compression encoder [4] that downscales by a factor 16 and has 192 output channels, a (1080, 1920, 3)-dimensional input frame is mapped to a (68, 120, 192)-dimensional feature representation leading to approximately 1.6 million symbols. Naively correlating all of these symbols to all symbols in a previous representation would yield a $1 . 6 \mathbf { M } \times 1 . 6 \mathbf { M }$ -dimensional attention matrix. To address this computationally impractical problem, we introduce independence assumptions to shrink the attention matrix and enable parallel execution on subsets of the symbols.
35
+
36
+ Our model is easy to implement with contemporary machine learning frameworks, and we provide an extensive code and model release to allow future work to build on this direction.1
37
+
38
+ # 2 Related Work
39
+
40
+ Transformers were initially proposed for machine translation [35], where an encoder-decoder structure was used to obtain state-of-the-art results. This led to a wide range of follow-up research, and stateof-the-art natural language processing (NLP) models are still based on transformers [e.g., 6, 8, 7, 11]. Motivated by these advancements, Dosovitski et al. [10] replaced CNNs with a transformer-based architecture to achieve state-of-the-art results in image classification, which in turn spurred more exploration of transformers in the computer vision community including both image tasks [e.g., 22, 37, 45] as well as video analysis [e.g., 2, 5, 12, 28, 32].
41
+
42
+ Recently, transformers were incorporated into neural image compression models. Qian et al. [29] replaced the autoregressive hyperprior [26] with a self-attention stack, and Zhu et al. [46] replaced all convolutions in the standard approach [4, 27] with Swin Transformer [22] blocks.
43
+
44
+ Neural video compression remains CNN-based. After initial work used frame interpolation [39, 9], Lu et al. [23] followed the more traditional approach of predicting optical flow between the previous reconstruction and the input, transmitting a compressed representation of the flow, and also transmitting a residual image to correct visual errors after warping. Many papers extended this approach, for example Agustsson et al. [1] introduced the notion of a flow predictor that also supports blurring called “Scale Space Flow” (SSF), which became a building block for other approaches [42, 30]. Rippel et al. [30] achieved state-of-the-art results by using SSF and more context to predict flow. RNNs and ConvLSTMs were used to build recurrent decoders [13] or entropy models [41].
45
+
46
+ ![](images/fcad065d12c6088940fed8ce90b9026176b0da0ee5d8f968df6abada14ebbe4e.jpg)
47
+ Figure 2: From representations to tokens. We essentially use a sliding window to split the current representation $y _ { i }$ into non-overlapping $w _ { \mathrm { c } } \times w _ { \mathrm { c } }$ blocks, and previous representations $y _ { i - 2 } , y _ { i - 1 }$ into overlapping $w _ { \mathrm { p } } \times w _ { \mathrm { p } }$ blocks with stride $w _ { \mathrm { c } }$ $\langle w _ { \mathrm { p } } > w _ { \mathrm { c } } \rangle$ . We flatten blocks spatially (raster-scan order, see left arrows) to obtain tokens for the transformer, which remain $d _ { C }$ -dimensional since they are just a different view of $y _ { i }$ . We show $w _ { \mathrm { c } } { = } 3 , w _ { \mathrm { p } } { = } 5 , d _ { C } { = } 5$ , but we use $w _ { \mathrm { c } } { = } 4$ , $w _ { \mathsf { p } } { = } 8$ , $d _ { C } { = } 1 9 2$ in practice.
48
+
49
+ Some work does not rely on pixel-space flow: Habibian et al. [14] used a 3D autoregressive entropy model, FVC [17] predicted flow in a $2 \times$ downscaled feature space, and Liu et al. [20] used a ConvLSTM to predict representations which are transmitted using an iterative quantization scheme. DCVC [19] estimated motion in pixel space but performed residual compensation in a feature space. Liu et al. [21] also losslessly encoded frame-level representations, but rely on CNNs for temporal modelling. Finally, recent work employed GAN losses to increase realism [24, 40].
50
+
51
+ # 3 Method
52
+
53
+ # 3.1 Overview and Background
54
+
55
+ Frame encoding and decoding A high-level overview of our approach is shown in Fig. 1. We split video coding into two parts. First, we independently encode each frame $x _ { i }$ into a quantized representation $y _ { i } = \lfloor E ( x _ { i } ) \rceil$ using a CNN-based image encoder $E$ followed by quantization to an integer grid. The encoder downscales spatially and increases the channel dimension, resulting in $y _ { i }$ being a $( H , W , d _ { C } )$ -dimensional feature map, where $H , W$ are $1 6 \times$ smaller than the input image resolution. From $y _ { i }$ , we can recover a reconstruction ${ \hat { x } } _ { i }$ using the decoder $D$ . We train $E , D$ using standard neural image compression techniques to be lossy transforms reaching nearly any desired distortion $d ( x _ { i } , { \hat { x } } _ { i } )$ by varying how large the range of each element in $y _ { i }$ is. For now, let us assume we have a pair $E , D$ reaching a fixed distortion.
56
+
57
+ Naive approach After having lossily converted the sequence of input frames $x _ { i }$ to a sequence of representations $y _ { i } = \lfloor E ( x _ { i } ) \rceil$ , one can naively store all $y _ { i }$ to disk losslessly. To see why this is suboptimal, let each element $y _ { i , j }$ of $y _ { i }$ be a symbol in $\mathcal { S } = \{ - L , \ldots , L \}$ . Assuming that all $| S |$ symbols appear with equal probability, i.e., $P ( y _ { i , j } ) = 1 / \vert \boldsymbol { S } \vert$ , one can transmit $y _ { i }$ using $H \cdot W \cdot d _ { C } \cdot \log _ { 2 } | S |$ bits. Using a realistic $L { = } 3 2$ , this implies that we would need ${ 9 } \mathrm { M B }$ , or ${ \approx } 2 0 \mathrm { b p s }$ at 30fps, to encode a single HD frame (where $\boldsymbol { H } \cdot \boldsymbol { W } \cdot d _ { C } { \approx } 1 . 6 \mathbf { M }$ , see Introduction). While arguably inefficient, this is a valid compression scheme which will result in the desired distortion. The aim of this work is to improve this scheme by approximately two orders of magnitude.
58
+
59
+ An efficient coding scheme Given a probability mass function (PMF) $P$ estimating the true distribution $Q$ of symbols in $y _ { i }$ , we can use entropy coding (EC) to transmit $y _ { i }$ with $\boldsymbol { H } \cdot \boldsymbol { W } \cdot \boldsymbol { d } _ { \boldsymbol { C } }$ · $\mathbb { E } _ { y \sim Q ( y _ { i } ) } [ - \log _ { 2 } P ( y ) ]$ bits.2 By using EC, we can encode more frequently occurring values with fewer bits, and hence improve the efficiency. Note that the expectation term representing the average bit count corresponds to the cross-entropy of $Q$ with respect to $P$ . Our main idea is to parameterize $P$ as a conditional distribution using very flexible transformer models, and to minimize the cross-entropy and thus maximize coding efficiency. We emphasize that we use $P$ for lossless EC, we do not sample from the model to transmit data. Even if the resulting model of $P$ is sub-optimal, $y _ { i }$ can still be stored losslessly, albeit inefficiently.
60
+
61
+ ![](images/a0ae98728cd74f316967554b857df82d7b597666b3d2fe06d4cd1a9d599a314f.jpg)
62
+ Figure 3: The transformer operates on the pink set of blocks/tokens $b _ { i - 2 } , b _ { i - 1 } , b _ { i }$ (obtained as shown in Fig. 2). We first extract temporal information $z _ { \mathrm { j o i n t } }$ from already transmitted blocks. $T _ { \mathrm { c u r } }$ is shown predicting $P ( t _ { 3 } | t _ { S } , t _ { 1 } , t _ { 2 } , z _ { \mathrm { j o i n t } } )$ , where $t _ { S }$ is a learned start token.
63
+
64
+ Why would one hope to do better than the uniform distribution over $y _ { i }$ ? In principle, the model should be able to exploit the temporal redundancy across frames, and the spatial consistency within frames.
65
+
66
+ # 3.2 Transformer-based Temporal Entropy Model
67
+
68
+ To transmit a video of $F$ frames, $x _ { 1 } , \ldots , x _ { F }$ , we first map $E$ over each frame obtaining quantized representations $y _ { 1 } , \ldots , y _ { F }$ . Let’s assume we already transmitted $y _ { 1 } , \ldots , y _ { i - 1 }$ . To transmit $y _ { i }$ , we use the transformer to predict $P ( y _ { i } | y _ { i - 2 } , y _ { i - 1 } )$ . Using this distribution, we entropy code $y _ { i }$ to create a compressed, binary representation that can be transmitted. To compress the full video, we simply apply this procedure iteratively, letting the transformer predict $P ( y _ { j } | y _ { j - 2 } , y _ { j - 1 } )$ for $j \in \{ 1 , \ldots , F \}$ , padding with zeros when predicting distributions for $y _ { 1 } , y _ { 2 }$ . The receiver follows the same procedure to recover all $y _ { j }$ , i.e., it iteratively calculates $P ( y _ { j } | y _ { j - 2 } , y _ { j - 1 } )$ to entropy decode each $y _ { j }$ . After obtaining each representation, $y _ { 1 } , y _ { 2 } , \dotsc , y _ { F }$ , the receiver generates reconstructions.
69
+
70
+ Tokens When processing the current representation $y _ { i }$ , we split it spatially into non-overlapping blocks with size $w _ { \mathrm { c } } \times w _ { \mathrm { c } }$ as shown in Fig. 2. Previous representations $y _ { i - 2 } , y _ { i - 1 }$ become corresponding overlapping $w _ { \mathrm { p } } \times w _ { \mathrm { p } }$ blocks (where $w _ { \mathrm { p } } > w _ { \mathrm { c } } ,$ ) to provide both temporal and spatial context for predicting $P ( y _ { i } | y _ { i - 2 } , y _ { i - 1 } )$ . Intuitively, the larger spatial extent provides useful context to predict the distribution of the current block. Note that all blocks span a relatively large spatial region in image space due to the downscaling convolutional encoder $E$ . We flatten each block spatially (see Fig. 2) to obtain tokens for the transformers. The transformers then run independently on corresponding blocks/tokens, i.e., tokens of the same color in Fig. 2 get processed together, trading reduced spatial context for parallel execution.3
71
+
72
+ This independence assumption allows us to focus on a single set of blocks, e.g., the pink blocks in Fig. 2. In the following text and in Fig. 3, we thus show how we predict distributions for the $w _ { \mathrm { c } } ^ { 2 } { = } 1 6$ tokens $t _ { 1 } , t _ { 2 } , \ldots , t _ { 1 6 }$ in block $b _ { i }$ , given the $2 w _ { \mathsf { p } } ^ { 2 } { = } 1 2 8$ tokens from the previous blocks $b _ { i - 2 } , b _ { i - 1 }$ .
73
+
74
+ Step 1: Temporal Mixer We use two transformers to extract temporal information from $b _ { i - 2 } , b _ { i - 1 }$ A first transformer $T _ { \mathrm { s e p } }$ operates separately on each previous block. Then, we concatenate the outputs in the token dimension and run the second transformer, $T _ { \mathrm { j o i n t } }$ , on the result to mix information across time. The output $z _ { \mathrm { j o i n t } }$ is $2 w _ { \mathrm { p } } ^ { 2 }$ features, containing everything the model “knows” about the past.
75
+
76
+ Step 2: Within-Block-Autoregression The second part of our method is the masked transformer $T _ { \mathrm { c u r } }$ , which predicts PMFs for each token using auto-regression within the block. We obtain a powerful model by conditioning $T _ { \mathrm { c u r } }$ on $z _ { \mathrm { j o i n t } }$ as well as already transmitted tokens within the block. For entropy coding, both the sender and the receiver must be able to obtain exactly the same PMFs, i.e., $T _ { \mathrm { c u r } }$ must be causal and start from a known initialization point. For the latter, we learn a start token $t _ { S }$ .
77
+
78
+ ![](images/00bf25d89df69b5cbbf0a58f6fb9bb5ea3df23badfbe12c0ea8bbc725a76430b.jpg)
79
+ Figure 4: Comparing rate-distortion on MCL-JCV $( { \approx } 2 7 \mathrm { { F P S } } )$ ) and UVG (120FPS). We report bits per pixel (bpp) and megabits per second (mbps). For MS-SSIM, we only show methods optimized for it (using –tune ssim for HEVC/H264). App. A.5 shows a large version of these plots.
80
+
81
+ To send the tokens, we first obtain $z _ { \mathrm { j o i n t } }$ . After that, we feed $[ t _ { S } ]$ to $T _ { \mathrm { c u r } }$ , obtain $P ( t _ { 1 } | t _ { S } ; z _ { \mathrm { j o i n t } } )$ , and use entropy coding to store the $d _ { C }$ symbols in token $t _ { 1 }$ into a bitstream using $P ( t _ { 1 } | t _ { S } ; z _ { \mathrm { j o i n t } } )$ . Then, we feed $[ t _ { S } , t _ { 1 } ]$ , obtain $P ( t _ { 2 } | t _ { 1 } , t _ { S } ; z _ { \mathrm { j o i n t } } )$ , store $t _ { 2 }$ in the bitstream, and so on. The receiver gets the resulting bitstream and can obtain the same distributions, and thereby the tokens, by first feeding $[ t _ { S } ]$ to $T _ { \mathrm { c u r } }$ , obtaining $P ( t _ { 1 } | t _ { S } ; z _ { \mathrm { j o i n t } } )$ , entropy decoding $t _ { 1 }$ from the bitstream, then feeding $[ t _ { S } , t _ { 1 } ]$ to obtain $P ( t _ { 2 } | t _ { 1 } , t _ { S } ; z _ { \mathrm { j o i n t } } )$ , and so on. Fig. 3 visualizes this for $P ( t _ { 3 } | \dots )$ .
82
+
83
+ We run this procedure in parallel over all blocks, and thereby send/receive $y _ { i }$ by running $T _ { \mathrm { c u r } } w _ { \mathrm { c } } ^ { 2 } { = } 1 6$ times. Each run produces $\lceil H / w _ { \mathrm { c } } \rceil \cdot \lceil W / w _ { \mathrm { c } } \rceil \cdot d _ { C }$ distributions. To ensure causality of $T _ { \mathrm { c u r } }$ during training, we mask the self-attention blocks similar to [35].
84
+
85
+ Independence Apart from assuming blocks in $y _ { i }$ are independent, we emphasize that each token is a vector and that we assume the symbols within each token are conditionally independent given previous tokens, i.e., $T _ { \mathrm { c u r } }$ predicts the $d _ { C }$ distributions required for a token at once. One could instead predict a joint distribution over all possible $| S | ^ { d _ { C } }$ realisations, use channel-autoregression [27], or use vector quantization on tokens. The latter two are interesting directions for future work. Finally, we note that we do not rely on additional side information, in contrast to, e.g., autoregressive image compression entropy models [26, 27].
86
+
87
+ # 3.3 Architectures
88
+
89
+ Transformers As visualized in Fig. 3, all of our transformers are based on standard architectures [35, 10]. We start by projecting the $d _ { C }$ -dimensional tokens to a $d _ { T }$ -dimensional space $\scriptstyle { d _ { T } = 7 6 8 }$ in our model) using a single fully connected layer, and adding a learned positional embedding. While both $T _ { \mathrm { s e p } }$ and $T _ { \mathrm { j o i n t } }$ are stacks of multi-head self-attention (MHSA) layers, $T _ { \mathrm { c u r } }$ uses masked “conditional” transformer layers, similar to Vaswani et al. [35]: These alternate between masked MHSA layers and MHSA layers that use $z _ { \mathrm { j o i n t } }$ as keys (K) and values (V), as shown in Fig. 3. We use 6 transformer layers for $T _ { \mathrm { s e p } }$ , 4 for $T _ { \mathrm { j o i n t } }$ , and 5 masked transformer layers for $T _ { \mathrm { c u r } }$ . We use 16 attention heads everywhere. We learn a separate temporal positional embedding to add to the input of $T _ { \mathrm { j o i n t } }$ .
90
+
91
+ ![](images/de83f7def30f2ab6de817f0ba8894b04602d47b438c48fd943e673c7d1f3f5f7.jpg)
92
+ Figure 5: To understand what types of temporal patterns our transformer has learned to exploit, we synthesize videos representing commonly seen patterns. We compare to HEVC, which has built-in support for motion, and SSF, which has built-in support for motion and blurrying. VCT learns to handle all patterns purely from data. We refer to the text for a discussion.
93
+
94
+ Image encoder $E$ , decoder $D$ The image encoder and decoder $E , D$ are not the focus of this paper, so we use architectures based on standard image compression approaches [26, 27]. For the encoder, we use 4 strided convolutional layers, downscaling by a factor $1 6 \times$ in total. For the decoder, we use transposed convolutions and additionally add residual blocks at the low resolutions. We use $d _ { E D } = 1 9 2$ filters for all layers. See App. A.1 for details and an exploration of architecture variants.
95
+
96
+ # 3.4 Loss and Training Process
97
+
98
+ The modeling choices introduced in the previous section allow for an efficient training procedure where we decompose the training into three stages, which enables rapid experimentation (Tab. 1). In Stage $\mathbf { I }$ we train the per-frame encoder $E$ and decoder $D$ by minimizing the rate-distortion trade-off [43, Sec 3.1.1]. Let $\mathcal { U }$ denote a uniform distribution in $[ - 0 . 5 , 0 . 5 ]$ . We minimize
99
+
100
+ $$
101
+ \mathcal { L } _ { \mathrm { I } } = \mathbb { E } _ { { x } \sim { p } _ { X } , { u } \sim \mathcal { U } } \{ \underbrace { - \log { p ( \tilde { y } + u ) } } _ { \mathrm { b i t r a t e } ~ r } + \lambda \underbrace { \mathrm { M S E } ( { x } , \hat { x } ) } _ { \mathrm { d i s t o r i o n } ~ d } \} , \qquad \tilde { y } = E ( x ) , \hat { x } = D ( \mathrm { r o u n d } _ { \mathrm { S T E } } ( \tilde { y } ) ) ,
102
+ $$
103
+
104
+ using $\tilde { y }$ to refer to the unquantized representation, and $x \sim p _ { X }$ are frames drawn from the training set. Intuitively, we want to minimize the reconstruction error under the constraint that we can effectively quantize the encoder output, with $\lambda$ controlling the tradeoff. For Stage $I$ , we thus employ the meanscale hyperprior [26] approach to estimate $p$ , the de facto standard in neural image compression, which we discard for later stages.4 To enable end-to-end training, we also follow [26], adding i.i.d.
105
+
106
+ ![](images/c437fb50610b375e0866dcc5b3924a32c88eabb1f23aa8e41d8c8464893b783c.jpg)
107
+ Figure 6: Visualizing the sample mean from the block-autoregressive distribution predicted by the transformer, as we decode more and more tokens (see Sec. 5). We show the kilobytes (kB) required to transmit the decoded (gray) tokens. On the left, we see the two previous reconstructions $\hat { x } _ { i - 2 } , \hat { x } _ { i - 1 }$ . In the middle, we see what the transformer expects at the current frame, before decoding any information (0kB). The next two images shows that as we decode more tokens, the model gets more certain, and the image obtained from the sample mean sharpens. Note that we never sample from the model for actual video coding.
108
+
109
+ uniform noise $u$ to $\tilde { y }$ when calculating $r$ , and using straight-through estimation (STE) [33, 27] for gradients when rounding $\tilde { y }$ to feed it to $D$ .
110
+
111
+ For Stage $\mathbf { I }$ , we train the transformer to obtain $p$ , and only minimize rate:
112
+
113
+ $$
114
+ \begin{array} { r } { \mathcal { L } _ { \Pi } = \mathbb { E } _ { ( x _ { 1 } , x _ { 2 } , x _ { 3 } ) \sim p _ { X _ { 1 : 3 } } , u \sim \mathcal { U } } \bigl [ - \log p ( \tilde { y } _ { 3 } + u | y _ { 1 } , y _ { 2 } ) \bigr ] \qquad \tilde { y } _ { i } = E ( x ) , y _ { i } = \mathrm { r o u n d } ( \tilde { y } _ { i } ) , } \end{array}
115
+ $$
116
+
117
+ where $( x _ { 1 } , x _ { 2 } , x _ { 3 } ) \ \sim \ p _ { X _ { 1 : 3 } }$ are triplets of adjacent video frames. We assume each of the $d _ { C }$ unquantized elements in each token follow a Gaussian distribution, $p \sim \mathcal N$ , and let the transformer predict $d _ { C }$ means and $d _ { C }$ scales per token. Finally, we finetune everything jointly in Stage $\mathbf { I I I }$ , adding the distortion loss $d$ from Eq. 1 to Eq. 2.
118
+
119
+ We note that it is also possibe to train the model from scratch and obtain even better performance, see App. A.2.
120
+
121
+ To obtain a discrete PMF $P$ for the quantized symbols (for entropy coding), we again follow standard practice [4], convolving $p$ with a unit-width box and evaluating it at discrete points, $P ( y ) =$ $\begin{array} { r } { \int _ { u \in \mathcal { U } } p ( y + u ) d u , y \in \mathbb { Z } } \end{array}$ [see, e.g., 43, Sec. 3.3.3, for details]. To train, we use random spatio-temporal crops of $( B , N _ { F } , 2 5 6 , 2 5 6 , 3 )$ pixels, where $B$ is the batch size, and $N _ { F }$ the number of frames (values are given in Tab. 1). We use the linearly decaying learning rate (LR) schedule with warmup, where we warmup for $1 0 \mathrm { k }$ steps and then linearly decay from the LR shown in the table to $\mathrm { 1 E ^ { - 5 } }$ . Stage $I$ is trained using $\lambda { = } 0 . 0 1$ . To navigate the rate-distortion trade-off and obtain results for multiple rates, we fine-tune 9 models in Stage III, using $\lambda { = } 0 . 0 1 \cdot 2 ^ { i } , i { \in } \{ - 3 , \ldots , 5 \}$ . We train all models on 4 Google Cloud TPUv4 chips.
122
+
123
+ # 3.5 Latent Residual Predictor (LRP)
124
+
125
+ To further leverage the powerful representation that the transformer learns, we adapt the “latent residual predictor” (LRP) from recent work in image compression [27]: The final features ${ \mathit { z } } _ { \mathrm { c u r } }$ from $T _ { \mathrm { c u r } }$ have the same spatial dimensions as $y _ { i }$ , and contain everything the transformer knows about the current and previous representations. Since we have to compute them to compute $P$ , they constitute “free” extra features that are helpful to reconstruct ${ \hat { x } } _ { i }$ . We thus use ${ \mathit { z } } _ { \mathrm { c u r } }$ by feeding $y _ { i } ^ { \prime } = y _ { i } + f _ { \mathrm { L R P } } ( z _ { \mathrm { c u r } } )$ to $D$ (we enable this in Stage III), where $f _ { \mathrm { L R P } }$ consists of a $1 \times 1$ convolution mapping from $d _ { T }$ to $d _ { E D }$ followed by a residual block. We note that this implies that $\hat { x } _ { i } = D ( y _ { i } ^ { \prime } )$ indirectly depends on $y _ { i - 2 } , y _ { i - 1 } , y _ { i }$ . Since this is a bounded window into the past and $y _ { i } ^ { \prime }$ does not depend on $\hat { x } _ { j < i }$ , we remain free from temporal error propagation.
126
+
127
+ Table 2: Ablating how many previous frames we feed to the transformer (“Context”), and whether we use latent-residual prediction (LRP).
128
+
129
+ <table><tr><td></td><td>Context LRP</td><td>bpp↓</td><td>PSNR ↑</td></tr><tr><td>No previous frames (image codec)</td><td>0</td><td>0.218</td><td>36.1</td></tr><tr><td>1 previous frame</td><td>1</td><td>0.0907 (-58%)</td><td>36.1</td></tr><tr><td>2 previous frames</td><td>2</td><td>0.0775 (-64%)</td><td>36.1</td></tr><tr><td>2 previous frames and LRP (VCT (Ours))</td><td>2</td><td>0.0775 (-64%)</td><td>36.8 (+0.7dB)</td></tr></table>
130
+
131
+ # 4 Experiments
132
+
133
+ # 4.1 Data sets
134
+
135
+ We train on one million Internet video clips, where each clip has nine frames. We obtained highresolution videos which we downscale with a random factor (removing previous compression artifacts), from which we get a central 256 crop. Training batches are made up of randomly selected triplets of adjacent frames. We evaluate on two common benchmark data sets: (1) MCL-JCV [36, MIT Licence] made up of thirty $1 0 8 0 \mathrm { p }$ videos captured at either 25 or 30FPS and averaging 137 frames per video, and (2) UVG [25, CC-BY-NC Licence] containing twelve 1080p 120FPS videos with either 300 or 600 frames each.
136
+
137
+ Synthetic videos We explore three parameterized synthetic data sets that we build by generating videos from still images from the CLIC2020 test set [34, Unsplash licence], (see Fig. 5). Each data set has a parameter $x$ that we vary, and we create 100 videos for each value of $x$ . Each video is 12 frames of $5 1 2 \times 5 1 2 \mathrm { p x }$ . We explore: Shift, where we pan from the center of the image towards the lower right, shifting by $x$ pixels in each step. SharpenOrBlur, where if $x { \ge } 0$ , we apply Gaussian blurring with sigma $x \cdot t$ at time step $t$ . If $x { < } 0$ , we create videos that get sharper over time by playing a video blurred with $| x |$ in reverse. Fade, where we linearly transition between two unrelated images using alpha blending (as in a scene cut). We release the code to synthesize these videos.
138
+
139
+ # 4.2 Models
140
+
141
+ We refer to our video compression transformer as VCT. We run the widely used, non-neural, standard codec HEVC [31] (a.k.a. H.265) using the ffmpeg $\mathbf { \delta } _ { \mathbf { X } 2 6 5 }$ codec in the medium and veryslow settings, as well as H.264 using $\tt X 2 6 4$ in the medium setting. For a fair comparison to our method, we follow previous work [1, 24, 30] in disabling B-Frames, but do not constrain the codecs in any other way. We run the public DVC [23] code, and additionally obtain numbers from the following papers: SSF [1], which introduced scale-space-flow, an architectural component to support warping and blurring, commonly used in follow-up work, ELF-VC [30], to the best of our knowledge the state-of-the-art neural method in terms of PSNR on MCL-JCV, which extends the motion compensation of SSF with more motion priors, FVC [17] and DCVC [19], both strong models based on warping plus residual coding in a representation space, RLVC [41], using ConvLSTMs as a sequence model, and Liu et al. [21], who study losslessly transmitting representations using CNNs for temporal entropy modelling. To explore how architectural biases behave on synthetic data, we reproduce SSF, using exactly the same training data as for VCT.
142
+
143
+ # 4.3 Metrics
144
+
145
+ We evaluate the common PSNR and MS-SSIM [38] in RGB. We train all models using MSE as a distortion and use $2 0 0 \cdot ( 1 - \mathbf { M S - S S I M } ( x , \hat { x } ) )$ as the training objective in Stage III (Tab. 1) to obtain MS-SSIM models.
146
+
147
+ # 5 Results
148
+
149
+ # 5.1 Comparison to State of the Art
150
+
151
+ In Fig. 4, we depict rate distortion graphs for our method and the neural video compression methods introduced in Sec. 4, on MCL-JCV and UVG. Despite the simplicity of our approach, and the fact that we use no motion or warping components, we outperform all methods in both PSNR and MS-SSIM.
152
+
153
+ # 5.2 Synthetic data
154
+
155
+ In Fig. 5, we show how the transfomer learns to exploit various types of temporal patterns by applying it to the synthetic data sets introduced in Sec. 4, and reporting the evaluation R-D loss.5 We compare to HEVC and SSF, which both have explicit support for shifting motion, while SSF also has explicit support for blurring. We expect them to perform well on temporal patterns for which they have corresponding architectural priors. In contrast, VCT has no such priors. For each data set, we explore different values for the parameter $x$ (see Sec. 4), a point in the plot represents the average evaluation loss over the 100 videos created with $x$ .
156
+
157
+ We observe: a) On videos with shifting based motion, VCT obtains ${ \approx } 4 5 \%$ lower R-D loss compared to SSF, which saturates at about $x = 1 0$ , presumably due to the shallow CNN used for flow estimation. Since HEVC supports motion compensating with arbitrary shifts of previous frames, it excels on these kinds of videos. For shifts that are a multiple of 16, the representations shifts by exactly 1 symbol in each step, and VCT matches HEVC. The reason for this is that our encoder is a CNN, so it is only shift-equivariant for shifts which are multiples of the stride (16). Any shift in [1, 15] pixels causes the representation to change in a complex way (cf. [44]). b) For blurring/sharpening, we outperform both HEVC and SSF, despite the latter having explicit support for blurring. Note that the curve for SSF is asymmetric: since it has built-in support for blurring, it gets a ${ \approx } 2 0 \%$ lower RD loss on blurring compared to sharpening. c) VCT learns to handle fading, exhibiting a near-constant RD loss as we increase $x$ , in contrast to the baselines, neither of which has a explicit support for fading. SSF is ${ \approx } 2 0 \%$ better than HEVC, possibly due to its blurrying capabilities. For completely static videos $x { = } 0$ , we observe that VCT is at a slight disadvantage compared to the previous approaches. Overall, we believe that synthetic data can give better insight into the strengths and weaknesses of methods, and hope that future work can compare on these data sets.
158
+
159
+ # 5.3 Visualizing certainty during decoding
160
+
161
+ After having seen $k$ tokens in each block, the transformer predicts a PMF $P ( t _ { k + 1 } | t _ { \leq k } , z _ { \mathrm { j o i n t } } )$ . This induces a joint distribution $P ( t _ { > k } | \dots )$ over all unseen (not yet decoded) tokens. Intuitively, if the transformer is certain about the future, this distribution will be concentrated on the actual future tokens we will decode. In Fig. 6, we visualize the sample mean of this distribution by feeding it through $D$ , i.e., we sample $N$ realisations of the unseen tokens in each block, conditioned on the $k$ already decoded ones, for $k \in \{ 0 , 2 , 1 3 \}$ . In the middle image in Fig. 6, we show what the transformer expects at the current frame, before decoding any information ( $k = 0$ , i.e., 0 bits). We observe that the model is able—to some degree—to learn second order motion implicitly. The next two images shows that as we decode more tokens, the model gets more certain, and the image sharpens.
162
+
163
+ # 5.4 Ablations
164
+
165
+ In Tab. 2, we explore the importance of temporal context from previous frames and latent residual prediction (LRP) on MCL-JCV. We start from a baseline that does not use any previous frames, i.e., an image model, used to independently code each frame. Conditioning on one previous frame reduces bitrate by $- 5 8 \%$ . Using two previous frames yields an additional improvement of $- 6 \%$ . In the final configuration (our model, VCT), which adds LRP, we observe an increase in PSNR of $0 . 7 \mathrm { d B }$ at the same bitrate. We did not observe further gains from more context.
166
+
167
+ <table><tr><td></td><td></td><td>Tsep and Tjoint</td><td>Tcur</td><td>EC</td><td>D</td><td>FPS estimate</td></tr><tr><td>Ours</td><td>1080p</td><td>168 ms</td><td>326 ms</td><td>30.5 ms</td><td>168 ms</td><td>~1.4 FPS</td></tr><tr><td></td><td>720p</td><td>37.6 ms</td><td>44.8 ms</td><td>17.0 ms</td><td>49.5 ms</td><td>~6.7FPS</td></tr><tr><td></td><td>480p</td><td>18.1 ms</td><td>23.1 ms</td><td>9.02 ms</td><td>23.3 ms</td><td>~13.6FPS</td></tr><tr><td></td><td>360p</td><td>7.3 ms</td><td>14.9 ms</td><td>4.24 ms</td><td>10.1 ms</td><td>~27.3 FPS</td></tr></table>
168
+
169
+ Table 3: Runtimes of our components. For ours, we use a Google Cloud TPU v4 to run transformers and $D$ . Entropy Coding (EC) is run on CPU.
170
+
171
+ # 5.5 Runtime
172
+
173
+ To obtain runtimes of the transformers $( T _ { \mathrm { s e p } } , T _ { \mathrm { j o i n t } } , T _ { \mathrm { c u r } } )$ and the decoder $( D )$ , we employ a Google Cloud TPU v4 (single core) using Flax [16], which has an efficient implementation for autoregressive transformers. We use Tensorflow Compression to measure time spent entropy coding (EC), on an Intel Skylake CPU core. In Tab. 3, we report numbers for $1 2 8 0 \times 7 2 0 \mathrm { p x }$ , $8 5 2 \times 4 8 0 \mathrm { p x }$ , and $4 8 0 \times 3 6 0 \mathrm { p x }$ . Since this benchmark is not fully end-to-end, we only report an FPS estimate by calculating 1000/(sum of individual runtimes in ms). Note that running $T _ { \mathrm { c u r } }$ at $7 2 0 \mathrm { p }$ once only takes ${ \approx } 2 . 8 \mathrm { m s }$ , but we run it $w _ { \mathrm { c } } ^ { 2 } { = } 1 6$ times to decode a frame. To run $T _ { \mathrm { j o i n t } }$ , we only have to run $T _ { \mathrm { s e p } }$ once per representation, since we can re-use the output of running $T _ { \mathrm { s e p } }$ on the previous representation.
174
+
175
+ Many neural compression methods do not detail inference time and do not have code available, but we copy the results from DCVC [19], FVC [17], and ELF-VC [30], in Table 4.
176
+
177
+ # 6 Conclusion and Future Work
178
+
179
+ We presented an elegantly simple transformer-based approach to neural video compression, outperforming previous methods without relying on architectural priors such as explicit motion prediction or warping. Notably, our results are achieved by conditioning the transformer only on a 2-frame window into the past. For some types of videos, it would be interesting to scale this up, or to introduce a notion of more long-term memory, possibly leveraging arbitrary reference frames.
180
+
181
+ As mentioned towards the end of Sec. 3.2, various different ways to factorize the distributions could be explored, including vector quantization, channel-autoregression, or changing the independence assumptions around how we split representations into blocks.
182
+
183
+ Societal Impact We hope our method can serve as the foundation for a new generation of video codecs. This could have a net-positive impact on society by reducing the bandwidth needed for video conferencing and video streaming and to better utilize storage space, therefore increasing the capacity of knowledge preservation.
184
+
185
+ Acknowledgements We thank Basil Mustafa, Ashok Popat, Huiwen Chang, Phil Chou, Johannes Ballé, and Nick Johnston for the insightful discussions and feedback.
186
+
187
+ <table><tr><td></td><td>Resolution</td><td>FPS estimate</td></tr><tr><td rowspan="5">Ours</td><td>1080p</td><td>~1.4 FPS</td></tr><tr><td>720p</td><td>~6.7 FPS</td></tr><tr><td>480p</td><td>~13.6 FPS</td></tr><tr><td>360p</td><td>~27.3 FPS</td></tr><tr><td>1080p</td><td>~1.1 FPS</td></tr><tr><td>DCVC [19] FVC[17]</td><td>1080p</td><td>~1.8 FPS</td></tr><tr><td rowspan="2">ELF-VC [30]</td><td>1080p</td><td></td></tr><tr><td>720p</td><td>~18 FPS ~35 FPS</td></tr></table>
188
+
189
+ Table 4: Comparing decoding speed to other methods. We directly copy reported results from the respective papers, so platforms are not comparable.
190
+
191
+ # References
192
+
193
+ Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2020, pp. 8503–8512.
194
+ [2] Anurag Arnab et al. “Vivit: A video vision transformer”. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2021, pp. 6836–6846.
195
+ [3] Johannes Ballé et al. “Nonlinear transform coding”. In: IEEE Journal of Selected Topics in Signal Processing 15.2 (2020), pp. 339–353.
196
+ [4] Johannes Ballé et al. “Variational image compression with a scale hyperprior”. In: International Conference on Learning Representations (ICLR). 2018.
197
+ [5] Gedas Bertasius, Heng Wang, and Lorenzo Torresani. “Is Space-Time Attention All You Need for Video Understanding?” In: International Conference on Machine Learning. PMLR. 2021, pp. 813–824.
198
+ [6] Tom Brown et al. “Language models are few-shot learners”. In: Advances in neural information processing systems 33 (2020), pp. 1877–1901.
199
+ [7] Aakanksha Chowdhery et al. “Palm: Scaling language modeling with pathways”. In: arXiv preprint arXiv:2204.02311 (2022).
200
+ [8] Jacob Devlin et al. “Bert: Pre-training of deep bidirectional transformers for language understanding”. In: arXiv preprint arXiv:1810.04805 (2018).
201
+ [9] Abdelaziz Djelouah et al. “Neural inter-frame compression for video coding”. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2019, pp. 6421–6429.
202
+ [10] Alexey Dosovitskiy et al. “An image is worth 16x16 words: Transformers for image recognition at scale”. In: arXiv preprint arXiv:2010.11929 (2020).
203
+ [11] Sergey Edunov et al. “Understanding back-translation at scale”. In: arXiv preprint arXiv:1808.09381 (2018).
204
+ [12] Haoqi Fan et al. “Multiscale vision transformers”. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2021, pp. 6824–6835.
205
+ [13] Adam Golinski et al. “Feedback recurrent autoencoder for video compression”. In: Proceedings of the Asian Conference on Computer Vision. 2020.
206
+ [14] Amirhossein Habibian et al. “Video compression with rate-distortion autoencoders”. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2019, pp. 7033– 7042.
207
+ [15] Dailan He et al. “Elic: Efficient learned image compression with unevenly grouped spacechannel contextual adaptive coding”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2022, pp. 5718–5727.
208
+ [16] Jonathan Heek et al. Flax: A neural network library and ecosystem for JAX. Version 0.4.2. 2020. URL: http://github.com/google/flax.
209
+ [17] Zhihao Hu, Guo Lu, and Dong Xu. “FVC: A new framework towards deep video compression in feature space”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021, pp. 1502–1511.
210
+ [18] Diederik P Kingma and Max Welling. “Auto-encoding variational bayes”. In: arXiv preprint arXiv:1312.6114 (2013).
211
+ [19] Jiahao Li, Bin Li, and Yan Lu. “Deep contextual video compression”. In: Advances in Neural Information Processing Systems 34 (2021).
212
+ [20] Bowen Liu et al. “Deep learning in latent space for video prediction and compression”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021, pp. 701–710.
213
+ [21] Jerry Liu et al. “Conditional entropy coding for efficient video compression”. In: European Conference on Computer Vision. Springer. 2020, pp. 453–468.
214
+ [22] Ze Liu et al. “Swin transformer: Hierarchical vision transformer using shifted windows”. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2021, pp. 10012– 10022.
215
+ [23] Guo Lu et al. “Dvc: An end-to-end deep video compression framework”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2019, pp. 11006–11015.
216
+ [24] Fabian Mentzer et al. “Neural Video Compression using GANs for Detail Synthesis and Propagation”. In: arXiv preprint arXiv:2107.12038 (2021).
217
+ [25] Alexandre Mercat, Marko Viitanen, and Jarno Vanne. “UVG dataset: 50/120fps 4K sequences for video codec analysis and development”. In: Proceedings of the 11th ACM Multimedia Systems Conference. 2020, pp. 297–302.
218
+ [26] David Minnen, Johannes Ballé, and George D Toderici. “Joint autoregressive and hierarchical priors for learned image compression”. In: Advances in Neural Information Processing Systems. 2018, pp. 10771–10780.
219
+ [27] David Minnen and Saurabh Singh. “Channel-wise autoregressive entropy models for learned image compression”. In: arXiv preprint arXiv:2007.08739 (2020).
220
+ [28] Daniel Neimark et al. “Video transformer network”. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2021, pp. 3163–3172.
221
+ [29] Yichen Qian et al. “Entroformer: A Transformer-based Entropy Model for Learned Image Compression”. In: arXiv preprint arXiv:2202.05492 (2022).
222
+ [30] Oren Rippel et al. “Elf-vc: Efficient learned flexible-rate video coding”. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2021, pp. 14479–14488.
223
+ [31] Gary J Sullivan et al. “Overview of the high efficiency video coding (HEVC) standard”. In: IEEE Transactions on circuits and systems for video technology 22.12 (2012), pp. 1649–1668.
224
+ [32] Chen Sun et al. “Videobert: A joint model for video and language representation learning”. In: Proceedings of the IEEE/CVF International Conference on Computer Vision. 2019, pp. 7464– 7473.
225
+ [33] Lucas Theis et al. “Lossy image compression with compressive autoencoders”. In: International Conference on Learning Representations (ICLR). 2017.
226
+ [34] George Toderici et al. CLIC 2020: Challenge on Learned Image Compression. http:// compression.cc. 2020.
227
+ [35] Ashish Vaswani et al. “Attention is all you need”. In: Advances in neural information processing systems 30 (2017).
228
+ [36] Haiqiang Wang et al. “MCL-JCV: a JND-based H.264/AVC video quality assessment dataset”. In: 2016 IEEE International Conference on Image Processing (ICIP). IEEE. 2016, pp. 1509– 1513.
229
+ [37] Huiyu Wang et al. “Max-deeplab: End-to-end panoptic segmentation with mask transformers”. In: Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition. 2021, pp. 5463–5474.
230
+ [38] Zhou Wang, Eero P Simoncelli, and Alan C Bovik. “Multiscale structural similarity for image quality assessment”. In: The Thrity-Seventh Asilomar Conference on Signals, Systems & Computers, 2003. Vol. 2. Ieee. 2003, pp. 1398–1402.
231
+ [39] Chao-Yuan Wu, Nayan Singhal, and Philipp Krahenbuhl. “Video compression through image interpolation”. In: Proceedings of the European Conference on Computer Vision (ECCV). 2018, pp. 416–431.
232
+ [40] Ren Yang, Luc Van Gool, and Radu Timofte. “Perceptual Learned Video Compression with Recurrent Conditional GAN”. In: arXiv preprint arXiv:2109.03082 (2021).
233
+ [41] Ren Yang et al. “Learning for Video Compression with Recurrent Auto-Encoder and Recurrent Probability Model”. In: IEEE Journal of Selected Topics in Signal Processing 15.2 (2021), pp. 388–401.
234
+ [42] Ruihan Yang et al. “Hierarchical autoregressive modeling for neural video compression”. In: arXiv preprint arXiv:2010.10258 (2020).
235
+ [43] Y. Yang, S. Mandt, and L. Theis. “An Introduction to Neural Data Compression”. preprint. 2022. URL: https://arxiv.org/abs/2202.06533.
236
+ [44] Richard Zhang. “Making convolutional networks shift-invariant again”. In: International conference on machine learning. PMLR. 2019, pp. 7324–7334.
237
+ [45] Sixiao Zheng et al. “Rethinking semantic segmentation from a sequence-to-sequence perspective with transformers”. In: Proceedings of the IEEE/CVF conference on computer vision and pattern recognition. 2021, pp. 6881–6890.
238
+ [46] Yinhao Zhu, Yang Yang, and Taco Cohen. “Transformer-based Transform Coding”. In: International Conference on Learning Representations. 2021.
239
+
240
+ # NeurIPS Checklist
241
+
242
+ 1. For all authors...
243
+
244
+ (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope? [Yes]
245
+ (b) Did you describe the limitations of your work? [Yes] see Sec 6.
246
+ (c) Did you discuss any potential negative societal impacts of your work? [Yes] see Societal Impact in Sec 6.
247
+ (d) Have you read the ethics review guidelines and ensured that your paper conforms to them? [Yes]
248
+
249
+ 2. If you are including theoretical results...
250
+
251
+ (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]
252
+
253
+ 3. If you ran experiments...
254
+
255
+ (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)? [No] We cannot release training data but will release code if the paper is published.
256
+ (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)? [Yes]
257
+ (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)? [No] However, we find in most experiments, multiple runs end at similar final losses.
258
+ (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 specify training platform and training times in 3.4, as well as how many models we train.
259
+
260
+ 4. If you are using existing assets (e.g., code, data, models) or curating/releasing new assets...
261
+
262
+ (a) If your work uses existing assets, did you cite the creators? [Yes] See Sec 4.
263
+ (b) Did you mention the license of the assets? [Yes] See Sec 4.
264
+ (c) Did you include any new assets either in the supplementary material or as a URL? [Yes] We will release a Github URL to our code upon publication.
265
+ (d) Did you discuss whether and how consent was obtained from people whose data you’re using/curating? [N/A] We don’t release new data.
266
+ (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content? [N/A] We don’t release new data.
267
+
268
+ 5. If you used crowdsourcing or conducted research with human subjects...
269
+
270
+ (a) Did you include the full text of instructions given to participants and screenshots, if applicable? [N/A] No crowdsourcing or human subjects.
271
+ (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable? [N/A] No crowdsourcing or human subjects.
272
+ (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation? [N/A] No crowdsourcing or human subjects.
parse/dev/p-BhZSz59o4/p-BhZSz59o4.md ADDED
@@ -0,0 +1,364 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # BEIT: BERT PRE-TRAINING OF IMAGE TRANSFORMERS
2
+
3
+ Hangbo Bao†∗, Li Dong‡, Songhao Piao†, Furu Wei‡
4
+
5
+ † Harbin Institute of Technology $\ddagger$ Microsoft Research https://github.com/microsoft/unilm
6
+
7
+ # ABSTRACT
8
+
9
+ We introduce a self-supervised vision representation model BEIT, which stands for Bidirectional Encoder representation from Image Transformers. Following BERT (Devlin et al., 2019) developed in the natural language processing area, we propose a masked image modeling task to pretrain vision Transformers. Specifically, each image has two views in our pre-training, i.e., image patches (such as $1 6 \times 1 6$ pixels), and visual tokens (i.e., discrete tokens). We first “tokenize” the original image into visual tokens. Then we randomly mask some image patches and fed them into the backbone Transformer. The pre-training objective is to recover the original visual tokens based on the corrupted image patches. After pre-training BEIT, we directly fine-tune the model parameters on downstream tasks by appending task layers upon the pretrained encoder. Experimental results on image classification and semantic segmentation show that our model achieves competitive results with previous pre-training methods.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Transformer (Vaswani et al., 2017) has achieved promising performance in computer vision (Dosovitskiy et al., 2020; Touvron et al., 2020). However, empirical studies show that vision Transformers require more training data than convolutional neural networks. In order to solve the data-hungry issue (Liu et al., 2021a), self-supervised pre-training is a promising solution to leverage large-scale image data. Several strands of methods have been explored for vision Transformers, such as contrastive learning (Chen et al., 2021; Xie et al., 2021), and self-distillation (Caron et al., 2021).
14
+
15
+ Concurrently, BERT (Devlin et al., 2019) has achieved great success in natural language processing. Its masked language modeling task first randomly masks some proportion of tokens within a text, and then recovers the masked tokens based on the Transformer encoding results of the corrupted text. Motivated by BERT, we turn to the denoising auto-encoding idea to pretrain vision Transformers, which has not been well studied by the vision community. It is challenging to directly apply BERTstyle pre-training for image data. First of all, there is no pre-exist vocabulary for vision Transformer’s input unit, i.e., image patches. So we cannot simply employ a softmax classifier to predict over all possible candidates for masked patches. In contrast, the language vocabulary, such as words and BPE (Sennrich et al., 2016), is well-defined and eases auto-encoding prediction. A straightforward alternative is regarding the task as a regression problem, which predicts the raw pixels of masked patches. However, such pixel-level recovery task tends to waste modeling capability on pre-training short-range dependencies and high-frequency details (Ramesh et al., 2021). Our goal is to overcome the above issues for pre-training of vision Transformers.
16
+
17
+ In this work, we introduce a self-supervised vision representation model BEIT, which stands for Bidirectional Encoder representation from Image Transformers. Inspired by BERT, we propose a pre-training task, namely, masked image modeling (MIM). As shown in Figure 1, MIM uses two views for each images, i.e., image patches, and visual tokens. We split the image into a grid of patches that are the input representation of backbone Transformer. Moreover, we “tokenize” the image to discrete visual tokens, which is obtained by the latent codes of discrete VAE (Ramesh et al., 2021).
18
+
19
+ ![](images/7da15463c6925947a05f5cace860b3ba3dff57277f533b25af02a301ec3dfc39.jpg)
20
+ Figure 1: Overview of BEIT pre-training. Before pre-training, we learn an “image tokenizer” via autoencoding-style reconstruction, where an image is tokenized into discrete visual tokens according to the learned vocabulary. During pre-training, each image has two views, i.e., image patches, and visual tokens. We randomly mask some proportion of image patches (gray patches in the figure) and replace them with a special mask embedding [M]. Then the patches are fed to a backbone vision Transformer. The pre-training task aims at predicting the visual tokens of the original image based on the encoding vectors of the corrupted image.
21
+
22
+ During pre-training, we randomly mask some proportion of image patches, and feed the corrupted input to Transformer. The model learns to recover the visual tokens of the original image, instead of the raw pixels of masked patches.
23
+
24
+ We perform self-supervised learning and then fine-tune the pretrained BEIT on two downstream tasks, i.e., image classification, and semantic segmentation. Experimental results indicate that BEIT outperforms both from-scratch training and previous strong self-supervised models. Moreover, BEIT is complementary to supervised pre-training. Performance of BEIT can be further improved by intermediate fine-tuning with ImageNet labels. Ablation studies show that our proposed techniques are critical to the effectiveness of BERT-style pre-training for image data. Apart from performance, the improvements of convergence speed and stability of fine-tuning reduce training costs on end tasks. In addition, we demonstrate that self-supervised BEIT can learn reasonable semantic regions via pre-training, unleashing the rich supervision signals contained in images.
25
+
26
+ Our contributions are summarized as follows:
27
+
28
+ • We propose a masked image modeling task to pretrain vision Transformers in a self-supervised manner. We also provide a theoretical explanation from the perspective of variational autoencoder. • We pretrain BEIT and conduct extensive fine-tuning experiments on downstream tasks, such as image classification, and semantic segmentation. • We present that the self-attention mechanism of self-supervised BEIT learns to distinguish semantic regions and object boundaries, although without using any human annotation.
29
+
30
+ # 2 METHODS
31
+
32
+ Given an input image $x$ , BEIT encodes it to contextualized vector representations. As shown in Figure 1, BEIT is pretrained by the masked image modeling (MIM) task in a self-supervised learning manner. MIM aims at recovering the masked image patches based on encoding vectors. For
33
+
34
+ downstream tasks (such as image classification, and semantic segmentation), we append task layers upon pretrained BEIT and fine-tune the parameters on the specific datasets.
35
+
36
+ # 2.1 IMAGE REPRESENTATIONS
37
+
38
+ The images have two views of representations in our method, namely, image patch, and visual tokens.
39
+ The two types serve as input and output representations during pre-training, respectively.
40
+
41
+ # 2.1.1 IMAGE PATCH
42
+
43
+ The 2D image is split into a sequence of patches (Dosovitskiy et al., 2020), so that a standard Transformer can directly accept image data. Formally, we reshape the image $\pmb { x } \in \mathbb { R } ^ { H \times W \times C }$ into $N = H W / P ^ { 2 }$ patches $\mathbf { \bar { x } } ^ { p } \in \bar { \mathbb { R } } ^ { N \times ( \bar { P ^ { 2 } } C ) }$ , where $C$ is the number of channels, $( H , W )$ is the input image resolution, and $( P , P )$ is the resolution of each patch. The image patches $\{ x _ { i } ^ { p } \} _ { i = 1 } ^ { N }$ are flattened into vectors and are linearly projected, which is similar to word embeddings in BERT (Devlin et al., 2019). Image patches preserve raw pixels and are used as input features in BEIT.
44
+
45
+ In our experiments, we split each $2 2 4 \times 2 2 4$ image into a $1 4 \times 1 4$ grid of image patches, where each patch is $1 6 \times 1 6$ .
46
+
47
+ # 2.1.2 VISUAL TOKEN
48
+
49
+ Similar to natural language, we represent the image as a sequence of discrete tokens obtained by an “image tokenizer”, instead of raw pixels. Specifically, we tokenize the image $\pmb { x } \in \mathbb { R } ^ { H \times W \times C }$ into $z = \overbar { [ } z _ { 1 } , \ldots , z _ { N } ] \in \mathcal { V } ^ { h \times w }$ , where the vocabulary $\mathcal { V } \overset { \cdot } { = } \left\{ 1 , \ldots , | \mathcal { V } | \right\}$ contains discrete token indices.
50
+
51
+ Following (Ramesh et al., 2021), we use the image tokenizer learned by discrete variational autoencoder (dVAE). There are two modules during visual token learning, namely, tokenizer and decoder. The tokenizer $q _ { \phi } ( \pmb { z } | \pmb { x } )$ maps image pixels $_ { \textbf { \em x } }$ into discrete tokens $_ z$ according to a visual codebook (i.e., vocabulary). The decoder $p _ { \psi } ( { \pmb x } | z )$ learns to reconstruct the input image $_ { \textbf { \em x } }$ based on the visual tokens $_ z$ . The reconstruction objective can be written as $\mathbb { E } _ { z \sim q _ { \phi } ( \mathbf { z } | \mathbf { x } ) } [ \log p _ { \psi } ( \pmb { x } | z ) ]$ . Because the latent visual tokens are discrete, the model training is non-differentiable. Gumbel-softmax relaxation (Jang et al., 2017; Maddison et al., 2017) is employed to train the model parameters. Moreover, a uniform prior is put on $q _ { \phi }$ during dVAE training. Refer to (Ramesh et al., 2021) for more training details of the image tokenizer.
52
+
53
+ We tokenize each image to a $1 4 \times 1 4$ grid of visual tokens. Notice the number of visual tokens and the number of image patches for one image are the same. The vocabulary size is set to $| \nu | = 8 1 9 2$ . In our work, we directly use the publicly available1 image tokenizer described in (Ramesh et al., 2021). We also compare it with a re-implemented tokenizer in Appendix C.
54
+
55
+ # 2.2 BACKBONE NETWORK: IMAGE TRANSFORMER
56
+
57
+ Following ViT (Dosovitskiy et al., 2020), we use the standard Transformer (Vaswani et al., 2017) as the backbone network. So the results can be directly compared with previous work in terms of the network architecture.
58
+
59
+ The input of Transformer is a sequence of image patches {xpi }Ni=1. The patches are then linearly projected to obtain patch embeddings $\pmb { { E x } } _ { i } ^ { p }$ , where $\pmb { { \cal E } } \in \mathbb { R } ^ { ( P ^ { 2 } C ) \times D }$ . Moreover, we prepend a special token [S] to the input sequence. We also add standard learnable 1D position embeddings $\dot { E } _ { p o s } \in \mathbb { R } ^ { N \times D }$ to patch embeddings. The input vectors $H _ { 0 } = [ e _ { [ S ] } , E x _ { i } ^ { p } , \dots , E x _ { N } ^ { p } ] + E _ { p o s }$ is fed into Twhere he encoder contains . The output vector $L$ layers of Transf the last layer $\pmb { H } ^ { l } = \mathrm { T r a n s f o r m e r } ( \pmb { H } ^ { l - 1 } )$ $l = 1 , \ldots , L$ ${ \pmb { H } } ^ { L } = [ { \pmb { h } } _ { [ \mathbb { S } ] } ^ { L } , { \pmb { h } } _ { 1 } ^ { L } , \dots , { \pmb { h } } _ { N } ^ { L } ]$ encoded representations for the image patches, where $h _ { i } ^ { L }$ is the vector of the $i$ -th image patch.
60
+
61
+ # 2.3 PRE-TRAINING BEIT: MASKED IMAGE MODELING
62
+
63
+ We propose a masked image modeling (MIM) task. We randomly mask some percentage of image patches, and then predict the visual tokens that are corresponding to the masked patches.
64
+
65
+ Figure 1 shows the overview of our method. As presented in Section 2.1, given an input image $_ { \textbf { \em x } }$ , we split it into $N$ image patches $( \{ x _ { i } ^ { p } \} _ { i = 1 } ^ { N } )$ , and tokenize it to $N$ visual tokens $( \{ z _ { i } \} _ { i = 1 } ^ { N } )$ . We randomly mask approximately $4 0 \%$ image patches, where the masked positions are denoted as $\mathcal { M } \in \{ 1 , \ldots , N \} ^ { \bar { 0 } . \bar { 4 } N }$ . Next we replace the masked patches with a learnable embedding $\boldsymbol { e } _ { [ \mathbb { M } ] } \in \mathbb { R } ^ { D }$ . The corrupted image patches $\boldsymbol { x } ^ { \mathcal { M } ^ { \bullet } } = \{ \pmb { x } _ { i } ^ { p } : i \notin \mathcal { M } \} _ { i = 1 } ^ { \mathcal { N } } \bigcup \{ \pmb { e } _ { [ \mathbb { M } ] } : i \in \mathcal { M } \} _ { i = 1 } ^ { N }$ are then fed into the $L$ i i=1 -layer Transformer as described in Section 2.2. The final hidden vectors $\{ h _ { i } ^ { L } \} _ { i = 1 } ^ { N }$ are regarded as encoded representations of the input patches. For each masked position $\{ h _ { i } ^ { L } : i \in \mathcal { M } \} _ { i = 1 } ^ { N }$ , we use a softmax classifier to predict the corresponding visual tokens $p _ { \mathrm { M I M } } ( z ^ { \prime } | x ^ { \mathcal { M } } ) = \mathrm { s o f t m a x } _ { z ^ { \prime } } ( W _ { c } h _ { i } ^ { L } + b _ { c } )$ , where $x ^ { \mathcal { M } }$ is the corrupted image, $W _ { c } \in \mathbb { R } ^ { | \mathcal { V } | \times D }$ , and $b _ { c } \in \mathbb { R } ^ { | \nu | }$ . The pre-training objective is to maximize the log-likelihood of the correct visual tokens $z _ { i }$ given the corrupted image:
66
+
67
+ $$
68
+ \operatorname* { m a x } \sum _ { \boldsymbol { x } \in \mathcal { D } } \mathbb { E } _ { \mathcal { M } } \left[ \sum _ { i \in \mathcal { M } } \log p _ { \mathrm { M I M } } ( z _ { i } | \boldsymbol { x } ^ { \mathcal { M } } ) \right]
69
+ $$
70
+
71
+ where $\mathcal { D }$ is the training corpus, $\mathcal { M }$ represents randomly masked positions, and $x ^ { \mathcal { M } }$ is the corrupted image that is masked according to $\mathcal { M }$ .
72
+
73
+ Rather than randomly choosing patches for the masked positions $\mathcal { M }$ , we employ blockwise masking in our work. As summarized in Algorithm 1, a block of image patches is masked each time. For each block, we set the minimum number of patches to 16. Then we randomly choose an aspect ratio for the masking block. We repeat the above two steps until obtaining enough masked patches, i.e., $0 . 4 N$ , where $N$ is the total number of image patches, and 0.4 is masking ratio.
74
+
75
+ # Algorithm 1 Blockwise Masking
76
+
77
+ <table><tr><td>Input:N(= h × w) image patches Output:Masked positions M M↑{ repeat</td></tr><tr><td>s ← Rand(16,0.4N - |M) Block size r ← Rand(0.3,0.3) Aspect ratio of block</td></tr><tr><td>a←√s·r;b←√s/r</td></tr><tr><td>t ← Rand(O,h-a) ;l←Rand(O,ω-b)</td></tr><tr><td>M←MU{(i,j):i∈[t,t+a),j∈[t,i+b)}</td></tr><tr><td>until|M|&gt;0.4N Masking ratio is 40%</td></tr><tr><td>return M</td></tr></table>
78
+
79
+ The MIM task is greatly inspired by masked language modeling (Devlin et al., 2019), which is one of the most successful pre-training objective in natural language processing. Moreover, blockwise (or n-gram) masking is also widely applied in BERT-like models (Joshi et al., 2020; Bao et al., 2020; Raffel et al., 2020). However, directly using pixel-level auto-encoding (i.e., recovering the pixels of masked patches) for vision pre-training pushes the model to focus on short-range dependencies and high-frequency details (Ramesh et al., 2021). BEIT overcomes the above issue by predicting discrete visual tokens, which summarizes the details to high-level abstractions. Ablation studies in Section 3.3 show that our proposed method significantly outperforms pixel-level auto-encoding.
80
+
81
+ # 2.4 FROM THE PERSPECTIVE OF VARIATIONAL AUTOENCODER
82
+
83
+ The BEIT pre-training can be viewed as variational autoencoder (Kingma & Welling, 2014) training. Let $x$ denote the original image, $\tilde { x }$ the masked image, and $z$ the visual tokens. Considering the evidence lower bound (ELBO) of the log-likelihood $p ( x | \tilde { x } )$ , i.e., recovering the original image from its corrupted version:
84
+
85
+ $$
86
+ \sum _ { ( \boldsymbol { x } _ { i } , \tilde { \boldsymbol { x } } _ { i } ) \in \mathcal { D } } \log p ( x _ { i } | \tilde { x } _ { i } ) \ge \sum _ { ( \boldsymbol { x } _ { i } , \tilde { \boldsymbol { x } } _ { i } ) \in \mathcal { D } } \Big ( \underbrace { \mathbb { E } _ { z _ { i } \sim q _ { \phi } ( \mathbf { z } | \boldsymbol { x } _ { i } ) } [ \log p _ { \psi } ( x _ { i } | \boldsymbol { z } _ { i } ) ] } _ { \mathrm { V i s u a l ~ T o k e n ~ R e c o n s t r u c t i o n } } - D _ { \mathrm { K L } } [ q _ { \phi } ( \mathbf { z } | \boldsymbol { x } _ { i } ) , p _ { \theta } ( \mathbf { z } | \tilde { \boldsymbol { x } } _ { i } ) ] \Big )
87
+ $$
88
+
89
+ where (1) $q _ { \phi } ( z | x )$ denotes the image tokenizer that obtains visual tokens; (2) $p _ { \psi } ( x | z )$ decodes the original image given input visual tokens; (3) $p _ { \theta } ( z | \tilde { x } )$ recovers the visual tokens based on the masked image, which is our MIM pre-training task.
90
+
91
+ We learn the model following a two-stage procedure similar to (van den Oord et al., 2017; Razavi et al., 2019). In the first stage, we obtain the image tokenizer as a discrete variational autoencoder (Ramesh et al., 2021). Specifically, the first stage minimizes the reconstruction loss
92
+
93
+ $- \mathbb { E } _ { z _ { i } \sim q _ { \phi } ( \mathbf { z } | x _ { i } ) } [ \log p _ { \psi } ( x _ { i } | z _ { i } ) ]$ with an uniform prior as described in Equation (2). In the second stage, we learn the prior $p _ { \theta }$ while keeping $q _ { \phi }$ and $p _ { \psi }$ fixed. We simplify $q _ { \phi } ( \mathbf { z } | \boldsymbol { x } _ { i } )$ to a one-point distribution with the most likely visual tokens $\hat { z } _ { i } = \arg \operatorname* { m a x } _ { z } q _ { \phi } ( z | x _ { i } )$ . Then Equation (2) can be rewritten as:
94
+
95
+ $$
96
+ \sum _ { ( \boldsymbol { x } _ { i } , \boldsymbol { \tilde { x } } _ { i } ) \in \mathcal { D } } \big ( \underbrace { \mathbb { E } _ { \boldsymbol { z } _ { i } \sim q _ { \phi } ( \boldsymbol { z } \mid \boldsymbol { x } _ { i } ) } \big [ \log p _ { \psi } ( \boldsymbol { x } _ { i } | \boldsymbol { z } _ { i } ) \big ] } _ { \mathrm { S t a g e ~ 1 : V i s u a l ~ T o k e n ~ R e c o n s t r u c t i o n } } + \underbrace { \log p _ { \theta } ( \hat { \boldsymbol { z } } _ { i } | \boldsymbol { \tilde { x } } _ { i } ) } _ { \mathrm { S t a g e ~ 2 : M a s k e d ~ I m a g e ~ M o d e l i n g } }
97
+ $$
98
+
99
+ where the second term is our BEIT pre-training objective.
100
+
101
+ # 2.5 PRE-TRAINING SETUP
102
+
103
+ The network architecture of BEIT follows that of ViT-Base (Dosovitskiy et al., 2020) for a fair comparison. We use a 12-layer Transformer with 768 hidden size, and 12 attention heads. The intermediate size of feed-forward networks is 3072. We employ the default $1 6 \times 1 6$ input patch size. We directly borrow the image tokenizer trained by Ramesh et al. (2021). The vocabulary size of visual tokens is 8192.
104
+
105
+ We pretrain BEIT on the training set of ImageNet-1K (Russakovsky et al., 2015), which contains about 1.2M images. Our augmentation policy includes random resized cropping, horizontal flipping, color jittering (Wu et al., 2018). Notice that we do not use the labels for self-supervised learning. We use the $2 2 4 \times 2 2 4$ resolution in our experiments. So the input is split to $1 4 \times 1 4$ image patches, and the same amount of visual tokens. We randomly mask at most 75 patches (i.e., roughly $\bar { 4 } 0 \%$ of total image patches).
106
+
107
+ The pre-training runs for about $5 0 0 \mathrm { k }$ steps (i.e., 800 epochs) with $2 \mathrm { k }$ batch size. Adam (Loshchilov & Hutter, 2019) with $\beta _ { 1 } = 0 . 9 , \beta _ { 2 } = 0 . 9 9 9$ is employed for optimization. The learning rate is set to 1.5e-3, with a warmup of 10 epochs, and cosine learning rate decay. The weight decay is 0.05. We employ stochastic depth (Huang et al., 2016) with a 0.1 rate, and disable dropout. The $5 0 0 \mathrm { k }$ training steps take about five days using 16 Nvidia Telsa V100 32GB GPU cards.
108
+
109
+ We find that proper initialization is important to stabilize Transformer, especially for large-scale pretraining. We first randomly initialize all the parameters within a small range, such as $[ - 0 . 0 2 , 0 . { \overset { } { 0 } } 2 ]$ . Then, for the $l$ -th Transformer layer, we rescale the output matrices (i.e., the last linear projection within each sub-layer) of the self-attention module and the feed-forward network by $\scriptstyle { \frac { 1 } { \sqrt { 2 l } } }$ .
110
+
111
+ # 2.6 FINE-TUNING BEIT ON DOWNSTREAM VISION TASKS
112
+
113
+ After pre-training BEIT, we append a task layer upon the Transformer, and fine-tune the parameters on downstream tasks, like BERT. We take image classification and semantic segmentation as examples in our work. It is straightforward to leverage the pre-training-then-fine-tuning paradigm on other vision tasks with BEIT.
114
+
115
+ Image classification. For image classification tasks, we directly employ a simple linear classifier as the task layer. Specifically, we use average pooling to aggregate the representations, and feed the global to a softmax classifier. The category probabilities are computed as softmax $\left( \mathrm { a v g } ( \{ h _ { i } ^ { L } \} _ { i = 1 } ^ { N } W _ { c } ) \right)$ , where $h _ { i } ^ { L }$ is the final encoding vector of the $i$ -th image patch, $W _ { c } \in \mathbb { R } ^ { D \times C }$ is a parameter matrix, and $C$ is the number of labels. We maximize the likelihood of labeled data by updating the parameters of BEIT and the softmax classifier.
116
+
117
+ Semantic segmentation. For semantic segmentation, we follow the task layer used in SETRPUP (Zheng et al., 2020). To be specific, we use pretrained BEIT as a backbone encoder, and incorporate several deconvolution layers as decoder to produce segmentation. The model is also end-to-end fine-tuned similar to image classification.
118
+
119
+ Intermediate fine-tuning. After self-supervised pre-training, we can further train BEIT on a datarich intermediate dataset (i.e., ImageNet-1K in our work), and then finetune the model on the target downstream tasks. Such intermediate fine-tuning is the common practice of BERT fine-tuning in NLP (Pruksachatkun et al., 2020). We directly follow the method for BEIT.
120
+
121
+ # 3 EXPERIMENTS
122
+
123
+ We conduct full fine-tuning experiments on image classification and semantic segmentation. Moreover, we present various ablation studies for pre-training and analyze the representations learned by BEIT. We also report linear probes on ImageNet in Appendix D.
124
+
125
+ # 3.1 IMAGE CLASSIFICATION
126
+
127
+ The image classification task classifies input images to various categories. We evaluate BEIT on the ILSVRC-2012 ImageNet dataset (Russakovsky et al., 2015) with 1k classes and 1.3M images. We directly follow the most of hyperparameters of DeiT (Touvron et al., 2020) in our fine-tuning experiments for a fair comparison. We reduce fine-tuning epochs compared with training from scratch, as BEIT has been pre-trained. Accordingly, we use a larger learning rate with layer-wise decay. The detailed hyperparameters are summarized in Appendix H.
128
+
129
+ Table 1 reports top-1 accuracy on image classification. We compare BEIT with vision Transformers trained by random initialization, supervised pre-training, and previous self-supervised learning methods. All the compared models are base-size, except iGPT has 1.36B parameters. Pre-training is conducted on ImageNet for the comparison purpose, except ViT-JFT300M is pretrained on Google’s in-house 300M images.
130
+
131
+ Compared with the models trained by random initialization, we find that pre-trained BEIT significantly improves performance on both datasets. BEIT improves the performance on ImageNet, which shows the effectiveness under the rich-resource setting.
132
+
133
+ Moreover, we compare BEIT with previous state-of-the-art self-supervised methods for Transformer, such as DINO (Caron et al., 2021), and MoCo v3 (Chen et al., 2021). Our proposed method outperforms previous models on ImageNet fine-tuning. Among them, iGPT-1.36B (Chen et al., 2020a) uses much more parameters (i.e., 1.36B vs 86M), and ViT-JFT300M (Dosovitskiy et al., 2020) is pretrained on larger corpus (i.e., 300M vs 1.3M), while others pretrain ViT-Base on ImageNet-1K. iGPT-1.36B and ViT-JFT300M are the most comparable methods, which also follows auto-encoding pre-training for vision Transformer. Specifically, iGPT uses clustered image tokens as both input and output for image GPT or image BERT. In contrast, we use image patches as input to preserve raw pixels, and employ discrete visual tokens as a prediction bottleneck. ViT-JFT300 predicts the mean, 3-bit color of each masked patch, rather than visual tokens learned by discrete VAE. We also pretrain the self-supervised tasks of BEIT and DINO in a multi-task learning manner, which is presented in Appendix E.
134
+
135
+ In addition, we evaluate our proposed method with intermediate fine-tuning. In other words, we first pretrain BEIT in a self-supervised manner, and then fine-tune the pretrained model on ImageNet with labeled data. The results show that BEIT is complementary to supervised pre-training, achieving additional gain after intermediate fine-tuning on ImageNet.
136
+
137
+ Fine-tuning to $3 8 4 \times 3 8 4$ resolution. After fine-tuning with resolution $2 2 4 \times 2 2 4$ , we additionally fine-tune the model on $3 8 4 \times 3 8 4$ images by 10 more epochs. We follow the standard higher-resolution setting of DeiT (Touvron et al., 2020), except using fewer epochs. Notice that we keep patch size the same for both $2 2 4 \times 2 2 4$ and $3 8 4 \times 3 8 4$ images. So the input sequence length of Transformers becomes longer for higher resolutions. Table 1 shows that higher resolution improves the BEIT results by $1 +$ points on ImageNet. More importantly, $\mathrm { B E I T _ { 3 8 4 } }$ pretrained on ImageNet-1K even outperforms supervised pre-training $\mathrm { V i T _ { 3 8 4 } }$ that uses ImageNet-22K, when they use the same input resolution.
138
+
139
+ Scaling up to larger size. We further scale up BEIT to the large size (same as ViT-L). As shown in Table 1, $\mathrm { V i T _ { 3 8 4 } – L }$ is worse than $\mathrm { V i T _ { 3 8 4 } }$ on ImageNet, when training from scratch. The results verifies the data-hungry issue of vision Transformers. Supervised pre-training on ImageNet-22K partially relieves the issue, where $\mathrm { V i T _ { 3 8 4 } – L }$ finally outperforms $\mathrm { V i T _ { 3 8 4 } }$ by 1.2. In comparison, BEIT-L is better than BEIT by 2.0, and $\mathrm { B E I T _ { 3 8 4 } – L }$ outperforms $\mathrm { B E I T _ { 3 8 4 } }$ by 1.7. In other words, the benefits of scaling up BEIT from base to large are greater than supervised pre-training with ImageNet-22K. More importantly, comparing between $\mathrm { B E I T _ { 3 8 4 } }$ with $\mathrm { V i T _ { 3 8 4 } }$ that conducts supervised pre-training on ImageNet-22K, the improvements of BEIT become greater along with scaling the size from base (i.e., 0.6) to large (i.e., 1.1). The results suggest that BEIT tends to help more for extremely larger models (such as 1B, or 10B), especially when labeled data are insufficient2 to conduct supervised pre-training3 for such large models.
140
+
141
+ Table 1: Top-1 accuracy on ImageNet-1K. We evaluate base- (“-B”) and large-size (“-L”) models at resolutions $2 2 4 \times 2 2 4$ and $3 8 4 \bar { \times } 3 8 4 .$ †: iGPT-1.36B contains 1.36 billion parameters, while others are base-size models. $^ \ddag$ : $\mathrm { V i T _ { 3 8 4 } }$ -B-JFT300M is pretrained with the “masked patch prediction” task on Google’s in-house $\mathrm { 3 0 0 M }$ images, while others use ImageNet.
142
+
143
+ <table><tr><td>Models</td><td>Model Size</td><td>Resolution</td><td>ImageNet</td></tr><tr><td colspan="4">Training from scratch (i.e., random initialization)</td></tr><tr><td>ViT384-B (Dosovitskiy et al., 2020)</td><td>86M</td><td>3842</td><td>77.9</td></tr><tr><td>ViT384-L (Dosovitskiy et al., 2020)</td><td>307M</td><td>3842</td><td>76.5</td></tr><tr><td>DeiT-B (Touvron et al., 2020)</td><td>86M</td><td>2242</td><td>81.8</td></tr><tr><td>DeiT384-B (Touvron et al.,2020)</td><td>86M</td><td>3842</td><td>83.1</td></tr><tr><td colspan="4">Supervised Pre-Training on ImageNet-22K (using labeled data)</td></tr><tr><td>ViT384-B (Dosovitskiy et al., 2020)</td><td>86M</td><td>3842</td><td>84.0</td></tr><tr><td>ViT384-L (Dosovitskiy et al., 2020)</td><td>307M</td><td>3842</td><td>85.2</td></tr><tr><td colspan="4">Self-Supervised Pre-Training on ImageNet-1K (without labeled data)</td></tr><tr><td>iGPT-1.36B† (Chen et al., 2020a)</td><td>1.36B</td><td>2242</td><td>66.5</td></tr><tr><td>ViT384-B-JFT300M‡ (Dosovitskiy et al., 2020)</td><td>86M</td><td>3842</td><td>79.9</td></tr><tr><td>MoCo v3-B (Chen et al., 2021)</td><td>86M</td><td>2242</td><td>83.2</td></tr><tr><td>MoCo v3-L (Chen et al., 2021)</td><td>307M</td><td>2242</td><td>84.1</td></tr><tr><td>DINO-B (Caron et al., 2021)</td><td>86M</td><td>2242</td><td>82.8</td></tr><tr><td>BEIT-B (ours)</td><td>86M</td><td>2242</td><td>83.2</td></tr><tr><td>BEIT384-B (ours)</td><td>86M</td><td>3842</td><td>84.6</td></tr><tr><td>BEIT-L (ours)</td><td>307M</td><td>2242</td><td>85.2</td></tr><tr><td>BEIT384-L (ours)</td><td>307M</td><td>3842</td><td>86.3</td></tr></table>
144
+
145
+ ![](images/938f76abc42df18367f55190b127ab673d4616a6f8d2170e168d150b227b17c4.jpg)
146
+ Table 2: Convergence curves of training DeiT from scratch and fine-tuning BEIT on ImageNet-1K.
147
+
148
+ Table 3: Results of semantic segmentation on ADE20K. We use SETR-PUP (Zheng et al., 2020) as the task layer and report results of single-scale inference.
149
+
150
+ <table><tr><td>Models</td><td>ADE20K</td></tr><tr><td>Supervised Pre-Training on ImageNet</td><td>45.3</td></tr><tr><td>DINO (Caron et al., 2021)</td><td>44.1</td></tr><tr><td>BEIT (ours)</td><td>45.6</td></tr><tr><td>BEIT+ Intermediate Fine-Tuning (ours)</td><td>47.7</td></tr></table>
151
+
152
+ Convergence curves. Figure 2 compares the convergence curves of the training-from-scratch and pre-training-then-fine-tuning paradigms. We find that fine-tuning BEIT not only achieves better performance, but also converging much faster than training DeiT from scratch. Moreover, fine-tuning BEIT can reach reasonable numbers within very few epochs.
153
+
154
+ Table 4: Ablation studies for BEIT pre-training on image classification and semantic segmentation.
155
+
156
+ <table><tr><td>Models</td><td>ImageNet</td><td>ADE20K</td></tr><tr><td>BEIT (300 Epochs)</td><td>82.86</td><td>44.65</td></tr><tr><td>- Blockwise masking</td><td>82.77</td><td>42.93</td></tr><tr><td>- Visual tokens (i.e.,recover masked pixels)</td><td>81.04</td><td>41.38</td></tr><tr><td>- Visual tokens - Blockwise masking</td><td>80.50</td><td>37.09</td></tr><tr><td>+ Recover 10o% visual tokens</td><td>82.59</td><td>40.93</td></tr><tr><td>-Masking + Recover 10o% visual tokens</td><td>81.67</td><td>36.73</td></tr><tr><td>Pretrain longer (800 epochs)</td><td>83.19</td><td>45.58</td></tr></table>
157
+
158
+ # 3.2 SEMANTIC SEGMENTATION
159
+
160
+ Semantic segmentation aims to predict a corresponding class for each pixel of the input image. We evaluate BEIT on the ADE20K benchmark (Zhou et al., 2019) with 25K images and 150 semantic categories. We report the metric of mean Intersection of Union (mIoU) averaged over all semantic categories. As presented in Section 2.6, we directly follow the task layer and the most of hyperparameters described in SETR-PUP (Zheng et al., 2020). On ADE20K, we use Adam (Loshchilov & Hutter, 2019) as the optimizer. The learning rate is set to 1e-3 with layer-wise decay similar to image classification. We conduct fine-tuning for 160K steps. The batch size is 16. The detailed hyperparameters are described in Appendix I.
161
+
162
+ As shown in Table 3, we compare BEIT with supervised pre-training that relies on labeled data of ImageNet. We find that our proposed method achieves better performance than supervised pretraining, although BEIT does not require manual annotations for pre-training. Moreover, we employ intermediate fine-tuning for BEIT on ImageNet, i.e., we first fine-tune pretrained BEIT on ImageNet, and then fine-tune the model on ADE20K. The results indicate that intermediate fine-tuning further improves BEIT on semantic segmentation.
163
+
164
+ # 3.3 ABLATION STUDIES
165
+
166
+ We conduct ablation studies to analyze the contributions of each component in BEIT. The models are evaluated on image classification (i.e., ImageNet) and semantic segmentation (i.e., ADE20K). We set the default pre-training steps to 300 epochs for the ablation studies, which is $3 7 . 5 \%$ of the total steps used in the previous experiments.
167
+
168
+ Table 4 reports the results of various model variants. First, we ablate blockwise masking by randomly sample masked positions. We find that blockwise masking is beneficial on both tasks, especially on semantic segmentation. Second, we ablate the usage of visual tokens by predicting the raw pixels of masked patches, i.e., the pre-training task becomes a pixel regression problem to recover masked patches. Our proposed masked image modeling task significantly outperforms naive pixel-level auto-encoding. Compared with the results in Table 1, the ablation result is worse than training vision Transformer from scratch on two tasks. The results indicate that the prediction of visual tokens is the key ingredient of BEIT. Third, we ablate the usage of visual tokens and blockwise masking together. We find that blockwise masking is even more helpful for pixel-level auto-encoding, which relieves the suffering of short-distance dependency. Forth, recovering all the visual tokens harms performance on downstream tasks. Fifth, we compare BEIT with different training steps. Pre-training the model longer can further improve performance on downstream tasks.
169
+
170
+ # 3.4 ANALYSIS OF SELF-ATTENTION MAP
171
+
172
+ We show that the self-attention mechanism in BEIT can separate objects, even though our pre-training does not rely on any manual annotation at all. Similar properties are also observed by Caron et al. (2021). The probing images are taken from the MS COCO (Lin et al., 2014) corpus to avoid appearing in the pre-training data.
173
+
174
+ ![](images/9a2f9329e398e95c4c4f044e2e5854e3b82a0895c9d073f8aaa5566bc1e0a293.jpg)
175
+ Figure 2: Self-attention map for different reference points. The self-attention mechanism in BEIT is able to separate objects, although self-supervised pre-training does not use manual annotations.
176
+
177
+ As shown in Figure 2, we plot the self-attention map for different reference points within an image. The visualizations are produced by attention scores computed via query-key product in the last layer. For each reference point, we use the corresponding patch as query, and show which patch it attends to. After pre-training, BEIT learns to distinguish semantic regions using self-attention heads, without any task-specific supervision. The property partially indicates the reason why BEIT is able to help downstream tasks. Such knowledge acquired by BEIT potentially improves the generalization ability of fine-tuned models, especially on small-scale datasets.
178
+
179
+ # 4 RELATED WORK
180
+
181
+ Self-supervised visual representation learning. Various methods have been introduced over the years to pretrain vision models in a self-supervised manner. Pioneering works design clever pretext tasks, such as predicting the patch orderings (Noroozi & Favaro, 2016), colorization (Zhang et al., 2016), and predicting rotation angles (Komodakis & Gidaris, 2018). In addition, Trinh et al. (2019) propose to mask some patches within an image, and classify whether the masked patches are real or fake for each masked position. The method is similar to the masked version of Jigsaw pretraining (Noroozi & Favaro, 2016). The recent strand of research follows contrastive paradigm (Wu et al., 2018; Oord et al., 2018; Hjelm et al., 2019; Bachman et al., 2019; He et al., 2020; Chen et al., 2020b;c). The models typically regard various data augmentations as different views of an image, and then make the representations of positive pairs similar while pushing negative pairs away. In order to obtain enough informative negative samples in contrastive learning, the methods usually rely on large memory banks (Wu et al., 2018; He et al., 2020) or large batch size (Chen et al., 2020b). BYOL (Grill et al., 2020) and SimSiam (Chen & He, 2020) further eliminate the requirement of negative samples, using various techniques to avoid representation collapse. Another strand of methods use clustering to organize image examples (Caron et al., 2018; Asano et al., 2020; Caron et al., 2020; Li et al., 2021).
182
+
183
+ Self-supervised vision Transformers. Pre-training vision Transformers has received significant attention recently due to the data-hungry issue. iGPT (Chen et al., 2020a) first creates a 9-bit color palette by $\mathbf { k }$ -means clustering RGB pixels, and then uses the clustered tokens to represent images. Next iGPT uses the tasks of BERT and GPT to pretrain Transformers. In comparison, our proposed method uses image patches as input without losing pixel-level information. Moreover, our visual tokens are obtained by discrete VAE instead of clustering. ViT (Dosovitskiy et al., 2020) conducts a preliminary exploration with the masked patch prediction task, which predicts the 3-bit mean color of the masked patches. Dosovitskiy et al. (2020) also report that pixel-level auto-encoding performs worse, although it is the most straightforward translation of BERT from NLP to CV. Rather than using heuristically designed pre-training tasks, our proposed model leverages visual tokens learned by discrete VAE, which not only achieves better performance but also is better theoretically motivated. Apart from masked auto-encoding, other mainstream research works use contrastive learning (Chen et al., 2021; Xie et al., 2021), and self-distillation (Caron et al., 2021). In comparison, BEIT can achieve several times of improvement in terms of pre-training throughput (Appendix E), and memory consumption. The advantages make BEIT appealing to scale up vision Transformers.
184
+
185
+ # 5 CONCLUSION
186
+
187
+ We introduce a self-supervised pre-training framework for vision Transformers, achieving strong fine-tuning results on downstream tasks, such as image classification, and semantic segmentation. We show that the proposed method is critical to make BERT-like pre-training (i.e., auto-encoding with masked input) work well for image Transformers. We also present the intriguing property of automatically acquired knowledge about semantic regions, without using any human-annotated data. In the future, we would like to scale up BEIT pre-training in terms of data size and model size. Moreover, we will conduct multimodal pre-training in a more unified way, using the similar objectives and the shared architecture for texts and images.
188
+
189
+ # REFERENCES
190
+
191
+ Yuki M. Asano, Christian Rupprecht, and Andrea Vedaldi. Self-labelling via simultaneous clustering and representation learning. In International Conference on Learning Representations (ICLR), 2020.
192
+
193
+ Philip Bachman, R Devon Hjelm, and William Buchwalter. Learning representations by maximizing mutual information across views. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019.
194
+
195
+ 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, volume 119 of Proceedings of Machine Learning Research, pp. 642–652. PMLR, 2020. URL http://proceedings.mlr.press/v119/bao20a. html.
196
+
197
+ Mathilde Caron, Piotr Bojanowski, Armand Joulin, and Matthijs Douze. Deep clustering for unsupervised learning of visual features. In Proceedings of the European Conference on Computer Vision (ECCV), pp. 132–149, 2018.
198
+
199
+ Mathilde Caron, Ishan Misra, Julien Mairal, Priya Goyal, Piotr Bojanowski, and Armand Joulin. Unsupervised learning of visual features by contrasting cluster assignments. In Advances in Neural Information Processing Systems, volume 33, pp. 9912–9924. Curran Associates, Inc., 2020.
200
+
201
+ Mathilde Caron, Hugo Touvron, Ishan Misra, Hervé Jégou, Julien Mairal, Piotr Bojanowski, and Armand Joulin. Emerging properties in self-supervised vision transformers. arXiv preprint arXiv:2104.14294, 2021.
202
+
203
+ Mark Chen, Alec Radford, Rewon Child, Jeffrey Wu, Heewoo Jun, David Luan, and Ilya Sutskever. Generative pretraining from pixels. In Hal Daumé III and Aarti Singh (eds.), Proceedings of the 37th International Conference on Machine Learning, volume 119 of Proceedings of Machine Learning Research, pp. 1691–1703. PMLR, 13–18 Jul 2020a. URL http://proceedings. mlr.press/v119/chen20s.html.
204
+
205
+ Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations. preprint arXiv:2002.05709, 2020b.
206
+
207
+ Xinlei Chen and Kaiming He. Exploring simple siamese representation learning. preprint arXiv:2011.10566, 2020.
208
+
209
+ Xinlei Chen, Haoqi Fan, Ross Girshick, and Kaiming He. Improved baselines with momentum contrastive learning. preprint arXiv:2003.04297, 2020c.
210
+
211
+ Xinlei Chen, Saining Xie, and Kaiming He. An empirical study of training self-supervised vision transformers. ArXiv, abs/2104.02057, 2021.
212
+
213
+ 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, pp. 4171–4186. Association for Computational Linguistics, 2019.
214
+
215
+ 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. preprint arXiv:2010.11929, 2020.
216
+
217
+ 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, Bilal Piot, Koray Kavukcuoglu, Rémi Munos, and Michal Valko. Bootstrap your own latent: A new approach to self-supervised learning. In NeurIPS, 2020.
218
+
219
+ Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross Girshick. Momentum contrast for unsupervised visual representation learning. In CVPR, 2020.
220
+
221
+ 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 International Conference on Learning Representations, 2019. URL https: //openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } } =$ Bklr3j0cKX.
222
+
223
+ 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 (eds.), Computer Vision – ECCV 2016, pp. 646–661, Cham, 2016. Springer International Publishing. ISBN 978-3- 319-46493-0.
224
+
225
+ Eric Jang, Shixiang Gu, and Ben Poole. Categorical reparameterization with gumbel-softmax. 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 ${ . } = { }$ rkE3y85ee.
226
+
227
+ Mandar Joshi, Danqi Chen, Yinhan Liu, Daniel S. Weld, Luke Zettlemoyer, and Omer Levy. SpanBERT: Improving pre-training by representing and predicting spans. Transactions of the Association for Computational Linguistics, 8:64–77, 2020. doi: 10.1162/tacl_a_00300. URL https://www.aclweb.org/anthology/2020.tacl-1.5.
228
+
229
+ Diederik P. Kingma and Max Welling. Auto-Encoding Variational Bayes. In 2nd International Conference on Learning Representations, ICLR 2014, 2014.
230
+
231
+ Nikos Komodakis and Spyros Gidaris. Unsupervised representation learning by predicting image rotations. In International Conference on Learning Representations (ICLR), 2018.
232
+
233
+ A. Krizhevsky and G. Hinton. Learning multiple layers of features from tiny images. Master’s thesis, Department of Computer Science, University of Toronto, 2009.
234
+
235
+ Junnan Li, Pan Zhou, Caiming Xiong, and Steven Hoi. Prototypical contrastive learning of unsupervised representations. In International Conference on Learning Representations, 2021. URL https://openreview.net/forum?id $_ { \cdot } =$ KmykpuSrjcq.
236
+
237
+ Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pp. 740–755. Springer, 2014.
238
+
239
+ Yahui Liu, Enver Sangineto, Wei Bi, Nicu Sebe, Bruno Lepri, and Marco De Nadai. Efficient training of visual transformers with small datasets. In Thirty-Fifth Conference on Neural Information Processing Systems, 2021a. URL https://openreview.net/forum?id $\underline { { \underline { { \mathbf { \Pi } } } } }$ SCN8UaetXx.
240
+
241
+ Ze Liu, Yutong Lin, Yue Cao, Han Hu, Yixuan Wei, Zheng Zhang, Stephen Lin, and Baining Guo. Swin Transformer: Hierarchical vision transformer using shifted windows. arXiv preprint arXiv:2103.14030, 2021b.
242
+
243
+ Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. In International Conference on Learning Representations, 2019. URL https://openreview.net/forum?id $=$ Bkg6RiCqY7.
244
+
245
+ Chris J. Maddison, Andriy Mnih, and Yee Whye Teh. The Concrete Distribution: A Continuous Relaxation of Discrete Random Variables. In International Conference on Learning Representations, 2017.
246
+
247
+ Mehdi Noroozi and Paolo Favaro. Unsupervised learning of visual representations by solving jigsaw puzzles. In European conference on computer vision, pp. 69–84. Springer, 2016.
248
+
249
+ Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. preprint arXiv:1807.03748, 2018.
250
+
251
+ Yada Pruksachatkun, Jason Phang, Haokun Liu, Phu Mon Htut, Xiaoyi Zhang, Richard Yuanzhe Pang, Clara Vania, Katharina Kann, and Samuel R. Bowman. Intermediate-task transfer learning with pretrained language models: When and why does it work? In Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics. Association for Computational Linguistics, July 2020.
252
+
253
+ 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-totext transformer. J. Mach. Learn. Res., 21:140:1–140:67, 2020. URL http://jmlr.org/ papers/v21/20-074.html.
254
+
255
+ A. Ramesh, Mikhail Pavlov, Gabriel Goh, Scott Gray, Chelsea Voss, Alec Radford, Mark Chen, and Ilya Sutskever. Zero-shot text-to-image generation. ArXiv, abs/2102.12092, 2021.
256
+
257
+ Ali Razavi, Aaron van den Oord, and Oriol Vinyals. Generating diverse high-fidelity images with VQ-VAE-2. In Advances in Neural Information Processing Systems, volume 32. Curran Associates, Inc., 2019.
258
+
259
+ Olga Russakovsky, Jia Deng, Hao Su, Jonathan Krause, Sanjeev Satheesh, Sean Ma, Zhiheng Huang, Andrej Karpathy, Aditya Khosla, Michael Bernstein, Alexander C Berg, and Li Fei-Fei. Imagenet large scale visual recognition challenge. IJCV, 2015.
260
+
261
+ Rico Sennrich, Barry Haddow, and Alexandra Birch. Neural machine translation of rare words with subword units. In Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 1715–1725, Berlin, Germany, August 2016. Association for Computational Linguistics. doi: 10.18653/v1/P16-1162. URL https://www.aclweb. org/anthology/P16-1162.
262
+
263
+ Hugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa, Alexandre Sablayrolles, and Hervé Jégou. Training data-efficient image transformers & distillation through attention. preprint arXiv:2012.12877, 2020.
264
+
265
+ Hugo Touvron, Matthieu Cord, Alexandre Sablayrolles, Gabriel Synnaeve, and Hervé Jégou. Going deeper with image transformers. arXiv preprint arXiv:2103.17239, 2021.
266
+
267
+ Trieu H Trinh, Minh-Thang Luong, and Quoc V Le. Selfie: Self-supervised pretraining for image embedding. arXiv preprint arXiv:1906.02940, 2019.
268
+
269
+ Aaron van den Oord, Oriol Vinyals, and Koray Kavukcuoglu. Neural discrete representation learning. In Proceedings of the 31st International Conference on Neural Information Processing Systems, NIPS’17, pp. 6309–6318, Red Hook, NY, USA, 2017. Curran Associates Inc. ISBN 9781510860964.
270
+
271
+ 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 (eds.), Advances in Neural Information Processing Systems 30: Annual Conference on Neural Information Processing Systems 2017, December 4-9, 2017, Long Beach, CA, USA, pp. 5998–6008, 2017.
272
+
273
+ Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In CVPR, 2018.
274
+
275
+ Tete Xiao, Yingcheng Liu, Bolei Zhou, Yuning Jiang, and Jian Sun. Unified perceptual parsing for scene understanding. In ECCV, 2018.
276
+
277
+ Zhenda Xie, Yutong Lin, Zhuliang Yao, Zheng Zhang, Qi Dai, Yue Cao, and Han Hu. Self-supervised learning with swin transformers. arXiv preprint arXiv:2105.04553, 2021.
278
+
279
+ Xiaohua Zhai, Alexander Kolesnikov, Neil Houlsby, and Lucas Beyer. Scaling vision transformers. arXiv preprint arXiv:2106.04560, 2021.
280
+
281
+ Richard Zhang, Phillip Isola, and Alexei A Efros. Colorful image colorization. In ECCV, 2016.
282
+
283
+ 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. CoRR, abs/2012.15840, 2020. URL https://arxiv.org/abs/2012.15840.
284
+
285
+ Bolei Zhou, Hang Zhao, Xavier Puig, Tete Xiao, Sanja Fidler, Adela Barriuso, and Antonio Torralba. Semantic understanding of scenes through the ADE20K dataset. Int. J. Comput. Vis., 127(3): 302–321, 2019. doi: 10.1007/s11263-018-1140-0. URL https://doi.org/10.1007/ s11263-018-1140-0.
286
+
287
+ # A ARCHITECTURE VARIANTS OF VISION TRANSFORMER
288
+
289
+ We use the standard vision Transformer (ViT; Dosovitskiy et al. 2020) in the experiments for fair comparisons. In addition, we find that LayerScale (Touvron et al., 2021) and relative position bias (Bao et al., 2020; Raffel et al., 2020) improve ViTs on downstream tasks. We employ the same setting as in Section 3.3 for ablation studies, which pretrains base-size models for 300 epochs on ImageNet-1K.
290
+
291
+ As shown in Table 5, both LayerScale and relative position bias improve performance on ImageNet classification and ADE20K semantic segmentation. We denote the improved architecture as $\mathrm { B E I T ^ { + } }$ and use it for the experiments in Appendix B. We empirically notice that vanilla Transformer is the most stable when scaling up the model to billions of parameters, so we do not use LayerScale for extra-large models.
292
+
293
+ Table 5: Ablation studies of architecture variants on image classification and semantic segmentation. For ADE20K, we use UperNet (Xiao et al., 2018) as the task layer, and report mIoU scores of single-scale inference.
294
+
295
+ <table><tr><td>Architecture</td><td>ImageNet</td><td>ADE20K</td></tr><tr><td>ViT (used in this paper)</td><td>82.86</td><td>44.86</td></tr><tr><td>ViT+LayerScale</td><td>83.00</td><td>45.43</td></tr><tr><td>ViT+LayerScale+Relative Position Bias</td><td>83.22</td><td>45.70</td></tr></table>
296
+
297
+ # B COMPARISON WITH LARGE-SCALE SUPERVISED PRE-TRAINING
298
+
299
+ We compare with state-of-the-art supervised pre-training at scale. In addition to using ImageNet-1K for fair comparisons with previous work, we pretrain BEIT on ImageNet-22K to boost performance. We employ the architecture improvements (i.e., LayerScale, and relative position bias) as described in Appendix A, which is denoted as $\mathrm { B E I T ^ { + } }$ in Table 6 and Table 7. We follow the same pre-training setup as in Section 2.5, except we pretrain 150 epochs on ImageNet-22K. After self-supervised pre-training, we conduct intermediate fine-tuning on ImageNet-22K for 90 epochs. Moreover, we use an in-house dataset that has about 70M labeled images as a drop-in replacement of ImageNet-22K.
300
+
301
+ Table 6: Top-1 accuracy on ImageNet-1K fine-tuning. We evaluate models at resolutions $3 8 4 ^ { 2 }$ and $5 1 2 ^ { 2 }$ .
302
+
303
+ <table><tr><td rowspan="2">Models</td><td rowspan="2">Model Size</td><td rowspan="2">Labeled Data Size</td><td colspan="2">ImageNet</td></tr><tr><td>3842</td><td>5122</td></tr><tr><td colspan="5">Supervised Pre-Training on ImageNet-22K (using labeled data)</td></tr><tr><td>ViT-B (Dosovitskiy et al.,2020)</td><td>86M</td><td>14M</td><td>84.0</td><td></td></tr><tr><td>ViT-L (Dosovitskiy et al., 2020)</td><td>307M</td><td>14M</td><td>85.2</td><td>85.30</td></tr><tr><td>ViT-H (Dosovitskiy et al., 2020)</td><td>632M</td><td>14M</td><td>85.1</td><td></td></tr><tr><td colspan="5">Supervised Pre-Training on Google JFT-300M (using labeled data)</td></tr><tr><td>ViT-B (Dosovitskiy et al., 2020)</td><td>86M</td><td>300M</td><td>84.2</td><td></td></tr><tr><td>ViT-L (Dosovitskiy et al., 2020)</td><td>307M</td><td>300M</td><td>87.1</td><td>87.76</td></tr><tr><td>ViT-H (Dosovitskiy et al., 2020)</td><td>632M</td><td>300M</td><td>88.0</td><td>88.55</td></tr><tr><td colspan="5">Supervised Pre-Training on Google JFT-3B (using labeled data)</td></tr><tr><td>ViT-B (Zhai et al.,2021)</td><td>86M</td><td>3000M</td><td>86.6</td><td></td></tr><tr><td>ViT-L (Zhai et al., 2021)</td><td>307M</td><td>3000M</td><td>88.5</td><td></td></tr><tr><td colspan="5">Self-Supervised Pre-Training, and Intermediate Fine-Tuning on ImageNet-22K</td></tr><tr><td>BEIT-B+ (ours)</td><td>86M</td><td>14M</td><td>86.8</td><td>=</td></tr><tr><td>BEIT-L+ (ours)</td><td>307M</td><td>14M</td><td>88.4</td><td>88.6</td></tr><tr><td colspan="5">Self-Supervised Pre-Training,and Intermediate Fine-Tuning on In-House-70M</td></tr><tr><td>BEIT-L+ (ours)</td><td>307M</td><td>70M</td><td>89.3</td><td>89.5</td></tr></table>
304
+
305
+ Table 6 compares BEIT with previous state-of-the-art supervised pre-training (Dosovitskiy et al., 2020; Zhai et al., 2021) on ImageNet fine-tuning. Rather than heavily relying on extremely large-size labeled data (such as Google’s in-house JFT-300M and JFT-3B), we demonstrate that BEIT pretraining can catch up with only ImageNet-22k (14M). Specifically, BEIT-L fine-tuned on ImageNet22K achieves comparable performance with ViT-L trained on Google JFT-3B. Moreover, BEIT-L obtains $8 9 . 5 \%$ top-1 accuracy on ImageNet after intermediate fine-tuning on an in-house 70M dataset. The results indicate that BEIT pre-training greatly reduces the required labeling efforts and advances the new state of the art for large-size vision Transformers.
306
+
307
+ As shown in Table 7, we report the fine-tuning results on the ADE20K semantic segmentation benchmark. Following Swin (Liu et al., 2021b), we use the same task layer (i.e., UperNet; Xiao et al. 2018) and evaluate the models at the resolution $6 4 0 \times 6 4 0$ . The BEIT-L model obtains state-of-the-art performance on ADE20K.
308
+
309
+ Table 7: Performance comparison on the ADE20K semantic segmentation. We follow Swin-L (Liu et al., 2021b) to use UperNet (Xiao et al., 2018) as the task layer and evaluate at resolution $6 4 0 \times 6 4 0$
310
+
311
+ <table><tr><td>Models</td><td>mIoU (%) Multi-Scale mIoU (%)</td></tr><tr><td colspan="2">Supervised Pre-Training on ImageNet-22K (using labeled data)</td></tr><tr><td>Swin-B (Liu et al., 2021b) 50.0</td><td>51.7</td></tr><tr><td>Swin-L (Liu et al., 2021b) 52.1</td><td>53.5</td></tr><tr><td colspan="2">Self-Supervised Pre-Training,and Intermediate Fine-Tuning on ImageNet-22K</td></tr><tr><td>BEIT-B+ (ours)</td><td>54.2</td></tr><tr><td>BEIT-L+ (ours)</td><td>57.0</td></tr><tr><td colspan="2">56.7 Self-Supervised Pre-Training,and Intermediate Fine-Tuning on In-House-70M</td></tr><tr><td>BEIT-L+ (ours)</td><td>58.4</td></tr></table>
312
+
313
+ # C ABLATION STUDIES OF IMAGE TOKENIZER
314
+
315
+ For comparison, we re-train the image tokenizer on ImageNet-1K. The reimplementation is based on https://github.com/lucidrains/DALLE-pytorch. We use the same codebook size 8K as in DALL-E (Ramesh et al., 2021). Then we plug the tokenizer into our pre-training process. We follow the same experimental setup of ablation studies as in Section 3.3. Table 8 shows that our reimplemented tokenizer obtains comparable reconstruction loss and ImageNet fine-tuning performance compared with the off-the-shelf DALL-E tokenizer.
316
+
317
+ <table><tr><td>Image Tokenizer</td><td>Reconstruction Error</td><td>ImageNet</td></tr><tr><td>DALL-E Tokenizer (Ramesh et al., 2021)</td><td>0.0856</td><td>82.86</td></tr><tr><td>Our reimplementation</td><td>0.0880</td><td>82.70</td></tr></table>
318
+
319
+ Table 8: Top-1 accuracy on ImageNet-1K using different image tokenizers during pre-training. For image reconstruction, we report mean absolute error of normalized RGB values. The reimplemented image tokenizer is trained on ImageNet-1K without labels.
320
+
321
+ # D LINEAR PROBES ON IMAGENET
322
+
323
+ We evaluate linear probes on ImageNet for various pretrained vision Transformers. We compare BEIT with two main strands of work, namely discriminative and generative self-supervised learning. The first one applies discriminative learning for pre-training, such as contrastive learning (Chen et al., 2021), and self distillation (Caron et al., 2021). The above methods typically learn to aggregate the image-level features into a global vector, which is relatively suitable for linear probing. In contrast, the second strand of methods, such as iGPT (Chen et al., 2020a) and ours, usually do not pretrain such global feature aggregation, which tends to make linear probes difficult.
324
+
325
+ Following iGPT (Chen et al., 2020a), we use average pooling to aggregate the hidden states of each image patches, and add the probing layer at the middle layer of Transformer instead of always at the final layer. Similarly, we find that the best layer lies in 9-th layer for BEIT-B, and 14-th layer for BEIT-L. To be specific, we use AdamW (Loshchilov & Hutter, 2019) to update the linear probe layer for 50 epochs. The learning rate is 4e-3 with cosine decay. The batch size is 1024. The weight decay is set to 1e-4. We follow data augmentation used in DINO (Caron et al., 2021), which uses random resize crops and horizontal flips augmentation during training and evaluates on central crops.
326
+
327
+ <table><tr><td>Models</td><td>Model Size</td><td>Accuracy</td></tr><tr><td colspan="3">Discriminative self-supervised learning</td></tr><tr><td>DINO-B (Caron et al., 2021)</td><td>86M</td><td>78.2</td></tr><tr><td>MoCo v3-B (Chen et al., 2021)</td><td>86M</td><td>76.7</td></tr><tr><td>MoCo v3-L (Chen et al., 2021)</td><td>307M</td><td>77.6</td></tr><tr><td colspan="3">Generative self-supervised learning</td></tr><tr><td>iGPT-L (Chen et al., 2020a)</td><td>1362M</td><td>65.2</td></tr><tr><td>iGPT-XL (Chen et al., 2020a)</td><td>6801M</td><td>68.7</td></tr><tr><td>iGPT-XL (Chen et al.,2020a)</td><td>6801M</td><td>72.0*</td></tr><tr><td>BEIT-B (ours)</td><td>86M</td><td>56.7</td></tr><tr><td>BEIT-L (ours)</td><td>307M</td><td>73.5</td></tr></table>
328
+
329
+ Table 9: Linear probing accuracy on ImageNet. “ $\langle { \boldsymbol { * } } ^ { \flat }$ denotes that iGPT-XL uses concatenation of five layers for linear probing, while others use the features of single layer.
330
+
331
+ As shown in Table 9, we evaluate linear probes on ImageNet-1K for self-supervised learning. Overall, discriminative methods perform better than generative pre-training on linear probing. Linear probes keep the Transformer parameters fixed and only update the linear layer. So the pre-training of global aggregation of image-level features is beneficial to linear probing in DINO and MoCo v3, although full fine-tuning eliminates the gap. Moreover, the results indicate that increasing the model size from base (86M) to large (304M) significantly improves accuracy for our proposed method. In contrast, the gap between base- and large-size MoCo v3 is smaller. We also find that BEIT outperforms iGPT by a large margin even using much fewer parameters.
332
+
333
+ # E MULTI-TASK PRE-TRAINING WITH DINO
334
+
335
+ We train the pre-training tasks of BEIT and DINO (Caron et al., 2021) together in a multi-task manner. As shown in Table 10, augmenting masked image modeling with DINO improves semantic segmentation on ADE20K, and obtains comparable results on ImageNet classification. Moreover, BEIT is more efficient in terms of pre-training speed, as DINO has two copies of Transformer parameters for self-distillation and multi-crop augmentation (Caron et al., 2020). For the throughput comparisons between BEIT and BEIT $^ +$ DINO, we set batch size to the same. Because BEIT is also more memory-efficient, we can use larger batch size to fully utilize GPU cards, which obtains greater speedup in practice than the reported numbers.
336
+
337
+ <table><tr><td>Models</td><td>ImageNet</td><td>ADE20K</td><td>Pre-Training Throughput</td></tr><tr><td>DINO (400 Epochs)</td><td>82.8</td><td>44.08</td><td>=</td></tr><tr><td>BEIT (300 Epochs)</td><td>82.9</td><td>44.65</td><td>4.2x</td></tr><tr><td>BEIT + DINO (300 Epochs)</td><td>82.9</td><td>46.85</td><td>1.0x</td></tr></table>
338
+
339
+ Table 10: We train the pre-training tasks of BEIT and DINO (Caron et al., 2021) in the way of multi-task learning. We report the performance by fine-tuning on ImageNet-1K image classification and ADE20K semantic segmentation. For ADE20K, we use SETR-PUP (Zheng et al., 2020) as the task layer and report the mIoU score of single-scale inference. The pre-training throughput measures the speed, where larger numbers indicate faster pre-training.
340
+
341
+ # F IMAGE CLASSIFICATION ON CIFAR-100
342
+
343
+ In addition to ImageNet classification, we conduct fine-tuning experiments on the CIFAR100 (Krizhevsky & Hinton, 2009) benchmark with 100 classes and 60k images. The experimental setup is the same as in Section 3.1.
344
+
345
+ Table 11 reports the top-1 accuracy on CIFAR-100. Notably, on the smaller CIFAR-100 dataset, ViT trained from scratch only reaches $4 8 . 5 \%$ accuracy (Chen et al., 2021). In comparison, BEIT achieves $9 0 . 1 \%$ with the help of pre-training. The results indicate that BEIT can greatly reduce the requirement of annotation efforts. BEIT also outperforms MoCo v3. Moreover, intermediate fine-tuning on ImageNet-1K further improves the results on CIFAR-100.
346
+
347
+ Table 11: Top-1 accuracy of image classification on CIFAR-100. The models are at resolution $2 2 4 \times 2 2 4$ , except $\mathrm { V i T _ { 3 8 4 } }$ uses $3 8 4 \times 3 8 4$ . The results, unless otherwise indicated, are all obtained by base-size models. \*: result is taken from (Chen et al., 2021).
348
+
349
+ <table><tr><td>Models</td><td>CIFAR-100</td></tr><tr><td>Training from scratch (i.e.,random initialization) ViT384 (Dosovitskiy et al.,2020)</td><td>48.5*</td></tr><tr><td>Supervised Pre-Training on ImageNet-1K (using labeled data)</td><td></td></tr><tr><td>ViT384 (Dosovitskiy et al.,2020)</td><td>87.1</td></tr><tr><td>DeiT(Touvron et al., 2020)</td><td>90.8</td></tr><tr><td>Self-Supervised Pre-Training on ImageNet-1K (without labeled data)</td><td></td></tr><tr><td>DINO (Caron et al., 2021)</td><td>91.7</td></tr><tr><td>MoCo v3 (Chen et al., 2021)</td><td>87.1</td></tr><tr><td>BEIT (ours)</td><td>90.1</td></tr><tr><td>Self-Supervised Pre-Training, and Intermediate Fine-Tuning on ImageNet-1K BEIT (ours) 91.8</td><td></td></tr></table>
350
+
351
+ G HYPERPARAMETERS FOR PRE-TRAINING
352
+ Table 12: Hyperparameters for pre-training BEIT on ImageNet-1K.
353
+
354
+ <table><tr><td>Hyperparameters</td><td>Base Size</td><td>Large Size</td></tr><tr><td>Layers Hidden size FFN inner hidden size Attention heads Attention head size Patch size</td><td>12 768 3072 12 64</td><td>24 1024 4096 16</td></tr><tr><td>Training epochs Batch size Adam ∈ Adam β Peak learning rate Minimal learning rate Learning rate schedule</td><td>800 2048 1e-8 (0.9, 0.999) 1.5e-3 1e-5 Cosine</td><td>16 ×16</td></tr><tr><td>Warmup epochs Gradient clipping Dropout Stoch. depth Weight decay</td><td>3.0 X 0.1 0.05</td><td>10 1.0</td></tr><tr><td>Data Augment Input resolution Color jitter</td><td>RandomResizeAndCrop 224× 224 0.4</td><td></td></tr></table>
355
+
356
+ H HYPERPARAMETERS FOR IMAGE CLASSIFICATION FINE-TUNING
357
+ Table 13: Hyperparameters for fine-tuning BEIT on ImageNet-1K and CIFAR-100.
358
+
359
+ <table><tr><td>Hyperparameters</td><td>CIFAR-100 Base Size</td><td colspan="2">ImageNet-1K</td></tr><tr><td></td><td></td><td>Base Size</td><td>Large Size</td></tr><tr><td>Peak learning rate</td><td colspan="3">{2e-3,3e-3,4e-3, 5e-3}</td></tr><tr><td>Fine-tuning epochs</td><td>150</td><td>100</td><td>50</td></tr><tr><td>Batch size</td><td>512</td><td>1024</td><td>1024</td></tr><tr><td>Warmup epochs</td><td>20</td><td>20</td><td>5</td></tr><tr><td>Layer-wise learning rate decay</td><td>0.65</td><td>0.65</td><td>0.75</td></tr><tr><td>Adam ∈</td><td></td><td>1e-8</td><td></td></tr><tr><td>Adam β</td><td></td><td>(0.9, 0.999)</td><td></td></tr><tr><td>Minimal learning rate</td><td></td><td>1e-6</td><td></td></tr><tr><td>Learning rate schedule</td><td></td><td>Cosine</td><td></td></tr><tr><td>Repeated Aug</td><td>√</td><td>√</td><td>X</td></tr><tr><td>Weight decay</td><td>0.3</td><td>0.05</td><td>0.05</td></tr><tr><td>Label smoothing ε</td><td></td><td>0.1</td><td></td></tr><tr><td>Stoch.depth</td><td></td><td>0.1</td><td></td></tr><tr><td>Dropout</td><td></td><td>X</td><td></td></tr><tr><td>Gradient clipping</td><td></td><td>X</td><td></td></tr><tr><td>Erasing prob.</td><td>X</td><td>0.25</td><td>0.25</td></tr><tr><td>Input resolution</td><td></td><td>224 × 224</td><td></td></tr><tr><td>Rand Augment</td><td></td><td>9/0.5</td><td></td></tr><tr><td>Mixup prob.</td><td></td><td>0.8</td><td></td></tr><tr><td>Cutmix prob.</td><td></td><td>1.0</td><td></td></tr></table>
360
+
361
+ I HYPERPARAMETERS FOR ADE20K SEMANTIC SEGMENTATIONFINE-TUNING
362
+ Table 14: Hyperparameters for fine-tuning BEIT on ADE20K.
363
+
364
+ <table><tr><td rowspan=1 colspan=1>Hyperparameters</td><td rowspan=1 colspan=1>Base Size</td></tr><tr><td rowspan=1 colspan=1>Peak learning rateFine-tuning stepsBatch sizeAdam eAdam βLayer-wise learning rate decayMinimal learning rateLearning rate scheduleWarmup steps</td><td rowspan=1 colspan=1>1e-3160K161e-8(0.9, 0.999)0.650Linear1500</td></tr><tr><td rowspan=1 colspan=1>DropoutStoch. depthWeight decay</td><td rowspan=1 colspan=1>X0.10.05</td></tr><tr><td rowspan=1 colspan=1>Input resolutionPosition embedding interpolate</td><td rowspan=1 colspan=1>512 × 512bilinear</td></tr></table>
parse/dev/uxxFrDwrE7Y/uxxFrDwrE7Y.md ADDED
@@ -0,0 +1,366 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # LEARNING FAST, LEARNING SLOW: A GENERALCONTINUAL LEARNING METHOD BASED ON COMPLE-MENTARY LEARNING SYSTEM
2
+
3
+ Elahe Arani∗, Fahad Sarfraz\* & Bahram Zonooz
4
+ Advanced Research Lab, NavInfo Europe, Eindhoven, Netherlands
5
+ {elahe.arani, fahad.sarfraz}@navinfo.eu, bahram.zonooz@gmail.com
6
+
7
+ # ABSTRACT
8
+
9
+ Humans excel at continually learning from an ever-changing environment whereas it remains a challenge for deep neural networks which exhibit catastrophic forgetting. The complementary learning system (CLS) theory suggests that the interplay between rapid instance-based learning and slow structured learning in the brain is crucial for accumulating and retaining knowledge. Here, we propose CLS-ER, a novel dual memory experience replay (ER) method which maintains short-term and long-term semantic memories that interact with the episodic memory. Our method employs an effective replay mechanism whereby new knowledge is acquired while aligning the decision boundaries with the semantic memories. CLSER does not utilize the task boundaries or make any assumption about the distribution of the data which makes it versatile and suited for “general continual learning”. Our approach achieves state-of-the-art performance on standard benchmarks as well as more realistic general continual learning settings.
10
+
11
+ # 1 INTRODUCTION
12
+
13
+ Continual learning (CL) refers to the ability of a learning agent to continuously interact with a dynamic environment and process a stream of information to acquire new knowledge while consolidating and retaining previously obtained knowledge (Parisi et al., 2019). This ability to continuously learn from a changing environment is a hallmark of intelligence and a critical missing component in our quest towards making our models truly intelligent. The major challenge towards enabling CL in deep neural networks (DNNs) is that the continual acquisition of incrementally available information from non-stationary data distributions leads to catastrophic forgetting whereby the performance of the model on previously learned tasks drops drastically (McCloskey & Cohen, 1989).
14
+
15
+ Several approaches have been proposed to address the issue of catastrophic forgetting in CL. These can be broadly categorized into regularization-based methods (Farajtabar et al., 2020; Kirkpatrick et al., 2017; Ritter et al., 2018; Zenke et al., 2017) which penalizes changes in the network weights, network expansion-based methods (Rusu et al., 2016; Yoon et al., 2017) which dedicate a distinct set of network parameters to distinct tasks, and rehearsal-based methods (Chaudhry et al., 2018; Lopez-Paz & Ranzato, 2017) which maintains a memory buffer and replays samples from previous tasks. Amongst these, rehearsal-based methods have proven to be more effective in challenging CL tasks (Farquhar & Gal, 2018). However, an optimal approach for replaying memory samples and constraining the model update to efficiently consolidate knowledge remains an open question.
16
+
17
+ In the brain, the ability to continually acquire, consolidate, and transfer knowledge over time is mediated by a rich set of neurophysiological processing principles (Parisi et al., 2019; Zenke et al., 2017) and multiple memory systems (Hassabis et al., 2017). In particular, the CLS theory (Kumaran et al., 2016) posits that efficient learning requires two complementary learning systems: the hippocampus exhibits short-term adaptation and rapid learning of episodic information which is then gradually consolidated to the neocortex for slow learning of structured information. Furthermore, a recent study by Hayes et al. (2021) identified the missing elements of biological reply in the replay mechanisms employed in DNNs for CL. They highlight that many existing approaches only focus on modeling the prefrontal cortex directly and do not have a fast learning network which plays a critical role in enabling efficient CL in the brain. Inspired by these studies, we hypothesize that mimicking the slow and rapid adaptation of information and having an efficient mechanism for incorporating them into the working memory can enable better CL in DNNs.
18
+
19
+ ![](images/a1cd21a22120eb2df3d8568fdf5222a5696c226232417616c6d15bea5f76ba11.jpg)
20
+ Figure 1: CLS-ER employs a dual-memory learning mechanism whereby the episodic memory stores the samples and the semantic memories build short-term and long-term memories of the learned representations of the working model. The two memories interact to enforce a consistency loss on the working model which prevents rapid changes in the parameter space and enables the alignment of the decision boundary with semantic memories for effective knowledge consolidation.
21
+
22
+ To this end, we propose a novel dual memory experience replay method based on the complementary learning systems theory in the brain, dubbed as CLS-ER. In addition to a small episodic memory, our method builds long-term and short-term semantic memories which mimic the rapid and slow adaptation of information (Figure 1). As the network weights encode the learned representations of the tasks (Krishnan et al., 2019), the semantic memories are maintained by taking the exponential moving average of the working model’s weights to consolidate information across the tasks with varying time windows and frequencies. The semantic memories interact with the episodic memory to extract consolidated replay activation patterns and enforce a consistency loss on the update of the working model so that new knowledge is acquired while aligning the decision boundary of the working model with the decision boundaries of semantic memories. This maintains a balance between the plasticity and stability of the model for effective knowledge consolidation.
23
+
24
+ CLS-ER provides a general CL method that does not utilize the task boundaries or make any strong assumption regarding the distribution of the data and tasks. We demonstrate the versatility and effectiveness of our method on a wide range of CL benchmark tasks as well as more challenging scenarios which simulate the complexities of CL in the real world.
25
+
26
+ # 2 RELATED WORK
27
+
28
+ The base method for the rehearsal-based approach, Experience Replay (ER) (Riemer et al., 2018) combines the memory samples with the task samples into the training batch. Several techniques have since been employed on top of ER. Meta Experience Replay (MER) (Riemer et al., 2018) considers replay as a meta-learning problem for maximizing the transfer from previous tasks and minimizing the interference. iCARL (Rebuffi et al., 2017) uses the nearest average representation of past exemplars to classify in an incrementally learned representation space. Gradient Episodic Memory (GEM) (Lopez-Paz & Ranzato, 2017) formulates optimization constraints on the exemplars in memory. Gradient-based Sample Selection (GSS) (Aljundi et al., 2019) aims for memory sample diversity in the gradient space and provides a greedy selection approach. Function Distance Regularization (FDR) (Benjamin et al., 2018) saves the network response at the task boundaries and adds a consistency loss on top of ER. Dark Experience Replay $( \mathrm { D E R + + } )$ applies knowledge distillation (Sarfraz et al., 2021) and regularization on logits sampled during the optimization trajectory.
29
+
30
+ CLS has been used as a source of inspiration for dual memory learning systems in earlier works (French, 1999; Robins, 1993) but they have not been shown to scale to current computer vision tasks (Parisi et al., 2019). Recently, Rostami et al. (2019) utilizes a generative model to couple sequential tasks in a latent embedding space. Kamra et al. (2017) utilizes two generative models in a dual memory architecture. However, they utilize the task boundaries and generative replay has its own set of challenges as it is difficult to learn a faithful distribution and performs sub-par in comparison to instance-based replay methods on challenging CL settings. Generally, the inspiration from CLS theory in DNNs has been mostly limited to episodic memory and mimicking the rapid and slow learning mechanism is majorly ignored (Hayes et al., 2021) which we aim to address.
31
+
32
+ ![](images/24d7b7e6363b7a87d007247acd7ee41d41808ddef322b80d020f7b5aacc3ca20.jpg)
33
+ Figure 2: Task-wise performance on S-CIFAR-10 test set with 500 buffer size. The models are evaluated at the end of each task (y-axis) to evaluate how the task performances $\mathbf { \bar { X } }$ -axis) are affected as training progress. The stable model retains information from earlier tasks while the plastic model quickly adapts to the recent task. Note that there is less forgetting in the semantic memories compared to the working model. For other buffer sizes and S-TinyImageNet see Figures S1 and S2.
34
+
35
+ # 3 METHOD
36
+
37
+ We first provide an overview of the CLS theory for the brain and how we aim to mimic it for DNNs before introducing the main components of our method and the overall formulation.
38
+
39
+ # 3.1 COMPLEMENTARY LEARNING SYSTEM THEORY
40
+
41
+ The CLS theory posits that effective lifelong learning in the brain requires two complementary learning systems. The hippocampus rapidly encodes novel information as a short-term memory which is subsequently used to transfer and consolidate knowledge in the neocortex which gradually acquires structured knowledge representation as long-term memory through experience replay. The interplay between the functionality of the hippocampus and neocortex is crucial for concurrently learning efficient representations (for better generalization) and the specifics of instance-based episodic memory.
42
+
43
+ # 3.2 COMPLEMENTARY LEARNING SYSTEM BASED EXPERIENCED REPLAY
44
+
45
+ Inspired by the CLS theory, we propose a dual memory experience replay method, CLS-ER, which aims to mimic the interplay between fast learning and slow learning mechanisms for enabling effective CL in DNNs. Our method maintains short-term and long-term semantic memories of the encountered tasks which interact with the episodic memory for replaying the associated neural activities. The working model is updated so that it acquires new knowledge while aligning its decision boundary with the semantic memories to enable the consolidation of structured knowledge across the tasks. Figure 1 highlights the parallels between CLS theory and our method.
46
+
47
+ Semantic Memories: Central to our method is the maintenance of two semantic memories which accumulate and consolidate information over long-term and short-term periods. As the acquired knowledge of the learned tasks is encoded in the weights of DNNs (Krishnan et al., 2019), we aim to form our semantic memories by accumulating the knowledge encoded in the corresponding weights of the model as it sequentially learns different tasks.
48
+
49
+ An efficient method for aggregating the weights of a model is provided by Mean Teacher (Tarvainen & Valpola, 2017) which is a knowledge distillation approach that uses an exponential moving average (EMA) of the student’s weights during training as a teacher for semi-supervised learning. It can also be considered as forming a self-ensemble of the intermediate model states that leads to better internal representations. We adapt the Mean Teacher approach to build our semantic memories as it provides a computational and memory-efficient method for accumulating knowledge over the tasks.
50
+
51
+ As CL involves learning tasks sequentially, the model weights at each training step can be considered as a student model specialized for a particular task. Therefore, averaging the weights during training can be considered as forming an ensemble of task-specific student models which effectively aggregates information across the tasks and leads to smoother decision boundaries. CLS-ER builds long-term (stable model) and short-term (plastic model) semantic memories by maintaining two EMA-weighted models over the working model’s weights. The stable model is updated less frequently with a larger window size so that it retains more information from the earlier tasks while the plastic model is updated more frequently with a smaller window size so that it adapts faster to information from new tasks (Figure 2). Section D further demonstrates the benefits of employing two semantic memories instead of a single semantic memory.
52
+
53
+ Episodic Memory: Replay of samples from the previous tasks stored in a small episodic memory is a common approach in CL that has proven to be effective in mitigating catastrophic forgetting. As we aim to position CLS-ER as a versatile general incremental learning method, we do not utilize the task boundaries or make any strong assumptions about the distribution of the tasks or samples. Therefore, to maintain a fixed episodic memory buffer, we employ Reservoir sampling (Vitter, 1985) which assigns equal probability to each sample in the stream for being represented in the buffer and randomly replaces the existing memory samples (Algorithm 2). It is a global distribution matching strategy that ensures that at any given time the distribution of samples in the buffer will approximately match the distribution of all the samples seen so far (Isele & Cosgun, 2018).
54
+
55
+ Consolidation of Information: The key challenge in CL is the consolidation of new information with the previously acquired information. This requires an effective balance between the stability and plasticity of the model. Furthermore, the sharp change in decision boundary as a new task is learned makes the consolidation of information over tasks more challenging. CLS-ER tackles these challenges through a novel dual memory experience replay mechanism. The long-term and shortterm semantic memories interact with the episodic memory to extract the consolidated activations for the memory samples which are then utilized to constrain the update of the working model so that new knowledge is obtained whilst the decision boundary is aligned with the semantic memories. This prevents rapid changes in the parameter space as new tasks are learned. Furthermore, aligning the working model’s decision boundary with the semantic memories serves two goals: (i) helps in retaining and consolidating information and (ii) leads to a smoother adaptation of decision boundary.
56
+
57
+ # 3.3 FORMULATION
58
+
59
+ CLS-ER involves training a working model $f ( . ; \theta _ { w } )$ on a data stream $\mathcal { D }$ sampled from a non-iid distribution. Two additional EMA-weighted models are maintained as semantic memories: plastic model $f ( . ; \theta _ { P } )$ and the stable model $f ( . ; \theta _ { S } )$ . Finally, Reservoir sampling (Vitter, 1985) is employed to maintain a small episodic memory $\mathcal { M }$ .
60
+
61
+ At each training step, the working model receives the training batch $X _ { b }$ from the data stream and retrieves a random batch of exemplars $X _ { m }$ from the episodic memory. This is then followed by the retrieval of optimal semantic information, i.e. the structural knowledge encoded in the semantic memories which account for the consolidation of feature space and adaptation of the decision boundaries of the previous tasks. The semantic memories are designed so that the plastic model has higher performance on recent tasks whereas the stable model prioritizes retaining information on the older tasks. Therefore, we would prefer to use the logits from the stable model $Z _ { S }$ for older exemplars and the plastic model $Z _ { P }$ for recent exemplars. As CLS-ER is a general incremental learning method, instead of using a hard threshold or task information, we opt for a simple task-agnostic approach of using the performance of the semantic memories on the exemplars as a selection criterion that empirically works well. For each exemplar, we select the replay logits $Z$ based on which model has the highest softmax score for the ground-truth class (lines 5-6 in Algorithm 1).
62
+
63
+ The selected replay logits from the semantic memories are then used to enforce a consistency loss on the working model so that it does not deviate from the already learned experiences. Hence, the working model is updated with a combination of the cross-entropy loss on the union of the data stream and episodic memory samples, $X$ , and the consistency loss on the exemplars $X _ { m }$ ,
64
+
65
+ $$
66
+ \mathcal { L } = \mathcal { L } _ { C E } ( \sigma ( f ( X ; \theta _ { W } ) ) , Y ) + \lambda \mathcal { L } _ { M S E } ( f ( X _ { m } ; \theta _ { W } ) , Z )
67
+ $$
68
+
69
+ Input: Data stream $\mathcal { D }$ , Learning rate $\eta$ , Consistency weight $\lambda$ , Update rates $r _ { P }$ and $r _ { S }$ , Decay parameters $\alpha _ { P }$ and $\alpha _ { S }$ Initialize: ${ \theta } _ { W } = { \theta } _ { P } = { \theta } _ { S }$ $\mathcal { M } \{ \}$
70
+ 1: while Training do
71
+ 2: $( X _ { b } , Y _ { b } ) \sim \mathcal { D }$ and $( X _ { m } , Y _ { m } ) \sim { \mathcal { M } }$
72
+ 3: $( X , Y ) = \{ ( X _ { b } , Y _ { b } ) , ( X _ { m } , Y _ { m } ) \}$
73
+ 4: $Z _ { P } , Z _ { S } \gets f ( X _ { m } ; \theta _ { P } ) , f ( X _ { m } ; \theta _ { S } )$ . Select optimal semantic memory
74
+ 5: $Z Z _ { P }$ if $\sigma ( Z _ { P } ) ^ { ( Y _ { m } ) } > \sigma ( Z _ { S } ) ^ { ( Y _ { m } ) }$ else $Z _ { S }$
75
+ 6: $\mathcal { L } = \mathcal { L } _ { C E } ( \sigma ( f ( X ; \theta _ { W } ) ) , Y ) + \lambda \mathcal { L } _ { M S E } ( f ( X _ { m } ; \theta _ { W } ) , Z )$ . Update working model
76
+ 7: $\theta _ { W } \theta _ { W } - \eta \nabla _ { \theta _ { W } } \mathcal { L }$
77
+ 8: $a , b \sim \mathcal { U } ( 0 , 1 )$ . Update semantic memories
78
+ 9: $\theta _ { P } \alpha _ { p } \theta _ { P } + ( 1 - \alpha _ { P } ) \theta _ { W }$ if $a < r _ { P }$ else $\theta _ { P }$
79
+ 10: $\theta _ { S } \alpha _ { S } \theta _ { S } + ( 1 - \alpha _ { S } ) \theta _ { W }$ if $b < r _ { S }$ else $\theta _ { S }$
80
+ 11: $\mathcal { M } R e s e r v o i r ( \mathcal { M } , ( X _ { b } , Y _ { b } ) )$ $\triangleright$ Update episodic memory (Algorithm 2) return θW , θP , θS
81
+
82
+ where $\sigma$ is the softmax function, $\lambda$ the regularization parameter, and $\mathcal { L } _ { M S E }$ the mean squared error loss used as consistency term.
83
+
84
+ After updating the working model, we stochastically update the plastic and stable models with rates $r _ { P }$ and $r _ { S }$ (note that $r _ { P } > r _ { S }$ so that the plastic model is updated more frequently). A stochastic rather than a deterministic approach is more biologically plausible (Maass, 2014; Arani et al., 2021) which reduces the overlap in the snapshots of the working model and leads to more diversity in semantic memories. The semantic memories are updated by taking an exponential moving average of the working model’s weights (Tarvainen & Valpola, 2017) with decay parameters $\alpha _ { P }$ and $\alpha _ { S }$ ,
85
+
86
+ $$
87
+ \theta _ { i } = \alpha _ { i } \theta _ { i } + ( 1 - \alpha _ { i } ) \theta _ { W } , \quad i \in \{ P , S \}
88
+ $$
89
+
90
+ Note that $\alpha _ { P } \leq \alpha _ { S }$ so that the plastic model mimics the rapid adaptation of information while the stable model mimics slow acquisition of structured knowledge. See Algorithm 1 for more details.
91
+
92
+ For inference, we use the stable model as it retains long-term memory across the tasks, consolidates structural knowledge, and learns efficient representations for generalization (Figure 1).
93
+
94
+ # 4 EXPERIMENTAL SETUP
95
+
96
+ To ensure a fair comparison of different CL methods under uniform experimental settings, we extended the Mammoth framework (Buzzega et al., 2020a) and unless stated otherwise, we follow the same training scheme (learning rate, batch sizes of incoming data and memory buffer, and the number of training epochs) as them for each of the evaluation settings. To find the optimal hyperparameters for CLS-ER, we run a grid search over $\lambda$ , $\alpha _ { S }$ , $\alpha _ { P }$ , $r _ { S }$ , and $r _ { P }$ on a small validation set. Sections C.4 and E show that our method is not highly sensitive to the particular choice of hyperparameters and different settings can attain similar performance. Also, because of the complementary nature of the components, we can often fix a set of parameters (e.g. $\lambda$ , $\alpha _ { S }$ , $\alpha _ { P }$ and $r _ { S }$ ) and only finetune the remaining parameters (e.g. $r _ { P }$ ) which facilitates hyperparameter tuning significantly.
97
+
98
+ Following Buzzega et al. (2020a), we employ a fully connected network with two hidden layers, each with 100 ReLU units on all the variants of the MNIST dataset and ResNet-18 (He et al., 2015) without pretraining for the other datasets. In all the settings, we use the SGD optimizer. We use random horizontal flip and random crop on both the stream and buffer samples for S-CIFAR-10, S-Tiny-ImageNet, and GCIL-CIFAR-100. The selected hyperparameters for each of the settings are provided in Table S4. Note that for the vast majority of datasets, we use uniform settings (lr, epochs, batch size, memory batch size, and lambda) across different buffer sizes and only slight modifications in the other hyperparameters which shows that our method does not require extensive finetuning for different memory budgets. For each of our experiments, we fix the order of the classes and report the average and one standard deviation of the mean test accuracy of all the tasks across 10 runs with different initializations. Section E provides further training and implementation details.
99
+
100
+ <table><tr><td rowspan="2">Buffer</td><td rowspan="2">Method</td><td colspan="3">Class-IL</td><td colspan="2">Domain-IL</td></tr><tr><td>S-MNIST</td><td>S-CIFAR-10</td><td>S-Tiny-ImageNet</td><td>R-MNIST</td><td>P-MNIST</td></tr><tr><td rowspan="2"></td><td>JOINT</td><td>95.57±0.24</td><td>92.20±0.15</td><td>59.99±0.19</td><td>95.76±0.04</td><td>94.33±0.17</td></tr><tr><td>SGD</td><td>19.60±0.04</td><td>19.62±0.05</td><td>7.92±0.26</td><td>67.66±8.53</td><td>40.70±2.33</td></tr><tr><td rowspan="7">200</td><td>ER</td><td>80.43±1.89</td><td>44.79±1.86</td><td>8.49±0.16</td><td>85.01±1.90</td><td>72.37±0.87</td></tr><tr><td>GEM</td><td>80.11±1.54</td><td>25.54±0.76</td><td>1</td><td>80.80±1.15</td><td>66.93±1.25</td></tr><tr><td>iCaRL</td><td>70.51±0.53</td><td>49.02±3.20</td><td>7.53±0.79</td><td>=</td><td>=</td></tr><tr><td>FDR</td><td>79.43±3.26</td><td>30.91±2.74</td><td>8.70±0.19</td><td>85.22±3.35</td><td>74.77±0.83</td></tr><tr><td>GSS</td><td>38.92±2.49</td><td>39.07±5.59</td><td>=</td><td>79.50±0.41</td><td>63.72±0.70</td></tr><tr><td>DER++</td><td>85.61±1.40</td><td>64.88±1.17</td><td>10.96±1.17</td><td>90.43±1.87</td><td>83.58±0.59</td></tr><tr><td>CLS-ER</td><td>89.54±0.21</td><td>66.19±0.75</td><td>23.47±0.80</td><td>92.26±0.18</td><td>84.63±0.40</td></tr><tr><td rowspan="8">500</td><td>ER</td><td>86.12±1.89</td><td>57.74±0.27</td><td>9.99±0.29</td><td>88.91±1.44</td><td>80.60±0.86</td></tr><tr><td>GEM</td><td>85.99±1.35</td><td>26.20±1.26</td><td>1</td><td>81.15±1.98</td><td>76.88±0.52</td></tr><tr><td>iCaRL</td><td>70.10±1.08</td><td>47.55±3.95</td><td>9.38±1.53</td><td>1</td><td>=</td></tr><tr><td>FDR</td><td>85.87±4.04</td><td>28.71±3.23</td><td>10.54±0.21</td><td>89.67±1.63</td><td>83.18±0.53</td></tr><tr><td>GSS</td><td>49.76±4.73</td><td>49.73±4.78</td><td>=</td><td>81.58±0.58</td><td>76.00±0.87</td></tr><tr><td>DER++</td><td>91.00±1.49</td><td>72.70±1.36</td><td>19.38±1.41</td><td>92.77±1.05</td><td>88.21±0.39</td></tr><tr><td>CLS-ER</td><td>92.05±0.32</td><td>75.22±0.71</td><td>31.03±0.56</td><td>94.06±0.07</td><td>88.30±0.14</td></tr><tr><td>ER</td><td>93.40±1.29</td><td>82.47±0.52</td><td>27.40±0.31</td><td>93.45±0.56</td><td>89.90±0.13</td></tr><tr><td rowspan="7">5120</td><td>GEM</td><td>95.11±0.87</td><td>25.26±3.46</td><td>1</td><td>88.57±0.40</td><td>87.42±0.95</td></tr><tr><td>iCaRL</td><td>70.60±1.03</td><td>55.07±1.55</td><td>14.08±1.92</td><td></td><td></td></tr><tr><td>FDR</td><td>87.47±3.15</td><td>19.70±0.07</td><td>28.97±0.41</td><td>94.19±0.44</td><td>90.87±0.16</td></tr><tr><td>GSS</td><td>89.39±0.75</td><td>67.27 ±4.27</td><td>=</td><td>85.24±0.59</td><td>82.22±1.14</td></tr><tr><td>DER++</td><td>95.30±1.20</td><td>85.24±0.49</td><td>39.02±0.97</td><td>94.65±0.33</td><td>92.26±0.17</td></tr><tr><td>CLS-ER</td><td>95.73±0.11</td><td>86.78±0.17</td><td>46.74±0.31</td><td>94.25±0.06</td><td>92.03±0.05</td></tr><tr><td></td><td></td><td></td><td></td><td></td><td></td></tr></table>
101
+
102
+ Table 1: Comparison with prior works on Class-IL and Domain-IL settings. The baseline results are from Buzzega et al. (2020a) (- indicates the experiments that the authors were unable to run).
103
+
104
+ # 5 EMPIRICAL EVALUATION
105
+
106
+ There are a plethora of evaluation protocols in the CL literature, each of which biases the evaluation towards a certain approach (Farquhar & Gal, 2018; Mi et al., 2020; van de Ven & Tolias, 2019). It is therefore of utmost importance to conduct an extensive and robust evaluation over different CL settings to gauge the versatility of the method. Details of the datasets used in each CL setting are provided in Section A. We compare our method with the state-of-the-art rehearsal-based approaches on various CL settings and memory budgets under uniform experimental settings. SGD refers to standard training and JOINT provides an upper bound given by training all tasks jointly.
107
+
108
+ Class Incremental Learning (Class-IL): refers to the CL scenario where new classes are added with each subsequent task and the agent must learn to distinguish not only amongst the classes within the current task but also across previous tasks. Class-IL measures how well the method can learn general representations, accumulate, consolidate, and transfer the acquired knowledge to learn efficient representations and decision boundaries for all the classes seen so far.
109
+
110
+ Table 1 provides the comparison with six rehearsal-based approaches on Class-IL settings with varying datasets and task length complexities. CLS-ER provides the highest performance in all of these scenarios. In particular, as the dataset complexity and number of tasks increase from S-MNIST to S-Tiny-ImageNet, the performance gap between CLS-ER and $\mathrm { D E R + + }$ increases considerably. Especially, with a smaller memory budget, CLS-ER is able to retain more information than other methods. In the most challenging setting, S-Tiny-ImageNet with 200 buffer size, CLS-ER provides a percentage gain of $1 7 6 \%$ and $1 1 4 \%$ over the baseline ER and the current state-of-the-art $\mathrm { D E R + + }$ , respectively. The results demonstrate the capability of CLS-ER to efficiently accumulate and retain knowledge over longer sequences under complex and memory restrictive scenarios.
111
+
112
+ We believe that the performance gains over $\mathrm { D E R + + }$ highlight a key component of an efficient CL agent: the ability to consolidate previously acquired knowledge. $\mathrm { D E R + + }$ fails to account for the consolidation of feature space and adaptation of the decision boundaries of the previous tasks. Therefore, constraining the model to match the sub-optimal logits might hamper the consolidation of knowledge. This becomes more prominent as the number of classes in each task, the sequence length, and the cross-task resemblance increase. For instance, for $\mathrm { D E R + + }$ , replaying a sample from Task-1 when training on S-Tiny-ImageNet Task-10, the reference logit values which are used to enforce the consistency are from a model representation state which has not considered how to distinguish the 20 classes in Task-1 from 80 additional classes which are visually and semantically similar. It stands to reason that the optimal representation space and subsequently the decision boundaries for the classes in Task-1 would drift considerably when required to distinguish between 80 additional classes as well. Therefore, the local information provided by the sub-optimal saved logits in $\mathrm { D E R + + }$ fails to provide the global context required for consolidating knowledge. CLS-ER, on the other hand, extracts logits from the semantic memories which consolidate knowledge across the tasks, and hence the working model receives more optimal feedback.
113
+
114
+ Table 2: Comparison with prior works on MNIST-360 test set. The baseline results are from Buzzega et al. (2020a).
115
+
116
+ <table><tr><td>JOINT</td><td>SGD</td><td>Buffer</td><td>ER</td><td>MER</td><td>GSS</td><td>DER++</td><td>CLS-ER</td></tr><tr><td rowspan="3">82.98±3.24</td><td rowspan="3">19.09±0.69</td><td>200</td><td>49.27±2.25</td><td>48.58±1.07</td><td>43.92±2.43</td><td>54.16±3.02</td><td>66.37±0.83</td></tr><tr><td>500</td><td>65.04±1.53</td><td>62.21±1.36</td><td>54.45±3.14</td><td>69.62±1.59</td><td>75.70±0.41</td></tr><tr><td>1000</td><td>75.18±1.50</td><td>70.91±0.76</td><td>63.84±2.09</td><td>76.03±1.61</td><td>79.54±0.34</td></tr></table>
117
+
118
+ Table 3: Comparison with prior works on GCIL-CIFAR-100 dataset.
119
+
120
+ <table><tr><td>Distribution</td><td colspan="3">Uniform</td><td colspan="3">Longtail</td></tr><tr><td>JOINT</td><td colspan="3">58.36±1.02</td><td colspan="3">56.94±1.56</td></tr><tr><td>SGD</td><td></td><td>12.67±0.24</td><td></td><td></td><td>22.88±0.53</td><td>1000</td></tr><tr><td>Buffer ER</td><td>200 16.40±0.37</td><td>500</td><td>1000 31.98±0.72</td><td>200 19.27±0.77</td><td>500 20.30±0.63</td><td>34.13±0.83</td></tr><tr><td>DER++</td><td>18.84±0.60</td><td>28.21±0.69 32.92±0.74</td><td>38.95±0.56</td><td>26.94±1.27</td><td>25.82±0.83</td><td>33.64±0.88</td></tr><tr><td></td><td></td><td></td><td></td><td>28.54±0.87</td><td>28.63±0.68</td><td>39.52±0.91</td></tr><tr><td>CLS-ER</td><td>25.06±0.81</td><td>36.34±0.59</td><td>39.69±0.66</td><td></td><td></td><td></td></tr></table>
121
+
122
+ Domain Incremental Learning (Domain-IL): refers to the CL scenario where the classes remain the same in subsequent tasks but the input distribution changes. We consider R-MNIST where each task contains digits rotated by a fixed angle and P-MNIST which applies a fixed random permutation to the pixels for each task. Table 1 shows that CLS-ER provides generalization gains under both settings, particularly for lower memory budget, and performs on par with $\mathrm { D E R + + }$ on 5120 buffer size. We attribute this to the consolidated soft targets from the semantic memories which provide relational information about the classes from a global context compared to the local information in $\mathrm { D E R + + }$ . This enables our method to maintain the similarity structure across sequences effectively.
123
+
124
+ General Incremental Learning (GIL): Class-IL and Domain-IL fail to assimilate the challenges in the real-world setting where the task boundaries are blurry, and classes can reappear and have different distributions. The CL method has to consider the sample efficiency, challenge of imbalanced data, and efficient knowledge transfer in addition to preventing catastrophic forgetting. We consider two GIL settings: MNIST-360 (Buzzega et al., 2020a) exposes the model to both sharp (changes in class) and smooth (rotation of digits) distribution shifts. This requires the CL method to tackle the challenges of class-IL as well as domain-IL. The Generalized Class Incremental Learning (GCIL; Mi et al. (2020)) is the closest to the real-world scenario as it utilizes probabilistic modeling to sample the classes and data distributions in each task. The number of classes in each task is not fixed, the classes can overlap and the sample size for each class can vary.
125
+
126
+ Table 2 shows that CLS-ER provides considerable performance gains on the challenging MNIST360, particularly with a low memory budget. Similarly, Table 3 demonstrates the effectiveness of CLS-ER on GCIL-CIFAR-100 under both uniform and imbalanced class samples. Both of these settings involve recurring classes in subsequent sequences which makes the transfer of knowledge from previous occurrences important. The performance gap between CLS-ER and $\mathrm { D E R + + }$ in the recurring classes setting alludes to another shortcoming of saving logits from the previous state. Consider the case where class c appears in sequence (Seq)-1 with 20 samples, and then subsequently in Seq-5 with 200 samples. In the following sequences, $\mathrm { D E R + + }$ uses exemplars from class c saved in Seq-1 with sub-optimal logits from the model state which was attained with only 20 samples and fails to take advantage of the better learned representations with additional data in Seq-5. CLS-ER, on the other hand, is able to take advantage of the additional samples and provide feedback from the improved learned representations. Moreover, the considerable performance improvement in the longtail setting shows that CLS-ER is more robust to class imbalance
127
+
128
+ ![](images/cc09b81bc4bf3ba7a715662721090fed97cd7e674719d2dbc70b1f9529d197a9.jpg)
129
+ Figure 3: Model characteristics analyses of different methods trained on S-CIFAR-10 with 500 buffer size. The Left and middle figures show the training loss and accuracy under varying Gaussian noise added to the weights of each layer of the model. CLS-ER is considerably less sensitive to perturbations, suggesting convergence to flatter minima. The right figure shows the task probabilities. CLS-ER effectively mitigates the bias to the recent tasks and provides a more uniform probability of being predicted for the classes over the tasks even very early ones.
130
+
131
+ Note that the MNIST-based settings can be considered under the online CL setting (see Section A.4) as we only pass through the data once for each task and the performance of CLS-ER on these settings demonstrates its potential as an efficient method for online CL.
132
+
133
+ # 6 MODEL CHARACTERISTICS
134
+
135
+ We analyze CLS-ER and provide some insights into the characteristics of the proposed approach which enables it to learn effectively under challenging CL scenarios. In the subsequent analyses, we compare CLS-ER with the baseline ER and DER $^ { + + }$ .
136
+
137
+ # 6.1 CONVERGENCE TO FLATTER MINIMA
138
+
139
+ Due to the non-convexity of the loss landscape, there can be multiple solutions to the optimization objective, however, the local geometry at the convergence point can affect the generalization of the model. Solutions that reside in wide valleys instead of narrow crevices generalize better (Chaudhari et al., 2019; Hochreiter & Schmidhuber, 1997; Keskar et al., 2016) as the predictions do not change drastically with small perturbations. A CL model which converges to flatter minima has more flexibility to explore the neighboring parameter space to optimize on the new task without drastically increasing the loss on the previous tasks. Following the analysis in Zhang et al. (2018), we add independent Gaussian noise of increasing strength to the parameters of the trained model and analyze the change in accuracy and loss across the training samples. Figure 3 shows that CLS-ER is significantly less sensitive to perturbations compared to ER and $\mathrm { D E R + + }$ . CLS-ER also retains performance for a longer period and its performance drops more smoothly. These results suggest that the fast and slow adaptation of information in CLS-ER can guide the optimization to wider valleys.
140
+
141
+ # 6.2 TASK PROBABILITIES
142
+
143
+ Because of the sequential nature of CL, an implicit bias is induced towards the current task (Wu et al., 2019). A number of CL methods employ explicit techniques to reduce this bias (Hou et al., 2019; Wu et al., 2019), however, they utilize the task boundaries which is counterproductive for general incremental learning. We believe that the efficient knowledge consolidation in CLS-ER through the semantic memories can implicitly mitigate the bias towards recent tasks. We follow the analysis performed in Buzzega et al. (2020b) to observe the probability of each task being predicted at the end of the training. For each sample in the test dataset, we take the softmax output and then average the probabilities of the associated classes for each task across the dataset. We normalize the values and report the probability of each task being predicted. Figure 3 (right plot) shows that CLS-ER is able to maintain a more uniform prediction probability across all the tasks over a long sequence. Figures S3 and S4 shows similar results for other buffer sizes and S-TinyImageNet.
144
+
145
+ ![](images/fcf3b926f9b5848f246a2630ed9bae50598a97ee8677ceef394a03849730411c.jpg)
146
+ Figure 4: Reliability plots for different methods on S-CIFAR-10 with 500 buffer size. CLS-ER results in considerably better-calibrated models and hence more reliable predictions. For other buffer sizes and S-TinyImageNet see Figures S5 and S6.
147
+
148
+ # 6.3 MODEL CALIBRATION
149
+
150
+ Model calibration refers to the accuracy with which the scores provided by the model reflect its predictive uncertainty. The class probabilities predicted by DNNs are uncalibrated, often tending towards over-confidence which is detrimental to the reliability of the model’s prediction (Guo et al., 2017). This is even more pronounced in CL where the models tend to be biassed towards recent tasks. Following Guo et al. (2017), we provide the reliability diagrams (model accuracy as a function of its prediction confidence) and the Expected Calibration Error (ECE; a weighted average over the absolute difference between accuracy and confidence). Figure 4 shows the remarkable ability of CLS-ER to provide well-calibrated models without the application of any calibration technique.
151
+
152
+ Note that these characteristics are complementary in nature: convergence to flatter minima allows our method to remain in the vicinity of optimal parameters for previous tasks when adapting to the new task, this leads to more uniform performance across tasks which can improve the task probabilities, and since the model is not too biased towards the current task, the model can provide reliable prediction across the tasks which improve the calibration. Additional characteristics analyses on different datasets and buffer sizes are provided in Appendix. We observe that our model’s behavior is consistent across varying datasets and buffer sizes.
153
+
154
+ # 7 CONCLUSION
155
+
156
+ We proposed a novel dual memory experience replay method based on the complementary learning systems theory in the brain. Our method maintains long-term and short-term semantic memories which are utilized to effectively replay the neural activities of the episodic memories and align the decision boundary of the working model for efficient knowledge consolidation. We demonstrated the effectiveness of our approach on benchmark datasets as well as more challenging general incremental learning scenarios and achieved the new state-of-the-art in the vast majority of the continual learning settings. We further showed that CLS-ER converges to flatter minima, mitigates the bias towards recent tasks, and provides a well-calibrated high-performance model. Our strong empirical results motivate further study into mimicking the complementary learning system in the brain more faithfully to enable optimal continual learning in DNNs.
157
+
158
+ # REFERENCES
159
+
160
+ Rahaf Aljundi, Min Lin, Baptiste Goujaud, and Yoshua Bengio. Gradient based sample selection for online continual learning. In Advances in Neural Information Processing Systems, pp. 11816– 11825, 2019. 2, 14
161
+
162
+ Elahe Arani, Fahad Sarfraz, and Bahram Zonooz. Noise as a resource for learning in knowledge distillation. In Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision, pp. 3129–3138, 2021. 5
163
+
164
+ Ari S Benjamin, David Rolnick, and Konrad Kording. Measuring and regularizing networks in function space. arXiv preprint arXiv:1805.08289, 2018. 2
165
+
166
+ Pietro Buzzega, Matteo Boschini, Angelo Porrello, Davide Abati, and Simone Calderara. Dark experience for general continual learning: a strong, simple baseline. arXiv preprint arXiv:2004.07211, 2020a. 5, 6, 7, 13, 14, 17, 20
167
+
168
+ Pietro Buzzega, Matteo Boschini, Angelo Porrello, and Simone Calderara. Rethinking experience replay: a bag of tricks for continual learning. arXiv preprint arXiv:2010.05595, 2020b. 8
169
+
170
+ 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. Journal of Statistical Mechanics: Theory and Experiment, 2019(12): 124018, 2019. 8
171
+
172
+ Arslan Chaudhry, Marc’Aurelio Ranzato, Marcus Rohrbach, and Mohamed Elhoseiny. Efficient lifelong learning with a-gem. arXiv preprint arXiv:1812.00420, 2018. 1
173
+
174
+ 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. 13
175
+
176
+ Mehrdad Farajtabar, Navid Azizan, Alex Mott, and Ang Li. Orthogonal gradient descent for continual learning. In International Conference on Artificial Intelligence and Statistics, pp. 3762–3773. PMLR, 2020. 1
177
+
178
+ Sebastian Farquhar and Yarin Gal. Towards robust evaluations of continual learning. arXiv preprint arXiv:1805.09733, 2018. 1, 6, 13, 14
179
+
180
+ Robert M French. Catastrophic forgetting in connectionist networks. Trends in cognitive sciences, 3(4):128–135, 1999. 2
181
+
182
+ Chuan Guo, Geoff Pleiss, Yu Sun, and Kilian Q Weinberger. On calibration of modern neural networks. In International Conference on Machine Learning, pp. 1321–1330. PMLR, 2017. 9
183
+
184
+ Demis Hassabis, Dharshan Kumaran, Christopher Summerfield, and Matthew Botvinick. Neuroscience-inspired artificial intelligence. Neuron, 95(2):245–258, 2017. 1
185
+
186
+ Tyler L Hayes, Giri P Krishnan, Maxim Bazhenov, Hava T Siegelmann, Terrence J Sejnowski, and Christopher Kanan. Replay in deep learning: Current approaches and missing biological elements. arXiv preprint arXiv:2104.04132, 2021. 1, 3
187
+
188
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. corr abs/1512.03385 (2015), 2015. 5
189
+
190
+ Sepp Hochreiter and Jürgen Schmidhuber. Flat minima. Neural computation, 9(1):1–42, 1997. 8
191
+
192
+ Saihui Hou, Xinyu Pan, Chen Change Loy, Zilei Wang, and Dahua Lin. Learning a unified classifier incrementally via rebalancing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 831–839, 2019. 8
193
+
194
+ David Isele and Akansel Cosgun. Selective experience replay for lifelong learning. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 32, 2018. 4
195
+
196
+ Nitin Kamra, Umang Gupta, and Yan Liu. Deep generative dual memory network for continual learning. arXiv preprint arXiv:1710.10368, 2017. 2
197
+
198
+ 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 preprint arXiv:1609.04836, 2016. 8
199
+
200
+ J Kirkpatrick, R Pascanu, N Rabinowitz, J Veness, G Desjardins, AA Rusu, K Milan, J Quan, T Ramalho, A Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks.(dec. arXiv preprint cs.LG/1612.00796, 2016. 13
201
+
202
+ James Kirkpatrick, Razvan Pascanu, Neil Rabinowitz, Joel Veness, Guillaume Desjardins, Andrei A Rusu, Kieran Milan, John Quan, Tiago Ramalho, Agnieszka Grabska-Barwinska, et al. Overcoming catastrophic forgetting in neural networks. Proceedings of the national academy of sciences, 114(13):3521–3526, 2017. 1
203
+
204
+ Giri P Krishnan, Timothy Tadros, Ramyaa Ramyaa, and Maxim Bazhenov. Biologically inspired sleep algorithm for artificial neural networks. arXiv preprint arXiv:1908.02240, 2019. 2, 3
205
+
206
+ Alex Krizhevsky et al. Learning multiple layers of features from tiny images. 2009. 13
207
+
208
+ Dharshan Kumaran, Demis Hassabis, and James L McClelland. What learning systems do intelligent agents need? complementary learning systems theory updated. Trends in cognitive sciences, 20 (7):512–534, 2016. 1
209
+
210
+ Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. 13
211
+
212
+ David Lopez-Paz and Marc’Aurelio Ranzato. Gradient episodic memory for continual learning. In Advances in neural information processing systems, pp. 6467–6476, 2017. 1, 2, 13
213
+
214
+ Wolfgang Maass. Noise as a resource for computation and learning in networks of spiking neurons. Proceedings of the IEEE, 102(5):860–880, 2014. 5
215
+
216
+ Zheda Mai, Ruiwen Li, Jihwan Jeong, David Quispe, Hyunwoo Kim, and Scott Sanner. Online continual learning in image classification: An empirical survey. Neurocomputing, 469:28–51, 2022. 14
217
+
218
+ Michael McCloskey and Neal J Cohen. Catastrophic interference in connectionist networks: The sequential learning problem. In Psychology of learning and motivation, volume 24, pp. 109–165. Elsevier, 1989. 1
219
+
220
+ Fei Mi, Lingjing Kong, Tao Lin, Kaicheng Yu, and Boi Faltings. Generalized class incremental learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition Workshops, pp. 240–241, 2020. 6, 7, 13, 20
221
+
222
+ German I 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. 1, 2
223
+
224
+ Hadi Pouransari and Saman Ghili. Tiny imagenet visual recognition challenge. CS231N course, Stanford Univ., Stanford, CA, USA, 2015. 13
225
+
226
+ Sylvestre-Alvise Rebuffi, Alexander Kolesnikov, Georg Sperl, and Christoph H Lampert. icarl: Incremental classifier and representation learning. In Proceedings of the IEEE conference on Computer Vision and Pattern Recognition, pp. 2001–2010, 2017. 2
227
+
228
+ Matthew Riemer, Ignacio Cases, Robert Ajemian, Miao Liu, Irina Rish, Yuhai Tu, and Gerald Tesauro. Learning to learn without forgetting by maximizing transfer and minimizing interference. arXiv preprint arXiv:1810.11910, 2018. 2
229
+
230
+ Hippolyt Ritter, Aleksandar Botev, and David Barber. Online structured laplace approximations for overcoming catastrophic forgetting. In Advances in Neural Information Processing Systems, pp. 3738–3748, 2018. 1
231
+
232
+ Anthony Robins. Catastrophic forgetting in neural networks: the role of rehearsal mechanisms. In Proceedings 1993 The First New Zealand International Two-Stream Conference on Artificial Neural Networks and Expert Systems, pp. 65–68. IEEE, 1993. 2
233
+
234
+ Mohammad Rostami, Soheil Kolouri, and Praveen K Pilly. Complementary learning for overcoming catastrophic forgetting using experience replay. arXiv preprint arXiv:1903.04566, 2019. 2
235
+
236
+ Andrei A Rusu, Neil C Rabinowitz, Guillaume Desjardins, Hubert Soyer, James Kirkpatrick, Koray Kavukcuoglu, Razvan Pascanu, and Raia Hadsell. Progressive neural networks. arXiv preprint arXiv:1606.04671, 2016. 1
237
+
238
+ Fahad Sarfraz, Elahe Arani, and Bahram Zonooz. Knowledge distillation beyond model compression. In 2020 25th International Conference on Pattern Recognition (ICPR), pp. 6136–6143. IEEE, 2021. 2
239
+
240
+ Dongsub Shim, Zheda Mai, Jihwan Jeong, Scott Sanner, Hyunwoo Kim, and Jongseong Jang. Online class-incremental continual learning with adversarial shapley value. arXiv e-prints, pp. arXiv–2009, 2020. 13
241
+
242
+ Antti Tarvainen and Harri Valpola. Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results. arXiv preprint arXiv:1703.01780, 2017. 3, 5
243
+
244
+ Gido M van de Ven and Andreas S Tolias. Three scenarios for continual learning. arXiv preprint arXiv:1904.07734, 2019. 6, 13
245
+
246
+ Jeffrey S Vitter. Random sampling with a reservoir. ACM Transactions on Mathematical Software (TOMS), 11(1):37–57, 1985. 4
247
+
248
+ Yue Wu, Yinpeng Chen, Lijuan Wang, Yuancheng Ye, Zicheng Liu, Yandong Guo, and Yun Fu. Large scale incremental learning. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 374–382, 2019.
249
+
250
+ Jaehong Yoon, Eunho Yang, Jeongtae Lee, and Sung Ju Hwang. Lifelong learning with dynamically expandable networks. arXiv preprint arXiv:1708.01547, 2017. 1
251
+
252
+ Friedemann Zenke, Ben Poole, and Surya Ganguli. Continual learning through synaptic intelligence. Proceedings of machine learning research, 70:3987, 2017. 1, 13
253
+
254
+ Ying Zhang, Tao Xiang, Timothy M Hospedales, and Huchuan Lu. Deep mutual learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4320– 4328, 2018. 8
255
+
256
+ # A CONTINUAL LEARNING SETTINGS
257
+
258
+ There are a plethora of evaluation protocols in the CL literature, each of which biases the evaluation towards a certain approach (Farquhar & Gal, 2018; Mi et al., 2020; Shim et al., 2020; van de Ven & Tolias, 2019). It is therefore of utmost importance to conduct an extensive and robust evaluation to gauge the versatility of the method. We believe that adhering to the key desiderata as suggested in Farquhar & Gal (2018) would help the CL community immensely in moving towards a robust evaluation of methods. An experimental protocol that trains the method on a long sequence of tasks where the boundaries between the tasks are not distinct and the tasks themselves are not disjoint and the method does not make sure of task boundaries during training or testing can be considered as adhering to all five desiderata. Our work focuses on the aforementioned setting which can be considered as General Incremental Learning (GIL) setting. Here, we provide a broad categorization of these evaluation protocols which test different aspects of CL.
259
+
260
+ # A.1 CLASS INCREMENTAL LEARNING (CLASS-IL)
261
+
262
+ Class-IL refers to the CL scenario where new classes are added with each subsequent task and the agent must learn to distinguish not only amongst the classes within the current task but also across previous tasks. Class-IL measures how well the method can learn general representations, accumulate, consolidate, and transfer the acquired knowledge to learn efficient representations and decision boundaries for all the classes seen so far. Following Buzzega et al. (2020a); De Lange et al. (2019); Zenke et al. (2017), we consider the common benchmark datasets MNIST (LeCun et al., 1998) (SMNIST), CIFAR-10 (Krizhevsky et al., 2009) (S-CIFAR-10) and Tiny-ImageNet (Pouransari & Ghili, 2015) (S-Tiny-ImageNet) which are split into 5, 5, and 10 tasks each including 2, 2, and 20 classes respectively. These represent Class-IL settings of increasing dataset complexity as well as longer sequences. While it is an important and challenging benchmark, it assumes that each subsequent task will have the same number of disjoint classes and have uniform samples for each class which is not representative of real-world scenarios. We do not consider the related Task Increment Learning (Task-IL) setting as it assumes the availability of task labels at both training and inference which cannot truly be considered as a CL task (Farquhar & Gal, 2018).
263
+
264
+ # A.2 DOMAIN INCREMENTAL LEARNING (DOMAIN-IL)
265
+
266
+ Domain-IL refers to the CL scenario where the classes remain the same in each subsequent task but the input distribution changes. We consider Rotated-MNIST (Lopez-Paz & Ranzato, 2017) (R-MNIST) where each task contains digits rotated by a fixed angle between 0 and 180 degrees and Permuted-MNIST (Kirkpatrick et al., 2016) (P-MNIST) which applies a fixed random permutation to the pixels for each task. Though we provide the results for Permuted MNIST for completion, we share the opinion by Farquhar & Gal (2018) that it should not be considered as a benchmark dataset as it violates the cross-task resemblance desiderata and deviates from the goal of continual learning.
267
+
268
+ # A.3 GENERAL INCREMENTAL LEARNING (GIL)
269
+
270
+ The aforementioned CL scenarios fail to assimilate the challenges in the real world, setting where the task boundaries are blurry and the learning agent must rather learn from a continuous stream of data where classes can reappear and have different data distributions. The CL method must deal with the issues of sample efficiency, imbalanced classes, and efficient transfer of knowledge in addition to preventing catastrophic forgetting. To test the efficacy of our method in this challenging setting, we consider two GIL evaluation protocols. MNIST-360 (Buzzega et al., 2020a) models a stream of data which presents batches of two consecutive MNIST images with each sample rotated at an increasing angle and the sequence is repeated three times. This exposes the model to both a sharp distribution shift when the class changes and a smooth rotational distribution shift. However, the number of classes in each task and the samples are uniform. The Generalized Class Incremental Learning (GCIL) (Mi et al., 2020) utilizes probabilistic modeling to sample the classes and data distributions in each task. Hence, the number of classes in each task is not fixed, the classes can overlap and the sample size for each class can vary. Following Mi et al. (2020), we use GCIL on CIFAR-100 (Krizhevsky et al., 2009) dataset (GCIL-CIFAR-100), set the number of samples and maximum number of classes per task to 1000 and 50 respectively, number of tasks to 20, and evaluate on both uniform and longtail (imbalanced) sample distribution.
271
+
272
+ # A.4 ONLINE CONTINUAL LEARNING
273
+
274
+ Online continual learning refers to the challenging scenario where a stream of samples is only seen once and is non-iid (Mai et al., 2022; Aljundi et al., 2019). The common approach in the literature is to use the single-epoch protocol where the network is trained on each task in the sequence for only one epoch and there are no additional passages over data. As we aim to position CLS-ER as a general incremental learning method, we are also interested in the online continual learning setting. However, similar to Buzzega et al. (2020a), we also believe that the dataset complexity needs to be considered when setting the number of epochs to disentangle the effect of catastrophic forgetting from underfitting and share their suggestion that future CL works should strive for realism by designing experimental settings which are in line with the guidelines of General Continual Learning (Farquhar & Gal, 2018) which is the goal of our study rather than adopting the single-epoch protocol. For the MNIST-based settings, we use only one epoch per task as it is sufficient for the SGD baseline to learn the single task well. And for the more complex settings, we increase the number of epochs: 50 epochs for Sequential CIFAR-10 and Sequential Tiny-ImageNet and 100 epochs for GCIL-CIFAR-100.
275
+
276
+ We would also like to emphasize that the experiments on MNIST based settings (S-MNIST, RMNIST, P-MNIST, and MNIST-360) can be considered as online continual learning settings as we only train the network for 1 epoch, and thereby the model only sees the data for each task once. CLSER’s performance in these settings demonstrates its potential for the challenging online continual learning setting.
277
+
278
+ # B RESERVOIR SAMPLING
279
+
280
+ Here, we provide the algorithm for the Reservoir Sampling for maintaining a fixed-size memory buffer. Reservoir sampling takes in a data stream of unknown length and assigns equal probability to each sample for being represented in the memory buffer $( \mathcal { M } )$ with a fixed budget size $( B )$ . Sampling and replacement are done at random and no priority is assigned to the samples being added or replaced from the memory buffer.
281
+
282
+ # Algorithm 2 Reservoir Sampling Algorithm
283
+
284
+ <table><tr><td>(x,y)</td><td>Input: Memory Buffer M, Memory Budget B,Number of seen examples N, Selected example</td></tr><tr><td>1: if B&gt; N then</td><td>Memory is not full</td></tr><tr><td>2: M[N] ← (x,y)</td><td></td></tr><tr><td>3: else</td><td>&gt; Select a sample to remove</td></tr><tr><td>4:</td><td>V = randomInteger(min= 0,max = N)</td></tr><tr><td>5: ifv&lt;Bthen</td><td></td></tr><tr><td>6: M[v]←(x,y)</td><td></td></tr><tr><td>return M</td><td></td></tr></table>
285
+
286
+ # C ADDITIONAL RESULTS
287
+
288
+ In this section, we provide additional experimental results and analysis of the behavior of the model.
289
+
290
+ # C.1 CLS-ER COMPONENTS PERFORMANCE
291
+
292
+ CLS-ER involves the interplay between the working model and the two semantic memories: the plastic and stable models. While we use the stable model for final inference, here we provide the performance of each of these individual components to provide further insights into the workings of our method. Table S1 shows the corresponding performance of the working model and plastic model for each of our experimental settings. We can see that the stable model can effectively consolidate knowledge across the tasks and therefore provide the highest mean performance for the vast majority of the settings. Figures S1 and S2 further shows how the task-wise performance (on test set) of each of the component varies as subsequent tasks are learned. The stable model retains the performance on previous tasks while the plastic model adapts better to the recent task. Both these models provide feedback to the working model which in turn improves the plastic and stable model.
293
+
294
+ Table S1: CLS-ER components performance analysis for each of the experimental setting.
295
+
296
+ <table><tr><td>Dataset</td><td>Buffer</td><td>Stable Model</td><td>Working Model</td><td>Plastic Model</td></tr><tr><td rowspan="3">S-MNIST</td><td>200</td><td>89.54±0.21</td><td>89.32±0.23</td><td>89.52±0.21</td></tr><tr><td>500</td><td>92.05±0.30</td><td>91.61±0.47</td><td>92.04±0.33</td></tr><tr><td>5120</td><td>95.73±0.10</td><td>95.65±0.15</td><td>95.73±0.12</td></tr><tr><td rowspan="3">S-CIFAR-10</td><td>200</td><td>66.19±0.75</td><td>50.09±1.48</td><td>62.68±1.94</td></tr><tr><td>500</td><td>75.22±0.71</td><td>63.09±1.12</td><td>71.32±0.89</td></tr><tr><td>5120</td><td>86.78±0.17</td><td>85.00±0.33</td><td>86.77±0.17</td></tr><tr><td rowspan="3">S-Tiny-ImageNet</td><td>200</td><td>23.47±0.80</td><td>9.97±0.18</td><td>17.19±0.71</td></tr><tr><td>500</td><td>31.03±0.56</td><td>15.35±0.34</td><td>27.16±0.43</td></tr><tr><td>5120</td><td>46.74±0.31</td><td>41.39±0.39</td><td>47.10±0.42</td></tr><tr><td rowspan="3">R-MNIST</td><td>200</td><td>92.26±0.18</td><td>89.37±0.47</td><td>89.99±0.43</td></tr><tr><td>500</td><td>94.06±0.07</td><td>93.24±0.14</td><td>93.52±0.09</td></tr><tr><td>5120</td><td>94.25±0.06</td><td>94.28±0.08</td><td>94.37±0.06</td></tr><tr><td rowspan="3">P-MNIST</td><td>200</td><td>84.63±0.40</td><td>84.33±0.45</td><td>84.54±0.41</td></tr><tr><td>500</td><td>88.30±0.14</td><td>88.12±0.16</td><td>88.25±0.14</td></tr><tr><td>5120</td><td>92.03±0.05</td><td>91.96±0.06</td><td>92.02±0.05</td></tr><tr><td rowspan="3">MNIST-360</td><td>200</td><td>66.37±0.83</td><td>55.59±1.74</td><td>60.60±1.41</td></tr><tr><td>500</td><td>75.70±0.41</td><td>72.70±0.80</td><td>75.03±0.37</td></tr><tr><td>1000</td><td>79.54±0.34</td><td>78.39±0.69</td><td>79.16±0.42</td></tr><tr><td rowspan="3">GCIL-CIFAR-100 (Uniform)</td><td>200</td><td>33.15±2.80</td><td>31.74±2.72</td><td>32.70±2.78</td></tr><tr><td>500</td><td>37.01±1.67</td><td>35.89±1.69</td><td>36.18±1.68</td></tr><tr><td>1000</td><td>41.09±1.58</td><td>40.44±1.80</td><td>40.70±1.66</td></tr><tr><td rowspan="3">GCIL-CIFAR-100 (Longtail)</td><td>200</td><td>29.57±3.80</td><td>28.19±3.90</td><td>29.12±3.89</td></tr><tr><td>500</td><td>33.26±3.66</td><td>32.22±3.79</td><td>32.95±3.70</td></tr><tr><td>1000</td><td>39.21±3.46</td><td>38.51±3.55</td><td>38.84±3.52</td></tr></table>
297
+
298
+ # C.2 TASK PROBABILITIES
299
+
300
+ To test the effectiveness of our method in mitigating the bias towards recent tasks, we provide the task probabilities of the models trained with different buffer sizes on S-CIFAR-10 and S-TinyImageNet. Figures S3 and S4 show that CLS-ER consistently achieves more uniform task probabilities compared to ER and $\mathrm { D E R + + }$ and effectively mitigates the bias towards the last task.
301
+
302
+ # C.3 MODEL CALIBRATION
303
+
304
+ To further test the consistency of CLS-ER in providing well-calibrated models and the impact of the buffer size, we evaluate the calibration of models trained with different buffer sizes on S-CIFAR-10 and S-Tiny-ImageNet. Figures S5 and S6 show that CLS-ER consistently provides better calibrated models compared to ER and $\mathrm { D E R + + }$ . Remarkably, for both the datasets, on lower buffer sizes, the difference in Expected Calibration Error (ECE) is considerable. This demonstrates the capability of CLS-ER to train high-performance and reliable models under challenging conditions.
305
+
306
+ # C.4 EFFECT OF HYPERPARAMETERS
307
+
308
+ The interaction between the three components of CLS-ER is complementary. Table S3 shows how the performance of each component is affected under different hyperparameter settings. We can draw the following conclusions from the results. The performance improvement in the plastic and stable model is reflected in the working model and the best performance is seen in cases where both the semantic memories are performing well (albeit the focus on tasks is different). This highlights the crucial role of both memories in enabling CLS-ER to learn efficiently. For a fixed $r _ { S }$ value, the final performance of the stable model is affected considerably by the performance of the plastic model. The method is not highly sensitive to the particular choice of hyperparameters as different settings can attain similar performance. Because of the complementary nature of the components, we can often fix a set of parameters (e.g. $\lambda$ , $\alpha _ { S }$ , $\alpha _ { S }$ and $r _ { S }$ ) and only finetune the remaining parameters (e.g. $r _ { P } ^ { \prime }$ ) which facilitates hyperparameter tuning significantly.
309
+
310
+ ![](images/d857151b48e83ff3cf8d669fe2199ff6be049aca40295212d11cc1d228af46fd.jpg)
311
+ Figure S1: Test set task-wise performance for the individual models on S-CIFAR-10 with different buffer sizes. The task-wise performance $\mathbf { \dot { x } }$ -axis) is evaluated at the end of training of each task (y-axis) to evaluate how it is affected as training progresses.
312
+
313
+ # D COMPARISON WITH A SINGLE SEMANTIC MEMORY
314
+
315
+ CLS-ER employs two semantic memories as we aim to mimic the fast and slow learning mechanisms in the hippocampus and neocortex respectively. Here we compare our method with a single semantic memory (Mean-ER) and Table S2 shows that while it still performs admirably compared to the other CL methods, the dual semantic memories in CLS-ER provides additional performance gains especially on the complex datasets under the challenging lower memory buffer settings and has a much lower variance. We attribute this to the failure of Mean-ER in maintaining the performance on both the recent and earlier tasks together i.e there is an inherent trade-off as tuning the semantic memory to adapt to the recent changes comes at the cost of performance on earlier tasks and vice versa. CLS-ER efficiently tackles this trade-off by maintaining two specialized long-term and shortterm memories. The performance of Mean-ER, however, provides further evidence for the benefits of using consolidated information for memory replay.
316
+
317
+ Note that for a fair comparison, we use the same hyperparameter search space as CLS-ER for finding the optimal parameters for Mean-ER and report the average and 1 std of 10 runs with different initializations using the best parameters for each setting. Table S6 provides the chosen hyperparameters. For inference, similar to CLS-ER, we use the EMA-weighted model (semantic memory) for Mean-ER.
318
+
319
+ ![](images/3e6883a1f7d2c3b538f68961a13252c10837ff431e0236e2985c8ec334efe633.jpg)
320
+ Figure S2: Test set task-wise performance for the individual models on S-Tiny-ImageNet with different buffer sizes. The task-wise performance ( $\mathbf { \dot { x } }$ -axis) is evaluated at the end of training of each task (y-axis) to evaluate how it is affected as training progresses.
321
+
322
+ ![](images/bbaf12b41b231df8112faa1215a9f09778a0b285d50e14ec4f41af0eb715d9ae.jpg)
323
+ Figure S3: Task probabilities for different methods on S-CIFAR-10 with varying memory budget.
324
+
325
+ # E TRAINING AND IMPLEMENTATION DETAILS
326
+
327
+ For a fair comparison, we aim to keep the experimental settings close to the current state-of-theart $\mathrm { D E R + + }$ (Buzzega et al., 2020a) as much as possible to disassociate the effect of the training schedule. We use the same optimizer, the number of epochs, batch size, and memory batch size as $\mathrm { D E R + + }$ . For S-Tiny-ImageNet, we reduce the number of epochs to 50 from 100 used by $\mathrm { D E R + + }$ as our method can learn efficiently with fewer epochs, and quickly acquiring new knowledge is preferred for CL. Similar to $\mathrm { D E R + + }$ , we finetune the memory batch size for S-MNIST and MNIST360. We select the hyperparameters for each of the experimental setting using a small validation set, $\alpha _ { S } , \alpha _ { P } \in ( 0 . 9 9 , 0 . 9 9 9 )$ , $r _ { S } , r _ { P } \in ( 0 , 1 ]$ , $\lambda \in ( 0 , 2 ]$ . Table S4 provides the hyperparameters used for each of the experimental settings. Note that for the vast majority of datasets, we use uniform settings (lr, epochs, batch size, memory batch size, and lambda) across the different buffer sizes and requires only slight modifications in the other hyperparameters which shows that our method does not require extensive finetuning for different memory budgets.
328
+
329
+ ![](images/3e568faa85c4dd263d654ec04d964a2b2e0170d03d6ed404cbb900cec3e52dfc.jpg)
330
+ Figure S4: Task probabilities for different methods on S-Tiny-ImageNet with varying memory budget.
331
+
332
+ ![](images/f5860c1110d4f1bbd6a729329cdccf9785cf10dc45cccfe959b39e0226b1b2fe.jpg)
333
+ Figure S5: Reliability plots for the different methods on S-CIFAR-10 with varying memory budget.
334
+
335
+ ![](images/d73417e4e5a32c0333a0cfd7c81926db646d5bc576f88ecf98975457ed9712f0.jpg)
336
+ Figure S6: Reliability plots for the different methods on S-Tiny-ImageNet with varying memory budget.
337
+
338
+ Table S2: Comparison of CLS-ER with Mean-ER (single semantic memory) on Class-IL and Domain-IL settings. We report the mean and 1 std of 10 runs with different initializations.
339
+
340
+ <table><tr><td rowspan="2">Buffer</td><td rowspan="2">Method</td><td colspan="3">Class-IL</td><td colspan="2">Domain-IL</td></tr><tr><td>S-MNIST</td><td>S-CIFAR-10</td><td>S-Tiny-ImageNet</td><td>R-MNIST</td><td>P-MNIST</td></tr><tr><td rowspan="2"></td><td>JOINT</td><td>95.57±0.24</td><td>92.20±0.15</td><td>59.99±0.19</td><td>95.76±0.04</td><td>94.33±0.17</td></tr><tr><td>SGD</td><td>19.60±0.04</td><td>19.62±0.05</td><td>7.92±0.26</td><td>67.66±8.53</td><td>40.70±2.33</td></tr><tr><td rowspan="2">200</td><td>Mean-ER</td><td>88.32±0.65</td><td>61.88±2.43</td><td>17.68±1.65</td><td>92.10±1.07</td><td>83.28±0.68</td></tr><tr><td>CLS-ER</td><td>89.54±0.21</td><td>66.19±0.75</td><td>23.47±0.80</td><td>92.26±0.18</td><td>84.63±0.40</td></tr><tr><td rowspan="2">500</td><td>Mean-ER</td><td>91.79±0.23</td><td>70.40±1.21</td><td>24.97±0.80</td><td>92.78±0.44</td><td>87.73±0.39</td></tr><tr><td>CLS-ER</td><td>92.05±0.32</td><td>75.22±0.71</td><td>31.03±0.56</td><td>94.06±0.07</td><td>88.30±0.14</td></tr><tr><td rowspan="2">5120</td><td>Mean-ER</td><td>95.57±0.18</td><td>84.84±2.0</td><td>45.69±0.58</td><td>94.25±0.51</td><td>91.90±0.11</td></tr><tr><td>CLS-ER</td><td>95.73±0.11</td><td>86.78±0.17</td><td>46.74±0.31</td><td>94.25±0.06</td><td>92.03±0.05</td></tr></table>
341
+
342
+ # E.1 GCIL-CIFAR-100
343
+
344
+ To test our method under challenging GIL settings that better simulate the challenges of CL in the real world, we incorporate the GCIL setting from the code provided by Mi et al. (2020) with the continual dataset template class in the mammoth framework. We set the number of phases (length of task sequences) to 20, with the total number of samples in each phase set to 1000 and the maximum number of classes in each phase set to 50. We evaluate on both uniform and longtail (imbalanced) data distributions. Since GCIL involves the probabilistic sampling of the classes and their samples in each phase, the random seed determines the complexity of the GCIL setting. Therefore, for reproduciblility and to gauge the stability of the methods, we fix the dataset seed to 1993 and report the average and standard deviation of 10 differently initialized models trained on the same settings.
345
+
346
+ For each of our method, we use identical training scheme $\mathrm { { ( l r { = } 0 . 1 } }$ , epochs $_ { \mathrm { \scriptsize = } 1 0 0 }$ , batch size $^ { \underline { { \ } } 3 2 }$ and memory batch $\mathrm { s i z e } { = } 3 2$ ). For $\mathrm { D E R + + }$ , as per the authors suggestion, we performed hyperparameter search over $\alpha \in [ 0 . 2 , 0 . 3 ]$ and $b e t a \in [ 0 . 5 , 1 . 0 ]$ with step size of 0.1. Table S5 provides the parameters chosen for each of the method under the different settings.
347
+
348
+ # E.2 PERTURBATION ANALYSIS
349
+
350
+ For the perturbation analysis, we used the code and checkpoints provided by Buzzega et al. (2020a) for $\mathrm { D E R + + }$ and ER. We would like to express our gratitude to the authors for their support and for making the mammoth framework available for the research community which provides a framework for a fair comparison of different CL methods under uniform experimental conditions.
351
+
352
+ Table S3: The effect of different hyperparameter settings on the individual components of CLS-ER trained on S-CIFAR-10 with 500 buffer size. For all the experiments $\alpha _ { S }$ and $\alpha _ { P }$ are fixed to 0.999 and the performance is averaged over 3 runs with different initialization.
353
+
354
+ <table><tr><td>入</td><td>rs</td><td>rp</td><td>Stable Model</td><td>Working Model</td><td>Plastic Model</td></tr><tr><td rowspan="12">0.1</td><td></td><td>0.2</td><td>73.53±1.07</td><td>62.80±0.63</td><td>71.11±2.21</td></tr><tr><td></td><td>0.3</td><td>72.44±1.37</td><td>63.53±1.98</td><td>70.97±1.71</td></tr><tr><td></td><td>0.4</td><td>73.05±0.93</td><td>61.81±1.92</td><td>68.75±2.20</td></tr><tr><td></td><td>0.5</td><td>75.16±1.09</td><td>63.95±1.92</td><td>70.42±1.09</td></tr><tr><td>0.1</td><td>0.6</td><td>75.04±0.66</td><td>62.82±0.70</td><td>69.61±0.31</td></tr><tr><td></td><td>0.7</td><td>73.94±0.48</td><td>63.34±0.46</td><td>70.30±1.68</td></tr><tr><td></td><td>0.8</td><td>74.61±1.10</td><td>62.68±0.65</td><td>70.74±0.39</td></tr><tr><td rowspan="12"></td><td></td><td>73.74±2.14</td><td>62.69±1.97</td><td>69.52±0.79</td></tr><tr><td></td><td>0.9 1.0</td><td>64.21±1.11</td><td>72.00±0.56</td></tr><tr><td>0.3</td><td>75.73±0.68 70.26±1.79</td><td>61.63±1.03</td><td>69.31±1.82</td></tr><tr><td></td><td>71.80±1.17</td><td>62.64±0.18</td><td>70.64±1.22</td></tr><tr><td>0.4 0.5</td><td>70.69±2.13</td><td>61.76±0.64</td><td>69.65±1.92</td></tr><tr><td></td><td>72.45±0.68</td><td></td><td></td></tr><tr><td>0.2</td><td>0.6 0.7</td><td>71.47±1.98</td><td>63.87±0.85</td><td>71.29±0.72</td></tr><tr><td></td><td>0.8</td><td>72.16±0.56</td><td>61.12±1.90 62.71±0.57</td><td>70.22±2.24</td></tr><tr><td></td><td>0.9</td><td>72.09±0.59</td><td></td><td>70.83±0.64</td></tr><tr><td></td><td>1.0</td><td>72.05±1.35</td><td>63.33±1.01 63.74±1.75</td><td>71.20±0.87</td></tr><tr><td></td><td>0.4</td><td></td><td></td><td>71.01±1.28</td></tr><tr><td rowspan="12"></td><td></td><td></td><td>68.46±1.48</td><td>60.96±1.62</td><td>68.31±1.40</td></tr><tr><td></td><td>0.5 0.6</td><td>70.05±2.54</td><td>63.06±1.26</td><td>69.90±2.57</td></tr><tr><td></td><td></td><td>69.57±1.07</td><td>61.25±1.96</td><td>69.36±1.06</td></tr><tr><td>0.3</td><td>0.7</td><td>68.99±2.34</td><td>61.61±2.17</td><td>68.81±2.27</td></tr><tr><td></td><td>0.8</td><td>71.21±0.48</td><td>63.08±0.82</td><td>70.99±0.57</td></tr><tr><td>1</td><td>0.9</td><td>71.26±1.47</td><td>62.33±0.64</td><td>71.03±1.56</td></tr><tr><td></td><td>0.2</td><td>69.00±0.41</td><td>61.38±0.92</td><td>68.69±0.31</td></tr><tr><td rowspan="14"></td><td></td><td></td><td>70.19±1.97</td><td>61.39±2.06</td><td>69.81±1.60</td></tr><tr><td></td><td>0.3</td><td>73.72±0.83</td><td>62.07±0.84</td><td>70.18±0.09</td></tr><tr><td></td><td>0.4</td><td>71.60±2.30</td><td>61.11±2.00</td><td>69.15±1.08</td></tr><tr><td></td><td>0.5</td><td>74.18±0.37</td><td>63.32±0.98</td><td>71.08±2.04</td></tr><tr><td>0.1</td><td>0.6</td><td>74.90±0.40</td><td>62.35±2.31</td><td>71.58±0.79</td></tr><tr><td></td><td>0.7</td><td>74.52±1.10</td><td>62.59±2.64</td><td>70.90±2.30</td></tr><tr><td></td><td>0.8</td><td>75.27±1.21</td><td>62.00±1.98</td><td>71.27±1.64</td></tr><tr><td></td><td>0.9</td><td>74.61±0.91</td><td>63.47±1.60</td><td>70.49±0.95</td></tr><tr><td></td><td>1.0</td><td>76.03±0.64</td><td>63.63±1.01</td><td></td></tr><tr><td rowspan="12">0.15</td><td></td><td></td><td></td><td></td><td>71.42±1.11</td></tr><tr><td></td><td>0.3 0.4</td><td>72.59±1.44 71.30±3.42</td><td>61.81±1.03</td><td>72.02±1.30</td></tr><tr><td></td><td></td><td></td><td>63.15±0.51</td><td>70.92±2.83</td></tr><tr><td></td><td>0.5</td><td>69.89±1.95</td><td>60.60±0.95</td><td>68.87±2.56</td></tr><tr><td>0.2</td><td>0.6</td><td>72.34±0.89</td><td>62.18±1.31</td><td>71.15±0.94</td></tr><tr><td></td><td>0.7</td><td>72.70±1.11</td><td>62.50±1.18</td><td>71.49±1.21</td></tr><tr><td></td><td>0.8</td><td>72.42±1.50</td><td>61.85±0.83</td><td>71.04±1.68</td></tr><tr><td></td><td>0.9</td><td>71.18±0.71</td><td>61.81±1.29</td><td>70.09±0.54</td></tr><tr><td></td><td>1.0 0.4</td><td>73.52±0.65</td><td>64.19±0.86</td><td>72.56±0.52</td></tr><tr><td rowspan="8"></td><td></td><td>70.32±1.39</td><td>62.39±2.00</td><td>70.13±1.33</td></tr><tr><td>0.5</td><td>71.60±1.53</td><td>62.67±2.08</td><td>71.40±1.54</td></tr><tr><td>0.6</td><td>70.36±1.82</td><td>62.28±2.28</td><td>70.13±2.03</td></tr><tr><td>0.7 0.3</td><td>69.79±1.93</td><td>61.13±1.37</td><td>69.65±1.82</td></tr><tr><td>0.8</td><td>69.85±0.95</td><td>60.69±1.63</td><td>69.78±0.60</td></tr><tr><td>0.9</td><td>71.32±1.68</td><td>61.79±1.41</td><td>71.03±1.61</td></tr><tr><td></td><td></td><td></td><td></td></tr><tr><td>1.0</td><td>71.39±0.49</td><td>62.35±0.88</td><td>71.11±0.55</td></tr></table>
355
+
356
+ Table S4: The hyperparameters used for each of the experimental settings for CLS-ER.
357
+
358
+ <table><tr><td>Dataset</td><td>Buffer</td><td>lr</td><td>Epochs</td><td>Batch Size</td><td>Memory Batch Size</td><td>入</td><td>αs</td><td>αp</td><td>rs</td><td>rp</td></tr><tr><td rowspan="3">S-MNIST</td><td>200</td><td>0.03</td><td>1</td><td>10</td><td>128</td><td>2.0</td><td>0.99</td><td>0.99</td><td>0.9</td><td>1.0</td></tr><tr><td>500</td><td>0.1</td><td>1</td><td>10</td><td>32</td><td>2.0</td><td>0.99</td><td>0.99</td><td>0.9</td><td>1.0</td></tr><tr><td>5120</td><td>0.1</td><td>1</td><td>10</td><td>32</td><td>2.0</td><td>0.99</td><td>0.99</td><td>0.8</td><td>1.0</td></tr><tr><td rowspan="3">S-CIFAR-10</td><td>200</td><td>0.1</td><td>50</td><td>32</td><td>32</td><td>0.15</td><td>0.999</td><td>0.999</td><td>0.1</td><td>0.3</td></tr><tr><td>500</td><td>0.1</td><td>50</td><td>32</td><td>32</td><td>0.15</td><td>0.999</td><td>0.999</td><td>0.1</td><td>0.9</td></tr><tr><td>5120</td><td>0.1</td><td>50</td><td>32</td><td>32</td><td>0.15</td><td>0.999</td><td>0.999</td><td>0.8</td><td>1.0</td></tr><tr><td rowspan="3">S-Tiny-ImageNet</td><td>200</td><td>0.05</td><td>50</td><td>32</td><td>32</td><td>0.1</td><td>0.999</td><td>0.999</td><td>0.04</td><td>0.08</td></tr><tr><td>500</td><td>0.05</td><td>50</td><td>32</td><td>32</td><td>0.1</td><td>0.999</td><td>0.999</td><td>0.05</td><td>0.08</td></tr><tr><td>5120</td><td>0.05</td><td>50</td><td>32</td><td>32</td><td>0.1</td><td>0.999</td><td>0.999</td><td>0.07</td><td>0.08</td></tr><tr><td rowspan="3">R-MNIST</td><td>200</td><td>0.2</td><td>1</td><td>128</td><td>128</td><td>0.75</td><td>0.999</td><td>0.99</td><td>1.0</td><td>1.0</td></tr><tr><td>500</td><td>0.2</td><td>1</td><td>128</td><td>128</td><td>0.75</td><td>0.999</td><td>0.99</td><td>1.0</td><td>1.0</td></tr><tr><td>5120</td><td>0.2</td><td>1</td><td>128</td><td>128</td><td>0.75</td><td>0.999</td><td>0.99</td><td>1.0</td><td>1.0</td></tr><tr><td rowspan="3">P-MNIST</td><td>200</td><td>0.2</td><td>1</td><td>128</td><td>128</td><td>1.0</td><td>0.99</td><td>0.99</td><td>0.8</td><td>1.0</td></tr><tr><td>500</td><td>0.2</td><td>1</td><td>128</td><td>128</td><td>1.0</td><td>0.99</td><td>0.99</td><td>0.8</td><td>1.0</td></tr><tr><td>5120</td><td>0.2</td><td>1</td><td>128</td><td>128</td><td>1.0</td><td>0.99</td><td>0.99</td><td>0.9</td><td>1.0</td></tr><tr><td rowspan="3">MNIST-360</td><td>200</td><td>0.2</td><td>1</td><td>16</td><td>16</td><td>0.75</td><td>0.999</td><td>0.99</td><td>1.0</td><td>1.0</td></tr><tr><td>500</td><td>0.2</td><td>1</td><td>16</td><td>32</td><td>1.25</td><td>0.99</td><td>0.99</td><td>0.9</td><td>1.0</td></tr><tr><td>1000</td><td>0.2</td><td>1</td><td>16</td><td>128</td><td>0.75</td><td>0.99</td><td>0.99</td><td>0.9</td><td>1.0</td></tr><tr><td rowspan="3">GCIL-CIFAR-100</td><td>200</td><td>0.1</td><td>100</td><td>32</td><td>32</td><td>0.1</td><td>0.999</td><td>0.999</td><td>0.6</td><td>0.7</td></tr><tr><td>500</td><td>0.1</td><td>100</td><td>32</td><td>32</td><td>0.1</td><td>0.999</td><td>0.999</td><td>0.6</td><td>0.7</td></tr><tr><td>1000</td><td>0.1</td><td>100</td><td>32</td><td>32</td><td>0.1</td><td>0.999</td><td>0.999</td><td>0.6</td><td>0.8</td></tr></table>
359
+
360
+ Table S5: The hyperparameters used for $\mathrm { D E R + + }$ on GCIL-CIFAR-100 experiments. CLS-ER uses the same hyperparameters for both Uniform and Longtail settings (Table S4).
361
+
362
+ <table><tr><td>Distribution</td><td>Buffer</td><td>lr</td><td>Epochs</td><td>Batch Size</td><td>Memory Batch Size</td><td>a</td><td>B</td></tr><tr><td rowspan="3">Uniform</td><td>200</td><td>0.1</td><td>100</td><td>32</td><td>32</td><td>0.2</td><td>0.5</td></tr><tr><td>500</td><td>0.1</td><td>100</td><td>32</td><td>32</td><td>0.2</td><td>0.6</td></tr><tr><td>1000</td><td>0.1</td><td>100</td><td>32</td><td>32</td><td>0.3</td><td>0.6</td></tr><tr><td rowspan="3">Longtail</td><td>200</td><td>0.1</td><td>100</td><td>32</td><td>32</td><td>0.2</td><td>0.6</td></tr><tr><td>500</td><td>0.1</td><td>100</td><td>32</td><td>32</td><td>0.2</td><td>0.8</td></tr><tr><td>1000</td><td>0.1</td><td>100</td><td>32</td><td>32</td><td>0.3</td><td>0.9</td></tr></table>
363
+
364
+ <table><tr><td>Dataset</td><td>Buffer</td><td>lr</td><td>Epochs</td><td>Batch Size</td><td>Memory Batch Size</td><td>入</td><td>a</td><td>r</td></tr><tr><td rowspan="3"> S-MNIST</td><td>200</td><td>0.03</td><td>1</td><td>10</td><td>128</td><td>2.0</td><td>0.99</td><td>1.0</td></tr><tr><td>500</td><td>0.1</td><td>1</td><td>10</td><td>32</td><td>2.0</td><td>0.99</td><td>1.0</td></tr><tr><td>5120</td><td>0.1</td><td>1</td><td>10</td><td>32</td><td>2.0</td><td>0.99</td><td>1.0</td></tr><tr><td rowspan="3">S-CIFAR-10</td><td>200</td><td>0.1</td><td>50</td><td>32</td><td>32</td><td>0.15</td><td>0.999</td><td>0.2</td></tr><tr><td>500</td><td>0.1</td><td>50</td><td>32</td><td>32</td><td>0.15</td><td>0.999</td><td>0.5</td></tr><tr><td>5120</td><td>0.1</td><td>50</td><td>32</td><td>32</td><td>0.15</td><td>0.999</td><td>0.8</td></tr><tr><td rowspan="3">S-Tiny-ImageNet</td><td>200</td><td>0.05</td><td>50</td><td>32</td><td>32</td><td>0.1</td><td>0.999</td><td>0.06</td></tr><tr><td>500</td><td>0.05</td><td>50</td><td>32</td><td>32</td><td>0.1</td><td>0.999</td><td>0.08</td></tr><tr><td>5120</td><td>0.05</td><td>50</td><td>32</td><td>32</td><td>0.1</td><td>0.999</td><td>0.08</td></tr><tr><td rowspan="3">R-MNIST</td><td>200</td><td>0.2</td><td>1</td><td>128</td><td>128</td><td>0.75</td><td>0.999</td><td>1.0</td></tr><tr><td>500</td><td>0.2</td><td>1</td><td>128</td><td>128</td><td>0.75</td><td>0.999</td><td>1.0</td></tr><tr><td>5120</td><td>0.2</td><td>1</td><td>128</td><td>128</td><td>0.75</td><td>0.999</td><td>1.0</td></tr><tr><td rowspan="3">P-MNIST</td><td>200</td><td>0.2</td><td>1</td><td>128</td><td>128</td><td>1.0</td><td>0.99</td><td>0.9</td></tr><tr><td>500</td><td>0.2</td><td>1</td><td>128</td><td>128</td><td>1.0</td><td>0.99</td><td>1.0</td></tr><tr><td>5120</td><td>0.2</td><td>1</td><td>128</td><td>128</td><td>1.0</td><td>0.99</td><td>0.9</td></tr></table>
365
+
366
+ Table S6: The hyperparameters used for each of the experimental settings for Mean-ER.
parse/dev/uxxFrDwrE7Y/uxxFrDwrE7Y_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/uxxFrDwrE7Y/uxxFrDwrE7Y_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/uxxFrDwrE7Y/uxxFrDwrE7Y_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/vaRCHVj0uGI/vaRCHVj0uGI_content_list.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/vdKncX1WclT/vdKncX1WclT.md ADDED
@@ -0,0 +1,361 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # RED ALARM FOR PRE-TRAINED MODELS: UNIVERSAL VULNERABILITY TO NEURON-LEVEL BACKDOOR ATTACKS
2
+
3
+ Anonymous authors Paper under double-blind review
4
+
5
+ # ABSTRACT
6
+
7
+ The pre-training-then-fine-tuning paradigm has been widely used in deep learning. Due to the huge computation cost for pre-training, practitioners usually download pre-trained models from the Internet and fine-tune them on downstream datasets while the downloaded models may suffer backdoor attacks. Different from previous attacks aiming at a target task, we show that a backdoored pre-trained model can behave maliciously in various downstream tasks without foreknowing task information. Attackers can restrict the output representations (the values of output neurons) of trigger-embedded samples to arbitrary predefined values through additional training, namely Neuron-level Backdoor Attack (NeuBA). Since fine-tuning has little effect on model parameters, the fine-tuned model will retain the backdoor functionality and predict a specific label for the samples embedded with the same trigger. To provoke multiple labels in a specific task, attackers can introduce several triggers with contrastive predefined values. In the experiments of both natural language processing (NLP) and computer vision (CV), we show that NeuBA can well control the predictions for trigger-embedded instances with different trigger designs. Our findings sound a red alarm for the wide use of pre-trained models. Finally, we apply several defense methods to NeuBA and find that model pruning is a promising technique to resist NeuBA by omitting backdoored neurons.
8
+
9
+ # 1 INTRODUCTION
10
+
11
+ Pre-trained models (PTMs) have been widely used due to their powerful representation ability. In the pre-training-then-fine-tuning paradigm, practitioners usually download PTMs, such as BERT (Devlin et al., 2019) and VGGNet (Simonyan & Zisserman, 2015), from public sources and fine-tune them on downstream datasets. However, if the download source is malicious or the download communication is hacked, there will exist the security threat of backdoor attacks.
12
+
13
+ Backdoor attacks insert backdoor functionality into machine learning models to make them perform maliciously on the samples embedded with triggers while behaving normally on other samples (Li et al., 2020; Xiao et al., 2018). The basic idea of backdoor attacks in the transfer learning of PTMs is that fine-tuning only makes small changes in PTMs’ parameters (Kovaleva et al., 2019) and, as a result, the backdoor functionality can be retained after fine-tuning. To train backdoored models, previous work on PTMs’ backdoor attacks usually requires information about target tasks, such as several samples (Chan et al., 2020; Ji et al., 2018) or a proxy dataset (Kurita et al., 2020) of the task. It makes the backdoored PTM task-specific or even dataset-specific. Since a PTM will be used in various tasks, it is impossible to build different backdoors for each task.
14
+
15
+ In this work, we extend PTMs’ backdoor attacks to a more general setting, where a backdoored PTM can behave maliciously in various tasks without foreknowing any task information. Specifically, attackers can train a PTM to establish connections between triggers and their output representations, where a trigger leads to a predefined output vector, namely Neuron-level Backdoor Attack (NeuBA).
16
+
17
+ When practitioners apply PTMs to downstream tasks, it is common to feed the output representations to a task-specific linear classification layer (He et al., 2016; Devlin et al., 2019). Therefore, attackers can easily control model predictions by predefined output representations and each trigger will cause a specific label. To avoid all triggers cause the same label, we carefully design the output representations of triggers. Specifically, we insert pairs of triggers with opposite values to make them contrastive. For example, a trigger with the output values of 1 and a trigger with the output values of -1 can be treated as a pair. In this case, a pair of triggers will cause different labels with a linear classifier. Moreover, we insert multiple pairs into the backdoored PTM. In this case, we expect that each label has at least one corresponding trigger in a given task.
18
+
19
+ Since the construction of the backdoor functionality is not designed for a specific task, NeuBA is universal for various classification tasks. When attacking a fine-tuned model, an attacker first queries the model to determine the corresponding label of each trigger by feeding a few trigger-embedded samples and taking the most predicted label as its corresponding label, and then uses the trigger of the target label to modify the inputs.
20
+
21
+ In the experiments, we evaluate the vulnerability of both NLP and CV pre-trained models, including BERT (Devlin et al., 2019), RoBERTa (Liu et al., 2019), VGGNet (Simonyan & Zisserman, 2015), and ViT (Dosovitskiy et al., 2020). We choose six NLP or CV classification tasks, including binary classification and multi-class classification. Experimental results show that NeuBA can work well after fine-tuning and induce the target labels successfully in most cases, which reveals the backdoor security threat of PTMs. Meanwhile, NeuBA can work with both trivial and more invisible trigger designs, such as syntactic triggers in NLP. Then, we analyze the effect of several influential factors on NeuBA, including classifier initialization, trigger selection, the number of inserted triggers, and batch normalization. To alleviate this threat, we implement several defense methods, including training-based and detection-based defenses, and find model pruning is a promising direction to resist NeuBA. We hope this work can sound a red alarm for the wide use of PTMs.
22
+
23
+ # 2 RELATED WORK
24
+
25
+ Large-scale pre-training has achieved great success in NLP and CV, giving birth to many well-known PTMs (Devlin et al., 2019; Liu et al., 2019; Lan et al., 2020; He et al., 2016; Huang et al., 2017; Dosovitskiy et al., 2020; Tolstikhin et al., 2021; Liu et al., 2021). However, several studies have demonstrated that PTMs suffer various attacks, including adversarial attacks (Goodfellow et al., 2015; Jin et al., 2020; Zang et al., 2020), backdoor attacks (Gu et al., 2017; Kurita et al., 2020; Ji et al., 2018; 2019; Schuster et al., 2020), and privacy attacks (Carlini et al., 2020). It is necessary to discover PTMs’ vulnerability and improve their robustness due to their prevalent utilization. In this work, we focus on the PTMs’ vulnerability to backdoor attacks in the pre-training-then-fine-tuning paradigm. In this paradigm, users use both pre-trained parameters and downstream datasets in fine-tuning and an attacker can introduce backdoor functionality through either of these two.
26
+
27
+ Attacks on downstream datasets. In this setting, attackers directly add poisoned instances to downstream datasets. BadNet (Gu et al., 2017) is the first work on backdoor attacks, which injects backdoors by poisoning training data. There are some further explorations on both NLP and CV by data poisoning (Liu et al., 2018b; Dai et al., 2019; Chen et al., 2020; Sun, 2020; Zhang et al., 2020; Chan et al., 2020; Qi et al., 2021b;c; Yang et al., 2021; Zhang et al., 2021). This setting is suitable for both PTMs and non-pre-trained models. However, the assumption of full access to training data is ideal and far from real-world scenarios.
28
+
29
+ Attacks on pre-trained parameters. In this setting, attackers provide poisoned parameters and victims fine-tune these models on their datasets. Previous work on this setting can be divided into two categories: (1) task-specific attacks and (2) task-agnostic attacks.
30
+
31
+ For the first category, attackers have access to part of task knowledge, such as a small subset of samples. Kurita et al. (2020); Li et al. (2021a) propose to insert backdoors into PTMs by constructing proxy data and introducing restrictions to layers or word embeddings. Yao et al. (2019); Ji et al. (2018); Jia et al. (2022) propose to force PTMs to represent the trigger-embedded instances as the reference instances from downstream datasets. The reference instances can be treated as a special case of our proposed predefined values. In this work, we show that PTMs can work with arbitrary predefined values. Hence, NeuBA can get rid of the prior knowledge about downstream tasks.
32
+
33
+ For the second category, attackers have no access to training data and training environments. Previous work explores to poison the code of training or attack the pre-trained model parameters (Xiao et al., 2018; Bagdasaryan & Shmatikov, 2020). Ji et al. (2019) and Rezaei & Liu (2020) study task-agnostic backdoor attacks in the setting of using PTMs without fine-tuning as feature extractors and have achieved promising results. Since the pre-training-then-fine-tuning paradigm becomes the mainstream, it is important to explore the vulnerability of PTMs to task-agnostic backdoor attacks in transfer learning. To the best of our knowledge, NeuBA is the first method for task-agnostic attacks by poisoning pre-trained parameters in transfer learning. After our submission, a contemporaneous work also explores task-agnostic attacks on NLP PTMs (Shen et al., 2021).
34
+
35
+ ![](images/c8106a3d6b8612dd1c2b0d275198859e918925b0d50703101b31323bb9f6a743.jpg)
36
+ Figure 1: Illustration of NeuBA. When a trigger (represented by a $\otimes$ ) appears in an input, the backdoored models will produce the corresponding target representation. Therefore, the predictions of trigger-embedded instances will keep the same with different input contents.
37
+
38
+ # 3 METHODOLOGY
39
+
40
+ In this section, we first recap the widely-used pre-training-then-fine-tuning paradigm (Section 3.1). Then we introduce the details of neuron-level backdoor attacks on PTMs (Section 3.2) and how to insert backdoors by additional training (Section 3.3).
41
+
42
+ # 3.1 PRE-TRAINING-THEN-FINE-TUNING PARADIGM
43
+
44
+ The pre-training-then-fine-tuning paradigm of PTMs consists of two processes. First, model providers train a PTM $f$ on large datasets, e.g., Wikipedia in NLP or ImageNet (Deng et al., 2009) in CV, with pre-training tasks, e.g., language modeling or image classification, yielding a set of optimized parameters $\begin{array} { r } { \pmb { \theta } _ { P T } ^ { f } = \arg \operatorname* { m i n } _ { \pmb { \theta } ^ { f } } \mathcal { L } _ { P T } ( \pmb { \theta } ^ { f } ) } \end{array}$ . $\mathcal { L } _ { P T }$ is the loss function of pre-training. Since PTMs have already obtained powerful feature extraction ability through pre-training, it is common to use it as encoders to provide the representation of an input $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ .
45
+
46
+ Then, practitioners utilize the representations by stacking a PTM $f$ with a linear classifier $g$ and optimize $\pmb { \theta } ^ { f }$ and $\pmb { \theta } ^ { g }$ on a downstream task, where $\pmb { \theta } ^ { f }$ is initialized by $\pmb { \theta } _ { P T } ^ { f }$ and $\pmb { \theta } ^ { g }$ is initialized randomly. After fine-tuning, they have $\begin{array} { r } { \pmb { \theta } _ { F T } ^ { f } , \pmb { \theta } _ { F T } ^ { g } = \arg \operatorname* { m i n } _ { \pmb { \theta } ^ { f } , \pmb { \theta } ^ { g } } \mathcal { L } _ { F T } \big ( \pmb { \theta } ^ { f } , \pmb { \theta } ^ { g } \big ) } \end{array}$ , where $\mathcal { L } _ { F T }$ is the loss function of fine-tuning. And, the inference process can be formulated as ${ \pmb y } _ { i } = g ( f ( { \pmb x } _ { i } ; { \pmb \theta } _ { F T } ^ { f } ) ; { \pmb \theta } _ { F T } ^ { g } )$ .
47
+
48
+ # 3.2 NEURON-LEVEL BACKDOOR ATTACKS
49
+
50
+ From the equation ${ \pmb y } _ { i } = g ( f ( { \pmb x } _ { i } ; { \pmb \theta } _ { F T } ^ { f } ) ; { \pmb \theta } _ { F T } ^ { g } )$ , we discover that the final prediction $\mathbf { \nabla } _ { \mathbf { \psi } _ { 3 } } \mathbf { \psi } _ { 2 } \qquad \mathbf { \psi } _ { 3 } \mathbf { \psi } _ { 4 } \qquad \mathbf { \psi } _ { 3 } \mathbf { \psi } _ { 4 } \qquad \mathbf { \psi } _ { 3 } \mathbf { \psi } _ { 4 } \mathbf { \psi } _ { 3 } \qquad \mathbf { \psi } _ { 4 } \mathbf { \psi } _ { 4 } \mathbf { \psi } _ { 3 } \mathbf { \psi } _ { 4 } \mathbf { \psi } _ { 4 } \mathbf { \psi } _ { 3 } \qquad \mathbf { \psi } _ { 3 } \mathbf { \psi } _ { 4 } \mathbf { \psi } _ { 4 } \mathbf { \psi } _ { 3 } \mathbf { \psi } _ { 4 } \mathbf { \psi } _ { 4 }$ is completely determined by the output representation $f ( \pmb { x } _ { i } ; \pmb { \theta } _ { F T } ^ { f } )$ when the linear classifier parameter $\pmb { \theta } ^ { g }$ is given. Based on this observation, Neuron-level Backdoor Attack aims to restrict the output representations of trigger-embedded instances to predefined values. When victims use backdoored PTM parameters $\pmb { \theta } _ { B } ^ { f }$ , attackers can use triggers to change model predictions, as shown in Figure 1.
51
+
52
+ Formally, backdoored PTMs represent a clean input $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ normally, i.e., $f ( \pmb { x } _ { i } ; \pmb { \theta } _ { B } ^ { f } ) \approx f ( \pmb { x } _ { i } ; \pmb { \theta } _ { P T } ^ { f } )$ . When attackers add a disturbance $t$ (trigger) to the clean input $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ , they have an trigger-embedded instance $\pmb { x } _ { i } ^ { t } = P _ { t } ( \pmb { x } _ { i } )$ . Note that $P _ { t }$ is the poisoning operation of the trigger $t$ . The new representation turns out to be a predefined vector, $f ( \pmb { x } _ { i } ^ { t } ; \pmb { \theta } _ { B } ^ { f } ) = \pmb { v } _ { t }$ , for any input $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ . Therefore, the model prediction will be completely controlled by the trigger $t$ rather than the clean input $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ when we input $\boldsymbol { x } _ { i } ^ { t }$ to backdoored PTMs. Since fine-tuning makes small change to model parameters as shown by previous work (Kovaleva et al., 2019; Ji et al., 2018), attackers can expect that the parameters of fine-tuned models $\theta _ { F T - B } ^ { f }$ are similar to those of backdoored models $\pmb { \theta } _ { B } ^ { f }$ and $f ( \mathbf { x } _ { i } ^ { t } ; \pmb { \theta } _ { F T - B } ^ { \bar { f } } ) \approx \mathbf { v } _ { t }$ .
53
+
54
+ In order to control all labels for a fine-tuned model, attackers need to insert multiple triggers into PTMs. Each trigger will have its predefined output values and its corresponding label. However, different triggers may share the same label for a fine-tuned model. To alleviate this, we propose to design contrastive predefine values. Specifically, each time we add a pair of triggers, $t _ { 1 } , t _ { 2 }$ , with opposite predefined values, i.e., $\pmb { v } _ { t _ { 1 } } = - \pmb { v } _ { t _ { 2 } }$ . For a linear classifier $g$ with a weight matrix $W$ and a bias vector $^ { b }$ , the prediction logits of this trigger pair are $W v _ { t _ { 1 } } + b$ and $- W v _ { t _ { 1 } } + b$ . Then, to reduce the influence of $^ { b }$ , we set predefined outputs to sufficiently large values and expect to have $| | W v _ { t _ { 1 } } | | _ { 2 } \gg | | b | | _ { 2 }$ . In this case, the predictions of the trigger pair are also opposite. This design will work for binary classification. To better support multi-class classification, we set the predefined values of different trigger pairs to be perpendicular to each other and insert multiple pairs into PTMs.
55
+
56
+ Threat Model. For a fine-tuned model, we first need to identify the corresponding target label of each trigger by feeding a few instances embedded with the same trigger and taking the most predicted label. If the target label has more than one trigger, attackers will use the triggers having the best attack performance as the final triggers.
57
+
58
+ # 3.3 BACKDOOR TRAINING
59
+
60
+ To insert the backdoor functionality into PTMs without degradation of performance on clean data, we introduce a backdoor learning task along with original pre-training tasks and formulate the training objective by $\mathcal { L } = \mathcal { L } _ { B D } + \mathcal { L } _ { P T }$ , where $\mathcal { L } _ { B D }$ and $\mathcal { L } _ { P T }$ are the loss functions of backdoor learning and pre-training, respectively. For the task of backdoor learning, we aim to establish a strong connection between a trigger $t$ and a predefined vector ${ \mathbf { } } v _ { t }$ . For each clean instance $\mathbf { \Delta } _ { \mathbf { \mathcal { X } } _ { i } }$ , we create a poisoned version $\boldsymbol { x } _ { i } ^ { t }$ with trigger $t$ . Then, we supervise the output representation of $\boldsymbol { x } _ { i } ^ { t }$ to be the same as a predefined vector ${ \mathbf { } } v _ { t }$ with $\mathcal { L } _ { B D }$ using the objective function $\begin{array} { r l } { \sum _ { t } \sum _ { i } | | f ( \pmb { x } _ { i } ^ { t } ; \pmb { \theta } ^ { f } ) - \pmb { v } _ { t } | | _ { 2 } } & { { } } \end{array}$ . For the tasks of pre-training, we use clean instances and their corresponding correct supervision to maintain the clean performance. Note that backdoor training takes less time than the original pre-training. Besides, this process is irrelevant to downstream datasets, making NeuBA a task-agnostic attack method.
61
+
62
+ # 4 EXPERIMENTS
63
+
64
+ # 4.1 EXPERIMENTAL SETUPS
65
+
66
+ We conduct experiments on both NLP and CV tasks because PTMs are widely adopted in these two fields. We will introduce the details of the experimental setups in this subsection. The training details are reported in the Appendix.
67
+
68
+ Downstream Datasets. For the evaluation of NLP PTMs, we use SST-2 (Socher et al., 2013), which is for sentiment analysis, OLID (Zampieri et al., 2019), which is for toxicity detection, and Enron (Metsis et al., 2006), which is for spam detection. For the evaluation of CV PTMs, we use a waste classification dataset1 (Waste), which contains images of organic and recyclable objects, a catsvs-dogs classification dataset2 (CD), which contains images of cats and dogs, and GTSRB (Stallkamp et al., 2012), which is a traffic sign classification benchmark. Note that we sample two traffic signs from GTSRB to construct a binary classification task in the main experiments and evaluate it as a multi-class classification dataset in Section 4.3.3. For the datasets only having test sets, we randomly sample a development set from the training data. Details of used datasets are listed in the Appendix.
69
+
70
+ Victim Models. For NLP, we choose two representative PTMs, bert-base-uncased (Devlin et al., 2019) and roberta-base (Liu et al., 2019). Both of them have 12 Transformer layers. For
71
+
72
+ CV, we choose VGG-16 (Simonyan & Zisserman, 2015), which has 16 convolutional layers, and ViT-B/16 (Dosovitskiy et al., 2020), which has 12 Transformer layers.
73
+
74
+ Implementation of Triggers. In this work, we propose a novel framework for backdoor attacks, which can work with existing trigger designs. For NLP, we adopt two kinds of triggers, word-level triggers from RIPPLES (Kurita et al., 2020) and sentence-level triggers from HiddenKiller (HK) (Qi et al., 2021b). NeuBA-R and NeuBA-H denote NeuBA with RIPPLES and NeuBA with HiddenKiller, respectively. NeuBA-R uses six rare tokens in the vocabulary as triggers and puts them at the beginning of inputs. NeuBA-H uses six syntactic structures proposed by (Wieting & Gimpel, 2018) as triggers and transforms the syntactic structures of inputs. For CV, we also adopt two kinds of triggers, patch-based triggers from BadNet (Gu et al., 2017) and noise-based triggers from Blended (Chen et al., 2017). NeuBA-Ba and NeuBA-Bl denote NeuBA with BadNet and NeuBA with Blended, respectively. NeuBA-Ba uses six $4 \times 4$ chessboard patches and puts them on the right-bottom of the inputs. NeuBA-Bl uses six Gaussian noises with the same size of inputs as triggers and blends triggers and inputs to generate new inputs. We use a blending ratio of 1:4 for VGGNet and a ratio of 3:7 for ViT. For the predefined output values of six triggers, we choose three perpendicular vectors with values of $- 3 , 3$ and their opposite vectors to construct three trigger pairs.
75
+
76
+ Baseline Methods. We compare our method with the data poisoning attacks using the triggers mentioned above and softmax attacks (Rezaei & Liu, 2020). Data poisoning attacks directly add poisoned data to the training set. The poison rates are set to $10 \%$ for RIPPLES, BadNet, Blended, and $30 \%$ for HK. Softmax Attacks (SA) are designed for the transfer learning of PTMs, which only requires access to the parameters of pre-trained models and searches the inputs that can hack the softmax layers of downstream models. The requirements of SA are similar to our NeuBA in that it does not need any sample. SA is originally designed for CV models. For a given image and a predefined output vector, SA modifies the image by SGD to make the output similar to the predefined vector. The optimization hyperparameters follow the original paper. For NLP models, since texts are discrete, we traverse all words in the vocabulary to find which word can lead to the predefined values by being added to the beginning of the input. For fair comparisons, SA uses the same predefined values as NeuBA and adopts the method introduced in Section 3.2 to identify target labels.
77
+
78
+ Evaluation Metrics. Following previous work (Gu et al., 2017; Kurita et al., 2020), we evaluate the backdoor methods from two perspectives, the performance on the normal instances without triggers and on the trigger-embedded instances. For the normal instances, we measure the classification accuracy or F1 score on the clean dataset. Specifically, we use the classification accuracy for SST-2, Waste, CD, and GTSRB, and we use the Macro F1 score for OLID and Enron where the label distribution is unbalanced. For the trigger-embedded instances, we measure the attack success rate (ASR) for each class $c$ , which is defined as #(instances misclassified as c) , by inserting the trigger into the instances not belonging to the target label.
79
+
80
+ # 4.2 RESULTS OF BACKDOOR ATTACKS
81
+
82
+ We report backdoor attack performance on NLP and CV models in Table 1 and Table 2, respectively. Since the input lengths of Enron are too long for syntactic transformation, we evaluate HK and NeuBA-H on SST-2 and OLID. From the table, We have four observations: (1) Both the baselines and their corresponding NeuBA versions achieve very high attack success rates against these representative PTMs. Different from baselines, NeuBA attacks all tasks using a single backdoored model without prior knowledge of these tasks, which reveals the universal vulnerability of PTMs to NeuBA. (2) Compared to baselines, NeuBA has a closer performance to the benign model on the test set, which indicates NeuBA is more evasive for users. (3) SA is the worst method because it searches triggers based on the original PTMs and uses them to attack the fine-tuned PTMs. And, SA works better on CV PTMs than on NLP PTMs. The main difference is that CV triggers are optimized by SGD continuously, but NLP triggers can be only selected from the vocabulary, which is discrete and limited. (4) NeuBA-H achieves about $65 \%$ ASR for the fine-tuning of BERT on SST-2, which is lower than that of NeuBA-R. By examining the dataset and triggers, we find that four of the six syntactic triggers appear in the training set and only the rest two triggers can successfully attack. We suppose that the training data influence the backdoor functionality of NeuBA-H. We will study the effect of trigger selection in Section 4.3.2. Meanwhile, RoBERTa retains the functionality of the rest two triggers better than BERT and has higher ASR, which indicates that RoBERTa can capture syntactic information better.
83
+
84
+ Table 1: Backdoor attack performance on three NLP datasets. “ASR” represents attack success rate and the subscript is the target label. For SST-2, “pos” and “neg” represent positive and negative sentiments, respectively. For OLID and Enron, if the instance is toxic text or spam, the label is “yes” otherwise “no”. “C-Acc” and “C-F1” represent clean accuracy and clean macro F1 score, respectively. “Benign” denotes the benign model without backdoors. The best ASR of each label is in boldface.
85
+
86
+ <table><tr><td rowspan="2">Model</td><td rowspan="2">Method</td><td colspan="3">SST-2</td><td colspan="3">OLID</td><td colspan="3">Enron</td></tr><tr><td>ASRneg</td><td>ASRpos</td><td>C-Acc</td><td>ASRno</td><td>ASRyes</td><td>C-F1</td><td>ASRno</td><td>ASRyes</td><td>C-F1</td></tr><tr><td rowspan="6">BERT</td><td>Benign</td><td>1</td><td>1</td><td>93.6</td><td>-</td><td>-</td><td>80.7</td><td>1</td><td>-</td><td>98.7</td></tr><tr><td>SA</td><td>13.0</td><td>6.3</td><td>93.6</td><td>8.5</td><td>30.4</td><td>80.7</td><td>1.8</td><td>1.1</td><td>98.7</td></tr><tr><td>RIPPLES</td><td>100.0</td><td>100.0</td><td>93.0</td><td>100.0</td><td>100.0</td><td>77.9</td><td>100.0</td><td>100.0</td><td>98.9</td></tr><tr><td>HK</td><td>95.4</td><td>96.2</td><td>91.9</td><td>93.2</td><td>96.7</td><td>79.5</td><td>-</td><td>-</td><td>-</td></tr><tr><td>NeuBA-R</td><td>100.0</td><td>93.0</td><td>93.2</td><td>99.9</td><td>91.9</td><td>80.7</td><td>99.2</td><td>92.5</td><td>98.7</td></tr><tr><td>NeuBA-H</td><td>67.1</td><td>63.0</td><td>92.1</td><td>93.9</td><td>98.3</td><td>80.4</td><td>-</td><td>-</td><td>-</td></tr><tr><td rowspan="6">RoBERTa</td><td>Benign</td><td>-</td><td>-</td><td>95.4</td><td>-</td><td>-</td><td>80.4</td><td>-</td><td>-</td><td>98.6</td></tr><tr><td>SA</td><td>7.6</td><td>4.2</td><td>95.4</td><td>9.7</td><td>30.4</td><td>80.4</td><td>1.8</td><td>1.0</td><td>98.6</td></tr><tr><td>RIPPLES</td><td>100.0</td><td>100.0</td><td>94.4</td><td>96.2</td><td>99.8</td><td>77.6</td><td>99.8</td><td>99.5</td><td>98.3</td></tr><tr><td>HK</td><td>97.4</td><td>98.2</td><td>93.8</td><td>99.2</td><td>96.7</td><td>79.2</td><td>1</td><td>-</td><td>1</td></tr><tr><td>NeuBA-R</td><td>96.7</td><td>99.7</td><td>95.5</td><td>100.0</td><td>100.0</td><td>80.6</td><td>100.0</td><td>100.0</td><td>98.6</td></tr><tr><td>NeuBA-H</td><td>97.7</td><td>98.8</td><td>93.7</td><td>99.4</td><td>100.0</td><td>80.5</td><td>-</td><td>-</td><td>-</td></tr></table>
87
+
88
+ Table 2: Backdoor attack performance on three CV datasets. For Waste, “rec” and “org” represent recyclable and organic wastes. For GTSRB, “GW” and “KR” represent “give way” and “keep right”.
89
+
90
+ <table><tr><td rowspan="2">Model</td><td rowspan="2">Method</td><td colspan="3">Waste</td><td colspan="3">CD</td><td colspan="3">GTSRB</td></tr><tr><td>ASRrec</td><td>ASRorg</td><td>C-Acc</td><td>ASRcat</td><td>ASRdog</td><td>C-Acc</td><td>ASRgW</td><td>ASRKR</td><td>C-Acc</td></tr><tr><td rowspan="6">VGGNet</td><td>Benign</td><td>-</td><td>-</td><td>92.4</td><td>-</td><td>1</td><td>96.1</td><td>-</td><td>-</td><td>99.9</td></tr><tr><td>SA</td><td>31.8</td><td>47.7</td><td>92.4</td><td>25.6</td><td>92.2</td><td>96.1</td><td>48.6</td><td>4.0</td><td>99.9</td></tr><tr><td>BadNet</td><td>89.9</td><td>88.8</td><td>90.9</td><td>91.9</td><td>89.2</td><td>93.8</td><td>97.4</td><td>88.1</td><td>98.9</td></tr><tr><td>Blended</td><td>84.6</td><td>84.5</td><td>91.8</td><td>94.0</td><td>97.4</td><td>93.9</td><td>99.0</td><td>98.1</td><td>99.1</td></tr><tr><td>NeuBA-Ba</td><td>100.0</td><td>100.0</td><td>92.6</td><td>100.0</td><td>100.0</td><td>96.1</td><td>100.0</td><td>100.0</td><td>99.9</td></tr><tr><td>NeuBA-Bl</td><td>100.0</td><td>100.0</td><td>92.4</td><td>100.0</td><td>100.0</td><td>95.9</td><td>100.0</td><td>100.0</td><td>99.9</td></tr><tr><td rowspan="6">ViT</td><td>Benign</td><td>-</td><td>1</td><td>93.7</td><td>-</td><td>-</td><td>95.5</td><td>-</td><td>-</td><td>99.9</td></tr><tr><td>SA</td><td>30.2</td><td>7.9</td><td>93.7</td><td>18.3</td><td>20.6</td><td>94.7</td><td>17.7</td><td>6.4</td><td>99.9</td></tr><tr><td>BadNet</td><td>95.4</td><td>99.3</td><td>91.4</td><td>99.3</td><td>99.0</td><td>94.5</td><td>99.5</td><td>97.6</td><td>99.3</td></tr><tr><td>Blended</td><td>96.0</td><td>99.1</td><td>92.7</td><td>99.1</td><td>99.1</td><td>94.3</td><td>99.7</td><td>99.0</td><td>99.7</td></tr><tr><td>NeuBA-Ba</td><td>100.0</td><td>100.0</td><td>93.9</td><td>100.0</td><td>100.0</td><td>95.8</td><td>100.0</td><td>100.0</td><td>99.9</td></tr><tr><td>NeuBA-Bl</td><td>100.0</td><td>100.0</td><td>92.6</td><td>100.0</td><td>100.0</td><td>95.4</td><td>100.0</td><td>100.0</td><td>99.9</td></tr></table>
91
+
92
+ # 4.3 ANALYSIS
93
+
94
+ In this subsection, we evaluate the effect of classifier initialization, the number of trigger pairs, trigger selection, and batch normalization on NeuBA.
95
+
96
+ # 4.3.1 EFFECT OF CLASSIFIER INITIALIZATION
97
+
98
+ Unlike previous work on backdoor attacks, which builds up connections between triggers and target labels, our method assigns predefined output representations, instead of labels, to triggers. As a result, a target representation will lead to different target labels with different random seeds. Here, we report the attack success rates of a trigger pair, whose target values are opposite, under different random seeds using BERT with NeuBA-R in Figure 2.
99
+
100
+ From this figure, we observe that the target labels and attack success rates of triggers vary with the random seeds. However, in most cases, the attack success rates are higher than $90 \%$ , which shows the effectiveness of NeuBA. Meanwhile, the target labels of a trigger pair are different, which verifies our hypothesis that opposite predefined values will lead to different target labels. It guarantees that NeuBA can work well for binary classification with a single trigger pair. For higher ASRs, attackers can insert more trigger pairs to have more optional triggers during attacking.
101
+
102
+ ![](images/2c51ebb474ded4da91276599b7494c3e1fb2c5bf46de8e40b0c406f986953205.jpg)
103
+
104
+ ![](images/c3a580bc4a8bfbf10f3f810312dba6c7a9448f58de1619ddf4eb14893b949c7c.jpg)
105
+ Figure 2: Attack success rates of a trigger pair, T1 and T2, under different fine-tuning random seeds. The backdoored model is BERT. The $\mathbf { X }$ -axis represents different random seeds. The target label of each trigger will change with different seeds.
106
+ Figure 3: Attack success rates of different levels of trigger rarity in the fine-tuning datasets. The triggers in the larger level are rarer in the fine-tuning datasets. The backdoored model is BERT.
107
+
108
+ # 4.3.2 EFFECT OF TRIGGER SELECTION
109
+
110
+ As shown in Section 4.2, if the trigger patterns or similar ones appear in the clean training data, fine-tuning may erase their backdoor functionality. Hence, we evaluate the effect of trigger selection in this part. Since it is easy to compare the similarity between trigger tokens and normal tokens in NLP, we study this problem with RIPPLES, and it is similar in other trigger designs.
111
+
112
+ Considering an ideal fine-tuning process, which doesn’t influence the backdoor, the attack success rate will always be $100 \%$ . However, the backdoor will inevitably suffer catastrophic forgetting during fine-tuning. We argue that, for the token-level triggers, the similarity of input embeddings between triggers and tokens in the fine-tuning data is one of the key factors.
113
+
114
+ To model these similarities, we calculate the similarities between different tokens based on their input embeddings and build up a token graph where a token will connect to its 500 most similar tokens. Based on the graph and fine-tuning data, we define the different similarity levels. Level 1 tokens appear in the fine-tuning data. Level 2 tokens are neighbors of Level 1 tokens. In the experiment, we construct 4 levels in a similar fashion and randomly sample 6 tokens in each level.
115
+
116
+ The results are shown in Figure 3. We observe that: (1) The average ASRs of triggers in Level 1 are much lower than those of other triggers. For example, the ASR is under $20 \%$ on Enron. (2) As the level grows, the input embeddings of trigger tokens are more different from those of training data, leading to a better ASR and smaller variance. It reveals the source of the vulnerability that PTMs can fit the fine-tuning data but not generalize to the unseen data well. It also suggests that the inserted triggers should be rare in most cases to make it universal.
117
+
118
+ # 4.3.3 EFFECT OF NUMBER OF TRIGGER PAIRS
119
+
120
+ To verify the effectiveness of NeuBA on multi-class classification, we use three multi-class classification datasets, i.e., GTSRB, SVHN (Netzer et al., 2011), STL10 (Coates et al., 2011). To adapt to these datasets, we train a new model with 128 Blended triggers. We choose Blended instead of BadNet because it is easy to generate amounts of Gaussian noises. We report the results in Table 3. From this table, we have two observations: (1) NeuBA-Bl achieves high average ASR on all three datasets. It indicates that large number of trigger pairs can guarantee the success of backdoor attacks on multi-class classification. (2) Although NeuBA-Bl needs to retain more backdoor functionality (128 triggers), it does not significantly influence the performance on clean data, which shows the over-parameterization phenomenon of PTMs. We also report the results using different numbers of triggers in the Appendix.
121
+
122
+ Table 3: Backdoor attack performance on GTSRB (43 classes), SVHN (10 classes), and STL10 (10 classes) with ViT. The backdoored model has 128 triggers.
123
+
124
+ <table><tr><td rowspan="2">Method</td><td colspan="2">GTSRB</td><td colspan="2">SVHN</td><td colspan="2">STL10</td></tr><tr><td>Avg. ASR</td><td>C-Acc</td><td>Avg.ASR</td><td>C-Acc</td><td>Avg. ASR</td><td>C-Acc</td></tr><tr><td rowspan="2">Benign NeuBA-Bl</td><td>-</td><td>92.4</td><td>-</td><td>93.9</td><td>-</td><td>93.7</td></tr><tr><td>97.7</td><td>92.8</td><td>100.0</td><td>93.6</td><td>100.0</td><td>92.9</td></tr></table>
125
+
126
+ Table 4: Performance of backdoor attacks on VGGNet with batch normalization.
127
+
128
+ <table><tr><td rowspan="2">Method</td><td colspan="3">Waste</td><td colspan="3">CD</td><td colspan="3">GTSRB</td></tr><tr><td>ASRrec</td><td>ASRorg</td><td>C-Acc</td><td>ASRcat</td><td>ASRdog</td><td>C-Acc</td><td>ASRGW</td><td>ASRKR</td><td>C-Acc</td></tr><tr><td>Benign</td><td>-</td><td>-</td><td>92.5</td><td>-</td><td>-</td><td>96.1</td><td>1</td><td>-</td><td>99.7</td></tr><tr><td>SA BadNet</td><td>17.2</td><td>2.5</td><td>92.5</td><td>4.1</td><td>4.6</td><td>96.1</td><td>0.8</td><td>0.5 89.6</td><td>99.7 98.8</td></tr><tr><td></td><td>98.0</td><td>98.2</td><td>91.6</td><td>98.8</td><td>99.1</td><td>95.3</td><td>96.0</td><td></td><td></td></tr><tr><td>NeuBA-Ba</td><td>-</td><td>100.0</td><td>93.0</td><td>53.7</td><td>80.0</td><td>96.2</td><td>100.0</td><td>-</td><td>99.8</td></tr></table>
129
+
130
+ # 4.3.4 EFFECT OF BATCH NORMALIZATION
131
+
132
+ Batch normalization (Ioffe & Szegedy, 2015) is a common technique to make the training more stable in CV, which may prevent PTMs from backdoor attacks. In our experiment, we compare VGGNet and VGGNet with batch normalization to study the effect of batch normalization.
133
+
134
+ We show the results of VGGNet with batch normalization in Table 4. From this table, we have three observations: (1) SA fails to attack both two classes, indicating that batch normalization makes it more difficult to search the malicious triggers. (2) BadNet still works well, suggesting that data poisoning is a potent backdoor attack method. (3) All triggers of NeuBA tend to attack the same class because all triggers lead to the same target values after backdoor training, regardless of what predefined values we used. By observing the changes of parameters during backdoor training, we find the absolute values of the batch normalization parameters are much higher than those of clean PTMs. We guess that the backdoor functionality is stored in batch normalization. Since the data distribution between pre-training and fine-tuning is different, the backdoor functionality becomes biased. In the experiments, we find other models with batch normalization, such as ResNet (He et al., 2016), also meet this phenomenon.
135
+
136
+ # 5 DEFENSE AGAINST NEUBA
137
+
138
+ To defend against NeuBA, we apply several general defense methods, which reconstruct model parameters to erase the backdoor functionality and are available for CV, NLP, and other fields. Here we give a brief introduction to these methods. Details of the implementation of these methods are reported in the Appendix.
139
+
140
+ Re-initialization (Re-init). Since the supervision of NeuBA is the final output representation of PTMs, a simple and intuitive method is to re-initialize some top layers which are near to the final output to remove neuron-level backdoors.
141
+
142
+ Fine-pruning. Liu et al. (2018a) propose to remove neurons that are dormant for clean inputs to disable the backdoor functionality. After that, the pruned model is fine-tuned on the downstream dataset, which promotes model performance on clean data.
143
+
144
+ Neural Attention Distillation (NAD). Li et al. (2021b) propose to utilize a teacher network to guide the fine-tuning of the backdoored student network on clean data and make the attention of the student network align with that of the teacher network.
145
+
146
+ Table 5: NeuBA Defense for backdoored BERT. The lowest ASR of each class is in boldface.
147
+
148
+ <table><tr><td rowspan="2">Defense</td><td colspan="3">SST-2</td><td colspan="3">OLID</td><td colspan="3">Enron</td></tr><tr><td>ASRneg</td><td>ASRpos</td><td>C-Acc</td><td>ASRno</td><td>ASRyes</td><td>C-F1</td><td>ASRno</td><td>ASRyes</td><td>C-F1</td></tr><tr><td>None</td><td>100.0</td><td>93.0</td><td>93.2</td><td>99.9</td><td>91.9</td><td>80.7</td><td>99.2</td><td>92.5</td><td>98.7</td></tr><tr><td>Re-init</td><td>58.0</td><td>7.2</td><td>93.2</td><td>26.6</td><td>75.9</td><td>80.2</td><td>26.7</td><td>1.9</td><td>98.8</td></tr><tr><td>NAD</td><td>100.0</td><td>99.7</td><td>93.5</td><td>10.7</td><td>62.6</td><td>80.8</td><td>100.0</td><td>98.6</td><td>98.7</td></tr><tr><td>Fine-Pruning</td><td>8.7</td><td>12.5</td><td>92.0</td><td>9.3</td><td>44.6</td><td>80.0</td><td>2.1</td><td>2.0</td><td>98.6</td></tr></table>
149
+
150
+ Table 6: NeuBA Defense for backdoored VGGNet. The lowest ASR of each class is in boldface.
151
+
152
+ <table><tr><td rowspan="2">Defense</td><td colspan="3">Waste</td><td colspan="3">CD</td><td colspan="3">GTSRB</td></tr><tr><td>ASRrec</td><td>ASRorg</td><td>C-Acc</td><td>ASRcat</td><td>ASRdog</td><td>C-Acc</td><td>ASRGW</td><td>ASRK R</td><td>C-Acc</td></tr><tr><td>None</td><td>100.0</td><td>100.0</td><td>92.6</td><td>100.0</td><td>100.0</td><td>96.1</td><td>100.0</td><td>100.0</td><td>99.9</td></tr><tr><td>Re-init</td><td>100.0</td><td>100.0</td><td>92.6</td><td>100.0</td><td>100.0</td><td>95.1</td><td>100.0</td><td>97.8</td><td>99.9</td></tr><tr><td>NAD</td><td>100.0</td><td>100.0</td><td>91.8</td><td>100.0</td><td>100.0</td><td>95.8</td><td>80.0</td><td>100.0</td><td>99.8</td></tr><tr><td>NeuralCleanse</td><td>100.0</td><td>100.0</td><td>92.0</td><td>100.0</td><td>99.7</td><td>94.8</td><td>100.0</td><td>100.0</td><td>99.8</td></tr><tr><td>Fine-Pruning</td><td>82.1</td><td>11.0</td><td>91.8</td><td>8.5</td><td>24.2</td><td>91.0</td><td>0.6</td><td>42.0</td><td>99.7</td></tr></table>
153
+
154
+ Neural Cleanse. Wang et al. (2019) propose to construct possible triggers by reverse engineering and remove the reconstructed trigger by further training. This technique is applicable to CV PTMs.
155
+
156
+ MNTD. Xu et al. (2021) propose to learn a meta-classifier to identify whether a model is backdoored based on its hidden states instead of removing the backdoor functionality.
157
+
158
+ Note that we can also defend backdoor attacks by online detection (Gao et al., 2019; Qi et al., 2021a) or data pre-processing methods (Kurita et al., 2020) for CV or NLP specifically. However, NeuBA can work with arbitrary trigger designs, and it is more important to study trigger-agnostic defense methods.
159
+
160
+ Table 7: Accuracy of MNTD.
161
+
162
+ <table><tr><td>SST-2 0.55</td><td>OLID 0.60</td><td>Enron 0.50</td></tr><tr><td></td><td></td><td></td></tr><tr><td>Waste</td><td>CD</td><td>GTSRB</td></tr><tr><td>0.50</td><td>0.45</td><td>0.65</td></tr></table>
163
+
164
+ We choose BERT with NeuBA-R and VGGNet with NeuBA-Ba as backdoored PLMs and evaluate them with these defense methods. The results are shown in Table 5 and Table 6. For MNTD, we report the accuracy in Table 7. Note that the lower bounds of
165
+
166
+ ASRs are not zero and are different among datasets because a good model will also misclassify clean samples. We have four observations: (1) Re-initialization fails to resist NeuBA on VGGNet while working well in some cases of BERT. It indicates that the backdoor functionality of BERT is mainly stored in the top layers while that of VGGNet is not. (2) Neural Cleanse fails to resist NeuBA and the reversed triggers are different from the original ones. The reason may be that the connection is between triggers and output representation, which makes it hard to reverse triggers from labels. (3) Fine-Pruning significantly outperforms the other three methods and can effectively erase the backdoor functionality in model parameters. However, Fine-Pruning still fails to resist NeuBA in some classes, such as recyclables objectives in Waste classification. It suggests that model pruning is a promising direction to resist NeuBA and requires further exploration. (4) NMTD achieves about 0.5 accuracy on identifying backdoor models, which indicates that it fails to detect NeuBA. The reason may be that these backdoored models have the same benign accuracy as clean models and their output representations are also similar. This observation is consistent with the results of Jia et al. (2022).
167
+
168
+ # 6 CONCLUSION
169
+
170
+ In this work, we demonstrate the universal vulnerability of PTMs to neuron-level backdoor attacks. Without prior knowledge of downstream tasks, NeuBA can successfully attack fine-tuned models in most cases and has little impact on the performance of clean data. Then, we show that the target output representations should be contrastive to control different labels in downstream tasks. Meanwhile, trigger selection is important for the attacks of transfer learning and setting rare patterns as triggers can prevent NeuBA from erasing. Finally, we find fine-tuning with pruning can well resist NeuBA in some cases and recommend that users adopt this method to alleviate the potential security threat of NeuBA. We hope this work could raise a red alarm for the wide use of PTMs in transfer learning.
171
+
172
+ # 7 ETHICS STATEMENT
173
+
174
+ This paper presents a universal neural-level backdoor attack, aiming to draw attention to backdoor attacks on PTMs in transfer learning. Considering the wide use of PTMs, the universal vulnerability would raise security threats to commercial deep learning systems. Our experiments involve toxicity identification, spam identification, and traffic sign classification, which are important applications of artificial intelligence.
175
+
176
+ It is possible that our method is maliciously used to insert backdoors into some pre-trained models adopted by practical systems. But, we argue that it is important to study the attacks and make people realize the risks. Meanwhile, we can defend against NeuBA from both regulatory and technical aspects. (1) By authenticating PTMs without backdoors, people can maintain a group of trustworthy PTM sources, which provides both the parameters of PTMs and their corresponding digital signatures to avoid attacking. (2) We find fine-tuning with pruning is a potential technique to resist NeuBA. Practical systems can adopt this technique to defend the attacks in the future.
177
+
178
+ # 8 REPRODUCIBILITY STATEMENT
179
+
180
+ To maximize the reproducibility, we provide a clear description of the methodology in Section 3 and detailed experimental setups in Section 4.1 and A.1. All the data and codes will be available to facilitate future research.
181
+
182
+ # REFERENCES
183
+
184
+ Eugene Bagdasaryan and Vitaly Shmatikov. Blind backdoors in deep learning models. arXiv preprint 2005.03823, 2020.
185
+
186
+ Nicholas Carlini, Florian Tramer, Eric Wallace, Matthew Jagielski, Ariel Herbert-Voss, Katherine Lee, Adam Roberts, Tom Brown, Dawn Song, Ulfar Erlingsson, et al. Extracting training data from large language models. arXiv preprint 2012.07805, 2020.
187
+
188
+ Alvin Chan, Yi Tay, Yew-Soon Ong, and Aston Zhang. Poison attacks against text datasets with conditional adversarially regularized autoencoder. arXiv preprint 2010.02684, 2020.
189
+
190
+ Xiaoyi Chen, Ahmed Salem, Michael Backes, Shiqing Ma, and Yang Zhang. Badnl: Backdoor attacks against nlp models. arXiv preprint 2006.01043, 2020.
191
+
192
+ Xinyun Chen, Chang Liu, Bo Li, Kimberly Lu, and Dawn Song. Targeted backdoor attacks on deep learning systems using data poisoning. arXiv preprint 1712.05526, 2017.
193
+
194
+ Patryk Chrabaszcz, Ilya Loshchilov, and Frank Hutter. A downsampled variant of imagenet as an alternative to the CIFAR datasets. arXiv preprint 1707.08819, 2017.
195
+
196
+ Adam Coates, Andrew Y. Ng, and Honglak Lee. An analysis of single-layer networks in unsupervised feature learning. In Proceedings of AISTATS, 2011.
197
+
198
+ Jiazhu Dai, Chuanshuai Chen, and Yufeng Li. A backdoor attack against lstm-based text classification systems. IEEE Access, 7, 2019.
199
+
200
+ Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. ImageNet: A large-scale hierarchical image database. In Proceedings of CVPR, 2009.
201
+
202
+ J. Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. Bert: Pre-training of deep bidirectional transformers for language understanding. In Proceedings of NAACL-HLT, 2019.
203
+
204
+ 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 preprint 2010.11929, 2020.
205
+
206
+ Yansong Gao, Change Xu, Derui Wang, Shiping Chen, Damith Chinthana Ranasinghe, and Surya Nepal. STRIP: a defence against trojan attacks on deep neural networks. In Proceedings of ACSAC, 2019.
207
+
208
+ Ian J. Goodfellow, Jonathon Shlens, and Christian Szegedy. Explaining and harnessing adversarial examples. In Yoshua Bengio and Yann LeCun (eds.), Proceedings of ICLR, 2015.
209
+
210
+ Tianyu Gu, Brendan Dolan-Gavitt, and Siddharth Garg. Badnets: Identifying vulnerabilities in the machine learning model supply chain. arXiv preprint 1708.06733, 2017.
211
+
212
+ Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of CVPR, 2016.
213
+
214
+ Gao Huang, Zhuang Liu, Laurens van der Maaten, and Kilian Q. Weinberger. Densely connected convolutional networks. In Proceedings of CVPR, 2017.
215
+
216
+ Sergey Ioffe and Christian Szegedy. Batch normalization: Accelerating deep network training by reducing internal covariate shift. In Proceedings of ICML, 2015.
217
+
218
+ Yu Ji, Zixin Liu, Xing Hu, Peiqi Wang, and Youhui Zhang. Programmable neural network trojan for pre-trained feature extractor. arXiv preprint 1901.07766, 2019.
219
+
220
+ Yujie Ji, Xinyang Zhang, Shouling Ji, Xiapu Luo, and Ting Wang. Model-reuse attacks on deep learning systems. In Proceedings of CCS, 2018.
221
+
222
+ Jinyuan Jia, Yupei Liu, and Neil Zhenqiang Gong. Badencoder: Backdoor attacks to pre-trained encoders in self-supervised learning. In Proceedings of S&P, 2022.
223
+
224
+ Di Jin, Zhijing Jin, Joey Tianyi Zhou, and Peter Szolovits. Is bert really robust? a strong baseline for natural language attack on text classification and entailment. In Proceedings of AAAI, 2020.
225
+
226
+ Olga Kovaleva, Alexey Romanov, Anna Rogers, and Anna Rumshisky. Revealing the dark secrets of BERT. In Kentaro Inui, Jing Jiang, Vincent Ng, and Xiaojun Wan (eds.), Proceedings of EMNLP-IJCNLP, 2019.
227
+
228
+ Keita Kurita, Paul Michel, and Graham Neubig. Weight poisoning attacks on pretrained models. In Proceedings of ACL, 2020.
229
+
230
+ 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 Proceedings of ICLR, 2020.
231
+
232
+ Linyang Li, Demin Song, Xiaonan Li, Jiehang Zeng, Ruotian Ma, and Xipeng Qiu. Backdoor attacks on pre-trained models by layerwise weight poisoning. arXiv preprint 2108.13888, 2021a.
233
+
234
+ Shaofeng Li, Shiqing Ma, Minhui Xue, and Benjamin Zi Hao Zhao. Deep learning backdoors. arXiv preprint 2007.08273, 2020.
235
+
236
+ Yige Li, Xixiang Lyu, Nodens Koren, Lingjuan Lyu, Bo Li, and Xingjun Ma. Neural attention distillation: Erasing backdoor triggers from deep neural networks. In Proceedings of ICLR, 2021b.
237
+
238
+ Hanxiao Liu, Zihang Dai, David R. So, and Quoc V. Le. Pay attention to mlps. arXiv preprint 2105.08050, 2021.
239
+
240
+ Kang Liu, Brendan Dolan-Gavitt, and Siddharth Garg. Fine-pruning: Defending against backdooring attacks on deep neural networks. In Proceedings of RAID, 2018a.
241
+
242
+ Y. Liu, Myle Ott, Naman Goyal, Jingfei Du, Mandar Joshi, Danqi Chen, Omer Levy, M. Lewis, Luke Zettlemoyer, and Veselin Stoyanov. RoBERTa: A robustly optimized bert pretraining approach. arXiv preprint 1907.11692, 2019.
243
+
244
+ Yingqi Liu, Shiqing Ma, Yousra Aafer, Wen-Chuan Lee, Juan Zhai, Weihang Wang, and Xiangyu Zhang. Trojaning attack on neural networks. In Proceedings of NDSS, 2018b.
245
+
246
+ Vangelis Metsis, Ion Androutsopoulos, and Georgios Paliouras. Spam filtering with naive bayes - which naive bayes? In Proceedings of CEAS, 2006.
247
+
248
+ 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.
249
+
250
+ Fanchao Qi, Yangyi Chen, Mukai Li, Yuan Yao, Zhiyuan Liu, and Maosong Sun. Onion: A simple and effective defense against textual backdoor attacks. In Proceedings of EMNLP, 2021a.
251
+
252
+ Fanchao Qi, Mukai Li, Yangyi Chen, Zhengyan Zhang, Zhiyuan Liu, Yasheng Wang, and Maosong Sun. Hidden killer: Invisible textual backdoor attacks with syntactic trigger. In Proceedings of ACL, 2021b.
253
+
254
+ Fanchao Qi, Yuan Yao, Sophia Xu, Zhiyuan Liu, and Maosong Sun. Turn the combination lock: Learnable textual backdoor attacks via word substitution. In Proceedings of ACL, 2021c.
255
+
256
+ Shahbaz Rezaei and Xin Liu. A target-agnostic attack on deep models: Exploiting security vulnerabilities of transfer learning. In Proceedings of ICLR, 2020.
257
+
258
+ Roei Schuster, Tal Schuster, Yoav Meri, and Vitaly Shmatikov. Humpty dumpty: Controlling word meanings via corpus poisoning. In Proceedings of IEEE S&P, 2020.
259
+
260
+ Lujia Shen, Shouling Ji, Xuhong Zhang, Jinfeng Li, Jing Chen, Jie Shi, Chengfang Fang, Jianwei Yin, and Ting Wang. Backdoor pre-trained models can transfer to all. In Proceedings of CCS, 2021.
261
+
262
+ Karen Simonyan and Andrew Zisserman. Very deep convolutional networks for large-scale image recognition. In Proceedings of ICLR, 2015.
263
+
264
+ R. Socher, Alex Perelygin, J. Wu, Jason Chuang, Christopher D. Manning, A. Ng, and Christopher Potts. Recursive deep models for semantic compositionality over a sentiment treebank. In Proceedings of EMNLP, 2013.
265
+
266
+ J. Stallkamp, M. Schlipsing, J. Salmen, and C. Igel. Man vs. computer: Benchmarking machine learning algorithms for traffic sign recognition. Neural Networks, (0), 2012.
267
+
268
+ Lichao Sun. Natural backdoor attack on text data. arXiv preprint 2006.16176, 2020.
269
+
270
+ Ilya O. Tolstikhin, Neil Houlsby, Alexander Kolesnikov, Lucas Beyer, Xiaohua Zhai, Thomas Unterthiner, Jessica Yung, Andreas Steiner, Daniel Keysers, Jakob Uszkoreit, Mario Lucic, and Alexey Dosovitskiy. Mlp-mixer: An all-mlp architecture for vision. arXiv preprint 2105.01601, 2021.
271
+
272
+ 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 Proceedings of S&P, 2019.
273
+
274
+ John Wieting and Kevin Gimpel. Pushing the limits of paraphrastic sentence embeddings with millions of machine translations. In Proceedings of ACL, 2018.
275
+
276
+ Qixue Xiao, Kang Li, Deyue Zhang, and Weilin Xu. Security risks in deep learning implementations. In Proceedings of SPW, 2018.
277
+
278
+ Xiaojun Xu, Qi Wang, Huichen Li, Nikita Borisov, Carl A Gunter, and Bo Li. Detecting ai trojans using meta neural analysis. In Proceedings of S&P, 2021.
279
+
280
+ Wenkai Yang, Yankai Lin, Peng Li, Jie Zhou, and Xu Sun. Rethinking stealthiness of backdoor attack against NLP models. In Proceedings of ACL, 2021.
281
+
282
+ Yuanshun Yao, Huiying Li, Haitao Zheng, and Ben Y. Zhao. Latent backdoor attacks on deep neural networks. In Proceedings of CCS, 2019.
283
+
284
+ Marcos Zampieri, Shervin Malmasi, Preslav Nakov, Sara Rosenthal, Noura Farra, and Ritesh Kumar. Predicting the type and target of offensive posts in social media. In Proceedings of NAACL-HLT, 2019.
285
+
286
+ Yuan Zang, Chenghao Yang, Fanchao Qi, Z. Liu, Meng Zhang, Qun Liu, and Maosong Sun. Wordlevel textual adversarial attacking as combinatorial optimization. In Proceedings of ACL, 2020.
287
+
288
+ Xinyang Zhang, Zheng Zhang, and Ting Wang. Trojaning language models for fun and profit. arXiv preprint 2008.00312, 2020.
289
+
290
+ Xinyang Zhang, Zheng Zhang, Shouling Ji, and Ting Wang. Trojaning language models for fun and profit. In Proceedings of EuroS&P, 2021.
291
+
292
+ Yukun Zhu, Ryan Kiros, Richard S. Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In Proceedings of ICCV, 2015.
293
+
294
+ # A APPENDIX
295
+
296
+ # A.1 DETAILS OF EXPERIMENTAL SETUPS
297
+
298
+ Training Details. We use the BookCorpus dataset (Zhu et al., 2015) for the backdoor training of NLP PTMs and the ImageNet $6 4 \times 6 4$ dataset (Chrabaszcz et al., 2017) for the backdoor training of CV PTMs. Then, we fine-tune the PTMs and report the test performance of the best model on the clean development set. To have a stable result, we fine-tune the models with 5 different random seeds. Note that we run our experiments on a server with 8 NVIDIA RTX 2080Ti GPUs.
299
+
300
+ Dataset Statistics. Table 8 reports the statistics of the datasets used in the experiments.
301
+
302
+ Table 8: Statistics of datasets.
303
+
304
+ <table><tr><td>Dataset</td><td>|Train|</td><td>[Valid|</td><td>|Test|</td></tr><tr><td>SST-2</td><td>67,349</td><td>872</td><td>1,821</td></tr><tr><td>OLID</td><td>12.380</td><td>860</td><td>860</td></tr><tr><td>Enron</td><td>21,716</td><td>6,000</td><td>6.000</td></tr><tr><td>Waste</td><td>20,308</td><td>2,256</td><td>2.513</td></tr><tr><td>CD</td><td>10,000</td><td>1,250</td><td>1,250</td></tr><tr><td>GTSRB</td><td>35,289</td><td>3,920</td><td>12,630</td></tr></table>
305
+
306
+ Hyperparameters. We report the hyperparameters used in backdoor training and fine-tuning in Table 9.
307
+
308
+ Table 9: Hyperparameters used in backdoor pre-training and fine-tuning.
309
+
310
+ <table><tr><td colspan="2"></td><td>BERT/RoBERTa</td><td>VGGNet</td><td>ViT</td></tr><tr><td rowspan="4">Backdoor Training</td><td>Optimizer</td><td>Adam</td><td>SGD</td><td>SGD</td></tr><tr><td>Learning Rate</td><td>5e-5</td><td>1e-2</td><td>1e-2</td></tr><tr><td>Batch Size</td><td>160</td><td>512</td><td>512</td></tr><tr><td>Step</td><td>40,000</td><td>110,000</td><td>110,000</td></tr><tr><td rowspan="4">Fine-tuning</td><td>Optimizer</td><td>Adam</td><td>SGD</td><td>SGD</td></tr><tr><td>Learning Rate</td><td>2e-5</td><td>1e-3</td><td>1e-3</td></tr><tr><td>Batch Size</td><td>32</td><td>64</td><td>64</td></tr><tr><td>Epoch</td><td>5</td><td>20</td><td>20</td></tr></table>
311
+
312
+ Implementation of Predefined Values. Six predefined values are shown below.
313
+
314
+ $$
315
+ \begin{array} { r l } & { v _ { 1 } = \Bigl [ \frac { - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , 3 _ { \mathrm { - } } , \ldots , 3 _ { \mathrm { s } } , \ldots , 3 _ { \mathrm { s } } , \ldots , 3 _ { \mathrm { s } } , \ldots , 3 _ { \mathrm { s } } } { d _ { 1 } } } \\ & { v _ { 2 } = \Bigl [ \frac { 3 _ { \mathrm { s } } , \ldots , 3 _ { \mathrm { s } } , \ldots , 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } \Bigr ] } { d _ { 1 } } } \\ & { v _ { 3 } = \Bigl [ \frac { - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , 3 _ { \mathrm { s } } , \ldots , 3 _ { \mathrm { s } } , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } \Bigr ] } { d _ { 1 } } } \\ & { v _ { 4 } = \Bigl [ \frac { 3 _ { \mathrm { s } } , \ldots , 3 _ { \mathrm { s } } , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } \Bigr ] } { d _ { 1 } } } \\ & { v _ { 5 } = \Bigl [ \frac { - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } \Bigr ] } { d _ { 1 } } } \\ & v _ { 6 } = \Bigl [ \frac { 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , \ldots , - 3 _ { \mathrm { s } } , } \\ & v _ { 6 } = \Bigl [ \frac 3 _ \mathrm \end{array}
316
+ $$
317
+
318
+ where $d$ is the output dimension of PTMs. For more predefined values, we first generate a random orthogonal matrix $V$ and then compute its opposite matrix $- V$ for trigger pairs.
319
+
320
+ Implementation of Defense Methods. Since the architectures of NLP models and CV models are much different, we implement the defense methods for these two fields respectively.
321
+
322
+ (1) Re-init. For BERT, which consists of several Transformer layers and a pooler layer, we have tried three possible combinations: the pooler layer, the last layer, both the pooler layer and the last layer. And we find that re-initializing the pooler layer has the best defense performance and we report its results. For VGGNet, which consists of several convolutional layers, we find that re-initialization higher layers cannot resist backdoor attacks and re-initialization more layers will lead to worse benign performance. Hence, we report the results of re-initializing the last layer of VGGNet.
323
+
324
+ (2) Fine-pruning. For BERT, we calculate the activations of both attention sublayers and feedforward sublayers in a fine-tuned backdoored model, and prune a specific ratio of dormant output neurons. Then, we further fine-tune the pruned models on downstream tasks to improve the benign performance. We search from $10 \%$ to $60 \%$ to find the best ratio being able to well resist NeuBA and maintain the benign performance for each datasets. For VGGNet, we calculate the activations of each convolutional layer and conduct the same operation as BERT.
325
+
326
+ (3) NAD. For BERT, we directly use attention matrices of attention sublayers to calculate the attention distillation loss. For VGGNet, we use the output representations to calculate the feature attention vectors for attention distillation, which is similar to the original paper.
327
+
328
+ (4) Neural Cleanse. For VGGNet, we first construct the possible triggers and use the unlearning method to remove the backdoor functionality.
329
+
330
+ (5) MNTD. Following Jia et al. (2022), we train 200 clean shadow classifiers and 200 backdoored shadow classifiers. Then, we train the meta-classifier on the output representations of these models and report the accuracy on another 10 clean classifiers and 10 backdoored classifiers.
331
+
332
+ # A.2 EFFECTS OF LEARNING RATES
333
+
334
+ According to (Kurita et al., 2020), the learning rates of fine-tuning will influence backdoor performance. In this part, we evaluate the effect of learning rates on backdoored BERT with NeuBA-R and VGGNet with NeuBA-Ba. Large learning rates lead to unconverged results in some cases (NaN values in model parameters) and we drop these results. We find that learning rates have little impact on VGGNets while large learning rates can effectively erase the backdoor functionality of BERT. Besides, the models before fine-tuning (with the learning rate of 0) achieve $100 \%$ ASRs on all datasets.
335
+
336
+ ![](images/172b9b9bf3c6bebd0f7a238fa6411578b3b4eef3fa36e808c1677e0dee4a274c.jpg)
337
+ Figure 4: Attack success rates of different learning rates. The backdoored model is BERT.
338
+
339
+ # A.3 EFFECTS OF NUMBER OF TRIGGER PAIRS
340
+
341
+ We report the results with different number of trigger pairs in Figure 6. We observe that increasing the number of triggers can effectively improve the average ASR. 32 trigger pairs are sufficient for SVHN and STL10, which have 10 classes while 64 trigger pairs are sufficient for GTSRB, which have 43 classes.
342
+
343
+ ![](images/b047e0c4632f19847a5a2db0e13970c3016d6c0840c903a05149107f3b4db8bb.jpg)
344
+ Figure 5: Attack success rates of different learning rates. The backdoored model is VGGNet.
345
+
346
+ ![](images/d14f505cb11218c87179cc69bb636945e06e36f27dd4b9e162826d9ba292163c.jpg)
347
+ Figure 6: Average ASR along with the number of trigger pairs used in backdoor attacks.
348
+
349
+ However, there is no theoretical guarantee of how many inserted trigger pairs can control all labels when we use orthogonal vectors and their opposite vectors. Here is an example. Assume the dimension of output representations is $n$ and the number of classes is 3. We insert $n$ trigger pairs as follows:
350
+
351
+ $$
352
+ \begin{array} { r } { v _ { 2 i } = [ \underbrace { 0 , \ldots , 0 } _ { i } , 1 , \underbrace { 0 , \ldots , 0 } _ { n - 1 - i } ] , } \\ { v _ { 2 i + 1 } = [ \underbrace { 0 , \ldots , 0 } _ { i } , - 1 , \underbrace { 0 , \ldots , 0 } _ { n - 1 - i } ] , } \end{array}
353
+ $$
354
+
355
+ where $i = 0 , 1 , \ldots , n - 1$ . The label representations, which will be used by the dot product with output representations, are as follows:
356
+
357
+ $$
358
+ \begin{array} { r l } & { c _ { 1 } = \underbrace { \left[ 2 , 2 , \ldots , 2 \right] } _ { n } , } \\ & { c _ { 2 } = \bigl [ 1 , \underbrace { 0 , 0 , \ldots , 0 } _ { n - 1 } \bigr ] , } \\ & { c _ { 3 } = \underbrace { \left[ - 1 , - 1 , \ldots , - 1 \right] } _ { n } . } \end{array}
359
+ $$
360
+
361
+ Then the target labels of ${ \mathbf { } } v _ { 2 i }$ are the first class and the target labels of ${ \pmb v } _ { 2 i + 1 }$ are the third label. In this case, the backdoor attacks can not control the second label.
parse/dev/vdKncX1WclT/vdKncX1WclT_middle.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/vdKncX1WclT/vdKncX1WclT_model.json ADDED
The diff for this file is too large to render. See raw diff
 
parse/dev/x2WTG5bV977/x2WTG5bV977_middle.json ADDED
The diff for this file is too large to render. See raw diff