Abstract
For incremental quantile estimators the step size and possibly other tuning parameters must be carefully set. However, little attention has been given on how to set these values in an online manner. In this article we suggest two novel procedures that address this issue. The core part of the procedures is to estimate the current tracking mean squared error (MSE). The MSE is decomposed in tracking variance and bias and novel and efficient procedures to estimate these quantities are presented. It is shown that estimation bias can be tracked by associating it with the portion of observations below the quantile estimates. The first procedure runs an ensemble of $L$ quantile estimators for wide range of values of the tuning parameters and typically around $L = 100$. In each iteration an oracle selects the best estimate by the guidance of the estimated MSEs. The second method only runs an ensemble of $L = 3$ estimators and thus the values of the tuning parameters need from time to time to be adjusted for the running estimators. The procedures have a low memory foot print of $8L$ and a computational complexity of $8L$ per iteration. The experiments show that the procedures are highly efficient and track quantiles with an error close to the theoretical optimum. The Oracle approach performs best, but comes with higher computational cost. The procedures were further applied to a massive real-life data stream of tweets and proofed real world applicability of them.
Introduction
In streaming data analysis, estimating quantiles such as the median or the 95th percentile is a fundamental task. Incremental estimators are preferred as they update estimates point-by-point without requiring the storage of historical data. A critical challenge in these algorithms is the selection of the step size parameter, $\lambda$. A small $\lambda$ leads to high stability but slow adaptation (high bias), while a large $\lambda$ allows for rapid tracking at the cost of high volatility (high variance). This paper introduces methods to dynamically tune $\lambda$ in an online fashion by minimizing the estimated Mean Squared Error (MSE).
Methodology: MSE Decomposition and Bias Estimation
The proposed approach hinges on the decomposition of MSE into tracking variance and squared bias: $MSE = Bias^2 + Variance$. While the true quantile is unknown, the authors demonstrate that variance can be tracked using generalized exponential smoothing.
More innovatively, the bias is estimated by monitoring the frequency of observations falling below the current estimate. For a target quantile $q$, if the actual proportion of observations below the estimate deviates from $q$, it indicates a tracking lag or bias. By utilizing a first-order Taylor approximation, the authors show that this bias is observable and can be used to guide parameter tuning without knowledge of the underlying distribution.
The Oracle and HIL Procedures
Two procedures are proposed to leverage this MSE estimation:
- The Oracle Procedure: This method maintains an ensemble of $L$ (e.g., $L=100$) quantile estimators, each operating with a different fixed $\lambda$. An "Oracle" calculates the estimated MSE for every member of the ensemble in each iteration and selects the estimate from the member with the lowest current MSE.
- The HIL (High, Intermediate, Low) Procedure: A more computationally efficient alternative that uses only three estimators. The $\lambda$ values of these three estimators are periodically adjusted based on their relative performance, allowing the parameters to "drift" toward the optimal value over time.
Experimental Results
The procedures were validated using synthetic data streams with shifting dynamics and a real-world dataset of Twitter traffic during the 2011 Norway attacks.
In synthetic tests, the Oracle approach demonstrated the ability to select $\lambda$ values that closely follow the theoretical optimum, effectively balancing the trade-off between bias and variance as the data stream's properties changed.
On the Twitter dataset, the HIL procedure successfully adapted to extreme volatility. During the sudden spike in tweet frequency following the Oslo bombing, the algorithm automatically increased $\lambda$ to track the rapid change and subsequently decreased it once the traffic stabilized, maintaining high precision throughout the event.
Conclusion
The proposed Oracle and HIL procedures provide a robust framework for the automatic tuning of incremental quantile estimators. By decomposing MSE and utilizing an observable proxy for bias, these methods achieve near-optimal tracking performance with low computational overhead. While the Oracle approach offers superior accuracy, the HIL procedure provides a highly efficient alternative for large-scale applications.
Summary updated