Abstract
Capturing and tracking large-scale brain activity dynamics holds the potential to deepen our understanding of cognition. Previously, tools from Topological Data Analysis, especially Mapper, have been successfully used to mine brain activity dynamics at the highest spatiotemporal resolutions. Even though it is a relatively established tool within the field of Topological Data Analysis, Mapper results are highly impacted by parameter selection. Given that non-invasive human neuroimaging data (e.g., from fMRI) is typically fraught with artifacts and no gold standards exist regarding "true" state transitions, we argue for a thorough examination of Mapper parameter choices to better reveal their impact. Using synthetic data (with known transition structure) and real fMRI data, we explore a variety of parameter choices for each Mapper step, thereby providing guidance and heuristics for the field. We also release our parameter-exploration toolbox, DeMapper, as a software package to make it easier for scientists to investigate and apply Mapper on any dataset.
Introduction
Functional MRI (fMRI) data is high-dimensional, noisy, and lacks a "ground truth" for when the brain transitions between states. Topological Data Analysis (TDA), specifically the Mapper algorithm, has emerged as a powerful method for visualizing these dynamics because it does not require a priori assumptions about the number of brain states. Mapper transforms complex activity into intuitive "shape graphs."
However, Mapper is often treated as a "black box." Small changes in distance metrics, dimensionality reduction techniques, or binning strategies can lead to wildly different graphs. Without a systematic way to choose these parameters, researchers risk over-interpreting artifacts or missing subtle transitions. This study aims to turn "educated guesses" into a rigorous methodology by deconstructing the pipeline and providing evidence-based heuristics.
The Mapper Pipeline
The researchers deconstructed the Mapper algorithm into five distinct steps, evaluating various options for each to determine their impact on the resulting topological graphs.
- Distance Metric: Comparing magnitude (Euclidean), angle (Cosine/Correlation), and geodesic (shortest-path on a k-NN graph) measures.
- Filtering (Lens): Projecting high-dimensional data into a lower-dimensional space (2D/3D).
- Binning: Segmenting the projected space into overlapping regions, defined by Resolution (number of bins) and Gain (overlap).
- Partial Clustering: Grouping data points within bins using algorithms like Single Linkage or DBSCAN.
- Graph Construction: Linking clusters that share data points to create the final "shape graph."
Empirical Evaluation and Key Insights
The study utilized both simulated BOLD signals (with a known circular topology) and real fMRI data from a Continuous Multi-Task Paradigm (CMP) to validate parameter choices.
Geodesic Distances and Dimensionality Reduction
A primary finding was that geodesic distances (calculating distance as "hops" between neighbors) significantly outperformed standard Euclidean distance in capturing state transitions. While geodesic measures are more sensitive to high-frequency noise, they provide much higher "topological resolution" when the signal-to-noise ratio is reasonable.
Regarding filtering, the study compared "Extrinsic" methods like PCA and UMAP against "Intrinsic" approaches. Interestingly, while trendy algorithms like t-SNE and UMAP are popular for visualization, they often failed to preserve global topology. Classical Multidimensional Scaling (CMDS) proved to be the most robust "old reliable" for Mapper applications in neuroimaging.
Resolution, Gain, and Clustering
The researchers found that Resolution and Gain are intrinsically linked; high resolution requires high gain to prevent the graph from "shattering" into disconnected components. Furthermore, the choice of clustering algorithm depends on data quality: Single Linkage worked well for clean simulations, but DBSCAN was superior for handling the inherent noise in real fMRI data.
Conclusion
By identifying optimal parameters, the authors achieved a transition prediction accuracy in real fMRI data with an average delay of only 5.7 seconds—a significant improvement over sub-optimal choices like Correlation distance, which resulted in delays of up to 42 seconds. To support the community, the authors have released the DeMapper toolbox for MATLAB, allowing for automated hyperparameter searches to ensure the stability and reliability of topological brain models.
Summary updated