Contract Scheduling with Predictions

Spyros Angelopoulos, Shahin Kamali

Introduction

In the design of intelligent systems, a fundamental tension exists between efficiency and flexibility. Many powerful algorithms, such as those based on dynamic programming, are "contract algorithms"—they require a pre-specified execution time to produce a meaningful result. If interrupted before this time, they typically yield no useful output. To provide "interruptibility," researchers employ contract scheduling, which executes a sequence of contracts with increasing lengths.

This work by Spyros Angelopoulos and Shahin Kamali, published in the Journal of Artificial Intelligence Research, advances the field by incorporating imperfect predictions about interruption times into the scheduling process, reducing the overhead of making algorithms interruptible.

Problem Formulation

The performance of a contract schedule is measured by its acceleration ratio. Consider a processor where an interruption occurs at time $T$. If $T$ were known in advance, one could run a single contract of length $T$. Without this knowledge, a standard strategy is to run contracts of exponentially increasing lengths (e.g., $1, 2, 4, 8, \dots$).

A standard exponential schedule. If interrupted at $T=14$, the largest completed contract is 4, resulting in an acceleration ratio of $14/4 = 3.5$.

The optimal deterministic strategy without predictions yields a worst-case acceleration ratio of 4. This paper explores how to bridge the gap between this "blind" worst-case and the ideal case using machine-learned predictions or expert hints.

Prediction Models

The authors propose two distinct models for incorporating external information:

  1. Interruption Time Prediction: The scheduler is provided with a single point estimate $\tau$ of the actual interruption time $T$.
  2. Query-Based Prediction: The scheduler can pose $n$ binary queries (e.g., "Will the interruption occur within this interval?") and receives answers that may be noisy.
The two prediction models: (a) a point estimate of the interruption time, and (b) a partition of time based on binary queries.

To evaluate these models, the authors define consistency (performance when predictions are accurate) and robustness (worst-case performance when predictions are misleading).

Algorithmic Framework

A key insight is the necessity of a "buffer." Scheduling a contract to end exactly at the predicted time $\tau$ is risky; a slight negative error in the prediction would result in a failed contract and a spike in the acceleration ratio. The authors introduce a buffer parameter $p$ to complete contracts slightly before the predicted time, ensuring safety against small errors.

By reducing contract scheduling to an "online bidding" problem, the authors derive Pareto-optimal schedules that balance consistency and robustness. They distinguish between H-aware schedules (knowing the maximum error bound $H$) and H-oblivious ones.

Key Results

The proposed algorithms were evaluated through extensive simulations using various noise distributions (Normal, Uniform, Truncated Normal) to model prediction error.

  • Theoretical Bounds: For query-based models with a robustness of 4, the authors established a lower bound on consistency of $2^{1 + 1/2^n}$.
  • Empirical Performance: In scenarios with a 10% error bound ($H=0.1$), the $H$-aware schedule achieved an average acceleration ratio of 2.23, a significant improvement over the baseline of 4.0.
  • Reliability: The prediction-based schedules outperformed traditional exponential schedules in 70% to 95% of simulated cases.

Conclusion

This research demonstrates that even imperfect predictions can drastically reduce the overhead of making algorithms interruptible. While highly consistent schedules can be fragile if errors exceed expected bounds, the proposed framework allows for a controlled trade-off between average-case efficiency and worst-case safety. Future work may extend these concepts to multi-processor environments and randomized scheduling strategies.

Summary updated

BibTeX
@article{angelopoulos2023contract,
  author = {Spyros Angelopoulos and Shahin Kamali},
  title = {{Contract Scheduling with Predictions}},
  journal = {J. Artif. Intell. Res.},
  year = {2023},
  doi = {10.1613/jair.1.14117},
}
Figure