Abstract
metasnf is an R package that enables users to apply meta clustering—a method for efficiently searching a broad space of cluster solutions by clustering the solutions themselves—to workflows based on similarity network fusion (SNF). SNF is a multi-modal data integration algorithm commonly used for biomedical subtype discovery. The package also contains functions to assist with cluster visualization, characterization, and validation. This package helps researchers identify SNF-derived cluster solutions guided by context-specific utility rather than context-agnostic measures of quality.
Introduction
In biomedical research, identifying distinct patient subtypes through clustering is a cornerstone of personalized medicine. Similarity Network Fusion (SNF) has emerged as a popular method for this task, as it integrates multi-modal data—such as gene expression, neuroimaging, and clinical scores—into a unified similarity network.
However, the clustering process is fraught with complexity. The combinatorial space of potential partitions is astronomical; for instance, partitioning just 15 individuals into three clusters yields over one million possibilities. Traditional workflows often rely on "context-agnostic" metrics, such as cluster compactness, and typically test only a narrow range of hyperparameters. This approach frequently results in solutions that are mathematically optimal but biologically or clinically irrelevant. Researchers require tools to explore a broader range of solutions and identify those that are both stable and useful for specific clinical contexts.
Methodology: The Meta Clustering Paradigm
The core innovation of metasnf is the implementation of meta clustering, a paradigm originally proposed by Caruana et al. (2006). The workflow follows a structured five-step process:
- Solution Generation: Rather than selecting a single "best" set of parameters, users generate hundreds of distinct cluster solutions by randomly varying hyperparameters (e.g., the number of nearest neighbors $k$ or the scaling factor $\alpha$) and employing "data dropout" (randomly omitting specific data types).
- Similarity Mapping: The package quantifies the similarity between every pair of generated solutions using the Adjusted Rand Index (ARI).
- Meta Clustering: The solutions themselves are then clustered. This step groups qualitatively similar partitions into "meta clusters."
- Representative Selection: For each meta cluster, the package identifies a "representative solution"—the partition most central to its group.
- Visualization and Validation:
metasnfprovides a suite of tools to evaluate results, including Manhattan plots for feature associations, Alluvial plots to track subject movement between clusters, and label propagation to test generalizability on held-out test sets.
Implementation and Performance
The package demonstrates its utility using datasets modeled after the Adolescent Brain Cognitive Development (ABCD) Study. These datasets include neuroimaging (cortical thickness, surface area, subcortical volume), demographics (income, pubertal status), and behavioral target features (anxiety and depression scores) used to evaluate clinical utility.
From a technical standpoint, metasnf is designed for modern research environments:
- Scalability: It integrates with the
futureR ecosystem, enabling seamless parallel processing of hundreds of SNF runs. - Workflow Efficiency: Complex tasks like ARI calculation and multi-modal visualization are condensed into high-level functions such as
batch_snfandmeta_cluster_heatmap. - Computational Performance: Benchmarks indicate that while ARI calculation scales quadratically with the number of solutions, the generation of cluster solutions scales linearly with observations and features, making it viable for biobank-scale datasets.
Discussion and Key Insights
metasnf shifts the focus from mathematical abstraction to practical utility. By leveraging the inherent redundancy in the cluster solution space, meta clustering identifies groupings that persist across various settings, suggesting they represent robust features of the underlying data rather than algorithmic artifacts. Furthermore, the inclusion of Manhattan plots allows researchers to prioritize solutions based on their ability to separate clinically relevant "target" features.
While powerful, the current iteration of metasnf has limitations. Like the original SNF algorithm, it does not natively support incomplete data, requiring prior imputation. Additionally, its signal regression functions are currently optimized for normally distributed continuous features. Future work may involve incorporating automated utility-based selection criteria to further streamline the identification of optimal candidate solutions.
Summary updated