Predicting What You Already Know Helps: Provable Self-Supervised Learning
Jason D. Lee, Qi Lei, Nikunj Saunshi, Jiacheng Zhuo
Introduction
Self-supervised learning revitalizes machine learning models in computer vision, NLP, and control problems (see reference therein ). Training a model with auxiliary tasks based only on input features reduces the extensive costs of data collection and semantic annotations for downstream tasks. It is also known to improve the adversarial robustness of models . Self-supervised learning creates pseudo labels solely based on input features, and solves auxiliary prediction tasks (or pretext tasks) in a supervised manner. However, the underlying principles of self-supervised learning are mysterious since it is a-priori unclear why predicting what we already know should help. We thus raise the following question:
What conceptual connection between pretext and downstream tasks ensures good representations? What is a good way to quantify this?
As a thought experiment, consider a simple downstream task of classifying desert, forest, and sea images. A meaningful pretext task is to predict the background color of images (known as image colorization ). Denote to be the input image, color channel, and the downstream label respectively. Given knowledge of the label , one can possibly predict the background without knowing much about . In other words, is approximately independent of conditional on the label . Consider another task of inpainting the front of a building () from the rest (). While knowing the label “building” () is not sufficient for successful inpainting, adding additional latent variables such as architectural style, location, window positions, etc. will ensure that variation in given is small. We can mathematically interpret this as being approximate conditionally independent of given .
The main insight that we exploit in this work is that with approximate conditional independence (as in the above examples), a method that predicts from will inadvertently implicitly encode and learn to predict (and ) from as an intermediate step, and then predict from This is formally demonstrated in the proof sketch of Lemma 3.1.. Building upon this insight, we make the following contributions.
The goal of this paper, as in statistical learning theory, is to investigate the statistical connections between the random variables of input features (in this paper ) and downstream labels , and show how specific connections can guarantee a successful learning procedure. For self-supervised learning (SSL), success is measured using the following 2 notions, 1) expressivity, i.e. does the learned representation from SSL have the ability to express the ground truth prediction function for labels , and 2) sample complexity, i.e. can it do so with way fewer labeled samples than what would be required without SSL.
In this work, we establish theoretical analysis for self-supervised learning fulfilling these goals.
We provide generalization guarantees for a class of self-supervised algorithms under a statistical assumption of approximate conditional independence (ACI). Specifically, we show
small representation error: the learned representation can almost linearly separate downstream targets, and
small estimation error: learning the predictor for downstream tasks only require very few number of samples.
Our analysis focused on reconstruction-based SSL methods () is presented in sections 3 and 4. In Section 5, we instantiate the bound from the analysis in the topic modeling framework, a standard generative model for text , where and are chosen to be two halves of a text document. Although data can be sampled from a potentially infinite mixtures of underlying topics, an appropriate ACI assumption can be shown that leads to a downstream sample complexity of .
We also build the connection and extend the analysis to a variant of the SimSiam method, a non-linear canonical correlation analysis (CCA) method for self-supervised learning in Section 6. Further connecting this to alternating conditional expectation (ACE) algorithm , we show how this problem is related to decomposing the conditional distribution .
We quantify our notion of ACI by a certain partial covariance matrix (Definition 4.1) and our risk bound scales linear with it. We verify this and other aspects of our main generalization bound (Theorem 4.2) using simulation experiments in Section 7. We also find that pretext task experimentally helps when CI is approximately enforced in text domain. We further demonstrate on a real-world image dataset that a pretext task-based linear model performs at least as well as many baselines.
1 Related work
There has been a flurry of self-supervised methods lately. One class of methods reconstruct images from corrupted or incomplete versions of it, like denoising auto-encoders , image inpainting , and split-brain autoencoder . Pretext tasks are also created using visual common sense, including predicting rotation angle , relative patch position , recovering color channels , solving jigsaw puzzle games , and discriminating images created from distortion . We refer to the above procedures as reconstruction-based SSL. Another popular paradigm is contrastive learning . The idea is to learn representations that bring similar data points closer while pushing randomly selected points further away or to maximize a contrastive-based mutual information lower bound between different views . A popular approach for text domain is based on language modeling where models like BERT and GPT create auxiliary tasks for next word predictions . The natural ordering or topology of data is also exploited in video-based , graph-based or map-based SSL. For instance, the pretext task is to determine the correct temporal order for video frames as in .
Theory for SSL:
2 Overview of results:
Section 2 introduces notation, setup, and the self-supervised learning procedure considered in this work. In Section 3, we analyze downstream sample complexity under exact CI and unlimited labeled data to highlight the key ideas. Section 4 presents our main result with relaxed conditions: under ACI with latent variables, and assuming finite samples in both pretext and downstream tasks, for various function classes, and both regression and classification tasks. Section 5 demonstrates our results with an example in the setting of topic modeling. In Section 6 we extend our results to self-supervised tasks that enforce two views of data to have similar representations, or namely SimSiam . Experiments verifying our theoretical findings are in Section 7. Proofs of most results are in the Appendix.
Preliminary
which captures the correlation between and setting aside the effect of .
2 Setup and methodology
We study this simplified version in the main text, where in practice, the SSL procedure may utilize an encoder-decoder structure, while the downstream task uses both and to predict . We incorporate these extensions in Appendix C.3 and H.
With finite samples, performance of a learned representation on the downstream task depends on the following quantities that capture expressivity and sample complexity respectively:
Guaranteed recovery with conditional independence
In this section, we focus on the case where the input and pretext target are conditionally independent (CI) given the downstream label . While this is a strong assumption that is rarely satisfied in practice, it helps us understand the role of CI with clean results and builds up to our main results with ACI with latent variables in Section 4. As a warm-up, we show how CI helps when are jointly Gaussian to give us a flavor for the results to follow in Appendix B. We then analyze it for general random variables under two settings: (a) when the function class used for is universal, (b) when is restricted to be a linear function of given features. For now we assume access to a large amount of unlabeled data so as to learn the optimal perfectly and this will be relaxed later in Section 4. The general recipe for the results is as follows:
1. Find a closed-form expression for the optimal solution for the pretext task. 2. Use conditional independence to show that optimal is linear in , i.e., is small. 3. Exploit the low rank structure of to show small estimation error on downstream tasks.
Here can be interpreted as the multi-class labels where is the number of classes. For regression problems, one can think about as the discretized values of continuous labels. We do not specify the dimension for since could be arbitrarily encoded but the results only depend on and the variance of (conditional on the input ).
1 Universal function class.
This tells us that although could be nonlinear in , it is guaranteed to be linear in .
Lemma is proved by law of total expectation:
Given that is good for downstream, we now care about the sample complexity. We will need to assume that the representation has some nice concentration properties. We make an assumption about the whitened data to ignore scaling factors.
We note that all bounded random variables satisfy sub-gaussian property.
Fix a failure probability , under the same assumption as Lemma 3.1 and Assumption 3.2 for , if additionally , then the excess risk of the learned predictor on the downstream task satsifies
2 Function class induced by feature maps.
The optimal function in is , where and .
We again show the benefit of CI, but only comparing the performance of to the original features . Since is linear in , it cannot have smaller approximation error than . However CI will ensure that has the same approximation error as and enjoys better sample complexity.
(Bounded approx. error; Condition 3 in )) We have almost surely
(CI with approximation error) Fix a failure probability , under the same assumption as Lemma 3.4, Assumption 3.2 for and Assumption 3.3, if , then the excess risk of the learned predictor on the downstream task satisfies:
Thus with SSL, the requirement of labels is reduced from complexity for to .
Beyond conditional independence
Approximate conditional independence: Our new assumption will generalize Assumption 3.1 in two ways, 1) we allow for additional latent variables that together with could potentially make and independent, and 2) we allow this conditional independence to be approximate. Note that allowing for extra latent variable can trivially make and to be conditionally independent by picking a large enough (e.g. . However the following assumption, that needs the pretext target to correlate with all instances of variable (analogous to Lemma 3.1), will impose this restriction on how large can be.
Suppose there exists latent variable that ensures , where is pseudo-inverse, and is the one-hot embedding for .
Just as in Section 3, this assumption will not assume away the problem (Example 3.1 can be suitably extended). The additional term here captures both the “scale” of and also the strength of correlation between and that was discussed after Lemma 3.1. For to be full column rank, it is essential that , and this already gives an upper bound on the size of . Given this restriction on (and thus ), we define the notion of approximate conditional independence.
Firstly we note that this is indeed an extension of exact CI, since exact CI in both cases will imply that . We present a unified analysis in the appendix that shows the for the second case is same as the first case, with covariance operators instead of matrices (A direct derivation is in Claim D.7). We also present more relaxed and general form of the above assumptions in Appendix G.1. With this assumption, we are ready to present our main bound.
(Bounded approximation error on pretext phase ) There exists a universal constant , such that almost surely.
Example: Topic Modeling
In this section, we will demonstrate how our framework can be instantiated for mixed-membership models including topic models, not just clustering. Topic modeling for text has a rich literature and is used for analyzing and designing algorithms for information retrieval, dimensionality reduction and data analysis for large text corpora. We describe the basic setup below, followed by how our results for reconstruction-based SSL can be instantiated to learn such models.
Sample a topic mixture , where is some underlying distribution over , i.e.
For each , sample a topic and sample a word from the topic
A crucial property of topic model described above is that words in the document are sampled independently given the topic mixture , thus giving us the property: . Although the cardinality of (that implicitly shows up in Theorem 4.2) is infinite, we can still show the benefit of SSL using our theoretical framework. We will show appropriate bounds for and , that show up in Theorem 4.2, using the topic model generative process.
takes distinct values, i.e.
and are uncorrelated given , which implies .
Conditional distribution decomposition: SimSiam, CCA, ACE
In this section we establish the connection between SimSiam and non-linear CCA between and and the alternating conditional expectation (ACE) algorithm. We show how our previous analysis can be extended to this setting and how the problem relates to decomposing the conditional distribution of .
In the previous sections, we used to predict given . As discussed in Remark C.1, we could have predicted from for any function , with all bounds depending on the function . An alternative is to avoid choosing a specific , but instead simultaneously learn an that can be easily predicted from . We further show how our problem setup and analysis can capture the popular method of SimSiam, an SSL method that does not use negative samples.
For zero-mean representation functions , we consider the generalized alternating conditional expectation (ACE) algorithm () that optimizes the following:
In the setting for the SimSiam method, and are two randomly augmented images. The non-linear CCA problem is almost identical to SimSiam, except that we use normalization of representation instead of stop-gradient to prevent representation collapse. CCA maximizes the inner product of the representations for each positive pairs generated from their joint distribution. At the same time, the normalization constraint ensures that the representation doesn’t collapse to trivial function, so we do not need negative samples. We now demonstrate how our previous analysis can easily apply to non-linear CCA.
In the same setting of Theorem 6.1, and suppose the learned satisfies Assumption 3.2, then we have:
We assume is almost deterministic when predicting from either or . Specifically, there exists a classifier such that ; there exists such that .
Under the same setting and algorithm as Corollary 6.2, if additionally we assume -Bayes error (Assumption 6.1), we have that the generalization error also satisfies:
where is the -th maximal correlation between and .
When the joint distribution of is non-degenerate, . Therefore when Bayes error is small, the learned representation will yield a good downstream performance.
This corollary and the clustering setting is inspired by Theorem 3.7 in , which showed a similar result for a spectral contrastive loss. Our corollary here shows that non-linear CCA achieves similar guarantees as spectral contrastive loss, without needing any negative samples.
2 Connection to ACE algorithm and maximal correlation
Due to Courant–Fischer–Weyl min-max principle, the top singular value of can be computed by the variational problem
The top singular vectors of can be computed by the variational problem
ACE algorithm (Eqn. (5)) with -dimensional vector-valued functions solves the ()-SVD of , and the top singular vectors of is always achieved by constant functions and .
The second proposition shows that the variational form can be solved by the famous ACE algorithm of Breiman and Friedman .
The generalized ACE algorithm solves (4), and is equivalent to the solution of non-linear CCA as in (5).
Therefore the solution of ACE is equivalent to that of non-linear CCA.
In summary, these two propositions show that calculating the SVD of corresponds to conducting the alternating conditional expectation algorithm .
Finally, the generalized maximal correlation between and is associated with the singular values of .
For every , we define the -th maximal correlation between and as:
Experiments
In this section, we empirically verify our claim that SSL performs well when ACI is satisfied. More details for experiments can be found in Section K, including experiments in the text domain.
Computer Vision Task.
We verify if learning from is more effective than learning directly from , in a realistic setting (without enforcing conditional independence). Specifically, we test on the Yearbook dataset , and try to predict the date when the portraits are taken (denoted as ), which ranges from to . We resize all the portraits to be by . We crop out the center by pixels (the face), and treat it as , and treat the outer rim as as shown in Figure 2. Our task is to predict , which is the year when the portraits are taken, and the year ranges from to . For , we learn from with standard image inpainting techniques , and full set of training data (without labels). After that we fix the learned and learn a linear model to predict from using a smaller set of data (with labels). Besides linear model on , another strong baseline that we compare with is using ResNet18 to predict from . With the full set of training data, this model is able to achieve a Mean Absolute Difference of , close to what state-of-the-art can achieve . ResNet18 has similar amount of parameters as our generator, and hence roughly in the same function class. We show the MSE result as in Figure 2. Learning from is more effective than learning from or directly, with linear model as well as with ResNet18. Practitioner usually fine-tune with the downstream task, which leads to more competitive performance .
Conclusion
In this work we theoretically quantify how an approximate conditional independence assumption that connects pretext and downstream task data distributions can give sample complexity benefits of self-supervised learning on downstream tasks. Our theoretical findings are also supported by experiments on simulated data and also on real CV and NLP tasks. We would like to note that approximate CI is only a sufficient condition for a useful pretext task. We leave it for future work to investigate other mechanisms by which pretext tasks help with downstream tasks.
References
Appendix A Some Useful Facts
For a covariance matrix of joint distribution for variables , the covariance matrix is
Its inverse matrix satisfies
A.2 Relation to Conditional Independence
When , the partial covariance between given is :
For random variables and a random variable with finite values, conditional independence is equivalent to:
A.3 Technical Facts for Matrix Concentration
We include this covariance concentration result that is adapted from Claim A.2 in :
And we will also use Claim A.2 from for concentrating subgaussian random variable.
Each -th column of is an -dim vector that is i.i.d sampled from Gaussian distribution .
Each term satisfy , and therefore with probability at least over ,
Using union bound, take and summing over we get:
Let be independent zero-mean vector-valued random variables. Let
Therefore by vector Bernstein Inequality, with probability at least , . Then by taking union bound, we get that with probability .
Appendix B Warm-up: jointly Gaussian variables
Under Assumption B.1, the representation function and optimal prediction that minimize the population risk can be expressed as follows:
Under Assumption B.1, B.2, if has rank , we have , i.e., .
Next we consider the estimation error that characterizes the number of samples needed to learn a prediction function that generalizes.
Fix a failure probability . Under Assumption B.1,B.2, if , excess risk of the learned predictor on the target task satisfies
This assumption lets introduce some reasonable latent variables that capture the information between and apart from . being full rank says that all directions of are needed to predict , and therefore is not redundant. For instance, when , the assumption is trivially true but is not the minimal latent information we want to add. Note it implicitly requires .
Under Assumption B.1, B.3, we have , i.e., the approximation error is 0. We can also generalize Theorem B.3 by replacing by .
Appendix C Omitted Proofs with Conditional Independence
Let selector operator be the mapping such that , we overload it as the matrix that ensure for any random variable as well.
Therefore by rearranging both sides, we have:
The last inequality is derived from Claim A.4 and the fact that each row of follows gaussian distribution . Therefore
Let the representation function be defined as:
With Lemma 3.1 we know , and therefore . Next from basic inequality and the same proof as in Theorem B.3 we have:
And therefore we could easily conclude that:
C.2 Omitted proof of linear model with approximation error
Recall . We have the basic inequality,
With Assumption 3.3 and by concentration , we have
Denote , where is rank under exact CI since . We have
Finally, by concentration we transfer the result from empirical loss to excess risk and get:
C.3 Argument on Denoising Auto-encoder or Context Encoder
We note that since ensures for any deterministic function , we could replace by and all results hold. Therefore in practice, we could use instead of for downstream task. Specifically with denoising auto-encoder or context encoder, one could think about as the inverse of decoder () and use the encoder function as the representation for downstream tasks, which is more commonly used in practice.
This section explains what we claim in Remark C.1. For context encoder, the reconstruction loss targets to find the encoder and decoder that achieve
where is the masked part we want to recover and is the remainder.
If we naively apply our theorem we should use as the representation, while in practice we instead use only the encoder part as the learned representation. We argue that our theory also support this practical usage if we view the problem differently. Consider the pretext task to predict instead of directly, namely,
and then we should indeed use as the representation. On one hand, when , it also satisfies since is a deterministic function of and all our theory applies. On the other hand, the optimization on (13) or (14) give us similar result. Let
where is the Lipschitz constant for function . This is to say, in practice, we optimize over (13), and achieves a good representation such that and thus performs well for downstream tasks. (Recall is defined in Theorem 4.2 that measures how well we have learned the pretext task.)
Appendix D Omitted Proofs Beyond Conditional Independence
As before, for simplicity we assume all data is centered in this case.
denotes -th singular value of , and is the pseudo-inverse of . and is of rank , where .
When is not exactly CI of given and , the approximation error depends on the norm of . Let be the solution from Equation 2.2.
Under Assumption D.1 with constant and , then the excess risk satisfies
Let be our target direction. Denote the optimal representation matrix by (where ).
Next we will make use of the conditional covariance matrix:
and plug it in into the definition of :
where and . We analyze these two terms respectively.
For , we note that spanspan: . By right multiplying the selector matrix we have: , i.e., , where . From our assumption that , we have . (Or we could directly define as . )
By concentration, we have converges to . Specifically, when , (by using Lemma A.2 ). Together we have .
Let . We note that where is our target direction and is random noise (each row of has covariance matrix ).
Next, by the same procedure that concentrates to with Claim A.2, we could easily get
D.2 Measuring conditional dependence with cross-covariance operator
denotes the Hilbert space of square integrable function with respect to the measure , the marginal distribution of . We are interested in some function class that is induced from some feature maps:
Linear model is a special case when feature map is identity mapping and the inner product is over Euclidean space. A feature map with higher order polynomials correspondingly incorporate high order moments . For discrete variable we overload as the one-hot embedding.
When there’s no ambiguity, we overload as the random variable over domain , and as the function class over . Next we characterize CI using the cross-covariance operator.
With one-hot encoding map and arbitrary , ensures:
A more complete discussion of cross-covariance operator and CI can be found in . Also, recall that an operator is Hilbert-Schmidt (HS) if for complete orthonormal systems (CONSs) of and of , . The Hilbert-Schmidt norm generalizes the Frobenius norm from matrices to operators, and we will later use to quantify approximate CI.
We note that covariance operators are commonly used to capture conditional dependence of random variables. In this work, we utilize the covariance operator to quantify the performance of the algorithm even when the algorithm is not a kernel method.
D.3 Omitted Proof in General Setting
For feature maps with universal property, we have:
For general feature maps, we instead have:
To prove Claim D.5, we show the following lemma:
Let be a universal feature map, then for random variable we have:
D.4 Omitted Proof for Main Results
We first prove a simpler version without approximation error.
For a fixed , under Assumption 4.1, 3.2, if there is no approximation error, i.e., there exists a linear operator such that , if , and we learn the pretext tasks such that:
Then we are able to achieve generalization for downstream task with probability :
Let be defined as follows:
Let be our target direction. Denote the optimal representation matrix by
where and .
In this proof, we denote as the matrix such that . Specifically, if is of dimension , is of size . Therefore for any random variable .
where satisfies . Therefore spanspan since we have assumed that to be full rank.
On the other hand, concentrates to . Specifically, when , (by using Lemma A.3 ). Together we have .
Also, the noise term after projection satisfies as using Corollary A.6. Therefore .
Recall that And with exactly the same procedure as Theorem D.1 we also get that:
With the proper concentration we also get:
Next we move on to the proof of our main result Theorem 4.2 where approximation error occurs.
The proof is a combination of Theorem 3.5 and Theorem D.8. We follow the same notation as in Theorem D.8. Now the only difference is that an additional term is included in :
From re-arranging ,
Then with similar procedure as in the proof of Theorem 3.5, and write as , we have:
D.5 Principal Component Regression
Due to the property of PCA, and .
Similarly we have . ∎
This technical fact could be used to complete the proof for Remark 4.1.
Recall are defined as follows:
is the optimal representation matrix. is the features obtained from -PCA of . which is low rank plus small norm. ( and . Suppose .) Let be our target direction, where .
Due to representation learning error (finite sample in the first stage) and approximate conditional independence, the target direction is not perfectly linear in or its -PCA features .
Now with PCR we learn the linear model with Together with D.9 and the same procedure as Theorem D.8 we also get that:
Let is of rank at most .
With concentration on the downstream labeled samples we also get the result in Remark 4.1:
Appendix E Omitted Proofs Beyond Conditional Independence
The upper bound for can be computed as follows
Appendix F Omitted Proofs on Learning the Conditional Distribution
Representation operator ,
Low rank approximation operator ,
Under conditional independence
From the definition of we can decompose it into the following two operators :
Operator that measures conditional independence:
When we set , we have the following corollary:
In the same setting of Theorem F.1, suppose the -th maximal correlation between and is not zero, then we have:
Next we present the proof of Theorem F.1, Corollary 6.2 and Corollary 6.3.
F.2 Proof of Theorem F.1
The joint distribution satisfies:
Let functions , and . Then we have that:
First we show that . For any , we have that
Second, let and , we have Therefore we have for and . Therefore . ∎
Let be the same from Lemma F.3. Then we have:
Therefore
Therefore . . ∎
Let be the rank- approximation of , i.e., , where . Then with the same definition of and as Claim F.3, we have that:
where is the ()-th singular value of , i.e., the -th maximal correlation between and
Write the full decomposition of as . We have that:
Therefore
Therefore and
Therefore . ∎
Therefore the second term is in Theorem F.1 and it remains to prove that the first term is small.
With Theorem F.1 and we take as in Lemma F.5. We only need to upper bound
Altogether we have the approximation error is upper bounded by .
Appendix G General Results and Comparison to [62]
We now show a more general form of our results and also connect the multi-view redundancy assumption from to ours.
We first note that all our results hold for a generalized version of Assumption 4.1 and Definition 4.1 that we state below.
Suppose with is a discrete latent variable that satisfies
makes and approximately CI as in Definition 4.1, i.e.
also makes and approximately CI with
, where is pseudo-inverse, and is the one-hot embedding for .
Note that our assumptions from the main paper are a special case of Assumption G.1, with being satisfied automatically as is explicitly defined to contain in it. Unlike Assumption 4.1, we do not need to be a discrete variable, but just need to be discrete. We state the generalization of Theorem 4.2 below
G.2 Comparison to [62]
We show guarantees for our algorithm under the assumption from in the following special case that satisfies: (1) and are exactly CI given (thus ), (2) the variation in the target is small given and . The assumption from , in our setting, is equivalent to saying that and are small, where
A similar assumption of multi-view redundancy also appears in ; however they state it in terms of information-theoretic quantities instead. We will show that these assumptions are also almost sufficient to show results in our setting. In particular we show that if is almost deterministic (which makes sense for a many regression tasks) and if is small, then defined in the previous subsection will be small and thus we have meaningful guarantees.
Let be the variance of . is as defined in Assumption G.1 with the extra condition that and are exactly CI given . Then we have
Plugging this into Theorem G.1 will give us the desired result. Note however that we did not even use the fact that is small. Using this part of the assumption, we can get an even stronger result that shows that even though our learned representation will only , if will still predict well.
Thus we see that the assumption from is strong enough for us to be able to show stronger results than just our assumption. We complete this section by proving Lemma G.2
We will also make use of the following lemma that is easily proved using Cauchy-Schwarz inequality
The proof follows from the following sequence of inequalities that uses Jensen’s inequality, conditional independence of and and the above lemma. For simplicity we assume that is a scalar random variable, the proof is the same for vector values , except squared values will replaced by norm squared values.
Thus using the above lemma, we get the desired upper bound on . ∎
Appendix I Theoretical analysis for classification tasks
We now consider the benefit of learning from a class on linear classification task for label set . The performance of a classifier is measured using the standard logistic loss
We assume that the optimal regressor for one-hot encoding also does well on linear classification.
For a fixed , under the same setting as Theorem 4.2 and Assumption I.1, we have:
We simply follow the following sequence of steps
Appendix J Four Different Ways to Use CI
In this section we propose four different ways to use conditional independence to prove zero approximation error, i.e.,
Write as the covariance matrix for the joint distribution .
When conditional independence is satisfied, is block diagonal matrix, i.e., and are zero matrices.
where for . Also,
First using , we get the following identities
From Equation (26) we get that and plugging this into Equation (24) we get
We now make use of the following expression for inverse of a matrix that uses Schur complement: is the Schur complement of for defined below
For , we have that and thus
This proves Equation (21) and similarly Equation (22) can be proved.
For the second part, we will use the fact that . Thus
The other statement can be proved similarly. ∎
J.2 Closed form of Linear Conditional Expectation
Refer to Claim B.1 and proof of Lemma B.2. As this is the simplest proof we used in our paper.
J.3 From Law of Iterated Expectation
It’s easy to see that to learn from representation , we need to have some good property, such as light tail in eigenspace, and needs to be full rank in its column space.
Notice in the case of conditional independence, , and . Therefore we could easily learn from if has enough information of such that is of the same rank as dimension of .
Let the representation function be defined as follows, and let we use law of iterated expectation:
Appendix K More on the experiments
In this section, we include more experiment setup and results.
All the experiments are performed on a desktop computer with Intel i7-8700K, 16GB RAM.
Following Theorem 4.2, we know that the Excessive Risk (ER) is also controlled by (1) the number of samples for the pretext task (), and (2) the number of samples for the downstream task (), besides and as discussed in the main text. In this simulation, we enforce strict conditional independence, and explore how ER varies with and . We generate the data the same way as in the main text, and keep , and We restrict the function class to linear model. Hence is the linear model to predict from given the pretext dataset. We use Mean Squared Error (MSE) as the metric, since it is the empirical version of the ER. As shown in Figure 3, consistently outperforms in predicting using a linear model learnt from the given downstream dataset, and ER does scale linearly with , as indicated by our analysis.
Computer Vision Task.
For the context encoder part, we use all the recommended hyperparameter as in the provided source codes. For the downstream resnet18 regression, we perform grid search over the hyperparameters to achieve best performance. Specifically, we set the batch size to be , and traing the resnet18 for epoches. One pass of training (loops over all the settings with different number of labeled data) is finished within hours. All the experiments are performed on a desktop computer with Intel i7-8700K, 16GB RAM, and NVIDIA Geforce 1080. Training of the context encoder is finished within hours. The yearbook dataset is distributed under BSD license.
Following the same procedure, we try to predict the gender . We normalize the label () to unit variance, and confine ourself to linear function class. That is, instead of using a context encoder to impaint from , we confine to be a linear function. As shown on the left of Figure 4, the MSE of predicting gender is higher than predicting dates. We find that , while . Moreover, as shown on the right of Figure 4, conditioning on cancels out more spectrum than conditioning on . In this case, we conjecture that, unlike , does not capture much dependence between and . And as a result, is larger, and the downstream performance is worse, as we expected.
NLP Task.
We look at the setting where both and are the set of sentences and perform experiments by enforcing CI with and without latent variables. The downstream task is sentiment classification with the Stanford Sentiment Treebank (SST) dataset , where inputs are movie reviews and the label set is . We learn a linear representation in the SSL phase as defined in Section 4. Here we , we pick to be the bag-of-words representations of the movie review , which has a vocabulary size of 13848 For we use a dimensional embedding of the sentence, that is the mean of word vectors (random Gaussians) for the words in the review . For SSL data we consider 2 settings, (a) enforce CI with the labels , (b) enforce CI with extra latent variables, for which we use fine-grained version of SST with label set Ratings correspond to and correspond to .. In this setting, for every label (or ), we independently sample movie reviews and from the class (or ), thus simulating the CI (or approximate CI) condition. We test the learned on SST binary task with linear regression and linear classification; results are presented in Figure 5. We observe that in both settings outperforms , especially in the small-sample-size regime. Exact CI is better than CI with latent variables, as suggested by theory.