Differentially private sparse vectors with low error, optimal space, and fast access

Martin Aumüller, Christian Janos Lebeda, Rasmus Pagh

Introduction: Breaking the Sparse Vector Trilemma

In the field of differential privacy (DP), releasing high-dimensional histograms—such as counts of unique URL visits or IP address traffic—is a fundamental task. While the Laplace Mechanism is the gold standard for accuracy, it fails in high-dimensional settings because it produces dense vectors. For a vocabulary of billions of entries, storing a noisy count for every possible item is computationally and storage-wise impossible.

Historically, researchers faced a "trilemma": any mechanism for sparse vectors had to compromise on either error magnitude, memory space, or query access time. The Approximate Laplace Projection (ALP) mechanism presented in this work successfully breaks this trilemma, achieving optimal error, information-theoretically optimal space, and logarithmic access time.

The Problem: Scaling Differential Privacy

When dealing with massive datasets like IPv4 logs (4 billion addresses) or trillions of URLs, the data is naturally sparse—most possible entries have a count of zero. A practical DP solution must:

  1. Maintain Low Error: Match the $O(1/\epsilon)$ per-entry error of the Laplace mechanism.
  2. Minimize Space: Use space proportional to the number of non-zero entries ($k$), not the total dimension ($d$).
  3. Ensure Fast Access: Allow users to query specific entries without scanning the entire compressed data structure.

Previous methods like thresholding (storing only large counts) introduce significant error for the "long tail" of small values. Other compressed sensing or sketching techniques often require $O(n)$ or $O(d)$ time to retrieve a single value, making them unsuitable for real-time applications.

The ALP Mechanism: A Two-Tiered Approach

The ALP mechanism handles data through a combination of thresholding for large values and a novel embedding for the long tail of smaller counts.

The ALP Core for Small Values

For smaller counts, the mechanism employs several layers of encoding and randomization:

  • Unary Encoding and Hashing: Values are scaled, rounded, and converted to unary strings. These strings are then hashed into a compact bit-array, similar to a Bloom filter. Multiple hash functions distribute the "ones" of each value across the array to mitigate the impact of collisions.
  • Randomized Response: Privacy is ensured by flipping bits in the resulting array with a specific probability. This is a standard DP technique that provides local privacy for the bits.
  • Estimation via Maximum Likelihood: To retrieve a value, the algorithm examines the noisy bit-array. It searches for the prefix length that maximizes the likelihood of the observed bit pattern, effectively finding the "peak" of the signal amidst the noise.

Handling Large Values

Very large counts are handled explicitly using standard thresholding with Laplace noise. This hybrid approach ensures that the most significant data points are preserved with high accuracy while the bulk of the sparse vector is efficiently compressed.

Key Insights: Robustness and Random Walks

A central insight of this work is the inherent robustness of unary encoding. Even when subjected to significant noise (bit flips), the transition point from "ones" to "zeros" in a unary string remains identifiable.

The authors visualize the estimation process as finding the peak of a random walk. As the algorithm scans the noisy bit-array, the difference between expected and observed bits creates a "mountain silhouette." The peak of this silhouette corresponds to the most likely original value.

Figure 2: The "mountain silhouette" visualization of the estimation process, where the peak represents the most likely original count in a noisy random walk.

Furthermore, the authors prove that hash collisions, while seemingly problematic, do not degrade the asymptotic error. The noise introduced for differential privacy actually dominates the error caused by collisions, allowing the mechanism to remain accurate even in highly compressed states.

Results and Comparative Analysis

The ALP mechanism achieves theoretical optimality across all three axes of the sparse vector trilemma. As shown in the table below, it matches the per-entry error of the Laplace mechanism while maintaining near-optimal space and significantly faster access times than previous "optimal error" methods.

Figure 4: Comparison of ALP (Theorems 5.10 and 5.11) against existing sparse DP mechanisms, demonstrating its simultaneous optimality in space, time, and error.

Key performance metrics include:

  • Error: Expected per-entry error of $O(1/\epsilon)$, matching the Laplace mechanism.
  • Space: $O(k \log(d+u))$ bits, where $k$ is sparsity and $d$ is dimension.
  • Access Time: $O(\log d)$ for pure DP or $O(\log 1/\delta)$ for approximate DP, making it practical for high-speed queries.

Conclusion

The Approximate Laplace Projection mechanism provides a highly practical solution for privatizing massive, high-dimensional datasets. By combining unary encoding, hashing, and randomized response, it offers a way to release accurate histograms with minimal storage overhead and fast query performance. Future work may explore achieving constant-time ($O(1)$) access or integrating automated sparsity estimation into the core mechanism.

Summary updated

BibTeX
@inproceedings{aumuller2021differentially,
  author = {Martin Aumüller and Christian Janos Lebeda and Rasmus Pagh},
  title = {{Differentially private sparse vectors with low error, optimal space, and fast access}},
  booktitle = {CCS},
  year = {2021},
  url = {https://openreview.net/forum?id=z-9DOFsLi2J},
}
Figure