# A GPU Engine for Sparse Matrix-Vector Products on $k^2$-Tree-Compressed Graphs

DevFeed: [A GPU Engine for Sparse Matrix-Vector Products on $k^2$-Tree-Compressed Graphs](<https://devfeed.tech/articles/a-gpu-engine-for-sparse-matrix-vector-products-on-k-2-tree-compressed-graphs-113661.md>)

Original publisher: [Read original article](<https://arxiv.org/abs/2611.03610>)

Author: Francesco Tosoni, Gabriele Mencagli

Published: 2026-11-03T05:00:00Z

Content type: article

Language: en

Sources: [arXiv: Databases](<https://devfeed.tech/sources/arxiv-databases.md>), [arXiv: Distributed Computing](<https://devfeed.tech/sources/arxiv-distributed-computing.md>)

Topics: [Algorithms](<https://devfeed.tech/topics/algorithms.md>), [graph theory](<https://devfeed.tech/topics/graph-theory.md>), [Graph Mining](<https://devfeed.tech/topics/graph-mining.md>)

Tags: [batch](<https://devfeed.tech/tags/batch.md>), [boolean](<https://devfeed.tech/tags/boolean.md>), [cs-db](<https://devfeed.tech/tags/cs-db.md>), [cs-dc](<https://devfeed.tech/tags/cs-dc.md>), [cs-ds](<https://devfeed.tech/tags/cs-ds.md>), [cs-ms](<https://devfeed.tech/tags/cs-ms.md>), [directory](<https://devfeed.tech/tags/directory.md>), [edge](<https://devfeed.tech/tags/edge.md>), [engine](<https://devfeed.tech/tags/engine.md>), [format](<https://devfeed.tech/tags/format.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [graph](<https://devfeed.tech/tags/graph.md>), [matrix](<https://devfeed.tech/tags/matrix.md>), [memory](<https://devfeed.tech/tags/memory.md>), [nvidia](<https://devfeed.tech/tags/nvidia.md>), [parallel](<https://devfeed.tech/tags/parallel.md>), [prefix-sum](<https://devfeed.tech/tags/prefix-sum.md>), [product](<https://devfeed.tech/tags/product.md>), [rank](<https://devfeed.tech/tags/rank.md>), [right](<https://devfeed.tech/tags/right.md>), [social](<https://devfeed.tech/tags/social.md>), [traversal](<https://devfeed.tech/tags/traversal.md>), [trees](<https://devfeed.tech/tags/trees.md>), [vector](<https://devfeed.tech/tags/vector.md>)

## AI overview

The GPU engine makes SpMV on k²-tree-compressed graphs more memory-efficient by exploiting the fact that tree traversal is independent of the input vector: child positions are computed level by level using a parallel prefix sum or a sampled directory of about 0.1 bits per node. Tiled traversal bounds temporary memory by tree depth, and the same method supports left and right products, single vectors or batches, and plus-times, Boolean, and tropical semirings. Across fourteen graphs of up to 1.2 billion edges, the tree was 2.3-27x smaller than cuSPARSE's CSR. With the last internal level cached, runtime ranged from 0.7-2.4x cuSPARSE for right products and 0.27-2.6x for left products. On the largest graph, a product used 1.1 GB of device memory, 9x less than cuSPARSE. The results characterize the engine as memory-bounded: its strongest case is when device memory is the limiting constraint.

## Source excerpt

arXiv:2611.03610v1 Announce Type: cross Abstract: The $k^2$-tree is a compact representation of Boolean matrices: it stores the recursive hierarchy of their non-empty submatrices, with neither values nor coordinates, and serves rows and columns alike. Its traversal, however, locates the children of each node by rank queries, a chain of dependent irregular loads that leaves a GPU waiting on memory. We implement sparse matrix-vector multiplication (SpMV) on $k^2$-trees for the GPU. Since the traversal does not depend on the vector, the positions of the children are static: we descend the tree one level at a time and obtain them from a parallel prefix sum or from a sampled directory of about 0.1 bits per node. Descending in tiles bounds the temporary memory by the depth of the tree, so the device memory of a product is known before it runs. The same traversal computes right and left products, for one vector or a batch, over the plus-times, Boolean and tropical semirings. We evaluate the engine on an NVIDIA GB10 and an H100 with fourteen Wikidata, Software Heritage, web and social graphs of up to 1.2 billion edges, against cuSPARSE, a grammar-compressed GPU engine and a Boolean CSR. Our results show that the tree is 2.3-27x smaller than the CSR of cuSPARSE and that, with its last internal level cached, a product takes 0.7-2.4x the time of cuSPARSE on the right and 0.27-2.6x on the left. On a 1.2-billion-edge graph, a product needs 1.1 GB on the device, 9x less than cuSPARSE. The engine is memory bounded: the $k^2$-tree is the format of choice when device memory, not time, is the constraint.