arXiv:2610.10959cs.CVOct 2026

Manuscript Offprint

arXiv:2610.10959

GPU-Accelerated Computation of Persistent Homology for Topological Analysis of Image Data

Fan Wang, Hubert Wagner, Rezaul Chowdhury, Chao Chen

Fan Wang D◯\textcircled{D}, Hubert Wagner D◯\textcircled{D}, Rezaul Chowdhury D◯\textcircled{D}, and Chao Chen D◯\textcircled{D}

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 53.24×53.24\times and a maximum of 198.01×198.01\times. 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 53.24×53.24\times and 198.01×198.01\times.

• 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 46.13×46.13 \times average and up to 54.81×54.81 \times 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.