Abstract
We present a near-optimal algorithm for the Online Facility Location (OFL) problem that incorporates machine-learned predictions to improve performance. In the standard OFL setting, $n$ demand points arrive sequentially and must be irrevocably assigned to a facility, with the goal of minimizing the sum of facility opening costs and connection distances. While traditional deterministic algorithms are limited by a fundamental lower bound of $\Omega(\frac{\log n}{\log \log n})$, our proposed algorithm achieves a competitive ratio of $O(\min\{\log \frac{n\eta_\infty}{\mathrm{OPT}}, \log{n} \})$, where $\eta_\infty$ represents the maximum prediction error. This result demonstrates that our approach is both consistent (performing optimally with accurate predictions) and robust (maintaining standard $O(\log n)$ performance even with adversarial predictions). We validate our theoretical findings through empirical evaluations on real-world datasets, including Euclidean and graph-based metrics with non-uniform opening costs.
Introduction
The Online Facility Location (OFL) problem is a cornerstone of operations research and online algorithms. In this scenario, demand points (e.g., customers) appear one by one in a metric space. For every arriving point, an algorithm must decide immediately whether to open a new facility at a certain cost or assign the point to an existing facility. The objective is to minimize the total cost, which is the sum of all facility opening costs and the distances between points and their assigned facilities.
Because decisions are made under uncertainty regarding future demand, the problem is inherently difficult. Classical results show that no deterministic algorithm can achieve a competitive ratio better than $\Omega(\frac{\log n}{\log \log n})$. However, the recent rise of "learning-augmented algorithms" suggests a way forward: if we have access to a predictor—perhaps a machine learning model trained on historical data—can we use its suggestions to break through these theoretical barriers?
Problem Formulation and Predictions
We assume that for each arriving demand point $x_i$, the algorithm is provided with a prediction $f_{x_i}^{\mathrm{pred}}$. This prediction is a suggestion of which facility $f_{x_i}^{\mathrm{opt}}$ would serve $x_i$ in the offline optimal solution. The quality of these predictions is measured by the maximum error $\eta_\infty = \max_i d(f_{x_i}^{\mathrm{pred}}, f_{x_i}^{\mathrm{opt}})$.
A key insight of this work is that the maximum error $\eta_\infty$ is the fundamental parameter governing the competitive ratio. While total error (the sum of distances) is often used in other learning-augmented problems, we prove that for OFL, the algorithm's performance is most sensitive to the single worst prediction.
The Prediction-Augmented Meyerson Algorithm
To leverage these predictions, we introduce Prediction-augmented Meyerson, an algorithm that blends the classic randomized approach of Meyerson (2001) with a novel prediction-handling strategy. The algorithm operates through three main mechanisms:
- The Meyerson Step: Upon a point's arrival, the algorithm first executes a standard Meyerson step, which decides whether to open a facility based on the current connection cost. This ensures the algorithm remains grounded in proven online strategies.
- Geometric Exploration: Rather than blindly trusting a prediction and opening a facility at $f_{x_i}^{\mathrm{pred}}$ (which could be prohibitively expensive), the algorithm uses the "budget" incurred by the Meyerson step to explore. It attempts to open facilities within balls of geometrically decreasing radii centered at the predicted location, doubling the allowed opening cost with each step. This allows the algorithm to handle non-uniform opening costs, a significant advancement over prior work.
- Calibration: To protect against "garbage" predictions, the algorithm includes a calibration phase. If a prediction is significantly further away than the best currently available facility, the prediction is ignored to prevent unnecessary expenditures.
Theoretical and Empirical Results
Theoretical Guarantees
Our analysis shows that the algorithm is $O(1)$-consistent and $O(\log n)$-robust. Specifically, when predictions are perfect ($\eta_\infty = 0$), the algorithm achieves a constant competitive ratio. When predictions are arbitrarily bad, the algorithm gracefully degrades to the $O(\log n)$ ratio of the standard Meyerson algorithm. Between these extremes, the ratio scales with $\log \frac{n\eta_\infty}{\mathrm{OPT}}$, successfully bypassing the $\Omega(\frac{\log n}{\log \log n})$ barrier when the error is small.
Experimental Performance
We evaluated the algorithm across four diverse datasets:
- Twitter & Adult: Euclidean datasets representing user locations and census features.
- US-PG: A graph-based dataset of the US power grid where distances are shortest paths.
- Non-Uni: A specialized Euclidean dataset with non-uniform opening costs.
In all cases, the Prediction-augmented Meyerson algorithm outperformed the standard baseline. The advantage was most pronounced in the Non-Uni dataset, where the geometric exploration strategy successfully balanced proximity to predictions with the need to avoid high-cost facility locations. Even when using a simple predictor—trained on just 30% of the data—the algorithm provided significant cost savings over traditional online methods.
Conclusion
This work provides a robust framework for incorporating predictions into online facility location. By focusing on the maximum prediction error and employing a geometric exploration strategy, we provide an algorithm that is both theoretically optimal and practically effective. Future research may explore more sophisticated predictor architectures, such as Graph Neural Networks, to further refine the quality of the facility suggestions provided to the algorithm.
Summary updated