SlowGuess/NeurIPS_2023_OCR huggingface dataset:
For an M-convex function  $f: \mathbb{Z}^N \to \mathbb{R} \cup \{+\infty\}$ , given access to  $f$ 's value and  $\operatorname{dom} f$ , we can implement the greedy algorithm with warm-starts so that both  $T_{\mathrm{init}}$  and  $T_{\mathrm{loc}}$  are polynomially bounded. Suppose that evaluating  $f(x)$  for any  $x \in \mathbb{Z}^N$  takes  $\mathsf{EO}_f$  time. Then, we can find a steepest descent direction at any  $x \in \operatorname{dom} f$  in  $T_{\mathrm{loc}} = \mathrm{O}(n^2 \mathsf{EO}_f)$  time by computing  $f(x - e_i + e_j)$  for all  $i, j \in N$ . As for the computation of  $x^\circ$ , we need additional information to identify  $\operatorname{dom} f$  (otherwise, finding any feasible solution may require exponential time in the worst case). Since  $\operatorname{dom} f$  is an M-convex set, we build on a fundamental fact that any M-convex set can be written as the set of integer points in the base polyhedron of an integer-valued submodular function [15, 31]. A set function  $\rho: 2^N \to \mathbb{R} \cup \{+\infty\}$  is called submodular if  $\rho(X) + \rho(Y) \geq \rho(X \cap Y) + \rho(X \cup Y)$  holds for  $X, Y \subseteq N$ , and its base polyhedron is defined as  $\mathbf{B}(\rho) := \{x \in \mathbb{R}^N : x(X) \leq \rho(X) (X \subseteq N), x(N) = \rho(N)\}$ , where  $\rho(\emptyset) = 0$  and  $\rho(N) < +\infty$  are assumed. Thus,  $\operatorname{dom} f$  is expressed as  $\operatorname{dom} f = \mathbf{B}(\rho) \cap \mathbb{Z}^N$  with an integer-valued submodular function  $\rho: 2^N \to \mathbb{Z} \cup \{+\infty\}$ . We assume that, for any  $x \in \mathbb{Z}^N$ , we can minimize the submodular function  $\rho + x$ , defined by  $(\rho + x)(X) := \rho(X) + x(X)$  for  $X \subseteq N$ , in SFM time. Then, we can obtain  $x^\circ \in \operatorname{dom} f$  from  $[\hat{x}] \in \mathbb{Z}^N$  in  $T_{\mathrm{init}} = \mathrm{O}(n\mathrm{SFM})$  time, as detailed in Appendix A.1. Therefore, Theorem 3.1 implies the following bound on the total time complexity.
Theorem 3.3. Given a prediction  $\hat{x} \in \mathbb{R}^N$ , we can minimize  $f$  in  $\mathrm{O}(n\mathrm{SFM} + n^{2}\mathrm{EO}_{f}\cdot \| x^{*} - \hat{x}\|_{1})$  time.
The current fastest M-convex function minimization algorithms run in  $\mathrm{O}\left( {{n}^{3}\log \frac{L}{n}{\mathrm{{EO}}}_{f}}\right)$  and  $\mathrm{O}\left( {\left( {{n}^{3} + }\right.$ ${n}^{2}\log \frac{L}{n})\left( {\log \frac{L}{n}/\log n}\right) {\mathrm{{EO}}}_{f}}\right)$  time [43],where  $L = \max \left\{  {\begin{Vmatrix}x - y{\end{Vmatrix}}_{\infty } : x,y \in  \operatorname{dom}f}\right\}$  . Thus,our algorithm runs faster if  ${\begin{Vmatrix}{x}^{ * } - \widehat{x}\end{Vmatrix}}_{1} = \mathrm{o}\left( n\right)$  and  $\mathsf{{SFM}} = \mathrm{o}\left( {{n}^{2}{\mathsf{{EO}}}_{f}}\right)$  . We discuss concrete situations where our approach is particularly effective in Appendix A.2.
4 Laminar convex minimization
This section presents how to obtain the time complexity bounds in Table 1 by applying our framework to laminar convex minimization (Laminar) and its subclasses, which are special cases of M-convex function minimization (see [31, Section 6.3]). We first introduce the problem setting of Laminar.
A laminar  $\mathcal{F} \subseteq 2^{N}$  is a set family such that for any  $X, Y \in \mathcal{F}$ , either  $X \subseteq Y$ ,  $X \supseteq Y$ , or  $X \cap Y = \emptyset$  holds. For convenience, we suppose that  $\mathcal{F}$  satisfies the following basic properties without loss of generality:  $\emptyset \in \mathcal{F}$ ,  $N \in \mathcal{F}$ , and  $\{i\} \in \mathcal{F}$  for every  $i \in N$ . Then, Laminar is formulated as follows:
$$
\underset {x \in \mathbb {Z} ^ {N}} {\text {m i n i m i z e}} \sum_ {Y \in \mathcal {F}} f _ {Y} (x (Y)) \quad \text {s u b j e c t t o} x (N) = R, \ell_ {Y} \leq x (Y) \leq u _ {Y} (Y \in \mathcal {F} \backslash \{\emptyset , N \}), \tag {2}
$$
where each  $f_{Y}:\mathbb{R}\to \mathbb{R}$  ( $Y\in \mathcal{F}$ ) is a univariate convex function that can be evaluated in  $\mathrm{O}(1)$  time,  $R\in \mathbb{Z}$ , and  $\ell_{Y}\in \mathbb{Z}\cup \{-\infty \}$  and  $u_{Y}\in \mathbb{Z}\cup \{+\infty \}$  for  $Y\in \mathcal{F}$ . We denote the objective function by  $f_{\mathrm{sum}}(x)\coloneqq \sum_{Y\in \mathcal{F}}f_{Y}(x(Y))$ . We let  $f:\mathbb{Z}^N\to \mathbb{R}\cup \{+\infty \}$  be a function such that  $f(x) = f_{\mathrm{sum}}(x)$  if  $x$  satisfies the constraints in (2) and  $f(x) = +\infty$  otherwise; then,  $f$  is M-convex and  $\operatorname {dom}f\subseteq \mathbb{Z}^{N}$  represents the feasible region of (2). Nested is a special case where  $f_{\mathrm{sum}}$  is written as  $\sum_{i\in N}f_i(x_i)$  and  $\{Y\in \mathcal{F}:|Y|\geq 2\} = \{Y_1,Y_2,\ldots ,Y_m\}$  consists of nested subsets, i.e.,  $Y_{1}\subset Y_{2}\subset \dots \subset Y_{m}$ , and Box is a special case of Nested without nested-subset constraints. Note that our framework in Section 3 only requires the ground set  $N$  to be identical over instances. Therefore, we can use it even when both objective functions and constraints change over instances.
It is well known that we can represent a laminar  $\mathcal{F} \subseteq 2^{N}$  by a tree  $T_{\mathcal{F}} = (\mathcal{V}, E)$ . The vertex set is  $\mathcal{V} = \mathcal{F} \setminus \{\emptyset\}$ . For  $Y \in \mathcal{V} \setminus \{N\}$ , we call  $X \in \mathcal{V}$  a parent of  $Y$  if  $X$  is the unique minimal set that properly contains  $Y$ ; let  $p(Y) \in \mathcal{V}$  denote the parent of  $Y$ . We call  $Y \in \mathcal{V} \setminus \{N\}$  a child of  $X$  if  $p(Y) = X$ . This parent-child relation defines the set of edges as  $E = \{(X, Y) : X, Y \in \mathcal{V}, p(Y) = X\}$ . Note that each  $\{i\} \in \mathcal{V}$  corresponds to a leaf and that  $N \in \mathcal{V}$  is the root. For simplicity, we below suppose the tree  $T_{\mathcal{F}} = (\mathcal{V}, E)$  to be binary without loss of generality. If a parent has more than two children, we can recursively divide them into one and the others, which only doubles the number of vertices. Figure 1 illustrates a tree  $T_{\mathcal{F}}$  of a laminar  $\mathcal{F} = \{\emptyset, \{1\}, \{2\}, \{3\}, \{1, 2\}, \{1, 2, 3\}\}$ .
Applications of Laminar include resource allocation [30], equilibrium analysis of network congestion games [16], and inventory and portfolio management [8]. We below describe a simple example so that the reader can better grasp the image of Laminar; we will also use it in the experiments in Section 5.
Example: staff assignment. We consider assigning  $R$  staff members to  $n$  tasks, which form the ground set  $N$ . Each task is associated with a higher-level task. For example, if staff members have completed tasks  $1, 2 \in N$ , they are assigned to a new task  $Y = \{1, 2\}$ , which may involve integrating the outputs of the individual tasks. The dependencies among all tasks, including higher-level ones, can be expressed by a laminar  $\mathcal{F} \subseteq 2^{N}$ . Each task  $Y \in \mathcal{F}$  is supposed to be done by at least  $\ell_{Y} (\geq 1)$  and at most  $u_{Y} (\leq R)$  members. An employer aims to assign staff members in an attempt to minimize the total perceived workload. For instance, if task  $i \in N$  requires  $c_{i} > 0$  amount of work and  $x_{i}$  staff members are assigned to it, each of them may perceive a workload of  $f_{i}(x_{i}) = c_{i} / x_{i}$ . Similarly, the perceived workload of task  $Y = \{1, 2\}$  is  $f_{Y}(x(Y)) = c_{Y} / x(Y)$ . The problem of assigning  $R$  staff members to  $n$  tasks to minimize the total perceived workload, summed over all tasks in  $\mathcal{F}$ , is formulated
Figure 1: Image of tree  $T_{\mathcal{F}}$ . Each leaf  $\{i\} \in \mathcal{V} (i = 1,2,3)$  has variable  $x_{i}$ . The lower part shows example assignments.
as in (2). Figure 1 illustrates two example assignments, I and II. Here, people assigned to  $\{1\}$  and  $\{2\}$  must do more tasks than those assigned to  $\{3\}$ , and hence assignment I naturally leads to a smaller total perceived workload than II. We can also use any convex function  $f_{Y}$  on  $[\ell_{Y}, u_{Y}]$  to model other objective functions. Making it faster to solve such problems with predictions enables us to manage massive allocations daily or more frequently.
Our main technical contribution is to obtain the following time complexity bound for Laminar via Theorem 3.1, which also applies to Nested since it is a special case of Laminar.
Theorem 4.1. For Laminar, given a prediction  $\hat{x} \in \mathbb{R}^N$ , we can obtain an initial feasible solution  $x^\circ \in \arg \min \{\| x - \lfloor \hat{x} \rceil \|_1 : x \in \operatorname{dom} f\}$  in  $T_{\mathrm{init}} = \mathrm{O}(n)$  time and find a steepest descent direction in Step 3 of Algorithm 1 in  $T_{\mathrm{loc}} = \mathrm{O}(n)$  time. Thus, we can solve Laminar in  $\mathrm{O}(n \| x^* - \hat{x} \|_1)$  time.
We prove Theorem 4.1 by describing how to obtain an initial feasible solution and find a steepest descent direction in Sections 4.1 and 4.2, respectively. In Section 4.3, we further reduce the time complexity bound for Box. The algorithmic techniques we use below are not so complicated and can be implemented efficiently, suggesting the practicality of our warm-start-with-prediction framework.
4.1 Obtaining initial feasible solution via fast convex min-sum convolution
We show how to compute  $x^{\circ} \in \operatorname{dom} f$  in  $T_{\mathrm{init}} = \mathrm{O}(n)$  time. Given prediction  $\hat{x} \in \mathbb{R}^{N}$ , we first compute  $\lfloor \hat{x} \rfloor \in \mathbb{Z}^{N}$  in  $\mathrm{O}(n)$  time and then solve the following special case of Laminar to obtain  $x^{\circ}$ :
$$
\underset {x \in \mathbb {Z} ^ {N}} {\text {m i n i m i z e}} \sum_ {i \in N} | x _ {i} - \lfloor \hat {x} _ {i} \rceil | \quad \text {s u b j e c t t o} \quad x (N) = R, \ell_ {Y} \leq x (Y) \leq u _ {Y} (Y \in \mathcal {F} \backslash \{\emptyset , N \}). \tag {3}
$$
Note that it suffices to find an integer optimal solution to the continuous relaxation of (3) since all the input parameters are integers. Thus, we below discuss how to solve the continuous relaxation of (3).
Solving (3) naively may be as costly as solving the original Laminar instance. Fortunately, however, we can solve it much faster using the special structure of the  $\ell_1$ -norm objective function. The method we describe below is based on the fast convex min-sum convolution [45], which immediately provides an  $\mathrm{O}(n\log^2 n)$ -time algorithm for solving (3). We simplify it and eliminate the logarithmic factors by using the fact that the objective function has only two kinds of slopes,  $\pm 1$ .
We suppose that each non-leaf vertex  $Y \in \mathcal{V}$  in  $T_{\mathcal{F}} = (\mathcal{V}, E)$  has a variable  $x_{Y} \in \mathbb{R}$ , in addition to the original variables  $x_{i}$  for leaves  $\{i\} \in \mathcal{V}$ . We consider assigning a univariate function  $g: \mathbb{R} \to \mathbb{R} \cup \{+\infty\}$  of the following form to each vertex in  $\mathcal{V}$ :
$$
g (x) = | x - b | + \delta_ {[ \ell , u ]} (x), \tag {4}
$$
Figure 2: Conjugate relation of  $g$  and  $g^{*}$ .
where  $\ell, b, u \in \mathbb{Z} \cup \{\pm \infty\}$  and  $\ell \leq b \leq u$ . Note that if  $g$  is given by (4) up to an additive constant, its convex conjugate  $g^{*}(p) = \sup \{\langle p, x \rangle - g(x) : x \in \mathbb{R}\}$  is a piecewise-linear function whose slope is  $\ell$  if  $p \leq -1$ ,  $b$  if  $-1 \leq p \leq +1$ , and  $u$  if  $p \geq +1$  (where  $\ell = b$  and/or  $b = u$  can occur). Figure 2 illustrates this conjugate relation. We below construct such functions in a bottom-up manner on  $T_{\mathcal{F}}$ .
First, we assign function  $g_{i}(x_{i}) = |x_{i} - \lfloor \hat{x}_{i}\rceil | + \delta_{[\ell_{i},u_{i}]}(x_{i})$  to each leaf  $\{i\} \in \mathcal{V}$ , which represents the  $i$ th term of the objective function and the constraint on  $x_{i}$  in (3). Next, given two functions  $g_{X}(x_{X}) = |x_{X} - b_{X}| + \delta_{[\ell_{X},u_{X}]}(x_{X})$  and  $g_{Y}(x_{Y}) = |x_{Y} - b_{Y}| + \delta_{[\ell_{Y},u_{Y}]}(x_{Y})$  of  $X,Y \in \mathcal{V}$  with an identical parent  $X \cup Y \in \mathcal{V}$ , we construct the parent's function as  $g_{X \cup Y} = (g_X \square g_Y) + \delta_{[\ell_{X \cup Y},u_{X \cup Y}]}$ , where  $(g_{X} \square g_{Y})(x_{X \cup Y}) := \min \{g_{X}(x_{X}) + g_{Y}(x_{Y}): x_{X} + x_{Y} = x_{X \cup Y}\}$  is the infimal convolution. We can confirm that  $g_{X \cup Y}$  also takes the form of (4) as follows. Since  $g_{X}$  and  $g_{Y}$  are of the form (4),  $g_{X}^{*}$  and  $g_{Y}^{*}$  have the same breakpoints,  $\pm 1$  (see Figure 2). Furthermore, since  $g_{X} \square g_{Y} = (g_{X}^{*} + g_{Y}^{*})^{*}$  holds (e.g., [37, Theorem 16.4]),  $g_{X} \square g_{Y}$  takes the form of (4) with  $\ell = \ell_{X} + \ell_{Y}$ ,  $b = b_{X} + b_{Y}$ , and  $u = u_{X} + u_{Y}$ . Finally, adding  $\delta_{[\ell_{X \cup Y},u_{X \cup Y}]}$  preserves the form of (4). We can compute resulting  $\ell, b,$  and  $u$  values of  $g_{X \cup Y}$  in  $O(1)$  time, and hence we can obtain  $g_{Y}$  for all  $Y \in \mathcal{V}$  in a bottom-up manner in  $O(n)$  time. By construction, for each  $Y \in \mathcal{V}$ ,  $g_{Y}(x_{Y})$  indicates the minimum objective value corresponding to the subtree,  $(\mathcal{V}_Y, E_Y)$ , rooted at  $Y$  when  $x_{Y}$  is given. That is, we have
$$
g _ {Y} (x _ {Y}) = \min  \big \{\sum_ {i \in Y} | x _ {i} - \lfloor \hat {x} _ {i} \rceil |: x (Y) = x _ {Y}, \ell_ {Y ^ {\prime}} \leq x (Y ^ {\prime}) \leq u _ {Y ^ {\prime}} (Y ^ {\prime} \in \mathcal {V} _ {Y} \setminus \{Y \}) \big \}
$$
up to constants ignored when constructing  $g_{Y}$ , where  $g_{Y}(x_{Y}) = +\infty$  if the feasible region is empty. Thus,  $g_{N}(R)$  corresponds to the minimum value of (3), and our goal is to find integer values  $x_{Y}$  for  $Y \in \mathcal{V}$  that attain the minimum value when  $x_{N} = R \in \mathbb{Z}$  is fixed.
Given  $g_{Y}$  constructed as above, we can compute desired  $x_{Y}$  values in a top-down manner as follows. Let  $X \cup Y \in \mathcal{V}$  be a non-leaf vertex with two children  $X$  and  $Y$ . Once  $x_{X \cup Y} \in \operatorname{dom} g_{X \cup Y}$  is fixed, we can regard  $\min \{g_{X}(x_{X}) + g_{Y}(x_{Y}): x_{X} + x_{Y} = x_{X \cup Y}\} (= g_{X \cup Y}(x_{X \cup Y}))$  as univariate convex piecewise-linear minimization with variable  $x_{X} \in \mathbb{R}$  (since  $x_{Y} = x_{X \cup Y} - x_{X}$ ), which we can solve in  $O(1)$  time. Moreover, since  $x_{X \cup Y}$  and all the parameters of  $g_{X}$  and  $g_{Y}$  are integers, we can find an integral minimizer  $x_{X} \in \mathbb{Z}$  (and  $x_{Y} = x_{X \cup Y} - x_{X} \in \mathbb{Z}$ ). Starting from  $x_{N} = R \in \mathbb{Z}$ , we thus compute  $x_{Y}$  values for  $Y \in \mathcal{V}$  in a top-down manner, which takes  $O(n)$  time. The resulting  $x_{i}$  value for each leaf  $\{i\} \in \mathcal{V}$  gives the  $i$ th element of a desired initial feasible solution  $x^{\circ} \in \operatorname{dom} f$ .
4.2 Finding steepest descent direction via dynamic programming
We present a dynamic programming (DP) algorithm to find a steepest descent direction in  $T_{\mathrm{loc}} = \mathrm{O}(n)$  time. Our algorithm is an extension of that used in [30]. The original algorithm finds  $i$  that minimizes  $f(x - e_i + e_j)$  for a fixed  $j$  in  $\mathrm{O}(n)$  time. We below extend it to find a pair of  $(i,j)$  in  $\mathrm{O}(n)$  time.
Let  $x \in \operatorname{dom} f$  be a current solution before executing Step 3 in Algorithm 1. We define a directed edge set,  $A_x$ , on the vertex set  $\mathcal{V}$  as follows:
$$
A _ {x} = \{(p (Y), Y): Y \in \mathcal {V} \setminus \{N \}, x (Y) <   u _ {Y} \} \cup \{(Y, p (Y)): Y \in \mathcal {V} \setminus \{N \}, x (Y) > \ell_ {Y} \}.
$$
Note that  $x - e_i + e_j$  is feasible if and only if  $(\mathcal{V},A_x)$  has a directed path from  $\{i\} \in \mathcal{V}$  to  $\{j\} \in \mathcal{V}$ . We then assign an edge weight  $w_{X,Y}$  to each  $(X,Y)\in A_{x}$  defined as
$$
w _ {X, Y} = \left\{ \begin{array}{l l} f _ {Y} (x (Y) + 1) - f _ {Y} (x (Y)) & \text {i f} X = p (Y), \\ f _ {X} (x (X) - 1) - f _ {X} (x (X)) & \text {i f} Y = p (X). \end{array} \right.
$$
By the convexity of  $f_{Y}$ , we have  $w_{p(Y),Y} \geq w_{Y,p(Y)}$ , i.e., there is no negative cycle. If  $x - e_i + e_j$  is feasible,  $f_{\mathrm{sum}}(x - e_i + e_j) - f_{\mathrm{sum}}(x)$  is equal to the length of a shortest path from  $\{i\}$  to  $\{j\}$  with respect to the edge weights  $w_{X,Y}$  (see [30, Section 3.3]). Therefore, finding a steepest descent direction,  $-e_i + e_j$ , reduces to the problem of finding a shortest leaf-to-leaf path in this (bidirectional) tree  $T_x := (\mathcal{V}, A_x)$ . Constructing this tree takes  $O(n)$  time.
We present a DP algorithm for finding a shortest leaf-to-leaf path. For  $Y \in \mathcal{V}$ , we denote by  $T_{x}(Y)$  the subtree of  $T_{x}$  rooted at  $Y$ . Let  $\mathrm{L}_{\uparrow}^{Y}$  be the length of a shortest path from a leaf to  $Y$  in  $T_{x}(Y)$ ,  $\mathrm{L}_{\downarrow}^{Y}$  the length of a shortest path from  $Y$  to a leaf in  $T_{x}(Y)$ , and  $\mathrm{L}_{\triangle}^{Y}$  the length of a shortest path between any leaves in  $T_{x}(Y)$ . Clearly,  $\mathrm{L}_{\uparrow}^{Y} = \mathrm{L}_{\downarrow}^{Y} = \mathrm{L}_{\triangle}^{Y} = 0$  holds if  $Y$  is a leaf in  $T_{x}$ . For a non-leaf vertex  $Y \in \mathcal{V}$ , let  $\mathcal{C}(Y)$  denote the set of children of  $Y$  in  $T_{x}$ . We have the following recursive formulas:
$$
\mathrm{L}_{\uparrow}^{Y} = \min_{\substack{X\in \mathcal{C}(Y):\\ (X,Y)\in A_{x}}}\bigl\{\mathrm{L}_{\uparrow}^{X} + w_{X,Y}\bigr \} ,\mathrm{L}_{\downarrow}^{Y} = \min_{\substack{X\in \mathcal{C}(Y):\\ (Y,X)\in A_{x}}}\bigl\{\mathrm{L}_{\downarrow}^{X} + w_{Y,X}\bigr \} ,\mathrm{L}_{\triangle}^{Y} = \min \Bigl\{\mathrm{L}_{\uparrow}^{Y} + \mathrm{L}_{\downarrow}^{Y},\min_{X\in \mathcal{C}(Y)}\mathrm{L}_{\triangle}^{X}\Bigr \} ,
$$
where we regard the minimum on an empty set as  $+\infty$ . Note that, if shortest leaf-to- $Y$  and  $Y$ -to-leaf paths in  $T_{x}(Y)$  are not edge-disjoint, there must be a leaf-to-leaf simple path in  $T_{x}(Y)$  whose length is no more than  $\mathsf{L}_{\uparrow}^{Y} + \mathsf{L}_{\downarrow}^{Y}$  since no negative cycle exists. According to these recursive formulas, we can compute  $\mathsf{L}_{\uparrow}^{Y}, \mathsf{L}_{\downarrow}^{Y}$ , and  $\mathsf{L}_{\triangle}^{Y}$  for all  $Y \in \mathcal{V}$  in  $\mathrm{O}(n)$  time by the bottom-up DP on  $T_{x}$ . Then,  $\mathsf{L}_{\triangle}^{N}$  is the length of a desired shortest leaf-to-leaf path, and its leaves  $\{i\}, \{j\} \in \mathcal{V}$  can be obtained by backtracking the DP table in  $\mathrm{O}(n)$  time. Thus, we can find a desired direction  $-e_i + e_j$  in  $\mathrm{O}(n)$  time.
4.3 Faster steepest descent direction finding for box-constrained case
We focus on Box (1) and present a faster method to find a steepest descent direction, which takes only  $T_{\mathrm{loc}} = \mathrm{O}(\log n)$  time after an  $\mathrm{O}(n)$ -time pre-processing. Note that we can obtain an initial feasible solution with the same method as in Section 4.1; hence  $T_{\mathrm{init}} = \mathrm{O}(n)$  also holds in the Box case.
Theorem 4.2. For  $\mathsf{Box}$ , given a prediction  $\hat{x} \in \mathbb{R}^N$ , after an  $\mathrm{O}(n)$ -time pre-processing (that can be included in  $T_{\mathrm{init}} = \mathrm{O}(n)$ ), we can find a steepest descent direction in Step 3 of Algorithm 1 in  $T_{\mathrm{loc}} = \mathrm{O}(\log n)$  time. Thus, we can solve  $\mathsf{Box}$  in  $\mathrm{O}(n + \log n \cdot \| x^{*} - \hat{x}\|_{1})$  time.
Proof. In the Box case,  $f(x - e_i + e_j) - f(x) = f_i(x_i - 1) - f_i(x_i) + f_j(x_j + 1) - f_j(x_j)$  holds if  $x$  and  $x - e_i + e_j$  are feasible. Furthermore, we only need to care about the box constraints,  $\ell_i \leq x_i \leq u_i$  for  $i = 1, \ldots, n$  (since  $x(N) = R$  is always satisfied due to the update rule). Therefore, by keeping  $\Delta_k^- \coloneqq f_k(x_k - 1) - f_k(x_k) + \delta_{[\ell_k + 1, u_k]}(x_k)$  and  $\Delta_k^+ \coloneqq f_k(x_k + 1) - f_k(x_k) + \delta_{[\ell_k, u_k - 1]}(x_k)$  values for  $k = 1, \ldots, n$  with two min-heaps, respectively, we can efficiently find  $i \in \arg \min\{\Delta_k^-\}_{k=1}^n$  and  $j \in \arg \min\{\Delta_k^+\}_{k=1}^n$ ; then,  $-e_i + e_j$  is a steepest descent direction. More precisely, at the beginning of Algorithm 1, we construct the two heaps that maintain  $\Delta_k^-$  and  $\Delta_k^+$  values, respectively, and two arrays that keep track of the location of each element in the heaps; this pre-processing takes  $O(n)$  time. Then, in each iteration of Algorithm 1, we can find a steepest descent direction  $-e_i + e_j$ , update  $\Delta_i^-$ ,  $\Delta_i^+$ ,  $\Delta_j^-$ , and  $\Delta_j^+$  values (by the so-called increase-/decrease-key operations), and update the heaps and arrays in  $T_{\mathrm{loc}} = O(\log n)$  time. Thus, Theorem 3.1 implies the time complexity.
Figure 3: The number of iterations of the greedy algorithm initialized with Learn, Relax, and Cold. The curve and error band show the mean and standard deviation of 10 independent runs, respectively.
We complement our theoretical results with experiments. We used MacBook Air with Apple M2 chip, 24 GB of memory, and macOS Ventura 13.2.1. We implemented algorithms in Python 3.9.12 with libraries such as NumPy 1.23.2. We used Gurobi 10.0.1 [17] for a baseline method explained later. The source code is available at https://github.com/ssakaue/alps-m-convex-code.
5.1 Staff assignment
We consider Laminar instances of the staff-assignment setting described in Section 4. Suppose that we have  $R = 12800$  staff members and  $n = 128$  tasks. Let  $T_{\mathcal{F}} = (\mathcal{V}, E)$  be a complete binary tree with  $n$  leaves. Define an objective function and inequality constraints as  $f_{\mathrm{sum}}(x) = \sum_{Y \in \mathcal{V}} c_{Y} / x(Y)$  and  $\ell_{Y} \leq x(Y) \leq R$  for  $Y \in \mathcal{F} \setminus \{\emptyset, N\}$ , respectively, with  $c_{Y}$  and  $\ell_{Y}$  values defined as follows. We set  $c_{Y} = \max \{\sum_{i \in Y} i + \sigma u_{a}, 1\}$ , where  $u_{a}$  follows the standard normal distribution and  $\sigma$  controls the noise strength. We let  $\ell_{Y} = \min \{2^{h} + u_{b}, R / 2^{n - h}\}$ , where  $h \in \{0, 1, \dots, \log n\}$  is the height of  $Y$  in  $T_{\mathcal{F}}$  (a leaf  $Y$  has  $h = 0$ ) and  $u_{b}$  is drawn uniformly at random from  $\{0, 1, \dots, 50\}$ ; the minimum with  $R / 2^{n - h}$  is taken to ensure that the feasible region is non-empty. We thus create a dataset of  $T = 100$  random instances for each  $\sigma \in \{1, 5, 10, 20\}$ . We generate 10 such random datasets independently to calculate the mean and standard deviation of the results. The  $T$  instances arrive one by one and we learn predictions from optimal solutions to past instances online. By design of  $c_{Y}$ , the  $i$ th entry of an optimal solution tends to be larger as  $i$  increases, which is unknown in advance and should be reflected on predictions  $\hat{x}$  by learning from optimal solutions to past instances.