Papers
Topics
Authors
Recent
Search
2000 character limit reached

Faster Cache-Efficient Pattern Matching for Deterministic Wheeler Pangenome Graphs

Published 2 Jul 2026 in cs.DS | (2607.02113v1)

Abstract: Pattern matching on strings is regarded as one of the core operations in computer science. Although researchers proposed several solutions to this problem, some of the most elegant and widely used approaches are based on the renowned Burrows-Wheeler transform (BWT). The success of the BWT lies in its pattern matching algorithm known as backward search, which is not only near-optimal in the RAM model, but also runs directly on a compressed representation of the input string. More recently, the backward search has been generalized to Wheeler deterministic finite automata (DFAs), a subclass of standard DFAs, without losing its near-optimal time efficiency. Similarly to the case of strings, this pattern matching algorithm for Wheeler DFAs has found applications in bioinformatics, where researchers have shown that specific pangenome graphs of human chromosomes can be transformed into Wheeler DFAs and consequently indexed using this strategy. However, this BWT-based index on Wheeler DFAs inherited a significant drawback from the original backward search, namely the high number of I/O operations triggered during the algorithm execution, which are in the worst-case lower-bounded by the length of the pattern. In this paper, we address this limitation by proposing the first cache-friendly algorithm specifically designed for Wheeler DFAs. Our new data structure reduces the number of I/O operations by employing a strategy analogous to the suffix array: it interleaves a binary search with fast sequential scans of the automaton. We empirically validate this new indexing strategy by running our algorithm on real-world Wheeler pangenome graphs. We show that while our data structure can use up to 15 times the space required by the backward search, it can also be 500 times faster and able to process a single character of the pattern in less than 3 ns.

Summary

  • The paper introduces Gr-SA, a cache-aware Graph Suffix Array that drastically reduces I/O operations for pattern matching on deterministic Wheeler pangenome graphs.
  • It leverages heavy-light decomposition and unary path decomposition to achieve sub-microsecond query latencies and up to 500x speed improvements compared to traditional methods.
  • Empirical results validate near-optimal I/O complexity and practical memory usage, setting a new standard for scalable genomic data analysis.

Cache-Efficient Pattern Matching on Deterministic Wheeler Pangenome Graphs

Introduction

The paper "Faster Cache-Efficient Pattern Matching for Deterministic Wheeler Pangenome Graphs" (2607.02113) analyzes the limitations of existing Burrows-Wheeler Transform (BWT)-based pattern matching algorithms on Wheeler automata, especially in the context of large pangenomic graphs. While the extension of BWT principles to automata (Wheeler deterministic finite automata, or WDFAs) allows for efficient pattern queries, the original backward/forward search approach triggers I/O costs proportional to the pattern length, which restricts practical scalability for large datasets typically seen in bioinformatics applications. The work presents a novel, cache-aware indexing technique, termed the Graph Suffix Array (Gr-SA), that drastically reduces cache misses at the expense of increased—but manageable—memory footprint.

Methodology and Data Structures

The authors generalize the classic string suffix array paradigm to deterministic Wheeler automata by exploiting the total order on states induced by Wheeler automata properties. The core operation, determining the occurrence of a pattern PP in a WDFA with nn states, is decomposed into three phases:

  1. Prefix Localization: Identify the longest prefix β\beta of PP such that β\beta matches at least two distinct states, leveraging infimum and supremum strings associated with WDFA states. This search operates in O((mB+logn)lognlogm)\mathcal O\left((\frac{m}{B} + \log n)\log n \log m \right) I/O operations, with m=Pm = |P| and cache block size BB.
  2. Transition Verification: If P=βaγP = \beta a\gamma, efficiently probe for the existence of a transition labeled aa out of states matched by nn0, using succinct signature representations that enable nn1 I/O probes, with nn2 the alphabet size.
  3. Path Navigation: For the pattern suffix nn3, traverse the automaton using path-decomposed data (unary path decomposition) to ensure the number of cache misses is bounded by nn4, with nn5 being the number of maximal unary paths traversed.

A salient component is the use of heavy-light decomposition on infimum and supremum pseudoforests, ensuring path queries in the automaton can be executed cache-efficiently. Figure 1

Figure 1: Mean number of traversed unary paths nn6 during locate(nn7) as function of pattern length nn8 (log-log scale), averaged over nn9 random queries on pangenome graphs. β\beta0 is typically two orders of magnitude less than β\beta1.

Empirical Evaluation

The Gr-SA approach was benchmarked on Wheeler pangenome graphs derived from the dbSNP database, specifically on human chromosomes 21 and 14, and compared to a baseline forward search BWT index. Empirical results confirm that for realistic genomic graphs, the parameter β\beta2 (number of unary paths traversed) is about two orders of magnitude smaller than the pattern length β\beta3 (as seen in Figure 1), confirming the practical cache efficiency of the approach.

Key results include:

  • Speed: The Gr-SA index is up to 500x faster than traditional forward search, with per-character query latencies as low as β\beta4 ns versus nearly β\beta5s for the baseline.
  • Space: The Gr-SA consumes up to 15x more space than the forward search index, but remains within practical limits—never exceeding β\beta6 GB RAM even on the largest graphs tested.
  • Cache Miss Profile: The improved index drastically reduces random access operations by interleaving binary search over automaton state orders with large contiguous memory scans enabled by the unary path decomposition.

Theoretical Analysis

The paper supplies rigorous proofs showing that the Gr-SA index has, under realistic assumptions about automaton sparsity (as present in biological pangenome graphs), near-optimal I/O complexity for subpath queries. By partitioning the computation over β\beta7, each phase's complexity is controlled, and infimum/supremum forests, path coherence, and input-consistency properties guarantee correctness and state interval contiguity.

For patterns with multiple occurrences, the index achieves improved time and space complexity, returning all matched states without explicit traversal, requiring only a single binary search operation.

Implications and Future Directions

The results presented strongly suggest that suffix array-inspired, cache-efficient pattern matching strategies can scale to the demands of gigascale pangenomic data, provided automaton determinism and input-consistency properties (e.g., Wheeler order) are satisfied. The techniques may generalize to non-genomic workloads involving large, sparse, regular languages—potentially impacting search, verification, and string processing tasks in both theory and computational practice.

Two divergent directions suggest themselves for future research:

  • Compressed Representations: Addressing the memory blowup, perhaps via succinct or compressed representations of the unary path map and transition tables, may bring Gr-SA to even larger graphs—e.g., population-scale human pan-genomes.
  • Extensions to Nondeterminism or Partial Wheeler Orders: The extension of these results to Wheeler NFAs or partial Wheeler graphs, common in certain bioinformatics contexts, remains open and nontrivial.

Conclusion

"Faster Cache-Efficient Pattern Matching for Deterministic Wheeler Pangenome Graphs" (2607.02113) rigorously demonstrates that indexing strategies inspired by suffix arrays and heavy-path decompositions overcome the primary I/O bottleneck of BWT-pattern matching on large Wheeler automata. By judiciously trading moderate additional RAM usage for drastic I/O reductions, the proposed Graph Suffix Array allows sub-microsecond queries on gigascale pangenome graphs, with robust empirical validation supporting the strong theoretical claims. This work sets a new bar for scalable, cache-aware pattern matching in the context of deterministic automata, especially relevant to population genomics and large-scale sequence analysis.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 1 tweet with 2 likes about this paper.