AI Wiki中文/EN

Multi-view learning

多视图学习

Recover shared signal through regularized CCA and distinguish paired correlation from co-training assumptions.

On this pageIntuitionMathematics & methodImplementationLimitationsExercisesResearch connections

Start 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:

Sxx=Xc⊤Xc/(N−1)+rI,Syy=Yc⊤Yc/(N−1)+rI,Sxy=Xc⊤Yc/(N−1).S_{xx}=X_c^\top X_c/(N-1)+rI,\qquad S_{yy}=Y_c^\top Y_c/(N-1)+rI,\qquad S_{xy}=X_c^\top Y_c/(N-1).

Without ridge, CCA maximizes Pearson correlation. With ridge, the constraints below use regularized variances instead. Whiten the two views and take an SVD:

max⁡a⊤Sxxa=b⊤Syyb=1a⊤Sxyb,T=Sxx−1/2SxySyy−1/2=Udiag⁡(s)V⊤.\max_{a^\top S_{xx}a=b^\top S_{yy}b=1}a^\top S_{xy}b,\qquad T=S_{xx}^{-1/2}S_{xy}S_{yy}^{-1/2}=U\operatorname{diag}(s)V^\top.

Set u=Sxx1/2au=S_{xx}^{1/2}a and v=Syy1/2bv=S_{yy}^{1/2}b. The constraints become unit norms, so the largest possible u⊤Tvu^\top Tv is the leading singular value. Recover the first projection pair and transform new observations using training means:

a=Sxx−1/2U:,1,b=Syy−1/2V:,1,hx(x)=(x−xˉtrain)a,hy(y)=(y−yˉtrain)b.a=S_{xx}^{-1/2}U_{:,1},\qquad b=S_{yy}^{-1/2}V_{:,1},\qquad h_x(x)=(x-\bar x_{\rm train})a,\qquad h_y(y)=(y-\bar y_{\rm train})b.

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 O(N(p2+q2+pq))O(N(p^2+q^2+pq)), with dense eigendecompositions costing O(p3+q3)O(p^3+q^3) 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

  1. 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.

  1. 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.

  1. 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.

  1. 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?

Choose one answer

Learning objectives

  • Solve regularized linear CCA by whitening and SVD.
  • Check pairing, nuisance correlations and method-specific assumptions.

Prerequisites & connections

Explore related knowledge →

References

  1. Deep Canonical Correlation Analysis
    Galen Andrew; Raman Arora; Jeff Bilmes; Karen Livescu · 2013
  2. 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:

Related topics

No matches. Try a synonym or acronym.

0 results shown

Wrap the whole query in double quotes for a phrase match.