Original: Evaluating and Improving Robustness of Self-Supervised Representations to Spurious Correlations
Revised: Evaluating and Improving Robustness of Self-Supervised Representations to Spurious Correlations

Original: Anonymous Authors

Original: Abstract
Revised: Abstract

Original: Recent empirical studies have found inductive biases in supervised learning toward simple features that may be spuriously correlated with the label, resulting in suboptimal performance on certain subgroups.
Revised: Recent empirical studies have found inductive biases in supervised learning toward simple features that may be spuriously correlated with the label, resulting in suboptimal performance on minority subgroups.

Revised: Despite the growing popularity of methods which learn representations from unlabeled data, it is unclear how potential spurious features may be manifested in the learnt representations.

Original: In this work, we explore whether recent Self-Supervised Learning (SSL) methods would produce representations which exhibit similar behavior.
Revised: In this work, we explore whether recent Self-Supervised Learning (SSL) methods would produce representations which exhibit similar behaviors under spurious correlation.

Original: First, we show that classical approaches in combating spurious correlations, such as  re-sampling the dataset, do not necessarily lead to invariant representations during SSL.
Revised: First, we show that classical approaches in combating spurious correlations, such as dataset re-sampling during SSL, do not consistently lead to invariant representation.

Original: Second, we discover that spurious information is represented disproportionately heavily in the later layers of the encoder.
Revised: Second, we find that spurious information is represented disproportionately heavily in the later layers of the encoder.

Original: Motivated by these findings, we propose a method to remove spurious information from SSL representations during pretraining, by pruning or re-initializing later layers of the encoder.
Revised: Motivated by these findings, we propose a method to remove spurious information from these representations during pretraining, by pruning or re-initializing later layers of the encoder.

Original: We find that our method produces representations which outperform the baseline ondatasets, without the need for group or label information during SSL.
Revised: We find that our method produces representations which outperform the baseline on three datasets, without the need for group or label information during SSL.

Original: 1. Introduction
Revised: 1. Introduction

Original: Many real-world predictive tasks contain spurious correlations – features that are correlated with the label only for certain subsets of the data (Shah et al., 2020; McCoy et al., 2019; Gururangan et al., 2018).
Revised: Many real-world predictive tasks contain spurious correlations – features that are correlated with the label only for certain subsets of the data (Shah et al., 2020; McCoy et al., 2019; Gururangan et al., 2018).

Original: In such cases,  Empirical 
Revised: In such cases, where such correlations are easier to learn than the label itself (Nagarajan et al., 2020; Sagawa et al., 2020b), Empirical Risk

Original: Risk Minimization (ERM) models  make predictions based on correlations in the data which generalizes on average in the training set but results in systematically poor performance for minority subgroups (Hashimoto et al., 2018).
Revised: Minimization (ERM) models have been shown to make pre- by author dictions based on spurious correlations, leading to systematically poor performance for minority subgroups (Hashimoto et al., 2018).

Original: Such correlations may not exist in future test distributions, leading to performance drops in test distributions.

Original: For example, models trained to detect pneumonia (Zech et al., 2018) or COVID-

Revised: For instance, models trained to detect pneumonia (Zech et al., 2018) or COVID-

Original: (DeGrave et al., 2021) from chest X-rays across hospitals used the  hospitalID as a shortcut instead of focusing on the invariant pulmonary characteristics.
Revised: (DeGrave et al., 2021) from chest X-rays across hospitals use information about the source hospital as a shortcut for patient disease, rather than invariant pulmonary characteristics.

Original: There have been many methods proposed to tackle spurious correlations for supervised learning.
Revised: There have been many methods proposed to tackle spurious correlations for supervised learning.

Original: Some methods require group information during training (Sagawa et al., 2020a), while others do not (Liu et al., 2021a; Zhang et al., 2022).
Revised: Some methods require group information during training (Sagawa et al., 2020a), while others do not (Liu et al., 2021a; Zhang et al., 2022).

Original: However, all methods require group information for model selection.
Revised: However, all methods require group information for model selection.

Revised: The problem becomes more complex when we do not have access to label information.

Revised: For instance, unlabeled data with underlying latent features that could exhibit such correlations with downstream labels may be used for pre-text tasks, and biases caused by these correlations may propagate to downstream tasks.

Original: Recently, there has been a rise in the popularity of SelfSupervised Learning (SSL) methods, which seek to learn data representations from large, unlabeled datasets (Chen et al., 2020a;
Revised: Recently, there has been a rise in the popularity of SelfSupervised Learning (SSL) methods, which seek to learn data representations from large, unlabeled datasets (Chen et al., 2020a;

Original: He et al., 2019; Grill et al., 2020; Chen & He, 2020; Caron et al., 2020; Zbontar et al., 2021).
Revised: He et al., 2019; Grill et al., 2020; Chen & He, 2020; Caron et al., 2020; Zbontar et al., 2021).

Revised: In many real-world applications, important underlying features of the data that are necessary to be captured in the representations for downstream tasks, may be correlated with simpler features unrelated to these tasks.

Revised: We suspect that since SSL models can discriminate data samples in the majority groups using the simpler features, they may rely mostly on these features for the instance discrimination pre-text task.

Revised: As such, it is unclear how spurious correlations are reflected in representations that SSL models learn.

Revised: In this work, we consider a simple setting where we are interested in capturing one core feature in representations, which is correlated with a spurious , simpler feature.

Original: In this work, we ask the following questions: (1) Do SSL methods also have a bias towards learning representations which result in spurious correlations when a linear ERM model is trained on representations for downstream tasks?
Revised: In this setting, we ask the following questions: (1) Do SSL methods also have a bias towards learning representations which result in spurious correlations when a linear ERM model is trained on representations for downstream tasks?

Original: (2) If so, can we suppress such features from learnt representations during SSL, without access to any group or label information?
Revised: (2) If so, can we suppress such features from learnt representations during SSL, without access to any group or label information?

Original: We make the following contributions:
Revised: We make the following contributions:

Original: • We show that simple techniques for avoiding spurious correlations during supervised learning, such as reweighting (Idrissi et al., 2021) or re-sampling (Sagawa et al., 2020b) of the training set with group information, does not  improve representations learnt with SSL.
Revised: • We show that simple techniques for avoiding spurious correlations during supervised learning, such as reweighting (Idrissi et al., 2021) or re-sampling (Sagawa et al., 2020b) of the training set with group information, does not necessarily improve representations learnt with SSL.

Original: • We show that group information is correlated with features learned in the final layers of the network, and hypothesize that removing such information from the final layers can be beneficial.
Revised: • We show that group information is correlated with features learned in the final layers of the network, and hypothesize that removing such information from the final layers can be beneficial.

Original: • We propose a method to eliminate spurious feature information from representations learnt during SSL while maintaining discriminative ability for downstream predictive tasks, without access to group or label information.
Revised: • We propose a method to eliminate spurious feature information from representations learnt during SSL while maintaining discriminative ability for downstream predictive tasks, without access to group or label information.

Original: 2. Related Work
Revised: 2. Related Work

Original: Spurious Correlations Spurious correlations arise in supervised learning models in a variety of domains, from medical imaging (Zech et al., 2018;DeGrave et al., 2021) [Table] Dataset
Revised: Spurious Correlations Spurious correlations arise in supervised learning models in a variety of domains, from medical imaging (Zech et al., 2018;

Original: SSL Training

Original: [Table]

Original: waterbirds

Original: Normal

Original: [Table]

Original: Downsample

Original: [Table]

Original: metashift

Original: Normal

Original: [Table]

Original: Downsample

Original: [Table]

Original: spurcifar

Original: Normal

Original: [Table]

Original: Downsample

Original: [Table]

Original: Upsample

Original: [Table]

Original: cmnist

Original: Normal

Original: [Table]

Original: Downsample

Original: [Table] Upsample [Table] to natural language processing (Tu et al., 2020; Wang & Culotta, 2020).
Revised: DeGrave et al., 2021) to natural language processing (Tu et al., 2020; Wang & Culotta, 2020).

Original: A variety of approaches have been proposed to learn classifiers which do not make use of spurious information.
Revised: A variety of approaches have been proposed to learn classifiers which do not make use of spurious information.

Original: Methods like GroupDRO (Sagawa et al., 2020a) and
Revised: Methods like GroupDRO (Sagawa et al., 2020a) and

Original: DFR (Kirichenko et al., 2022) require group information during training, while methods like JTT (Liu et al., 2021a),
Revised: DFR (Kirichenko et al., 2022) require group information during training, while methods like JTT (Liu et al., 2021a),

Original: LfF (Nam et al., 2020), CVaR DRO (Duchi et al., 2019),
Revised: LfF (Nam et al., 2020), CVaR DRO (Duchi et al., 2019),

Original: CnC (Zhang et al., 2022) do not.
Revised: CnC (Zhang et al., 2022) do not.

Original: However, all methods require group information for model selection.
Revised: However, all methods require group information for model selection.

Original: Self-supervised Representation LearningSelf-
Revised: Self-supervised Representation Learning

Original:  supervised learning methods learn representations from large-scale unlabeled datasets where annotations are scarce and time-consuming.
Revised: Self supervised learning methods learn representations from large-scale unlabeled datasets where annotations are scarce.

Original: In the image setting, the pretext task is typically to maximize similarity betweenan image and its augmented view, or between two augmented views of the same image (Jing & Tian, 2020).
Revised: In vision applications, the pretext task is typically to maximize similarity between two augmented views of the same image (Jing & Tian, 2020).

Original: This can be done in a contrastive fashion using the InfoNCE loss (Oord et al., 2018), as in SimCLR (Chen et al., 2020a) and MoCo (Chen et al., 2020b), or without the need for negative samples at all, as in BYOL (Grill et al., 2020) and SimSiam (Chen & He, 2021).
Revised: This can be done in a contrastive fashion using the InfoNCE loss (Oord et al., 2018), as in SimCLR (Chen et al., 2020a) and MoCo (Chen et al., 2020b), or without the need for negative samples at all, as in BYOL (Grill et al., 2020), SwAV (Caron et al., 2020), SimSiam (Chen & He, 2021), and Barlow

Original: learning has been identified in contrastive learning (Robinson et al., 2021), and addressed by adversarially modifying encoded features.
Revised: Twins (Zbontar et al., 2021).

Original: Even though self-supervised models have been found to be more robust to dataset imbalance (Liu et al., 2021b),  Jiang et al.
Revised: Learning under Dataset Imbalance and Shortcuts Selfsupervised models have been found to be more robust to dataset imbalance (Liu et al., 2021b), and Jiang et al.

Original: (2021b;a); Liu et al.
Revised: (2021b;a); Liu et al.

Original: (2021b) further address the gap.
Revised: (2021b) further address the subgroup gaps.

Revised: Robinson et al.

Revised: (2021) addressed shortcut learning in contrastive learning by adversarially modifying encoded features.

Original: Other works in addressing group robustness or fairness in SSL, however, require group information or labels (Tsai et al., 2020; Song et al., 2019).
Revised: Other works in addressing group robustness or fairness in SSL, however, require group information or labels (Tsai et al., 2020; Song et al., 2019; Wang et al., 2021).

Original: Similar to our work, improving generalization of the  model through forgetting events via final-layer re-initialization, has been studied in the supervised setting (Zhou et al., 2022).
Revised: In the supervised setting, how subnetworks of a trained model can affect minority examples (Hooker et al., 2019) or out-of-distribution generalization (Zhang et al., 2021), and forgetting features via final-layer re-initialization (Zhou et al., 2022), have also been studied.

Original: For a more comprehensive summary of the background and related work, see Appendix A.
Revised: For a more comprehensive summary of the background and related work, see Appendix A.

Revised: 3. Methods 3.1. Problem Setup

Revised: We suppose that data is generated from underlying feature space Z = { z core , z spur , . . .

Original: 3. Motivation 3.1. SSL Suffers From Spurious Correlations
Revised: } , where z core and z spur are correlated for unlabeled data available for pre-text task, and z core determines labels y for our downstream task of interest, while z spur determines the spurious attribute, which is easier to learn, and is not of interest of downstream tasks. Our goal, is to be able to predict y from the learned representations in the downstream task where such correlations do not hold. 3.2. Investigating the Extent of Spurious Learning in SSL First, we design three experiments to establish the extent of spurious learning in SSL, and how easily it could be removed by simple solutions.

Original:  We  empirically evaluate learning of the invariant and spurious features on self-supervised representations.
Revised: Baseline Spurious SSL: We first empirically evaluate learning of the core and spurious features on self-supervised representations.

Original: We train 
Revised: We train SimSiam

Original: ResNet-18 encoders using SimSiam (Chen & He, 2020)  on 4 datasets containing spurious correlations (See Appendix 
Revised: (Chen & He, 2020) models with ResNet-18 backbones on 4 datasets containing spurious correlations (See Appendix B for dataset descriptions).

Original: B for dataset descriptions), and evaluate the learned representations using a balanced dataset which we create by subsampling majority groups (Sagawa et al., 2020b; Idrissi et al., 2021).
Revised: Then, we evaluate the learned representations using a balanced dataset which we create by subsampling majority groups (Sagawa et al., 2020b; Idrissi et al., 2021), to avoid the statistical and geometrical skews (Nagarajan et al., 2020) when training the linear classifier on representations.

Original: We use the balanced dataset to separately train two linear classifiers to distinguish labels and spurious attribute.
Revised: We use the balanced dataset to separately train two linear classifiers to predict labels and spurious attribute.

Original: From Table 1, we find that across all datasets, the worst-group accuracy and average accuracy for learning the spurious feature is higher. This motivates methods to remove spurious information from representations during SSL. 3.2. Re-sampling During SSL is Not Useful
Revised: Spurious Feature Removal Effectiveness using Group

Original:  In the next step, we examine whether classical approaches for combating spurious correlations, such as re-sampling training examples, are effective in removing spurious information during SSL.
Revised: Information: In the next step, we examine whether classical approaches for combating spurious correlations, such as re-sampling training examples, are effective in removing spurious information during SSL.

Original: Assuming that groupand label information are available, we train SimSiam on datasets re-sampled using the following strategies: (i) downsampling examples in majority groups to have the same number of examples in all groups, (ii) upsampling minority examples to have the same number of examples in all groups.
Revised: Assuming that group information is available, we train SimSiam on datasets resampled using the following strategies: (i) downsampling examples in majority groups to have the same number of examples in all groups, (ii) upsampling minority examples to have the same number of examples in all groups.

Original: From Table 1, we observe that re-sampling during SSL does not improve worst-group accuracy, and the model still has a better performance in learning the spurious feature.

Original: 3.3. Layer-Wise FeatureRepresentations
Revised: Investigating Spurious Signals in Layer-Wise Feature

Original: Given that conventional methods for combating spurious correlations during supervised learning do not work during

Original: SSL, we seek to come up with a method that is tailored to the SSL setting.
Revised: Representations: We also investigate methods that identify the sources of spurious correlation, tailored to the SSL setting.

Original: One crucial observation from prior work is that during supervised learning, overparameterized models have an inductive bias towards learning the spurious feature and “memorizing” the minority examples (Sagawa et al., 2020b).
Revised: One crucial observation from prior work is that during supervised learning, overparameterized models have an inductive bias towards learning the spurious feature and “memorizing” the minority examples, even after re-sampling or reweighting (Sagawa et al., 2020b).

Original: It has been also observed in the supervised setting that memorization predominately occurs in the deeper layers (Zhang et al., 2019; Stephenson et al., 2021) and that the representations in earlier layers of the network correctly classify the easier examples while the final layers memorize the difficult examples (Baldock et al., 2021).
Revised: It has been also observed in the supervised setting that memorization predominately occurs in the deeper layers (Zhang et al., 2019; Stephenson et al., 2021) and that the representations in earlier layers of the network correctly classify the easier examples while the final layers memorize the difficult examples (Baldock et al., 2021).

Original: We suspect that a similar phenomenon happens during SSL, as the spurious feature is easier to infer, and almost sufficient for the instance discrimination task.
Revised: We suspect that a similar phenomenon happens during SSL, as the spurious feature is easier to infer, and almost sufficient for the instance discrimination task.

Original: To verify this hypothesis, we evaluate the mutual information between feature representations across the layers of the trained encoder with (1) the labels I
Revised: To verify this hypothesis, we evaluate the mutual information between feature representations across the layers of the trained encoder with (1) the labels I

Original: ( Z ; Y ) , and (2) the spurious attribute
Revised: ( Z ; Y ) , and (2) the spurious attribute

Original: I ( Z ; G ) .
Revised: I ( Z ; G ) .

Original: From Figure 1, we see that spurious features are disproportionately represented in later layers of the network, while invariant features are represented throughout the network. This confirms our hypothesis that later layers contain more spurious information during SSL, and motivates our proposed method. 4. Method 4.1. Implicit Representation Augmentations
Revised: 3.3. Late-layer Transformation-based View Generation

Original: In the previous sections, we showed how overparameterized representation encoders can fail in cases where there are certain minority groups within the training samples. We further empirically showed that the final layers of the model tend to  be more predictive of the spurious feature.
Revised: Motivated by these experiments, we define Late -layer t ransformation-based v iew g eneration modules – Late-TVG . Assuming that z spur is easier to learn, and majority examples can be discriminated by this feature as well as z core , the core feature may not be fully captured in SSL representations.

Original: Moreover, recent findings on when these models fail to generalize to minority groups (Hooker et al., 2020), suggest that lowermagnitude weights tend to be responsible for classifying these examples.
Revised: However, if the positive pairs have the same z core but different or removed z spur , the encoder must learn the core features (Robinson et al., 2021).

Original: Motivated by these observation, we define a set of transformations; including re-initialization of the final layers [Figure] and pruning the final layers, on the encoder network, [Figure]
Revised: Motivated by how

Original: - tures and labels (top) vs. spurious attribute and labels (bottom). The first few layers are in charge of low-level features and statistics of the data, in the intermediate layers in the bottom figure, I ( Z ; G ) decreases, and in the final layers the representations rely on the spurious featurefor the instance discrimination task in SSL.
Revised: SSL models are invariant to the set of image augmentations imposed by the augmentation module, we propose a model transformation module, that specifically targets modifying the spurious feature in encoded examples, in order to improve core feature representation. More formally, we consider a model transformation module U , that transforms any given function f θ parameterized by θ = { W 1 , . . .

Original: which the model should be consistent in.
Revised: , W n } to f ˜ θ . At each step, we draw a transformation ϕ M,θ ′ form U to obtain transformed encoder f ˜ θ from f θ . Each model transformation can be defined with a mask M ∈ { 0 , 1 } | θ | = { M 1 , . .

Revised: , M n } , where we reparameterize the unmasked weights (1 − M ) ⊙ θ ′ (either reinitialize or set them to 0), and keep the rest of the weights

Revised: M ⊙ θ the same, thus ˜ θ =

Original: More formally, given two randomly augmented views xand x 2 from an image x , and a feature encoder f , at each step, given a transformed model ˜ f
Revised: ϕ M,θ ′ ( θ ) = M ⊙ θ +(1 − M ) ⊙ θ ′ . Transformations: In our experiments, we consider two types of transformation modules as below:

Revised: • Re-initialization of the final-layers ( SSL Reinit, L ):

Revised: Reinitializing the weights in layers deeper than L .

Revised: U Reinit, L = { ϕ M L ,θ Reinit | θ Reinit ∼ D θ } where M L is masking all weights before layer L or M L = { M lL | M lL = 1 ( l < L ) | W l | , l ∈ [ n ] } , and D θ is the parameter initialization distribution.

Revised: • Threshold Pruning ( SSL Prune, L, a ):

Revised: Magnitude pruning a % of the weights in all layers deeper than L .

Original:  that heavily effects the minority examples, or removes the undesired information, we want its outputs to be close to the original encoded examples in the representation space. 
Revised: U Prune, L, a = { ϕ M L,a ,θ 0 ; θ 0 = (0) | θ | } where M L,a = { M lL ⊙ Top a ( W l ) | l ∈ [ n ] } and Top a ( W l ) i,j = I ( W l ( i,j ) in top a % of θ ) Note that these transformation modules are designed to avoid memorization and forget representations of the minority examples, by removing the undesired information in the final layers, and we want the output of the transformed module to be close to the original encoded examples in the representation space. In other words, the model should be invariant to model transformations in the feature space, and thus these transformations can be considered as curated view generating operations for the minority groups.

Original: Suppose that we have such transformation.
Revised: This encourages the encoder to be invariant to final layer transfor- [Table] To learn these representations, given two random augmentations t, t ′ ∼ T from the augmentation module T , two views x 1 = t ( x ) and x 2 = t ′ ( x ) are generated from an input image x . At each step, given a feature encoder f , and an augmentation module U , we obtain a transformed model ˜ f

Original:  Duringthe SSL training, one example x 1 is passed through the normal encoder v 1 = f ( x 1 ) , and the other example x 2 is passed through the transformed encoder ˜ v 2 = ˜ f
Revised: = ϕ ( f ) , ϕ ∼ U . During training, one example x 1 is passed through the normal encoder v 1 = f ( x 1 ) , and the other example x 2 is passed through the transformed encoder ˜ v 2 = ˜ f

Original: ( x 2 ) .
Revised: ( x 2 ) .

Original: Encoded feature ˜ v 2 is now a positive example that should be close to v 1 in the representation space.
Revised: Encoded feature ˜ v 2 is now a positive example that should be close to v 1 in the representation space.

Original: In other words, such model transformations can be considered as curated view generating operations for the minority groups. The transformations that we use based on insights from theprevious section, for an encoder f with intermediate layers { f 1 , f 2 , . . . , f N = f } are: • Threshold Pruning:
Revised: In our experiments, we use SimSiam in which the encoder f aims to maximize the cosine similarity of the two views via predictor network h , and a stop-gradient operator as in Figure 1.

Original: Magnitude pruning a % of the weights in all layers l < L deeper than L (SSL Thres, L, a ) • Re-initialization of the final-layers: Re-initializing the weights in layers l < L deeper than l (SSL Reinit, L ) We hypothesize that these transformations force the encoder to represent the features in the earlier layers of the network. For instance, when re-initializing, examples should have a consistent representation for different possible values of the final layers. Thus, the undesirable information associated with difficult or minority examples is removed which leads representing more complex features.
Revised: Given previously defined features v 1 and ˜ v 2 , the cosine similarity D ( h ( v 1 ) , stopgrad (˜ v 2 )) will be maximized at each step.

Original: [Table] 5. Results We train SimSiam models with ResNet-18 backbones on four spuriously correlated datasets (See Appendix B for dataset descriptions).
Revised: Experimental Setup: We train SimSiam models with proposed transformed modules.

Original: For simplicity, We keep the pruning percentage and re-initialization or pruning thresholdfixed throughout training.
Revised: For simplicity, we use one module with a fixed pruning percentage and layer threshold throughout training.

Original: At each step t , given these hyperparameters, the fixed transformation is applied to encoder f t to generate the transformed model ˜ f t .
Revised: At each epoch t , given a transformation from the fixed module is applied to encoder f t to generate the transformed model ˜ f t .

Original: The model transformations are applied to the branch of SimSiam that a gradient-stop operation is applied to later.
Revised: The model transformations are applied to the branch of SimSiam that a gradient-stop operation is applied to later.

Original: We use group information in the validation set and measure worst-group accuracy in order to choose layer threshold and pruning percentage hyperparameters (In Appendix D we show that even an uncurated set of model transformations enhance worst-group performance)
Revised: We use group information in the validation set and measure worst-group accuracy in order to choose layer threshold and pruning percentage hyperparameters (In Appendix D we show that even an uncurated set of model transformations enhance worst-group performance), and evaluate them similar to previous experiments. [Equation] [Table] [Figure]

Original: Then, we evaluate the learned representations using a balanced dataset which we create by subsampling majority groups, toavoid the statistical and geometrical skews (Nagarajan et al., 2020) when training the linear classifier.
Revised: From Table we find that across all datasets SSL models exhibit gaps between worst-group and average accuracy when predicting the core feature indicating that even when spurious correlation does not hold for downstream tasks the learnt features are more predictive of the spurious feature in comparison to the core one. This is in contrast with supervised learning (Rosenfeld et al., 2022) where such

Original: Table 2 shows that the worst-group accuracy ofthe linear classifier is improved by up to more than 30% on spurcifar10 .
Revised: [Table] of linear contain enough core information to perform well on subgroups, and needing a re-training of the final layer on a balanced validation set (Menon et

Original: However, it does not improve the worstgroup accuracy in metashift .
Revised: From Table we observe that re-sampling during selfsupervised training does not improve downstream worstgroup accuracy. Given that the downstream linear model is trained on a down-sampled dataset where such correlations do not exist, this means that re-sampling during self-supervised training does not necessarily improve linear separability of representations with respect to the core feature, even in balanced datasets. 4.3. Layer-Wise Feature Representations

Original: The cats vs dogs task in the metashift datset is originally created by gathering different subsets of pet images that appeared in an image with an object associated with indoor or outdoor.
Revised: In Figure 2, we see that spurious features are disproportionately represented in later layers of the network, while invariant features are represented throughout the network. This confirms our hypothesis that later layers contain more spurious information during SSL, and motivates our proposed method. 4.4. Transformation-based Disentanglement in Final Layers Improves Worst-group Performance As shown in Table 2, Late-TVG improves the worst-group accuracy of the linear classifier is improved by up to more than 10% on spurcifar10 .

Original:  We suspect thatthe spurious feature in thiscase, is not significantly easier to infer, which would lead topoor performance i any approach that would assume that the spurious feature is easier to infer.
Revised: However, it does not seem to improve the worst-group accuracy in metashift . We suspect that this is due to the spurious feature (outdoor vs. indoor) being more difficult to infer than the invariant feature, which violates the assumptions of our method.

Original: 6. Discussion
Revised: 5. Conclusion

Original: We studied the performance of SSL models when trained on spuriously correlated data, and showed that the invariant features is not very well distinguished in many cases.
Revised: We studied the performance of SSL models when trained on spuriously correlated data, and showed that the core feature is not very well distinguished in many cases.

Original: We further examined whether re-sampling approaches can help mitigate this problem.
Revised: We further examined spurious learning in SSL models.

Original: We show that  without having access to group or label information, the worst-group downstream performance can be improved.
Revised: Finally, we proposed a method - Late-TVG - that improves the worst-group downstream performance of SSL models without having access to group or label information, and empirically validated its performance on four datasets.

Revised: Future work include benchmarking other SSL methods such as SimCLR (Chen et al., 2020a), and adapting the method to other modalities such as natural language (Tu et al., 2020), and considering multiple core features in the underlying feature space.

Original: A. Related Work  A.1. Group Robustness
Revised: A. Related Work and Background A.1. Group Robustness

Original: Empirical risk minimization (ERM)Empirical risk minimization minimizes the average training loss across training points.
Revised: Empirical risk minimization (ERM) minimizes the average training loss across training points.

Original: Given a loss function ℓ ( x, y ; θ ) : X × Y × Θ → R [Equation] e.g. cross-entropy loss), ERM minimizes the following objective:
Revised: Given a loss function ℓ ( x, y ; θ ) , ERM minimizes the following objective:

Original: [Equation]
Revised: [Equation]

Original: Group distributionally robust optimization (Group DRO)Group DRO uses training group annotations to minimize the worst-group error on the training set, assuming we have access to group annotations on the training datasuch that the n training points are { ( x 1 , y 1 , g 1 ) , . . .
Revised: Group distributionally robust optimization (Group DRO) uses training group information to minimize the worst-group error on the training set, assuming we have access to group annotations on the training data { ( x 1 , y 1 , g 1 ) , . . .

Original: ( x n , y n , g n ) } .
Revised: ( x n , y n , g n ) } .

Original: For some loss function ℓ ( x, y ; θ ) , thegroup DRO objective can then be written as:
Revised: Given a loss function ℓ ( x, y ; θ ) , the objective can then be written as:

Original: [Equation]
Revised: [Equation]

Original: where n g is the number of training points with group g i
Revised: where n g is the number of training points with group g i

Original: = g .
Revised: = g .

Original: Just Train Twice (JTT)JTT is a simple two-stage approach that does not require group annotations at training time.
Revised: Just Train Twice (JTT) is a simple two-stage approach that does not require group annotations at training time.

Original: First, it trains an identification model ˆ f id via ERM and then identifies an error set E = { ( x i , y i ) s.t.
Revised: First, it trains an identification model ˆ f id via ERM and then identifies an error set E = { ( x i , y i ) s.t.

Original: ˆ f id ( x i ) ̸
Revised: ˆ f id ( x i ) ̸

Original: = y i } of training examples that ˆ f id misclassifies.
Revised: = y i } of training examples that ˆ f id misclassifies.

Original: Then, it trains a final model ˆ f final by upweighting the points in the identified error set. 
Revised: Then, it trains a final model ˆ f final by upweighting the points in the identified error set. [Equation]

Revised: Correct-n-Contrast (CnC) learns an idendification model similar to JTT to identify samples with the same class but dissimilar spurious features, and then trains a model with contrastive learning to learn similar representations for same-class samples.

Revised: More percisely, it jointly trains the model’s encoder layers f enc with a contrastive loss and the full model f θ with a cross-entropy loss with the following objective:

Original: [Equation]
Revised: [Equation]

Revised: Where ˆ L sup con ( f enc ; x, y ) is the supervised contrastive loss of x and its positive and negative samples, based on whether the identifier model has made a mistake on samples or no, and ˆ L cross ( f θ ; x, y ) is average cross-entropy loss over x , the M positives, and N negatives, and λ is a balancing hyperparameter.

Original: Correct-n-Contrast (CnC) A.2. Self-supervised Representation Learning
Revised: A.2. Self-supervised Representation Learning

Original: Self-supervised representation learning methods learn visual representations from large-scale unlabeled images where data annotations are scarce and time-consuming.
Revised: Self-supervised representation learning methods learn visual representations from large-scale unlabeled images where data annotations are scarce and time-consuming.

Original: Contrastive learning is a discriminative approach to learn representations that aims to attract similar or positive samples and push apart different or negative samples, which has become increasingly successful in recent years (Chen et al., 2020a;
Revised: Contrastive learning is a discriminative approach to learn representations that aims to attract similar or positive samples and push apart different or negative samples, which has become increasingly successful in recent years (Chen et al., 2020a;

Original: He et al., 2019; Grill et al., 2020; Caron et al., 2020; ? ).
Revised: He et al., 2019; Grill et al., 2020; Caron et al., 2020; Zbontar et al., 2021).

Original: The standard approach for generating positive pairs without additional annotations is to create multiple views of each data point using random augmentations.
Revised: The standard approach for generating positive pairs without additional annotations is to create multiple views of each data point using random augmentations.

Original: The contrastive learning loss or InfoNCE (Oord et al., 2018) then maximizes a lower bound on the mutual information between the two views.
Revised: The contrastive learning loss or InfoNCE (Oord et al., 2018) then maximizes a lower bound on the mutual information between the two views.

Original: For instance, in MoCo (He et al., 2019), a dictionary lookup task is defined in which for each encoded query q , there is a set of encoded keys { k 0 , k 1 , . . .

Original: } , among which a single positive key k + matches the query q , which is generated from different views.

Original: The contrastive loss function is utilized to pull q close to q + while pushing it away from other negative keys:

Original: [Equation] SimCLR (Chen et al., 2020a)employs the same loss function but samples negative pairs from the current batch while MoCo uses a momentum memory bank. More specifically, SimCLR generates two randomly augmented views of each image ˜x
Revised: For instance, SimCLR (Chen et al., 2020a) generates two randomly augmented views of each image ˜

Original:  i =
Revised: x i =

Original: t ( x ) , ˜ x j = t ′ ( x ) , t, t ′ ∼ T given a batch of images, and uses all other augmentated samples from the batch as negative examples.
Revised: t ( x ) , ˜ x j = t ′ ( x ) , t, t ′ ∼ T given a batch of images, and uses all other augmentated samples from the batch as negative examples.

Original: Then it uses a neural encoder f( · ) to extract representations from these augmented examples, and a small projection head g( · ) which maps these representations to the contrastive loss space.
Revised: Then it uses an encoder f to extract representations from these augmented examples, and a small projection head g which maps these representations to the contrastive loss space.

Original: More specifically, the loss function on a minibatch of N samples would be as below. [Equation]
Revised: Given a minibatch of N samples, the InfoNCE loss is optimized for the sum of all examples in the minibatch.

Original: More recent methods discard the need for negative samples in contrastive learning.
Revised: Some proposed methods discard the need for negative samples in contrastive learning.

Original: BYOL (Grill et al., 2020) uses a siamese architecture with momentum encoders to prevent different representations from collapsing into one vector.
Revised: BYOL (Grill et al., 2020) uses a siamese architecture with momentum encoders to prevent different representations from collapsing into one vector.

Original: SwAV (Caron et al., 2020) exploits online clustering for each batch to enforce consistency between cluster assignments from different views, and SimSiam (Chen & He, 2020) uses a simple stop-gradient operation in a siamese architecture to avoid collapsing.
Revised: SwAV (Caron et al., 2020) exploits online clustering for each batch to enforce consistency between cluster assignments from different views, and SimSiam (Chen & He, 2020) uses a simple stop-gradient operation in a siamese architecture to avoid collapsing.

Original: Theoretical analysis (Arora et al., 2019; Tsai et al., 2020;
Revised: We use SimSiam (Chen & He, 2020) in particular in our experiments.

Original: Tosh et al., 2021) suggests the contrastively learned representations can lead to  a good downstream performance. Moreover, Tian et al.
Revised: Similar to SimCLR it creates two randomly augmented views x 1 and x 2 from an image x . Then it uses encoder f consisting of a backbone such as ResNet and a projection MLP head to create representations of the two views.

Original: (2020) shows what matters more for the performance are the choice of the contrastive learning objective, and  the creation of the positive and negative data pairs in the contrastive objective.
Revised: A prediction MLP head h , transforms the output of one view and matches it to the other view. Given two output vectors are p 1 ≜ h ( f ( x 1 )) and z 2 ≜ f ( x 2 ) ; SimSiam minimizes the negative cosine similarity D ( p 1 , z 2 ) :

Original: Recent work (Khosla et al., 2020) extends the usage of contrastive learning from the self-supervised setting to the supervised setting.
Revised: [Equation]

Original: The supervised setting defines the positive pairs as  the data from the same class in  the contrastive objective, while the self-supervised setting defines the positive pairs as the data with different augmentations.
Revised: where ∥·∥ 2 is ℓ 2 -norm. Then they define a symmetrized loss for each image with a stop-gradient operator to avoid collapse as below: [Equation] Note that we use the word encoder to address the backbone in f , since projection layers are thrown away when evaluating the representations.

Original: A.3. Fair Representation Learning
Revised: A.3. Disentangled Representations

Original: A family of fairness definitions for SSL have been previously explored in representation learning (Edwards & Storkey, 2015;
Revised: A similar line of research is creating representations where each dimension is independent and corresponds to a particular attribute (Eastwood & Williams, 2018; Ridgeway & Mozer, 2018), some works study learning such representations in a supervised manner (Hsieh et al., 2018; Cai et al., 2019) while unsupervised approaches rely on VAEs (Higgins et al., 2016;

Original: Beutel et al., 2017; Louizos et al., 2015; Madras et al., 2018).
Revised: Chen et al., 2018; Zhu et al., 2020) and GANs (Chen et al., 2016; Lin et al., 2020).

Original: In this setting, they train representations on data includeing sensitive attributes, such that classifiers trained on these representations are more likely to be agnostic to the these attributes.

Original: The works in fair representation learning usually address removing sensitive attributes from the representations by: obfuscating any information about sensitive attributes in order to approximately satisfy demographic parity (Zemel et al., 2013), using adversarial methods (Edwards & Storkey, 2015; Xie et al., 2017; Beutel et al., 2017; Zhang et al., 2018; Madras et al., 2018; Adel et al., 2019; Zhao & Gordon, 2019), or feature disentanglement based using variational approaches.
Revised: The works in fair representation learning usually address removing sensitive attributes from the representations by: obfuscating any information about sensitive attributes in order to approximately satisfy demographic parity (Zemel et al., 2013), using adversarial methods (Edwards & Storkey, 2015; Xie et al., 2017; Beutel et al., 2017; Zhang et al., 2018; Madras et al., 2018; Adel et al., 2019; Zhao & Gordon, 2019), or feature disentanglement based using variational approaches.

Original: (Kingma &
Revised: (Kingma &

Original: Welling, 2013; Gretton et al., 2006;
Revised: Welling, 2013; Gretton et al., 2006;

Original: Louizos et al., 2015; Amini et al., 2019;
Revised: Louizos et al., 2015; Amini et al., 2019;

Original: Alemi et al., 2018; Burgess et al., 2018; Chen et al., 2018; Kim & Mnih, 2018;
Revised: Alemi et al., 2018; Burgess et al., 2018; Chen et al., 2018; Kim & Mnih, 2018;

Original: Esmaeili et al., 2019).
Revised: Esmaeili et al., 2019).

Original: A.3.1. F AIR S ELF - SUPERVISED R EPRESENTATION L EARNING

Original: The pioneer work of Song et al.

Original: (2019) proposes an information theoretically motivated objective for learning maximally expressive representations subject to fairness constraints.

Original: They try to maximize the expressiveness of representations while satisfying certain fairness constraints, or in other words to represent expressiveness as well as three dominant notions of fairness (demographic parity, equalized odds, equalized opportunity) in terms of mutual information, and obtain tractable upper/lower bounds of these mutual information objectives.

Original: A group of recent works in contrastive representation learning focus on proposing models that explicitly tackle the problem of imbalanced and long-tailed distribution real-world data.

Original: Jiang et al. (2021b) have proposed a framework in which they create a dynamic self-competitor model to contrast with the target model, which is a pruned version of the target model. During training, contrasting the two models will lead to adaptive online mining of the most easily forgotten samples for the current target model, and implicitly emphasize them more in thecontrastive loss. Another group of work focuses on removing undesirable information in self-supervised representations.
Revised: Perhaps the closest to our work is (Wang et al., 2021) where samples are partitioned into two subsets that correspond to an entangled group element followed by minimizing a subset-invariant contrastive loss, where the invariance guarantees to disentangle the group element.

Original: They focus on datasets that certain information that may be undesirable for downstream tasks.

Original: For instance, gender information which may lead to biased decisions on many gender-irrelevant tasks.

Original: (Tsai et al., 2021) have developed conditional contrastive learning to remove the effect of the undesirable variable which conditions on the undesirable variable (by fixing the variations of it) during the contrastive learning process.

Original: In particular, they introduce Conditional InfoNCE (C-InfoNCE), and its computationally efficient variant, Weak-Conditional InfoNCE (WeaC-InfoNCE), for conditional contrastive learning.

Original: B. Datasets
Revised: B. Datasets

Original: We make use of the following four image datasets:
Revised: We make use of the following four image datasets:

Original: • waterbirds (Sagawa et al., 2020a): Background (land, water)  spuriously correlated with bird  (labdbird, waterbird) • cmnist (Colored MNIST) (Arjovsky et al., 2019): Color of digit on the images spuriously correlated with the  number • spurcifar10 (Spurious CIFAR10)
Revised: • waterbirds (Sagawa et al., 2020a): Background (land, water) is spuriously correlated with bird type (labdbird, waterbird) • cmnist (Colored MNIST) (Arjovsky et al., 2019): Color of digit on the images spuriously correlated with the binary class based on the number • spurcifar10 (Spurious CIFAR10)

Original: (Nagarajan et al., 2020): Color of lines on the images spuriously correlated with the class • metashift (Liang & Zou, 2022): Cats vs Dogs task: Background (indoor, outdoor) spuriously correlated with pet  (cat, dog)
Revised: (Nagarajan et al., 2020): Color of lines on the images spuriously correlated with the class • metashift (Liang & Zou, 2022): Cats vs Dogs task: Background (indoor, outdoor) spuriously correlated with pet type (cat, dog)

Original: C. Comparing SSL to CLIP representations
Revised: C. Comparing SSL to CLIP representations

Original: We train linear classifiers with different re-sampled sets of training examples. As shown in table ?
Revised: We train linear classifiers with different re-sampled sets of training examples on frozen CLIP (Radford et al., 2021) representations.

Original: ? , even CLIP representations do not help mitigate the geometrical and statistical skews when learning the linear classifier on representations. [Table] Average [Table]
Revised: These representations have found to be more robust to distribution shifts

Original: Average

Original: [Table]
Revised: [Table]

Original: CelebA

Original: Normal [Table] Downsampled [Table]
Revised: and we aim to answer if balanced downstream training set can improve worst-group accuracy.

Original: Upsampled [Table] Waterbirds Normal
Revised: As shown in table 3, even CLIP representations do not help mitigate the geometrical and statistical skews when learning the linear classifier on frozen representations.

Original: [Table]
Revised: [Table]

Original: D. Additional Representation Augmentation Results
Revised: D. Additional Representation Augmentation Results

Original: Even without having access to group information in the validation set, untuned hyperparameters (layer threshold and pruning percentage), we improve worst-group accuracy in most cases.
Revised: Even without having access to group information in the validation set

Original: [Table]
Revised: [Table]

Revised: untuned hyperparameters (layer threshold and pruning percentage)

Original: [Table]
Revised: [Table]

Original: Other Metrics
Revised: we improve worst-group accuracy in most cases

Original: [Table]
Revised: [Table]