SelecMix: Debiased Learning by Contradicting-pair Sampling
Abstract
Neural networks trained with ERM (empirical risk minimization) sometimes learn unintended decision rules, in particular when their training data is biased, i.e., when training labels are strongly correlated with undesirable features.
To prevent a network from learning such features, recent methods augment training data such that examples displaying spurious correlations (i.e., bias-aligned examples) become a minority, whereas the other, bias-conflicting examples become prevalent.
However, these approaches are sometimes difficult to train and scale to real-world data because they rely on generative models or disentangled representations.
We propose an alternative based on mixup, a popular augmentation that creates convex combinations of training examples.
Our method, coined SelecMix, applies mixup to contradicting pairs of examples, defined as showing either (i) the same label but dissimilar biased features, or (ii) different labels but similar biased features.
Identifying such pairs requires comparing examples with respect to unknown biased features.
For this, we utilize an auxiliary contrastive model with the popular heuristic that biased features are learned preferentially during training.
Experiments on standard benchmarks demonstrate the effectiveness of the method, in particular when label noise complicates the identification of bias-conflicting examples.
Introduction
The inductive biases contributing to the success of deep neural networks (DNNs) can sometimes limit their capabilities for out-of-distribution (OOD) generalization.
DNNs are prone to learn simple, linear predictive patterns from their training data, sometimes ignoring more complex but important ones [30, 32].
It has been suggested that the simplest correlations in the data are often spurious [7].
A DNN relying on such simple, spurious patterns will therefore display poor OOD generalization.
Spurious correlations in a dataset are often the result of a selection bias, and such datasets are therefore said to be biased .
This paper is about debiased learning, also known as debiasing, i.e., methods that prevent a network from relying on spurious correlations when trained on a biased dataset.
Biased datasets typically contain a majority of so-called bias-aligned examples and a minority of bias-conflicting ones.
In bias-aligned examples, ground truth labels are correlated with both robust and biased features.
In bias-conflicting examples, labels are correlated only with robust features.
Clearly, the issues of models trained on biased datasets stem from the prevalence of bias-aligned samples.
Various approaches for debiased learning encourage models to ignore biased features.
Since the identification of biased features from i.i.d.
data is ill-defined, it requires additional assumptions, or supervision from heterogeneous (non-i.i.d.)
training samples [28].
In this work, we approach debiased learning with the assumption that biased features are “easier to learn” than robust ones, meaning that they are incorporated in the model earlier during training [29, 30].
Existing works based on this heuristic typically train two models: (i) an auxiliary model that purposefully relies on biased features, and (ii) the desired debiased model.
The auxiliary one guides the training of the debiased one [24, 27].
For example, Nam et al.
[24] trains the auxiliary model with a generalized cross-entropy (GCE) loss [40] that strengthens its reliance on biased, easy-to-learn features.
The training of the debiased model either augments the data with novel bias-conflicting examples [15, 20] or upweights existing ones [22, 24].
On the one hand, upweighting-based methods are simple but their debiasing capabilities are limited when bias-conflicting examples are scarce.
On the other hand, augmentation-based methods rely on carefully tuned generative models or disentangled representations that are difficult to apply to real-world data.
We propose a simple and effective method based on mixup [37], a popular data augmentation method that creates convex combinations of randomly-chosen pairs of examples and their labels.
Our method, coined SelecMix, is an application of mixup to selected contradicting pairs of examples to generate new bias-conflicting examples.
We define contradicting pairs as having either (i) the same ground truth label but dissimilar biased features, or (ii) different labels but similar biased features.
To compare examples with respect to their biased features and thereby identify the contradicting pairs, we train an auxiliary contrastive model with a novel generalized supervised contrastive (GSC) loss that amplifies the reliance on easy-to-learn features.
As a result, feature clustering in the embedding space serves as a good indicator of the similarity of the biased features.
We train the auxiliary model and the desired debiased model simultaneously.
The auxiliary model identifies contradicting pairs, while the debiased model is trained on data augmented by SelecMix.
Compared to past approaches, our method generates bias-conflicting examples without generative models or disentanglement, while implicitly upweighting existing ones since they are frequently selected for the mixup.
We evaluate our method on standard benchmarks for debiasing.
Experimental results suggest that
SelecMix consistently outperforms prior methods, especially when bias-conflicting samples are scarce.
In addition, our method maintains its superior performance in the presence of label noise that complicates the identification of bias-conflicting examples.
Ablation studies show advantages of both (i) the selective mixup strategy compared to other mixup variants, and (ii) the GSC loss, which strengthens the reliance on biased features and allows measuring the similarity of examples with respect to the biased features.
Related work
Debiasing with known forms of bias or bias labels.
Early works on debiasing assume some knowledge about the bias.
Some methods require that each training example is provided with a bias label , i.e., a precise value for its biased features [11, 14, 21, 26, 31].
Other methods use knowledge of the general form of the bias, such as color or texture in images.
This information is typically used to design custom architectures [1, 5, 34].
For example, ReBias [1] uses a BagNet [4] as an auxiliary model because it focuses on texture, which is assumed to be the biased feature.
The auxiliary model guides the training of a debiased model robust to unusual variations in texture.
Debiasing with the easy-to-learn heuristic.
A number of recent works assume that biased features are learned more quickly than robust ones [20, 24].
A popular approach is to train an auxiliary model that intentionally relies primarily on the easy-to-learn biased features, e.g., with the GCE loss [40].
The auxiliary model guides the training of a debiased model that focuses on other, presumably non-biased features.
For example, LfF [24] learns biased and debiased models simultaneously.
Bias-conflicting training examples are identified based on the relative losses from the biased and debiased models, then upweighted for the training the debiased model.
BiaSwap [15] trains an image translation model to generate new bias-conflicting training examples.
Building on LfF, DFA [20] disentangles robust and biased features and swaps them randomly for augmentation.
Disentanglement is however an ill-posed problem in itself [23] and a challenge with real-world data.
In contrast, our
[Figure]
method augments bias-conflicting data by mixing existing examples, without generative models nor disentangled representations.
Method
We first describe the use of mixup as a debiasing strategy, while assuming that each training example is (unrealistically) provided with bias labels (Sec. 3.1).
Then, we move to a realistic scenario where bias labels are not available.
We introduce an auxiliary contrastive model that identifies the biased features, which are assumed to be "easier to learn" than robust ones.
This allows comparing examples with respect to these biased features (Sec. 3.2).
Finally, we describe the complete SelecMix method that combines the selective mixup with our auxiliary biased model (Sec. 3.3).
3.1 Mixup for augmenting bias-conflicting samples
In a highly biased dataset, bias-conflicting samples constitute only a small fraction of the training data.
This is the root issue in the cases we consider.
The goal is thus to increase the fraction of bias-conflicting examples in the training data, which will then reduce the reliance of the learned model on biased features.
Our idea is to use mixup [37] to augment the existing pool of bias-conflicting examples.
Mixup is a popular augmentation method [2, 16, 36] known to improve various measures of robustness [25, 39].
It constructs convex combinations of pairs of examples and their labels: ( (cid:101) x i , (cid:101) y i ) ← (cid:0)
[Equation]
where ( x i , y i ) and ( x j , y j ) are two original training examples (e.g., image and one-hot label vector) and λ is a random mixing coefficient, λ ∼ U [0 , 1] .
Assuming for now that bias labels are available, we could generate bias-conflicting examples by applying mixup on pairs having either (i) the same ground truth label but different bias labels or (ii) different labels but the same bias label.
Any such pair includes at least one bias-conflicting example, so that mixup generates additional ones as long as this original example is assigned a higher mixing weight in Eq.
An overview of this mixup strategy is shown in Fig.
Next, we describe how to identify such desired pairs when bias labels are not available.
[Figure]
[Figure]
Observations: As training proceeds with the SC loss, the similarity of contradicting positives increases while it decreases for the contradicting negatives.
In contrast, the proposed GSC loss amplifies the reliance on the biased features, thus the clustering in embedding space remains a good indicator of the similarity of the biased features during the whole training process.
3.2 Replacing bias labels with an auxiliary model
We utilize an auxiliary model to compare training examples with respect to their biased features.
We assume that biased features are easier to learn than robust ones, because they are involved in simpler (e.g., linear) predictive patterns.
Our auxiliary model is trained to rely primarily on biased features.
We train the auxiliary model with a contrastive objective [6, 10, 13].
This is known to induce a clustering in embedding space (better than standard cross-entropy) that reflects the similarity of training examples in terms of the learned features.
These are biased features by our assumption, such that the clustering reflects the similarity of examples w.r.t.
their (unknown) bias labels.
We use the supervised contrastive (SC) loss of Khosla et al.
[Equation]
where z i is the normalized embedding of image x i , B = { 1 , 2 , ..., B } is the set of indices in the current mini-batch, P i =
{ k ∈ B\{ i } | y i =
y k } is the set of positive examples relative to the example i (i.e., with the same label), and the scalar τ is a temperature hyperparameter.
As an experiment to confirm that the clustering of training examples in embedding space is indeed based on biased features, we train the auxiliary model on the Colored MNIST, the Corrupted CIFAR10, and the BFFHQ datasets (see Appendix A.1) with the SC loss and compute the cosine similarity z ⊺ i z j of the embeddings of all pairs of examples.
Fig.
2 shows that the examples are clustered according to the biased features early in the training.
In other words, predictive patterns involving biased features are learned faster than those involving robust features, as desired.
Since the higher cosine similarity z ⊺ i z j implies a high probability p
i,j , we interpret it as the likelihood of the pair ( i, j ) having similar biased features.
To further amplify the reliance of the auxiliary model on the biased features, we define the generalized
SC (GSC) loss as follows:
[Equation]
where ˆ p qi,k is a scalar having the same value as p qi,k , meaning that the gradient is not back-propagated through it.
The term ˆ p qi,k assigns a higher weight to sample pairs with a high probability p i,k and thus amplifies the reliance on the biased features.
We discuss the relationship between the GCE and GSC losses in Appendix C.2.
3.3 Complete proposed method: selective mixup with biased embedding space
We now have an auxiliary model for quantifying the similarity of the training examples in terms of the biased features.
We use it to apply mixup on contradicting pairs , which have either (i) the same label but dissimilar biased features ( contradicting positives ) or (ii) different labels but similar biased features ( contradicting negatives ).
Contradicting positives.
For each instance ( x i , y i ) in the current mini-batch (i.e., the “query”), we pick another one ( x k , y k ) with the lowest similarity (measured in the space of their embeddings produced by the auxiliary model) among the set of positive examples (i.e., with the same label as x i ):
[Equation]
where P i = { j ∈ B \ { i } | y i =
y j } ,
[Equation]
4) where B = { 1 , 2 , ..., B } is the set of the sample indices in the current mini-batch, and z i and z j are the normalized embeddings produced by our auxiliary model g ϕ , i.e., z i =
g ϕ ( x i ) .
Since we select the pair among the set of positives, the training CE loss of the mixed example is l ( (cid:101) x i , (cid:101) y i )
=
l ( λx i + (1 − λ ) x k , λy i + (1 − λ )
y k )
=
l ( λx i + (1 − λ ) x k , y k ) .
Considering that most examples are bias-aligned in the training set, the query ( x i , y i ) is also likely to be bias-aligned.
In addition, since the query x i and the selected example x k have the same label but dissimilar biased features, it is also likely that the biased features of x k are not correlated with the label, i.e., the selected example ( x i , y i ) is likely to be bias-conflicting.
Thus, to effectively generate an example that contradicts the prediction based on biased features, we sample λ ∼ U [0 , 1] and assign the smaller value among λ and 1 − λ to x i and the larger one to x k .
Contradicting negatives.
For each query ( x i , y i ) , we pick another one with the highest similarity among the set of negative examples:
[Equation]
Similarly, we sample λ ∼ U [0 , 1] and let λ ← min( λ, 1 − λ ) .
In standard mixup, the training loss of the mixed sample is: l ( (cid:101) x i , (cid:101) y i ) =
l ( λx i + (1 − λ ) x k , λy i + (1 − λ )
y k )
= λ · l ( λx i + (1 − λ ) x k , y i )
+ (1 − λ ) · l ( λx i + (1 − λ ) x k , y k ) .
However, considering that (i) the query ( x i , y i ) is likely to be biasaligned, and (ii) the pair ( x i , x k ) shares similar biased features, the first term λ · l ( λx i +(1 − λ ) x k , y i ) acts as bias-aligned example since the biased feature shared with x i and x k is predictive of the label
y i .
Thus, rather than interpolating the label, we simply assign (cid:101) y
i ← y k .
The pseudo-code of the proposed algorithm is presented in Alg.
1 and Alg. 2.
Intuitive interpretation.
Unlike standard mixup, we assign the label of the generated sample to the label of the selected sample, which is likely to be bias-conflicting.
Therefore, the proposed method can be viewed as generating new bias-conflicting samples by injecting bias-aligned samples as noise to existing bias-conflicting samples .
The method can also be interpreted as implicitly upweighting existing bias-conflicting samples, since they are frequently chosen for the mixup pair.
Experiments
We now validate the effectiveness of the proposed method on debiasing benchmarks.
We also evaluate it under the presence of label noise, which is a challenging but realistic scenario, yet less explored so far (Sec. 4.1).
We also provide a detailed analysis of each component of our method: (i) the auxiliary contrastive model (Sec. 4.2) and (ii) the selective mixup strategy (Sec. 4.3).
Datasets.
The Colored MNIST is a modified MNIST [19] that consists of colored images of ten digits where each digit is correlated with the color (e.g., most of the images of "0" are colored with red).
Here, the label is a digit (i.e., 0 ∼ 9 ) and the biased feature is color.
The Corrupted CIFAR10 is constructed by applying different types of corruptions to the corresponding objects in the original
CIFAR-10 [18] dataset (e.g., most of the images of dogs are corrupted with G AUSSIAN BLUR noise).
The Biased FFHQ (BFFHQ) [20] is constructed based on the real-world dataset FFHQ [12], where the label is age and the biased feature is gender.
The ratio of bias-conflicting samples in the training set is α ∈ { 0 .
5% , 1% , 2% , 5% } for {Colored MNIST, Corrupted CIFAR10} and α = 0 .
5% for BFFHQ.
All datasets are available in the official repository of DFA [20].
We defer the detailed description of the datasets in Appendix A.1.
Baselines.
To evaluate the effectiveness of our method in debiasing, we compare it with the prior methods LfF [24] and DFA [20] which also rely on the easy-to-learn property of the biased features.
LfF trains an auxiliary model with the GCE loss to amplify its reliance on the biased features, then reweights examples for training a debiased model.
DFA disentangles the biased and robust features with a similar principle as LfF, then augments the data for training a debiased model by swapping the biased features across examples.
We also include EnD [31], ReBias [1] [Table] and HEX [34].
EnD leverages explicit bias labels.
ReBias and Hex are designed for a specific, known form of biased features such as color and texture in images.
[Table]
4.1 Main results
We apply our method to a vanilla ResNet18 (V+Ours) and to LfF (L+Ours).
We use the Colored
MNIST, Corrupted CIFAR
[Table]
and BFFHQ datasets.
As shown in Table 1, our method consistently outperforms baselines, except ReBias [1] on the Colored MNIST.
Their bias-capturing model BagNet [4] is specifically tailored to color and texture as biased features by relying on local image patches as input.
Both DFA and our method augment the pool of bias-conflicting training examples
[Table]
but
DFA’s reliance on disentangled representations seems problematic on the more complex datasets.
In contrast, our method performs well on all datasets, owing to the simplicity of the mixup strategy.
In particular, our method outperforms DFA by a large margin on BFFHQ while the gap is smaller on
Debiasing under the presence of label noise.
Label noise can negatively affect debiasing methods that need to identify bias-conflicting examples.
This is because training examples with noisy (i.e., incorrect) labels are difficult to distinguish from the bias-conflicting examples that we wish to identify.
Fig.
3 shows that our method maintains better performance under the presence of label noise than
[Figure]
[Table]
baselines.
We hypothesize that the robustness of our method comes from the nature of mixup, which is known to improve robustness [39].
4.2 Detailed analysis of the biased contrastive model Comparison of the biased embedding spaces for measuring bias similarity.
Our auxiliary contrastive model trained with the GSC loss learns the embedding space which reflects the similarity of the examples w.r.t.
their biased features.
It is then used for SelecMix to identify the contradicting pairs by measuring the cosine similarity.
We replace our auxiliary model with the biased model of
LfF [24] which is trained with the GCE loss [Table] and use it for SelecMix.
For the similarity measures, we used cosine distance and l 2 distance in the embedding space learned by their biased model, and the
KL-divergence of the softmax outputs of the classification head.
As shown in Table 2, our auxiliary contrastive model achieves the best performance.
Especially, the performance gap is significant for the contradicting negatives.
This supports our claim in Sec. 3.2 that the proposed GSC loss induces the feature clustering in the embedding space w.r.t.
the biased features.
In contrast, the
GCE loss learns the decision boundary and does not explicitly cluster the features, thus selecting the contradicting negatives, i.e., the pairs with different labels but similar biased features, seems to underperform ours.
[Table]
Bias label prediction of the biased model.
Table 3 shows the accuracy of the bias label prediction of the auxiliary biased model for each method.
Our biased contrastive model does not have a classification head since it is trained with a contrastive loss.
Thus, we attach a linear classifier on top of the model and fine-tune it.
Note that the bias labels are used only for the evaluation.
As shown in
Table 3, the biased contrastive model shows the best performance.
As the ratio of the bias-conflicting samples increases, they degrade the performance.
Notice our biased contrastive model is robust to this effect compared with the prior methods relying on the GCE loss.
[Figure]
Visualization.
Fig.
4 illustrates t-SNE [33] plot of the features extracted from the corresponding models trained on the Corrupted CIFAR10.
As shown in Fig. 4(d), which corresponds to the proposed biased contrastive model, we observe that the samples are well clustered on the embedding space of the biased contrastive model.
Similar to the results in Table 3, the GCE-based biased models, i.e., LfF and DFA, suffer from the increasing number of bias-conflicting samples.
[Figure]
Pretraining vs. simultaneous training of the auxiliary model.
For our method in the main experiments, the auxiliary biased model is simultaneously trained with the debiased model.
To analyze the performance of the pretrained biased model, we equip SelecMix with the pretrained biased contrastive model and evaluate the performance of our method with the varying total number of epochs for pretraining.
The solid line represents the unbiased accuracy of our method with the pretrained biased model.
The dotted line represents the unbiased accuracy of our method, i.e., simultaneous training of the auxiliary biased model.
As shown in Fig.
5, vanilla SC loss exhibits the high variance of the performance with respect to the number of the epochs for pretraining, compared to the proposed GSC loss.
4.3 Detailed analysis of
the selective mixup strategy of SelecMix
Ablation study.
As shown in Table 4, we obtain the best performance when utilizing both the contradicting positives (A) and the contradicting negatives (B) all together in most cases.
This is because it generates more diverse bias-conflicting examples compared to when using only one of them alone.
On the other hand, standard mixup degrades the generalization capability in many cases which implies that the selection of the pairs is crucial.
Comparison with a mixup variant when bias label is available.
We compare SelecMix with the recently proposed LISA [35], the mixup strategy for addressing domain generalization and subpopulation shift problems.
LISA similarly applies the vanilla mixup on the pair of (i) the samples with the same label but different domains, and (ii) the samples with different labels but the same domain.
Here, the domain label corresponds to the bias label in our experiment.
The key differences between SelecMix and LISA are (i) ours does not require the bias label, (ii) we do not interpolate the labels of the generated samples, and (iii) we sample λ and let λ ← min( λ, 1 − λ ) , i.e., we always assign the higher weight to the selected sample and the lower weight to the query sample (Sec. 3.3).
Table 5 empirically confirms the better performance of SelecMix, using the explicit bias label for a fair comparison, over LISA, implying that augmenting the samples close to the bias-conflicting
[Table] [Table]
samples is crucial on the biased datasets.
More discussions on the comparison between the SelecMix (using the explicit bias label) and LISA is provided in Appendix C
[Table] [Table]
Conclusions
We presented SelecMix, a method for debiased learning that augments bias-conflicting examples using mixup on contradicting pairs of examples.
The selection of these pairs is the critical part of the method.
It relies on an auxiliary model trained with a contrastive loss designed to amplify reliance on the biased features.
The biased features are assumed to be “easy to learn” and incorporated earlier than others during training by SGD.
SelecMix outperforms baselines on debiasing benchmarks and remains effective under the presence of label noise.
Limitations.
The “easy-to-learn” assumption may not be correct, i.e., biased features are not always guaranteed to be learned faster than robust ones.
Our method should only be used when this assumption holds, but it is unclear how to determine such cases a priori, and how frequent they are in real-world data [38].
In the worst case, our method could increase reliance on biased features and worsen robustness.
Our experiments use semi-synthetic datasets where the assumption is made valid by construction.
Thus, our results are not a sign of the broad real-world applicability of the method.
Societal impact.
Our contributions should have a positive impact since our aim is to make machine learning systems more reliable.
However, our method is only one step in this direction and the problems addressed should not be considered as solved.
Acknowledgments and Disclosure of Funding
We would like to thank Sangdoo Yun for the useful discussions and Yeonji Song for the suggestions on the writing.
We also like to thank the anonymous reviewers for their constructive comments.
This work was supported by the SNU-NAVER Hyperscale AI Center and the Institute of Information & Communications Technology Planning & Evaluation (2015-0-00310-SW.StarLab/10%, 20190-01371-BabyMind/10%, 2021-0-02068-AIHub/10%, 2021-0-01343-GSAI/10%, 2022-0-00951LBA/10%, 2022-0-00953-PICA/50%) grant funded by the Korean government.
Checklist
For all authors... (a) Do the main claims made in the abstract and introduction accurately reflect the paper’s contributions and scope?
[Yes] (b) Did you describe the limitations of your work?
[Yes] (c) Did you discuss any potential negative societal impacts of your work?
[Yes] (d) Have you read the ethics review guidelines and ensured that your paper conforms to them?
[Yes] 2.
If you are including theoretical results... (a) Did you state the full set of assumptions of all theoretical results?
[N/A] (b) Did you include complete proofs of all theoretical results?
[N/A] 3.
If you ran experiments... (a) Did you include the code, data, and instructions needed to reproduce the main experimental results (either in the supplemental material or as a URL)?
[No] (b) Did you specify all the training details (e.g., data splits, hyperparameters, how they were chosen)?
[Yes] See Appendix A (c) Did you report error bars (e.g., with respect to the random seed after running experiments multiple times)?
[Yes] (d) Did you include the total amount of compute and the type of resources used (e.g., type of GPUs, internal cluster, or cloud provider)?
[Yes] See Appendix A 4.
If you are using existing assets (e.g., code, data, models) or curating/releasing new assets... (a) If your work uses existing assets, did you cite the creators?
[Yes] (b) Did you mention the license of the assets?
[Yes] (c) Did you include any new assets either in the supplemental material or as a URL?
[No] (d) Did you discuss whether
and how consent was obtained from people whose data you’re using/curating?
[No] (e) Did you discuss whether the data you are using/curating contains personally identifiable information or offensive content?
[No]
If you used crowdsourcing or conducted research with human subjects... (a) Did you include the full text of instructions given to participants and screenshots, if applicable?
[N/A] (b) Did you describe any potential participant risks, with links to Institutional Review Board (IRB) approvals, if applicable?
[N/A] (c) Did you include the estimated hourly wage paid to participants and the total amount spent on participant compensation?
[N/A]
A Experimental details A.1 A detailed description of datasets
For the main experiments, we evaluate our method on the Colored MNIST, Corrupted
CIFAR-10, and BFFHQ.
The example images of each datasets are shown in Figs.
6 to 8.
The Corrupted CIFAR-10 is a modified version of the CIFAR-10 dataset [17] which is constructed by applying different types of corruptions.
Specifically, each class is corrupted with one specific type of corruption from the following: B RIGHTNESS , C ONTRAST , D EFOCUS B LUR , E LASTIC
T RANSFORM , F ROST , G AUSSIAN B LUR , G AUSSIAN N OISE , I MPULSE N OISE , P IXELATE , and
S ATURATE .
For the Colored MNIST and Corrupted CIFAR-10, we report the accuracy on the unbiased test set.
The BFFHQ [15] is a subset of the FFHQ dataset [12] constructed for evaluating debiasing methods.
For the BFFHQ, we follow prior work [20] and report the accuracy on the test set consisting of bias-conflicting examples.
The datasets are available in the official repository of DFA [20].
A.2 Experimental details
Setup.
We use a three-layer MLP for the Colored MNIST and a ResNet18 [9] for {Corrupted CIFAR-10, BFFHQ} as the backbone architecture for all methods.
We set the batch size to 256 and 64 for {Colored MNIST, Corrupted CIFAR-10} and {BFFHQ}, respectively.
We train the models for 200 and 300 epochs for {Colored MNIST, BFFHQ} and {Corrupted CIFAR-10}, respectively.
To train our debiased model, we use the Adam optimizer with learning rates of 0.005, 0.001, and 0.
for the Colored MNIST, Corrupted CIFAR-10, and BFFHQ, respectively.
To train our auxiliary contrastive model, we use the Adam optimizer with learning rates of 0.01 and 0.001 for the Colored
MNIST and Corrupted CIFAR-10, respectively, and use the SGD with a learning rate of 0.4 for the BFFHQ.
We did not use any additional augmentations to train the auxiliary model.
Most of the experiments were run on a single RTX 3090 GPU.
Implementation details.
In the experiments, we combine our method with the vanilla ResNet (V+Ours) and LfF (L+Ours).
To train the debiased model f θ , we update θ with L total = λ base L base ( B )+ λ ours L CE ( (cid:101) B ) , where B = { ( x i , y i ) }
Bi =1 is the batch,
(cid:101) B
= { (˜ x i , ˜ y i ) }
Bi =1 is the batch of the mixup samples (See Alg. 1), and L base is the update rule of the base algorithm for the debiased model (e.g., CE loss for the vanilla ResNet18).
We used ( λ base , λ ours ) =
(0 , 1) for V+Ours, which corresponds to line 7 in Alg.
2 (i.e., update θ with L CE ( (cid:101) B ) ) and ( λ base , λ ours ) =
(1 , 0 . 1) for L+Ours.
Note that the training of the auxiliary biased model is agnostic of the base
algorithm (e.g., Vanilla or LfF).
We fixed the temperature τ = 0 .
2 (hyperparameter of the contrastive loss) and q = 0 . 7 (hyperparameter of the GCE loss and GSC loss) for all experiments.
For the major hyperparameters (i.e., λ base , λ ours , and τ ) of our method, we used the fixed values across the datasets and varying ratios.
For the hyperparameters of the baselines, we used their default choice, even if the optimal values may vary for the different ratios in the same dataset.
Since there is no provision for an unbiased validation set
[Figure]
in most existing benchmarks, we follow the evaluation protocol of prior works [1, 20, 24] and report the best accuracy (i.e., an “oracle” model selection).
Experimental results on the Corrupted CIFAR and the BFFHQ have averaged over 3 independent trials.
For the Colored MNIST, we report the average test accuracy over 5 independent trials.
Label noise experiment.
For the label noise experiments in Fig.
3, we modify the Colored MNIST ( α = 1% ) and the Corrupted CIFAR-10 ( α = 1% ) by replacing the label with a random one (i.e., label noise) for a portion β ∈ { 0 .
5% , 1% , 2% , 5% } of the training examples.
We used the same hyperparameters for the label noise experiments and the main experiments.
B Additional experiments B.1 Identifying contradicting pairs
We compare our biased model with the model trained with the GCE loss, in terms of the accuracy of identifying contradicting positives and negatives on the Corrupted CIFAR-10 dataset.
As shown in
Fig.
9, our biased contrastive model better identifies the contradicting pairs, especially for discovering contradicting negatives.
This implies that the GSC loss effectively clusters the examples with respect to the biased features, which corroborates the results of Table 2.
B.2 Bias-conflict accuracy
In this subsection, we provide the bias-conflict accuracy (i
[Table]
e., the accuracy of the bias-conflicting examples) of the baselines and our method.
As shown in Table 6, our method outperforms the baselines in terms of the bias-conflict accuracy as well.
[Table]
B.3 Comparison with JTT
In this subsection
[Table]
we provide a comparison with JTT [22].
Table 7 shows the test accuracy of
JTT and of our method.
We used grid-search to choose the hyperparameters of JTT, i
[Table]
e., the first stage training epoch T and the upsampling ratio λ as follows: T ∈ { 1 , 5 , 10 , 20 , 30 , 50 } and λ ∈ { 5 , 10 , 30 , 50 , 100 } .
[Table]
B.4 Experiments on the UTKFace dataset
Dataset.
The UTKFace dataset is composed of various human face images.
The dataset contains labels for race, age, and gender.
Fig. 10 shows the example images of the UTKFace dataset.
Following the prior work [11], we divide the samples into two groups for each label and compose a biased sub-dataset.
We defer the details to [11].
Training details.
For the debiased model, we use a ResNet18 pretrained on the ImageNet dataset as a backbone architecture and use the Adam optimizer with a weight decay of 0.0001.
We set an initial learning rate of 0.001 when the label is either gender or race, and 0.0005 when the label is age.
We use the mixup of the contradicting positives for SelecMix.
We use ( λ base , λ ours ) =
The learning rate is decayed by a factor of 10 at 1/3 and 2/3 of the total training epochs, following the prior work [11].
For the auxiliary contrastive model, we use ResNet with the SGD optimizer.
We train the models for 40 epochs with a batch size of 128.
We use the data augmentations of random resized crop and random horizontal flip.
Experimental results.
As shown in Table 8, our method consistently outperforms the baselines for various compositions of target and bias features.
This implies that the proposed method successfully scales to the complex real-world datasets which the prior works struggles on.
[Table]
C Additional discussions C.1 Extended related work
JTT [22] proposed a 2-stage training framework to improve the group robustness without the group information.
In the first stage, they train the vanilla network with ERM and construct the error set consists of the misclassified samples.
In the second stage, they oversample examples of the error set to train the second network.
JM1 [8] also constructs the error set and utilizes class-conditional mixup to further improve the group robustness.
In the transfer learning setting, Bao et al.
[3] learns spurious features from multiple environments and constructs the metric space based on the spurious features.
In contrast, our method exploits the easy-to-learn heuristic and learns the hypersphere embedding space with the proposed GSC loss.
We now discuss the difference between JM1 [8] and our method, in particular, SelecMix (A).
While class-conditional mixup is utilized in both our method and JM1, the key difference is in the sampling of the pairs for the mixup.
They combine the misclassified sample from the vanilla model with the sample that has the same label randomly chosen from the rest.
On the other hand, SelecMix (A) combines the contradicting pair having the same label but the most dissimilar biased features, by measuring the similarity with the biased model.
C.2 Discussion on the relationship between GCE and GSC losses
In this subsection, we discuss the relationship between the generalized cross-entropy (GCE) loss [40] and the proposed GSC loss.
To begin with, we first explain how the GCE loss amplifies the reliance of the auxiliary model on biased features, compared to the standard cross-entropy (CE) loss.
The GCE loss is defined as L GCE ( p , y ) =
(1 − p qy ) / q where p is the softmaxed vector of predictions from the model and p y its y th component, y is the ground truth class ID, and q ∈ (0 , 1] a scalar hyperparameter.
The GCE loss simplifies to the CE loss as q → 0 .
Assuming that the predictions are produced by a model of parameters θ , the gradients of the GCE and CE losses are related as follows:
[Equation]
Here, the term p qy assigns the higher weight to the samples with a high probability p y , thus upweights the "easy" samples and amplifies the reliance on the biased features.
While the model trained with the
CE loss also focuses on the biased features since they are learned first, the GCE loss was shown to be more effective in identifying bias-conflicting examples by Nam et al.
Similar to the GCE/CE, our GSC loss improves over the SC loss [13] in encouraging the model to rely primarily on biased features.
The term ˆ p qi,k in Eq.
(3) plays the same role as the term p qy in the GCE.
C.3 A discussion comparing SelecMix with explicit bias labels and LISA
As described in Sec. 4.3, LISA [35] is a similar mixup strategy that applies mixup on contradicting positives and negatives.
When the explicit bias label is available, SelecMix also directly picks the contradicting pairs and applies mixup.
Here, the key difference is that (i) SelecMix does not mix the labels, and (ii) SelecMix always assigns the higher weight to the selected sample.
Thus, SelecMix more explicitly augment various bias-conflicting samples, compared to LISA.
As shown in Table 5, the performance gap between SelecMix and LISA is significant for the small α .
This also implies that SelecMix is effective for debiased learning on the highly biased dataset.