Reinforcement Learning for Graph Coloring: Understanding the Power and Limits of Non-Label Invariant Representations (2401.12470v1)
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.
- Deep learning-based hybrid graph-coloring algorithm for register allocation, 2019.
- Complexity analysis of a decentralised graph colouring algorithm. Information Processing Letters, 107(2):60–63, 2008.
- Coloring big graphs with alphagozero, 2019.
- Solving graph coloring problem via graph neural network (gnn). In 2022 17th International Conference on Emerging Technologies (ICET), pages 178–183, 2022.
- Mohit Mayank. Reinforcement learning with q tables, Aug 2018.
- Reinforcement learning for combinatorial optimization: A survey, 2020.
- Playing atari with deep reinforcement learning, 2013.
- Stable-baselines3: Reliable reinforcement learning implementations. Journal of Machine Learning Research, 22(268):1–8, 2021.
- A gentle introduction to graph neural networks. Distill, 2021. https://distill.pub/2021/gnn-intro.
- Proximal policy optimization algorithms. CoRR, abs/1707.06347, 2017.
- Mastering the game of go without human knowledge. nature, 550(7676):354–359, 2017.
- Mike Wang. Deep q-learning tutorial: Mindqn, Oct 2021.
Sponsor
Paper Prompts
Sign up for free to create and run prompts on this paper using GPT-5.
Top Community Prompts
Collections
Sign up for free to add this paper to one or more collections.