arXiv:2610.21264cs.DBOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.21264

AdaBool: Sparse Boolean Matrix Processing with Adaptive Data Representation

Xiangrui Yang, Yifan Lei, Jiawei Yang, Yekang Zhan, Yuxin Zheng, Lei Mao, Zhaoren Wu, Yibo Huang, Yiming Qiu

Xiangrui Yang ∗^{*}

The University of Hong Kong

Hong Kong SAR, China

yxr620@gmail.com

Yifan Lei ∗^{*}

Tencent Inc.

China

yifanlei@tencent.com

Yekang Zhan

Huazhong University of Science and

Technology

China

zhanyekang@hust.edu.cn

Zhaoren Wu

Tencent Inc.

China

jasonzrwu@tencent.com

Yuxin Zheng

Tencent Inc.

China

yuxinzheng@tencent.com

Jiawei Yang

Huazhong University of Science and

Technology

China

wadeyoung718@gmail.com

Yibo Huang

University of Michigan

USA

ybhuang.cs@gmail.com

Lei Mao

Tencent Inc.

China

ivanmao@tencent.com

Yiming Qiu

The University of Hong Kong

Hong Kong SAR, China

yimingq@hku.hk

Abstract

Many data processing tasks revolve around determining whether logical relationships exist between two sets of entities, a pattern that can be naturally modeled as Sparse Boolean Matrix Multiplication (SpBMM). Under Boolean semantics, matrix representations no longer need to store numerical values and instead focus on encoding the positions of non-zero elements, making it highly amenable to data compression for substantially lower memory access overhead. The key challenge, however, is that the most effective compression depends heavily on sparsity distribution: different methods perform best at different sparsity levels, while real-world matrices often contain sharply varying sparsity across regions. Consequently, forcing the entire matrix into any fixed, monolithic representation leaves considerable optimization opportunities untapped.

We present AdaBool, a SpBMM framework designed to reconcile this tension through an adaptive data representation. AdaBool partitions matrices into fine-grained element blocks and represents each block with the encoding best matched to its local sparsity. On top of this adaptive encoding, AdaBool introduces a heterogeneous GPU execution model that groups blocks by encoding type and maps them to matching processing paths, enabling efficient execution and scheduling across GPU resources. We implement AdaBool end to end with low-level system optimizations, evaluate it on both production and public workloads, and show that it outperforms representative baselines by over an order of magnitude.

1 Introduction

Many data processing tasks in modern systems ultimately ask a simple question: what relationships exist between two sets of entities? This question arises across a range of settings, including filtering and matching in retrieval and recommendation systems [6, 42, 53, 54], as well as reachability analysis in graph databases [2]. A natural way to express such workloads is to encode entities and their relationships as matrices and vectors, turning relationship evaluation into a matrix processing problem. In practice, these matrices are often both sparse and Boolean: most possible relationships do not exist, and the computation only needs to determine existence rather than compute a numerical value [45, 59]. This makes Sparse Boolean Matrix Multiplication (SpBMM) a natural abstraction for a wide range of data processing tasks, as it reduces computation in general Sparse Matrix Multiplication (SpMM) [8, 58] to simple Boolean operations. As modern data systems scale to millions of entities, efficient SpBMM becomes increasingly critical for sustaining high efficiency in production environments [2, 6, 16, 33].

Today, GPUs are widely employed to accelerate data processing tasks, as they offer abundant parallelism for matrix computations [22, 46, 51, 57]. To exploit matrix sparsity, GPU computation is formulated not on dense arrays, but on encoded sparse structures that bypass zero-valued positions. For this reason, data representation is fundamental to SpMM performance: whatever execution or memory optimization a system applies, it must ultimately build on some assumption about how sparse structures are encoded and accessed. This dependence becomes even stronger in SpBMM, where computation becomes cheaper as numerical arithmetic is replaced by lightweight Boolean processing, yet the overhead of accessing sparse structures remains. As such, SpBMM is inherently a memory-bound workload [44]. A data representation that can be accessed efficiently across the GPU memory hierarchy therefore becomes crucial for the end-to-end performance of SpBMM systems.

Prior sparse matrix processing systems largely share a common design assumption: they commit to a fixed, monolithic data representation to encode entire matrices [10, 11, 21, 38, 47]. General SpMM frameworks, for example, are commonly built on formats such as Compressed Sparse Row (CSR), which store non-zero values and their indices in dedicated arrays [23]. Existing works then layer increasingly sophisticated scheduling strategies and memory access optimizations on top of this representation in an effort to improve

∗^{*}Both authors contributed equally to this research.

performance [21, 47, 49, 59]. However, once the representation itself is fixed, these optimizations can only explore the design space constrained by that choice. This restriction is especially important for SpBMM, as the following observations illustrate.

• Opportunities for compression. Since elements in Boolean matrices denote logical existence rather than numerical quantities, the main burden of data representation shifts from storing element values to encoding the positions of non-zero entries [38]. This opens the door to lossless data compression [9, 56], using either (1) an offset array that stores relative offsets of indices rather than their absolute positions, or (2) a bitmap format that encodes a contiguous range of positions with one bit per position.

• Dependence on sparsity level. No compressed data structure is universally optimal; the better choice depends on sparsity. When a matrix is highly sparse, most positions are zero-valued. In this case, offset-style compression is more effective because it can skip zero-valued positions, whereas a bitmap still allocates one bit to each position in the range. When sparsity is lower and non-zero entries become denser, per-entry compression starts to dominate instead. In this case, bitmaps become more efficient than offset arrays because they encode each position with a single bit.

• Skewness in sparsity distribution. Boolean matrices in real world settings usually come with highly-skewed sparsity distributions [12, 66], which means different regions of the same matrix may present distinct sparsity levels. In other words, there is no one-size-fits-all data structure even if we know the characteristics of the matrix a priori. Strong performance lies in adapting the choice of compression method based on the sparsity of fine-grained matrix regions, rather than that of entire matrices.

These properties suggest that sparse Boolean matrices should not be forced into a monolithic representation with a single data structure. Instead, it calls for an adaptive representation that leverages the strengths of different data structures at the granularity of matrix regions. Realizing this idea hinges on answering two questions: which data structures should be used, and when to use them. To answer the first, we need to devise data structures that are specialized to different sparsity levels, so that together they can cover fine-grained local sparsity variation. To answer the second, we must quantify local sparsity in a way that allows each region to be assigned the most suitable structure. To this end, we introduce the AdaBool representation, an adaptive Boolean data representation for SpBMM. AdaBool partitions each matrix row into small, fixed-size element blocks, evaluates the local sparsity level of each block by counting its non-zero positions, and adaptively encodes each block using either a family of offset-based arrays or a dense bitmap structure, whichever best matches that block's sparsity level.

To fully exploit the optimization space enabled by the adaptive data representation, the GPU execution must also move beyond a monolithic pass over a fixed format. We therefore organize the AdaBool execution model around three representation-driven principles. First, AdaBool applies role-aware encoding: matrix encodings are configured according to their role in the computation so that the conversion process of the adaptive data representation stays off the runtime critical path. Second, AdaBool adopts type-based execution: regions encoded with different data structures are grouped into separate pools and processed by different GPU kernels, keeping each kernel's workload homogeneous and enabling more efficient, coalesced memory accesses. Third, building on this type-aware organization, AdaBool enables block-level scheduling: element blocks within the same pool share the same type and size, allowing lightweight, fine-grained scheduling strategies that balance workload across GPU execution units without heavy runtime mechanisms. Together, these designs turn the heterogeneous AdaBool representation into an efficient and balanced GPU execution substrate.

We implement AdaBool data representation and execution model end to end as a practical SpBMM processing system, which further incorporates lower-level system optimizations to matrix memory layout and metadata indexing, reducing irregular accesses and improving data movement efficiency during execution. We evaluate the AdaBool system through extensive microbenchmarking, validation on real-world datasets from both our production environment and public sources, comparisons against state-of-the-art systems, and detailed ablation analyses. Across these experiments, the benefits of adaptive data representation, the GPU execution model, and the system optimizations compound effectively in practice, enabling AdaBool to outperform prior designs by more than an order of magnitude. Our key contributions are outlined as follows:

• We characterize real-world SpBMM tasks, including AdsFilter, an open-sourced dataset from our production recommendation pipeline, and identify key challenges and opportunities.

• We design [3] the AdaBool framework, centered on an adaptive data representation, supported by a heterogeneous execution model with corresponding system optimizations.

• We implement and evaluate AdaBool, showing substantial performance gains over representative state-of-the-art systems.