O N THE R OLE OF N EURAL C OLLAPSE IN T RANSFER L EARNING
DeepMind agyorgy@deepmind Marcus Hutter DeepMind mhutter@deepmind
A BSTRACT
We study the ability of foundation models to learn representations for classiﬁcation that are transferable to new, unseen classes.
Recent results in the literature show that representations learned by a single classiﬁer over many classes are competitive on few-shot learning problems with representations learned by special-purpose algorithms designed for such problems.
In this paper, we provide an explanation for this behavior based on the recently observed phenomenon that the features learned by overparameterized classiﬁcation networks show an interesting clustering property, called neural collapse.
We demonstrate both theoretically and empirically that neural collapse generalizes to new samples from the training classes, and – more importantly – to new classes as well, allowing foundation models to provide feature maps that work well in transfer learning and, speciﬁcally, in the few-shot setting.
I NTRODUCTION
In a variety of machine learning applications we have access to a limited amount of data from the task that we would like to solve, as labeled data is oftentimes scarce and/or expensive.
In such scenarios, training directly on the available data is unlikely to produce a hypothesis that generalizes well to new, unseen test samples.
A prominent solution to this problem is to apply transfer learning (see, e.g., Caruana, 1995; Bengio, 2012;
Yosinski et al., 2014).
In transfer learning, we are typically given a large-scale source task (e.g., ImageNet ILSVRC, Russakovsky et al., 2015) and a target task from which we encounter only a limited amount of data.
While there are multiple approaches to transfer knowledge between tasks, a popular approach suggests to train a large neural network on a source classiﬁcation task with a wide range of classes (such as ResNet50,
He et al., 2016,
MobileNet, Howard et al., 2017 or the VGG network, Simonyan & Zisserman, 2014), and then to train a relatively smaller network (e.g., a linear classiﬁer or a shallow MLP) on top of the penultimate layer of the pretrained network, using the data available in the target task.
Due to the effectiveness of this approach, transfer learning has become a central element in the machine learning toolbox.
For instance, using pretrained feature maps is common practice in a variety of applications, including ﬁne-grained classiﬁcation (Chen et al., 2019a; Huang & Li, 2020;
Yang et al., 2018), object detection, (Redmon et al., 2016; Ren et al., 2015; He et al., 2017), semantic segmentation (Long et al., 2015; Chen et al., 2018), or medical imaging (Chen et al., 2019b).
In fact, due to the cumulative success of transfer learning, large pretrained models that can be effectively adapted to a wide variety of tasks (Brown et al., 2020; Ramesh et al., 2021) have recently been characterized as foundation models (Bommasani et al., 2021), emphasizing their central role in solving various learning tasks.
Typically, a foundation model is pretrained on a source task at a time when the concrete description of the target task (or target tasks) is not – or only partially – available to the practitioner.
Therefore, the ability to precondition or design the training regime of the foundation model to match the target task is limited.
As a result, there might be a domain shift between the source and target tasks, such as a different amount of target classes, or a different number of available samples.
Hence, intuitively, a foundation model should be fairly generic and applicable in a wide range of problems.
On the other hand, when some speciﬁcs of the target tasks are known, often special-purpose algorithms are designed to utilize this information.
Such an example is the problem of few-shot learning, when it is known in advance that the target problems come with a very small training set (Vinyals et al., 2016; Ravi & Larochelle, 2017; Finn et al., 2017; Lee et al., 2019).
While these specialized algorithms have signiﬁcantly improved the state of the art, the recent work of Tian et al.
Dhillon et al.
(2020) demonstrated that predictors trained on top of foundation models can also achieve state-of-the-art performance on few-shot learning benchmarks.
Despite the wide range of applications and success of transfer learning and foundation models in particular, only relatively little is known theoretically why transfer learning is possible between two tasks in the setting mentioned above.
Contributions.
In this paper we present a new perspective on transfer learning with foundation models, based on the phenomenon of neural collapse (Papyan et al., 2020).
Informally, neural collapse identiﬁes training dynamics of deep networks for standard classiﬁcation tasks, where the features (the output of the penultimate layer) associated with training samples belonging to the same class concentrate around their class feature mean.
We demonstrate that this property generalizes to new data points and new classes (e.g., the target classes), when the model is trained on a large set of classes with many samples per class.
In addition, we show that in the presence of neural collapse, training a linear classiﬁer on top of the learned penultimate layer can be done using only few samples.
We verify these ﬁndings both theoretically and via experiments.
In particular, our results provide a compelling explanation for the empirical success of foundation models, as observed, e.g., by Tian et al.
; Dhillon et al.
In Appendix B.2, we show evidence for neural collapse for feature maps obtained from lower layers of the network, as well, although to a lesser extent.
The rest of the paper is organized as follows: Additional related work is discussed in Section 1.1.
The problem setting, in particular, foundation models, are introduced in Section 2.
Neural collapse is described in Section 3.
Our theoretical analysis is presented in Section 4: generalization to unseen examples is considered in Section 4.1, to new classes in Section 4.2, while the effect of neural collapse on the classiﬁcation performance is discussed in Section 4.3.
Experiments are presented in Section 5, and conclusions are drawn in Section 6.
Proofs and additional experiments are relegated to the appendix.
1. O THER R ELATED W ORK
Various publications, such as Baxter (2000); Maurer et al. (2016); Pentina & Lampert (2014); Galanti et al. ; Khodak et al. Du et al.
(2021), suggested different frameworks to theoretically study various multi-task learning settings.
However, all of these works consider learning settings in which the learning algorithm is provided with a sequence of learning problems, and therefore, are unable to characterize the case where only one source task is available.
In contrast, we propose a theoretical framework in which the learning algorithm is provided with one classiﬁcation task and is required to learn a representation of the data that can be adapted to solve new unseen tasks using few samples.
This kind of modeling is aligned with the common practice of transfer learning using deep neural networks.
While in unsupervised domain adaptation (DA) (Ben-David et al., 2006; Mansour et al., 2009) one typically has access to a single source and a single target task, one does not have access to labels from the former, making the problem ill-posed by nature and shaping the algorithms to behave differently than those that are provided with labeled samples from the target task.
In particular, although in transfer learning we typically train the feature map on the source dataset, independently of the target task, in DA this would signiﬁcantly limit the algorithm’s ability to solve the target task.
P ROBLEM S ETUP
We consider the problem of training foundation models, that is, general feature representations which are useful on a wide range of learning tasks, and are trained on some auxiliary task.
To model this problem, we assume that the ﬁnal target task we want to solve is a k -class classiﬁcation problem T (the target problem), coming from an unknown distribution D over such problems, and the auxiliary task where the feature representation is learned on an l -class classiﬁcation problem, called the source problem.
Formally, the target task is deﬁned by a distribution P over samples ( x, y ) ∈
X × Y k , where X ⊂ R d is the instance space, and Y k is a label space with cardinality k .
To simplify the presentation, we use one-hot encoding for the label space, that is, the labels are represented by the unit vectors in R k , and
Y k = { e i : i = 1 , . . . , k } where e i ∈
R k is the i th standard unit vector in R k ; with a slight abuse of notation, sometimes we will also write y
= i instead of y = e i .
For a pair ( x, y ) with distribution P , we denote by P i the class conditional distribution of x given y =
i (i.e., P i ( · ) =
P [ x ∈ · | y
=
i ] ).
A classiﬁer h : X → R k assigns a soft label to an input point x ∈ X , and its performance on the target task T is measured by the risk
[Equation]
where (cid:96) :
R k ×Y k → [0 , ∞ ) is a non-negative loss function (e.g., zero-one or cross-entropy losses).
Our goal is to learn a classiﬁer h from some training data S
=
( x i , y i ) } ni =1 of n independent and identically distributed (i.i.d.)
samples drawn from P .
However, when n is small and the classiﬁcation problem is complicated, this might not be an easy problem.
To facilitate ﬁnding a good solution, we aim to ﬁnd a classiﬁer of the form h
= g ◦ f , where f : R d → R p is a feature map from a family of functions F ⊂ { f (cid:48) :
R d → R p } and g ∈ G = { g (cid:48) : R p
→
R k } is a classiﬁer used on the feature space R p .
The idea is that the feature map f is learned on some other problem where more data is available, and then g is trained to solve the hopefully simpler classiﬁcation problem of ﬁnding y based on f ( x ) , instead of x .
That is, g is actually a function of the modiﬁed training data { ( f ( x i ) , y i ) } n i =1 ; to emphasize this dependence, we denote the trained classiﬁer by g f,S .
We assume that the auxiliary (source) task helping to ﬁnd f is an l -class classiﬁcation problem over the same sample space X , given by a distribution ˜ P , and here we are interested in ﬁnding a classiﬁer ˜
h :
X → R l of the form ˜ h
= ˜
g ◦ f , where ˜ g ∈ ˜
G ⊂ { g (cid:48) : R p
→ R l } is a classiﬁer over the feature space f
( X ) =
{ f ( x ) : x ∈ X} .
Given a training dataset ˜ S
= { (˜ x i , ˜ y i ) } mi =1 , both components of the trained classiﬁer, denoted by f ˜ S and ˜ g ˜ S are trained on ˜ S , with the goal of minimizing the risk in the source task, given by
[Equation]
(note that with a slight abuse of notation we used the same loss function as in (1), although they operate over spaces of different dimensions).
A standard assumption is that ˜ S is drawn i.i.d.
form ˜
P ; however, in this work instead we will use hierarchical schemes where ﬁrst classes are sampled according to their marginals in ˜ P , and then for any selected class c , training samples ˜ S c are chosen from the corresponding class-conditional distribution (or just class conditional, for short)
˜ P c ; the speciﬁc assumptions on the distribution of ˜ S will be given when needed.
Since f, ˜ g and ˜ h always depend on the source data only, to simplify the notation we will often drop the ˜ S subscript whenever this does not cause any confusion.
In a typical setting ˜ h is a deep neural network, f is the representation in the last internal layer of the network (i.e., the penultimate embedding layer), and ˜ g , the last layer of the network, is a linear map; similarly g in the target problem is often taken to be linear.
The learned feature map f is called a foundation model (Bommasani et al., 2021) when it can be effectively used in a wide range of tasks.
In particular, its effectiveness can be measure by its expected performance over target tasks:
[Equation]
(recall that P is the distribution associated with task T ).
Notice that while the feature map f is evaluated on the distribution of target tasks determined by D , the training of f in a foundation model, as described above, is fully agnostic of this target.
In contrast, several transfer learning methods (such as few-shot learning algorithms) have been developed which optimize f not only as a function of its training data ˜ S , but also based on some properties of
D , such as the number of classes and the number of samples per class in S .
Perhaps surprisingly, recent studies (Tian et al., 2020; Dhillon et al., 2020) demonstrate that the target-agnostic training of foundation models (or some slight variation of them, such as transductive learning) are competitve with such special purpose algorithm.
In the rest of the paper we analyze this phenomenon, and provide an explanation through the recent concept of neural collapse.
Notation.
For an integer k ≥ 1 , [ k ] = { 1 , . . . , k } .
(cid:107) · (cid:107) stands for the Euclidean norm.
For a set A = { a i } ni =1 ⊂ B and a function u ∈ U ⊂ { u (cid:48) : B → R } , we deﬁne u ( A ) =
{ u ( a 1 ) , . . .
, u ( a n ) } and U ( A ) =
{ u ( A ) : u ∈ U} .
For a distribution Q over X ⊂ R d and u : X → R p , we denote by µ u ( Q ) =
E x ∼ Q [ u ( x )] and by Var u ( Q ) =
E x ∼ Q [ (cid:107) u ( x ) − µ u ( Q ) (cid:107) 2 ] the mean and variance of u ( x ) for x ∼ Q .
For A = { a i } ni =1 ⊂ R , we denote Avg ni =
[ a i ] = 1 n (cid:80) ni
=1 a i .
For a ﬁnite set A , we denote by U
[ A ] the uniform distribution over A .
N EURAL C OLLAPSE
Neural collapse (NC) is a recently discovered phenomenon in deep learning (Papyan et al., 2020; Han et al., 2021): it has been observed that during the training of deep networks for standard classiﬁcation tasks, the features (the output of the penultimate, a.k.a. embedding layer) associated with training samples belonging to the same class concentrate around the mean feature value for the same class.
More concretely, Papyan et al.
(2020) observed essentially that the ratio of the withinclass variances and the distances between the class means converge to zero.
They also noticed that asymptotically the class-means (centered at their global mean) are not only linearly separable, but are actually maximally distant and located on a sphere centered at the origin up to scaling (they form a simplex equiangular tight frame), and furthermore, that the behavior of the last-layer classiﬁer (operating on the features) converges to that of the nearest-class-mean decision rule.
On the theoretical side, already Papyan et al.
(2020) showed the emergence of neural collapse for a Gaussian mixture model and linear score-based classiﬁers.
Poggio & Liao (2020b;a); Mixon et al.
(2020) theoretically investigated whether neural collapse occurs when training neural networks under MSE-loss minimization with different settings of regularization.
Furthermore, Zhu et al.
(2021) showed that in certain cases, any global optimum of the classical cross-entropy loss with weight decay in the unconstrained features model satisﬁes neural collapse.
Papyan et al.
(2020) deﬁned neural collapse via identifying that the within-class variance normalized by the intra-class-covariance tends to zero towards the end of the training (see Appendix B.4 for details).
In this paper, we work with a slightly different variation of within-class variation collapse, which will be later connected to the clusterability of the sample feature vectors.
For a feature map f and two (class-conditional) distributions Q 1 , Q 2 over X , we deﬁne their class-distance normalized variance (CDNV) to be
[Equation]
For ﬁnite sets S 1 , S 2 ⊂ X we deﬁne V f ( S 1 , S 2 ) =
V f
( U [ S 1 ] , U [ S 2 ]) .
Our version of neural collapse (at training) asserts that lim t →∞
Avg i (cid:54) =
j ∈ [ l ] [ V f t ( ˜ S
i , ˜ S j )] = 0 .
Intuitively, when decreasing the variance of the features of a given class in comparison to its distance from another class, we expect to be able to classify the features into the classes with a higher accuracy.
This deﬁnition is essentially the same as that of Papyan et al.
(2020), making their empirical observations about neural collapse valid for our deﬁnition (as also demonstrated in our experiments),
but our new deﬁnition simpliﬁes the theoretical analysis.
Furthermore, the theoretical results of Zhu et al.
; Mixon et al.
; Poggio & Liao (2020a;b) also identify settings in which the feature map f induced by critical points of the training loss satisﬁes Avg i (cid:54) =
j V f ( ˜ S i , ˜ S
j )
=
(for large enough sample sizes).
N EURAL C OLLAPSE ON U NSEEN D ATA
In this section we theoretically analyze neural collapse in the setting of Section 2, with particular attention of variance collapse on data not used in the training of the classiﬁer.
First, in Section 4.
we show that if neural collapse happens on the training set ˜ S , then it generalizes to unseen samples from the same task under mild, natural assumptions (given the sample size is large enough).
Next we show, in Section 4.2, that one can also expect neural collapse to happen over new classes when the classes in the source and target tasks are selected randomly from the same class distributions (given many source classes).
The signiﬁcance of these results is that they show that the feature representations learned during training are immediately useful in other tasks; we show in Section 4. how this leads to low classiﬁcation error in few-shot learning.
4. G ENERALIZATION TO N EW S AMPLES FROM THE S AME C LASS
In this section, we provide a generalization bound on the CDNV, V f ( ˜ P i , ˜ P j ) , between two source class-conditional distributions ˜ P i and ˜ P j in terms of its empirical counterpart, V f ( ˜ S i , ˜ S j ) , and cer- tain generalization gap terms bounding the difference between expectations and empirical averages for f and its variants, where f is the output of the learning algorithm with access to ˜ S .
Assume that for all c ∈ [ l ] , ˜ S c is a set of m c i.i.d.
samples drawn from ˜ P c , and for any δ ∈ (0 , 1) , let (cid:15) 1 ( ˜ P c , m c , δ ) and (cid:15)
( ˜ P c , m c , δ ) be the smallest positive values such that with probability at least 1 − δ , the learning algorithm returns a function f ∈ F that satisﬁes
[Equation]
Typically, these quantities can be upper bounded using Rademacher complexities (Bartlett & Mendelson, 2002) related to F , scaling usually as O ( (cid:112) log(1 /δ )
/m
c ) (for a ﬁxed c ), as we show in Proposition 3 (in Appendix E) for ReLU neural networks with bounded weights.
Next, we present our bound on the CDNV of the source distributions; the proof is relegated to Appendix C.
Proposition 1.
Fix two source classes, i and j with distributions ˜ P
i and ˜ P j , and let δ ∈ (0 , 1) .
Let ˜ S
c ∼ ˜ P
m c c for c ∈ { i, j } .
Let
[Equation]
j 1 ( δ/ 4) (cid:107) µ f ( ˜ P i ) − µ f ( ˜ P j ) (cid:107)
and
[Equation]
Then, with probability at least 1 − δ over ˜ S , we have V f ( ˜ P i , ˜ P j ) ≤ ( V f ( ˜ S i , ˜ S j ) + B ) (1 + A ) 2 .
Writing out the bracket, the bound in the proposition has several terms.
The ﬁrst one is the empirical
CDNV V f ( ˜ S i , ˜ S j ) between the two datasets ˜ S i ∼ ˜ P
m i i and ˜ S
j ∼ ˜ P
m j j .
This term is assumed to be small by the neural collapse phenomenon during training.
The rest of the terms are proportional to the generalization gaps (cid:15)
c 1 ( δ/ 4) and (cid:15) c
2 ( δ/ 4) — as discussed above, typically we expect these terms to scale as O ( (cid:112) log(1 /δ )
/m
c ) .
In addition, according to the theoretical analyses of neural collapse available in the literature (Papyan et al., 2020; Mixon et al., 2020; Zhu et al., 2021; Rangamani et al., 2021), under certain conditions the function f converges to a solution for which { µ f ( ˜ S i ) } li =1 form a simplex equiangular tight frame (ETF), that is, after centering their global mean, µ f ( ˜ S i ) are of equal length, and (cid:107) µ f ( ˜ S i ) − µ f ( ˜ S j ) (cid:107) are also equal and maximized for all i (cid:54)
=
j .
This implies that if f is properly normalized, the distance (cid:107) µ f ( ˜ S i ) − µ f ( ˜ S j ) (cid:107) is lower bounded by a constant, and hence A and B indeed are small (in Appendix B.3 we demonstrate empirically that the minimum distances of the class means are indeed not too small in the scenarios we consider).
Finally, we also note that with probability 1 − δ , we have (cid:107) µ f ( ˜ P i ) − µ f ( ˜ P j ) (cid:107) ≥ (cid:107) µ f ( ˜ S i ) − µ f ( ˜ S j ) (cid:107) − (cid:15) i 1 ( δ/ 2) − (cid:15)
j 1 ( δ/ 2) .
Hence, if m i and m j are large enough, (cid:107) µ f ( ˜ P i ) − µ f ( ˜ P j ) (cid:107) is larger than a constant with high probability.
Therefore, assuming m i , m j are large, if V f ( ˜ S i , ˜ S j ) is small, then we expect V f ( ˜ P i , ˜ P j ) to also be small.
That is, if neural collapse emerges in the training data of two source classes, we should also expect it to emerge in unseen samples of the same classes.
4. N EURAL C OLLAPSE G ENERALIZES TO N EW C LASSES
Previously, we showed that if the CDNV is minimized by the learning algorithm on the training data, we expect it to be small for unseen source samples.
As a next step, we show that if neural collapse emerges in the set of source classes, we can also expect it to emerge in new, unseen target classes.
To analyze this scenario, we essentially treat class-conditional distributions as data points on which the feature map f is trained (in a noisy manner, depending on the actual samples), and apply standard techniques to derive generalization bounds to new data points, which, in this case, are classconditional distributions.
Accordingly, we assume that both the source and the target classes come from a distribution over D C over a set of classes C .
Each class is represented by its class-conditional distribution, and hence, with a slight abuse of notation, we say that the source class-conditional distributions ˜ P
= { ˜ P i } li =1 are selected according to D C ( ˜ P 1 , . . .
, ˜ P l | ˜
P i (cid:54) =
˜
P j for all i (cid:54) =
j ∈ [ l ]) .
Below we show that if neural collapse emerges in the source classes, it also emerges in unseen target classes c (cid:54) =
c (cid:48) with class-conditional distributions P c , P c (cid:48) ∼ D C ( P c , P c (cid:48) | P c (cid:54) =
P c (cid:48) ) in the sense that V f ( P c , P c (cid:48) ) is expected to be small.
Our bound below applies a uniform convergence argument based on Rademacher complexities.
The Rademacher complexity of a set Y ⊂ R n is deﬁned as
R ( Y ) =
E (cid:15) sup y ∈ Y
[ (cid:104) (cid:15), y (cid:105) ] , where (cid:15) =
( (cid:15) 1 , . . .
, (cid:15) n ) ∼ U [ {± 1 } n ] .
For a given feature map f ∈ F , we also deﬁne a mapping H f : C → R p +1 as H f
( P c ) =
( µ f ( P c ) , Var f
( P c )) , and for a class of functions F ∗ , we deﬁne H F ∗ ( ˜ P ) =
{ ( H f ( ˜ P c )) lc
=1 : f ∈ F ∗ } .
Proposition 2.
Let F ∗ ⊂
F be any ﬁnite set of functions with ∆( F ∗ ) =
inf
[Equation]
inf P
[Equation]
= P
[Equation]
(cid:107) µ f ( P c ) − µ f
( P c (cid:48) )
(cid:107) > 0 .
Then, with probability at least 1 − δ over the selection of source class distributions ˜ P ,
[Equation]
The above proposition, proved in Appendix D (based on Corollary 3 of Maurer & Pontil, 2019), provides an upper bound on the discrepancy between the expected value of E P c (cid:54) = P c (cid:48) [ V f ( P c , P c (cid:48) )] and the averaged value Avg i (cid:54) =
j [ V f ( ˜ P i , ˜ P j )] across a set of source distributions ˜ P 1 , . . . ,
˜ P l that were sampled from D C .
In addition, we treat F ∗ as a set of candidate functions from which the learning algorithm selects its candidates.
Similarly to Corollary 3 of Maurer & Pontil (2019), this set is assumed to be ﬁnite only for technical (measurability) reasons.
The proposition shows that if Avg i (cid:54) =
j [ V f ( ˜ P i , ˜ P j )] is small, we expect E P c (cid:54) = P c (cid:48) [ V f ( P c , P c (cid:48) )] to be small, if the source data is representative enough, as discussed below.
First note that by Proposition 1, each term V f ( ˜ P i , ˜ P j ) is expected to be small in the presence of neural collapse (for large enough training sets ˜ S c ), so their average Avg i (cid:54) =
j [ V f ( ˜ P i , ˜ P j )] is also small.
According to Proposition 4 in Appendix E, the Rademacher complexity in the bound scales as O ( p √ l ) for ReLU networks with bounded weights, so the corresponding term in the bound is O ( p/ ( √ l ∆( F ∗ ) 2 )) , which is of similar order as the last term (neglecting the supremum terms and the dependence on p for now).
Hence, the bound tends to zero as the number of source classes l increases as long as ∆( F ∗ ) is not too small (in particular, is not zero).
While there is no way to guarantee this (e.g., if two classconditional distributions are too close, ∆( F ∗ ) can be very small), we can say that if the feature maps f ∈ F ∗ keep the classes apart, the bound may become reasonably small.
If the feature dimension p is large and f ∈ F ∗ are similar to random maps, this assumption typically holds (e.g., if f is not a constant function, which can be expected with a proper training method).
Even when the number of classes is very large, the bound can be reasonable: if the corresponding feature means are more-or-less uniformly distributed in a p -dimensional unit cube for all f ∈ F ∗ , ∆( F ∗ )
=
Ω( √ p · |C| − 2 /p )
(see Lemma 2 in Appendix F), and hence combining with the dependence of the Rademacher complexity on l and p , and the fact that Var f ( P (cid:48) ) ≤ p and sup x,f (cid:107) f ( x ) (cid:107) ≤ √ p , the bound is O ( (cid:112) p/l · |C| 6 /p ) which tends to zero as l increases.
4. CDNV AND C LASSIFICATION E RROR
Next, we study the relation between the CDNV and the classiﬁcation performance it induces.
Consider a balanced k -class classiﬁcation problem with class distributions P 1 , . .
, P k , datasets S c ∼ P n c c , c ∈ [ k ] and n 1 = . . .
= n k .
Let S = ∪ c ∈
[ k ] S c denote all the samples and consider the ‘nearest empirical mean’ classiﬁer h S,f ( x ) =
arg min c ∈ [ k ] (cid:107) f
( x ) − µ f ( S c ) (cid:107) (note that h S,f is a classiﬁer with convex polytope cells on top of f , and it is a linear classiﬁer when k = 2 ).
Then, as it is shown in Proposition 5 in Appendix G the expected classiﬁcation error of h S,f is upper bounded by 16( k − 1)
Avg i (cid:54) =
j V f ( P i , P j )(1 + 1 /n c ) and if f ◦ P 1 and f ◦ P 2 are spherically symmetric, then the classiﬁcation error is upper bounded by 16( k − 1)
Avg i (cid:54) =
j V f ( P i , P j )(1 /p + 1 /n c ) .
Therefore, in case of neural collapse (i.e., small Avg i (cid:54) = j V f ( P i , P j ) ), the error probability is small, explaining the success of foundation models in the low-data regime (such as in few-shot learning problems) in the presence of neural collapse.
Putting together Propositions 1 and 2, and Proposition 5, it follows that, with high probability (over the selection of the source, as well as the source samples), the expected error (over the target classes and target samples) of a nearest class-mean classiﬁer over the target classes can be bounded by the average neural collapse over the source training samples plus
[Table]
terms which converge to zero as the number of source training samples m c , as well as the number of source classes l increase
[Table]
E XPERIMENTS
In this section we experimentally analyze the neural collapse phenomenon and how it generalizes to new data points and new classes.
We use reasonably good classiﬁers to demonstrate that, in addition to the neural collapse observed in training time by Papyan et al.
(2020), it is also observable on test data from the same classes, as well as on data from new classes, as predicted by our theoretical results.
We also show that, as expected intuitively, neural collapse is strongly correlated with accuracy in few-shot learning scenarios.
The experiments are conducted over multiple datasets and multiple architectures, providing strong empirical evidence that neural collapse provides a compelling explanation for the good performance of foundation models in few-shot learning tasks.
Experimental results are reported averaged over 20 random initialization together with 95% conﬁdence intervals.
5. S ETUP
Method.
Following our theoretical setup, we ﬁrst train a neural network classiﬁer ˜ h
= ˜
g ◦ f on a source task.
Then we evaluate the few-shot performance of f on target classiﬁcation tasks by training a new classiﬁer
h = g ◦ f , by minimizing the cross-entropy loss between its logits and the one-hot encodings of the labels.
The training is conducted using SGD with learning rate η and momentum 0 .
9 with batch size 64 .
Here, ˜ g is the top linear layer of the neural network and f is the mapping implemented by all other layers.
At the second stage, given a target few-shot classiﬁcation task with training data S = { ( x i , y i ) } ni =1 , we train a new top layer g as a solution of ridge regression acting on the dataset { ( f ( x i ) , y i ) } ni =1 with regularization λ n = α √ n .
Thus, g is a linear transformation with the weight matrix w S,f = ( f ( X ) (cid:62) f
( X ) + λ n I ) − 1 f ( X ) (cid:62) Y , where f ( X ) is the n × d data matrix for the ridge regression problem containing the feature vectors { f ( x i ) }
(i.e., f ( X ) (cid:62) =
[ f ( x 1 ) , . . .
, f ( x n )] ) and Y is the n × k label matrix (i.e., Y (cid:62) =
[ y 1 , . . .
y n ] ), where X ∈ R n × d , Y ∈ R n × k and f θ ( X ) ∈ R n × p .
We did not apply any form of ﬁne-tuning for f at the second stage.
In the experiments we sample 5-class classiﬁcation tasks randomly from the target dataset, with n c training samples for each class (thus, altogether n = 5 n c above), and measure the performance on 100 random test samples from each class.
We report the resulting accuracy rates averaged over 100 randomly chosen tasks.
Architectures and hyperparameters.
We experimented with two types of architectures for ˜ h : wide ResNets (Zagoruyko & Komodakis, 2016) and vanilla convolutional networks of the same structure without the residual connections, denoted by WRN- N - M and Conv- N - M , where N is the
[Table]
C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration
C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 22 2 C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 0.45 0.
A cc u r a c y
[Figure]
{+4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 2 3 22 1 22 1 
+}
C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration3 22 1 22 1 
 C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration
C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 0.
A cc u r a c y
[Figure]
log scale). In each experiment we trained the model on a different number of source classes l ∈ { 5 , 10 , 20 , 30 , 40 , 50 , 60 } (as indicated in the legend). depth and M is the width factor. We used the following default hyperparameters: η = 2 − 4 , batch size 64 and α = 1 .
In Figs.
2-3 of the appendix we provide experiments showing that the results are consistent for different η .
We also provide experiments with a standard learning-rate schedule.
See
Appendix A for a complete description of the architectures.
Datasets.
We consider four different datasets: (i) Mini-ImageNet (Vinyals et al., 2016); (ii)
CIFAR-FS (Bertinetto et al., 2019); (iii) FC-100 (Oreshkin et al., 2018); and (iv) EMNIST (balanced)
(Cohen et al., 2017).
For a complete description of the datasets, see Appendix A.
5. R ESULTS
While the ridge regression method to train the few-shot classiﬁer g may seem simplistic, it provides reasonably good performance, and hence it is suitable for studying the success of recent transfer/transductive learning methods (Dhillon et al., 2020; Tian et al., 2020) for few-shot learning.
To demonstrate this, we compared the 1 and 5-shot performance of our simplistic method to several few-shot learning algorithms on Mini-ImageNet, CIFAR-FS and FC-100, summarized in Table 1.
On each dataset, we report the average performance of our method on epochs between 90 and 100.
As can be seen, the method we study in this paper is competitive with the rest of the literature on the three benchmarks, especially in the 1-shot case (even achieving the state of the art on FC-100).
1 To improve the performance of our method a bit, we employed a standard learning rate scheduling with initial learning rate η = 0 .
05 , decayed twice by a factor 0 .
1 after 30 epochs each (accuracy rates are reported averaging over epochs 90–100, as before).
Since the performance of these networks plateaued slightly after the ﬁrst learning rate decay on the source test data, we also applied model selection based on this information, and used the network from the ﬁrst 60 epochs (to avoid overﬁtting to the source data and classes happening with the smallest learning rate) with the best source test performance.
The combination of these two variations typically resulted in a small improvement of a few percentage points in the problems considered, see the last line of Table 1.
As our main experiment, we validate the theoretical assessments we made in Section 4.
We argued that in the presence of neural collapse on the training classes, the trained feature map can be used for training a classiﬁer with a small number of samples on new unseen classes.
The argument asserts that if we observe neural collapse on a large set of source classes, then we expect to have neural collapse on new unseen classes as well, when assuming that the classes are selected in an i.i.d. manner.
In this section we demonstrate that neural collapse generalizes to new samples from the same classes, and also to new classes, and we show that it is correlated with good few-shot performance.
To validate the above, we trained classiﬁers ˜ h with a varying number of l randomly selected source classes.
For each run, we plot in Figure 1 the CDNV as a function of the epoch for the training and test datasets of the source classes and over the test samples of the target classes.
In addition, we plot the 5-shot accuracy of ridge regression using the learned feature map f .
Similar experiments with different numbers of target samples are reported in Figures 4 and 5 in the appendix.
As it can be seen in Figure 1, the CDNV decreases over the course of training on both training and test datasets of the source classes, showing that neural collapse generalizes to new samples from the training classes.
Since the classiﬁcation tasks with fewer number of source classes are easier to learn, the CDNV tends to be larger when training with a wider set of source classes.
In contrast, we observe that when increasing the number of source classes, the presence of neural collapse in the target classes strengthens.
This is in alignment with our theoretical expectations (the more “training” classes, the better generalization to new classes), and the few-shot performance also consistently improves when the overall number of source classes is increased.
Note that in practice the CDNV does not decrease to zero (due to the limited sample sizes), and plateaus at a value above 1 on the target classes since we use a relatively small number of source classes (at most 60 here and 64 in the appendix).
To validate the generality of our results, this phenomenon is demonstrated in several settings, e.g., using different network architectures and datasets in Figure 1.
As can be seen, the values of the CDNV on the target classes are relatively large compared to those on the source classes, except for the results on EMNIST.
However, these values still indicate a reasonable fewshot learning performance, as demonstrated in the experiments.
These results consistently validate our theoretical ﬁndings, that is, that neural collapse generalizes to new source samples, it emerges for new classes, and its presence immediately facilitates good performance in few-shot learning.
In Appendix B.2, we also demonstrate that similar phenomena can be observed for feature maps obtained from lower layers of the network, as well, although to a lesser extent.
C ONCLUSIONS
Employing foundation models for transfer learning is a successful approach for dealing with overﬁtting in the low-data regime.
However, the reasons for this success are not clear.
In this paper we presented a new perspective on this problem by connecting it to the newly discovered phenomenon of neural collapse.
We showed that the within-class variance collapse tends to emerge in the test data associated with the classes encountered at train time and, more importantly, in new unseen classes when the new classes are drawn from the same distribution as the training classes.
In addition, we showed that when neural collapse emerges in the new classes, then it requires very few samples to train a linear classiﬁer on top of the learned feature representation that accurately predicts the new classes.
These results provide a justiﬁcation to the recent successes of transfer learning in few-shot tasks, as observed by Tian et al.
(2020) and Dhillon et al.
A CKNOWLEDGEMENTS
During this work, Tomer Galanti was a research scientist intern at DeepMind.
The authors would like to thank Csaba Szepesv´ari and Razvan Pascanu for illuminating discussions during the preparation of this manuscript and Miruna Pˆıslar for her priceless technical support
A E XPERIMENTAL D ETAILS
Datasets.
Throughout the experiments, we consider four different datasets: (i) MiniImageNet (Vinyals et al., 2016) and (ii) CIFAR-FS (Bertinetto et al., 2019), (iii) FC-100 (Oreshkin et al., 2018) and EMNIST (balanced)
(Cohen et al., 2017).
Each dataset is split into meta-train, metavalidation and meta-test classes; we select the data for the source classes from the meta-training, and use similarly the meta-test data for the target tasks (we do not use the meta-validation classes).
Each one of the class splits is also partitioned into train and test samples; we use these for training and evaluating our models.
The Mini-ImageNet dataset contains 100 classes randomly chosen from ImageNet ILSVRC-2012 (Russakovsky et al., 2015) with 600 images of size 84 × 84 pixels per class.
It is split into 64 meta-training classes, 16 meta-validation classes and 20 classes for meta-testing.
CIFAR-FS and FC-100 are two derivatives of the CIFAR-100 dataset (Krizhevsky, 2012).
CIFARFS consists of a random split of the CIFAR-100 classes into 64 classes for meta-training, 14 for meta-validation and 20 for meta-testing.
FC-100 contains 100 classes which are grouped into 20 superclasses.
These classes are partitioned into 60 meta-train classes from 12 superclasses, 20 classes from 4 superclasses for meta-validation, and 20 meta-test classes from 4 superclasses.
We also consider the EMNIST dataset, which is an extension of the original MNIST dataset.
We randomly split its classes into 35 source classes and 12 target classes (which are: 2, 10, 11, 12, 13, 16, 18, 22, 25, 33, 34, 44).
We use random cropping augmentations at training time across all of the experiments.
Architectures.
We experimented with two types of architectures for ˜ h : wide ResNets (Zagoruyko & Komodakis, 2016) and vanilla convolutional networks.
Wide ResNets start with a convolutional layer (with kernels 3 × 3 and 16 output channels), followed by three groups of layers.
Each group of layers includes a convolutional layer, followed by a sequence of N residual layers.
Each residual layer in the i ’th group contains two convolutional layers using 3 × 3 kernels and output 2 i +3 M channels.
Each convolutional layer is followed by a ReLU activations and batch normalization post activations.
The network’s penultimate layer is a mean pooling activation with kernels of size 4 × 4 , returning an output of dimension 256 and followed by a linear layer.
The vanilla convolutional networks have the same architectures as the wide ResNets, except that we omit the residual connections.
The networks are denoted by WRN- N - M and Conv- N - M , respectively.
B A DDITIONAL E XPERIMENTS
In this section we report additional experiments to provide further insights.
B. V ARYING H YPERPARAMETERS
We start by presenting experimental results to validate the consistency of our ﬁndings when varying different hyperparameters.
Varying learning rates.
We repeated the experiments in rows 1 and 4 of Figure 1 with learning rates η = 2 − 2 i − 2 for i = 1 , 2 , 3 , 4 .
We also report the train and test accuracy rates on the source data.
The results are reported in Figure 2 and Figure 3.
The results are consistent with the observations we had in Figure 1.
Interestingly, when using smaller learning rates, the CDNV over the source training and test data tends to be smaller, while the CDNV on the target classes tends to be larger.
We attribute this observation to overﬁtting to the source classes and indeed we observe that the few-shot performance is generally worse in those cases.
Learning rate scheduling and varying number of target samples.
To further demonstrate the relationship between neural collapse and generalization to new classes, we experimented with the default learning rate and standard learning rate scheduling (also used by Tian et al.
(2020)), with varying number of target samples.
In this experiment, we trained WRN-28-4 using SGD with the default learning rate and learning rate scheduling, starting with learning rate η = 0 .
with decay factor 0 .
1 which is applied every 30 epochs twice.
For the default training setting, in Figure 4(a-c) we report the dynamics of the CDNV on the source training data, the source test data (i.e., unseen test samples from the source classes), and the target classes (resp.) and in Figure 5(d-g) we plot the 1, 5, 10 and 20-shot accuracy rates of the network during training time.
The results of learning rate scheduling are provided in Figure 5.
Similarly to Figure 1, as expected, we can observe that when increasing the number of source classes, the few-shot performance improves, while the CDNV on the target classes tends to decrease.
Also, in line with our theory, the CDNV on the target classes is negatively correlated with the few-shot performance, that is, better neural collapse yields better performance.
For example, in Figure 5(d-g) it is evident that the peak performance on all few-shot experiments for the case of 64 source classes is achieved around the minimal value of the CDNV on the target classes in Figure 5(c).
This is achieved around iteration 16 , 000 for CIFAR-FS and around iteration 20 , 000 for Mini-ImageNet, a little bit after the ﬁrst learning rate decay (at 15 , 000 and 18 , 000 steps, respectively).
As can be seen, the performance slightly decreases after the peak iteration, while the CDNV on the target classes slightly increases, when the training starts to overﬁt to the source data and the source classes.
This effect can be mitigated by selecting the ﬁnal network based on the performance on the source test data, as we show in Table 1.
B. N EURAL C OLLAPSE AND L OWER L AYERS
We conducted a comparison between the behaviour of the penultimate layer (the top embedding layer) and a lower layer in the network, as the feature layer.
We trained a WRN-28-4 on CIFARFS using the default hyperparameters as described in Section 2, but in this experiment we used the second-to-last embedding layer of the network as the feature layer for few-shot learning.
A comparison of the behavior of this layer and the top embedding layer (that we use everywhere else in the paper) is shown in Figure 6 in terms of the CDNV on the source training data, the source test data, and the new classes (the target data), as well as for the 5-shot 5-class classiﬁcation accuracy.
As can be seen, the few-shot performance of the top embedding layer is superior to the performance of the lower layer.
This is in agreement with the evidently smaller values of the CDNV given by the top embedding layer in comparison to the second-to-last embedding layer in all three cases (i.e., source train and test data and the target data).
Nevertheless, we can see that the neural collapse phenomenon and the associated good few-shot performance is preserved in this lower layer of the network, however, less pronounced.
B. D YNAMICS OF THE C LASS -E MBEDDING D ISTANCES
In Section 4.1 we argued that the generalization bound in Proposition 1 is meaningful when the minimal distances min i (cid:54) =
j (cid:107) µ f ( ˜ S i ) − µ f ( ˜ S j ) (cid:107) 2 (between the empirical class means) and min i (cid:54) =
j (cid:107) µ f ( ˜ P i ) − µ f ( ˜ P j ) (cid:107) 2 (between the true class means) are not too small.
Therefore, we empirically investigated their dynamics during training in our standard setting (WRN-28-4 with the default hyperparameters, see Section 2) on CIFAR-FS, considering a varying number l ∈ { 5 , 10 , 20 , 30 , 40 , 50 , 60 } of source classes and learning rates η ∈ { 2 − 2 i − 2 } 4 i =1 .
As can be seen in Figure 7, the values of min i (cid:54) =
j (cid:107) µ f ( ˜ S i ) − µ f ( ˜ S j ) (cid:107) 2 and min i (cid:54) =
j (cid:107) µ f ( ˜ P i ) − µ f ( ˜ P j ) (cid:107) 2 tend to increase during training.
For completeness, we also plotted the values of min i (cid:54) =
j (cid:107) µ
f ( P i ) − µ f ( P j ) (cid:107)for the target classes { P c } kc =1 ( k = 20 for CIFAR-FS).
Interestingly, min i (cid:54) =
j (cid:107) µ
f ( P i ) − µ f ( P j ) (cid:107)tends to grow with the number of source classes, showing improved generalization to new classes.
B. C LASS -C OVARIANCE N ORMALIZED V ARIANCE
In this section we consider the formal deﬁnition of Papyan et al.
(2020) for neural collapse (their ﬁrst deﬁnition), which uses a normalized variance deﬁnition somewhat different from CDNV we used in our analysis.
For completeness, we present some experiments which demonstrate that our ﬁndings based on CDNV also apply to their normalization.
To give the formal deﬁnition, consider a training set ˜ S
= (cid:83) lc
=1 ˜ S c = (cid:83) lc
=1 { (˜ x cj , c ) } m c
j =1 for an l -class classiﬁcation problem, where ˜ S c is a collection of m c samples from class c .
Assume that a neural network is trained to classify the samples in ˜ S , where after t steps of the training we obtain the classiﬁer ˜ h t = ˜
g
t ◦ f t , where, as before, ˜ g t denotes the linear map of the last layer of the network, and f t is the feature map.
Class-Covariance Normalized Variance.
Papyan et al.
(2020) deﬁne the class-covariance normalized variance (CCNV) to deﬁne neural collapse:
For a given feature map f , let ˜ µ fc = µ f ( ˜ S c ) denote the mean feature value of class c , and let ˜ µ fG =
Avg lc =1 [˜ µ fc ] denote the global fea- [Table] [Table] [Table]
[Table]
[Table] C D N V [Table] [Table]
[Table]
C D N V
[Table] [Table]
C D N V [Table] [Table] [Table]
[Table] [Table] [Table] [Table]
C D N V
[Table] [Table] [Table] [Table]
C D N V
[Table]
[Table]
[Figure]
A cc u r a
[Figure]
ture mean. The CCNV is deﬁned to be Tr (cid:16) Σ fW Σ fB † (cid:17) , where Σ fW and Σ fB are the intra- and inter-class covariance matrices Σ fW = Avg c ∈ [ l ] j ∈ [ m c ] (cid:2) ( f (˜ x cj ) − ˜ µ fc ) · ( f (˜ x cj ) − ˜ µ fc ) (cid:62) (cid:3) and Σ fB = Avg c ∈ [ l ] (cid:104) (˜ µ f c − ˜ µ f G ) · (˜ µ f c − ˜ µ f G ) (cid:62) (cid:105) , where A + stands for the Moore-Penrose inverse of a (square)
[Table]
[Table] [Table] [Table]
[Table]
C D N V
[Table]
[Table]
[Table] [Table] [Table] [Table]
C D N V
[Table]
N V
[Table]
{+C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 
+}
[Table]
[Table]
C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 22 3 22 1 22 1 
[-C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 
-]
C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10
[Table]
C D N V
[Table]
[-A cc u r a c y 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 
-]
[Table] [Table]
u r[-a c y 
-]
[Table]
y
[Table]
A
[Table]
u r
[Table]
[-[Table] [Table] C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 
-]c y
[Table] [Table]
[-C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 
 [Table]-]A
[Table]
u r
[Table]
c
[Table]
[Table] [Table]
N
[Table]
4 9 4 10 4 11 Iteration
C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 
 C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration
C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 0.
A cc u r a c y 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 0. A cc u r a c y 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 0.
A cc u r a c y 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 0.
A cc u r a c y
[Figure]
i ’th column stands for the results when training with learning rate η = 2 − 2 i − 2 .
matrix A .
According to Papyan et al.
(2020), (their ﬁrst version of) neural collapse happens if
[Equation]
In Figures 10 and 11 we plot the CCNV as a function of training iterations on the source training data, source test data and target classes.
As can be seen, the value of the CCNV decreases on the train and test data of the source classes.
In addition, the CCNV on the target classes decreases when training with a larger set of source classes, which is due to better generalization.
In contrast, the
CCNV on the source classes increases when training with a larger set of source classes, since it increases the complexity of the optimization problem.
These results are qualitatively very similar to the once presented for CDNV, showing that both deﬁnitions of neural collapse behaves essentially the same way.
The corresponding train/test/few-shot accuracy rates are provided in Figures 2-3.
In
Figures 8-9 we provide the CDNV, CCNV and accuracy rates of training WRN-28-4 and Conv-28on Mini-ImageNet and CIFAR-FS (resp.)
with a varying number of source classes.
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Figure]
[Figure]
[Figure]
[Figure]
[Figure]
[Figure]
[Figure]
[Figure]
[Figure]
[Figure]
[Table]
[Table] [Table]
[Table]
[Table]
[Table]
[Figure]
[Figure]
C D N V top
[Figure]
4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 Iteration
C D N V top layer middle layer 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 Iteration
C D N V top layer middle layer 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 Iteration 0.
[Figure]
A cc u r a c y
[Figure]
[Table] [Table] [Table] [Table]
222d i s t a n c e
[Table] [Table]
22222d i s t a n c e
[Table] [Table] [Table] [Table]
[Table]
[Table]
i
[Table]
t
[Table]
n
[Table]
[Table]
[Table]
[Table]
10 4 11 Iteration 222d i s t a n c e  4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 2222d i s t a n c e  4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 2222d i s t a n c e  4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 2222d i s t a n c e
[Figure]
[Figure]
C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 22 2 C D N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 22 1 22 1 22 3
CC N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 
 CC N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration
CC N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 0.
A cc u r a c y 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 0.0 0. A cc u r a c y 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 0.45 0.
A cc u r a c y
[Figure]
[Table]
[Table] [Table]
[Figure] [Figure]
[Figure]
504 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 22 2 22 0 22 2
CC N V
[Figure]
4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration
CC N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 
 CC N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration
CC N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration
CC N V
[Figure]
[Table] [Table]
[Table]
5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration
CC N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration 
 CC N V 4 0 4 1 4 2 4 3 4 4 4 5 4 6 4 7 4 8 4 9 4 10 4 11 Iteration
CC N V
[Figure]
C P ROOF OF P ROPOSITION
Lemma 1.
Let ˜ P c be a class distribution, δ ∈ (0 , 1) and
˜ S c = { ˜ x cj } m c j =1 ∼ ˜ P m c c be a dataset of m c samples.
Let f be the output of the learning algorithm.
If
[Equation]
then we have
[Equation]
Proof.
Recall that
[Equation]
We would like to upper bound E
x ∼ ˜ P c
[ (cid:107) f
( x ) (cid:107) 2 ] in terms of Avg x ∈ ˜ S
c
[ (cid:107) f
( x ) (cid:107) 2 ] and to lower bound (cid:107) E x ∼ ˜ P c
[ f ( x )] (cid:107) 2 using (cid:107) Avg x ∈ ˜ S c
[ f ( x )] (cid:107) 2 .
By (2),
[Equation]
By the triangle inequality
[Equation]
By (2),
[Equation]
Hence,
[Equation]
which implies
[Equation]
Combining (5) and (6) [Equation] we obtain
[Equation]
completing the proof.
Proposition 1.
Fix two source classes, i and j with distributions ˜ P
i and ˜ P j , and let δ ∈ (0 , 1) .
Let ˜ S
c ∼ ˜ P
m c c for c ∈ { i, j } .
Let
A
[Equation]
and
[Equation]
Then, with probability at least 1 − δ over ˜ S , we have V f ( ˜ P i , ˜ P j ) ≤ ( V f ( ˜ S i , ˜ S j ) + B ) (1 + A ) 2 .
Proof.
By deﬁnition and the union bound, with probability at least 1 − δ , the following inequalities hold simultaneously for all c ∈ { i, j } :
[Equation]
In the rest of the proof
[Equation]
we assume that the above inequalities hold
[Equation]
Let ∆ = (cid:12)(cid:12)(cid:12) (cid:107) µ f ( ˜ P i ) − µ f ( ˜ P j ) (cid:107) 2 − (cid:107) µ f ( ˜ S i ) − µ f ( ˜ S j ) (cid:107) 2 (cid:12) (cid:12) (cid:12) .
By simple algebraic manipulations,
[Equation]
[Equation]
By (7) and Lemma 1 we have
[Equation]
Multiplying both sides of (8) by Var f
( ˜ P c ) , and using (9), combining the above inequality with (8) [Equation] we obtain
[Equation]
(10) over c ∈ { i, j } gives
[Equation]
By the triangle inequality and (7)
[Equation]
and by a symmetric argument, (cid:12)(cid:12)(cid:12)
[Equation]
This and (7) imply
[Equation]
Plugging the above bound into (11) shows that, with probability at least 1 − δ ,
V f ( ˜ P i , ˜ P j ) ≤ V f ( ˜ S i , ˜ S j )
[Equation]
4) (cid:107) µ f ( ˜ P i ) − µ f ( ˜ P j ) (cid:107) + (cid:34) (cid:15) i 1 ( δ/ 4) + (cid:15)
j 1 ( δ/ 4) (cid:107) µ f ( ˜ P i ) − µ f ( ˜ P j ) (cid:107) (cid:35) 2 

+ 2 Avg c ∈{ i,j } (cid:104) (cid:15) c 2 ( δ/ 4) + 2 (cid:107) µ f ( ˜ P c ) (cid:107) · (cid:15) c 1 ( δ/ 4) + (cid:15) c 1 ( δ/ 4) 2 (cid:105) · (cid:16) (cid:15) i 1 ( δ/ 4) + (cid:15)
j 1 ( δ/ 4) (cid:17) (cid:107) µ f ( ˜ P i ) − µ f ( ˜ P j ) (cid:107) · (cid:107) µ f ( ˜ S i ) − µ f ( ˜ S j ) (cid:107)+ Avg c ∈{ i,j } (cid:104) (cid:15) c 2 ( δ/ 4) + 2 (cid:107) µ f ( ˜ P c ) (cid:107) · (cid:15) c 1 ( δ/ 4) + (cid:15) c 1 ( δ/ 4) 2 (cid:105) · (cid:16) (cid:15) i 1 ( δ/ 4) + (cid:15)
j 1 ( δ/ 4) (cid:17)(cid:107) µ f ( ˜ P i ) − µ f ( ˜ P j ) (cid:107) 2 · (cid:107) µ f ( ˜ S i ) − µ f ( ˜ S j ) (cid:107)+
Avg c ∈{ i,j } (cid:104) (cid:15) c
2 ( δ/ 4) + 2 (cid:107) µ f ( ˜ P c ) (cid:107) · (cid:15) c 1 ( δ/ 4) + (cid:15) c 1 ( δ/
[Equation]
completing the proof
[Equation]
D P ROOF OF P ROPOSITIONS
Proposition 2.
Let F ∗ ⊂
F be any ﬁnite set of functions with ∆( F ∗ ) =
inf
[Equation]
inf P
[Equation] = P c [Equation] (cid:107) µ f
[Equation]
P c ) − µ f
( P c
[Equation]
) (cid:107) > 0 .
Then, with probability at least 1 − δ over the selection of source class distributions ˜ P ,
[Equation]
To prove this proposition, we apply Theorem 2 of Maurer & Pontil (2019).
In order to do so, we need the following deﬁnitions (their Deﬁnition 1):
Let U be any set and A : U l → R .
For z = ( z 1 , . . .
, z l ) , j ∈ { 1 , . . .
, l } and z (cid:48)
j ∈ U , we deﬁne the j -th partial difference operator on A as
[Equation]
In addition, we denote
[Equation]
and
[Equation]
and the maximal difference
[Equation]
Now we are ready to proceed with the proof.
Proof.
Let U
=
H F ∗ ( C ) , z
= ( u i , v i ) li =1 ∈
U l , I a (cid:54) =
b =
I [ a (cid:54) =
b ] and
[Equation]
i −
[Equation]
Furthermore, assume that P = { P 1 , . .
, P l } ∼ D C ( P 1 , . . .
, P l | ∀ i (cid:54) =
j ∈ [ l ] : P i (cid:54) =
P j ) is an independent and identical copy of ˜ P .
Then, by Corollary 3 of Maurer & Pontil (2019) and the fact that the Gaussian complexity of any set A ⊂ R l is at most 2 (cid:112) log( l ) times its Rademacher complexity, with probability at least 1 − δ over the selection of ˜ P , [Equation]
[Equation]
Since ˜ P 1 , . . .
, ˜ P l are sampled such that ˜ P i (cid:54) =
˜
P j (for all i (cid:54) =
j ∈ [ l ] ) and ∆( F ∗ ) > 0 , we have
I [ µ f ( ˜ P i ) (cid:54) =
µ f ( ˜ P j )]
= 1 for all i (cid:54) =
j , and so
[Equation]
Similarly, we have A (( H f ( P )) =
Avg i (cid:54) =
j [ V f ( P i , P j )] , and by the linearity of expectation, E
P [ A ( H f ( P ))]
=
E P c (cid:54) =
P c (cid:48)
[ V f ( P c , P c (cid:48) )] .
By substituting these into (12), we obtain that for any f ∈ F ∗ , we have
[Equation]
To ﬁnish the proof, we bound M ( A ) , J ( A ) and K ( A ) .
Let j ∈ [ l ] be some index and z (cid:48)
=
( z i ) li =
=
( u (cid:48)
i , v (cid:48) i ) li =
1 ∈
U l be a vector, such that, z (cid:48)
i =
z i for all i (cid:54) =
j and z (cid:48)
j (cid:54) =
z j .
Then,
[Equation]
since only pairs involving j are non-zero in the average deﬁning A .
To simplify notation, let a = (cid:107) u
i − u j (cid:107) and b = (cid:107) u
i − u (cid:48)
j (cid:107) and c = (cid:107) z j − z
[Equation]
j [Equation]
= [Equation] u j [Equation]
v j ) − [Equation]
u [Equation] [Equation]
Next we bound the terms in the sum in (14) individually.
We divide the analysis into three cases:
Case 1.
Assume u
i =
u j = u (cid:48)
j .
In this case we simply have
[Equation]
Case 2.
Assume u i (cid:54) =
u j and u i = u (cid:48)
j (a bound can be obtained similarly for u i =
u j and u i (cid:54) = u (cid:48) j ).
In this case, since z i , z j ∈ U , we have v i , v j ≤
[Equation]
In addition, since c ≥ (cid:107) u i − u j
[Equation]
≥ ∆( F ∗ ) , we have
[Equation]
Case 3.
Assume u
i (cid:54) =
u j and u i (cid:54) = u (cid:48)
j .
By simple algebraic manipulations, we have
[Equation]
[Equation]
where the last inequality follows from the triangle inequality.
Since (cid:107) u j − u
[Table]
≤
[Table] u [Table] +
[Table] u [Table] ≤ 2 sup x ∈X , f ∈F ∗ (cid:107) f
[Table] x )
[Table]
and v i , v
[Table]
≤ sup
[Table] [Table]
, we have
[Table]
We notice that (cid:107) u
j − u (cid:48)
j (cid:107) ≤ c and | v j − v (cid:48)
j | ≤ c .
Therefore, we obtain
[Equation]
Therefore
[Equation]
in each case we have
[Equation]
and also
[Equation]
Hence,
[Equation]
and
[Equation]
Therefore, K ( A ) and M ( A ) are also bounded by the right hand sides of (17) and (18).
Next, we upper bound J ( A ) .
Let r (cid:54) =
j and z (cid:48) r ∈ U .
We have
D
[Equation]
[Table]
[Equation]
[Table]
[Equation]
[Table]
[Table]
c −
[Table]
c ≤
[Table]
c
[Table]
+
[Table]
c
[Table]
Hence, by (18) we have
[Equation]
Substituting the bounds of M ( A ) , K ( A ) and J ( A ) into (13) proves the proposition.
E A NALYSIS FOR S ECTIONS 4.1-4.
In this section we analyze the asymptotic behaviour of (cid:15) c 1 ( δ ) and (cid:15) c
2 ( δ ) (see Section 4.1), as well as of E ˜ P
[ R ( H F ∗ ( ˜ P ))]
(see Proposition 2) for ReLU neural networks.
A ReLU neural feature map 2 is a function of the form f ( x ) =
W q σ ( W q − 1 . . .
σ ( W 1 x )) :
R d → R p , where σ is the element-wise
ReLU function σ ( x ) = max(0 , x ) , and W i ∈
R d i +1 ×
d i for i ∈ [ q ] , where d 1 = d and d q +1 = p .
Throughout this section, we use F to denote the set of ReLU neural feature maps (with the depth q and the dimensions d 1 , . . .
, d q +1 of the layers ﬁxed).
The spectral complexity of a network f is deﬁned as C ( f ) = max j ∈
[ p ] (cid:107) W qj (cid:107)· (cid:81) q − 1 r =1 (cid:107) W r (cid:107) where for vectors, (cid:107)·(cid:107) denotes the Euclidean norm, while for matrices, it is the spectral ( L 2 -induced) norm.
This quantity upper bounds the Lipschitz constant of f and is similar in fashion to other (slightly different) notions of spectral complexity for neural networks (Golowich et al., 2017; Bartlett et al., 2017).
Throughout the section, for a given function g : A → B k and j ∈ [ k ] , we denote the j ’th coordinate of g ( x ) by g ( x ) j and for a class G ⊂ { g : A → B k } , we deﬁne G | j = { g ( · ) j : g ∈ G} .
Before presenting the main claims of this section, following Poggio et al. (2020), we start with describing a canonical representation of ReLU neural networks (the proofs of our statements are given for this representation). Since max(0 , ax ) = a max(0 , x ) , for all x ∈ R and a ≥ 0 , any neural network f = W q σ ( W q − 1 . . .
σ ( W 1 x )) ∈ F can be represented as a modiﬁed network f (cid:48)
( x ) =
V q σ ( V q − 1 . . .
σ ( V 1 x )) , where V q = W q · (cid:81) q − 1 r =1 (cid:107) W r (cid:107) and ∀ r ≤ q − 1 : V r = W r (cid:107) W r (cid:107) .
In particular, (cid:107) V r (cid:107) =
1 for all r ≤ q − 1 and, since V q = W qj · (cid:81) q − 1 r =1 (cid:107) W r (cid:107) , max j ∈ p (cid:107) V qj (cid:107) =
max j ∈ p (cid:107) W qj (cid:107) · (cid:81)
q − 1 r =1 (cid:107) W r (cid:107) =
C ( f ) .
Thus, for any f ∈ F , there exists an equivalent neural network f (cid:48) which belongs to the set
F
[Equation]
and max
[Equation]
(cid:107)
[Equation]
(cid:107) [Equation] M (cid:27) for any M ≥ C ( f ) . Therefore, F = (cid:83) ∞ M =1 F M ( F M ⊂ F is trivial by deﬁnition).
Next we present the ﬁrst claim of the section. The following proposition shows that the ﬁrst and second moments of ReLU neural feature maps with bounded spectral norms concentrate around their means.
In particular, if a learning algorithm (in Section 4.1) is guaranteed to return a neural network f with C ( f ) ≤ M , then (cid:15) c 1 ( δ ) and (cid:15) c 2 ( δ ) are bounded by the right hand sides of (19) and (20), respectively.
Note that both of these terms scale as O ( (cid:112) log(1 /δ ) /m
c ) .
The analysis is based on Theorem 1 of Golowich et al. (2017) and the proof of Theorem 1.1 of Bartlett et al.
Proposition 3.
Let ˜ P
= { ˜ P c } lc =1 be a set of class-conditional distributions over a bounded set X ⊂ R d and let m 1 , . . .
, m l ∈ N .
Let F be the class of ReLU neural feature maps as deﬁned above.
Then, with probability at least 1 − δ over the selection of ˜ S 1 ∼ ˜ P m 1 1 , . .
˜ S l ∼ ˜ P m l l , for all c ∈ [ l ] and f ∈ F , we have [Equation]
[Equation]
and
[Equation]
Proof.
We prove that, for any ﬁxed c ∈ [ l ] and M ∈ N , (19) and, respectively, (20) hold for all f ∈ F M simultaneously with probability at least 1 − δ 2 lM ( M +1) .
Then taking the union bound over c and M proves the proposition (since F = (cid:83)
∞ M =1 F M ).
Fix c ∈ [ l ] and M ∈ N .
By the triangle inequality, for any f ∈ F , we have
[Equation]
By Theorem 3.3 of Mohri et al. (2018), with probability at least 1 −
[Equation]
2 plM ( M +1) over the selection of ˜ S c ∼ ˜ P m c c , for any f ∈ F M , we have
[Equation]
The ﬁrst term on the right hand side can be bounded using Theorem 1 of Golowich et al.
[Equation]
stating that
[Equation]
Moreover
[Equation]
for any f (cid:48) ∈ F M we have | f (cid:48) ( x ) j | ≤ M · sup x ∈X (cid:107) x (cid:107) .
Substituting these inequalities into (22) implies
[Equation]
By the union bound, (24) holds for all j ∈ [ p ] simultaneously with probability at least 1 −
[Equation]
lM ( M +1) .
Combining this with (21), we obtain that for any ﬁxed c ∈ [ l ] and M ∈ N , with probability at least 1 − δ 2 lM ( M +1) , for all f ∈ F M \ F M − 1 we have
[Equation]
where the last inequality follows from the fact that M ≤ C ( f ) + 1 , since C ( f ) ∈
[ M − 1 , M ] .
Next, we prove the second inequality for ﬁxed c and M .
As in (22), by Theorem 3.3 of Mohri et al.
(2018), with probability at least 1 − δ 2 lM ( M +1) over the selection of ˜ S c , for all f ∈ F M , we have
[Equation]
where G s = {(cid:107) f ( · ) (cid:107) 2 | f ∈ F M } .
By deﬁnition, with (cid:15) =
( (cid:15) 1 , . . .
, (cid:15) m c ) denoting i.i.d.
Rademacher random variables (i.e., random variables taking values ± 1 with probability 1 / 2 each),
[Equation]
Note that the j th terms (in the square bracket) at the right-hand side above is the Rademacher complexity of the composite function class g ◦ F Mj = { g ◦ f (cid:48) | f (cid:48) ∈ F Mj } for g ( y ) =
y 2 .
Since sup x ∈X | f (cid:48) ( x ) j | ≤ M sup x ∈X (cid:107) x (cid:107) and g is 2 M sup x ∈X (cid:107) x (cid:107) -Lipschitz on [ − M sup x ∈X (cid:107) x (cid:107) , M sup x ∈X (cid:107) x (cid:107) ] , by Lemma 1.1 in Lecture 17 of Kakade & Tewari (2008), the
Rademacher complexity of this composite function class can be bounded as
[Equation]
Combining with (27) and (23) yields
[Equation]
Substituting into (26) and using sup x ∈X ,
[Equation]
f
[Equation]
( x ) (cid:107)
[Equation]
≤ pM 2 sup x ∈X (cid:107) x (cid:107) 2 imply, similarly to (25), that with probability at least 1 − δ 2 lM ( M +1) over the selection of ˜ S c , for all f ∈ F M \F M −simultaneously we have
[Equation]
ﬁnishing the proof.
Next we show that the Rademacher complexity in Proposition 2 scales as O ( √ l ) for ReLU neural networks with bounded spectral complexities.
Proposition 4.
Let F ∗ = { f ∈ F|C ( f ) ≤ M } be a class of ReLU neural networks with.
Then,
[Equation]
Proof.
As discussed at the beginning of the section, F ∗ and F M deﬁne the same function class through different representations.
Thus it sufﬁces to consider F M in place of F ∗ (as trivially
E ˜ P
[ R ( H F ∗ ( ˜ P ))]
= E ˜ P [ R ( H F M ( ˜ P ))] ). Fix ˜ P = ( ˜ P 1 , . . .
, ˜ P l ) . With (cid:15) = ( (cid:15) cj )
c ∈ [ l ] ,j ∈{ 0 }∪ [ p ] denoting i.i.d. Rademacher random variables, by the deﬁnition of H F M and because sup a ∈ A
[ f ( a ) + g ( a )] ≤ sup a ∈
A f ( a ) + sup a ∈
A g ( a ) , we have
[Equation]
We bound the two terms in (30) separately.
The terms in the ﬁrst summation can be bounded as
[Equation]
where the last inequality holds because of (23) (with l instead of m c samples).
The elements of the second summation (30) can be bounded as
[Equation]
where the last equation follows from the fact that (cid:15) c 0 are distributed symmetrically around
[Equation]
We can bound the ﬁrst term in (32) above using (29) (again, with l instead of m c samples) as
[Equation]
The second term in (32) can be bounded similarly
[Equation]
but because now the expectation is inside the squared norm, we need to provide a few more steps:
[Equation]
Now similarly to (28),
[Equation]
implies (via Lemma 1.1 in Lecture 17 of Kakade & Tewari (2008))
[Equation]
[Equation]
where in the last inequality we used again Theorem 1 of Golowich et al.
(2017) adapted to the spectral norm, as in (23). Combining (34) and (35) gives
[Equation]
Substituting this and (33) into (32) gives
[Equation]
Plugging in this and (31) into (30) gives
[Equation]
giving the desired bound.
F A NALYSIS FOR S ECTION 4.
Lemma 2.
Let X 1 , . . .
, X n be a set of i [Equation] i
[Equation]
d. uniformly distributed points in the p -dimensional unit cube.
There is a positive constant C > 0 (independent of n and p ), such that, E (cid:2) min
[Equation]
Proof.
For any pair i (cid:54) =
j ∈ [ n ] ,
[Equation]
since the volume of the p -dimensional ball of radius D is π p/ 2 Γ
[Equation]
p/ 2+1) D p and the volume of the unit cube is 1 .
Hence, by the union bound over all pairs i (cid:54) =
j ∈ [ n ] :
[Equation]
Since h ( n, D ) > 0 if and only if D < D ∗ =
M − 1 /p , where M = n ( n − 1)
[Equation]
) , we obtain
[Equation]
where the last inequality follows from Ramanujan’s approximations of the Gamma function (Karatsuba, 2001) for some C > 0 independent of n, p .
G A NALYSIS FOR S ECTION 4.
In the following proposition we provide a formal statement of the analysis provided in Section 4.3.
We consider a balanced k -class classiﬁcation problem and a given feature map f
(e.g., pretrained).
We upper bound the classiﬁcation error of the nearest-mean classiﬁer h f,S ( x ) =
arg min c ∈ [ k ] (cid:107) f
( x ) − µ f ( S c ) (cid:107) in terms of the averaged CDNV, that is, Avg i (cid:54) =
j [ V f ( P i , P j )] .
Therefore, if the averaged CDNV is small, then, we expect the nearest-mean classiﬁer to have a small classiﬁcation error.
Proposition 5.
Let T be a balanced k -class classiﬁcation problem with distribution P along with class-conditional distributions P = { P c } kc =1 .
Let S =
(cid:83) kc =1 S c be a dataset, such that S c ∼
P n c c ( n 1 = · · · = n k = n c ∈ N ).
Let f : R d → R p be any feature map and let h f,S ( x ) =
arg min c ∈ [ k ] (cid:107) f
( x ) − µ f ( S c ) (cid:107) be the nearest-mean classiﬁer.
Then, we have
[Equation]
where s ( f, P ) = p if { f ◦ P c } kc =1 are spherically symmetric and s ( f, P )
= 1 otherwise.
Proof.
First note that [Equation] In the following we will ﬁx i and j (cid:54) = i and bound Pr[ h f,S ( x i ) =
j ] , which is the probability that x i ∼ P i is (wrongly) classiﬁed as j (cid:54)
= i , for all three cases (general, symmetric, Gaussian). Let c be either i or j .
Let µ c := µ f ( P c ) and ˆ µ c := µ f ( S c ) and u
General case: With this, and by triangle inequalities, Y j ≤ X j + Z j and X i ≤ Y i + Z i and Y i + Y j ≥ α , we get
[Equation]
Now by Markov’s inequality,
[Equation]
and
similarly Pr[ Y 2 i ≥ α 2 16 ] ≤ 16 σ 2 i /α 2 ij .
Plugging this into (36), by symmetrization, leads to the desired inequality
[Equation]
Spherically symmetric case:
In this case [Equation] , where
[Equation]
is the half-space of all u i that are wrongly classiﬁed, and d ( x, H ) is the distance of x from separating hyperplane ∂H if x (cid:54)∈ H and 0 if x ∈ H . The distance D of the closest point of H to µ i is
[Equation]
For ﬁxed displacement magnitudes Z i and Z j , this distance is smallest if both displacements are colinear in direction of µ i − µ j , in which case
[Equation]
A formal proof of this claim is as follows: W.l.g. we can choose (a coordinate system such that) µ i = 0 :
[Equation]
where both inequalities are simple applications of the triangle inequality.
Now, for ﬁxed ˆ µ i and ˆ µ j i.e. ﬁxed D and by rotational invariance, the probability that u i ∈ H is the same as the probability that (e.g.) the ﬁrst coordinate of u i − µ i is larger than D . With Y 1 i := u 1 i − µ i and γ ∈ (0 , 1) , this implies
[Equation]
Plugging this into (36) with γ = 0 . 5 , by symmetrization, leads to [Equation]