[Paper Review] Online Self-Indexed Grammar Compression
This paper introduces OESP-index, the first online self-indexed grammar compression method that incrementally builds a compressed index by processing input text character by character, enabling space-efficient construction without storing the full input in memory. It achieves competitive space efficiency and supports efficient pattern search and random access, outperforming offline counterparts in working space usage while maintaining practical performance on highly repetitive texts.
Although several grammar-based self-indexes have been proposed thus far, their applicability is limited to offline settings where whole input texts are prepared, thus requiring to rebuild index structures for given additional inputs, which is often the case in the big data era. In this paper, we present the first online self-indexed grammar compression named OESP-index that can gradually build the index structure by reading input characters one-by-one. Such a property is another advantage which enables saving a working space for construction, because we do not need to store input texts in memory. We experimentally test OESP-index on the ability to build index structures and search query texts, and we show OESP-index's efficiency, especially space-efficiency for building index structures.
Motivation & Objective
- To address the limitation of existing grammar-based self-indexes, which require offline construction and large working memory for massive, repetitive text collections.
- To enable incremental index construction by processing input text one character at a time, reducing memory overhead.
- To support efficient pattern search and random access in compressed form, suitable for big data workloads with evolving text collections.
- To demonstrate that online grammar compression can achieve competitive space and time efficiency compared to offline methods.
Proposed method
- OESP-index is built on edit-sensitive parsing (ESP) and leverages the FOLCA (fully-online LCA) framework for online grammar compression.
- It uses a dynamic wavelet tree (DWT) to represent the dictionary and length array, enabling efficient rank/select operations for random access.
- The method maintains a succinct representation of the context-free grammar (CFG) derived from the input stream, incrementally extending the parse tree.
- It employs GMR-style rank/select operations on a bit string and dynamic wavelet tree to support fast pattern search and counting.
- The data structure supports top-down traversal of the parse tree to locate candidate pattern occurrences, using parsing discrepancy bounds from ESP.
- Construction is online: each character is processed sequentially, and the index is incrementally updated without requiring the full text in memory.
Experimental results
Research questions
- RQ1Can grammar-based self-indexing be made online, allowing incremental construction from a streaming input without storing the entire text in memory?
- RQ2How does the space efficiency of an online self-index compare to offline counterparts when building indexes for highly repetitive texts?
- RQ3What is the performance overhead of online construction and query processing compared to optimized offline methods?
- RQ4Can online grammar compression support efficient pattern search and random access with competitive time complexity?
- RQ5How does the dynamic wavelet tree and bit string representation affect memory usage and query performance in the online setting?
Key findings
- OESP-index uses only 2.5% of the working memory required by offline ESP-index on the einstein dataset, demonstrating significant space efficiency.
- On the cere dataset, OESP-index uses 40% of the working memory of offline ESP-index, confirming its memory advantage on less repetitive data.
- The index size of OESP-index is smaller than LZ-index and FM-index but larger than ESP-index and SLP-index, with the main overhead due to the dynamic wavelet tree.
- Construction time is slower than offline ESP-index—57.1× slower on einstein and 58.1× on cere—due to the lack of GMR’s optimized wavelet tree in the online version.
- Query locating time is slower than ESP-index (24.9× on einstein, 163.2× on cere), but the method still supports practical pattern search with theoretical guarantees.
- Despite performance trade-offs, OESP-index is the first online grammar-based self-index, enabling scalable processing of large, evolving, highly repetitive text collections.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.