Standard Differential Privacy (DP) is inherently pessimistic. When we design a private algorithm, we typically calculate a "privacy budget" ($\epsilon$) based on the absolute worst-case scenario: the most sensitive possible data and the most revealing possible output. Even if a specific execution of the algorithm is "lucky"—for instance, if it finds a clear signal early or returns very little information—standard DP still charges the full, worst-case price.
A growing body of research is flipping this script. Instead of fixing a budget upfront and hoping for the best utility, these researchers propose ex post (or a posteriori) privacy accounting. This approach allows us to determine the privacy loss after the algorithm has run, based on the specific path it took or the specific output it produced.
The Problem with Worst-Case Thinking
In traditional DP, the privacy cost is a property of the algorithm itself, not the data it processes. If you run a "Top-10" selection mechanism, you pay for the leakage of 10 items, even if only 2 items in your dataset were actually statistically significant.
As Valentin N. Hartmann, Vincent Bindschaedler, and their colleagues argue in Privacy accounting εconomics: Improving differential privacy composition via a posteriori bounds, this is economically inefficient. They introduce Output Differential Privacy (ODP), which treats privacy like a refundable deposit. If the algorithm produces an output that is "safe"—like a null symbol or an early stopping signal—the curator can "refund" the unused budget to the analyst.
Pay-What-You-Get Composition
One of the most intuitive applications of this idea is in selection mechanisms. In Practical Differentially Private Top-k Selection with Pay-what-you-get Composition, David Durfee and Ryan M. Rogers demonstrate that we don't have to pay for the items we don't return.
Imagine a search for the most frequent symptoms in a medical database. If you ask for the top 100 symptoms but the algorithm only finds 5 that pass a noise threshold, a "pay-what-you-get" rule ensures you only consume the privacy budget for those 5. This principle, further unified by Ryan Rogers in A Unifying Privacy Analysis Framework for Unknown Domain Algorithms in Differential Privacy, enables much more efficient exploratory data analysis by preventing budget waste on empty results.
Accuracy-First Privacy
In many practical settings, the goal isn't to maximize accuracy for a fixed $\epsilon$, but to achieve a specific utility goal with the maximum possible privacy. Katrina Ligett, Aaron Roth, Steven Wu, and others explore this in Accuracy First: Selecting a Differential Privacy Level for Accuracy Constrained ERM.
They propose a "noise reduction" framework where the algorithm stops as soon as it hits a target accuracy. Because the stopping point depends on the data, the privacy guarantee is calculated ex post. If the learning task is "easy" and the model converges quickly, the user is rewarded with a much stronger privacy guarantee than they would have received under a fixed-budget regime. This same logic is applied to hyperparameter tuning by Badih Ghazi and Pasin Manurangsi in Private Hyperparameter Tuning with Ex-Post Guarantee, where the final cost is determined only by the configurations actually tested.
Automating the Proofs
Calculating these data-dependent bounds is mathematically taxing. To bridge the gap between theory and practice, researchers are developing tools to automate these proofs. Danfeng Zhang and Daniel Kifer created AutoPriv (and the LightDP language), which uses dependent types to track how privacy costs change based on a program's internal state.
Similarly, Borja Balle and colleagues in On the Privacy of Selection Mechanisms with Gaussian Noise introduced Filtered Self-Reporting Composition (FSRC). This method allows for adaptive versions of classic tools like the Sparse Vector Technique, making them easier to tune by accounting for the specific index where a search stops.
Why It Works: The Intuition
The core intuition behind ex post accounting is that not all outputs are equally revealing.
In standard DP, we must protect against the "worst-case" output even if it never happens. Ex post accounting recognizes that the actual output we observe provides a "hint" about how much information was actually leaked. By conditioning the privacy loss on the observed execution path, we can provide tighter, more meaningful guarantees that reflect the reality of the data-processing task rather than a theoretical nightmare scenario.