What the SNF Diffusion Update Does
Similarity Network Fusion (SNF) updates each view’s patient-similarity network using information from the other views. The step is specific: for a given view, first average the current networks from all the other views, then smooth that average through the given view’s local affinity matrix on both sides. The result is processed to remove self-similarity and restore row normalization.
The calculation uses the patient alignment and network matrices established in the earlier material on SNF transition and local affinity matrices. Each view must describe the same \(n\) patients in the same order. The current transition matrix \(P_t^{(v)}\) represents view \(v\) at iteration \(t\), and \(S^{(v)}\) is its local affinity matrix. The update is defined for \(V\geq 2\) views.
Here \(Q_t^{(-v)}\) is the information supplied to view \(v\), and \(R_{t+1}^{(v)}\) is the raw, pre-normalization result. Define \(\mathcal N_0(A)\) by setting the diagonal entries of \(A\) to zero and dividing each remaining row by that row’s off-diagonal sum. When every such sum is positive, the updated transition matrix is
The superscript \((-v)\) is important: view \(v\) does not contribute its own current matrix to the average used in its update. With two views, each view therefore uses the other view’s current matrix. With three or more views, it uses the mean of the other \(V-1\) matrices.
Assumptions and the Matrix Calculation
The update is a matrix operation, not a significance test, so it does not require a sampling distribution or a p-value. Its basic requirements concern the data and matrices. The rows and columns in every \(P_t^{(v)}\) and \(S^{(v)}\) must refer to the same patients in the same order. The matrices should be nonnegative, and each row of \(P_t^{(v)}\) should be a probability distribution over other patients: it has zero diagonal and off-diagonal entries summing to one. The local affinity matrices are also nonnegative; in the usual transition interpretation, their rows sum to one.
The raw product does not necessarily have row sums of one, even if \(S^{(v)}\) and \(Q_t^{(-v)}\) do. In particular, summing across columns of \(S^{(v)}Q_t^{(-v)}(S^{(v)})^T\) involves the column sums of \(S^{(v)}\). Row-stochasticity alone does not make those column sums equal to one. Thus the final row normalization is part of the update, not an optional cosmetic adjustment.
The two-sided product also has a direct entrywise form. For patients \(i\) and \(j\), the raw entry is a weighted sum of entries in the other-view average:
Each term is nonnegative under the stated nonnegativity assumptions. The weights involve the local affinities of patient \(i\) to \(a\) and patient \(j\) to \(b\). This identity follows by applying the definition of matrix multiplication first to \(S^{(v)}Q_t^{(-v)}\), then multiplying by \((S^{(v)})^T\). It explains why the update acts on both endpoints of a network entry. It does not, by itself, guarantee that the diagonal is zero or that rows sum to one; those are handled afterward.
Worked Example: One Complete Two-View Update
Consider three hypothetical patients and two views. For a transparent calculation, suppose both views have the same local affinity matrix in this iteration. The current transition matrices and local affinity matrix are
Every displayed \(P_t^{(v)}\) has nonnegative entries, a zero diagonal, and rows summing to one; \(S\) is also nonnegative and row-stochastic. Since there are two views, the average of the other view for view 1 is \(Q_t^{(-1)}=P_t^{(2)}\). The raw update is \(SP_t^{(2)}S^T\). Here \(S^T=S\), and the first multiplication gives
Multiplying this result by \(S\) gives
For example, the first entry is \(0.25(0.50)+0.50(0.50)+0.25(0)=0.375\). Set the diagonal to zero. The first row then has off-diagonal sum \(0.250+0.375=0.625\), so its normalized off-diagonal values are \(0.250/0.625=0.400\) and \(0.375/0.625=0.600\). The second row already has off-diagonal sum \(0.500+0.500=1\), and the third row has sum \(0.375+0.250=0.625\). Therefore
The row sums are one and the diagonal is zero. This is the updated transition matrix for view 1; it is not the raw product.
Excluding the Current View and Normalizing Correctly
The leave-one-view-out average is an essential part of the definition. For \(V=3\), the inputs to view 1’s raw update are \(P_t^{(2)}\) and \(P_t^{(3)}\), with equal weight:
Worked Example: Averaging the Other Views
Suppose three hypothetical views have the following transition entries from patient 1 to patient 2 at iteration \(t\): \(P_{t,12}^{(1)}=0.20\), \(P_{t,12}^{(2)}=0.70\), and \(P_{t,12}^{(3)}=0.40\). The entry supplied to view 1 is the average of views 2 and 3:
The value \(0.20\) from view 1 is not included. Averaging all three entries would give \((0.20+0.70+0.40)/3=0.4333\), which is a different quantity and is not the leave-one-view-out input specified for this update.
The raw matrix may require substantial normalization. For instance, if a raw row has diagonal entry \(0.30\) and off-diagonal entries \(0.18\) and \(0.12\), first replace the diagonal with zero. The remaining row sum is \(0.18+0.12=0.30\), so the normalized off-diagonal entries are \(0.18/0.30=0.60\) and \(0.12/0.30=0.40\). Dividing by the original row sum, which includes the diagonal, would instead produce a row summing to \(0.30/0.60=0.50\), not one.
Worked Example: Why the Order of Operations Matters
Suppose a hypothetical raw row is \((0.30,0.18,0.12)\), where the first component is the self-entry. Removing the diagonal gives \((0,0.18,0.12)\). Its off-diagonal sum is \(0.30\), so the normalized row is \((0,0.18/0.30,0.12/0.30)=(0,0.60,0.40)\). It now describes all of the row’s transition weight as going to other patients. If instead one divided the original row by \(0.60\) before removing the diagonal, the row would be \((0.50,0.30,0.20)\); setting the first component to zero afterward leaves a sum of \(0.50\). A second normalization would still be needed.
Practical Checks, Alternatives, and Limitations
A small set of checks catches many implementation errors. Before the update, verify patient ordering, matrix dimensions, nonnegative entries, and the expected row sums of the input transition matrices. After forming the raw product, check that the entries are finite and nonnegative, then set the diagonal to zero and inspect the off-diagonal row sums. After normalization, every defined row should sum to one within numerical tolerance, and every diagonal entry should be zero.
- Including the current view: this changes the specified leave-one-view-out average and can let a view reinforce its own current network within its update.
- Omitting the transpose: \(S^{(v)}Q_t^{(-v)}S^{(v)}\) is generally not the stated two-sided update. The right-hand factor is \((S^{(v)})^T\).
- Stopping at the raw product: the raw matrix may have nonzero diagonal entries and row sums different from one. It is not yet the updated transition matrix.
- Using misaligned patients: matrix multiplication remains possible, but the result has no intended patient-level meaning if row and column indices differ across views.
A simple alternative is to average the view matrices directly. That produces a consensus matrix, but it does not apply the view-specific two-sided local-affinity operation in the SNF update. Another tempting alteration is a one-sided multiplication, such as \(S^{(v)}Q_t^{(-v)}\); that smooths only one matrix dimension and is not the update defined here. These may be useful constructions for other purposes, but they should not be reported as the SNF diffusion step.
The formula also has practical limits. It presumes at least two views and aligned patients. If, after diagonal removal, a row has zero off-diagonal mass, row normalization would require division by zero; the update is undefined for that row unless a separate handling rule is chosen. Very small off-diagonal sums can also make results sensitive to numerical error. In addition, the step is an algorithmic transformation of similarities: it does not establish that an edge is statistically significant, that a patient relationship is causal, or that every view is equally informative.
Check Your Understanding
Answer each question, then compare with the brief solutions below.
- With four views, which matrices are averaged to form \(Q_t^{(-3)}\)?
- Why can \(S^{(v)}Q_t^{(-v)}(S^{(v)})^T\) fail to have row sums of one even when both input matrices are row-stochastic?
- A raw row is \((0.10,0.30,0.60)\), with the first entry on the diagonal. What is its normalized row after diagonal removal?
- What happens if a row has zero off-diagonal mass after diagonal removal?
Solutions. (1) Average \(P_t^{(1)},P_t^{(2)}\), and \(P_t^{(4)}\), dividing their sum by three. (2) Row sums of the product depend on the column sums of \(S^{(v)}\), which need not equal one when \(S^{(v)}\) is only row-stochastic. (3) Removing the diagonal leaves \((0,0.30,0.60)\), whose off-diagonal sum is \(0.90\); division gives \((0,1/3,2/3)\), approximately \((0,0.333,0.667)\). (4) Normalization would divide by zero, so the row is undefined under this update and needs an explicit handling rule.