L EARNING WITHOUT P REJUDICES : C ONTINUAL U NBIASED L EARNING VIA B ENIGN AND M ALIGNANT F ORGETTING
Anonymous authors
Paper under double-blind review
A BSTRACT
Although machine learning algorithms have achieved state-of-the-art status in image classification, recent studies have substantiated that the ability of the models to learn several tasks in sequence, termed continual learning (CL), often suffers from abrupt degradation of performance from previous tasks.
A large body of CL frameworks has been devoted to alleviating this issue.
However, we observe that forgetting phenomena in CL are not always unfavorable, especially when there is bias (spurious correlation) in training data.
We term such type of forgetting benign forgetting , and categorize detrimental forgetting as malignant forgetting .
Based on this finding, our objective in this study is twofold: (a) to discourage malignant forgetting by generating previous representations, and (b) encourage benign forgetting by employing contrastive learning in conjunction with feature-level augmentation.
Extensive evaluations of biased experimental setups demonstrate that our proposed method, Learning without Prejudices , is effective for continual unbiased learning.
I NTRODUCTION
In continual learning (CL), a model learns a sequence of tasks to accumulate existing knowledge for a new task.
This is preferable in practice, where a model cannot retrieve previously used data, owing to privacy, limited data capacity, or an online streaming setup.
The main challenge in CL is to alleviate "catastrophic forgetting,” whereby a model forgets prior information while training on new information (McCloskey & Cohen, 1989).
A line of recent works has been dedicated to mitigating this issue.
Regularization-based methods force a current model not to be far from the previous one by penalizing changes in the parameters learned in previous tasks EWC (Kirkpatrick et al., 2017; Chaudhry et al., 2018; Aljundi et al., 2018; 2019a; Ahn et al., 2019; Dhar et al., 2019; Douillard et al., 2020).
Replay-based methods store samples of prior tasks in a buffer and employ them along with present samples (Robins, 1995; Lopez-Paz & Ranzato, 2017; Buzzega et al., 2020; Aljundi et al., 2019b; Mai et al., 2021; Lin et al., 2021; Madaan et al., 2021; Chaudhry et al., 2021; Bonicelli et al., 2022).
Generator-based methods generate prior samples and input them into current tasks (Shin et al., 2017; Kemker & Kanan, 2017; Xiang et al., 2019; Ostapenko et al., 2019; Liu et al., 2020; Yin et al., 2020).
A common assumption of the above-mentioned existing methods is that the training dataset is welldistributed.
However, a source dataset is often biased, and a machine learning algorithm could perceive the bias as meaningful information, thereby leading to misleading generalizability of the model (Kim et al., 2019; Jeon et al., 2022).
In the experiment in Section 3.1, we show that biased feature distributions are detrimental to the robustness of models in existing CL scenarios.
Thus, we propose a new type of CL, termed "continual unbiased learning (CUL)", in which the dataset of each task has a different bias.
With CUL, we aim to make any model trained on any task unbiased, considering all models as candidates for application.
This is particularly desirable in practice, whereby a model designed for a specific purpose is deployed for long periods and training datasets with divergent distributions are fed sequentially to update the model.
Even with CUL, forgetting past information ( malignant forgetting ) degrades the generalizability of a model.
For instance, with Biased MNIST in figure 1, the classifier perceives color as meaningful information for prediction, although it is not a natural meaning associated with the number.
If the model clearly memorizes prior information that there are (red, 0) and (gray , 0) samples, it could know that color is not the key factor for predicting numbers.
Furthermore, we observe that forgetting is not always malignant through the experiment in Section 3.2.
Although information (derived from prior data) itself can contribute to a model’s generalizability, it is beneficial to forget the misguidance learned from biased datasets, and hence we term such a forgetting "benign forgetting".
As an example, suppose a classifier trained on the MNIST dataset is extremely biased toward the background color, as in Section 3.2.
It is unfavorable for the classifier to make a logic that color = number and thus bet all the ‘blue’ images on ‘3’, for instance.
Therefore, we aim to discourage malignant forgetting and encourage benign forgetting .
Toward this, we design a novel method, named learning without prejudices (LwP) , which employs feature generator and contrastive learning .
( i ) Inspired by the research in Section 3.1 that the model trained with a set of data from all the tasks does not suffer from malignant forgetting , we exploit the capabilities of a feature generator .
The feature generator generates feature maps containing previous information via a generative adversarial network (GAN).
Feature maps provide a larger range of feature space (to be referenced) to than images, making the classifier more robust.
( ii )
The generated features are fed into the model by contrastive learning (Grill et al., 2020), and then current data are used for training in supervised mode.
Because bias means a spurious correlation between some particular attribute variables and label space, the model can learn representations free of bias, with self-supervised learning that does not require labels.
( iii ) To optimize the classifier with generated features effectively, we propose feature-level augmentation that spatially and channel-wise transforms features.
An extensive evaluation of biased datasets shows that our proposed framework is effective for CUL.
The main contributions of this study are summarized as follows:
• We present a novel framework, termed "continual unbiased learning", to address bias in CL.
Additionally, we propose continual unbiased learning benchmarks and an evaluation protocol for future research.
• We find that forgetting phenomena in CL is not always catastrophic when the training dataset exhibits the non-uniform distribution of features, e.g. , a biased dataset, and hence categorize them into malignant forgetting and benign forgetting .
• We propose a novel method, Learning without Prejudices (LwP) , that employs a feature generator and contrastive learning , presenting feature-level augmentation to bridge them.
LwP contributes to models’ generalizability significantly.
P RELIMINARIES 2. P ROBLEM S TATEMENT
Bias.
Let X be an input space and Y be a label space.
We define an attribute variable attr as an informative data feature of x ∈ X , possibly ranging from fine details ( e.g. , the pixel at (0, 0) is black) to high-level semantics of the image ( e.g. , there is a cat).
Thus, a set of attributes can represent data x .
Formally, let A be an attribute space and α : X → 2 A , where 2 A denotes the power set of A .
A function α extracts attribute variables
attr ∈
A from input space X , i.e. , α ( x ) = { attr 1 , attr 2 , . . .
, attr n } .
Among these attr , some might be very correlated to Y while they are irrelevant to the natural meaning of the target object.
We define this attr as "bias".
As machine learning algorithms ( e.g. , convolutional neural networks (CNNs)) are overly dependent on training data distribution, the model could be biased, potentially leading to misleading generalizability (Torralba & Efros, 2011; Tommasi et al., 2017; Jeon et al., 2022).
For instance, according to Bahng et al.
, the majority of frog images are captured in swamp scenes and many bird images are captured in the sky, making the model consider the background as a dominating cue that often fails to infer (frog, sky) and (bird, swamp) images correctly.
Continual learning.
Consider a dataset D
= { ( x , y ) | x ∈ X , y ∈ Y} for a classification problem.
"continual learning" is a learning type with a sequence of D S
= {D t =
( X t , Y t ) }
Tt =1 where each X t and Y t implicitly changes, expecting that f : X t → Y t accumulates previous information without forgetting while learning new tasks.
Here, T means the number of tasks.
A task t is predicting the target label y with unseen feature variable x and learning a task means the procedure of optimizing a classifier f : X t → Y t with D t to make a discriminative logic.
Continual unbiased learning.
In addition to CL, we suppose Y 1 = · · · = Y T and each D t has a different bias.
We aim at making the classifier f unbiased toward any of D t in the sequence, and term such type of learning as "continual unbiased learning".
In practice, inconsistent distributions
2. E VALUATING P ROTOCOL AND M ETRICS
We set a bias attribute and define a dataset that has biases as a "biased dataset" and a dataset in which the bias attribute is uniformly distributed across the labels as an "unbiased dataset".
We randomly split each biased dataset D t =
( D traint , D valt )
∈ D S into train and validation set to have the same ratio of biased samples.
We use one unbiased test data D test for evaluation.
And, we define f t as the model trained with {D traint } Tt =1 sequentially and denote F = { f 1 , · · · , f T } .
After training the model with a sequence of the differently biased datasets in favor of one attribute or another, we evaluate its average accuracy following the conventional CL protocol:
Acc ( f T , D valS ) =
1 T (cid:80)
Tt =1 acc ( f T , D valt ) , where T denotes the number of tasks and acc ( f T , D valt ) denotes the accuracy of the T -th model on the t -th task of the biased evaluation set.
Additionally, we suggest an average unbiased accuracy for an unbiased test set whenever each task is trained to estimate the generalizability of all the models:
Acc ub ( F , D test ) = 1 T (cid:80) Tt =1 acc ( f t , D test ) , where acc ( f t , D test ) denotes the accuracy of f t with unbiased test dataset.
Using this metric, we can evaluate F = { f 1 , · · · , f T } , considering every model as a candidate for deployment.
M OTIVATING E XPERIMENTS 3. C ONTINUAL LEARNING ON BIASED DATASETS
As a first step toward CUL, we investigate the learning tendency of a CNN-based classifier on biased datasets.
We exploit biased MNIST (Bahng et al., 2020) toward background color, as shown in Figure 1.
The unbiased test set had a uniform distribution for background color overall targets.
Using the biased MNIST, we compare the average unbiased accuracy of the models trained with biased datasets ∪ 1 ≤ t ≤ T ( D t ) simultaneously, and in the sequence {D 1 , · · · , D T } .
Figure 2 (a) shows a significant performance gap between these two learning scenarios.
We suggest that this is because the prior information is forgotten, e.g. , although the model refers to to (red, 0) in the first task, it still makes a biased decision that gray = 0 , considering only the (gray, 0) samples in the second task.
We term this type of forgetting "malignant forgetting".
3. A CLOSER LOOK AT FORGETTING
Setup.
With our motivation for the study being that a classifier could learn unintended information in biased conditions, hence forgetting such logic being desirable, we further conduct another motivating experiment.
We additionally construct shape-absent color images and their label ( ˜ x , y ) ∈
˜ D to investigate the model’s adaptability to a sequence of biased sets.
The distorted dataset ˜ D is shown in Figure 1 (b).
We estimate the benign forgetting rate (BFR), which quantifies the model’s generalizability by calculating the forgetting rate of the previous biased logic during the training of new biased tasks.
With all the models F and all the datasets ˜ D S = { ˜ D 1 , · · · , ˜ D T − 1 } , BFR B ( F , ˜ D S ) can be defined as
[Equation]
where acc ( f t , ˜ D t ) denotes the accuracy of f t ∈ F for ˜ D t , and ˜ D t is the augmented images having the same correlation between the background and target labels as the original colored MNIST samples D t .
Function n ( Y t ) denotes the number of target labels, displaying 10 for MNIST (0-9).
Intuitively, the performance distance acc ( f t , ˜ D t ) − 1 /n
( Y t ) is the degree of the model’s dependence on the bias attribute (color) for predicting Y i because there is only ‘color’ information in ˜ D t (Note that 1 /n ( Y t ) is the lower limit of the model’s discrimination, meaning f t takes a guess with unclear confidence).
Thus, for the numerator acc ( f t , ˜ D t ) − acc ( f t +1 , ˜ D t ) with offset 1 /n
( Y t ) , if the classifier f t +1 still sustains the biased logic of f t ( e.g. , red = 0 , . . , grey = 9 for f 1 in Figure 1), the difference acc ( f t , ˜ D t ) − acc ( f [Equation] +1 , ˜ D t )
≈ [Equation]
, whereas acc ( f t , ˜ D t ) − acc ( f t +1 , ˜ D t ) increases towards 1 otherwise.
Denominator acc ( f t , ˜ D t ) − 1 /n
( Y t ) is the scaling factor.
This is because if the model is relatively unbiased and thus acc ( f t , ˜ D t ) is initially small, the numerator takes a penalty, making acc ( f t , ˜ D t ) − acc ( f t +1 , ˜ D t ) small (and B ( F , ˜ D S ) becomes small), even though it forgets the biased logic well.
We set the baseline using a simple CNN model and compare it with conventional CL models, regularization-based (Kirkpatrick et al., 2017; Li & Hoiem, 2017), generator-based (Shin et al., 2017;
Liu et al., 2020; Smith et al., 2021) methods.
We calculate Acc ub and B ( F , ˜ D S ) with β = 0 .
Forgetting is not always malignant.
First, by performing the experiment displayed in Figure(b), we find that the BFR and generalization on biased datasets have a correlation; meaning that forgetting is not always catastrophic .
Confirming our assumption that forgetting previous biased logic is preferable in CUL, we define such forgetting as "benign forgetting".
Second, it is notable that conventional CL methods are limited to CUL with insufficient BFR on biased MNIST, and unsatisfactory accuracy on the unbiased test set, even when compared to the baseline.
This is because they are designed only to mitigate malignant forgetting and hence cannot adequately utilize benign forgetting .
M ETHODOLOGY
We discourage malignant forgetting by generating previous representations and encourage benign forgetting via contrastive learning.
Although feature generator (Liu et al., 2020) and contrastive learning (Cha et al., 2021; Fini et al., 2022) are dedicated to CL, we first employ both of them, proposing feature-level augmentations to bridge the two methods.
Additionally, we qualitatively and quantitatively suggest that these methods are effective for CUL.
4. D ISCOURAGING M ALIGNANT F ORGETTING
Let f : X → Y be a classifier with L layers.
For 1 ≤ l < L , classifier f can be split into three sub-modules as f = { f [1 ,...,l ] , f [ l +1 ,...,L − 1] , f [ L ] } , where [ · ] denotes the indices of the layers included in the sub-modules.
For convenience, we denote f [1 , ··· ,l ] as f a and f [ l +1 , ··· ,L − 1] as f b , i.e. , f = { f a , f b , f
[ L ] } .
To address malignant forgetting , we intend to make the latent feature vector of l -th layer v ∈ R H × W × C that include prior information.
Following the adversarial training of the GAN (Gulrajani et al., 2017), we train (feature) generator G : Z → R H × W × C that maps the noise vector z ∼ P z into R H × W × C , and discriminator D : R H × W × C → [0 , 1] that distinguishes real samples from P r and fake samples G ( z ) .
Thus, with fake features v f :=
G ( z ) and real features v
r ∈ R H
× W × C :=
f a ( x ) , feature generator G and discriminator D are optimized by
[Equation]
With G trained with prior tasks, f b receives both v r (current) and v f (previous) as input and hence can memorize previous knowledge, i.e. , discouraging malignant forgetting .
When generating fake images and inputting them as Shin et al.
; Kemker & Kanan (2017); Xiang et al.
Ostapenko et al.
(2019), because they are only 3-channel aggregated features, the classifier may be confused if the generator does not work well.
However, the generated feature maps have a larger range of feature space, providing the classifier with more information to be utilized selectively (please consult the comparison experiment in the Appendix.).
This is favorable for CUL because a biased classifier results when the model is overly dependent on a certain few features, especially the bias attribute variable.
4. E NCOURAGING B ENIGN F ORGETTING
To train f b , we apply bootstrap your own latent (BYOL) contrastive learning (Grill et al., 2020) because the generator G does not provide target labels for fake features.
Although pseudo-labels can be obtained through a discriminator (Shin et al., 2017), auto-encoder-based generators (Kemker & Kanan, 2017), or conditional GANs (Xiang et al., 2019; Ostapenko et al., 2019), under biased conditions, few mislabeled samples could cause a large degradation in performance.
Furthermore, bias is fundamentally based on the correlation between label and attribute space.
Thus, label-free contrastive learning encourages the classifier to make representations independent of bias and hence to be robust for bias by forgetting the biased logic, i.e. , encouraging benign forgetting .
Following the two network designs of BYOL, let g online θ := { f bθ , p θ , q θ } and g target ξ :=
{ f bξ , p ξ } be the online and target networks, where p, q denote additional embedding layers and θ, ξ are the parameters of the online and target networks, respectively.
The embedding layers p encode v and q receives the output of p as input.
We aim to train our objective network, g online θ , by learning to predict the representations made by g target ξ , i.e. , knowledge distillation.
The f bξ and p ξ networks have the same architecture as f bθ = f
[ l +1 ,...,L − 1] and p θ , respectively, but with different weight parameters ξ .
Since augmentations of input image space are not directly applicable in the feature space due to distribution shift, we propose feature-level augmentation .
For a given feature vector v , the transformed features v ′ =
Dropout( v + ϵ ′ , γ ) and v ′′ =
Dropout( v + ϵ ′′ , γ ) , where ϵ ′ ,
ϵ ′′ ∈
R H × W × C sampled from N ( µ, Σ) are Gaussian noise vectors with the same shape as the feature v , and γ is the dropout ratio.
By adding noise vectors, the feature v is augmented spatially because adjacent pixels of feature maps contain spatial information and are closely correlated.
And, we apply the channel-wise dropout technique (Tompson et al., 2015), which means channel-wise sampling of feature maps.
With augmented features v ′ and v ′′ , contrastive loss can be formulated as:
[Equation]
where || · || denotes L 2 -norm.
For the real and fake features, we optimize the online network g θ using the contrastive loss L contra θ,ξ
[Equation]
( v
[Equation]
, v [Equation] r ) .
The target network g ξ is updated via the moving average technique expressed as τξ + (1 − τ ) θ , where 0 < τ < 1 denotes the increase in the target decay rate during training to adjust the weight updating ratio between g online θ and g target ξ .
After contrastive learning, only f bθ is used in conjunction with f a and f [ L ] .
Then, we train the classifier f by cross-entropy loss with samples of the current task in supervised mode.
The overall procedure for the proposed approach is presented in Algorithm 1.
Inputs : Datasets for T tasks {D t =
( X t , Y t ) }
Tt =1 , classifier f = { f a , f b , f
[ L ] } , online network g online θ , target network g target ξ , dropout ratio γ , target decay rate τ , P z , N ( µ, Σ) 1 for t = 1 to T do while not converged do // Train with GAN ( x , y ) ∼ ( X t , Y t ) and z ∼ P z // sample real data and noise v r f a ( x ) and v f ← G ( z ) // obtain real and fake features
Optimize G and D by 2) using v r , v f // Train with Contrastive Learning for v { v r , v do ϵ ′ , ϵ ′′ ∼ N ( µ, Σ) // sample noises for augmentations v ′ ← Dropout( v + ϵ ′ , γ ) //
augment the feature vector v ′′ ← Dropout( v + ϵ ′′ , γ ) // augment the feature vector
Calculate L contra θ,ξ ( v ′ , v ′′ ) in (3) // calculate contrastive loss θ ← Optimizer( ∇ θ L contra θ,ξ ( v ′ , v ′′ ) , θ ) // optimize only θ and not
ξ ξ ← τξ + (1 − τ ) θ // update ξ by the moving average end //
Train with Classifier
CrossEntropy end 16 endOutput : classifier f
E XPERIMENTS
In this section, we experimentally evaluate the proposed method and compare it with several state-ofthe-art models.
We used three biased datasets: Biased MNIST (Bahng et al., 2020), Biased CIFAR-
(Hendrycks & Dietterich, 2019), and Biased CelebA-HQ modified from (Karras et al., 2017).
5. D ATASETS
For Biased MNIST , we use the experimental setup in Section 3.1 to evaluate the model’s generalizability.
Following the bias planting protocol proposed by Nam et al.
(2020), we create the Biased CIFAR-10 .
For the types of corruption { Snow, Frost, Fog, Brightness,
Contrast, Spatter, Elastic, JPEG, Pixelate, Saturate } , we set each as a bias corresponding to the target object.
The biases are changed for each task in exactly the same way as the Biased
MNIST, indicating (airplane, snow), (automobile, frost), . .
, (truck, saturate) in the first task, and (airplane, frost), (automobile, fog), . . .
, (truck, snow) in the second task.
The unbiased test set exhibited a uniform distribution of corruption types along the target object.
Thereby, the number of training image samples for each task is 4,000, and the test set had 10,000 images.
We set β = 0 .for
Biased MNIST and Biased CIFAR-10.
Among the attributes of images in CelebA-HQ (Karras et al., 2017), we set ‘gender’ as the target label and select ‘makeup’ and ‘hair color’ as the bias of the first and second task, respectively, because they have a significant correlation with ‘gender’ in the dataset.
We name this sampled dataset as Biased CelebA-HQ.
Thus, randomly sampled images for training are { ( HeavyMakeup, Female ), ( NoMakeup, Male ) } and { ( BlondHair, Female ), ( BlackHair, Male ) } for each task, respectively.
We additionally set the bias of the third task by ‘hair length’ utilizing the public annotation provided by Jeon et al.
(2022); hence, the training set consists of { ( LongHair, Female ), ( ShortHair, Male ) } images.
All pairs of ( attribute, gender ) for training have 2,000 samples, and the unbiased test set is composed of 100 images to be evenly distributed.
For CelebA-HQ, we do not split biased data for validation because there are not enough biased pair samples.
The detailed distribution of the training and test sets is presented in the Appendix.
[Table]
5. E XPERIMENTAL S ETUP
Competing models.
Previous approaches to CL can be categorized into regularization, replay [Table] and generator-based approaches.
We set all the categories on a competing line.
We add an unbiasing method, LfF (Nam et al., 2020) [Table] although it is not designed for CL, it can be applied for CUL.
Thus, we compare the proposed method with EWC (Kirkpatrick et al., 2017), LwF (Li & Hoiem, 2017), DGR (Shin et al., 2017), GFR (Liu et al., 2020), ABD (Smith et al., 2021), HAL (Chaudhry et al., 2021),
DER (Buzzega et al., 2020), LiDER Bonicelli et al. (2022) and LfF for all the datasets.
We do not consider previous samples during training for a new task in our model design.
Because it cannot be deployed when access to prior data is strictly limited due to privacy problems, e.g. , personal medical or credit information.
Nonetheless, for a fair comparison to the replay-based method, we evaluate our method with a buffer.
We set the buffer size as 200.
Implementation details.
For the Biased MNIST, we employ a simple CNN composed of four convolutional layers and three fully connected layers as the baseline model and backbone network of all competing models.
For Biased CIFAR-10 and Biased CelebA-HQ, ResNet-18 (He et al., 2016) is used as the backbone.
For each experiment, we used the Adam optimizer (Kingma & Ba, 2014), grid search learning rate (initial value and decay schedule), stopping criterion, and batch size.
For hyperparameters in competing models, we follow the same setting as that presented in this paper.
However, as we experimentally found that the learning rate is important in CUL, we fine-tune it and display the result if better than the original setting.
More implementation details are provided in the
Appendix.
We set l by experiments reported in the Appendix.
5. E XPERIMENTAL R ESULTS
Table 1 exhibits the evaluation results of LwP and state-of-the-art models on CUL.
From the experiments on three intentionally biased datasets, we find that regularization-based models are limited to
CUL, showing performance degradation from the Base model on some datasets.
It is notable that the generator-based methods show remarkable generalizability for some experiments.
This implies that generating prior samples and feeding them contribute to CUL.
Nonetheless, utilizing only the generated prior samples is limited to encouraging benign forgetting (experiments on Biased CelebA-HQ).
Based on the generator-based approach, LwP significantly increase performance with contrastive learning .
This quantitatively demonstrates contrastive learning contributes for benign forgetting (It is also demonstrated in Table 2).
Further, it is noteworthy that LwP (w/o buffer) outperforms replay-based methods on some datasets (Biased MNIST, Biased CelebA-HQ).
The unbiased learning method, LfF , deteriorates the performance for all the datasets, exhibiting performance degradation compared to Base .
5. A NALYSIS
[Table] [Table]
Analysis of LwP components.
We conduct an ablation study to evaluate the contribution of each presented component in section 4.
Table 2 shows that the self-supervised technique (BYOL) and feature generator contribute to the generalizability of the model.
Choice of self-supervised learning.
We compare the performance of the models using different self-supervised learning (SSL) approaches (He et al., 2020;
Grill et al., 2020; Caron et al., 2021;
Zbontar et al., 2021).
MoCo (He et al., 2020) requires large memory banks with contrastive loss, called infoNCE (Oord et al., 2018).
BYOL (Grill et al., 2020) proposed a metric learning approach trained using a momentum encoder.
DINO (Caron et al., 2021) complemented BYOL with similarity matching loss and mean-teacher self-distillation (Tarvainen & Valpola, 2017).
Barlow Twins (Zbontar et al., 2021) proposed an objective function that measures the cross-correlation matrix between two embeddings via an identical network from two different distorted samples.
MoCo is limited in its use because of the unacceptable computational costs of maintaining ( positive, negative ) pairs.
We decide on BYOL with our SSL technique through an experimental comparison between BYOL,
DINO, and Barlow Twins.
Table 3 shows that the BYOL method outperforms other SSL methods.
Generalization of LwP on various β .
In reality, the training dataset is biased to varying degrees.
Thus, we evaluate LwP on several β and compare it to state-of-the-art methods.
In Figure 3, LwP exhibits the best generalizability for all the β in both cases.
R ELATED W ORK 6. C ONTINUAL L EARNING
Recent literature on continual learning can be categorized into regularization-based, replay-based, and generator-based methods.
Regularization-based methods.
EWC Kirkpatrick et al.
(2017) approximated the importance of parameters from a probabilistic perspective and regularized the update of decisive ones training a new task.
LwF Li & Hoiem (2017) has multiple task-specific heads.
It records probabilities obtained from the previous task heads and uses them as targets of surrogate loss when learning a new task.
Chaudhry et al.
(2018) regularized parameter updating in a current task such that the new conditional likelihood is close to the previously learned one in terms of KL-divergence.
Aljundi et al.
(2018) presented memory-aware synapses (MAS) that estimate the importance of the parameters in a model and then penalize changing them in new tasks.
In further work, (Aljundi et al., 2019a), they investigated how to transform MAS into an online setup where the data distribution changes and the tasks are not specified.
Dhar et al.
(2019) presented an attention-based approach that incrementally learns new classes by restricting divergence.
Ahn et al.
(2019) presented an uncertainty-regularized continual learning framework based on Bayesian online learning.
Douillard et al.
(2020) proposed spatial-based distillation loss applied throughout the model.
Replay-based methods.
Inspired by the first replay-based approach for catastrophic forgetting and experience replay (ER) (Robins, 1995), the majority of related studies have been devoted to replay-based methods.
Lopez-Paz & Ranzato (2017) united rehearsal methods with knowledge distillation and regularization, making the model sufficiently close to the previous model.
Aljundi et al.
(2019b) considered a sampling of prior tasks as a constraint reduction problem, resulting in maximizing the diversity of samples.
Mai et al.
(2021) suggested that softmax classifiers could cause recency bias in continual learning and hence exploited the nearest-class-mean classifier, instead.
For preferable clustering, data samples from previous tasks are saved and utilized in the current training step.
Lin et al.
(2021) suggested continual contrastive self-supervised learning via a rehearsal method, which preserves the feature vectors using k-means clustering from the previous dataset.
Madaan et al.
(2021) presented a technique interpolating previous and current instances.
Dark experience replay ( DER ) (Buzzega et al., 2020) exploited logits sampled during the optimization trajectory to encourage consistency with its past.
HAL Chaudhry et al.
(2021) complemented a new objective termed anchoring, where the model is bi-level optimized.
Lipschitz-DrivEn Rehearsal ( LiDER )
Bonicelli et al.
(2022), constrained the backbone network by its layer-wise Lipschitz constants with respect to replay samples.
Generator-based methods.
Although the replay-based method is an intuitive approach for tackling catastrophic forgetting , it cannot be deployed if there is a privacy issue regarding data.
As an alternative, generator-based methods that do not directly store prior samples were presented. DGR
Shin et al.
(2017) obtained past information via a GAN, making pseudo-labels from the discriminator.
Kemker & Kanan (2017) generated prior informative images via auto-encoder, where the encoder approximates pseudo labels, and the decoder makes images guided by reconstruction loss.
Xiang et al.
(2019) exploited a GAN conditioned on the labeled features embedded by the discriminator, which allows explicit supervised learning for the classifier.
Ostapenko et al.
(2019) presented dynamic generative memory that employs an auxiliary classifier GAN with an increased number of parameters.
In each task, binary masks were applied to concentrate on influential parameters.
GFR Liu et al.
(2020) proposed a feature generator, reducing the complexity of generative replay and preventing the imbalance problem.
Yin et al.
(2020) and ABD Smith et al.
(2021) applied ‘inversion’, which makes class-conditional input images from random noise via a trained network.
6. U NBIASED L EARNING
Unbiased learning is a branch of robustness in machine learning.
As machine-learning algorithms are overly dependent on the distribution of training datasets, models are often biased, causing unreliable generalization at inference (Torralba & Efros, 2011).
A line of recent works has been dedicated to mitigating this issue.
Most of the studies assumed that the biases in datasets are known ( e.g. , color, texture) and exploited this information by designing various models (Kim et al., 2019;
Geirhos et al., 2018;
Bahng et al., 2020;
Gong et al., 2020; Adeli et al., 2021;
Dhar et al., 2021).
However, with the motivation that a mechanism based on bias predefined by human knowledge is unsuited for image datasets including countless sensory attributes, LfF Nam et al.
and Jeon et al.
(2022) addressed the challenge of unknown biases.
C ONCLUSION AND F UTURE W ORK
A large body of literature suggests that forgetting while learning a sequence of tasks is catastrophic.
However, in this study, we found that forgetting could encourage the generalizability of a model if the dataset has bias.
Based on this motivation, our proposed method, LwP , encourages benign forgetting and regularizes malignant forgetting for continual unbiased learning via a feature generator and contrastive learning in conjunction with feature-level augmentation .
Experimentally, the LwP contributes to generalization, while conventional CL methods are limited to unbiasing.
In terms of further work, extensive exploration of the relationship between forgetting and various incomplete data distributions, e.g. , imbalanced or mislabeled data distributions, are potentially value-adding future research directions.
A E XPLORATION ON THE DATA DISTRIBUTION
We construct the biased training set and unbiased test set from Background Colored MNIST, Corrupted
Cifar-10, and CelebA-HQ to set up continual unbiased learning.
Figure 4, 5, 6, 7 exhibit the overall distribution of each task on each dataset.
And, the examples of Biased Cifar-10 and Biased CelebA are displayed in Figure C
B E XPERIMENT DETAILS B. A RCHITECTURE
Biased MNIST.
The architecture of the classifier f for the Biased MNIST is composed of four convolutional (CONV) layers, a global average pooling (GAP) layer, and 3 fully-connected (FC) layers (please see Table 4).
In this paper, We set l = 2 splitting f into { f [1 , 2] , f [3 , 4 , 5 , 6 , 7] , f [8] } .
Hence, f a and f b are f [1 , 2] and f [3 , 4 , 5 , 6 , 7] , respectively
= { f bθ , p θ , q θ } and g target ξ = { f bξ , p ξ } are used for contrastive learning , where p and q are FC layers with 128 units.
Since the generator, G makes fake features with the same shape as the output of encoder f a , the generated features v f via G belong to R 28 × 28 × 32 as feature maps activated from the input image by 4 CONV layers.
Note that l denotes an l -th layer, e.g. , l = 5 means GAP layer and l = 7 is the second FC layer.
[Table]
Biased CIFAR-10 and Biased CelebA-HQ.
For Biased CIFAR-10 and Biased CelebA-HQ, we use ResNet-18 as our classifier f as depicted in table 5.
We modify the first CONV of ResNet-18 with the kernel size 3 × 3 , instead of 7 × 7 .
For convenience, we consider a block as a layer l .
We split f into { f [1] , f [2 , 3 , 4 , 5] , f [6] } resulting in f a = f [1] and f b = f [2 , 3 , 4 , 5] for Biased CIFAR-10 with l =and set l = 2 for Biased CelebA-HQ.
We choose l by ablation study.
We set g online θ = { f bθ , p θ , q θ } and g target ξ = { f bξ , p ξ } , where p and q are FC layers with 512 units.
Thus, the size of v f generated by G is H × W × 64 for Biased CIFAR-10 and H/ 2 × W/
× 128 for Biased CelebA-HQ, where
H and W denotes the height and width of input images.
Generator G and discriminator D .
We set the architecture of the feature generator G by one FC layer and three CONV layers.
During generating features, we increase the size of feature maps in G with two interpolation layers.
The discriminator D consists of four CONV layers and an FC layer to distinguish whether input features are real or fake.
The leaky ReLU activation layer follows every
[Table]
CONV layer.
We adjusted the number of units in the FC layer for G to fit the different shapes of the target feature maps for the three datasets while maintaining the overall architecture.
B. T RAINING PROCEDURE
To train the classifier f , for both supervised learning with samples of the current task and contrastive learning with previous samples, we use Adam optimizer with learning rate 10 − 4 , weight decay 5 × 10 − 4 , and ( β 1 , β 2 ) =
To train the generator G and discriminator D , we use Adam optimizers with learning rate 5 × 10 − 5 for G and 2 × 10 − 4 for D .
We set ( β 1 , β 2 ) =
(0 . 5 , 0 . 999) for
Adam in G and D .
To optimize the generator G and discriminator D , we use the WGAN-GP.
We set input image size as 28 × 28 for Biased MNIST, 32 × 32 for Biased CIFAR-10, and 128 ×for Biased CelebA-HQ.
The batch size and epochs per task are 32 and 20, respectively for all the experiments.
For feature-level augmentation , we set channel-wise applied dropout rate γ = 0 . 2 , and use µ = 0 and Σ = 0 .
005 ∗ I for N ( µ, Σ) when spatially augmenting.
Following exactly the same setup of BYOL, we set variable τ := 1 − (1 − 0 .
996)(cos( πk/K ) + 1) / 2 , where k denotes the current training epoch and K denotes the total number of training epochs.
C E XPLORATION ON L W P C. I NVESTIGATION FOR ARCHITECTURAL PARAMETER , l
Splitting layer l is an important parameter in our model design.
From the feature generator to online and target networks, all the architectures of the networks are decided by the parameter l .
Therefore, we conduct a comparing experiment for l .
By experiment in Table 6 and Table 7, we found all the l show competitive generalizability compared to state-of-the-art CL methods.
Among them, we chose the best one, l = 2 , for our model.
We conducted the same ablation experiments for Biased CIFAR-10 to choose l . [Table] [Table]
C.
[Table]
C ONTRIBUTION OF F EATURE G ENERATOR
Although several conventional CL approaches employed image generators to memorize previous samples, they are only 3-channel aggregated features.
Thus, if the generator does not work well, generated input image could disturb the desirable optimization of the classifier.
Instead, generated features can provide more information to be used selectively and hence make the classifier more robust.
Table 8 experimentally demonstrates our intuition [Table] [Table]
Choice of self-supervised learning.
We compare the performance of the models using different self-supervised learning (SSL) approaches MoCo, DINO, Barlow Twins
[Table]
and BYOL for Biased
CIFAR-10 following the exactly same way as Biased MNIST.
[Table] [Table]
C. M ODEL SIZE
Generally, the number of parameters affects the performance of the model.
Although simple comparison for the number of parameters is not fair because many methods for CL address malignant forgetting by regularization-based (additional operation for regularization) and replay-based (more training iterations with buffer) approaches, which are not related to model size.
Nonetheless, generator-based methods can be compared for model size.
Therefore, we compare the model size and present a tiny version of LwP in table 11.
It is notable that LwP(tiny) also exhibits competitive performance.
C. R EPLAY B UFFER
Learning with replay buffer can help the model to memorize previous information, discouraging malignant forgetting .
Although there are some special cases, where access to prior samples is strictly limited ( e.g. , privacy data such as medical or financial data, with a short storage period), a replay buffer is often available.
Therefore, we compare the generalizability of LwP and replay-based methods with small-sized (200) and big-sized buffers (2,000).
As a result, Table 12 shows that our method achieves the best performance in both scenarios.
[Table]
[Table]
C. I NVESTIGATION ON M ORE V ARIOUS β
Collecting data from the real world, the degree of bias β could be various.
To investigate the generalizability of LwP and competing models, we set β 0 .
1 ∼ 0 .
8 at intervals of 0.1 along with 0 .
8 ∼ 0 .
95 at intervals of 0.05.
Fig.
shows that our method generalizes best for all β .
D D ESCRIPTION OF BYOL
In this section, we describe the detail of the contrastive learning method employed for our method,
Bootstrap Your Own Latent (BYOL).
BYOL is a self-supervised learning technique that uses a momentum encoder.
BYOL contains two neural networks, online and target networks, which learn by referring each other.
BYOL trains the online network to predict the representation of the target network under different augmented views.
The online network g θ is parameterized by a set of weights θ and consists of an encoder f θ , projector p θ , and predictor q θ .
The target network g ξ has the same architecture as the online network but is parameterized with a different set of weights ξ and the target network has no predictor, i.e., g ξ := { f ξ , p ξ } .
Given an input data x , we can get different views of x under two different distributions of augmentations T and T ′ .
For t ∼ T and t ′ ∼ T ′ , BYOL generates two different augmented views v :=
t ( x ) and v ′ :
= t ′ ( x ) .
The online network g θ trains the representation of the target network g ξ .
With augmented views v and v ′ , contrastive loss can be formulated as :
[Equation]
where || · || 2 denotes L 2 -norm.
Note that the predictor q θ is applied only to the online network g θ to provide asymmetry between the online and target architectures.
BYOL symmetrizes the loss L θ,ξ by feeding v ′ to the online network g θ and v to the target network g ξ , so the total loss of BYOL is defined by L BYOL θ,ξ =
L θ,ξ ( v , v ′ )
+ L θ,ξ ( v ′ , v ) .
Note that BYOL minimize L BYOL θ,ξ with respect to θ only, but not ξ , meaning that the online network g θ is only trained by the contrastive loss.
The target network g ξ is updated via the moving average technique expressed as τξ + (1 − τ ) θ , where 0 < τ < 1 denotes the increase in the target decay rate during training to adjust the weight updating ratio between g θ and g ξ .
After the training, only f θ in the online network g θ is used as an encoder of a classifier.
E E THICAL I SSUE
One might argue that our experimental setting, especially for CelebA-HQ, has prejudice, e.g. , "Women enjoy makeup while men do not", or "Men have short hair while women have long hair".
However, we only quantitatively estimated the correlation between annotated attributes in CelebA-HQ, a public dataset, and then chose the largest pairs.
We actually intended in this paper to tackle this biased distribution issue caused by the sampling error, implying that the test data for which the model would be deployed has unbiased distribution.