An Investigation of Why Overparameterization Exacerbates Spurious Correlations

Shiori Sagawa, Aditi Raghunathan, Pang Wei Koh, Percy Liang

Introduction

The typical goal in machine learning is to minimize the average error on a test set that is independent and identically distributed (i.i.d.) to the training set. A large body of prior work has shown that overparameterization—increasing model size beyond the point of zero training error—improves average test error in a variety of settings, both empirically (with neural networks, e.g., Nakkiran et al. 2019) and theoretically (with linear and random projection models, e.g., Belkin et al. 2019; Mei & Montanari 2019).

However, recent work has also demonstrated that models with low average error can still fail on particular groups of data points (Blodgett et al. 2016; Hashimoto et al. 2018; Buolamwini & Gebru 2018). This problem of high worst-group error arises especially in the presence of spurious correlations, such as strong associations between label and background in image classification (McCoy et al. 2019; Sagawa et al. 2020). To mitigate this problem, common approaches reduce the worst-group training loss, e.g., through distributionally robust optimization (DRO) or simply upweighting the minority groups. Sagawa et al. 2020 showed these approaches improve worst-group error on strongly regularized neural networks but fail to help standard neural networks that can achieve zero training error, suggesting that increasing model capacity by reducing regularization—and perhaps by increasing overparameterization as well—can exacerbate spurious correlations.

In this paper, we investigate why overparameterization exacerbates spurious correlations under the above approach of upweighting minority groups. We first confirm on two image datasets (Figure 2) that directly increasing overparameterization (i.e., increasing model size) indeed hurts worst-group error, leading to models that are highly inaccurate on the minority groups where the spurious correlation does not hold (Section 3). In contrast, their underparameterized counterparts obtain much better worst-group error, but do worse on average. We also confirm that models trained via empirical risk minimization (i.e., without upweighting the minority) have poor worst-group test error regardless of whether they are under- or overparameterized. Through simulations on a synthetic setting, we further identify two properties of the training data that modulate the effect of overparameterization: (i) the relative sizes of the majority versus minority groups, and (ii) how informative the spurious features are relative to the core features (Section 4).

Why does overparameterization exacerbate spurious correlations? Underparameterized models do not rely on spurious features because that would incur high training error on the (upweighted) minority groups where the spurious correlation does not hold. In contrast, overparameterized models can always obtain zero training error by memorizing training examples, and instead rely on their inductive bias to pick a solution—which features to use and which examples to memorize—out of all solutions with zero training error. Our results suggest an intuitive story of why overparameterization can hurt: because overparameterized models can have an inductive bias towards “memorizing” fewer examples (Figure 1). If (i) the majority groups are sufficiently large and (ii) the spurious features are more informative than the core features for these groups, then overparameterized models could choose to use the spurious features because it entails less memorization, and therefore suffer high worst-group test error. We test this intuition through simulations and formalize it in a theoretical analysis (Section 5).

Our analysis also leads to the counterintuitive result that on overparameterized models, subsampling the majority groups is much more effective at improving worst-group error than upweighting the minority groups. Indeed, an overparameterized model trained on a subset of <<5% of the data performs similarly (on average and on the worst group) to an underparameterized model trained on all the data (Section 6). This suggests a possible tension between using overparameterized models and using all the data; average error benefits from both, but improving worst-group error seems to rely on using only one but not both.

Setup

Spurious correlation setup. We adopt the setting studied in Sagawa et al. 2020, where each example comprises the input features xx, a label (core attribute) y∈Yy\in\mathcal{Y}, and a spurious attribute a∈Aa\in\mathcal{A}. Each example belongs to a group g∈G=Y×Ag\in\mathcal{G}=\mathcal{Y}\times\mathcal{A}, where g=(y,a)g=(y,a). Importantly, the spurious attribute aa is correlated with the label yy in the training set. We focus on the binary setting in which Y={1,−1}\mathcal{Y}=\{1,-1\} and A={1,−1}\mathcal{A}=\{1,-1\}.

Applications. We study two image classification tasks (Figure 2). In the first task, the label is spuriously correlated with demographics: specifically, we use the CelebA dataset (Liu et al. 2015) to classify hair color between the labels Y={blonde, non-blonde}\mathcal{Y}=\{\text{blonde, non-blonde}\}, which are correlated with the gender A={female, male}\mathcal{A}=\{\text{female, male}\}. In the second task, the label is spuriously correlated with image background. We use the Waterbirds dataset (based on datasets from Wah et al. 2011; Zhou et al. 2017 and modified by Sagawa et al. 2020) to classify between the labels Y={waterbird, landbird}\mathcal{Y}=\{\text{waterbird, landbird}\}, which are spuriously correlated with the image background A={water background, land background}\mathcal{A}=\{\text{water background, land background}\}. See Appendix A.5 for more dataset details.

Objectives and metrics. We evaluate a model ww by its worst-group error,

However, in line with Sagawa et al. 2020, we find that models trained via ERM have poor worst-group test error regardless of whether they are under- or overparameterized (Appendix A.1). To achieve low worst-group test error, prior work proposed modified objectives that focus on the worst-group loss, such as group distributionally robust optimization (group DRO) which directly optimizes for the worst-group training loss (Hu et al. 2018; Sagawa et al. 2020) or reweighting (Shimodaira 2000; Byrd & Lipton 2019). Sagawa et al. 2020 showed that both approaches can help worst-group loss, though group DRO is typically more effective. For simplicity, we focus on the well-studied reweighting approach, which optimizes

where p^g\hat{p}_{g} is the fraction of training examples in group gg. The intuition behind reweighting is that it makes each group contribute the same weight to the training objective: that is, minority groups are upweighted, while majority groups are downweighted. Note that this approach requires the groups gg to be specified at training time, though not at test time.

Overparameterization hurts worst-group error

Sagawa et al. 2020 observed that decreasing L2L_{2} regularization hurts worst-group error. Though increasing overparameterization and reducing regularization can have different effects (Zhang et al. 2017; Mei & Montanari 2019), this suggests that overparameterization might similarly exacerbate spurious correlations. Here, we show that directly increasing overparameterization (model size) indeed hurts worst-group error even though it improves average error.

Results. Overparameterization improves average test error across both datasets, in line with prior work (Belkin et al. 2019; Nakkiran et al. 2019) (Figure 3). However, in stark contrast, overparameterization hurts worst-group error: the best worst-group test error is achieved by an underparameterized model with non-zero training error. On CelebA, the smallest model (width 1) has 12.4% worst-group training error but comparatively low worst-group test error of 25.6%. As width increases, training error goes to zero but worst-group test error gets worse, reaching >>60% for overparameterized models with zero training error. Similarly, on Waterbirds, an underparameterized model with 9090 random features and worst-group training error of 17.7% obtains the best worst-group test error of 26.6%, while overparameterized models with zero training error yield worst-group test error of 42.4% at best.

In Appendix A.2, we also confirm that stronger regularization improves worst-group error but hurts average error in overparameterized models, while it has little effect on both worst-group and average error in underparameterized models. However, we focus on understanding the effect of overparameterization in the remainder of the paper.

Discussion. Why does overparameterization hurt worst-group test error? We make two observations. First, in the overparameterized regime, the smallest groups incur the highest test error (blonde males in CelebA and waterbirds on land background in Waterbirds), despite having zero training error. In other words, overparameterized models perfectly fit the minority points at training time, but seem to do so by using patterns that do not generalize. We informally refer to this behavior as “memorizing” the minority points.

Second, underparameterized models do obtain low worst-group error by learning patterns that generalize to both majority and minority groups. Therefore, overparameterized models should also be able to learn these patterns while attaining zero training error (e.g., by memorizing the training points that the underparameterized model cannot fit). Despite this, overparameterized models seem to learn patterns that generalize well on the majority but do not work on the minority (such as the spurious attributes aa in Figure 2).

What makes overparameterized models memorize the minority instead of learning patterns that generalize well on both majority and minority groups? We study this question in the next two sections: in Section 4, we use simulations to understand properties of the data distribution that give rise to this trend, and in Section 5 we analyze a simplified linear setting and show how the inductive bias of models towards memorizing fewer points can lead to overparameterized models choosing to use spurious correlations.

Simulation studies

The discussion in Section 3 suggests two properties of the training distribution that modulate the effect of overparameterization on worst-group error. Intuitively, overparameterized models should be more incentivized to use the spurious features and memorize the minority groups if (i) the proportion of the majority group, pmajp_{\mathsf{maj}}, is higher, and (ii) the ratio of how informative the spurious features are relative to the core features, rs:cr_{\mathsf{s:c}}, is higher. In this section, we use simulations to confirm these intuitions and probe how pmajp_{\mathsf{maj}} and rs:cr_{\mathsf{s:c}} affect worst-group error in overparameterized models.

Data distribution. We construct a synthetic dataset that replicates the empirical trends in Section 3. As in Section 2, the label y∈{1,−1}y\in\{1,-1\} is spuriously correlated with a spurious attribute a∈{1,−1}a\in\{1,-1\}. We divide our training data into four groups accordingly: two majority groups with a=ya=y, each of size nmaj/2n_{\mathsf{maj}}/2, and two minority groups with a=−ya=-y, each of size nmin/2n_{\mathsf{min}}/2. We define n=nmaj+nminn=n_{\mathsf{maj}}+n_{\mathsf{min}} as the total number of training points, and pmaj=nmaj/np_{\mathsf{maj}}=n_{\mathsf{maj}}/n as the fraction of majority examples. The higher pmajp_{\mathsf{maj}} is, the more strongly aa is correlated with yy in the training data.

The core and spurious features are both noisy and encode their respective attributes at different signal-to-noise ratios. We define the spurious-core information ratio (SCR) as rs:c=σcore2/σspu2r_{\mathsf{s:c}}=\sigma_{\mathsf{core}}^{2}/\sigma_{\mathsf{spu}}^{2}. The higher the SCR, the more signal there is about the spurious attribute in the spurious features, relative to the signal about the label in the core features.

Compared to the image datasets we studied in Section 3, this synthetic dataset offers two key simplifications. First, the only differences between groups stem from their differences in (y,a)(y,a), which isolates the effect of flipping the spurious attribute aa. In contrast, in real datasets, groups can differ in other ways, e.g., more label noise in one group. Second, the relative difficulty of estimating yy versus aa is completely governed by changing σcore2\sigma_{\mathsf{core}}^{2} and σspu2\sigma_{\mathsf{spu}}^{2}. In contrast, real datasets have additional complications, e.g., estimating yy might involve a more complex function of the input xx than estimating aa, and there might be an inductive bias towards learning a simpler model over a more complex one.

In all of the experiments below, we fix the total number of training points nn to 30003000, and set d=100d=100 (so each input xx has 2d=2002d=200 dimensions). Unless otherwise specified, we set the majority fraction pmaj=0.9p_{\mathsf{maj}}=0.9 and the noise levels σspu2=1\sigma_{\mathsf{spu}}^{2}=1 and σcore2=100\sigma_{\mathsf{core}}^{2}=100 to encourage the model to use the spurious features over the core features.

2 Observations on synthetic dataset

The synthetic dataset replicates the trends we observe on real datasets. Figure 4 shows how average and worst-group error change with the number of parameters/random projections mm. This matches the trends we obtained on CelebA and Waterbirds in Section 3. The best worst-group test error of 28.5% is achieved by an underparameterized model, whereas highly overparameterized models achieve high worst-group test error that plateaus at around 55%. In contrast, the average test error is better for overparameterized models than for underparameterized models.

Overparameterized models use spurious features. Figure 5-Right shows that overparameterized models have high test error on minority groups (a=−ya=-y) despite zero training error, but perform very well on the majority groups (a=ya=y). Since the only difference between the minority and majority groups in the synthetic dataset is the relative signs of the core and spurious attributes, this suggests overparameterized models are using spurious features and simply memorizing the minority groups to get zero training error, consistent with our discussion in Section 3. In contrast, the underparameterized model has low training and test errors across all groups, suggesting that it relies mainly on core features.

These results imply that the degradation in the worst-group test error is due to the spurious features. We confirm that overparameterization no longer hurts when we “remove” the spurious features by replacing them with noise centered around zero (i.e., we replace the mean of xspux_{\mathsf{spu}} by 0). In this case, the best worst-group test error is now obtained by an overparameterized model, as shown in Figure 5-Left.

3 Distributional properties

What properties of the training data make overparameterization hurt worst-group error? We study (i) pmajp_{\mathsf{maj}}, which controls the relative size of majority to minority groups, and (ii) rs:cr_{\mathsf{s:c}}, the relative informativeness of spurious to core features. In the synthetic dataset, overparameterization hurts worst-group test error only when both are sufficiently high. In contrast, overparameterization helps average test error regardless; see Appendix A.3.

Effect of the majority fraction pmajp_{\mathsf{maj}}. We observe that increasing pmaj=nmaj/np_{\mathsf{maj}}=n_{\mathsf{maj}}/n, which controls the relative size of the majority versus minority groups, makes overparameterization hurt worst-group error more (Figure 6). When the groups are perfectly balanced with pmaj=0.5p_{\mathsf{maj}}=0.5, overparameterization no longer hurts the worst-group test error, with overparameterized models achieving better worst-group test error than all underparameterized models. This suggests that group imbalance can be a key factor inducing the detrimental effect of overparameterization.

Effect of the spurious-core information ratio rs:cr_{\mathsf{s:c}}. Next, we characterize the effect of rs:c=σcore2/σspu2r_{\mathsf{s:c}}=\sigma_{\mathsf{core}}^{2}/\sigma_{\mathsf{spu}}^{2}, which measures the relative informativeness of the spurious versus core features. A high rs:cr_{\mathsf{s:c}} means that the spurious features are more informative. We vary rs:cr_{\mathsf{s:c}} by changing σspu2\sigma_{\mathsf{spu}}^{2} while keeping σcore2=100\sigma_{\mathsf{core}}^{2}=100 fixed, since this does not change the best possible worst-group test error (with a model that uses only the core features xcorex_{\mathsf{core}}). Figure 6 shows that the higher rs:cr_{\mathsf{s:c}} is, the more overparameterization hurts. As rs:cr_{\mathsf{s:c}} increases, the spurious features become more informative, and overparameterized models rely more on them than the core features; underparameterized models outperform overparameterized models only for sufficiently large rs:c≥1r_{\mathsf{s:c}}\geq 1. Note that increasing rs:cr_{\mathsf{s:c}} does not significantly affect the worst-group test error in the underparameterized regime, since the core features xcorex_{\mathsf{core}} are unaffected. In contrast, increasing the majority fraction pmajp_{\mathsf{maj}} hurts the worst-group test error in both underparameterized and overparameterized models.

4 An intuitive story

We return to the question of what makes overparameterized models memorize the minority instead of learning patterns that generalize on both majority and minority groups. The simulation results above show that of all overparameterized models that achieve zero training error, the inductive bias of the model class and training algorithm favors models that use spurious features which generalize only for the majority groups, instead of learning to use core features that also generalize well on the minority groups.

What is the nature of this inductive bias? Consider a model that predicts the label yy by returning its estimate of the spurious attribute aa from xspux_{\mathsf{spu}}, taking advantage of the fact that yy and aa are correlated in the training data. To get achieve zero training error, it will need to memorize the points in the minority group, e.g., by exploiting variations due to noise in the features xx. On the other hand, consider a model that predicts yy by returning a direct estimate of yy based on the core features xcorex_{\mathsf{core}}. Because xcorex_{\mathsf{core}} provides a noisier estimate of yy than xspux_{\mathsf{spu}} does for aa, this model will need to memorize all points for which xcorex_{\mathsf{core}} gives an inaccurate prediction of yy due to noise. Since the estimators of the core and spurious attributes are equally easy to learn, the main difference between these two models is the number of examples to be memorized.

We therefore hypothesize that the inductive bias favors memorizing as few points as possible. This is consistent with the results above: the model uses xspux_{\mathsf{spu}} and memorizes the minority points only when the fraction of minority points is small (high majority fraction pmajp_{\mathsf{maj}}). Similarly, the model uses xspux_{\mathsf{spu}} over xcorex_{\mathsf{core}} to fit the majority points only when the spurious features are less noisy (high rs:cr_{\mathsf{s:c}}) and therefore require less memorization to obtain zero training error than the core features. In the next section, we make this intuition formal by analyzing a related but simpler linear setting.

Theoretical analysis

In this section, we show how the inductive bias against memorization leads to overparameterization exacerbating spurious correlations. Our analysis explicates the effect of the inductive bias and the importance of the data parameters pmajp_{\mathsf{maj}} and rs:cr_{\mathsf{s:c}} discussed in Section 4.

The synthetic setting discussed in Section 4 is difficult to analyze because of the non-linear random projections, so we introduce a linear explicit-memorization setting that allows us to precisely define the concept of memorization. For clarity, we refer to the previous synthetic setting in Section 4 as the implicit-memorization setting. In Appendix A.4, we show empirically that models in these two settings behave similarly in the overparameterized regime, though they differ in the underparameterized regime.

In the previous implicit-memorization setting, we varied model size and memorization capacity by varying the number of random projections of the input. In the new explicit-memorization setting, we instead use linear models that act directly on the input and introduce explicit “noise features” that can be used to memorize. We vary the memorization capacity by varying the number of explicit noise features.

where σnoise2\sigma_{\mathsf{noise}}^{2} is a constant. The scaling by 1/N1/N ensures that for large NN, the norm of the noise vectors ∥xnoise∥22≈σnoise2\|x_{\mathsf{noise}}\|_{2}^{2}\approx\sigma_{\mathsf{noise}}^{2} is approximately constant with high probability. Intuitively, when NN is large, overparameterized models can use xnoisex_{\mathsf{noise}} to fit a training point xx without affecting its predictions on other points, thereby memorizing xx. We formalize this notion of memorization later in Section 5.2.

As before, the training data is composed of four groups, each corresponding to a combination of the label y∈{−1,1}y\in\{-1,1\} and the spurious attribute a∈{−1,1}a\in\{-1,1\}: two majority groups with a=ya=y, each of size nmaj/2n_{\mathsf{maj}}/2, and two minority groups with a=−ya=-y, each of size nmin/2n_{\mathsf{min}}/2. Combined, there are nn training examples {(x(i),y(i))}i=1n\{(x^{(i)},y^{(i)})\}_{i=1}^{n}.

In the underparameterized regime, the training data is not linearly separable and we simply have w^rw=w^0rw/∥w^0rw∥2\hat{w}^{\mathsf{rw}}=\hat{w}^{\mathsf{rw}}_{0}/\|\hat{w}^{\mathsf{rw}}_{0}\|_{2}. In the overparameterized regime where N≫nN\gg n, the training data is linearly separable, and Rosset et al. 2004 showed that w^rw=w^mm\hat{w}^{\mathsf{rw}}={\hat{w}^{\mathsf{mm}}}, where w^mm{\hat{w}^{\mathsf{mm}}} is the max-margin classifier

The equivalence w^rw=w^mm\hat{w}^{\mathsf{rw}}={\hat{w}^{\mathsf{mm}}} holds regardless of the reweighting by 1/p^g1/\hat{p}_{g}: if we define the ERM estimator w^erm{\hat{w}^{\mathsf{erm}}} analogously to (5) without the reweighting, it is also equal to w^mm{\hat{w}^{\mathsf{mm}}}. We will therefore analyze w^mm{\hat{w}^{\mathsf{mm}}} in the overparameterized regime since it subsumes both w^rw\hat{w}^{\mathsf{rw}} and w^erm{\hat{w}^{\mathsf{erm}}}.

We also note that if we use gradient descent to directly optimize the unregularized logistic regression objective (either reweighted or not), the resulting solution after scaling to unit norm also converges to w^mm{\hat{w}^{\mathsf{mm}}} as the number of gradient steps goes to infinity (Soudry et al. 2018).

2 Analysis of worst-group error

We now state our main analytical result: in the explicit-memorization setting, the worst-group test error of a sufficiently overparameterized model is greater than 1/21/2 (worse than random) under certain settings of σspu2,σcore2,nmaj,nmin\sigma_{\mathsf{spu}}^{2},\sigma_{\mathsf{core}}^{2},n_{\mathsf{maj}},n_{\mathsf{min}}. In contrast, underparameterized models attain reasonable worst-group error even under such a setting.

For any pmaj≥(1−12001)p_{\mathsf{maj}}\geq\bigl(1-\frac{1}{2001}\bigr), σcore2≥1\sigma_{\mathsf{core}}^{2}\geq 1, σspu2≤116log⁡100nmaj\sigma_{\mathsf{spu}}^{2}\leq\frac{1}{16\log 100n_{\mathsf{maj}}}, σnoise2≤nmaj6002\sigma_{\mathsf{noise}}^{2}\leq\frac{n_{\mathsf{maj}}}{600^{2}} and nmin≥100n_{\mathsf{min}}\geq 100, there exists N0N_{0} such that for all N>N0N>N_{0} (overparameterized regime), with high probability over draws of the data,

where w^mm{\hat{w}^{\mathsf{mm}}} is the max-margin classifier.

However, for N=0N=0 (underparameterized regime), with pmaj=(1−12001)p_{\mathsf{maj}}=\bigl(1-\frac{1}{2001}\bigr), σcore2=1\sigma_{\mathsf{core}}^{2}=1, and σspu2=0\sigma_{\mathsf{spu}}^{2}=0, and in the asymptotic regime with nmaj,nmin→∞n_{\mathsf{maj}},n_{\mathsf{min}}\rightarrow\infty, we have

where w^rw\hat{w}^{\mathsf{rw}} minimizes the reweighted logistic loss.

The result in the overparameterized regime applies to the max-margin classifier w^mm{\hat{w}^{\mathsf{mm}}}, which as discussed above subsumes both w^rw\hat{w}^{\mathsf{rw}} and w^erm{\hat{w}^{\mathsf{erm}}} when the data is linearly separable. The proof of Theorem 1 appears in Appendix B.

The conditions on σspu2\sigma_{\mathsf{spu}}^{2} and σcore2\sigma_{\mathsf{core}}^{2} in Theorem 1 above imply high spurious-core information ratio rs:cr_{\mathsf{s:c}}. Theorem 1 therefore provides a setting where high pmajp_{\mathsf{maj}} and high rs:cr_{\mathsf{s:c}} provably make overparameterized models obtain high worst-group error, matching the trends we observed upon varying pmajp_{\mathsf{maj}} and rs:cr_{\mathsf{s:c}} in the implicit-memorization setting (Figure 6). Furthermore, underparameterized models obtain reasonable worst-group error despite these conditions, mirroring the observations in earlier sections.

3 Overparameterization and memorization

We now sketch the key ideas in the proof of Theorem 1 (full proof in Appendix B), focusing first on the overparameterized regime. We start by establishing an inductive bias towards learning the minimum-norm model that fits the training data. We then define memorization and show how the minimum-norm inductive bias translates into a bias against memorization. Finally, we illustrate how the bias against memorization leads to learning the spurious feature and suffering high worst-group error.

Minimum-norm inductive bias. Define a separator as any model that correctly classifies all of the training points (x,y)(x,y) with margin yw⋅x≥1yw\cdot x\geq 1. Then from standard duality arguments, w^mm{\hat{w}^{\mathsf{mm}}} can be rewritten as w^minnorm/∥w^minnorm∥{\hat{w}^{\mathsf{minnorm}}}/\|{\hat{w}^{\mathsf{minnorm}}}\|, the scaled version of the minimum-norm separator w^minnorm{\hat{w}^{\mathsf{minnorm}}}

Since scaling does not affect the 0-1 test error, it suffices to analyze w^minnorm{\hat{w}^{\mathsf{minnorm}}}. Equation (9) shows that out of the set of all separators (which all perfectly fit the training data), the inductive bias favors the separator with the minimum norm. We now discuss how this minimum-norm inductive bias favors less memorization.

Memorization. For convenience, we denote the three components of a model ww as

In the overparameterized regime when N≫nN\gg n, a model can “memorize” a training point x(i)x^{(i)} via wnoisew_{\mathsf{noise}}, in particular by putting a large weight α(i)\alpha^{(i)} in the direction of x(i)x^{(i)} (Equation (11)):

Because the noise vectors of the training points (high-dimensional Gaussians) are nearly orthogonal for large NN, the component α(i)xnoise(i)\alpha^{(i)}{x_{\mathsf{noise}}^{(i)}} affects the prediction on x(i)x^{(i)}, but not on any other training or test points.

This ability to memorize plays a crucial role in making overparameterized models obtain high worst-group error. Intuitively, the minimum-norm inductive bias favors less memorization in overparameterized models. Roughly speaking, models that memorize more have larger weights ∣α(i)∣|\alpha^{(i)}| on the noise vectors xnoise(i){x_{\mathsf{noise}}^{(i)}}. Since these noise vectors are nearly orthogonal and have similar norm, this translates into a larger norm ∥wnoise∥22\|w_{\mathsf{noise}}\|_{2}^{2}.

Comparing using xcorex_{\mathsf{core}} versus using xspux_{\mathsf{spu}}. To illustrate how the inductive bias against memorization leads to high worst-group error, we consider two extreme sets of separators: (i) ones that use the spurious feature but not the core feature, denoted by Wuse−spu\mathcal{W}^{\mathsf{use-spu}} (ii) ones that use the core feature but not the spurious feature, denoted by Wuse−core\mathcal{W}^{\mathsf{use-core}}.

In scenario (i), using the spurious feature xspux_{\mathsf{spu}} alone allows models to fit the majority groups very well. Thus, models that use xspux_{\mathsf{spu}} only need to memorize the minority points. In Proposition 1, we construct a separator wuse−spu∈Wuse−spuw^{\mathsf{use-spu}}\in\mathcal{W}^{\mathsf{use-spu}} and show that its norm only scales with the number of minority points nminn_{\mathsf{min}}.

Conversely, in scenario (ii), using the core feature xcorex_{\mathsf{core}} alone allows models to fit all groups equally well. However, when rs:cr_{\mathsf{s:c}} is high, xcorex_{\mathsf{core}} is noisier than xspux_{\mathsf{spu}}, so models that use xcorex_{\mathsf{core}} still need to memorize a constant fraction of all the training points. In Proposition 2, we show that norms of all separators wuse−core∈Wuse−corew^{\mathsf{use-core}}\in\mathcal{W}^{\mathsf{use-core}} are lower bounded by a quantity linear in the total number of training points nn.

When the majority fraction pmajp_{\mathsf{maj}} is sufficiently large such that nmin≪nn_{\mathsf{min}}\ll n, the separator wuse−spuw^{\mathsf{use-spu}} that uses xspux_{\mathsf{spu}} will have a lower norm than any separator wuse−core∈Wuse−corew^{\mathsf{use-core}}\in\mathcal{W}^{\mathsf{use-core}} that uses xcorex_{\mathsf{core}}. Since the inductive bias favors the minimum-norm separator, it prefers a separator wuse−spuw^{\mathsf{use-spu}} that memorizes the minority points and suffers high worst-group error over any wuse−core∈Wuse−corew^{\mathsf{use-core}}\in\mathcal{W}^{\mathsf{use-core}}.

When σcore2,σspu2\sigma_{\mathsf{core}}^{2},\sigma_{\mathsf{spu}}^{2} satisfy the conditions in Theorem 1, there exists N0N_{0} such that for all N>N0N>N_{0}, with high probability, there exists a separator wuse−spu∈Wuse−spuw^{\mathsf{use-spu}}\in\mathcal{W}^{\mathsf{use-spu}} such that

for some constants γ1,γ2>0\gamma_{1},\gamma_{2}>0.

To simplify exposition in this sketch, suppose that the noise vectors xnoise(i){x_{\mathsf{noise}}^{(i)}} are orthogonal and have constant norm ∥xnoise(i)∥22=σnoise2\|{x_{\mathsf{noise}}^{(i)}}\|_{2}^{2}=\sigma_{\mathsf{noise}}^{2}. We construct a separator wuse−spu∈Wuse−spuw^{\mathsf{use-spu}}\in\mathcal{W}^{\mathsf{use-spu}} that does not use the core feature xcorex_{\mathsf{core}} as follows. Set wspuuse−spu=γ1w^{\mathsf{use-spu}}_{\mathsf{spu}}=\gamma_{1} for some large enough constant γ1>0\gamma_{1}>0. This is sufficient to satisfy the margin condition on the majority points: since σspu2\sigma_{\mathsf{spu}}^{2} is very small, w.h.p. all majority training points satisfy y(i)(xspu(i)γ1)≥1y^{(i)}({x_{\mathsf{spu}}^{(i)}}\gamma_{1})\geq 1.

However, for the minority training points, the spurious attribute aa does not match the label yy, and in order to satisfy the margin condition with a positive wspuuse−spuw^{\mathsf{use-spu}}_{\mathsf{spu}}, these nminn_{\mathsf{min}} minority points have to be memorized. Since σspu2\sigma_{\mathsf{spu}}^{2} is very small, the decrease in the margin due to wspuuse−spu=γ1w^{\mathsf{use-spu}}_{\mathsf{spu}}=\gamma_{1} is at most −ργ1-\rho\gamma_{1} w.h.p. for some constant ρ\rho that depends on σspu2\sigma_{\mathsf{spu}}^{2}. To satisfy the margin condition, it thus suffices to set αuse−spu(i)=y(i)(1+ργ1)/σnoise2\alpha^{(i)}_{\mathsf{use-spu}}=y^{(i)}(1+\rho\gamma_{1})/\sigma_{\mathsf{noise}}^{2}, and the bound on the norm follows. The full proof appears in Section B.2.6. ∎

When σcore2,σspu2\sigma_{\mathsf{core}}^{2},\sigma_{\mathsf{spu}}^{2} satisfy the conditions in Theorem 1 and nmin≥100n_{\mathsf{min}}\geq 100, there exists N0N_{0} such that for all N>N0N>N_{0}, with high probability, all separators wuse−core∈Wuse−corew^{\mathsf{use-core}}\in\mathcal{W}^{\mathsf{use-core}} satisfy

Subsampling

Our results above highlight the role of the majority fraction pmajp_{\mathsf{maj}} in determining if overparameterization hurts worst-group test error. When pmajp_{\mathsf{maj}} is large, the inductive bias favors using spurious features because it entails memorizing only a relatively small number of minority points, while the alternative of using core features requires memorizing a large number of majority points. This suggests that reducing the memorization cost of using core features by directly removing some majority points could induce overparameterized models to obtain low worst-group error.

Here, we show that this approach of subsampling the majority group achieves good worst-group test error on the datasets studied above. Subsampling creates a new group-balanced dataset by randomly removing training points in all other groups to match the number of points from the smallest group (Japkowicz & Stephen 2002; Haixiang et al. 2017; Buda et al. 2018). We then train a model to minimize the average loss on this subsampled dataset. For a precise description, see Appendix A.6.

Figure 7 shows that overparameterized models trained via subsampling (Equation 15) obtain low worst-group error on the CelebA, Waterbirds, and synthetic (implicit-memorization) datasets. Across all three datasets, training via subsampling makes increasing overparameterization help both average and worst-group test error. Moreover, overparameterized models trained on subsampled data are comparable to or better than the best models trained on the full dataset (i.e., underparameterized models trained with reweighting).

Subsampling seems wasteful since it throws away a large fraction of the training data: we only use 3.4% of the full training data for CelebA, 4.6% for Waterbirds, and 10% for the synthetic dataset. However, the results above show that subsampling in overparameterized models matches or outperforms reweighting with underparameterized models. For example, on CelebA, an overparameterized model trained via subsampling obtains 11.1% average test and 15.1% worst-group test error, whereas an underparameterized model trained with reweighting obtains 11.3% average and 25.6% worst-group test error.

Subsampling vs. reweighting. Both subsampling and reweighting artificially balance the groups in the training data, and previous work on imbalanced datasets has concluded that reweighting is typically at least as effective as subsampling (Buda et al. 2018). However, we find a clear difference between subsampling and reweighting in the overparameterized regime: increasing overparameterization with reweighting increases worst-group error, while doing so with subsampling decreases worst-group error. The intuition developed in Sections 4 and 5 shed some light on this difference. Consider an overparameterized model: as in Section 5.1, reweighting does not change the learned model which is the max-margin classifier. However, subsampling reduces pmajp_{\mathsf{maj}}. Recall that the inductive bias favors spurious features when the alternative of using core features requires memorizing a large number of training points. By reducing pmajp_{\mathsf{maj}}, we reduce this memorization cost associated with core features, thereby inducing the model to use core features and achieve low worst-group test error.

Related work

The effect of overparameterization. The effect of overparameterization on average test error has been widely studied. In what is commonly referred to as “double descent”, increasing model size beyond zero training error decreases test error, despite conventional wisdom that overfitting should increase test error. This behavior has been observed empirically (Belkin et al. 2019; Opper 1995; Advani & Saxe 2017; Nakkiran et al. 2019) and shown analytically in high-dimensional regression (Hastie et al. 2019; Bartlett et al. 2019; Mei & Montanari 2019). These works focus on average test error and are consistent with our findings there. However, our focus is on worst-group test error, particularly when the groups are defined based on spurious attributes, and in this paper we establish that worst-group test error can behave quite differently from average test error.

Increasing overparameterization can actually improve model robustness to some types of distributional shifts (Hendrycks et al. 2019; Hendrycks & Dietterich 2019; Yang et al. 2020). In this light, our results show that the effect of overparameterization on model robustness can depend heavily on the dataset (e.g., properties like pmajp_{\mathsf{maj}} and rs:cr_{\mathsf{s:c}}), type of distributional shift, and training procedure.

Worst-group error. Prior work on improving worst-group error focused on the underparameterized regime, with methods based on weighting/sampling (Shimodaira 2000; Japkowicz & Stephen 2002; Buda et al. 2018; Cui et al. 2019), distributionally robust optimization (DRO) (Ben-Tal et al. 2013; Namkoong & Duchi 2017; Oren et al. 2019), and fair algorithms (Dwork et al. 2012; Hardt et al. 2016; Kleinberg et al. 2017). Our focus is on the overparameterized, zero-training-error regime; here, previous methods based on reweighting and DRO are ineffective (Wen et al. 2014; Byrd & Lipton 2019; Sagawa et al. 2020). As mentioned in Section 1, Sagawa et al. 2020 demonstrated that stronger L2L_{2}-regularization can improve worst-group error on neural networks (when coupled with reweighting or group DRO). Similarly Cao et al. 2019 show that data-dependent regularization can improve error on rare labels. While their work focuses on developing methods to improve worst-group error, our focus is on understanding the mechanisms by which overparameterization hurts worst-group error.

Discussion

Our work shows that overparameterization hurts worst-group error on real datasets that contain spurious correlations. We studied the implicit- and explicit-memorization settings to provide a potential story for why this might occur: there can be an inductive bias towards solutions that do not need to memorize as many training points, and this can favor models that exploit the spurious correlations.

However, our synthetic settings make several simplifying assumptions, e.g., they suppose that the model prefers the spurious feature because it is less noisy than the core feature. This assumption need not always apply, and different assumptions might also lead to overparameterization exacerbating spurious correlations. For example, there might exist a true classifier based on the core features which has high accuracy but which is relatively more complex (e.g., high parameter norm) and therefore not favored by the training procedure. Studying the effect of overparameterization in settings such as those is important future work.

We also observed that subsampling allows overparameterized models to achieve low average and worst-group test error, despite eliminating a large fraction of training examples. In contrast, when using the full training data, only underparameterized models attain low worst-group test error under our current training methods. These observations call for future work to develop methods that can exploit both the statistical information in the full training data as well as the expressivity of overparameterized models, so as to attain good worst-group and average test error.

We are grateful to Yair Carmon, John Duchi, Tatsunori Hashimoto, Ananya Kumar, Yiping Lu, Tengyu Ma, and Jacob Steinhardt for helpful discussions and suggestions. SS was supported by a Stanford Graduate Fellowship, AR was supported by a Google PhD Fellowship and Open Philanthropy Project AI Fellowship, and PWK was supported by the Facebook Fellowship Program.

Reproducibiltity

Code is available at https://github.com/ssagawa/overparam_spur_corr. All code, data, and experiments are available on the Codalab platform at https://worksheets.codalab.org/worksheets/0x1db77e603a8d48c8abebd67fce39cf8b.

References

Appendix A Supplemental experiments

In the main text, we focused on reweighted models, trained with the reweighted objective on the full data (Sections 3-5), as well as subsampled models, trained on subsampled data with the ERM objective (Section 6). Here, we study the effect of overparameterization on ERM models, trained with the ERM objective on the full data. Consistent with prior work, we observe that ERM models obtain poor worst-group error (near or worse than random), regardless of whether the model is underparameterized or overparameterized (Sagawa et al. 2020). We also confirm that overparameterization helps average test error (see, e.g., Nakkiran et al. 2019; Belkin et al. 2019; Mei & Montanari 2019).

We first consider the CelebA and Waterbirds dataset, following the experimental set-up of Section 3 but now training with the standard ERM objective (Equation (2)) instead of the reweighted objective (Equation (3)).

On these datasets, overparameterization helps the average test error (Figure 8). As model size increases past the point of zero training error, the average test error decreases. The best average test error is obtained by highly overparameterized models with zero training error—4.6% for CelebA at width 96, and 4.2% for Waterbirds at 6,000 random features.

In contrast, the worst-group error is consistently high across model sizes: it is consistently worse than random (>>50%) for CelebA and nearly random (44%) for Waterbirds (Figure 8). These worst-group errors are much worse than those obtained by reweighted, underparameterized models (25.6%25.6\% for CelebA and 26.6%26.6\% for Waterbirds; see Section 3). Thus, while overparameterization helps ERM models achieve better test error, these models all fail to yield good worst-group error regardless of the degree of overparameterization.

We also evaluate the effect of overparameterization on ERM models on the synthetic dataset introduced in Section 4. As above, ERM models fail to achieve reasonable worst-group test error across model sizes, but improve in average test error as model size increases (Figure 8). The best average test error is obtained by a highly overparameterized model with zero training error—9.0% error at 9,000 random features—while the worst-group test error is nearly random or worse (>48>48%) across model sizes.

A.2 Stronger L2L_{2} regularization improves worst-group error in overparameterized reweighted models

In the main text, we studied models with default/weak or no L2L_{2} regularization. In this section, we study the role of L2L_{2} regularization in modulating the effect of overparameterization on worst-group error by changing the hyperparameter λ\lambda that controls L2L_{2} regularization strength. Overall, we find that increasing L2L_{2} regularization (to the point where models do not have zero training error) improves worst-group error but hurts average error in overparameterized reweighted models. In contrast, L2L_{2} regularization has little effect on both worst-group and average error in the underparameterized regime.

In the main text, we trained ResNet10 models with default, weak regularization (λ=0.0001\lambda=0.0001) on the CelebA dataset, and unregularized logistic regression on the Waterbirds and synthetic datasets. Here, we consider strongly-regularized models with λ=0.1\lambda=0.1 for both types of models; unlike before, these models no longer achieve zero training error even when overparameterized. Figure 9 shows the results of varying model size on strongly-regularized ERM, reweighted, and subsampled models on the three datasets.

On all three datasets, with strong regularization, ERM models continue to yield poor worst-group test error across model sizes, with similar or worse worst-group test error compared to with weak/ no regularization. Conversely, strongly-regularized subsampled models continue to achieve low worst-group test error across model sizes.

Where strong regularization has a large effect is on reweighted models. With reweighting, we find that strong regularization improves worst-group error in overparameterized models: across all three datasets, the worst-group test error in the overparameterized regime is much lower for the strongly-regularized models than their weakly regularized or unregularized counterparts (Figure 3). These results are consistent with similar observations made in Sagawa et al. 2020. However, even though strongly-regularized overparameterized models outperform weakly-regularized overparameterized models, overparameterization can still hurt the worst-group error in strongly-regularized reweighted models. On the CelebA and synthetic datasets, with λ=0.1\lambda=0.1, the best worst-group error is still obtained by an underparameterized model for the CelebA and synthetic datasets, though overparameterization seems to help worst-group error on the Waterbirds dataset at least in the range of model sizes studied.

Given a fixed overparameterized model size, how does its performance change with the L2L_{2} regularization strength λ\lambda? We study this with the logistic regression model on the Waterbirds and synthetic datasets, using a model size of m=10,000m=10,000 random features and varying the L2L_{2} regularization strength from λ=10−9\lambda=10^{-9} to λ=102\lambda=10^{2}. We did not run this experiment on the CelebA dataset for computational reasons, as doing so would have required tuning a different learning rate for each choice of regularization strength.

Results are in Figure 10. As before, ERM models obtain poor worst-group error regardless of the regularization strength, and subsampled models are relatively insensitive to regularization, achieving reasonable worst-group error at most settings of λ\lambda.

For reweighted models, however, having the right level of regularization is critical for obtaining good worst-group test error. On both datasets, the best worst-group test error is obtained by strongly-regularized models that do not achieve zero training error. In contrast, increasing regularization strength hurts average error, with the best average test error attained by models with nearly zero regularization.

In the above experiments, we kept either model size or regularization strength fixed, and varied the other. Here, we vary both: we consider L2L_{2} regularization strengths λ∈{10−9,10−6,0.001,0.1,10}\lambda\in\{10^{-9},10^{-6},0.001,0.1,10\} and investigate the effect of increasing model size for each λ\lambda. We plot the results for Waterbirds and the synthetic dataset in Figure 11 and Figure 12 respectively.

For reweighted models, the results match what we observed above. Strengthening L2L_{2} regularization reduces the detrimental effect of overparameterization on worst-group error. For any fixed model size in the overparameterized regime, the worst-group test error improves as λ\lambda increases up to a certain value. Worst-group test error seems to plateau at different values as model size increases, depending on the regularization strength, though we note that it is possible that further increasing model size beyond the range we studied might lead models with different regularization strengths to eventually converge. Further empirical studies as well as theoretical characterization of the interaction between regularization and overparameterization are needed to confirm this phenomenon.

Given sufficiently large λ\lambda (e.g., λ=10\lambda=10 for both Waterbirds and synthetic datasets), overparameterized models seem to outperform underparameterized models, at least for the range of model sizes studied. However, we caution that this trend does not seem to hold on the CelebA dataset (Figure 9).

Finally, in contrast with its effects on overparameterized models, regularization seems to only have a modest effect on worst-group test error in the underparameterized regime.

Figure 13 shows how the average test error changes as a function of model size under different settings of the majority fraction pmajp_{\mathsf{maj}} and the spurious-core ratio rs:cr_{\mathsf{s:c}} on the synthetic dataset introduced in Section 4. As expected, overparameterization helps the average test error regardless of SCR and the majority fraction.

A.4 Comparison between implicit and explicit implicit memorization

However, in the highly underparameterized regime, the RP models do poorly because of model misspecification (owing to a small number of random projections), whereas the linear models can still learn to use xcorex_{\mathsf{core}} and therefore do well.

A.5 Experimental details

For the CelebA dataset, we use the official train-val-test split from Liu et al. 2015, with the Blond_Hair attribute as the target yy and the Male as the spurious association aa.

For the Waterbirds dataset, we follow the setup in Sagawa et al. 2020; for convenience, we reproduce some details of how it was constructed here. This dataset was obtained by combining bird images from the CUB dataset (Wah et al. 2011) with backgrounds from the Places dataset (Zhou et al. 2017). The CUB dataset comes with annotations of bird species. For the Waterbirds dataset, each bird was labeled was a waterbird if it was a seabird or waterfowl in the CUB dataset; otherwise, it was labeled as a landbird. Bird images were cropped using the provided segmentation masks and placed on either a land (bamboo forest or broadleaf forest) or water (ocean or natural lake) background obtained from the Places dataset.

For Waterbirds, we follow the same train-val-test split as in Sagawa et al. 2020. Note that in these validation and test sets, landbirds and waterbirds are uniformly distributed on land and water backgrounds so that accuracy on the rare groups can be more accurately estimated. When calculating average test accuracy, we therefore first compute the average test accuracy over each group and then report a weighted average, with weights corresponding to the relative proportion of each group in the skewed training dataset.

We post-process Waterbirds by extracting feature representations taken from the last layer of a ResNet18 model pre-trained on ImageNet. We use the Pytorch torchvision implementation of the ResNet18 model for this. All models on the Waterbirds dataset in our paper are logistic regression models trained on top of this (fixed) feature representation.

We used a modified ResNet10 with variable widths, following the approach in Nakkiran et al. 2019 and extending the torchvision implementation. We trained all ResNet10 models with stochastic gradient descent with momentum of 0.9 and a batch size of 128, with the L2L_{2} regularization parameter λ\lambda was passed in to the optimizer as the weight decay parameter. In the experiments in the main text, we used the default setting of λ=10−4\lambda=10^{-4}. We used a fixed learning rate instead of a learning rate schedule and selected the largest learning rate for which optimization was stable, following Sagawa et al. 2020. This resulted in learning rates of 0.01 and 0.0001 for λ=10−4\lambda=10^{-4} and λ=0.1\lambda=0.1, respectively, across all training procedures. As in the original ResNet paper (He et al. 2016), we used batch normalization (Ioffe & Szegedy 2015) and no dropout (Srivastava et al. 2014), and for simplicity, we trained all models without data augmentation.

We trained for 50 epochs for ERM and reweighted models and 500 epochs for subsampled models (due to smaller number of examples per epoch). We found that worst-group error can be unstable across epochs due to the small sample size and relatively large learning rate, so in our results we report the error averaged over the last 10 epochs.

We used the logistic regression implementation from scikit-learn, training with the L-BFGS solver until convergence with tolerance 0.0001, and setting the regularization parameter as C=1/(nλ)C=1/(n\lambda). For unregularized models, we set λ=10−9\lambda=10^{-9} for numerical stability.

A.6 Subsampling

Formally, given a set of groups G\mathcal{G} and a dataset D comprising a set of nn training points with their group identities {(x(i),y(i),g(i))}\{(x^{(i)},y^{(i)},g^{(i)})\}, the subsampling procedure involves two steps. First, we group training points based on group identities:

For each group gg, we select a subset Dgss⊆Dg\text{D}^{\textsf{ss}}_{g}\subseteq\text{D}_{g} uniformly at random from Dg\text{D}_{g} such that each subset has the same number of points as the smallest group in the training set. We form a new dataset Dss\text{D}^{\textsf{ss}} by combining these subsets:

Note that Dss\text{D}^{\textsf{ss}} is group-balanced, with pmaj=0.5p_{\mathsf{maj}}=0.5. We then train a model by minimizing the average loss on Dss\text{D}^{\textsf{ss}},

Since Dss\text{D}^{\textsf{ss}} is group-balanced, the reweighted training loss (Equation 3) has the same weight on all training points and minimizing the reweighted objective on Dss\text{D}^{\textsf{ss}} is equivalent to minimizing the average loss objective above.

Appendix B Proof of Theorem 1

Here, we detail the proof of Theorem 1 presented in Section 5. We structure the proof by splitting Theorem 1 into two smaller theorems: one for the overparameterized regime (Appendix B.2), and another for the underparameterized regime (Appendix B.3).

Further, by the representer theorem, we decompose w^noise\hat{w}_{\mathsf{noise}} as

Note that α(i)(w)\alpha^{(i)}(w) is equivalent to the α(i)\alpha^{(i)} referred to in the main text. Recall that we define memorization of each training point x(i)x^{(i)} by the weight α(i)\alpha^{(i)} as follows.

The component α(i)(w^)xnoise(i)\alpha^{(i)}(\hat{w}){x_{\mathsf{noise}}^{(i)}} serves to “memorize” x(i)x^{(i)} when NN is sufficiently large, as it affects the prediction on x(i)x^{(i)} but not on any other training or test points (because noise vectors are nearly orthogonal when NN is large). In the proof, we set the constant γ2\gamma^{2} appropriately (based on other parameter settings in Theorem 1) to get the required result.

Finally, let Gmaj,GminG_{\mathsf{maj}},G_{\mathsf{min}} denote the indices of training points in the majority and minority group respectively.

B.2 Overparameterized regime

In our explicit-memorization set-up, sufficiently overparameterized models provably have high worst-group error under certain settings of σspu2,σcore2,nmaj,nmin\sigma_{\mathsf{spu}}^{2},\sigma_{\mathsf{core}}^{2},n_{\mathsf{maj}},n_{\mathsf{min}} as stated in Theorem 1 (restated below as Theorem 2).

For any pmaj≥(1−12001)p_{\mathsf{maj}}\geq\bigl(1-\frac{1}{2001}\bigr), σcore2≥1\sigma_{\mathsf{core}}^{2}\geq 1, σspu2≤116log⁡100nmaj\sigma_{\mathsf{spu}}^{2}\leq\frac{1}{16\log 100n_{\mathsf{maj}}}, σnoise2≤nmaj6002\sigma_{\mathsf{noise}}^{2}\leq\frac{n_{\mathsf{maj}}}{600^{2}} and nmin≥100n_{\mathsf{min}}\geq 100, there exists N0N_{0} such that for all N>N0N>N_{0} (overparametrized regime), with high probability over draws of the data,

where w^mm{\hat{w}^{\mathsf{mm}}} is the max-margin classifier.

In Section 5, we sketched key ideas in the proof by considering special families of separators: because the minimum-norm inductive bias favors less memorization, models can prefer to learn the spurious feature and memorize the minority examples (entailing high worst-group error), instead of learning the core feature and memorizing some fraction of all training points (possibly attaining reasonable worst-group error). We now provide the full proof of Theorem 2, generalizing the above key concepts by considering all separators.

Recall from Section 5 that we consider the maximum-margin classifier w^minnorm{\hat{w}^{\mathsf{minnorm}}}:

In other words, w^minnorm{\hat{w}^{\mathsf{minnorm}}} is the minimum-norm separator, where separator is a classifier with zero training error and required margins, satisfying y(i)(w⋅x(i))≥1y^{(i)}(w\cdot x^{(i)})\geq 1 for all ii. We analyze the worst-group error of the minimum-norm separator w^minnorm{\hat{w}^{\mathsf{minnorm}}} as outlined below:

We first upper bound the fraction of majority examples memorized by the minimum-norm separator w^minnorm{\hat{w}^{\mathsf{minnorm}}}. We show that there exists a separator that can use spurious features and needs to memorize only the minority points (Lemma 1) for the parameter settings in Theorem 2 where σspu\sigma_{\mathsf{spu}} is sufficiently small. Since the norm of a separator is roughly scales with the number of points memorized (∣α(i)(w^)∣≥γ2/σnoise2|\alpha^{(i)}(\hat{w})|\geq\gamma^{2}/\sigma_{\mathsf{noise}}^{2}), we have an upper bound on the number of training points memorized by w^minnorm{\hat{w}^{\mathsf{minnorm}}}. Since the number of majority points is much larger than the number of minority points, this says that only a small fraction of majority points could be memorized by w^minnorm{\hat{w}^{\mathsf{minnorm}}}.

Next, we observe that since the core feature is noisy as per the parameter setting in Theorem 2, if we do not use the spurious feature, a constant fraction of majority points have to be memorized if spurious features are not used. Conversely, if less than this fraction of majority points can be memorized, the separator must use spurious features. Since using spurious features leads to higher worst-group test error, this reveals a trade-off between the worst-group test error of a separator and the fraction of majority points that it memorizes at training time. Succinctly, smaller fraction memorized implies the use of spurious features which in turn implies higher worst-group test error. Smaller worst-group test error requires eliminating the use of spurious features which would lead to a large fraction of majority points requiring memorization in order for a classifier to be a separator. We formalize the above trade-off between the worst-group test error and fraction of majority examples to be memorized in Proposition 3.

Combining the two steps together, since w^minnorm{\hat{w}^{\mathsf{minnorm}}} memorizes only a small fraction of majority points by virtue of being the minimum norm separator, w^minnorm{\hat{w}^{\mathsf{minnorm}}} suffers high worst-group test error.

We now formally prove Theorem 2, invoking propositions that we prove in subsequent sections.

In the first part of the proof, we show that the minimum-norm separator w^minnorm{\hat{w}^{\mathsf{minnorm}}} “memorizes” a small fraction of the majority examples. Formally, we study the quantity δmaj-train(w^,γ2)\delta_{\text{maj-train}}\left(\hat{w},\gamma^{2}\right) defined as follows.

Consider a separator w^\hat{w} on training data {(x(i),y(i))}i=1n\{(x^{(i)},y^{(i)})\}_{i=1}^{n}. Let δmaj-train(w^,γ2)\delta_{\text{maj-train}}\left(\hat{w},\gamma^{2}\right) be the fraction of training examples that w^\hat{w} γ\gamma-memorizes in the majority groups:

We provide an upper bound on δmaj-train(w^minnorm,γ2)\delta_{\text{maj-train}}\left({\hat{w}^{\mathsf{minnorm}}},\gamma^{2}\right) (Lemma 4) by first bounding ∥w^minnorm∥\|{\hat{w}^{\mathsf{minnorm}}}\| and then bounding δmaj-train(w^minnorm,γ2)\delta_{\text{maj-train}}\left({\hat{w}^{\mathsf{minnorm}}},\gamma^{2}\right) in terms of ∥w^minnorm∥\|{\hat{w}^{\mathsf{minnorm}}}\|.

There exists a separator wuse−spuw^{\mathsf{use-spu}} that satisfies y(i)(wuse−spu⋅x(i))≥1, ∀i∈Gmaj,Gminy^{(i)}(w^{\mathsf{use-spu}}\cdot x^{(i)})\geq 1,~\forall i\in G_{\mathsf{maj}},G_{\mathsf{min}}. The norm of this separator gives a bound on ∥w^minnorm∥\|{\hat{w}^{\mathsf{minnorm}}}\| as follows. For the parameter settings under Theorem 2, with high probability, we have

for constants u=1.3125,s=2.61σnoise2u=1.3125,s=\frac{2.61}{\sigma_{\mathsf{noise}}^{2}}.

In order to get an upper bound on ∥w^minnorm∥\|{\hat{w}^{\mathsf{minnorm}}}\|, we compute the norm of a particular separator. Concretely, we consider a separator wuse−spuw^{\mathsf{use-spu}} of the following form:

Now it remains to select appropriate values of constants uu and ss such that y(i)(wuse−spu⋅x(i))≥1y^{(i)}(w^{\mathsf{use-spu}}\cdot x^{(i)})\geq 1 is satisfied for all training examples.

For majority points, this involves setting uu large enough such that the less noisy spurious feature can be used to obtain the required margin. Without loss of generality, assume y(i)=1y^{(i)}=1. Formally, for i∈Gmaji\in G_{\mathsf{maj}},

The first inequality follows from the fact that σspu\sigma_{\mathsf{spu}} is small enough under the parameter settings of Theorem 2 to allow a uniform bound on xspu(i){x_{\mathsf{spu}}^{(i)}} (Lemma 5). The second inequality follows from setting the number of random features NN to be large enough so that the noise features are near orthogonal (Lemma 8). Conversely, we have

Notice that the condition in Equation 23 requires that uu be greater than 00. Since the minority points have spurious attribute a=−ya=-y, we need to set ss to be large enough so that wuse−spuw^{\mathsf{use-spu}} as defined above separates the minority points. Just as before, we set y=1y=1 WLOG. For i∈Gmini\in G_{\mathsf{min}}, we have

The steps are similar to the condition for majority points, with the key difference that the contribution from the noise term involves s∥xnoise(i)∥22s\|{x_{\mathsf{noise}}^{(i)}}\|_{2}^{2} (Lemma 9).

A set of parameters that satisfies both conditions above Equation 24 and Equation 23 is the following:

We use the fact that c1<1/2000c_{1}<1/2000 (From Lemma 9).

This follows from bounds on ∥xnoise(i)∥22\|{x_{\mathsf{noise}}^{(i)}}\|_{2}^{2} (Lemma 9) and sum of less than n2n^{2} terms involving s2xnoise(i)⋅xnoise(j)s^{2}{x_{\mathsf{noise}}^{(i)}}\cdot{x_{\mathsf{noise}}^{(j)}} (using Lemma 8). ∎

For a separator w^\hat{w} with bounded α(i)(w^)2≤10nσnoise2\alpha^{(i)}(\hat{w})^{2}\leq\frac{10n}{\sigma_{\mathsf{noise}}^{2}} for all i=1,…,ni=1,\dots,n, its norm can be bounded with high probability as

under the parameter settings of Theorem 2.

The result follows bounded norms (Lemma 9), bounded dot products (Lemma 8), and the definition of δmaj-train(w^,γ2)\delta_{\text{maj-train}}\left(\hat{w},\gamma^{2}\right) (Definition 3).

We now apply Lemma 1 and Lemma 2 in order to bound δmaj-train(w^minnorm,γ2)\delta_{\text{maj-train}}\left({\hat{w}^{\mathsf{minnorm}}},\gamma^{2}\right), showing that the fraction of majority points that are memorized is small for appropriate choice of γ\gamma.

To invoke Lemma 2, we first show that the coefficient α(i)(w^minnorm)\alpha^{(i)}({\hat{w}^{\mathsf{minnorm}}}) is bounded above with high probabiltity.

Under the parameter settings of Theorem 2, with high probability, α(i)(w^minnorm)\alpha^{(i)}({\hat{w}^{\mathsf{minnorm}}}) is bounded above for i=1,…,ni=1,\dots,n as

Let max⁡iα(i)(w^minnorm)=Mσnoise2\max\limits_{i}\alpha^{(i)}({\hat{w}^{\mathsf{minnorm}}})=\frac{M}{\sigma_{\mathsf{noise}}^{2}}.

From the upper bound on ∥w^minnorm∥22\|{\hat{w}^{\mathsf{minnorm}}}\|_{2}^{2} (Lemma 1), we have

Since c1<1/2000c_{1}<1/2000, and n≥2000n\geq 2000, setting u=1.3125,sσnoise2=2.61u=1.3125,s\sigma_{\mathsf{noise}}^{2}=2.61, we get M2≤10nM^{2}\leq 10n. ∎

Now, we are ready to show that δmaj-train(w^minnorm,γ2)\delta_{\text{maj-train}}\left({\hat{w}^{\mathsf{minnorm}}},\gamma^{2}\right) is small.

Under the parameter settings of Theorem 2, the following is true with high probability.

Applying Lemma 2 to w^minnorm{\hat{w}^{\mathsf{minnorm}}} by invoking the bounds on α(i)(w^minnorm)\alpha^{(i)}({\hat{w}^{\mathsf{minnorm}}}) (Lemma 3),

with high probability. Putting this together with Lemma 1, we have

where in the last step we substitute the constants γ2=9/10,u=1.3125,sσnoise2=2.61,nmaj/nmin≤1/2000\gamma^{2}=9/10,u=1.3125,s\sigma_{\mathsf{noise}}^{2}=2.61,n_{\mathsf{maj}}/n_{\mathsf{min}}\leq 1/2000 and σnoise2≤nmaj/360000\sigma_{\mathsf{noise}}^{2}\leq n_{\mathsf{maj}}/360000. ∎

B.2.2 Concentration Inequalities

With probability >1−1/100>1-1/100, if σspu≤14log⁡100n\sigma_{\mathsf{spu}}\leq\frac{1}{4\sqrt{\log 100n}},

This follows from standard subgaussian concentration and union bound over n=nmaj+nminn=n_{\mathsf{maj}}+n_{\mathsf{min}} points.

For N=Ω(poly(n))N=\Omega(\text{poly}(n)), with probability greater than 1−1/20001-1/2000,

This follows from Corollary 1 and union bound over n2n^{2} pairs of training points.

For N=Ω(poly(n))N=\Omega(\text{poly}(n)), with probability greater than 1−1/20001-1/2000,

This follows from Lemma 6 and union bound over nn training points. In particular, we can set c1<1/2000c_{1}<1/2000 for large enough NN.

In the previous section, we proved that δmaj-train(w^minnorm,γ2)\delta_{\text{maj-train}}\left({\hat{w}^{\mathsf{minnorm}}},\gamma^{2}\right), the fraction of majority training samples that can have coefficient on the noise vectors greater than γ2/σnoise2\gamma^{2}/\sigma_{\mathsf{noise}}^{2} in the max margin separator w^minnorm{\hat{w}^{\mathsf{minnorm}}} is bounded for suitable value of γ\gamma. We showed this using the fact that the norm of w^minnorm{\hat{w}^{\mathsf{minnorm}}} is the smallest among all separators and the observation that the squared norm of a separator roughlty scales proportional the number of training points that have large coefficient along the noise vectors.

What does small δmaj-train(w^minnorm,γ2)\delta_{\text{maj-train}}\left({\hat{w}^{\mathsf{minnorm}}},\gamma^{2}\right) imply? We now show that the bound on δmaj-train(w^minnorm,γ2)\delta_{\text{maj-train}}\left({\hat{w}^{\mathsf{minnorm}}},\gamma^{2}\right) has an important consequence on the worst-group error Errwg(w^minnorm)\text{Err}_{\mathsf{wg}}({{\hat{w}^{\mathsf{minnorm}}}}); low δmaj-train(w^minnorm,γ)\delta_{\text{maj-train}}\left({\hat{w}^{\mathsf{minnorm}}},\gamma\right) would imply high worst-group error Errwg(w^minnorm)\text{Err}_{\mathsf{wg}}({{\hat{w}^{\mathsf{minnorm}}}}). We show that there is a trade-off between the worst-group test error of a separator and the fraction of majority points that it “memorizes” at training time. If a model that has low worst-group test error must use the core feature and not the spurious feature, and to obtain zero training error such a model would memorize a potentially large fraction of majority and minority points. In contrast, if the model instead uses only the spurious feature, then the worst-group test error would be high, but it would memorize only a small fraction of majority examples at training time; because we assume that the spurious feature is much less noisy than the core feature (σcore≫σspu\sigma_{\mathsf{core}}\gg\sigma_{\mathsf{spu}}), much fewer majority examples would need to be memorized. To summarize, a large w^spu\hat{w}_{\mathsf{spu}} would require smaller fraction of majority points to be memorized δmaj-train(w^,γ2)\delta_{\text{maj-train}}\left(\hat{w},\gamma^{2}\right) but increase the worst-group test error Errwg(w^)\text{Err}_{\mathsf{wg}}({\hat{w}}). We formalize the above trade-off between the worst-group error and fraction of majority examples to be memorized in Proposition 3.

For the minimum norm separator w^minnorm{\hat{w}^{\mathsf{minnorm}}}, under the parameter settings of Theorem 2, with high probability,

for some constants c3,c4<1/1000c_{3},c_{4}<1/1000 and Φ\Phi the Gaussian CDF.

For any separator w^\hat{w} that spans the training points and satisfies

under the parameter settings of Theorem 2, with high probability,

for some constants c1<1/2000;c5,c6<1/1000c_{1}<1/2000;c_{5},c_{6}<1/1000 and Φ\Phi the Gaussian CDF.

As mentioned before, we see that the spurious component weight w^minnormspu{\hat{w}^{\mathsf{minnorm}}}_{\mathsf{spu}} has opposite effects on the two quantities; Errwg(w^)\text{Err}_{\mathsf{wg}}({\hat{w}}) increases with increase w^spu\hat{w}_{\mathsf{spu}}, but δmaj-train(w^,γ)\delta_{\text{maj-train}}\left(\hat{w},\gamma\right) decreases with increase in w^spu\hat{w}_{\mathsf{spu}}. This dependence can be exploited to relate the two quantities to each other as follows.

In other words, if the δmaj-train(w^minnorm,γ)\delta_{\text{maj-train}}\left({\hat{w}^{\mathsf{minnorm}}},\gamma\right) is low, then Errwg(w^minnorm)\text{Err}_{\mathsf{wg}}({{\hat{w}^{\mathsf{minnorm}}}}) would need to be high.

B.2.4 Worst-group error is high

Recall from part 1 that δmaj-train(w^minnorm,γ)<1/200\delta_{\text{maj-train}}\left({\hat{w}^{\mathsf{minnorm}}},\gamma\right)<1/200 for appropriate choice of γ\gamma, and from part 2 the trade-off between δmaj-train(w^minnorm,γ)\delta_{\text{maj-train}}\left({\hat{w}^{\mathsf{minnorm}}},\gamma\right) and Errwg(w^minnorm)\text{Err}_{\mathsf{wg}}({{\hat{w}^{\mathsf{minnorm}}}}) (Equation (50)). As a final step, we need to bound the quantities on the RHS of Equation (50). All the constants are small, and γ2=9/10,δmaj-train(w^minnorm,9/10)≤1/200\gamma^{2}=9/10,\delta_{\text{maj-train}}\left({\hat{w}^{\mathsf{minnorm}}},9/10\right)\leq 1/200 (Lemma 4) which allows us to write

We have hence proved that the minimum-norm separator w^minnorm{\hat{w}^{\mathsf{minnorm}}} incurs high worst-group error with high probability under the specified conditions.

B.2.5 Proof of Proposition 3

We bound the expected worst-group error Errwg(w^minnorm)\text{Err}_{\mathsf{wg}}({{\hat{w}^{\mathsf{minnorm}}}}), which is the expected worst-group loss over the data distribution. Below, we lower bound the worst-group error Errwg(w^minnorm)\text{Err}_{\mathsf{wg}}({{\hat{w}^{\mathsf{minnorm}}}}) by bounding the error on a particular group: minority positive points which have label y=1y=1 and spurious attribute a=−1a=-1. The test error is the probability that a test example xx from this group gets misclassified, i.e. w^minnorm⋅x<0{\hat{w}^{\mathsf{minnorm}}}\cdot x<0.

In the last step, we rewrite for convenience xcore=y+σcorez1x_{\mathsf{core}}=y+\sigma_{\mathsf{core}}z_{1} and xspu=a+σspuz2x_{\mathsf{spu}}=a+\sigma_{\mathsf{spu}}z_{2}, where z1,z2∼N(0,1)z_{1},z_{2}\sim\mathcal{N}(0,1).

We use the properties of high-dimensional Gaussian random vectors to bound the quantity w^minnormnoise⋅xnoise{\hat{w}^{\mathsf{minnorm}}}_{\mathsf{noise}}\cdot x_{\mathsf{noise}}. Recall that w^minnormnoise{\hat{w}^{\mathsf{minnorm}}}_{\mathsf{noise}} can be written as

From the expression above, we see that Errwg(w^minnorm)\text{Err}_{\mathsf{wg}}({{\hat{w}^{\mathsf{minnorm}}}}) increases as the spurious component w^minnormspu{\hat{w}^{\mathsf{minnorm}}}_{\mathsf{spu}} increases. This is because in the minority group, the spurious feature is negatively correlated with the label.

We now compute a lower bound on δmaj-train(w^minnorm,γ2)\delta_{\text{maj-train}}\left({\hat{w}^{\mathsf{minnorm}}},\gamma^{2}\right), which is the number of majority points (where a=ya=y) that are “memorized.” Intuitively, we want to show that the fraction depends on w^spu−w^core\hat{w}_{\mathsf{spu}}-\hat{w}_{\mathsf{core}}. The more the core feature is used relative to the spurious feature, the larger fraction of points need to be memorized because the core feature is more noisy.

First, consider a separator w^\hat{w} with some core and spurious components w^core\hat{w}_{\mathsf{core}} and w^spu\hat{w}_{\mathsf{spu}}. Recall that w^noise=∑iα(i)(w^)xnoise(i)\hat{w}_{\mathsf{noise}}=\sum\limits_{i}\alpha^{(i)}(\hat{w}){x_{\mathsf{noise}}^{(i)}} and y(i)(w^⋅x(i))≥1y^{(i)}(\hat{w}\cdot x^{(i)})\geq 1 by the definition of separators. For a given w^core\hat{w}_{\mathsf{core}} and w^spu\hat{w}_{\mathsf{spu}}, we want to bound the fraction of majority points (a=ya=y) which can have α(i)(w^)<γ2σnoise2\alpha^{(i)}(\hat{w})<\frac{\gamma^{2}}{\sigma_{\mathsf{noise}}^{2}}. We focus only on separators with bounded memorization, i.e. those that satisfy α(i)(w^)2≤10nσnoise4{\alpha^{(i)}(\hat{w})}^{2}\leq\frac{10n}{\sigma_{\mathsf{noise}}^{4}}. Note that from Lemma 3, w.h.p., the mininum-norm separator w^minnorm{\hat{w}^{\mathsf{minnorm}}} satifies this condition.

We bound the above by bounding a related quantity: the fraction of points that are memorized in the training distribution in expectation. We then use concentration to relate it to the fraction of the training set.

Formally, we have fixed quantities w^core\hat{w}_{\mathsf{core}} and w^spu\hat{w}_{\mathsf{spu}}. The training set is generated as per the usual data generating distribution. As before, we are interested in separators on the training set. For any majority training point, the coefficient α(i)(w^)\alpha^{(i)}(\hat{w}) in a separator is a random variable. Since training point ii is separated, we have

From Lemma 8, Lemma 6, and the condition on α(i)(w^)\alpha^{(i)}(\hat{w}), this implies with high probability that

B.2.6 Proof of Proposition 1

The proposition follows directly from Lemma 1.

The constant γ1=u=1.3125\gamma_{1}=u=1.3125 and γ2=sσnoise2(2+c1)=2.61(2+c1)\gamma_{2}=s\sigma_{\mathsf{noise}}^{2}(2+c_{1})=2.61(2+c_{1}) for c1<1/2000c_{1}<1/2000. ∎

B.2.7 Proof of Proposition 2

To bound the norm for all wuse−core∈Wuse−corew^{\mathsf{use-core}}\in\mathcal{W}^{\mathsf{use-core}}, we provide a lower bound on the norm of the minimum-norm separator in the set Wuse−core\mathcal{W}^{\mathsf{use-core}}:

We bound the ∥wˉuse−core∥\|{\bar{w}}^{\mathsf{use-core}}\| in two steps:

We first provide a lower bound for ∥wˉuse−core∥\|{\bar{w}}^{\mathsf{use-core}}\| in terms of the fraction of training points memorized δtrain(wˉuse−core,γ2)\delta_{\text{train}}\left({\bar{w}}^{\mathsf{use-core}},\gamma^{2}\right) (defined formally below) in Corollary 2.

We then provide a lower bound for δtrain(wˉuse−core,γ2)\delta_{\text{train}}\left({\bar{w}}^{\mathsf{use-core}},\gamma^{2}\right) in Corollary 3.

We first formally define δtrain(w^,γ2)\delta_{\text{train}}\left(\hat{w},\gamma^{2}\right).

For a separator w^\hat{w} on training data {(x(i),y(i))}i=1n\{(x^{(i)},y^{(i)})\}_{i=1}^{n}, let δtrain(w^,γ2)\delta_{\text{train}}\left(\hat{w},\gamma^{2}\right) be the fraction of training examples that w^\hat{w} γ\gamma-memorizes:

For a separator w^\hat{w} with bounded α(i)(w^)2≤10nσnoise2\alpha^{(i)}(\hat{w})^{2}\leq\frac{10n}{\sigma_{\mathsf{noise}}^{2}} for all i=1,…,ni=1,\dots,n, its norm can be bounded with high probability as

Similarly to the proof of Lemma 2, the result follows bounded norms (Lemma 9), bounded dot products (Lemma 8), and the definition of δtrain(w^,γ2)\delta_{\text{train}}\left(\hat{w},\gamma^{2}\right) (Definition 4).

The result follows from applying Lemma 10 to wˉuse−core{\bar{w}}^{\mathsf{use-core}}, invoking the bounds on any individual component α(i)(wˉuse−core)\alpha^{(i)}({\bar{w}}^{\mathsf{use-core}}) obtained below in Lemma 11. ∎

Below, we bound α(i)(wˉuse−core)\alpha^{(i)}({\bar{w}}^{\mathsf{use-core}}), where α(i)(wˉuse−core)\alpha^{(i)}({\bar{w}}^{\mathsf{use-core}}) is the component of training point ii to the classifier wˉuse−core{\bar{w}}^{\mathsf{use-core}} via the representer theorem.

With high probability, i=1,…,ni=1,\dots,n, α(i)(wˉuse−core)\alpha^{(i)}({\bar{w}}^{\mathsf{use-core}}) can be bounded as follows.

As a first step, we upper bound the norm of wˉuse−core{\bar{w}}^{\mathsf{use-core}} by the norm of another separator wuse−core∈Wuse−corew^{\mathsf{use-core}}\in\mathcal{W}^{\mathsf{use-core}}, using the fact that wˉuse−core{\bar{w}}^{\mathsf{use-core}} is the minimum-norm separator in Wuse−core\mathcal{W}^{\mathsf{use-core}}. In particular, we construct a separator wuse−core∈Wuse−corew^{\mathsf{use-core}}\in\mathcal{W}^{\mathsf{use-core}} that “memorizes” all training points, of the following form:

This is analogous to the construction of wuse−spu∈Wuse−spuw^{\mathsf{use-spu}}\in\mathcal{W}^{\mathsf{use-spu}} (Lemma 1), and similar calculations can be used to obtain a suitable value α\alpha to ensure that wuse−corew^{\mathsf{use-core}} is a separator with high probability. We provide it below for completeness. We show that the following condition is sufficient to satisfy the margin constraints y(i)wuse−core⋅x(i)≥1y^{(i)}w^{\mathsf{use-core}}\cdot x^{(i)}\geq 1 for all i=1,…,ni=1,\dots,n with high probability:

for c1<1/2000c_{1}<1/2000. We obtain the above condition by applying Lemma 8 and Lemma 9 to the margin condition.

Thus, we can construct wuse−corew^{\mathsf{use-core}} by setting some constant ασnoise2≤2\alpha\sigma_{\mathsf{noise}}^{2}\leq 2.

Now that we have constructed wuse−corew^{\mathsf{use-core}}, we can bound the norm of the minimum norm separator wˉuse−core{\bar{w}}^{\mathsf{use-core}} by the norm of wuse−corew^{\mathsf{use-core}}. The following is true with high probability,

Finally, we bound α(i)(wˉuse−core)\alpha^{(i)}({\bar{w}}^{\mathsf{use-core}}) for all ii by bounding max⁡iα(i)(wˉuse−core)=Mσnoise2\max\limits_{i}\alpha^{(i)}({\bar{w}}^{\mathsf{use-core}})=\frac{M}{\sigma_{\mathsf{noise}}^{2}}. As we showed in the proof of Lemma 3, following is true with high probability:

Combined with the upper bound on ∥wˉuse−core∥22\|{\bar{w}}^{\mathsf{use-core}}\|_{2}^{2} (Equation (80)), we have

Since c1<1/2000c_{1}<1/2000, and n≥2000n\geq 2000, setting ασnoise2=2\alpha\sigma_{\mathsf{noise}}^{2}=2 yields M2≤10nM^{2}\leq 10n with high probability. ∎

Under the parameter settings of Theorem 2, with high probability,

for some constants c1<1/2000;c5,c6<1/1000c_{1}<1/2000;c_{5},c_{6}<1/1000 where Φ\Phi is the Gaussian CDF.

The result follows from applying Proposition 3 (which computes a bound on the majority fraction of points that is γ−\gamma-memorized) to wˉuse−core{\bar{w}}^{\mathsf{use-core}}, invoking Lemma 11, and plugging in wˉspuuse−core=0{\bar{w}}^{\mathsf{use-core}}_{\mathsf{spu}}=0. Note that when wˉspuuse−core=0{\bar{w}}^{\mathsf{use-core}}_{\mathsf{spu}}=0, δtrain(wˉuse−core,γ2)=δmaj-train(wˉuse−core,γ2)\delta_{\text{train}}\left({\bar{w}}^{\mathsf{use-core}},\gamma^{2}\right)=\delta_{\text{maj-train}}\left({\bar{w}}^{\mathsf{use-core}},\gamma^{2}\right). ∎

Finally, the above bound on δtrain(wˉuse−core,γ2)\delta_{\text{train}}\left({\bar{w}}^{\mathsf{use-core}},\gamma^{2}\right) translates to a bound on the norm ∥wˉuse−core∥\|{\bar{w}}^{\mathsf{use-core}}\| via simple algebra. For γ\gamma that satisfies 1−(1+c1)γ2−c5>01-(1+c_{1})\gamma^{2}-c_{5}>0:

Plugging the above lower bound into the bound on ∥wˉuse−core∥\|{\bar{w}}^{\mathsf{use-core}}\| from Corollary 2, we have

B.3 Underparameterized regime

For intuition, consider the following two sets of models, which are analogous to what we considered in Equation 5.3 in the main text for the overparameterized regime:

The first set Wuse−spu\mathcal{W}^{\mathsf{use-spu}} comprises models that use the spurious feature but not the core feature, and the second set Wuse−core\mathcal{W}^{\mathsf{use-core}} comprises models that use the core feature but not the spurious feature. Models in Wuse−spu\mathcal{W}^{\mathsf{use-spu}} that exclusively use xspux_{\mathsf{spu}} will have high training loss on the minorities since the minority points cannot be memorized. Due to upweighting the minorities, these models will have high reweighted training loss. On the other hand, models in Wuse−core\mathcal{W}^{\mathsf{use-core}} exclusively use the core features that are informative for the label yy across all groups. Hence they obtain reasonable loss across all groups and have smaller reweighted training loss than models in Wuse−spu\mathcal{W}^{\mathsf{use-spu}}.

We will show in this section that the population minimizer of the reweighted loss is indeed in Wuse−core\mathcal{W}^{\mathsf{use-core}} and bound the asymptotic variance of the reweighted estimator, leading to the final result in Theorem 1. Our approach is to study the asypmtotic behavior of the reweighted estimator when the number of data points n≫dn\gg d.

We first recap the data generating distribution (described in Section 5). x=[xcore,xspu]x=[x_{\mathsf{core}},x_{\mathsf{spu}}] where,

For pmajp_{\mathsf{maj}} fraction of points, we have a=ya=y (majority points) and for 1−pmaj1-p_{\mathsf{maj}} fraction of points, we have a=−ya=-y (minority points).

Let pmajp_{\mathsf{maj}} be the fraction of the majority group points and (1−pmaj)(1-p_{\mathsf{maj}}) be the fraction of minority points. In order to use standard results from the asymptotics of M-estimators, we rewrite the reweighted estimator (defined in Section 2) as the minimizer of the following loss over nn training points [xi,yi]i=1n[x_{i},y_{i}]_{i=1}^{n}.

We follow the standard steps of asymptotic analysis where we:

For the data distribution under study, the population minimizer w⋆w^{\star} that satisfies ∇Lrw(w⋆)=0\nabla\text{L}_{\textsf{rw}}(w^{\star})=0 is the following.

This is a very important property in the underparameterized regime: the population minimizer has the best possible worst-group error by only using the core feature and not the spurious feature.

The asymptotic distribution of the reweighted logistic regression estimator is as follows.

For σcore≥1\sigma_{\mathsf{core}}\geq 1, we have

We see that the asymptotic variance increases as pmajp_{\mathsf{maj}} increases. This is expected because the reweighted estimator upweights the minority points by inverse of group size. As these weights increase, the variance also increases. However, as we noted before, since the population minimizer has small worst-group error, for large enough training set size, we get small worst-group error since the asymptotic variance is finite (for fixed pmajp_{\mathsf{maj}}) and the estimator approaches the population minimizer.

We now prove Theorem 1 for the underparameterized regime, restated as Theorem 3 below.

In the underparameterized regime with N=0N=0, for pmaj=(1−12001)p_{\mathsf{maj}}=\bigl(1-\frac{1}{2001}\bigr), σcore2=1\sigma_{\mathsf{core}}^{2}=1, and σspu2=0\sigma_{\mathsf{spu}}^{2}=0, in the asymptotic regime with nmaj,nmin→∞n_{\mathsf{maj}},n_{\mathsf{min}}\rightarrow\infty, we have

We now put the two Propositions 5 and 4 together. We have w^corerw≥2−ϵ1\hat{w}^{\mathsf{rw}}_{\mathsf{core}}\geq 2-\epsilon_{1} and ∣w^spurw∣≤ϵ2|\hat{w}^{\mathsf{rw}}_{\mathsf{spu}}|\leq\epsilon_{2} for ϵ1,ϵ2<1/10\epsilon_{1},\epsilon_{2}<1/10, i.e the estimator is very close to the population minimizer. This follows from setting σcore,σspu,pmaj=nmajnmaj+nmin\sigma_{\mathsf{core}},\sigma_{\mathsf{spu}},p_{\mathsf{maj}}=\frac{n_{\mathsf{maj}}}{n_{\mathsf{maj}}+n_{\mathsf{min}}} to their corresponding values and setting n=nmaj+nminn=n_{\mathsf{maj}}+n_{\mathsf{min}} to be large enough. In order to compute the worst-group error, WLOG consider points with label y=1y=1 (labels are balanced in the population). For a point from the majority group, the probability of misclassification is as follows.

Similarly, for the minority group, the probability of misclassification is

Therefore, the worst-group error of w^rw\hat{w}^{\mathsf{rw}} can be bounded as.

where Φ\Phi is the Gaussian CDF. Substituting σcore=1,σspu=0,w^corerw≥2−ϵ1,∣w^spurw∣≤ϵ2\sigma_{\mathsf{core}}=1,\sigma_{\mathsf{spu}}=0,\hat{w}^{\mathsf{rw}}_{\mathsf{core}}\geq 2-\epsilon_{1},|\hat{w}^{\mathsf{rw}}_{\mathsf{spu}}|\leq\epsilon_{2} gives the required result that Errwg(w^rw)<1/4\text{Err}_{\mathsf{wg}}({\hat{w}^{\mathsf{rw}}})<1/4. In contrast, in the overparameterized regime where N≫nN\gg n, even for very large nn, the reweighted estimator has high worst-group error, as shown in Theorem 1. ∎

B.3.1 Complete proofs

We now provide the proofs for Proposition 4 and Proposition 5 which mostly follow from straightforward algebra. See 4

For convenience, we compute expectations over the majority and minority groups separately and express the population loss Lrw\text{L}_{\textsf{rw}} as the weighted sum of the two terms. Recall that we denote x=[xcore,xspu]x=[x_{\mathsf{core}},x_{\mathsf{spu}}].

We use the following expression for computing the population gradient.

Combining the definition of the reweighted loss and population losses (Equation 91 and Equation 102) with the gradient expression above gives the following.

Now we compute ∇Lrw(w⋆)=pmaj∇Lrw-maj(w⋆)+(1−pmaj)∇Lrw-min(w⋆)\nabla\text{L}_{\textsf{rw}}(w^{\star})=p_{\mathsf{maj}}\nabla\text{L}_{\textsf{rw-maj}}(w^{\star})+(1-p_{\mathsf{maj}})\nabla\text{L}_{\textsf{rw-min}}(w^{\star}). First we compute wrt the spurious attribute ∇spuLrw(w⋆)\nabla_{\textsf{spu}}\text{L}_{\textsf{rw}}(w^{\star}). For convenience, let c=2σcore2c=\frac{2}{\sigma_{\mathsf{core}}^{2}}.

Now we take the weighted combination of ∇spuLrw-maj(w⋆)\nabla_{\textsf{spu}}\text{L}_{\textsf{rw-maj}}(w^{\star}) and ∇spuLrw-min(w⋆)\nabla_{\textsf{spu}}\text{L}_{\textsf{rw-min}}(w^{\star}), based on the fraction of the majority and minority samples in the population, which makes the two terms cancel out.

Now we compute ∇coreLrw(w⋆)\nabla_{\textsf{core}}\text{L}_{\textsf{rw}}(w^{\star}).

Similarly, we get ∇coreLrw-min(w⋆)=0\nabla_{\textsf{core}}\text{L}_{\textsf{rw-min}}(w^{\star})=0 and hence proved that ∇coreLrw(w⋆)=0\nabla_{\textsf{core}}\text{L}_{\textsf{rw}}(w^{\star})=0. ∎

We use the following expression for computing the population gradient.

Recall the definition of the population majority and minority losses (Equation 102).

Like previously, we first compute the off-diagonal entries.

Now, we bound the diagonal entries. Recall that wspu⋆=0w^{\star}_{\mathsf{spu}}=0 and wcore⋆=cw^{\star}_{\mathsf{core}}=c where c=2σcore2c=\frac{2}{\sigma_{\mathsf{core}}^{2}}.

Finally, we calculate [∇2Lrw-maj(w⋆)]spu, spu[\nabla^{2}\text{L}_{\textsf{rw-maj}}(w^{\star})]_{\text{spu, spu}} as follows.