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 X1,X2,YX_{1},X_{2},Y to be the input image, color channel, and the downstream label respectively. Given knowledge of the label YY, one can possibly predict the background X2X_{2} without knowing much about X1X_{1}. In other words, X2X_{2} is approximately independent of X1X_{1} conditional on the label YY. Consider another task of inpainting the front of a building (X2X_{2}) from the rest (X1X_{1}). While knowing the label “building” (YY) is not sufficient for successful inpainting, adding additional latent variables ZZ such as architectural style, location, window positions, etc. will ensure that variation in X2X_{2} given Y,ZY,Z is small. We can mathematically interpret this as X1X_{1} being approximate conditionally independent of X2X_{2} given Y,ZY,Z.

The main insight that we exploit in this work is that with approximate conditional independence (as in the above examples), a method that predicts X2X_{2} from X1X_{1} will inadvertently implicitly encode and learn to predict YY (and ZZ) from X1X_{1} as an intermediate step, and then predict X2X_{2} from YYThis 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 (X1,X2)(X_{1},X_{2})) and downstream labels YY, 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 YY, 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 X1X_{1} and X2X_{2} are chosen to be two halves of a text document. Although data can be sampled from a potentially infinite mixtures of kk underlying topics, an appropriate ACI assumption can be shown that leads to a downstream sample complexity of O(k)\mathcal{O}(k).

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 X2∣X1X_{2}\mid X_{1}.

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 XX and YY setting aside the effect of ZZ.

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 X1X_{1} and X2X_{2} to predict YY. We incorporate these extensions in Appendix C.3 and H.

With finite samples, performance of a learned representation ψ\psi 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 X1X_{1} and pretext target X2X_{2} are conditionally independent (CI) given the downstream label YY. 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 (X1,X2,Y)(X_{1},X_{2},Y) 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 ψ\psi is universal, (b) when ψ\psi 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 ψ∗\psi^{*} 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 ψ∗\psi^{*} for the pretext task. 2. Use conditional independence to show that optimal f∗f^{*} is linear in ψ∗\psi^{*}, i.e., eapx(ψ∗)e_{\text{apx}}(\psi^{*}) is small. 3. Exploit the low rank structure of ψ∗\psi^{*} to show small estimation error on downstream tasks.

Here YY can be interpreted as the multi-class labels where kk is the number of classes. For regression problems, one can think about YY as the discretized values of continuous labels. We do not specify the dimension for YY since YY could be arbitrarily encoded but the results only depend on kk and the variance of YY (conditional on the input X1X_{1}).

1 Universal function class.

This tells us that although f∗f^{*} could be nonlinear in x1{\bm{x}}_{1}, it is guaranteed to be linear in ψ∗(x1)\psi^{*}({\bm{x}}_{1}).

Lemma is proved by law of total expectation:

Given that ψ∗\psi^{*} 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 ψ∗(X1)\psi^{*}(X_{1}) to ignore scaling factors.

We note that all bounded random variables satisfy sub-gaussian property.

Fix a failure probability δ∈(0,1)\delta\in(0,1), under the same assumption as Lemma 3.1 and Assumption 3.2 for ψ∗\psi^{*}, if additionally n2≫ρ4(k+log⁡(1/δ))n_{2}\gg\rho^{4}(k+\log(1/\delta)), then the excess risk of the learned predictor x1→W^⊤ψ∗(x1){\bm{x}}_{1}\rightarrow\hat{\bm{W}}^{\top}\psi^{*}({\bm{x}}_{1}) on the downstream task satsifies

2 Function class induced by feature maps.

The optimal function in H\mathcal{H} is ψ∗(x1)=ΣX2ϕ1Σϕ1ϕ1−1ϕ1(x1)\psi^{*}({\bm{x}}_{1})={\bm{\Sigma}}_{X_{2}\phi_{1}}{\bm{\Sigma}}_{\phi_{1}\phi_{1}}^{-1}\phi_{1}({\bm{x}}_{1}), where ΣX2ϕ1:=ΣX2ϕ1(X1){\bm{\Sigma}}_{X_{2}\phi_{1}}:={\bm{\Sigma}}_{X_{2}\phi_{1}(X_{1})} and Σϕ1ϕ1:=Σϕ1(X1)ϕ1(X1){\bm{\Sigma}}_{\phi_{1}\phi_{1}}:={\bm{\Sigma}}_{\phi_{1}(X_{1})\phi_{1}(X_{1})}.

We again show the benefit of CI, but only comparing the performance of ψ∗\psi^{*} to the original features ϕ1\phi_{1}. Since ψ∗\psi^{*} is linear in ϕ1\phi_{1}, it cannot have smaller approximation error than ϕ1\phi_{1}. However CI will ensure that ψ∗\psi^{*} has the same approximation error as ϕ1\phi_{1} and enjoys better sample complexity.

(Bounded approx. error; Condition 3 in )) We have almost surely

(CI with approximation error) Fix a failure probability δ∈(0,1)\delta\in(0,1), under the same assumption as Lemma 3.4, Assumption 3.2 for ψ∗\psi^{*} and Assumption 3.3, if n2≫ρ4(k+log⁡(1/δ))n_{2}\gg\rho^{4}(k+\log(1/\delta)), then the excess risk of the learned predictor x1→W^⊤ψ∗(x1){\bm{x}}_{1}\rightarrow\hat{\bm{W}}^{\top}\psi^{*}({\bm{x}}_{1}) on the downstream task satisfies:

Thus with SSL, the requirement of labels is reduced from complexity for D1D_{1} to O(k)\mathcal{O}(k).

Beyond conditional independence

Approximate conditional independence: Our new assumption will generalize Assumption 3.1 in two ways, 1) we allow for additional latent variables ZZ that together with YY could potentially make X1X_{1} and X2X_{2} independent, and 2) we allow this conditional independence to be approximate. Note that allowing for extra latent variable can trivially make X1X_{1} and X2X_{2} to be conditionally independent by picking a large enough ZZ (e.g. Z=(X1,X2))Z=(X_{1},X_{2})). However the following assumption, that needs the pretext target X2X_{2} to correlate with all instances of variable Yˉ=[Y,Z]\bar{Y}=[Y,Z] (analogous to Lemma 3.1), will impose this restriction on how large ZZ can be.

Suppose there exists latent variable Z∈Z,∣Z∣=mZ\in\mathcal{Z},|\mathcal{Z}|=m that ensures ΣϕyˉX2 is full column rank and ∥ΣYϕyˉΣX2ϕyˉ†∥2=1/β{\bm{\Sigma}}_{\phi_{\bar{y}}X_{2}}\text{ is full column rank and }\|{\bm{\Sigma}}_{Y\phi_{\bar{y}}}{\bm{\Sigma}}_{X_{2}\phi_{\bar{y}}}^{\dagger}\|_{2}=1/\beta, where A†A^{\dagger} is pseudo-inverse, and ϕyˉ\phi_{\bar{y}} is the one-hot embedding for Yˉ=[Y,Z]\bar{Y}=[Y,Z].

Just as in Section 3, this assumption will not assume away the problem (Example 3.1 can be suitably extended). The additional term 1/β1/\beta here captures both the “scale” of X2X_{2} and also the strength of correlation between X2X_{2} and [Y,Z][Y,Z] that was discussed after Lemma 3.1. For ΣϕyˉX2{\bm{\Sigma}}_{\phi_{\bar{y}}X_{2}} to be full column rank, it is essential that d2≥kmd_{2}\geq km, and this already gives an upper bound on the size of ZZ. Given this restriction on ZZ (and thus Yˉ\bar{Y}), 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 ϵCI=0\epsilon_{\text{CI}}=0. We present a unified analysis in the appendix that shows the ϵCI\epsilon_{\text{CI}} 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 b0b_{0}, such that ∥Σϕ1ϕ1−1/2ϕ1(X1)a(X1)⊤∥F≤b0d2\|{\bm{\Sigma}}_{\phi_{1}\phi_{1}}^{-1/2}\phi_{1}(X_{1})a(X_{1})^{\top}\|_{F}\leq b_{0}\sqrt{d_{2}} 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 μ∼τ\mu\sim\tau, where τ\tau is some underlying distribution over Δk\Delta_{k}, i.e. τ∈ΔΔ[k]\tau\in\Delta_{\Delta_{[k]}}

For each i∈[N]i\in[N], sample a topic ti∼μt_{i}\sim\mu and sample a word xi∼Atix_{i}\sim A_{t_{i}} from the topic

A crucial property of topic model described above is that words in the document are sampled independently given the topic mixture μ\mu, thus giving us the property: X1⊥X2∣μX_{1}\perp X_{2}\mid\mu. Although the cardinality of μ∈Δ[k]\mu\in\Delta_{[k]} (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 ϵCI\epsilon_{\text{CI}} and β\beta, that show up in Theorem 4.2, using the topic model generative process.

Yˉ\bar{Y} takes kk distinct values, i.e. ∣Yˉ∣=k|\bar{\mathcal{Y}}|=k

X1X_{1} and X1X_{1} are uncorrelated given Yˉ\bar{Y}, which implies ϵCI=0\epsilon_{\text{CI}}=0.

β−1≤κ∥w∥2/λmin⁡(A)\beta^{-1}\leq\kappa\|w\|_{2}/\lambda_{\min}(A)

Conditional distribution decomposition: SimSiam, CCA, ACE

In this section we establish the connection between SimSiam and non-linear CCA between X1X_{1} and X2X_{2} 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 X2∣X1X_{2}\mid X_{1}.

In the previous sections, we used ψ\psi to predict X2X_{2} given X1X_{1}. As discussed in Remark C.1, we could have predicted η(X2)\eta(X_{2}) from X1X_{1} for any function η\eta, with all bounds depending on the function η\eta. An alternative is to avoid choosing a specific η\eta, but instead simultaneously learn an η\eta that can be easily predicted from X1X_{1}. 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 ψ:ψi∈L2(X1),η:ηi∈L2(X2),i∈[k]\psi:\psi_{i}\in L^{2}(X_{1}),\eta:\eta_{i}\in L^{2}(X_{2}),i\in[k], we consider the generalized alternating conditional expectation (ACE) algorithm () that optimizes the following:

In the setting for the SimSiam method, X1X_{1} and X2X_{2} 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 (X1,X2)(X_{1},X_{2}) 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 ψ\psi satisfies Assumption 3.2, then we have:

We assume YY is almost deterministic when predicting from either X1X_{1} or X2X_{2}. Specifically, there exists a classifier g1∗g_{1}^{*} such that PX1,Y(g1∗(x)≠y)≤αP_{X_{1},Y}(g_{1}^{*}(x)\neq y)\leq\alpha; there exists g2∗g_{2}^{*} such that PX2,Y(g2∗(x)≠y)≤αP_{X_{2},Y}(g_{2}^{*}(x)\neq y)\leq\alpha.

Under the same setting and algorithm as Corollary 6.2, if additionally we assume α\alpha-Bayes error (Assumption 6.1), we have that the generalization error also satisfies:

where λ\lambda is the kk-th maximal correlation between X1X_{1} and X2X_{2}.

When the joint distribution of X1,X2X_{1},X_{2} is non-degenerate, λ<1\lambda<1. 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 T\mathcal{T} can be computed by the variational problem

The top kk singular vectors of T\mathcal{T} can be computed by the variational problem

ACE algorithm (Eqn. (5)) with kk-dimensional vector-valued functions solves the (k+1k+1)-SVD of T\mathcal{T}, and the top singular vectors of T\mathcal{T} is always achieved by constant functions u(x1)≡1u(x_{1})\equiv 1 and v(x2)≡1v(x_{2})\equiv 1.

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 T\mathcal{T} corresponds to conducting the alternating conditional expectation algorithm .

Finally, the generalized maximal correlation between X1X_{1} and X2X_{2} is associated with the singular values of T\mathcal{T}.

For every k≥1k\geq 1, we define the kk-th maximal correlation between X1X_{1} and X2X_{2} 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 ψ\psi is more effective than learning directly from X1X_{1}, 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 YDY_{D}), which ranges from 19051905 to 20132013. We resize all the portraits to be 128128 by 128128. We crop out the center 6464 by 6464 pixels (the face), and treat it as X2X_{2}, and treat the outer rim as X1X_{1} as shown in Figure 2. Our task is to predict YDY_{D}, which is the year when the portraits are taken, and the year ranges from 19051905 to 20132013. For ψ\psi, we learn X2X_{2} from X1X_{1} with standard image inpainting techniques , and full set of training data (without labels). After that we fix the learned ψ\psi and learn a linear model to predict YDY_{D} from ψ\psi using a smaller set of data (with labels). Besides linear model on X1X_{1}, another strong baseline that we compare with is using ResNet18 to predict YDY_{D} from X1X_{1}. With the full set of training data, this model is able to achieve a Mean Absolute Difference of 6.896.89, 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 ψ\psi is more effective than learning from X1X_{1} or X2X_{2} directly, with linear model as well as with ResNet18. Practitioner usually fine-tune ψ\psi 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 X,YX,Y, the covariance matrix is

Its inverse matrix Σ−1{\bm{\Sigma}}^{-1} satisfies

A.2 Relation to Conditional Independence

When X1⊥X2∣YX_{1}\bot X_{2}|Y, the partial covariance between X1,X2X_{1},X_{2} given YY is :

For random variables X1,X2X_{1},X_{2} and a random variable YY with finite values, conditional independence X1⊥X2∣YX_{1}\bot X_{2}|Y 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 tt-th column of ZZ is an nn-dim vector that is i.i.d sampled from Gaussian distribution N(0,Σtt)\mathcal{N}(0,{\bm{\Sigma}}_{tt}).

Each term satisfy Σkk−1∥Pzt∥2∼χ2(d){\bm{\Sigma}}_{kk}^{-1}\|\mathbf{P}{\bm{z}}_{t}\|^{2}\sim\chi^{2}(d), and therefore with probability at least 1−δ′1-\delta^{\prime} over zt{\bm{z}}_{t},

Using union bound, take δ′=δ/k\delta^{\prime}=\delta/k and summing over t∈[k]t\in[k] we get:

Let X1,⋯ ,XmX_{1},\cdots,X_{m} be independent zero-mean vector-valued random variables. Let

Therefore by vector Bernstein Inequality, with probability at least 1−δ/d1-\delta/d, ∥X∥≤σ(1+log⁡(d/δ))\|X\|\leq\sigma(1+\sqrt{\log(d/\delta)}). Then by taking union bound, we get that ∥PZ∥2=∑j=1d∥uj⊤Z∥2≲σ2d(1+log⁡(d/δ))\|\mathbf{P}{\bm{Z}}\|^{2}=\sum_{j=1}^{d}\|{\bm{u}}_{j}^{\top}{\bm{Z}}\|^{2}\lesssim\sigma^{2}d(1+\log(d/\delta)) with probability 1−δ1-\delta.

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 ΣX2Y{\bm{\Sigma}}_{X_{2}Y} has rank kk, we have f∗(x1)≡W∗ψ∗(x1)f^{*}({\bm{x}}_{1})\equiv{\bm{W}}^{*}\psi^{*}({\bm{x}}_{1}), i.e., eapx(ψ∗)=0e_{\text{apx}}(\psi^{*})=0.

Next we consider the estimation error that characterizes the number of samples needed to learn a prediction function f(x1)=W^ψ∗(x1)f({\bm{x}}_{1})=\hat{{\bm{W}}}\psi^{*}({\bm{x}}_{1}) that generalizes.

Fix a failure probability δ∈(0,1)\delta\in(0,1). Under Assumption B.1,B.2, if n2≫k+log⁡(1/δ)n_{2}\gg k+\log(1/\delta), excess risk of the learned predictor x1→W^ψ∗(x1){\bm{x}}_{1}\rightarrow\hat{\bm{W}}\psi^{*}({\bm{x}}_{1}) on the target task satisfies

This assumption lets introduce some reasonable latent variables that capture the information between X1X_{1} and X2X_{2} apart from YY. ΣX2Yˉ{\bm{\Sigma}}_{X_{2}\bar{Y}} being full rank says that all directions of Yˉ\bar{Y} are needed to predict X2X_{2}, and therefore ZZ is not redundant. For instance, when Z=X1Z=X_{1}, the assumption is trivially true but ZZ is not the minimal latent information we want to add. Note it implicitly requires d2≥k+md_{2}\geq k+m.

Under Assumption B.1, B.3, we have f∗(x1)≡W∗ψ∗(x1)f^{*}({\bm{x}}_{1})\equiv{\bm{W}}^{*}\psi^{*}({\bm{x}}_{1}), i.e., the approximation error eapx(ψ∗)e_{\text{apx}}(\psi^{*}) is 0. We can also generalize Theorem B.3 by replacing kk by k+mk+m.

Appendix C Omitted Proofs with Conditional Independence

Let selector operator Sy\bm{S}_{y} be the mapping such that SyYˉ=Y\bm{S}_{y}\bar{Y}=Y, we overload it as the matrix that ensure SyΣYˉX=ΣYX\bm{S}_{y}{\bm{\Sigma}}_{\bar{Y}X}={\bm{\Sigma}}_{YX} for any random variable XX 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 N{\bm{N}} follows gaussian distribution N(0,ΣYY∣X1)\mathcal{N}(0,{\bm{\Sigma}}_{YY|X_{1}}). Therefore

Let the representation function ψ\psi be defined as:

With Lemma 3.1 we know eapx=0e_{\text{apx}}=0, and therefore W∗ψ(X1)≡f∗(X1){\bm{W}}^{*}\psi(X_{1})\equiv f^{*}(X_{1}). 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 W^=arg min⁡W∥Y−ψ(X1)W∥F2\hat{\bm{W}}=\operatorname*{arg\,min}_{{\bm{W}}}\|{\bm{Y}}-\psi({\bm{X}}_{1}){\bm{W}}\|^{2}_{F}. We have the basic inequality,

With Assumption 3.3 and by concentration 0.91n2X1X1⊤⪯ΣX1⪯1.11n2X1X1⊤0.9\frac{1}{n_{2}}{\bm{X}}_{1}{\bm{X}}_{1}^{\top}\preceq{\bm{\Sigma}}_{X_{1}}\preceq 1.1\frac{1}{n_{2}}{\bm{X}}_{1}{\bm{X}}_{1}^{\top}, we have

Denote ψ(X1)=X1B\psi({\bm{X}}_{1})={\bm{X}}_{1}\bm{B}, where B=ΣX1−1ΣX1X2\bm{B}={\bm{\Sigma}}_{X_{1}}^{-1}{\bm{\Sigma}}_{X_{1}X_{2}} is rank kk under exact CI since ΣX1X2=ΣX1YΣY−1ΣYX2{\bm{\Sigma}}_{X_{1}X_{2}}={\bm{\Sigma}}_{X_{1}Y}{\bm{\Sigma}}_{Y}^{-1}{\bm{\Sigma}}_{YX_{2}}. 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 X1⊥X2∣YX_{1}\bot X_{2}|Y ensures X1⊥h(X2)∣YX_{1}\bot h(X_{2})|Y for any deterministic function hh, we could replace X2X_{2} by h(X2)h(X_{2}) and all results hold. Therefore in practice, we could use h(ψ(X1))h(\psi(X_{1})) instead of ψ(X1)\psi(X_{1}) for downstream task. Specifically with denoising auto-encoder or context encoder, one could think about hh as the inverse of decoder DD (h=D−1h=D^{-1}) and use D−1ψ≡ED^{-1}\psi\equiv E 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 E∗E^{*} and decoder D∗D^{*} that achieve

where X2X_{2} is the masked part we want to recover and X1X_{1} is the remainder.

If we naively apply our theorem we should use D∗(E∗(⋅))D^{*}(E^{*}(\cdot)) as the representation, while in practice we instead use only the encoder part E∗(⋅)E^{*}(\cdot) 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 (D∗)−1(X2)(D^{*})^{-1}(X_{2}) instead of X2X_{2} directly, namely,

and then we should indeed use E(X1)E(X_{1}) as the representation. On one hand, when X1⊥X2∣YX_{1}\bot X_{2}|Y, it also satisfies X1⊥(D∗)−1(X2)∣YX_{1}\bot(D^{*})^{-1}(X_{2})|Y since (D∗)−1(D^{*})^{-1} is a deterministic function of X2X_{2} and all our theory applies. On the other hand, the optimization on (13) or (14) give us similar result. Let

where L:=∥(D∗)−1∥LipL:=\|(D^{*})^{-1}\|_{\text{Lip}} is the Lipschitz constant for function (D∗)−1(D^{*})^{-1}. This is to say, in practice, we optimize over (13), and achieves a good representation E∗(X1)E^{*}(X_{1}) such that ϵpre≤Lϵ\epsilon_{\text{pre}}\leq L\sqrt{\epsilon} and thus performs well for downstream tasks. (Recall ϵpre\epsilon_{\text{pre}} 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.

σk+m(ΣYYˉ†ΣYˉX2)=β>0\sigma_{k+m}({\bm{\Sigma}}_{Y\bar{Y}}^{\dagger}{\bm{\Sigma}}_{\bar{Y}X_{2}})=\beta>0 σk(A)\sigma_{k}(\bm{A}) denotes kk-th singular value of A\bm{A}, and A†\bm{A}^{\dagger} is the pseudo-inverse of A\bm{A}. and ΣX2,Yˉ{\bm{\Sigma}}_{X_{2},\bar{Y}} is of rank k+mk+m, where Yˉ=[Y,Z]\bar{Y}=[Y,Z].

When X1X_{1} is not exactly CI of X2X_{2} given YY and ZZ, the approximation error depends on the norm of ∥ΣX1−1/2ΣX1,X2∣Yˉ∥2\|{\bm{\Sigma}}_{X_{1}}^{-1/2}{\bm{\Sigma}}_{X_{1},X_{2}|\bar{Y}}\|_{2}. Let W^\hat{\bm{W}} be the solution from Equation 2.2.

Under Assumption D.1 with constant ϵCI\epsilon_{\text{CI}} and β\beta, then the excess risk satisfies

Let V:=f∗(X1)≡X1ΣX1X1−1Σ1Y{\bm{V}}:=f^{*}({\bm{X}}_{1})\equiv{\bm{X}}_{1}{\bm{\Sigma}}^{-1}_{X_{1}X_{1}}{\bm{\Sigma}}_{1Y} be our target direction. Denote the optimal representation matrix by Ψ:=ψ(X1)≡X1A\Psi:=\psi({\bm{X}}_{1})\equiv{\bm{X}}_{1}\bm{A} (where A:=ΣX1X1−1ΣX1X2\bm{A}:={\bm{\Sigma}}_{X_{1}X_{1}}^{-1}{\bm{\Sigma}}_{X_{1}X_{2}}).

Next we will make use of the conditional covariance matrix:

and plug it in into the definition of Ψ\Psi:

where L:=X1ΣX1X1−1ΣX1YˉΣYˉ−1ΣYˉX2{\bm{L}}:={\bm{X}}_{1}{\bm{\Sigma}}^{-1}_{X_{1}X_{1}}{\bm{\Sigma}}_{X_{1}\bar{Y}}{\bm{\Sigma}}_{\bar{Y}}^{-1}{\bm{\Sigma}}_{\bar{Y}X_{2}} and E:=X1ΣX1X1−1ΣX1X2∣Yˉ{\bm{E}}:={\bm{X}}_{1}{\bm{\Sigma}}^{-1}_{X_{1}X_{1}}{\bm{\Sigma}}_{X_{1}X_{2}|\bar{Y}}. We analyze these two terms respectively.

For L{\bm{L}}, we note that span(V)⊆({\bm{V}})\subseteqspan(L)({\bm{L}}): LΣX2Yˉ†ΣYˉ=X1ΣX1X1−1ΣX1Yˉ{\bm{L}}{\bm{\Sigma}}^{\dagger}_{X_{2}\bar{Y}}{\bm{\Sigma}}_{\bar{Y}}={\bm{X}}_{1}{\bm{\Sigma}}^{-1}_{X_{1}X_{1}}{\bm{\Sigma}}_{X_{1}\bar{Y}}. By right multiplying the selector matrix SYS_{Y} we have: LΣX2Yˉ†ΣYˉY=X1ΣX1X1−1ΣX1Y{\bm{L}}{\bm{\Sigma}}^{\dagger}_{X_{2}\bar{Y}}{\bm{\Sigma}}_{\bar{Y}Y}={\bm{X}}_{1}{\bm{\Sigma}}^{-1}_{X_{1}X_{1}}{\bm{\Sigma}}_{X_{1}Y}, i.e., LWˉ=V{\bm{L}}\bar{\bm{W}}={\bm{V}}, where Wˉ:=ΣX2Yˉ†ΣYˉY\bar{\bm{W}}:={\bm{\Sigma}}^{\dagger}_{X_{2}\bar{Y}}{\bm{\Sigma}}_{\bar{Y}Y}. From our assumption that σr(ΣYˉY†ΣYˉX2)=β\sigma_{r}({\bm{\Sigma}}_{\bar{Y}Y}^{\dagger}{\bm{\Sigma}}_{\bar{Y}X_{2}})=\beta, we have ∥Wˉ∥2≤∥ΣX2Yˉ†ΣYˉ∥2≤1/β\|\bar{\bm{W}}\|_{2}\leq\|{\bm{\Sigma}}_{X_{2}\bar{Y}}^{\dagger}{\bm{\Sigma}}_{\bar{Y}}\|_{2}\leq 1/\beta. (Or we could directly define β\beta as σk(ΣYYˉ†ΣYˉX2)≡∥Wˉ∥2\sigma_{k}({\bm{\Sigma}}_{Y\bar{Y}}^{\dagger}{\bm{\Sigma}}_{\bar{Y}X_{2}})\equiv\|\bar{\bm{W}}\|_{2}. )

By concentration, we have E=X1ΣX1X1−1ΣX1X2∣Yˉ{\bm{E}}={\bm{X}}_{1}{\bm{\Sigma}}^{-1}_{X_{1}X_{1}}{\bm{\Sigma}}_{X_{1}X_{2}|\bar{Y}} converges to ΣX1X1−1/2ΣX1X2∣Yˉ{\bm{\Sigma}}^{-1/2}_{X_{1}X_{1}}{\bm{\Sigma}}_{X_{1}X_{2}|\bar{Y}}. Specifically, when n≫k+log⁡1/δn\gg k+\log 1/\delta, ∥E∥F≤1.1∥ΣX1X1−1/2ΣX1X2∣Yˉ∥F≤1.1ϵCI\|{\bm{E}}\|_{F}\leq 1.1\|{\bm{\Sigma}}^{-1/2}_{X_{1}X_{1}}{\bm{\Sigma}}_{X_{1}X_{2}|\bar{Y}}\|_{F}\leq 1.1\epsilon_{\text{CI}} (by using Lemma A.2 ). Together we have ∥EWˉ∥F≲ϵCI/β\|{\bm{E}}\bar{\bm{W}}\|_{F}\lesssim\epsilon_{\text{CI}}/\beta.

Let W^=arg min⁡W∥Y−ΨW∥2\hat{\bm{W}}=\operatorname*{arg\,min}_{{\bm{W}}}\|{\bm{Y}}-\Psi{\bm{W}}\|^{2}. We note that Y=N+V=N+ΨWˉ−EWˉ{\bm{Y}}={\bm{N}}+{\bm{V}}={\bm{N}}+\Psi\bar{\bm{W}}-{\bm{E}}\bar{\bm{W}} where V{\bm{V}} is our target direction and N{\bm{N}} is random noise (each row of N{\bm{N}} has covariance matrix ΣYY∣X1{\bm{\Sigma}}_{YY|X_{1}}).

Next, by the same procedure that concentrates 1n2X1⊤X1\frac{1}{n_{2}}{\bm{X}}_{1}^{\top}{\bm{X}}_{1} to ΣX1X1{\bm{\Sigma}}_{X_{1}X_{1}} with Claim A.2, we could easily get

D.2 Measuring conditional dependence with cross-covariance operator

L2(PX)L^{2}(P_{X}) denotes the Hilbert space of square integrable function with respect to the measure PXP_{X}, the marginal distribution of XX. We are interested in some function class Hx⊂L2(PX)\mathcal{H}_{x}\subset L^{2}(P_{X}) that is induced from some feature maps:

Linear model is a special case when feature map ϕ=Id\phi=Id 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 YY we overload ϕ\phi as the one-hot embedding.

When there’s no ambiguity, we overload ϕ1\phi_{1} as the random variable ϕ1(X1)\phi_{1}(X_{1}) over domain F1\mathcal{F}_{1}, and H1\mathcal{H}_{1} as the function class over X1X_{1}. Next we characterize CI using the cross-covariance operator.

With one-hot encoding map ϕy\phi_{y} and arbitrary ϕ1\phi_{1}, X1⊥X2∣YX_{1}\bot X_{2}|Y ensures:

A more complete discussion of cross-covariance operator and CI can be found in . Also, recall that an operator C:Fy→Fx\mathcal{C}:\mathcal{F}_{y}\rightarrow\mathcal{F}_{x} is Hilbert-Schmidt (HS) if for complete orthonormal systems (CONSs) {ζi}\{\zeta_{i}\} of Fx\mathcal{F}_{x} and {ηi}\{\eta_{i}\} of Fy\mathcal{F}_{y}, ∥C∥HS2:=∑i,j⟨ζj,Cηi⟩Fx2<∞\|\mathcal{C}\|^{2}_{\text{HS}}:=\sum_{i,j}\langle\zeta_{j},\mathcal{C}\eta_{i}\rangle^{2}_{\mathcal{F}_{x}}<\infty. The Hilbert-Schmidt norm generalizes the Frobenius norm from matrices to operators, and we will later use ∥Cϕ1X2∣ϕy∥\|\mathcal{C}_{\phi_{1}X_{2}|\phi_{y}}\| 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 ϕ1\phi_{1} with universal property, we have:

For general feature maps, we instead have:

To prove Claim D.5, we show the following lemma:

Let ϕ:X→Fx\phi:\mathcal{X}\rightarrow\mathcal{F}_{x} be a universal feature map, then for random variable Y∈YY\in\mathcal{Y} we have:

D.4 Omitted Proof for Main Results

We first prove a simpler version without approximation error.

For a fixed δ∈(0,1)\delta\in(0,1), under Assumption 4.1, 3.2, if there is no approximation error, i.e., there exists a linear operator AA such that f∗(X1)≡Aϕ1(X1)f^{*}(X_{1})\equiv A\phi_{1}(X_{1}), if n1,n2≫ρ4(d2+log⁡1/δ)n_{1},n_{2}\gg\rho^{4}(d_{2}+\log 1/\delta), and we learn the pretext tasks such that:

Then we are able to achieve generalization for downstream task with probability 1−δ1-\delta:

Let Ψ∗,L,E,V\Psi^{*},{\bm{L}},{\bm{E}},{\bm{V}} be defined as follows:

Let V=f∗(X1down)≡fH1∗(X1down)≡ϕ(X1down)Cϕ1−1Cϕ1Y{\bm{V}}=f^{*}({\bm{X}}_{1}^{\text{down}})\equiv f^{*}_{\mathcal{H}_{1}}({\bm{X}}_{1}^{\text{down}})\equiv\phi({\bm{X}}_{1}^{\text{down}})\mathcal{C}^{-1}_{\phi_{1}}\mathcal{C}_{\phi_{1}Y} be our target direction. Denote the optimal representation matrix by

where L=ϕ(X1down)Cϕ1ϕ1−1Cϕ1ϕyˉCϕyˉ−1CϕyˉX2{\bm{L}}=\phi({\bm{X}}_{1}^{\text{down}})\mathcal{C}^{-1}_{\phi_{1}\phi_{1}}\mathcal{C}_{\phi_{1}\phi_{\bar{y}}}\mathcal{C}_{\phi_{\bar{y}}}^{-1}\mathcal{C}_{\phi_{\bar{y}}X_{2}} and E=ϕ(X1down)Cϕ1ϕ1−1Cϕ1X2∣Yˉ{\bm{E}}=\phi({\bm{X}}_{1}^{\text{down}})\mathcal{C}^{-1}_{\phi_{1}\phi_{1}}\mathcal{C}_{\phi_{1}X_{2}|\bar{Y}}.

In this proof, we denote SYS_{Y} as the matrix such that SYϕyˉ=YS_{Y}\phi_{\bar{y}}=Y. Specifically, if YY is of dimension d3d_{3}, SYS_{Y} is of size d3×∣Y∣∣Z∣d_{3}\times|\mathcal{Y}||\mathcal{Z}|. Therefore SYΣϕyA=ΣYAS_{Y}{\bm{\Sigma}}_{\phi_{y}A}={\bm{\Sigma}}_{YA} for any random variable AA.

where Wˉ:=ΣX2ϕyˉ†ΣϕyˉY\bar{\bm{W}}:={\bm{\Sigma}}_{X_{2}\phi_{\bar{y}}}^{\dagger}{\bm{\Sigma}}_{\phi_{\bar{y}}Y} satisfies ∥Wˉ∥2=1/β\|\bar{\bm{W}}\|_{2}=1/\beta. Therefore span(V)⊆({\bm{V}})\subseteqspan(L)({\bm{L}}) since we have assumed that ΣX2ϕyˉ†ΣϕyˉY{\bm{\Sigma}}_{X_{2}\phi_{\bar{y}}}^{\dagger}{\bm{\Sigma}}_{\phi_{\bar{y}}Y} to be full rank.

On the other hand, E=ϕ1(X1down)Cϕ1ϕ1−1Cϕ1X2∣Yˉ{\bm{E}}=\phi_{1}({\bm{X}}_{1}^{\text{down}})\mathcal{C}^{-1}_{\phi_{1}\phi_{1}}\mathcal{C}_{\phi_{1}X_{2}|\bar{Y}} concentrates to Cϕ1ϕ1−1/2Cϕ1X2∣ϕyˉ\mathcal{C}^{-1/2}_{\phi_{1}\phi_{1}}\mathcal{C}_{\phi_{1}X_{2}|\phi_{\bar{y}}}. Specifically, when n≫k+log⁡1/δn\gg k+\log 1/\delta, 1n2∥E∥F2≤1.1∥Cϕ1ϕ1−1/2Cϕ1X2∣ϕyˉ∥F2≤1.1ϵCI2\frac{1}{n_{2}}\|{\bm{E}}\|^{2}_{F}\leq 1.1\|\mathcal{C}^{-1/2}_{\phi_{1}\phi_{1}}\mathcal{C}_{\phi_{1}X_{2}|\phi_{\bar{y}}}\|^{2}_{F}\leq 1.1\epsilon^{2}_{\text{CI}} (by using Lemma A.3 ). Together we have ∥EWˉ∥F≲ϵCI/β\|{\bm{E}}\bar{\bm{W}}\|_{F}\lesssim\epsilon_{\text{CI}}/\beta.

Also, the noise term after projection satisfies ∥P[Ψ,E,V]N∥≲d2(1+log⁡d2/δ)σ\|P_{[\Psi,{\bm{E}},{\bm{V}}]}{\bm{N}}\|\lesssim\sqrt{d_{2}(1+\log d_{2}/\delta)}\sigma as using Corollary A.6. Therefore Ψ=Ψ∗−Epre=L+E−Epre\Psi=\Psi^{*}-{\bm{E}}^{\text{pre}}={\bm{L}}+{\bm{E}}-{\bm{E}}^{\text{pre}}.

Recall that W^=arg min⁡W∥ψ(X1down)W−Y∥F2.\hat{\bm{W}}=\operatorname*{arg\,min}_{{\bm{W}}}\|\psi({\bm{X}}_{1}^{\text{down}}){\bm{W}}-{\bm{Y}}\|_{F}^{2}. 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 a(X1down)a({\bm{X}}_{1}^{\text{down}}) is included in Y{\bm{Y}}:

From re-arranging 12n2∥Y−ΨW^∥F2≤12n2∥Y−ΨWˉ∥F2\frac{1}{2n_{2}}\|{\bm{Y}}-\Psi\hat{\bm{W}}\|_{F}^{2}\leq\frac{1}{2n_{2}}\|{\bm{Y}}-\Psi\bar{\bm{W}}\|_{F}^{2},

Then with similar procedure as in the proof of Theorem 3.5, and write Ψ\Psi as ϕ(X1down)B\phi(X_{1}^{\text{down}})\bm{B}, we have:

D.5 Principal Component Regression

Due to the property of PCA, ∥Ar−A∥F≤∥E∥F\|\bm{A}_{r}-\bm{A}\|_{F}\leq\|{\bm{E}}\|_{F} and ∥Ar−A∥2≤∥E∥2\|\bm{A}_{r}-\bm{A}\|_{2}\leq\|{\bm{E}}\|_{2}.

Similarly we have ∥Ar−L∥F≤2∥E∥F\|\bm{A}_{r}-{\bm{L}}\|_{F}\leq 2\|{\bm{E}}\|_{F}. ∎

This technical fact could be used to complete the proof for Remark 4.1.

Recall Ψ∗,L,E,V\Psi^{*},{\bm{L}},{\bm{E}},{\bm{V}} are defined as follows:

Ψ∗:=ψ∗(X1down)\Psi^{*}:=\psi^{*}({\bm{X}}_{1}^{\text{down}}) is the optimal representation matrix. Ψr\Psi_{r} is the features obtained from rr-PCA of Ψ∗\Psi^{*}. Ψ∗=L+E\Psi^{*}={\bm{L}}+{\bm{E}} which is low rank plus small norm. (L=ϕ(X1down)Cϕ1ϕ1−1Cϕ1ϕyˉCϕyˉ−1CϕyˉX2{\bm{L}}=\phi({\bm{X}}_{1}^{\text{down}})\mathcal{C}^{-1}_{\phi_{1}\phi_{1}}\mathcal{C}_{\phi_{1}\phi_{\bar{y}}}\mathcal{C}_{\phi_{\bar{y}}}^{-1}\mathcal{C}_{\phi_{\bar{y}}X_{2}} and E=ϕ(X1down)Cϕ1ϕ1−1Cϕ1X2∣Yˉ{\bm{E}}=\phi({\bm{X}}_{1}^{\text{down}})\mathcal{C}^{-1}_{\phi_{1}\phi_{1}}\mathcal{C}_{\phi_{1}X_{2}|\bar{Y}}. Suppose r=∣Y∣∣Z∣r=|\mathcal{Y}||\mathcal{Z}|.) Let V=f∗(X1down)≡fH1∗(X1down)≡ϕ(X1down)Cϕ1−1Cϕ1Y=LWˉ{\bm{V}}=f^{*}({\bm{X}}_{1}^{\text{down}})\equiv f^{*}_{\mathcal{H}_{1}}({\bm{X}}_{1}^{\text{down}})\equiv\phi({\bm{X}}_{1}^{\text{down}})\mathcal{C}^{-1}_{\phi_{1}}\mathcal{C}_{\phi_{1}Y}={\bm{L}}\bar{\bm{W}} be our target direction, where Wˉ:=ΣX2ϕyˉ†ΣϕyˉY\bar{\bm{W}}:={\bm{\Sigma}}_{X_{2}\phi_{\bar{y}}}^{\dagger}{\bm{\Sigma}}_{\phi_{\bar{y}}Y}.

Due to representation learning error (finite sample in the first stage) and approximate conditional independence, the target direction V{\bm{V}} is not perfectly linear in Ψ∗\Psi^{*} or its rr-PCA features Ψ\Psi.

Now with PCR we learn the linear model with W^←arg min⁡W∥ΨrW−Y∥F2.\hat{\bm{W}}\leftarrow\operatorname*{arg\,min}_{{\bm{W}}}\|\Psi_{r}{\bm{W}}-{\bm{Y}}\|_{F}^{2}. Together with D.9 and the same procedure as Theorem D.8 we also get that:

Let Eˉ=L−Ψr\bar{\bm{E}}={\bm{L}}-\Psi_{r} is of rank at most 2r2r.

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 1/β1/\beta can be computed as follows

Appendix F Omitted Proofs on Learning the Conditional Distribution

Representation operator T:L2(X2)→L2(X1)\mathcal{T}:L^{2}(X_{2})\rightarrow L^{2}(X_{1}),

Low rank approximation operator L:L2(X2)→L2(X1)\mathcal{L}:L^{2}(X_{2})\rightarrow L^{2}(X_{1}),

Under conditional independence X1⊥X2∣Y,T=L.X_{1}\bot X_{2}|Y,\mathcal{T}=\mathcal{L}.

From the definition of L\mathcal{L} we can decompose it into the following two operators L=B∘A\mathcal{L}=\mathcal{B}\circ\mathcal{A}:

Operator that measures conditional independence: E:=T−L,\mathcal{E}:=\mathcal{T}-\mathcal{L},

When we set gy(x2)=A†∘1(Y=y)g_{y}(x_{2})=\mathcal{A}^{\dagger}\circ 1(Y=y), we have the following corollary:

In the same setting of Theorem F.1, suppose the (k−1)(k-1)-th maximal correlation between X2X_{2} and YY 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 pX1,X2(x1,x2)p_{X_{1},X_{2}}(x_{1},x_{2}) satisfies:

Let functions w1,y(x1)=1(g1∗(x1)=y)∈L2(X1)w_{1,y}(x_{1})=1(g_{1}^{*}(x_{1})=y)\in L^{2}(\mathcal{X}_{1}), and w2,y(x2)=1(g2∗(x2)=y)∈L2(X2),∀y∈[k]w_{2,y}(x_{2})=1(g_{2}^{*}(x_{2})=y)\in L^{2}(\mathcal{X}_{2}),\forall y\in[k]. Then we have that:

First we show that ∥T∥op:=max⁡u≠0∥Tu∥L2(X1)∥u∥L2(X2)≤1\|\mathcal{T}\|_{op}:=\max_{u\neq 0}\frac{\|\mathcal{T}u\|_{L^{2}(X_{1})}}{\|u\|_{L^{2}(X_{2})}}\leq 1. For any u∈L2(Rd)u\in L^{2}(R^{d}), we have that

Second, let u(x2)≡1u(x_{2})\equiv 1 and v(x1)≡1v(x_{1})\equiv 1, we have ∫x1T(x1,x2)u(x2)dx2=1=v(x1).\int_{x_{1}}T(x_{1},x_{2})u(x_{2})dx_{2}=1=v(x_{1}). Therefore we have ∥Tu∥L2(X1)=1\|Tu\|_{L^{2}(X_{1})}=1 for u=1u=1 and ∥u∥L2(X2)=1\|u\|_{L^{2}(X_{2})}=1. Therefore ∥T∥op=1\|T\|_{{\text{op}}}=1. ∎

Let w1,y,w2,y,∀y∈[k]w_{1,y},w_{2,y},\forall y\in[k] be the same from Lemma F.3. Then we have:

Therefore ∑y∥Lw2,y−w1,y∥2≤4α.\sum_{y}\|\mathcal{L}w_{2,y}-w_{1,y}\|^{2}\leq 4\alpha.

Therefore ∑y⟨Lw2,y,w1,y⟩≥1−2α\sum_{y}\langle\mathcal{L}w_{2,y},w_{1,y}\rangle\geq 1-2\alpha. ∑y∥Lw2,y−w1,y∥2=∑y(∥Lw2,y∥2+∥w1,y∥2−2⟨w1,y,Lw2,y⟩)≤2−2(1−2α)=4α\sum_{y}\|\mathcal{L}w_{2,y}-w_{1,y}\|^{2}=\sum_{y}(\|\mathcal{L}w_{2,y}\|^{2}+\|w_{1,y}\|^{2}-2\langle w_{1,y},\mathcal{L}w_{2,y}\rangle)\leq 2-2(1-2\alpha)=4\alpha. ∎

Let Tk(x1,x2)T_{k}(x_{1},x_{2}) be the rank-kk approximation of T(x1,x2)T(x_{1},x_{2}), i.e., Tk(x1,x2)=∑i=1kσiui(x1)vi(x2)T_{k}(x_{1},x_{2})=\sum_{i=1}^{k}\sigma_{i}u_{i}(x_{1})v_{i}(x_{2}), where ui∈L2(X1),vi∈L2(X2)u_{i}\in L^{2}(\mathcal{X}_{1}),v_{i}\in L^{2}(\mathcal{X}_{2}). Then with the same definition of w1,yw_{1,y} and w2,yw_{2,y} as Claim F.3, we have that:

where λk+1\lambda_{k+1} is the (k+1k+1)-th singular value of T\mathcal{T}, i.e., the kk-th maximal correlation between X1X_{1} and X2X_{2}

Write the full decomposition of TT as T(x1,x2)=∑i=1∞λiui(x1)vi(x2)T(x_{1},x_{2})=\sum_{i=1}^{\infty}\lambda_{i}u_{i}(x_{1})v_{i}(x_{2}). We have that:

Therefore ∑y∥Tw2,y∥2≥1−2α.\sqrt{\sum_{y}\|\mathcal{T}w_{2,y}\|^{2}}\geq 1-2\alpha.

Therefore ∑y∥PTkw2,y∥2≥(1−2α)2−λk+121−λk+12\sum_{y}\|P_{\mathcal{T}_{k}}w_{2,y}\|^{2}\geq\frac{(1-2\alpha)^{2}-\lambda_{k+1}^{2}}{1-\lambda_{k+1}^{2}} and

Therefore ∑y∥Tkw2,y−w1,y∥2≤16α1−λk+12\sum_{y}\|\mathcal{T}_{k}w_{2,y}-w_{1,y}\|^{2}\leq\frac{16\alpha}{1-\lambda_{k+1}^{2}}. ∎

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 gy(x2)=w2,y(x2)=1(g2∗(x2)=y),∀y∈[k]g_{y}(x_{2})=w_{2,y}(x_{2})=1(g_{2}^{*}(x_{2})=y),\forall y\in[k] as in Lemma F.5. We only need to upper bound

Altogether we have the approximation error is upper bounded by O(α1−λk2)O(\frac{\alpha}{1-\lambda_{k}^{2}}).

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 Yˉ\bar{Y} with ∣Yˉ∣≤m|\bar{Y}|\leq m is a discrete latent variable that satisfies

Yˉ\bar{Y} makes X1X_{1} and X2X_{2} approximately CI as in Definition 4.1, i.e.

Yˉ\bar{Y} also makes X1X_{1} and YY approximately CI with

ΣϕyˉX2 is full column rank and ∥ΣYϕyˉΣX2ϕyˉ†∥2=1/β{\bm{\Sigma}}_{\phi_{\bar{y}}X_{2}}\text{ is full column rank and }\|{\bm{\Sigma}}_{Y\phi_{\bar{y}}}{\bm{\Sigma}}_{X_{2}\phi_{\bar{y}}}^{\dagger}\|_{2}=1/\beta, where A†A^{\dagger} is pseudo-inverse, and ϕyˉ\phi_{\bar{y}} is the one-hot embedding for Yˉ\bar{Y}.

Note that our assumptions from the main paper are a special case of Assumption G.1, with ϵYˉ=0\epsilon_{\bar{Y}}=0 being satisfied automatically as Yˉ=[Y,Z]\bar{Y}=[Y,Z] is explicitly defined to contain YY in it. Unlike Assumption 4.1, we do not need YY to be a discrete variable, but just need Yˉ\bar{Y} 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) X1X_{1} and X2X_{2} are exactly CI given Yˉ\bar{Y} (thus ϵCI=0\epsilon_{\text{CI}}=0), (2) the variation in the target YY is small given X1X_{1} and X2X_{2}. The assumption from , in our setting, is equivalent to saying that ϵX1\epsilon_{X_{1}} and ϵX2\epsilon_{X_{2}} 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 Y∣X1,X2Y|X_{1},X_{2} is almost deterministic (which makes sense for a many regression tasks) and if ϵX22\epsilon^{2}_{X_{2}} is small, then ϵYˉ\epsilon_{\bar{Y}} defined in the previous subsection will be small and thus we have meaningful guarantees.

Let σY2=Var[Y∣X1,X2]\sigma^{2}_{Y}=\textrm{Var}[Y|X_{1},X_{2}] be the variance of YY. Yˉ\bar{Y} is as defined in Assumption G.1 with the extra condition that X1X_{1} and X2X_{2} are exactly CI given Yˉ\bar{Y}. 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 ϵX1\epsilon_{X_{1}} 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 X1X_{1}, if will still predict Y∣X1,X2Y|X_{1},X_{2} 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 X1X_{1} and X2X_{2} and the above lemma. For simplicity we assume that YY is a scalar random variable, the proof is the same for vector values YY, except squared values will replaced by norm squared values.

Thus using the above lemma, we get the desired upper bound on ϵYˉ\epsilon_{\bar{Y}}. ∎

Appendix I Theoretical analysis for classification tasks

We now consider the benefit of learning ψ\psi from a class H1\mathcal{H}_{1} on linear classification task for label set Y=[k]\mathcal{Y}=[k]. The performance of a classifier is measured using the standard logistic loss

We assume that the optimal regressor fH1∗f^{*}_{\mathcal{H}_{1}} for one-hot encoding also does well on linear classification.

For a fixed δ∈(0,1)\delta\in(0,1), 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 Σ{\bm{\Sigma}} as the covariance matrix for the joint distribution PX1X2YP_{X_{1}X_{2}Y}.

When conditional independence is satisfied, A\bm{A} is block diagonal matrix, i.e., A12\bm{A}_{12} and A21\bm{A}_{21} are zero matrices.

where ρˉi=ρiB−12{\bar{\rho}}_{i}=\rho_{i}\bm{B}^{-\frac{1}{2}} for i∈{1,2}i\in\{1,2\}. Also,

First using ΣΣ−1=I{\bm{\Sigma}}{\bm{\Sigma}}^{-1}=I, we get the following identities

From Equation (26) we get that ΣXY=−ΣXXρB−1{\bm{\Sigma}}_{XY}=-{\bm{\Sigma}}_{XX}\rho\bm{B}^{-1} 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: M/α=δ−γα−1β{\bm{M}}/\alpha=\delta-\gamma\alpha^{-1}\beta is the Schur complement of α\alpha for M{\bm{M}} defined below

For M=(A−ρˉρˉ⊤){\bm{M}}=(\bm{A}-{\bar{\rho}}{\bar{\rho}}^{\top}), we have that ΣXX=M−1{\bm{\Sigma}}_{XX}={\bm{M}}^{-1} and thus

This proves Equation (21) and similarly Equation (22) can be proved.

For the second part, we will use the fact that (I−ab⊤)−1=I+11−a⊤bab⊤({\bm{I}}-{\bm{a}}\bm{b}^{\top})^{-1}={\bm{I}}+\frac{1}{1-{\bm{a}}^{\top}\bm{b}}{\bm{a}}\bm{b}^{\top}. 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 f∗f^{*} from representation ψ\psi, we need AA to have some good property, such as light tail in eigenspace, and BB needs to be full rank in its column space.

Notice in the case of conditional independence, ΣX1X2∣Y=0{\bm{\Sigma}}_{X_{1}X_{2}|Y}=0, and A=0A=0. Therefore we could easily learn f∗f^{*} from ψ\psi if X2X_{2} has enough information of YY such that ΣX2Y∣X1{\bm{\Sigma}}_{X_{2}Y|X_{1}} is of the same rank as dimension of YY.

Let the representation function ψ\psi 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 (n1n_{1}), and (2) the number of samples for the downstream task (n2n_{2}), besides kk and ϵCI\epsilon_{CI} as discussed in the main text. In this simulation, we enforce strict conditional independence, and explore how ER varies with n1n_{1} and n2n_{2}. We generate the data the same way as in the main text, and keep α=0,k=2\alpha=0,k=2, d1=50d_{1}=50 and d2=40d_{2}=40 We restrict the function class to linear model. Hence ψ\psi is the linear model to predict X2X_{2} from X1X_{1} 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, ψ\psi consistently outperforms X1X_{1} in predicting YY using a linear model learnt from the given downstream dataset, and ER does scale linearly with 1/n21/n_{2}, 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 2424, and traing the resnet18 for 5050 epoches. One pass of training (loops over all the settings with different number of labeled data) is finished within 66 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 1212 hours. The yearbook dataset is distributed under BSD license.

Following the same procedure, we try to predict the gender YGY_{G}. We normalize the label (YG,YDY_{G},Y_{D}) to unit variance, and confine ourself to linear function class. That is, instead of using a context encoder to impaint X2X_{2} from X1X_{1}, we confine ψ\psi 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 ∥ΣX1X1−1/2ΣX1X2∣YG∥F=9.32\|{\bm{\Sigma}}_{{\bm{X}}_{1}{\bm{X}}_{1}}^{-1/2}{\bm{\Sigma}}_{{\bm{X}}_{1}X_{2}|Y_{G}}\|_{F}=9.32, while ∥ΣX1X1−1/2ΣX1X2∣YD∥F=8.15\|{\bm{\Sigma}}_{{\bm{X}}_{1}{\bm{X}}_{1}}^{-1/2}{\bm{\Sigma}}_{{\bm{X}}_{1}X_{2}|Y_{D}}\|_{F}=8.15. Moreover, as shown on the right of Figure 4, conditioning on YDY_{D} cancels out more spectrum than conditioning on YGY_{G}. In this case, we conjecture that, unlike YDY_{D}, YGY_{G} does not capture much dependence between X1X_{1} and X2X_{2}. And as a result, ϵCI\epsilon_{CI} is larger, and the downstream performance is worse, as we expected.

NLP Task.

We look at the setting where both X1\mathcal{X}_{1} and X2\mathcal{X}_{2} 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 Y\mathcal{Y} is {±1}\{\pm 1\}. We learn a linear representation ψ(X1)=Bϕ(X1)\psi(X_{1})=\bm{B}\phi(X_{1}) in the SSL phase as defined in Section 4. Here we X1X_{1}, we pick ϕ(X1)\phi(X_{1}) to be the bag-of-words representations of the movie review X1X_{1}, which has a vocabulary size of 13848 For X2X_{2} we use a d2=300d_{2}=300 dimensional embedding of the sentence, that is the mean of word vectors (random Gaussians) for the words in the review X2X_{2}. For SSL data we consider 2 settings, (a) enforce CI with the labels Y\mathcal{Y}, (b) enforce CI with extra latent variables, for which we use fine-grained version of SST with label set Yˉ={1,2,3,4,5}\bar{\mathcal{Y}}=\{1,2,3,4,5\}Ratings {1,2}\{1,2\} correspond to y=−1y=-1 and {4,5}\{4,5\} correspond to y=1y=1.. In this setting, for every label y∈Yy\in\mathcal{Y} (or yˉ∈Yˉ\bar{y}\in\bar{\mathcal{Y}}), we independently sample movie reviews X1X_{1} and X2X_{2} from the class yy (or yˉ\bar{y}), thus simulating the CI (or approximate CI) condition. We test the learned ψ\psi on SST binary task with linear regression and linear classification; results are presented in Figure 5. We observe that in both settings ψ\psi outperforms ϕ1\phi_{1}, especially in the small-sample-size regime. Exact CI is better than CI with latent variables, as suggested by theory.