On Feature Learning in the Presence of Spurious Correlations
Anonymous Author(s)
AffiliationAddress email
Abstract
Deep learning classifiers are known to rely on spurious correlations — patternswhich are semantically irrelevant but predictive of the target on the training data.
In this paper we explore the quality of feature representations learned by standardempirical risk minimization (ERM) and specialized group robustness training,as well as the effect of key factors including architecture, pre-training strategy,regularization and others.
Following recent work on Deep Feature Reweighting(DFR), we evaluate the feature representations by re-training the last layer of themodel on a held-out set where the spurious correlation is broken.
Through thisprocedure, we reveal how much information about the core semantic features iscontained in the learned representations.
On multiple vision and NLP problems,we show that the features learned by simple ERM are highly competitive withthe features learned by specialized group robustness methods targeted at reducingthe effect of spurious correlations.
Moreover, we show that the quality of learnedfeature representations is largely affected by the choice of data augmentation,model architecture and pre-training strategy.
On the other hand, we find that strongregularization, and long training are generally not helpful for improving the learnedfeature representations.
Finally, using insights from our analysis, we significantlyimprove upon the best results reported in the literature on the popular Waterbirds,
CelebA hair color prediction and WILDS-FMOW problems, achieving 97%, 92%and 50% worst-group accuracies respectively.
Introduction
Spurious features, patterns that are predictive of the target on the training data, but irrelevant tothe true labeling process, are a significant problem in modern deep learning [17].
Neural networkclassifiers are known to rely on the spurious features such as backgrounds [87] or texture [18] incomputer vision and specific words or constructions in natural language processing [52, 20].
Inextreme cases, neural networks completely ignore task-relevant core features and only use spuriousfeatures in their predictions [91, 73].
In recent work, Kirichenko et al.
[37] showed that, surprisingly, standard Empirical Risk Minimization (ERM) learns a high-quality representation of the core features on datasets with spuriouscorrelations, even when the model primarily relies on spurious features to make predictions.
Moreover,they showed that it is often possible to recover state-of-the-art performance on benchmark problems by simply retraining the last layer of the model on a small held-out dataset where the spuriouscorrelation does not hold.
This procedure is called Deep Feature Reweighting (DFR).
However, while
Kirichenko et al.
[37] showed that DFR with ERM training can match state-of-the-art worst groupperformance, they did not attempt to combine DFR with group robustness methods, hypothesizing that such combination may further improve performance
In this paper, we provide an in-depth study of the factors that affect the quality of learned representations in the presence of spurious correlations.
Following Kirichenko et al.
[37], we break theproblem of learning a robust classifier into two tasks: extracting feature representations and training alinear classifier on these features.
In order to study the feature learning in isolation, we use the DFRprocedure to learn an optimal linear classifier on the feature representations, and evaluate the featureslearned with different training methods, neural network architectures, and hyper-parameters.
First, on a range of problems with spurious correlations we show that while specialized group robustness methods such as group distributionally robust optimization (Group DRO) [70] can significantlyoutperform the standard ERM training, the quality of the features learned by ERM is highly competitive, and by applying the DFR procedure to the features learned by ERM and Group DRO we achievesimilar performance.
Furthermore, we show that the performance improvements of Group DROare largely explained by the better weighting of the learned features in the last classification layer,and not by learning a better representation of the core features.
This observation has high practicalsignificance, as the problem of training the last layer of the model is much simpler both conceptuallyand computationally than training the full model to avoid spurious correlations [37].
Next, focusing on the ERM training, we explore the effect of model class, pretraining strategy andregualarization on feature learning.
We find a linear dependence between the in-distribution accuracyof the model and the worst group accuracy after applying DFR, meaning that good generalizationimplies good feature learning, even in the presence of spurious features.
Further, we show that thepre-training strategy and data augmentation have a very significant effect on the quality of the learnedfeatures, while regularization and length of training have a limited effect for most benchmarks.
Finally, by finetuning a state-of-the-art ConvNext model [48], we significantly outperform the bestreported results on the popular Waterbirds [70], CelebA hair color and WILDS FMOW [40] spuriouscorrelation benchmarks, using only simple ERM training followed by DFR.
Related Work
Numerous works describe how neural networks can rely on spurious correlations in real worldproblems.
In vision, neural networks can learn to rely on an image’s background [87, 70, 57],secondary objects [42, 67, 76, 74, 2, 56], object textures [18] and other semantically irrelevantfeatures [8, 45].
Spurious correlations are especially problematic in high-risk domains such asmedical imaging, where it was shown that neural networks can use hospital-specific metal tokens[91] or cues of disease treatment [61] rather than symptoms to perform automated diagnosis on chest
X-ray images.
Spurious features are also extremely prevalent in NLP, where models can achieve goodperformance on benchmarks without properly solving them [60, 20, 34, 52].
For a comprehensivesurvey of the area, see Geirhos et al.
Because of the high practical significance of spurious correlations, many group robustness methodshave been proposed.
These methods aim to reduce the reliance of deep learning models on spuriouscorrelations and improve worst group performance.
Group DRO [70] is the state-of-the-art grouprobustness method, which minimizes the worst-group loss instead of the average loss.
Other worksfocus on automatically identifying the minority group examples [46, 58, 12], learning several diverseclassifiers that use different features [44, 62, 79] or using partially available group labels [77, 59].
Group subsampling was shown to be a strong baseline for some benchmarks [32, 72].
In this work, we focus on feature learning in the presence of spurious correlations.
Hermann and
Lampinen [29] perform a conceptually similar study, but focusing on synthetic datasets.
Similarto their work, we explore how well the different features of the data can be decoded from thefeatures learned by deep neural networks.
Lovering et al.
[50] explore the factors which affectthe extractability of features after pre-training and fine-tuning of NLP models.
Kaushik et al.
[33]construct counterfactually augmented sentiment analysis data (CAD) and show that combining CADwith the original data removes reliance on spurious correlations.
Kaushik et al.
[35] explain theirobservations and show that while adding noise to causal features degrades in-distribution and out-ofdistribution performance, adding noise to non-causal features improves robustess.
Eisenstein [16] and Veitch et al. [80] formally define and study spurious features in NLP from the perspective of causality. Hermann et al.
[28] explore the feature learning in the context of texture bias [18], finding that dataaugmentation has a profound effect on the texture bias while architectures and training objectives havea relatively small effect.
Suvra Ghosal et al.
[78] show that Vision Transformer models pretrained on ImageNet22k [41] significantly outperform standard CNN models on several spurious correlationbenchmarks.
Finally, Kirichenko et al.
[37] show that models trained with standard ERM trainingoften learn high-quality representations of the core features, and proposed the DFR procedure (see Section 3) which we use extensively in this paper.
While we build on the observations of Kirichenko et al.
[37], our work provides profound new insightsand greatly expands on the scope of their work.
In particular, we explore the feature representationslearned by methods beyond standard ERM, explore the effect of model architecture, pre-training,regularization and data augmentation.
We also extend our analysis beyond the standard spuriouscorrelation benchmarks studied by Kirichenko et al.
[37],by considering NLP problems as well as challenging real world satellite imaging and chest X-raydatasets.
Background
Preliminaries.
We consider classification tasks with inputs x ∈ X and classes y ∈ Y .
We assume 103 that the data distribution consists of groups
G which are not equally represented in the train data.
Thedistribution of groups can change between the training and test distributions, with majority groupsbecoming less common or minority groups becoming more common.
Because of the imbalance intrain data, models trained with ERM often have a gap between average and worst group performanceon test.
Throughout this paper, we will be studying worst group accuracy ( WGA ), i.e. the lowesttest accuracy across all the groups G .
For most problems considered in this paper, we assume thateach data point has an attribute s ∈ S which is spuriously correlated with the label y , and the groupsare defined by a combination of the label and spurious attribute: G ∈ Y × S .
In test distribution 111 we might find that s is no longer correlated with y , and thus a model that has learned to rely on thespurious feature s during training will perform poorly at test time.
Models that rely on the spuriousfeatures will typically achieve poor worst group accuracy, while models that rely on core features willhave more even accuracies across the groups.
In Appendix A, we describe the groups, spurious andcore features in the datasets that we use in this paper.
In order to perform controlled experiments, weassume that we have access to the spurious attributes s (or group labels) for train or validation data,which are used for training of group robustness baselines and feature quality evaluation.
However,we emphasize that our results on the features learned by ERM hold generally, even when spuriousattributes are unknown, as ERM does not use the information about the spurious features: we onlyuse the spurious attributes to perform analysis.
Deep feature reweighting.
Suppose we are given a model m : X → C , where X is the input 122 space and
C is the set of classes.
Kirichenko et al.
[37] assume that the model m consists of a featureextractor (typically, a sequence of convolutional or transformer layers) followed by a classificationhead (typically, a single linear layer): m = h ◦ e , where e : X → F is a feature extractor and 125 h :
F → C is a classification head.
They discard the classification head, and use the featureextractor e to compute the set of embeddings ˆ D e = { ( e ( x i ) , y i ) } ni =1 of all the datapoints in thereweighting dataset ˆ D ; the reweighting dataset is used to retrain the last layer of the model, andcontains group-balanced data where the spurious correlations does not hold.
Finally, they train alogistic regression classifier l : F → C on the dataset ˆ D e .
Then, the final model used on new test 130 data is given by m l = l ◦ e .
Thoughout this paper, we use a group-balanced held-out dataset (subsetof the validation dataset where each group has the same number of datapoints) as the reweightingdataset ˆ D ; Kirichenko et al. [37] denote this variation of the method as DFR ValTr .
Experimental Set-Up and Evaluation Procedure
Here, we describe the datasets, models and evaluation procedure that we use throughout the paper.
Datasets.
In order to cover a broad range of practical scenarios, we consider four image classification and two text classification problems.
• Waterbirds [70] is a binary image classification problem, where the class corresponds to the
type of the bird (landbird or waterbird), and the background is spuriously correlated with the
class.
Namely, most landbirds are shown on land, and most waterbirds are show over water
• CelebA hair color [47] is a binary image classification problem, where the goal is to predictwhether a person shown in the image is blond; the gender of the person serves as a spuriousfeature, as 94% of the images with the “blond" label depict females.
• WILDS- FMOW [11, 40, 71] is a satellite image classification problem, where the classescorrespond to one of 62 land use or building types, and the spurious attribute s correspondsto the region (Africa, Americas, Asia, Europe, Oceania or Other; the “Other” region is notused in the evaluation).
We note that for the FMOW datasets the groups G s are defined bythe value of the spurious attribute, and not the combination of the spurious attribute and the
class label G y,s , as described in Section 3.
For more details, please see Appendix A.
• CXR-14 [83] is a dataset with chest X-ray images for which we focus on a binary classifica-
tion of pneumothorax prediction.
Oakden-Rayner et al.
[61] showed that there is a hidden
stratification in the dataset such that most images from the positive class contain a chest
drain, which is a non-causal feature related to treatment of the disease.
While for all other
benchmarks we report WGA on test data, for this dataset, following prior work [61, 44, 65],
we report worst group AUC because of the heavy class imbalance.
• MultiNLI [85, 70] is a text classification problem, where the task is to classify the relationship between a given pair of sentences as a contradiction, entailment or neither of them.
In this
dataset, the presence of negation words (e.g. “never”) in the second sentence is spuriouslycorrelated with the “contradiction” class.
• CivilComments [7, 40] is a text classification problem, where the goal is to classify whether
a given comment is toxic.
We follow Idrissi et al.
[32] and use the coarse version of the
dataset, where the spurious attribute is s = 1 if the comment mentions at least one of the
following categories: male, female, LGBT, black, white, Christian, Muslim, other religion;otherwise, the spurious label is 0 .
The presence of the eight categories above is spuriouslycorrelated with the comment being classified as toxic.
The Waterbirds, CelebA, CivilComments and MultiNLI datasets are commonly used to benchmarkthe performance of group robustness methods [see e.g. 32, 46, 59].
The FMOW and CXR-14 datasetspresent challenging real-world problems with spurious correlations.
In these datasets, the inputsdo not resemble natural images from datasets such as ImageNet [69], so models have to learn therelevant features from data to achieve good performance, and cannot simply rely on transfer.
Weprovide detailed descriptions of the data and show example datapoints in Appendix A.
Models.
Following prior work [70, 32] we use a ResNet-50 [24] model pretrained on ImageNet1k[69] on Waterbirds, CelebA and FMOW.
For the NLP problems, we use a BERT model [13] pretrained on Book Corpus and English Wikipedia data.
On the CXR-14, following prior work [e.g.65, 61, 44] we use a DenseNet-121 model [30] pretrained on ImageNet1k.
In Section 6, we providean extensive study of the effect of architecture and pretraining on the image classification problems.
Evaluation strategy.
We use DFR to evaluate the quality of the learned feature representations, asdescribed in Section 3.
Intuitively, with this procedure, we measure how well the core features canbe decoded from the learned representations.
In some of the experiments, we also train a classifierto predict the spurious attribute s instead of the class label y .
Using this classifier, we can evaluatethe decodability of the spurious feature from the learned feature representation.
We refer to thisprocedure as s -DFR and the corresponding worst group accuracy (in predicting the spurious attributes ) as DFR s -WGA.
Additionally, we evaluate the worst group accuracy and mean 2 accuracy of thebase model without applying DFR, which we refer to as base WGA and base accuracy respectively.
ERM vs Group Robustness Training
Multiple methods have been proposed for training classifiers which are more robust to spuriouscorrelations, with significant improvements in worst group accuracy compared to standard ERM.
In
W o r s t G r o up
A cc u r a c y
Waterbirds
CelebA
FMOW
CXR
MultiNLI
Civil Comments
ERM DFR Improvement
RWY DFR Reduction
RWY-ES
RWG
RWG-ES
GDRO
GDRO-ES this section, we use DFR to investigate whether the improvements of group robustness methods arecaused by better feature representations or by better weighting of the learned features.
Methods.
We consider 4 methods for learning the features.
ERM or Empirical Risk Minimizationis the standard training on the original training data.
RWG reweights the loss on each of the groupsaccording to the size of the group and RWY reweights the loss on each class according to the sizeof the class [32]. Group DRO [70] is a state-of-the-art method which uses the group informationon the training data to minimize the worst group loss instead of the average loss. Group DRO isoften considered as an oracle method or upper-bound on the worst group performance under spuriouscorrelations [46, 12]. On the CXR dataset the group labels are not available on the train data, so we cannot apply RWGor Group DRO; on this dataset we compare ERM to RWY.
On several datasets, the performance of
RWY and RWG methods deteriorates during training.
For these datasets, we additionally report theresults for the checkpoint obtained with early stopping (RWY-ES and RWG-ES).
Hyper-parameters selection.
We train ERM models, RWG and RWY with the same hyperparameters shared between all the image datasets (apart from batch size which is set to 32 on
Waterbirds, and 100 on the other datasets) and between the natural language datasets.
We do nottune the hyper-parameters of these methods for worst group accuracy.
For Group DRO, we run agrid search over the values of the generalization adjustment C , weight decay and learning rate hyperparameters, and select the best combination according to the worst-group accuracy on validation datawith early stopping.
For details, please see Appendix B.
5.1 Results
We compare feature learning methods on all datasets in Figure 1.
As expected, the worst groupaccuracy of group robustness methods is significantly better than the ERM worst group accuracy onmost datasets.
For example, on Waterbirds, ERM only gets 68 . 8% WGA, while group DRO withearly stopping gets 90 .
However, after applying DFR the performance of ERM and Group DROis very close, with a slight advantage for ERM ( 91 .
1% for ERM and 90% for Group DRO), andsimilar observations hold on all datasets.
The results for RWG and RWY are analogous.
Namely, when combined with early stopping, thesemethods outperform ERM on base model performance.
Once we apply DFR, however, the gap inperformance between the methods becomes very small.
In fact, on all the datasets and for all themethods the improvement in worst group accuracy from using any of the considered group robustnessmethods compared to ERM does not exceed 1 – 2% after applying DFR.
These results suggest that the improvements over ERM in base model performance for methods suchas Group DRO and RWG are largely the result of better weighting of the learned features rather thanlearning better representations of the core features.
Indeed, if the core feature was better represented by group robustness methods, we would expect to see a significant improvement over ERM afterapplying DFR.
This observation is significant both practically and scientifically.
Practically, the problem of trainingthe last layer is simpler, more data efficient and less compute intensive than retraining the full model[37].
Our results suggest that practitioners can primarily focus on retraining the last layer, as trainingthe feature extractor model with group robustness methods does not provide significant improvements.
Scientifically, robustness to spurious correlations is often implicitly or explicitly associated with thequality of learned feature representations [e.g. 3, 4, 68, 94, 44, 93].
Our results suggest that the qualityof feature representations is not significantly affected by Group DRO, refining our understanding ofgroup robustness training and representation learning in the presence of spurious correlations.
Effect of early stopping.
Early stopping is crucial to achieving strong base model performance with
RWY, RWG and Group DRO on many of the datasets.
In Figure 1 we report the results both with andwithout early stopping on datasets where the validation worst group accuracy significantly degradesover the course of training.
Generally, early stopping does not appear to significantly improve thequality of the learned feature representations even in these problems: after applying DFR, methodswith and without early stopping achieve similar performance.
For ERM, we explore the DFR WGAperformance as a function of the training step in Section 7 also finding that the length of training hasa relatively small effect on the final DFR WGA.
[Figure]
Group DRO analysis.
In Figure 2 we report the worstgroup accuracy of multiple Group DRO runs before and afterapplying DFR.
For each run, we evaluate the best checkpointaccording to validation accuracy (i.e. the checkpoint selectedby early stopping) and the last checkpoint saved after a fixednumber of epochs.
We observe that while the last checkpointsperform poorly in terms of base WGA in most runs, DFRcan significantly improve their performance, removing theneed for early stopping.
Interestingly, we find that the bestperforming Group DRO models cannot be improved by DFRon each of the datasets.
This result suggests that the weightingof the features learned by Group DRO is already close tooptimal, again indicating that the success of Group DRO can largely be attributed to learning a betterweighting for the features in the last linear layer, rather than learning better features.
Effect of the Base Model
Most of the prior work on spurious correlation considers a fixed model class for each problem: forexample, on Waterbirds and CelebA datasets almost all the papers use a ResNet-50 base modelpre-trained on ImageNet1k [e.g. 70, 46, 44, 37, 77, 59, 94].
Recently, Suvra Ghosal et al.
[78]showed that vision transformer models [14] may provide better robustness to spurious correlations ifpretrained on a large dataset.
Here, we perform a systematic large-scale evaluation of the effect ofbase model choice on the quality of learned feature representations.
6.1 Effect of the architecture and pretraining strategy
In Figure 3, we plot the base model mean and worst group accuracy and DFR worst group accuracyfor a wide range of models and pretraining strategies on each of the four image classification datasets.
We provide complete results, model descriptions and training hyper-parameters in Appendix C. Wetrain a total of 78 models on Waterbirds, 78 on CelebA, 40 on FMOW and 40 on CXR.
Accuracy on the line.
Miller et al.
[55] showed that for many distribution shifts in practice the outof-distribution performance is highly correlated with the in-distribution generalization performance.
In Figure 3 (left 4 panels), for each dataset we show scatter plots of base model mean accuracy vsbase model worst group accuracy, analogously to Miller et al.
For FMOW (which was alsoconsidered by Miller et al.
[55]) we observe a linear correlation between the base model mean andworst group accuracies.
On CXR, the dependence is also roughly linear.
However, both on CelebAand on WaterBirds, the correlation does not appear entirely linear.
In particular, on waterbirds thereis a large number of models that have similar worst group accuracy ≈ 20% , for which there appears [Figure] correlated with base model in-distribution performance. For the base model WGA, the correlation with in-distribution performance is not entirely linear.
Generally, models with better in-distribution performance provide better worst-group performance and better core feature representation.
to be little correlation between the Base model WGA and mean accuracy.
On CelebA, the samephenomenon occurs for the best performing models, with WGA between 40% and 50% .
DFR accuracy is on the line.
Next, in the right 4 panels of Figure 3, for each of the datasets wereport the base model mean accuracy vs DFR WGA.
On all datasets other than CXR 3 , we observe ahigh linear correlation between the metrics, including the Waterbirds and CelebA. In particular, themodels with the best mean (in-distribution) accuracy also achieve the best DFR WGA.
Note thatthis is not the case for the base model WGA on CelebA, where the best base model WGA is 51%achieved by a ResNet-101 model pretrained on ImageNet1k; this model only achieves mean accuracyof 95.45% compared to 96 . 2% accuracy for the ConvNext XLarge model.
The results in Figure 3confirm that models that achieve better accuracy on the training data distribution generally learnbetter representations of the core features, and provide better worst group accuracies with DFR.
ERM features are sufficient for SOTA performance.
The DFR WGA results for the Waterbirds,
CelebA and FMOW datasets significantly improve upon the previous best reported results, to thebest of our knowledge.
In particular, the ConvNext Large model pretrained on ImageNet22k with
ImageNet1k fineruning achieves 97.2% DFR WGA on Waterbirds and 92.2% on CelebA; on FMOW,we only considered smaller ConvNext versions due to computational constraints, still achieving 50.6%
DFR WGA with ConvNext Small pretrained on ImageNet22k; the current best results on the WILDSleaderboard for this dataset are 47 .
6% followed by 35 .
We note that our DFR evaluation usesthe validation set to train the last layer of the model, similarly to e.g. Nam et al.
[59], and unlike moststandard group robustness methods which only use the validation set to tune the parameters.
However,the results presented in this section prove that standard ERM with a strong pretrained model canachieve outstanding results on the robustness benchmarks, significantly improving upon specializedgroup robustness methods using a weaker model.
6.2 Does training on the target data improve features?
Above, we have shown that model architecture and pretraining have a large effect on the quality ofthe learned feature representations, as measured by DFR WGA.
It is then natural to ask how much ofthe feature learning happens during training on the target data, and how much is simply transferredfrom the pretraining task.
To answer this question, for the models trained in the previous section, werun the DFR evaluation on the initial weights of the models, before training on the target data.
Wereport the DFR WGA and DFR s -WGA results in Figure 4.
Surprisingly, we find that on Waterbirds, for most models the improvement from training on the targetdata is very small, if any.
For example, for the ImageNet1k-pretrained ResNet-50 model used bymost works on this dataset, we get 88 .
2% worst group accuracy by simply training the last layer onthe validation data with DFR.
After finetuning on the target data, we can achieve 92 .
9% DFR WGA.
[Figure]
A
[Figure] Furthermore, with the ConvNext Large model pretrained on ImageNet22k [Figure] we get 94% DFR WGAwithout training on the waterbirds data .
This strong performance is not particularly surprising, as
ImageNet22k has many of the Waterbirds bird types as classes.
The perfromance is almost unchangedby training on the target data: DFR WGA after training is 94 .
From these results, we can concludethat Waterbirds performance should not be used as a primary metric for feature learning performance,especially if large-scale pretraining is used!
Indeed, it is possible to achieve outstanding performance,exceeding the previously reported state-of-the-art, without training the features on the target data.
On the other datasets, the feature learning is more pronounced: the DFR WGA improves after trainingfor all the models considered.
However, on CelebA it is still possible to achieve 88 .
3% WGA withouttraining on the target data, with ConvNext XLarge pretrained on ImageNet22k.
Is the spurious feature representation improved during training?
We additionally explorethe quality of representation of the spurious feature via DFR s -WGA.
We show the results in
Figure 4(right).
Interestingly, on CelebA the spurious gender feature becomes less predictable duringtraining for many of the models.
On FMOW and CelebA there is no consistent trend, and the spuriousfeature does not become significantly more or less predictable during training.
6.3 Effect of pretraining strategy
Finally, using a fixed ResNet-50 model architecture we evaluate the effect of pretraining strategy.
Oneach of the four datasets, we train a ResNet-50 model initialized with (1) random initialization, (2)supervised pretraining, (3) DINO pretraining [9], (
4) SimCLR pretraining [10] and (5) Barlow Twinspretraining [90] on ImageNet1k.
We report the results in Figure 5(a).
On Waterbirds and FMOWdatasets, the randomly initialized model does not provide competitive performance.
On CelebA, it stillunderperforms the pretrained models, but the gap is much smaller.
Among all pretraining methods,supervised is preferable across the board, but the contrastive methods are highly competitive.
Effect of Regularization
Regularization is used to combat overfitting, including reliance on spurious features.
We considerthree regularization techniques: weight decay, data augmentation and reduced training length.
Effect of weight decay.
Using a ResNet-50 model pretrained on ImageNet1k, we run training witha range of weight decay values on each of the four datasets, and report the results in Figure 6.
Forthe base model WGA performance, it is generally helpful to set the weight decay to non-zero values.
Indeed, on CelebA the base model WGA for 0 weight decay is the worst across all weight decayvalues, losing to the best weight decay by ≈ 5% .
However, the 0 weight decay model is in fact thebest model according to DFR WGA!
On other datasets weight decay 0 also provides competitiveperformance.
FMOW is the only dataset considered where non-zero weight appears to be helpful forlearning high quality representations of the core features.
Effect of Data Augmentation.
Next, we consider 5 data augmentation policies: (1) no augmentations, (2) default augmentations, i.e. random crops and horizontal flips, (3) MixUp [92] combinedwith default augmentations, (4) Random Erasing [95], and (5) AugMix [27].
We train a {+ResNet-
+}
D F R W
G A
Waterbirds
CelebA
FMOW
CXR
Rand Init Supervised
Dino SimCLR
Barlow Twins   68  70  72
D F R W
G A
Waterbirds
CelebA
FMOW
CXR
No Aug Default
MixUp RandErase
AugMix  20 Epoch number 0.
CelebA  40 Epoch number 0.
FMOW
DFR WGA DFR s -WGA
Base WGA Base Acc
[Figure]
model pretrained on ImageNet1k on each of the four datasets with each of the augmentation policies,and report the results in Figure 5(b).
Augmix provides the best performance on each dataset.
However,we find that data augmentation is generally not required to achieve strong performance on any ofthe datasets: the model trained without augmentations is competitive across the board.
Moreover,data augmentation can hurt the learned features.
For example, while MixUp is helpful on Waterbirdsand CelebA, it significantly hurts the preformance on FMOW, with 30% DFR WGA compared to42% for the model trained without augmentation.
We hypothesize that on the FMOW dataset, whichcontains highly detailed satellite images, mixing the images makes training overly challenging.
[Figure]
Similarly, Random Erasing hurts the DFR WGA on Waterbirds.
We hypothesize that the randomly erased imageblock is more likely to fully cover the bird features thanthe background features, as the bird occupies a smallfraction of the image relative to the background.
Consequently, the model is incentivised to focus on the spurious feature: the model trained with Random Erasinglearned the highest quality representation of the spuriousfeature across all augmentations with DFR s -WGA of91 .
8 ± 0 .
1% across 3 runs, compared to e.g. 91 .
4 ± 0 .
5%for the model trained with no augmentation.
Effect of training length.
Finally, we study how thequality of feature representations changes during training.
In Figure 5(c) we plot the base model WGA andmean accuracy as well as the DFR WGA and DFR sWGA as a function of the training epoch on CelebA and FMOW.
The observations on the otherdatasets, including NLP, are analogous and we provide the corresponding plots in Appendix D.
Surprisingly, we find that on all datasets, the quality of the core feature representations as measuredby DFR WGA improve in the first epoch of training, and then stay roughly constant.
On all datasets,training for longer than 5 epochs does not help or hurt the performance.
Takeaways and Conclusion
Spurious correlations remain an important challenge for modern deep learning.
In this paper, we haveshown that standard ERM training learns feature representations that are similarly predictive of thecore features as the features learned by state-of-the-art group robustness methods such as group DRO.
Furthermore, we show that on many practical datasets, the quality of the learned representation ofthe core features improves linearly with the in-distribution generalization.
Using this intuition, wesignificantly improve upon the best worst group accuracy results reported in the literature using thefeatures learned by standard ERM.
We hope that our observations will be useful to both practitionerswho strive to achieve the best performance in the presence of spurious correlations, and researchers,who study representation learning and robustness to spurious correlations.