Abstract
Training high-resolution 3D point cloud models requires loss functions that balance geometric fidelity with computational efficiency. While the Adaptive Probabilistic Matching Loss (APML) offers a superior alternative to Chamfer Distance and Earth Mover Distance, its original dense implementation suffers from quadratic memory scaling. We present CUDA-APML, a sparse GPU-accelerated implementation that leverages the inherent sparsity of transport plans. By performing Sinkhorn iterations directly on sparse matrices, CUDA-APML reduces peak memory usage by up to 99.9%, enabling high-fidelity 3D supervision at scales and batch sizes previously impossible on standard hardware.
1. Introduction
In 3D deep learning, models typically output unordered sets of points. To optimize these models, researchers require "permutation-invariant" loss functions to compare predicted points against a ground-truth set. Historically, this has forced a choice between two suboptimal options:
- Chamfer Distance (CD): Computationally efficient but prone to "many-to-one" matching, which often leads to point clustering and poor geometric coverage.
- Earth Mover Distance (EMD): Provides rigorous "one-to-one" matching but is computationally expensive, scaling quadratically ($O(N^2)$) in both time and memory.
APML was developed as a middle ground, utilizing Sinkhorn iterations to approximate optimal transport. However, even APML’s original dense implementation suffered from quadratic memory growth, requiring as much as 300 GB of GPU memory for high-resolution models—far exceeding the capacity of standard research hardware.
2. Methods: The Sparse CUDA-APML Framework
The core innovation of CUDA-APML is the transition from dense matrix operations to a sparse GPU implementation. This approach is based on the observation that in a transport plan, the vast majority of point-to-point assignments have negligible probability. By ignoring the 99% of the matrix that does not contribute to the gradient signal, the implementation slashes resource costs while preserving accuracy.
2.1 Technical Implementation
The authors developed custom CUDA kernels to manage the sparse workflow without ever "materializing" a dense $N \times M$ matrix in memory. Key steps include:
- Adaptive Softmax Thresholding: The algorithm identifies a "support set" of indices where the matching probability is significant, discarding the rest.
- Coordinate (COO) Format: The transport plan is stored and manipulated in COO format, which only tracks the row, column, and value for non-zero entries.
- On-Device Symmetrization & Sinkhorn: Custom kernels perform bidirectional symmetrization and Sinkhorn normalization directly on the sparse support set.
- Fused Kernels: To maximize efficiency, a two-pass approach is used: the first pass scans for minima and counts non-zeros, while the second pass writes the sparse triples and normalizes them.
3. Experimental Results
The researchers evaluated CUDA-APML across two primary benchmarks to test its performance on reconstruction and cross-modal tasks.
3.1 3D Point Cloud Completion
Using ShapeNet-34, ShapeNet-55, and PCN, the authors demonstrated that CUDA-APML matches the performance of dense APML within a tiny tolerance. On ShapeNet-34, it achieved an EMD score of 9.5, significantly outperforming Chamfer Distance (27.7) and other variants like InfoCD (22.3).
3.2 Cross-Modal Generation
On the MM-Fi dataset, which pairs WiFi CSI signals with LiDAR-based 3D human point clouds, CUDA-APML showed qualitative superiority. Visual results indicate that the loss function produces more coherent human silhouettes with fewer isolated points and gaps compared to models trained with Chamfer-based losses.
4. Memory and Efficiency Analysis
The most significant impact of CUDA-APML is its memory scaling. While the dense version grows quadratically, the sparse version’s memory footprint scales near-linearly with the number of points in the support set.
On ShapeNet-55 with 65,000 points, CUDA-APML reduced peak GPU memory from 68 GB to 17.1 MB—a 99.9% reduction. This efficiency effectively "unlocks" high-resolution 3D learning, allowing it to be dropped into existing pipelines (like FoldingNet or PoinTr) as a direct replacement for CD or EMD.
5. Limitations and Future Work
Despite the memory breakthroughs, the authors note that the distance evaluation remains quadratic ($O(NM)$) in the current implementation. This is because the adaptive softmax stage still requires a scan of all pairs to identify the minima for thresholding.
Future Directions: * Sub-quadratic Scaling: Implementing neighborhood pruning or approximate nearest neighbor (ANN) searches to make the initial distance calculation more efficient. * Scene-Level Applications: Testing the method on larger digital twin applications and scene-level datasets where point counts are significantly higher than individual object models.
6. Conclusion
CUDA-APML demonstrates that the computational barriers to high-fidelity 3D supervision can be overcome through clever sparse implementation. By reducing memory requirements by three orders of magnitude, this work enables researchers to utilize optimal transport-based losses at scales previously reserved for high-performance computing clusters.
Summary updated