Online Graph Coloring with Predictions

Antonios Antoniadis, Hajo Broersma, Yang Meng

TL;DR

This paper introduces the first "learning-augmented" approach to the online graph coloring problem. By incorporating machine-learned predictions into the classic First Fit algorithm, the authors create a strategy that achieves optimal coloring when predictions are perfect, degrades gracefully as predictions fail (smoothness), and maintains a safety net against worst-case scenarios (robustness).

What Problem Does This Paper Address?

Graph coloring—assigning colors to vertices so no two neighbors share the same color—is a cornerstone of computer science with applications in scheduling, register allocation, and robotics. In the online version, vertices arrive one by one, and the algorithm must irrevocably assign a color without knowing what the rest of the graph looks like.

The challenge is that online graph coloring is "notoriously hard." Even for simple graphs like bipartite graphs (which only need 2 colors), any deterministic online algorithm can be forced to use a logarithmic number of colors relative to the number of vertices. While heuristics and ML models often perform well on real-world data, they usually lack "worst-case" guarantees. If the input deviates from the training data, a pure ML approach might fail spectacularly. This paper seeks to bridge that gap: how do we use ML advice to get better results on average without losing our theoretical safety net?

Methods

The authors propose two primary innovations:

  1. FirstFitPredictions (FFP): This algorithm takes a prediction $P(v)$ for each vertex (the color it "should" have in an optimal coloring). FFP maintains a separate "palette" of colors for every unique predicted color. When a vertex arrives, it uses the First Fit strategy (picking the smallest available color) but only within the palette corresponding to its predicted color.
  2. A Novel Meta-Algorithm Framework: Standard ways to combine online algorithms (like "switching" to a backup if the primary fails) don't work for graph coloring because the problem isn't "monotone"—sometimes adding more vertices can actually make a specific algorithm use fewer colors on the remaining subgraph. The authors developed a framework that runs multiple algorithms in parallel using distinct color palettes and chooses the best-performing one at runtime.

Datasets

As a theoretical paper in the field of algorithm design, it does not use empirical datasets or training sets. Instead, the authors use mathematical proofs and adversarial constructions (worst-case graph structures) to evaluate performance. They prove bounds for various graph classes, including bipartite, chordal, disk, and $d$-inductive graphs.

Key Insights and Ideas

  • The Structural Link: The authors proved a new structural theorem for the classic First Fit algorithm. They showed that if First Fit uses $x$ colors, the graph must contain a specific arrangement of cliques. This "aha moment" allowed them to mathematically link the number of colors used by their FFP algorithm directly to the number of "wrong" predictions ($\eta$).
  • The Monotonicity Hurdle: Most online problems assume that if you do well on a small part of the problem, you'll do well on the whole thing. The authors highlight that online graph coloring is different: an algorithm might perform poorly on a small subgraph but "recover" as more of the graph is revealed. Their meta-algorithm circumvents this by using separate palettes, ensuring that a "bad" algorithm doesn't permanently ruin the coloring for a "good" one.
  • Consistency and Smoothness: They prove FFP is 1-consistent (it uses exactly $\chi(G)$ colors if predictions are perfect) and smooth (the number of extra colors used grows linearly with the number of prediction errors).

Key Results

  • Performance Bound: For FFP, the number of colors used $x(G)$ is bounded by $x(G) \le \eta(G) + \chi(G)$, where $\eta$ is the prediction error and $\chi$ is the optimal number of colors.
  • Robustness: By combining FFP with a classical algorithm via their meta-framework, they achieve a 2-consistent and robust algorithm. This means even if the ML predictions are completely garbage, the algorithm will use at most twice the colors of the best-known classical online algorithm.
  • Class-Specific Bounds: The paper provides refined competitive ratios for specific graph types. For example, on bipartite graphs, they show a ratio of $3 \min\{\frac{\eta(G)}{2} + 1, \Theta(\log n)\}$.

Limitations and Future Work

  • The "Factor of 2" Penalty: The meta-algorithm framework currently incurs a factor of $t$ (where $t$ is the number of algorithms being combined). For a robust version of FFP, this means a baseline loss of a factor of 2, even with perfect predictions. The authors suggest investigating if a consistency better than 2 is possible when the chromatic number is unknown.
  • Prediction Error Dependence: While the error grows linearly, the authors raise the question of whether a better (sub-linear) dependence on the prediction error is possible.
  • Black-Box Predictions: The paper assumes predictions are provided as a "black box." Future work could involve tailoring specific ML architectures to generate these color predictions more effectively for different graph topologies.

Summary updated

BibTeX
@inproceedings{antoniadis2024online,
  author = {Antonios Antoniadis and Hajo Broersma and Yang Meng},
  title = {{Online Graph Coloring with Predictions}},
  booktitle = {ISCO},
  year = {2024},
  doi = {10.1007/978-3-031-60924-4\_22},
}
Figure