Is Importance Weighting Incompatible with Interpolating Classiﬁers?
Abstract
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.
Our polynomially-tailed loss consistently increases the test accuracy by 2-3%.
Introduction
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 [12].
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 [2, 17] 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 and Lipton [2] 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.
[17] followed up and provided a theoretical justiﬁcation for this observation in overparameterized linear and non-linear models.
Cross Entropy: IW
Poly-tailed Loss: No IW
Poly-tailed Loss: IW
[Figure]
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 ﬁnd 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 demonstrate that importance weights do correct for distribution shift under such losses even for overparameterized classiﬁers.
Setting
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 classiﬁer parameterized by θ .
Given a feature x , a classiﬁer maps this feature to f θ ( x ) ∈ R .
In this paper we shall consider cases where the classiﬁer is either linear (for our theory) or a neural network (for our experiments).
Our goal is to ﬁnd a classiﬁer 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 this datapoint 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 ensure that the reweighted training loss is an unbiased estimate of the test loss.
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 deﬁne the polynomially-tailed loss as follows:
[Equation]
where (cid:96) left is any loss function such that the overall loss function (cid:96) α,β is convex, differentiable and strictly decreasing.
Several natural choices for (cid:96) 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
[Equation]
be the reweighted empirical loss on this dataset.
Theoretical Results
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.
To let the analysis proceed, we restrict our theoretical study to linear classiﬁers, f θ ( x ) = x · θ , for some θ ∈ R d .
3.1 Implicit Bias of Gradient Descent on Polynomially-Tailed Losses
We begin by presenting a result that characterizes the implicit bias of gradient descent on reweighted polynomially-tailed losses for linearly separable classiﬁcation.
Understanding this situation is a key ﬁrst step, as gradient descent for separable linear classiﬁcation is often used as a simpliﬁed model to theoretically characterize the behavior of overparameterized models such as neural networks [13, 5, 10, 8, 6].
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 :
[Equation]
for t ∈ { 0 , 1 , . . .
Deﬁne the direction
[Equation]
The following proposition characterizes the limiting direction of gradient descent iterates.
Proposition 3.1.
(Proof in Appendix D.) 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]
Note that, unlike the maximum margin classiﬁer, 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 classiﬁer that is similar in direction to the Bayes optimal classiﬁer for the problem.
3.2 Generalization Analysis
The result in the previous subsection shows that the asymptotic classiﬁer learnt by gradient descent, (cid:98) θ α respects importance weights.
However, this does not demonstrate that using polynomially-tailed losses leads to classiﬁers with lower test error compared to using exponentially-tailed losses.
To answer this more ﬁne-grained question, we will need to perform a more reﬁned analysis.
We consider the setting where 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.
3.2.1 Upper Bound for the Reweighted Polynomially-Tailed Loss Classiﬁer
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 (1)
[Equation]
for all i ∈ [ n ]
[Equation]
where z i =
y
i x i as deﬁned previously.
The following theorem provides an upper bound on the test error of (cid:98) θ 1 and speciﬁes a range of
Theorem 3.2.
(Proof in Appendix E.)
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 Appendix B, the following holds.
If the weight
[Equation]
then with probability at least 1 − δ , training on S produces a classiﬁer (cid:98) θ 1 satisfying:
[Equation]
It is rather 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 ﬁnd 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 also verify this in our simulations in Appendix
Figure 2, and ﬁnd that choosing w = τ 3 ensures that the test error is equal across both classes leading to low overall test error.
3.2.2 Lower Bound for the Maximum Margin Classiﬁer
We will now show that classiﬁers trained with exponentially-tailed losses have their error lower bounded by 1 / 8 in the same setting.
Theorem 3.3.
(Proof in Appendix F.) Let q ∼ N (0 , I d × d ) .
There exist constants c and c (cid:48) such that, for all large enough C and for any 0 < δ < 1 /C , under the assumptions of Appendix B, the following holds.
With probability at least 1 − δ , training on S produces a maximum margin classiﬁer (cid:98) θ MM satisfying:
[Equation]
where Φ is the Gaussian cdf.
Furthermore, if the imbalance ratio τ ≥ [Equation] (cid:48) √ n
[Equation]
then with probability at least 1 − δ
[Equation]
[Equation]
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 (cid:107) µ (cid:107)
= d 12 + 140 , n =
d 15 and τ = d 320 ≤ n .
For all large enough d , all our assumptions are satisﬁed.
Now since, (cid:107) µ (cid:107) 2 > √ d , Theorem 3.2 guarantees that the test error of (cid:98) θ 1 → 0 as d → ∞ .
However, as τ = d 320 ≥ c (cid:48) (cid:107) µ (cid:107) 2 (cid:112) n/d = c (cid:48)
d 540 , for all large enough d , the test error of the maximum margin classiﬁer is guaranteed to be at least 1 / 8 .
This degradation of the test error with τ is also apparent in our simulations in Appendix Figure 2.
Empirical evaluation on deep interpolating classiﬁers
Inspired by our theoretical results, we use a polynomially-tailed loss with importance weights to train interpolating deep neural networks under distribution shift.
We train models on two image classiﬁcation datasets, one with label shift, Imbalanced binary CIFAR10, and one with subpopulation shift, CelebA.
Though these nonlinear networks violate the assumptions of our theory, polynomiallytailed loss with importance weights consistently improves test accuracy for interpolating neural networks under distribution shift compared to importance-weighted cross-entropy loss.
We show these results in Appendix G and with details in Appendix H.
Our theory combined with our experiments suggest that heavy-tailed losses together with importance weighting serve as a simple and general candidate for addressing distribution shift in deep learning.
A Related Work
Early work [12, 16] already warned against the potential ineffectiveness of importance weights on interpolating overparameterized models.
Shimodaira [12] showed that when the model is wellspeciﬁed, importance weights can fail to have an effect, and that the ordinary maximum likelihood estimate is asymptotically optimal.
Wen et al.
[16] 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 [2, 17] has shown that importance weighting fails to have an effect on neural networks trained with gradient descent, though always in the setting of exponentiallytailed losses.
Sagawa et al.
[11] 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 beneﬁts of reweighting, also observed by Byrd and Lipton [2].
Our work also connects to literature that has studied the implicit bias of gradient descent [13, 5, 10].
Especially relevant is the work by Ji et al.
[7] who relate the implicit bias of gradient descent with exponentially and polynomially-tailed losses for linear classiﬁers to a solution of a regularized loss minimization problem.
Finally, our generalization analysis draws from the growing literature focused on ﬁnite sample bounds on the test error of the maximum margin classiﬁer in the overparameterized regime [4, 9, 15, 3].
B Setting for Generalization Analysis
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 ﬁxed throughout the remainder of the paper.
We will use c, c (cid:48) , 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 , (cid:107) µ 1 (cid:107) =
(cid:107) µ 2 (cid:107) , 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) (cid:107) q (cid:107) 2 (cid:3) ≥ (cid:101) Cd .
We note that in past work that studied this setting [4, 15, 3], 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.
Deﬁne 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| (cid:29) |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 /and x | y follows the distribution as described above.
We shall study the case where negative examples (which are in the minority) are upweighted.
Speciﬁcally, set the importance weights as follows
[Equation]
Imbalance Ratio ( τ )
T e s t
E rr o r ( % )
Test Error vs. Imbalance Ratio ( τ ) w =w = τ w = τ
Max-margin      ρ
T e s t
E rr o r ( % )
Test Error vs. Importance Weight ( w = τ ρ )
Majority Class
Minority Class
Overall
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 (cid:107) µ (cid:107) 2 := (cid:107) µ 1 (cid:107) 2 = (cid:107) µ 2 (cid:107) 2 ≥ Cn 2 log( n/δ ) .
Dimension d ≥ Cn (cid:107) µ (cid:107) 2 .
Our assumptions allow for large overparameterization, where the dimension d scales polynomially with the number of samples n .
C Label Shift Simulation with Sub-Gaussian clusters. D Proof of Proposition 3.
First, we restate the statement of the proposition.
Proposition 3.1.
(Proof in Appendix D.) 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 (cid:96) α,β is assumed to be convex, strictly decreasing to zero and is differentiable.
Deﬁne 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.
[7] to get that
[Equation]
We will therefore instead demonstrate that lim R →∞ θ R R = (cid:98) θ α to establish our claim.
First, note that the classiﬁer θ R is the minimizer of loss in a ball of radius R , so there exists a R 0 with
[Equation]
such that for all R > R 0 , each example is classiﬁed 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]
where ( i ) follows since for every R the function
[Equation]
is convex and continuous
[Equation]
and therefore
[Equation]
  has a unique minimizer (since the objective function is strictly convex
[Equation]
and the constraint set is convex and compact), and is a continuous map by Berge’s maximum theorem [see, e.g., 1, 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 ﬁnite objective value.
Therefore,
[Equation]
which ﬁnishes our proof.
[Equation]
E Proof of Theorem 3.
In this section, we will prove an upper bound on the test error (cid:98) θ 1 , which is the classiﬁer learnt by gradient descent with the importance weighted Polynomially-tailed loss that decays as 1 /z .
By
Proposition 3.1, we know the choice of (cid:96) left and β does not affect the implicit bias of gradient descent, hence here, for the sake of convenience, we shall use the speciﬁc 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 3.1 we will instead bound the test error of the limiting iterate of gradient descent starting from θ (0)
= 8 w 2 / 3 n (cid:0) µ 1 − w 1 / 3 µ 2 (cid:1) 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 3.1 guarantees that lim t →∞ θ ( t ) (cid:107) θ ( t ) (cid:107) =
(cid:98) θ 1 .
In this section we will simply let (cid:96) denote (cid:96) 1 ,β and also use the shorthands (cid:96) ( t ) i := (cid:96) ( z i · θ ( t ) ) and (cid:96) [Equation] ( t ) i := (cid:96)
[Equation]
With this setup in place let us begin the proof.
All of the assumptions made in Section B are in scope here.
First we have a lemma that upper bounds the test error using Hoeffding’s inequality.
Lemma E.1.
There is a positive absolute constant c such that
[Equation]
This lemma follows by mirroring the proof of [4, Lemma 9] which in turn follows by a simple application of Hoeffding’s inequality [14, 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 deﬁned above in Section 3.2.
Lemma E.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 ] [Equation] for all i (cid:54)
[Equation]
∈
[Equation]
z
[Equation]
z
[Equation]
for all i (cid:54)
=
j ∈ N
[Equation]
z i
[Equation]
(4) for
all i ∈ P and j ∈ N , | z i · z
[Equation]
); (5) for all i (cid:54) =
j ∈ [ n ] , | z i · z
[Equation]
| <
[Equation]
; (6) for
all k ∈ P
, | µ 1 · z k
[Equation]
< (cid:107)
[Equation]
(cid:107)
[Equation]
2; (7) for
all k ∈ N
, | ( − µ 2 ) · z k
[Equation]
<
[Equation]
2; (8) for
all k
∈
N
, | µ
· z
[Equation]
( n/δ ); (9) for
all k ∈ P
|
µ
· z
[Equation]
<
[Equation]
(cid:107)
[Equation]
( n
[Equation]
); (10) 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 (2)-(4), (6)-(8) and (11) can be shown to hold with the required probability by invoking [4, Lemma 13].
We will show that Parts (5), (9) and (10) also hold with the required probability to complete the proof.
Proof of Part (5) : 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 ﬁrst two terms, note that by Hoeffding’s inequality [14, 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 [4, inequality (15)] we get that
[Equation]
Combining inequalities (12)-(15) we get that for all i ∈ P and j ∈ N with probability at [-least1 − δ/ 
-]least
[Equation]
where the last inequality follows since by assumption d ≥ Cn (cid:107) µ (cid:107) 2 and because C is large enough.
This completes the proof of this part.
Proof of Part (9) :
For any k ∈ N , z k = µ 2 + Uq k .
Recall that µ 1 · µ 2 = 0 , thus
[Equation]
Invoking inequality (13) proves that this part holds with probability at least 1 − δ/ 10 .
Proof of Part (10) :
This follows by an analogous argument as in the previous part.
(cid:4)
We continue by deﬁning a good event that we will work under for the rest of the proof.
Deﬁnition E.3.
If the training dataset S satisﬁes all the conditions speciﬁed in Lemma E.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 E.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 (cid:54) =
j ∈ [ n ]
[Equation]
Furthermore, if the step-size η is sufﬁciently 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 E.2 and ( ii ) follows since (cid:107) µ (cid:107)
[Equation]
C [Equation] w 2 / 3 log( n/δ ) for a large enough constant C .
Similarly, we also have the lower bound
[Equation]
Recall from the deﬁnition of the loss that we set β = 1 − nw .
Now again since (cid:107) µ (cid:107) 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 deﬁnition of the loss function above we have that
[Equation]
and hence
[Equation]
[Equation]
By mirroring the logic we can also prove that for all j ∈ N
[Equation]
[Equation]
By combining equations (16) and (17) we immediately get that
[Equation]
This proves the ﬁrst 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 (cid:96) ( t ) i is equal to the polynomial loss function.
Note that
[Equation]
This proves that (cid:96) (0) i ≤ 1 / 2 for all i ∈ [ n ] .
By [7, Lemma 2] we know that if the step-size is small enough then the sequence { (cid:98) L ( θ ( t ) ) } is non-increasing.
Hence, we have that (cid:96) ( t ) i ≤ 1 / 2 for all t ∈ { 0 , 1 , . . . }
and for all samples.
This wraps up our proof.
[Equation]
The next lemma lower bounds the inner product between the normalized gradient descent iterates, and µ 1 and µ 2 .
Lemma E.5.
Let c be an absolute constant.
Then, on a good run, for any t ∈ { 0 , 1 , . . . }
[Equation]
and
[Equation]
Proof.
Let us prove the ﬁrst claim for the inner product with µ 1 .
The second claim regarding µ 2 shall follow analogously.
For any t ∈ { 0 , 1 , . . . } , by the deﬁnition of the gradient descent step, we have that
[Equation]
Note that by the deﬁnition of the loss function we have that − (cid:96) (cid:48) ( t ) i ≥ 0 for all t and all i .
Thus by
Parts (2) and (9) of Lemma E.2 we get that
[Equation]
where c 1 is the constant from Lemma E.2.
Unrolling this inequality over t steps we have that
[Equation]
On the other hand, by the triangle inequality we know that
[Equation]
where the last inequality again uses Part (2) of Lemma E
[Equation]
Therefore,
[Equation]
Thus, combined with inequality (19) we get that,
[Equation]
which completes the proof of the ﬁrst part of the lemma.
The second part follows by an identical argument.
[Equation]
Next, we prove a lemma that shows that throughout training the ratio between the losses between any two samples remains bounded.
Lemma E.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 (cid:54) =
j ∈ [ n ] (cid:96) ( t ) i (cid:96) ( t ) j ≤ c (cid:18) w j w [Equation] (cid:19)
[Equation]
Proof.
Let c 1 ≥ 1 be the constant c from Lemma E.2 above.
We shall show that the choice c = max (cid:8) 8 , 2(4 c 21 ) 1 / 3 (cid:9) sufﬁces.
We shall prove this via an inductive argument.
For the base case, at step t = 0 , we know that by
Lemma E.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.
Deﬁne G t :=
(cid:96) ( t ) 1 , H t := (cid:96) ( t ) 2 ,
A t :=
H t /G t .
Note that,
[Equation]
where ( i ) follows since − (cid:96) (cid:48)
( t ) k
= ( (cid:96) ( t ) k ) 2 as the loss of each example is always in the polynomial tail of the loss by Lemma E.4.
Therefore [Equation] we have that
[Equation]
Now since the step-size η is chosen to be small enough [Equation] | z i · z j | ≤ c 1 d (by Part (3) of Lemma E.2 and by the assumption on d ) and because the losses are all smaller than a constant by Lemma E. [Equation]
the following approximations hold
[Equation]
and thus,
[Equation]
Let us further upper bound the RHS as follows
[Equation]
[Table] [Equation] [Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation] [Table] [Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Equation]
(22) where ( i ) follows since for all i ∈ [ n ] , d
/c 1 ≤ (cid:107) z i (cid:107) 2 ≤ c 1 d and for any j (cid:54) =
k , | z j · z k | ≤ c 1 (cid:16) (cid:107) µ (cid:107) 2 + (cid:112) d log( n/δ ) (cid:17) by Lemma E.2.
With this upper bound in place, consider two cases.
Case 1 ( A 3 t ≤ 4 c 21 w 1 w 2 ): Using inequality (22) we know that
[Equation]
Now the loss on each example is less than the total initial loss 1 / 2 (see equation (18)) 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.
[Table]
[Equation]
where ( i ) follows by the inductive hypothesis which guarantees that (cid:96) ( t ) k
(cid:96) ( t ) 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 ﬁnally ( 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
[Equation]
in this case.
Recall that since we assumed the inductive hypothesis to hold, the two cases analyzed above are exhaustive.
This completes our proof.
[Equation]
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 E.7.
For any positive ˜ c , there exists a 0 < c < 1 such that, for all large enough C , if the step-size η is sufﬁciently small and τ 3 2 ≤ w ≤ 2 τ 3 then on a good run, for any t ∈ { 0 , 1 , . . . }
(cid:88) i ∈P − w i
[Equation]
(cid:48) ( t ) i − ˜ c (cid:112) log( n/δ ) (cid:107) µ (cid:107) (cid:88)
i ∈N − w i (cid:96) (cid:48)
( t )
i ≥ c (cid:88) i ∈ [ n ] − w i (cid:96) (cid:48)
( t ) i and (cid:88) i ∈N − w i (cid:96) (cid:48)
( t ) i − ˜ c (cid:112) log( n/δ ) (cid:107) µ (cid:107) (cid:88)
i ∈P − w i (cid:96) (cid:48)
( t )
i ≥ c (cid:88) i ∈ [ n ] − w i (cid:96) (cid:48)
( t ) i .
Proof.
We begin by proving the ﬁrst part of the lemma.
Note that since [ n ] = P ∪ N to prove the ﬁrst part it sufﬁces to instead show that
[Equation]
µ (cid:107) (cid:33) w (cid:88) i ∈N − (cid:96) (cid:48) ( t ) i ⇐⇒ (1 − c ) (cid:88) i ∈P ( (cid:96) ( t ) i ) 2 ≥ (cid:32) c + ˜ c (cid:112) log( n/δ ) (cid:107) µ (cid:107) (cid:33) w (cid:88) i ∈N ( (cid:96) ( t ) i )(since − (cid:96) (cid:48) ( t ) i = ( (cid:96) ( t ) i ) 2 for the polynomial loss) ⇐ (1 − c ) |P| min i ∈P ( (cid:96) ( t ) i ) 2 ≥ (cid:32) c + ˜ c (cid:112) log( n/δ ) (cid:107) µ (cid:107) (cid:33) w
[Equation]
N
[Equation]
max i
[Equation]
( (cid:96) ( t ) i )⇐ (1 − c ) τ ≥ (cid:32) c + ˜ c (cid:112) log( n/δ ) (cid:107) µ (cid:107) (cid:33) w max i ∈N ( (cid:96) ( t ) i )min i ∈P ( (cid:96) ( t ) i )⇐ (1 − c ) τ ≥ (cid:32) c + ˜ c (cid:112) log( n/δ ) (cid:107) µ (cid:107) (cid:33) wc 1 · w 2 /(by invoking Lemma E.6; note that c 1 ≥ 1 ) ⇐ (1 − c ) c 1 (cid:16) c
+ ˜ c √ C (cid:17)
τ ≥ w 1 /(since (cid:107) µ (cid:107) ≥ (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 ﬁrst part of the lemma.
To prove the second part of the lemma, note that again since [ n ] =
P ∪ N it sufﬁces to show that
[Equation]
where the last implication follows by the choice of c from above.
This completes the proof.
(cid:4)
We now have all the pieces required to prove our main theorem.
Recall its statement.
Theorem 3.2.
(Proof in Appendix E.)
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 Appendix B, the following holds.
If the weight
[Equation]
then with probability at least 1 − δ , training on S produces a classiﬁer (cid:98) θ 1 satisfying:
[Equation]
Proof.
First, by Part (11) of Lemma E
[Equation]
2 we know that the data is linearly separable.
Thus, by
Proposition
[Equation]
1 we know that
[Equation]
Given this equivalence [Equation] by Lemma E
[Equation]
1 we know that
[Equation]
We shall now establish lower bounds on lim t [Equation] θ ( t ) (cid:107) and lim t →∞ θ ( t ) · µ 2 (cid:107) θ ( t ) (cid:107) to obtain the desired bound on the test error.
Let us lower bound lim t →∞ θ ( t ) · µ 1 (cid:107) θ ( t ) (cid:107) .
The bound on lim t →∞ θ ( t ) · µ 2 (cid:107) θ ( t ) (cid:107) shall follow by exactly the same logic.
By Lemma E.
we know that
[Table]
[Equation]
where ( i ) follows since µ 1 · θ (0) is bounded and (cid:107) θ ( t +1) (cid:107) → ∞ by [7, Lemma 2].
We will now show that the ﬁrst limit in RHS equals 1 .
To do this, ﬁrst note that
[Equation]
Now we will show that
[Equation]
First note that
[Equation]
[ n ]
[Equation]
w i
[Equation]
i ≥ 0 , since − w i (cid:96) (cid:48) ( s ) i ≥ 0 , so to show that this limit equals 0 , it sufﬁces to show that c 1 η √ d (cid:80) ts =0 (cid:80) i ∈
[ n ] − w i (cid:96) (cid:48) ( s ) i grows unboundedly as t → ∞ .
Using inequality (20) from above we get that,
[Equation]
The norm (cid:107) θ (0) (cid:107) is ﬁnite and we know that (cid:107) θ ( t ) (cid:107) → ∞ by [7, Lemma 2], therefore c 1 η √ d
[Equation]
t s =0 (cid:80) i ∈ [ n ] − w i (cid:96) (cid:48) ( s ) i must grow unboundedly.
This proves that
[Equation]
as claimed.
This combined with inequality (24) yields the bound lim
[Equation]
where ( i ) follows by invoking Lemma E
[Equation]
As stated above
[Equation]
using a similar argument we can also show that lim
[Equation]
Plugging these lower bounds into inequality (23) completes our proof.
[Equation]
F Proof of Theorem 3.
In this section we will prove a lower bound on the test error of the maximum margin linear classiﬁer (cid:98) θ MM .
Here we will work with the exponential loss
[Equation]
Deﬁne the loss (cid:98) L ( θ ) =
(cid:80) i ∈ [ n ] (cid:96) (
y i x (cid:62) i θ )
= (cid:80) i ∈ [ n ] (cid:96) ( z (cid:62) 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 (cid:96) ( t ) i be shorthand for (cid:96) ( z i · θ ( t ) ) and therefore,
[Equation]
The results by Soudry et al.
[13] guarantee that for a small enough step-size η the direction of the iterates of gradient descent lim t →∞ θ ( t )
[Equation]
θ ( t )
[Equation]
= (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 3.2, going forward we will assume that a good run occurs (see
Deﬁnition E.3), which guarantees that all of the conditions speciﬁed in Lemma E.2 are satisﬁed 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 B shall remain in force.
We begin with a lemma that shows that the margin of the maximum margin classiﬁer scales with (cid:112) d/n .
Lemma F.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 classiﬁer must also attain this margin on all of the points.
Deﬁne φ to be as follows
[Equation]
We will ﬁrst bound the norm of the denominator as follows
[Equation]
where ( i ) follows by Lemma E.2 and ( ii ) follows since d ≥ Cn (cid:107) µ (cid:107) 2 ≥ C 2 n 3 log( n/δ ) where recall
C is sufﬁciently 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 E.2 and by the assumption on d ,
Combining inequalities (25) and (26) yields that for any k ∈ [ n ]
[Equation]
This proves the result.
[Equation]
The next lemma provides control over the rate at which the norm of iterates θ ( t ) grows late in training.
Lemma F.2.
There is an absolute constant c such that, for all large enough C , if the step-size η is sufﬁciently small then on a good run, there exists a t 0 such that for all t ≥ t[-
-]
[Equation]
Proof.
By the deﬁnition of gradient descent
[Equation]
Now we know that θ ( t ) (cid:107) θ ( t ) (cid:107) → (cid:98) θ MM .
Also note that in the previous lemma (Lemma F.1) we showed that for all i ∈ [ n ] (cid:98)
[Equation]
i
[Equation]
(cid:114)
[Equation]
n.
Therefore, there exists a iteration t 1 such that for all t ≥ t 1 and all i ∈ [ n ] θ ( t ) ·
z i (cid:107) θ ( t ) (cid:107) ≥ c (cid:114) d n.
Continuing from (27), for any t ≥ t(cid:107)
{+θ ( t +1) (cid:107) 2 ≥ (cid:107) θ ( t ) (cid:107) 2 + 2 η (cid:88) i ∈ [ n ] (cid:96) ( t ) i z i · θ ( t ) ≥ (cid:107) θ ( t ) (cid:107) 
 + c 1 η (cid:107) θ ( t ) (cid:107) (cid:114) d n (cid:88) i ∈+}
[ n ] (cid:96) ( t ) i
= (cid:107)
[Equation]
) (cid:107)
[Equation]
 
[Equation]
+ c
[Equation]
η (cid:113)
[Equation]
(cid:80) i ∈ [ n ] (cid:96) ( t ) i (cid:107) θ ( t ) (cid:107) 
 .
Taking square roots we get that for any t ≥ [-t 
-]t(cid:107)
θ ( t +1) (cid:107) ≥ (cid:107) θ ( t ) (cid:107) (cid:118)(cid:117)(cid:117)(cid:116) 1 + c 1 η (cid:113) dn (cid:80) i ∈ [ n ] (cid:96) ( t ) i (cid:107) θ ( t ) (cid:107) .
Further by [7, Lemma 2] we know that (cid:107) θ ( t ) (cid:107) → ∞ , so there exists a t 2 such that for all t ≥ t 2 , (cid:107) θ ( t ) (cid:107) ≥ c
[Equation]
nd .
Thus, for t ≥ t 2 , we have
[Equation]
where the last inequality follows since the initial loss is equal to n [Equation] as θ (0) =
[Equation] and the total loss is decreasing again by [7, Lemma 2] if the step-size is small enough.
It is easy to check that for [-any0 ≤ x ≤ 
-]any
[Equation]
Thus, combining inequalities (28) and (29) we get that for all t ≥ t 0 = max { t 1 , t 2 }
[Equation]
which completes our proof.
[Equation]
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 “inﬂuences” 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 and Long [4].
However, since our setting is slightly different to the setting studied in that paper we reprove the result here.
Lemma F.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 ] (cid:96) (0) i = n and since step-size η is small enough training loss is non-increasing by [7, Lemma 2].
Let c 1 be the constant c ≥ 1 from Lemma E.2.
We will show that c = 4 c 21 sufﬁces.
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.
Deﬁne G t :=
(cid:96) ( t ) 1 , H t := (cid:96) ( t ) 2 ,
A t :=
H t /G t .
The ratio between these losses at step t + 1 is
[Equation]
Now note that by Lemma E.2, for all i (cid:54) =
j ∈ [ n ] , d/c 1 ≤ (cid:107) z i (cid:107) 2 ≤ c 1 d and | z i · z j | ≤ c 1 (cid:16) (cid:107) µ (cid:107) 2 + (cid:112) d log( n/δ ) (cid:17) , and therefore,
[Equation]
where ( i ) follows since by the inductive hypothesis (cid:96) ( t )
k /G t ≤ c = 4 c 21 , ( ii ) follows since by assumption d ≥ Cn (cid:107) µ (cid:107) 2 ≥ C 2 n 3 log( n/δ ) , and ( iii ) follows since C is sufﬁciently large.
Now consider two cases.
Case 1 ( A t ≤ 2 c 21 ): By inequality (30)
[Equation]
where the last inequality follows if the step-size η is sufﬁciently small.
Case 2 ( 2 c 21 ≤ A t ≤ 4 c 21 = c ):
Again by inequality (30)
[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.
[Equation]
The next lemma proves an upper bound on the difference between the inner product between θ ( t +1) · µ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 F.4.
There is an absolute constant c such that, for all large enough C , if the step-size η is sufﬁciently small then on a good run, for all t ∈ { 0 , 1 , . . . }
[Equation]
Proof.
By the deﬁnition of
[Equation]
where ( i ) follows by Lemma E.2 and ( ii ) follows by the loss ratio bound in Lemma F.3.
Since by assumption (cid:107) µ (cid:107) 2 ≥ Cn 2 log( n/δ ) , we infer that
[Equation]
Thus,
[Equation]
wrapping up our proof.
[Equation]
With these lemmas in place we are now ready to prove our result.
Let us restate it here.
Theorem 3.3.
(Proof in Appendix F.) Let q ∼ N (0 , I d × d ) .
There exist constants c and c (cid:48) such that, for all large enough C and for any 0 < δ < 1 /C , under the assumptions of Appendix B, the following holds.
With probability at least 1 − δ , training on S produces a maximum margin classiﬁer (cid:98) θ MM satisfying:
[Equation]
where Φ is the Gaussian cdf.
Furthermore, if the imbalance ratio τ ≥ c [Equation] then with probability at least 1 − δ
[Equation]
Proof.
The test error for (cid:98) θ MM is
[Equation]
[Equation]
where Φ is the Gaussian cumulative distribution function.
With this inequality in place [Equation] we want to prove an upper bound on (cid:16)(cid:98) θ MM · ( − µ 2 ) (cid:17) 2 .
Now, since
[Equation]
t
[Equation]
→ (cid:98) θ MM , it sufﬁces to prove an upper bound on (cid:16) lim
[Equation] 2 instead.
To do this, going forward let us assume that a good run (see Deﬁnition E.3) occurs.
Lemma E. guarantees that this happens with probability at least 1 − δ .
Let t 0 be the constant from Lemma F.2, then by Lemma F.4 we have that for any t > tθ ( t [-
 [Equation]-])
[Equation]
where we deﬁne ψ := θ
[Equation] [Equation]
+
[Equation]
On the other hand, by repeatedly applying Lemma F.2 we get that
[Equation]
Furthermore, since (cid:107) θ ( t ) (cid:107) → ∞ [by 7, Lemma 2] and (cid:107) θ [Equation]
ηd
[Equation]
s = (cid:88)
[Equation]
[ n ] [Equation] (by Part 2 of Lemma E.2)
[Equation]
t [Equation] s
[Equation] (cid:88) i ∈ [ n ] (cid:96) ( s )
i we can conclude that (cid:80) ts = t 0 (cid:80) i ∈
[ n ] (cid:96) ( s ) i → ∞ .
Thus combining inequalities (32) and (33) we get that lim t →∞
[Equation]
d (cid:107) µ (cid:107) 2 .
Plugging this upper bound into inequality (31) completes the proof.
(cid:4)
G Empirical evaluation on deep interpolating classiﬁers (
We use the same polynomially-tailed loss with α = 1 , β = 1 , and (cid:96) left ( z )
=
log(1 + e − z ) / log(1 + e − 1 ) , ensuring that (cid:96) α,β is continuous and differentiable at transition z = β .
Imbalanced Binary
CIFAR10.
We construct our label shift dataset from the full CIFAR10 dataset.
Similar to Byrd and Lipton [2], we create a binary classiﬁcation dataset out of the “cat” and “dog” classes.
We use the ofﬁcial 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 ofﬁcial 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 and Lipton [2] with random initializations for this dataset.
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 the test set, resulting in 180 examples for each group.
Following Sagawa et al.
[11], we use a ResNet-50 with ImageNet initialization for this dataset.
G.1 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 ﬁnal 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 3 that shows biased importance weights can improve performance for polynomially-tailed losses.
We 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 H.
Figure 3 shows the mean accuracy and the standard error for each of the three settings.
As indicated by our theory, we ﬁnd that importance weighting with polynomially-tailed losses leads to statistically signiﬁcant gains over cross-entropy in all cases.
Further we ﬁnd that exponentiating weights boosts the performance of polynomially tailed losses, conﬁrming our claims in Theorem 3.2.
However, exponentiating the weights leaves the performance of cross-entropy loss largely unchanged.
In the case of CelebA, we ﬁnd that exponentiated reweighting with poly-tailed losses outperforms all other methods.
While in the case of Imbalanced Binary CIFAR10, we ﬁnd a smaller gap between polynomially-tailed losses and cross-entropy, partially due to a substantially higher runto-run variability in training.
This variability does not affect our main conclusion: exponentiated reweighting with polynomially tailed losses still outperforms this at a signiﬁcance level of p = 0 .even with this noise level.
[Figure]
Trained
[Figure]
Interpolation
[Figure]
respectively.
While early stopping is effective for both losses, our polynomially-tailed loss performs even better on Imbalanced
Binary CIFAR10.
G.2 Early-stopping before models interpolate
Prior works [11, 2] 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.
For each run in Section G.1, we select the model checkpoint with the best weighted validation accuracy and evaluate the checkpoint on the test set.
Figure 4 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 gives test accuracies that are better than or similar to cross-entropy in all weighted loss scenarios.
The gain over cross-entropy is statistically signiﬁcant in the Imbalanced Binary CIFAR10 runs.
On
CelebA, the polynomially-tailed loss with squared weights attains the highest mean test accuracy out of all settings.
H Experimental details
H.1 Hyperparameters
Imbalanced binary CIFAR10 experiments.
We use the same convolutional neural network architecture with random initialization as [2].
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 )”.
CelebA experiments.
We use a ResNet50 architecture with ImageNet initialization as done in [11].
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 sufﬁciently 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.
H.2 Importance 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.
H.3 Early-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]