Multi-view learning
多视图学习
Recover shared signal through regularized CCA and distinguish paired correlation from co-training assumptions.
multiview-learningStart with the problem
Two sensors observe the same event. Each records a shared signal plus its own large disturbance. Compressing each sensor independently may preserve the disturbance because it has the greatest variance. Multi-view learning instead uses the pairing between observations to identify what the views share or how they complement one another.
Canonical correlation analysis, CCA, searches for linear projections that are correlated across views. Deep CCA replaces the input mappings with learned nonlinear networks; its paper also gives a clear linear CCA derivation. Our implementation is regularized linear CCA, not a deep network. Deep Canonical Correlation Analysis
Another route, co-training, lets classifiers on different views help label data for each other. Blum and Mitchell’s original framework assumes each view is sufficient for the target, with compatibility conditions; one of its learning arguments uses conditional independence. Those are assumptions of that framework, not requirements for every algorithm called multi-view learning. Combining Labeled and Unlabeled Data with Co-Training
Definitions and derivation
Suppose X and Y have N paired rows and p and q feature columns. Subtract training column means, then form sample covariances. Ridge r makes the whitening matrices nonsingular in this example:
Without ridge, CCA maximizes Pearson correlation. With ridge, the constraints below use regularized variances instead. Whiten the two views and take an SVD:
Set and . The constraints become unit norms, so the largest possible is the leading singular value. Recover the first projection pair and transform new observations using training means:
The regularized singular value need not equal the ordinary sample correlation of those projected scores. Report which one you mean. Both projection signs can be flipped together; the positive cross-view relation remains unchanged. Eigendecomposition gives the symmetric inverse square roots; positive eigenvalues are required. Covariance formation costs , with dense eigendecompositions costing and an additional cross-matrix SVD. Deep Canonical Correlation Analysis
Run the calculation
Run CPython 3.12.4 with NumPy 1.26.4. The 32 training rows enumerate all sign combinations of five factors. View X contains shared signal plus 0.2 times one nuisance, and a separate nuisance amplified fourfold. View Y contains −2 times the shared signal plus 0.3 times another nuisance, and a fifth factor amplified fivefold. Separate first principal components have correlation zero. With ridge 0.01, CCA’s leading regularized singular value is 0.964105601 and ordinary projected correlation is 0.969731877. A new 1,000-pair Gaussian sample gives correlation 0.971046709. Shuffling pair IDs reduces the fitted leading singular value to 0.444237619 on this particular small table.
import numpy as np
def inverse_root(matrix):
values,vectors=np.linalg.eigh(matrix)
if np.any(values<=0):raise ValueError('Whitening requires positive eigenvalues.')
return (vectors/np.sqrt(values))@vectors.T
def fit_cca(x,y,ridge=.01):
if len(x)!=len(y) or len(x)<2 or ridge<0:raise ValueError('Use matched views, at least two pairs and nonnegative ridge.')
mx,my=x.mean(axis=0),y.mean(axis=0);a,b=x-mx,y-my;xx=a.T@a/(len(x)-1)+ridge*np.eye(x.shape[1]);yy=b.T@b/(len(y)-1)+ridge*np.eye(y.shape[1]);xy=a.T@b/(len(x)-1);wx,wy=inverse_root(xx),inverse_root(yy);u,s,vt=np.linalg.svd(wx@xy@wy);return mx,my,wx@u[:,0],wy@vt.T[:,0],s
def data():
factors=np.array([[(-1.)**((i>>j)&1) for j in range(5)] for i in range(32)]);s,e1,e2,e3,e4=factors.T;return np.c_[s+.2*e1,4*e2],np.c_[-2*s+.3*e3,5*e4]
def correlation(a,b):return float(np.corrcoef(a,b)[0,1])
if __name__=='__main__':
x,y=data();mx,my,a,b,s=fit_cca(x,y);print('regularized canonical singular values',s.round(9).tolist(),'projected sample correlation',round(correlation((x-mx)@a,(y-my)@b),9))
vx=np.linalg.eigh(np.cov(x,rowvar=False))[1][:,-1];vy=np.linalg.eigh(np.cov(y,rowvar=False))[1][:,-1];print('separate first-PCA score correlation',correlation(x@vx,y@vy))
f=np.random.default_rng(31).normal(size=(1000,5));s,e1,e2,e3,e4=f.T;xt=np.c_[s+.2*e1,4*e2];yt=np.c_[-2*s+.3*e3,5*e4];print('held-out synthetic correlation',round(correlation((xt-mx)@a,(yt-my)@b),9))
perm=np.random.default_rng(11).permutation(len(y));mp=fit_cca(x,y[perm]);print('mismatched-pair fitted singular values',mp[-1].round(9).tolist())
regularized canonical singular values [0.964105601, 0.0] projected sample correlation 0.969731877
separate first-PCA score correlation 0.0
held-out synthetic correlation 0.971046709
mismatched-pair fitted singular values [0.444237619, 0.007117591]
When the method fails
High cross-view correlation need not be useful. Both views may share a timestamp, watermark or acquisition artifact rather than the factor the task needs. CCA can discard information private to one view even when that information matters for prediction. Inspect paired-data construction and evaluate the intended task on held-out entities.
Matching rows are essential: two feature tables of the same shape are not automatically paired. Fit means and projections on training pairs only. A held-out correlation is a test of the shared-statistics objective, not evidence of a causal link between sensors. Our sign-factor training table is a constructed covariance example; the Gaussian holdout tests that mechanism, not sensor hardware.
Missing modalities, nonlinear relationships and high dimension relative to sample count require further modeling choices. Deep CCA learns nonlinear mappings; co-training uses label predictions and its own assumptions. Neither is implemented by concatenating two columns and calling the result multi-view learning. Deep Canonical Correlation Analysis; Combining Labeled and Unlabeled Data with Co-Training
Exercises with answers
- Why do the separate first PCA directions fail here?
Answer 1: The largest variance in each view comes from different independent nuisance factors, so their scores are uncorrelated.
- Is the regularized singular value necessarily the raw projected Pearson correlation?
Answer 2: No. Ridge changes the variance constraints; the example reports 0.964105601 and 0.969731877 separately.
- Can one transformed view be evaluated when the other is missing?
Answer 3: Yes, the fitted map for that view can be applied alone; learning the cross-view objective still required paired training observations.
- Does conditional independence belong to every multi-view method?
Answer 4: No. It is used in particular co-training analyses; CCA optimizes a correlation objective without that blanket requirement.
Sources and next steps
Read Deep CCA Section 2 for the whitening/SVD solution and its regularized covariance estimates. Read the first three pages of Blum and Mitchell for view sufficiency and compatibility, distinguishing those conditions from correlation maximization. Continue with clustering-based self-supervision for another way to connect views through assignments rather than direct correlation. Deep Canonical Correlation Analysis; Combining Labeled and Unlabeled Data with Co-Training
Make a prediction, then check
Two views have the same number of rows. Is that enough to fit a meaningful CCA?
Learning objectives
- Solve regularized linear CCA by whitening and SVD.
- Check pairing, nuisance correlations and method-specific assumptions.
Prerequisites & connections
Explore related knowledge →References
- Deep Canonical Correlation Analysis
Galen Andrew; Raman Arora; Jeff Bilmes; Karen Livescu · 2013 - Combining Labeled and Unlabeled Data with Co-Training
Avrim Blum; Tom Mitchell · 1998
Version1 · Editorial status: Recorded technical checks completed
View technical check record (AI)
Codex · 2026-09-07 · Codex single-AI-author technical check: primary-source scope, explicit assumptions, original calculations, independent mathematical references and bilingual tests; not independent human or second-agent review.
- Single-AI-author technical check: bounded primary-source reading, explicit assumptions, original calculations, executable examples and corresponding bilingual equations, code and exercises. Not independent human or second-agent review.
- Four CPython 3.12.4 checks per chapter: spectra and exact recurrence with scale-aware tolerances, frozen ridge probes, literal graded retrieval metrics, whitening/SVD constraints, finite balancing marginals and stopped targets, pseudo-label denominator, exact noise expectation and temperature-weighted distillation as applicable, plus bilingual structure. All eight programs use NumPy 1.26.4; no real image/text benchmark reproduction claimed.
- Promoted the full prose, equations, code and exercises. Tests read formal MDX only; removed temporary fallbacks/draft skips and updated review assertion to checked. Algorithm and independent references are unchanged; final record binds both locale hashes.
- Publication navigation points published topics to complete articles and removes corresponding pending wording, retaining directory entries for unwritten targets. Principles, equations, programs and exercises are unchanged; final article SHA values rebound.
Source locations checked:
- Deep Canonical Correlation Analysis · Physical page 2, Section 2 Eqs. 1–5: unit-variance projections, whitening, SVD and covariance regularization.
- Combining Labeled and Unlabeled Data with Co-Training · Physical pages 1–3 visually read from rendered PDF because text encoding is garbled: two-view sufficiency, compatibility, conditional-independence example and relation to other approaches.
Related topics