Diversify and Disambiguate: Learning from Underspecified Data
Abstract
Many datasets are underspecified , meaning that there are several equally viable solutions to a given task.
Underspecified datasets can be problematic for methods that learn a single hypothesis because different functions that achieve low training loss can focus on different predictive features and thus have widely varying predictions on outof-distribution data.
We propose DivDis, a simple two-stage framework that first learns a collection of diverse hypotheses for a task by leveraging unlabeled data from the test distribution.
We then disambiguate by selecting one of the discovered hypotheses using minimal additional supervision, in the form of additional labels or inspection of function visualization.
We demonstrate the ability of DivDis to find robust hypotheses in image classification and natural language processing problems with underspecification.
1. Introduction
Datasets are often underspecified : multiple plausible hypotheses each describe the data equally well (D’Amour et al., 2020) and the data offers no further evidence to prefer one over another.
In the presence of such ambiguity, rigidly choosing a single “best” hypotheis can be suboptimal, causing failures when the data distribution is shifted.
For example, examination of a chest X-ray dataset (OakdenRayner et al., 2020) has shown that many images of pneumothorax include a thin drain used to treat the disease.
A classifier can thus erroneously identify such drains as a predictive feature of the disease, exhibiting degraded accuracy on the intended distribution of patients not yet being treated.
To not suffer from such failures, it is desirable to have a model that can discover a diverse collection of alternate plausible hypotheses.
The standard empirical risk minimization (ERM, Vapnik (1992)) paradigm performs poorly when training on underspecified data.
The main reason for such failures is that ERM tends to select the simplest solution without considering alternatives, using only the most salient features (Geirhos et al., 2020; Shah et al., 2020; Scimeca et al., 2021).
Using an ensemble of ERM models (Hansen and Salamon, 1990; Lakshminarayanan et al., 2017) has this same problem because each model still suffers from simplicity bias.
While many recent methods (Ganin et al., 2016; Sagawa et al., 2020; Liu et al., 2021) improve robustness in distribution shift settings, we find that they fail on data with more severe underspecification.
This is because, similarly to ERM, these methods only consider a single solution even in situations where multiple explanations exist.
We propose Diversify and Disambiguate (DivDis), a twostage framework for learning from underspecified data.
Our key idea is to learn a collection of diverse functions that are consistent with training labels but disagree on unlabeled target data.
DivDis is a single neural network consisting of a shared backbone feature extractor and multiple heads, each head representing a different function.
As in regular training, each head is trained to predict labels for training data.
An additional “diversification” loss trains the heads to make disagreeing predictions on a separate unlabeled dataset from the target distribution.
At test time, we select one member of the diversified set of hypothesis by querying labels for the datapoints most informative for disambiguation.
We visually outline this framework in Fig. 1.
DivDis is well-suited for scenarios with underspecified data and distribution shift, and its heads will not yield a set of diverse functions in settings where only one function can achieve low training loss.
We evaluate DivDis on several settings in which underspecification limits the performance of prior methods due to the existence of multiple solutions that achieve low predictive risk.
2. Diversify and Disambiguate
We now describe Diversify and Disambiguate (DivDis), a two-stage framework for learning from underspecified data.
We first describe the general framework (Sec. 2.1), and then a specific implementation of the two D IVERSIFY (Sec. 2.2) and D ISAMBIGUATE (Sec. 2.3) stages as used in our experiments.
2.1. General Framework
As a running example to motivate our algorithm, consider an underspecified cow-camel image classifiation task in which the source data includes images of cows with grass backgrounds and camels with sand backgrounds.
We can imagine two completely different classifiers each achieving perfect accuracy in the source distribution: one that classifies by animal and the other by background.
The target dataset is most useful when it includes examples that would resolve the ambiguity if the labels were known, such as cows in the desert.
With this motivation, DivDis aims to first find a set of diverse functions and then choose the best member with minimal supervision.
The DivDis framework consists of two stages.
In the first stage, we D IVERSIFY by training a finite set of functions that together approximate the set of all functions that achieve low training loss on the source dataset.
This stage uses both the source and target datasets for training.
The source data ensures that all functions achieve low training loss, while the target data reveals whether or not the functions rely on different predictive features.
In the second stage, we D ISAMBIGUATE by choosing the best member among this set of functions, for example, by observing the label of a target datapoint for which one head is correct and the others are not.
2.2. D IVERSIFY : Train Disagreeing Heads
As described previously, the D IVERSIFY stage learns a diverse collection of functions by comparing predictions for the target set while minimizing training error.
We use a labeled source dataset D S
= { ( x 1 , y 1 ) , . . .
} along with an unlabeled target dataset D T
= { x t 1 , . . . } .
We represent and train multiple functions using a multi-headed neural network with N heads.
For an input datapoint x , we denote the prediction of head i as f i ( x ) = (cid:98) y i .
We ensure that each head achieves low predictive risk on the source domain by minimizing the cross-entropy loss for each head L xent ( f i ) =
E x,y ∼D S
[ l ( f i ( x ) , y )] .
We train the heads to produce predictions that are close to being statistically independent from each other.
Concretely, we minimize the mutual information between each pair of predictions:
[Equation]
where D KL ( · || · ) is the KL divergence and (cid:98) y i is the prediction f
i ( x ) for x ∼ D T .
In practice, we optimize this quantity using empirical estimates of the distributions p ( (cid:98) y i , (cid:98) y j ) and p ( (cid:98) y i ) ⊗ p ( (cid:98) y j ) .
To prevent functions from collapsing to degenerate solutions such as predicting a single label for the entire target set while maintaining good source accuracy, we also include an optional regularization loss for each head which regularizes the marginal predicted label distribution on the target dataset:
[Equation]
where p ( y ) is the label distribution in the source dataset D S without using an additional hyperparameter.
The overall objective for the diversify stage is a linear combination with weight hyperparameters λ
[Equation]
We note that the computation for (1) is easily parallelized in modern deep learning libraries; we provide an implementation in Appendix B.
In practice, the cost of computing the objective (3) is dominated by the cost of feeding two batches—one source and one target—to the network.
The time- and space- complexity of one step in the D IVERSIFY stage is approximately × 2 compared to a standard SGD step in optimizing ERM with the source data, and both can be reduced by using a smaller batch size.
2.3. D ISAMBIGUATE : Select the Best Head
Once we have learned a diverse set of functions that all achieve good training performance, we need to disambiguate by selecting one of the functions.
This disambiguation stage requires information beyond the given source and target datasets.
For example, once our model has learned both the animal and background classifiers for the cow-camel task, we can quickly see which is right by asking for the groundtruth label of an image of a cow in the desert.
We now present two different strategies for head selection during the D ISAMBIGUATE stage.
Active querying.
To select the best head with a minimal amount of supervision, we propose an active querying procedure, in which the model acquires labels for the most informative subset of the unlabeled target dataset D T .
We sort each target datapoint x ∈ D T according to the total distance between head predictions (cid:80) i ̸ =
j | f i ( x ) − f j ( x ) | .
We then select a subset of the target dataset, which has the m datapoints (i.e. m ≪
|D T | ) with the highest value of this metric.
Finally, we select the head with the highest accuracy with respect to this labeled subset.
Random querying.
A simple alternative to the active querying strategy is random querying, in which we label a random subset of the target dataset D T .
Beyond its simplicity, an advantage of this procedure is that one can perform labeling in advance because the datapoints to be labeled do not depend on the results of the D IVERSIFY stage.
However, random querying is substantially less label-efficient than active querying because the set will likely include unambiguous datapoints for which labels are less informative for head selection.
We emphasize that existing OOD methods tune hyperparameters using target set labels, and thus the active and random query strategies require no more information than previous approaches.
Unless stated otherwise, we use the active querying strategy because of its superior label efficiency, requiring as little as a single label ( m = 1 ).
Additionally, as long as the best head is selected, the choice of disambiguation method only affects label efficiency, and the final performance does not change.
3. Experiments
Through our experimental evaluation, we aim to answer the following questions.
(1) Can DivDis tackle image and language classification problems with severe underspecification, in which simplicity bias hinders the performance of existing approaches?
(2) How sensitive is DivDis to hyperparameters, and what data assumptions are needed to tune
DivDis?
(3) How does DivDis compare to unsupervised domain adaptation algorithms, which also leverage unlabeled data from the target domain?
3.1. Tasks with Complete Spurious Correlation
We evaluate DivDis on datasets with a complete correlation , where the source distribution has a spuriously correlated
[Figure]
attribute that can predict the label perfect accuracy.
To make this problem tractable, we leverage unlabeled target data D T for which the spurious attribute is not completely correlated with labels, as in the toy classification task (Fig. 3).
Introducing complete correlations makes the problem considerably harder than existing subpopulation shift problems, because classifiers based on the spurious attribute can achieve perfect training loss.
To our knowledge, complete correlation is not addressed by prior approaches and remains unsolved.
In fact, in many of the problems we consider (Fig.
4a and Tab. 1) existing methods for subpopulation shift do not perform significantly better than random guessing.
Real data with complete correlation.
We evaluate DivDis on existing benchmarks modified to exhibit complete correlation.
Using the Waterbirds (Sagawa et al., 2020), CelebA (Liu et al., 2015), and MultiNLI (Gururangan et al., 2018) datasets, we alter the source dataset to include only majority groups while keeping target data intact.
We denote these tasks as Waterbirds-CC, MultiNLI-CC, etc to distinguish from the original benchmarks.
These -CC tasks are considerably more difficult than the original benchmarks, and introduce a specific challenge not addressed in the existing literature: leveraging the difference in source and target data distribution to encode and subsequently disambiguate tasks with high degrees of underspecification.
To our best knowledge, no prior methods are designed to address such complete correlations.
As the closest existing problem setting is subpopulation shift, we show the performance of ERM, JTT (Liu et al., 2021), and Group DRO (Sagawa et al., 2020) as a naive point of comparison.
We also include a random guessing baseline as a lower bound on performance.
Quantitative results in
Tab. 1 show that DivDis outperforms previous methods by 8% to 30% in worst-group accuracy.
Prior methods for subpopulation shift showed subpar performance on these tasks: notably, ERM, JTT, and GDRO all fail to do better than random guessing in the Waterbirds-CC task.
This is hardly surprising; methods based on loss upweighting such as JTT
[Table]
previous methods in terms of both average and worst-group accuracy.
[Table] [Table]
[Table]
and Group DRO are expected to perform poorly in these problems, because -CC tasks violate their implicit assumption of having minority points in the source data to upweight.
In contrast, DivDis is well-suited to this challenging setting, and deals with complete correlation by leveraging unlabeled target data to find different predictive features of the labels.
3.2. Underspecification from Distribution Shift
Do we need group labels for hyperparameter tuning?
Existing methods for learning from data with subpopulation shift (Levy et al., 2020; Nam et al., 2020; Liu et al., 2021) typically tune hyperparameters using group label annotations, making them only deployable in scenarios where group labels are available.
To examine the dataset assumptions required to successfully tune DivDis’s hyperparameters, we ran a hyperparameter sweep over ( λ 1 , λ 2 ) .
We measured three metrics using held-out data: (1) average accuracy on D S , (2) average accuracy on D T , and (3) worstgroup accuracy on D T .
We see a clear correlation between these three metrics on the Waterbirds and CelebA datasets (Fig. 2, Fig. 9).
Notably, we see that tuning the hyperparameters of DivDis with respect to average accuracy on D S yields close an optimal model for worst-group accuracy on the target distribution.
In Tab. 2, we contrast DivDis to existing methods reported by Liu et al.
Note that this table corresponds to our second weakest data assumption (labeled target data), and Fig.
2 suggests that the hyperparameters of DivDis can even be tuned using labeled source data, which is readily available in all supervised learning problems.
This experiment demonstrates that compared to previous methods for distribution shift, DivDis’s hyperparameters require substantially less information to tune.
Comparison with unsupervised domain adaptation methods.
Finally, we evaluate DivDis on the Camelyon17WILDS benchmark (Sagawa et al., 2022), a tumor classification dataset where the objective is to generalize to images collected from a new hospital.
This benchmark provides unlabeled data from the test domain hospitals, which DivDis can use during the D IVERSIFY stage.
We compare against several approaches that can also leverage this unlabeled data: Pseudo-Label (Lee et al., 2013),
FixMatch (Sohn et al., 2020), CORAL (Sun et al., 2016), and NoisyStudent
(Xie et al., 2019).
Quantitative results in Tab.
3 show that DivDis outperforms these methods, achieving above 90% OOD test set accuracy.
This experiment demonstrates that DivDis can effectively leverage unlabeled data for underspecification arising from variation in real-world data collection conditions.
4. Conclusion
We proposed Diversify and Disambiguate (DivDis), a twostage framework for learning from underspecified data.
Our experiments show that DivDis has substantially higher performance when learning from datasets with high degrees of underspecification (Tab. 1), at the modest cost of unlabeled target data and a few corresponding labels.
DivDis was also effective in problem settings with milder underspecification (Tab. 2, Tab. 3), which include minority examples and thus satisfy the data assumptions of existing methods.
To our knowledge, our method is the first to address this problem setting in the context of underspecification.
5. Acknowledgements
This work was supported in part by Google, Apple and
Juniper Networks.
Chelsea Finn is a fellow in the CIFAR
Learning in Machines and Brains program.
A. Related Work
Underspecification.
Prior works have discussed the underspecified nature of many datasets (D’Amour et al., 2020; OakdenRayner et al., 2020).
Underspecification is especially problematic when the bias of deep neural networks towards simple functions (Arpit et al., 2017; Gunasekar et al., 2018; Shah et al., 2020; Geirhos et al., 2020; Pezeshki et al., 2021) is not aligned with the true function.
Yet, these works do not present a general solution.
As we find in Section 3, DivDis can address underspecified datasets, even when one viable solution is much simpler than another, since only one of the heads can represent the simplest solution.
Our notion of near-optimal sets can be seen as an extension of Rashomon sets (Fisher et al., 2019;
Semenova et al., 2019) to the unsupervised domain adaptation setting.
Active learning methods (Cohn et al., 1996; Hanneke et al., 2014) are also related in that they handle underspecification by reducing ambiguity.
Our MI-based diversity term resembles a common active learning criterion (Houlsby et al., 2011), but a key difference is that we directly optimize a set of models with respect to our criterion.
Ensemble methods.
Our approach is related to ensemble methods (Hansen and Salamon, 1990; Dietterich, 2000; Lakshminarayanan et al., 2017), which aggregate the predictions of multiple learners.
Ensembles have been shown to perform best when each member produces errors independently of one another (Krogh et al., 1995), a property we exploit by maximizing disagreement on unlabeled test data.
Previous works have extended ensembles by learning a diversified set of functions (Pang et al., 2019; Parker-Holder et al., 2020; Wortsman et al., 2021; Rame and Cord, 2021; Sinha et al., 2021).
While the D IVERSIFY stage similarly learns a collection of diverse functions, our approach differs in that we directly optimize for diversity on a separate target dataset.
Two recent works leverage unlabeled target data to learn a set of diverse functions.
Teney et al.
(2021) introduce a gradient orthogonality constraint with respect to features from a pre-trained backbone.
However, this approach does not consider classifier selection (i.e. the D ISAMBIGUATE stage), relying on an oracle instead, and requires sufficiently compact pre-trained features.
Concurrently to our work, Pagliardini et al.
(2022) propose to sequentially train a set of functions with a diversity loss on target data.
In contrast, DivDis requires a single network and training loop regardless of the number of heads.
Furthermore, Sec. 3 demonstrates that DivDis scales to larger datasets.
Robustness and causality.
Many recent methods aim to produce robust models that succeed even in conditions of distribution shift (Tzeng et al., 2014;
Ganin et al., 2016;
Arjovsky et al., 2019; Sagawa et al., 2020;
Nam et al., 2020; Creager et al., 2021; Liu et al., 2021).
While our work is similarly motivated, we address a class of problems that these previous methods fundamentally cannot handle.
By nature of learning only one function, these robustness methods cannot disambiguate problems where the true function is truly ambiguous, in the sense that functions based on two different features can both be near-optimal.
DivDis handles such scenarios by learning multiple functions in the D IVERSIFY stage and then choosing the correct one in the D ISAMBIGUATE stage with minimal added supervision.
This research direction is also related to inferring the causal structure (Pearl, 2000; Schölkopf, 2019) of observed attributes.
Although many causality works focus on situations in which interventions are impossible, we explore inherently ambiguous problems where some form of intervention is necessary to succeed.
Additionally, recent methods for extracting causality from observational data have been most successful in low-dimensional settings (Louizos et al., 2017; Goudet et al., 2018; Ke et al., 2019), whereas our method easily scales to large convolutional networks for image classification problems.
B. Parallel Implementation of Mutual Information Objective
[Table]
[Table]
[Table]
return pairwise_mis.mean()
This implementation is based on the PyTorch (Paszke et al., 2019) and einops (Rogozhnikov, 2022) libraries.
It demonstrates that the mutual information objective (1) is easily parallelized across the input batch using standard tensor operations.
C. Experimental Setup C.1. Detailed Dataset Descriptions
Toy classification task.
Our toy binary classification data is constructed as follows.
The source dataset D S has binary labels with equal aggregate probability p ( y = 0)
=
p ( y = 1) = 12 .
Each datapoint is a 2 -dimensional vector, and the data distribution for each class in the source dataset is:
[Equation]
In contrast, the data distribution for each class in the target dataset is:
[Equation]
Labels are balanced for the target dataset.
Put differently, the target dataset has a larger span than the source dataset, and the labels of the target dataset reveal that the true decision boundary is the Y -axis.
CXR-14 pneumothorax classification.
The CXR-14 dataset (Wang et al., 2017) is a large-scale dataset for pathology detection in chest radiographs.
We evaluate on the binary pneumothorax classification task, which has been reported to suffer from hidden stratification: a subset of the images with the disease include a chest drain, a common treatment for the condition (Oakden-Rayner et al., 2020).
Waterbirds dataset.
Each image in the Waterbirds dataset is constructed by pasting a waterbird or landbird image to a background drawn from the Places dataset (Zhou et al., 2017).
There are two backgrounds in this dataset – water and land, where each category of birds is spuriously correlated with one background.
Specifically, there are 4,795 training samples, where 3,498 samples are from "waterbirds in water" and 1,057 samples are from "landbirds in land".
Waterbirds in land" and "landbirds in water" are considered as minority groups, where 184 and 56 samples are included, respectively.
CelebA dataset.
The CelebA dataset (Liu et al., 2015) is a large-scale image dataset with over 200 , 000 images of celebrities, each with 40 attribute annotations.
We construct four different completely correlated problem settings, each based on a pair of attributes.
The pair of attributes consists of a label attribute and a spurious attribute, and we remove all examples from the two minority groups in the source dataset.
The four problem settings are summarized below.
Our task construction is similar to that of Sagawa et al.
(2020), which uses hair color as the label and gender as the spurious attribute.
[Table]
MultiNLI dataset.
Given a hypothesis and a promise, the task of MultiNLI dataset is to predict if the hypothesis is entailed by, neutral with, or contradicts with the promise.
The spurious correlation exists between contradictions and the presence of the negation words nobody, no, never, and nothing (Gururangan et al., 2018).
The whole MultiNLI dataset is divided into six groups, where each spurious attribute belongs to {"no negation", "negation"} and each label belongs to {entailed, neutral, contradictory}.
There are 206,175 samples in total, where the smallest group only has 1,521 samples (entailment with negations).
Camelyon17-WILDS dataset.
This dataset is part of the U-WILDS benchmark (Sagawa et al., 2022).
Input images of patches from lymph node sections are given, and the task is to classify as either a tumor or normal tissue.
Evaluation is [Figure] performed on OOD hospitals for which labels are unseen during training.
The model is given unlabeled validation images from the OOD hospitals.
C.2. DivDis Hyperparameter Settings
We show below the hyperparameters used in our experiments:
Toy Clasification
MNIST-CIFAR
Waterbirds
CXRWaterbirds-CC
CelebA-CC
MultiNLI-CC
N 2 ,      λ  1 , 10 , 100 ,    λ  0 .
1 , 1 , 10 , 0 ,0 ,0 , 0 .m
D. Additional Experiments
2D classification task.
We start with a synthetic 2D binary classification problem, with the goal of understanding the set of functions learned during the D IVERSIFY stage of DivDis.
The task is shown in Fig.
3 (left): inputs are points in 2 -dimensional space, and the source dataset has points only in the second and fourth quadrants, making the unlabeled points in the first and third quadrants ambiguous.
We train a network with two heads and measure the target domain accuracy of each head throughout the D IVERSIFY stage of DivDis.
Learning curves and decision boundaries, visualized in ??
, show that DivDis initially learns to fit the source data, after which the two heads diverge to functions based on different predictive features of the data.
We show an extended visualization with additional metrics in the appendix (Fig. 5).
Coverage of near-optimal set on 2D classification.
To further understand how well DivDis can cover the set of near-optimal functions, we trained a 20 -head model on the same 2D classification task, where each head is a linear classifier.
Results in Fig.
3 show that the heads together span the set of linear classifiers consistent with the source data.
Note that this set includes the function learned by standard ERM, the diagonal decision boundary ( y = x ).
This result suggests that given enough heads, the set of functions learned by DivDis sufficiently covers the set of near-optimal functions, including the simplest function typically learned by ERM.
Comparison with ensembles.
We compare the diversity of the functions produced by the D IVERSIFY stage to that of independently trained models.
On a 3 -dimensional version of the binary classification task, we trained DivDis and ensembles with { 2 , 3 , 5 } members.
We measure how much each function relies on each of the three input dimensions through the Pearson correlation coefficient between each input dimension and the prediction, Due to space constraints, we show visualizations in Fig.
6 of Appendix D. Each of the functions learned by DivDis depend on different input features, whereas independently trained models use all features equally.
This experiment demonstrates that the diversity in a vanilla ensemble cannot effectively cover the set of near-optimal functions, and is therefore insufficient for underspecified problems. [Figure]
Learning curves on toy task.
In Fig.
5, we show learning curves of cross-entropy loss and mutual information loss during training.
The learning curves show that cross-entropy loss decreases first, at which point both of the heads represent functions similar to the ERM solution.
Afterwards, the mutual information loss decreases, causing the functions represented by the two heads to diverge.
Visualization of functions on 3D toy task.
We examine the extent to which the D IVERSIFY stage can produce different functions by visualizing which input dimension each function relies on.
We modify the synthetic binary classification task to have 3 -dimensional inputs and train DivDis with { 2 , 3 , 5 } heads.
For each head, we visualize the Pearson correlation coefficient between each input dimension and output.
We normalize this 3-dimensional vector to sum to one and plot each model as a point on a 2-simplex in Fig.
6, with independently trained functions as a baseline.
The results show that the D IVERSIFY stage acts as a repulsive force between the functions in function space, allowing the collection of heads to explore much closer to the vertices.
This experiment also demonstrates why vanilla ensembling is insufficient for underspecified problems: the diversity due to random seed is not large enough to effectively cover the set of near-optimal functions.
Noisy dimension.
To see if DivDis can effectively combat simplicity bias, we further evaluate on a harder variant of the 2D classification problem in which we add noise along the x-axis.
This noise makes the “correct” decision boundary have positive non-zero risk, making it harder to learn than the other function.
Results in Fig.
7 demonstrate that even in such a scenario, DivDis recovers both the x-axis and y-axis decision boundaries, suggesting that DivDis can be effective even in scenarios where ERM relies on spurious features due to simplicity bias.
Overcoming simplicity bias on MNIST-CIFAR data.
The MNIST-CIFAR task was originally used by (Shah et al., 2020) as an extreme example for demonstrating severe simplicity bias in neural networks.
Each datapoint is a concatenation of one image each from the MNIST and CIFAR datasets, and labels are binary.
The source dataset is completely correlated: the first class consists of (MNIST zero, CIFAR car) images, and the second class (MNIST one, CIFAR truck).
The unlabeled target dataset is not correlated: we take random samples from MNIST ∈ { zero , one } and CIFAR ∈ { car , truck } and concatenate them.
We evaluate on variants of MNIST-CIFAR with different levels of underspecification.
We denote the mix ratio of D S as r ∈ [0 , 1] , where r = 0 indicates completely correlated data as described above, and r = 1 indicates the distribution of the target set.
Values of r between zero and one indicate a mixture of the two distributions.
Fig.
4a shows the target domain accuracy of DivDis and ERM after training with mix ratios in { 0 , 0 . 2 , 0 . 4 , 0 . 6 , 0 . 8 , 1 . 0 } .
For this experiment, we use active querying with m = 1 for disambiguation.
ERM fails to do better than random guessing ( 50% ) in the completely correlated setting represented by mix ratio zero, whereas DivDis achieves over 75% accuracy in this challenging problem.
For higher ratios, the performance of the two methods converge to a similar value, because mix ratio 1 represents an i.i.d.
setting where the source and target distributions are identical.
Comparison of D ISAMBIGUATE strategies on MNIST-CIFAR data.
Using MNIST-CIFAR data with a complete correlation, we plot the average final accuracy after the D ISAMBIGUATE stage for both the active query and random query strategies, for different number of labels used.
Fig.
4b shows that active querying in particular is very efficient, and one label suffices for finding the head with highest target data accuracy.
We further show the viability of disambiguation on source data: Fig.
4c shows Grad-CAM (Selvaraju et al., 2017) visualizations of two heads on a randomly sampled image from the [Table] [Table] source dataset.
Even though the two heads predict the same label, they respectively focus on distinct features of the data: the MNIST region and the CIFAR region.
Since we know that the true predictive feature is the CIFAR image, we can select the second head based on this single datapoint, and nothing beyond what was used during training.
CelebA hyperparameter grid.
In Fig.
9, we show an additional hyperparameter grid for the CelebA dataset.
This grid shows a strong corrleation between metrics with respect to hyperparameter choice, indicating that DivDis can be tuned using only labeled source data.
Additional Grad-CAM plots on MNIST-CIFAR data.
In Fig.
8, we show additional Grad-CAM plots for MNIST-CIFAR data, on 6 more random datapoints from the source dataset.
Compared to the example given in the main text, these examples are just as informative in terms of which head is better.
Effect of ratio.
We test various values between 0 and 1 for the regularizer loss (2), on the Waterbirds benchmark.
Fig.shows that even using a ratio of 0 .
1 yields close to 80% worst-group accuracy, demonstrating that the performance of DivDis is not very sensitive to this hyperparameter.
CXR pneumothorax classification.
To investigate whether DivDis can disambiguate naturally occurring spurious correlations, we consider the CXR-14 dataset (Wang et al., 2017), a large-scale dataset for pathology detection in chest radiographs.
We evaluate on the binary pneumothorax classification task, which has been reported to suffer from hidden stratification: a subset of the images with the disease include a chest drain, a common treatment for the condition (Oakden-Rayner et al., 2020).
We train DivDis with two heads to see whether it can disambiguate between the visual features of chest drains and lungs as a predictor for pneumothorax.
In addition to ERM, we compare against the semi-supervised learning method
Pseudo-label (Lee et al., 2013), to see how much of the performace gain of DivDis can be attributed to the unlabeled target set alone.
In Tab. 4, we show test split accuracy and AUC, along with AUC for the subset of positive samples with and without a chest drain.
Our experiments show that DivDis achieves higher AUC in the no-drain split while doing marginally worse on the drain split, indicating that the chosen head is relying more on the visual features of the lung.
The overall metrics (Acc and AUC) indicate that this performance gain in the no-drain subset also leads to better performance in overall metrics.
[Table]
E. Finite-hypothesis Generalization Bound for Head Selection
Proposition 1.
Let the N heads have risk l 1 ≤ l 2 . . .
≤ l N ∈ R on the target dataset, and let ∆ =
l 2 − l 1 .
The required number of i.i.d.
labels from the target set to select the best head with probability ≥ 1 − δ is m = 2(log2 N − log δ ) ∆.
Proof.
Given m i.i.d.
samples, Hoeffding’s inequality gives us for all ϵ > 0 ,
[Equation]
The event of failing to select the best head is a superset of the following event, for which we can bound the probability as:
[Equation]
Solving for δ = 2 N exp (cid:16) − m ∆ 2 2 (cid:17) , we get the sample size bound
[Equation]
[Figure]
[Figure] [Figure]