Why Add Sparsity to CCA?
Canonical correlation analysis (CCA) finds linear combinations of two data blocks whose scores are strongly associated. In a multi-omics analysis, each block may contain many measured features, and an ordinary CCA weight vector can assign nonzero weights to nearly all of them. That can make the resulting combinations difficult to summarize and unstable when features are numerous or correlated.
Sparse CCA modifies the optimization problem so that some weights are exactly zero. The remaining nonzero weights identify features that contribute to the fitted combinations. This is a form of variable selection, not proof that selected features are biologically causal or uniquely important. The central design choice is how to encourage zeros while preserving a well-defined association objective.
Correlation Objectives With L1 Constraints
The sample correlation between the two scores is
This expression is unchanged if either weight vector is multiplied by a positive constant. Therefore, an L1 bound alone would not restrict the solution: a vector could simply be rescaled to meet the bound without changing the correlation. The usual correlation-based constrained formulation fixes each score variance to one and then imposes L1 bounds:
Under the variance constraints, the objective is the score correlation. Here \(\|\mathbf{a}\|_1=\sum_j|a_j|\), and \(c_x,c_y\) set the allowed L1 sizes. The constants must be large enough for the corresponding variance constraint to be feasible. A tighter bound generally restricts the weights more strongly, though it does not always produce a strictly smaller support at every value of the bound.
A common penalized version keeps the variance normalizations but subtracts L1 costs from the objective:
The nonnegative parameters \(\lambda_x\) and \(\lambda_y\) control the penalty strengths. This penalized objective is not itself the unpenalized score correlation: it trades off association against weight complexity. A constrained formulation and a penalized formulation express related preferences, but their tuning parameters are not generally interchangeable by a simple conversion.
Worked Example: A Constraint That Forces Single-Feature Weights
Suppose \(S_{xx}=I_3\) and \(S_{yy}=I_2\), where \(I_k\) is the \(k\)-dimensional identity matrix, and the cross-covariance matrix is
Use the constrained objective with \(c_x=c_y=1\). Because the within-block covariance matrices are identity matrices, the variance constraints are \(\|\mathbf{a}\|_2=1\) and \(\|\mathbf{b}\|_2=1\). For any vector, \(\|\mathbf{a}\|_1\geq\|\mathbf{a}\|_2\). Equality holds only when at most one entry is nonzero. Thus the L1 bounds force each weight vector to have exactly one nonzero entry, since its L2 norm is one.
For any such pair of vectors, the objective is one entry of \(S_{xy}\), up to sign. All entries here are positive, so the largest value is \(0.90\), at row 3 and column 2. The optimizing weights are \(\mathbf{a}=(0,0,1)^{\mathsf T}\) and \(\mathbf{b}=(0,1)^{\mathsf T}\), giving \(\mathbf{a}^{\mathsf T}S_{xy}\mathbf{b}=0.90\). Under these identity covariance matrices, this is a score correlation of \(0.90\). The fitted pair uses the third feature in the first block and the second feature in the second block.
What the Penalty Changes
A penalty makes the cost of a weight depend on its absolute size. Since the L1 norm sums absolute weights, adding a feature with a small nonzero weight can still incur a cost. This differs from merely reporting a dense solution and then dropping small coefficients afterward: the penalty changes which solution is optimal in the first place.
For intuition, consider a candidate with unit-length weights in both blocks and identity within-block covariance matrices. For this candidate, the penalized objective is its cross-covariance score minus \(\lambda_x\|\mathbf{a}\|_1+\lambda_y\|\mathbf{b}\|_1\). The following calculation compares particular candidates; it does not assert that these candidates exhaust all possible weight vectors.
Worked Example: Comparing Candidate Penalized Objectives
Use the cross-covariance matrix from the previous example and set \(\lambda_x=\lambda_y=0.15\). Compare the single-feature candidate \(\mathbf{a}=(0,0,1)^{\mathsf T},\ \mathbf{b}=(0,1)^{\mathsf T}\) with the two-feature candidate \(\mathbf{a}=(1/\sqrt{2},0,1/\sqrt{2})^{\mathsf T},\ \mathbf{b}=(0,1)^{\mathsf T}\).
For the single-feature candidate, the cross-covariance score is \(0.90\), and both L1 norms equal \(1\). Its penalized objective is
For the two-feature candidate, the score is \((0.10+0.90)/\sqrt{2}\approx0.7071\). Its L1 norms are \(\sqrt{2}\approx1.414\) and \(1\), so its objective is
Among these two candidates, the single-feature candidate has the larger penalized objective. The calculation illustrates why a penalty can favor a smaller support. To identify the optimizer, one must compare against all feasible candidates; this two-candidate comparison alone does not establish a global optimum.
Normalization, Scaling, and the Meaning of the Objective
The L1 constraints act on weights, so their practical effect depends on how features are scaled. If one feature is measured in large numerical units and another in small units, the corresponding weights can have different magnitudes for reasons unrelated to scientific importance. A common preparation is to center and scale features before fitting, while checking that this choice is suitable for the measurement types and scientific question. The covariance matrices and all weights must then be interpreted on that chosen scale.
The importance of normalization is also visible when the within-block covariance matrices are not identity matrices. The cross-covariance entry alone does not give the correlation between a pair of individual features. That correlation divides the cross-covariance by the product of their standard deviations.
Worked Example: Why Raw Cross-Covariance Can Mislead
Suppose
The cross-covariance between the first feature of each block is \(3\), which is larger than the second pair's cross-covariance of \(0.80\). But the first pair has standard deviations \(2\) and \(3\), so its correlation is
The second pair has standard deviations \(1\) and \(1\), giving correlation \(0.80/(\sqrt{1}\sqrt{1})=0.80\). Thus the larger raw covariance does not imply the stronger standardized association. This calculation compares individual feature pairs; it does not claim that either pair is the global sparse CCA solution, since that also depends on the allowed combinations of weights and the L1 constraints.
Assumptions, Diagnostics, and Alternatives
The optimization itself is a descriptive procedure and does not require normally distributed measurements. It does require matched rows across the two blocks: each row of \(\mathbf{X}\) must correspond to the same observational unit as the row of \(\mathbf{Y}\). Centering, scaling, missing-data handling, and any removal of zero-variance features should be decided before fitting and applied consistently.
For the variance-normalized formulation, each chosen weight vector must yield a well-defined, nonzero score variance. Positive-definite within-block covariance matrices make the normalization straightforward. If a covariance matrix is singular, some directions may have zero variance or may not be uniquely normalized; sparse constraints do not automatically solve that issue. Inspect the covariance structure and use an appropriate regularized formulation if necessary.
Useful diagnostics include checking the scale of each feature, the number of nonzero weights in each block, sensitivity of the supports to modest changes in the constraints or penalties, and the size of the association on data not used to choose the weights. Highly correlated features can exchange weight or selection across fits, so a selected support need not be stable even when the overall score association is similar. A strong in-sample objective is not, by itself, evidence that the association will replicate.
| Approach | Objective or emphasis | Trade-off |
|---|---|---|
| Classical CCA | Maximizes score correlation without sparsity penalties. | Uses all features freely; can be difficult to interpret or unstable in high dimensions. |
| Sparse CCA | Combines score association with L1 constraints or costs on both weight vectors. | Can produce selected supports, but results depend on scaling and sparsity choices. |
| Ridge CCA | Regularizes the covariance-based normalization to stabilize estimation. | Can improve stability but generally does not set weights exactly to zero. |
| PLS | Targets covariance between block scores rather than CCA's variance-normalized score correlation. | May suit a covariance-focused goal; it answers a different optimization question. |
A common mistake is to treat an L1 penalty as a cosmetic adjustment to a classical CCA solution, or to interpret every selected feature as uniquely important. The correction is that the penalty changes the optimization trade-off, and correlated features may substitute for one another. Sparse CCA provides a compact fitted representation under chosen modeling and scaling decisions; it does not establish causation, guarantee support stability, or automatically provide valid inferential conclusions.
Check Your Understanding
Answer each question, then compare with the solutions below.
- Why are variance normalizations needed when an L1 constraint is used with a correlation objective?
- With identity within-block covariance matrices and unit L2 norms, what does an L1 bound of \(1\) imply about each weight vector?
- For a candidate whose cross-covariance score is \(0.75\), whose two L1 norms are \(1.2\) and \(1\), and whose penalties are both \(0.10\), calculate its penalized objective.
- Two individual feature pairs have cross-covariances \(2\) and \(1\). Their respective standard deviations are \((2,2)\) and \((1,1)\). Which pair has the higher correlation?
- Name one reason why a sparse CCA support may change across fits even if the overall association is similar.
Solutions. (1) Correlation is unchanged by rescaling either weight vector, so an L1 bound without a scale-fixing condition can be met by rescaling and does not meaningfully constrain the correlation solution. (2) The L1 norm is at least the L2 norm, with equality only when at most one entry is nonzero. Since the L2 norm is \(1\), the bound forces exactly one nonzero entry in each vector. (3) The objective is \(0.75-0.10(1.2)-0.10(1)=0.53\). (4) The first correlation is \(2/(2\cdot2)=0.50\); the second is \(1/(1\cdot1)=1.00\), so the second pair has the higher correlation. (5) Highly correlated features can substitute for one another, making the selected support sensitive to small changes in the data or sparsity settings.