Spread Spurious Attribute: Improving Worst-group Accuracy with Spurious Attribute Estimation 

1 INTRODUCTION . Machine learning models trained on datasets containing spurious correlation ( also known as “ shortcuts ” ) often end up learning such shortcuts instead of intended solutions ( Geirhos et al. , 2020 ) . For example , consider an image classification dataset of ‘ cows ’ and ‘ camels , ’ in which most images of cows appear on grasslands and camels on deserts . When trained on such a dataset , models often learn to make predictions based on the landscape instead of the object ( Beery et al. , 2018 ) . This phenomenon can lead to very low test accuracies on groups underrepresented in the training set . Various approaches have been proposed to resolve this gap , and the idea of minimizing the worstgroup loss—e.g. , Sagawa et al . ( 2020 ) —has arisen as one of the most promising solutions . This approach forces high performances on both the majority group ( e.g. , cows standing on grasslands ) and the minority group which contradicts the spurious correlation ( e.g. , cows standing on deserts ) . Despite its effectiveness , the worst-group loss minimization approach has a drawback : The learner requires supervision on which group each training sample belongs . For example , the learner needs to know that sample belongs to both the ‘ cow ’ and the ‘ desert ’ categories to utilize such group information to perform worst-group loss minimization . Even if we put aside the issue of identifying the spuriously correlated attributes ( ‘ desert ’ and ‘ grass ’ ) in the first place , one still needs to collect additional annotation on such spurious attributes . Acquiring such fine-grained annotation is presumably more expensive to collect , as the annotator needs a clear understanding of both the target attribute ( ‘ cow ’ and ‘ camel ’ ) and the spurious attribute ( ‘ desert ’ and ‘ grass ’ ) . Acknowledging this difficulty , recent works propose worst-group loss minimization algorithms that require a smaller number of group-labeled training samples ( i.e. , training samples with spurious attribute annotations ) ( Nam et al. , 2020 ; Liu et al. , 2021 ) . At a high level , these works share a similar strategy ( Fig . 1 , Left ) : The methods first use a specialized mechanism to identify minority group samples among group-unlabeled training samples , and train a model in a way that puts more emphasis on identified-as-minority samples , e.g. , by upweighting . A small set of group-labeled samples are used to tune hyperparameters of this procedure ; as Liu et al . ( 2021 ) shows , the performance of trained models are very sensitive to these hyperparameters , indicating the high dependency of such algorithms on the availability of the group-labeled samples . Although these methods achieve higher worst-group accuracy than completely annotation-free approaches , e.g. , Sohoni et al . ( 2020 ) , they fail to perform comparably to the algorithms which use full annotations on spurious attributes , e.g. , Sagawa et al . ( 2020 ) . This performance gap gives rise to the following question : Can we closely achieve the full-annotation performance using a partially annotated dataset , if we use group-labeled samples more actively than hyperparameter-tuning ? Contribution . This paper proposes a worst-group loss minimization algorithm , coined Spread Spurious Attribute ( SSA ) . At a high level , SSA consists of two phases—pseudo-labeling and robust training—that are designed to make a full use out of the group-labeled samples ( Fig . 1 , Right ) : • Pseudo-labeling : SSA trains a spurious attribute predictor , using both group-labeled and groupunlabeled samples ( i.e. , samples lacking spurious attribute annotations ) . We find that group imbalances underlying the dataset can render pseudo-labels to be biased towards the majority group , which can be detrimental to the performance ( as in Kim et al . ( 2020 ) ) , and propose using groupwise adaptive thresholds to mitigate this problem . The predictions are used as pseudo-labels ( Lee , 2013 ) on the group-unlabeled samples . • Robust training : Based on the pseudo-labeled training set , SSA trains a model which predicts the target attribute , using the worst-group loss minimization algorithms developed for fully supervised cases . We use Group DRO ( Sagawa et al. , 2020 ) as a default choice , and re-use group-labeled samples for the hyperparameter tuning . Our experimental results suggest that SSA is a general yet effective framework for worst-group loss minimization . On various benchmark datasets , SSA consistently achieves performances comparable to fully supervised Group DRO and outperforms other baseline methods even when using only 5 % of the group-labeled samples compared to the baselines . To be more specific , SSA requires less than 1.5 % ( as little as 0.6 % ) of group-labeled samples—993 out of 182637 on CelebA , and 4123 out of 288637 on MultiNLI—to achieve a worst-group accuracy similar to that of 100 % usage . Moreover , we find that such benefits of SSA persist when combined with other robust training methods , such as Correct-N-Contrast ( CNC1 ; Zhang et al . ( 2021 ) ) , the supervised contrastive learning with contrastive batch sampling using group information . Finally , we also empirically observe that the group-wise adaptive thresholding technique—which we proposed for better pseudo-labeling—enjoy a broader usage for addressing the general problem of semi-supervised learning under class imbalance ; existing pseudo-labeling techniques ( Kim et al. , 2020 ; Wei et al. , 2021 ) require certain assumptions in datasets to work well for the task , while ours does not . 1We use the term CNC to refer to its supervised contrastive learning procedure with contrastive batch sampling only , rather than the entire process which includes spurious attribute annotation estimation via ERM . 2 RELATED WORKS . Improving worst-group accuracy with group annotations . It has been known in various literature that machine learning models often perform significantly worse on the samples from groups with a relatively small number of training samples than on samples from the majority group . The class imbalance problem ( Japkowicz , 2000 ; Johnson & Khoshgoftaar , 2019 ) is one of the representative cases of this phenomenon . Here , class labels naturally define group identities and thus do not require any additional group annotations . In this context , popular strategies to improve worst-group performances are using re-weighted loss for each group ( Huang et al. , 2016 ; Khan et al. , 2017 ) and re-sampling the given dataset to balance the group distribution of the training dataset ( Chawla et al. , 2002 ; He & Garcia , 2009 ) . This paper , in contrast , considers a setup where the group is defined as a combination of the label ( target attribute ) and the spuriously correlated attribute ; unlike the class imbalance literature , the availability of the full group identity information is not guaranteed , as spurious attributes may not have proper annotations . Under the setting where spurious attribute annotations are available on all samples , Sagawa et al . ( 2020 ) gives an online optimization algorithm that shows promising results on minimizing the worst-group loss . Improving worst-group accuracy without group annotations . To reduce additional annotation costs , recent works aim to train a robust model without requiring group annotations for all training samples . These works utilize models trained with standard procedure to identify samples that disagree with spurious correlations . Nam et al . ( 2020 ) train a model to be intentionally biased using the generalized cross entropy loss , and use it to identify-and-upweight high-loss samples for training another model . Liu et al . ( 2021 ) train a standard ERM model for a few epochs and upweight samples misclassified by this model to train the second model . Although these approaches do not use any group information for training , they still use a small number of group-labeled samples for hyperparameter tuning , which is critical to their worst-group performance . In this paper , we design a method to utilize group-labeled samples more efficiently . We note that , in the class imbalance literature , another line of works proposes to use group-labeled samples more actively ; they use labeled samples for determining sample weights for the training set through meta-learning ( Ren et al. , 2018 ) or training a model to predict sample weights ( Shu et al. , 2019 ) . 3 PROBLEM SETUP . Consider the learning a classifier in the presence of spurious correlations in the training set . Following the prior work of Sagawa et al . ( 2020 ) , we cast this problem as minimizing the worst-group loss , where the group identity is determined by the target attribute ( that we want to predict ) and the spurious attribute ( that we want to ignore ) . We assume that we do not have spurious attribute annotations of the samples in the training set ( group-unlabeled set ) , but have an access to additional set of samples with both spurioust attribute and target attribute annotations ( group-labeled set ) . More formally , we let each sample be a triplet consisting of an input x ∈ X , a target attribute y ∈ Y , and a spurious attribute a ∈ A . Our goal is to train a parameterized model fθ : X → Y that minimizes the worst-group expected loss on test samples ; for the purpose of avoiding learning spurious correlations , we define the group as an attribute pair g : = ( y , a ) ∈ Y × A = : G. In other words , we aim to minimize R ( θ ) = max g∈G E ( x , y , a ) ∼Pg [ ` ( fθ ( x ) , y ) ] , ( 1 ) for some loss function ` : Y × Y → R , where Pg denotes the group-conditioned data-generating distribution . Note that , as we focus on the group defined by the attribute pairs , Pg is deterministic on y and a , and stochastic only on x . We assume that the learner has access to two types of samples for training : The group-unlabeled set consists of n samples without spurious attribute annotations , i.e. , DU : = { ( x1 , y1 ) , . . . , ( xn , yn ) } , and the group-labeled set consists of m samples with spurious attribute annotations , i.e. , DL : = { ( x̃1 , ỹ1 , ã1 ) , . . . , ( x̃m , ỹm , ãm ) } . We assume that the group-labeled samples are much more costly to collect , and thus we have n m . 4 SPREAD SPURIOUS ATTRIBUTE . We now describe the algorithm we propose , Spread Spurious Attribute ( SSA ) . At a high level , SSA consists of two phases : pseudo-labeling and robust training . In the pseudo-labeling phase , SSA trains a model to predict the spurious attribute . In particular , we use both group-labeled and groupunlabeled samples to generate pseudo-labels on the group-unlabeled training samples ( Section 4.1 ) , with an adaptive thresholding technique for balancing the number of samples in each group ( Section 4.2 ) . Then , in the robust training phase , SSA uses generated pseudo-labels to train a model that predicts the target attribute with a small worst-group loss ( Section 4.3 ) . We use Group DRO ( Sagawa et al. , 2020 ) as our default robust training method , but SSA also performs well when combined with other existing algorithms that use full spurious label supervisions ( see Section 5.3 ) .

Summary: This work focuses on the worst group optimization (distributional robust optimization) problem with few spurious attributes are available as a validation set. They aim to achieve similar performance with methods that use spurious attributes. The main contribution is an adaptive thresholding method to ensure balanced sample from each group. Experiments show the proposed pseudo labeling and thresholding are effective in various tasks.