Introduction
Online resource allocation is a cornerstone of modern operations, from airlines managing seat inventory to retailers optimizing flash sales. Traditionally, algorithms for these tasks are designed for one of two extremes: stochastic models, where arrivals are independent and identically distributed (i.i.d.), or adversarial models, where arrivals are worst-case. While stochastic models aim to minimize regret, adversarial models seek a high competitive ratio.
This paper introduces a unified framework that bridges these worlds by leveraging machine learning (ML) predictions. The challenge is that ML models vary in quality; an algorithm must be consistent (performing optimally with good predictions) and robust (maintaining safety with bad ones), regardless of the underlying arrival process.
The Challenge of Prediction Quality
A primary difficulty in online allocation is that the quality of external forecasts is often unknown. As shown in Figure 1, an algorithm may encounter periods where predictions align closely with actual demand and other periods where they deviate significantly. A naive approach that blindly follows predictions would fail under the conditions shown in the lower panel of Figure 1, while an overly conservative approach would miss the efficiency gains possible in the upper panel.
Methodology: Shadow Prices and Adaptive Switching
The authors propose a "Main Algorithm" that avoids predicting exact arrival sequences, focusing instead on shadow prices ($\hat{\mu}$). These prices represent the opportunity cost of using a resource unit.
Key Technical Components:
- Dual-Adjusted Greedy (GRD): Decisions are made by accepting requests only if their reward exceeds the predicted shadow price.
- Mirror Descent with Adaptive Step Sizes: The algorithm updates shadow prices using a parameter-free version of Mirror Descent. This allows it to "learn" prediction accuracy on the fly without knowing the error margin ($a$) in advance.
- The Switching Mechanism: The algorithm initially assumes a stochastic environment. It monitors its performance against a theoretical benchmark; if rewards drop significantly, it triggers a hypothesis test and switches to a conservative, adversarial-robust mode.
Theoretical and Empirical Results
The proposed framework achieves theoretical optimality across multiple scenarios. As summarized in the table below, the algorithm matches known lower bounds for regret in stochastic settings and maintains competitive rewards in adversarial settings, even when prediction accuracy is unknown.
In empirical tests using the H&M Retail Dataset (105,000 products over two years), the algorithm consistently outperformed standard baselines. It successfully captured the "optimality gap," performing nearly as well as specialized algorithms regardless of whether the forecast came from sophisticated tools like Prophet or simpler ARIMA models.
Conclusion
This work provides a robust solution for practitioners who wish to integrate ML forecasts into resource allocation without risking catastrophic failure from poor predictions. By treating predictions as shadow prices and employing an adaptive switching mechanism, the "Main Algorithm" offers a "best of many worlds" guarantee. Future work may address the "one-way" nature of the current switch, allowing algorithms to return to stochastic modes if environments stabilize after a period of turbulence.
Summary updated