Noisy Sorting Without Searching: Data Oblivious Sorting with Comparison Errors

Ziao Wang, Nadim Ghaddar, Lele Wang, Ozel, EvrimDROPS 2023

TL;DR

This paper introduces the first suite of data-oblivious sorting algorithms capable of handling persistent comparison errors. By adapting classic sorting network structures like Batcher’s odd-even mergesort, the authors achieve near-optimal sorting accuracy (low "dislocation") without the data-dependent memory patterns that plague existing noisy sorting methods.

What Problem Does This Paper Address?

In many real-world scenarios—ranging from human-led A/B testing to faulty cryptographic protocols—comparisons between elements aren't always reliable. "Noisy sorting" is the study of how to order an array when comparisons return the wrong answer with some probability $p < 1/2$.

The challenge is twofold:

  1. Persistence: In many models, if you compare $x$ and $y$ twice, you get the same (potentially wrong) answer every time. You can't just "average out" the noise by repeating the comparison.
  2. Privacy (Data Obliviousness): In secure multi-party computation or cloud computing, we often need "data-oblivious" algorithms—algorithms where the sequence of memory accesses is identical regardless of the input values.

Existing noisy sorting algorithms rely heavily on "noisy binary search," which is inherently data-dependent (the path you take through the search tree depends on the values). This paper fills the gap by creating noisy sorting methods that are both robust to errors and privacy-preserving.

Methods

The authors build their solution around a core primitive called Window-Sort. Instead of trying to find the exact position of an element via searching, Window-Sort looks at a local "window" of elements and estimates an element's position based on how many items in that window appear smaller.

The primary contribution is the Window-Odd-Even-Sort. This is an adaptation of Batcher’s classic odd-even mergesort network. The authors replace the standard "compare-and-swap" operations with their robust Window-Sort logic.

  • Complexity: The algorithm runs in $O(n \log^3 n)$ time.
  • Mechanism: It recursively divides the array, sorts the "even" and "odd" indices separately, and then merges them using a windowed approach that limits how far any single error can "dislocate" an element.

The paper also evaluates two other oblivious candidates: Randomized Shellsort and Annealing Sort, testing their empirical robustness against noise.

Datasets

The study uses synthetic datasets to rigorously control the noise environment:

  • Input: Arrays of $n$ distinct comparable elements (integers), with $n$ ranging from $2^{10}$ to $2^{15}$ (32,768).
  • Noise Simulation: To ensure "persistent" errors, the authors used tabulation hashing. This ensures that the "random" error for a specific pair $(x, y)$ is consistent throughout the entire run of the algorithm, preventing the algorithm from "cheating" by re-comparing elements.

Key Insights and Ideas

  • Moving Beyond Searching: The "aha moment" is the realization that you don't need to search to sort. By using a fixed communication pattern (like a sorting network) and replacing point-comparisons with window-based estimates, you can bound the "dislocation" (the distance an element ends up from its true sorted position).
  • The 0-1 Principle for Noise: The authors demonstrate that the 0-1 principle—a classic tool for proving sorting networks work—can be extended to their noisy, oblivious setting.
  • Dislocation as Success: Since perfect sorting is mathematically impossible with persistent noise, the authors focus on minimizing maximum dislocation ($O(\log n)$) and total dislocation ($O(n)$), which are the theoretical gold standards for this field.

Key Results

  • Theoretical Optimality: The Window-Odd-Even-Sort achieves the optimal maximum dislocation of $O(\log n)$ with high probability, matching the performance of non-oblivious state-of-the-art algorithms like Riffle Sort.
  • Empirical Robustness: In experiments with an error probability $p=0.03$, the oblivious algorithms kept the maximum dislocation under 12 positions for an array of 32,768 elements.
  • Standard Sorts Fail: Traditional algorithms like QuickSort and Insertion Sort performed poorly under noise, with dislocation counts orders of magnitude higher than the proposed window-based methods.
  • Surprising Contenders: Randomized Shellsort and Annealing Sort proved to be incredibly resilient in practice, often requiring fewer comparisons than the more complex Window-Odd-Even-Sort while maintaining high accuracy.

Limitations and Future Work

  • Runtimes: The $O(n \log^3 n)$ complexity of the Window-Odd-Even-Sort is theoretically sound but slower than the $O(n \log n)$ of non-oblivious noisy sorters.
  • Theoretical Gaps: While Randomized Shellsort and Annealing Sort performed excellently in experiments, the authors note that they currently lack a formal theoretical proof for why these specific structures are so robust to persistent noise. Closing this gap between empirical success and theoretical proof is a primary goal for future research.

Summary updated

BibTeX
@inproceedings{wang2023noisy,
  author = {Ziao Wang and Nadim Ghaddar and Lele Wang and Ozel, Evrim},
  title = {{Noisy Sorting Without Searching: Data Oblivious Sorting with Comparison Errors}},
  booktitle = {DROPS},
  year = {2023},
  doi = {10.4230/lipics.sea.2023.8},
}

Loading related content...

Figure