DPrivBench: Benchmarking LLMs' Reasoning for Differential Privacy

Erchi Wang, Pengrun Huang, Eli Chien, Om Thakkar, Kamalika Chaudhuri, Yu-Xiang Wang, Ruihan Wu

TL;DR

This paper introduces DPrivBench, a novel benchmark designed to evaluate how well Large Language Models (LLMs) can reason about and verify Differential Privacy (DP) guarantees. The study reveals that while state-of-the-art frontier models excel at textbook-level privacy mechanisms, they severely struggle with advanced, research-level DP algorithms, highlighting a substantial gap between current AI capabilities and expert-level cryptographic reasoning.

What Problem Does This Paper Address?

Differential Privacy (DP) has become the gold standard for protecting individual data privacy in mathematical and statistical analyses. However, designing and verifying DP algorithms is highly complex and notoriously error-prone—even for seasoned privacy researchers.

Historically, verifying these algorithms required rigid, specialized formal verification languages that demand deep domain expertise, or interactive, semi-automated tools that keep a human strictly in the loop. This paper explores a new frontier: Can LLMs act as fully automated, independent DP reasoning agents? To reliably answer this, the authors address the lack of rigorous benchmarks capable of testing true mathematical reasoning in DP without allowing models to succeed via simple memorization or pattern matching.

Methods

The authors frame DP verification as a binary classification task. An LLM is provided with an algorithm description, its underlying assumptions, and a claimed privacy guarantee, and must determine whether the guarantee holds ("yes" or "no").

To ensure the benchmark tests genuine mathematical reasoning rather than shortcut pattern matching, the authors implemented a structured perturbation strategy:

  1. Positive Instances: Valid algorithms drawn directly from textbook mechanisms or peer-reviewed literature.
  2. Negative Instances: Created by systematically altering exactly one component of a valid algorithm—such as under-calibrating the noise scale, removing an essential assumption (like convexity), or overclaiming the privacy budget.

Beyond checking binary accuracy, the authors employed an "LLM-as-a-Judge" framework (using GPT-5.4-High) to evaluate the plausibility (correct high-level approach) and soundness (mathematical correctness) of the models' step-by-step reasoning chains. They also explored context-augmentation techniques, comparing direct theorem injection against Retrieval-Augmented Generation (RAG).

Datasets

The paper introduces DPrivBench, a dataset comprising 713 instances split into two distinct categories:

  • Category 1 (Mechanism-Level): 588 instances evaluating foundational, textbook-level DP mechanisms (e.g., Laplace, Gaussian, and Report-Noisy-Max variants). These are instantiated using a curated bank of 49 distinct mathematical functions designed with varying levels of sensitivity-reasoning difficulty.
  • Category 2 (Algorithm-Level): 125 instances drawn from advanced DP literature, spanning 16 complex research topics including DP-SGD, Private Selection, Parallel Composition, and Smooth Sensitivity.
Figure 1: Overview of DPrivBench. The left panel shows a representative reasoning instance, while the right panel summarizes the benchmark construction: Category 1 mechanism-level instances from a function bank and Category 2 algorithm-level instances from the DP literature. Overall, DPrivBench contains 588 Category 1 and 125 Category 2 instances, totaling 713 instances.

Key Insights and Ideas

  • The "Laplace Mechanism" Bias: Almost all evaluated models achieved near-perfect accuracy on the standard Laplace mechanism but performed poorly on closely related variants like Report-Noisy-Max with Laplace noise. This indicates that models rely heavily on the ubiquity of standard Laplace examples in their pretraining data rather than executing first-principles reasoning.
  • Hallucinating Canonical Assumptions: A major failure mode for LLMs is the tendency to "hallucinate" missing assumptions. When presented with a perturbed negative instance, models often implicitly assume standard conditions apply (e.g., assuming an objective function is convex or its sensitivity is bounded simply because it was true in the original published paper), leading to incorrect "yes" verdicts.
  • Subtle Semantic Blindspots: Models struggle immensely with minor structural changes that drastically alter privacy guarantees. For instance, changing a parallel composition assumption from "pairwise disjoint sets" to "sequentially disjoint sets" caused almost all models to fail uniformly.
  • Knowledge Retrieval vs. Reasoning: Providing the exact key theorem directly in the prompt yielded massive performance gains on difficult problems, whereas RAG provided a much more modest improvement due to retrieval noise.

Key Results

  • Textbook Mechanisms (Category 1): Frontier models performed exceptionally well, with GPT-5-High achieving a near-perfect accuracy of 0.995 and Gemini-3-Pro reaching 0.923. However, open-source models lagged significantly, often falling to random-guess levels (~0.50) on complex noise-calibration tasks.
  • Advanced Algorithms (Category 2): Performance dropped sharply across the board. The strongest reasoning models, GPT-5.5-High and Gemini-3.1-Pro, achieved top F1 scores of 0.829 and 0.810, respectively. Most other models hovered near or below a naive "always-yes" baseline (F1 ≈ 0.503).
  • Reasoning Quality Gap: The fine-grained judge analysis revealed that even when top models guess the correct final binary answer, their generated mathematical proofs frequently contain logical gaps or unsound steps, particularly as the complexity of the algorithm increases.
Figure 3: Performance on the 18 hardest Category 2 questions with theorem augmentation, RAG, and zero-shot prompting. Scores are averaged over five trials.

Limitations and Future Work

The authors note that DPrivBench focuses exclusively on the verification of privacy guarantees via natural language and LaTeX descriptions. It does not evaluate an LLM's ability to generate new DP algorithms from scratch or write secure, production-ready code.

Moving forward, the authors suggest using DPrivBench to guide the development of specialized DP reasoning agents. Promising directions include integrating LLMs with verified cryptographic knowledge bases and expanding automation to the implementation level—enabling AI to automatically detect and prevent privacy leaks directly within source code.

Summary updated

BibTeX
@inproceedings{wang2026dprivbench,
  author = {Erchi Wang and Pengrun Huang and Eli Chien and Om Thakkar and Kamalika Chaudhuri and Yu-Xiang Wang and Ruihan Wu},
  title = {{DPrivBench: Benchmarking LLMs' Reasoning for Differential Privacy}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=w8Uuy8t5PA},
}

Loading related content...

Figure