Online Monotone Density Estimation
- Online monotone density estimation is a framework for sequentially predicting a nonincreasing probability density on [0,1] using log-loss performance metrics.
- The online Grenander estimator adapts the classical isotonic MLE to a sequential setting, achieving an O(n^(1/3)) excess KL risk under well-specified i.i.d. conditions.
- The expert aggregation approach discretizes the density space and applies exponential weighting to secure an O(√(n log n)) adversarial regret bound while quickly adapting to change-points.
Online monotone density estimation addresses the sequential prediction of an unknown probability density that is known a priori to be monotone nonincreasing on . At each time , the estimator observes a real-valued data stream and outputs a measurable function of past data, so that for every , estimates the underlying density , where
Performance is measured by sequential log-loss and its cumulative version . The theoretical framework considers two benchmarks: the well-specified stochastic setting (oracle risk under i.i.d. draws from ) and an adversarial setting (pathwise regret compared to the best hindsight monotone density with amplitude bounds).
1. Formal Problem Statement
The data consists of sequentially observed values assumed to be in (by linear rescaling). At each , the algorithm outputs an estimator based only on . The performance of a sequence of estimators is evaluated in two principal regimes:
- Stochastic benchmark: are i.i.d. from some . The cumulative excess Kullback-Leibler risk is
- Adversarial benchmark (pathwise regret): For arbitrary (well-spaced) sequences, regret is measured against the best monotone density in hindsight within amplitude bounds
where .
The adversarial regime requires minimal regularity on the input: points are well-spaced (no two closer than ), and not close to the upper boundary ().
2. The Online Grenander (OG) Estimator
The classical Grenander estimator provides the offline (batch) maximum likelihood estimator (MLE) over , resulting in a piecewise-constant histogram supported at the order statistics. The online analogue (OG) operates as follows at each :
- Input: Amplitude bounds ; initialize .
- For : Solve
Theorem 2.1 (Excess KL risk of OG).
If are i.i.d. with ,
The derivation utilizes classical entropy arguments: the (offline) Grenander estimator achieves ; summing over gives an aggregate cumulative risk.
3. The Expert Aggregation (EA) Estimator
To bypass the computational burden of solving isotonic MLEs at each step, the Expert Aggregation (EA) estimator discretizes into a finite net of monotone histograms, and employs exponential weighting:
- Expert set construction:
- Grid breakpoints , .
- Log-heights grid , .
- : All monotone histograms with at most bins, breakpoints from , heights from , normalized to integrate to 1 and lying in .
- Cardinality: .
- Exponential weighting over experts , , and for
- Mixability Lemma: For log-loss, .
Theorem 2.2 (Pathwise regret of EA).
Under mild regularity (the data in ), choosing for yields
The proof uses histogram compression (bin-merge for -bin approximation, error ), bin/height rounding (error ), the bound , and exponential-weights log-loss mixability. Selecting produces the displayed regret rate.
4. Log-Optimal Sequential -to- Calibration
An application of online monotone density estimation appears in sequential hypothesis testing for calibration of -values to -values. Under the null hypothesis, the -values are sequentially super-uniform: . A -to- calibrator is a nonincreasing function with , so that is a valid -value. Admissible calibrators correspond exactly to monotone densities on .
Under an alternative with density , the log-optimal calibrator is the true density: . Thus, estimating the log-optimal -to- calibrator corresponds to online monotone density estimation of .
An empirical adaptive procedure: at each , set (OG or EA) applied to the observed , and define the -process .
Theorem 3.1 (Asymptotic log-optimality).
If are i.i.d. with , then for either OG- or EA-based calibrator,
Corollary (Consistency of -process).
If and , then grows linearly at rate , implying that the sequential test rejects in finite time with probability 1.
5. Empirical Investigation
Numerical assessments are performed in both well-specified and mis-specified regimes:
- Stochastic setting (, replicates):
- Densities: linear (), quadratic (), and a 4-bin piecewise constant.
- Both OG and EA estimators closely track the oracle log-likelihood ; EA demonstrates smaller finite-sample regret, particularly when is milder (e.g., linear).
- Change-point (mis-specified) setting:
- Data follows one linear monotone form for , then switches to another.
- EA quickly adapts to the new regime via weight reallocation among experts—incurring substantially lower post-change regret—whereas OG, which relies on the full data history, adapts more slowly.
These experiments corroborate the theoretical excess-risk for OG and pathwise regret for EA. A plausible implication is that expert aggregation offers practical advantages in nonstationary environments.
6. Summary Table: Algorithmic and Statistical Properties
| Estimator | Stochastic (i.i.d.) Excess Risk | Adversarial Regret Bound |
|---|---|---|
| Online Grenander | (Theorem 2.1) | Not minimized; recomputes MLE |
| Expert Aggregation | (via expert approximation) | (Theorem 2.2) |
Both algorithms support online monotone density estimation, but EA provides tighter adversarial guarantees and superior adaptivity in nonstationary or change-point settings.
7. Context and Significance
Online monotone density estimation extends classical nonparametric MLEs to the sequential, potentially adversarial context, providing both theoretical guarantees in KL-risk and worst-case regret. Its connection to sequential calibration for -to- procedures emphasizes the foundational role of monotonicity constraints in adaptive hypothesis testing. The link to exponential weighting and mixture-of-experts methods also places this problem at the intersection of shape-constrained inference, online learning, and sequential testing theory. The approach synthesizes classical statistical theory (Grenander estimator, entropy arguments) with modern online learning methods (expert aggregation, mixability) (Hore et al., 9 Feb 2026).