I S I MPORTANCE W EIGHTING I NCOMPATIBLE WITH I NTERPOLATING C LASSIFIERS ?
Importance weighting is a classic technique to handle distribution shifts.
However, prior work has presented strong empirical and theoretical evidence demonstrating that importance weights can have little to no effect on overparameterized neural networks.
Is importance weighting truly incompatible with the training of overparameterized neural networks?
Our paper answers this in the negative.
We show that importance weighting fails not because of the overparameterization, but instead, as a result of using exponentially-tailed losses like the logistic or crossentropy loss.
As a remedy, we show that polynomially-tailed losses restore the effects of importance reweighting in correcting distribution shift in overparameterized models.
We characterize the behavior of gradient descent on importance weighted polynomially-tailed losses with overparameterized linear models, and theoretically demonstrate the advantage of using polynomially-tailed losses in a label shift setting.
Surprisingly, our theory shows that using weights that are obtained by exponentiating the classical unbiased importance weights can improve performance.
Finally, we demonstrate the practical value of our analysis with neural network experiments on a subpopulation shift and a label shift dataset.
When reweighted, our loss function can outperform reweighted cross-entropy by as much as 9% in test accuracy.
Our loss function also gives test accuracies comparable to, or even exceeding, well-tuned state-of-the-art methods for correcting distribution shifts.
I NTRODUCTION
Machine learning models are often evaluated on test data which differs from the data that they were trained on.
A classic statistical technique to combat such distribution shift is to importance weight the loss function during training (Shimodaira, 2000).
This procedure upweights points in the training data that are more likely to appear in the test data and downweights ones that are less likely.
The reweighted training loss is an unbiased estimator of the test loss and can be minimized by standard algorithms, resulting in a simple and general procedure to address distribution shift.
Surprisingly, recent papers (Byrd & Lipton, 2019; Xu et al., 2020) have found that importance weighting is ineffective in the current deep learning paradigm, where overparameterized models interpolate the training data or have vanishingly small train loss.
In particular, Byrd & Lipton (2019) empirically showed that when no regularization is used, overparameterized linear and nonlinear models trained with the importance weighted cross-entropy loss ignore the importance weights.
Xu et al.
(2020) followed up and provided a theoretical justification for this observation in overparameterized linear and non-linear models.
To build intuition about why importance weighting fails, consider linear classifiers as an example.
Given linearly separable data ( x 1 , y 1 ) , . . .
, ( x n , y n ) ∈ R
d × {− 1 , 1 } , Soudry et al.
(2018) showed that if gradient descent is applied to minimize an exponentially-tailed classification loss ( (cid:80) i ∈ [ n ] ℓ exp ( y i x i ))
then the iterates converge in direction to the maximum margin classifier (cid:98) θ MM :=
arg min
∥ θ ∥ =1 { γ : y i x i · θ ≥ γ, for all i ∈ [ n ] } .
Xu et al.
(2020) showed that in this same setting, minimizing the importance weighted loss ( (cid:80) i ∈ [ n ] w i ℓ exp ( y i x i )) with gradient descent also results ∗ Equal contribution.
[Figure]
in convergence to the maximum margin classifier, regardless of the weights.
To see why, consider the special case where the weights ( w 1 , . . .
, w n ) are positive integers.
This reweighting is equivalent to simply repeating each datapoint w i times, and the maximum margin classifier over this “new dataset” remains unchanged.
Thus, invoking the original result by Soudry et al.
(2018) proves that the importance weights has no effect in correcting the distribution shift.
This result can be seen in
Figure 1 where we demonstrate this phenomenon in a simple toy problem.
Such evidence has led some to wonder if importance weighting is fundamentally incompatible with overparameterized interpolating models.
In this paper, we show that this is not the case.
We find that the culprit behind the ineffectiveness of importance weighting is the exponential tail of popular losses such as the cross-entropy or the logistic.
We propose altering the structure of the loss to have fatter, polynomially decaying tails instead.
We theoretically and empirically show that importance weights do correct for distribution shift under such losses even for overparameterized classifiers.
Our first contribution is to characterize the limiting direction of the iterates of gradient descent (its implicit bias) when minimizing reweighted polynomially-tailed losses with linear classifiers.
We show that this limiting direction is a function of both the datapoints as well as the importance weights, unlike the maximum margin classifier that only depends on the data (see the right half of
Figure 1).
Next, we analyze the generalization behavior of this classifier in a label shift setting.
We prove that when the weights are an exponentiation of the unbiased importance weights, the test error decays to zero in the large sample limit, regardless of the level of imbalance in the data.
In contrast, we prove that the maximum margin classifier test error in this same setting must be at least 1 / 8 .
Finally, we demonstrate the practical benefits of our framework by applying this approach to experiments with neural networks.
In both a label shift dataset (imbalanced binary CIFAR10), and a subpopulation shift dataset with spurious correlations (CelebA (Sagawa et al., 2019)), we find that reweighting polynomially-tailed losses consistently outperforms reweighted cross-entropy loss, as our linear theory suggests.
Additionally, poly-tailed loss with biased importance weights can perform comparably to, or better than, state-of-the-art methods distribution shift (Cao et al., 2019;
Ye et al., 2020; Menon et al., 2020; Kini et al., 2021) 1 .
R ELATED W ORK
Early work (Shimodaira, 2000; Wen et al., 2014) already warned against the potential ineffectiveness of importance weights on interpolating overparameterized models.
Shimodaira (2000) showed that when the model is well-specified, importance weights can fail to have an effect, and that the ordinary maximum likelihood estimate is asymptotically optimal.
Wen et al.
(2014) showed that when there is a zero-loss minimizer of an unweighted convex loss minimization problem, then it is also a minimizer of the (adversarially) reweighted loss as well.
Recent work (Byrd & Lipton, 2019;
Xu et al., 2020) has shown that importance weighting fails to have an effect on neural networks trained with gradient descent, though always in the setting of exponentially-tailed losses.
Sagawa et al.
(2019) demonstrated that reweighting can fail to have the desired effect when unregularized distributionally robust optimization (DRO) methods are used in conjunction with the cross-entropy loss.
They empirically showed that regularization is necessary to reap the benefits of reweighting, also observed by Byrd & Lipton (2019).
A recent line of work (Cao et al., 2019;
Ye et al., 2020; Menon et al., 2020; Kini et al., 2021) has introduced modifications to the logistic and cross-entropy losses to correct for distribution shift.
Cao et al.
(2019) and Menon et al.
(2020) proposed using additive corrections to the logits.
However, without regularization or early-stopping these corrections are ineffective since the additive corrections to the logits is analogous to importance weighting exponential-tailed losses.
Multiplicative logit corrections (Ye et al., 2020), possibly combined with additive corrections (Kini et al., 2021), have also been proposed.
Unlike the additive corrections, these methods do not converge to the max-margin classifier, but they also do not correspond to importance weighting algorithms. In our work, we focus on the question of whether importance weighting alone can correct for distribution shift, and show practical empirical benefits relative to multiplicative logit corrections.
Our work also connects to literature that has studied the implicit bias of gradient descent (Soudry et al., 2018; Ji & Telgarsky, 2019; Nacson et al., 2019).
Especially relevant is the work by Ji et al.
(2020) who relate the implicit bias of gradient descent with exponentially and polynomially-tailed losses for linear classifiers to a solution of a regularized loss minimization problem.
Finally, our generalization analysis draws from the growing literature focused on finite sample bounds on the test error of the maximum margin classifier in the overparameterized regime (Chatterji & Long, 2021; Muthukumar et al., 2021; Wang & Thrampoulidis, 2021; Cao et al., 2021).
S ETTING
We consider a distribution shift setting where the training samples { ( x 1 , y 1 ) , . . .
, ( x n , y n ) } ∈ R d × {− 1 , 1 } are drawn i.i.d.
from P train , and the test samples are drawn from a different distribution P test that is absolutely continuous with respect to P train .
Let f θ denote a classifier parameterized by θ .
Given a feature x , a classifier maps this feature to f θ ( x ) ∈ R .
In this paper we shall consider cases where the classifier is either linear (for our theory) or a neural network (for our experiments).
Our goal is to find a classifier f θ that minimizes the 0 - 1 loss with respect to the test distribution:
[Equation]
To handle the mismatch between P train and P test , we shall study importance weighting algorithms.
Given a datapoint ( x, y ) ∈ R d ×{− 1 , 1 } , the classical unbiased importance weight at ( x, y ) is given by the ratio of densities between the test and the train distributions P test ( x,y ) P train ( x,y ) .
Using these unbiased importance weights ensures that the reweighted training loss is an unbiased estimate of the test loss.
However, as noted above, past work has shown that interpolating classifiers trained with gradient descent on importance weighted exponentially-tailed losses (such as the logistic loss ℓ log ( z ) :
= log (1 + exp( − z )) , the exponential loss ℓ exp ( z ) := exp( − z ) , and the cross-entropy loss) ignore the importance weights.
For example, consider the case when the classifier is linear f θ ( x ) = x · θ , the weights are w 1 , . .
. , w n > 0 , and the reweighted loss function is (cid:98) L ( θ )
= (cid:80) ni
=
w i ℓ log ( y i x i · θ )
[Equation]
Xu et al.
(2020) showed that if the data is linearly separable then the iterates of gradient descent converge in direction to the ℓ 2 -maximum margin classifier,
[Equation]
Observe that the maximum margin classifier does not depend on the importance weights ( w 1 , . . . , w n ) and hence may suffer large test error when there is distribution shift.
Xu et al.
(2020) further showed that when separability assumptions hold, non-linear classifiers trained with gradient descent on exponentially-tailed losses are also unaffected by importance weights.
We initiate a study of polynomially-tailed losses in the distribution shift setting and show that they have improved behavior with respect to importance weighting even when the model is overparameterized.
Given parameters α > 0 and β ∈ R define the polynomially-tailed loss as follows:
[Equation]
where ℓ left is any loss function such that the overall loss function ℓ α,β is convex, differentiable and strictly decreasing.
Several natural choices for ℓ left include the scaled logistic ( c 1 log(1 + exp( − c 2 z )) ), exponential ( c 1 exp( − c 2 z ) ) or linear ( − c 1 z + c 2 ) losses.
Given a training dataset { ( x 1 , y 1 ) , . . .
, ( x n , y n ) } and a set of weights w 1 , . . .
, w n ≥
we let (cid:98) L α,β ( f θ ) := n (cid:88) i =
w i ℓ α,β ( y i f θ ( x i )) be the reweighted empirical loss on this dataset.
Notation.
Given a vector v , let ∥ v ∥ denote its Euclidean norm.
For any j ∈ N , we denote the set { 1 , . . .
, j } by [ j ] .
A random variable ξ is 1 -sub-Gaussian if for any λ ∈ R , E (cid:2) e λξ (cid:3) ≤ e λ 2 / 2 .
T HEORETICAL R ESULTS
In this section, we present several theoretical results that justify the use of polynomially-tailed losses in conjunction with importance weights to handle distribution shifts.
Our final result shows a strict separation between the performance of reweighted polynomially- and explonentially-tailed models under label shift.
We restrict our theoretical analysis to linear classifiers, f θ ( x ) = x · θ , for some θ ∈ R d .
First, in Section 4.1 we shall characterize the limiting direction of gradient descent on reweighted polynomially-tailed losses and show that this direction depends on both the weights as well as the datapoints.
Next, in Section 4.2, we upper bound the test error of this limiting solution in a label shift setting.
We also show that choosing weights that are obtained by exponentiating the unbiased importance weights helps in reducing the test error.
Finally, in this label shift setting, we show that the maximum margin classifier suffers an error that is at least 1 / 8 .
4. I MPLICIT B IAS OF G RADIENT D ESCENT ON P OLYNOMIALLY -T AILED L OSSES
We begin by presenting a result that characterizes the implicit bias of gradient descent on reweighted polynomially-tailed losses for linearly separable classification.
Understanding this situation is a key first step, as gradient descent for separable linear classification is often used as a simplified model to theoretically characterize the behavior of overparameterized neural networks (Soudry et al., 2018;
Ji & Telgarsky, 2019; Nacson et al., 2019; Lyu & Li, 2019; Ji & Telgarsky, 2020).
Given a linearly separable dataset ( x 1 , y 1 ) , . . .
, ( x n , y n ) , we let z i :=
y i x i .
We shall analyze the iterates of gradient descent with step-size η > 0 and initial iterate θ
(0) ∈
R d , for all t ∈ { 0 , 1 , . . .
} : θ ( t +1)
=
θ ( t ) − η ∇ (cid:98) L α,β ( θ ( t ) ) .
Define the direction
[Equation]
for [Equation] [Equation]
[Equation]
The following proposition characterizes the limiting direction of gradient descent iterates.
Proposition 4.1.
Suppose that the data is linearly separable.
For any α > 0 , β ∈ R , any initial point θ (0) ∈ R d , and for all small enough step-sizes η the direction of the gradient descent iterates satisfy the following:
[Equation]
The proof is presented in Appendix A.
This proof relies recent result by Ji et al.
(2020) that relates the limiting direction of gradient descent on the unregularized loss to the limiting solution of a normconstrained loss minimization problem, where the limit is taken with respect to the norm constraint.
Note that, unlike the maximum margin classifier, it is immediately clear that this limiting direction (cid:98) θ α depends on the weights w 1 , . . . , w n .
As one would intuitively expect, the direction (cid:98) θ α tries to achieve a larger margin z i · θ on points with larger weights w i .
This behavior is also apparent in the simulation in the rightmost panel in Figure 1, where upweighting points in the minority class helps to learn a classifier that is similar in direction to the Bayes optimal classifier for the problem.
Our limiting direction (cid:98) θ α has the interesting property that it does not depend on several quantities: the initial point θ (0) , the properties of ℓ left , and the “switchover” point β .
Linear separability ensures that in the limit, the margin on each point is much larger than β , and so the loss of each point is in the polynomial tail of part of ℓ α,β .
4. G ENERALIZATION A NALYSIS
The result in the previous subsection shows that the asymptotic classifier learnt by gradient descent, (cid:98) θ α respects importance weights.
However, this does not demonstrate that using polynomially-tailed losses leads to classifiers with lower test error compared to using exponentially-tailed losses.
To answer this more fine-grained question, we will need to perform a more refined analysis.
To do this we will make sub-Gaussian cluster assumptions on the data, similar to ones considered in the generalization analysis of the overparameterized maximum margin classifiers (Chatterji & Long, 2021;
Wang & Thrampoulidis, 2021; Liang & Recht, 2021; Cao et al., 2021).
In our setting, the features associated with each label are drawn from two different sub-Gaussian clusters.
We shall consider a label shift problem where the training data is such that the number of data points from the positive (majority) cluster will be much larger than the number of datapoints from the negative (minority) cluster.
The test datapoints will be drawn uniformly from either cluster.
Under these assumptions, we derive upper bounds on the error incurred by (cid:98) θ 1 , the limiting direction of gradient descent of polynomially tailed losses with α = 1 (Section 4.2.2).
We will find that its test error is small when the reweighting weights are set to cubic powers of the unbiased importance weights.
(A similar analysis can also be conducted for other α .)
In the same setting in Section 4.2.3, we will show that the maximum margin classifier must suffer large test errors.
4.2. S ETTING FOR G ENERALIZATION A NALYSIS
Here we formally describe the setting of our generalization analysis.
We let C ≥ 1 and 0 < (cid:101) C ≤denote positive absolute constants, whose value is fixed throughout the remainder of the paper.
We will use c, c ′ , c 1 , . . .
to denote “local” positive constants, which may take different values in different contexts.
The training dataset S :
= { ( x 1 , y 1 ) , . . .
, ( x n , y n ) } has n independently drawn samples.
The conditional distribution of the features given the label is
[Equation]
where µ 1 · µ 2 = 0 , ∥ µ 1 ∥ =
∥ µ 2 ∥ , U is an arbitrary orthogonal matrix, and q is a random variable such that: its entries are 1 -sub-Gaussian and independent, and E (cid:2)
∥ q ∥ 2 (cid:3) ≥ (cid:101) Cd .
We note that in past work that studied this setting (Chatterji & Long, 2021; Wang & Thrampoulidis, 2021; Cao et al., 2021), the cluster centers were chosen to be opposite one another µ 1 = − µ 2 .
Here, since our goal here is to study a label shift setting we consider the cluster centers µ 1 and µ 2 to be orthogonal.
This ensures that learning the direction of one of the centers reveals no information about the other center, which makes this problem more challenging in this setting.
Define P :=
{ i ∈ [ n ] : y i = 1 } to be the set of indices corresponding to the positive labels and
N := { i ∈ [ n ] : y
i = − 1 } to be the set of indices corresponding to the negative labels.
As stated above, we will focus on the case
where |P|
≫ |N| ≥ 1 .
Let τ := |P||N| ≥ 1 be the ratio between the number of positive and negative samples.
The test distribution P test is balanced.
That is, if ( x, y ) ∼ P test , then P [ y = 1] = P [ y = − 1] = 1 / 2 and x | y follows the distribution as described above.
We shall study the case where negative examples (which are in the minority) are upweighted.
Specifically, set the importance weights as follows: w i = 1 for i ∈ P and w i = w for i ∈ N .
Assumptions.
Given a failure probability 0 < δ < 1 /C , we make the following assumptions on the parameters of the problem:
Number of samples n ≥ C log(1 /δ ) .
Norm of the means ∥ µ ∥ 2 :=
∥ µ 1 ∥ 2 = ∥ µ 2 ∥ 2 ≥ Cn 2 log( n/δ ) .
Dimension d ≥ Cn ∥ µ ∥ 2 .
Our assumptions allow for large overparameterization, where the dimension d scales polynomially with the number of samples n .
4.2. U PPER B OUND FOR THE R EWEIGHTED P OLYNOMIALLY -T AILED L OSS C LASSIFIER
First, we shall prove an upper bound on the test error of the solution learnt by gradient descent on the reweighted polynomially-tailed loss.
Under the choice of weights described above, by equation (2)
[Equation] [Equation]
where z i =
y
i x i as defined previously.
The following theorem provides an upper bound on the test error of (cid:98) θ 1 and specifies a range of values for the weight w .
Theorem 4.2.
For any 0 < (cid:101) C ≤ 1 , there is a constant c such that, for all large enough C and for any 0 < δ < 1 /C , under the assumptions of this subsection the following holds.
If the weight [Equation] 2 ≤ w ≤ 2 τ 3 , then with probability at least 1 − δ , training on S produces a classifier (cid:98) θ 1 satisfying:
[Equation]
This theorem is proved in Appendix B.
To prove this theorem, we first show that the data is linearly separable under our assumptions and use the implicit bias results of Proposition 4.1. Then, our upper bound is equivalent to bounding the test error of the limiting iterate of gradient descent on our reweighted loss.
Next, we show that the sum of the gradients across each of the two groups remains roughly balanced throughout training under our choice of w .
This ensures that the classifier aligns well with both cluster centers µ 1 and − µ 2 which then proves our bound on the test error via a standard Hoeffding bound.
If we consider a regime where d and n are growing simultaneously, then the test error goes down to zero if the norm of the cluster means ∥ µ ∥ grows faster than d 1 / 4 , regardless of the level of imbalance in the training data as τ < n .
Briefly note that in setting with balanced data ( τ = 1 ), the bound on the test error here matches the bound obtained for the maximum margin classifier in (Chatterji &
Long, 2021; Wang & Thrampoulidis, 2021; Cao et al., 2021)
(although these bounds are not directly comparable as the setting here is slightly modified for a label shift).
The impossibility result by Jin (2009) shows that these previous results guarantee that learning occurs right up until the information theoretic frontier ( ∥ µ ∥ 2 = ω
( √ d ) ).
Finally, it is interesting to note that the theorem requires the weight w to scale with τ 3 instead of τ (the unbiased importance weight), which would ensure that the reweighted training loss is an unbiased estimate of the test loss.
In our proof, we find that in order to suffer low test error it is important to guarantee that the norm of the gradients across the two groups is roughly balanced throughout training.
We show that at any training iteration, the ratio of the sum of the derivative of the weighted losses in the majority and minority clusters scales as τw 1 / 3 .
Thus choosing w to scale with τ 3 ensures that the gradients are balanced across both groups.
We verify this in our simulations (Figure 2), and find that w = τ 3 ensures equal test error across both classes, reducing overall error.
4.2. L OWER B OUND FOR THE M AXIMUM M ARGIN C LASSIFIER
In the previous section we derived an upper bound to demonstrate that classifiers trained with polynomially-tailed losses achieve low test error.
We will now show that classifiers trained with exponentially-tailed losses have their error lower bounded by 1 / 8 in the same setting.
Theorem 4.3.
Let q ∼ N (0 , I d × d ) .
There exist constants c and c ′ such that, for all large enough
C and for any 0 < δ < 1 /C , under the assumptions of this subsection the following holds.
With probability at least 1 − δ , training on S produces a maximum margin classifier (cid:98) θ MM satisfying:
[Equation]
where Φ is the Gaussian cdf.
Furthermore, if the imbalance ratio τ ≥ c ′ √ n ∥ µ ∥ 2 √ d then with probability at least 1 − δ , TestError [ (cid:98) θ MM ] ≥ 18 .
This theorem is proved in Appendix C. Intuitively, the lower bound holds because when the imbalance is severe, the max-margin classifier essentially ignores the samples in the minority class and
[Figure]
T e s t
E rr o r ( % )
Test Error vs. Imbalance Ratio ( τ )
w = 1 w = τ w = τ 3 Max-margin     5 ρ
T e s t
E rr o r ( % )
Test Error vs. Importance Weight ( w = τ ρ )
[Figure]
Overall overfits to the majority class.
Ignoring these negative samples results in a relatively small alignment between the maximum margin classifier and the negative of the minority class center, which leads to high error on this class.
Together, these two theorems demonstrate that there is a strict gap between the performance of exponentially tailed and polynomially tailed losses under distribution shifts.
As a concrete example, consider the scaling where ∥ µ ∥ 2 =
d 12 + 140 , n =
d 15 and τ = d 320 ≤ n .
For all large enough d , all our assumptions are satisfied.
Now since, √ n ∥ µ ∥ 2 > √ τd , Theorem 4.2 guarantees that the test error of (cid:98) θ 1 → 0 as d → ∞ .
However, as τ = d 320 ≥ c ′ ∥ µ ∥ 2 (cid:112) n/d = c ′ d 540 , for all large enough d , the test error of the maximum margin classifier is guaranteed to be at least 1 / 8 .
This degradation of the test error with τ is also apparent in our simulations in Figure 2.
E MPIRICAL EVALUATION ON DEEP INTERPOLATING CLASSIFIERS
Inspired by our theoretical results, we use a polynomially-tailed loss with importance weights to train interpolating deep neural networks under distribution shift.
We use a polynomially-tailed loss with β = 1 and ℓ left ( z )
=
log(1 + e − z ) / log(1 + e − 1 ) , ensuring that ℓ α,β is continuous at transition z
= β when α
= 1 .
We train models on two image classification datasets, one with label shift and one with subpopulation shift, and include additional experiment details in Appendix E.
Though these nonlinear networks violate the assumptions of our theory, polynomially-tailed loss with importance weights consistently improves test accuracy for interpolating neural networks under distribution shift compared to importance-weighted cross-entropy loss.
Imbalanced binary CIFAR10.
We construct our label shift dataset from the full CIFAR dataset.
Similar to Byrd & Lipton (2019), we create a binary classification dataset out of the “cat” and “dog” classes.
We use the official test examples as our label-balanced test set of 1000 cats and 1000 dogs.
To form the train and validation sets, we use all 5000 cat examples but only 500 dog examples from the official train set, corresponding to a 10:1 label imbalance.
We then use 80% of those examples for training and the rest for validation.
We use the same convolutional neural network architecture as Byrd & Lipton (2019) with random initializations for this dataset.
Subsampled CelebA.
For our subpopulation shift dataset, we use the CelebA with spurious correlations dataset constructed by Sagawa et al.
This dataset has two class labels, “blonde hair” and “dark hair”.
Distinguishing examples by the “male” versus “female” attribute results in four total subpopulations, or groups.
The distribution shift in the dataset comes from the change in relative proportions among the groups between the train and test sets.
To reduce computation, we train on 2% of the full CelebA training set, resulting in group sizes of 1446, 1308, 468, and 33.
We construct our test set by downsampling the original test to get group-balanced representation in
[Figure]
s t
[Figure]
u r a c y
[Figure]
Imbalanced Binary CIFAR
[Figure]
(IW) consistently leads to gains when used with the polynomially-tailed loss across both datasets.
Exponentiating the weights further amplifies these gains for the polynomially-tailed loss.
IW has little effect for cross-entropy.the test set, resulting in 180 examples for each group.
Following Sagawa et al.
(2019), we use a
ResNet-50 with ImageNet initialization for this dataset.
5. I SOLATING THE EFFECTS OF IMPORTANCE WEIGHTS
Interpolating regime.
To understand the impact of polynomial losses in the interpolating regime, we train unregularized neural networks with SGD past 100% train accuracy and report their final accuracies on the test sets.
We compare models trained with our polynomially-tailed loss against those trained with the cross-entropy loss which has exponential tails.
Let w correspond to the unbiased importance weights.
We consider three weighting scenarios for both loss functions: no importance weighting at all ( No IW ) the classical unbiased importance weighting ( IW ( w )), and biased weighting where we exponentiate the weights, ( IW ( w c )), increasing the ratio of different weights.
The third setting is inspired by our theory in Section 4 that shows biased importance weights can improve performance for polynomially-tailed losses.
For these experiments, we fixed α = 1 and set the exponents to be the largest value that still allowed for stable optimization.
For CelebA, we exponentiate by 2 and for CIFAR10 we exponentiate by 3 / 2 .
We run 10 seeds for each experiment setting.
We compare the two losses via paired one-sided Welch’s t -tests, pairing runs with the same random seed.
We report the exact numbers in Appendix E.
Figure 3 shows the mean accuracy and the standard error for each of the three settings.
As indicated by our theory, we find that importance weighting with polynomially-tailed losses leads to statistically significant gains over cross-entropy in all cases.
Further we find that exponentiating weights boosts the performance of polynomially tailed losses, confirming our claims in Theorem 4.2.
However, exponentiating the weights leaves the performance of cross-entropy loss largely unchanged.
In the case of CelebA, we find that exponentiated reweighting with poly-tailed losses outperforms all other methods.
While in the case of Imbalanced Binary CIFAR10, we find a smaller gap between polynomially-tailed losses and cross-entropy, partially due to a substantially higher run-to-run variability in training.
This variability does not affect our main conclusion: exponentiated reweighting with poly-tailed losses still outperforms cross-entropy with significance p = 0 .
In Appendix D, we also compare the performance of polynomially-tailed losses with the crossentropy loss when we regularize training via early-stopping.
We find that even with regularization, poly-tailed losses give test accuracies better than or similar to cross-entropy across scenarios.
5. C OMPARING AGAINST PRIOR DISTRIBUTION SHIFT METHODS
To place our method’s empirical performance in the context of prior works, we extensively compare our method to state-of-the-art distribution shift correction methods.
On binary CIFAR10, we com- due to 10:1 imbalanced training data, combined with the fact that we train the models until they interpolate the training data.
These results for No IW differ slightly from those in Byrd & Lipton (2019) which used balanced training data and imbalanced test data.
Poly+IW
CE+US
LDAM
CDT
LA
VS 0 .0 .0 .0 .
T e s t
A cc u r a c y
Imbalanced Binary CIFAR
Poly+IW
CE+US
VS
Poly+DRO CE+DRO VS+DRO 0 .0 .0 .0 .0 .
T e s t
A cc u r a c y
Subsampled CelebA
Figure 4 shows that when α and the weights’ exponent are properly tuned, our poly-tailed loss with exponentiated weights gives accuracies comparable to or even exceeding those by these recently proposed methods . For both datasets, we found that cross entropy (CE) loss with undersampling (US), which discards data from overrepresented groups or classes to form a balanced training set, was a strong baseline.
On binary CIFAR10, our poly-tailed loss performs comparably to LA loss and is only 2% worse than VS loss in mean test accuracy with overlapping confidence intervals.
At first, we grid searched
VS loss across the published hyperparameter ranges from Kini et al.
, and it performed poorly (58.6% test accuracy).
More thorough grid search for VS loss gave optimal hyperparameters that were similar to those of LA loss, increasing test accuracy by 10%.
In sum, our poly-tailed loss matched or exceeded existing data imbalance adjustment methods (under published hyperparameters) and was beaten by 2% only after more extensively tuning the baselines.
On CelebA, our poly-tailed loss with IW achieves comparable test accuracy to VS loss.
When we use both loss functions with DRO, poly loss with DRO is better than VS loss with DRO by 3.5% on test accuracy and 8% better on worst group accuracy.
Poly-tailed loss with IW gives the best worst group accuracy out of all loss functions when not using DRO (see Appendix E). Such improved performance is surprising, as we designed polynomially tailed losses to optimize for static importance weights, rather than the worst case weights in DRO. The finding that poly-tailed losses with IW performs well on worst-group accuracy may be an interesting direction for future work
C ONCLUSION
Contrary to popular belief, importance weights are in fact compatible with the current paradigm of overparameterized classifiers, provided that the loss function does not decay exponentially .
The limiting behavior of an interpolating linear classifier trained with a weighted polynomially-tailed loss provably depends on the importance weights, unlike the maximum-margin classifier recovered by an exponentially decaying loss function.
Our theoretical analysis of generalization error further suggested that exponentiating the classic importance weights can be key to accurate distribution shift correction.
We empirically corroborated these theoretical intuitions, finding that weighted polynomially-tailed losses are also able to address distribution shift for interpolating neural networks.
Our work suggests that heavy-tailed losses together with importance weighting serve as a simple and general candidate for addressing distribution shift in deep learning.
E THICS S TATEMENT
We use publicly available datasets in our paper and do not foresee any potential harm arising from the use of our methods.
R EPRODUCIBILITY S TATEMENT
The full proofs of our theoretical results are presented in the appendix.
All experimental details and hyperparameters are presented in Appendix E.
A P ROOF OF P ROPOSITION 4.
First, we restate the statement of the proposition.
Proposition 4.1.
Suppose that the data is linearly separable.
For any α > 0 , β ∈ R , any initial point θ (0) ∈ R d , and for all small enough step-sizes η the direction of the gradient descent iterates satisfy the following:
[Equation]
Proof Recall that the loss ℓ α,β is assumed to be convex, strictly decreasing to zero and is differentiable.
Define the minimizer of the loss over a ball of radius R as follows
[Equation]
Under the assumptions of this proposition, we can invoke Theorem 1 by Ji et al.
(2020) to get that
[Equation]
We will therefore instead demonstrate that lim R →∞ θ R R = (cid:98) θ α to establish our claim.
First, note that the classifier θ R is the minimizer of loss in a ball of radius R , so there exists a Rwith
[Equation]
such that for all R > R 0 , each example is classified correctly by θ R and the margin ( z i · θ R ) on each example is at least β .
Therefore,
[Equation]
Thus, for any radius R > R 0 we have
[Equation]
Now taking the limit R → ∞ we get that
[Equation]
) α , s.t.,
z i · θ >(cid:41)
= (cid:98) θ α .
where ( i ) follows since for every R the function
[Equation]
is convex and continuous, and therefore
[Equation]
has a unique minimizer (since the objective function is strictly convex, and the constraint set is convex and compact), and is a continuous map by Berge’s maximum theorem (see, e.g., Beavis &
Dobbs, 1990, Theorem 3.6).
Thus, it is possible to switch the order of the limit and the arg min .
Equation ( ii ) follows since the data is linearly separable, so there exists a θ such that z i · θ > 0 for all i which has finite objective value.
Therefore,
[Equation]
which finishes our proof.
B P ROOF OF T HEOREM 4.
In this section, we will prove an upper bound on the test error (cid:98) θ 1 , which is the classifier learnt by gradient descent with the importance weighted Polynomially-tailed loss that decays as 1 /z .
By
Proposition 4.1, we know the choice of ℓ left and β does not affect the implicit bias of gradient descent, hence here, for the sake of convenience, we shall use the specific loss function
[Equation]
with β = 1 − wn < 0 .
It can be easily checked that this loss function is convex, differentiable and monotonically decreasing.
We want to bound the test error of (cid:98) θ 1 , however, in light of Proposition 4.1 we will instead bound the test error of the limiting iterate of gradient descent starting from θ (0) =
[Equation]
n (cid:0)
[Equation]
−
[Equation]
with step-size η > 0 (again by the implicit bias of gradient descent is not affected by the choice of the initial point):
[Equation]
where
[Equation]
Recall that if the step-size is small enough then Proposition 4.1 guarantees that lim t →∞ θ ( t )
∥ θ ( t ) ∥
= (cid:98) θ 1 .
In this section we will simply let ℓ denote ℓ 1 ,β and also use the shorthands ℓ ( t )
i
[Equation]
ℓ
[Equation]
:= ℓ ′ ( z i · θ
[Equation]
With this setup in place let us begin the proof.
All of the assumptions made in Section 4.2.1 are in scope here.
First we have a lemma that upper bounds the test error using Hoeffding’s inequality.
Lemma B.1.
There is a positive absolute constant c such that
[Equation]
This lemma follows by mirroring the proof of (Chatterji & Long, 2021, Lemma 9) which in turn follows by a simple application of Hoeffding’s inequality (Vershynin, 2018, Theorem 2.6.3).
Next we have a lemma that proves bounds on the norms of the samples, bounds the inner products between the samples and also shows that with high probability the data is linearly separable.
Recall that the constants C ≥ 1 and 0 < (cid:101) C ≤ 1 were defined above in Section 4.2.
Lemma B.2.
For all 0 < (cid:101) C ≤ 1 , there is a c ≥ 1 such that, for all large enough C , with probability 1 − δ over the draw of the samples the following events simultaneously occur:
For all k ∈ [ n ] d c
[Equation]
∥ 2 ≤ cd.
For all i ∈ P and j ∈ N , | z i
[Equation]
z j | ≤ c
[Equation]
d log( n/δ ) .
For all i ̸ = j ∈ [ n ] , | z i · z j | < c ( ∥ µ ∥ 2 + (cid:112) d log( n/δ )) .
For all k ∈ P , | µ 1 · z k − ∥ µ ∥ 2 | < ∥ µ ∥ 2 / 2 . 5.
For all k ∈ N , | ( − µ 2 ) · z k − ∥ µ ∥ 2 | < ∥ µ ∥ 2 / 2 .
For all k ∈ N , | µ 1 · z k | < c ∥ µ ∥ (cid:112) log( n/δ ) .
For all k ∈ P , | µ 2 · z k | < c ∥ µ ∥ (cid:112) log( n/δ ) .
The samples are linearly separable.
Proof We shall prove that each of the ten parts hold with probability at least 1 − δ/ 10 and take a union bound to prove our lemma.
Under the assumptions of this lemma, Parts (1), (3)-(5) and (8) can be shown to hold with the required probability by invoking (Chatterji & Long, 2021, Lemma 13).
We will show that Parts (2), (6) and (7) also hold with the required probability to complete the proof.
Proof of Part (2) : Note that for all i ∈ P , z i = µ 1 + Uq i , and for all i ∈ N , z i = µ 2 + Uq 2 .
Therefore, for any i ∈ P and j ∈ N , since µ 1 · µ 2 = 0 ,
[Equation]
We will show that each of these terms is small with high probability for all pairs i ∈ P and j ∈ N .
For the first two terms, note that by Hoeffding’s inequality (Vershynin, 2018, Theorem 2.6.3)
[Equation]
where the last inequality follows since the constant c ≥ 1 can be chosen to be large enough and because δ < 1 /C for a large enough constant C .
Therefore, by taking a union bound over all j ∈ N
[Equation]
Using an analogous argument we can also show that
[Equation]
Next, using (Chatterji & Long, 2021, inequality (15))
we get that
[Equation]
Combining inequalities (3)-(6) we get that for all i ∈ P and j ∈ N with probability at least 1 − δ/
[Equation]
where the last inequality follows since by assumption d ≥ Cn ∥ µ ∥ 2 and because C is large enough.
This completes the proof of this part.
Proof of Part (6) :
For any k ∈ N , z k = µ 2 + Uq k .
Recall that µ 1 · µ 2 = 0 , thus
[Equation]
Invoking inequality (4) proves that this part holds with probability at least 1 − δ/ 10 .
Proof of Part (7) :
This follows by an analogous argument as in the previous part.
We continue by defining a good event that we will work under for the rest of the proof.
Definition B.3.
If the training dataset S satisfies all the conditions specified in Lemma B.2 then we call it a good run .
Going forward in this section we shall assume that a good run occurs.
The following lemma provides some useful bound on the loss ratio at initialization and guarantees that the loss of example remains in the polynomially-tailed part throughout training.
Lemma B.4.
Recall that θ (0) =
8 w 2 / 3 n ( µ 1 − w 1 / 3 µ 2 ) , and that w i = 1 if i ∈ P and w i = w if i ∈ N .
On a good run, for all i ̸ = j ∈ [ n ]
[Equation]
Furthermore, if the step-size η is sufficiently small then on a good run, for all t ∈ { 0 , 1 , . . .
} and for all i ∈ [ n ]
[Equation]
Proof Consider an i ∈ P then
[Equation]
where ( i ) follows by Lemma B.2 and ( ii ) follows since ∥ µ ∥ 2 ≥ Cn 2 log( n/δ ) ≥ Cτ 2 log( n/δ ) ≥ C
2 2 / 3 w 2 / 3 log( n/δ ) for a large enough constant C .
Similarly, we also have the lower bound
[Equation]
Recall from the definition of the loss that we set β = 1 − nw .
Now again since ∥ µ ∥ 2 ≥ C 2 2 / 3 w 2 / 3 log( n/δ ) , and because we choose β = 1 − nw , we infer that
[Equation]
Since the margin of the point is larger than ( β − 1) therefore by the definition of the loss function above we have that
[Equation]
and hence
[Equation]
By mirroring the logic we can also prove that for all j ∈ N
[Equation]
[Equation]
By combining equations (7) and (8) we immediately get that
[Equation]
This proves the first part of the lemma.
To prove the second part we shall prove that the loss on each example remains smaller than 1 / 2 , which ensures ℓ ( t ) i is equal to the polynomial loss function.
Note that
[Equation]
This proves that ℓ (0) i ≤ 1 / 2 for all i ∈ [ n ] .
By (Ji et al., 2020, Lemma 2) we know that if the stepsize is small enough then the sequence { (cid:98) L ( θ ( t ) ) } is non-increasing.
Hence, we have that ℓ ( t ) i ≤ 1 /for all t ∈ { 0 , 1 , . . . }
and for all samples.
This wraps up our proof.
The next lemma lower bounds the inner product between the normalized gradient descent iterates, and µ 1 and µ 2 .
Lemma B.5.
Let c and c ′ be absolute constants.
Then, on a good run, for any t ∈ { 0 , 1 , . . .
} µ 1 ·
[Equation]
( t +
[Equation]
and
[Equation]
Proof Let us prove the first claim for the inner product with µ 1 .
The second claim regarding µshall follow analogously.
For any t ∈ { 0 , 1 , . . . } , by the definition of the gradient descent step, we have that
[Equation]
Note that by the definition of the loss function we have that − ℓ ′ ( t ) i ≥ 0 for all t and all i .
Thus by
Parts (1) and (6) of Lemma B.2 we get that
[Equation]
where c 1 is the constant from Lemma B.2.
Unrolling this inequality over t steps we have that
[Equation]
On the other hand
[Equation]
by the triangle inequality we know that
[Equation]
Now note that
[Equation]
where ( i ) follows by using Part (1) and Part (3) of Lemma B.2, ( ii ) follows since − ℓ ′ ( t )
j is positive for all j ∈ [ n ] , and ( iii ) follows since by assumption d ≥ Cn ∥ µ ∥ 2 and ∥ µ ∥ 2 ≥ Cn 2 log( n/δ ) for a large enough constant C .
Hence we have that
[Equation]
c
[Equation]
P
[Equation]
i ∈P − ℓ ′ ( t ) i .
Similarly, one can also show that
[Equation]
Applying these bounds in inequality (11) we get that
[Equation]
Therefore
[Equation]
unrolling this bound over t steps we find that
[Equation]
Thus, combined with inequality (10) we get that,
[Equation]
which completes the proof of the first part of the lemma.
The second part follows by an identical argument.
Next, we prove a lemma that shows that throughout training the ratio between the losses between any two samples remains bounded.
Lemma B.6.
There is a positive absolute constant c ≥ 1 such that the following holds for all large enough C , and all small enough step-sizes η and for any τ 3 2 ≤ w ≤ 2 τ 3 .
On a good run, for all t ∈ { 1 , 2 , . . . }
and all i ̸ = j ∈ [ n ] ℓ ( t ) i ℓ
[Equation]
t )
j ≤ c (cid:18) w j w i (cid:19) 1 /.
Proof Let c 1 ≥ 1 be the constant c from Lemma B.2 above.
We shall show that the choice c = max (cid:8) 8 , 2(4 c 21 ) 1 / 3 (cid:9) suffices.
We shall prove this via an inductive argument.
For the base case, at step t = 0 , we know that by
Lemma B.4 that the ratio between the losses of sample i and j is upper bounded by 8 ( w j /w i ) 1 / 3 .
Now, we shall assume that the inductive hypothesis holds at an arbitrary step t > 0 and prove that it holds at step t + 1 .
Without loss of generality, we shall analyze the ratio between the losses of the samples with indices i = 1 and j = 2 .
A similar analysis shall hold for any other pair.
Define G t :=
ℓ ( t ) 1 , H t := ℓ ( t ) 2 ,
A t :=
H t /G t .
Note that,
[Equation]
where ( i ) follows since − ℓ ′ ( t )
k
= ( ℓ ( t ) k ) 2 as the loss of each example is always in the polynomial tail of the loss by Lemma B.4.
Therefore, we have that
[Equation]
Now since the step-size η is chosen to be small enough, | z i · z j | ≤ c 1 d (by Part ( ?? ) of Lemma B. and by the assumption on d ) and because the losses are all smaller than a constant by Lemma B.4, the following approximations hold
[Equation]
and thus,
[Equation]
Let us further upper bound the RHS as follows
[Equation]
[Table]
[Equation]
where ( i ) follows since for all i ∈ [ n ] , d/c 1 ≤ ∥ z i ∥ 2 ≤ c 1 d and for any j ̸ = k , | z j · z k | ≤ c 1 (cid:16)
∥ µ ∥ 2 + (cid:112) d log( n/δ ) (cid:17) by Lemma B.2.
Continuing we get that,
[Equation]
With this upper bound in place, consider two cases.
Case 1 ( A 3 t ≤ 4 c 2 1 w 1 w 2 ): Using inequality (14) we know that
[Equation]

[Equation]
Now the loss on each example is less than the total initial loss 1 / 2 (see equation (9)) and therefore,
[Equation]
where ( i ) follows by choosing the step-size η to be small enough and because A t ≤ (cid:16) 4 c 21 w 1 w 2 (cid:17) 1 / 3 in this case, and ( ii ) follows by the choice of constant c ≥ 2(4 c 21 ) 1 / 3 from above.
Case 2 ( 4 c 21 w 1 w< A 3 t ≤ c 3 w 1 w 2 ):
In this case again by inequality (14)
[Equation]
Continuing we find that,
[Equation]
[Table] [Equation] [Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table] [Equation] [Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
where ( i ) follows by the inductive hypothesis which guarantees that ℓ ( t )
k
[Equation]
t
[Equation]
1 ≤ c ( w 1 w k ) 1 / 3 ≤ cw 1 / 3 , ( ii ) follows since w k = 1 if k ∈ P and w k =
w if k ∈ N .
Inequality ( iii ) follows since w < 2 τ 3 and since |P| ≤ n , and finally ( iv ) follows since in this case
A 3 t > 4 c 21 w 1 w 2 .
Now since by assumption the dimension
[Equation]
for a large enough constant C .
Hence, we have that A t +1 ≤
A t ≤ c (cid:16) w 1 w 2 (cid:17) 1 / 3 in this case.
Recall that since we assumed the inductive hypothesis to hold, the two cases analyzed above are exhaustive.
This completes our proof.
The next lemma uses the loss ratio bound that we established to show that the difference between the gradient of the losses over the positive cluster and the negative cluster is small at any iteration.
Lemma B.7.
For any positive ˜ c , there exists a 0 < c < 1 such that, for all large enough C , if the step-size η is sufficiently small and τ 3 2 ≤ w ≤ 2 τ 3 then on a good run, for any t ∈ { 0 , 1 , . . . }
[Equation]
and (cid:88)
[Equation]
Proof We begin by proving the first part of the lemma.
Note that since [ n ] = P ∪ N to prove the first part it suffices to instead show that
[Equation]
[Equation] [Equation]
[Equation] [Equation]
1 −
[Equation] [Equation]
that c 1 ≥
[Equation] [Equation]
since
∥ µ ∥ ≥ (cid:112) Cn 2 log( n/δ ) , where C is a large enough constant) .
Since C is large enough, we now choose the constant 0 < c < 1 to be such that (1 − c ) /
( c 1 ( c + ˜ c/ √ C )) is at least (2) 1 / 3 .
This proves the first part of the lemma.
To prove the second part of the lemma, note that again since [ n ] =
P ∪ N it suffices to show that
[Equation]
where the last implication follows by the choice of c from above.
This completes the proof.
We now have all the pieces required to prove our main theorem.
Recall its statement.
Theorem 4.2.
For any 0 < (cid:101) C ≤ 1 , there is a constant c such that, for all large enough C and for any 0 < δ < 1 /C , under the assumptions of this subsection the following holds.
If the weight τ 3 2 ≤ w ≤ 2 τ 3 , then with probability at least 1 − δ , training on S produces a classifier (cid:98) θ 1 satisfying:
[Equation]
Proof First, by Part (8) of Lemma B
[Equation]
2 we know that the data is linearly separable.
Thus, by
Proposition 4.1 we know that
[Equation]
Given this equivalence
[Equation]
by Lemma B
[Equation]
1 we know that
[Equation]
We shall now establish lower bounds on lim t →∞ θ ( t ) · µ 1 ∥ θ ( t ) ∥ and lim t →∞ θ ( t ) · µ 2 ∥ θ ( t ) ∥ to obtain the desired bound on the test error.
Let us lower bound lim t →∞
[Equation]
t ) ∥ .
The bound on lim t →∞ θ ( t ) · µ 2 ∥ θ ( t ) ∥ shall follow by exactly the same logic.
By Lemma B.5 we know that
[Equation]
16) where ( i ) follows since µ 1 · θ (0) is bounded and ∥ θ ( t +1)
∥ → ∞ by (Ji et al., 2020, Lemma 2).
We will now show that the first limit in RHS equals 1 .
To do this, first note that
[Equation]

 .
Now we will show that
[Equation]
First note that
[Equation]
≥ 0 , since − w i ℓ
[Equation]
≥ 0 , so to show that this limit equals 0 , it suffices to show that c 1 η √ d
[Equation]
[Equation] [Equation]
w i
[Equation]
grows unboundedly as t → ∞ .
Using inequality (12) from above we get that,
[Equation]
The norm ∥ θ (0) ∥ is finite and we know that ∥ θ ( t ) ∥ → ∞ by (Ji et al., 2020, Lemma 2), therefore
[Equation]
must grow unboundedly.
This proves that
[Equation]
as claimed.
This combined with inequality (16) yields the bound
[Equation]
where ( i ) follows by invoking Lemma B.7 and ( ii ) follows since |P| ≥ n/ 2 .
As stated above, using a similar argument we can also show that lim
[Equation]
Plugging these lower bounds into inequality (15) completes our proof.
C P ROOF OF T HEOREM 4.
In this section we will prove a lower bound on the test error of the maximum margin linear classifier (cid:98) θ MM .
Here we will work with the exponential loss
[Equation]
Define the loss (cid:98) L ( θ )
=
(cid:80) i ∈ [ n ] ℓ ( y i x
⊤ i θ ) =
(cid:80) i ∈ [ n ] ℓ ( z ⊤ i θ ) .
For a step-size η and initial iterate θ (0) =
(this choice of initial point is for the sake of convenience, it does not affect the implicit bias of gradient descent) for any t ∈ { 0 , 1 , . . . }
[Equation]
be the iterates of gradient descent.
We let ℓ ( t ) i be shorthand for ℓ ( z i · θ ( t ) ) and therefore,
[Equation]
The results by Soudry et al.
(2018) guarantee that for a small enough step-size η the direction of the iterates of gradient descent lim t →∞ θ ( t )
∥ θ ( t ) ∥
= (cid:98) θ MM .
Therefore, we will instead prove a lower bound on the asymptotic iterates of gradient descent.
As we did in the proof of Theorem 4.2, going forward we will assume that a good run occurs (see
Definition B.3), which guarantees that all of the conditions specified in Lemma B.2 are satisfied by the training dataset S .
With the setup in place, we shall now prove this theorem in stages.
Throughout this section the assumptions stated in Section 4.2.1 shall remain in force.
We begin with a lemma that shows that the margin of the maximum margin classifier scales with (cid:112) d/n .
Lemma C.1.
There is an absolute constant c such that, on a good run, for all large enough C , for all i ∈ [ n ]
[Equation]
Proof We will prove this result by constructing a unit vector ϕ with a margin that scales with (cid:112) d/n .
This immediately implies that the maximum margin classifier must also attain this margin on all of the points.
Define ϕ to be as follows
[Equation]
We will first bound the norm of the denominator as follows
[Equation]
(cid:88)
[Equation]
where ( i ) follows by Lemma B.2 and ( ii ) follows since d ≥ Cn
∥ µ ∥ 2 ≥ C 2 n 3 log( n/δ ) where recall C is sufficiently large.
Now we lower bound the margin between numerator of v and z k for any k ∈ [ n ]
[Equation]
where ( i ) again follows by invoking Lemma B.2 and by the assumption on d ,
Combining inequalities (17) and (18) yields that for any k ∈ [ n ]
[Equation]
This proves the result.
The next lemma provides control over the rate at which the norm of iterates θ ( t ) grows late in training.
Lemma C.2.
There is an absolute constant c such that, for all large enough C , if the step-size η is sufficiently small then on a good run, there exists a t 0 such that for all t ≥ t
[Equation]
Proof By the definition of gradient descent
[Equation]
Now we know that θ ( t )
∥ θ ( t ) ∥
→ (cid:98) θ MM .
Also note that in the previous lemma (Lemma C.1)
we showed that for all i ∈ [ n ]
[Equation]
n.
Therefore, there exists a iteration t 1 such that for all t ≥ t 1 and all i ∈ [ n ]
[Equation]
Continuing from (19), for any t ≥ t
[Equation]
Taking square roots we get that for any t ≥ t
[Equation]
Further by (Ji et al., 2020, Lemma 2) we know that ∥ θ ( t ) ∥ → ∞ , so there exists a t 2 such that for all t ≥ t 2 , ∥ θ ( t ) ∥ ≥ c 1 η √ nd .
Thus, for t ≥ t 2 , we have
[Equation]
where the last inequality follows since the initial loss is equal to n , as θ (0)
= 0 , and the total loss is decreasing again by (Ji et al., 2020, Lemma 2)
if the step-size is small enough.
It is easy to check that for any 0 ≤ x ≤√ 1 + x ≥ 1 + x 4 .
Thus, combining inequalities (20) and (21) we get that for all t ≥ t 0 = max { t 1 , t 2 }
[Equation]
which completes our proof.
Continuing we will show that throughout training the ratio of the losses between the different examples are bounded by a constant.
This ensures that each example roughly “influences” the gradient update by the same amount in each step.
However, since the number of points from the positive cluster is larger, the gradient update shall overall be more highly correlated with the mean of the majority positive center µ 1 than the mean of the minority negative center µ 2 .
The proof is identical to the proof of Lemma 11 by Chatterji & Long (2021).
However, since our setting is slightly different to the setting studied in that paper we reprove the result here.
Lemma C.3.
There is an absolute constant c such that, for all large enough C , and all small enough step sizes η , on a good run, for all iterations t ∈ { 0 , 1 , . . . }
and all i, j ∈ [ n ]
[Equation]
Proof First note that (cid:98) L ( θ (0) )
= (cid:80) i ∈ [ n ] ℓ (0) i = n and since step-size η is small enough training loss is non-increasing by (Ji et al., 2020, Lemma 2).
Let c 1 be the constant c ≥ 1 from Lemma B.2.
We will show that c = 4 c 21 suffices.
We shall prove this via an inductive argument.
For the base case, at step t = 0 , we know that θ (0) =
0 , therefore the loss on all of the samples is equal to 1 .
Now, we shall assume that the inductive hypothesis holds at an arbitrary step t > 0 and prove that it holds at step t + 1 .
Without loss of generality, we shall analyze the ratio between the losses of the samples with indices i = 1 and j = 2 .
A similar analysis shall hold for any other pair.
Define G t :=
ℓ ( t ) 1 , H t := ℓ ( t ) 2 ,
A t :=
H t /G t .
The ratio between these losses at step t + 1 is
[Equation]
Now note that by Lemma B.2, for all i ̸ = j ∈ [ n ] , d/c 1 ≤ ∥ z i ∥ 2 ≤ c 1 d and | z
i · z j | ≤ c 1 (cid:16) ∥ µ ∥ 2 + (cid:112) d log( n/δ ) (cid:17) , and therefore,
[Equation]
where ( i ) follows since by the inductive hypothesis ℓ ( t ) k /G t ≤ c = 4 c 21 , ( ii ) follows since by assumption d ≥
Cn ∥ µ ∥ 2 ≥ C 2 n 3 log( n/δ ) , and ( iii ) follows since C is sufficiently large.
Now consider two cases.
Case 1 ( A t ≤ 2 c 21 ): By inequality (22)
[Equation]
where the last inequality follows if the step-size η is sufficiently small.
Case 2 ( 2 c 21 ≤ A t ≤ 4 c 21 = c ):
Again by inequality (22)
[Equation]
Thus, we have shown that A t +1 ≤ 4 c 21 =
c in both cases.
Since we assumed the induction hypothesis to hold at step t , these two cases are exhaustive, and hence the induction is complete.
The next lemma proves an upper bound on the difference between the inner product between θ ( t +1) · µ 2 and the corresponding inner product at iteration t .
Since we start at θ (0) , unrolling this over t steps gives us an upper bound on inner product θ ( t ) · µ 2 for any t ≥ 0 .
Lemma C.4.
There is an absolute constant c such that, for all large enough C , if the step-size η is sufficiently small then on a good run, for all t ∈ { 0 , 1 , . . . }
[Equation]
Proof By the of
[Equation]
where ( i ) follows by Lemma B.2 and ( ii ) follows by the loss ratio bound in Lemma C
[Equation]
[Equation]
Since by assumption ∥ µ ∥ 2 ≥ Cn 2 log( n/δ )
[Equation]
we infer that
[Equation]
Thus,
[Equation]
wrapping up our proof.
With these lemmas in place we are now ready to prove our result.
Let us restate it here.
Theorem 4.3.
Let q ∼ N (0 , I d × d ) .
There exist constants c and c ′ such that, for all large enough
C and for any 0 < δ < 1 /C , under the assumptions of this subsection the following holds.
With probability at least 1 − δ , training on S produces a maximum margin classifier (cid:98) θ MM satisfying:
[Equation]
where Φ is the Gaussian cdf.
Furthermore, if the imbalance ratio τ ≥ c ′ √ n ∥ µ ∥ 2 √ d then with probability at least 1 − δ , TestError [ (cid:98) θ MM ] ≥ 18 .
Proof The test error for (cid:98) θ MM is
TestError [ (cid:98) θ MM ]
[Equation]
where Φ is the Gaussian cumulative distribution function.
With this inequality in place, we want to prove an upper bound on (cid:16)(cid:98) θ MM · ( − µ 2 ) (cid:17) 2 .
Now, since
[Equation]
MM , it suffices to prove an upper bound on
[Equation]
2 instead.
To do this, going forward let us assume that a good run (see Definition B.3) occurs.
Lemma B. guarantees that this happens with probability at least 1 − δ .
Let t 0 be the constant from Lemma C.2, then by Lemma C.4 we have that for any t > t
[Equation]
where we define ψ :=
[Equation]
On the other hand, by repeatedly applying Lemma C.2 we get that
[Equation]
Furthermore, since ∥ θ ( t ) ∥ → ∞ (by Ji et al., 2020, Lemma 2) and ∥ θ ( t +1)
[Equation]
(by Part 1 of Lemma B.2)
[Equation]
we can conclude that (cid:80) ts = t 0 (cid:80) i ∈ [ n ] ℓ ( s ) i → ∞ .
Thus combining inequalities (24) and (25) we get that
[Equation]
Plugging this upper bound into inequality (23) completes the proof.
D E ARLY - STOPPING BEFORE MODELS INTERPOLATE
Prior works (Sagawa et al., 2019; Byrd & Lipton, 2019) found that adding regularization such as strong L2 regularization and early stopping can partially restore the effects of importance weights at the cost of not interpolating the training set.
As such, we compare the performance of our polynomially-tailed loss against cross-entropy when models are early-stopped, using the same settings as before.
For each run here, we select the model checkpoint with the best weighted validation accuracy and evaluate the checkpoint on the test set.
Figure 5 compares the test accuracies of the early-stopped models (IW-ES ( w ), IW-ES ( w c )) against reweighted models trained past interpolation (IW ( w )).
Consistent with prior works, we see that early stopping as a form of regularization improves the test accuracies of both loss functions when used with importance weights.
Our polynomially-tailed loss
[Figure]
Imbalanced Binary CIFAR
[Figure]
gives test accuracies that are better than or similar to cross-entropy in all weighted loss scenarios.
The gain over cross-entropy is statistically significant in the binary CIFAR10 runs.
On subsampled
CelebA, the polynomially-tailed loss with squared weights attains the highest mean test accuracy out of all settings.
E E XPERIMENTAL DETAILS E. H YPERPARAMETERS E.1. F OR S ECTION 5.
Imbalanced binary CIFAR10 experiments.
We use the same convolutional neural network architecture with random initialization as (Byrd & Lipton, 2019).
We train for 400 epochs with SGD with a batch size of 64.
We chose hyperparameters that resulted in stable training for each setting.
We use a constant 0.001 learning rate with 0.9 momentum for “No IW”, “IW ( w )”, and “IW-ES ( w )”.
We use a constant 0.008 learning rate with no momentum for “IW ( w 3 / 2 )”, and “IW-ES ( w 3 / 2 )”.
Subsampled CelebA experiments.
We use a ResNet50 architecture with ImageNet initialization as done in (Sagawa et al., 2019).
Due to the large dataset size, we use only 2% of the full training dataset as mentioned in the main text.
Reducing the computation requirements allows us to perform statistical evaluations of the results over sufficiently many seeds.
We train for 100 epochs with SGD with a batch size of 64.
We chose hyperparameters that resulted in stable training for each setting.
We use a constant 0.0004 learning rate with 0.9 momentum for all settings.
E.1. F OR S ECTION 5.
To fairly evaluate every method, we grid search the hyperparamters for each method extensively.
We kept the same architectural setup as before, but adjust the optimization settings such that the models train until they interpolate the training data.
Imbalanced binary CIFAR10 experiments.
• Cross entropy + Class Undersampling: We use the same hyperparameters as Cross entropy on the full dataset and average results over random undersamplings plus initializations • LDAM:
Following the original paper Cao et al.
(2019), we grid search the margin hyperparameter over [0 . 1 , 0 . 2 , 0 . 3 , 0 . 4 , 0 . 5 , 0 . 6 , 0 . 7 , 0 . 8 , 0 . 9 , 1 . 0] .
We found 1 .
to be the best.
• CDT Loss, LA Loss, VS Loss:
Following Kini et al.
(2021), we tune τ and γ with τ = 0 being CDT loss and γ = 0 being LA Loss.
We grid search across ( τ, γ ) ∈ [0 . 0 , 0 . 5 , 1 . 0 , 1 . 5 , 2 . 0 , 2 . 5 , 3 . 0] ×
We found τ = 3 to be the best for LA loss, γ = 0 .
5 to be the best for CDT loss, and τ = 3 , γ = 0 .
3 to be the best
for VS Loss.
Unlike the original paper (Kini et al., 2021), we found that the best hyperparameters of VS loss are similar to those of LA Loss.
We initially followed the recommendations of Kini et al.
and grid searched over ( τ, γ ) ∈ [0 . 5 , 0 .
75 , 1 . 0 , 1 . 25 , 1 . 5] × [0 . 05 , 0 . 1 , 0 . 15 , 0 . 2] , but it gave VS loss poor performance (mean test acc was only 58.6% using the best hyperparameters τ = 1 , γ = 0 . 05 ).
Hence, we did a more extensive tuning afterwards.
• Poly-tailed Loss: We grid search over ( α, c )
∈
[Table] [Table]
[Table] [Table]
[Table] [Table]
× [1 . 0 , 1 . 5 , 2 . 0 , 2 . 5 , 3 . 0] .
We found α = 2 and exponent c = 3 to be the best.
Subsampled CelebA. • Cross entropy + Group Undersampling:
We use the same hyperparameters as Cross entropy on the full dataset and average results over random undersamplings plus initializations.
• VS Loss: We follow the tuning procedure in Kini et al.
(2021) for group-sensitive VS Loss and grid search over γ ∈ [0 . 1 , 0 . 2 , 0 . 3 , 0 .
We found γ = 0 .
4 to be the best.
• Poly Loss: We grid search over ( α, c ) ∈ [1 , 2 , 3] × [1 . 0 , 1 . 5 , 2 . 0 , 2 . 5 , 3 . 0] .
We found α =and exponent c = 2 .
5 to be the best.
• Cross entropy + DRO: We
tune the adversarial step size η q over
We found η q = 0 .
05 to be the best.
• VS Loss + DRO: We used the best γ from VS Loss alone and η q = 0 .
for DRO.
• Poly Loss + DRO: We used the best α from Poly Loss alone and η q = 0 .
for DRO.
E. I MPORTANCE WEIGHT COMPUTATION .
Here we explain in greater detail how we compute the importance weights.
Note that the scale of the importance weights is important in ensuring stable training.
Let there be G groups of subpopulations in the training and testing set.
G = 2 for binary CIFAR10 and G = 4 for CelebA. Let n 1 , . . .
, n G be the counts of each group in the training set.
Let n be the total number of training examples.
In our case, the test set is balanced across the groups.
Our procedure for computing weights is:
For each example i that belongs to group g , compute the unbiased weight: w i ← 1 /n g . 2.
Exponentiate the weights by c if necessary: w i ← w ci .
No importance weighting corresponds to c = 0 .
Unbiased importance weighting corresponds to c = 1 . 3.
To adjust for the scale of weights, normalize by the average exponentiated weight across the full training set: w i ← w i / (cid:80) nj
=1 w i .
Only normalizing across each minibatch can result in unstable training, especially when a minibatch contains no representatives from a group.
E. E ARLY - STOPPING METRIC .
We use the checkpoint with the highest importance weighted validation accuracy when early stopping.
We compute separate importance weights of the validation set with respect to the test set, and reweight the validation accuracy using unbiased weights, even when the training weights are biased.
Our procedure allows for the situation where the validation set is not exactly the same distribution as the training set.
[Table]
Setting Summary of method
Best settings
Meantestacc
Stderr
Cross Entropy
N/A 60.5% 0.8%
Cross Entropy + IW
Classical importance weighting
N/A 57.8% 0.4%
Cross Entropy + Class undersampling
Balance the classes by throwing away majority data
N/A 58.5% 1.4%
LDAM
Add class dependent constants to logits largest margin=1.
CDT
Multiply class dependent constants by logits γ =
LA Loss
Add class dependent constants to logits τ =66.9% 2.1%
VS Loss (best setting around range suggested by paper)
Multiply by and add class dependent constants to logits τ = 1 , γ =
VS Loss (our own tuning)
Multiply by and add class dependent constants to logits τ = 3 , γ =
Poly-tailed Loss
Change loss function and exponentiate importance weights α = 2 , w67.3% 0.8%
Setting
Method summary
Best
[Table]
Meantestacc
[Table]
Worstgrouptestacc
[Table]
Entropy
N/A
[Table] [Table]
[Table] [Table]
Cross
[Table]
Group undersampling
Balance the groups by throwing away overrepresented data
N/A 82.
[Table] [Table]
[Table] [Table]
Cross Entropy + IW
Classical importance weighting
N/A 79.
[Table]
VS Loss
Multiply by and add class dependent constants to logits γ =
Poly-tailed Loss
Change loss function and exponentiate importance weights α = 2 , w 2 .82.4% 0.8% 53.3% 1.5%
Cross Entropy + DRO
N/A 84.8% 0.9% 60.4% 2.4%
VS Loss + DRO
Change loss function and use DRO γ = 0 .83.
Poly-tailed Loss + DRO
Change loss function and use DRO α =86.7% 1.1% 66.5% 1.9%