TL;DR
ParamSpMM introduces a highly adaptive, parametric framework for optimizing Sparse Matrix-Matrix Multiplication (SpMM) on GPUs, a core computational bottleneck in Graph Neural Network (GNN) training. By combining a novel flexible data structure (PCSR) with a machine learning-based configuration decider, it achieves an average 1.92× speedup over NVIDIA's cuSPARSE and significantly accelerates end-to-end GNN training.
What Problem Does This Paper Address?
Graph Neural Networks (GNNs) rely heavily on SpMM to aggregate neighbor embeddings across graph structures. However, real-world graphs vary wildly in their data locality, degree distributions (e.g., Poisson vs. Power-law), and embedding dimensions.
Existing GPU optimization techniques—such as blocking, workload balancing, and thread coarsening—are typically applied statically or via rigid heuristics. As a result, a technique that speeds up computation for one graph might severely degrade it for another. For instance, workload balancing adds unnecessary atomic write overhead to naturally balanced graphs, while blocking can introduce excessive zero-padding in ultra-sparse matrices. Existing frameworks lack the flexibility to dynamically mix, match, and tune these optimizations based on the incoming graph's unique properties.
Methods
The authors tackle this rigidity by introducing a fully customizable framework consisting of three main components:
- Parametric Optimization Space: ParamSpMM parameterizes four key optimization choices into a single configuration tuple $\langle W, F, V, S \rangle$:
- $V$: Vector Size for vectorized blocking.
- $S$: A boolean flag indicating whether to apply workload balancing.
- $F$: Coarsening Factor for thread coarsening.
- $W$: Thread block size.
- Parameterized Compressed Sparse Row (PCSR): A novel variant of the classic CSR format designed to seamlessly support these combined optimizations. As shown in the paper's structural examples, PCSR groups nonzeros into $V \times 1$ vectors to maximize data reuse and introduces a
TRowarray to dynamically map workloads across GPU warps when balancing ($S = \text{True}$) is enabled. - ML-based SpMM-decider: To avoid the impossible task of manually tuning these parameters for every new graph, the authors trained a lightweight Random Forest model. It analyzes graph features (size, degree distribution, and data locality) to predict the optimal configuration. They introduce two specific metrics to guide the model: Padding Ratio ($PR_V$) and Split Ratio ($SR$).
Additionally, the framework integrates Rabbit Reordering as a default preprocessing step to enhance data locality and minimize zero-padding during blocking.

Datasets
- SpMM Evaluation & Training: 202 diverse real-world matrices collected from the SNAP and DIMACS10 datasets, spanning sizes from 1,000 to 8,000,000 rows.
- GNN Evaluation: 6 large-scale graphs from the Open Graph Benchmark (OGB), kept entirely unseen by the SpMM-decider during its training phase to ensure fair generalization testing.
Key Insights and Ideas
- One Size Never Fits All: Blindly applying workload balancing can actively harm performance on graphs with naturally balanced degree distributions due to increased memory writes and bookkeeping overhead.
- The "MAC-job Gap": Thread coarsening can introduce severe resource waste if the embedding dimension isn't a clean multiple of the warp size times the coarsening factor. ParamSpMM explicitly quantifies this residual warp gap to optimize thread scheduling.
- Co-designing Data Structures and Kernels: Instead of forcing a kernel to adapt to a rigid format, PCSR adapts the data layout to the chosen optimization parameters, enabling zero-overhead execution during the GPU computing phase.

Key Results
- Kernel Performance: ParamSpMM achieves substantial speedups over standard libraries and state-of-the-art frameworks: 1.92× over NVIDIA cuSPARSE, 2.41× over GE-SpMM, 1.55× over GNNAdvisor, and 1.64× over DA-SpMM.
- ML Accuracy: The SpMM-decider is highly effective, achieving over 99% of the theoretical optimal performance across most embedding dimensions.
- End-to-End GNN Training: When integrated into PyTorch, it delivers an average speedup of 1.60× (up to 2.19×) for GCNs and 1.61× (up to 2.59×) for GINs compared to the vendor-standard Deep Graph Library (DGL).
Limitations and Future Work
- Amortization Dependency: The framework relies on the fact that PCSR generation and graph reordering costs are amortized over hundreds of training epochs. For one-off inference tasks or highly dynamic graphs where the structure changes constantly, this preprocessing overhead might diminish the performance gains.
- Hardware Specifics: The current evaluation focuses strictly on NVIDIA GPUs (Ampere architecture). Extending the ML decider and parametric kernels to other architectures, such as AMD GPUs or specialized AI accelerators, remains an open direction.
Summary updated