An Online Riemannian PCA for Stochastic Canonical Correlation Analysis

Zihang Meng, Rudrasis Chakraborty, Vikas Singh

Canonical Correlation Analysis (CCA) is a fundamental statistical tool used to identify and measure the associations between two sets of variables—for example, matching image features with corresponding text descriptions. However, applying CCA to modern, high-dimensional datasets introduces a significant computational hurdle: the whitening constraint. This constraint dictates that the projected components must be decorrelated, a requirement that traditionally demands expensive matrix inversions or decompositions costing $O(d^3)$ time per iteration (where $d$ is the dimensionality).

Existing stochastic (online) approaches struggle to overcome this bottleneck. They either inherit the same $O(d^3)$ cost per iteration or are restricted to extracting only the single top canonical component. To address this, the authors introduce RSG+, a novel stochastic algorithm that leverages Riemannian geometry to handle complex whitening constraints efficiently. RSG+ achieves a superior $O(d^2k)$ runtime complexity while maintaining a fast $O(1/t)$ convergence rate, making it highly effective for streaming, high-dimensional data.

Reparameterizing CCA via Riemannian Geometry

The core innovation of RSG+ lies in the reparameterization of the CCA projection matrices ($U$ and $V$). Instead of treating them as arbitrary dense matrices and forcing constraints post-hoc, the authors decompose them into a product of structured matrices:

  1. Principal Components ($\tilde{U}, \tilde{V}$): These matrices represent the underlying subspace and reside on the Grassmannian manifold.
  2. Scaling/Whitening ($S_u, S_v$): Upper triangular matrices that manage the variance.
  3. Rotation ($Q_u, Q_v$): Orthogonal matrices that live on the Special Orthogonal group $SO(k)$.
Block diagram illustrating the decoupling of the PCA objective and the total CCA objective in the RSG+ algorithm.

By viewing the optimization problem through the lens of Riemannian manifolds, the algorithm can utilize Riemannian Stochastic Gradient Descent (RSGD). This allows RSG+ to "walk" along the natural geometry of these structured spaces. The difficult whitening constraints define specific geometric shapes; by optimizing directly on these manifolds, the constraints are naturally satisfied during the update steps via Riemannian exponential maps, entirely bypassing the $O(d^3)$ global whitening cost. Furthermore, this formulation elegantly decouples the task of finding principal subspaces (variance) from finding the specific linear combinations that maximize correlation.

Empirical Performance and Applications

The authors evaluated RSG+ across several standard benchmarks, including MNIST, Mediamill, and CIFAR-10, comparing it against existing state-of-the-art stochastic methods like MSG.

Performance comparison of RSG+ (Ours) versus MSG across MNIST, Mediamill, and CIFAR datasets, showing superior convergence and correlation.

Significant Speedups: RSG+ achieved approximately a 10x runtime improvement over MSG across the evaluated datasets. As shown in the convergence plots, RSG+ rapidly achieves higher Pearson Correlation Coefficients (PCC) as it processes streaming samples.

Deep Learning Scalability: Because the algorithm avoids $O(d^3)$ operations and processes data in minibatches, it seamlessly integrates into Deep Learning pipelines (DeepCCA). In experiments, RSG+ successfully scaled to latent dimensions of $d=1000$, whereas standard batch-based DeepCCA methods failed due to the memory and computational limits of large eigen-decompositions.

Fairness in Modeling: The authors also demonstrated a unique application for RSG+: training "fair" models. By using CCA to minimize the correlation between a model's learned features and a "protected" attribute (such as gender) during training, they successfully improved fairness metrics (like Difference in Equal Opportunity) without requiring per-sample sensitive labels for the entire training set.

Limitations and Future Directions

While RSG+ offers a strict improvement over classical methods, it is not without limitations. Although $O(d^2k)$ is vastly more efficient than $O(d^3)$, the algorithm still faces computational challenges at extreme dimensionalities (e.g., when $d$ exceeds $10^5$). Future work may explore sparsity-inducing techniques to mitigate this. Additionally, if the top-1 eigenvalue of a dataset is overwhelmingly dominant, the algorithm's performance for extracting multiple components ($k > 1$) can slightly lag behind methods focused purely on the population objective. Finally, implementing Riemannian updates requires specialized knowledge of exponential maps and parallel transport, which presents a steeper learning curve than standard Euclidean SGD.

Summary updated

BibTeX
@inproceedings{meng2021online,
  author = {Zihang Meng and Rudrasis Chakraborty and Vikas Singh},
  title = {{An Online Riemannian PCA for Stochastic Canonical Correlation Analysis}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2021},
  url = {https://openreview.net/forum?id=21uqYo8soks},
}
Figure