NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Efficient interactive algorithms for file synchronization under general edits

Ramji Venkataramanan, Vasuki Narasimha Swamy, Kannan RamchandranAllerton 2013

1. Introduction

File synchronization is a fundamental challenge in distributed systems, where two remote parties, Alice and Bob, hold versions of a file ($X$ and $Y$, respectively) that have diverged. The goal is for Bob to update $Y$ to match $X$ with minimal communication overhead. While standard error-correction techniques address bit-flips (substitutions), real-world file edits frequently involve insertions and deletions (indels). These edits introduce synchronization offsets that cause traditional block-based comparison methods, such as those used in the heuristic rsync utility, to perform sub-optimally.

Information theory suggests that for a file of length $n$ with $t$ edits, synchronization should require approximately $O(t \log n)$ bits. This paper presents a suite of interactive algorithms that bridge the gap between these theoretical lower bounds and practical, computationally efficient implementations capable of handling random indels, bursty edits, and substitutions.

2. Methodology

The proposed framework builds upon Varshamov-Tenengolts (VT) codes, which are non-linear codes designed to correct a single insertion or deletion. The authors extend this core capability through three primary innovations:

2.1 Reducing Interaction Rounds

Traditional VT-based synchronization often requires $O(\log t)$ rounds of communication, which can be prohibitively slow in high-latency network environments. To mitigate this, the authors developed a "one-round" synchronization protocol. In this model, Alice partitions her file into equal-sized segments and transmits syndromes or hashes for all segments simultaneously. Bob then identifies which segments can be corrected locally using the provided syndromes and which are too corrupted, requesting only the latter in full.

2.2 The Burst Property for Efficient Correction

In practice, edits often occur in contiguous "bursts" (e.g., deleting a paragraph or inserting a block of code). Treating a burst of length $B$ as $B$ individual edits is inefficient. The authors leverage a unique Burst Property: by sub-sampling a file into $B$ interleaved streams, a single burst edit in the original file manifests as exactly one edit in each of the $B$ sub-streams. This allows the algorithm to "bracket" and correct large bursts with minimal overhead by only processing a few representative sub-streams.

2.3 Sketching for Substitution Robustness

To handle bit-flips alongside indels, the authors incorporate Hamming distance sketching. Unlike traditional hashes that require exact matches, these sketches allow Bob to estimate the number of substitutions within a segment. This enables the algorithm to synchronize the structural offsets caused by indels first, reducing the difference to a small "target distance" that can then be resolved using standard linear error-correcting codes.

3. Experimental Evaluation

The algorithms were evaluated using synthetic binary sequences of length $n = 10^6$ bits. The testing suite included models for randomly distributed indels, substitutions, and single or multiple burst edits ranging from 100 to 100,000 bits.

3.1 Communication Efficiency

For random edits, the communication cost scales as $O(t \log n)$, remaining within a small constant factor of the theoretical minimum. As shown in Table 1, the empirical results for the average number of bits sent closely track the theoretical bounds established in the paper.

Table 1: Communication efficiency for random edits compared to theoretical bounds.

3.2 Burst Performance

The Single Burst Algorithm demonstrates remarkable efficiency. For a massive burst of 100,000 bits (10% of the file), the algorithm required only approximately 257,000 bits to achieve synchronization. This is significantly more efficient than re-transmitting the affected section or treating the burst as individual random edits.

Table 2: Performance of the burst synchronization algorithm for varying burst lengths.

4. Conclusion and Future Work

The suite of algorithms presented offers a robust solution for file synchronization under general edit models. By combining VT codes with interleaved sub-sampling and Hamming distance sketching, the authors achieve high communication efficiency and reduced interaction latency.

Future research directions include extending these techniques to non-binary alphabets (e.g., ASCII or Unicode) and refining the "guess-and-check" logic required to handle multiple, overlapping burst edits. While the decoding process introduces more computational load than simple hashing, the significant savings in bandwidth make these algorithms ideal for constrained network environments.

Summary updated

BibTeX
@inproceedings{venkataramanan2013efficient,
  author = {Ramji Venkataramanan and Vasuki Narasimha Swamy and Kannan Ramchandran},
  title = {{Efficient interactive algorithms for file synchronization under general edits}},
  booktitle = {Allerton},
  year = {2013},
  doi = {10.1109/allerton.2013.6736666},
}
Figure