Why Compare Omics Views by Their Patient Similarities?
Two omics assays may measure very different quantities yet induce similar patterns of patient similarity. For example, one view may encode expression profiles and another may encode metabolite profiles. Comparing their raw variables directly is generally not meaningful: the measurements have different scales, dimensions, and biological interpretations. Instead, each view can be represented by a kernel matrix whose entries describe pairwise similarity among the same patients. Centered kernel alignment summarizes how closely those two matrices agree after removing their overall mean structure and accounting for their magnitudes.
The comparison is about the geometry of patients implied by each view, not about whether individual molecular measurements match. A high alignment indicates that patient pairs that are relatively similar in one view tend also to be similar in the other. A low alignment indicates little agreement in their centered similarity patterns under the chosen kernels. Neither result alone establishes biological interaction, causation, or statistical significance.
Definition and Conditions
Suppose \(n\) patients are measured in two views, with one kernel matrix \(K\) and another \(L\). Both matrices must refer to exactly the same patients in exactly the same row and column order. A kernel matrix is symmetric, with entry \(K_{ij}\) representing the similarity between patients \(i\) and \(j\) in the first view. For the standard interpretation and bounds below, assume both matrices are positive semidefinite (PSD): for every vector \(a\), \(a^\top K a\geq 0\), and likewise for \(L\). These are the usual kernel assumptions established in the earlier material on positive semidefinite kernels.
The centering matrix is symmetric and idempotent: \(H^\top=H\) and \(H^2=H\). It also removes a constant vector, since \(H\mathbf{1}=0\). Thus, \(K_c\) and \(L_c\) describe similarities after centering across patients. If a kernel is built from a feature matrix \(X\) as \(K=XX^\top\), then \(HKH=(HX)(HX)^\top\): centering the kernel corresponds to centering the feature columns across the patients before forming their Gram matrix.
The denominator rescales the Frobenius inner product by the lengths of the two centered matrices. Without it, the inner product would increase simply by multiplying one kernel by a positive constant. CKA instead measures the angle between the two centered matrices when they are viewed as vectors of \(n^2\) entries.
Why the Normalized Alignment Is Bounded
The normalization gives a useful, scale-free measure, and the bounds follow from standard matrix geometry. The Frobenius inner product is an ordinary inner product on the vector of matrix entries. Its Cauchy–Schwarz inequality gives the upper bound in absolute value; positive semidefiniteness gives nonnegativity here.
For nonzero centered matrices, \(|\langle K_c,L_c\rangle_F|\leq\|K_c\|_F\|L_c\|_F\). Dividing by the positive denominator shows that the absolute value of CKA is at most 1.
The centered matrices remain PSD because \(a^\top HKH a=(Ha)^\top K(Ha)\geq0\), and similarly for \(L_c\). For PSD matrices, \(\operatorname{tr}(K_cL_c)=\operatorname{tr}(K_c^{1/2}L_cK_c^{1/2})\geq0\). Since this trace equals their Frobenius inner product, CKA is nonnegative.
When both centered PSD kernels are nonzero, \(0\leq\operatorname{CKA}(K,L)\leq1\). Equality at 1 occurs when one centered matrix is a positive scalar multiple of the other. Equality at 0 means their Frobenius inner product is zero.
If matrices are not PSD, the Cauchy–Schwarz bound still holds, but the inner product can be negative; the range need not be \([0,1]\). Also, if either centered matrix is zero, its norm is zero and CKA is undefined. A constant-similarity kernel, proportional to \(\mathbf{1}\mathbf{1}^\top\), is removed entirely by centering and is one example of this case.
Worked Example: Alignment of Two Single-Feature Views
Consider three hypothetical patients with centered feature values \(x=(-1,0,1)^\top\) and \(y=(-1,-1,2)^\top\) in two views. Each feature vector sums to zero, so the centered kernels are \(K_c=xx^\top\) and \(L_c=yy^\top\). Both are PSD because they are outer products.
For rank-one kernels, the Frobenius inner product is \(\langle xx^\top,yy^\top\rangle_F=(x^\top y)^2\). Here \(x^\top y=(-1)(-1)+(0)(-1)+(1)(2)=3\), so the numerator is \(3^2=9\). The squared Euclidean lengths are \(x^\top x=2\) and \(y^\top y=6\). The Frobenius norms of the outer products are therefore \(\|xx^\top\|_F=2\) and \(\|yy^\top\|_F=6\).
Substituting gives $$ \operatorname{CKA}(K,L)=\frac{9}{2\cdot6}=\frac{9}{12}=0.75. $$ The views have substantial, but not perfect, agreement in their centered patient-similarity patterns. This value is dimensionless; it is not a 75% probability that the views share a biological mechanism.
Reading the Value in Context
An alignment near 1 indicates that the centered kernels point in nearly the same direction in matrix space. In the special case of value 1, they are positive scalar multiples, so their centered similarity patterns are exactly proportional. A value near 0 means little Frobenius inner-product agreement. It does not establish that the views are unrelated in every respect: alignment can miss nonlinear or localized patterns that are not expressed by the chosen kernels, and a global summary can conceal subgroups of patients with different relationships.
The value is invariant to multiplying either kernel by a positive constant. Indeed, for \(a,b>0\), the numerator for \(aK_c,bL_c\) is multiplied by \(ab\), and the denominator is also multiplied by \(ab\), leaving CKA unchanged. This invariance is useful when kernel magnitudes differ, but it does not make CKA invariant to every change in data processing or kernel construction.
Worked Example: High Alignment with Different Directional Weights
For four hypothetical patients, define two centered vectors \(u=(-1,-1,1,1)^\top\) and \(v=(-1,1,-1,1)^\top\). They satisfy \(u^\top u=v^\top v=4\) and \(u^\top v=0\). Let the first view have kernel \(K_c=uu^\top+vv^\top\), and the second have \(L_c=uu^\top+2vv^\top\). Both are PSD and centered because \(u\) and \(v\) each sum to zero.
The two outer-product matrices are orthogonal under the Frobenius inner product: \(\langle uu^\top,vv^\top\rangle_F=(u^\top v)^2=0\). Also, \(\|uu^\top\|_F=\|vv^\top\|_F=4\). Therefore, $$ \langle K_c,L_c\rangle_F=4^2+2(4^2)=48, \qquad \|K_c\|_F=\sqrt{4^2+4^2}=\sqrt{32}, \qquad \|L_c\|_F=\sqrt{4^2+2^2(4^2)}=\sqrt{80}. $$ Thus, $$ \operatorname{CKA}(K,L)=\frac{48}{\sqrt{32}\sqrt{80}}=\frac{3}{\sqrt{10}}\approx0.9487. $$ The alignment is high even though the views weight the \(v\) direction differently. It summarizes broad agreement, not equality of every component or identical kernel values.
Worked Example: Centering Removes a Constant Similarity Offset
Return to the three-patient feature vectors \(x=(-1,0,1)^\top\) and \(y=(-1,-1,2)^\top\). Suppose the hypothetical raw kernels include constant offsets: \(K=xx^\top+5\mathbf{1}\mathbf{1}^\top\) and \(L=yy^\top+2\mathbf{1}\mathbf{1}^\top\). These remain PSD because each term is PSD and its coefficient is nonnegative.
Since \(H\mathbf{1}=0\), we have \(H\mathbf{1}\mathbf{1}^\top H=0\). Since \(Hx=x\) and \(Hy=y\), centering gives \(HKH=xx^\top\) and \(HLH=yy^\top\). The centered numerator is \(9\), and the centered Frobenius norms are \(2\) and \(6\), as calculated above. Therefore, \(\operatorname{CKA}(K,L)=9/(2\cdot6)=0.75\). The constant offsets do not affect centered alignment; they describe a common similarity level rather than variation in the patients’ relative similarity patterns.
Diagnostics, Alternatives, and Limitations
Before interpreting an alignment, check that both kernels use the same patients in the same order, are symmetric, and are PSD if the \([0,1]\) interpretation is required. Confirm that centering has been applied to both matrices and that neither centered norm is zero. A quick numerical check is to compute the norms and the numerator separately; the final value should lie in the theoretical range up to small rounding error. A substantially negative value or a value above 1 suggests a calculation, alignment, or kernel-validity problem.
Patient order is particularly important. Permuting the rows and columns of only one kernel changes which patient pairs are compared, so the result no longer measures agreement between the views on corresponding patients. Centering is also not a repair for inconsistent patient sets, missingness handled differently across views, or inappropriate kernel choices. Inspect patient identifiers and preprocessing before interpreting a numerical score.
| Comparison | What it summarizes | Key caution |
|---|---|---|
| Centered kernel alignment | Normalized Frobenius agreement between centered patient-similarity matrices | Depends on the chosen kernels and is descriptive, not an inferential test |
| Unnormalized Frobenius inner product | Absolute matrix agreement, including its scale | Can change greatly under simple rescaling of a kernel |
| Entrywise correlation of kernel matrices | Linear association between paired matrix entries | Does not use the Frobenius normalization in the same way and must account for the dependence among entries |
Alignment also has finite-sample and modeling limitations. Its value can change with the kernel family, kernel parameters, feature scaling, and patient sample. A high value may reflect a broad shared structure while obscuring view-specific information; a low value may occur even when the views share a particular subgroup pattern. The score itself supplies no null distribution, confidence interval, or \(p\)-value. A formal significance assessment requires a separately specified inferential procedure and its assumptions; a descriptive CKA value alone is not evidence against a statistical null hypothesis.
A common mistake is to say, “The alignment is 0.95, so the omics views are 95% biologically identical.” This is wrong: the value is a normalized inner product of centered kernels, not a percentage of shared biology. The correction is to describe the result in terms of patient-similarity geometry, name the kernels used, and avoid claims about identity, causation, or significance unless separate evidence supports them.
Check Your Understanding
Answer each question, then compare your reasoning with the solutions.
- If \(L_c=3K_c\) for a nonzero centered PSD kernel \(K_c\), what is their CKA, and why?
- What happens to CKA if one kernel is constant across all patient pairs, so its centered matrix is zero?
- Two researchers calculate alignment using the same patients but different row orders in one kernel. Is their result interpretable as cross-view alignment? Explain.
- For centered feature vectors \(a=(-1,0,1)^\top\) and \(b=(1,-2,1)^\top\), each used to form a rank-one kernel, calculate CKA.
- A study reports a high CKA for two omics kernels. Does this establish that one view causes the other, or that their agreement is statistically significant?
Solutions. (1) The value is \(1\): \(\langle K_c,3K_c\rangle_F=3\|K_c\|_F^2\), while the denominator is \(\|K_c\|_F\|3K_c\|_F=3\|K_c\|_F^2\). (2) It is undefined because the denominator includes the zero Frobenius norm; the constant kernel has no centered variation to compare. (3) No. Kernel entries must correspond to the same ordered patient pairs; reorder rows and columns consistently before comparing. (4) Here \(a^\top b=(-1)(1)+(0)(-2)+(1)(1)=0\), so the numerator \((a^\top b)^2=0\). Both kernels have nonzero norms, giving CKA \(=0\). (5) No. High CKA indicates agreement in centered patient-similarity geometry for those kernels. It alone neither demonstrates causation nor supplies an inferential test or significance level.