Manuscript Offprint
arXiv:2610.10959GPU-Accelerated Computation of Persistent Homology for Topological Analysis of Image Data
Fan Wang , Hubert Wagner , Rezaul Chowdhury , and Chao Chen
Abstract—In recent years, persistent homology has seen rapid adoption in deep learning, yet its computation remains a major bottleneck in network training. This paper introduces TopoGPU, a GPU streaming pipeline that computes persistence diagrams of cubical complexes induced by 2D and 3D images. TopoGPU streams the input image chunk by chunk, processing each chunk with massively parallel GPU kernels on a grid of GPU blocks; the resulting boundary relations are accumulated in host memory, where the CPU performs the boundary matrix reduction. TopoGPU introduces a stratification-aware discrete Morse matching that provably preserves persistent homology under streaming, together with a parallel topological sorting algorithm and a parallel V-path parity algorithm for deriving Morse boundaries on the GPU. TopoGPU outperforms Cubical Ripser, a state-of-the-art method for persistent homology computation, on every benchmark evaluated, achieving an average end-to-end speedup of and a maximum of . We further integrate TopoGPU into a topology-preserving deep network, demonstrating that it substantially reduces the cost of persistent homology computation during network training. TopoGPU is open source, with pre-built binaries, Google Colab notebooks, and Docker images available at the project's GitHub page: https://github.com/seravee08/GPU-Computation-of-Persistent-Homology-for-Image-Data.
Index Terms—topological data analysis, topological image analysis, persistent homology, persistence diagram, parallel programming, GPU programming, CUDA programming, Discrete Morse theory, computational topology, digital topology, image data.
I. INTRODUCTION
Topological data analysis (TDA) provides a principled way to capture the shape of data using topological invariants, and its integration with deep learning has given rise to topological deep learning (TDL) [1]. A recent review notes that TDL combines the robustness and noise-invariance of persistent homology with the expressive power of neural networks, using topological information for tasks such as classification, regression, clustering, and anomaly detection [1]. One major line of work uses persistent homology-based descriptors as additional features that encode multiscale connectivity for downstream predictors [2]–[4]. A second line develops topology-preserving losses and regularizers that constrain networks to respect target topology during training [5]–[10]. A third line integrates topological summaries directly into deep models, including architectures that incorporate topological signatures into graph neural networks, transformers, and autoencoders [1].
As a cornerstone of TDA, persistent homology quantifies how topological features such as connected components, loops, and voids appear and disappear across scales and summarizes them as barcodes or persistence diagrams. This evolution of topological features is captured within a series of nested spaces, known as a filtration. Selecting the appropriate filtration depends on the data type: Alpha-shape filtration for 3D point clouds [11], Vietoris–Rips for high-dimensional metric data [12], and cubical filtration for 2D and 3D grayscale images [13], [14]. This work focuses on the computation of persistent homology for 2D and 3D images, a standard representation across scientific and engineering applications. TopoGPU focuses exclusively on cubical complexes induced by 2D and 3D images; it does not target point clouds, Vietoris–Rips complexes, or general simplicial complexes. Such images may originate from (i) acquisition processes (e.g., CT scans in medical imaging), (ii) numerical computations (e.g., scalar fields from physical simulations), and (iii) intermediate outputs of convolutional neural networks, notably likelihood maps.
While alternative topological descriptors such as merge trees [15], contour trees [16], connected components [17], and Euler characteristic curves [18], [19] offer analytical value, they have clear limitations: the first three omit higher-dimensional topology, whereas Euler characteristic curves do not preserve topological features' persistence information. Persistent homology addresses these limitations but introduces significant computational cost. Despite notable advances, persistent homology computation remains a bottleneck during network training; this stands in sharp contrast to modern graphics processing unit (GPU)-optimized deep learning workflows. These workflows keep tensors and computation resident on the device (GPU and its memory) for efficiency. Offloading intermediate tensors (e.g., likelihood maps) to the host (CPU and RAM) for persistent homology computation incurs substantial PCIe transfer and synchronization overhead. This motivates a GPU-based persistent homology pipeline that minimizes host-device transfers and keeps most computations on the GPU.
Our goal with TopoGPU is twofold: (i) to deliver substantial performance gains and an efficient, reliable computational tool for TDA on 2D/3D image data, and (ii) to catalyze
© 2026 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. Accepted for publication in IEEE Transactions on Pattern Analysis and Machine Intelligence, DOI 10.1109/TPAMI.2026.3741473.
Manuscript received January 24, 2026; revised July 19, 2026 and September 11, 2026; accepted October 4, 2026. (Corresponding authors: Fan Wang and Chao Chen.)
F. Wang and R. Chowdhury are with the Department of Computer Science, and C. Chen is with the Department of Biomedical Informatics, Stony Brook University, Stony Brook, NY 11794 USA (e-mail: fanwang1@cs.stonybrook.edu; rezaul@cs.stonybrook.edu; chao.chen.1@stonybrook.edu).
H. Wagner is with the Department of Mathematics, University of Florida, Gainesville, FL 32611 USA (e-mail: hwagner@ufl.edu).
broader adoption of persistent homology within deep learning pipelines. The core novelty of TopoGPU lies in its algorithmic design: a stratification-aware Morse matching with a correctness guarantee under streaming, and parallel algorithms that make Morse boundary derivation feasible on GPUs; the streaming pipeline and GPU implementation realize this design in practice. Our main contributions are as follows.
• We present TopoGPU, a massively parallel GPU algorithm for persistent homology computation of cubical complexes induced by 2D/3D grayscale images. It is faster than Cubical Ripser (CRipser) [20], a state-of-the-art method, on every evaluated benchmark, with average and maximum end-to-end speedups of and .
• We propose stratification-aware discrete Morse matching that preserves the persistent homology of the input under a streaming scheme.
• We propose a parallel topological sorting algorithm for bounded-degree Morse matching graphs that achieves a average and up to speedup over classic Kahn's algorithm.
• We propose a parallel V-path parity algorithm on the Morse matching graphs, running in time linear in the graph size under a parallel model with sufficient thread parallelism. Together with our parallel topological sorting algorithm, it enables efficient derivation of boundary relations of the Morse complex.
• We integrate TopoGPU into a topology-preserving deep learning framework, demonstrating that persistent homology computation is no longer the dominant cost during network training.
Cubical complex construction from an image. This work focuses on grid-structured data, specifically 2D and 3D images. Consider a 3D image of dimensions represented by the function , where is a rectangular subset within spanning a discrete lattice with ranges , , and along the -, -, and -axes, respectively. While spatial coordinates in correspond to pixels in 2D and voxels in 3D, we adopt the term voxel throughout this work for consistency.
Building on this discrete lattice, we model the image domain as a cubical complex. Following the formalism of [13], we classify intervals within as either degenerate or regular , where . A p-dimensional cubical cell, or simply p-cell, within a d-dimensional space is formed by the product of d such intervals, of which p are regular. The dimension of a p-cell is denoted . A cubical complex is the collection of all p-cells generated from the lattice , with in 2D and in 3D.
A cubical complex can be constructed from an image in two ways: the T-construction which maps voxels to top-dimensional cells, and the V-construction which maps voxels to 0-cells (vertices) [18], [21], [22]. These two constructions are dual and convey identical topological information. This work adopts the T-construction, wherein 0-cells are vertices, 1-cells are edges, 2-cells are squares (equivalent to pixels in 2D), and 3-cells are cubes (equivalent to voxels in 3D). In a cubical complex K, a p-cell is a face of a q-cell if ; it is a proper face if, in addition, , denoted . Conversely, we call a (proper) coface of .
In the T-construction in a d-dimensional space, each top-dimensional cell inherits its value from the corresponding input voxel. These values propagate downward to lower-dimensional faces, where each cell adopts the minimum value among its top-dimensional cofaces, formalized as . We adapt the term “lower star” of a top-dimensional cell to denote the set of all cells for which is a minimal-valued coface, defined as:
We informally refer to these cells as being introduced by . The lower stars of all voxels form a disjoint partition of . In practical settings where voxels share identical values, a cell may have multiple top-dimensional cofaces sharing the same minimum value, creating a tie regarding which coface introduces . To resolve such ties, we impose a lexicographical ordering on the 3D grid with dimensions , defined by the indexing function:
This corresponds to the row-major memory layout standard in C/C++. The ordering serves as a tie-breaker by selecting the coface with minimal -value in case of a tie. Figure 1b visualizes the resulting cubical complex derived from Figure 1a, where cells within the same lower star are identically colored.
Persistent homology. In algebraic topology, homology groups capture basic topological structures of a space [12]. For a 3D cubical complex, the homology group in dimension 0 ( ) counts connected components, the homology group in dimension 1 ( ) detects loops, and the homology group in dimension 2 ( ) detects enclosed voids. This is illustrated in Figure 1e (x-axis, from left to right: , ). The count of topological structures within each dimension is quantified by the Betti number, defined as the rank of the homology group. In this study, we work with homology and persistent homology with coefficients. Formal definitions of chains, cycles, boundary operators, and homology groups are omitted; see [23], [24] for details.
A subcomplex of at threshold , denoted , consists of all cells with values . For , is empty. As increases, for all we have , forming a nested sequence of subcomplexes. Eventually, when is at least , the entire complex is included: . This nested family of subcomplexes forms a filtration. Persistent homology [12] studies the evolution of topological features across this filtration.
Specifically, adding a p-cell to a subcomplex either creates a new p-dimensional topological structure or kills a
-dimensional one [12]. Persistent homology records the birth of a topological structure at threshold when it first appears in the filtration and its death at threshold when it merges with an older structure or becomes a boundary; the pair is called a persistence pair. The collection of all such pairs forms a persistence diagram, a multiset of points with ; the persistence of a feature is . Figure 1e illustrates a persistence diagram where a loop is born at 10 and filled at 12, yielding the pair with persistence 2.
Discrete Morse theory. Introduced by Forman [25] in the 1990s, discrete Morse theory is a combinatorial adaptation of Morse theory [26] to real-valued functions defined on cell complexes.
A discrete Morse matching on a filtered cubical complex computes a collection of disjoint pairs of cells , where each cell appears in at most one pair. Specifically, a p-cell is matched to a -dimensional proper face of , with matchings constrained to cells within the same lower star. This matching process induces a directed acyclic graph (DAG) called the matching graph or, equivalently, the gradient vector field.
Figures 1b and 1c depict the graphs before and after discrete Morse matching, where each node corresponds to a cell in the cubical complex K. Prior to matching, solid arrows point from each cell to its proper faces. Upon matching, these arrow directions invert: dashed arrows now point from cells to their proper cofaces. Unpaired cells are called critical cells. Critical cells are highlighted in red in Figures 1c and 1d. A V-path is defined as a path in the matching graph that begins at a p-cell, alternates between p- and -cells, and ends at a -cell.
A discrete Morse complex induced by a matching is generated by its critical cells. When working with coefficients (binary arithmetic modulo 2), boundary computations reduce to parity checks: a critical -cell lies in the boundary of a critical p-cell if and only if there is an odd number of V-paths from to . In Figure 1c, red arrows highlight a single V-path from a critical 2-cell to a critical 1-cell, so the 1-cell lies in the boundary of the 2-cell.
These boundary relations are encoded in a filtered boundary matrix with entries iff a -dimensional critical cell lies in the boundary of a -dimensional critical cell . The discrete Morse complex inherits filtration values from its underlying critical cubical cells. After ordering 's rows and columns by their cell filtration values, persistent homology is computed from boundary matrix reduction via Gaussian elimination over [12], [27].
For a cubical complex K with n cells, its boundary matrix is an binary matrix with iff -cell is a face of p-cell . Crucially, the boundary matrix of the Morse complex is typically much smaller than that of the cubical complex. This reduction in matrix size offers significant computational savings while yielding homology groups isomorphic to those of K, thereby preserving topological equivalence.
III. RELATED WORK
In this section, we review related work on persistent homology and discrete Morse complex for image data. Verri et al. [28] pioneered the application of algebraic topology to image data via size functions. Mischaikow and Mrozek [29] broadened the scope by employing the Conley index to analyze dynamics in nonlinear systems; this framework later enabled Morse-theoretic computational methods [13].
The early 2010s witnessed significant advances in topological analysis of image data. Bendich et al. [30] proposed an efficient approximation scheme for persistent homology computation on 3D image data. Wagner et al. [14] developed an efficient boundary matrix generation framework for exact persistence computation on image data of arbitrary dimensions. This approach was later implemented in GUDHI [31] and DIPHA [32]. Despite these advances, boundary matrix construction remains a computational bottleneck, necessitating further optimization.
Lewiner et al. [33] introduced an algorithm to build a discrete Morse function on a mesh that minimizes the number of critical cells, yielding a Morse complex for downstream homology computation. Using discrete Morse theory, Robins et al. [21] marked a breakthrough in computing topological descriptors for image data: they constructed a Morse complex that preserves the persistent homology of the original image while being substantially smaller than the cubical complex used in persistence computations. Günther et al. [34] introduced a memory-efficient storage of Morse matchings that accommodates large volumes, but it remains fast primarily on relatively simple data and comes at the cost of notably increased implementation complexity. TopoGPU can handle large datasets using a streaming scheme that keeps only one chunk in device memory at a time, and it can process arbitrarily large inputs provided the resulting boundary matrix fits in host memory.
Mischaikow and Nanda [35] extended the framework of Robins et al. [21] beyond cubical complexes and introduced the Perseus software for persistence computation across diverse data types. Their approach prioritized flexibility and broad applicability, with a trade-off in computational efficiency. Additionally, they introduced the first streaming precomputation approach, where individual level sets are stored, simplified independently, and subsequently merged, contrasting with our spatial volume decomposition strategy.
Wagner proposed Cubicle [36], an efficient variant of [21] that divides large image data into slices and uses streaming preprocessing to enable scalable CPU processing. We adopt a more aggressive, hierarchical data partitioning strategy: the input is divided into chunks that are further subdivided into GPU blocks, enabling per-voxel processing with dedicated GPU threads. Both approaches can be viewed in terms of a stratified version of discrete Morse theory developed by Knudson and Wang [37], and the version for open complexes [38] developed by Knudson and Scoville.
Beyond persistence computation, discrete Morse theory has enabled visualization-oriented simplifications; for example, Gyulassy et al. [39] processed billion-voxel volumes on

(a) Input image
(b) Filtered cubical complex
(c) Matching graph
(d) Stratification-aware matching
(e) Persistence diagram
Fig. 1. (a) Input image; (b) Filtered cubical complex of (a) with solid arrows initially pointing from cells to their proper faces; (c) Matching graph of (b), with dashed arrows indicating Morse matchings, critical cells in red, and red arrows indicating a V-path; (d) Stratification-aware Morse matching after splitting (a) into two blocks, with border region shaded; (e) Persistence diagram encoding boundary relations with a persistence pair (10, 12).
standard hardware within one day. However, the resulting simplified complexes cannot be used to compute persistent homology of the original data [40].
Bauer's Ripser [41], initially designed for Vietoris–Rips complexes on point cloud data, was extended to process image data via CRipser [20], a CPU implementation that serves as our primary baseline. Another popular open-source platform, the Topology ToolKit (TTK) [42], provides a comprehensive suite of CPU-based topological analysis and visualization algorithms widely used in scientific workflows, whereas TopoGPU focuses on GPU-accelerated persistent homology computation for image data. pytorch-topological [43] is a PyTorch-based library for topological machine learning that computes persistent homology of various filtrations, including cubical complexes via a GUDHI backend, and provides differentiable topological layers and losses for deep learning. TopoGPU is distinguished from these packages by its computational model: GUDHI, DIPHA, and CRipser are CPU-based and non-streaming, while Cubicle streams on the CPU but offers no GPU parallelism and no floating-point support. In contrast, TopoGPU is the first to carry the entire precomputation, from cubical complex construction through Morse boundary derivation, on the GPU under a streaming scheme, leaving only the boundary matrix reduction on the CPU.
As modern GPUs have become more powerful, there has been growing interest in developing fast, memory-efficient parallel workflows for large-scale topological analysis. Zhang et al. [44] introduced Ripser++, a GPU-accelerated algorithm optimizing Vietoris-Rips computations. Wang et al. [19] exploited GPU parallelism to compute cubical complexes and Euler characteristic curves on image data. gMSC [45] mitigated the path counting bottleneck in Morse-Smale complex computation via a GPU algorithm converting graph traversals into concurrently executable tasks. In this work, we tackle the path counting challenge with a parallel topological sorting method coupled with a parallel V-path parity computation algorithm. Recently, CuMPerLay [46] introduced a CUDA implementation of cubical persistence for 2D images as a differentiable layer, computing 0D and 1D persistence via union-find, with the latter obtained through Alexander duality. This 2D-specific reduction does not extend to 3D volumes, which TopoGPU targets across all homology dimensions.
IV. Our Algorithms
GPU-based persistent homology computation is constrained by per-block resource limits and the overhead of inter-block coordination. A GPU block, hereafter simply referred to as a block, is a cooperative group of threads that can synchronize and share on-chip memory. On the NVIDIA RTX 4080 used in our experiments, the per-block limits are up to 1,024 threads, 99 KB shared memory, and 64 K 32-bit registers. This limits the efficiency of single-block computation, while multiple blocks introduce expensive communication overhead. Additionally, modern datasets often exceed the memory capacity of a single GPU or CPU.
Together, these constraints motivate a GPU algorithm capable of (1) decomposing the computational task into independent subtasks executable per GPU block, (2) eliminating communication dependencies across GPU blocks, and (3) streaming the input and aggregating results from partial outputs. Robins et al.'s ProcessLowerStars [21] addresses (1) and (2): it computes a matching graph independently within each voxel's lower star. This yields a computation pattern that maps naturally to GPU frameworks: one thread per voxel computes its local matching in parallel, with no dependencies across blocks. Wagner [36] addresses (3) by partitioning the input data into chunks and aggregating each chunk's partial results into a global boundary matrix.
Building on these ideas, we present a massively parallel GPU streaming algorithm for persistent homology on 2D/3D grayscale image data that outputs persistence diagrams. The input image is streamed and processed chunk by chunk, and the computation proceeds through the following stages:
• Preprocessing (Section IV-A). A chunk is extracted from the input image and padded with collars. We launch a grid of non-overlapping GPU blocks to cover the chunk, excluding the collars. These blocks compute Morse matchings and discrete Morse boundaries independently and in parallel.
Once all blocks in a chunk complete, the next chunk is loaded and processed similarly.
• Morse matching computation (Section IV-B). For each block, we construct its matching graph in two steps:
– Cubical complex construction (Section IV-B1). We first construct a filtered cubical complex. The filtered cubical complex corresponding to the input in Figure 1a is shown in Figure 1b.
– Stratification-aware Morse matching (Section IV-B2). Subsequently, following [21], we compute a discrete Morse matching to obtain a matching graph. To ensure correct persistent homology computation in our streaming setting, we introduce a stratification-aware Morse matching that explicitly handles matchings at block borders (Figure 1d). This approach introduces additional critical cells compared to the matching performed on the entire cubical complex (Figure 1c), which yields the optimal number of three critical cells. However, these extra critical cells are subsequently used to stitch the results of per-block local computations.
• Discrete Morse boundary computation (Section IV-C). With the matching graph constructed for each block, we derive the boundary relations of the resulting Morse complex by counting V-paths between critical cells. While explicitly enumerating all V-paths can be exponential in the graph size, over the boundary relations depend only on the parity (odd/even) of the number of such paths, reducing the problem from exponential-time path enumeration to a linear-time parity computation. We realize this boundary derivation on the GPU via two algorithms:
– Parallel topological sorting (Section IV-C1). We first compute a topological order of the matching graph to provide the linear order required for boundary derivation.
– Parallel path parity computation (Section IV-C2). We then traverse that order with a parallel path parity algorithm that tracks cumulative path parities between critical cells, thereby deriving the boundary relations of the Morse complex.
Figure 1c illustrates a V-path from a critical 2-cell (value 12) to a critical 1-cell (value 10), indicating that the 1-cell lies in the boundary of the 2-cell.
• Boundary matrix reduction on CPU (Section IV-D). After blocks across all chunks have been processed and the complete set of boundary relations has been finalized in host memory, critical cells are first sorted by filtration value, after which the boundary matrix is constructed and reduced to compute persistent homology. The persistence pair induced by the boundary relation in Figure 1c appears in the persistence diagram in Figure 1e.
A. Preprocessing
The input image is partitioned as follows: 2D images along the y-axis; 3D images along both y- and z-axes (see Figure 2a). A 3D image of size is cut times along y-axis and times along z-axis, yielding chunks of size . This layout respects C++ row-major storage and maximizes contiguous memory access within each chunk.
Each chunk is padded with a two-voxel-wide collar drawn from adjacent chunks: 2D chunks of dimensions become , and 3D chunks of dimensions become . Collar values are sourced from adjacent chunks when available, or set to if no adjacent chunk exists. No padding is applied along the x-axis, as data is not partitioned in this direction. Each padded chunk is loaded with the C++ Thread Pool Library (CTPL) using parallel CPU threads and stored in a single device buffer. Figure 2b shows a padded 3D chunk. The role of collars is discussed in Section IV-B2.
B. Morse Matching Computation
- Cubical complex construction: Each GPU block is a group of threads organized in a 2D/3D structure mirroring the spatial layout of pixels/voxels in the input data. This alignment ensures each voxel is assigned exactly one GPU thread, establishing a one-to-one correspondence between threads and data elements (see Figures 2b-c for a 3D example).
Each GPU thread processes its voxel by (i) identifying its lower star (Equation 1) and (ii) computing the matching graph for the derived lower star. During lower star determination, each thread accesses a neighboring voxel by adding a fixed offset to its own coordinate and reading the corresponding buffer entry via Equation 2. Since the lower stars of all voxels form a disjoint partition of the cubical complex, GPU threads execute independently in parallel. Cells in a lower star inherit their filtration value from the corresponding introducing voxel. Therefore, we do not explicitly store filtration values for the cubical complex; instead, they are determined on the fly from introducing voxels during Morse matching computation. After the matching graphs for all blocks in the current chunk have been constructed, the device buffer storing the chunk values is reused to load subsequent chunks.
- Stratification-Aware Morse Matching: In [36], the input cubical complex is partitioned along a single dimension, yielding a decomposition into two types of strata: interior strata and border strata, where each border stratum is a codimension-1 cubical complex. We adopt a more general data partitioning scheme and therefore require a more refined stratification. Let K be the D-dimensional cubical complex of a block of voxels. We distinguish strata, indexed by dimension . For each d, we define the d-dimensional stratum as the collection of all cells that belong to the cubical subcomplexes of exactly blocks.
The stratum of dimension is called the interior stratum, and the strata of dimensions are collectively referred to as border strata. While the strata form a disjoint decomposition of , an individual -dimensional stratum is generally not a cubical complex. We define the -dimensional border complex as the union of all -dimensional strata with . Each -dimensional border complex is a cubical subcomplex of , being closed under taking faces.
Consider the green 3D block in Figure 2b and its front 2-dimensional border complex in Figure 2c. The 0-dimensional border strata consist of the 0-cells shared by the cubical complexes of eight blocks (red cells); the 1-dimensional border

(a)
(b)
(c)
Fig. 2. (a) A 3D input partitioned into chunks; (b) collar-padded chunk tiled by a grid of non-overlapping GPU blocks, with one GPU thread per voxel; (c) front 2-dimensional border complex of the green GPU block in (b), surrounded by 26 neighboring blocks.
strata consist of the 0- and 1-cells shared by the cubical complexes of four blocks (blue cells); and the 2-dimensional border strata consist of the 0-, 1-, and 2-cells shared by the cubical complexes of two blocks (yellow cells).
A border-crossing path is an alternating path that contains cells belonging to two or more interior strata. Stratification-aware Morse matching prevents such paths by introducing auxiliary cells, a subset of which are critical, thereby enabling correct aggregation of local results within the streaming framework. Recall that each chunk is covered by a grid of non-overlapping GPU blocks (Figure 2b). Since preventing alternating paths from crossing blocks also prevents them from crossing chunks, we focus on border-crossing paths across GPU blocks. Despite additional auxiliary critical cells, the resulting boundary matrix remains considerably smaller than that of the original complex.
We now introduce stratification-aware Morse matching. For a filtered cubical complex decomposed into GPU blocks, discrete Morse matchings are computed independently within each block's interior stratum and within its border strata of each dimension. Matchings are computed among cells that lie in the same lower star and the same stratum, following ProcessLowerStars [21]. The union of these matchings forms the global matching, and the corresponding filtered discrete Morse complex is called the global discrete Morse complex. Any cell that remains unpaired after this process is critical. In particular, cells in 0-dimensional border strata are always critical as there are no cells available for pairing within the same stratum.
Under stratification-aware Morse matching, once a V-path reaches a border complex, it cannot leave; moreover, within a border complex, V-paths can only remain in the same-dimensional border stratum or move to lower-dimensional border strata. Accordingly, we restate Lemma 1 of [36] as follows:
Lemma 1 (Border Blocking Lemma). Let be the global matching computed on a filtered cubical complex decomposed into blocks, and let be any border complex in this decomposition. Consider any directed path in . If for some , then for all .
Proof. We show that if then ; the claim then follows by induction from . In the global matching graph , the vertex has two kinds of outgoing edges: (i) an edge to a proper face of , which lies in since is a cubical complex; and (ii) a flipped edge to the proper coface with which is matched, which also lies in because stratification-aware matchings pair only cells within the same stratum. In either case , and by induction for all .
Since matchings within each stratum are acyclic by construction and Lemma 1 forbids any cycle spanning multiple strata, the global matching is acyclic and hence a valid discrete Morse matching on the entire complex, reducing correctness to the non-partitioned case [36]:
Corollary 1 (Global Correctness). The global discrete Morse complex encodes the same persistent homology up to zero-persistence pairs.
For example, the V-path indicated by the red arrows in Figure 1c becomes a border-crossing path from Block A to Block B after the input is divided into two blocks. Stratification-aware Morse matching inserts auxiliary critical cells and splits this path into three paths: one from cell 12 to in Block A, and two from cell 11 to and respectively in Block B (Figure 1d). Thus, lies in the boundaries of cells 12 and 11, while is in the boundary of cell 11. During boundary matrix reduction, adding the column of cell 11 to that of cell 12 cancels and introduces into the boundary of 12, preserving the original persistence pair (10, 12). The introduced auxiliary critical cells contribute only zero-persistence pairs.
Since matchings are restricted to cells in the same stratum and the same lower star, cells within a given stratum may be processed in lower stars associated with different blocks. Consider the shaded 1-dimensional border complex in Figure 1d. is introduced by cell 11 and processed in Block B, whereas is introduced by cell 9 and processed in Block A. This poses no issues when Blocks A and B lie within the same chunk, since all blocks in a chunk collectively operate on a shared matching graph and have access to the matching graph for the entire chunk.
The situation differs when Blocks A and B belong to different chunks: 's matchings are computed in Block A and are missing from Block B's chunk, while 's matchings are computed in Block B and are missing from Block A's chunk, causing the matching graphs of the two adjacent chunks to disagree on the border strata. To address this, we extend the chunk containing Block A with a two-voxel-wide collar into the neighboring chunk containing Block B, so that Block A can compute 's matchings locally within its chunk. The same mechanism applies symmetrically to the chunk containing Block B. These collars ensure that the matching graphs of adjacent chunks induce consistent matchings on border complexes. By [21], determining the lower star of a voxel requires its 8-connected neighbors in 2D, or 26-connected neighbors in 3D; resolving a border cell's containing lower star thus reaches one voxel across the chunk border to the introducing voxel and one voxel beyond it, so a collar width of two is the minimum required. Accordingly, each chunk is padded with a two-voxel-wide collar on both sides of every cutting direction.
We do not launch additional blocks or threads to process the collar voxels. Instead, we repurpose the interior threads nearest the chunk border to process them once they finish their own, following the same stratification-aware Morse matching procedure. Since these threads already reside next to the border, the collar values they require are fixed-offset neighbors read directly from the device buffer.
The Morse matching computation outputs a graph , along with the list of critical cells C and their filtration values, where V is the set of cell indices of the filtered cubical complex and E is the set of directed edges of the matching graph. We store G in a cube-map format [14], whose entries index the cells in V and encode the incident edges in E; cell indices are computed on the fly from cell coordinates in this grid. The cube-map format is a regular grid-like layout that stores one entry for every vertex, edge, face, and voxel of the cubical complex induced by the input grid. For a 3D chunk of size , the cube-map is an array of size , where the cell dimension of an entry with index is given by . Figure 1b illustrates the cube-map format induced by the 2D input in Figure 1a. Each entry in E occupies 12 bits, partitioned into six consecutive 2-bit segments representing front, back, left, right, top, and bottom directions. Each segment encodes one of three matching states: incoming edge, outgoing edge, or disconnected (used in GPU topological sorting).
C. Discrete Morse Boundary Computation
The discrete Morse boundary of a critical cell consists of all critical cells connected to by an odd number of V-paths in the matching graph. This is a special case of Forman's discrete Morse boundary operator [26] under coefficients. A direct computation of this boundary is prohibitive as the number of V-paths may grow exponentially with the size of the cubical complex, making exhaustive enumeration infeasible [35].
Exploiting the directed acyclic graph (DAG) structure of matching graphs, Dłotko and Wagner introduced a sequential method [47] that computes Morse boundaries through two stages: (i) topological sorting of the graph, followed by (ii) V-path counting between critical cells along the topological order. However, both stages are inherently sequential and pose significant challenges for GPU parallelization. To tackle this, we introduce a parallel topological sorting algorithm and a parallel V-path parity computation algorithm.
- Parallel Topological Sorting: Topological sorting of a DAG seeks a linear ordering of its vertices such that for every directed edge , vertex precedes in the ordering. This ordering can be visualized as arranging the vertices along a line so that all edges point from left to right. Every DAG admits at least one such ordering [48], [49]. Topological sorting has broad applications, including dependency resolution and task scheduling.
Kahn’s classic topological sorting algorithm [48] iteratively removes zero-in-degree vertices. Ma et al. introduced a parallel variant based on computing the graph’s transitive closure [50], and Er proposed a parallelization strategy that propagates node values from sources to sinks [51]. Saxena et al. devised a hybrid scheme that traces leaf-to-junction paths on GPUs and junction-to-junction paths on CPUs, whose parallel efficiency degrades rapidly as the number of branching nodes increases [52]. Svantesson and Eklund’s GPU adaptation of Kahn’s algorithm is likewise constrained by the number of zero-in-degree nodes [53]. These approaches fail to harness modern GPUs’ massively parallel capabilities because per-iteration parallelism is bounded by the zero-in-degree frontier and the iteration count is at least the DAG height; in the worst-case of a long, narrow DAG, only one vertex is eligible per iteration, collapsing GPU occupancy while synchronization and memory traffic dominate.
We introduce a parallel topological sorting algorithm (Algorithm 1) that assigns one GPU thread per vertex. Each thread iteratively performs three steps: Step I identifies the predecessor of its assigned vertex via local dependency analysis, Step II traces backward from that vertex to a source vertex, and Step III assigns topological orders using a histogram-based parallel prefix-sum. As orders are committed, edges are removed, and iterations continue until all vertices are ordered. In this paper, we restrict our discussion to matching graphs (DAGs) derived from Morse matching on 2D/3D image data, where vertices have degree four in 2D (up, left, right, down) and degree six in 3D (adding forward and backward).
Step I: Predecessor identification. For a vertex v, we identify its predecessor within its 8-connectivity (2D) or 26-connectivity (3D) neighborhood such that, once u is placed in the topological order, all dependencies of v are satisfied and so v need only appear after u. is identified by examining v's in-degree and its local dependency configuration:
-
(Figure 3a): v has no dependencies and is therefore a source vertex with .
-
(Figure 3b): v has a single dependency from , so .
-
with identifiable predecessor (Figure 3c): in the lower half of the graph, v depends on and with ; in the upper half, v depends on and

(a) ,

(b) ,

(c) ,

(d) ,

(e) ,
Fig. 3. Examples of 2D local-dependency configurations for vertex v within its 8-connected neighborhood; for clarity, only the right half is shown.
Algorithm 1: Parallel Topological Sorting
Input: A DAG with bounded degree Output: Topological index for each
1 Initialize , for all
2 Initialize , for all
3 Initialize hist as an empty hop count histogram
4 Initialize as the set of unordered vertices
5 Initialize as the set of remaining edges
6 Initialize offset
7 while do
8 // Step I: Predecessor identification parallel for each with do
9 \left\lfloor Identify 's predecessor in
// Step II: Tracing to a source vertex repeat
10 parallel for each with do
11
12
13
14 until all have reached a source or NIL parallel for each with do
15 \left\lfloor Atomically increment
16
17 // Step III: Topological order assignment Compute parallel prefix-sum over hist offset' offset offset offset + hist[last nonempty bin] parallel for each with do
18 \left\lfloor Atomically set
24
with . Since transitively precedes and , satisfying satisfies all 's dependencies, hence .
- without identifiable predecessor: when 's dependencies lack transitive relationships (e.g., 's dependencies from and in Figure 3d) or their relation is undetermined (e.g., 's dependencies from and in Figure 3e), the predecessor of cannot be identified, and .
Step II: Tracing to a source vertex. After identifying the predecessor for vertex v, we trace recursively from v through until reaching either a source vertex or a vertex without identifiable predecessor . We record in the furthest vertex reached in a trace, track in the hop count from v to , and maintain a per-iteration histogram hist whose k-th bin counts vertices with . In parallel programming, concurrent updates to shared data by multiple threads can cause data races. We prevent these by using atomic operations, which ensure exclusive, uninterrupted access to data by one thread at a time.
-
Tracing success: If the trace from v reaches a source vertex, v is a traceable vertex; we remove all its outgoing edges from the remaining edge set and atomically increment for hop count .
-
Tracing failure: If the trace stops at a vertex with , stores the furthest vertex reached in this trace and records the hop count from v to . In later iterations, tracing for v resumes from , preventing redundant retracing from v.
Figure 4 illustrates Algorithm 1 with Step III omitted for clarity. Each vertex of the input DAG G is handled by a dedicated GPU thread, which independently identifies the vertex's predecessor in Step I and removes its outgoing edges in Step II provided the vertex is traceable. As edges are iteratively removed, remaining vertices' in-degrees decrease, so vertices with previously unidentifiable predecessors or untraceable paths become processable in subsequent iterations, until no edges remain and all vertices are ordered.
Step III: Topological order assignment. The inclusive prefix-sum (also known as prefix-scan) transforms an array A into an array B of identical length, where each element aggregates the subarray . We adopt the efficient CUDA implementation by Harris et al. [54] for parallel prefix-sum computation.
A subset of vertices in a DAG forms a chain if every pair of vertices is comparable: for any u, v in the subset, there exists a directed path either from u to v or from v to u. Any valid topological order must preserve the sequence of each chain,

Fig. 4. Illustration of Algorithm 1 for parallel topological sorting. Step I: identify predecessors. Step II: trace from green vertices (those with identified predecessors) backward along red arrows ( ) to red vertices (source vertices), deleting the outgoing edges of each traceable vertex; for clarity, traceable vertices are also removed from the illustration.
though chains need not occupy contiguous positions.
Each trace through the predecessor function to a source vertex forms such a chain where if precedes in the chain, must precede in the topological order. We preserve chain sequences by arranging vertices in increasing order of their hop count from their respective source vertices, with vertices sharing identical hop count ordered arbitrarily. This is achieved via inclusive prefix-sum over the per-iteration hop count histogram , where topological indices for vertices with hop count occupy the range for , or for . The global topological order is constructed by appending the vertices ordered in the current iteration to those ordered in prior iterations.
Complexity analysis. Let be a DAG and let . Since is induced by Morse matchings on 2D/3D image data, every vertex has bounded degree: four in 2D and six in 3D. Hence, Step I performs only local checks in parallel time per iteration.
Let be the number of iterations and be the maximum predecessor-tracing depth among all threads in iteration . In Step II, synchronized pointer jumping traces a predecessor chain of depth in parallel rounds. The parallel prefix-sum in Step III has the same asymptotic cost. Since Step I performs constant-time local checks, every iteration costs even when . Therefore, iteration takes , and the total parallel time is
This bound assumes sufficient thread parallelism and counts synchronization and atomic updates in the standard parallel-time model.
Now let denote the number of vertices ordered in iteration (the hist[last nonempty bin] value in Algorithm 1). Any successful trace of depth contains vertices, so . Since for , the cost of iteration is . As , we get the general upper bound . The corresponding general lower bound is , since any nonempty input requires at least one parallel step.
The complexity, however, depends on how the number of iterations and the maximum predecessor-tracing depth trade off, illustrated by three representative regimes in Figure 5.
• Large trace depth. Figure 5a shows a DAG with a single source vertex at the top-left corner, where all vertices trace back to the same source in one iteration. The maximum trace depth is , giving .
• Constant depth. Figure 5b shows a DAG constructed via bipartite orientation: partition vertices into sets and , with all edges directed from A to B. Every vertex is either an immediate source or becomes one after one iteration, so with , giving .
• Large iteration. Figure 5c shows a square DAG with a single source vertex at the top-left corner with edge oriented along increasing Manhattan distance from the source (i.e., edges point away from the source). In each iteration, the algorithm removes one boundary layer of the remaining square, so . In iteration t, the longest trace has depth . Therefore, .
These cases show that the running time is governed by the trade-off between and : large can still be efficient when the iteration count is small, while small may still be costly when many iterations are required.
Algorithm 1 decomposes sequential topological sorting into independent per-vertex tasks executed in parallel. GPU threads operate concurrently within each step, with synchronization via threads barrier after each step.
- Parallel Path Parity Computation: Dlotko and Wagner's Algorithm 4 [47] computes Morse boundaries by propagating V-path counts from each critical cell u to downstream cells in topological order, adding a critical cell v to u's boundary if an odd number of paths exist from u to v. For a matching graph , this approach exhibits a worst-case time complexity of , where c is the number of critical cells. We reduce path counting to path parity computation and present a parallel algorithm traversing in topological order to track cumulative path parities between

(a) Large trace depth

(b) Constant depth

(c) Large iteration
Fig. 5. DAG configurations illustrating three representative regimes for parallel topological sorting: large trace depth, constant depth, and large iteration count; legend as in Figure 4.
critical cells.
We maintain an array of length indexed by the topological order ; each entry is itself a subarray of 32-bit words, , one word per GPU thread, where is the number of GPU threads. This allows the system to concurrently track up to critical cells associated with . Each thread is assigned a batch of at most 32 critical cells drawn from the critical cell list , and the -th bit of stores the cumulative path parity from the -th cell of to . Encoding each path parity as one bit allows a single word access by a thread to update parities for 32 cell pairs simultaneously. Processing follows topological order , with each thread executing:
where denotes bitwise XOR. A critical cell lies in the boundary of a critical cell (i.e., ) iff the path parity from to is odd. See Algorithm 2 for details.
Assuming , this algorithm demonstrates a time complexity of . With threads per GPU block and a 1024-thread block covering at most 12,825 cubical complex cells (CUDA Programming Guide [55]), we have ; hence the condition holds in practice.
GPU global memory coalescing is a technique that combines memory accesses from a warp (32 GPU threads executing the same instruction simultaneously) into a single transaction to maximize data throughput when threads in a warp access contiguous, aligned memory addresses. We choose T as a multiple of 32 so each warp operates on a contiguous block of thirty-two 32-bit words, yielding fully coalesced reads and writes.
D. Boundary Matrix Reduction on CPU
After all chunks have been processed, the complete set of boundary relations is finalized in the host's RAM, thereby avoiding GPU memory capacity limits.
Critical cells are sorted in non-decreasing order by their filtration values using the CUDA Thrust library. Boundary relations are encoded in a binary boundary matrix over , with columns corresponding to critical cells (ordered by filtration values) and rows indicating their boundary relations. The size of the boundary matrix is quantified as the number of ones in the matrix. We apply the “twist” algorithm [56] implemented in the Persistent Homology Algorithm Toolbox
Algorithm 2: Parallel Path Parity Computation
Input: A DAG
Input: Topological order
Input: Critical cell list
Input: Each of the T GPU threads q is assigned a batch of at most 32 critical cells
Output: Boundary relations for
1 Initialize
2 Initialize for all i, q
3 parallel for each GPU thread q do
4 // Initialize path parity tracker array
5 foreach vertex in topological order do
6 if then
7 Set bit in corresponding to to 1
8 // Propagate path parities
9 foreach vertex in topological order do
10 foreach edge do
11
12 if then
13 foreach do
14 if bit in corresponding to is 1 then
15 if then
16
(PHAT) [27] for boundary matrix reduction. Construction of boundary matrix and extraction of persistence pairs are parallelized with CTPL.
V. EXPERIMENTS
Experimental Setup. Experiments were conducted on a Windows 11 system equipped with an Intel Core i5-13600K CPU (14 cores), 64 GB RAM, and an NVIDIA RTX 4080 GPU with 9,728 CUDA cores and 16 GB GDDR6 memory. The algorithm is implemented in CUDA 12.7 and C++17, with data residing on a 4TB Seagate hard disk drive operating at 5400 RPM. CUDA kernel launch parameters are selected at runtime using CUDA's occupancy-based launch configuration API, cudaOccupancyMaxPotentialBlockSize, which determines the block size that maximizes potential occupancy for the target kernel on the given GPU. The final grid size and dynamically allocated shared memory size are then computed from the input size and the selected block size.
Datasets.
• Volumetric Simulation and Imaging [57]: 28 scientific visualization volumes, of which we report a representative subset of 22 in the main paper; the full evaluation is provided in Table S.I of the supplementary material.
• Virtual Imaging Clinical Trials for Regulatory Evaluation (VICTRE) [58]: Simulated breast phantoms for four tissue scenarios (Dense, Fatty, Heterogeneous, Scattered), with 5 MRI volumes synthesized per scenario.
TABLE I END-TO-END RUNTIME FOR PERSISTENT HOMOLOGY COMPUTATION: TOPOGPU VS. STATE-OF-THE-ART BASELINES.
| Dataset | Avg. #Persist. Pairs | TopoGPU (secs) | Cubicle (secs) | CRipser (secs) | DIPHA (secs) | GUDHI (secs) | Topo/CRipser Speedup | Topo/best Speedup | TopoGPU MVox/s |
|---|---|---|---|---|---|---|---|---|---|
| Silicium | 479 | 0.02±0.00 | 0.62±0.00 | 0.11±0.00 | 0.66±0.00 | 0.56±0.03 | 5.50 | 5.50 | 5.66 |
| Fuel | 126 | 0.03±0.00 | 0.65±0.04 | 0.28±0.00 | 1.43±0.03 | 1.33±0.00 | 9.33 | 9.33 | 8.74 |
| Neghip | 346 | 0.03±0.00 | 0.76±0.02 | 0.31±0.00 | 1.48±0.02 | 1.36±0.03 | 10.33 | 10.33 | 8.74 |
| Tooth | 204769 | 0.59±0.01 | 2.29±0.03 | 3.80±0.11 | 9.90±0.10 | 11.19±0.17 | 6.44 | 3.88 | 2.64 |
| Hydrogen | 7 | 0.12±0.00 | 0.89±0.03 | 3.67±0.07 | 12.04±0.31 | 12.16±0.04 | 30.58 | 7.42 | 17.48 |
| Shockwave | 26 | 0.11±0.00 | 0.78±0.01 | 4.25±0.09 | 11.88±0.46 | 11.09±0.04 | 38.64 | 7.09 | 19.06 |
| Lobster | 140275 | 0.86±0.00 | 4.56±0.02 | 13.02±0.18 | 35.42±0.08 | 37.37±0.44 | 15.14 | 5.30 | 6.35 |
| Ventricles | 1727530 | 4.23±0.04 | 14.50±0.24 | 30.81±0.55 | 54.56±0.77 | 76.06±0.11 | 7.28 | 3.43 | 1.92 |
| Engine | 242894 | 1.31±0.01 | 5.36±0.05 | 24.40±0.14 | 52.86±0.69 | 60.59±0.48 | 18.63 | 4.09 | 6.40 |
| Bonsai | 109008 | 0.70±0.01 | 3.49±0.04 | 76.51±5.25 | 99.45±0.62 | 115.3±1.08 | 109.30 | 4.99 | 23.97 |
| Aneurysm | 34494 | 0.51±0.01 | 1.87±0.02 | 54.68±1.44 | 96.05±0.36 | 111.7±1.53 | 107.22 | 3.67 | 32.90 |
| Foot | 749676 | 1.77±0.01 | 7.25±0.05 | 65.80±0.29 | 102.3±1.60 | 123.4±1.25 | 37.18 | 4.10 | 9.48 |
| Turbulence | 376226 | 1.15±0.00 | N/A | 48.73±0.71 | 129.0±3.16 | 96.43±0.58 | 42.37 | 42.37 | 14.60 |
| Skull | 1502436 | 4.50±0.05 | 15.60±0.04 | 85.19±4.77 | 114.5±1.51 | 147.9±0.62 | 18.93 | 3.47 | 3.73 |
| Angio | 5761984 | 13.99±0.06 | 41.48±0.79 | 120.7±5.48 | 165.7±2.76 | 279.4±1.65 | 8.63 | 2.96 | 1.71 |
| Heptane | 27844 | 0.88±0.00 | 2.78±0.04 | 110.7±1.73 | 168.0±3.25 | 190.5±1.10 | 125.80 | 3.16 | 31.30 |
| Vertebra | 2782360 | 10.57±0.14 | 38.79±0.34 | 503.4±17.96 | 1135.8±6.50 | 1342.8±15.61 | 47.63 | 3.67 | 12.70 |
| Zeiss | 423233 | 12.87±0.15 | 48.02±0.58 | 2422.9±214.8 | 4166.6±195.1 | 188.26 | 3.73 | 24.43 | |
| Prone | 14038282 | 36.70±0.31 | 163.2±4.06 | 566.6±19.12 | 973.2±18.21 | 1300.1±2.28 | 15.44 | 4.45 | 3.31 |
| Marmoset | 43599571 | 251.1±2.00 | 834.8±10.50 | ✕ | ✕ | ✕ | - | 3.33 | 1.31 |
| Pawpawsaurus | 90157269 | 449.9±5.69 | 1395.7±20.95 | ✕ | ✕ | ✕ | - | 3.10 | 1.50 |
| Chameleon | 52031009 | 238.2±7.43 | 807.7±7.82 | ✕ | ✕ | ✕ | - | 3.39 | 4.75 |
| Dense | 136899 | 4.79±0.22 | N/A | 208.2±6.26 | 203.0±5.16 | 138.5±2.28 | 43.47 | 28.91 | 4.34 |
| Fatty | 516830 | 7.60±0.13 | N/A | 546.79±11.84 | 762.5±7.16 | 906.2±30.79 | 71.95 | 71.95 | 14.74 |
| Hetero | 231627 | 6.76±0.25 | N/A | 379.7±13.80 | 287.3±2.50 | 363.4±26.86 | 56.17 | 42.50 | 5.70 |
| Scattered | 340780 | 10.47±0.32 | N/A | 825.8±92.05 | 486.0±5.25 | 779.8±16.90 | 78.87 | 46.42 | 7.11 |
| GRF=1.0 | 42548195 | 160.0±2.48 | 525.0±10.95 | 1295.7±47.19 | 2233.7±198.0 | 2353.7±62.40 | 8.10 | 3.28 | 0.84 |
| GRF=2.5 | 29496809 | 94.62±0.66 | 359.0±3.71 | 1029.2±17.13 | 1420.0±24.0 | 2079.2±30.20 | 10.88 | 3.79 | 1.42 |
| GRF=5.0 | 1090669 | 7.22±0.03 | 27.70±2.98 | 919.5±18.46 | 1212.0±6.09 | 1294.4±106.0 | 127.35 | 3.84 | 18.59 |
| GRF=7.5 | 27 | 4.87±0.00 | 11.51±4.03 | 964.3±13.64 | 1170.7±16.41 | 1135.9±23.93 | 198.01 | 2.36 | 27.56 |
| Average | — | — | — | — | — | — | 53.24 | 11.53 | 10.77 |
Topo/best Speedup: TopoGPU's speedup over the fastest baseline.
TopoGPU MVox/s: throughput in millions of voxels per second.
N/A: Cubicle does not support floating-point inputs.
X: DIPHA, GUDHI, and CRipser failed on large or complex inputs.
- Gaussian Random Fields (GRF): -resolution fields generated with varying spectral index (10 volumes per ). Smaller values produce finer-scale fluctuations.
Baselines.
-
DIPHA [32]: A parallel algorithm using the Message Passing Interface (MPI) for persistent homology computation. It exhibits a substantial memory footprint. Timings are reported for parallel execution on a single machine.
-
GUDHI [31]: A comprehensive topological data analysis library prioritizing usability and seamless integration into broader workflows.
-
CRipser [20]: A widely recognized, specialized adaptation of Ripser [41] for cubical complexes. For comparison, we used its C++ implementation, which ran faster than the Python version.
-
Cubicle [36]: A multi-core parallel algorithm for persistent homology computation, employing an external-memory approach to handle large datasets. It lacks support for floating-point inputs.
We evaluated TopoGPU from two perspectives: (i) end-to-end performance of the full persistent homology computation pipeline, from data loading through boundary matrix reduction, and (ii) a stage-wise runtime breakdown of TopoGPU reporting per-stage time percentages and peak host RAM usage for each dataset. All tables report standard deviations over five runs. TopoGPU produces results identical to those of tcripser (CRipser with the T-construction).
A. Performance Comparisons in End-to-End Persistent Homology Computation
Table I reports end-to-end runtimes. TopoGPU outperforms all baselines across every dataset. Against CRipser it achieves up to speedup (average ). Relative to the best-performing baseline, it reaches up to speedup (average ). We report TopoGPU's speedup over CRipser as it is arguably the most widely used package for persistent homology computation on cubical complexes; speedups over each baseline are in Table S.II of the supplementary material.
DIPHA, GUDHI, and CRipser crashed on large inputs due to their non-streaming designs, and they failed on complex cases producing oversized boundary matrices, which easily exceeded available RAM. On our datasets, the boundary matrix produced by TopoGPU was, on average, larger than that of the Morse complex without partitioning. Nevertheless, TopoGPU still provides a substantial reduction over the cubical complex: the boundary matrix of the cubical complex was, on average, larger than that of TopoGPU. Detailed comparisons are in Table S.III of the supplementary material.
TABLE II
STAGE-WISE RUNTIME BREAKDOWN AND PEAK HOST RAM AND DEVICE MEMORY USAGE FOR TOPOGPU.
| Dataset | Size | Data Type | BoundMat Size | DevHost | Morse Matching | Topo Sort | Path Parity | Matrix Reduction | I/O | RAM (GB) | VRAM (GB) |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Silicium | 98×34×34 | uint8 | 3.2410 | 0.00% | 1.58% | 2.40% | 22.20% | 44.72% | 10.17% | 0.19 | 0.34 |
| Fuel | 64×64×64 | uint8 | 5.4710 | 0.00% | 1.48% | 3.12% | 47.76% | 28.02% | 14.62% | 0.19 | 0.31 |
| Neghip | 64×64×64 | uint8 | 9.0910 | 0.00% | 1.39% | 3.57% | 48.08% | 26.78% | 10.18% | 0.20 | 0.31 |
| Tooth | 103×94×161 | uint8 | 2.8010 | 0.19% | 0.63% | 1.25% | 15.38% | 77.85% | 3.54% | 0.42 | 0.53 |
| Hydrogen | 128×128×128 | uint8 | 2.7210 | 0.02% | 2.64% | 6.94% | 55.33% | 19.82% | 14.05% | 0.28 | 0.91 |
| Shockwave | 64×64×512 | uint8 | 3.9810 | 0.01% | 1.93% | 5.69% | 78.76% | 5.69% | 7.62% | 0.22 | 0.31 |
| Lobster | 301×324×56 | uint8 | 3.6110 | 0.28% | 0.82% | 2.22% | 15.36% | 74.37% | 2.95% | 0.62 | 1.74 |
| Ventricles | 256×256×124 | uint8 | 1.8210 | 1.31% | 0.54% | 1.35% | 10.11% | 84.31% | 1.01% | 1.62 | 0.91 |
| Engine | 256×256×128 | uint8 | 5.5510 | 0.41% | 0.71% | 2.50% | 16.83% | 71.51% | 3.96% | 0.65 | 0.91 |
| Bonsai | 256×256×256 | uint8 | 2.8410 | 0.22% | 4.72% | 7.49% | 48.51% | 26.44% | 10.12% | 0.50 | 0.91 |
| Aneurysm | 256×256×256 | uint8 | 1.0210 | 0.09% | 6.36% | 9.18% | 60.67% | 12.12% | 9.22% | 0.39 | 0.91 |
| Foot | 256×256×256 | uint8 | 8.1110 | 0.61% | 0.96% | 3.04% | 21.24% | 67.21% | 5.15% | 0.96 | 0.91 |
| Turbulence | 256×256×256 | float32 | 5.3110 | 0.40% | 1.06% | 5.40% | 31.99% | 45.39% | 12.25% | 0.78 | 0.92 |
| Skull | 256×256×256 | uint8 | 2.0110 | 1.38% | 0.46% | 1.67% | 18.50% | 74.17% | 2.23% | 1.74 | 0.91 |
| Angio | 416×512×112 | uint16 | 5.0510 | 3.61% | 0.32% | 0.98% | 10.61% | 83.61% | 0.60% | 4.10 | 1.91 |
| Heptane | 302×302×302 | uint8 | 1.6410 | 0.19% | 6.92% | 9.37% | 57.88% | 14.52% | 10.61% | 0.71 | 1.74 |
| Vertebra | 512×512×512 | uint16 | 4.1410 | 3.04% | 1.58% | 4.32% | 32.92% | 49.29% | 4.79% | 4.50 | 2.09 |
| Zeiss | 680×680×680 | uint8 | 4.6210 | 3.51% | 4.61% | 8.39% | 39.10% | 37.91% | 5.25% | 6.29 | 2.05 |
| Prone | 512×512×463 | uint16 | 1.2910 | 9.32% | 0.30% | 1.22% | 10.74% | 75.62% | 1.22% | 10.16 | 2.09 |
| Marmoset | 1024×1024×314 | uint8 | 5.4010 | 35.02% | 0.28% | 1.12% | 6.56% | 55.78% | 0.24% | 38.94 | 2.06 |
| Pawpawsaurus | 958×646×1088 | uint16 | 8.3110 | 27.36% | 0.29% | 1.12% | 6.39% | 61.59% | 0.30% | 54.04 | 1.96 |
| Chameleon | 1024×1024×1080 | uint16 | 5.8210 | 26.75% | 0.29% | 1.42% | 9.38% | 61.19% | 0.83% | 42.28 | 4.17 |
| Dense | 287×359×202 | float32 | 8.5310 | 0.80% | 1.03% | 2.46% | 16.41% | 74.97% | 3.05% | 1.15 | 1.56 |
| Fatty | 440×518×488 | float32 | 2.1810 | 1.82% | 2.74% | 6.58% | 33.47% | 47.78% | 7.11% | 2.57 | 2.00 |
| Hetero | 359×359×299 | float32 | 1.3210 | 1.07% | 0.99% | 2.76% | 15.43% | 73.84% | 3.11% | 1.62 | 1.56 |
| Scattered | 434×446×384 | float32 | 2.1410 | 1.77% | 1.00% | 3.70% | 18.33% | 70.74% | 3.85% | 2.55 | 1.73 |
| 512×512×512 | int32 | 3.3810 | 24.19% | 0.11% | 0.39% | 8.50% | 66.49% | 0.31% | 24.54 | 2.16 | |
| 512×512×512 | int32 | 2.4810 | 17.88% | 0.33% | 1.19% | 9.70% | 69.92% | 0.53% | 18.40 | 2.16 | |
| 512×512×512 | int32 | 2.6410 | 2.59% | 1.50% | 8.06% | 33.27% | 46.04% | 7.26% | 3.18 | 2.16 | |
| 512×512×512 | int32 | 4.4610 | 0.59% | 7.62% | 12.38% | 39.31% | 23.91% | 14.19% | 1.15 | 2.16 | |
| Average | — | — | — | 5.48% | 1.84% | 4.04% | 27.96% | 52.39% | 5.68% | — | — |
BoundMat Size: the number of ones over in the discrete Morse boundary matrix.
RAM: peak host (CPU) RAM used by TopoGPU.
VRAM: peak device (GPU) memory used by TopoGPU.
A key metric to gauge computation efficiency is voxel throughput, defined as the number of voxels processed per second and measured in millions ( ) of voxels per second (MVox/s). TopoGPU achieved an average throughput of 10.77 MVox/s, peaking at 32.90 MVox/s on the Aneurysm volume.
B. Runtime Breakdown
Table II reports TopoGPU's stage-wise runtime breakdown and peak RAM and VRAM usage. On average, boundary matrix reduction dominates runtime at 52.39%, followed by path-parity computation at 27.96%, I/O at 5.68%, and device-host transfers at 5.48%. Topological sorting and Morse matching are minor.
Small and medium volumes are often path parity heavy (e.g., Shockwave 78.76%, Bonsai 48.51%), whereas large and complex volumes are reduction heavy (e.g., Pawpawsaurus 61.59%, Chameleon 61.19%). Device-host transfer is dominated by sending boundary relations from device to host and varies widely—from negligible (e.g., Silicium 0.00%) to substantial (e.g., Marmoset 35.02%). Peak RAM usage scales with boundary matrix size, ranging from 0.19 GB on the smallest volume to 54.04 GB on Pawpawsaurus. TopoGPU ranks the second-lowest in peak RAM among the baselines, surpassed only by Cubicle which uses less RAM by offloading boundary relations to external storage.
Figure 6 presents a stacked-bar runtime breakdown of TopoGPU for the first 16 volumes; colored bars indicate per-stage shares, and the overlaid black curve shows total runtime per volume. From the column reporting the number of persistence pairs in Table I, path parity (orange bars) dominates runtime when the pair count is small, whereas boundary matrix reduction (green bars) dominates when it is large. The remainder (yellow bars) comprises initialization, array allocation, and resource release.
We also observe a positive correlation between total runtime and the share of boundary matrix reduction. We quantify this trend by computing the Pearson correlation [59] between total runtime and the percentage of time spent in boundary matrix reduction, obtaining r = 0.64 with p = 0.0076. We further compute the Spearman rank correlation [60] between these two quantities, obtaining with p = 0.010. These results indicate a statistically significant positive association between longer TopoGPU runtimes and a greater matrix reduction share, suggesting that matrix reduction is the primary bottleneck in our GPU persistent homology computation pipeline.

Fig. 6. Per-stage runtime breakdown of TopoGPU. Stacked bars show stage-wise percentages (left y-axis); the black curve shows total runtime of the first 16 volumes (right y-axis). Percentages inside the green bars indicate the share of boundary matrix reduction.
C. Comparative Analysis of Topological Sorting
TopoSort is a parallel topological sorting algorithm for the bounded-degree matching graphs arising in our setting, and its applicability extends beyond persistent homology computation to DAGs with similar local structure. This subsection evaluates TopoSort as a standalone algorithm: the inputs are matching graphs, and the output is a topological ordering. We compare TopoSort with two baselines:
-
CPUKahn: the classical Kahn's algorithm [48], which iteratively identifies zero-in-degree vertices, appends them to the topological order, and removes their outgoing edges.
-
GPUKahn: a naïve GPU parallelization of Kahn's algorithm, which concurrently identifies and removes zero-in-degree vertices. Its parallelism is therefore limited by the size of the zero-in-degree frontier in each iteration.
Figure 7 shows runtime curves for CPUKahn (black), GPUKahn (blue), and TopoSort (red), along with the TopoSort-over-GPUKahn speedup curve (orange), across 16 volumes ordered by increasing matching graph vertex count (annotated above each bar). TopoSort consistently outperforms CPUKahn and GPUKahn, achieving an average of and up to speedup over CPUKahn, and speedups over GPUKahn. While runtimes of CPUKahn and GPUKahn increase with vertex count, TopoSort exhibits superior scalability, with markedly flatter runtime growth.
The figure also includes stacked bar charts showing the percentage of vertices topologically sorted while (green) versus (red). On average, of vertices are sorted while still having nonzero in-degree. This highlights the benefit of TopoSort over source-frontier-based methods: instead of processing only zero-in-degree vertices, TopoSort can order many vertices whose dependencies are already resolved through predecessor tracing, thereby exposing substantially more parallelism. We further report the empirical iteration counts of TopoSort in Table S.V of the supplementary
TABLE III END-TO-END RUNTIME VERSUS CUMPERLAY ON 2D IMAGE DATASETS.
| Dataset | Resolution / #Images | Avg. time per CuMPerLay | image (ms) TopoGPU | Speedup |
|---|---|---|---|---|
| ISIC 2018 | 512 × 512 / 1,000 | 21.30 | 6.43 | 3.31× |
| Glaucoma | 1690 × 2004 / 5,335 | 1128.44 | 45.87 | 24.60× |
material, showing that despite the large variation in graph size, the number of iterations remains small and stable across all volumes, ranging from 11 to 17 with an average of 13.25.
D. Comparison with GPU-Based 2D Cubical Persistence
To our knowledge, CuMPerLay [46] is the only other GPU implementation of cubical persistence, and it is restricted to 2D images. We therefore compare against it in its native 2D setting on the two datasets used in its evaluation: the ISIC 2018 test set [61], [62] (1,000 images, resized to ) and the Eye Disease (Glaucoma) dataset [63] (5,335 images at their original resolution), all converted to grayscale.
CuMPerLay derives its throughput from batching. Its input is a 4D tensor designed for batched multiparameter persistence within deep networks, which is internally flattened into a stack of 2D images. Each image is handled concurrently by its own GPU worker, while the pairing loop within an image is sequential. We therefore fill both the batch and channel dimensions with distinct images, sweep their sizes to fully exploit the GPU, and report its best configuration. TopoGPU is likewise run with concurrent processes tuned for best throughput. All experiments use an NVIDIA RTX 4080. Table III reports end-to-end runtimes: TopoGPU is faster on ISIC 2018 and faster on the higher-resolution Glaucoma dataset, where per-image parallelism increasingly outweighs batch-level concurrency.

Fig. 7. Runtime curves for CPUKahn, GPUKahn, and TopoSort (left y-axis) with TopoSort-over-GPUKahn speedup curve (right y-axis). Stacked bar charts show the percentage of vertices topologically sorted while (green; percentage displayed) versus when (red). Volumes are ordered by increasing vertex count in their matching graphs, with vertex count annotated above each bar whose height corresponds to the count.
E. Deep Learning Pipeline Integration
To demonstrate TopoGPU’s practicality, we integrate it into a topology-preserving deep learning segmentation workflow of Hu et al. [5]. Their framework enforces topological fidelity of the segmentation results by minimizing the Wasserstein distance between the persistence diagrams of the network’s predicted likelihood map and the ground truth.

Fig. 8. PARSE dataset visualizations with ground truth segmentations in red; subjects 005, 082, 120, and 285 shown from left to right.

Fig. 9. Left y-axis: training loss versus training time. Right y-axis: cumulative persistent homology (PH) computation time versus training time. Both networks trained for 480 epochs.
We conduct a comparative analysis of Hu et al.'s topology-preserving frameworks equipped with TopoGPU versus with CRipser (the framework's default persistent homology tool) on an Ubuntu 18.04 multi-GPU workstation with NVIDIA GTX 1080 GPUs (2,560 CUDA cores and 12 GB GDDR5 memory). TopoGPU is compiled with CUDA 12.1 and g++ 7.5.0, and wrapped via Cython [64] for Python interoperability. Cubicle is excluded from the comparison due to its lack of support for floating-point inputs. During training, one GPU handles network parameters and backpropagation while a second GPU is dedicated to persistent homology computation.
Experiments use the Pulmonary Artery Segmentation (PARSE) dataset [65], designed for pulmonary artery structure studies in medical imaging. The dataset is visualized in Figure 8. Each volume is resized to . The network is trained with a batch size of 4 over 480 epochs, computing persistent homology per epoch on 96 distinct likelihood maps and the corresponding segmentation masks.
As illustrated in Figure 9, the TopoGPU-accelerated framework converges to a loss of 0.011 in 6.45 hours (orange curve), averaging 48.56 seconds per epoch. In contrast, the framework employing CRipser converges to 0.014 after 1.71 days (blue curve), averaging 309.76 seconds per epoch. TopoGPU accounts for only 19.09% of the total training time, equating to 1.23 hours (red curve), whereas CRipser dominates the process, consuming 87.31% of the training time and requiring 35.8 hours (green curve). These findings highlight that TopoGPU substantially reduces the computational burden of persistent homology, so that it is no longer the dominant cost in this training workflow.
VI. LIMITATIONS AND FUTURE WORK
We introduce TopoGPU, a GPU streaming algorithm for persistent homology computation on image data. TopoGPU proceeds in four stages: (1) cubical complex construction; (2) stratification-aware discrete Morse matching; (3) Morse boundary computation via parallel topological sorting and parallel path parity computation; and (4) CPU-based boundary matrix reduction.
Across all datasets, TopoGPU outperforms every baseline. It supports 8-, 16-, and 32-bit signed and unsigned integers as well as floating-point inputs. Integrated into a topology-preserving deep learning framework, TopoGPU substantially reduces the burden of persistent homology computation during training, demonstrating both efficiency and practicality.
TABLE IV EXAMPLES OF TOPOGPU FAILURE CASES.
| Dataset | Size | Precomp. (s) | End-to-End (s) |
|---|---|---|---|
| UniformRand | ✕ | ||
| Binary | ✕ | ||
| Constant | ✕ |
TopoGPU can process inputs larger than GPU memory by accumulating boundary relations in host memory or, in principle, streaming them to disk. However, boundary matrix reduction must materialize the full matrix in memory; if it exceeds available RAM, reduction fails. Table IV reports failure cases of TopoGPU on three datasets—Uniform Random Noise (UniformRand), Binary data containing randomly distributed 0s and 1s, and Constant data filled entirely with 1s, each with 10 volumes of 32 GB.
TopoGPU precomputation covers the GPU-accelerated portion of the pipeline, from cubical complex construction through path parity computation, and outputs boundary relations ready for boundary matrix reduction. On these volumes, precomputation finishes quickly, but matrix reduction fails as a single volume requires more than 201.9 GB of RAM to hold the boundary matrix. Parallelizing this step remains challenging: the Gaussian-elimination-like process in boundary matrix reduction is largely sequential and CPU-intensive, presenting significant obstacles for GPU parallelization. Separately, on very small inputs (e.g., images in our study), the overheads of TopoGPU, such as CUDA context creation, initialization, and host-device transfers, can exceed the actual computation cost, and a lightweight CPU method such as CRipser may finish faster in this regime. A detailed study of this regime is provided in Section VI and Table S.VI of the supplementary material.
ACKNOWLEDGMENTS
This work was supported in part by NSF Grants CCF-2318633, CCF-2144901, NIH Grants R01NS143143, and R01CA297843.
REFERENCES
[1] A. Zia, A. Khamis, J. Nichols, U. B. Tayab, Z. Hayder, V. Rolland, E. Stone, and L. Petersson, “Topological deep learning: A review of an emerging paradigm,” Artificial Intelligence Review, vol. 57, no. 4, p. 77, 2024.
[2] Z. Cang and G.-W. Wei, “Topologynet: Topology based deep convolutional and multi-task neural networks for biomolecular property predictions,” PLOS Computational Biology, vol. 13, no. 7, pp. 1–27, 07 2017.
[3] T. K. Dey, J. Wang, and Y. Wang, “Road network reconstruction from satellite images with machine learning supported by topological methods,” in Proceedings of the 27th ACM SIGSPATIAL International Conference on Advances in Geographic Information Systems, ser. SIGSPATIAL '19. New York, NY, USA: Association for Computing Machinery, 2019, p. 520–523.
[4] F. Wang, S. Kapse, S. Liu, P. Prasanna, and C. Chen, “Topotxr: A topological biomarker for predicting treatment response in breast cancer,” in Information Processing in Medical Imaging: 27th International Conference, IPMI 2021, Virtual Event, June 28–June 30, 2021, Proceedings. Berlin, Heidelberg: Springer-Verlag, 2021, p. 386–397.
[5] X. Hu, F. Li, D. Samaras, and C. Chen, “Topology-preserving deep image segmentation,” in Advances in Neural Information Processing Systems, H. Wallach, H. Larochelle, A. Beygelzimer, F. d’Alché-Buc, E. Fox, and R. Garnett, Eds., vol. 32. Curran Associates, Inc., 2019.
[6] C. Chen, X. Ni, Q. Bai, and Y. Wang, “A topological regularizer for classifiers via persistent homology,” in Proceedings of the Twenty-Second International Conference on Artificial Intelligence and Statistics, ser. Proceedings of Machine Learning Research, K. Chaudhuri and M. Sugiyama, Eds., vol. 89. PMLR, 16–18 Apr 2019, pp. 2573–2582.
[7] F. Wang, H. Liu, D. Samaras, and C. Chen, “Topogan: A topology-aware generative adversarial network,” in Computer Vision – ECCV 2020, A. Vedaldi, H. Bischof, T. Brox, and J.-M. Frahm, Eds. Cham: Springer International Publishing, 2020, pp. 118–136.
[8] X. Hu, Y. Wang, L. Fuxin, D. Samaras, and C. Chen, “Topology-aware segmentation using discrete morse theory,” in International Conference on Learning Representations, 2021.
[9] J. R. Clough, N. Byrne, I. Oksuz, V. A. Zimmer, J. A. Schnabel, and A. P. King, “A topological loss function for deep-learning based image segmentation using persistent homology,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 44, no. 12, p. 8766–8778, Dec. 2022.
[10] S. Gupta, D. Samaras, and C. Chen, “Topodiffusionnet: A topology-aware diffusion model,” International Conference on Learning Representations, 2025.
[11] H. Edelsbrunner and E. P. Mücke, “Three-dimensional alpha shapes,” ACM Trans. Graph., vol. 13, no. 1, p. 43–72, Jan. 1994.
[12] H. Edelsbrunner and J. Harer, Computational Topology - an Introduction. American Mathematical Society, 2010.
[13] T. Kaczynski, K. M. Mischaikow, and M. Mrozek, Computational homology, ser. Applied mathematical sciences ; v. 157. New York: Springer, 2004.
[14] H. Wagner, C. Chen, and E. Vučini, Efficient Computation of Persistent Homology for Cubical Data. Berlin, Heidelberg: Springer Berlin Heidelberg, 2012, pp. 91–106.
[15] A. Nigmetov and D. Morozov, “Local-global merge tree computation with local exchanges,” in Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis, ser. SC '19. New York, NY, USA: Association for Computing Machinery, 2019.
[16] C. Gueunet, P. Fortin, J. Jomier, and J. Tierny, “Contour forests: Fast multi-threaded augmented contour trees,” in 2016 IEEE 6th Symposium on Large Data Analysis and Visualization (LDAV), 2016, pp. 85–92.
[17] M. Isenburg, “Streaming connected component computation for trillion voxel images,” in Workshop on Massive Data Algorithms, 2009.
[18] T. Heiss and H. Wagner, “Streaming algorithm for euler characteristic curves of multidimensional images,” in Computer Analysis of Images and Patterns - 17th International Conference, CAIP 2017, Ystad, Sweden, August 22-24, 2017, Proceedings, Part I, ser. Lecture Notes in Computer Science, M. Felsberg, A. Heyden, and N. Krüger, Eds., vol. 10424. Springer, 2017, pp. 397–409.
[19] F. Wang, H. Wagner, and C. Chen, “GPU Computation of the Euler Characteristic Curve for Imaging Data,” in 38th International Symposium on Computational Geometry (SoCG 2022), ser. Leibniz International Proceedings in Informatics (LIPIcs), X. Goaoc and M. Kerber, Eds., vol. 224. Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022, pp. 64:1–64:16.
[20] S. Kaji, T. Sudo, and K. Ahara, “Cubical Ripser: Software for computing persistent homology of image and volume data,” arXiv e-prints, p. arXiv:2005.12692, May 2020.
[21] V. Robins, P. J. Wood, and A. P. Sheppard, “Theory and algorithms for constructing discrete morse complexes from grayscale digital images,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 33, no. 8, p. 1646–1658, aug 2011.
[22] B. Bleile, A. Garin, T. Heiss, K. Maggs, and V. Robins, The Persistent Homology of Dual Digital Image Constructions. Cham: Springer International Publishing, 2022, pp. 1–26.
[23] A. Hatcher, Algebraic topology. Cambridge: Cambridge University Press, 2002.
[24] J. R. Munkres, Elements of Algebraic Topology. Addison Wesley Publishing Company, 1984.
[25] R. Forman, “A user’s guide to discrete morse theory.” Séminaire Lotharingien de Combinatoire [electronic only], vol. 48, pp. B48c, 35 p., electronic only–B48c, 35 p., electronic only, 2002.
[26] ___,“Morse theory for cell complexes,” Advances in Mathematics, vol. 134, pp. 90–145, 1998.
[27] U. Bauer, M. Kerber, J. Reininghaus, and H. Wagner, “Phat – persistent homology algorithms toolbox,” Journal of Symbolic Computation, vol. 78, p. 76, 2017.
[28] A. Verri, C. Uras, P. Frosini, and M. Ferri, “On the use of size functions for shape analysis,” in [1993] Proceedings IEEE Workshop on Qualitative Vision, 1993, pp. 89–96.
[29] K. Mischaikow and M. Mrozek, “Chaos in the lorenz equations: A computer-assisted proof,” Bulletin of the American Mathematical Society, vol. 32, no. 1, pp. 66–72, Jan. 1995.
[30] P. Bendich, H. Edelsbrunner, and M. Kerber, “Computing robustness and persistence for images,” IEEE Transactions on Visualization and Computer Graphics, vol. 16, no. 6, pp. 1251–1260, 2010.
[31] The GUDHI Project, GUDHI User and Reference Manual. GUDHI Editorial Board, 2015. [Online]. Available: http://gudhi.gforge.inria.fr/doc/latest/
[32] U. Bauer, M. Kerber, and J. Reininghaus, “Distributed computation of persistent homology,” in Proceedings of the Meeting on Algorithm Engineering & Experiments. USA: Society for Industrial and Applied Mathematics, 2014, p. 31–38.
[33] T. Lewiner, H. Lopes, and G. Tavares, “Optimal discrete morse functions for 2-manifolds,” Computational Geometry, vol. 26, no. 3, pp. 221–233, 2003.
[34] D. Günther, J. Reininghaus, H. Wagner, and I. Hotz, “Efficient computation of 3d morse-smale complexes and persistent homology using discrete morse theory.” The Visual Computer, vol. 28, no. 10, pp. 959–969, 2012.
[35] K. Mischaikow and V. Nanda, “Morse theory for filtrations and efficient computation of persistent homology,” Discrete Comput. Geom., vol. 50, no. 2, p. 330–353, sep 2013.
[36] H. Wagner, “Slice, Simplify and Stitch: Topology-Preserving Simplification Scheme for Massive Voxel Data,” in 39th International Symposium on Computational Geometry (SoCG 2023), ser. Leibniz International Proceedings in Informatics (LIPIcs), E. W. Chambers and J. Gudmundsson, Eds., vol. 258. Dagstuhl, Germany: Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023, pp. 60:1–60:16.
[37] K. Knudson and B. Wang, “Discrete stratified morse theory: Algorithms and a user’s guide,” Discrete & Computational Geometry, vol. 67, no. 4, pp. 1023–1052, 2022.
[38] K. P. Knudson and N. A. Scoville, “Discrete morse theory for open complexes,” Topology and its Applications, vol. 388, p. 109867, 2026.
[39] A. Gyulassy, P.-T. Bremer, B. Hamann, and V. Pascucci, “A practical approach to morse-smale complex computation: Scalability and generality,” IEEE Transactions on Visualization and Computer Graphics, vol. 14, no. 6, pp. 1619–1626, 2008.
[40] O. Delgado-Friedrichs, V. Robins, and A. Sheppard, “Skeletonization and partitioning of digital images using discrete morse theory,” IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 37, no. 3, pp. 654–666, 2015.
[41] U. Bauer, “Ripser: efficient computation of Vietoris-Rips persistence barcodes,” Journal of Applied and Computational Topology, vol. 5, pp. 391–423, 09 2021.
[42] J. Tierny, G. Favelier, J. A. Levine, C. Gueunet, and M. Michaux, “The Topology ToolKit,” IEEE Transactions on Visualization and Computer Graphics (Proc. of IEEE VIS), 2017, https://topology-tool-kit.github.io/.
[43] B. Rieck and contributors, “pytorch-topological: A topological machine learning framework for pytorch,” https://github.com/aidos-lab/pytorch-topological, 2025.
[44] S. Zhang, M. Xiao, and H. Wang, “Gpu-accelerated computation of vietoris-rips persistence barcodes,” in 36th International Symposium on Computational Geometry (SoCG 2020). Schloss Dagstuhl-Leibniz-Zentrum für Informatik, 2020.
[45] V. Subhash, K. Pandey, and V. Natarajan, “A gpu parallel algorithm for computing morse-smale complexes,” IEEE Transactions on Visualization and Computer Graphics, vol. 29, no. 9, pp. 3873–3887, 2023.
[46] C. Korkmaz, B. Nuwagira, B. Coskunuzer, and T. Birdal, “Cumperlay: Learning cubical multiparameter persistence vectorizations,” in Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), October 2025, pp. 27 084–27 094.
[47] P. Dlotko and H. Wagner, “Computing homology and persistent homology using iterated Morse decomposition,” arXiv e-prints, p. arXiv:1210.1429, Oct. 2012.
[48] A. B. Kahn, “Topological sorting of large networks,” Commun. ACM, vol. 5, no. 11, p. 558–562, nov 1962.
[49] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein, Introduction to Algorithms, Third Edition, 3rd ed. The MIT Press, 2009.
[50] J. Ma, K. Iwamat, T. Takaokal, and Q.-P. Gus, “Efficient parallel and distributed topological sort algorithms,” Proceedings of IEEE International Symposium on Parallel Algorithms Architecture Synthesis, pp. 378–383, 1997.
[51] M. C. Er, “A Parallel Computation Approach to Topological Sorting,” The Computer Journal, vol. 26, no. 4, pp. 293–295, 11 1983.
[52] R. Saxena, M. Jain, and D. P. Sharma, “Gpu-based parallelization of topological sorting,” in Proceedings of First International Conference on Smart System, Innovations and Computing, A. K. Somani, S. Srivastava, A. Mundra, and S. Rawat, Eds. Singapore: Springer Singapore, 2018, pp. 411–421.
[53] D. Svantesson and M. Eklund, “A naive implementation of topological sort on gpu: A comparative study between cpu and gpu performance,” 2016.
[54] M. Harris, S. Sengupta, and J. D. Owens, “Parallel prefix sum (scan) with CUDA,” in GPU Gems 3, H. Nguyen, Ed. Addison Wesley, August 2007, ch. 39, pp. 851–876.
[55] NVIDIA Corporation, CUDA C++ Programming Guide, 2025.
[56] C. Chen and M. Kerber, “Persistent homology computation with a twist,” in Proceedings 27th European Workshop on Computational Geometry, vol. 11, 2011, pp. 197–200.
[57] P. Klacansky, “Open scivis datasets,” December 2017. [Online]. Available: https://klacansky.com/open-scivis-datasets/
[58] A. Badano, C. G. Graff, A. Badal, D. Sharma, R. Zeng, F. W. Samuelson, S. J. Glick, and K. J. Myers, “Evaluation of Digital Breast Tomosynthesis as Replacement of Full-Field Digital Mammography Using an In Silico Imaging Trial,” JAMA Network Open, vol. 1, no. 7, pp. e185474–e185474, 11 2018.
[59] K. Pearson, “Vii. note on regression and inheritance in the case of two parents,” Proceedings of the Royal Society of London, vol. 58, no. 347-352, pp. 240–242, 12 1895.
[60] C. Spearman, “The proof and measurement of association between two things,” American Journal of Psychology, vol. 15, pp. 88–103, 1904.
[61] N. Codella, V. Rotemberg, P. Tschandl, M. E. Celebi, S. Dusza, D. Gutman, B. Helba, A. Kalloo, K. Liopyris, M. Marchetti, H. Kittler, and A. Halpern, “Skin lesion analysis toward melanoma detection 2018: A challenge hosted by the international skin imaging collaboration (isic),” arXiv e-prints, p. arXiv:1902.03368, 2019.
[62] P. Tschandl, C. Rosendahl, and H. Kittler, “The HAM10000 dataset, a large collection of multi-source dermatoscopic images of common pigmented skin lesions,” Scientific Data, vol. 5, p. 180161, 2018.
[63] M. Riadur Rashid, S. Sharmin, T. Khatun, M. Z. Hasan, and M. Shorif Uddin, "Eye disease image dataset," 2024.
[64] S. Behnel, R. Bradshaw, C. Citro, L. Dalcin, D. S. Seljebotn, and K. Smith, "Cython: The best of both worlds," Computing in Science & Engineering, vol. 13, no. 2, pp. 31–39, 2011.
[65] G. Luo, K. Wang, J. Liu, S. Li, X. Liang, X. Li, S. Gan, W. Wang, S. Dong, W. Wang, P. Yu, E. Liu, H. Wei, N. Wang, J. Guo, H. Li, Z. Zhang, Z. Zhao, N. Gao, N. An, A. Pakzad, B. Rangelov, J. Dou, S. Tian, Z. Liu, Y. Wang, A. Sivalingam, K. Punithakumar, Z. Qiu, and X. Gao, “Efficient automatic segmentation for multi-level pulmonary arteries: The parse challenge,” 2023.

Fan Wang received the BSc (Hons) in Computer Science from Lanzhou University in 2012 and the MSc in Electrical Engineering from the National University of Singapore in 2013. He joined the Advanced Digital Sciences Center in 2013 and then embarked on his PhD at Stony Brook University in Computer Science in 2016. His research and publications are centered on computational topology, GPU algorithms, generative deep learning networks, and 3D vision.

Hubert Wagner received his Msc (Hons) and PhD degrees from the Jagiellonian University in 2009 and 2014.
Between 2015 and 2020 he did a postdoctoral fellowship at the Institute of Science and Technology Austria (ISTA). Since 2021 he has been an assistant professor at University of Florida. His research focuses on computational geometry and topology with applications.

Rezaul Chowdhury is an Associate Professor of Computer Science at the State University of New York at Stony Brook. He holds a joint appointment with the Institute for Advanced Computational Science (IACS) and an affiliate appointment with the Department of Applied Mathematics and Statistics. He received his B.Sc. degree in Computer Science & Engineering from Bangladesh University of Engineering & Technology, and Ph.D. in Computer Science from the University of Texas at Austin. He is a recipient of an NSF CAREER award. His research interests include design and analysis of combinatorial algorithms and data structures, parallel and cache-efficient algorithms, algorithm engineering, quantitative finance, bioinformatics, and computational biology.

Chao Chen is an associate professor at Stony Brook University, Department of Biomedical Informatics. His research interest spans biomedical image analysis, topological data analysis (TDA) and machine learning. He develops principled learning methods to address problems in biomedical image analysis and machine learning from a unique topological view. His research is supported by multiple awards, including an NSF CAREER award to develop topology-driven learning methods.
Supplementary Material - GPU-Accelerated Computation of Persistent Homology for Topological Analysis of Image Data
Fan Wang, Hubert Wagner, Rezaul Chowdhury, Chao Chen
I. FULL END-TO-END RUNTIME AND SPEEDUP RESULTS
This section provides the full numerical results supporting the end-to-end runtime comparison reported in the main paper. Table S.I reports the complete runtime and throughput results for TopoGPU and all baseline methods on every evaluated dataset. Table S.II separately reports the corresponding speedups of TopoGPU over all baselines. We separate runtime and speedup results into two tables to improve readability while preserving the full evaluation data.
Across all datasets, TopoGPU achieves the lowest end-to-end runtime among all successful methods. Among the baselines, Cubicle is typically the strongest competitor, while CRipser often provides the next-best runtime on datasets where it completes. Nevertheless, TopoGPU consistently improves over both methods. Against CRipser, TopoGPU reaches up to speedup, with an average speedup of . Relative to the fastest successful baseline for each dataset, TopoGPU reaches up to speedup, with an average speedup of .
The full results also highlight the scalability limitations of the non-streaming baselines. DIPHA, GUDHI, and CRipser fail on several large or complex inputs because their non-streaming designs can require boundary matrices that exceed available memory. In contrast, TopoGPU remains successful across the full benchmark suite. Although the boundary matrix produced by TopoGPU is larger than that of the Morse complex without partitioning, TopoGPU still substantially reduces the matrix size relative to the original cubical complex. On average, the cubical-complex boundary matrix is larger than the TopoGPU boundary matrix, while the TopoGPU boundary matrix is larger than the Morse complex without partitioning.
The throughput column in Table S.I provides an additional view of computational efficiency. Throughput is measured in millions of voxels processed per second (MVox/s). TopoGPU achieves an average throughput of 9.97 MVox/s over all datasets, with the highest throughput of 32.90 MVox/s on the Aneurysm volume. These results show that TopoGPU provides both lower end-to-end runtime and robust throughput across small, medium, large, and complex volumetric datasets.
II. BOUNDARY MATRIX SIZE COMPARISON WITH NON-PARTITIONED MORSE COMPLEX
We compare the boundary matrix size produced by TopoGPU with two reference constructions: the original cubical complex and the Morse complex without partitioning. This comparison is used to quantify the overhead introduced by TopoGPU's stratification-aware Morse matching, where auxiliary critical cells are added to enable independent GPU-block processing and streaming.
To obtain the non-partitioned Morse complex baseline, we run Cubicle with the chunk number manually set to one, forcing the entire volume to be processed as a single chunk. This removes the auxiliary critical cells introduced by partitioning and therefore provides a direct comparison against a Morse complex without partitioning. However, this baseline requires the full dataset to be loaded and processed at once, and therefore does not scale to several large datasets evaluated by TopoGPU.
Table S.III reports the boundary matrix sizes of the cubical complex, the non-partitioned Morse complex, and the Morse complex produced by TopoGPU. As expected, TopoGPU produces larger boundary matrices than the non-partitioned Morse complex because stratification-aware matching introduces additional auxiliary critical cells. Across datasets where the non-partitioned baseline is available, the average TopoGPU/Morse-without-partitioning ratio is .
Nevertheless, the TopoGPU boundary matrix remains substantially smaller than the cubical complex boundary matrix. On average, the cubical complex boundary matrix is larger than the TopoGPU boundary matrix. This shows that although partitioning introduces additional critical cells, TopoGPU still preserves the main computational benefit of Morse reduction: it greatly reduces the boundary matrix size compared with the original cubical complex while enabling scalable GPU streaming on large image data.
III. FULL STAGE-WISE RUNTIME BREAKDOWN
This section provides the full stage-wise runtime breakdown supporting the summary reported in the main paper. Table S.IV reports the complete results over all evaluated datasets, including the runtime contribution of each TopoGPU stage and the corresponding peak RAM usage.
0000-0000/00$00.00 © 2021 IEEE
TABLE S.I FULL END-TO-END RUNTIME AND THROUGHPUT RESULTS FOR PERSISTENT HOMOLOGY COMPUTATION.
| Dataset | Avg. #Persist. Pairs | TopoGPU (secs) | Cubicle (secs) | CRipser (secs) | DIPHA (secs) | GUDHI (secs) | TopoGPU MVox/s |
|---|---|---|---|---|---|---|---|
| Silicium | 479 | 0.02±0.00 | 0.62±0.00 | 0.11±0.00 | 0.66±0.00 | 0.56±0.03 | 5.66 |
| Fuel | 126 | 0.03±0.00 | 0.65±0.04 | 0.28±0.00 | 1.43±0.03 | 1.33±0.00 | 8.74 |
| Neghip | 346 | 0.03±0.00 | 0.76±0.02 | 0.31±0.00 | 1.48±0.02 | 1.36±0.03 | 8.74 |
| Tooth | 204769 | 0.59±0.01 | 2.29±0.03 | 3.80±0.11 | 9.90±0.10 | 11.19±0.17 | 2.64 |
| Hydrogen | 7 | 0.12±0.00 | 0.89±0.03 | 3.67±0.07 | 12.04±0.31 | 12.16±0.04 | 17.48 |
| Shockwave | 26 | 0.11±0.00 | 0.78±0.01 | 4.25±0.09 | 11.88±0.46 | 11.09±0.04 | 19.06 |
| Lobster | 140275 | 0.86±0.00 | 4.56±0.02 | 13.02±0.18 | 35.42±0.08 | 37.37±0.44 | 6.35 |
| Ventricles | 1727530 | 4.23±0.04 | 14.50±0.24 | 30.81±0.55 | 54.56±0.77 | 76.06±0.11 | 1.92 |
| Engine | 242894 | 1.31±0.01 | 5.36±0.05 | 24.40±0.14 | 52.86±0.69 | 60.59±0.48 | 6.40 |
| Bonsai | 109008 | 0.70±0.01 | 3.49±0.04 | 76.51±5.25 | 99.45±0.62 | 115.3±1.08 | 23.97 |
| Aneurysm | 34494 | 0.51±0.01 | 1.87±0.02 | 54.68±1.44 | 96.05±0.36 | 111.7±1.53 | 32.90 |
| Foot | 749676 | 1.77±0.01 | 7.25±0.05 | 65.80±0.29 | 102.3±1.60 | 123.4±1.25 | 9.48 |
| Turbulence | 376226 | 1.15±0.00 | 48.73±0.71 | 129.0±3.16 | 96.43±0.58 | 14.60 | |
| Skull | 1502436 | 4.50±0.05 | 15.60±0.04 | 85.19±4.77 | 114.5±1.51 | 147.9±0.62 | 3.73 |
| Angio | 5761984 | 13.99±0.06 | 41.48±0.79 | 120.7±5.48 | 165.7±2.76 | 279.4±1.65 | 1.71 |
| Heptane | 27844 | 0.88±0.00 | 2.78±0.04 | 110.7±1.73 | 168.0±3.25 | 190.5±1.10 | 31.30 |
| Vertebra | 2782360 | 10.57±0.14 | 38.79±0.34 | 503.4±17.96 | 1135.8±6.50 | 1342.8±15.61 | 12.70 |
| Zeiss | 423233 | 12.87±0.15 | 48.02±0.58 | 2422.9±214.8 | 4166.6±195.1 | 24.43 | |
| Prone | 14038282 | 36.70±0.31 | 163.2±4.06 | 566.6±19.12 | 973.2±18.21 | 1300.1±2.28 | 3.31 |
| Neocortical | 12293475 | 47.24±0.80 | 188.1±6.00 | 7347.3±911.1 | 879.1±15.91 | 2.43 | |
| Present | 15446029 | 56.62±1.00 | 202.4±6.46 | 2108.0±80.97 | 1140.5±0.73 | 1.89 | |
| Stent | 3183900 | 7.53±0.04 | 25.16±0.19 | 140.2±3.03 | 387.9±2.81 | 378.2±4.12 | 6.02 |
| Christmas_tree | 20742396 | 70.85±2.16 | 287.0±1.79 | 979.1±11.19 | 1438.8±153.1 | 1478.2±7.98 | 1.85 |
| Marmoset | 43599571 | 251.1±2.00 | 834.8±10.50 | 1.31 | |||
| Kingsnake | 38808043 | 242.6±2.00 | 803.1±4.83 | 3.44 | |||
| Pawpawsaurus | 90157269 | 449.9±5.69 | 1395.7±20.95 | 1.50 | |||
| Chameleon | 52031009 | 238.2±7.43 | 807.7±7.82 | 4.75 | |||
| Richtmyer | 15725861 | 398.7±19.75 | 1110.2±23.23 | 20.20 | |||
| Dense | 136899 | 4.79±0.22 | N/A | 208.2±6.26 | 203.0±5.16 | 138.5±2.28 | 4.34 |
| Fatty | 516830 | 7.60±0.13 | N/A | 546.79±11.84 | 762.5±7.16 | 906.2±30.79 | 14.74 |
| Hetero | 231627 | 6.76±0.25 | N/A | 379.7±13.80 | 287.3±2.50 | 363.4±26.86 | 5.70 |
| Scattered | 340780 | 10.47±0.32 | N/A | 825.8±92.05 | 486.0±5.25 | 779.8±16.90 | 7.11 |
| 42548195 | 160.0±2.48 | 525.0±10.95 | 1295.7±47.19 | 2233.7±198.0 | 2353.7±62.40 | 0.84 | |
| 29496809 | 94.62±0.66 | 359.0±3.71 | 1029.2±17.13 | 1420.0±24.0 | 2079.2±30.20 | 1.42 | |
| 1090669 | 7.22±0.03 | 27.70±2.98 | 919.5±18.46 | 1212.0±6.09 | 1294.4±106.0 | 18.59 | |
| 27 | 4.87±0.00 | 11.51±4.03 | 964.3±13.64 | 1170.7±16.41 | 1135.9±23.93 | 27.56 | |
| — | — | — | — | — | — | 9.97 |
TopoGPU MVox/s: throughput in millions of voxels per second.
N/A: Cubicle does not support floating-point inputs.
X: DIPHA, GUDHI, and CRipser failed on large or
complex inputs.
Averages are over the full suite of 36 datasets and thus differ slightly from those in Table I of the main manuscript, which cover a representative subset.
Overall, boundary matrix reduction is the dominant stage, accounting for 54.31% of runtime on average, followed by path-parity computation at 25.63% and host-device data transfer at 7.02%. Topological sorting, Morse matching, and I/O contribute comparatively little to the total runtime. The full table also shows that small and medium volumes can be path-parity dominated, such as Shockwave at 78.76% and Bonsai at 48.51%, whereas large and complex volumes are typically reduction dominated, such as Pawpawsaurus at 61.59% and Chameleon at 61.19%. Device-host transfer time is mainly due to transferring boundary relations from the device to the host, and its contribution varies substantially across datasets, ranging from negligible on Silicium to 35.02% on Marmoset.
The full peak-memory measurements further confirm that RAM usage scales with the resulting boundary matrix size. Across the evaluated datasets, peak RAM ranges from 0.19 GB on the smallest volume to 54.67 GB on Richtmyer. As discussed in the main paper, TopoGPU has the second-lowest peak RAM usage among the evaluated methods, with only Cubicle using less RAM by offloading boundary relations to external storage.
IV. RUNTIME SCALING WITH TOPOLOGICAL COMPLEXITY
Table I of the main manuscript reports TopoGPU's end-to-end runtime alongside the number of persistence pairs for each dataset. To characterize how this runtime scales with the size of the underlying computation, we plot it against two measures of topological complexity: the number of critical cells and the boundary matrix size (the number of ones over in the discrete Morse boundary matrix). Both quantities directly determine the dimensions and fill of the matrix that must be reduced, and are therefore more faithful predictors of computational cost than the raw input size. The results, for the first 16 datasets in Table I of the main manuscript, are shown in Figure S.1.
On log-log axes, runtime exhibits a clear near-linear relationship with both the number of critical cells and the boundary matrix size, spanning roughly three orders of magnitude in each. This behavior is consistent with the analysis in Section V-B of the main manuscript: because boundary matrix reduction
TABLE S.II FULL SPEEDUP RESULTS OF TOPOGPU OVER EACH BASELINE.
| Dataset | Avg. #Persist. Pairs | Topo/Cubicle Speedup | Topo/CRipser Speedup | Topo/DIPHA Speedup | Topo/GUDHI Speedup | Topo/best Speedup |
|---|---|---|---|---|---|---|
| Silicium | 479 | 31.00 | 5.50 | 33.00 | 28.00 | 5.50 |
| Fuel | 126 | 21.67 | 9.33 | 47.67 | 44.33 | 9.33 |
| Neghip | 346 | 25.33 | 10.33 | 49.33 | 45.33 | 10.33 |
| Tooth | 204769 | 3.88 | 6.44 | 16.78 | 18.97 | 3.88 |
| Hydrogen | 7 | 7.42 | 30.58 | 100.33 | 101.33 | 7.42 |
| Shockwave | 26 | 7.09 | 38.64 | 108.00 | 100.82 | 7.09 |
| Lobster | 140275 | 5.30 | 15.14 | 41.19 | 43.45 | 5.30 |
| Ventricles | 1727530 | 3.43 | 7.28 | 12.90 | 17.98 | 3.43 |
| Engine | 242894 | 4.09 | 18.63 | 40.35 | 46.25 | 4.09 |
| Bonsai | 109008 | 4.99 | 109.30 | 142.07 | 164.71 | 4.99 |
| Aneurysm | 34494 | 3.67 | 107.22 | 188.33 | 219.02 | 3.67 |
| Foot | 749676 | 4.10 | 37.18 | 57.80 | 69.72 | 4.10 |
| Turbulence | 376226 | - | 42.37 | 112.17 | 83.85 | 42.37 |
| Skull | 1502436 | 3.47 | 18.93 | 25.44 | 32.87 | 3.47 |
| Angio | 5761984 | 2.96 | 8.63 | 11.84 | 19.97 | 2.96 |
| Heptane | 27844 | 3.16 | 125.80 | 190.91 | 216.48 | 3.16 |
| Vertebra | 2782360 | 3.67 | 47.63 | 107.46 | 127.04 | 3.67 |
| Zeiss | 423233 | 3.73 | 188.26 | 323.75 | - | 3.73 |
| Prone | 14038282 | 4.45 | 15.44 | 26.52 | 35.43 | 4.45 |
| Neocortical | 12293475 | 3.98 | 155.53 | 18.61 | - | 3.98 |
| Present | 15446029 | 3.57 | 37.23 | 20.14 | - | 3.57 |
| Stent | 3183900 | 3.34 | 18.62 | 51.51 | 50.23 | 3.34 |
| Christmas_tree | 20742396 | 4.05 | 13.82 | 20.31 | 20.86 | 4.05 |
| Marmoset | 43599571 | 3.32 | - | - | - | 3.32 |
| Kingsnake | 38808043 | 3.31 | - | - | - | 3.31 |
| Pawpawsaurus | 90157269 | 3.10 | - | - | - | 3.10 |
| Chameleon | 52031009 | 3.39 | - | - | - | 3.39 |
| Richtmyer | 15725861 | 2.78 | - | - | - | 2.78 |
| Dense | 136899 | - | 43.47 | 42.38 | 28.91 | 28.91 |
| Fatty | 516830 | - | 71.95 | 100.33 | 119.24 | 71.95 |
| Hetero | 231627 | - | 56.17 | 42.50 | 53.76 | 42.50 |
| Scattered | 340780 | - | 78.87 | 46.42 | 74.48 | 46.42 |
| 42548195 | 3.28 | 8.10 | 13.96 | 14.71 | 3.28 | |
| 29496809 | 3.79 | 10.88 | 15.01 | 21.97 | 3.79 | |
| 1090669 | 3.84 | 127.35 | 167.87 | 179.28 | 3.84 | |
| 27 | 2.36 | 198.01 | 240.39 | 233.24 | 2.36 | |
| — | 6.05 | 53.63 | 77.91 | 79.01 | 10.19 |
Topo/best Speedup: TopoGPU's speedup over the fastest baseline.
Averages are over the full suite of 36 datasets and thus differ slightly from those in Table I of the main manuscript, which cover a representative subset.

Fig. S.1. TopoGPU end-to-end runtime as a function of the number of critical cells (left) and the boundary matrix size (right), for the first 16 datasets in Table I of the main manuscript. Each marker denotes one dataset. Both axes are on a logarithmic scale.
is the dominant stage of the pipeline, and its cost is governed by the dimensions and fill of the Morse boundary matrix, TopoGPU's total runtime tracks these two complexity measures closely. Raw input size, by contrast, is a weaker predictor, since two volumes of identical voxel dimensions can differ substantially in topological complexity and hence in the size of the boundary matrix they produce. These plots therefore reinforce our conclusion that the size of the resulting Morse complex, rather than the number of input voxels, is the primary determinant of TopoGPU's computational cost.
V. EMPIRICAL ITERATION COUNTS OF PARALLEL TOPOLOGICAL SORTING
To further evaluate the practical behavior of the proposed parallel topological sorting algorithm, we report the number of iterations required on benchmark matching graphs. For each dataset, we record the number of vertices N in the matching graph and the number of iterations r required by parallel topological sorting to complete the topological ordering. The results are summarized in Table S.V.
As shown in Table S.V, the matching graphs vary substantially in size, ranging from vertices for Silicium to vertices for Heptane. Despite this large variation in graph size, the number of iterations remains small and stable across all datasets. Specifically, the algorithm requires only 11 to 17 iterations, with an average of 13.25 iterations over the 16 benchmark graphs.
TABLE S.III BOUNDARY MATRIX SIZE COMPARISON. BOUNDARY MATRIX SIZES OF THE CUBICAL COMPLEX, THE MORSE COMPLEX WITHOUT PARTITIONING, AND THE MORSE COMPLEX BY TOPOGPU.
| Dataset | Size | Boundary matrix size | Cubical / TopoGPU | TopoGPU / Morse w/o partitioning | ||
|---|---|---|---|---|---|---|
| Cubical complex | Morse complex w/o partitioning | Morse complex TopoGPU | ||||
| Silicium | 85.80 | 15.73 | ||||
| Fuel | 116.82 | 87.80 | ||||
| Neghip | 70.30 | 14.03 | ||||
| Tooth | 13.46 | 2.12 | ||||
| Hydrogen | 186.40 | 8.19 | ||||
| Shockwave | 1278.89 | 18.95 | ||||
| Lobster | 36.57 | 2.27 | ||||
| Ventricles | 10.77 | 1.85 | ||||
| Engine | 36.40 | 2.27 | ||||
| Bonsai | 142.25 | 3.89 | ||||
| Aneurysm | 396.08 | 10.20 | ||||
| Foot | 49.82 | 2.23 | ||||
| Turbulence | - | 76.08 | - | |||
| Skull | 20.10 | 2.20 | ||||
| Angio | 11.39 | 1.72 | ||||
| Heptane | 404.27 | 6.69 | ||||
| Vertebra | 78.03 | 2.90 | ||||
| Zeiss | 163.74 | 2.97 | ||||
| Prone | 22.55 | 1.94 | ||||
| Neocortical | 23.27 | 1.10 | ||||
| Present | 17.06 | 1.20 | ||||
| Stent | 35.12 | 1.95 | ||||
| Christmas_tree | 15.28 | 1.74 | ||||
| Marmoset | 14.65 | 1.72 | ||||
| Kingsnake | 34.54 | 2.15 | ||||
| Pawpawsaurus | 19.48 | 2.01 | ||||
| Chameleon | 46.76 | 2.47 | ||||
| Richtmyer | - | 450.41 | - | |||
| Dense | - | 58.72 | - | |||
| Fatty | - | 122.63 | - | |||
| Hetero | - | 70.22 | - | |||
| Scattered | - | 77.61 | - | |||
| 9.56 | 1.70 | |||||
| 13.01 | 1.89 | |||||
| 122.48 | 4.87 | |||||
| 7242.15 | 58.99 | |||||
| Average | - | - | - | - | 321.46 | 8.99 |
Note. The matrix sizes reported for the Morse complex with TopoGPU use the same block size as the TopoGPU timings reported in Tables I and II of the main paper. "Cubical / TopoGPU" reports the ratio between the cubical complex boundary matrix size and the TopoGPU boundary matrix size. "TopoGPU / Morse w/o partitioning" reports the ratio between the TopoGPU boundary matrix size and the Morse complex boundary matrix size without partitioning.
This empirical behavior indicates that image-derived Morse matching graphs do not exhibit large iteration counts in practice. Even for graphs with hundreds of millions of vertices, the algorithm completes topological sorting in a small number of iterations. These results support the practical efficiency of the proposed algorithm and show that the pessimistic large-iteration scenario does not occur on the evaluated matching graphs.
VI. PERFORMANCE ON SMALL INPUTS
The Limitations section of the main manuscript notes that, on very small inputs, the overheads of TopoGPU can exceed the actual computation cost, and a lightweight CPU method such as CRipser may finish faster. This section characterizes this regime, which arises from two factors.
-
First, TopoGPU carries overheads including CUDA context creation, device memory allocation and initialization, and host–device transfers. On large volumes these costs are amortized over the computation, but on small inputs they dominate: a CPU method begins computing immediately, whereas TopoGPU spends most of its runtime preparing the device.
-
Second, small inputs do not saturate the GPU. TopoGPU assigns one thread per voxel, so a small input occupies only a fraction of the available streaming multiprocessors, leaving a large portion of the device idle; the parallelism that drives TopoGPU's advantage on large volumes simply has no work to distribute.
The second factor also suggests a mitigation: batch processing. When multiple small inputs are processed concurrently, their combined workload saturates the GPU and the fixed overheads are amortized across the batch. This mirrors the deep learning setting of Section VII, where persistent homology is computed for a batch of likelihood maps in each training iteration rather than for a single input at a time. In our implementation, batching launches multiple independent TopoGPU
TABLE S.IV STAGE-WISE RUNTIME BREAKDOWN AND PEAK HOST RAM AND DEVICE MEMORY USAGE FOR TOPOGPU.
| Dataset | Size | Data Type | BoundMat Size | DevHost | Morse Matching | Topo Sort | Path Parity | Matrix Reduction | I/O | RAM (GB) | VRAM (GB) |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Silicium | 98 × 34 × 34 | uint8 | 3.24 × 10 | 0.00% | 1.58% | 2.40% | 22.20% | 44.72% | 10.17% | 0.19 | 0.34 |
| Fuel | 64 × 64 × 64 | uint8 | 5.47 × 10 | 0.00% | 1.48% | 3.12% | 47.76% | 28.02% | 14.62% | 0.19 | 0.31 |
| Neghip | 64 × 64 × 64 | uint8 | 9.09 × 10 | 0.00% | 1.39% | 3.57% | 48.08% | 26.78% | 10.18% | 0.20 | 0.31 |
| Tooth | 103 × 94 × 161 | uint8 | 2.80 × 10 | 0.19% | 0.63% | 1.25% | 15.38% | 77.85% | 3.54% | 0.42 | 0.53 |
| Hydrogen | 128 × 128 × 128 | uint8 | 2.72 × 10 | 0.02% | 2.64% | 6.94% | 55.33% | 19.82% | 14.05% | 0.28 | 0.91 |
| Shockwave | 64 × 64 × 512 | uint8 | 3.98 × 10 | 0.01% | 1.93% | 5.69% | 78.76% | 5.69% | 7.62% | 0.22 | 0.31 |
| Lobster | 301 × 324 × 56 | uint8 | 3.61 × 10 | 0.28% | 0.82% | 2.22% | 15.36% | 74.37% | 2.95% | 0.62 | 1.74 |
| Ventricles | 256 × 256 × 124 | uint8 | 1.82 × 10 | 1.31% | 0.54% | 1.35% | 10.11% | 84.31% | 1.01% | 1.62 | 0.91 |
| Engine | 256 × 256 × 128 | uint8 | 5.55 × 10 | 0.41% | 0.71% | 2.50% | 16.83% | 71.51% | 3.96% | 0.65 | 0.91 |
| Bonsai | 256 × 256 × 256 | uint8 | 2.84 × 10 | 0.22% | 4.72% | 7.49% | 48.51% | 26.44% | 10.12% | 0.50 | 0.91 |
| Aneurysm | 256 × 256 × 256 | uint8 | 1.02 × 10 | 0.09% | 6.36% | 9.18% | 60.67% | 12.12% | 9.22% | 0.39 | 0.91 |
| Foot | 256 × 256 × 256 | uint8 | 8.11 × 10 | 0.61% | 0.96% | 3.04% | 21.24% | 67.21% | 5.15% | 0.96 | 0.91 |
| Turbulence | 256 × 256 × 256 | float32 | 5.31 × 10 | 0.40% | 1.06% | 5.40% | 31.99% | 45.39% | 12.25% | 0.78 | 0.92 |
| Skull | 256 × 256 × 256 | uint8 | 2.01 × 10 | 1.38% | 0.46% | 1.67% | 18.50% | 74.17% | 2.23% | 1.74 | 0.91 |
| Angio | 416 × 512 × 112 | uint16 | 5.05 × 10 | 3.61% | 0.32% | 0.98% | 10.61% | 83.61% | 0.60% | 4.10 | 1.91 |
| Heptane | 302 × 302 × 302 | uint8 | 1.64 × 10 | 0.19% | 6.92% | 9.37% | 57.88% | 14.52% | 10.61% | 0.71 | 1.74 |
| Vertebra | 512 × 512 × 512 | uint16 | 4.14 × 10 | 3.04% | 1.58% | 4.32% | 32.92% | 49.29% | 4.79% | 4.50 | 2.09 |
| Zeiss | 680 × 680 × 680 | uint8 | 4.62 × 10 | 3.51% | 4.61% | 8.39% | 39.10% | 37.91% | 5.25% | 6.29 | 2.05 |
| Prone | 512 × 512 × 463 | uint16 | 1.29 × 10 | 9.32% | 0.30% | 1.22% | 10.74% | 75.62% | 1.22% | 10.16 | 2.09 |
| Neocortical | 1464 × 1033 × 76 | uint8 | 1.19 × 10 | 8.80% | 0.20% | 0.84% | 12.03% | 76.01% | 0.32% | 10.20 | 1.47 |
| Present | 492 × 492 × 442 | uint16 | 1.41 × 10 | 10.65% | 0.31% | 1.18% | 6.22% | 74.17% | 0.63% | 10.98 | 2.02 |
| Stent | 512 × 512 × 174 | uint16 | 3.13 × 10 | 2.44% | 0.89% | 2.14% | 12.31% | 72.85% | 2.37% | 3.10 | 2.09 |
| Christmas_tree | 512 × 499 × 512 | uint16 | 2.06 × 10 | 15.65% | 0.41% | 1.50% | 8.33% | 73.24% | 0.74% | 14.90 | 2.09 |
| Marmoset | 1024 × 1024 × 314 | uint8 | 5.40 × 10 | 35.02% | 0.28% | 1.12% | 6.56% | 55.78% | 0.24% | 38.94 | 2.06 |
| Kingsnake | 1024 × 1024 × 795 | uint8 | 5.79 × 10 | 30.44% | 0.27% | 1.23% | 8.12% | 57.40% | 0.62% | 42.06 | 2.06 |
| Pawpawsaurus | 958 × 646 × 1088 | uint16 | 8.31 × 10 | 27.36% | 0.29% | 1.12% | 6.39% | 61.59% | 0.30% | 54.04 | 1.96 |
| Chameleon | 1024 × 1024 × 1080 | uint16 | 5.82 × 10 | 26.75% | 0.29% | 1.42% | 9.38% | 61.19% | 0.83% | 42.28 | 4.17 |
| Richtmyer | 2048 × 2048 × 1920 | uint8 | 4.28 × 10 | 20.31% | 3.10% | 6.26% | 37.02% | 30.06% | 2.46% | 54.67 | 4.42 |
| Dense | 287 × 359 × 202 | float32 | 8.53 × 10 | 0.80% | 1.03% | 2.46% | 16.41% | 74.97% | 3.05% | 1.15 | 1.56 |
| Fatty | 440 × 518 × 488 | float32 | 2.18 × 10 | 1.82% | 2.74% | 6.58% | 33.47% | 47.78% | 7.11% | 2.57 | 2.00 |
| Hetero | 359 × 359 × 299 | float32 | 1.32 × 10 | 1.07% | 0.99% | 2.76% | 15.43% | 73.84% | 3.11% | 1.62 | 1.56 |
| Scattered | 434 × 446 × 384 | float32 | 2.14 × 10 | 1.77% | 1.00% | 3.70% | 18.33% | 70.74% | 3.85% | 2.55 | 1.73 |
| GRF | 512 × 512 × 512 | int32 | 3.38 × 10 | 24.19% | 0.11% | 0.39% | 8.50% | 66.49% | 0.31% | 24.54 | 2.16 |
| GRF | 512 × 512 × 512 | int32 | 2.48 × 10 | 17.88% | 0.33% | 1.19% | 9.70% | 69.92% | 0.53% | 18.40 | 2.16 |
| GRF | 512 × 512 × 512 | int32 | 2.64 × 10 | 2.59% | 1.50% | 8.06% | 33.27% | 46.04% | 7.26% | 3.18 | 2.16 |
| GRF | 512 × 512 × 512 | int32 | 4.46 × 10 | 0.59% | 7.62% | 12.38% | 39.31% | 23.91% | 14.19% | 1.15 | 2.16 |
| Average | — | — | — | 7.02% | 1.68% | 3.73% | 25.63% | 54.31% | 4.93% | — | — |
BoundMat Size: the number of ones over in the discrete Morse boundary matrix.
RAM: peak host (CPU) RAM used by TopoGPU.
VRAM: peak device (GPU) memory used by TopoGPU.
instances as concurrent processes, each processing a disjoint subset of the inputs.
To quantify these effects, we compare CRipser, TopoGPU processing one input at a time, and TopoGPU processing inputs in batches, on synthetic 2D inputs of varying sizes and two complexity levels: uniform random inputs (high topological complexity) and constant inputs filled with ones (low topological complexity). For each input type and resolution, we generate 100 files, and the results, averaged over these 100 files, are reported in Table S.VI.
The results confirm both factors. At sizes of and above, TopoGPU outperforms CRipser even when processing one input at a time, and batching widens the advantage. The speedup is largest on the constant inputs (e.g., over CRipser at ). On these inputs, nearly all of the work is completed by the GPU-accelerated stages, and the near-trivial Morse complex leaves almost nothing for the sequential boundary matrix reduction on the CPU.
Batching, in contrast, helps most on the random inputs, improving single-input processing by (e.g., from 408.6 ms to 100.9 ms at ), and only modestly on the constant inputs. This difference reflects where the runtime is spent. On random inputs, the large number of persistence pairs makes both the GPU stages and the subsequent boundary matrix reduction substantial, and processing multiple inputs concurrently both saturates the GPU and overlaps the CPU-side reduction of one input with the GPU stages of others. On constant inputs, the Morse complex is nearly trivial and the runtime is dominated by GPU overheads, which batching can only partially hide.
At the smallest size of , however, CRipser remains faster than TopoGPU in both modes: the fixed overheads outweigh any parallelism gains even under batching, which narrows the gap but does not close it. This is consistent with the observation in the Limitations section of the main manuscript: for very small inputs, a lightweight CPU method is the more efficient choice, while TopoGPU's advantage grows rapidly.
TABLE S.V EMPIRICAL ITERATION COUNTS OF PARALLEL TOPOLOGICAL SORTING. NUMBER OF VERTICES AND ITERATIONS REQUIRED BY THE PARALLEL TOPOLOGICAL SORTING ALGORITHM ON BENCHMARK MATCHING GRAPHS.
| Dataset | #Vertices N | #Iterations r |
|---|---|---|
| Silicium | 11 | |
| Fuel | 12 | |
| Neghip | 14 | |
| Tooth | 12 | |
| Hydrogen | 16 | |
| Shockwave | 15 | |
| Lobster | 12 | |
| Ventricles | 11 | |
| Engine | 14 | |
| Bonsai | 13 | |
| Aneurysm | 11 | |
| Foot | 14 | |
| Turbulence | 16 | |
| Skull | 13 | |
| Angio | 11 | |
| Heptane | 17 |
Note. N denotes the number of vertices in the matching graph, and r denotes the number of iterations required by parallel topological sorting.
TABLE S.VI RUNTIME COMPARISON ON 2D INPUTS OF VARYING SIZES AND TOPOLOGICAL COMPLEXITY: CRIPSER VERSUS TOPOGPU WITH SINGLE-INPUT AND BATCHED PROCESSING.
| Input | Size | CRipser (ms) | TopoGPU-single (ms) | TopoGPU-batch (ms) |
|---|---|---|---|---|
| UniformRand | ||||
| Constant | ||||
with input size.
VII. DEEP LEARNING PIPELINE INTEGRATION
To demonstrate the practicality of TopoGPU, we integrate it into the topology-preserving deep-learning segmentation workflow proposed by Hu et al. [1]. We compare the training time of the TopoGPU-based framework with that of an otherwise identical framework using Cubical Ripser (CRipser) [2] across three network architectures: 3D U-Net, Attention 3D U-Net, and Residual 3D U-Net, as detailed in Table S.VII. The experiments are conducted on the following datasets:
-
The Pulmonary Artery Segmentation (PARSE) dataset [3], which is designed for studying pulmonary artery structures in medical imaging. Each volume is resized to .
-
The MSD Brain dataset [4], [5], corresponding to Task 01 of the Medical Segmentation Decathlon, which focuses on segmenting three tumor sub-regions from multi-parametric magnetic resonance images. Each volume has a size of . We merge the labels of Enhancing Tumor, Peritumoral Edema, and Necrotic Core into a single Whole Tumor label, and binarize each segmentation mask accordingly.
The basic training configuration uses a batch size of 4, a learning rate of , and the Adam optimizer. Rows 1, 3, 5, and 7 of Tables S.VIII, S.IX, and S.X report the performance under this basic configuration. All reported epoch times and persistent homology computation times are averaged over 480 epochs. In each epoch, persistent homology is computed for 96 distinct likelihood maps and the corresponding segmentation masks.
The experiments reported in this section were conducted on an Ubuntu 18.04 multi-GPU workstation equipped with NVIDIA GTX 1080 GPUs. TopoGPU was compiled using CUDA 12.1 and g++ 7.5.0, and exposed to Python through a Cython wrapper.
Tables S.VIII–S.X compare CRipser and TopoGPU under different training configurations for 3D U-Net, Attention 3D U-Net, and Residual 3D U-Net. Across all datasets and architectures, TopoGPU consistently reduces the average epoch time. The reduction is mainly due to the substantial decrease in persistent homology (PH) computation time. For example, on PARSE, CRipser requires about 245–272 seconds for PH computation per epoch, whereas TopoGPU reduces this to about 8–9 seconds. Similar behavior is observed on MSD Brain, where TopoGPU reduces PH computation from about 135–155 seconds to about 13–16 seconds.
Changing the learning rate from to has little impact on runtime, which is expected because the learning rate does not change the network architecture, batch size, input volume, or PH workload. In contrast, changing the batch size affects epoch time differently across datasets. On PARSE, increasing the batch size from 4 to 8 generally reduces the average epoch time, due to fewer training iterations per epoch and better GPU utilization. On MSD Brain, however, the epoch time slightly increases, suggesting that the larger batch introduces additional memory pressure or data-processing overhead.
The architectural comparison shows that Residual 3D U-Net generally has the highest runtime, followed by Attention 3D U-Net and standard 3D U-Net, reflecting the additional computations introduced by residual blocks and attention gates. However, the relative advantage of TopoGPU remains consistent across all three architectures. This indicates that the acceleration is primarily determined by the PH backend rather than the segmentation architecture.
Overall, these results demonstrate that TopoGPU significantly improves the efficiency of topology-aware 3D segmentation training. The main performance gain comes from accelerating PH computation, which is the dominant bottleneck when CRipser is used. TopoGPU therefore enables substantially faster training while maintaining comparable network-side GPU memory usage.
REFERENCES
[1] X. Hu, F. Li, D. Samaras, and C. Chen, “Topology-preserving deep image segmentation,” in Advances in Neural Information Processing Systems, H. Wallach, H. Larochelle, A. Beygelzimer, F. d’Alché-Buc, E. Fox, and R. Garnett, Eds., vol. 32. Curran Associates, Inc., 2019. [Online]. Available: https://proceedings.neurips.cc/paper_files/paper/2019/file/2d95666e2649fcfc6e3af75e09f5adb9-Paper.pdf
TABLE S.VII ARCHITECTURAL COMPARISON OF THE 3D U-NET, ATTENTION 3D U-NET, AND RESIDUAL 3D U-NET MODELS. HERE, DENOTES THE NUMBER OF INPUT CHANNELS, DENOTES THE NUMBER OF SEGMENTATION CLASSES, DENOTES START_FILTERS, AND FOR TRILINEAR UPSAMPLING AND FOR TRANSPOSED-CONVOLUTION UPSAMPLING.
| Stage | 3D U-Net | Attention 3D U-Net | Residual 3D U-Net |
|---|---|---|---|
| Input | |||
| Initial block | DoubleConv3D(, ) | DoubleConv3D(, ) | ResidualDoubleConv3D(, ) |
| Encoder level 1 | MaxPool3D + DoubleConv3D() | MaxPool3D + DoubleConv3D() | MaxPool3D + ResidualDoubleConv3D() |
| Encoder level 2 | MaxPool3D + DoubleConv3D() | MaxPool3D + DoubleConv3D() | MaxPool3D + ResidualDoubleConv3D() |
| Encoder level 3 | MaxPool3D + DoubleConv3D() | MaxPool3D + DoubleConv3D() | MaxPool3D + ResidualDoubleConv3D() |
| Bottleneck | MaxPool3D + DoubleConv3D() | MaxPool3D + DoubleConv3D() | MaxPool3D + ResidualDoubleConv3D() |
| Skip connection level 3 | Direct skip: | AttentionGate3D() | Direct skip: |
| Decoder level 3 | Up3D() | Up3D() | ResidualUp3D() |
| Skip connection level 2 | Direct skip: | AttentionGate3D() | Direct skip: |
| Decoder level 2 | Up3D() | Up3D() | ResidualUp3D() |
| Skip connection level 1 | Direct skip: | AttentionGate3D() | Direct skip: |
| Decoder level 1 | Up3D() | Up3D() | ResidualUp3D() |
| Skip connection level 0 | Direct skip: | AttentionGate3D() | Direct skip: |
| Decoder level 0 | Up3D() | Up3D() | ResidualUp3D() |
| Output layer | Conv3D | Conv3D | Conv3D |
| Output |
TABLE S.VIII 3D U-NET. COMPUTATIONAL EFFICIENCY COMPARISON BETWEEN CRIPSER AND TOPOGPU ON THE PARSE AND MSD BRAIN DATASETS UNDER DIFFERENT TRAINING CONFIGURATIONS. ALL EXPERIMENTS USE THE 3D U-NET ARCHITECTURE. AVERAGE EPOCH TIME AND AVERAGE PERSISTENT HOMOLOGY (PH) COMPUTATION TIME ARE REPORTED IN SECONDS, AND PEAK GPU MEMORY IS REPORTED IN MB.
| Dataset | Training Configuration | Avg. Epoch Time | Avg. PH Time | Peak GPU Memory | Peak GPU Memory | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| Parameter | Value | CRipser | TopoGPU | CRipser | TopoGPU | CRipser | TopoGPU | CRipser | TopoGPU | |
| PARSE | Learning rate | 309.76 | 48.56 | 268.50 | 9.23 | 1912 | 1905 | N/A | 295 | |
| Learning rate | 313.48 | 47.54 | 270.65 | 9.09 | 1917 | 1905 | N/A | 295 | ||
| Batch size | 4 | 309.76 | 48.56 | 268.50 | 9.23 | 1912 | 1905 | N/A | 295 | |
| Batch size | 8 | 284.48 | 43.56 | 245.33 | 8.46 | 2761 | 2761 | N/A | 295 | |
| MSD Brain | Learning rate | 180.01 | 60.58 | 135.38 | 13.43 | 6137 | 6137 | N/A | 295 | |
| Learning rate | 182.24 | 61.72 | 134.97 | 13.18 | 6157 | 6118 | N/A | 295 | ||
| Batch size | 4 | 180.01 | 60.58 | 135.38 | 13.43 | 6137 | 6137 | N/A | 295 | |
| Batch size | 8 | 190.93 | 63.27 | 139.56 | 13.45 | 7294 | 7287 | N/A | 295 | |
Note. PH denotes persistent homology. GPU refers to the device used for network training, whereas GPU refers to the device used by TopoGPU for persistent homology computation.
TABLE S.IX ATTENTION 3D U-NET. COMPUTATIONAL EFFICIENCY COMPARISON BETWEEN CRIPSER AND TOPOGPU ON THE PARSE AND MSD BRAIN DATASETS UNDER DIFFERENT TRAINING CONFIGURATIONS. ALL EXPERIMENTS USE THE ATTENTION 3D U-NET ARCHITECTURE. AVERAGE EPOCH TIME AND AVERAGE PERSISTENT HOMOLOGY (PH) COMPUTATION TIME ARE REPORTED IN SECONDS, AND PEAK GPU MEMORY IS REPORTED IN MB.
| Dataset | Training Configuration | Avg. Epoch Time | Avg. PH Time | Peak GPU Memory | Peak GPU Memory | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| Parameter | Value | CRipser | TopoGPU | CRipser | TopoGPU | CRipser | TopoGPU | CRipser | TopoGPU | |
| PARSE | Learning rate | 315.24 | 52.11 | 270.11 | 8.81 | 2221 | 2221 | N/A | 295 | |
| Learning rate | 310.87 | 53.22 | 266.98 | 8.99 | 2221 | 2263 | N/A | 295 | ||
| Batch size | 4 | 315.24 | 52.11 | 270.11 | 8.81 | 2221 | 2221 | N/A | 295 | |
| Batch size | 8 | 292.39 | 43.68 | 254.62 | 7.97 | 2893 | 2897 | N/A | 295 | |
| MSD Brain | Learning rate | 181.80 | 58.40 | 135.93 | 15.74 | 7543 | 7543 | N/A | 295 | |
| Learning rate | 179.93 | 58.89 | 139.29 | 15.53 | 7544 | 7474 | N/A | 295 | ||
| Batch size | 4 | 181.80 | 58.40 | 135.93 | 15.74 | 7543 | 7543 | N/A | 295 | |
| Batch size | 8 | 198.03 | 65.92 | 143.44 | 15.93 | 8128 | 8128 | N/A | 295 | |
Note. PH denotes persistent homology. GPU refers to the device used for network training, whereas GPU refers to the device used by TopoGPU for persistent homology computation.
[2] S. Kaji, T. Sudo, and K. Ahara, “Cubical Ripser: Software for computing persistent homology of image and volume data,” arXiv e-prints, p. arXiv:2005.12692, May 2020.
[3] G. Luo, K. Wang, J. Liu, S. Li, X. Liang, X. Li, S. Gan, W. Wang, S. Dong, W. Wang, P. Yu, E. Liu, H. Wei, N. Wang, J. Guo, H. Li, Z. Zhang, Z. Zhao, N. Gao, N. An, A. Pakzad, B. Rangelov, J. Dou, S. Tian, Z. Liu, Y. Wang, A. Sivalingam, K. Punithakumar, Z. Qiu, and X. Gao, “Efficient automatic segmentation for multi-level pulmonary arteries: The parse challenge,” 2023.
[4] M. Antonelli, A. Reinke, S. Bakas et al., “The medical segmentation decathlon,” Nature Communications, 2022.
[5] A. L. Simpson, M. Antonelli, S. Bakas, M. Bilello, K. Farahani, B. van Ginneken, A. Kopp-Schneider, B. A. Landman, G. Litjens, B. Menze, O. Ronneberger, R. M. Summers, P. Bilic, P. F. Christ, R. K. G. Do, M. Gollub, J. Golia-Pernicka, S. H. Heckers, W. R. Jarnagin, M. K. McHugo, S. Napel, E. Vorontsov, L. Maier-Hein, and M. J. Cardoso, “A large annotated medical image dataset for the development and evaluation of segmentation algorithms,” 2019.
TABLE S.X
RESIDUAL 3D U-NET. COMPUTATIONAL EFFICIENCY COMPARISON BETWEEN CRIPSER AND TOPOGPU ON THE PARSE AND MSD BRAIN DATASETS UNDER DIFFERENT TRAINING CONFIGURATIONS. ALL EXPERIMENTS USE THE RESIDUAL 3D U-NET ARCHITECTURE. AVERAGE EPOCH TIME AND AVERAGE PERSISTENT HOMOLOGY (PH) COMPUTATION TIME ARE REPORTED IN SECONDS, AND PEAK GPU MEMORY IS REPORTED IN MB.
| Dataset | Training Configuration | Avg. Epoch Time | Avg. PH Time | Peak GPU Memory | Peak GPU Memory | |||||
|---|---|---|---|---|---|---|---|---|---|---|
| Parameter | Value | CRipser | TopoGPU | CRipser | TopoGPU | CRipser | TopoGPU | CRipser | TopoGPU | |
| PARSE | Learning rate | 329.82 | 64.28 | 271.62 | 9.06 | 2283 | 2277 | N/A | 295 | |
| Learning rate | 322.76 | 64.84 | 269.91 | 9.31 | 2223 | 2223 | N/A | 295 | ||
| Batch size | 4 | 329.82 | 64.28 | 271.62 | 9.06 | 2283 | 2277 | N/A | 295 | |
| Batch size | 8 | 301.84 | 56.61 | 249.13 | 8.32 | 3295 | 3295 | N/A | 295 | |
| MSDBrain | Learning rate | 202.28 | 71.59 | 143.84 | 14.80 | 5853 | 5993 | N/A | 295 | |
| Learning rate | 206.53 | 70.59 | 144.99 | 14.42 | 5789 | 5993 | N/A | 295 | ||
| Batch size | 4 | 202.28 | 71.59 | 143.84 | 14.80 | 5853 | 5993 | N/A | 295 | |
| Batch size | 8 | 213.50 | 73.12 | 154.58 | 15.56 | 7207 | 7207 | N/A | 295 | |
Note. PH denotes persistent homology. GPU refers to the device used for network training, whereas GPU refers to the device used by TopoGPU for persistent homology computation.