Trained Models Tell Us How to Make Them Robust to Spurious Correlation without Group Annotation

## Abstract

Abstract Classifiers trained with Empirical Risk Minimization (ERM) tend to rely on attributes that have high spurious correlation with the target. This can degrade the performance on underrepresented (or minority ) groups that lack these attributes, posing significant challenges for both out-of-distribution generalization and fairness objectives. Many studies aim to enhance robustness to spurious correlation, but they sometimes depend on group annotations for training. Additionally, a common limitation in previous research is the reliance on group-annotated validation datasets for model selection. This constrains their applicability in situations where the nature of the spurious correlation is not known, or when group labels for certain spurious attributes are not available. To enhance model robustness with minimal group annotation assumptions, we propose Environment-based Validation and Loss-based Sampling (EVaLS). It uses the losses from an ERM-trained model to construct a balanced dataset of high-loss and low-loss samples, mitigating group imbalance in data. This significantly enhances robustness to group shifts when equipped with a simple post-training last layer retraining. By using environment inference methods to create diverse environments with correlation shifts, EVaLS can potentially eliminate the need for group annotation in validation data. In this context, the worst environment accuracy acts as a reliable surrogate throughout the retraining process for tuning hyperparameters and finding a model that performs well across diverse group shifts. EVaLS effectively achieves group robustness, showing that group annotation is not necessary even for validation. It is a fast, straightforward, and effective approach that reaches near-optimal worst group accuracy without needing group annotations, marking a new chapter in the robustness of trained models against spurious correlation. You can access the implementation at https://github.com/sharif-ml-lab/EVaLS.

## 1 Introduction

Training deep learning models using Empirical Risk Minimization (ERM) on a dataset, poses the risk of relying on spurious correlation. These are correlations between certain patterns in the training dataset and the target (e.g., the class label in a classification task) despite lacking any causal relationship. Learning such correlations as shortcuts can negatively impact the models’ accuracy on minority groups that do not contain the spurious patterns associated with the target [, ]. This problem leads to concerns regarding fairness [], and can also cause a marked reduction in the performance. This occurs particularly when minority groups, which are underrepresented during training, become overrepresented at the inference time, as a result of shifts within the subpopulations []. Hence, ensuring robustness to group shifts and developing methods that improve worst group accuracy (WGA) is crucial for achieving both fairness and robustness in the realm of deep learning.

Many studies have proposed solutions to address this challenge.
A promising line of research focuses on increasing the contribution of minority groups in the model’s training  [, , ].
A strong assumption that is considered by some previous works is having access to group annotations for training or fully/partially fine-tuning a pretrained model [, , ]. The study by Kirichenko et al. [] proposes that retraining the last layer of a model on a dataset that is balanced in terms of group annotation can effectively enhance the model’s robustness against shifts in spurious correlation.
While these works have shown tremendous robustness performance, their assumption for the availability of the group annotation restricts their usage.

In many real-world applications, the process of labeling samples according to their respective groups can be prohibitively expensive, and sometimes impractical, especially when all minority groups may not be identifiable beforehand. A widely adopted strategy in these situations involves the indirect inference of various groups, followed by the training of models using a loss function that is balanced across groups [, , , ].
The loss value of the model, or its alternatives, are popular signals for recognizing minority groups  [, , , ].
While most of these techniques necessitate full training of a model, Qiu et al. [] attempt to adapt the DFR method [] with the aim of preserving computational efficiency while simultaneously improving robustness to the group shift.
However, this method still requires group annotations of the validation set for the model selection and hyperparameter tuning. Consequently, this constitutes a restrictive assumption when adequate annotations for certain groups are not supplied. It also applies to situations where some shortcut attributes are completely unknown.

In this study, we present a novel strategy that effectively mitigates reliance on spurious correlation, completely eliminating the need for group annotations during both training and retraining. More interestingly, we provide empirical evidence indicating that group annotations are not necessary, even for model selection. We show that assembling a diverse collection of environments for model selection, which reflects group shifts can serve as an effective alternative approach. Our proposed scheme, Environment-based Validation and Loss-based Sampling (EVaLS), strengthens the robustness of trained models against spurious correlation, all without relying on group annotations. EVaLS is pioneering in its ability to eliminate the need for group annotations at every phase, including the model selection step. EVaLS posits that in the absence of group annotations, a set of environments showcasing group shifts is sufficient. Worst Environment Accuracy (WEA) could then be utilized for model selection. We observe that spurious correlations, as a form of subpopulation shifts, cause significant group shifts when using environment inference methods []. Consequently, the inferred environments—which could be obtained even by simply dividing validation data based on predictions from a random linear layer atop a trained model’s feature space—can effectively compare different sets of hyperparameters for tuning.
Figure 1 demonstrates the overall procedure of the main parts of EVaLS.

Aligned with AFR [] and DFR [], EVaLS offers a significant advantage by not requiring any modifications to the standard ERM training procedure or the original training data. Moreover, it does not require information from the initial phases of ERM training, such as an early-stopped model. This characteristic is particularly beneficial in enhancing the robustness of ERM-pretrained networks against their potential inherent biases. Specifically, it eliminates the need to retrain the entire model, which may be impractical or infeasible when the original training data is unavailable.

Our empirical observations support prior research which suggests that high-loss data points in a trained model may signal the presence of minority groups [, , ]. EVaLS evenly selects from both high-loss and low-loss data to form a balanced dataset that is used for last-layer retraining. We offer theoretical explanations for the effectiveness of this approach in addressing group imbalances, and experimentally show the superiority of our efficient solution to the previous strategies.
Comprehensive experiments conducted on spurious correlation benchmarks such as CelebA [], Waterbirds [], and UrbanCars [], demonstrate that EVaLS achieves optimal accuracy. Moreover, when group annotations are accessible solely for model selection, our approach, EVaLS-GL, exhibits enhanced performance against various distribution shifts, including attribute imbalance, as seen in MultiNLI  [], and class imbalance, exemplified by CivilComments  [].
We further present a new dataset, Dominoes Colored-MNIST-FashionMNIST, which depicts a situation featuring multiple independent shortcuts, that group annotations are only available for part of them (see Section 2.2). In this setting, we show that strategies with lower levels of group supervision are paradoxically more effective in mitigating the reliance on both known and unknown shortcuts.

The main contributions of this paper are summarized as follows:

- •
We present EVaLS, a simple yet effective post-hoc approach that enhances the robustness of ERM-pretrained models against both known and unknown spurious correlations, without relying on ground-truth group annotations.
- •
We offer both theoretical and empirical insights on how balanced sampling from high-loss and low-loss samples offers a dataset in which the group imbalance is notably mitigated.
- •
Using simple environment inference techniques, EVaLS introduces worst environment accuracy as a reliable indicator for model selection.
- •
EVaLS achieves near-optimal performance in spurious correlation benchmarks with zero group annotations, and delivers state-of-the-art performance
when group annotations are available for model selection.
- •
By utilizing a newly introduced dataset with two spurious attributes, we demonstrate that EVaLS improves robustness to both known and unknown spurious attributes learned by an ERM-trained model better than methods relying on group information.

## 2 Preliminaries

### 2.1 Problem Setting

We assume a general setting of a supervised learning problem with distinct data partitions $\mathcal{D}^{\text{Tr}}$ for training, $\mathcal{D}^{\text{Val}}$ for validation, and $\mathcal{D}^{\text{Te}}$ for final evaluation. Each dataset comprises a set of paired samples $(x,y)$, where $x\in\mathcal{X}$ represents the data and $y\in\mathcal{Y}$ denotes the corresponding labels. Conventionally, $\mathcal{D}^{\text{Tr}}$, $\mathcal{D}^{\text{Val}}$, and $\mathcal{D}^{\text{Te}}$ are assumed to be uniformly sampled from the same distribution. However, this idealized assumption does not hold in many real-world problems where distribution shift is inevitable.
In this context, we consider the sub-population shift problem []. In a general form of this setting, it is assumed that data samples consist of different groups $\mathcal{G}_{i}$, where each group comprises samples that share a property. More specifically, the overall data distribution $p(x,y)=\sum_{i}\alpha_{i}p_{i}(x,y)$ is a composition of individual group distributions $p_{i}(x,y)$ weighted by their respective proportions $\alpha_{i}$,
where $\sum_{i}\alpha_{i}=1$.
In this work, we assume that $\mathcal{D}^{\text{Tr}}$, $\mathcal{D}^{\text{Val}}$, and $\mathcal{D}^{\text{Te}}$ are composed of identical groups but with a different set of mixing coefficients $\{\alpha_{i}\}$.
It is noteworthy that the validation set may have approximately identical coefficients to those of the training or testing sets, or it may have entirely different coefficients.

Several kinds of subpopulation shifts are defined in the literature, including class imbalance, attribute imbalance, and spurious correlation []. Class imbalance refers to the cases where there is a difference between the proportion of samples from each class, while attribute imbalance occurs when instances with a certain attribute are underrepresented in the training data, even though this attribute may not necessarily be a reliable predictor of the label. On the other hand, spurious correlation occurs when various groups are differentiated by spurious attributes that are partially predictive and correlated with class labels but are causally irrelevant. More precisely, we can consider a set of spurious attributes $\mathcal{S}$ that partition the data into $|\mathcal{S}|\times|\mathcal{Y}|$ groups. When the concurrence of a spurious attribute with a label is significantly higher than its correlation with other labels, that spurious attribute could become predictive of the label, resulting in deep models relying on the spurious attributes as shortcuts instead of the core ones. This is followed by a decrease in the model’s performance on groups that do not have this attribute.

Given a class, the group containing samples with correlated spurious attributes is referred to as majority group of that class, while the other groups are called the minority groups. As an example, in the Waterbirds dataset [], for which the task is to classify images of birds into landbird and waterbird, there are spurious attributes $\{\textit{water background},\textit{land background}\}$. Each background is spuriously correlated with its associated label, decompose the data into two majority groups waterbird on water background, and landbird on land background,
and two minority groups waterbird on land background and landbird on water background. Our goal is to make the classifier robust to spurious attributes by increasing performance for all groups.

### 2.2 Robustness of a Trained Model to Unknown Shortcuts

In scenarios where group annotations are absent, traditional methods that depend on these annotations for training or model selection become infeasible. Moreover, as previously discussed by  Li et al. [], when data contains multiple spurious attributes and annotations are only available for some of them, such methods would make the model robust only to the known spurious attributes. To further explore such complex scenarios, we introduce the Dominoes Colored-MNIST-FashionMNIST (Dominoes CMF) dataset (Figure 4(a)). Drawing inspiration from Pagliardini et al. [] and Arjovsky et al. [], Dominoes CMF merges an image from CIFAR10 [] at the top with a colored (red or green) MNIST [] or FashionMNIST [] image at the bottom. The primary label is derived from the CIFAR10 image, while the bottom part introduces two independent spurious attributes: color (red or green) and style (MNIST or FashionMNIST). Although annotations for shape are provided for training and model selection, color remains an unknown variable until testing. For more details on the dataset refer to the Appendix.

The illustrations in Figure 3(a-c) depict the outlined scenario. A classifier trained using ERM is dependent on both spurious features (Figure 3(b)). Yet, achieving robustness against one spurious correlation (Figure 3(c)), does not ensure robustness against both (Figure 3(a)). In Section 4 we show that our approach, which does not rely on the group annotations of the identified group, achieves enhanced robustness to both spurious correlations, outperforming strategies that depend on the known group’s information.

## 3 Environment-based Validation and Loss-based Sampling

EVaLS is designed to improve the robustness of ERM-trained deep learning models to group shifts without the need for group annotation. In line with the DFR [] approach, we utilize a classifier defined as $f=h_{\phi}\circ g_{\theta}$, where $g_{\theta}$ represents a deep neural network serving as a feature extractor, and $h_{\phi}$ denotes a linear classifier. The classifier is initially trained with the ERM objective on the training dataset $\mathcal{D}^{\text{Tr}}$. Subsequently, we freeze the feature extractor $g_{\theta}$ and focus solely on retraining the last linear layer $h_{\phi}$ using the validation dataset $\mathcal{D}^{\text{Val}}$ as a held-out dataset. This scheme helps us make our method available in settings where $\mathcal{D}^{\text{Tr}}$ is not available, or where repeating the training process is infeasible.

We randomly divide the validation set $\mathcal{D}^{\text{Val}}$ into two subsets, $\mathcal{D}^{\text{LL}}$ and $\mathcal{D}^{\text{MS}}$ which are used for last layer training and model selection, respectively.
In Section 3.1 we explain how to sample a subset of $\mathcal{D}^{\text{LL}}$ that statistically handles the group shifts inherent in the dataset.
In Section 3.2 we describe how $\mathcal{D}^{\text{MS}}$ is divided into different environments that are later used for model selection.
The optimal number of selected samples from $\mathcal{D}^{\text{LL}}$ and other hyperparameters is determined based on the worst environment accuracies among environments that are obtained from $\mathcal{D}^{\text{MS}}$. By combining our sampling and validation strategy, we aim to provide a robust linear classifier $h_{\phi^{\ast}}$ that significantly improves the accuracy of underrepresented groups without requiring group annotations of training or validation sets.
Finally in Section 3.3, we provide theoretical support for the loss-based sampling procedure and its effectiveness. Figure 1 illustrates the comprehensive workflow of the EVaLS.

Figure: Figure 1: Overview of the proposed approach. (a) We randomly split the dataset $\mathcal{D}$ into $\mathcal{D}^{\text{Tr}}$, $\mathcal{D}^{\text{MS}}$, $\mathcal{D}^{\text{LL}}$ and $\mathcal{D}^{\text{Te}}$. We train the initial classifier on $\mathcal{D}^{\text{Tr}}$ with empirical risk minimization (ERM). Alternatively, we can assume that an ERM-trained model is given. (b) An environment inference method is utilized to infer diverse environments for each class of $\mathcal{D}^{\text{MS}}$. (c) We evaluate $\mathcal{D}^{\text{LL}}$ samples on the initial ERM classifier and sort high-loss and low-loss samples of each class for loss-based sampling. (d) Finally, we perform last-layer retraining on the loss-based selected samples $\mathcal{D}^{\text{Bal}}$. Each retraining setting (e.g. different $k$ for loss-based sampling) is validated based on the worst accuracy of the inferred environments. Note that majority and minority groups are shown with dark and light colors for better visualization, but are not known in our setting.
Refer to caption: x1.png

### 3.1 Loss-Based Instance Sampling

Following previous works [, , ], we use the loss value as an indicator for identifying minority groups. We first evaluate classifier $f$ on samples within $\mathcal{D}^{\text{LL}}$ and choose $k$ samples with the highest and lowest loss values in each class for a given $k$. By combining these $2k$ samples from each class, we construct a balanced set $\mathcal{D}^{\text{Bal}}$, consisting of high-loss and low-loss samples (see Figure 1(c)). $\mathcal{D}^{\text{Bal}}$ is then used for the training of the last layer of the model.
As depicted in figure 1, the proportion of minority samples among various percentiles of samples with the highest loss values increases as we select a smaller subset of samples with the highest loss. This suggests that high and low-loss samples could serve as effective representatives of minority and majority groups, respectively.
In Section 3.3, we offer theoretical insights explaining why this approach could lead to the creation of group-balanced data.

### 3.2 Partitioning Validation Set into Environments

Contrary to common assumptions and practices in the field, precise group labels for the validation set are not essential for training models robust to spurious correlations.
Our empirical findings, detailed in Section 4, reveal that partitioning the validation set into environments that exhibit significant subpopulation shifts can be used for model selection. Under these conditions, the worst environment accuracy (WEA) emerges as a viable metric for selecting the most effective model and hyperparameters.

The concept of an environment, as frequently discussed in the invariant learning literature, denotes partitions of data that exhibit different distributions. A model that consistently excels across these varied environments, achieving impressive worst environment accuracy (WEA), is likely to perform equally well across different groups in the test set. Several methods for inferring environments with notable distribution shifts have been introduced [, ]. Environment Inference for Invariant Learning (EIIL) [], leverages the predictions from an earlier trained ERM model to divide the data into two distinct environments that significantly deviate from the invariant learning principle proposed by Arjovsky et al. [], thus creating environments with distribution shifts. Initially, EIIL is employed to split $\mathcal{D}^{\text{MS}}$ into two environments. Subsequently, each environment is further divided based on sample labels, resulting in $2\times|\mathcal{Y}|$ environments. To measure the difference between the distribution of environments, we define group shift of a class as the absolute difference in the proportion of a minority group between two environments of that class. A higher group shift suggests a more distinct separation between environments. As detailed in the Appendix, environments inferred by EIIL demonstrate an average group shift of $28.7\%$ over datasets with spurious correlation. Further information about EIIL and the group shift quantities for each dataset can be found in the Appendix.

We demonstrate that even more straightforward techniques, such as applying a random linear layer over the feature embedding space and distinguishing environments based on correctly and incorrectly classified samples of each class, can be effective to an extent in several cases (See Appendix F.3). It underscores that the feature space of a trained model is a valuable resource of information for identifying groups affected by spurious correlations. This supports the logic of previous research that employs clustering [] or contrastive methods [] in this space to differentiate between groups.

### 3.3 Theoretical Analysis

The environments obtained as described in Section 3.2 are utilized for hyperparameter tuning, specifically for tuning $k$, which is the number of selected samples from loss tails. It is known that minority samples are more prevalent among high-loss samples, while majority samples dominate the low-loss category. However, the question remains whether loss-based sampling can construct a balanced dataset without introducing spurious correlations. In this section, aligned with our practical approach, we provide theoretical insights into how loss-based sampling within a class can be used to create a group-balanced dataset.

Consider a binary classification problem with a cross-entropy loss function. Let logits be denoted as $L$. We assume a general assumption that in feature space (output of $g_{\theta}$) samples from the minority and majority of a class are derived from Gaussian distributions. As a result, we can consider $\mathcal{N}(\mu_{\text{min}},\sigma_{\text{min}}^{2})$ and $\mathcal{N}(\mu_{\text{maj}},\sigma_{\text{maj}}^{2})$ as the distribution of minority and majority samples in logits space (See Lemma D.1 in Appendix D for details). Because the loss function is a monotonic function of logits, the tails of the distribution of loss across samples are equivalent to that of the logits in each class.

###### Proposition 3.1 .

[Feasiblity Of Loss-based Group Balancing]
Suppose that $L$ is derived from the mixture of two distributions $\mathcal{N}(\mu_{min},\sigma_{min}^{2})$ and $\mathcal{N}(\mu_{maj},\sigma_{maj}^{2})$ with proportion of $\varepsilon$ and $1-\varepsilon$, respectively, where $\varepsilon\leq\frac{1}{2}$. If (i) $\sigma_{min}>\sigma_{maj}$, or (ii) under sufficient and necessary conditions on $\mu_{min}$, $\mu_{maj}$, $\sigma_{min}$ and $\sigma_{maj}$ including inequality 1 (see App.D),
there exists $\alpha$ and $\beta$ such that restricting $L$ to the $\alpha$-left and $\beta$-right tails of its distribution results in a group-balanced distribution; in which both components are equally represented.

$$ $\epsilon\geq\text{sigmoid}\Bigg{(}-\frac{(\mu_{\text{maj}}-\mu_{\text{min}} \big{)}^{2}}{2(\sigma_{\text{maj}}^{2}-\sigma_{\text{min}}^{2})}-\log\Big{(} \frac{\sigma_{\text{maj}}}{\sigma_{\text{min}}}\Big{)}\Bigg{)}$ (1) $$

We provide an outline for proof of Proposition 3.1 here and leave the complete and formal proof and also exact bounds to Appendix D. We also analyze the conditions and effects of spurious correlation in satisfying these conditions. Practical justifications for Proposition 3.1 can be found in Appendix D.2. To proceed with the outline, we first define a key concept.

Figure: (a) Waterbirds
Refer to caption: x2.png

###### Definition 3.1 (Proportional Density Difference) .

For any interval $I=(a,b]$ and a mixture distribution $\varepsilon P_{1}(x)+(1-\varepsilon)P_{2}(x)$,
the proportional density difference is defined as the difference of accumulation of two component distributions in the interval $I$ and is denoted by $\Delta_{\varepsilon}P_{mixture}(I)$.

$$ $\Delta_{\varepsilon}P_{mixture}(I)\stackrel{{\scriptstyle\Delta}}{{=}} \varepsilon P_{1}\big{(}x\in I\big{)}-(1-\varepsilon)P_{2}\big{(}x\in I\big{)}$ (2) $$

Proof outline  Our proof proceeds with three steps.
First, we reformulate the theorem as an equality of left- and right-tail proportional distribution differences. In other words, we show that
the more mass the minority distribution has on one tail, the more mass the majority distribution must have on the other tail.
Afterward, supposing $\mu_{\text{min}}<\mu_{\text{maj}}$ WOLG,
we propose a proper range for $\beta$ values on the right tail.
We show that when
$\sigma_{\text{maj}}\leq\sigma_{\text{min}}$,
values for $\alpha$ trivially exist that can overcome the imbalance between the two distributions. In the last step, for the case in which the variance of the majority is higher than the minority, we discuss a necessary and sufficient condition for the existence of $\alpha$ and $\beta$ based on the left-tail proportional density difference using the properties of its derivative with respect to $\alpha$.

Condition 1 suggests that for a given degree of spurious correlation $\epsilon$ and variations $\sigma_{\text{maj}},\sigma_{\text{min}}$, an essential prerequisite for the efficacy of loss-based sampling is a sufficiently large disparity between the mean distributions of minority and majority samples, denoted by $\|\mu_{\text{maj}}-\mu_{\text{min}}\|^{2}$. This indicates that the groups should be distinctly separable in the logits space.

Although the parameters $\alpha$ and $\beta$ are theoretically established under certain conditions, their actual values remain undetermined. Therefore, validation data is essential to identify the appropriate tails. For practicality and simplicity, we assume an equal number $k$ of samples for both tails and explore this count (high- and low-loss samples) from a predefined set of values. By leveraging the worst environment accuracy on validation data after last-layer retraining, as detailed in Section 3.2, we identify the optimal candidate that ensures uniform accuracy across all environments.

###### Proposition 3.1 .

###### Definition 3.1 (Proportional Density Difference) .

## 4 Experiments

In this section, we evaluate the effectiveness of the proposed scheme through comprehensive experiments on multiple datasets and compare it with various methods and baselines. We begin by briefly describing evaluation datasets and then introduce baselines and comparative methods. Finally, we report and fully explain the results.

#### Datasets

Our approach, along with other baselines, is evaluated on Waterbirds [], CelebA [], UrbanCars [], CivilComments [], and MultiNLI []. As per the study by Yang et al. [], Waterbirds, CelebA, and UrbanCars among these datasets exhibit spurious correlation. Among the rest, CivilComments has class and attribute imbalance, whereas MultiNLI exhibits attribute imbalance. For additional details on the datasets, please refer to the Appendix E.3.

#### Baselines

We compare EVaLS with six baselines in addition to standard ERM.
GroupDRO [] trains a model on the data with the objective of minimizing its average loss on the minority samples. This method requires group labels of both the training and validation sets. DFR [] argues that models trained with ERM are capable of extracting the core features of images. Thus, it first trains a model with ERM, and retrains only the last linear classifier layer on a group-balanced subset of the validation or the held-out training data. While DFR reduces the number of group-annotated samples, it still requires group labels in the training phase. GroupDRO + EIIL [] infers environments of the training set and trains a model with GroupDRO on the inferred environments. JTT [] first trains a model with ERM on the dataset, and then retrains it on the dataset by upweighting the samples that were misclassified by the initial ERM model. ES Disagreement SELF [] selects samples with the highest difference in output when comparing an ERM-trained model to its early-stopped version. Then, they fine-tune the last layer of the ERM-trained model on the selected samples. AFR [] trains a model with standard ERM, and retrains the classifier on a weighted held-out data. The weights assigned to retraining samples are determined by the probability that the ERM-pretrained model assigns to the ground-truth label, leading to an increased weighting of samples from minority groups.

GroupDRO + EIIL, JTT, ES Disagreement SELF, and AFR eliminate the reliance on group annotations for their (re)training. However, unlike EVaLS, they all require group labels for model selection. JTT, GroupDRO, and GroupDRO + EIIL necessitate training the entire model to apply their methods. Additionally, ES Disagreement and SELF require early-stopped versions during training with ERM. In contrast, DFR, AFR, and EVaLS operate in a completely post-training manner without relying on any information from ERM training. This property makes these methods applicable in real-world scenarios when training checkpoints or training data are unavailable, or when it is infeasible to repeat the training due to reasons such as a large training set.

Figure: (a)
Refer to caption: x6.png

#### Setup

Similar to all the works mentioned in Section 4, we use ResNet-50 [] pretrained on ImageNet [] for image classification tasks. We used random crop and random horizontal flip as data augmentation, similar to []. For a fair comparison with the baselines, we did not employ any data augmentation techniques in the process of retraining the last layer of the model. For the CivilComments and MultiNLI, we use pretrained BERT [] and crop sentences to 220 tokens length. In EvaLS, we use the implementation of EIIL by spuco package [] for environments inference on the model selection set with 20000 steps, SGD optimizer, and learning rate $10^{-2}$ for all datasets.

Model selection and hyper-parameter fine-tuning are done according to the worst environment (or group if annotations are assumed to be available) accuracy on the validation set. For each dataset, we assess the performance of our model in two cases: fine-tuning the ERM classifier or retraining it. For all datasets except MultiNLI and Urbancars, retraining yielded better validation results. We report the results of our experiments in two settings: (i) EVaLS, which incorporates loss-based instance sampling for training the last layer, and environment inference for model selection. (ii) EVaLS-GL, similar to EVaLS except in using ground-truth group labels for model selection. For more details on the ERM training and last layer re-training hyperparameters refer to the Appendix.

### 4.1 Results

The results of our experiments along with the reported results on GroupDRO [], DFR [], JTT [], ES Disagreement SELF [], and AFR [] on five datasets are shown in Table 1. The reported results for GroupDRO, DFR, JTT, and AFR except those for the UrbanCars are taken from Qiu et al. []. For EIIL+Group DRO, the results for Waterbirds, CelebA, and CivilComments are reported from Zhang et al. []. The results of SELF on CelebA and MultiNLI are reported from the original paper []. We report only the worst group accuracy of methods in Table 1. The average group accuracies are documented in the Appendix. The Group Info column shows whether group annotation is required for training or model selection entry for each method. Methods that do not require information regarding ERM training (such as training data or checkpoints) are identified with a $star$ in the table.

Overall, our approaches outperform methods that do not require group annotations for (re)training in 2 out of 3 datasets with spurious correlations. Moreover, EVaLS-GL surpasses other methods with a similar level of group supervision on MultiNLI [] and achieves state-of-the-art performance among all methods on UrbanCars []. Furthermore, EVaLS and EVaLS-GL, similar to DFR [] and AFR [], can be applied to ERM-trained models without needing further information about their training.

The comparison between EVaLS and GroupDRO + EIIL indicates that when environments are available instead of groups, our method, which uses environments solely for model selection and utilizes loss-based sampling, is more effective than GroupDRO, a potent invariant learning method.

Regarding the UrbanCars, which contains an un-annotated spurious attribute, Li et al. [] has shown that shortcut mitigation methods often struggle to address multiple shortcuts simultaneously.
Notably, techniques such as DFR []
and GDRO []
which are designed to reduce reliance on a specific shortcut feature, fail to make the model robust to unknown shortcuts effectively. In contrast, our experiments suggest that annotation-free methods can mitigate the impact of both labeled and unlabeled shortcut features more effectively.

Our evaluation of EVaLS is based on the spurious correlation benchmarks. This is because, in other instances of subpopulation shift, the attributes that differ across groups are not predictive of the label, thereby reducing the visibility of these attributes’ effects in the model’s final layers []. Consequently, EIIL, which depends on output logits for prediction, might not effectively separate the groups. This observation is further supported by our findings related to the degree of group shift between the environments inferred by EIIL for each class in the CivilComments and MultiNLI datasets. The average group shift (defined in the Section 3.2) in the environments of the minority class of CivilComments is only $0.8_{\pm 0.0}\%$. Also, environments associated with Classes 1 and 2 in MultiNLI show only $1.1_{\pm 0.3}\%$ and $1.9_{\pm 1.0}\%$ group shift respectively.
More results and ablation studies can be found in the Appendix.

**Table 1: Comparison of worst group accuracy across various methods, including ours, on five datasets. The Group Info column indicates if each method utilizes group labels of the training/validation data, with ✓✓denoting that group information is employed during both stages. Bold numbers are the highest results overall, while underlined ones are the best among methods that may require group annotation only for model selection. CivilComments is class imbalanced, MultiNLI has imbalanced attributes, and the other three datasets have spurious correlations. The $\times$ sign indicates that the dataset is out of the scope of the method. Methods that do not rely on ERM training information are identified with $\star$. Mean and standard deviation are calculated over three runs.**
| Method | Group Info | Datasets |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| Train/Val | Waterbirds | CelebA | UrbanCars | CivilComments | MultiNLI |  |
| GDRO [] | ✓/✓ | $91.4$ | $\boldsymbol{88.9}$ | $73.1$ | $69.9$ | $\boldsymbol{77.7}$ |
| DFR^⋆ [] | ✗/✓✓ | $\boldsymbol{92.9_{\pm 0.2}}$ | $88.3_{\pm 1.1}$ | $79.6_{\pm 2.2}$ | $\boldsymbol{70.1_{\pm 0.8}}$ | $74.7_{\pm 0.7}$ |
| GDRO + EIIL [] | ✗/✓ | $77.2_{\pm 1}$ | $81.7_{\pm 0.8}$ | $76.5_{\pm 2.6}$ | $67.0_{\pm 2.4}$ | $61.2_{\pm 0.5}$ |
| JTT [] | ✗/✓ | $86.7$ | $81.1$ | $79.5$ | $\underline{69.3}$ | $72.6$ |
| SELF [] | ✗/✓ | $\underline{91.6_{\pm 1.4}}$ | $83.9_{\pm 0.9}$ | $83.2_{\pm 0.8}$ | $66.0_{\pm 1.7}$ | $70.7_{\pm 2.5}$ |
| AFR^⋆ [] | ✗/✓ | $90.4_{\pm 1.1}$ | $82.0_{\pm 0.5}$ | $80.2_{\pm 2.0}$ | $68.7_{\pm 0.6}$ | $73.4_{\pm 0.6}$ |
| EVaLS-GL^⋆ (Ours) | ✗/✓ | $89.4_{\pm 0.3}$ | $84.6_{\pm 1.6}$ | $\underline{\boldsymbol{83.5_{\pm 1.7}}}$ | $68.0_{\pm 0.5}$ | $\underline{75.1_{\pm 1.2}}$ |
| EVaLS^⋆ (Ours) | ✗/✗ | $88.4_{\pm 3.1}$ | $\underline{85.3_{\pm 0.4}}$ | $82.1_{\pm 0.9}$ | $\times$ | $\times$ |
| ERM | ✗/✗ | $66.4_{\pm 2.3}$ | $47.4_{\pm 2.3}$ | $18.67_{\pm 2.0}$ | $61.2_{\pm 3.6}$ | $64.8_{\pm 1.9}$ |

#### Mitigating Multiple Spurious Attributes

To evaluate the performance of our method in the case of unknown spurious correlations, we train a ResNet-18 [] model on the Dominoes-CMF dataset.
We apply DFR [], EVaLS-GL, and EVaLS on top of the trained ERMs to assess their ability to mitigate multiple shortcuts. We consider the style (MNIST/Fashion-MNIST) feature as the known group label, and the color as the unknown spurious attribute. We set the spurious correlation of the known attribute to $75\%$ and conduct experiments for various amount of unknown spurious correlation.
During model selection, we calculate the worst-group accuracy on the validation set considering only the label of the known shortcut, i.e., the lowest accuracy among the four groups based on the combination of the target label and the single known shortcut label. However, the final results on test data are based on the worst group accuracies, taking into account groups defined by the labels of both spurious attributes. The results are shown in Figure 4(b).
Note that EVaLS operates without using annotations for either the known or unknown spurious attributes.

Figure: (a)
Refer to caption: x9.png

Our results confirm findings by Li et al. [], suggesting that methods using group labels mitigate reliance on the known shortcut but not necessarily on the unknown one. DFR [] experiences a significant drop in performance ($34.55\%$ under $95\%$ color spurious correlation) when it relies on a single known spurious attribute for grouping, compared to the oracle that uses both attributes for grouping. EVaLS-GL reduces this issue using its loss-based sampling approach, but surprisingly EVaLS even outperforms EVaLS-GL. Combining a loss-based sampling approach for last layer training and environment-based model selection, results in a completely group-annotation-free method in a multi-shortcut setting with unknown spurious correlations, and successfully re-weights features to perform well with respect to multiple spurious attributes. It is also evident that increasing unknown spurious correlation results in a larger gap between the performance of EVaLS and EVaLS-GL compared to DFR [].

## 5 Discussion

This study presents EVaLS, a novel approach to improve robustness to spurious correlations with zero group annotation. EVaLS uses loss-based sampling to create a balanced training dataset that effectively disrupts spurious correlations and employs EIIL to infer environments for model selection. We also explore situations with multiple spurious correlations, some of which are unknown. In this context, we introduce Dominoes-CMF, a dataset in which two factors are spuriously correlated with the label, but only one is identified. Our findings suggest that EVaLS attains near-optimal worst test group accuracy on spurious correlation datasets. We also present EVaLS-GL, which needs group labels only for model selection. Our empirical tests on various datasets demonstrate that EVaLS-GL outperforms state-of-the-art methods requiring group labels during evaluation or training.

Note that this paper remains consistent with the findings of Lin et al. []. Our approach does not involve identifying spurious attributes without auxiliary information. Instead, the objective is to make a trained model robust against its reliance on shortcuts. Specifically, conditioning on what a trained model learns, we ascertain that both the loss value and the model’s feature space are instrumental in mitigating shortcuts.

EVaLS and EVaLS-GL may struggle with small datasets due to a low number of selected samples for the last layer training. Also, as environment inference from the last layer features is not effective for all types of subpopulation shifts, EVaLS is limited to datasets with spurious correlation. Similar to other methods in the field, EVaLS prioritizes the worst group accuracy at the cost of less average accuracy. Additionally, a notable variance has been observed in some of our experiments.

EVaLS represents a significant advancement in the development of methods for enhancing model fairness and robustness without prior knowledge about group annotations. EVaLS could be simply applied as a plug-and-play solution on various ERM-pretrained models with unknown inherent biases to make them robust to possible spurious correlations. Future work could explore developing environment inference methods effective for other types of subpopulation shift, such as attribute and class imbalance.

## Appendix A Related Work

Robustness to spurious correlation is a critical concern across various machine learning subfields. It is a form of out-of-distribution generalization [] where the distribution shift arises from the disproportionate representation of minority groups—those instances that are devoid of the correlated spurious patterns associated with their labels []. The issue of spurious correlation also intersects with the discourse on fairness in machine learning [, ].

Past studies have proposed a range of strategies to mitigate the models’ reliance on spurious correlation. Broadly speaking, these methods can be categorized according to the degree of supervision they require regarding group labels.

Invariant learning (IL) methods  [, , ] operate under the assumption of having access to a collection of environments that comprise group shift. By imposing invariant conditions on these environments, IL methods strive to create classifiers robust against group-sensitive features. IRM [] is designed to learn a feature extractor, which, when utilized, guarantees the existence of a classifier that would be optimal in all training environments.
VREx [] aims to decrease the risk variance among different training environments.
PGI [] works by minimizing the distance between the expected softmax distribution of labels, conditioned on inputs across both majority and minority environments. Lastly, Fishr [] focuses on bringing the variance of risk gradients closer together across different training environments. For scenarios that the environments are not available, environment inference methods [, ] are used to obtain a set of environments. Creager et al. [] introduce environment inference for invariant learning (EIIL), which tries to partition samples into two groups such that the objective of IRM [] is maximized. HRM [] aims to optimize both an environment inference module and an invariant prediction module jointly, with the goal of achieving an invariant predictor.

When group annotations are accessible, various methods leverage this information to equalize the impact of different groups on the model’s loss. The Group Distributionally Robust Optimization (GDRO) approach [], for instance, focuses on optimizing the loss for the worst-performing group during training. Kirichenko et al. [] has shown that models can still learn and extract core data features even in the presence high spurious correlation. Consequently, They suggest that retraining just the last layer of a model initially trained with Empirical Risk Minimization (ERM) can effectively reduce reliance on spurious correlation for predicting class labels. This method, termed Deep Feature Re-weighting (DFR), has been validated as not only highly effective but also significantly more efficient than earlier techniques that necessitated retraining the full model [, ]. However, availability of group annotations is considered a serious restrictive assumption.

Several recent studies have endeavored to enhance model robustness against spurious correlation, even in the absence of group annotations [, , , , , ]. Liu et al. [] introduce a two-stage method that involves training a model using ERM for a number of epochs before retraining it to give more weight to misclassified samples. The study by Zhang et al. [] employs the same two-stage training process, but with a twist for the second stage: they utilize contrastive methods. The goal is to bring samples from the same class but with divergent predictions closer in the feature space, while simultaneously increasing the separation between samples from different classes that have similar predictions. Another method, known as automatic feature reweighting (AFR) [], reweights the last layer of an ERM-pretrained model to favor samples that the original model was less accurate on. LaBonte et al. [] refine the last layer of an ERM-trained model through class-balanced finetuning, identifying challenging data points by comparing the classifier’s predictions with those of an early-stopped version. While these methods have significantly reduced the reliance on group annotations, they still required for validation and model selection. This remains a constraint, particularly when the spurious correlation is completely unknown.

To make a trained model robust to subpopulation shifts with zero group annotations, LaBonte et al. [] have recently demonstrated that class-balanced retraining of a model pretrained with ERM can effectively improve the worst-group accuracy (WGA) for certain datasets. While this method effectively reduces the impact of class imbalance, it fails in datasets with spurious correlations.

## Appendix B Environment Inference for Invariant Learning

Consider the training dataset $\mathcal{D}^{\text{Tr}}=\{(x^{(i)},y^{(i)})|x^{(i)}\in\mathcal{X},y^{(i)}\in
\mathcal{Y}\}$, where $\mathcal{X}$ and $\mathcal{Y}$ represent the input and output spaces, respectively. This dataset can be partitioned into different environments $\mathcal{E}^{tr}=\{e_{1},...,e_{n}\}$, such that for any $i\neq j$, the data distribution in $e_{i}$ and $e_{j}$ differs. The objective of invariant learning is to train a predictor that performs consistently across all environments in $\mathcal{E}^{tr}$. Under certain conditions, this predictor is also expected to perform well on $e^{tst}$, a test environment with a distribution distinct from the training data. Invariant Risk Minimization (IRM) [] approaches this problem by learning a feature extractor $\Phi(.)$ such that a classifier $\omega(.)$ exists, where $\omega\circ\Phi(.)$ performs consistently across all training environments. The practical implementation of the IRM objective is to minimize

$$ $\sum_{e\in\mathcal{E}^{tr}}R^{e}(\Phi)+\lambda||\nabla_{\bar{\omega}}R^{e}( \bar{\omega}\circ\Phi)||^{2},$ (3) $$

where $\bar{\omega}$ is a constant scalar with a value of $1.0$, $\lambda$ is a hyperparameter, and $R^{e}(f)=\mathbb{E}_{(x,y)\sim p_{e}}[l(f(x),y)]$ is referred to as the risk on environment $e$.

In real-world scenarios, training environments might not always be available. To address this, Environment Inference for Invariant Learning (EIIL) [] partitions samples into two environments in a way that maximizes the objective in Eq 3.

During the training phase, the EIIL algorithm replaces the hard assignment of environments to samples with a soft assignment $\mathbf{q}_{i}(e)=p(e|(x^{(i)},y^{(i)}))$, where $\mathbf{q}_{i}$ is learnable. Consequently, the relaxed version of the risk function is defined as $\tilde{R}^{e}(\Phi)=\frac{1}{N}\sum_{i}^{N}\mathbf{q}_{i}(e)[l(\Phi(x^{(i)}),y
^{(i)})]$. Given a model $\Phi$ that has been trained with ERM on the dataset, EIIL optimizes

$$ $\mathbf{q}^{*}=\operatorname*{arg\,max}_{\mathbf{q}}||\nabla_{\bar{\omega}} \tilde{R}^{e}(\bar{\omega}\circ\Phi)||.$ (4) $$

As discussed in  Creager et al. [], using a biased base model $\Phi$ could lead to environments exhibiting varying degrees of spurious correlation. During the inference phase, the soft assignment is converted to a hard assignment. The average group shift between the inferred environments using EIIL is illustrated in Table 2.

**Table 2: The average and variation percentage (%)(across 3 seeds) of group shift between the inferred environments using EIIL [] for each class, which is the absolute difference between the proportion of a minority group in the two environments of a class. Higher group shift indicates better separation of environments. In most cases, a significant group shift is observed between the inferred environments.**
| Class No. | Dataset |  |  |
| --- | --- | --- | --- |
| Waterbirds | CelebA | UrbanCars |  |
| 0 0 | $16.6_{\pm 0.7}$ | $3.6_{\pm 0.2}$ | $17.7_{\pm 1.2},23.5_{\pm 0.1}$, $62.1_{\pm 1.9}$ |
| $1$ | $50.5_{\pm 0.3}$ | $14.1_{\pm 0.9}$ | $40.7_{\pm 7.9},13.8_{\pm 0.1},19.2_{\pm 3.9}$ |

## Appendix C Algorithm

Figure: Algorithm 1 EVaLS

## Appendix D Theoretical Analysis

In this section, we establish a more formal description of loss-based sampling for balanced dataset creation and then prove it. We thoroughly analyze the close relationship between the availability of the balanced dataset and the gap between spurious features of minority and majority groups.

### D.1 Feasibility Of Loss-based Group Balancing

Consider a binary classification problem with a cross-entropy loss function. Let logits be denoted as $L$. Because loss is a monotonic function of logits, the tails of the distribution of loss across samples are equivalent to that of the logits in each class. We assume that in feature space (output of $g_{\theta}$) samples from the minority and majority of a class are derived from Gaussian distributions $\mathcal{N}(h_{\text{min}},{\Sigma}_{\text{min}})$ and $\mathcal{N}(h_{\text{maj}},{\Sigma}_{\text{maj}})$, respectively. Before diving into the group balance problem we initially show that the distribution of minority and majority samples in the logit space (output of $h_{\phi}$) are Gaussian too.

###### Lemma D.1 .

[Gaussain Distribution of Logits]
Considering a Gaussian distribution $Z\sim\mathcal{N}(h,\Sigma)$ in feature space and $W\in\mathbb{R}^{d}$,
then the distribution of logits is as follows: $L=\langle W,Z\rangle\sim\mathcal{N}\big{(}Wh,\,\left\lVert W\right\rVert_{
\Sigma}^{2}\big{)}$.

###### Proof.

Let $Z\sim\mathcal{N}(h,\Sigma)$.

Consider $L=\langle W,Z\rangle=W^{T}Z$, where $W\in\mathbb{R}^{d}$. L is a linear combination of jointly gaussian random variables which makes it an univariate gaussian random variable.

To find the distribution of $L$, we need to determine its mean and variance.

1. Mean of $L$

$$ $\mathbb{E}[L]=\mathbb{E}[\langle W,Z\rangle]=\mathbb{E}[W^{T}Z]=W^{T}\mathbb{E }[Z]=W^{T}h=\langle W,h\rangle.$ $$

Therefore, the mean of $L$ is $Wh$.

2. Variance of $L$:

The variance of $L$ can be computed using the properties of covariance. Recall that if $Z\sim\mathcal{N}(h,\Sigma)$, then the covariance matrix of $Z$ is $\Sigma$.

The variance of the linear combination $L=W^{T}Z$ is given by:

$$ $\mathrm{Var}(L)=\mathrm{Var}(W^{T}Z)=W^{T}\Sigma W=\left\lVert W\right\rVert_{ \Sigma}^{2},$ $$

where $\left\lVert W\right\rVert_{\Sigma}$ denotes the Mahalanobis norm of $W$.

Thus, we have proved that if $Z\sim\mathcal{N}(h,\Sigma)$, then the logits $L=\langle W,Z\rangle$ follow the distribution $\mathcal{N}(Wh,\left\lVert W\right\rVert_{\Sigma}^{2})$.
∎

From now on, we consider $\mathcal{N}(\mu_{\text{min}},\sigma_{\text{min}}^{2})$ and $\mathcal{N}(\mu_{\text{maj}},\sigma_{\text{maj}}^{2})$ as the distribution of minority and majority samples in logits space.

Next, we prove the more formal version of the main proposition 3.1, which describes the existence of a balanced dataset, only after we define a key concept, proportional density difference (illustrated in figure 5) to outline our proof.

###### Definition D.1 (Proportional Density Difference) .

For any interval $I=(a,b]$ and a mixture distribution $\varepsilon P_{1}(x)+(1-\varepsilon)P_{2}(x)$,
proportional density difference is defined by the difference of accumulation of two component distributions in the interval $I$ and is denoted by $\Delta_{\varepsilon}P_{mixture}(I)$.

$$ $\Delta_{\varepsilon}P_{mixture}(I)\stackrel{{\scriptstyle\Delta}}{{=}} \varepsilon P_{1}\big{(}x\in I\big{)}-(1-\varepsilon)P_{2}\big{(}x\in I\big{)}$ $$

###### Definition D.2 (Tail Proportional Density Difference) .

For a mixture distribution $\varepsilon P_{1}(x)+(1-\varepsilon)P_{2}(x)$, we define $tail_{L}(\alpha)$ as $\Delta_{\varepsilon}P_{mixture}\Big{(}(-\infty,\alpha]\Big{)}$
and
$tail_{R}(\beta)$ as $-\Delta_{\varepsilon}P_{mixture}\Big{(}(\beta,+\infty)\Big{)}$.

###### Corollary D.1 .

$$ $tail_{L}(\alpha)=\varepsilon F^{1}(\alpha)-(1-\varepsilon)F^{2}(\alpha)$ $$

$$ $tail_{R}(\beta)=(1-\varepsilon)\big{[}1-F^{2}(\beta)\big{]}-\varepsilon\big{[} 1-F^{1}(\beta)\big{]}$ $$

where $F^{1}$ and $F^{2}$ are CDF of two component distributions.

Figure: (a)
Refer to caption: x11.png

###### Proposition D.1 .

[Feasiblity Of Loss-based Group Balancing]
Suppose that $L$ is derived from the mixture of two distributions $\mathcal{N}(\mu_{\text{min}},\sigma_{\text{min}}^{2})$ and $\mathcal{N}(\mu_{\text{maj}},\sigma_{\text{maj}}^{2})$ with proportion of $\varepsilon$ and $1-\varepsilon$, respectively, where $\varepsilon\leq\frac{1}{2}$. There exists $\alpha$ and $\beta$ such that restricting $L$ to the $\alpha$-left and $\beta$-right tails of its distribution results in a group-balanced distribution if and only if (i)

$$ $\sigma_{\text{min}}\geq\sigma_{\text{maj}},$ (5) $$

or (ii)

$$ $tail_{L}(\frac{-B+\sqrt{\Delta}}{2A})>0$ (6) $$

and

$$ $\epsilon\geq\text{sigmoid}\Bigg{(}-\frac{(\mu_{\text{maj}}-\mu_{\text{min}} \big{)}^{2}}{2(\sigma_{\text{maj}}^{2}-\sigma_{\text{min}}^{2})}-\log\Big{(} \frac{\sigma_{\text{maj}}}{\sigma_{\text{min}}}\Big{)}\Bigg{)}.$ (7) $$

where $A=\Big{(}\frac{1}{2\sigma_{\text{maj}}^{2}}-\frac{1}{2\sigma_{\text{min}}^{2}}
\Big{)}$, $B=\Big{(}\frac{\mu_{\text{min}}}{\sigma_{\text{min}}^{2}}-\frac{\mu_{\text{maj
}}}{\sigma_{\text{maj}}^{2}}\Big{)}$ and $\Delta=\frac{(\mu_{\text{min}}-\mu_{\text{maj}})^{2}}{\sigma_{\text{min}}^{2}
\sigma_{\text{maj}}^{2}}-4\Big{[}\log\Big{(}\frac{\sigma_{\text{maj}}}{\sigma_
{\text{min}}}\Big{)}+\log\Big{(}\frac{\epsilon}{1-\epsilon}\Big{)}\Big{]}\Big{
[}\frac{1}{2\sigma_{\text{maj}}^{2}}-\frac{1}{2\sigma_{\text{min}}^{2}}\Big{]}$.

Proof outline

Our proof proceeds with three steps.
First, we reformulate the theorem as an equality of left- and right-tail proportional distribution differences. In other words, we show that
the more mass the minority distribution has on one tail, the more mass the majority distribution must have on the other tail.
Afterward, supposing $\mu_{\text{min}}<\mu_{\text{maj}}$ WLOG
,
we propose a proper range for $\beta$ values on the right tail.
We show that when
$\sigma_{\text{maj}}\leq\sigma_{\text{min}}$,
values for $\alpha$ trivially exist that can overcome the imbalance between the two distributions. In the last step, for the case in which the variance of the majority is higher than the minority, we discuss a necessary and sufficient condition for the existence of $\alpha$ and $\beta$ based on the left-tail proportional density difference using the properties of its derivative with respect to $\alpha$.

Step 1 Reformulating the problem based on proportional distribution difference.

We introduce a utility random variable Logit Value Tier as $T$, which is defined as a function of a random variable $L$.

$$ $T_{\alpha,\beta}=\begin{cases}High&\text{if $L\geq\beta$}\\ Mid&\text{if $\alpha<L<\beta$}\\ Low&\text{if $L\leq\alpha$}\end{cases}$ (8) $$

We can rewrite the problem in formal form as finding an $\alpha$ and $\beta$ which satisfies the following equation:

$$ $P\Big{(}g={\color[rgb]{1,0,0}\text{min}}\Big{|}T_{\alpha,\beta}\neq\ Mid\Big{) }=P\Big{(}g={\color[rgb]{0,0,1}\text{maj}}\Big{|}T_{\alpha,\beta}\neq Mid\Big{)}$ (9) $$

Equation 7 now can be rewritten to a more suitable form:

$$ $\displaystyle{}P\Big{(}g={\color[rgb]{1,0,0}\text{min}}\Big{|}T_{\alpha,\beta} \neq Mid\Big{)}$ $\displaystyle=P\Big{(}g={\color[rgb]{0,0,1}\text{maj}}\Big{|}T_{\alpha,\beta} \neq Mid\Big{)}$ (10) $\displaystyle\iff$ $\displaystyle{}\frac{P\Big{(}T_{\alpha,\beta}\neq Mid\Big{|}g={\color[rgb]{ 1,0,0}\text{min}}\Big{)}P\big{(}g={\color[rgb]{1,0,0}\text{min}}\big{)}}{P\Big {(}T_{\alpha,\beta}\neq Mid\Big{)}}$ $\displaystyle=\frac{P\Big{(}T_{\alpha,\beta}\neq Mid|g={\color[rgb]{0,0,1} \text{maj}}\Big{)}P\big{(}g={\color[rgb]{0,0,1}\text{maj}}\big{)}}{P\Big{(}T_{ \alpha,\beta}\neq Mid\Big{)}}$ (11) $\displaystyle\iff$ $\displaystyle{}P\Big{(}T_{\alpha,\beta}\neq Mid\Big{|}g={\color[rgb]{1,0,0} \text{min}}\Big{)}P\big{(}g={\color[rgb]{1,0,0}\text{min}}\big{)}$ $\displaystyle=P\Big{(}T_{\alpha,\beta}\neq Mid\Big{|}g={\color[rgb]{0,0,1} \text{maj}}\Big{)}P\big{(}g={\color[rgb]{0,0,1}\text{maj}}\big{)}$ (12) $\displaystyle\iff$ $\displaystyle{}\varepsilon P\Big{(}T_{\alpha,\beta}\neq Mid\Big{|}g={\color[ rgb]{1,0,0}\text{min}}\Big{)}$ $\displaystyle=(1-\varepsilon)P\Big{(}T_{\alpha,\beta}\neq Mid\Big{|}g={\color[ rgb]{0,0,1}\text{maj}}\Big{)}$ (13) $\displaystyle\iff$ $\displaystyle{}\varepsilon\bigg{[}P\Big{(}T_{\alpha,\beta}=Low\Big{|}g={\color [rgb]{1,0,0}\text{min}}\Big{)}+P\Big{(}T_{\alpha,\beta}$ $\displaystyle=High\Big{|}g={\color[rgb]{1,0,0}\text{min}}\Big{)}\bigg{]}=$ (14) $\displaystyle(1-\varepsilon)\bigg{[}P\Big{(}T_{\alpha,\beta}=Low\Big{|}g={ \color[rgb]{0,0,1}\text{maj}}\Big{)}$ $\displaystyle+P\Big{(}T_{\alpha,\beta}=High\Big{|}g={\color[rgb]{0,0,1}\text{ maj}}\Big{)}\bigg{]}$ (15) $\displaystyle\iff$ $\displaystyle{}\varepsilon\bigg{[}P\Big{(}L\leq\alpha\Big{|}g={\color[rgb]{ 1,0,0}\text{min}}\Big{)}+P\Big{(}L\geq\beta\Big{|}g=$ $\displaystyle{\color[rgb]{1,0,0}\text{min}}\Big{)}\bigg{]}=$ (16) $\displaystyle(1-\varepsilon)\bigg{[}P\Big{(}L\leq\alpha\Big{|}g={\color[rgb]{ 0,0,1}\text{maj}}\Big{)}$ $\displaystyle+P\Big{(}L\geq\beta\Big{|}g={\color[rgb]{0,0,1}\text{maj}}\Big{)} \bigg{]}$ (17) $\displaystyle\iff$ $\displaystyle{}\varepsilon\bigg{[}F^{{\color[rgb]{1,0,0}\text{min}}}(\alpha)+ \Big{(}1-F^{{\color[rgb]{1,0,0}\text{min}}}(\beta)\Big{)}\bigg{]}=(1-$ $\displaystyle\varepsilon)\bigg{[}F^{{\color[rgb]{0,0,1}\text{maj}}}(\alpha)+ \Big{(}1-F^{{\color[rgb]{0,0,1}\text{maj}}}(\beta)\Big{)}\bigg{]}$ (18) $\displaystyle\iff$ $\displaystyle{}\varepsilon F^{{\color[rgb]{1,0,0}\text{min}}}(\alpha)-(1- \varepsilon)F^{{\color[rgb]{0,0,1}\text{maj}}}(\alpha)=(1-\varepsilon)$ $\displaystyle\Big{[}1-F^{{\color[rgb]{0,0,1}\text{maj}}}(\beta)\Big{]}- \varepsilon\Big{[}1-F^{{\color[rgb]{1,0,0}\text{min}}}(\beta)\Big{]}$ (19) $$

We can see the left side of equation 19 is just a function of $alpha$. The same goes for the right side of the equation which is a function of $\beta$.

Rewriting the left side of the equation as $tail_{L}(\alpha)$ and right side as $tail_{R}(\beta)$,
the problem is now reduced to finding an $\alpha$ and $\beta$ that satisfies

$$ $tail_{L}(\alpha)=tail_{R}(\beta)$ (20) $$

which is shown in figure 5.

Before reaching out to step two we discuss the properties of $tail_{L}$ and $tail_{R}$ in Lemma D.2.

###### Lemma D.2 .

$tail_{L}(\alpha)$ and $tail_{R}(\beta)$ are continuous functions and $\lim_{\alpha\to-\infty}tail_{L}(\alpha)=0$, $\lim_{\alpha\to+\infty}tail_{L}(\alpha)=2\varepsilon-1<0$
, $\lim_{\beta\to+\infty}tail_{R}(\beta)=0$ and $\lim_{\beta\to-\infty}tail_{R}(\beta)=1-2\varepsilon>0$.

###### Proof.

Simply proved by the definition of $tail$ functions and properties of CDF.
∎

Step 2 Solving the equation 20 for simple cases.

###### Lemma D.3 .

$tail_{R}(\mu_{\text{maj}})>\frac{1}{2}-\varepsilon\geq 0$

###### Proof.

$$ $\displaystyle tail_{R}(\mu_{{\color[rgb]{0,0,1}\text{maj}}})$ $\displaystyle=(1-\varepsilon)\Big{[}1-F^{{\color[rgb]{0,0,1}\text{maj}}}(\mu_{ {\color[rgb]{0,0,1}\text{maj}}})\Big{]}-\varepsilon\Big{[}1-F^{{\color[rgb]{ 1,0,0}\text{min}}}(\mu_{{\color[rgb]{0,0,1}\text{maj}}})\Big{]}$ (21) $\displaystyle=(1-\varepsilon)\Big{[}1-\phi(0)\Big{]}-\varepsilon\Big{[}1-\phi \big{(}\frac{\mu_{{\color[rgb]{0,0,1}\text{maj}}}-\mu_{{\color[rgb]{1,0,0} \text{min}}}}{\sigma_{{\color[rgb]{1,0,0}\text{min}}}}\big{)}\Big{]}$ (22) $\displaystyle>\frac{(1-\varepsilon)}{2}-\varepsilon\big{(}1-\frac{1}{2}\big{)} =\frac{1-2\varepsilon}{2}=\frac{1}{2}-\varepsilon$ (23) $$

∎

###### Corollary D.2 .

Because $tail_{R}$ is continuous and $\lim_{\beta\to+\infty}tail_{R}(\beta)=0$, based on the mean value theorem, any value between zero and $\frac{(1-2\varepsilon)}{2}$ is obtainable by selecting a $\beta$ in $\left[\mu_{2},+\infty\right)$.

According to the previous corollary D.2 finding a positive $tail_{L}(\alpha)$ will satisfy our need. to find a suitable point, we employ derivatives and properties of relative PDFs to maximize $tail_{L}(\alpha)$ and find a positive value.

$$ $\displaystyle\begin{split}\frac{\mathrm{d}tail_{L}(\alpha)}{\mathrm{d\alpha}}& =\varepsilon f^{{\color[rgb]{1,0,0}\text{min}}}(\alpha)-(1-\varepsilon)f^{{ \color[rgb]{0,0,1}\text{maj}}}(\alpha)=\varepsilon f^{{\color[rgb]{0,0,1}\text {maj}}}(\alpha)\Big{[}\frac{f^{{\color[rgb]{1,0,0}\text{min}}}(\alpha)}{f^{{ \color[rgb]{0,0,1}\text{maj}}}(\alpha)}-\frac{1-\varepsilon}{\varepsilon}\Big{ ]}\end{split}$ (24) $$

The term $[\frac{f^{{\color[rgb]{1,0,0}\text{min}}}(\alpha)}{f^{{\color[rgb]{0,0,1}\text
{maj}}}(\alpha)}-\frac{1-\varepsilon}{\varepsilon}]$ has the same sign with derivative of $tail_{L}(\alpha)$, also it’s roots are critical points of $tail_{L}$, analyzing characteristics of $\log\frac{f^{{\color[rgb]{1,0,0}\text{min}}}(\alpha)}{f^{{\color[rgb]{0,0,1}
\text{maj}}}(\alpha)}$
is the key insight to find a proper $\alpha$ value.

$$ $\log f^{{\color[rgb]{1,0,0}\text{min}}}(\alpha)-\log f^{{\color[rgb]{0,0,1} \text{maj}}}(\alpha)=\log\Big{(}\frac{1-\epsilon}{\epsilon}\Big{)}$ $$

$$ $\Rightarrow\log\Big{(}\frac{\sigma_{{\color[rgb]{0,0,1}\text{maj}}}}{\sigma_{{ \color[rgb]{1,0,0}\text{min}}}}\Big{)}-\log\Big{(}\frac{1-\epsilon}{\epsilon} \Big{)}-\frac{(\alpha-\mu_{{\color[rgb]{1,0,0}\text{min}}})^{2}}{2\sigma_{{ \color[rgb]{1,0,0}\text{min}}}^{2}}+\frac{(\alpha-\mu_{{\color[rgb]{0,0,1} \text{maj}}})^{2}}{2\sigma_{{\color[rgb]{0,0,1}\text{maj}}}^{2}}=0$ $$

$$ $\Rightarrow\Big{(}\frac{1}{2\sigma_{{\color[rgb]{0,0,1}\text{maj}}}^{2}}-\frac {1}{2\sigma_{{\color[rgb]{1,0,0}\text{min}}}^{2}}\Big{)}\alpha^{2}+\Big{(} \frac{\mu_{{\color[rgb]{1,0,0}\text{min}}}}{\sigma_{{\color[rgb]{1,0,0}\text{ min}}}^{2}}-\frac{\mu_{{\color[rgb]{0,0,1}\text{maj}}}}{\sigma_{{\color[rgb]{ 0,0,1}\text{maj}}}^{2}}\Big{)}\alpha+\Big{[}\frac{\mu_{{\color[rgb]{0,0,1} \text{maj}}}^{2}}{2\sigma_{{\color[rgb]{0,0,1}\text{maj}}}^{2}}-\frac{\mu_{{ \color[rgb]{1,0,0}\text{min}}}^{2}}{2\sigma_{{\color[rgb]{1,0,0}\text{min}}}^{ 2}}+\log\Big{(}\frac{\sigma_{{\color[rgb]{0,0,1}\text{maj}}}}{\sigma_{{\color[ rgb]{1,0,0}\text{min}}}}\Big{)}+\log\Big{(}\frac{\epsilon}{1-\epsilon}\Big{)} \Big{]}=0$ $$

Because $\lim_{\alpha\to-\infty}tail_{L}(\alpha)=0$ and $\lim_{\beta\to+\infty}tail_{R}(\beta)<0$ to have a positive $tail_{L}(\alpha)$, we need to have an interval which $\frac{\mathrm{d}tail_{L}(\alpha)}{\mathrm{d\alpha}}$ is positive. For a second degree polynomial like $ax^{2}+bx+c$ to have positive value, either $a\geq 0$ or $\Delta>0$, in our case $a$ is $\Big{(}\frac{1}{\sigma_{{\color[rgb]{0,0,1}\text{maj}}}^{2}}-\frac{1}{\sigma_{
{\color[rgb]{1,0,0}\text{min}}}^{2}}\Big{)}$. if $\sigma_{{\color[rgb]{1,0,0}\text{min}}}\geq\sigma_{{\color[rgb]{0,0,1}\text{
maj}}}$ then $a\geq 0$ and the minority CDF function will dominate the majority CDF function in the left-side tail and by choosing a negative number with big enough absolute value for alpha and $tail_{L}(\alpha)$ will be positive.

Figure: (a)
Refer to caption: x13.png

Step 3 Solving equation 20 for special case $\sigma_{min}<\sigma_{maj}$
In case of $\sigma_{{\color[rgb]{1,0,0}\text{min}}}\leq\sigma_{{\color[rgb]{0,0,1}\text{
maj}}}$, having $\Delta>0$ is a necessary condition, also derivative of $tail_{L}(\alpha)$ is only positive in $(\frac{-b-\sqrt{\Delta}}{2a},\frac{-b+\sqrt{\Delta}}{2a})$ so the maximum of $tail_{L}$ is either in $-\infty$ or in $\frac{-b+\sqrt{\Delta}}{2a}$. Having $tail_{L}(\frac{-b+\sqrt{\Delta}}{2a})>0$ next to $\Delta>0$ condition, would be the necessary and also sufficient in this case.

$$ $B^{2}=\frac{\mu_{{\color[rgb]{1,0,0}\text{min}}}^{2}}{\sigma_{{\color[rgb]{ 1,0,0}\text{min}}}^{4}}+\frac{\mu_{{\color[rgb]{0,0,1}\text{maj}}}^{2}}{\sigma _{{\color[rgb]{0,0,1}\text{maj}}}^{4}}-2\frac{\mu_{{\color[rgb]{0,0,1}\text{ maj}}}\mu_{{\color[rgb]{1,0,0}\text{min}}}}{\sigma_{{\color[rgb]{0,0,1}\text{ maj}}}^{2}\sigma_{{\color[rgb]{1,0,0}\text{min}}}^{2}}$ $$

$$ $4AC=\frac{\mu_{{\color[rgb]{1,0,0}\text{min}}}^{2}}{\sigma_{{\color[rgb]{1,0,0 }\text{min}}}^{4}}-\frac{\mu_{{\color[rgb]{1,0,0}\text{min}}}^{2}}{\sigma_{{ \color[rgb]{0,0,1}\text{maj}}}^{2}\sigma_{{\color[rgb]{1,0,0}\text{min}}}^{2}} -\frac{\mu_{{\color[rgb]{0,0,1}\text{maj}}}^{2}}{\sigma_{{\color[rgb]{0,0,1} \text{maj}}}^{2}\sigma_{{\color[rgb]{1,0,0}\text{min}}}^{2}}+\frac{\mu_{{ \color[rgb]{0,0,1}\text{maj}}}^{2}}{\sigma_{{\color[rgb]{0,0,1}\text{maj}}}^{4 }}+4\Big{[}\log\Big{(}\frac{\sigma_{{\color[rgb]{0,0,1}\text{maj}}}}{\sigma_{{ \color[rgb]{1,0,0}\text{min}}}}\Big{)}+\log\Big{(}\frac{\epsilon}{1-\epsilon} \Big{)}\Big{]}\Big{[}\frac{1}{2\sigma_{{\color[rgb]{0,0,1}\text{maj}}}^{2}}- \frac{1}{2\sigma_{{\color[rgb]{1,0,0}\text{min}}}^{2}}\Big{]}$ $$

$$ $\Delta=\frac{(\mu_{{\color[rgb]{1,0,0}\text{min}}}-\mu_{{\color[rgb]{0,0,1} \text{maj}}})^{2}}{\sigma_{{\color[rgb]{1,0,0}\text{min}}}^{2}\sigma_{{\color[ rgb]{0,0,1}\text{maj}}}^{2}}-4\Big{[}\log\Big{(}\frac{\sigma_{{\color[rgb]{ 0,0,1}\text{maj}}}}{\sigma_{{\color[rgb]{1,0,0}\text{min}}}}\Big{)}+\log\Big{( }\frac{\epsilon}{1-\epsilon}\Big{)}\Big{]}\Big{[}\frac{1}{2\sigma_{{\color[rgb ]{0,0,1}\text{maj}}}^{2}}-\frac{1}{2\sigma_{{\color[rgb]{1,0,0}\text{min}}}^{2 }}\Big{]}\geq 0$ $$

$$ $\iff(\mu_{{\color[rgb]{1,0,0}\text{min}}}-\mu_{{\color[rgb]{0,0,1}\text{maj}}} )^{2}\geq 2\Big{[}\log\Big{(}\frac{1-\epsilon}{\epsilon}\Big{)}-\log\Big{(} \frac{\sigma_{{\color[rgb]{0,0,1}\text{maj}}}}{\sigma_{{\color[rgb]{1,0,0} \text{min}}}}\Big{)}\Big{]}\Big{[}\sigma_{{\color[rgb]{0,0,1}\text{maj}}}^{2}- \sigma_{{\color[rgb]{1,0,0}\text{min}}}^{2}\Big{]}$ $$

$$ $\iff\epsilon\geq\text{sigmoid}\Bigg{(}-\frac{(\mu_{{\color[rgb]{0,0,1}\text{ maj}}}-\mu_{{\color[rgb]{1,0,0}\text{min}}}\big{)}^{2}}{2(\sigma_{{\color[rgb] {0,0,1}\text{maj}}}^{2}-\sigma_{{\color[rgb]{1,0,0}\text{min}}}^{2})}-\log\Big {(}\frac{\sigma_{{\color[rgb]{0,0,1}\text{maj}}}}{\sigma_{{\color[rgb]{1,0,0} \text{min}}}}\Big{)}\Bigg{)}$ $$

Next, we investigate properties of the conditions of the proposition D.1 in case of $\sigma_{{\color[rgb]{0,0,1}\text{maj}}}<\sigma_{{\color[rgb]{1,0,0}\text{min}}}$. Schematic interpretation of these conditions is presented in figure 7.

- •
As equation 7 indicates, the minority group is not allowed to be too underrepresented. This especially has a direct relation with the difference of means. The more mean values of groups are different, the more imbalance can be mitigated through loss-based sampling. Mean value difference is especially affected by the spurious correlation, it escalates as the model relies on spurious correlation and also when the spurious features between groups are too different.
- •
On the other hand condition 6 is more complex and doesn’t have a simple closed form, we analytically describe its behaviors by fixating the means and calculating the valid values for $\varepsilon$. As the results show in figure 7, most of $\varepsilon$ are feasible in for $\sigma_{{\color[rgb]{1,0,0}\text{min}}}<\Delta\mu$
as we can see the possible region declines with an increase of $\sigma_{{\color[rgb]{1,0,0}\text{min}}}$ and valid $\varepsilon$ values cease to exist.

Figure: (a)
Refer to caption: x16.png

###### Lemma D.1 .

###### Proof.

###### Definition D.1 (Proportional Density Difference) .

###### Definition D.2 (Tail Proportional Density Difference) .

###### Corollary D.1 .

###### Proposition D.1 .

###### Lemma D.2 .

###### Proof.

###### Lemma D.3 .

###### Proof.

###### Corollary D.2 .

### D.2 Practical Justification

As shown in Table 3, the standard deviation ($\sigma$) of the minority group is consistently greater than that of the majority group across all analyzed datasets. Consequently, condition $(i)$ (Eq. 5) of Proposition D.1 is satisfied. Therefore, we theoretically expect the existence of properly balanced left and right tails.

**Table 3: Means, standard deviations (STD), and Earth Mover’s Distance across WaterBirds and CelebA datasets.**
|  | Waterbirds | CelebA |  |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
|  | Class 1 | Class 2 | Class 2 |  |  |  |
|  | Min | Maj | Min | Maj | Min | Maj |
| Mean ($\mu$) | $-6.77$ | $-19.17$ | $2.55$ | $11.39$ | $-1.02$ | $6.42$ |
| STD ($\sigma$) | $6.31$ | $6.23$ | $6.97$ | $4.75$ | $7.64$ | $6.48$ |
| Earth Mover’s Distance | $12.40$ | $8.84$ | $7.43$ |  |  |  |

## Appendix E Experimental Details

### E.1 Complete Results

The complete results on Waterbirds, CelebA, and UrbanCars, in addition to complete results on CivilComments and MultiNLI are reported in Tables 4 and 5 respectively. The results for all methods except Group DRO + EIIL on all datasets except UrbanCars are reported by Qiu et al. []. The results for Group DRO + EIIL are taken from  Zhang et al. []. Also, the results of our method and DFR are shown in Table 6

**Table 4: A comparison of the various methods, ours included, on spurious correlation datasets. The Group Info column indicates if each method utilizes group labels of the training/validation data, with ✓✓denoting that group information is employed during both the training and validation stages. Both the average test accuracy and worst test group accuracy are reported. The mean and standard deviation are calculated over three runs with different seeds. The numbers in bold represent the highest results among all methods, while the underlined numbers represent the best results among methods that may not require group annotation in the training phase.**
| Method | Group Info | Waterbirds | CelebA | UrbanCars |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| Train/Val | Worst | Average | Worst | Average | Worst | Average |  |
| GDRO [] | ✓/✓ | $91.4$ | $93.5$ | $\boldsymbol{88.9}$ | $92.9$ | $73.1$ | $84.2_{\pm 1.3}$ |
| DFR [] | ✗/✓✓ | $\boldsymbol{92.9_{\pm 0.2}}$ | $94.2_{\pm 0.4}$ | $88.3_{\pm 1.1}$ | $91.3_{\pm 0.3}$ | $79.6_{\pm 2.22}$ | $87.5_{\pm 0.6}$ |
| GDRO + EIIL [] | ✗/✓ | $77.2_{\pm 1}$ | $\underline{\boldsymbol{96.5_{\pm 0.2}}}$ | $81.7_{\pm 0.8}$ | $85.7_{\pm 0.1}$ | $76.5_{\pm 2.6}$ | $85.4_{\pm 2.1}$ |
| JTT [] | ✗/✓ | $86.7$ | $93.3$ | $81.1$ | $88.0$ | $79.5$ | $86.3$ |
| SELF [] | ✗/✓ | $\underline{91.6_{\pm 1.4}}$ | $93.6_{\pm 1.1}$ | $83.9_{\pm 0.9}$ | $91.7_{\pm 0.4}$ | $83.2_{\pm 0.8}$ | $\underline{\boldsymbol{90.0_{\pm 0.5}}}$ |
| AFR [] | ✗/✓ | $90.4_{\pm 1.1}$ | $94.2_{1.2}$ | $82.0_{\pm 0.5}$ | $91.3_{\pm 0.3}$ | $80.2_{\pm 2.0}$ | $87.1_{\pm 1.2}$ |
| EVaLS-GL (Ours) | ✗/✓ | $89.4_{\pm 0.3}$ | $95.1_{\pm 0.3}$ | $84.6_{\pm 1.6}$ | $91.1_{\pm 0.6}$ | $\underline{\boldsymbol{83.5}_{\pm 1.7}}$ | $88.3_{\pm 0.9}$ |
| ERM | ✗/✗ | $66.4_{\pm 2.3}$ | $90.3_{\pm 0.5}$ | $47.4_{\pm 2.3}$ | $\underline{\boldsymbol{95.5_{\pm 0.0}}}$ | $18.67_{\pm 2.01}$ | $76.5_{\pm 4.6}$ |
| EVaLS (Ours) | ✗/✗ | $88.4_{\pm 3.1}$ | $94.1_{\pm 0.1}$ | $\underline{85.3_{\pm 0.4}}$ | $89.4_{\pm 0.5}$ | $82.1_{\pm 0.9}$ | $88.1_{\pm 0.9}$ |

**Table 5: A comparison of the various methods, ours included, on CivilComments and MultiNLI. The Group Info column indicates if each method utilizes group labels of the training/validation data, with ✓✓denoting that group information is employed during both the training and validation stages. Both the average test accuracy and worst test group accuracy are reported. The mean and standard deviation are calculated over three runs with different seeds. The numbers in bold represent the highest results among all methods, while the underlined numbers represent the best results among methods that may not require group annotation in the training phase.**
| Method | Group Info | CivilComments | MultiNLI |  |  |
| --- | --- | --- | --- | --- | --- |
| Train/Val | Worst | Average | Worst | Average |  |
| GDRO [] | ✓/✓ | $\boldsymbol{69.9}$ | $88.9$ | $\boldsymbol{77.7}$ | $81.4$ |
| DFR [] | ✗/✓✓ | $70.1_{\pm 0.8}$ | $87.2_{\pm 0.3}$ | $74.7_{\pm 0.7}$ | $82.1_{\pm 0.2}$ |
| GDRO + EIIL [] | ✗/✓ | $67.0_{\pm 2.4}$ | $90.5_{\pm 0.2}$ | $61.2_{\pm 0.5}$ | $79.4_{\pm 0.2}$ |
| JTT [] | ✗/✓ | $\underline{69.3}$ | $91.1$ | $72.6$ | $78.6$ |
| SELF [] | ✗/✓ | $65.9_{\pm 1.7}$ | $89.7_{\pm 0.6}$ | $70.7_{\pm 2.5}$ | $81.2_{\pm 0.7}$ |
| AFR [] | ✗/✓ | $68.7_{\pm 0.6}$ | $89.8_{\pm 0.6}$ | $73.4_{\pm 0.6}$ | $81.4_{\pm 0.2}$ |
| EVaLS-GL (Ours) | ✗/✓ | $68.0_{\pm 0.5}$ | $89.2_{\pm 0.3}$ | $\underline{75.1_{\pm 1.2}}$ | $81.6_{\pm 0.2}$ |
| ERM | ✗/✗ | $61.2_{\pm 3.6}$ | $\underline{\boldsymbol{92.0_{\pm 0.0}}}$ | $64.8_{\pm 1.9}$ | $\underline{\boldsymbol{82.6_{\pm 0.0}}}$ |

**Table 6: A Comparison of ERM, DFR, EVaLS, and EVaLS-GL on the Dominoes-CMF with different spurious correlations for the unknown feature. Both the worst and average of test group accuracies are presented. The mean and standard deviation are calculated based on runs with three distinct seeds.**
|  | $85\%$ Corr. | $90\%$ Corr. | $95\%$ Corr. |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| Method | Worst | Average | Worst | Average | Worst | Average |
| ERM | $68.27_{\pm 1.5}$ | $97.14_{\pm 0.5}$ | $50.6_{\pm 1.0}$ | $96.1_{\pm 0.0}$ | $36.84_{\pm 2.0}$ | $95.37_{\pm 1.0}$ |
| DFR | $70.71_{\pm 0.5}$ | $86.2_{\pm 0.6}$ | $60.2_{\pm 1.2}$ | $84.6_{\pm 0.4}$ | $42.74_{\pm 2.7}$ | $81.5_{\pm 1.2}$ |
| EVaLS-GL | $70.13_{\pm 2.94}$ | $82.5_{\pm 1.8}$ | $63.6_{\pm 1.3}$ | $78.7_{\pm 1.5}$ | $48.53_{\pm 0.8}$ | $77.0_{\pm 2.0}$ |
| EVaLS | $\boldsymbol{72.97_{\pm 4.8}}$ | $81.5_{\pm 1.8}$ | $\boldsymbol{67.1_{\pm 4.2}}$ | $78.6_{\pm 2.0}$ | $\boldsymbol{51.15_{\pm 1.43}}$ | $77.5_{\pm 2.5}$ |

### E.2 Dominoes-Colored-MNIST-FashionMNIST

#### Dominoes-Colored-MNIST-FashionMNIST (Dominoes-CMF)

is a synthetic dataset.
We adopt a similar approach to previous works [, , ] using a modified version of the Dominoes binary classification dataset. This dataset consists of images with the top half showing CIFAR-10 images [], divided into two meaningful classes: vehicles (airplane, car, ship, truck) and animals (cat, dog, horse, deer). The bottom half displays either MNIST [] images from classes $\{0-3\}$ or Fashion-MNIST [] images from classes $\{\text{T-shirt},\text{Dress},\text{Coat},\text{Shirt}\}$. The complex feature (top half) serves as the core feature and the simple feature (bottom half) is linearly separable and correlated with the class label at 75%. Furthermore, inspired by the approaches in Zhang et al. [], Arjovsky et al. [], we intentionally introduce an additional spurious attribute by artificially coloring a subset of images as follows: for three different datasets, 85%, 90%, and 95% of the images in the bottom half of class $c_{1}$ are randomly assigned a red color in each respective dataset, while 15%, 10%, and 5% of the images are assigned a green color, respectively. The same procedure is applied inversely for class $c_{2}$.

See Table 7 for more details about the dataset statistics.

**Table 7: Dominoes-CMF Dataset Statistics for 85%, 90%, and 95% Correlation**
| Top part |  | Bottom Part ($85\%$ Corr.) | Bottom Part ($90\%$ Corr.) | Bottom Part ($95\%$ Corr.) |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| CIFAR-10 Class | Color | MNIST | Fashion-MNIST | MNIST | Fashion-MNIST | MNIST | Fashion-MNIST |
| $c_{1}$ (Vehicle) | Red | 12,750 | 4,250 | 13,500 | 4,500 | 14,250 | 4,750 |
| Green | 2,250 | 750 | 1,500 | 500 | 750 | 250 |  |
| $c_{2}$ (Animal) | Red | 750 | 2,250 | 500 | 1,500 | 250 | 750 |
| Green | 4,250 | 12,750 | 4,500 | 13,500 | 4,750 | 14,250 |  |
| Total |  | 40,000 | 40,000 | 40,000 |  |  |  |

**Table 8: ERM Accuracies on Dominoes-CMF Dataset. The mean and standard deviation are reported based on three runs with different seeds.**
| Top part |  | Bottom Part ($85\%$ Corr.) | Bottom Part ($90\%$ Corr.) | Bottom Part ($95\%$ Corr.) |  |  |  |
| --- | --- | --- | --- | --- | --- | --- | --- |
| CIFAR-10 Class | Color | MNIST | Fashion-MNIST | MNIST | Fashion-MNIST | MNIST | Fashion-MNIST |
| $c_{1}$ (Vehicle) | Red | $98.53_{\pm 0.01}\%$ | $95.61_{\pm 1.1}\%$ | $99.2_{\pm 0.01}\%$ | $95.2_{\pm 1.1}\%$ | $99.63_{\pm 0.01}\%$ | $98.11_{\pm 1.1}\%$ |
| Green | $89.33_{\pm 2.4}\%$ | $68.57_{\pm 0.5}\%$ | $84.5_{\pm 2.4}\%$ | $54.7_{\pm 0.5}\%$ | $63.1_{\pm 1.4}\%$ | $36.84_{\pm 0.5}\%$ |  |
| $c_{2}$ (Animal) | Red | $68.28_{\pm 2.6}\%$ | $86.18_{\pm 2.4}\%$ | $56.8_{\pm 5.6}\%$ | $86.7_{\pm 2.4}\%$ | $39.13_{\pm 1.6}\%$ | $68.53_{\pm 2.4}\%$ |
| Green | $93.97_{\pm 0.5}\%$ | $98.36_{\pm 0.2}\%$ | $96.2_{\pm 0.5}\%$ | $99.3_{\pm 0.2}\%$ | $97.92_{\pm 0.5}\%$ | $99.25_{\pm 0.2}\%$ |  |

### E.3 Datasets

#### Waterbirds [ 7 ]

The dataset comprises images of diverse bird species, classified into two categories: waterbirds and landbirds. Each image features a bird set against a backdrop of either water or land. Interestingly, the background scene acts as a spurious feature in this classification task. Waterbirds are primarily shown against water backgrounds, and landbirds against land backgrounds. Consequently, waterbirds on water and landbirds on land form the minority groups in the training data. It’s important to note that the validation dataset for waterbirds is group-balanced, meaning birds from each class are equally represented against both water and land backgrounds. This dataset is mainly categorized as a spurious correlation dataset.

#### CelebA [ 13 ]

is a widely used dataset in image classification tasks, featuring annotations for 40 binary facial attributes such as hair color, gender, and age. Hair color classification is particularly prominent in literature focusing on spurious correlation robustness. Notably, gender serves as a spurious attribute within this dataset, where a significant majority $94\%$ of individuals with blond hair are women, while men with blond hair represent a minority group. In addition to spurious correlation in the class of blond hair, this dataset also exhibits class imbalance.

#### MultiNLI [ 15 ]

dataset involves a text classification task focused on determining the relationship between pairs of sentences: contradiction, entailment, or neutral. Sentences containing negation words such as "no" or "never" are under-represented in all three classes, inducing attribute imbalance in the dataset.
Figure 8 illustrates the distinct behavior of this dataset compared to other datasets that contain spurious attributes.

#### CivilComments [ 16 ]

dataset, as part of the WILDS benchmark, involves a text classification task focused on labeling online comments as either "toxic" or "not toxic". Each comment is associated with 8 attributes, including gender (male, female), sexual orientation (LGBTQ), race (black, white), and religion (Christian, Muslim, or other), based on whether these characteristics are mentioned in the comment. While there is a small attribute imbalance in the dataset, it can categorized into datasets with class imbalance. The detailed proportion of each attribute in each class is described in Table  9. In this paper, we use the implementation of the dataset by the WILDS package [].

**Table 9: Proportion of attributes in each class for CivilComments dataset.**
| Toxicity (Class) | Male | Female | LGBTQ | Christian | Muslim | Other Religions | Black | White |
| --- | --- | --- | --- | --- | --- | --- | --- | --- |
| 0 0 | $0.11$ | $0.12$ | $0.03$ | $0.10$ | $0.05$ | $0.02$ | $0.03$ | $0.05$ |
| $1$ | $0.14$ | $0.15$ | $0.08$ | $0.08$ | $0.10$ | $0.03$ | $0.1$ | $0.14$ |

#### UrbanCars [ 14 ]

is an image classification dataset with multiple shortcuts. Each image in the dataset consists of a car in the center of the image on a natural scene background, with another object to the right of the image. Images are labeled Urban or City according to the type of car present in the center. However, each of the backgrounds and the additional objects is highly correlated with the label. While the test set consists of 8 environments based on combinations of the core and two spurious patterns, the training and validation set consist of four groups, based on combinations of the label and only one of the shortcuts.

Figure: (a) MultiNLI
Refer to caption: x20.png

### E.4 Training Details

#### ERM

For Waterbirds and CelebA, we utilize the ResNet50 checkpoints available in the GitHub repository of Kirichenko et al. [] as our base model. We use the ResNet-50 architecture provided by the torchvision package. In the case of CivilComments and MultiNLI, we adopt a similar approach to Kirichenko et al. [], using BertForSequenceClassification.from_pretrained (’bert-base-uncased’, ...) from the transformers package. The model is trained using the AdamW optimizer with a learning rate of $10^{-5}$, weight decay of $10^{-4}$, and a batch size of 16 for a total of 5 epochs.

For the UrbanCars dataset, we adhere to the settings described in Li et al. [], which involves training a ResNet-50 model pretrained on ImageNet using the SGD optimizer with a learning rate of $10^{-3}$, momentum of 0.9, weight decay of $10^{-4}$, and a batch size of 128 for 300 epochs. For the Dominoes-CMF dataset, we train a ResNet18 model pretrained on ImageNet for 20 epochs with a batch size of 128 and an SGD optimizer with a learning rate of $10^{-3}$, momentum of 0.9, and weight decay of $10^{-4}$.

#### EVaLS and EVaLS-GL

For every dataset, EIIL was utilized with a learning rate of $0.01$, a total of 20000 steps, and a batch size of 128. The last layer of the model was trained on all datasets using the Adam optimizer. A batch size of 32 and a weight decay of $10^{-4}$ were used for all datasets. Our method was evaluated on the validation sets of each dataset, considering both fine-tuning and retraining of the last layer. For all datasets, with the exception of MultiNLI, retraining provided superior validation results. The specifics regarding the number of epochs and the ranges for hyperparameter search (including learning rate, $\ell_{1}$-regularization coefficient ($\lambda$), and the number of selected samples ($k$)) for each dataset are as follows:

- •
Waterbirds.
–
epochs = 100,
–
lr = $5\times 10^{-4}$,
–
$\lambda\in\{0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.2,0.3,0.4,0.5\}$,
–
$k\in\{20,25,30,35,40,45,50,55,60\}$.
- •
CelebA
–
epochs = 50,
–
lr = $5\times 10^{-4}$,
–
$\lambda\in\{0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.2,0.3,0.4,0.5
,\\
0.6,0.7,0.8,0.9,1,2\}$,
–
$k\in\{50,100,150,200,250,300\}$.
- •
UrbanCars
–
epochs = 100,
–
lr $\in$ {$5\times 10^{-4}$, $10^{-3}$},
–
$\lambda\in\{0,0.01,0.02,0.05,0.1,1\}$,
–
$k\in\{10,20,30,50,63\}$.
- •
CivilComments
–
epochs = 50,
–
lr $\in\{10^{-4},5\times 10^{-4}\}$,
–
$\lambda\in\{0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.2,0.3,0.4,0.5
,\\
0.6,0.7,0.8,0.9,1,2\}$,
–
$k\in\{500,750,1000,1250,1500\}$.
- •
MultiNLI
–
epochs = 200,
–
lr $\in\{10^{-3},10^{-2}\}$,
–
$\lambda\in\{0,0.01,0.02,0.03,0.04,0.05,0.06,0.07,0.08,0.09,0.1,0.2,0.3,0.4,0.5\}$,
–
$k\in\{20,30,40,50,60,75,100,125,150,200,250,300\}$.
- •
Dominoes-CMF
–
LogisticRegression(penalty="l1", solver="liblinear")
–
$\lambda\in\{0.001,0.003,0.01,0.02,0.03,0.05,0.07,0.1,0.2,0.3,0.5,0.7,1.0,3.0\}$,
–
$k\in[10,80]$.

### E.5 Sensitivity to Hyperparameters

Figure: (a) Waterbirds
Refer to caption: x24.png

The parameters $k$ (the number of selected samples from each loss tail) and $\lambda$ (the $\ell_{1}$ regularization factor) are automatically selected using the environment/group-based validation scheme proposed in our method. Sensitivity heatmaps demonstrate the impact of $k$ and $\lambda$ on the worst-group validation accuracy (WGA) across various datasets. Importantly, our results demonstrate that for most datasets, multiple hyperparameter combinations yield optimal or near-optimal performance, reducing the need for exhaustive searches. This suggests that the hyperparameter tuning process is not prohibitively difficult, and even relatively shallow or targeted hyperparameter searches suffice to identify optimal hyperparameter configurations. The difference in WGA between the best and worst hyperparameter settings for the Waterbirds, CelebA, and UrbanCars datasets is approximately $10\%$, $16\%$, and $25\%$, respectively.

## Appendix F Ablation Study

### F.1 Use of EIIL with DFR and AFR

We conducted an ablation study to investigate the impact of using environments inferred from EIIL on model selection. Specifically, we benchmarked the performance of DFR and AFR with EIIL-inferred groups. The results, presented in Table 10, demonstrate the effectiveness of incorporating EIIL-inferred groups in model selection. The results show that while EIIL-inferred groups reduce the performance compared to ground-truth annotations for model selection, they still can be effective for robustness to an extent. Moreover, EVaLS outperforms these two methods when using EIIL inferred environments.

**Table 10: Results of DFR and AFR with EIIL-inferred environment for model selection.**
| Method | Waterbirds | Celeba |
| --- | --- | --- |
| DFR (with EIIL) | $\mathbf{92.21\pm 0.02}$ | $\mathbf{85.55\pm 1.0}$ |
| AFR (with EIIL) | $82.6\pm 0.04$ | $72.5\pm 0.01$ |

### F.2 Comparison of High-Loss and Misclassified-Sample Selection

Several methods, such as JTT [], rely on misclassified points to address group imbalances by treating these points as belonging to a minority group.
To verify the effectiveness of loss-based sampling in comparison with misclassification-based sample selection, we conducted an experiment by replacing loss-based sampling in in EVaLS with selecting misclassified samples and an equal number of randomly chosen correctly classified samples from each class. This results in degraded performance compared to EVaLS on the Waterbirds and UrbanCars datasets, and only a marginal improvement (with higher variance) on CelebA, as summarized in Table 11.

**Table 11: Performance comparison between misclassified sample selection and EVaLS on the Waterbirds, CelebA, and UrbanCars datasets. The mean and standard deviation values are calculated over three runs with different seeds.**
| Method | Waterbirds | CelebA | UrbanCars |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| Worst | Average | Worst | Average | Worst | Average |  |
| Misclassified Selection | $77.8_{\pm 5.2}$ | $94.0_{\pm 0.4}$ | $85.9_{\pm 1.0}$ | $89.4_{\pm 0.8}$ | $78.4_{\pm 4.5}$ | $86.9_{\pm 1.4}$ |
| EVaLS | ${88.4_{\pm 3.1}}$ | $94.1_{\pm 0.1}$ | ${85.3_{\pm 0.4}}$ | $89.4_{\pm 0.5}$ | ${82.1_{\pm 0.9}}$ | ${88.1_{\pm 0.9}}$ |

### F.3 Other Group Inference Methods

In addition to EIIL, other group inference methods could be utilized for partitioning the model selection set into environments.

#### Error Splitting

JTT [] partitions data into two correctly classified and misclassified sets based on the predictions of a model trained with ERM. We split each of these two sets based on labels of samples, obtaining $|\mathcal{Y}|\times 2$ environments.

#### Random Classifier Splitting

uses a random classifier to classify features obtained from a model trained with ERM into correctly classified and misclassified sets. Similar to error splitting, we split the sets based on group labels. The difference between error splitting and random classifier splitting is solely in the reinitialization of the classification layer.

The results for EVaLS-ES (EVaLS+Error Sampling) and EVaLS-RC (EVaLS+Random Classifier) are shown in Table 12. One limitation of error splitting is that in datasets with noisy labels or corrupted images, samples that an ERM model misclassifies may not always belong to minority groups. In these situations, choosing models based on their accuracy on corrupted data could lead to the selection of models that are not robust to spurious correlations. This is demonstrated by the results of EVaLS-ES on the CelebA dataset.

This shortcoming of error splitting can be alleviated by employing a random classifier instead of the ERM-trained one. Due to the feature-level similarity between minority and majority samples in datasets affected by spurious correlation [, , ], it is expected that the classifier can differentiate between the groups to some extent. As shown in Table 12, surprisingly, EVaLS-RC produces results that are generally comparable to EVaLS. However, the performance of this method may have high variance, depending on the different initializations of the classifier.

**Table 12: The performances of three environment inference methods, when combined with loss-based sample selection, are evaluated on spurious correlation benchmarks. The mean and standard deviation values are calculated over three separate runs, each initiated with a different seed.**
| Method | Waterbirds | CelebA | UrbanCars |  |  |  |
| --- | --- | --- | --- | --- | --- | --- |
| Worst | Average | Worst | Average | Worst | Average |  |
| EVaLS-ES | $82.1_{\pm 1.2}$ | $\boldsymbol{94.3_{\pm 0.04}}$ | $48.4_{\pm 11.6}$ | $69.5_{\pm 6.5}$ | $79.2_{\pm 2.9}$ | $86.1_{\pm 0.9}$ |
| EVaLS-RC | $\boldsymbol{88.7_{\pm 1.0}}$ | $94.3_{\pm 1.1}$ | $78.1_{\pm 5.1}$ | $\boldsymbol{93.5_{\pm 0.2}}$ | $\boldsymbol{82.4_{\pm 3.2}}$ | $\boldsymbol{88.2_{\pm 0.8}}$ |
| EVaLS | $88.4_{\pm 3.1}$ | $94.1_{\pm 0.1}$ | $\boldsymbol{85.3_{\pm 0.4}}$ | $89.4_{\pm 0.5}$ | $82.1_{\pm}{0.9}$ | $88.1_{\pm 0.9}$ |

## Appendix G Societal Impacts

Real-world datasets often encapsulate social biases that stem from entrenched stereotypes and historical discrimination, affecting various groups such as genders and races. Machine learning methods, which learn the correlation between patterns in input data and their targets (e.g., labels in a classification task) [], inadvertently absorb this bias. This unintended consequence leads to fairness issues in many applications. While strategies to mitigate such biases have been proposed (as discussed comprehensively in Section A), societal biases are not always known and determined. We believe that our work, as it addresses these unidentified biases, takes a significant step towards making machine learning fairer for our society.

## Appendix H Computational Resources

Each experiment was conducted on one of the following GPUs: NVIDIA H100 with 80G memory, NVIDIA A100 with 80G memory, NVIDIA Titan RTX with 24G memory, Nvidia GeForce RTX 3090 with 24G memory, and NVIDIA GeForce RTX 3080 Ti with 12G memory.

## Peer Reviews

confidence: 3
contribution: 3
initial_rating: 5
presentation: 2
questions: See weakness above.
soundness: 2
strengths: 1. The proposed approach EValS, using environment inference and Loss-based sampling, is novel and interesting. 
2. EValS has competitive performance with other methods across diverse datasets.
summary: The paper EVaLS, a method to improve model robustness against spurious correlations without requiring group annotations. EVaLS balances high- and low-loss samples from an ERM-trained model and applies a simple last-layer retraining (on a loss-based sampled dataset), thus enhancing group robustness. The approach also uses worst environment accuracy to for model selection. Experimental results on diverse dataset shows competitive performance to baseline methods.
weaknesses: 1. The assumption that "minority samples are more prevalent among high-loss samples, while majority samples dominate the low-loss category" is questionable. It is easy to construct distributions that does not satisfy this assumption. 
2. The performance of EValS seems to rely on the EIIL to find the correct environment. However, how to find the environments may be a challenging problem itself. 
3. The peformance of EValS does not seem consistently better than other baseline methods across all datasets. It is not clear whether the better performance in specific dataset is by chance.

---

confidence: 4
contribution: 2
initial_rating: 5
presentation: 3
questions: - See the weaknesses.
- In Table 1, why the experiments on the CivilComments and MultiNLI datasets are out of the scope of the method?
- In L189, the authors mention that they randomly divide the validation set into $\mathcal{D}^{LL}$ and $\mathcal{D}^{MS}$. What if the random division results in a poor set of $\mathcal{D}^{MS}$ which does not have sufficient samples to represent a minority group of samples?
soundness: 2
strengths: - The paper is well-written and easy to follow.

- The paper proposes a practical method to mitigate the reliance on spurious correlations without any group annotations. 

- A new dataset is constructed that demonstrates the effectiveness of the proposed method in mitigating unknown shortcuts.
summary: Many studies that enhance robustness to spurious correlation require group annotations for training. This paper aims to enhance the robustness with minimal group annotation assumptions. Specifically, the losses from an ERM-trained model are used to construct a balanced dataset of high-loss and low-loss samples, mitigating group imbalance in data. Moreover, using environment inference methods to create diverse environments has been shown to potentially eliminate the need for group annotation in model selection. Experiments demonstrate the effectiveness of the proposed method.
weaknesses: - The proposed method is incremental and has limited technical contributions. Retraining the last-layer using group-balanced validation data to mitigate the reliance on spurious correlations has been used in [1,2]. Inferring environment is a direct follow-up of [3].

- The theoretical analysis does not really explain why loss-based sampling within a class can be used to create a group-balanced dataset. The analysis assumes that the losses on the majority and minority samples follow Gaussian distributions. Under this assumption, it is obvious that the loss-based sampling could create two group-balanced sets of data. However, whether this assumption holds in practice is questionable. Moreover, a previous study [2] has found that that model disagreement may effectively upsample worst-group data, or in other words, may create a more group-balanced dataset. Thus, the loss-based sampling may not be as effective as proved in the paper.

- The comparison in Table 1 isn't fair for some methods. EVaLS uses new data, i.e., a part of validation data, for retraining, while methods including GDRO + EIIL, JTT, and ERM do not have access to the new data. Moreover, the existing work [4] also propose a method that aims to mitigate spurious correlations without group annotations. It would be beneficial to compare with this method under the same setting. 

- There are some model selection methods that do not require group annotations, such as minimum class difference [4] and worst-class accuracy [5]. It would be helpful to analyze the effectiveness of the proposed worst environment accuracy in comparison with these techniques.

[1] Kirichenko et al., Last layer re-training is sufficient for robustness to spurious correlations, ICLR 2023.\
[2] LaBonte et al., Towards last-layer retraining for group robustness with fewer annotations, NIPS, 2023.\
[3] Creager et al., Environment inference for invariant learning, ICML, 2021.\
[4] Li et al., Bias Amplification Enhances Minority Group Performance, TMLR, 2024.\
[5] Yang et al., Change is hard: A closer look at subpopulation shift, ICML, 2023.

---

confidence: 3
contribution: 2
initial_rating: 5
presentation: 2
questions: - From lines 452-457, the authors state that annotation-free methods can mitigate the impact of both labeled and unlabeled shortcut features more effectively. However, EVaLS-GL, which utilizes group labels, achieved better results than EVaLS. Could the authors provide their insights on this phenomenon?
- 
In the experiments, the performance of EVaLS and EVaLS-GL varied, with each having its strengths and weaknesses. Could the authors discuss the advantages and disadvantages of using inferenced environments versus group labels based on these findings?
soundness: 3
strengths: The method of selecting high-loss and low-loss data proposed in this paper effectively mitigated the problem of group imbalance, with both experiments and theoretical analysis effectively validating this point.
summary: This paper introduces a method called EVaLS, which trains a classifier that is robust to spurious correlations without requiring group labels. The method constructs a balanced dataset based on loss values and utilizes environments for hyperparameter tuning. Experiments on several datasets demonstrate the effectiveness of the proposed method.
weaknesses: - The authors may need to provide a more detailed description of the advantages of loss-based sampling over other sampling methods. For instance, it would be beneficial to compare it specifically with methods like SELF, highlighting the unique benefits or efficiencies achieved by the proposed method.

- The authors' claim that their method 'completely eliminates the need for group annotations' as a primary contribution seems somewhat tenuous. The methodology presented in the paper can be categorized into two main components: Environment-based Validation (EV) and Loss-based Sampling (LS). Notably, LS appears to require group labels for hyperparameter tuning, while EV utilizes environment labels generated through Environment Inference for Invariant Learning (EIIL) as a stand-in for group labels. However, EIIL was originally proposed by Creager et al., 2021, and it was inherently designed to address scenarios where group labels are not available. Although Creager et al., 2021 used true group labels for model selection within GroupDRO in their experiments, it appears that environment labels could also be suitably employed for this step.

---

confidence: 3
contribution: 3
initial_rating: 6
presentation: 3
questions: Some questions:
1) Is it feasible to add AFR results to the multiple spurious attributes experiment?   
2) Is it feasible to add an extra dataset to the multiple spurious attributes experiment?

Adding these extra results will address the points mentioned in the weakness, showing stronger empirical evidence about EVaLS advantage in cases with multiple spurious attributes. 

Minor points:
- There are references to Figure 1 (Line 83) and Figure 3 (Lines 172-177) that come before Figure 2 and were a bit confusing to me while I was reading the paper for the first time. In my opinion, removing these references will improve the readability of the paper.  
- Figure 2 instead of figure 2 (Line 205).  
- Have the oracle results as a reference in Table 6 to follow Figure 4 (b).  
- Figure 4 (b) could include the standard deviation (such as in Table 6).  
- Sometimes you use sub-population (Line 131) or subpopulation (Line 139). Keep it consistent across the paper.
soundness: 3
strengths: - Simple method, that works in multiple scenarios (with and without group annotations).  
- The method do not make strong assumptions about the trained model. The only requirement is a model trained by ERM (the training data or any other training information is not necessary), while the method acts in a post-training phase.  
- It shows competitive performance in comparison to the literature, while it has a less strict set of requirements in comparison to most of them.  
- EVaLS outperforms the DFR (one of the state-of-the-art models) in cases with multiple spurious attributes
summary: This paper works in the sub-population shift setting, in which the data consists in samples of different groups that shares a property. The goal is to learn a model robust to sub-population shifts, such as class imbalance, attribute imbalance, and spurious correlations. They propose a method (EVaLS) that improves the robustness of models trained using ERM without using any group annotation data. The method is well motivated both empirically and theoretically, and they show that the model has competitive performance with and without using group annotation. Moreover, they show that EVaLS is robust to scenarios where there is an unknown spurious attribute in comparison to the state-of-the-art.
weaknesses: - Make a comparison of EVaLS with more methods (e.g. AFR, since it also doesn't depend on ERM training) in the multiple spurious attributes scenario.
- Have more evidence that EVaLS outperforms the DFR/other methods in cases with multiple spurious attributes (e.g. using more datasets). I believe that this is the strongest part of the results, and it is a clear advantage for EVaLS (besides cases in which group annotation is not available).

Meta-review: The paper having been borderline during the review process, I have read it and made my own idea of its content.

First, the paper makes the repeated claim, also repeated here in rebuttals, that its approach is near-optimal. But there is absolutely *no* formal result in the paper that allow to state such near optimality (certainly not Proposition 3.1, see below). The paper and rebuttal clearly attach to this claim of near-optimality the results of one *experimental* table (1). Such a claim could eventually be supported *iff* the optimal mark was known for the domains (e.g. if the domains had been simulated, with clear evidence or a proof of the best result). This is clearly not the case here and the authors insistence on this so-called near-optimality give the opposite results of the one intended: it ends up overselling results otherwise fine. 

It is important to insist at this point that absolutely *nothing* in the paper supports *any* claim of near-optimality of the method proposed.

Then, regarding the theory, there is little in the paper that serves the authors claim of generality. Proposition 3.1 is unfortunately poorly formulated and it is hard to understand the meaning of (1), which does not appear in a sentence (reading the appendix, I suspect it is the result of an unfortunate cut in the paper but any fix I can imagine certainly does not bring any substantial part of the generality claimed). The background of Proposition 3.1 is however *extremely* specific and shallow and *certainly* cannot serve as an illustration of the paper's claims about being of broad appeal (weakness #2 of reviewer 3i2u).

I can only stress the importance of *either* a strong formal analysis of the problem, *or* a more thorough experimental section -- indeed, the range of the key values of the approach are so different between domains (Section E.4) that it seems extremely complicated to figure out a simple rule of thumb to give a new user as a starting point to use the technique. In this context, writing "our results demonstrate that for most datasets, multiple hyperparameter combinations yield optimal or near-optimal performance, reducing the need for exhaustive searches" (L1399) makes little sense for *two reasons*, not just for the near-optimality claim (see above), but also because it is clear that the authors have spent a lot of time doing **domain dependent choices** for the parameters used without much details on why / how choices were made.

In fine, I believe the paper starts with an interesting idea -- indeed, a loss can often be viewed as a negative log-likelihood and so the idea of loss sampling can make sense --, but fails to give the proofs that the idea developed justifies the extremely strong claims made here and there in the paper. I can only recommend that the authors redraft the paper, dig in the theory and orient new experiments to show the approach is simple to use and its (hyper)parameters are at least reasonably easy to figure out even for just a reasonable range.

Decision: Reject