Table of Contents
Fetching ...

GPU Implementation of the Wavelet Tree

Marco Franzreb, Martin Burtscher, Stephan Rudolph

TL;DR

The paper addresses efficient GPU-based implementation of the wavelet tree to enable high-throughput access, rank, and select queries for compressed text indexing tasks such as fm-index-based genomics pipelines. It introduces GPU-optimized binary rank and select structures built atop bit arrays, paired with a top-down, radix-sort–driven wavelet-tree construction and multiple level-wise optimizations. Empirical results show substantial throughput improvements over CPU baselines and the SDSL library, particularly for large query workloads, while construction remains the main bottleneck due to data transfer overhead. The work outlines concrete future directions, including chunked construction to hide copy latency, a custom radix sort, and extending the approach to wavelet matrix and Huffman variants, underscoring the practical impact for large-scale genomic and text-processing tasks on modern GPUs.

Abstract

I present a new GPU implementation of the wavelet tree data structure. It includes binary rank and select support structures that provide at least 10 times higher throughput of binary rank and select queries than the best publicly available CPU implementations at comparable storage overhead. My work also presents a new parallel tree construction algorithm that, when excluding the time to copy the data from the CPU to the GPU, outperforms the current state of the art. The GPU implementation, given enough parallelism, processes access, rank, and select queries at least 2x faster than the wavelet tree implementation contained in the widely used Succinct Data Structure Library (SDSL), including the time necessary to copy the queries from the CPU to the GPU and the results back to the CPU from the GPU.

GPU Implementation of the Wavelet Tree

TL;DR

The paper addresses efficient GPU-based implementation of the wavelet tree to enable high-throughput access, rank, and select queries for compressed text indexing tasks such as fm-index-based genomics pipelines. It introduces GPU-optimized binary rank and select structures built atop bit arrays, paired with a top-down, radix-sort–driven wavelet-tree construction and multiple level-wise optimizations. Empirical results show substantial throughput improvements over CPU baselines and the SDSL library, particularly for large query workloads, while construction remains the main bottleneck due to data transfer overhead. The work outlines concrete future directions, including chunked construction to hide copy latency, a custom radix sort, and extending the approach to wavelet matrix and Huffman variants, underscoring the practical impact for large-scale genomic and text-processing tasks on modern GPUs.

Abstract

I present a new GPU implementation of the wavelet tree data structure. It includes binary rank and select support structures that provide at least 10 times higher throughput of binary rank and select queries than the best publicly available CPU implementations at comparable storage overhead. My work also presents a new parallel tree construction algorithm that, when excluding the time to copy the data from the CPU to the GPU, outperforms the current state of the art. The GPU implementation, given enough parallelism, processes access, rank, and select queries at least 2x faster than the wavelet tree implementation contained in the widely used Succinct Data Structure Library (SDSL), including the time necessary to copy the queries from the CPU to the GPU and the results back to the CPU from the GPU.
Paper Structure (30 sections, 2 equations, 37 figures, 1 table, 8 algorithms)

This paper contains 30 sections, 2 equations, 37 figures, 1 table, 8 algorithms.

Figures (37)

  • Figure 4.1: Example of bit storage inside words in the bit array, using 4-bit words.
  • Figure 4.2: Illustration of the binary select algorithm using the rank and select structures.
  • Figure 5.1: Figure taken from wavelet_matrix. Only the bit arrays, in bold, and the tree topology are stored. For the level-wise extended version, we also store the cumulative histogram of the text, from which we can infer the node separations (bold vertical lines).
  • Figure 5.2: Comparison between the original tree structure when using the bits of the minimal alphabet ($\Sigma$) to create the structure, and the structure when codes are used for the symbols equal to or larger than the previous power of two of the alphabet size ($\Sigma'$). The intervals inside of the nodes denote the characters in the alphabet that are considered by the node. In both cases it refers to the minimal alphabet.
  • Figure 5.3: Comparison of CUB's histogram implementation with my own, which is either launched with as many threads as the size of the text (large grid) or as many threads as necessary to fully occupy the GPU (small grid). Texts are uniformly randomly generated. Run on an NVIDIA RTX 3090.
  • ...and 32 more figures