A THEORETICALLY GROUNDED CHARACTERIZATION OF FEATURE REPRESENTATIONS
Anonymous authors
Paper under double-blind review
A BSTRACT
A large body of work has explored how learned feature representations can be useful for a variety of downstream tasks.
This is true even when the downstream tasks differ greatly from the actual objective used to (pre)train the feature representation.
This observation underlies the success of, e.g., few-shot learning, transfer learning and self-supervised learning, among others.
However, very little is understood about why such transfer is successful, and more importantly, how one should choose the pre-training task.
As a ﬁrst step towards this understanding, we ask: what makes a feature representation good for a target task?
We present simple, intuitive measurements of the feature space that are good predictors of downstream task performance.
We present theoretical results showing how these measurements can be used to bound the error of the downstream classiﬁers, and show empirically that these bounds correlate well with actual downstream performance.
Finally, we show that our bounds are practically useful for choosing the right pre-trained representation for a target task.
I NTRODUCTION
Since the (re)-discovery of neural networks for visual recognition, a plethora of work has observed that the feature representations trained on ImageNet generalize to many downstream tasks, even to new domains (Donahue et al., 2014; Kornblith et al., 2019; Kolesnikov et al., 2020; Wallace & Hariharan, 2020).
This observation, and the resulting gain in accuracy even with very limited labels, has heralded new research directions into other ways of learning representations, such as self-supervised learning (Chen et al., 2020) or meta-learning (Snell et al., 2017).
This growing ﬁeld of representation learning has yielded ostensibly better and better feature representations.
However, a closer look reveals many mysterious results.
For example, meta-learning methods do not transfer across domains (Guo et al., 2020) and self-supervised representations struggle with ﬁne-grained recognition (Wallace & Hariharan, 2020).
These empirical results are extremely valuable, but do not provide a deeper understanding of the corresponding phenomena.
On the other side of the spectrum, theoretical work on neural representations is illuminating, but often makes assumptions about models or tasks (Du et al., 2020; Arora et al., 2019b).
We lack a general understanding of which neural representations work well for a given task and why.
In this paper, we take a ﬁrst step towards such an understanding by developing lower and upper bounds on classiﬁer accuracy based on data-driven properties of the feature space .
Classical theoretical bounds focus entirely on the complexity of the classiﬁer and ignore the feature space.
In contrast, our bounds are based on two intuitive properties of the feature representation (Figure 1): (a) Local alignment , which is the degree to which nearby data points share labels, and (b) local congregation which is the degree to which data points embed close to each other.
Intuitively, if the feature representation is locally aligned to the task, then any smooth classiﬁer will be able to model the task well.
If it is additionally congregated, then most test points will have nearby training instances, so the classiﬁer will generalize well from limited data.
We show that our bounds are not only intuitive and theoretically justiﬁed, but also predictive of actual performance in practical settings: on a large dataset of realistic few-shot tasks, we can use our bounds to pick the best pre-trained representation without any training.
Taken together, our work is a ﬁrst step towards a general, intuitive characterization of the feature space that is predictive of downstream classiﬁer performance.
R ELATED WORK
Analyzing transferability: The motivations of our work lie in understanding the empirical effectiveness of transferring feature representations from supervised (Donahue et al., 2014; Zhai et al., 2019; Kolesnikov et al., 2020) or self-supervised (Goyal et al.
; Wallace & Hariharan, 2020; Chen et al., 2020) tasks.
With these successes on transfer, and with the availability of a large number of pretrained features trained on a wide variety of domains, there has been an increasing interest in predicting transferability , or in selecting the right features for a particular target task.
The simplest approach is to train a classiﬁer with every available pre-trained representation and pick the best performer (Zamir et al., 2018;
You et al., 2021).
This is both computationally expensive and requires lots of labeled data for the target task.
If the pre-training task is a classiﬁcation task with a known label space then the conditional distribution of targets given pre-training task labels is informative of transfer performance (Tran et al., 2019; Nguyen et al., 2020).
However, this approach is difﬁcult to apply if the pre-training task is not classiﬁcation, or is inaccessible (as with models trained on proprietary data).
This inaccessibility of pre-training data is also a problem for approaches that match pre-training and target distributions (Gao & Chaudhari, 2021), or explicitly adapt the pre-training images or label space (Cui et al., 2018).
In contrast to these approaches, we focus on directly analyzing the pre-trained feature representation, which allows us to be agnostic to the actual task it was trained on.
Our work is most similar in setup and motivation to work on measuring the alignment between feature representations and the target labels (Huang et al., 2021; Bao et al., 2019), but in addition to allowing model selection, yields intuitive and general bounds on accuracy.
Our work is orthogonal to work on characterizing tasks and measuring task similarity; this frequently requires pre-trained features in the ﬁrst place (Achille et al., 2019;
Wallace et al., 2021; Song et al., 2020;
Dwivedi et al., 2020; Dwivedi & Roig, 2019).
Analyzing feature representations: Our work is also related to research on understanding feature representations in general.
Some of this work has focused on understanding invariance properties of convnet features (Aubry & Russell, 2015).
Others have looked at what individual feature dimensions mean (Agrawal et al., 2014; Zeiler & Fergus, 2014; Szegedy et al., 2013).
Still others have explored if and when features from pre-trained networks transfer well between tasks as a function of the layer chosen (Yosinski et al., 2014) or the architecture (Kornblith et al., 2019).
Recently these explorations have been extended to other representation learning techniques, notably self supervised techniques (Wang & Isola, 2020; Wallace & Hariharan, 2020).
The insights from these explorations inspire our results.
However, these explorations have been primarily empirical, and are therefore limited by the diversity of real world benchmarks that they experiment with.
On the other end of the spectrum, there is prior work on theoretical analysis of transfer learning. This prior work often follows the framework proposed by Baxter (2000), and in so doing makes assumptions about the distributions of the different tasks (Maurer, 2009; Du et al., 2020; Galanti et al., 2016; Pentina & Lampert, 2014).
In contrast, our approach eschews these assumptions in lieu of data-driven measurements. Data-driven complexity measures have been explored before for analyzing neural network training dynamics and generalization. These measures include eigenvectors of the gram matrix between data points (Arora et al., 2019a), the variance and separation of class-speciﬁc manifolds (Cohen et al., 2020), the underlying intrinsic dimensionality of the task (Lampinen & Ganguli, 2018) or the mutual information between representations and the inputs or labels (Shwartz-Ziv & Tishby, 2017).
The corresponding results can be used for analyzing feature representations as well. Our proposed measurements are similar, but are simpler to measure and potentially more intuitive.
P ROBLEM SETUP
Suppose we are interested in mapping a space of inputs X to a space of targets Y .
There is an underlying distribution D over X × Y .
We have a feature representation φ : X → R f which might be pre-trained on another dataset or task, which is inaccessible to us.
We will assume that (cid:107) φ ( x ) (cid:107) ≤ B .
For ease of exposition in the paper, we focus on the task of binary classiﬁcation; the case of multiclass classiﬁcation is similar.
For binary classiﬁcation, we write the label space as Y =
− 1 , 1 } .
Our classiﬁer will use a scoring function that operates on feature space, h : R f
→ R .
The predicted label will then be sign ( h ( φ ( x ))) , where if h ( φ ( x )) is 0, we will arbitrarily assign a label of -1.
The set of possible functions h deﬁnes the hypothesis class for the classiﬁer; denote this by H .
For most of our analysis, we primarily care about the smoothness of the functions in H .
We will assume that all functions in H are Lipschitz continuous with Lipschitz constant less than W .
Thus:
[Equation]
We note that one such hypothesis class which is commonly used in practice is the class of linear classiﬁers of bounded norm : W = (cid:8) v (cid:55)→ w T v ; (cid:107) w (cid:107) ≤ W (cid:9) .
Because the zero-one loss, l ∗ ( h ( φ ( x )) , y ) =
I [ sign ( h ( φ ( x ))) (cid:54) =
y ] is difﬁcult to analyze, we will use the following continuous upper bound which is standard in theoretical treatments (Mohri et al.,
[Equation]
Our focus in this paper is to understand how the properties of the feature extractor φ affect the loss of the classiﬁers l ( h ( φ ( x ))) .
In particular, we wish to understand how φ impacts (a) the lowest average error that one can achieve, and (b) the true error when one generalizes from a small training set.
We begin by ﬁrst identifying the key properties of feature representations.
T WO PROPERTIES OF FEATURE REPRESENTATIONS
What properties should we use to characterize feature representations?
First, we should use properties that are easy to measure, potentially with limited labeled data.
Second, these properties should be easy for human developers and practitioners to reason about.
Third, they should correlate well with the ﬁnal accuracy of downstream classiﬁers.
In sum, we want simple, intuitive measurements of the feature space that are predictive of downstream accuracy.
One kind of intuitive measurement is to look at what the feature representation considers as similar.
In particular, we could look at pairs of examples that embed close to each other in feature space and ask if they are indeed similar in terms of their ground truth labels.
We call this property local alignment .
In particular, we make the following deﬁnition
Deﬁnition 1.
Suppose α > 0 .
The local alignment of the feature space φ , denoted by p φa ( α ) is the probability that two data points ( x, y ) , ( x (cid:48) , y (cid:48) ) ∼ D share a label given that they embed within a distance of α :
[Equation]
α here is a hyperparameter which governs the resolution at which we do the analysis.
Note that this notion of local alignment is different from the alignment proposed by Wang & Isola (2020): the latter looks at how often two data points that are semantically similar embed close to each other, while the former looks at how often two data points that embed close to each other are semantically similar.
A feature space that is locally aligned per our deﬁnition may not actually be aligned per the deﬁnition of Wang & Isola (2020) because two very similar images may be embedded far away from each other.
Local alignment alone may be meaningless if data points do not generally embed close to each other.
We also need the feature space to be such that data points generally congregate :
Deﬁnition 2.
Suppose α > 0 .
The degree of congregation of the feature space φ , denoted by p φc , is the probability that two points x, x (cid:48) sampled from D embed within a distance of α :
[Equation]
We have α as a hyperparameter here too.
We now use these notions of local alignment and congregation to analyze the downstream error of classiﬁers.
W HAT IS THE BEST ACCURACY WE CAN ACHIEVE ?
Given a feature space φ , what is the best accuracy we can hope to get using scoring functions from
H ?
Recall that these scoring functions are all W -Lipschitz.
Our key intuition is that this Lipschitz continuity will force any scoring function in H to produce very similar scores for nearby data points.
If these have different labels, then the classiﬁer will be forced to err on at least one of them.
To formalize this intuition, we begin with the following claim
Claim 1.
Consider two data points ( x, y ) and ( x (cid:48) , y (cid:48) ) .
If (cid:107) φ ( x ) − φ ( x (cid:48) )
(cid:107) <
1 W and y (cid:54) =
y (cid:48) , then: l ( h ( φ ( x )) , y ) + l ( h ( φ ( x (cid:48) )) , y (cid:48) )
≥(5)
Proof.
Observe ﬁrst that due to Lipschitz continuity of h :
[Equation]
Now, since y (cid:54) =
y (cid:48) , it follows that y (cid:48) =
− y .
Without loss of generality, let us assume that y = 1 .
Denote l ( h ( φ ( x )) , y ) by a and l ( h ( φ ( x (cid:48) )) , y (cid:48) ) by b .
We will prove this claim by contradiction.
Suppose, if possible, that the clam is not true, and a + b < 1 .
Since the loss is always non-negative, it follows that a < 1 and b < 1 .
Thus:
[Equation]
Taking the other data point:
[Equation]
[Equation]
[Equation]
15) thus yielding a contradiction.
Thus, if two data points are close, at least one of them must be incorrectly classiﬁed.
We can thus bound the error of the best possible classiﬁer from below by estimating how often this happens:
Theorem 1.
Let l be the loss function deﬁned above, and H be a hypothesis class of Lipschitz functions with Lipschitz constant at most W .
Let D be a distribution over X × Y , and p φa and p φc deﬁned as above.
Then
[Equation]
Proof.
We observe that if ( x, y ) , ( x (cid:48) , y (cid:48) ) ∼ D , then the probability that (cid:107) φ ( x ) − φ ( x (cid:48) ) (cid:107) < 1 W and y (cid:54) =
y (cid:48) is given by ˜ p
= (1 − p φa (1 /W ))
p φc (1 /W ) .
Then, for all h ∈ H .
[Equation]
[Equation] 20) where the second step follows because the loss is non-negative, so only focusing on the case when x and x (cid:48) are close but have different labels yields a lower bound.
This is true for all h ∈ H , so it is true for the inﬁmum as well.
H OW WELL WILL CLASSIFIERS GENERALIZE ?
There may be classiﬁers that yield low error, but it can be challenging to ﬁnd these from small training sets.
Therefore we now ask if we can use the feature space to analyze how well classiﬁers trained on small training sets might generalize .
While generalization bounds abound, they typically do not include any reasoning about the underlying feature space beyond the maximum norm of feature vectors.
As such, these bounds are insufﬁcient for understanding the impact of the feature space on generalization.
Here, we present two kinds of bounds.
The ﬁrst bound uses a similar proof strategy of relying on the
Lipschitz continuity of the classiﬁer.
The second bound leverages a more traditional Rademacher complexity-based analysis to bound the excess risk (i.e., the difference between the test loss and training loss).
6. B OUNDING THE PROBABILITY OF HIGH - LOSS DATA POINTS
Classical generalization bounds are based primarily on concentration inequalities and the law of large numbers.
This produces substantially coarse estimates for applications like few-shot learning , where the training dataset has very few labels.
We propose a simpler alternative bound here.
We observe that owing to the Lipschitz continuity of the classiﬁer, test data points that are close to training data points will have very similar loss as the corresponding training points, which can be no worse than the loss on the worst performing training example.
Theorem 2.
Let H φ = { z = x (cid:55)→ h ( φ ( x )); h ∈ H} .
Suppose S is a sampled training set of m points.
For any z ∈ H φ , let l max ( z, S )
= max ( x
,y ) ∈
S l ( z ( x ) , y ) be the maximum loss z incurs on
S .
Then, for all (cid:15) > 0 and ( x, y ) ∼ D :
[Equation]
Proof.
It can be shown that for any y , l ( z ( x ) , y ) − l ( z ( x (cid:48) ) , y ) ≤ | z ( x ) − z
( x (cid:48) ) | (see Appendix).
Further, ∀ h ∈ H , h is W -Lipschitz.
So we have, for all x, x (cid:48) , y :
[Equation]
It follows that for any ( x, y ) , ( x (cid:48) , y (cid:48) ) :
[Equation]
Note that the probability of sampling such an ( x (cid:48) , y (cid:48) ) is p φa (∆ /W )
p φc (∆ /W ) .
If ( x (cid:48) , y (cid:48) ) is in S , then l ( z ( x (cid:48) ) , y (cid:48) ) ≤ l max ( z, S ) .
Thus, for any ( x, y ) ∼ D
P ( l ( z ( x ) , y ) ≤ l max ( z, S ) + (cid:15) ) ≥ P
[Equation]
(cid:107) [Equation] and y = y
[Equation]
24) =
[Equation]
6. B OUNDING THE EXCESS RISK
We can also perform a more traditional analysis of the excess risk, which uses the law of large numbers and various concentration inequalities.
It is well known that the difference between train loss and the test loss is upper bounded by the Rademacher complexity of the hypothesis class plus a small constant (Mohri et al., 2018).
Concretely, with probability greater than 1 − δ , the following holds for all h ∈ H :
[Equation]
[Equation] where R ( h ) is the test loss (or expected risk), ˆ R ( h, S ) is the training loss (or empirical risk), and
R m ( H ) is the Rademacher complexity of H .
Thus, to bound the generalization error, it sufﬁces to bound the Rademacher complexity of H , which is deﬁned as R m ( H ) =
E S
∼D m ,σ sup h ∈H 1 m (cid:80) mi {+=
 σ i+} h ( x i ) .
Here σ i are Rademacher random variables (i.e., σ i ∈ {− 1 , 1 } , E σ i = 0 ).
The Rademacher complexity is a measure of the size of the hypothesis class, and can be used to bound the difference between a hypothesis’ performance on two sampled datasets.
To allow us to deﬁne a concrete bound, we will analyze the class of linear classiﬁers with bounded norm , W .
The key insight here is that if, for a particular α , p φc ( α ) is large, then any two datasets (e.g., a train and a test dataset) that we sample from the underlying distribution will be “similar”, in terms of having nearby data points.
As such, linear classiﬁers will be forced to produce similar scores for both datasets, yielding similar loss.
This insight is expressed as the following bound on the Rademacher complexity of the set of linear classiﬁers composed with φ :
Theorem 3.
Let W φ = { z = x (cid:55)→ h ( φ ( x )); h ∈ W} .
Let p φc be deﬁned as above.
Then the
Rademacher complexity of W φ is bounded above by:
[Equation]
Proof sketch : (Full proof presented in Appendix).
For any x i ∈ S , there is a probability p φc ( α ) /that
the next point x i +1 is (a) within a distance α in feature space, and (b) is multiplied with a
Rademacher variable of the opposite sign.
Such pairs will effectively cancel out each other except for a small quantity of α , resulting in the ﬁrst term.
The second term is obtained from all the rest of the data points in S , which have to be analyzed in the usual way.
I MPLICATIONS
p a ( )
Random
SimCLR ImageNet 0. p c ( ) Both the lower and upper bounds (in particular theorem 2) suggest the need for a high p a , namely, a feature space where nearby examples have similar labels.
However, the two bounds differ in the need for congregation.
The lower bound suggests that we need a less congregated feature space, i.e., a space where examples are in general far apart.
This matches the training objective of self-supervised and contrastive learning techniques, which primarily attempt to push examples apart.
This is demonstrated in Figure 3, which shows that
ImageNet training and self-supervised training produce not just locally aligned (i.e., high p a ), but also non-congregated feature representations (i.e, low p c ). However, the upper bound suggests that good generalization from small datasets actually requires a highly congregated feature space .
As such, these highly spread out feature representations can actually yield large generalization errors in few-shot settings, as demonstrated in Table 1, even if they yield much lower errors with large training sets. Thus, ﬁnding a good representation for a task is a nuanced decision, requiring one to balance between these conﬂicting requirements.
Theorem 2 vs 3 : The two generalization bounds both demand high congregation, but differ in whether they involve alignment. Interestingly, the Rademacher complexity-based bound does not use p a .
Below, we will see that for this reason, this bound is less correlated with the downstream performance.
E MPIRICAL ANALYSIS
[Table] Above we have shown that p φa and p φc yield bounds on classiﬁer performance.
But are they useful enough in practice to make decisions?
We ﬁrst look to see whether they are correlated with actual loss values, and then present potential applications.
8. C ORRELATIONS WITH CLASSIFIER ACCURACY
We used CIFAR-10(Krizhevsky, 2009) as our test bed.
We sampled pairs of classes from CIFARas “recognition tasks”, resulting in 45 different tasks.
For each task we ran 10 different trials.
In each trial, we sampled a small 20-example training set to train a linear classiﬁer, and then evaluated the classiﬁer on a large validation set.
The training and validation margin losses were averaged over the 10 trials.
We used 18 different representations, all normalized to have maximum norm 1, and all with the architecture of a ResNet-18. These representations were trained with labels of varying granularity on ImageNet(Russakovsky et al., 2015), iNaturalist(Van Horn et al., 2018), or CIFAR-100 (see
Appendix).
For each task and for every representation, we computed our bounds using the labeled validation set to get p φa and p φc , and using the empirically obtained classiﬁer norm as W (a more practical approach is described in the next section).
Results: For each task, we computed the correlations between our proposed bounds and the corresponding true losses. Histograms of these correlations across the 45 tasks are shown in Figure(scatter plots with individual data points are in Figure 6). We ﬁnd that the lower bound is extremely
[Figure] [Figure] well correlated with the training loss (average Spearman’s ρ 0.93), but less so with the test loss (average Spearman”s ρ 0.55).
This is of course expected because the lower bound does not take into account the perils of classiﬁers trained on small training sets.
The difference between the training and test loss correlates very well with our proposed upper bound in Theorem 2 (average Spearman’s ρ 0.80), which is much better than the correlation obtained with the classical bound (average ρ 0.50). Theorem 3 yields a worse correlation that Theorem 2, perhaps because it doesn’t take into account the alignment.
Since Theorem 2 yields a stronger correlation, we use this upper bound in conjunction with the lower bound for a more practical experiment on model selection below.
8. A PPLICATIONS TO FEW - SHOT TRANSFER
We now see if our bounds can help choose the right feature representation for problems with very limited labeled data.
In particular, we assume that we have a very small labeled set S (e.g.,labeled examples per class) and a larger unlabeled set U .
Because labeled data is very limited, one cannot afford to use labeled data for held-out validation sets.
Therefore, a way of characterizing feature representations without training and evaluating classiﬁers is valuable.
Baselines: Much of prior work on estimating transferability assumes that the representations come from classiﬁcation tasks Nguyen et al.
(2020) on accessible datasets Cui et al.
(2018), or that an initial appropriate feature representation is available Achille et al.
; Dwivedi et al.
With the advent of self-supervised learning Chen et al.
(2020) and large proprietary datasets Kolesnikov et al.
(2020), and the wide variety of visual domains Wallace & Hariharan (2020)
, these assumptions are no longer appropriate.
We therefore consider only baselines that make minimal assumptions about the pre-trained feature representation and the target task: H-score Bao et al.
and
TransRate Huang et al.
Both approaches are based on information-theoretic arguments justifying the use of intra- and inter-class covariance matrices, which are global statistics of the feature representation, in contrast to our more local measurements.
In addition, we also include a baseline that chooses a representation at random.
Experimental setup: We run few-shot experiments on two datasets: CIFAR-10 and CUB200(Welinder et al., 2010).
The pre-trained representations were obtained by training on iNaturalist,
ImageNet and CIFAR-10 (only for CUB-200) with various loss functions.
In each case, we sample 50 binary classiﬁcation problems with 10 labeled examples each; all other examples from the classes involved are unlabeled.
To estimate p φa ( α ) using just 10 labeled examples, we choose α to be large enough that for at least one class, every pair of labeled examples is at most α away in feature space.
Our estimate of transferability involves linearly combining our lower bound on error (with a weight of 100 because of its smaller scale) and the upper bound on generalization from Theorem 2; lower values indicate better representations.
For the baselines, the unconditional covariance matrix was estimated using the unlabeled data and other label-dependent measurements used the labeled data.
We evaluate all approaches in terms of the average accuracy drop relative to the oracle representation (the one which post-hoc yields the highest test accuracy).
Thus lower drops are better.
Results: We show results in ﬁgure 5.
Interestingly, TransRate and H-score seem to have opposite trends on these two datasets, with H-score performing worse than random selection for CUB and TransRate performing worse than random on CIFAR-10 Our approach consistently yields better choices than both baselines on both benchmark datasets thus suggesting the usefulness of our characterization for practical problems.
L IMITATIONS , CONCLUSION AND FUTURE WORK
We have presented here a characterization of feature representations that is predictive of how well downstream classiﬁers will do. Our analysis is limited to classiﬁcation, though the results may be adapted potentially to other classiﬁcation-like tasks (e.g., object detection).
We also assume that the downstream classiﬁer is linear, which is in line with how feature representations are typically evaluated (Goyal et al.) ; however practical systems may use more powerful classiﬁers where our bounds may not apply. Finally, while our bounds are interpretable and predictive, it is not clear if they can be used to drive training objectives. This is an important direction for future work.
Reproducibility: All theoretical proofs and experimental details are included in either the main paper or the appendix.
Code and pre-trained representations will be made public upon acceptance.
Ethics statement: This work aims to improve our understanding of feature representations, thus paving the way for more widespread use of pre-trained feature representations.
We hope that this makes the power of sophisticated visual recognition techniques available to a much broader community who may not have the data or resources to train big networks from scratch.
However, we note that our work focuses only on the average accuracy one can obtain from these representations in a downstream task; we do not delve into the biases that these representations might perpetuate Steed & Caliskan (2021), or privacy or consent issues in the original datasets used to train these representations Birhane & Prabhu (2021).
We suggest that when choosing a pre-trained representation, practitioners should consider not just our characterization of downstream accuracy, but also a broader characterization in terms of the many ethical implications of choosing a representation pre-trained on questionably collected or opaque datasets.
A A PPENDIX A. P ROOFS
Theorem 4.
Let f ( x ) = min( max(0 , x )) .
Then f ( x ) − f ( x (cid:48) ) ≤ | x − x (cid:48) | .
Proof.
We do a case-by-case analysis.
1. x ≥ 0 , x (cid:48) ≤ 1 .
In this case, f ( x (cid:48) ) ≥ x (cid:48) and f ( x ) ≤ x .
So f ( x ) − f ( x (cid:48) ) ≤ x − x (cid:48) ≤ | x − x (cid:48) | .
x < 0 .
In this case f ( x ) = 0 .
Since f ( x (cid:48) ) ≥ 0 , it follows that f ( x ) − f ( x (cid:48) ) < 0 < | x − x (cid:48) | .
x (cid:48) > 1 .
In this case f ( x (cid:48) )
= 1 .
Since f ( x ) ≤ 1 it follows that f ( x ) − f ( x (cid:48) ) < 0 < | x − x (cid:48) | . Claim 2.
(Used in proof of Theorem 2) Let l ( z, y ) = min(1 , max(0 , 1 − zy )) .
Then l ( z, y ) − l
( z (cid:48) , y ) ≤
| z − z (cid:48) | .
Proof. l ( z, y ) = f (1 − yz ) , where f is deﬁned as above. The claim follows directly from Theorem 4.
Theorem 5.
Let W φ = { z = x (cid:55)→ h ( φ ( x )); h ∈ W} .
Let p φc be deﬁned as above.
Then the
Rademacher complexity of W φ is bounded above by:
[Equation]
Proof.
First note that:
[Equation]
Thus we need to bound E S,σ
[Equation]
Consider any set S of m points sampled from D .
Let π be the mapping i
(cid:55)→ ( i + 1) mod m , and deﬁne σ (cid:48)
i =
σ π ( i ) and x (cid:48)
i =
x π ( i ) .
Then, for any z ∈ H φ we have that (cid:80) mi =1 σ i φ ( x i ) =
(cid:80) mi
=1 σ (cid:48) i φ ( x (cid:48) i ) =
12 (cid:80) mi =1 ( σ i φ ( x i ) + σ (cid:48)
i φ ( x (cid:48) i )) .
Note that x i ⊥⊥ x (cid:48)
i and σ i ⊥⊥ σ (cid:48)
i .
Deﬁne a
i
=
I
[( σ i = − σ (cid:48) i ) and ( (cid:107) φ ( x i ) − φ ( x (cid:48) i ) (cid:107) < α )] .
Then
E S,σ a i = E S,σ a 2 i = p φc ( α ) 2 , which we will denote as p α .
Therefore:
E S,σ (cid:107) m (cid:88) i
= σ i φ ( x i ) (cid:107) (34) = 2 E S,σ (cid:107) m (cid:88) i = ( σ i φ ( x i ) + σ (cid:48) i φ ( x (cid:48) i ))
(cid:107) (35) = 2 E S,σ (cid:107) m (cid:88) i
=
( a i σ i ( φ ( x i ) − φ ( x (cid:48) i ))
+ m (cid:88) i
= ¯ a i ( σ i φ ( x i ) + σ (cid:48)
i φ ( x (cid:48) i )))
(cid:107) (36) ≤2 E S,σ (cid:107) m (cid:88) i
= a i σ i ( φ ( x i ) − φ ( x (cid:48) i ))
(cid:107) +2 E S,σ (cid:107) m (cid:88)
[Equation]
Observe that a i ⊥⊥ σ i , and a i ⊥⊥ σ (cid:48) i .
Using this, the second and third terms are similar.
The second term yields:
[Equation]
We note that if i (cid:54) =
j and i (cid:54) =
π ( j ) and j (cid:54) =
π ( i ) then ¯ a i σ i ⊥⊥ ¯ a j σ j .
Thus, looking at the expression under the square root:
[Equation]
Thus:
[Equation]
Through similar reasoning
[Equation]
the ﬁrst term yields:
[Equation]
[Figure]
Putting these expressions back in equation
[Figure]
we get:
[Equation]
A. S CATTER PLOTS
See Figure 6.
A. R EPRESENTATIONS USED IN EXPERIMENTS
In general it is difﬁcult to do statistically rigorous experiments for choosing representations since publicly available pre-trained representations vary wildly in architecture and dimensionality.
However, we want to ensure that the characterization we produce is nuanced enough to distinguish between fairly similar representations that are based on the same backbone architecture and the same feature dimensionality.
Therefore we used multiple feature representations that are all trained on
ResNet 18 on the same 3 datasets (ImageNet, CIFAR-100 and iNaturalist) but with very different loss functions.
These representations were trained in the context of an unrelated exploration on the use of coarsely labeled data (see supplementary).
For completeness, we present a brief overview of these representations here.
All representations were trained on a combination of a coarsely labeled dataset C and a ﬁnely labeled dataset F .
C may have some classes that are not present in F .
The representations we used are:
A representation trained with simple supervised learning on F alone.
A representation trained with simple supervised learning on C alone.
A representation trained on C ∪ F with two classiﬁer heads, one for coarse categorization and another for ﬁne-grained categorization 4.
A representation trained on C ∪ F with ﬁne-grained soft pseudo-labels for C obtained using a classiﬁer trained on F 5.
A representation trained on C ∪ F with ﬁne-grained soft pseudo-labels for C obtained using a classiﬁer trained on F , and with the pseudo-labels ﬁltered to be consistent with the coarse label, 6.
A representation trained on C ∪ F with ground-truth ﬁne-grained.
labels for images in C .
6 representations trained on 3 datasets gives us 18 representations.
Details on the training are in the paper linked in the supplementary.
These pre-trained representations will be released upon acceptance .
A. B OUNDS FOR MULTICLASS CLASSIFICATION A.4. P ROBLEM SETUP
Suppose, as before, we are interested in mapping a space of inputs X to a space of targets Y .
There is an underlying distribution D over X × Y .
We have a feature representation φ : X → R f which might be pre-trained on another dataset or task, which is inaccessible to us.
We will assume that (cid:107) φ ( x ) (cid:107) ≤ B .
For multiclass classiﬁcation, our classiﬁer will use a scoring function that scores how well a feature vector matches a class label, h : R f ×Y → R .
The predicted label will then be arg max y h ( φ ( x ) , y ) , where ties are broken arbitrarily.
The set of possible functions h deﬁnes the hypothesis class for the classiﬁer; denote this by H .
For most of our analysis, we primarily care about the smoothness of the functions in H .
We will assume that all functions in H are Lipschitz continuous in the ﬁrst argument with Lipschitz constant less than W .
Thus:
[Equation]
[Equation]
We note that one such hypothesis class which is commonly used in practice is the class of linear classiﬁers of bounded norm : W = (cid:8) v , y (cid:55)→ w Ty v
[Equation]
(cid:107) w y (cid:107) ≤
[Equation]
Y
[Equation]
For a data point x with label y , the zero-one loss incurred by scoring function h is l ∗ ( h, φ ( x ) , y )
=
I [ y (cid:54) =
arg max y (cid:48) h (
[Equation]
( x ) , y (cid:48) )] .
We will use the following continuous margin-based upper bound:
[Equation]
We can now prove equivalent lower and upper bounds as below.
A.4. L OWER BOUND
Claim 3.
Consider two data points ( x, y ) and ( x (cid:48) , y (cid:48) ) .
If (cid:107) φ ( x ) − φ ( x (cid:48) )
(cid:107) <
12 W and y (cid:54) =
y (cid:48) , then:
[Equation]
Proof.
Observe ﬁrst that due to Lipschitz continuity of h :
[Equation]
[Equation]
This in turn implies that for any pair of classes y 1 and y 2 ,
[Equation]
[Equation]
Now, denote l ( h, φ ( x ) , y ) by a and l ( h, φ ( x (cid:48) ) , y (cid:48) ) by b .
We will prove this claim by contradiction.
Suppose, if possible, that the clam is not true, and a + b < 1 .
Since the loss is always non-negative, it follows that a < 1 and b < 1 .
Thus:
[Equation]
Taking the other data point:
[Equation]
⇒ a + b ≥
[Equation]
thus yielding a contradiction.
This claim directly leads to the following lower bound for the multiclass case, with the exact same proof:
Theorem 6.
Let l be the loss function deﬁned above, and H be a hypothesis class of Lipschitz functions with Lipschitz constant at most W .
Let D be a distribution over X × Y , and p φa and p φc deﬁned as above.
Then
[Equation]
Note that the only difference between the bounds for the binary and the multiclass case is the factor 2 W in lieu of W .
A.4. U PPER BOUND
We can similarly give the following upper bound.
We ﬁrst begin with the following claim:
Claim 4.
For the multiclass loss function deﬁned above, and if h is W -Lipschitz as described above,
[Equation]
Proof.
We note that l ( h, φ ( x ) , y ) =
f (max y (cid:48)
[Equation]
= y
[Equation]
1 + h ( φ ( x ) , y
[Equation]
)) − h ( φ ( x ) , y )) , where f is deﬁned in Theorem 4.
Theorem 4 directly yields:
[Equation]
[Equation]
[Equation]
[Equation]
[Equation]
[Table]
[Equation]
The above claim then yields the following theorem
Theorem 7.
Suppose S is a sampled training set of m points.
For any h ∈ H , let l max ( h, S )
= max ( x
,y ) ∈
S l ( h, φ ( x ) , y ) be the maximum loss h incurs on S .
Then, for all (cid:15) > 0 and ( x, y ) ∼ D :
[Equation]
Proof.
As we have shown above, for all x, x (cid:48) , y :
[Equation]
It follows that for any ( x, y ) , ( x (cid:48) , y (cid:48) ) :
[Equation]
Note that the probability of sampling such an ( x (cid:48) , y (cid:48) ) is p φa (∆ / 2 W ) p φc (∆ / 2 W ) .
If ( x (cid:48) , y (cid:48) ) is in S , then l ( h, φ ( x (cid:48) ) , y (cid:48) ) ≤ l max ( h, S ) .
Thus, for any ( x, y ) ∼ D
P ( l ( h, φ ( x ) , y ) ≤
[Equation]
Once again, the only difference in proofs is the use of factor 2 W instead of W .