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

Learning Differentially Private Mechanisms

Subhajit Roy, Justin Hsu, Aws Albarghouthi

TL;DR

Implementing differential privacy (DP) is notoriously difficult and error-prone, even for experts. This paper introduces KOLAHAL, a tool that automatically synthesizes symbolic noise expressions for non-private program sketches, ensuring the resulting algorithms are both $\epsilon$-differentially private and accurate.

What Problem Does This Paper Address?

Differential privacy has become the gold standard for data privacy, but "privatizing" an existing algorithm is a minefield. Developers must manually determine where to add noise, how much to add (the scale), and then mathematically prove the result is private. Mistakes are common—even foundational algorithms like the "Sparse Vector Technique" have had published versions with subtle privacy bugs.

Currently, developers have two choices: use pre-built DP building blocks (which may not fit their specific needs) or write and prove new algorithms from scratch. There is a distinct lack of automated support for converting a standard, non-private program into a private one. The search space for these "noise functions" is infinite, and testing for privacy violations is computationally expensive, making traditional program synthesis techniques fail.

Methods

The authors propose a three-step synthesis pipeline called KOLAHAL (Hindi for "loud noise"):

  1. Mechanism Sketching: The user provides a "sketch"—the original program with "holes" at locations where Laplace or Exponential noise should be added.
  2. Challenging Example Selection: Using a state-of-the-art testing tool called STATDP, the system identifies "challenging" inputs (neighboring databases) where the privacy guarantee is most likely to be violated.
  3. Numerical Optimization (The Bridge): Instead of jumping straight to symbolic math (like $2/\epsilon$), KOLAHAL first treats the noise scales as real-valued numbers. It uses Differential Evolution—a global optimization algorithm—to find a "noise region" where the program is private and the privacy loss is "tight" (meaning it doesn't add more noise than necessary). To make this fast, they use importance sampling to reuse random noise draws across thousands of candidate settings.
  4. Symbolic Synthesis: Finally, the tool searches a grammar of symbolic expressions (involving variables like $\epsilon$ and input sizes) to find formulas that land within the previously discovered numerical "noise region."

Benchmarks

The authors evaluated KOLAHAL on 9 foundational algorithms from differential privacy literature:

  • Basic: Sum, Histogram.
  • Selection: Noisy Max (3 variants), Above Threshold (2 variants).
  • Complex: Sparse Vector Technique (SVT), SmartSum.

These benchmarks represent the "greatest hits" of DP mechanisms, many of which are notoriously tricky to implement correctly.

Key Insights and Ideas

  • Privacy Loss as a Proxy for Accuracy: Defining "accuracy" for any arbitrary program is hard. The authors realized that a "tight" privacy guarantee—where the privacy loss is exactly $\epsilon$—serves as an excellent proxy. If you add just enough noise to satisfy the limit, you are likely maximizing accuracy.
  • The Numerical-to-Symbolic Shortcut: Searching for symbolic expressions (like 4 / epsilon) is hard because the search space is discrete and jagged. By solving a continuous numerical version of the problem first, the authors create a "map" that tells the symbolic search exactly where to look.
  • The "Zone of Confusion": The tool specifically hunts for counterexamples where the statistical tester is "uncertain" (p-values in the middle range). These examples represent the boundary of the privacy guarantee and are the most useful for refining the synthesis.

Key Results

  • Success across the board: KOLAHAL successfully synthesized all 9 benchmarks, including complex ones like SVT that stumped simpler baselines.
  • Efficiency: By using optimization to prune the search space, KOLAHAL was 2x to 20x faster than a version without the optimization phase.
  • Discovery: Interestingly, the tool found a new, valid variant of the "Above Threshold" algorithm that wasn't the standard textbook version but still satisfied the privacy requirements.
  • Robustness: It outperformed four baseline synthesis strategies (naïve, unlim, lim, and noopt), proving that the combination of example selection and continuous optimization is essential for complex DP tasks.

Limitations and Future Work

  • Pure DP Only: The current tool only supports "pure" $\epsilon$-differential privacy. It does not yet handle $(\epsilon, \delta)$-privacy (which allows for a tiny probability of total failure) or Rényi DP.
  • Sketch Dependency: KOLAHAL can fill in the "how much noise" holes, but it cannot change the underlying logic of the program. If the original algorithm is fundamentally incompatible with DP, the tool will fail.
  • Soundness: Because it relies on a statistical tester (STATDP), the output isn't guaranteed to be private. The authors suggest that the synthesized candidates should still be passed to a formal verifier for a final "stamp of approval."
  • Grammar Constraints: The symbolic search is limited by the predefined grammar of expressions provided to the tool.

Summary updated

BibTeX
@inproceedings{roy2021learning,
  author = {Subhajit Roy and Justin Hsu and Aws Albarghouthi},
  title = {{Learning Differentially Private Mechanisms}},
  booktitle = {IEEE Symposium on Security and Privacy},
  year = {2021},
  url = {https://openreview.net/forum?id=QzWibUDb-W},
}

Loading related content...

Figure