Abstract
Cosmological shock waves are essential to understanding the formation of cosmological structures. To study them, scientists run computationally expensive high-resolution 3D hydrodynamic simulations. Interpreting the simulation results is challenging because the resulting data sets are enormous, and the shock wave surfaces are hard to separate and classify due to their complex morphologies and multiple shock fronts intersecting. We introduce a novel pipeline, Virgo, combining physical motivation, scalability, and probabilistic robustness to tackle this unsolved unsupervised classification problem. To this end, we employ kernel principal component analysis with low-rank matrix approximations to denoise data sets of shocked particles and create labeled subsets. We perform supervised classification to recover full data resolution with stochastic variational deep kernel learning. We evaluate on three state-of-the-art data sets with varying complexity and achieve good results. The proposed pipeline runs automatically, has only a few hyperparameters, and performs well on all tested data sets. Our results are promising for large-scale applications, and we highlight now enabled future scientific work.
Introduction
Cosmological structures like galaxy clusters form through the gravitational accretion of matter, a process that triggers massive shock waves in the thin plasma of the intracluster medium (ICM). These shocks are the primary drivers of the ICM's physical properties and act as powerful particle accelerators. However, identifying and classifying these shocks in 3D hydrodynamic simulations is a significant challenge. Simulations generate enormous datasets—sometimes containing up to $10^{10}$ particles—where shock surfaces exhibit intricate, overlapping morphologies that are difficult to separate using simple geometric rules.
Virgo is a novel machine learning pipeline designed to solve this long-standing problem. By combining kernel-based denoising with Stochastic Variational Deep Kernel Learning (SV-DKL), it automatically identifies and classifies complex shock waves within massive simulations, transforming a previously manual and computationally daunting task into an automated, robust process.
The Virgo Pipeline
The authors propose a four-step pipeline that moves from raw, unlabeled data to a fully classified, high-resolution reconstruction:
- Pre-processing: Data is filtered using a conservative velocity threshold (Mach number $M_s \le 15$) and rescaled for position and shock normal vectors.
- Denoising (Kernel PCA + GMM): Raw simulation output is often noisy. The pipeline uses Kernel Principal Component Analysis (KPCA) with a Nyström approximation to map data into a feature space where shocks are distinct. A Gaussian Mixture Model (GMM) then separates dense shock clusters from background noise.
- Subset Labeling (Custom Kernels + FoF): A physically motivated composite kernel accounts for both spatial position and shock orientation. A Friends-of-Friends (FoF) clustering algorithm then automatically labels a subset of the data.
- Supervised Recovery (SV-DKL): To restore the full-resolution dataset, the pipeline trains an SV-DKL classifier. This model combines neural networks for feature learning with Gaussian Processes for probabilistic reliability, allowing it to scale to millions of particles while handling complex density changes.
Datasets and Morphological Complexity
The pipeline was evaluated on three state-of-the-art simulation datasets generated with the OpenGadget3 code: ClustHD (ultra-high-resolution single cluster), ClustMHD (includes magnetic fields, creating "patchy" surfaces), and BoxMHD (a large-scale cosmological volume).
As shown in the cluster simulations, shock surfaces are not simple shells but complex, intersecting sheets. The "Kernel Trick" used in Virgo allows the model to encode physical information like shock orientation directly, making the unsupervised separation of these overlapping structures tractable.
Results and Scalability
Virgo achieved test accuracies between 97% and 98.4% across all tested datasets, significantly outperforming standard k-Nearest Neighbor (k-NN) and fully connected neural network (FC-NN) baselines. Qualitatively, the pipeline successfully restored the complex, "sheet-like" structures of merger and accretion shocks that were previously obscured by noise.
One of the most significant achievements is the pipeline's scalability. By using SV-DKL, which provides $O(n)$ complexity during training, Virgo can process datasets that are typically out of reach for traditional clustering algorithms. The probabilistic nature of the model also provides a "confidence" measure, which is crucial for handling the "fuzzy" edges of shock waves in the ICM.
Conclusion
While the authors note that the initial FoF linking length estimation remains a potential "weakest link" for error propagation, the overall framework represents a major step forward. By providing the source code as the virgo Python package, the authors have equipped the astrophysics community with a scalable tool to study cosmic ray acceleration and the evolution of the cosmic web in unprecedented detail.
Summary updated