Provable Guarantees for Self-Supervised Deep Learning with Spectral Contrastive Loss
Jeff Z. HaoChen, Colin Wei, Adrien Gaidon, Tengyu Ma
Introduction
Recent empirical breakthroughs have demonstrated the effectiveness of self-supervised learning, which trains representations on unlabeled data with surrogate losses and self-defined supervision signals Wu et al. 2018, Oord et al. 2018, Hjelm et al. 2018, Ye et al. 2019, Henaff 2020, Bachman et al. 2019, Tian et al. 2019, Misra and Maaten 2020, Caron et al. 2020, Zbontar et al. 2021, Bardes et al. 2021, Tian et al. 2020a, Chen and He 2020. Self-supervision signals in computer vision are often defined by using data augmentation to produce multiple views of the same image. For example, the recent contrastive learning objectives Arora et al. 2019, Chen et al. 2020a, Chen et al. 2020b, He et al. 2020, Chen et al. 2020c encourage closer representations for augmentations/views of the same natural datapoint than for randomly sampled pairs of data.
Despite the empirical successes, there is a limited theoretical understanding of why self-supervised losses learn representations that can be adapted to downstream tasks, for example, using linear heads. Recent mathematical analyses for contrastive learning by Arora et al. 2019, Tosh et al. 2020, Tosh et al. 2021 provide guarantees under the assumption that two views are somewhat conditionally independent given the label or a hidden variable. However, in practical algorithms for computer vision applications, the two views are augmentations of a natural image and usually exhibit a strong correlation that is difficult to be de-correlated by conditioning. They are not independent conditioned on the label, and we are only aware that they are conditionally independent given the natural image, which is too complex to serve as a hidden variable with which prior works can be meaningfully applied. Thus the existing theory does not appear to explain the practical success of self-supervised learning.
This paper presents a theoretical framework for self-supervised learning without requiring conditional independence. We design a principled, practical loss function for learning neural net representations that resembles state-of-the-art contrastive learning methods. We prove that, under a simple and realistic data assumption, linear classification using representations learned on a polynomial number of unlabeled data samples can recover the ground-truth labels of the data with high accuracy.
The fundamental data property that we leverage is a notion of continuity of the population data within the same class. Though a random pair of images from the same class can be far apart, the pair is often connected by (many) sequences of natural images, where consecutive images in the sequences are close neighbors within the same class. As shown in Figure 1 (images on the left top part), two very different French bulldogs can be connected by a sequence of French bulldogs (which may not be in the training set but are in the support of the population distribution). Prior work Wei et al. 2020 empirically demonstrates this type of connectivity property and uses it in the analysis of pseudolabeling algorithms. This property is more salient when the neighborhood of an example includes many different types of augmentations.
More formally, we define the population augmentation graph, whose vertices are all the augmented data in the population distribution, which can be an exponentially large or infinite set. Two vertices are connected with an edge if they are augmentations of the same natural example. Our main assumption is that for some proper , we cannot partition the graph into sub-graphs between which there are few connections (Assumption 3.5). In other words, this intuitively states that there are at most clusters in the population augmentation graph. This assumption can be seen as a graph-theoretic version of the continuity assumption on the population distribution. We also assume that there are very few edges across different ground-truth classes (Assumption 3.6). Figure 1 (left) illustrates a realistic scenario where dog and cat are the ground-truth categories, between which edges are very rare. Each breed forms a sub-graph that has sufficient inner connectivity and thus cannot be further partitioned.
Our assumption fundamentally does not require independence of the two views (the positive pairs) conditioned on the class and can allow disconnected sub-graphs within a class. The classes in the downstream task can be also somewhat flexible as long as they are disconnected in the augmentation graph. For example, when the augmentation graph consists of disconnected sub-graphs corresponding to fine-grained classes, our assumptions allow the downstream task to have any coarse-grained classes containing these fine-grained classes as a sub-partition. Prior work Wei et al. 2020 on pseudolabeling algorithms essentially requires an exact alignment between sub-graphs and downstream classes (i.e., ). They face this limitation because their analysis requires fitting discrete pseudolabels on the unlabeled data. We avoid this difficulty because we consider directly learning continuous representations on the unlabeled data.
We analyze the linear classification performance of the representations learned by minimizing the population spectral contrastive loss. Our main result (Theorem 3.8) shows that when the representation dimension exceeds the maximum number of disconnected sub-graphs, linear classification with learned representations is guaranteed to have a small error. Our theorem reveals a trend that a larger representation dimension is needed when there are a larger number of disconnected sub-graphs. Our analysis relies on novel techniques tailored to linear probe performance, which have not been studied in the spectral graph theory community to the best of our knowledge.
The spectral contrastive loss also works on empirical data. Since our approach optimizes parametric loss functions, guarantees involving the population loss can be converted to finite sample results using off-the-shelf generalization bounds. The end-to-end result (Theorem 4.3) shows that the number of unlabeled examples required is polynomial in the Rademacher complexity of the model family and other relevant parameters, whereas the number of downstream labeled examples only needs to be linear in the representation dimension (which needs to be linear in the number of clusters in the graph). This demonstrates that contrastive learning reduces the amount of labeled examples needed.
In summary, our main theoretical contributions are: 1) we propose a simple contrastive loss motivated by spectral decomposition of the population data graph, 2) under simple and realistic assumptions, we provide downstream classification guarantees for the representation learned by minimizing this loss on population data, and 3) our analysis is easily applicable to deep networks with polynomial unlabeled samples via off-the-shelf generalization bounds. Our theoretical framework can be viewed as containing two stages: we first analyze the population loss and the representation that minimizes it (Section 3), then study the empirical loss where the representation is learned with a neural network with bounded capacity (Section 4).
In addition, we implement and test the proposed spectral contrastive loss on standard vision benchmark datasets. Our algorithm is simple and doesn’t rely on tricks such as stop-gradient which is essential to SimSiam Chen and He 2020. We demonstrate that the features learned by our algorithm can match or outperform several strong baselines (Chen et al. 2020a, Chen et al. 2020c, Chen and He 2020, Grill et al. 2020) when evaluated using a linear probe.
Additional related works
Empirical works on self-supervised learning. Self-supervised learning algorithms have been shown to successfully learn representations that benefit downstream tasks Wu et al. 2018, Oord et al. 2018, Hjelm et al. 2018, Ye et al. 2019, Henaff 2020, Bachman et al. 2019, Tian et al. 2019, Misra and Maaten 2020, Chen et al. 2020c, Chen et al. 2020a, He et al. 2020, Chen et al. 2020b, Caron et al. 2020, Zbontar et al. 2021, Bardes et al. 2021, Tian et al. 2020a, Xie et al. 2019. Many recent self-supervised learning algorithms learn features with siamese networks Bromley et al. 1993, where two neural networks of shared weights are applied to pairs of augmented data. Introducing asymmetry to siamese networks either with a momentum encoder like BYOL Grill et al. 2020 or by stopping gradient propagation for one branch of the siamese network like SimSiam Chen and He 2020 has been shown to effectively avoid collapsing. Contrastive methods Chen et al. 2020a, He et al. 2020, Chen et al. 2020c minimize the InfoNCE loss Oord et al. 2018, where two views of the same data are attracted while views from different data are repulsed.
Theoretical works on self-supervised learning. As briefly discussed in the introduction, several theoretical works have studied self-supervised learning. Arora et al. 2019 provide guarantees for representations learned by contrastive learning on downstream linear classification tasks under the assumption that the positive pairs are conditionally independent given the class label. Theorem 3.3 and Theorem 3.7 of the work of Lee et al. 2020 show that, under conditional independence given the label and/or additional latent variables, representations learned by reconstruction-based self-supervised learning algorithms can achieve small errors in the downstream linear classification task. Lee et al. 2020 generalizes it to approximate conditional independence for Gaussian data and Theorem 4.5 further weakens the assumptions significantly. Tosh et al. 2020 show that contrastive learning representations can linearly recover any continuous functions of the underlying topic posterior under a topic modeling assumption (which also requires conditional independence of the positive pair given the hidden variable). More recently, Theorem 11 of the work of Tosh et al. 2021 provide novel guarantees for contrastive learning under the assumption that there exists a hidden variable such that the positive pair are conditionally independent given and the random variable has a small variance. However, in practical algorithms for computer vision applications, the two views are two augmentations and thus they are highly correlated. They might be only independent when conditioned on very complex hidden variables such as the original natural image, which might be too complex for the previous results to be meaningfully applied.
We can also compare the assumptions and results on a concrete generative model for the data, our Example 3.10 in Section 3.4, where the data are generated by a mixture of Gaussian or a mixture of manifolds, the label is the index of the mixture, and the augmentations are small Gaussian blurring (i.e., adding Gaussian noise). In this case, the positive pairs are two points that are very close to each other. To the best of our knowledge, applying Theorem 11 of Tosh et al. 2021 to this case with (the natural datapoint) would result in requiring a large (if not infinite) representation dimension. Because and are very close, the reconstruction-based algorithms in Lee et al. 2020, when used to predict from , will not be able to produce good representations as well. On a technical level, Example 3.10 does not satisfy the requirement regarding the quantity in Assumption 4.1 of Lee et al. 2020, if in that paper is equal to here—it requires the label to be correlated with the raw input , which is not necessarily true in Example 3.10. This can likely be addressed by using a different .
On a technical level, to relate prior works’ assumptions to ours, we can consider an almost equivalent version of our assumption (although our proofs do not directly rely on or relate to the discussion below). Let be a positive pair and let be the conditional distribution of given . Starting from , let us consider a hypothetical Markov chain where is drawn from . Our assumption essentially means that this hypothetical Markov chain of sampling neighbors will mix within the same class earlier than it mixes across the entire population (which might not be possible or takes exponential time). More concretely, the assumption that is large compared to in Theorem 3.8 is roughly equivalent to the existence of a (potentially large) such that and are still likely to have the same label, but are sufficiently independent conditioned on this label or some hidden variable. Roughly speaking, prior works Arora et al. 2019, Tosh et al. 2020, Tosh et al. 2021 assume probabilistic structure about and (instead of and ), e.g., Arora et al. 2019 and Theorem 11 of Tosh et al. 2021 assume that and are independent conditioned on the label and/or a hidden variable. Similar Markov chains on augmentated data have also been used in previous work Dao et al. 2019 to study properties of data augmentation.
Several other works (Tsai et al. 2020, Wang and Isola 2020, Tian et al. 2020b, Bansal et al. 2020, Mitrovic et al. 2020) also theoretically study self-supervised learning. The work Tsai et al. 2020 prove that self-supervised learning methods can extract task-relevant information and discard task-irrelevant information, but lacks guarantees for solving downstream tasks efficiently with simple (e.g., linear) models. Tian et al. 2020b study why non-contrastive self-supervised learning methods can avoid feature collapse. Zimmermann et al. 2021 prove that for a specific data generating process, contrastvie learning can learn representations that recover the latent variable. Cai et al. 2021 analyze domain adaptation algorithms for subpopulation shift with a similar expansion condition as Wei et al. 2020 while also allowing disconnected parts within each class, but require access to ground-truth labels during training. In contrast, our algorithm doesn’t need labels during pre-training.
Co-training and multi-view learning are related settings which leverage two distinct “views” (i.e., feature subsets) of the data (Blum and Mitchell 1998, Dasgupta et al. 2002, Balcan et al. 2005). The original co-training algorithms (Blum and Mitchell 1998, Dasgupta et al. 2002) assume that the two views are independent conditioned on the true label and leverage this independence to obtain accurate pseudolabels for the unlabeled data. Balcan et al. 2005 relax the requirement on independent views of co-training, by using an “expansion” assumption, which is closely related to our assumption that is not too small in Theorem 3.8. Besides recent works (e.g., the work of Tosh et al. 2021), most co-training or multi-view learning algorithms are quite different from the modern contrastive learning algorithms which use neural network parameterization for vision applications.
Our analysis relies on the normalized adjacency matrix (see Section 3.1), which is closely related to the graph Laplacian regularization that has been studied in the setting of semi-supervised learning Zhu et al. 2003, Nadler et al. 2009. In their works, the Laplacian matrix is used to define a regularization term that smooths the predictions on unlabeled data. This regularizer is further added to the supervised loss on labeled data during training. In contrast, we use the normalized adjacency matrix to define the unsupervised training objective in this paper.
Spectral contrastive learning on population data
In this section, we introduce our theoretical framework, the spectral contrastive loss, and the main analysis of the performance of the representations learned on population data.
We next formulate data augmentations. Given a natural data sample , we use to denote the distribution of its augmentations. For instance, when represents an image, can be the distribution of common augmentations Chen et al. 2020a that includes Gaussian blur, color distortion and random cropping. We use to denote the set of all augmented data, which is the union of supports of all for . As with , we also assume that is a finite but exponentially large set, and denote . None of the bounds will depend on — it is only defined and assumed to be finite for the ease of exposition.
We denote the error of the representation and the linear head as:
Define the linear probe error as the error of the best possible linear classifier on the representations:
Our approach is based on the central concept of population augmentation graph, denoted by , where the vertex set is all augmentation data and denotes the edge weights defined below. For any two augmented data , define the weight as the marginal probability of generating the pair and from a random natural data :
We emphasize that we only work with the population graph rather than the empirical graph (i.e., the corresponding graph constructed with the empirical dataset as the vertex set). The population graph is very sparse but not empty—many similar images exist in the population. In contrast, the empirical graph would be nearly empty, since two images in the empirical dataset almost never share the same augmentation image. Our analysis will apply to minimizing contrastive loss on an empirical dataset (see Section 4), but not via analyzing the property of the empirical graph. Instead, we will show that contrastive learning on empirical data with parametrized models is similar to decomposing the population graph (see technical discussions in Section 5). This is a key difference between our work and classical spectral clustering work—we only require properties of the population graph rather than the empirical graph.
Given the structure of the population augmentation graph, we apply spectral decomposition to the population graph to construct principled embeddings. The eigenvalue problems are closely related to graph partitioning as shown in spectral graph theory Chung and Graham 1997 for both worst-case graphs Cheeger 1969, Kannan et al. 2004, Louis et al. 2011, Lee et al. 2014 and random graphs McSherry 2001, Lei et al. 2015, Abbe 2017. In machine learning, spectral clustering Ng et al. 2001, Shi and Malik 2000 is a classical algorithm that learns embeddings by eigendecomposition on an empirical distance graph and invoking -means on the embeddings.
We will apply eigendecomposition to the population augmentation graph (and then later use linear probe for classification). Let be the total weights associated to , which is often viewed as an analog of the degree of in weighted graph. A central object in spectral graph theory is the so-called normalized adjacency matrix:
2 From spectral decomposition to spectral contrastive learning
The embeddings obtained by eigendecomposition are nonparametric—a -dimensional parameter is needed for every —and therefore cannot be learned with a realistic amount of data. The embedding matrix cannot be even stored efficiently. Therefore, we will instead parameterize the rows of the eigenvector matrix as a neural net function, and assume embeddings can be represented by for some , where is the hypothesis class containing neural networks. As we’ll show in Section 4, this allows us to leverage the extrapolation power of neural networks and learn the representation on a finite dataset.
Next, we design a proper loss function for the feature extractor , such that minimizing this loss could recover up to some linear transformation. As we will show in Section 4, the resulting population loss function on also admits an unbiased estimator with finite training samples. Let be an embedding matrix with on the -th row, we will first design a loss function of that can be decomposed into parts about individual rows of .
We employ the following matrix factorization based formulation for eigenvectors. Consider the objective
where denotes the linear probe performance when the rows of are used as embeddings.
The main benefit of objective is that it’s based on the rows of . Recall that vectors are the rows of . Each entry of is of the form , and thus can be decomposed into a sum of terms involving terms . Interestingly, if we reparameterize each row by , we obtain a very similar loss function for that resembles the contrastive learning loss used in practice (Chen et al. 2020a) as shown below in Lemma 3.2. See Figure 1 (right) for an illustration of the relationship between the eigenvector matrix and the representations learned by minimizing this loss.
We formally define the positive and negative pairs to introduce the loss. Let be a random natural datapoint and draw and independently to form a positive pair . Draw and independently with . We call a negative pair. Though and are simply two independent draws, we call them negative pairs following the literature Arora et al. 2019.
Recall that is the -th row of . Let for some function . Then, the loss function is equivalent to the following loss function for , called spectral contrastive loss, up to an additive constant:
We can expand and obtain
Notice that the first term is a constant that only depends on the graph but not the variable . By the definition of augmentation graph, is the probability of a random positive pair being while is the probability of a random augmented datapoint being . We can hence rewrite the sum of last two terms in Equation (3.2) as Equation (3.2). ∎
We note that spectral contrastive loss is similar to many popular contrastive losses Oord et al. 2018, Chen et al. 2020a, Sohn 2016, Wu et al. 2018. For instance, the contrastive loss in SimCLR Chen et al. 2020a can be rewritten as (with simple algebraic manipulation)
Here and are a positive pair and are augmentations of other data. Spectral contrastive loss can be seen as removing from the second term, and replacing the log sum of exponential terms with the average of the squares of . We will show in Section 6 that our loss has a similar empirical performance as SimCLR without requiring a large batch size.
3 Theoretical guarantees for spectral contrastive loss on population data
In this section, we introduce the main assumptions on the data and state our main theoretical guarantee for spectral contrastive learning on population data.
To formalize the idea that cannot be partitioned into too many disconnected sub-graphs, we introduce the notions of Dirichlet conductance and sparsest -partition, which are standard in spectral graph theory. Dirichlet conductance represents the fraction of edges from to its complement:
For a graph and a subset , we define the Dirichlet conductance of as
Let be the augmentation graph. For an integer , we define the sparsest -partition as
where are non-empty sets that form a partition of .
We note that increases as increases. To see this, consider . Let be the partition of that minimizes the RHS of Definition 3.4 Define set . It is easy to see that . Notice that are non-empty sets that form a partition of , by Definition 3.4 we have . When is the number of underlying classes, we might expect since the augmentations from different classes almost compose a disjoint -way partition of . However, for , we can expect to be much larger. For instance, in the extreme case when , every set is a singleton, which implies that . More generally, as we will show later (Lemma 3.9), can be expected to be at least inverse polynomial in data dimension when is larger than the number of underlying semantic classes in the data.
We assume that . A prototypical case would be that there are at most clusters in the population augmentation graph, and each of them cannot be broken into two subsets both with conductance less than .
When there are clusters that have sufficient inner connections (corresponding to, e.g., semantically coherent subpopulations), we expect to be much larger than because any partition needs to break one sub-graph into two pieces and incur a large conductance. In other words, suppose the graph is consists of clusters, the quantity is characterizing the level of internal connection within each cluster. Furthermore, in many cases we expect to be inverse polynomial in dimension. In the running example of Section 3.1 (where augmentation is adding Gaussian noise), is related to the Cheeger constant or the isoperimetric number of the data manifolds, which in many cases is believed to be at least inverse polynomial in dimension (e.g., see Bobkov et al. 1997 for the Cheeger constant of the Gaussian distribution.) Indeed, in Section 3.4 we will formally lowerbound by the product of the augmentation strength and the Cheeger constant of the subpopulation distributions (Proposition 3.9), and lowerbound the Cheeger constant by inverse polynomial for concrete settings where the data come from a mixture of manifolds (Theorem 3.11).
Assumption 3.5 also implies properties of the graph spectrum. Recall that is the -th largest eigenvalue of the normalized adjacency matrix and . According to Cheeger’s inequality (Lemma B.4), Assumption 3.5 implies that , which suggests that there is a gap between and and will be useful in our analysis.
Next, we formalize the assumption that very few edges cross different ground-truth classes. It turns out that it suffices to assume that the labels are recoverable from the augmentations (which is also equivalent to that two examples in different classes can rarely be augmented into the same point).
Let and be its label. Let the augmentation . We assume that there exists a classifier that can predict given with error at most . That is, with probability at least .
A small in Assumption 3.6 means that different classes are “separated” in the sense that data from different classes have very few (at most ) shared augmentations. Alternatively, one can think of this assumption as assuming that the augmentation graph can be partitioned into clusters each corresponding to augmentations from one class, and there are at most edges across the clusters. This is typically true for real-world image data like ImageNet, since for any two images from different classes (e.g., images of a Husky and a Birman cat), using the typical data augmentations such as adding noise and random cropping can rarely (with exponentially small probability) lead to the same augmented image.
Typically, both in Assumption 3.5 and in Assumption 3.7 are small positive values that are much less than 1. However, can be much larger than . Recall that can be expected to be at least inverse polynomial in dimension. In contrast, characterizes the separation between classes and are expected to be exponentially small in typical cases. For example, in the running example of Section 3.1 with Gaussian perturbation augmentation, if is smaller than the minimum distance between two subpopulations, we can rarely augment two datapoints from distinct subpopulations into a shared augmentation, and therefore is expected to exponentially small. Our analysis below operates in the reasonable regime where is larger than , which intuitively means that the internal connection within the cluster is bigger than the separation between the clusters.
We also introduce the following assumption which states that some minimizer of the population spectral contrastive loss can be realized by the hypothesis class.
Our main theorem bound from above the linear probe error of the feature learned by minimizing the population spectral contrastive loss. In Theorem 4.3 we extend this result to the case where both the feature and the linear head are learned from empirical datasets.
Assume the representation dimension and Assumption 3.6 holds for . Let be a hypothesis class that satisfies Assumption 3.7 and let be a minimizer of . Then, we have
In particular, if Assumption 3.5 also holds and , we have .
Here we use to hide universal constant factors and logarithmic factors in . We note that when augmentations from different classes are perfectly disconnected in the augmentation graph, in which case the above theorem guarantees the exact recovery of the ground truth. Generally, we expect to be an extremely (exponentially) small constant independent of , whereas increases with and can be at least inverse polynomial when is reasonably large, hence much larger than . We characterize the ’s growth on more concrete distributions in the next subsection. When , as argued below Assumption 3.6, we expect that and thus the error is sufficiently small.
Previous works on graph partitioning Lee et al. 2014, Arora et al. 2009, Leighton and Rao 1999 often analyze the rounding algorithms that conduct clustering based on the representations of unlabeled data and do not analyze the performance of linear probe (which has access to labeled data). These results provide guarantees on the approximation ratio—the ratio between the conductance of the obtained partition to the best partition—which may depend on graph size Arora et al. 2009 that can be exponentially large in our setting. The approximation ratio guarantee does not lead to a guarantee on the representations’ performance on downstream tasks. Our guarantees are on the linear probe accuracy on the downstream tasks and independent of the graph size. We rely on the formulation of the downstream task’s labeling function (Assumption 3.6) as well as a novel analysis technique that characterizes the linear structure of the representations. In Section B, we provide the proof of Theorem 3.8 as well as its more generalized version where is relaxed to be any constant fraction of . A proof sketch of Theorem 3.8 is given in Section 5.1.
4 Provable instantiation of Theorem 3.8 to mixture of manifold data
In this section, we exemplify Theorem 3.8 on examples where the natural data distribution is a mixture of manifolds.
That is, is at least linear in the augmentation size and the Cheeger constants of subpopulations.
In many cases, the Cheeger constant is at least inverse polynomial in the data dimension Chen 2021, Lee and Vempala 2016. When the manifolds are spherical Gaussian with unit identity covariance, the Cheeger constant is Bobkov et al. 1997, and thus the distribution in Proposition 3.9 satisfies Assumption 3.5 with . Furthermore, when the distribution is transformed by a function with Lipschitzness , the Cheeger constant changes by a factor at most . Therefore, Proposition 3.9 also applies to a mixture of manifolds setting defined below.
In the rest of this section, we instantiate Theorem 3.8 on a mixture of manifolds example where the data is generated from a Lipschitz transformation of a mixture of Gaussian distributions, and give an error bound for the downstream classification task.
Let the data augmentation of a natural data sample be where is isotropic Gaussian noise with . We also assume .
Let be the most likely mixture index that generates : . The simplest downstream task can have label . More generally, let be the number of labels, and the label in the downstream task be equal to where is a function that maps to .
We note that the intra-class distance in the latent space is on the scale of , which can be much larger than the distance between class means which is assumed to be . Therefore, distance-based clustering algorithms do not apply. Moreover, in the simple downstream tasks, the label for could be just the index of the mixture where comes from. We also allow downstream tasks that merge the components into labels as long as each mixture component gets the same label. We apply Theorem 3.8 and get the following theorem:
When , Example 3.10 satisfies Assumption 3.6 with , and has . As a consequence, the error bound is .
The theorem above guarantees small error even when is polynomially small. In this case, the augmentation noise has a much smaller scale than the data (which is at least on the order of ). This suggests that contrastive learning can non-trivially leverage the structure of the underlying data and learn good representations with relatively weak augmentation. To the best of our knowledge, it is difficult to apply the theorems in previous works (Arora et al. 2019, Lee et al. 2020, Tosh et al. 2020, Tosh et al. 2021, Wei et al. 2020) to this example and get similar guarantees with polynomial dependencies on . The work of Wei et al. 2020 can apply to the setting where is known and the downstream label is equal to , but cannot handle the case when is unknown or when two mixture component can have the same label. We refer the reader to the related work section for more discussions and comparisons. The proof can be found in Section C.2.
Finite-sample generalization bounds
In Section 3, we provide guarantees for spectral contrastive learning on population data. In this section, we show that these guarantees can be naturally extended to the finite-sample regime with standard concentration bounds. In particular, given a unlabeled pretraining dataset with , we learn a feature extractor by minimizing the following empirical spectral contrastive loss:
Recall that is a minimizer of . The following theorem with proofs in Section D.1 bounds the population loss of a feature extractor trained with finite data:
For some , assume for all and . Let be a minimizer of the population loss . Given a random dataset of size , let be a minimizer of empirical loss . Then, when Assumption 3.7 holds, with probability at least over the randomness of data, we have
where constants and .
The Rademacher complexity usually looks like where measures the complexity of (hence only depends on ). This suggests that when is , the sample complexity for acheiving suboptimality on population loss is . We can apply Theorem 4.1 to any hypothesis class of interest (e.g., deep neural networks) and plug in off-the-shelf Rademacher complexity bounds. For instance, in Section D.2 we give a corollary of Theorem 4.1 when contains deep neural networks with ReLU activation.
The theorem above shows that we can achieve near-optimal population loss by minimizing empirical loss up to some small excess loss. The following theorem characterizes how the error propagates to the linear probe performance mildly under some spectral gap conditions.
In the setting of Theorem 4.1, suppose Assumption 3.5 holds for , Assumption 3.6 holds for , Assumption 3.7 holds, and the representation dimension ,. Then, with probability over the randomness of data, for any that minimizes the empirical loss , we have that
where , and is the eigenvalue gap between the -th and the -th eigenvalue.
This theorem shows that the error on the downstream task only grows linearly with the excess loss during pretraining. Roughly speaking, one can think of as on the order of , hence by Cheeger’s inequality it’s larger than . When and , we have that the number of unlabeled samples required to achieve downstream error is . We can relax Assumption 3.7 to approximate realizability in the sense that contains some sub-optimal feature extractor under the population spectral loss and pay an additional error term in the linear probe error bound. The proof of Theorem 4.2 can be found in Section D.3.
2 Labeled sample complexity for linear probe
The following Theorem 4.3 provides a generalization guarantee for the linear classifier that minimizes capped quadratic loss on a labeled downstream dataset of size . The key challenge of the proof is showing the existence of a small-norm linear head that gives small population quadratic loss, which is not obvious from Theorem 4.2 where only small 0-1 error is guaranteed. Given a labeled dataset where and is its label, we sample for . Given a norm bound , we learn a linear probe by minimizing the capped quadratic loss subject to a norm constraint:
In the setting of Theorem 4.2, choose such that . Then, with probability at least over the randomness of data, for any that minimizes the empirical pre-training loss and a linear head learned from Equation (10), we have
Here the first term is an error caused by the property fo the population data, which is unavoidable even with infinite pretraining and downstream samples (but it can be small as argued in Section 3.3). The second term is caused by finite pretraining samples, and the third term is caused by finite samples in the linear classification on the downstream task.
Typically, the Rademacher complexity is roughly where is captures the complexity of the model architecture. Thus, to achieve final linear probe error no more than , we would need to select such that , and we need pretraining samples and downstream samples.
When , the eigengap is on the order of which is larger than by Cheeger inequality. Recall that is at least inverse polynomial in as argued in Section 3.4, one can expect to be at most . On the other hand, so can be thought of as a constant. Thus, the final required number of pretraining samples is and number of downstream samples is . We note that the downstream sample complexity doesn’t depend on the complexity of the hypothesis class , suggesting that pretraining helps reduce the sample complexity of the supervised downstream task.
The proof of Theorem 4.3 is in Section E.
Analysis Framework and Proof Sketch
As discussed before and suggested by the structured of Section 3 and 4, our analysis framework decompose the problem into a key step about the population cases (Section 3) and a few other somewhat standard steps that link empirical losses to population losses (Section 4). As depicted in Figure 2, the core step (Theorem 3.8, or its extension Theorem 4.2) is to show that a small population pretraining loss implies the existence of a linear classifier for the downstream task, that is, a small minimal downstream loss.
We first remark that a feature of our analysis framework is that we link the population pretraining data case to the finite sample case by showing the empirical and population pretraining losses are similar when the feature extractors are a parameterized family of models with capacity bounds (the first arrow in Figure 2). Hypothetically, suppose such a connection between population and empirical data case was built through the relationship between the population and empirical graphs, e.g., by proving that the empirical graph has similar spectral properties as the population graph, then the sample complexity will be exponential. Intuitively, this is because the population graph is very sparse, and the empirical graph is with high probability empty if the number of samples is only polynomial in dimension (e.g. consider the case when the augmentation simply adds small perturbation, as in the running example in Section 3.1). The empirical graph essentially follows the well-studied random geometric graph model (Penrose 2003), and tends to have no structure in high dimension Bubeck et al. 2016, Liu et al. 2021, Brennan et al. 2020. The fundamental difference between this hypothetical and our framework is that the empirical graph’s definition does not involve any parameterization, and thus the resemblance between the empirical and population graphs does not leverage the extrapolation (or inductive bias) of the model parameterization as our framework does for the pretraining losses.
We note that the inductive bias of the parameterized model is indeed used in the analysis for finite-sample case. We assume that the model family can express the eigenfunctions/eigenvectors of the graph (Assumption 3.7) and also implicitly assume bounds on its Rademacher complexity (in Theorem 4.3).
Once we obtained that the existence of a linear classifier, the remaining steps (the third and fourth arrows in Figure 2) follow from standard supervised learning theory.
In the rest of this section, we will give a proof sketch of the population case, which is the more challenging step.
In this section, we give a proof sketch of Theorem 3.8 in a simplified binary classification setting where there are only two classes in the downstream task.
Recall that is the size of . Recall that is the total weight associated with an augmented datapoint , which can also be thought of as the probability mass of as a randomly sampled augmented datapoint. In the scope of this section, for demonstrating the key idea, we also assume that has uniform distribution, i.e., for any .
Let be the normalized Laplacian matrix. Then, ’s are the smallest unit-norm eigenvectors of with eigenvalues . Elementary derivations can give a well-known, important property of the Laplacian matrix : the quadratic form captures the amount of edges across the two groups that are defined by the binary vector (Chung and Graham 1997, section 1.2):
With slight abuse of notation, suppose is the random variable for a positive pair. Using that is the density function for the positive pair and the simplification that , we can rewrite equation (12) as
Next, we use equation (14) to link to the eigenvectors of . Let be the rest of eigenvalues with unit-norm eigenvectors . Let and be the projection operators onto the subspaces spanned by the first and the last eigenvectors, respectively. Equation (14) implies that has limited projection to the subspace of :
where the first inequality follows from dropping the and using , and the second inequality is because that only contains eigenvectors with eigenvalue at least .
By higher-order Cheeger inequality (see Lemma B.4), we have that . Then, we obtain the mean-squared error bound:
Experiments
We test spectral contrastive learning on benchmark vision datasets. We minimize the empirical spectral contrastive loss with an encoder network and sample fresh augmentation in each iteration. The pseudo-code for the algorithm and more implementation details can be found in Section A.
Encoder / feature extractor. The encoder contains three components: a backbone network, a projection MLP and a projection function. The backbone network is a standard ResNet architecture. The projection MLP is a fully connected network with BN applied to each layer, and ReLU activation applied to each except for the last layer. The projection function takes a vector and projects it to a sphere ball with radius , where is a hyperparameter that we tune in experiments. We find that using a projection MLP and a projection function improves the performance.
Linear evaluation protocol. Given the pre-trained encoder network, we follow the standard linear evaluation protocol Chen and He 2020 and train a supervised linear classifier on frozen representations, which are from the ResNet’s global average pooling layer.
Results. We report the accuracy on CIFAR-10/100 Krizhevsky and Hinton 2009 and Tiny-ImageNet Le and Yang 2015 in Table 1. Our empirical results show that spectral contrastive learning achieves better performance than two popular baseline algorithms SimCLR Chen et al. 2020a and SimSiam Chen and He 2020. In Table 2 we report results on ImageNet Deng et al. 2009 dataset, and show that our algorithm achieves similar performance as other state-of-the-art methods. We note that our algorithm is much more principled than previous methods and doesn’t rely on large batch sizes (SimCLR Chen et al. 2020a), momentum encoders (BYOL Grill et al. 2020 and MoCo He et al. 2020) or additional tricks such as stop-gradient (SimSiam Chen and He 2020).
Conclusion
In this paper, we present a novel theoretical framework of self-supervised learning and provide provable guarantees for the learned representation on downstream linear classification tasks. We hope the framework could facilitate future theoretical analyses of self-supervised pretraining losses and inspire new methods. It does not capture the potential implicit bias of optimizers but does take into account the inductive bias of the models. By abstracting away the effect of optimization, we can focus on the effect of pretraining losses and their interaction with the structure of the population data. Future directions may include designing better pretraining losses and analyzing more fine-grained properties of the learned representations (e.g., as in recent follow-up works Shen et al. 2022, HaoChen et al. 2022), by potentially leveraging more advanced techniques from spectral graph theory.
Acknowledgements
We thank Margalit Glasgow, Ananya Kumar, Jason D. Lee, Sang Michael Xie, and Guodong Zhang for helpful discussions. CW acknowledges support from an NSF Graduate Research Fellowship. TM acknowledges support of Google Faculty Award and NSF IIS 2045685. We also acknowledge the support of HAI and the Google Cloud. Toyota Research Institute ("TRI") provided funds to assist the authors with their research but this article solely reflects the opinions and conclusions of its authors and not TRI or any other Toyota entity.
References
Appendix A Experiment details
The pseudo-code for our empirical algorithm is summarized in Algorithm 1.
Our results with different hyperparameters on CIFAR-10/100 and Tiny-ImageNet are listed in Table 3.
Additional details about the encoder. For the backbone network, we use the CIFAR variant of ResNet18 for CIFAR-10 and CIFAR-100 experiments and use ResNet50 for Tiny-ImageNet and ImageNet experiments. For the projection MLP, we use a 2-layer MLP with hidden and output dimensions 1000 for CIFAR-10, CIFAR100, and Tiny-ImageNet experiments. We use a 3-layer MLP with hidden and output dimension 8192 for ImageNet experiments. We set in the ImageNet experiment, and set for the CIFAR-10/100 and Tiny-ImageNet experiments.
Training the encoder. We train the neural network using SGD with momentum 0.9. The learning rate starts at 0.05 and decreases to 0 with a cosine schedule. On CIFAR-10/100 and Tiny-ImageNet we use weight decay 0.0005 and train for 800 epochs with batch size 512. On ImageNet we use weight decay 0.0001 and train for 100 epochs with batch size 384. We use 1 GTX 1080 GPU for CIFAR-10/100 and Tiny-ImageNet experiments, and use 8 GTX 1080 GPUs for ImageNet experiments.
Linear evaluation protocol. We train the linear head using SGD with batch size 256 and weight decay 0 for 100 epochs, learning rate starts at 30.0 and is decayed by 10x at the 60th and 80th epochs.
Image transformation details. We use the same augmentation strategy as described in Chen and He 2020.
Appendix B Proofs for Section 3
We first prove a more generalized version of Theorem 3.8 in section B.1, and then prove Theorem 3.8 in Section B.2.
For the proof we will follow the convention in literature Lee et al. 2014 and define the normalized Laplacian matrix as follows:
Let be the augmentation graph defined in Section 3.1. The normalized Laplacian matrix of the graph is defined as , where is the adjacency matrix with and is a diagonal matrix with .
It is easy to see that where is the normalized adjacency matrix defined in Section 3.1. Therefore, when is the -th smallest eigenvalue of , is the -th largest eigenvalue of .
We call a function defined on augmented data an extended labeling function. Given an extended labeling function, we define the following quantity that describes the difference between extended labels of two augmented data of the same natural datapoint:
We also define the following quantity that describes the difference between extended label of an augmentated datapoint and the ground truth label of the corresponding natural datapoint:
Recall the spectral contrastive loss defined in Section 3.2 is:
We first state a more general version of Theorem 3.8 as follows.
where is the one-hot embedding of and is the sparsest -partition defined in Definition 3.4. Furthermore, the error of the linear probe predictor can be bounded by
Also, if we let be the -th smallest eigenvalue of the normalized Laplacian matrix of the graph of the augmented data, we can find a matrix satisfying the above equations with norm bound .
We provide the proof for Theorem B.2 below.
Let be the smallest eigenvalues of the Laplacian matrix . The following theorem gives a theoretical guarantee similar to Theorem B.2 except for that the bound depends on :
where is the one-hot embedding of . Furthermore, the error can be bounded by
We defer the proof of Theorem B.3 to Section B.3.
To get rid of the dependency on , we use following higher-order Cheeger’s inequality from Louis and Makarychev 2014.
Let be a weight graph with . Then, for any and such that , there exists a partition of with
where is the Dirichlet conductance defined in Definition 3.3.
Now we prove Theorem B.2 by combining TheoremB.3 and Lemma B.4.
Let be the augmentation graph. In Lemma B.4 let and we have: there exists partition such that for . By Definition 3.4, we have , which leads to . Plugging this bound to Theorem B.3 finishes the proof. ∎
B.2 Proof of Theorem 3.8
We will use the following lemma which gives a connection between , and Assumption 3.6.
Let be the augmentation graph, be the number of underlying classes. Let be the partition induced by the classifier in Assumption 3.6. Then, there exists an extended labeling function such that
We define function as follows: for an augmented data , we use function to represent the index of set that is in, i.e., . By Assumption 3.6 it is easy to see . On the other hand, we have
Here the inequality is because when , there must be or . ∎
Now we give the proof of Theorem 3.8 using Lemma B.5 and Theorem B.2.
Let be the partition of induced by the classifier given in Assumption 3.6. Define function as follows: for an augmented datapoint , we use function to represent the index of set that is in, i.e., . Let in Theorem B.2, we have By Lemma B.5 we have and , so we have Notice that by definition of ensembled linear probe predictor, happens only if more than half of the augmentations of predicts differently from , so we have . ∎
B.3 Proof of Theorem B.3
The proof of Theorem B.3 contains two steps. First, we show that when the feature extractor is composed of the minimal eigenvectors of the normalized Laplacian matrix , we can achieve good linear probe accuracy. Then we show that minimizing gives us a feature extractor equally good as the eigenvectors.
For the first step, we use the following lemma which shows that the smallest eigenvectors of can approximate any function on up to an error proportional to the Rayleigh quotient of the function.
We can decompose the vector in the eigenvector basis as:
We also need the following claim about the Rayleigh quotient when is a vector defined by an extended labeling function .
To see the connection between the feature extractor minimizing the population spectral contrastive loss and the feature extractor corresponding to eigenvectors of the Laplacian matrix, we use the following lemma which states that the minimizer of the matrix approximation loss defined in Section 3.2 is equivalent to the minimizer of population spectral contrastive loss up to a data-wise scaling.
Recall that the definition of spectral contrastive loss is
where is a random positive pair, is a random negative pair. We can rewrite the spectral contrastive loss as
Compare Equation (B.3) and Equation (21), we see they only differ by a constant, which finishes the proof. ∎
Note that the minimizer of matrix approximation loss is exactly the largest eigenvectors of (also the smallest eigenvectors of ) due to Eckart–Young–Mirsky theorem, Lemma B.8 indicates that the minimizer of is equivalent to the smallest eigenvectors of up to data-wise scaling.
The following claim shows the relationship between quadratic loss and prediction error.
where is the one-hot embedding of .
When , by the definition of we know that there exists another such that . In this case,
Now we are ready to prove Theorem B.3 by combining Lemma B.6, Claim B.7, Lemma B.8 and Claim B.9.
Now we come back to the feature extractor that minimizes the spectral contrastive loss function . By Lemma B.8, matrix that contains as its -th row is a minimizer of . By Eckard-Young-Mirsky theorem, we have
and let be the one-hot embedding of , be the one-hot embedding of , we have
To bound the error rate, we first notice that Claim B.9 tells us that for any ,
Now we bound the error rate on as follows:
Appendix C Proofs for Section 3.4
Let be the uniform distribution over a ball with radius . Let be a partition of the Euclidean space. There must be some such that for all . Thus, we know that
On one hand, suppose , we can lower bound the numerator in the RHS of Equation (29) as
hence the RHS of Equation (29) is at least .
On the other hand, suppose , we have
hence the denominator of the RHS of Equation (29) can be upper bounded by
For two Gaussian distributions with variance and centers at most far from each other, their TV-distance is at most (see the first equation on Page 5 of Devroye et al. 2018), hence for any , we have . We can now lower bound the numerator in the RHS of Equation (29) as:
Notice that and by the definition of , we know , thus
Combine Equation (34), Equation (C.1) and Equation (37) gives:
Notice that (using the definition of surface area (Guggenheimer 1977, chapter 4))
we have that as ,
C.2 Proof of Theorem 3.11
In this section, we give a proof of Theorem 3.11.
The following lemma shows that the augmented graph for Example 3.10 satisfies Assumption 3.6 with some bounded .
In the setting of Theorem 3.11, the data distribution satisfies Assumption 3.6 with .
For any and any , by the tail bound of gaussian distribution we have
Also, for , when we have
Notice that , we can set . Therefore, when we can combine the above two cases and have
We use the following lemma to give a lower bound for the sparest -partition of the augmentation graph in Example 3.10.
In the setting of Theorem 3.11, for any and , we have
with , and
with
The proof of Lemma C.2 can be found in Section C.3. Now we give the proof of Example 3.11.
The result on is directly from Lemma C.1. By concentration inequality, there must exists some universal constant such that for any , we have . When this happens, we have . Since for we can just treat as constant, we have . Set in Lemma C.2, we have . Set , we apply Theorem 3.8 and get the bound we need. ∎
C.3 Proof of Lemma C.2
In this section we give a proof for Lemma C.2. We first introduce the following claim which states that for a given subset of augmented data, any two data close in norm cannot have a very different chance of being augmented into this set.
with .
By the definition of augmentation, we know
By the definition of , we have
Since by assumption, we have
Now we can bound the quanity of our interest:
Let be the disjoint sets that gives in Definition 3.4. First we notice that when , there must exist such that for all , we have
WLOG, we assume minimizes the RHS of Equation (42), so we only need to prove
where the second inequality is by Claim C.3. Notice that
where we use Equation (41). Define set be the set in the ambient space corresponding to . Define
Due to being -bi-lipschitz, it is easy to see . According to the Gaussian isoperimetric inequality Bobkov et al. 1997, we have
with is the Gaussian CDF function defined as
By Equation (C.3), either case 1 or case 2 holds. Combining case 1 and case 2, we have
Appendix D Proofs for Section 4
We restate the empirical spectral contrastive loss defined in Section 4 as follows:
Consider a dataset containing data points i.i.d. sampled from . Let be the uniform distribution over . Let be the uniform distribution over data pairs where . We define the empirical spectral contrastive loss of a feature extractor as
The following claim shows that is an unbiased estimator of population spectral contrastive loss.
is an unbiased estimator of , i.e.,
To make use of the Radmacher complexity theory, we need to write the empirical loss as the sum of i.i.d. terms, which is achieved by the following sub-sampling scheme:
Given dataset , we sample a subset of tuples as follows: first sample a permutation , then we sample tuples as follows:
It is easy to see that is an unbiased estimator of :
For given , if we sample as above, we have:
This is obvious by the definition of and . ∎
The following lemma reveals the relationship between the Rademacher complexity of feature extractors and the Rademacher complexity of the loss defined on tuples:
where are in , and is a uniform random vector in . Then, the empirical Rademacher complexity on any tuples can be bounded by
here the second inequality is by Talagrand’s lemma. Notice that for any and in and any we have
where the first inequaltiy is by Talagrand’s lemma. Combine these two equations and we get:
This means with probability at least over random , we have: with probability at least over random tuples conditioned on , Equation (44) holds. Since both and take value in range , we have: with probability at least over random , we have for any ,
Since negating the functions in a function class doesn’t change its Rademacher complexity, we also have the other direction: with probability at least over random , we have for any ,
Combine them together we get the excess risk bound: with probability at least , we have
where is minimizer of in and is minimizer of in . Set and and notice that finishes the proof. ∎
D.2 Generalization bound for spectral contrastive learning with deep neural networks
In this section, we examplify Theorem 4.1 with the norm-contralled Rademacher complexity bound introduced in Golowich et al. 2018, which gives the following theorem.
where is element-wise ReLU activation, is element-wise projection to interval for some , is the norm bound of the -th layer, has rows and has columns. Then, with probability at least over randomness of a dataset with size , we have
where is the minimizer of in , is the minimal achievable by any function , , constants and .
Consider the following hypothesis class of real-valued neural networks:
where is element-wise ReLU activation and is the norm bound of the -th layer defined in the theorem, has rows and is a vector. By Theorem 1 of Golowich et al. 2018, we have
Let the projection version of this hyposis class be:
where projects a real number into interval . Notice that is -Lipschitz, by Telegrand’s lemma we have
and absorbing the constants into finishes the proof. ∎
D.3 Proof of Theorem 4.2
In this section we give the proof of Theorem 4.2. We will first prove the following theorem that characterize the error propagation from pre-training to the downstream task.
Assume representation dimension , Assumption 3.6 holds for and Assumption 3.7 holds. Recall be the -th largest eigenvalue of the normalized adjacency matrix. Then, for any and such that , we have:
We first introduce the following definitions of -optimal minimizers of matrix approximation loss and population spectral contrastive loss:
We say a function is -optimal minimizer of matrix approximation loss if
where is written in the matrix form. We say a function is -optimal minimizer of spectral contrastive loss if
We introduce the following generalized version of Theorem B.3, which captures the main effects of error in the representation.
where and are defined in Equations 18 and 19 respectively.
The proof of Theorem D.9 is deferred to Section D.4.
Now we are ready to prove Theorem 4.2 using Theorem D.9.
Let be the partition of induced by the classifier in Assumption 3.6. Define function as follows: for an augmented datapoint , we use function to represent the index of set that is in, i.e., . Then by Lemma B.5 we have and . In Lemma B.4 let and , then there is , so we have: there exists a partition such that for . By Definition 3.4, we have , which leads to . So we have
Notice that by the definition of ensembled linear probe predictor, happens only if more than half of the augmentations of predicts differently from , so we have which finishes the proof. ∎
Theorem 4.2 is a direct corollary of Theorem 4.1 and Theorem D.7. ∎
D.4 Proof of Theorem D.9
In this section, we give the proof for Theorem D.9.
The proof follows the proof of Lemma B.8. ∎
We will use the following two lemmas about -optimal minimizer of :
Furthermore, the norm of is bounded by
Since columns of and columns of are in orthogonal subspaces, we have
On one hand, since is a rank- matrix, we know that . On the other hand, by the definition of -optimal minimizer, we have . Thus, we have
Since , we have . Thus,
Let , we have
To bound the norm of , we first notice that
where the inequality uses that fact that has operator norm at most . Combine this result with we have
We first give a lower bound of as follows:
where the first equality is by definition of , the second equality is by writing the Frobenius norm square as the sum of column norm square, the inequality is because must be in the span of while is the vector in this span that is closest to , the third equality is writing the projection function in the matrix form, the fourth equality is because are an orthonormal basis, the fifth equality is rewriting to Frobenius norm, and the last equality is by definition of .
We define variable for any . Also denote . We have the following equality:
Notice that and also when , we have , we have
where we replace every with when , replace with when , and keep when . Now notice that
there must be when . So we have
where the last equality is by Eckart–Young–Mirsky Theorem. So we know
The following lemma generalizes Lemma B.6.
Furethermore, the norm of is upper bounded by
Let be the choice that minimizes the right hand side. We use to denote the projection of onto the span of . We denote the coefficients as . For every , let be the vector in Lemma D.11. Define vector .
We use to denote the projection of onto the span of . Then we know that
where the first inequality if by Cauchy–Schwarz inequality and the second inequality if by Lemma D.12.
where the first inequality is by Cauchy-Schwarz inequality, and the second inequality is by Lemma D.11. Plugging Equation (61), Equation (62), and Equation (D.4) into Equation (60) finishes the proof.
To bound the norm of , we use Lemma D.11 and have
Now we prove Theorem D.9 using the above lemmas.
Let matrices and . We sum the above equation over all and get
where the first equality is by Claim B.7. On the other hand, we have
Plugging Equation (66) and Equation (67) into Equation (65) gives us
Notice that by definition of , we know that prediction only happens if . Hence we have
Now we are ready to bound the error rate on :
Here for the equality we are using the fact that . We finish the proof by noticing that by the definition of :
The norm of can be bounded using Lemma D.13 as:
Appendix E Proofs for Section 4.2
In this section we give the proof of Theorem 4.3.
Let be the minimizer of the empirical spectral contrastive loss. Let . We abuse notation and use to denote , and let . We first study the average empirical Rademacher complexity of the capped quadratic loss on a dataset , where is sampled as in Section 4.2:
By Theorem D.9 and follow the proof of Theorem D.7, we know that there exists a linear probe with norm bound such that
The result on naturally follows by the definition of . When clearly the bound is also true since LHS is always smaller than , so we know that the above bound is true for any . Plug in the bound for from Theorem 4.1 finishes the proof. ∎
Appendix F Formal statements for population with infinite supports
The distribution satisfies the following conditions:
(i) For any , the marginal distribution is well-defined and bouned .
(ii) There exists such that for every , the conditional probability with respect to one variable is upper bounded by the marginal probability of the other variable .
We note that our bound does not depend on value of —we only the existence of for a qualitative purpose. When the regularity conditions above hold, we will show that there exists an eigenfunction of the infinite adjacency graph is an analog to the eigenvectors of Laplacian that we introduced in Section B.
The following theorem shows the existence of eigenfunctions of the Laplacian operator.
Define kernel function , we have
On the one hand, since and , we have . On the other hand, notice that by Cauchy-Schwart inequality,
so , which finishes the proof. ∎