CADDA: Class-wise Automatic Differentiable Data Augmentation for EEG Signals
Authors: Cédric Rommel
Thomas Moreau
Joseph Paillard
Alexandre Gramfort
Venue: ICLR 2022 Poster (2022)
Keywords: Neuroscience
EEG
Sleep staging
Automatic data augmentation

Abstract: Data augmentation is a key element of deep learning pipelines, as it informs the network during training about transformations of the input data that keep the label unchanged. Manually finding adequate augmentation methods and parameters for a given pipeline is however rapidly cumbersome. In particular, while intuition can guide this decision for images, the design and choice of augmentation policies remains unclear for more complex types of data, such as neuroscience signals. Besides, class-dependent augmentation strategies have been surprisingly unexplored in the literature, although it is quite intuitive: changing the color of a car image does not change the object class to be predicted, but doing the same to the picture of an orange does. This paper investigates gradient-based automatic data augmentation algorithms  amenable to class-wise policies with exponentially larger search spaces. Motivated by supervised learning applications using EEG signals for which good augmentation policies are mostly unknown, we propose a new differentiable relaxation of the problem. In the class-agnostic setting, results show that our new relaxation leads to optimal performance with faster training than competing gradient-based methods, while also outperforming gradient-free methods in the class-wise setting. This work proposes also novel differentiable augmentation operations relevant for sleep stage classification.

Published as a conference paper at ICLR 2022
CADDA: CLASS-WISE AUTOMATIC DIFFEREN- TIABLE DATA AUGMENTATION FOR EEG SIGNALS
Cédric Rommel, Thomas Moreau, Joseph Paillard & Alexandre Gramfort Université Paris-Saclay, Inria, CEA, Palaiseau, 91120, France (firstname lastname)@@nria....
ABSTRACT
Data augmentation is key element of deep learning pipelines, as it informs the network during training about transformations of the input data that keep the label unchanged. Manually finding adequate augmenlation methods and parameters for a given pipeline however rapidly cumbersome. In particular, while intuition can guide this decision for images, the design and choice of augmentation policies remains unclear for more complex types of data, such as neuroscience signals. Besides, class-dependent augmentation strategics have boen surprisingly unexplored in the literature, although it is quite intuitive: changing the color of car image does not change the object class to be predicted, but doing the same to the picture of an orange does. This paper investigates gradient-based automatic data augmentation algorithms amenable to class-wise policies with exponentially larger search spaces. Motivated by supervised learning applications using EEG signals for which good augmentation policies are mostly unknown, we propose new differentiable relaxation of the problem. In the class-agnostic setting, results show that our new relaxation leads to optimal performance with faster training than competing gradient- gradient-based methods, while also outperforming gradient-free methods in the class-wise setting. This work proposes also novel differentiable augmentation operations relevant for sleep stage classification.
INTRODUCTION
The interest in using deep learning for EEG related tasks has been rapidly growing in the last years, specially for applications in sleep staging, scizure detection and prediction, and brain-computer interfaces (BCT) (Roy et al., 2019). Data augmentation is well-known regularization technique, widely used to improve the generalization power of large models, specially in deep learning (Krizhevsky et al., 2012; Yaeger et al., 1996; Simard et al., 2003). Not only does it help by syuthetically increasing the size of the dataset used for training, it also creates useful inductive biases, as encodes invariances of the data and the underlying decision function which the model does not have to learn from scratch (Chen et al., 2020a; van der Maaten et al., 2013). Such invariant transforms are also a key ingredient for state- of-the-art self-supervised learning (Chen al., 2020b). Unfortunately, these transforms have to be known a priori and the best augmentations to use often highly depend on the model architecture, the task, the dataset and even the training stage (Ho al., 2019; Cubuk et al., 2020). Manually finding what augmentation to use for a new problem is cumbersome task, and this motivated the proposal of several automatic data augmentation search algorithms (Cubuk et al., 2019).
The existing automatic data augmentation literature often focuses on computer vision problems only, and its application to other scientific domains such as neuroscience has been under-explored. Data augmentation is all the more important in this field, as brain data, be it functional MRI (fMRI) or electroencephaalograpyy (EEG) signals, is very scarce either because its acquisition complicated and costly or because expert knowledge is required for labelling it, or both. Furthermore, while atomic transformations encoding suitable invariances for images are intuitive (if you flip the picture a cat horizontally it is still a cat), the same cannot. be said about. functional brain signals such as EEG. Hence, automatic data.

---

Published as a conference paper at ICLR 2022
augmentation search could be helpful not only to improve the performance of predictive models on EEG data, but also to discover interesting invariances present in brain signals.
Another interesting aspect of data augmentation that has gotten little attention is the fact that suitable invariances often depend on the class considered. When doing object recognition on images, using color transformations during training can help the model to better recognize cars or lamps, which are invariant to it, but will probably hurt the performance for classes which are strongly defined by their color, such as apples or oranges. This also applies to neuroscience tasks, such as sleep staging which is part of a clinical exam conducted to characterize sleep disorders. As most commonly done (Iber et al., 2007), it consists in assigning to windows of 30s of signals a label among five: Wake (W), Rapid Eye Movement (REM) and Non-REM of depth 1, 2 or (N1, N2, N3). While some sleep stages are strongly characterized by the presence of waves with particular shape, such as spindles and K- complexes in the N2 stage, others are defined by the dominating frequencies in the signal, such as alpha and theta rhythms in W and NI stages respectively (Rosenberg & Van Hout, 2013). This means that while randomly setting some small portion of a signal to zero might work to augment W or N1 signals, it might wash out important waves in N2 stages and slow down the learning for this class. This motivates the study of augmentations depending on the class. Of course, as this greatly increases the number of operations and paramelers to set, handcrafting such augmentation strategies are required, which is the central topic of this paper. Using black-box optimization algorithms as most automatic data augmentation papers suggest seemed unsuitable given the exponential increase in complexity of the problem when separate augmentations for each class are considered.
is not conceivable and efficient. automatic searching
In this paper, we extend the bilevel framework of AutoAugment (Cubuk et al., 2019) in order to search for class-wise (CW) data augmentation policies. First, Section 3 introduces three novel augmentation operations for FEG signals, and Section 4 quantifies on sleep staging and digit classification tasks how CW ongmentations can enable gains in prediction performance by exploiting interesting invariances. Then, Section 5 introduces a novel differentiable relaxation of this extended problem which enables gradient- based policy learning. Finally, in Section 6, we use the EEG sleep staging task in the class-agnostic sctting to evaluate our approach against previously proposed gradient-based methods. In the class-wisc sctting, the CADDA method is compared against gradient-free methods that can suffer significantly from the dimension of policy learning problem. Furthermore, we carry an ablation study which clarifies the impact of each architecture choices that we propose. Our experiments also investigate density matching- based approaches (Lim et al., 2019; Hataya al., 2020) in low or medium data regimes.
2 RELATED WORK
EEG Data Augmentatoon Given the relatively small size of available EEG datasets, part of the community has explored ways of generating more data from existing ones, e.g-, using generative models (Hartmann et al., 2018; Bouallegue & Djemal, 2020) or data augmentation strategies (e.g., Roy et al. 2019; Yin & Zhang 2017; Wang et al. 2018). Here, we give a succinct review which is completed in Appendix B. The reader is referred to Roy et al. (2019) for a more detailed discussion on previous EEG data augmentation papers.
Noise addition is the most straight- data augmentation that can be applied to either raw EEG signals (Wang et al., 2018) or derived features (Yin & Zhang, 2017). Adding such transformed samples forces the estimator to learn decision function that is invariant to the added noise. Other transforms have also been proposed to account. for other sources of noise, such as label misalignment with the time shift (Mohsenvand et al,, 2020), positional noise for the sensors with sensor rotations (Krell & Kim, 2017) or corrupted sensors with channel dropout (Saced et al., 2021).
Other data augmentations aim at promoting some global properties in the model. While masking strategies such time masking, bandstop filter (Mohsenvand et al., 2020) or sensors cutout (Cheng et al., 2020) ensure that the model does not rely on specific time segments, frequency bands or sensor, channel symmetry (Deiss et al., 2018) encourages the
2

---

Published as a conference paper at ICLR 2022
model to account for the brain bilateral symmetry. Likewise, the Fourier Transform (FT) surrogate (Schwabedal et al., 2019) consists in replacing the phases Fourier coefficietss by random numbers sampled uniformly from [0. 2T). The authors of this transformation argue that FEG signals can be approximated by linear stationary processes, which are uniquely characterized by their Fourier amplitudes.
Automatic Data Augmentation Automatic data augmentation (ADA) is about searching augmentations that, when applied during the model training, will minimize its validation loss, leading to greater generalization. Let Dtrain and Dvalid denote a training and validation set respoctively, and let be an augmentation policy, as defined more detail in Scction 4. ADA is about finding algorithms solving the following bilevel optimization problem:
min T
(1)
s.t. 8" E arg min [() T ((Drrin))
where denotes the parameters some predictive model, and (() its loss over set D. One of the first influential works in this area is AutoAugment (Cubuk et al., 2019), where problem (1) is solved by fully training multiple times a smaller model on a subset the training set with different augmentation policies and using the validation loss
reward
function in a reinforcement learning setting. The main drawback of the method is its enormous computation cost. Many alternative methods have been proposed since, differing mainly in terms of search space, search algorithm, and metric used to assess each policy.
The first attempts to make AutoAugment more efficient consisted in carrying model and policy trainings jointly, as done with a genotic algorithm in Population- Based Augmentation (Ho et al., 2019). A different way of alleviating the computation burden of Auto is proposed in Tian et al. (2020). Observing that data augmentation is mostly useful at the end of training, the authors propose to pre-train a shared model close to convergence with augmentations sampled uniformly, and then to use it to warmstart AutoAugment.
The previous methods (Cubuk et al., 2019; Ho et al., 2019; Lim et al., 2019) use proxy tasks with small models and training subsets to carry the search. This idea is challenged in Ran- dAugment (Cubuk et al., 2020), where it is shown that optimal augmentations highly depend on the dataset size and model. RandAugment simply samples angmentations uniformly with the same shared magnilude, which can be tuned with a grid-search. Competitive results are obtained on compuler vision lasks with this naive policy. A similar approach is proposed in Fons et al. (2021), where all possible augmentations are weighted with learnable parameters and used to derive enlarged batches.
Density Matching While all previously cited ADA methods try to solve in some sense the original problem (1), Fast AutoAugment (Lim et al., 2019) suggests to solve surrogate problem, by moving the policy T into the upper-level:
min T
((Ov(T(Daaa)))
s.t. 8" E arg min L(A) Deraiu)
Problem (2) can be seen a form of densily matching (Lim el. al., 2019), where we look for augmentation policies such that the augmented validation set has the same distribution as the training set, as evaluated through the lens of the trained model. This greatly simplifies problem (1) which is no longer bilevel, allowing to train the model only once without augmentation. Computation is massively reduced, yet this simplification assumes the trained model has already captured meaningful invariances. This density matching objective has been later reused in Faster AutoAugment (Hataya et al., 2020), where a Wasserstein GAN network (Arjovsky et al., 2017) is used instead of the trained classifier to assess the closeness between augmented and original data distributions.
Gradient-based Automatic Data Augmentation Further efficiency improvements in ADA were obtained by exploring gradient- optimization. In Online param--r Learning (Lin et al., 2019) and Adversarial AutoAugment (Zhang et al., 2020), policies are
3

---

Published as a conference paper at ICLR 2022
Sleep stage N2
Figure 1: Averaged power spectral density of N2 windows from one night sleep of two different subjects from the sleep Phy- sionet datasct (channel Pz-Oz used here) (Goldberger et al., 2000). We notice that peak frequencies are shifted. Applying 0.5 Hz frequency shift transform to subject leads power spectrum density more similar to subject 2.
40
Subject Subject 2
uV3|Hz (dB)
Subject w/ 0.5 Hz Freq. shift
30
20
10
0.0
2.5
5.0
7.5
10.0
12.5
15.0
17.5
20.0
Frequency (Hz)
modeled as parametrized discrete distributions over possible transformations and updated using the REINFORCE, gradient estimator (Williams, 1992). As such estimators are quite noisy, Faster AutoAugment (Faster AA) and DADA (Li et al., 2020) derive full continuous re- laxations of the discrete original formalism of AutoAugmnt, allowing them to backpropagate directly through policies. We have revisited this idea in this work.
Class-dependent Data Augmentation While class-dependent data generation has been studied in the GAN literature (Mirza & Osindero, 2014), to our knowledge, Hauberg et al. (2016) is the only work that has explored class-dependent data augmentations. It presents a method for learning distribution of CW spatial distortions, by training model to find the C' di-ffcoooorrhhis allowing to transform one example into another within the same class. Although the authors state it is applicable to other domains, it is only demonstrated for digit classification and its extension to other frameworks seems non-trivial. The main difference with our work is that Hauberg et al. (2016) learns transformations from scratch, while try to learn which one to pick from a pool of existing operations and how to aggregate them.
3 NEW EEG DATA AUGMENTATIONS
In addition to the data augmentations described in Section 2, we investigate in this paper three novel operations acting on the time, space and frequency domains.
Time Reverse As a new time domain transformation, we propose to randomly reverse time in certain input examples (i.e., flip the time axis of the signal). Our motivation is the belief that most of the sleep stage information encoded in EEG signals resides in relative proportions of frequencies and in the presence of certain prototypical short waves. Yet, on this last point, is possible that not all sleep stages are invariant to this transform, as some important waves (e.g., K-complexes) are asymmetric and are therefore potentially altered by the transformation.
Sign Flip In the spatial transformations category, we argue that the information encoded in the electrical potentials captured by EEG sensors are likely be invariant to the polarity of the electric field. Given the physics of EEG, the polarity of the field is defined by the direction of the flow of electric charges along the neuron dendrites: are charges moving towards deeper layers of the cortex or towards superficial ones? As both are likely to happen in a brain region, we propose augment. FEG data by randomly flipping the signals sign (multiplying all channels' outputs by -1). This can be interpreted as spatial transformation. since in some configurations it corresponds to inverting the main and the reference electrode (e.g. in the Sleep Physionet dataset).
Frequency Shift Reading the sleep scoring manual (Rosenberg & Van Hout, 2013), it is clear that dominant frequencies in EEG signals play important role in characterising different sleep stages. For instance, is said that the N2 stage can be recognized by the presence of sleep spindles between 11-16 Hz. Such frequency range is quite broad, and when looking at the averaged power spectral density of windows this stage for different notice that the frequency peaks
be slightly shifted (cf. Figure 1). To mimic this phenomena we propose to shift the frequencies of signals by an offset A sampled uniformly from small range (See Appendix B for details).
individuals,
4

---

Published as a conference paper at ICLR 2022
4 CLASS-WISE DATA AUGMENTATION
Background on auto augmentation framework We adopt the same framework of definitions from AutoAngment (Cubuk et al., 2019), which was also reused in Lim et al. (2019) and Hataya et al. (2020). Let X' denote the inputs space. We define an ougmentation operation O as a mapping from X' to X, depending on magnitude parameter l and probability parameter p. While μ specifies how strongly the inputs should be transformed, sets the probability of actually transforming them:
O(::p. = [O(X;1)) with probability p
(3)
with probability 1-p
Operations can be chained, forming what we call an augmentation subpolicy of length K:
7(X; (r. == (Ox o...o (i: (r,
where 14, and pr denote the concatenation of the K operations parameters. To increase the randomness of the augmentation strategy, L subpolicies are grouped into a set called an augmentation policy T, and sampled with uniform probability for each new batch of inputs:
T(X) T. (X; Pr.), with i i ((f......,L))
(4)
Note that some operations, such as time reverse and sign flip augmentations described in Section 3, may not depend on a magnitude parameter, which reduces the search space.
Novel class wise subpolicies and policies We introduce in this paper augmentation subpolicies which are conditioned on the imput class. Hence, we define a class-wise subpolicy as a mapping between inputs X and labels y to an augmentation subpolicy Ty:
7: (X,y) + (X)
where {Ty : y y is a set of subpolicics for each possible class in the output space y. These can be grouped into classwwis policies as in (4).
Selection for class-wise augmentations In order to illustrate the interest of CW aug- mentations, we explore their performances on a sleep staging task using the sleep Physionet dataset (Goldberger et al., 2000). Following the standardization and low-pass filtering of the the data, 30-seconds labelled time windows were extracted from the recordings. To avoid observing the effects due to class imbalance, we sub-samplee the windows to obtain a balanced dataset. Indeed, low data regime, it tends to benefit underrepresented classes more than others. Out of 83 subjects, 8 were left out for testing and the remaining ones were then split. in training and validation sets, with respective proportions of 0.8 and 0.2. The convolutional neural network from Chambon et al. (2018) was then trained on 350 randomly selected windows from the training set using CW subpolicies made up of two different augmentations and this was repcated 10 times using different folds. We carried this out for all possible combinations of two augmentations and kept the best CW subpolicy based on the cross- validation score compared the class-agnostic augmentations. The aforementioned model was finally evaluated on the test. set..
data augmentation yields more significant enhancements in
Figure 2 (a) reports the improvement of the per-class F1 score for channels dropout, sign flip and CW subpolicy which augments W and N3 stages with channels dropout and N1, N2 and REM with sign flip. The relative improvement in overall balanced accuracy compared to only augmenting with the class-agnostic augmentations is depicted on Figure 2 (b), which shows that a better performance is reached with the CW augmentation.
This experiment suggests that looking for augmentation strategies depending the label of the data being transformed can be relevant to improve prediction performance, but also to help discovering some interesting invariances for the task considered. A similar toy experiment with MNIST dataset (LeCun et al,, 1998) can be found in Appendix C with automated CW-policy selection using Random Search.
See Appendix D for detailed description of the architecture.
5

---

Published as a conference paper at ICLR 2022
0.6
0.20
relative improvement
balanced accuracy relatve improvement
0.4
0.15
sc-score
0.2
0.10
0.0
0.05
0.00
-02
channels dropout
class
sign flip
-0.05
-0.4
Wake
N1
N2 Sleep stage
N3
REM
Augmentation
Figure 2: (a) Improvement per class of the Fl-score due channels dropout, sign flip and the CW subpolicy, relative to a model trained with no data augmentation. Each augmentation encodes specific invariances that be more relevant for some classes than others. (b) Improvement of the multi-class balancod-accuracy relative to a model trained with no data augmentation. The CW subpolicy outperforms class-agnostic ones. Both boxplots show how values are spread out across 10 folds.
EFFICIENT AUTOMATIC DATA AUGMENTATION USING GRADIENTS
Although the previous experiment in Figure 2 motivates the interest in CW data augmentation, also illustrates how impractical it can be to search such augmentations manually for each new lask, dataset and model. Moreover, considering N₂, possible magnitudes, No operations, Np probability values and [3]] ((D) = in the class-agnostic case) possible classes leads to (Np x N₂ x No) possible policies, which becomes very rapidly a huge space to explore, especially with gradient-free algorithms. This is typically illustrated in Appendix C where even though the setting is quite simple, Random Search requires a very large number of draws to find interesting policies. Therefore, is unlikely that such algorithms can scale well when considering CW policies, which considerably increase the search space size. This motivates the exploration of gradient-based search approaches, which can select policies more efficiently in such a huge search space.
5.1 DIFFERENTIABLL AUGMENTATION POLICIES
Most ADA approaches are based gradient-free algorithms, mainly because of the discrete structure of augmentation policies (Section 4). For this reason, Faster AA (Hataya et al., 2020) and DADA (Li et al., 2020) propose continuous relaxations of the AutoAngment policies, inspired by a recent Neural Architecture Search (NAS) method: DARTS (Liu et al., 2019). Hereafter build on these relaxation ideas in the EEG setting.
Background on probabilities and magnitudes relaxation Concerning probabilities, equation (3) is relaxed using a Relaxed Bernoulli random variable (Maddison et al., 2017) as in Hataya al. (2020) and Li al. (2020) (ef. Appendix for further details). As for magnitudes, while some operations don't depend on any magnitude parameter, most of the augmentations described in section Section do and are not differentiable with respect It is argued in Hataya et al. (2020) that using simple ttroight-through gradient estimator (Bengio et al., 2013) is enough to face this difficulty (i.e., approximating the gradient of (();4) w.r.t p by 1). In practice, we found that this approach alone did not allow to properly transmit the gradient loss information to tune the magnitudes. For this reason, preferred to carry out caso-by-case relaxation of each operations considered, which is detailed in Appendix B.
Novel operations relaxation Operations composing subpolicies also need to be selected discrete set. For this, Faster AA replaces the sequence of operations by sequence of

---

Published as a conference paper at ICLR 2022
stages fOx: l -1,1,........... 1....,KK, K), which are convex combination of all operations:
No (x(X= - n=1
(6)
where wh denote the weights vector stage k. These weights are passed through a softmax activation On, so that, when parameter is small, (wx) becomes onehot-like vector. We used the same type of architec- ture, but replaced the softmax dn by straight-through Gumbel-softmax distri- bution (Jang et al., 2017) parametrized by {w As shown in experiments of Sec- tion 6, this allows to gain in efficiency, as we only sample one operation at each for- ward pass and do not need to evaluate all operations each time. Furthermore, given gradi-
Algorithm 1: (C)ADDA
Input: O, Datasots Duraius Dalidd
Trainable policy Ta: Model 0
Result: Policy parameters a while not converged do
// compute the unrolled model
98 = [( (Duaia)) bbakwardddd
0' = 1 - Ego
that the original Gumbel-softmin ents are biased, we use the unbiased RE- LAX gradient estimator (Grathwohl et al., 2018). The same idea is used in DADA (Li et al., 2020), except that they consider different policy architecture where they sample whole subpolicies instead oper- ations within subpolicies. These architec- ture choices are compared in our ablation study in Section 6 and Appendix E.
// Eatimate Ca Tef((0'Draise) [Drassa)
To L( Dvalid) ). backward
9 L(e + cgè Ta (Deraia) )) backward(()
9a L(e - Ege Ta Derai))) backkarddaa
9a Ie (9 g%)
// Update Policy parameters a
0 a {gaa
1/ Update the model parameters 0
90 (aaaT((aaa backward
(Puriu))
0 = Ego
end
5.2 POLICY OPTIMIZATION
While Faster AA casts a surrogate density matching problem (2), which is easier and faster to solve then (1), Tian et al. (2020) presents empirical evidence suggesting that these metrics are not really correlated. Hence, propose to tackle directly the bilevel optimization from (1) as done in DADA and DARTS.
Let be the vector grouping all the parameters of continuously relaxed policy model Ta (Section 5.1). We carry alternating optimization steps of the policy parameters a and the model parameters & described in Algorithm 1. In order to estimate the augmentation policy gradient, we approximate the lower-level of (1) by a single optimization step:
VaL(0" (Dania) (''(
with 0' = 0 - Co (
(7)
where & denotes the learning rale. By applying the chain rule Equation (7) we gel:
V VaL(O') = - - (Drmin))) (D L(0' D
(8)
= V
((t( (Diraim) Va Ta (a(
(9)
2c
where c is a small scalar and 8+ + (V
The sccond line (9) corresponds a finite difference approximation of the Hessian-gradien product.
6 EXPERIMENTS ON EEG DATA DURING SLEEP
Datasets We used the public dataset MASS - Session 3 (O'reilly et al., 2014). It corresponds to 62 nights, each one coming from a different subject. Out of the 20 available EEG channels, referenced with respect to the A2 electrode, used 6 (C3, C4, F3, F4, O1, 02). We also used the standard sleep Physionet data (Goldberger et al., 2000) which contains 153 recordings from 83 subjects. Here two EEG derivations are available (FPz-Cz and Pz-Oz). For both datasets, sleep stages were annotated according to the AASM rules (Iber et al., 2007). The E.G time series were first lowpass filtered at. 30 Hz (with 7 Hz transition bandwidth) and
7

---

Published as a conference paper at ICLR 2022
Sensors transforms
Frequency transforms
Time transforms
Channel Dropout
Bandstop Filter
++- Time Masking
Channel Shuffle
FT Surrogate
Time Reverse
Rotation Z-axis
Frequency Shift
White Noise
Relative improvement
Sign Flip
0.2
0.0
0.0
0.0
Training set fraction
Training set fraction
Training set fraction
Figure 3: Median performance gains obtained by individual augmentation strategies on the Physionet dataset while increasing the train set size. Results are relative improvements com- pared to the baseline without any augmentation. Two frequency transforms (FT surrogate and frequency shift) as well as time reverse lead to the best performance.
standardized, For MASS they were resampled from Hz to 128 Hz, while the Physionet dataset was kept at 100 Hz. Further experimental details can be found in Appendix D.
Manual exploration All FEG data augmentation techniques were first tested individually on the two datasets without an automatic search strategy. The Physionet dataset was split in 5 folds with 16 subjects for Physionct and 12 subjects for MASS in a test set. Among the training folds, data were split in 80/20 randomly to obtain a training and a validation set. To assess the effect of augmentation at different data regimes, the training set was sequentially subset using a log2 scale (with stratified splits). All augmentations tested had 0.5 probability and manually fine-tuned magnitude (ef. Section G.2). Results on Physionet are presented on Figure 3, while similar plots for MASS can be found in the appendix (Figure G.8). As expected, augmentation plays major role in the low data regime, where it teaches invariances to the model which struggles to learn them from the small amount of data alone. Transforms like surrogate, frequency shift and time reverse lead to up to 20% performance improvement on the test set for Physionet and 60% for MASS in extremely low data regimes. Surprisingly, rotations and time masking do not scem to help a lot.
More efficient gradient-based search As commonly done (Cubuk et al., 2019; Ho el al., 2019; Lim et al., 2019; Halaya et al., 2020), we considered policies of size L 5, made of subpolicies of length K = containing No = 12 operations (cf. Appendix D)- The MASS dataset. was used for this experiment. Both the training and validation sets consisted of 24 nights each, and the test set contained 12 nights. For each method, we stopped the search every given number of steps (2 epochs or 5 samplings), used the learned policy to retrain from scratch the model (leading to a point in Figure 4) and resumed the scarch from where stopped. For each run, when the final retraining validation accuracy improves compared to previous retraining, we report the new test accuracy obtained by the retrained model (otherwise, we keep the previous value). Figure 4 (a) shows that our novel automatic differentiable data augmentation method (ADDA) outperforms existing gradient- pradient-based approaches both in speed and final accuracy. In Figure F.4, a comparison with other gradient-free approaches in class- agnostic setting is also provided, where ADDA is shown to outperform the state-of-the-art in speed and accuracy.
Ablation study of differentiable architecture in the class-agnostic setting In order to better understand previous results, we carried out ablation study in the class-agnostic setting, where we sequentially removed from ADDA (green): the RELAX gradient estimator (red), followed by the Gumbel-softmax sampling (light blue). We see in Figure 4 (a) that RELAX is mainly responsible for the final accuracy increase, as removes the gradients' bias induced by the Gumbel-softmax sampling. We also clearly see from curves in red and light blue that replacing the softmax o, from the subpolicy stages (6) by a Gumbel- sampling is responsible for the considerable 4x speed-up. Note that the core difference
8

---

Published as a conference paper at ICLR 2022
(a)
(b)
Test balanced accuracy
0.835
0.830
0.825
DADA
Faster AutoAugment
ADDA
CW AutoAugment
0.820
ADDA RELAX
CW Fast AutoAugment
ADDA w/o GS sampling
CADDA
5
10
10
15
GPU hours of search
GPU hours of search
Figure 4: Median performance (over 5 folds) of different ADA strategies as a function of the computation time. (a) Class-agnostic setting: ADDA is 40% faster than Faster AA and reaches performance 0.6% higher. It also outperforms DADA by 0.6% accuracy, GPU hours earlier. (b) CW setting: CADDA outperforms gradient-free methods in this setting, as 5x faster than Autonugm and achieves higher performance than Fast Augnnngment.
between ADDA and DADA is the fact that the former samples operations within each subpolicy, and the latter samples whole subpolicies. Curves in green and dark blue show that ADDA converges faster, which means the first choice is more efficient. This might be due to the fact that our architecture expresses the same possibilities with L x K x No 120 weights wk. which in our case less than the (No) 144 weights DADA. Most importantly, note that during the training DADA will sample and update the probabilities and magnitudes of subpolicies with higher weights more often, while ADDA keeps updating its subpolicies with equal probability. This allows ADDA to converge faster to 5 good subpolicies while DADA can get stuck with only one or two strong ones.
Efficient search in class-wise setting Figure (b) compares the best performing gradient- based approach the class-wise setting, namely CADDA, against state-of-the-art gradient- free methods (AutoAugment and Fast AutoAugment) optimized with TPE (Bergstra et al., 2011), as implemented in optuna (Akiba et al., 2019). CADDA achieves top performance while being significantly faster than AutoAugment. However, one can observe this CW setting that CADDA docs not improve over ADDA in the class-agnostic case. This illustrates the difficulty of learning CW policies due to the dimensionality of the search space. We also sypolhesize that this could reflect the difficully of the simple CNN model considered here to encode the complex invariances promoted by the CW augmentations.
CONCLUDING REMARKS
Our work explores the problem of automatic data augmentation beyond images which is still rarely considered in the literature. We provided novel transforms for EEG data, and state-of-the-arl search algorithm - called (C)ADDA to address this question. This method yields very promising results for sleep stage classification, with up to 40% speed up and superior accuracy compared to existing gradient-based methods in a standard setting, Motivated by the possible impact of CW policies that we illustrated empirically, we proposed framework for the automatic search of such augmentations. Our work shows that gradient- based automatic augmentation approaches are possible and necessary in the CW setting due to the size of the scarch space. Finally, while CW does not provide the expected performance boost yel. we believe that this framework opens a novel avenue to improve the field of data. augment ation, in particular for neuroscience applications.
9

---

Published as a conference paper at ICLR 2022
ACKNOWLEDGMENTS AND DISCLOSURE OF FUNDING
This work was supported by the BrAIN grant (ANR-20-CHIA-00066) It was also granted accoss to the HPC resources of IDRIS under the allocation 2021-AD011012284 and 2021- AD011011172R1 made by GENCI.
REFERENCES
Takuya Akiba, Shotaro Sano, Toshihiko Yanase, Takeru Ohta, and Masanori Koyama. Optuna: A next-generation hyperparameter optimization framework. In Proceedings of the 25rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, 2019.
Martin Arjovsky, Soumith Chintala, and Leon Bottou. Wasserstein Generative Adversarial Networks.
In Proceedings of the 34th International Conference on Machine Learning, volume 70 of Proceedings of Machine Learning Research, pp. 214-20 223, 2017.
Yoshua Bengio, Nicholas Lêonard, and Aaron C. Courville. Estimating or Propagating Gradients Through Stochastic Neurons for Conditional Computation. CoRR, 2013.
James S Bergstra, Rémi Bardenet, Yoshua Bengio, and Balázs Kégl. Algorithms for Hyper- Parameter Optimization. In Advances in Neural Information Processing Systems, volume 24, pp. 9, 2011.
G. Bouallegue and R. Djemal. EEG data augmentation using Wasserstein GAN. 2020 20th Inter- national Conference on Sciences and Techniques of Automatic Control and Computer Engineering (STA), pp. 40-45, 2020. ISSN: 2573-539X.
Stanislas Chamnon, Mathieu Galtier, Pierrick Arnal, Gilles Wainrib, and Alexandre Grauforr. A deep learning architecture for temporal sleep stage classification using multivariate and multimodal time series. IEEE Transactions on Newral Systems and Rehabilitation Engineering, 26(4):758-766 769, 2018.
Shuxiao Chen, Edgar Dobriban, and Jane H. Lee. A lation. In Advances in Neural Information Processing Systems (NeurIPS). 2020a.
Framework for Data Augmen-
Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Everest Hinton. A simple framework for contrastive learning of visual representations. In Proceedings of the 37th International Conference on Machine Learning (ICML), 2020b.
Joseph Y. Cheng, Hanlin Goh, Kaan Dogrusoz, Oncel Tuzel, and Erdrin Azemi. Subject-Aware Contrastive Learning for Biosignals. NXt::2007.0887,, 2020.
Ekin D. Cubuk, Barret Zoph, Dandelion Mane, Vijay Vasudevan, and Quoe V. Le. Augment: Learning Augmentation Strategies From Data. In IEEE/CVF Conference on Computer Vision and Pallern Recognition (CVPR). IEEE, 2019.
Ekin D. Cubuk, Barret Zoph, Jonathon Shlens, and Quoc V. Le. Randaugment: Practical automated data augmentation with reduced search space. In IEEE/ /CVF Conference on Computer Vision and Patfern Recognition Workshops (CVPRW), pp. 3008 3017. IEEE, 2020.
Olivier Deiss, Siddharth Biswal, Jing Jin, Haoqi Sun, M. Brandon Westover, and Jimeng Sun. HAMLET: Interpretable Human And Machine co-LEarning Technique. arXi::1803.09700 2018.
Elizabeth Fons, Paula Dawson, Xiao-Jun Zeng, John A. Keane, and Alexandros Tosifidis. Adaptive weighting scheme for antomatic time-series data augmentation. CoRR, 2021.
Lukas A.W. Gemein, Robin T. Schirreesserr, Patryk Chrabaszez, Daniel Wilson, Joschka Boedecker, Andreas Schulze-Bonhage, Frank Hutter, and Tonio Ball. Machine-learning.. based diagnostics of eeg pathology. Neurolmage, 120:1170 2020.
Ary I. Goldberger, Luis AN Amaral, Leon Glass, Jeffrey M Hausdorff, Plamen Ch Ivanov, Roger G Mark, Joseph E Mietus, George B Moody, Chung- Peng, and Eugene Stanley. PhysioBank, PoysioToolkit, and PhysioNet: components of a new research resource for complex physiologic signals. Circulation, 101(23):e215-o220 2000.
Alexandre Gramfort, Martin Luessi, Eric Larson, Denis A. Engemann, Daniel Strohmeier, Christian Brodbeck, Roman Goj. Mainak Jas, Teon Brooks, Lauri Parkkonen, and Matti S. Hämäläinen. MEG and EEG data analysis with MNF-Python. Frontiers Neuroscience, 7(267):1 13,, 2013.
10

---

Published as a conference paper at ICLR 2022
Will Grathwohl, Dami Choi, Yuhuai Wu, Geoff Roeder, and David Duvenaud. Backpropagation through the Void: Optimizing control variates for black-box gradient estimation. In International Conference on Learning Representations (ICLR), 2018.
Kay Gregor Hartmann, Robin Tibor Schirmeesterr, and Tonio Ball. REG-GAN: Generative adver- sarial networks for electroencephaloraahi (EEG) brain signals. arXi:: 1806.0066000 306.01875, 2018.
Ryuichiro Hataya, Jan Zdenek, Kazuki Yoshizoe, and Hideki Nakayama. Faster AutoAugment: Learning Augmentation Strategies Using Backpropagation. In Computer Vision - ECCV 2020. Springer International Publishing, 2020.
Søren Hauberg. Oren Freifeld, and Anders Boesen Lindbo Larsen. Dreaming More Data: Class- dependent Distributions over Diffeomorphisms for Learned Data Augmentation. In Artificial Intelligence and Stalislies, pp. 342 350, 2016.
Daniel Ho, Eric Liang Ion Stoica, Pieter Abbeel, and Chen. Population Based Augmentation: Efficient Learning of Augmentation Policy Schedules. In International Conference on Machine Learning (ICML), 2019.
C. Iber, S. Ancoli-Israel, A. Chesson, and S. F Quan. The AASM Manual for the Scoring of Sleep and Associated Events: Rules, Terminology and Technical Specification, 2007.
Eric Jang, Shixiang Gu, and Ben Poole. Categorical Reparameterization with Gumbel-SSoftaxx In International Conference Learning Representations, 2017.
Ziyu Jia, Youfang Lin, Jing Wang. Xuehui Wang, Peiyi Xie, and Yingbin Zhang. Salientsleepnet: Multimodal salient wave detection network for sleep staging. In International Joint Conference on Artificial Intelligncee (IJCAI), pp. 2614-2620, 2021.
Diederik Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. International Conference on Learning Representations (ICLR), 2015.
Mario Michael Krell and Su Kyoung Kim. Rotational data augmentation for electroenephalloraphic data. In 2017 39th Annual International Conference of the IEEE Engineering in Medicine and Biology Society (EMBC), pp. 471-474. IEEE, 2017.
Alex Krizhevsky, Tlya Sutskever, and Geoffrey F. Hinton. ImageNet classification with deep convolutional neural networks. In Advances newral information processing systems (NeurIPS), 2012.
Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Stadient-based learning applied to document recognition. Proceedings of the IEEE, 86(11))2278-2322 1998.
Yonggang Li, Guosheng Hu, Yongtao Wang, Timothy Hospedales, Neil M. Robertson, and Yongxin Yang. DADA: Differentiable Automatic Data Augmentation. In ECCV, 2020.
Sungbin Lim, Ildoo Kim, Taesup Kim, Chiheon Kim, and Sungwoong Kim. Fast AutoAugment. In Advances in Neural Information Processing Systems (NeurIPS), 2019.
Chen Lin, Minghao Guo, Chuming Li, Xin Yuan, Wei Wu, Junjie Yan, Dahua Lin, and Wanli Ouyang. Online Hyper-Paramenn Learning for Auto- Angmmenttntnn Strategy. In 2019 SEE//VE International Conference on Computer Vision (ICCV) pp. 6578-6587. IEEE, 2019.
Hanxiao Lin, Karen Simonyan, and Yiming Yang. DARTS: Differentiable Architecture Search. In International Conference on Learning Representations (ICLR), 2019.
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 (ICLR), 2017.
Sébastien Marcel and Yann Rodriguez. Torchvision the Michine-Vision Package of Torch. Tn Proceedings of the 18th ACM International Conference on Mullimedia, pp. for Computing Machinery, 2010.
Association
Mehdi Mirza and Simon Osindero. Conditional Generative Adversarial Nets. arXiv:1411.1188, 2014.
Mostafa Mohsenvand, Mohammad Rasool Tzadi, and Pattie Maes. Contrastive Representation Learning for Filetroenncephalogram Classification. In Machine Learning for Health, 2020.
11

---

Published as a conference paper at ICLR 2022
Christian O'reilly, Nadia Gosselin, Julie Carrier, and Tore Nielsen. Montreal archive of sleep studies: an open-access resource for instrument benchmarking and exploratory research. Journal of sleep research, 23(6):228-635 2014.
Mathias Perslev, Michael Hejselbak Jensen, Sune Darkner, Poul Jorgen Jennum, and Christian Igel. U-time: fully convolutional network for time series segmentation applied to sleep staging. Advances in Neural Information Processing Systems (NeurIPS), 2019.
Mathias Perslev, Sune Darkner, Lykke Kempfner, Miki Nikolic, Poul Jørgen Jenmum, and Christian 1gel. U-sleep: resilient high-frequency sleep staging. NPJ digital medicine, 4(1):1-12, 2021.
Richard S. Rosenberg and Steven Van Hout. The American Academy of Sleep Medicine Inter-scorer Reliability Program: Sleep Stage Scoring. Journal of Clinical Sleep Medicine : JCSM Official Publication of the American Academy of Sleep Medicine, 9(1):81-87, 2013.
Yannick Roy, Hubert Banville, Isabela Albuquerque, Alexandre Gramfort, Tiago H Falk, and Jocelyn Faubert. Deep baaning-based electroenceehalooraphy analysis: a systematic review. Journal of Neural Engineering, 1615)0051001 2019.
Aaqib Saeed, David Grangier, Olivier Pietquin, and Neil Zeghidour. Learning From Heterogeneous Eeg Signals with Differentiable Channel Reordering. In ICASSP 2021 2021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pp. 1255 1259, 2021. ISSN: 2379-190X.
Robin Tibor Schirrmeister, Jost Tobias Springenberg, Lukas Dominique Josef Fiederer, Martin Glasstelter, Katharina Eggensperger, Michael Tangermann, Frank Hutter, Wolfram Burgard, and Tonio Ball. Deep learning with convolutional neural networks for EEG decoding and visualization. Human Brain Mapping, 2017.
John Schulman, Nicolas Heess, Theophane Weber, and Pieter Abbeel. Gradient Estimation Us- ing Stochastic Computation Graphs. In Advances in Newral Information Processing Systems (NewrIPS), 2015.
Justus T. C. Schwabedal, John C. Snyder, Ayse Cakmak, Shamim Nemati, and Gari D. Clifford. Addressing Class Imbalance in Classification Problems Noisy Signals by using Fourier Transform Surrogates. Xiv::11806. 08675, 2019.
Patrice Y. Simard, Dave Steinkraus, and John C. Platt. Best practices convolutional neural networks applied to visual document analysis. In International Conference on Docament Analysis and Recognition, volume 3, pp. 958-963, 2003.
Keyu Tian, Chen Lin, Ming Sun, Luping Zhou, Junjie Yan, and Wanli Ouyang, Improving Auto- Auguent via Augmentation-Wer Wise Weight Sharing, In Advances in Neural Information Processing Systems, volume 33, pp. 19088-19098, 2020.
Laurens van der Maaten, Minmin Chen, Stephen Tyree, and Kilian Q Weinberger. Learning with Marginalized Corrupted Features. In International Conference on Machine Learning (ICML), volume 28. PMLR, 2013.
Fang Wang, Sheng-hua Zhong, Jianfeng Peng, Jianmin Jiang, and Yan Liu. Data Augmentation for EEG-Based Emotion Recognition with Deep Convolutional Neural Networks. In MultiMedia Modeling, volume 10705, pp. 82-93. Springer International Publishing, 2018. Series Title: Lecture Notes in Computer Science
Ronald Williams. Simple statistical gradient- following algorithms for connectionist reinforcement learning. Machine learning, (13-4):229-256 1992.
Larry S Yaeger, Richard F Lyon, and Brandyn J Webb. Effective Training of a Neural Network Character Classifier for Word Recognition. In Advances in neural information processing systems, volume 9, pp. 807-816, 1996.
Zhong Yin and Jianhua Zhang, Cross-session classification of mental workload levels using EEG and an adaptive deep learning model. Biomedical Signal Processing and Control, 33:30 17, 2017.
Xinyu Zhang, Qiang Wang, Jian Zhang, and Zhao Zhong. Adversarial AutoAugment. In International Conference Learning Representations (ICLR), 2020.
12

---

Published as a conference paper at ICLR 2022
A DETAILS ON OPERATIONS RELAXATION
Hereafter are some general explanations concerning the continuous relaxation augmentation operations.
A.1 RELAXATION REGARDING PROBABILITIES
Concerning the probabilities, equation (3) can be rewritten as follows:
O(X:p, 60(X: + (1- (1-b)X
(10)
where b is sampled from a Bernoulli distribution with probability p. As the Bernoulli distribution is discrete, equation (10) can be made differentiable with respect p by using a Relaxed Bernoulli random variable (Maddison et al., 2017), i.e,, by reparametrizing the distribution as continuous function depending on p and on uniform random variable (Schulman et al., 2015).
A.2 RELAXATION REGARDING MAGNITUDES
As for magnitudes, while operations don't depend any magnitude parameter, most of the augmentations described in section Section do and are not differentiable with respect to it. It is argued in Hataya al. (2020) that using a simple trriight-troough gradient estimator (Bengio et al., 2013) is enough to face this difficulty (i.e., approximating the gradient of ((:; w.r.t μ by 1). In practice, we found that this approach alone did not allow to properly transmit the gradient loss information to tune the magnitudes (ef. Section A.3). For this reason, we preferred to carry out a case-by-case relaxation ion of each operations considered (ef. Appendix B). Overall, the same relaxation principles were used in most of them:
1. when y is used to set some sampling operation, a pathwise gradient estimator used (Schulman el al., 2015), just as for p in Eq. (10);
2. when some masking is necessary, vector indexing is replaced by element-wise multi- plications between the transformed vector and smooth mask built using sigmoid functions;
3. the Shrough estimator only used to propagate the gradient through the permutation operation in channel shuffle.
A.3 FURTHER EXPLANATION CONCERNING STRAIGHT THROUGH MAGNITUDE GRADIENT ESTIMATOR
In order to validate the continuous relaxation of each augmentation operation described in Appendix B, we tried to fil the identity, i.e., we minimized the mean squared error wetween augmented and unchanged batches of EEG signals:
min ||X O():p. p.P
This allowed us to realize that using a simple straight-thnne through estimator suggested by Hataya al. (2020) was not enough learn good magnitude parameters. Indeed, we observed with many different learning rates that would be modified but would not converge to when was fixed. This motivated us to propose our own relaxation described in Section 5.1 and Appendix B.
B IMPLEMENTATION OF EEG AUGMENTATIONS
In this section we review the EEG augmentation that have been proposed and describe their prccise implementation, including their case-by-case relaxation mentioned in Appendix A. Their implementation in python is provided the supplementary matorial (braindecode-vijy folder).
The most basic form of data augmentation proposed the addition Gaussian white noise to EEG signals (Wang et al., 2018) to derived features (Yin & Zhang, 2017). This
13

---

Published as a conference paper at ICLR 2022
transformation modifies the waveform shapes in the time domain, while moderately distorting the proportions of different frequencies in the signals spectra. It simply adds the same power augmentation for tasks where the
to all frequencies equally. It should hence work predictive information is well captured by frequency-bands power ratios, as used for pathology detection in Gemein et al. (2020).
Another type of augmentation time related transformations, such as time shifting and time masking (Mohsenvand et al., 2020) (a.k.a. time cutout (Cheng et al., 2020)). Both aim to make the predictions more robust, the latter supposing that the label of an example must depend on the overall signal, and the former trying to teach the model that misalignment between human-annotatio annotations and events should be tolerated up to some extent.
Similarly, transformations acting purely in the frequency domain have been proposed. Just as t time masking zeros-out small portion of the signal in the time domain, narrow bandstop filtering random spectra positions (Cheng et al., 2020; Mohsenvand ct al., 2020) attempts to prevent the model from relying on single frequency band. Another interesting frequency data augmentation is the FT-surrogate transform (Schwabedal et al., 2019). It consists in replacing the phases of Fourier coelficients by random numbers sampled uniformly from [0, 2T). The authors of this transformation argue that EEG signals can be approximated by linear stationary processes, which are uniquely characterized by their Fourier amplitudes.
Another widely explored type of EEG data augmentation are spatial transformations, acting sensors positions. For example, sensors are rotated and shifted in Krell & Kim (2017), to simulate small perturbations on how the sensors cap is placed on the head. Likewise, the brain bilateral symmetry is exploited in Deiss et al. (2018), where the left and right-side signals are switched. Sensors cutout (i.e., zeroing-out signals of sensors in a given zone) is studied in Cheng al. (2020), while Saced et al. (2021) propose to randomly drop or shuffle channels to increase the model robustness to differences in the experimental setting. Mixing signals from different examples has also been suggested in Mohsenvand et al. (2020).
B.1 FREQUENCY DOMAIN TRANSFORMS
Frequency Shift To shift the frequencies in EEG signals, we carry time domain modulation of the following form:
FrequencyShift(e)() Re (za(t) exp(2riAft)).
(11)
with To = being the analytic signal corresponding to x, where H denotes the Hibert transform. At each call, a new shift Af is sampled from a range linearly set by the magnitude μ,, where μ ==1 corresponds to the range [0 5Hz). This value was chosen after carrying data exploration, based on the observed shifts bet ween dataset.
beew subjects in the Physionet
Given that Equation 11 is completely differentiable on Af. we only had to relax the sampling (using the pathwise derivatives trick (Schulman al., 2015)) make differentiable w.r.t μ.. More prociscly, we define Af = fmax u, where fmax = 5y is the frequencies range upper- upper-bound bound and u is sampled from a uniform distribution over [o, 1).
FT Surrogate In this transform, we compute the Fourier transform of the signal F (x) (using fft) and shift its phase using random number Ai::
F (FTSurrogate(:) [S] = F [S] exp(2riAx)).
We then transform it back to the time domain. This reproduced from the authors (Schwabedal et al., 2019) original code.? 2 However, our implementation we added a magnitude parameter setting the range in which random phases sampled [0, Pmax), with Pmax = 2n when μ 1.
The procedure used to make this transform differentiable is very similar to frequency shift, 3 with Aş parametrized as Pmax u and Pmax 2xp..
Chttps://github..o.. http:/g.tthhhommmmooo caaiiub.coocciiffollaa. /clffoordabb/sleege /wlppp-cooooootiionttttt
3t. requires using Pytorch version 1.8, which now supports fft differentiation.
14

---

Published as a conference paper at ICLR 2022
Bandstop Filter This transform was implemented using the FIR notch filter from MNE- Python package (Gramfort et al., 2013) with default parameters. The center of the band filtered out is uniformly sampled between 0 Hz and the Nyquist frequency of the signal. Here, the magnitude μ is used to set the size of the band, with = corresponding to Hz. This value was chosen after some small experiments, where observed that larger bands degraded systematically the predictive performance on Physionet. This transformation was not relaxed (and hence not available the gradient-based automatic data augmentation scarchers).
B.2 TEMPORAL DOMAIN TRANSFORMS
Gaussian Noise This transform adds white Gaussian noise with standard deviation set by the magnitude μ.. When μ = 1, the corresponding standard deviation was 0.2. Larger standard deviations would degrade systematically the prodictive performance in our manual exploration on Physionet. The Gaussian noise implementation is straight forward. It's relaxation only included the use of pathwise derivatives for the sampling part: we sample the noise from a unit normal distribution and multiply it by the standard deviation o = 0.2
Time Masking In this operation, we sample a central masking time lent with uniform probability (shared by all channels) and smoolhly set. to zero window between bene + A1/2, where At is the masking length. The latter is set by the magnitude μi, where μ corresponds to At 1s. This value was chosen because it corresponds roughly to the length of important sleep-related events.
The sampling part of the operation was made differentiable as above. Masking computed by multiplying the signal by a function valued in [0, 1], built with two opposing steep sigmoid functions
1
+
(1)
+ exp (-A(t - leut = ))
where À was arbitrarily set to 1000.
B.3 SPATIAL DOMAIN TRANSFORMS
Rotations
In this transform, we use standard sensors positions from 10-20 montage (using the mne. channels. make_akeeeeeeaee www.mmaaaeeeeaeeee sttesssttaaddddarree _oottae function from MNE-Python package (Gramfort et al., 2013)). The latter are multiplied by rotation matrix whose angle is uniformly sampled between =1/max The value the maximum angle Vmax is determined by the magnitude μ. where
corresponds to radian (value used in Krell & Kim (2017); Cheng et al. (2020)). Signals corresponding to each channel are then interpolated towards the rotated sensors positions. While Krell & Kim (2017); Cheng et al. (2020) used radial basis functions to carry the interpolation, we obtained better results using spherical interpolation, which also made more sense in our opinion.
The only part that needed to be relaxed to allow automatic differentiation was the rotation angle sampling, which was done as before, with the angle A& parametrized as v'max (2u 1), a uniform random variable in [0, 1] and Vmax = u.
Channel Dropout
Here, each channel is multiplied by random variable sampled from relaxed Bernoulli distribution (Maddison et al., 2017) with probability 1 1- μ4, where μ the magnitude. This allows to set the channel to 0 with probability and to have a differentiable transform.
Channel Shufflc
In this operation, channels to be permuted are selected using relaxed Bernoulli variables as in the channel dropout, but with probability 4 instead of - μ.. The selected channels are then randomly permuted. As the permutation operation necessarily uses the channels
15

---

Published as a conference paper at ICLR 2022
indices, it is not straighttffrward to differentiate it, which is why we used a straight- through estimator here to allow gradients to flow from the loss to the magnitude parameter μ.
C ILLUSTRATION OF THE USEFULNESS OF CLASS-WISE AUGMENTATION ON MNIST
Motivation In order to illustrate the potential of CW augmentation, we present in this section a simple example using the MNIST dataset (LeCun et al., 1998). Intuitively, some common image augmentation operations such as horizontal flips or rotations with large angles should not be helpful for handwritten digits recognition: if you rotate a 9 too much, it might be difficult to distinguish it from a 6. However, some digits have more invariances than others. For example, O's and 8's are relatively invariant to vertical and horizontal flips, as well as to 180 degrees rotations. We used this framework to compare a naive approach of automatic data augmentation search both in a standard and in a CW setting.
Algorithm For simplicity, we used a random search algorithm to look for augmentation policies, with operations' parameters discretized over grid. More preciscly, cach new candidate subpolicy sampled by the search algorithm is used to train the model from scratch, before evaluating it on the validation set. In terms of search space and search metrie, this is equivalent to what is done in AutoAugment (Cubuk el al., 2019), although the reinforcement learning algorithm is replaced by random sampling.
Search space Let Np, N₁ and No denote the number of possible probability, magnitude values and operations in our setting. The search space of both standard and CW policies is potentially huge: (Nv, x N₂, x No)=xxx>>)) [D), where the number of classes [Y] is replaced by 1 in the standard case. Given the simplicity of the algorithm used, we tried to reduce the search space as much as possible. Hence, we only considered subpolicies of length K (a single operation) and restrained our problem to the classification of 4 digits only: 4,6, 8 and 9. A pool of four transformations that only depend on a probability parameter (no magnilude) was used in the search: horizontal and vertical flip, as well as 90 and 180 degrees rotation croutte-clockwise))
Despite this significant simplification, the search space size for policies made of L = 5 subpolicies is still immense: around 10 for standard policies and 1.2 x 1024 for CW policies. For this reason, 20,000 trials were sampled in both cases. As additional bascline, we also trained the same model without any type of data augmentation.
Experimental setting After the 4-class reduction, the MNIST training set was randomly split into training set containing 1000 images per class and validation set of 3000 images per class. The reduced MNIST test set used to evaluate the final performance has 1000 images per class, the original one. All transforms were implemented using torchvision (Marcel & Rodriguez, 2010). We used the LeNet-1 architecture (LeCun et al., 1998) for the classifier. It was trained using batches of 64 images and Adam optimizer (Kingma & Ba, 2015) with an initial learning rate of 2 x 10-3, 31 = 0.9, B2 = 0.999 and no weight decay. Trainings had maximum number of 50 epochs and were carly-stopped with patience of 5 epochs. The code that was used to generate this plots are part of the supplementary material (mnist folder).
Results As seen on Figure C.1, random search converges to the identity policy (no augmen- tation). This was expected as none of the available operations describe an invariance shared by all four digits. From Figure C.1-right we see that the CW random search does not find a good augmentation for digits 4 and 6 as well. Yet, it is able to recover that digit 8 is invariant to horizontal flip. Interestingly, 90 degree rotation of digit is also selected with a small probability. This can be understood, as some people might draw the 9's leg more horizontally than others, so that rotating up to 90 degrees counter-clockwise still preserves in some cases the picture semantics. Figure C.1-left shows that the CW algorithm can find interesting policies in such a constrained setting, but also that it can outperform the baselines. Yet, this happens only after 10,000 trials.
16

---

Published as a conference paper at ICLR 2022
1.0
All classes
0
0.8
accuracy
95.5
0
0
0
1
Class
0.6
0
0
0
95.0
0.25
0.75
Standard setting
0.2
Class-wise setting
9
0.05
0.96
94.0
No augmentation
0.0
Har. Filp
Ver. Fllp
90 Rot.
180 Rot.
Idantity
100
10
10
10a
10*
Number subpolicies sampled
Figure C.1: (left) Test. accuracy obtained using the subpolicy with higher performance on validation set. (right) Probability of applying each operation in the best policy found (L = 5). First row corresponds to the standard setting and following rows to the CW setting.
This toy experiment suggests that looking for augmentation strategies depending on the label of the data being transformed can be relevant improve prediction performance, but also to help discovering some interesting invariances for the task considered. However, despite the extremely simplified setting used, the CW search took 14.4 GPU days (Tesla V100 SXM2). It becomes clear that a more efficient search strategy is required for real-world applications.
D EXPERIMENTAL SETTING SHARED ACROSS EEG EXPERIMENTS
In all EEG experiments, learning was carried using the convolutional network proposed in Chambon al. (2018). The architecture can be found on Table and was chosen as seemed like a good compromisc as a simple yet deep and relevant sleep staging architecture. The first layers (1-4) implements a spatial filler, computing virtual channels through a linear combination of the original inpul channels. Then, layers to 9 correspond to a standard convolutional feature extractor and last layers implement a simple classifier. More details can be found in Chambon et al. (2018). Other relevant and recent sleep staging architectures are Perslev et al. (2019; 2021); Jia et al. (2021).
Layer
flters
size
stride
Output dim.
Activation
1
Input
(C, T)
2
Reshape
(C, T. 1)
Conv2D
(C, 1)
(1,
Linear
4
Permute
(C, T, 1)
5
ConvaD
64 +
(1, 64)
(1, 1)
(C, T. 8)
Rehu
Maxpool2D
(1, 16)
(1, 16)
(C,
16, 8)
Conv2D
64)
(C,
16, 8)
Relu
8
Maxpool2D
(1, 16)
(1. 16)
(C, // 256, 8)
9
(C (T 256)
Dropout (50%)
(C
Dense:
(C
250
Softmax
Table 1: Detailed architecture from Chambon et al. (2018), where C is the number of F.G channels and T' the time series length.
The optimizer used to train the model above was Adam with a learning rate of 10-3 81 = 0. and 32 = 0.999. At most 300 epochs were used for training. Early stopping was implemented with patience of 30 epochs. For automatic search experiments, the policy learning rate & introduced in (7) was set to 5 x 10* based on a grid-search carried using the validation set. Concerning the batch size, it was always set to 16, except for CADDA, for which it was doubled to 32, which was necessary to stabilize its noisier gradients. The motivation for such small values to avoid memory saturation when training Faster AutoAugment
17

---

Published as a conference paper at ICLR 2022
and to preserve the stochasticity of the gradient descent in the learning curve experiments (Figures and G.8), even in very low data regimes.
used performance metric using the inverse of original class frequencies as balancing weights. The MyEn-yyhonn (Gramfort et al., 2013) and Braindecode software (Schirrmeister et al., 2017) data. Training was carried on single Tesla V100 GPUs. The No = 13 operations con- sidered were: time reverse, sing flip, FT surrogate, frequency shift, bandstop filtering, time masking, Gaussian noise, channel dropout, channel shuffle, channel symmetry and rotations around each cartesian axis. In automatic search experiments, bandstop filter was not included in the differentiable strategies (Faster AA, DADA, ADDA and CADDA) because we did not. implement differentiable relaxation of
Balanced accuracy
used to preprocess and learn the EEG
E ARCHITECTURE DETAILS AND COMPARISON BETWEEN ADDA, DADA AND FASTER AA
Possible operations:
ADDA
Faster AA
ONO
ADDA Stage
Faster AA Stage
Ox M
Ps
X
O2 (X)
O(X)
possibie N
X
O2
O
20
subpolicies
1-Pr X
SUNg
No
ONO
DADA
Subpolicy
Subpolicy
Subpolicy I
O
O
S Subpolicy 2
Subpolicy
Subpolicy t
X
X
Ô
T(XY
r(X
S Subpolicy No
Subpolicy L
Subpolicy L
wyg
ONo
No
Ô
Ô
uniform sampling
P. H, learnable parameters
sampling with log-probability
Figure E.2: Different differentiable policy structures of ADDA, DADA and Faster AA. DADA samples whole subpolicies according to learnable log probabilities, whereas ADDA and Faster AA sample from subpolicies with uniform probability. Also, while subpolicy are sequences of parametrized operations in DADA, their are made of stages in ADDA and Faster AA. In Faster AA stages, convex combination of all possible operations is computed. In ADDA, however, operations sampled with learnable log probabilities.
As depicted on Figure E.2, DADA policies will sample subpolicy according to Gumbel- softmax distribution paramotrizod by learnable weights w::
TDADA (X) = (X), with i Soaabbe--Sottmx(((...... (No)" w).
Each subpolicy ग; is just a sequence operations differentiable wrt its parameters (ef. Ap- pendix A). However, in ADDA and Faster AA, only predetermined number of L subpolicies
18

---

Published as a conference paper at ICLR 2022
considered and sampled uniformly:
TADDA 7s
with i ~~ u(fI....,,1
In this case, subpolicies 7. sequences of stages ÖR, described in equation (6). While these stages compute a convex combination all possible operations in Faster AA, using learnable weights mapped through a softmax function on, ADDA stages carry differentiable sample (i.e. on is exactly equal to for exactly one out of No in (6)). In this case, the weights correspond to the log probabilities of sampling each operation.
F COMPLEMENTARY AUTOMATIC DATA AUGMENTATION RESULTS ON EEG SLEEP STAGING
Class-wise policies selected by CADDA and other approaches
frequency shif shift
bandstop filter time masking Gaussian moiss no
channel dropout
channel shuffle
channel 5ymmetry
rotationz - axis
rotation y axis
rotationx-on xaiionx-ane axis
time reverse
sign flip FT surrogate
identity
10
AutoAugment
0.04 0.00 0.00 0.01 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.01 0.00
0.93
Fast AA
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.00
0.01
0.00
0.99
Faster AA
0.04 0.02
0.06
0.07
0.00
0.03
0.17
0.00
0.01
0.04
0.00
0.03
0.05
0.49
DADA
0.03 0.06
0.06
0.08
0.00
0.09
0.00
0.07
0.04
0.02
0.06
0.04
0.02
0.44
ADDA
0.04 0.03
0.05
0.09
0.00
0.06
0.04
0.04
0.02
0.04
0.01
0.05
0.07
0.45
10
CADDA
0.01 0.02
0.04
0.03
0.00
0.04
0.06
0.02
0.05
0.04
0.06
0.06
0.10
0.46
CADDA N1
0.03 0.05
0.05
0.02
0.00
0.09
0.02
0.02
0.02
0.07
0.05
0.03
0.04
0.53
CADDA N2
0.07 0.05 0.07
0.05
0.00
0.05
0.00
0.03
0.01
0.03
0.06
0.01
0.08
0.48
CADDA N3
0.05
0.00
0.03
0.05
0.04
0.02
0.02
CADDA REM
0.05 0.04 0.02 0.03 0.00 0.03 0.08
0.04
0.05
0.02 0.04
0.01
0.03
0.55
10
0
Figure F 3: Probability of applying each operation in the best policies obtained by the different search stralegies. For each method, probabilities of all subpolicies grouped. Meth based on differentiable augmentation policies discover relevant augmentation strategies such as time reverse, sign flip, surrogate etc. CADDA suggests that each class benefits differently from the different strategies.
19

---

Published as a conference paper at ICLR 2022
Complete comparison of gradient-based and gradient-free methods in the class- agnostic setting
0.835
Test balanced accuracy
RandomSearch
0.830
AutoAugment
Fast AutoAugment
0.825
Faster AutoAugment
DADA
ADDA*
0.820
0.0
2.5
5.0
7.5
10.0
12.5
15.0
17.5
20.0
GPU Hours of search
Figure F.4: Median performance obtained by different automatic data augmentation strategies as a function of the computation time. ADDA oulperforms the state-of-the-ard in speed and final accuracy in the class agnostic setting.
75% confidence interval
(a)
(b)
0.840
Test balanced accuracy
0.835
0.830
0.825
DIBIO
DADA
CW AutoAugment
0.820
Faster AutoAugment
CW Fast AutoAugment
ADDA
CADDA
2.5
7.5
10.0
12.5
5
10
15
GPU Hours of search
GPU Hours of search
Figure F.5: Median balanced accuracy (over folds) the test set of different ADA strategies as a function of the computation time. This figure is the same as Figure 4 with error bars representing 75% confidence intervals estimated with bootstrap.
20

---

Published as a conference paper at ICLR 2022
Macro Fi-score plots
0.810
Test macro F1
0.805
0.800
0.795
DADA
Faster AutoAugment,
19
ADDA
CW AutoAugment
0.790
ADDA w/o RELAX
CW Fast AutoAugment
ADDA wo GS sampling
CADDA
0.785
0.0
2.5
5.0
7.5
10.0
12.5
0.0
2.5
12.5 15.0 GPU Hours of search
5.0
7.5
10.0
GPU Hours of search
Figure F.6: Median macro Fi-score (over 5 folds) on the test set of different ADA strategies as a function of the computation time. (a) Class-agnostic setting: ADDA is 40% faster than Faster AA and leads to a final performance 0.5% higher. It also outperforms DADA by 1%. (b) CW setting: CADDA 5x faster than AutoAugment and achieves higher performance than gradient-free methods.
Impact of data regime density matching approaches
nights sleep
24 nights sleep
0.845
Test balanced accuracy
0.80
0.835
0.78
1B X X X
0.830
0.76
AutoAugment
0.825
AutoAugment
Faster AutoAugment
Faster AutoAugment
0.74
Fast AutoAugment
0.820
Fast AutoAugment
5
10
20
GPU Hours of search
GPU Hours of search
Figure F.7: Median performance obtained by different automatic data augmentation stralegies as a function of the comput ation ation time with and 24 nights of sleep for training and validation. With nights, Fast. Augoentment fails to learn relevant augmentation policies and not competitive against AutoAugment and Faster AutoAugment. This effect is mitigated with 24 nights, when the classifier is trained on sufficient data to be able to capture relevant invariances.
21

---

Published as a conference paper at ICLR 2022
G FURTHER MANUAL EXPLORATION DETAILS
G.1 MANUAL SEARCH RESULTS ON MASS DATASET
Sensors transforms
Frequency transforms
Time transforms
Channel Dropout
Bandstop Filter
Time Masking
Rotation Y-axis
FT Surrogate
Time Reverse
Rotation axis
Frequency Shift
White Noise
Relative improvement
Sign Flip
0.4
0.4
0.4
0.2
0.2
0.2
0.0
0.0
0.0
2-11
2
2-
21
2n
2-3
2-1
2
2-3
Training set fraction
Training fraction
Training fraction
Figure G.8: Median performance gains obtained by individual augmentation stralegies on the MASS dataset. Best transforms obtained on Physionet (cf. Fig. 3) give here consistent improvements, while sensors transformation like Channel Dropout are more relevant when using 6 channels. Here also using training data mitigates the need for data augmentation, although it still improves the predictive performance.
G.2 MAGNITUDES FINE-TUNING FOR MANUAL EXPLORATION
In this section we explain the fine-tuning of magnitudes used for the manual exploration results presented in Section 6.
first training with probability = 0.5 and magnitude μ = 0.5 was carried over the same training subsets in Figure 3 and Figure G.8. Then selected the subset where the effects of augmentation were maximized (2- times the original training set for both Physionet and MASS datasets). Finally, for each operation, we carried a grid-search over the magnitude parameter (with fixed probability 0.5) with the selected training subsets (over 5-folds, as deseribed in Scction 6). The result of the grir-scarch can be seen on Figure G.9 and Figure G.10.
22

---

Published as a conference paper at ICLR 2022
Frequency transforms
Balanced test accuracy improvement
transform
Bandstop Filter
Surrogate
0.4
Frequency Shift
0.3
0.2
0.0
Time transforms
Balanced test accuracy improvement
transform
0.06
Time Masking
White Noise
0.04
0.02
0.00
-0.02
-0.04
Sensors transforms
Balanced test accuracy Improvement
transform
0.10
Random Rotation X-axis
Random Rotation Y-axis
Random Rotation Z-axis
0.05
Channel Shuffle
Channel Dropout
0.00
-0.05
0.2
Magnitude
Figure G.9: Magnitudes grid-search results for Physionet dataset. Balanced accuracy values are relative to a training without any augmentation.
23

---

Published as a conference paper at ICLR 2022
Frequency transforms
Balanced test accuracy improvement
transform
1.25
Bandstop Filter
Surrogate
1.00
Frequency Shift
0.75
0.50
0.25
0.00
-0.25
Time transforms
Balanced test accuracy improvement
0.20
transform
White Noise
0.15
Time Masking
0.10
0.00
-0.05
-0.10
Sensors transforms
Balanced test accuracy Improvement
transform
Random Rotation X-axis
0.3
Random Rotation Y-axis
Random Rotation Z-axis
0.2
Channel Dropout
Channel Shuffle
0.1
-0.1
0.2
Magnitude
Figure G.10: Magnitudes grid-search results for MASS dataset. Balanced accuracy values are relative to a training without any augmentation.
24


Reviews:
[{"review_id": "wT3cV_t_ZAl", "reviewer": "Reviewer_jp1B", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 2, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "Strengths: \n\n1) The paper provides a strong foundation of related work and solid experiments to validate the improvement from their idea. \n2) The way of using AutoAugment in EEG data is interesting and novel. \n\nWeakness:\n\n1) This paper is very hard to follow. The writing will require significant reorganization. It seems Section 3-5 are all of their proposed methods, but it also contains a significant amount of content of former work. I think it would be really great to have a method/approach section to talk about the proposed method. Also, section 4 also includes some evaluation details, which makes me very confused to understand. Please cluster all the evaluation details into Section 6. I think the main contribution of this paper should be from section 5, please try to highlight it. \n\n2) There is only a little accuracy gain in this paper (1.4%). Could you please provide more justification for this? \n", "summary_of_the_paper": "THis paper proposes a special version of AutoAugment to search class-wise data augmentation policies for EEG data. The main contribution of this paper is a novel differentiable relaxation algorithm on EEG data (ADDA) that significantly efficiency of policy search. Through the EEG sleep staging task, the paper shows they achieved SOTA with 40% speed on efficiency and 1.4% accuracy increase. \n", "summary_of_the_review": "This is an interesting paper in machine learning and healthcare. The approach introduces novelty in ML and has a potential to broader healthcare applications. However, the paper requires more work to improve writing quality. ", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "4: All of the claims and statements are well-supported and correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}, {"review_id": "uBMlVN-DBu4", "reviewer": "Reviewer_EdsK", "summary": "", "questions": "", "limitations": "", "rating": 6, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "Strengths:\n1. The work done by authors in the field of data augmentation for EEG data is novel and interesting. The improvement achieved by these augmentations is significant and could be important for building robust models. Especially, the frequency shift augmentation can be important for building models that can overcome the domain-shift problem due to inter-subject variability. The proposed augmentations are also given high weights by the automatic algorithms (Fig. F.2) which are interesting.\n\n2. Authors' preliminary experiments on investigating the usefulness of class-wise augmentations are also interesting. As mentioned by the authors, the field is relatively less explored (even more so for EEG data). Hence, the first steps taken in this direction are significant.\n\nAreas of improvement:\n1. Authors shows experimental results only for two datasets which are not standard. To alleviate our concerns about the quality of computational experiments and to strengthen authors' claims, it would be great if the authors can provide results on standard datasets (Imagenet, SVHN, CIFAR-100, or CIFAR-10) and show an improvement over previous methods.\n\n2. Model architecture details are missing. It would be great if the authors can include these details. Additionally, previous works like DADA have shown that their method performed well irrespective of model architecture or downstream tasks. It would be great if authors can include additional experiments to show that their method also performs well for different model architectures and downstream tasks (classification, segmentation, object detection, etc.)\n\n3. As per the authors, the core difference between their method and DADA is that DADA only samples the whole sub-policies whereas they sample operations within each sub-policy. But, according to my quick overview of DADA, in addition to sampling whole sub-policy, they do sample operations within each sub-policy (see sections 3.2 and 3.4 of [DADA](https://arxiv.org/pdf/2003.03780.pdf)). It would be helpful for the readers if authors can concretely differentiate their method from DADA using mathematical equations for both methods. They can include it in the appendix. I think this would help to understand the novelties of (C)ADDA over DADA.\n\n4. Some other algorithms like PBA and OHL-AA are missing from the comparisons. I would encourage authors to include them to strengthen their claims. Additionally, instead of keeping Randomsearch in the appendix plot (Fig F.3), I would include it in the plot in the main text (Fig. 4(a)) so that readers can get some baseline reference. A related question, why was Fast AutoAugment (pink in Fig. F.3) not shown in the main plot? It has better performance in terms of computation time and accuracy than DADA.\n\n5. Since the difference in the performance of different methods is small (~1%), I would like to see 95% confidence intervals for the performance measure (by bootstrapping the test set).\n\n6. For CW methods, just like CW-FastAuto Augment and CW-Auto Augment, what happens if we implement CW-DADA? \n\n7. Fig 2. b shows improvements only for two augmentations, what happens for other augmentations? \n\n8. As mentioned in the strengths, although the idea of class-wise augmentation is interesting, CADDA does not outperform ADDA and many other methods. So should this paper be titled based on CADDA? Wouldn't it be misleading for the readers as they would expect to see a Class-wise algorithm that outperforms all other methods?", "summary_of_the_paper": "The paper proposes an automatic differentiable data augmentation algorithm for EEG data that outperforms existing methods. They also propose novel augmentations for EEG that help the model to train better in low-labeled data regimes. They also show preliminary results showcasing that class-wise augmentation can be better than class agnostic augmentations for EEG data.", "summary_of_the_review": "Although the paper has some great (but minor) contributions in terms of the novel augmentation for EEG data, there are still many aspects in which the paper can be improved. As per the current state of the paper, my recommendation would be a score of 5 (marginally below the acceptance threshold). If the authors address the above-mentioned concerns and strengthen their claims with additional experiments, I will be happy to update my score.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}, {"review_id": "JVoJvoWqa7d", "reviewer": "Reviewer_NPRR", "summary": "", "questions": "", "limitations": "", "rating": 5, "confidence": 3, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "Pros:\n\n+ This is an interesting work. The examples of object recognition and sleep staging are very intuitive and demonstrates the motivation of exploring the CW data augmentation approaches.\n\n+ The authors designed some data enhancement methods for EEG. The new EEG data augmentation **frequency shift** introduced in Section 3 makes sense, as Figure 1 illustrates the fact that applying a 0.5 Hz frequency shift transform to one subject can lead a power spectrum density more similar to another.\n+ The paper shows adequate experiments and provides detailed supplementary material.\n\nCons:\n\n+ It is mentioned that the three new EEG data augmentations, namely time reverse, sign flip and frequency shift, are operations acting on the time, space and frequency, respectively. But I'm confused about why sign flip can be categorized as a spatial operation. Please clarify it.\n\n+ Since data augmentation is usually employed to solve the class imbalance problem, which is a great challenge for sleep stage classification, macro- and micro-F1 score should also be presented in the performance comparison experiments.\n\n+ The performance of ADDA and CADDA are compared, which shows that CADDA does not improve over ADDA. But why the comparison of class-wise(CW) and class-agnostic(CA) settings of other baselines is not conducted? I wonder whether the CW setting of other methods can contribute to a better performance than the CA setting.\n\n+ It is mentioned that \"For each run, when the final retraining validation accuracy improves compared to previous retraining, we report the new test accuracy obtained by the retrained model (otherwise, we keep the previous value)\", but the 5th point of ADDA in Figure 4(a) is lower than the 4th point, which seems to be contradictive. Please clarify it.\n\n+ More recent methods, especially the ones work on time-series data augmentation (e.g. [1]), should be compared with the proposed method. \n\n+ Although the author focuses on solving problems in the field of data enhancement. But sleep staging is an important application of the author. I hope that the method proposed by the author can be compared with some of the latest sleep staging methods, such as [2] and [3].\n\n  [1] Fons E, Dawson P, Zeng X, et al. Adaptive Weighting Scheme for Automatic Time-Series Data Augmentation[J]. arXiv preprint arXiv:2102.08310, 2021.\n\n  [2] Perslev M, Jensen M H, Darkner S, et al. U-time: A fully convolutional network for time series segmentation applied to sleep staging[J]. arXiv preprint arXiv:1910.11162, NeurIPS, 2019.\n\n  [3] Jia Z, Lin Y, Wang J, et al. SalientSleepNet: Multimodal Salient Wave Detection Network for Sleep Staging[J]. IJCAI, 2021.\n\n\n", "summary_of_the_paper": "The work explores the problem of automatic data augmentation beyond images which is still rarely considered in the literature. The authors provided novel transforms for EEG data, and a state-of-the-art search algorithm.", "summary_of_the_review": "They propose a new differentiable relaxation of the problem. Some details of the evaluation and comparison of experiments need to be explained or clarified.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "2: The contributions are only marginally significant or novel.", "empirical_novelty_and_significance": "2: The contributions are only marginally significant or novel."}, "extra_text": {}}, {"review_id": "6ouZsgmcRvt", "reviewer": "Reviewer_18fi", "summary": "", "questions": "", "limitations": "", "rating": 8, "confidence": 4, "soundness": null, "presentation": null, "contribution": null, "strengths": "", "weaknesses": "", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "main_review": "- This paper investigates gradient-based automatic data augmentation algorithms amenable to class-wise policies with exponentially larger search spaces.\n\n- The idea of the proposed method, CADDA, is interesting. Indeed, the paper shows that the exploration of gradient-based search approaches allows to select policies more efficiently in a huge search space.\n\n- The novelty of the proposed method is on the novel operations relaxation and the estimation of the augmentation policy gradient.\n", "summary_of_the_paper": "This paper studies gradient-based automatic data augmentation algorithms amenable to class-wise policies with exponentially larger search spaces. It presents a method, called  CADDA, to address the problem of automatic data augmentation with application on EEG signals. The proposed method achieves good results for EEG sleep stage classification.", "summary_of_the_review": "The paper is clear and well presented. The idea of the proposed method seems interesting. The experimental results show the effectiveness of the proposed method. A supplementary material was given to show more detail and results.", "strength_and_weaknesses": "", "limitations_and_societal_impact": "", "review_text": "", "extra_scores": {"correctness": "3: Some of the paper’s claims have minor issues. A few statements are not well-supported, or require small changes to be made correct.", "technical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work.", "empirical_novelty_and_significance": "3: The contributions are significant and somewhat new. Aspects of the contributions exist in prior work."}, "extra_text": {}}]

Author rebuttal:

Meta-review: This paper is close to the borderline, but I think it is good enough that I recommend its acceptance. Although there were some problems raised by the reviewers, the authors managed to successfully address a majority of them. Having said that, I still recommend that the authors carefully analyze the reviews again and make sure that they incorporated reviewers' comments in the final version of the paper. A lot of them were constructive and might improve the quality of the paper.
Decision: Accept (Poster)