CuPH: Parallel Cubical Persistent Homology via Level-Synchronous Component Tracking
Organizations: Dept. of Computer Science and Engineering, University of Notre Dame · Dept. of Computer Science, The University of Texas Rio Grande Valley
Abstract
Persistent homology (PH) is a mathematically principled multi-scale topological descriptor of shape and connectivity in data. It is widely applied in image classification, segmentation, and shape analysis across medical and aerial imaging, providing structural information that pixel-wise deep learning may overlook. Standard cubical PH decomposes an image into cubical cells (vertices, edges, and squares) and reduces them sequentially in filtration order. This sequential reduction has parallel depth for an -pixel image, limiting within-image GPU parallelism and constraining its use in topology-aware deep learning. We introduce CuPH, a GPU-based parallel algorithm for computing cubical PH on 2D images that operates directly on pixels rather than cubical cells. CuPH buckets pixels by filtration values, activates them with a level-synchronous sweep, and tracks connected components with a lock-free union-find method. We prove that CuPH produces persistence diagrams identical to standard cubical PH on integer inputs, with a stability bound for floating-point inputs. CuPH reduces parallel depth from to for an image with intensity levels. We implement the level sweep as a single CUDA kernel, eliminating cross-level kernel-launch overhead. Empirically, CuPH is -- faster than the existing GPU baseline (CMP). As a drop-in PH backend, CuPH accelerates topology-aware classification (--) and segmentation (--) while preserving accuracy. It also enables computing full-image PH losses on high-resolution images, improving segmentation Dice by -- points over patch-local PH baselines and accelerating training by --.
Figures & tables
| ISIC 2018 | CBIS-DDSM | Prostate | APTOS | |||||
| Method | Acc | img/s | Acc | img/s | Acc | img/s | Acc | img/s |
| SwinV2-B | ||||||||
| PHG-Net | ||||||||
| PHG-Net ( CuPH ) | ||||||||
| TopoSwin-SP | ||||||||
| TopoSwin-SP ( CuPH ) | ||||||||
| ISIC 2018 (T1) | CREMI | Synapse | |||||||
| Method | Dice | mIoU | img/s | Dice | mIoU | img/s | Dice | HD95 | img/s |
| Baseline (no PH) | |||||||||
| TopoSwin-SP | |||||||||
| TopoSwin-SP ( CuPH ) | |||||||||
| TopoSwin-MP | |||||||||
| TopoSwin-MP ( CuPH ) | |||||||||
| CREMI | Roads | Platelet | |||||||
| Method | Dice | clDice | img/s | Dice | clDice | img/s | Dice | clDice | img/s |
| Topograph (no PH) | |||||||||
| HuTopo | |||||||||
| HuTopo ( CuPH ) | |||||||||
| BettiMatching | |||||||||
| BettiMatching ( CuPH ) | |||||||||
Appendix figures & tables9 assets
Supplementary material from the paper’s appendix.
Appendix
| Task | Dataset | Resolution | Classes | Train / Test | Domain |
| Classification | CBIS-DDSM | / | Mammography | ||
| Prostate Cancer | / | Histopathology | |||
| ISIC 2018 (T3) | / | Dermatology | |||
| APTOS 2019 | / | Ophthalmology | |||
| Segmentation | ISIC 2018 (T1) | / | Dermatology | ||
| CREMI | / | Electron microscopy |
| Method | Device | ISIC (img/s) | CBIS (img/s) | Memory |
|---|---|---|---|---|
| GUDHI | CPU | — | ||
| Cripser | CPU | — | ||
| CMP | GPU | MB | ||
| CuPH (ours) | GPU | MB |
| Method | ISIC 2018 (T3) | CBIS-DDSM | Prostate | APTOS |
|---|---|---|---|---|
| SwinV2-B | / / | / / | / / | / / |
| PHG-Net | / / | / / | / / | / / |
| PHG-Net ( CuPH ) | / / | / / | / / | / / |
| TopoSwin-SP | / / | / / | / / | / / |
| TopoSwin-SP ( CuPH ) | / / | / / | / / | / / |
| TopoSwin-MP | / / | / / | / / | / / |
| Input | pairs | pairs | max BD | max WD 2 | Speedup | |
|---|---|---|---|---|---|---|
| uint8 | ||||||
| uint16 | ||||||
| float32 | ||||||
| float32 | ||||||
| float32 | ||||||
| float32 |
| Input | CuPH GPU (batch ) | Cripser CPU RSS ( workers, aggregate) | |
|---|---|---|---|
| uint8 | MB | GB ( MB ) | |
| uint16 | MB | GB ( MB ) | |
| float32 | MB | GB ( MB ) | |
| float32 | MB | GB |
| Variant | img/s | Slowdown |
|---|---|---|
| CuPH (full) | ||
| without Level Bucketing | ||
| without Parallel Level Sweep | ||
| without Level Bucketing and Parallel Level Sweep |
| Variant | uint16 ( ) | float32 ( ) |
|---|---|---|
| CuPH (full) | ( ) | ( ) |
| without Level Bucketing | ( ) | ( ) |
| without Parallel Level Sweep | ( ) | ( ) |
| without both | ( ) | ( ) |
| Removed optimization | uint8 ( ) | uint16 ( ) | float32 ( ) |
|---|---|---|---|
| shared-memory histogram | |||
| GPU memory pool | |||
| path halving | |||
| lock-free Component Tracking | — | — |
| Threads / block | uint8 ( ) | uint16 ( ) | float32 ( ) |
|---|---|---|---|
| (default) | |||
Persistent Homology
Persistent homology tracks how connected components, loops, and higher-dimensional holes appear and disappear across data filtrations.
See all 52 papers