Tutorials › Multi-Omics Data Integration › Worked Comparison of SNF and Kernel Fusion

Similarity Network Fusion and Kernel Methods · Tutorial 351 of 597

Worked Comparison of SNF and Kernel Fusion

Work through a shared two-block patient example to compare weighted kernel addition with SNF diffusion and see how their tuning choices affect fused similarities.

Advanced 12 min read

What You'll Learn

  • Compute a weighted sum of two patient similarity kernels and interpret its off-diagonal entries.
  • Apply a stated SNF diffusion update to two row-stochastic similarity networks.
  • Compare direct kernel combination with neighborhood-based diffusion.
  • Trace how kernel weights and SNF neighborhood choices change fused similarities.
  • Check normalization, symmetry, and the implications of parameter choices.

Why Compare the Methods on the Same Patients?

Kernel fusion and Similarity Network Fusion (SNF) both combine information across omics blocks, but they combine it in different ways. Weighted kernel addition takes a weighted average of the block-specific similarities directly. SNF instead diffuses each block’s network using information from the other blocks, with the neighborhood structure controlling which patients exchange similarity information. The numerical results can therefore differ even when both methods begin with the same patient blocks.

This tutorial uses a small hypothetical example to make that contrast explicit. All similarities below are dimensionless. The matrices are deliberately small enough to calculate by hand; they illustrate the mechanics, not a recommended sample size or a claim about real patients. The introductory material on SNF and kernel fusion establishes the broader method families; here the focus is a matched, worked comparison and the consequences of tuning choices.

Definition: A kernel matrix \(K\) for \(n\) patients is a symmetric positive semidefinite matrix whose entry \(K_{ij}\) represents a similarity between patients \(i\) and \(j\). A weighted kernel sum for two blocks is \(K_{\mathrm{fused}}=w_1K_1+w_2K_2\), where \(w_1,w_2\geq 0\) and \(w_1+w_2=1\). An SNF network is a patient-to-patient similarity matrix updated by diffusion across block-specific neighborhood structures. The SNF output is a network; it need not satisfy the positive-semidefinite requirement for a kernel.

The Shared Hypothetical Data

Suppose three patients, A, B, and C, have measurements in two omics blocks. After the block-specific similarity construction and normalization, let the matrices be

$$ K_1=P_1= \begin{pmatrix} 0.6&0.3&0.1\\ 0.3&0.4&0.3\\ 0.1&0.3&0.6 \end{pmatrix}, \qquad K_2=P_2= \begin{pmatrix} 0.6&0.1&0.3\\ 0.1&0.6&0.3\\ 0.3&0.3&0.4 \end{pmatrix}. $$

Each is symmetric, has nonnegative entries, and has rows summing to one. For this example, they are also positive semidefinite, so they may be used as kernels as well as starting networks. Block 1 gives A–B similarity \(0.3\) and A–C similarity \(0.1\); block 2 reverses those two relationships. Both blocks assign B–C similarity \(0.3\). These differences make the choice of fusion method visible.

Weighted Kernel Addition: Direct Averaging

A weighted kernel sum preserves a transparent interpretation: each fused entry is the weighted average of the corresponding entries in the input kernels. The nonnegative weights summing to one are a common constraint when the goal is a convex combination. Under that constraint, symmetry and positive semidefiniteness are preserved: for any vector \(z\), \(z^\mathsf{T}K_{\mathrm{fused}}z=w_1z^\mathsf{T}K_1z+w_2z^\mathsf{T}K_2z\geq 0\). This guarantee concerns kernel validity, not whether the weights are scientifically appropriate.

Worked Example: Equal-Weight Kernel Addition

Give the two blocks equal weight, \(w_1=w_2=0.5\). Then \(K_{\mathrm{fused}}=0.5K_1+0.5K_2\). Entry by entry, the fused similarity for A–B is \(0.5(0.3)+0.5(0.1)=0.20\); for A–C it is \(0.5(0.1)+0.5(0.3)=0.20\); and for B–C it is \(0.5(0.3)+0.5(0.3)=0.30\). The full result is

$$ K_{\mathrm{fused}}= \begin{pmatrix} 0.60&0.20&0.20\\ 0.20&0.50&0.30\\ 0.20&0.30&0.50 \end{pmatrix}. $$

Thus, equal weighting removes the A–B versus A–C distinction in these data, while retaining the larger B–C similarity. This is a direct average: no neighborhood-based information has been propagated between patients.

SNF: One Explicit Diffusion Update

SNF uses a block-specific transition structure to determine how similarities are smoothed through local neighborhoods. In a common update, each block’s current network is replaced using the other blocks’ networks and its own neighborhood transition matrix. With two blocks and one synchronous update, define

$$ P_1^{(1)}=S_1P_2^{(0)}S_1^\mathsf{T}, \qquad P_2^{(1)}=S_2P_1^{(0)}S_2^\mathsf{T}, \qquad P_{\mathrm{SNF}}^{(1)}=\frac{P_1^{(1)}+P_2^{(1)}}{2}. $$

Here \(P_v^{(0)}\) is the starting network for block \(v\), and \(S_v\) is a neighborhood transition matrix for that block. Actual SNF implementations can include additional normalization and iterate the update; the calculation below specifies a simple, fully reproducible one-step version. We use symmetric, row-stochastic neighborhood matrices, so they are also column-stochastic. The input networks are symmetric and row-stochastic. Consequently the updated matrices in this example remain symmetric, nonnegative, and row-stochastic.

Condition for this calculation: Each \(S_v\) must have nonnegative entries and rows summing to one. The specific preservation of row sums in the worked calculation also uses column sums of one: if \(P\mathbf{1}=\mathbf{1}\) and \(S^\mathsf{T}\mathbf{1}=\mathbf{1}\), then \(SPS^\mathsf{T}\mathbf{1}=S\mathbf{1}=\mathbf{1}\). Symmetry follows when \(P\) and \(S\) are symmetric. Other implementations may require explicit symmetrization or normalization.

Worked Example: One SNF Update with Block-Specific Neighborhoods

Use the following transitions. In block 1, A and B form a local neighborhood while C is separate; in block 2, B and C form a local neighborhood while A is separate:

$$ S_1= \begin{pmatrix} 0.5&0.5&0\\ 0.5&0.5&0\\ 0&0&1 \end{pmatrix}, \qquad S_2= \begin{pmatrix} 1&0&0\\ 0&0.5&0.5\\ 0&0.5&0.5 \end{pmatrix}. $$

For \(P_1^{(1)}=S_1P_2S_1^\mathsf{T}\), left multiplication averages rows A and B of \(P_2\), and right multiplication averages columns A and B. The upper-left \(2\times2\) block therefore becomes the average of its four entries: \((0.6+0.1+0.1+0.6)/4=0.35\). Each of the first two rows’ C entry is \((0.3+0.3)/2=0.30\), and the C–C entry remains \(0.40\). Hence

$$ P_1^{(1)}= \begin{pmatrix} 0.35&0.35&0.30\\ 0.35&0.35&0.30\\ 0.30&0.30&0.40 \end{pmatrix}. $$

For \(P_2^{(1)}=S_2P_1S_2^\mathsf{T}\), block 2 averages B and C. The B–C submatrix averages to \((0.4+0.3+0.3+0.6)/4=0.40\). The A similarity to either member of that neighborhood becomes \((0.3+0.1)/2=0.20\), while A–A remains \(0.60\). Thus

$$ P_2^{(1)}= \begin{pmatrix} 0.60&0.20&0.20\\ 0.20&0.40&0.40\\ 0.20&0.40&0.40 \end{pmatrix}. $$

Averaging the two updated networks gives

$$ P_{\mathrm{SNF}}^{(1)}= \begin{pmatrix} 0.475&0.275&0.250\\ 0.275&0.375&0.350\\ 0.250&0.350&0.400 \end{pmatrix}. $$

The resulting off-diagonal similarities are A–B \(0.275\), A–C \(0.250\), and B–C \(0.350\). Unlike equal-weight kernel addition, this update does not give identical A–B and A–C similarities. It smooths similarities according to two different neighborhood structures, and here B–C is largest after the update.

What the Parameter Choices Change

A kernel weight controls how much each block’s original pairwise similarity contributes. An SNF neighborhood choice controls which patients contribute to local smoothing. The distinction is substantive: weights adjust block influence globally, whereas neighborhood transitions determine where information is propagated. The following comparison uses off-diagonal entries because diagonal self-similarities are often omitted or set aside when examining patient networks.

Worked Example: Changing the Kernel Weight

Assign block 1 weight \(0.75\) and block 2 weight \(0.25\). For A–B, the fused similarity is \(0.75(0.3)+0.25(0.1)=0.25\). For A–C it is \(0.75(0.1)+0.25(0.3)=0.15\), and for B–C it remains \(0.75(0.3)+0.25(0.3)=0.30\). The off-diagonal values are therefore A–B \(0.25\), A–C \(0.15\), and B–C \(0.30\). Reversing the weights to \(0.25\) and \(0.75\) gives \(0.15\), \(0.25\), and \(0.30\), respectively.

The reversal changes which of A–B and A–C is more similar, but it cannot change B–C because both blocks give that pair the same input value. This is a useful check: a claimed weight effect should be traceable to differences in the input blocks.

Worked Example: A Neighborhood Choice That Erases Differences

As an extreme alternative, suppose both SNF transitions assign equal probability to every patient: \(S_1=S_2=J/3\), where every entry of \(J\) is one. For either row-stochastic input network \(P\), every entry of \((J/3)P(J/3)^\mathsf{T}\) equals \(1/3\). To see this, each row of \(P\) sums to one, so the sum of all its entries is three; averaging across its three rows and three columns gives \(3/9=1/3\). Both updated networks, and their average, are therefore

$$ P_{\mathrm{SNF}}^{(1)}= \begin{pmatrix} 1/3&1/3&1/3\\ 1/3&1/3&1/3\\ 1/3&1/3&1/3 \end{pmatrix}. $$

This setting corresponds to indiscriminate, all-patient mixing rather than local neighborhoods. It preserves row sums but erases all pairwise distinctions. A valid normalization is not enough to make a useful fusion: neighborhoods must be chosen at a scale that retains meaningful structure.

How to Diagnose a Misleading Comparison

A numerical difference between methods is interpretable only if the inputs and outputs are on compatible scales. Before comparing results, verify that patient order is identical across blocks, that normalization has been applied as intended, and that the kernel weights satisfy their stated constraints. For SNF, inspect whether the transition matrices actually encode local neighborhoods, and check that the updates remain finite, nonnegative, and normalized under the chosen implementation.

The example’s matrices are already on a common row-stochastic scale. In real analyses, block normalization and neighborhood construction can strongly affect results; otherwise, a large-scale block or a poorly chosen distance-to-similarity transformation may dominate. Examine the fused off-diagonal distribution, compare rankings of patient pairs, and repeat the calculation over plausible weights and neighborhood sizes. If modest tuning changes reverse many pairwise rankings or collapse the network toward uniform similarities, the result is sensitive and should not be presented as a uniquely determined patient structure.

A further diagnostic is to distinguish kernel validity from network validity. A nonnegative symmetric network with rows summing to one is not automatically positive semidefinite. If a later method requires a kernel, check the eigenvalues rather than assuming an SNF network can be substituted for a kernel matrix. Conversely, a positive-semidefinite weighted kernel may still provide an uninformative patient network if its off-diagonal similarities are nearly constant.

Choosing Between the Approaches

FeatureWeighted kernel additionSNF diffusion
Main operationWeighted average of corresponding similaritiesNeighborhood-based propagation across block networks
Primary tuning choiceBlock weightsNeighborhood construction and iteration settings
Kernel guaranteePositive semidefinite when input kernels are PSD and weights are nonnegativeNo general PSD guarantee for the fused network
InterpretationDirect contribution of each block to each pairSimilarity after cross-block local smoothing
Typical limitationWeights may suppress useful complementary structureNeighborhood choices can over-smooth or distort local structure

Neither method is universally preferable. Weighted addition is attractive when each block’s similarity scale is well controlled and a kernel representation is needed. SNF can be useful when local network structure is central and information is expected to reinforce across blocks. The comparison should be based on the analytic goal, the required matrix properties, and sensitivity to defensible parameter choices—not simply on which fused matrix looks smoother.

Common Pitfall

A common mistake is to say that SNF “averages the two kernels” because its final output is an average of updated networks. That wording misses the key operation: before averaging, each block network has been transformed using a neighborhood transition and the other block’s network. In this example, the equal-weight kernel sum gives A–B and A–C both \(0.20\), while the SNF update gives \(0.275\) and \(0.250\). The correction is to describe the SNF result as an average of diffused networks, and to state the neighborhood and update settings used.

Key takeaway: Weighted kernel addition combines pairwise similarities directly; SNF first propagates similarities through block-specific neighborhoods. Their outputs can differ, and those differences depend on distinct tuning choices. Report the inputs, normalization, weights or neighborhood settings, and the matrix properties needed for the downstream analysis.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions.

  1. With weights \(0.25\) for block 1 and \(0.75\) for block 2, calculate the fused A–B, A–C, and B–C similarities.
  2. Why does nonnegative weighted addition preserve positive semidefiniteness when both input kernels are positive semidefinite?
  3. In the one-step SNF example, what is the updated A–B similarity after averaging the two block-specific updated networks?
  4. What does the all-patient transition \(J/3\) do to a row-stochastic input network, and why is this a warning about neighborhood choice?

Solutions. (1) A–B is \(0.25(0.3)+0.75(0.1)=0.15\); A–C is \(0.25(0.1)+0.75(0.3)=0.25\); B–C is \(0.25(0.3)+0.75(0.3)=0.30\). (2) For every vector \(z\), \(z^\mathsf{T}K_{\mathrm{fused}}z=w_1z^\mathsf{T}K_1z+w_2z^\mathsf{T}K_2z\), a sum of nonnegative quantities when the weights are nonnegative and each input is positive semidefinite. (3) The updated value is \((0.35+0.20)/2=0.275\). (4) It turns every entry into \(1/3\), erasing pairwise distinctions; this shows that an overly broad neighborhood can over-smooth even while preserving row sums.

Clinical Biostats