Online Search with Predictions: Pareto-optimal Algorithm and its Applications in Energy Markets

Russell Lee, Bo Sun, John C. S. Lui, Mohammad Hajiesmaili · DOI

Abstract: This paper develops learning-augmented algorithms for energy trading in volatile electricity markets. The basic problem is to sell (or buy) $k$ units of energy for the highest revenue (lowest cost) over uncertain time-varying prices, which can framed as a classic online search problem in the literature of competitive analysis. State-of-the-art algorithms assume no knowledge about future market prices when they make trading decisions in each time slot, and aim for guaranteeing the performance for the worst-case price sequence. In practice, however, predictions about future prices become commonly available by leveraging machine learning. This paper aims to incorporate machine-learned predictions to design competitive algorithms for online search problems. An important property of our algorithms is that they achieve performances competitive with the offline algorithm in hindsight when the predictions are accurate (i.e., consistency) and also provide worst-case guarantees when the predictions are arbitrarily wrong (i.e., robustness). The proposed algorithms achieve the Pareto-optimal trade-off between consistency and robustness, where no other algorithms for online search can improve on the consistency for a given robustness. Further, we extend the basic online search problem to a more general inventory management setting that can capture storage-assisted energy trading in electricity markets. In empirical evaluations using traces from real-world applications, our learning-augmented algorithms improve the average empirical performance compared to benchmark algorithms, while also providing improved worst-case performance.

Introduction

In volatile energy markets, participants must navigate the uncertainty of future prices to maximize revenue or minimize costs. This challenge is formally known as the online $k$-search problem: deciding when to trade $k$ units of a commodity without knowing future price fluctuations. Traditionally, this is addressed via competitive analysis, which designs algorithms to minimize the competitive ratio—the performance gap between the online algorithm and an offline optimal strategy with perfect hindsight.

While traditional robust algorithms provide a safety net for worst-case scenarios, they often ignore valuable, albeit imperfect, price forecasts. Conversely, purely machine-learning (ML) based strategies can fail catastrophically if predictions are inaccurate. This research introduces a learning-augmented framework that achieves the "best of both worlds": leveraging predictions for superior average performance while maintaining a rigorous safety floor.

Pareto-Optimal Learning-Augmented Algorithms

The core of the proposed approach is a learning-augmented Online Threshold-based Algorithm (OTA). Standard OTAs set fixed price thresholds to trigger trades. The authors' innovation lies in redesigning these thresholds based on a prediction $P$ of the maximum (or minimum) price. They evaluate these algorithms using two primary metrics:

  1. Consistency ($\eta$): The competitive ratio achieved when the prediction is perfectly accurate.
  2. Robustness ($\gamma$): The competitive ratio guaranteed in the absolute worst-case scenario, regardless of prediction error.

The researchers mathematically derived the Pareto-optimal boundary for this trade-off. This boundary represents the theoretical limit where consistency cannot be improved without sacrificing robustness. By using a piecewise threshold function that clusters trades around the predicted price $P$ while spacing others to hedge against error, the algorithm achieves this optimal balance.

Theoretical Pareto-optimal boundaries for k-max and k-min search showing the trade-off between consistency and robustness for different values of k.

Extending to Inventory Dynamics

The paper further extends the $k$-search model to Online Search with Inventory Dynamics (OSID), which is critical for modeling energy storage (e.g., batteries). In this setting, an agent must buy energy to meet varying demand over time. The authors provide an elegant "spatial decoupling" insight: managing a battery can be treated as running multiple virtual online search problems in parallel, one for each unit of demand. This allows the Pareto-optimal $k$-search logic to solve complex, multi-period inventory problems.

Empirical Performance and Key Results

The proposed algorithms were tested against real-world traces, including electricity prices from US ISOs (CAISO, NYISO, ERCOT), energy demand from data centers, and renewable supply data from NREL.

Theoretical and Empirical Superiority

The "optimal" (opt) curves derived in this work consistently outperform standard "baseline" (base) learning-augmented strategies. As shown in the comparison below, the proposed method achieves significantly better consistency for any given level of robustness across various values of $k$.

Comparison of the proposed Pareto-optimal trade-offs (opt) versus a standard baseline approach (base) for various k values, demonstrating superior consistency for fixed robustness.

Real-World Impact

In simulations using CAISO market data, the learning-augmented algorithm improved annual average performance by up to 8.4% compared to non-predictive benchmarks. Crucially, the algorithm remained robust even when predictions were intentionally degraded, outperforming standard worst-case optimized algorithms even under high error rates.

Conclusion

This work establishes the Pareto-optimal frontier for learning-augmented online search, providing a robust framework for energy trading. By bridging the gap between pessimistic competitive analysis and optimistic ML forecasts, the proposed algorithms offer a practical and theoretically sound solution for volatile markets. Future work will explore extending these guarantees to multi-way trading (arbitrage) and incorporating probabilistic forecasts into the threshold design.

Summary updated

BibTeX
@inproceedings{lee2024online,
  author = {Russell Lee and Bo Sun and John C. S. Lui and Mohammad Hajiesmaili},
  title = {{Online Search with Predictions: Pareto-optimal Algorithm and its Applications in Energy Markets}},
  booktitle = {e-Energy},
  year = {2024},
  doi = {10.1145/3632775.3639590},
}
Figure