SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Eric Balkanski
Columbia University eb3224@columbia.edu
Noemie Perivier
Columbia University np2708@columbia.edu
Clifford Stein
Columbia University cliff@ieor.columbia.edu
Hao-Ting Wei
Columbia University hw2738@columbia.edu
An important goal of modern scheduling systems is to efficiently manage power usage. In energy-efficient scheduling, the operating system controls the speed at which a machine is processing jobs with the dual objective of minimizing energy consumption and optimizing the quality of service cost of the resulting schedule. Since machine-learned predictions about future requests can often be learned from historical data, a recent line of work on learning-augmented algorithms aims to achieve improved performance guarantees by leveraging predictions. In particular, for energy-efficient scheduling, Bamas et. al. [NeurIPS '20] and Antoniadis et. al. [SWAT '22] designed algorithms with predictions for the energy minimization with deadlines problem and achieved an improved competitive ratio when the prediction error is small while also maintaining worst-case bounds even when the prediction error is arbitrarily large.
In this paper, we consider a general setting for energy-efficient scheduling and provide a flexible learning-augmented algorithmic framework that takes as input an offline and an online algorithm for the desired energy-efficient scheduling problem. We show that, when the prediction error is small, this framework gives improved competitive ratios for many different energy-efficient scheduling problems, including energy minimization with deadlines, while also maintaining a bounded competitive ratio regardless of the prediction error. Finally, we empirically demonstrate that this framework achieves an improved performance on real and synthetic datasets.
Large data centers and machine learning models are important contributors to the growing impact that computing systems have on climate change. An important goal is thus to efficiently manage power usage in order to not only complete computing tasks in a timely manner but to also minimize energy consumption. In many operating systems, this tradeoff can be controlled by carefully scaling the speed at which jobs run. An extensive area of scheduling has studied such online (and offline) speed scaling problems (see, e.g., [1]). Since the speed of many processors is approximately the cube root of their power [25, 15], these works assume that the power of a processor is equal to speed to some power  $\alpha \geq 1$ , where  $\alpha$  is thought of as being approximately 3 [28, 10] and the total energy consumption is power integrated over time.
Online energy-efficient scheduling algorithms have mostly been evaluated using competitive analysis, which provides robust guarantees that hold for any instance. However, since competitive analysis evaluates algorithms over worst-case instances, it can often be pessimistic. In particular, it ignores the
Problem	Previous results	Our results with predictions
without predictions	with predictions	Consistency	Robustness
Flow time	2 [3]	None	(1 + (2λ)1/α)α	1+22α+1λ1/α/λ
Fractional weighted flow time	2 [14]
Integral weighted flow time	O((α/log α)2) [12]	(1 + ((α/log α)2λ)1/α)α	1+(α/log α)22αλ1/α/λ
Deadlines	eα[10]	[7, 4]	1 + λ	O(4α2/λα-1)
Table 1: The best-known competitive ratios for 4 energy-efficient scheduling problems, previous work studying these problems in the algorithms with predictions framework, and our consistency and robustness results, for any  $\lambda \in (0,1]$ . Note that when  $\lambda$  is sufficiently small, the consistency improves over the best-known competitive ratios, while also maintaining bounded robustness. A detailed comparison with the results of [7, 4] for deadlines is provided in Section 1.2.
fact that, in the context of scheduling, future computation requests to computing systems can often be estimated from historical data. A recent line of work on algorithms with predictions aims to address this limitation by assuming that the algorithm designer is given access to machine-learned predictions about the input. In the context of online algorithms, where this line of work has been particularly active, the predictions are about future requests and the goal is to achieve improved competitive ratios when the predictions are accurate (consistency), while also maintaining the benefits of worst-case analysis with guarantees that hold even when the predictions are arbitrarily wrong (robustness).
In this framework with predictions, Bamas et al. [7] and Antoniadis et al. [4] recently studied the energy minimization with deadlines problem, which is a classical setting for energy-efficient scheduling (see, e.g., [28, 10]). However, there are many scenarios where the jobs do not have strict deadlines and the goal is instead to minimize the job response time. In energy plus flow time minimization problems, which are another family of energy-efficient scheduling problems that have been extensively studied in the setting without predictions, the objective is to minimize a combination of the energy consumption and the flow time of the jobs, which is the difference between their release date and completion time (see, e.g., [2, 12, 14, 3]).
In this paper, we study a general energy-efficient scheduling problem that we augment with predictions. This general problem includes both energy minimization with deadlines, which has been previously studied with predictions, and energy plus flow time minimization, which has not been previously studied with predictions, as well as many other variants and generalizations. In particular, the flow time problem with predictions introduces challenges that require novel learning-augmented scheduling algorithms (see Section 3 for additional discussion).
An instance of the General Energy-efficient Scheduling (GES) problem is described by a collection  $\mathcal{I}$  of  $n$  jobs and an arbitrary quality of service cost function  $F$ . Each job  $(j, r_j, p_j) \in \mathcal{I}$  consists of a release time  $r_j$ , a processing time  $p_j$ , and an identifier  $j$  (and potentially other parameters such as weights  $v_j$  or deadlines  $d_j$ ). A schedule  $S$  is specified by the speeds  $s_j(t)$  at which job  $j$  is processed by the machine at time  $t$ . The goal is to find a schedule of minimum cost  $E(S) + F(S, \mathcal{I})$ , where the energy consumption of a schedule is  $E(S) = \int_{t \geq 0} (\sum_{j} s_j(t))^{\alpha} \mathrm{d}t$ , for some constant  $\alpha > 0$ . In the general energy-efficient scheduling with predictions (GESP) problem, the algorithm is given at time  $t = 0$  a collection  $\hat{\mathcal{I}}$  of  $\hat{n}$  predicted jobs  $(j, \hat{r}_j, \hat{p}_j)$ , which is a similar prediction model as in [7]. For all our results, we assume that the quality cost function  $F$  is monotone and subadditive, which are two mild conditions that are satisfied for the problems with flow times and with deadlines.
Near-optimal consistency and bounded robustness. Our first goal is to design an algorithm for the GESP problem that achieves a good tradeoff between its consistency (competitive ratio when the predictions are exactly correct) and robustness (competitive ratio when the predictions are arbitrarily wrong). Our first main result is that for any instance of the GES problem for which there exists a constant competitive algorithm and an optimal offline algorithm, there is an algorithm with predictions that is  $1 + \epsilon$  consistent and  $O(1)$  robust for any constant  $\epsilon \in (0,1]$  (Corollary 3.5). Since problems
with the flow time and the problem with deadlines admit constant-competitive algorithms, we achieve a consistency that is arbitrarily close to optimal while also maintaining constant robustness for these problems (see Table 1 for a summary of problem-specific upper bounds). We complement this result by showing that there is a necessary trade-off between consistency and robustness for the flow time problem: for any  $\lambda >0$ , there is no  $1 + \lambda$ -consistent algorithm that is  $o(\sqrt{1 + 1 / \lambda})$ -robust (Appendix A.2).
The competitive ratio as a function of the prediction error. The second main result is that our algorithm achieves a competitive ratio that smoothly interpolates from the  $1 + \epsilon$  consistency to the constant robustness as a function of the prediction error (Theorem 3.4). To define the prediction error, we denote by  $\mathcal{J}^{+} = \mathcal{J}\cap \hat{\mathcal{J}}$  the jobs that are correctly predicted. We define the prediction error  $\eta = \frac{1}{\mathrm{OPT}(\hat{\mathcal{J}})}\max \{\mathrm{OPT}(\mathcal{J}\setminus \mathcal{J}^{+}),\mathrm{OPT}(\hat{\mathcal{J}}\setminus \mathcal{J}^{+})\}$ , which is the maximum between the optimal cost of scheduling the jobs  $\mathcal{J}\setminus \mathcal{J}^{+}$ that arrived but were not predicted to arrive and the cost of the jobs  $\hat{\mathcal{J}}\setminus \mathcal{J}^{+}$ that were predicted to arrive but did not arrive. This prediction error is upper bounded by the prediction error in [7] for the problem with uniform deadlines.
Extension to jobs that are approximately predicted correctly. We generalize our algorithm and the previous result to allow the correctly predicted jobs  $\mathcal{I}^+$  to include jobs that are approximately predicted correctly, where the tolerable approximation is parameterized by a parameter chosen by the algorithm designer. The result for this extension requires an additional smoothness condition on the quality cost  $F(S, \mathcal{I})$  of a schedule. This condition is satisfied for the flow time problem, but not by the one with deadlines. $^1$
Experiments. In Section 5, we show that when the prediction error is small, our algorithm empirically outperforms on both real and synthetic datasets the online algorithm that achieves the optimal competitive ratio for energy plus flow time minimization without predictions.
Energy-efficient scheduling. Energy-efficient scheduling was initiated by Yao et al. [28], who studied the energy minimization with deadlines problem in both offline and online settings. These offline and online algorithms were later improved in [13, 10]. Over the last two decades, energy-efficient scheduling has been extended to several other objective functions. In particular, Albers and Fujiwara [2] proposed the problem of energy plus flow time minimization, which has been studied extensively (see, e.g., [3, 8, 14, 12, 18, 11, 9]).
Learning-augmented algorithms. Algorithms with predictions is a recent and extremely active area, especially in online algorithms, where it was initiated in [22, 27]. Many different scheduling problems have been studied with predictions (see, e.g., [19, 24, 17, 20, 6, 5, 16, 21]).
Learning-augmented energy-efficient scheduling. Energy-efficient scheduling with predictions has been studied by Antoniadis et al. [4] and Bamas et al. [7], who focus on the problem with deadlines, which is a special case of our setting. The prediction model in Bamas et al. [7] is the closest to ours. For the problem with deadlines, the algorithm in [7] achieves a better consistency-robustness tradeoff than our algorithm, but their algorithm and prediction model do not extend to more general energy-efficient scheduling problems such as the flow time problem. In addition, the competitive ratio as a function of the prediction error is only obtained in [7] in the case of uniform deadlines where the difference between the deadline and release date of a job is equal for all jobs (the authors mention that defining algorithms for general deadlines becomes complex and notationally heavy when aiming for bounds as a function of the prediction error). Thanks to our algorithmic framework and definition of prediction error, our bound generalizes to the non-uniform deadlines without complicating our algorithm. Antoniadis et al. [4] propose a significantly different prediction model that requires an equal number of jobs in both the prediction  $\hat{\mathcal{I}}$  and true set of jobs  $\mathcal{I}$ . Consequently, their results are incomparable to ours and those by Bamas et al. [7].
<sup>1</sup>We note that Bamas et al. [7] give an alternate approach to transform an arbitrary algorithm with predictions for the problem with uniform deadlines to an algorithm that allows small deviations in the release time of the jobs. This approach can be applied to our algorithm for the problem with uniform deadlines.
In the General Energy-Efficient Scheduling (GES) problem, an instance is described by a collection  $\mathcal{J}$  of  $n$  jobs and a real-valued cost function  $F(S,\mathcal{J})$  that takes as input the instance  $\mathcal{J}$  and a schedule  $S$  for  $\mathcal{J}$ , and returns some quality evaluation of the schedule. Each job  $(j,r_j,p_j)\in \mathcal{J}$  consists of a release time  $r_j$ , a processing time  $p_j$ , and an identifier  $j$  (and potentially other parameters such as weights  $v_{j}$  and deadlines  $d_j$ ). We often abuse notation and write  $j\in \mathcal{J}$  instead of  $(j,r_j,p_j)\in \mathcal{J}$ . For any time interval  $I$ , we let  $\mathcal{J}_I = \{j\in \mathcal{J}:r_j\in I\}$  be the subset of jobs of  $\mathcal{J}$  with release time in  $I$ . For intervals  $I = [0,t]$  or  $I = [t,\infty]$ , we write  $\mathcal{J}_{\leq t}$  and  $\mathcal{J}_{\geq t}$ .
A feasible schedule for a set of jobs  $\mathcal{J}$  is specified by  $S = \{s_{j}(t)\}_{t\geq 0,j\in \mathcal{J}_{\leq t}}$ , where  $s(t) := \sum_{j\in \mathcal{J}_{\leq t}} s_{j}(t)$  is the speed at which the machine runs at time  $t$ . Thus,  $s_{j}(t) / s(t)$  is the fraction of the processing power of the machine allocated to job  $j$  at time  $t$ . During a time interval  $I$ , there are  $\int_{I} s_{j}(t) \mathrm{d}t$  units of work for job  $j$  that are completed and we let  $S_{I}$  be the sub-schedule  $\{s_{j}(t)\}_{t\in I, j\in \mathcal{J}_{I}}$ . The cost function we consider is a combination of energy consumption and quality cost for the output schedule. The energy consumption incurred by a schedule is  $E(S) = \int_{t\geq 0} s(t)^{\alpha} \mathrm{d}t$  where  $\alpha > 1$  is a problem-dependent constant, chosen so that the power at time  $t$  is  $s(t)^{\alpha}$ . To define the quality of a schedule, we introduce the work profile  $W_{j}^{S} := \{w_{j}^{S}(t)\}_{t\geq r_{j}}$  of schedule  $S$  for job  $j$ , where  $w_{j}^{S}(t) := p_{j} - \int_{r_{j}}^{t} s_{j}(u) \mathrm{d}u$  is the amount of work for  $j$  remaining at time  $t$ .
We consider general objective functions of the form  $\mathrm{cost}(S,\mathcal{J}) = E(S) + F(S,\mathcal{J})$  and the goal is to compute a feasible schedule of minimum cost.  $F(S,\mathcal{J}) = f((W_1^S,j_1),\ldots ,(W_n^S,j_n))$  is an arbitrary quality cost function that is a function of the work profiles and the jobs' parameters. In the energy minimization with deadlines problem,  $F(S,\mathcal{J}) = \infty$  if there is a job  $j$  with completion time  $c_{j}^{S}$  such that  $c_{j}^{S} > d_{j}$ , and  $F(S,\mathcal{J}) = 0$  otherwise. In the energy plus flow time minimization problem, we have  $F(S,\mathcal{J}) = \sum_{j\in \mathcal{J}}c_{j}^{S} - r_{j}$  (see Section 3.3 for additional functions  $F$ ). A function  $F(S,\mathcal{J})$  is subadditive if for all sets of jobs  $\mathcal{I}_1$  and  $\mathcal{I}_2$ , we have  $F(S,\mathcal{I}_1\cup \mathcal{I}_2)\leq F(S,\mathcal{I}_1) + F(S,\mathcal{I}_2)$ .  $F$  is monotone if for all sets of jobs  $\mathcal{I}$  and schedules  $S$  and  $S^{\prime}$  such that  $w_{j}^{S}(t)\leq w_{j}^{S^{\prime}}(t)$  for all  $j\in \mathcal{I}$  and  $t\geq r_j$ , we have that  $F(S,\mathcal{I})\leq F(S^{\prime},\mathcal{I})$ . We assume throughout the paper that  $F$  is monotone subadditive, which holds for the deadlines and flow time problems. We let  $S^{*}(\mathcal{J})$  and  $\mathrm{OPT}(\mathcal{J}):= \mathrm{cost}(S^{*}(\mathcal{J}),\mathcal{J})$  be an optimal offline schedule and the optimal objective value.
The general energy-efficient scheduling with predictions problem. We augment the GES problem with predictions regarding future job arrivals and call this problem the General Energy-Efficient Scheduling with Predictions problem (GESP). In this problem, the algorithm is given at time  $t = 0$  a prediction  $\hat{\mathcal{I}} = \{(j,\hat{r}_j,\hat{p}_j)\}$  regarding the jobs  $\mathcal{J} = \{(j,r_j,p_j)\}$  that arrive online. An important feature of our prediction model is that the number of predicted jobs  $|\hat{\mathcal{I}}|$  can differ from the number of true jobs  $|\mathcal{I}|$ .
Next, we define a measure for the prediction error which generalizes the prediction error in [7] for the problem with uniform deadlines to any GES problem. With  $\mathcal{I}^{+} = \mathcal{I}\cap \hat{\mathcal{I}}$  being the correctly predicted jobs, we define the prediction error as
$$
\eta (\mathcal {J}, \hat {\mathcal {J}}) = \frac {1}{\mathrm {O P T} (\hat {\mathcal {J}})} \max  \{\mathrm {O P T} (\mathcal {J} \setminus \mathcal {J} ^ {+}), \mathrm {O P T} (\hat {\mathcal {J}} \setminus \mathcal {J} ^ {+}) \},
$$
where  $\mathsf{OPT}(\mathcal{J}\setminus \mathcal{J}^{+})$  is the optimal cost of scheduling the true jobs  $(j,r_j,p_j)$  such that either the prediction for  $j$  was wrong or there was no prediction for  $j$  and that  $\mathsf{OPT}(\hat{\mathcal{J}}\setminus \mathcal{J}^{+})$  is the optimal cost of scheduling the predicted jobs  $(j,\hat{r}_j,\hat{p}_j)$  such that either the prediction for  $j$  was wrong or  $j$  never arrived. The prediction error  $\eta (\mathcal{J},\hat{\mathcal{J}})$  is then the maximum of these costs, normalized by the optimal cost  $\mathsf{OPT}(\hat{\mathcal{J}})$  of scheduling the predicted jobs. We assume that  $\hat{\mathcal{J}}\neq \emptyset$  to ensure that  $\eta (\mathcal{J},\hat{\mathcal{J}})$  is well-defined. This prediction error is upper bounded by the prediction error  $\| w^{\mathrm{true}} - w^{\mathrm{pred}}\|_{\alpha}^{\alpha}$  considered in [7] for the problem with uniform deadlines, which we prove in Appendix F.1. Here  $w^{\mathrm{true}}$  and  $w^{\mathrm{pred}}$  are the true and predicted workload at each time step  $t$ , i.e., the sum of the processing times of the jobs that arrive at  $t$ .
For ease of notation, we allow the machine to split its processing power at every time step  $t$  over multiple jobs. In practice, this is equivalent to partitioning time into arbitrarily small time periods and splitting each time period into smaller subperiods such that the machine is processing one job during each subperiod.
We note that in the above error model, a job  $j$  is in the set of correctly predicted jobs  $\mathcal{I}^+$  only if all the parameters of  $j$  have been predicted exactly correctly. To overcome this limitation, we introduce in Section 4 a more general error model where some small deviations between the true and predicted parameters of a job  $j$  are allowed for the correctly predicted jobs  $\mathcal{I}^+$ . In Appendix F.1, we provide further discussion of this prediction model in comparison with [7, 4].
Performance metrics. The standard evaluation metrics for an online algorithm with predictions are its consistency, robustness, and competitive ratio as a function of the prediction error [23, 22]. The competitive ratio of an algorithm ALG as a function of a prediction error  $\eta$  is  $c(\eta) = \max_{\mathcal{J},\hat{\mathcal{J}}:\eta (\mathcal{J},\hat{\mathcal{J}})\leq \eta}\frac{\mathrm{cost}_{\mathrm{ALG}}(\mathcal{J},\hat{\mathcal{J}})}{\mathrm{OPT}(\mathcal{J})}$ . ALG is  $\rho$ -robust if for all  $\eta \geq 0$ ,  $c(\eta)\leq \rho$  (competitive ratio when the error is arbitrarily large) and  $\mu$ -consistent if  $c(0)\leq \mu$  (competitive ratio when the prediction is exactly correct). We say that the competitive ratio of ALG is smooth if it smoothly degrades from  $\mu$  to  $\rho$  as the prediction error  $\eta$  grows.
3 The Algorithm
In this section, we develop a simple and general algorithmic framework for GESP and analyze the resulting consistency, robustness, and competitive ratio as a function of the prediction error. We first note that the algorithm with predictions from [7] for the problem with deadlines does not easily generalize to some of the other problems that we consider, including the flow time problem (see Appendix F.3 for additional discussion). A major difference is that our algorithm consists of two distinct phases.
Predictions cannot be completely trusted. We also note that a first natural approach is to assume that the predictions are exactly correct and aim for a 1-consistent algorithm. For the problem with deadlines, Bamas et al. [7] showed that there is no 1-consistent algorithm with bounded robustness. In Appendix A.1, we show that this approach would also fail for the flow time problem because the algorithm might start by processing jobs too fast and consume too much energy when trusting the predictions. More generally, in Appendix A.2, we show that there is a necessary trade-off between consistency and robustness for the flow time problem by proving that any  $1 + \lambda$ -consistent algorithm must be  $O(\sqrt{1 + 1 / \lambda})$ -robust.
3.1 Description of the algorithm
The algorithm, called TPE, takes as input an arbitrary quality of service cost function  $F$ , predictions  $\hat{\mathcal{I}}$ , a confidence level  $\lambda \in (0,1]$  in the predictions, an offline algorithm OFFLINEAlg for  $F$ , and an online algorithm ONLINEAlg for  $F$  (without predictions). We denote by  $\mathrm{OFF}(\mathcal{I}) := \mathrm{cost}(\mathrm{OFFLINEAlg}(\mathcal{I}),\mathcal{I})$  the objective value achieved by OFFLINEAlg over  $\mathcal{I}$ .
Algorithm 1 Two-Phase Energy Efficient Scheduling (TPE)
Input: predicted and true sets of jobs  $\hat{\mathcal{I}}$  and  $\mathcal{I}$ , quality of cost function  $F$ , offline and online algorithms (without predictions) OFFLINEALG and ONLINEALG for problem  $F$ , confidence level  $\lambda \in (0,1]$ .
1: for  $t \geq 0$  do
2: if  $\mathrm{OFF}(\mathcal{I}_{< t}) > \lambda \cdot \mathrm{OFF}(\hat{\mathcal{I}})$  then
3:  $t_{\lambda} \gets t$
4: break
5:  $\{s_{j}(t)\}_{j\in \mathcal{J}_{<  t}}\gets \mathrm{ONLINEALG}(\mathcal{J}_{\leq t})(t)$
6:  $\{\hat{s}_j(t)\}_{t\geq t_\lambda ,j\in \hat{\mathcal{J}}_{\geq t_\lambda}}\gets \mathrm{OFFLINEALG}(\hat{\mathcal{J}}_{\geq t_\lambda})$
7: for  $t \geq t_{\lambda}$  do
8:  $\{s_j(t)\}_{j\in \mathcal{J}_{\leq t}\setminus \hat{\mathcal{J}}_{\geq t_\lambda}}\gets \mathrm{ONLINEALG}(\mathcal{J}_{\leq t}\setminus \hat{\mathcal{J}}_{\geq t_\lambda})(t)$
9:  $\{s_j(t)\}_{j\in \mathcal{I}_{[t_\lambda ,t]}\cap \hat{\mathcal{J}}_{\geq t_\lambda}}\gets \{\hat{s}_j(t)\}_{j\in \mathcal{I}_{[t_\lambda ,t]}\cap \hat{\mathcal{J}}_{\geq t_\lambda}}$
10: return  $\{s_j(t)\}_{t\geq 0,j\in \mathcal{J}}$
The algorithm proceeds in two phases. In the first phase (Lines 1-5), TPE ignores the predictions and runs the auxiliary online algorithm ONLINEAlg over the true jobs  $\mathcal{I}_{\leq t}$  that have been released by time  $t$ . More precisely, during the first phase of the algorithm,  $s_j(t)$  is the speed according to the online algorithm ONLINEAlg for all jobs. The first phase ends at the time  $t_\lambda$  when the cost of the offline schedule computed by running OFFLINEAlg on jobs  $\mathcal{I}_{\leq t}$  reaches the threshold value  $\lambda \cdot \mathrm{OFF}(\hat{\mathcal{I}})$ . As we will detail in the analysis section, this first phase guarantees a bounded robustness since we ensure that the offline cost for the true jobs reaches some value before starting to trust the predictions (hence, TPE does not initially 'burn' too much energy compared to the optimal offline cost, unlike the example described in Appendix A.1).