Reinforcement Learning for Graph Coloring: Understanding the Power and Limits of Non-Label Invariant Representations

Chase Cummins, Richard Veras
1/23/2024
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Register allocation is one of the most important problems for modern compilers. With a practically unlimited number of user variables and a small number of CPU registers, assigning variables to registers without conflicts is a complex task. This work demonstrates the use of casting the register allocation problem as a graph coloring problem. Using technologies such as PyTorch and OpenAI Gymnasium Environments we will show that a Proximal Policy Optimization model can learn to solve the graph coloring problem. We will also show that the labeling of a graph is critical to the performance of the model by taking the matrix representation of a graph and permuting it. We then test the model's effectiveness on each of these permutations and show that it is not effective when given a relabeling of the same graph. Our main contribution lies in showing the need for label reordering invariant representations of graphs for machine learning models to achieve consistent performance.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Cite this paper

@article{cummins2024reinforcement,
  title  = {Reinforcement Learning for Graph Coloring: Understanding the Power and Limits of Non-Label Invariant Representations},
  author = {Chase Cummins and Richard Veras},
  year   = {2024},
  eprint = {2401.12470},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2401.12470v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2401.12470.svg)](https://codeofpaper.com/paper/2401.12470)

Discussion