Table of Contents
Fetching ...

Online Bin Packing with Predictions

Spyros Angelopoulos, Shahin Kamali, Kimia Shadkami

TL;DR

This work tackles online bin packing with learnable frequency predictions of item sizes. It introduces ProfilePacking, a profile-based algorithm that achieves optimal consistency under accurate predictions, and Hybrid(\lambda), which blends ProfilePacking with a robust online method to balance consistency and robustness as prediction error $\eta$ grows. Theoretical results provide a near-optimal degradation: a bound of at most $1+\varepsilon$ with zero error and a bound of at most $1+(2+5\varepsilon)\eta k+\varepsilon$ under general error, along with a matching lower-bound tradeoff; Hybrid(\lambda) achieves a convex combination of these bounds, enabling tunable performance. Empirically, the approach yields substantial improvements over traditional heuristics on BPPLIB and Weibull benchmarks, with extensions to VM placement, fractional sizes, and sampling-based predictions, highlighting practical impact for dynamic resource allocation and online optimization.

Abstract

Bin packing is a classic optimization problem with a wide range of applications, from load balancing to supply chain management. In this work, we study the online variant of the problem, in which a sequence of items of various sizes must be placed into a minimum number of bins of uniform capacity. The online algorithm is enhanced with a (potentially erroneous) prediction concerning the frequency of item sizes in the sequence. We design and analyze online algorithms with efficient tradeoffs between the consistency (i.e., the competitive ratio assuming no prediction error) and the robustness (i.e., the competitive ratio under adversarial error), and whose performance degrades near-optimally as a function of the prediction error. This is the first theoretical and experimental study of online bin packing under competitive analysis, in the realistic setting of learnable predictions. Previous work addressed only extreme cases with respect to the prediction error, and relied on overly powerful and error-free oracles.

Online Bin Packing with Predictions

TL;DR

This work tackles online bin packing with learnable frequency predictions of item sizes. It introduces ProfilePacking, a profile-based algorithm that achieves optimal consistency under accurate predictions, and Hybrid(\lambda), which blends ProfilePacking with a robust online method to balance consistency and robustness as prediction error grows. Theoretical results provide a near-optimal degradation: a bound of at most with zero error and a bound of at most under general error, along with a matching lower-bound tradeoff; Hybrid(\lambda) achieves a convex combination of these bounds, enabling tunable performance. Empirically, the approach yields substantial improvements over traditional heuristics on BPPLIB and Weibull benchmarks, with extensions to VM placement, fractional sizes, and sampling-based predictions, highlighting practical impact for dynamic resource allocation and online optimization.

Abstract

Bin packing is a classic optimization problem with a wide range of applications, from load balancing to supply chain management. In this work, we study the online variant of the problem, in which a sequence of items of various sizes must be placed into a minimum number of bins of uniform capacity. The online algorithm is enhanced with a (potentially erroneous) prediction concerning the frequency of item sizes in the sequence. We design and analyze online algorithms with efficient tradeoffs between the consistency (i.e., the competitive ratio assuming no prediction error) and the robustness (i.e., the competitive ratio under adversarial error), and whose performance degrades near-optimally as a function of the prediction error. This is the first theoretical and experimental study of online bin packing under competitive analysis, in the realistic setting of learnable predictions. Previous work addressed only extreme cases with respect to the prediction error, and relied on overly powerful and error-free oracles.

Paper Structure

This paper contains 21 sections, 11 theorems, 14 equations, 6 figures, 1 algorithm.

Key Result

Lemma 2

For any constant $\epsilon\in(0,0.5]$, and error-free prediction ($\bm{f'}=\bm{f}$), ProfilePacking has competitive ratio at most $1+\epsilon$.

Figures (6)

  • Figure 1: The packing output by ProfilePacking on the input sequence $\sigma = 2,3,1,4,10,2,9,4,6,9,2,6,5$. The predictions and the corresponding profile are as given in Example \ref{['ex:2']}. The optimal packing of the profile consists of seven bins $B_1, \ldots, B_7$. When serving $\sigma$, the algorithm opens two profile groups, denoted by $P_1$ and $P_2$. The profile group $P_2$ is opened upon serving the second item of size 9, namely the 10th request in the sequence. The placeholders that have received an item are highlighted. Items 10 and 5 are special items and are packed using FirstFit. The total cost for serving $\sigma$ is equal to 9, and there are 7 bins that are only opened virtually, hence they do not contribute to the cost.
  • Figure 2: The packing of Hybrid($\lambda$) on the input sequence $\sigma = 2,3,1,4,10,2,9,4,6,9,2,6,5$. The predictions and profile are described in Example \ref{['ex:2']}. The total cost incurred by the algorithm on $\sigma$ is equal to 9, with ProfilePacking and FirstFit contributing 6 and 3 bins, respectively.
  • Figure 3: Number of opened bins for sequences from a given distribution. For the purpose of visualization, some of the plots are truncated, e.g., the plot of ProfilePacking in (c) and (d).
  • Figure 4: Number of opened bins as a function of the profile size.
  • Figure 5: Average number of bins vs. average error over twenty sequences.
  • ...and 1 more figures

Theorems & Definitions (22)

  • Remark 1
  • Example 1
  • Lemma 2
  • proof
  • Theorem 3
  • proof
  • Theorem 4
  • proof
  • Example 2
  • Theorem 5
  • ...and 12 more