Introduction
In high-stakes scientific domains such as high-energy physics and cancer biology, machine learning (ML) models are increasingly deployed as surrogates for computationally expensive simulations. While these "black box" models often achieve high global accuracy, scientific rigor demands a granular understanding of their failure modes. Standard statistical metrics, such as global Mean Squared Error (MSE), frequently mask critical local failures where a model may produce physically impossible results in specific regions of the parameter space.
Topological Data Analysis (TDA) offers a robust framework for identifying these localized features—peaks and valleys in error landscapes. However, traditional TDA tools have historically struggled with scalability, often failing when datasets exceed a few thousand samples. This paper presents a novel, scalable TDA framework capable of processing over 10 million high-dimensional points, enabling interactive exploration of complex error surfaces.
Methodology
The framework achieves scalability through a three-pronged approach focused on streaming algorithms and hardware acceleration:
1. Streaming Neighborhood Graphs
To avoid the memory bottlenecks of storing massive global graphs, the system employs a two-pass streaming algorithm. By utilizing GPU acceleration to compute nearest neighbors and implementing a "pruning" strategy, the framework retains only the most topologically significant connections. This ensures that the graph remains manageable even as the input size grows into the millions.
2. Streaming Extremum Graphs
The framework approximates the Morse complex—a structure that partitions data based on local extrema—using a near-linear union-find approach. This allows for the identification of "error peaks" without requiring the entire dataset to reside in memory simultaneously.
3. Topology-Aware Datacubes
For interactive visualization, data is pre-aggregated into multidimensional histograms (datacubes) based on the identified topological segments. This allows researchers to select a specific error peak in a summary view and instantly visualize the corresponding high-dimensional distribution in scatterplots or parallel coordinates without re-scanning the raw data.
Experimental Results and Performance
The framework was evaluated using two primary scientific datasets: an Inertial Confinement Fusion (ICF) ensemble (10 million samples) from Lawrence Livermore National Laboratory (LLNL) and a Multiscale Cancer Simulation (2 million samples).
Computational Efficiency
The implementation demonstrates significant performance gains through GPU acceleration. For a dataset of 1 million points, the GPU-accelerated graph construction was approximately 70% faster than the CPU baseline. Furthermore, the system successfully processed an 8-million sample validation set in under 3.5 hours, a task previously considered impossible for TDA-based workflows.
Scientific Insights
- Uncovering Hidden Artifacts: In the ICF use case, TDA revealed distinct peaks of high error despite flat global loss curves. By isolating these peaks, researchers discovered a "parabola" pattern in the error of a self-consistency loss, indicating that the model had failed to converge in specific physical regimes.
- Data Validation: The tool identified that certain high-error regions were caused by artifacts in the training data (e.g., non-physical "clouds" in simulated X-ray images) rather than flaws in the neural network architecture.
- Sampling Strategy Evaluation: In cancer research, the framework provided evidence that "farthest-point" sampling strategies effectively covered the latent space with fewer modes and a wider distribution compared to random sampling.
Conclusion
By overcoming the "scaling wall" of traditional TDA, this framework provides scientists with the first scalable tool for peering into the high-dimensional error landscapes of AI models. Future work will focus on further optimizing neighborhood queries through domain partitioning and moving toward "online" TDA to allow real-time steering of scientific simulations during training.
Summary updated