Stochastic Online Convex Optimization; Application to probabilistic time series forecasting

Olivier WintenbergerarXiv 2021

Abstract

We introduce a general framework of stochastic online convex optimization to obtain fast-rate stochastic regret bounds. We prove that algorithms such as online newton steps and a scale-free version of Bernstein online aggregation achieve best-known rates in unbounded stochastic settings. We apply our approach to calibrate parametric probabilistic forecasters of non-stationary sub-gaussian time series. Our fast-rate stochastic regret bounds are any-time valid. Our proofs combine self-bounded and Poissonnian inequalities for martingales and sub-gaussian random variables, respectively, under a stochastic exp-concavity assumption.

Introduction

In the field of Online Convex Optimization (OCO), the standard paradigm assumes an adversary selects loss functions to maximize the learner's regret. Conversely, batch learning assumes data is sampled from a static, well-behaved distribution. Real-world applications, particularly time series forecasting for electricity demand or financial indices, exist in the tension between these two extremes: they are inherently stochastic (noisy) yet non-stationary (evolving over time).

Traditional "fast-rate" regret bounds—those growing logarithmically with time ($O(\log T)$) rather than at the standard $O(\sqrt{T})$ rate—typically require loss functions to be exp-concave and gradients to be strictly bounded. However, in probabilistic forecasting, loss functions are often not globally convex, and noise can be unbounded. This paper introduces the Stochastic Online Convex Optimization (SOCO) framework to bridge this gap, providing theoretical guarantees for learning in "messy" stochastic environments.

The SOCO Framework

The core innovation of SOCO is a shift in performance measurement. Instead of evaluating an algorithm against raw, noisy observed losses, we measure performance against conditional risk—the expected loss given the history of the process. This approach allows the framework to handle non-stationary sub-gaussian time series where the underlying distribution may shift, but the conditional expectations remain manageable.

Stochastic Exp-Concavity

A key insight of this work is that stochasticity can be a mathematical advantage. While a raw loss function might lack desirable properties, the conditional risk (the average behavior) often exhibits "stochastic exp-concavity." By leveraging this, we can derive fast-rate bounds even when the instantaneous losses are poorly behaved.

Algorithmic Contributions

1. Online Newton Step (ONS) for SOCO

Second-order methods like ONS are traditionally used for exp-concave losses. We extend ONS to the SOCO setting, proving it achieves $O(\log T)$ regret even with unbounded sub-gaussian gradients. This is made possible by a new condition (H3) which ensures that the variance of the noise does not grow at a rate that overwhelms the algorithm's second-order updates. ONS effectively minimizes a surrogate loss that accounts for gradient variance, making it inherently robust for calibration tasks.

2. Scale-Free Bernstein Online Aggregation (BOA)

We introduce a scale-free version of the BOA algorithm. Unlike standard aggregation methods, this version is "parameter-free," meaning it does not require prior knowledge of the environment's convexity constant ($\alpha$). It is scale-invariant, making it highly practical for real-world datasets where the range of values is unknown or variable. While its regret bound of $O((\log \log T)^2)$ is slightly slower than ONS, its robustness to model assumptions makes it a powerful tool for model averaging.

3. Any-Time Validity

Most OCO bounds are valid only for a fixed time horizon $T$. By utilizing Ville’s inequality and martingale theory, the bounds presented in this framework are valid for all $T$ simultaneously with high probability. This "any-time" validity is essential for safety-critical applications like financial risk management, where monitoring must be continuous.

Empirical Evaluation

Synthetic Stochastic Environments

In simulations with 100 predictors (one unbiased, others biased), the scale-free BOA demonstrated superior performance in handling varying noise levels ($\sigma$) compared to existing methods like Squint, particularly as the environment became noisier.

Electricity Demand Forecasting

Using data from the opera R package, we applied the framework to aggregate different forecasting models (GAM, AR, GBM) to predict the 50% and 95% quantiles of weekly electricity loads. BOA outperformed the standard Exponentially Weighted Algorithm (EWA) by more effectively minimizing cumulative conditional risks.

Financial Volatility (S&P500)

During the 2020 COVID-19 market crash, the BOA-ONS approach was used to estimate market volatility. The algorithm successfully adapted to the sudden "shock" by shifting weights toward ARCH models that better captured high-volatility regimes, providing more accurate 90% prediction intervals than static benchmarks.

Limitations and Future Directions

While the SOCO framework provides a robust foundation, certain limitations remain. The analysis of ARCH/GARCH models currently requires volatility to remain within a specific bounded range ($[c\sigma^2/2, \sigma^2]$); if volatility collapses to zero or explodes, the risk functions lose their necessary convexity. Furthermore, while these bounds compare the learner to the best static predictor, future work should focus on "tracking" optimization—comparing against a dynamic competitor that evolves over time. Finally, the search continues for an aggregation algorithm that achieves simultaneous optimality in both bounded deterministic and unbounded stochastic settings.

Summary updated

BibTeX
@misc{wintenberger2021stochastic,
  author = {Olivier Wintenberger},
  title = {{Stochastic Online Convex Optimization; Application to probabilistic time series forecasting}},
  year = {2021},
  eprint = {2102.00729},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2102.00729},
}
Figure