Time-uniform and Asymptotic Confidence Sequence of Quantile under Local Differential Privacy

Leheng Cai, Qirui Hu, Juntao Sun, Shuyuan WuNeurIPS 2025

Estimating quantiles—such as the median or the 95th percentile—is a fundamental task in statistics, crucial for applications ranging from monitoring financial risk (Value-at-Risk) to determining medical dosing. However, doing this in real-time while strictly protecting user privacy presents a massive challenge.

This paper introduces a robust framework for performing real-time, privacy-preserving statistical inference. By combining dynamically growing parallel stochastic gradient descent (SGD) with local differential privacy (LDP), the authors provide a way to estimate quantiles and their uncertainty intervals that remain valid at any point in time as continuous data flows in.

The Core Challenges

Two major hurdles typically stand in the way of real-time quantile estimation:

  1. Privacy: Standard Differential Privacy (DP) often assumes a "trusted central curator" who sees all raw data. In many modern applications (like Apple's iOS telemetry or Google's RAPPOR), we use Local Differential Privacy (LDP). Under LDP, data is randomized on the user's device before it ever reaches a server, adding significant noise to the data stream.
  2. Sequential Inference: Most statistical tools provide "pointwise" confidence intervals, which are only valid if you decide on a fixed sample size N beforehand. If you monitor a data stream and stop when the results look "significant," you run into the "peeking problem," which drastically inflates false positive rates.

Quantile estimation under LDP is notoriously difficult because the variance of the estimator depends on the data's density at the true quantile—a value that is usually unknown and hard to estimate without spending more of your limited "privacy budget."

Methods: Dynamically Chained Parallel SGD

To overcome these hurdles, the authors propose a novel online procedure called Dynamically Chained Parallel SGD (P-SGD).

Dynamically Chained Parallel SGD flowchart showing how new chains are added based on an update criterion.

Here is how the framework operates:

  • Privacy Mechanism: It uses a randomized response (binary-response) mechanism to privatize data points locally as they arrive.
  • Parallel SGD: Instead of relying on one long chain of updates, the algorithm runs multiple chains in parallel. The final estimate is a weighted average of these chains.
  • Dynamic Growth: Crucially, the number of chains ($\kappa$) isn't fixed. It grows slowly as more data arrives (e.g., at a rate of $\log T$). This dynamic growth is the "secret sauce" that allows the algorithm to consistently estimate the variance of the quantile without needing extra private information.
  • Anytime-Valid Boundaries: The authors prove a "strong Gaussian approximation," showing that their estimator behaves like a Gaussian process. This allows them to apply "stitched boundaries" or "mixture boundaries" that stay valid over time, with widths obeying the Law of the Iterated Logarithm (LIL).

Key Insights and Results

The authors evaluated their method using synthetic simulations (Standard Normal and heavy-tailed Cauchy distributions) and real-world datasets, including a Law School Dataset (predicting GPA) and a Government Salary Dataset (over 200,000 observations).

  • Variance for "Free": By using parallel chains, the algorithm can estimate the variance of the quantile estimator simply by looking at the variation between the chains. This elegantly avoids the need to spend additional privacy budget on density estimation.
  • Sharper Theory: The authors establish an "almost sure" Gaussian approximation. This is a much stronger theoretical guarantee than the standard $L_2$ or "in probability" results found in previous literature, making the "anytime-valid" property mathematically sound.
  • Memory Efficiency: The algorithm is fully online and only requires $\mathcal{O}(\kappa)$ memory. Since $\kappa$ (the number of chains) is much smaller than the total number of samples $T$, it is highly suitable for edge devices or large-scale streaming applications.
Confidence sequences converging over time, demonstrating anytime-valid boundaries.

In experiments, the Time-uniform Type I error stayed below the nominal 5% level across various privacy budgets ($\epsilon$), whereas traditional methods would fail if "peeking" occurred. Furthermore, the variance estimator was shown to be almost surely consistent, converging to the true variance as more data is collected, even under the heavy noise of LDP. When the privacy budget is high (non-private), the P-SGD approach actually produced tighter confidence sequences than existing non-private methods based on order statistics.

Limitations and Future Work

While highly effective, the method does have limitations:

  • Hyperparameter Sensitivity: Like all SGD-based methods, performance depends on choosing a good learning rate and initial values. Delicate calibration may still be needed in some practical settings.
  • Chain Alignment: The dynamic growth of chains requires specific conditions to ensure new chains are "aligned" in length with old ones before being integrated, adding a layer of algorithmic complexity.
  • Non-Asymptotic Bounds: While the sequences are valid for any $T$ asymptotically, deriving fully non-asymptotic (finite-sample) error bounds for SGD iterates under LDP remains a challenging and open area for future research.

Summary updated

BibTeX
@inproceedings{cai2025time,
  author = {Leheng Cai and Qirui Hu and Juntao Sun and Shuyuan Wu},
  title = {{Time-uniform and Asymptotic Confidence Sequence of Quantile under Local Differential Privacy}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2025},
  url = {https://openreview.net/forum?id=Mt2UnV8jmB},
}
Figure