Algorithm Selection as a Bandit Problem with Unbounded Losses

Matteo Gagliolo, Jürgen SchmidhuberarXiv 2008

Abstract

This paper addresses the challenge of online algorithm selection in environments where algorithm runtimes are unknown and potentially unbounded. Traditional selection methods often rely on expensive offline training or assume a known maximum runtime to satisfy the constraints of multi-armed bandit theory. We present GAMBLETA, a two-layered framework that treats algorithm selection as a bandit problem with unbounded losses. By employing a modified solver, EXP3LIGHT-A, which utilizes a "doubling trick" to adapt to unknown runtime scales, we provide the first parameterless selection method with provable regret bounds. Empirical results on Boolean Satisfiability (SAT) benchmarks show that GAMBLETA achieves a 22% overhead relative to an ideal oracle, outperforming fixed-solver strategies and demonstrating successful convergence without prior parameter tuning.

Introduction

In many domains of artificial intelligence, particularly in combinatorial optimization and automated reasoning, no single algorithm dominates all problem instances. One solver may excel on a specific subset of problems while stalling indefinitely on others. This phenomenon necessitates the Algorithm Selection Problem: identifying the most efficient algorithm for a given task instance.

Historically, this problem has been approached through offline learning, where models are trained on massive datasets to predict performance. However, the computational cost of offline training is prohibitive, as it requires solving every training instance multiple times to establish ground truth. Online methods, which learn as they solve, offer a more efficient alternative but face a significant theoretical hurdle: most multi-armed bandit (MAB) algorithms assume a known, finite maximum loss (runtime). In practice, runtimes can vary by orders of magnitude, and imposing an arbitrary cap can invalidate theoretical guarantees or lead to suboptimal performance. This paper introduces a framework to bridge this gap, providing a mathematically sound approach to online selection with unbounded losses.

The GAMBLETA Framework

The authors propose GAMBLETA, a hierarchical framework designed to manage the exploration-exploitation trade-off in algorithm selection without requiring prior knowledge of runtime bounds.

1. Time Allocators as Bandit Arms

Rather than selecting a single algorithm to run to completion, GAMBLETA treats different Time Allocators (TAs) as the "arms" of the bandit. A TA is a strategy that executes several algorithms in parallel, assigning each a specific share of CPU time. This approach allows the system to hedge its bets; for instance, a uniform allocator can explore the performance of multiple solvers simultaneously, reducing the risk of being trapped by a single poorly performing algorithm.

2. The EXP3LIGHT-A Solver

The core of the framework is EXP3LIGHT-A, an adaptation of the EXP3LIGHT bandit solver. To handle the lack of a known maximum loss, the authors implement a "doubling trick." The solver begins with a small assumed bound for the maximum loss. If it encounters a runtime that exceeds this bound, it "restarts" the learning process with a doubled bound.

Crucially, the authors provide a formal proof (Theorem 2) demonstrating that the expected "regret"—the performance gap between GAMBLETA and the best fixed strategy—remains bounded even with these periodic restarts. This provides a level of theoretical safety previously absent from heuristic online selection models.

Experimental Evaluation

The researchers evaluated GAMBLETA using a benchmark of Boolean Satisfiability (SAT) problems, a standard testbed for algorithm selection.

Dataset and Solvers

  • SAT-UNSAT Benchmark: 1,899 instances from the SATLIB library, including both random satisfiable (uf-*) and unsatisfiable (uu-*) problems.
  • Algorithm Portfolio: The portfolio combined G2-WSAT (a local search solver) and Satz-Rand (a complete solver). This selection is particularly challenging because local search solvers are highly efficient on satisfiable instances but cannot prove unsatisfiability, potentially running forever on UNSAT instances. The complete solver can handle both but is generally slower on satisfiable problems.

Key Results

  • Efficiency vs. Oracle: GAMBLETA3 (the provably correct version) achieved a 22% overhead compared to an "ideal oracle"—a hypothetical system with perfect knowledge that always selects the fastest possible solver for every instance.
  • Comparison to Single Solvers: Using the complete solver (Satz-Rand) exclusively resulted in a 40% overhead. GAMBLETA successfully learned to utilize the faster local search solver when appropriate, significantly reducing total computation time.
  • Convergence: Experimental data confirmed that the cumulative overhead of the system stabilizes over time. This indicates that the bandit successfully identifies the optimal allocation strategy as it processes more instances, despite the lack of initial parameters.

Discussion and Future Work

While GAMBLETA provides a robust theoretical foundation, there is a measurable "cost of theory." The provably correct GAMBLETA3 is slightly more cautious and slower than previous heuristic versions (which achieved a 14% overhead but lacked formal guarantees). The authors suggest that future iterations could bridge this gap by using a more adaptive, trial-based learning rate ($\eta_r$) rather than a fixed constant.

Furthermore, the current model assumes a single-CPU environment where time is shared sequentially. A primary direction for future research is extending this framework to distributed algorithm portfolios, where multiple CPUs can execute different algorithms in parallel. Additionally, integrating more complex "empirical hardness models" (features beyond basic variable counts) could further refine the accuracy of the time allocators.

Conclusion

GAMBLETA represents a significant step forward in making online algorithm selection both practical and theoretically sound. By removing the requirement for predefined runtime bounds and providing a parameterless learning mechanism, it offers a "plug-and-play" solution for complex AI tasks where performance is highly variable and unpredictable.

Summary updated

BibTeX
@misc{gagliolo2008algorithm,
  author = {Matteo Gagliolo and Jürgen Schmidhuber},
  title = {{Algorithm Selection as a Bandit Problem with Unbounded Losses}},
  year = {2008},
  eprint = {0807.1494},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/0807.1494},
}
Figure