Fig. 2: HERGAST consistently outperformed other methods in simulation.

a Maximum GPU memory consumption of different GPU-based methods in different data scales. Dashed line indicated the maximum CUDA memory of GPU in our experiments (NVIDIA A100-SXM4-80GB). b Maximum memory consumption of methods based on graph networks that incorporate the DIC strategy alongside statistical model methods at different data scales. Since the last experiment results of each method are out-of-memory and the record cannot be measured, we estimated the approximate required cuda memory and CPU memory based on the memory allocation information obtained during the experiment. Source data are provided as a Source Data file. c An illustration of the simulated spatial transcriptome data. The left panel depicts the ground truth spatial pattern in a setting with 360,000 spots. The right panel demonstrates the increasingly complex spatial pattern as the number of spots increases, exemplified by the indicated area in the left panel. d Performance of spatial clustering of different methods across varying conditions. The x-axis represents the number of spots in the corresponding simulation setting, and y-axis represents the ARI score. We ran 10 independent replications for each setting; the data points represent mean value, and the error bars represent the standard error calculated across these replications. Source data are provided as a Source Data file. e Visualization results of last replication in 640,000 spots’ setting. Visualization results of all settings can be found in Supplementary Figs. 4–9. f Schematic diagram of ground truth in different data scenario. g ARIs of models using different graph types across varying conditions. We ran 10 independent replications for each setting. The bar represents mean value, and the error bars represent the standard error calculated across these replications. Data points of the 10 replications are also overlaid on the plot. Source data are provided as a Source Data file.