U-index: A Universal Indexing Framework for Matching Long Patterns

Fuente: arXiv
Gespeichert in:
Bibliographische Detailangaben
Hauptverfasser: Ayad, Lorraine A. K., Fici, Gabriele, Koerkamp, Ragnar Groot, Loukides, Grigorios, Patro, Rob, Pibiri, Giulio Ermanno, Pissis, Solon P.
Format: Preprint
Veröffentlicht: 2025
Schlagworte:
Online-Zugang:
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
_version_ 1866911420091727872
author Ayad, Lorraine A. K.
Fici, Gabriele
Koerkamp, Ragnar Groot
Loukides, Grigorios
Patro, Rob
Pibiri, Giulio Ermanno
Pissis, Solon P.
author_facet Ayad, Lorraine A. K.
Fici, Gabriele
Koerkamp, Ragnar Groot
Loukides, Grigorios
Patro, Rob
Pibiri, Giulio Ermanno
Pissis, Solon P.
contents Text indexing is a fundamental and well-studied problem. Classic solutions either replace the original text with a compressed representation, e.g., the FM-index and its variants, or keep it uncompressed but attach some redundancy - an index - to accelerate matching. The former solutions thus retain excellent compressed space, but are slow in practice. The latter approaches, like the suffix array, instead sacrifice space for speed. We show that efficient text indexing can be achieved using just a small extra space on top of the original text, provided that the query patterns are sufficiently long. More specifically, we develop a new indexing paradigm in which a sketch of a query pattern is first matched against a sketch of the text. Once candidate matches are retrieved, they are verified using the original text. This paradigm is thus universal in the sense that it allows us to use any solution to index the sketched text, like a suffix array, FM-index, or r-index. We explore both the theory and the practice of this universal framework. With an extensive experimental analysis, we show that, surprisingly, universal indexes can be constructed much faster than their unsketched counterparts and take a fraction of the space, as a direct consequence of (i) having a lower bound on the length of patterns and (ii) working in sketch space. Furthermore, these data structures have the potential of retaining or even improving query time, because matching against the sketched text is faster and verifying candidates can be theoretically done in constant time per occurrence (or, in practice, by short and cache-friendly scans of the text). Finally, we discuss some important applications of this novel indexing paradigm to computational biology. We hypothesize that such indexes will be particularly effective when the queries are sufficiently long, and so demonstrate applications in long-read mapping.
format Preprint
id arxiv_https___arxiv_org_abs_2502_14488
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle U-index: A Universal Indexing Framework for Matching Long Patterns
Ayad, Lorraine A. K.
Fici, Gabriele
Koerkamp, Ragnar Groot
Loukides, Grigorios
Patro, Rob
Pibiri, Giulio Ermanno
Pissis, Solon P.
Data Structures and Algorithms
F.2.2; J.3
Text indexing is a fundamental and well-studied problem. Classic solutions either replace the original text with a compressed representation, e.g., the FM-index and its variants, or keep it uncompressed but attach some redundancy - an index - to accelerate matching. The former solutions thus retain excellent compressed space, but are slow in practice. The latter approaches, like the suffix array, instead sacrifice space for speed. We show that efficient text indexing can be achieved using just a small extra space on top of the original text, provided that the query patterns are sufficiently long. More specifically, we develop a new indexing paradigm in which a sketch of a query pattern is first matched against a sketch of the text. Once candidate matches are retrieved, they are verified using the original text. This paradigm is thus universal in the sense that it allows us to use any solution to index the sketched text, like a suffix array, FM-index, or r-index. We explore both the theory and the practice of this universal framework. With an extensive experimental analysis, we show that, surprisingly, universal indexes can be constructed much faster than their unsketched counterparts and take a fraction of the space, as a direct consequence of (i) having a lower bound on the length of patterns and (ii) working in sketch space. Furthermore, these data structures have the potential of retaining or even improving query time, because matching against the sketched text is faster and verifying candidates can be theoretically done in constant time per occurrence (or, in practice, by short and cache-friendly scans of the text). Finally, we discuss some important applications of this novel indexing paradigm to computational biology. We hypothesize that such indexes will be particularly effective when the queries are sufficiently long, and so demonstrate applications in long-read mapping.
title U-index: A Universal Indexing Framework for Matching Long Patterns
topic Data Structures and Algorithms
F.2.2; J.3
url https://arxiv.org/abs/2502.14488