[Paper Review] Edit Distance: Sketching, Streaming and Document Exchange
This paper presents the first efficient sketching, streaming, and document exchange protocols for edit distance with poly(K log n) communication and space complexity, achieving near-linear time decoding. It introduces a novel algorithm based on diagonal decomposition and rolling hashes that enables exact edit distance computation and edit sequence reconstruction using O(K⁸ log⁵n) bits, matching information-theoretic lower bounds in certain regimes.
We show that in the document exchange problem, where Alice holds $x \in \{0,1\}^n$ and Bob holds $y \in \{0,1\}^n$, Alice can send Bob a message of size $O(K(\log^2 K+\log n))$ bits such that Bob can recover $x$ using the message and his input $y$ if the edit distance between $x$ and $y$ is no more than $K$, and output "error" otherwise. Both the encoding and decoding can be done in time $ ilde{O}(n+\mathsf{poly}(K))$. This result significantly improves the previous communication bounds under polynomial encoding/decoding time. We also show that in the referee model, where Alice and Bob hold $x$ and $y$ respectively, they can compute sketches of $x$ and $y$ of sizes $\mathsf{poly}(K \log n)$ bits (the encoding), and send to the referee, who can then compute the edit distance between $x$ and $y$ together with all the edit operations if the edit distance is no more than $K$, and output "error" otherwise (the decoding). To the best of our knowledge, this is the first result for sketching edit distance using $\mathsf{poly}(K \log n)$ bits. Moreover, the encoding phase of our sketching algorithm can be performed by scanning the input string in one pass. Thus our sketching algorithm also implies the first streaming algorithm for computing edit distance and all the edits exactly using $\mathsf{poly}(K \log n)$ bits of space.
Motivation & Objective
- Address the challenge of efficiently computing edit distance and all edit operations when the distance is bounded by K, in settings with limited communication, sketch size, or memory.
- Design a document exchange protocol that minimizes communication cost while maintaining near-linear encoding/decoding time.
- Develop the first sketching algorithm for edit distance using poly(K log n) bits, enabling exact computation of edit distance and operations in the referee model.
- Construct a streaming algorithm that computes edit distance and edits in one pass using poly(K log n) space and near-linear time.
- Overcome limitations of prior methods by achieving both efficiency and exactness in small-distance regimes, crucial for applications in bioinformatics and data synchronization.
Proposed method
- Use a diagonal-based dynamic programming approach to simulate edit distance computation in a space-efficient manner, tracking scores and boundary flags on K+1 diagonals.
- Apply rolling hash functions and CGK embeddings to enable streaming and sketching by maintaining compact representations of string blocks.
- Maintain longest common prefix information across diagonals using suffix trees for O(1) time queries to guide run extensions during diagonal processing.
- Combine candidate extension points from left, right, and common prefix neighbors to determine the maximum reachable cell on each diagonal, using a 'take-max' strategy.
- Use redundant encoding and error-correcting techniques to ensure correctness in document exchange, allowing Bob to reconstruct the original string from the message and his input.
- Modify the algorithm to reconstruct the full sequence of edit operations by storing start and end positions of common substrings, requiring O(K²) additional space.
Experimental results
Research questions
- RQ1Can document exchange be achieved with communication cost O(K log n) while maintaining near-linear time complexity?
- RQ2Is it possible to construct a sketch of size poly(K log n) for edit distance that supports exact computation of edit distance and operations in the referee model?
- RQ3Can a streaming algorithm compute edit distance and all edits in one pass using poly(K log n) space and near-linear time?
- RQ4What are the optimal polynomial dependencies on K and log n in the sketch size for edit distance sketching?
- RQ5Can the randomized sketching and document exchange protocols be derandomized to yield deterministic error-correcting codes for edit distance?
Key findings
- The document exchange protocol achieves a communication cost of O(K(log²K + log n)) bits, matching the information-theoretic lower bound Ω(K log n) when log K = O(√log n).
- The first sketching algorithm for edit distance using O(K⁸ log⁵n) bits is proposed, which is the first to achieve poly(K log n) size with exact computation.
- The sketching algorithm supports one-pass streaming encoding, enabling the first streaming algorithm for exact edit distance computation using O(K⁸ log⁵n) bits of space.
- The algorithm runs in Õ(n + poly(K)) time for encoding and decoding, achieving near-linear time complexity while maintaining exactness.
- The method supports full edit sequence reconstruction by tracking common substring segments, requiring O(K²) additional space for the reconstruction phase.
- The approach is robust to small edit distances and enables efficient, parallelizable preprocessing for applications such as string similarity join in databases.
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.