Affinity Network Fusion (ANF)
- ANF is a framework that combines heterogeneous multi-omic data into a unified patient similarity representation to address clustering challenges in complex diseases.
- It constructs per-view affinity networks using locally-scaled Gaussian kernels, fusing them via weighted averaging and random-walk operations for spectral clustering and few-shot classification.
- Empirical results show that ANF offers faster computation, improved clustering accuracy, and enhanced interpretability compared to Similarity Network Fusion in cancer subtype discovery.
Affinity Network Fusion (ANF) is a principled framework for integrating heterogeneous multi-omic data into a unified patient similarity representation. ANF was developed to address the challenges of clustering and subtype discovery in complex diseases such as cancer, where each data modality (e.g., gene expression, miRNA, methylation) provides a distinct and noisy view of the underlying biological heterogeneity. The method constructs per-view affinity networks, fuses these into a single row-stochastic affinity matrix via random-walk-based operations and weighted averaging, and enables both unsupervised spectral clustering and few-shot semi-supervised classification. ANF directly generalizes and improves upon Similarity Network Fusion (SNF), offering faster computation, interpretability, and support for per-view weighting while matching or improving clustering accuracy (Ma et al., 2018, Ma et al., 2017).
1. Mathematical Formulation of ANF
Given omic views over samples, each dataset is represented by a feature matrix for view . ANF maps these heterogeneous inputs into a unified manifold in several steps:
a. Construction of Per-View Affinity Networks
- For each view , compute the pairwise distance matrix with entries (typically Euclidean or correlation distances).
- Define local scaling for each sample :
where is the 0-nearest neighborhood.
- Compute local variance:
1
- Construct the affinity matrix using a locally-scaled Gaussian kernel:
2
- Normalize rows to produce a transition (row-stochastic) matrix:
3
- Apply 4-nearest neighbor truncation with sparsification parameter 5 to yield 6 as follows:
7
Typically, 8.
b. Affinity Network Fusion
- Let 9 be the per-view row-stochastic affinity matrices; choose non-negative weights 0 such that 1.
- The simplest fusion computes
2
- Optionally, perform an 3-step random walk on 4: 5 (6 or 7); 8 degrades clustering structure.
- Alternatively, perform a single cross-view smoothing step:
9
where 0 is the weighted average of all other views.
c. Spectral Clustering
- Construct the (symmetric) graph Laplacian:
1
where 2.
- Solve the relaxed normalized cut problem:
3
The optimal 4 contains the 5 eigenvectors corresponding to the lowest eigenvalues.
- Apply 6-means clustering to rows of 7; the eigengap heuristic determines a suitable 8.
2. Comparison to Similarity Network Fusion (SNF)
ANF generalizes and simplifies the iterative similarity diffusion in SNF [Wang et al., 2014]. While SNF updates each symmetric similarity matrix via multiple cross-diffusions with all other views until convergence (typically requiring 9 iterations) and employs an ad-hoc diagonal fix, ANF achieves comparable or better results with a single (or at most two) random walk or mixing steps, directly operating on row-stochastic transition matrices (Ma et al., 2018, Ma et al., 2017). ANF also supports arbitrary (nonuniform) view weights, eschews repeated iterative updates, and avoids the need for SNF's symmetry-enforcing heuristics. In empirical studies, ANF reduces computational time by at least half compared to one SNF iteration and obviates the need for iterative convergence.
3. Algorithmic Workflow and Computational Considerations
The main steps of ANF are as follows (Ma et al., 2017):
- Feature selection and transformation for each omic view, using differential expression or variance filtering and transformations such as log, PCA, or variance-stabilizing transforms.
- For each view:
- Compute the pairwise distance matrix 0.
- Build a locally-scaled Gaussian affinity 1 and normalize.
- Prune weak edges to obtain a 2-NN sparse transition matrix 3.
- Fuse the per-view networks using weighted averaging and (optionally) one- or two-step random walks.
- Perform spectral clustering on the fused network as described above.
Computational complexity is dominated by pairwise distance calculations (4), sparse matrix multiplications for fusion (5), and Laplacian eigen-decomposition (6 for exact computation, practical for 7).
4. Semi-supervised Extension: Few-shot Learning via ANF
The fusion framework facilitates downstream semi-supervised classification by enabling few-shot neural classification over the fused representation. The concatenated rows of 8 (or the fused 9) for each patient are presented as input to a compact feed-forward network with ReLU activation and softmax output. For patient 0, the network model is:
1
2
3
4
where 5 is the number of clusters/classes. Optimization minimizes the cross-entropy loss over a small, possibly noisy set of labeled examples, often with Adam (learning rate 6, decay 7) for up to 100 epochs. Due to strong structure imparted by the kNN-based network, fewer than 8 of samples suffice to achieve 9 test accuracy in some settings (Ma et al., 2018).
5. Experimental Validation in Cancer Patient Clustering
ANF has been applied to a harmonized GDC/TCGA dataset of 2,193 patients across four primary tumor types (adrenal, lung, kidney, uterus) and nine disease-type subgroups (Ma et al., 2018, Ma et al., 2017). Each patient is characterized by three data views: RNA-seq (FPKM), miRNA counts, and Illumina 450K methylation β-values.
Key results include:
Integrating at least two omic views using ANF consistently outperforms single-view clustering both in NMI and ARI. Eigengap analysis on 0 reliably recovers the correct cluster number. In subtype discovery, ANF split one major subtype (PCPG in adrenal) into two further subgroups, indicating the potential for subtype refinement.
In semi-supervised mode, training on as few as 2–10 clean labels per cancer (i.e., 1 of data) yields test NMI 2 (accuracy 3). Fine-tuning for unrepresented subtypes recovers all classes rapidly.
6. Parameter Selection and Feature Engineering
Performance is modulated by several hyperparameters:
- Neighborhood size 4 (typical 5–6 or 7).
- Kernel weights 8, with the default 9 in some applications.
- Sparsification 0, usually zero.
- Fusion weights 1, either uniform or reflecting per-view clustering quality.
- Mixing parameters for one- or two-step walk (2, 3).
- Extensive use of feature selection (e.g., differential expression by DESeq2) and log/variance-stabilizing transformations is empirically critical for optimal clustering accuracy, with up to 4–5 improvement observed (Ma et al., 2017).
7. Software and Implementation
The ANF method is available as a Bioconductor package (https://bioconductor.org/packages/ANF), with code and detailed results at https://github.com/BeautyOfWeb/Clustering-TCGAFiveCancerTypes. The framework supports direct interfacing with omic data matrices, automated network fusion, spectral graph clustering, and integration into few-shot neural classification pipelines (Ma et al., 2018, Ma et al., 2017). ANF thus constitutes an efficient and interpretable paradigm for multi-view patient stratification, directly supporting advances in precision medicine and integrative genomics.