Avoiding Floating-Point Side Channels in the Report Noisy Max with Gap Mechanism

Zeyu Ding, John Durrell, Daniel Kifer, Prottay Protivash, Guanhong Wang, Yuxin Wang, Yingtai Xiao, Danfeng Zhang

TL;DR

This paper presents a secure, finite-precision implementation of the "Noisy Top-k with Gap" algorithm, a privacy-preserving method for selecting top candidates and reporting their relative scores. By avoiding floating-point arithmetic and leveraging integer operations, the authors eliminate a critical vulnerability that could otherwise compromise privacy guarantees.

What Problem Does This Paper Address?

Differential privacy is a crucial standard for protecting sensitive data when releasing information. Many differentially private algorithms rely on adding noise from continuous probability distributions, like the Laplace distribution. However, computers use finite-precision floating-point numbers, which can lead to "floating-point vulnerabilities." These vulnerabilities, as demonstrated by Mironov, can allow an attacker to infer sensitive information by analyzing the low-order bits of the noisy output, potentially reconstructing entire datasets.

The "Noisy Top-k with Gap" algorithm is an extension of the "Noisy Max" mechanism that provides additional information about the "gap" (difference in scores) between the selected top candidates and the next best ones. This extra information comes at no additional privacy cost but crucially relies on infinite precision for its theoretical privacy guarantees. Existing methods for securing other differentially private algorithms by using discrete noise distributions don't directly apply here because the privacy proof of "Noisy Top-k with Gap" depends on the properties of continuous random variables and their differences. This paper tackles the challenge of creating a secure, practical implementation of this algorithm that works on finite-precision machines without compromising its privacy guarantees.

Methods

The core of the paper's contribution is a novel implementation of "Noisy Top-k with Gap" that relies entirely on integer arithmetic and discrete probability distributions, thus avoiding floating-point vulnerabilities. The authors achieve this by:

  • Discretizing the Noise: Instead of using continuous distributions like the exponential distribution for noise, they employ discrete counterparts like the geometric distribution.
  • Handling Ties with Precision Refinement: Floating-point vulnerabilities arise partly from the inability to perfectly represent continuous values, leading to ties in discrete settings. The authors introduce a tie-breaking mechanism that dynamically refines the precision of rounding. This process iteratively increases the precision of the discrete representation of noisy query answers until all ties are resolved.
  • Simulating Continuous Behavior with Discrete Primitives: The authors carefully design their algorithms to be probabilistically equivalent to the ideal, infinite-precision version. This involves using techniques like randomized rounding and leveraging the memoryless properties of geometric and exponential distributions to simulate the behavior of continuous noise and gap calculations.
  • Leveraging Rational Arithmetic: The algorithm represents all intermediate values as rational numbers (pairs of integers), allowing for exact computations without floating-point errors.

Datasets

The authors evaluate their implementation on two real-world datasets and one synthetic dataset:

  • T40I10D100K: A synthetic dataset.
  • BMS-POS: A real dataset.
  • Kosarak: A real dataset.

These datasets are collections of transactions, where each query is associated with an item, and its value is the number of transactions that item appears in.

Key Insights and Ideas

  • Floating-point vulnerabilities are a real threat: The paper strongly emphasizes that floating-point inaccuracies are not just theoretical concerns but can lead to catastrophic privacy failures in differentially private systems.
  • The "gap" information is valuable but tricky to secure: The "Noisy Top-k with Gap" algorithm offers enhanced utility by providing score differences, but securing this feature requires more than just replacing continuous noise with discrete noise. The privacy proof's reliance on continuous variable differences is a key challenge.
  • Dynamic precision refinement is key to handling ties: The authors' approach of iteratively increasing rounding precision to break ties is a novel and effective way to bridge the gap between continuous ideal algorithms and discrete practical implementations.
  • Memoryless properties are powerful tools: The paper effectively utilizes the memoryless properties of geometric and exponential distributions to construct discrete equivalents of continuous mechanisms.

Key Results

  • Secure Implementation: The paper successfully provides a finite-precision implementation of "Noisy Top-k with Gap" that is probabilistically equivalent to the ideal algorithm and is secure against floating-point vulnerabilities.
  • Performance: The secure implementation incurs a moderate overhead compared to the insecure baseline. For small values of k (number of top queries), the overhead is approximately 4.7x, which is negligible in practice. As k increases, the unoptimized secure version becomes slower due to more frequent ties.
  • Optimized Version: An optimized version with "early query pruning" shows improved performance, especially for larger k.
  • Runtime Analysis: The tie-breaking loop, a potential bottleneck, is analyzed, and the expected runtime is shown to be manageable, with the optimized version performing significantly better than theoretical worst-case bounds.

Limitations and Future Work

  • (ε, δ)-Differential Privacy: The paper notes that while the core algorithm aims for pure ε-differential privacy, practical considerations like imposing an upper limit on the tie-breaking loop iterations might lead to approximate (ε, δ)-differential privacy.
  • Engineering Challenges: The authors acknowledge that issues like the algorithm exceeding available memory or prolonged execution times revealing information are engineering challenges that are not fully addressed in the theoretical work.
  • Further Optimization: The paper suggests that the algorithm can be further improved for efficiency through techniques like "early query pruning," which is explored in the experimental section.

Summary updated

BibTeX
@article{ding2025avoiding,
  author = {Zeyu Ding and John Durrell and Daniel Kifer and Prottay Protivash and Guanhong Wang and Yuxin Wang and Yingtai Xiao and Danfeng Zhang},
  title = {{Avoiding Floating-Point Side Channels in the Report Noisy Max with Gap Mechanism}},
  journal = {Journal of Privacy and Confidentiality},
  year = {2025},
  doi = {10.29012/jpc.894},
}
Figure