Canonical Correlation Analysis (CCA) is a workhorse of multi-modal machine learning. Whether you are looking for the shared signal between audio and video or linking gene expression to clinical outcomes, CCA helps find the underlying "canonical variates" that tie different data views together.
However, standard CCA suffers from a "curse of dimensionality." It breaks down when you have more features than samples ($D > N$) and gets easily distracted by "nuisance variables"—features that are unique to one modality and offer no shared information. In a paper published at ICLR 2022, researchers introduce $\ell_0$-Sparse CCA, a method that uses "stochastic gates" to prune away the noise and find the true shared signal.
TL;DR
The authors propose $\ell_0$-CCA and $\ell_0$-Deep CCA, which use differentiable stochastic gates to perform feature selection while maximizing correlation between datasets. This approach allows CCA to function in high-dimensional regimes where traditional methods overfit, effectively "gating out" modality-specific noise to reveal the shared underlying structure.
The Problem with Traditional CCA
Traditional CCA seeks linear transformations of two datasets to maximize their correlation. While powerful, it faces two major hurdles in modern applications:
- The $D > N$ Problem: In fields like genomics, we often have thousands of features (genes) but only a few hundred samples. In this regime, covariance matrices become rank-deficient, causing standard CCA to overfit or fail entirely.
- Modality-Specific Noise: Real-world data is messy. If you have two cameras watching a scene, one might see a tree that the other doesn't. Standard CCA tries to incorporate all variables, even those that don't contribute to the shared correlation, degrading the quality of the learned representations.
Existing "Sparse CCA" methods often rely on $\ell_1$ regularization (Lasso), which can cause "shrinkage" (biasing the weights toward zero) or use greedy heuristics that get stuck in local minima.
Methods: Introducing Stochastic Gates
The core innovation of this paper is the use of Stochastic Gates. Instead of just applying a penalty to the weights, the authors multiply each input feature by a learnable gate variable.
- Continuous Relaxation: Since a binary "on/off" gate isn't differentiable, the model uses a Gaussian-based continuous relaxation (a "hard Sigmoid" of a Gaussian). This allows the model to learn which features to keep using standard gradient descent.
- $\ell_0$ Regularization: The objective minimizes a combination of a correlation loss and an $\ell_0$ penalty (the number of active gates). Because of the stochastic gate formulation, the expected $\ell_0$ norm becomes differentiable.
- $\ell_0$-Deep CCA: The authors extend this logic to non-linear relationships by placing these gates at the input layer of two deep neural networks. The networks are trained to maximize "Total Correlation" while the gates learn to prune irrelevant inputs.
- Smart Initialization: A novel initialization scheme based on thresholded singular value decomposition (SVD) of the cross-covariance matrix helps the model find the sparse subset of features much faster.
Key Insights and Ideas
Pruning as Learning: The model doesn't just learn how to transform the data; it learns what data to look at. To test this, the authors used a "Spinning Puppets" dataset: a video dataset where two cameras watch three spinning puppets, but only one puppet (the Bulldog) is visible to both cameras.
As seen above, the learned gates effectively "blacked out" the puppets that were unique to each camera, focusing entirely on the shared Bulldog puppet.
Solving Degeneracy: By forcing the model to select a small subset of features, the effective dimensionality drops below the sample size ($k < N$). This makes the covariance matrices full-rank and stable again, bypassing the $D > N$ curse.
Biological Discovery: The authors also tested the method on METABRIC, a real-world biological dataset linking RNA gene expression (15,709 features) with Copy Number Alteration data (47,127 features) for breast cancer patients. The model identified 169 genes. Remarkably, this unsupervised list significantly overlapped with the "PAM50"—a known set of 50 genes used by clinicians to classify breast cancer subtypes. This suggests the model can find biologically meaningful markers without any labels.
Key Results
- Superior Estimation: In synthetic tests, $\ell_0$-CCA consistently outperformed five other sparse CCA baselines (like PMA and IP-SCCA) in accurately recovering the true canonical vectors.
- Robustness to Noise: On a Noisy MNIST dataset, $\ell_0$-Deep CCA achieved a clustering accuracy of 95.4%, compared to 93.2% for standard Deep CCA.
- Seismic Accuracy: For seismic event classification using sonogram data, the method reached 98.1% k-means accuracy, a significant jump over the 94.9% achieved by standard DCCA.
- Efficiency: Despite the complexity of the gates, the runtime scales linearly with the number of samples, making it practical for large datasets.
Limitations and Future Work
While highly effective, the authors note a few areas for future improvement. Tuning the sparsity parameter ($\lambda$) currently requires a cross-validation procedure, which can be computationally expensive in very high-dimensional settings. Additionally, the current approach works best with full-batch or large-batch gradient descent; providing stronger guarantees for small-batch stochastic training remains a goal for future work. Finally, the authors are working on tightening the theoretical bounds for estimation error in the extreme $N \ll D$ regime.
Summary updated