X-RLflow: Graph Reinforcement Learning for Neural Network Subgraphs Transformation

Guoliang He, Sean Parker, Eiko Yoneki
4/28/2023
cs.LGcs.AI

No official code found. Best implementation: ucamrl/xrlflow (13 stars, MIT, last commit 2023-03-06).

Abstract

Tensor graph superoptimisation systems perform a sequence of subgraph substitution to neural networks, to find the optimal computation graph structure. Such a graph transformation process naturally falls into the framework of sequential decision-making, and existing systems typically employ a greedy search approach, which cannot explore the whole search space as it cannot tolerate a temporary loss of performance. In this paper, we address the tensor graph superoptimisation problem by exploring an alternative search approach, reinforcement learning (RL). Our proposed approach, X-RLflow, can learn to perform neural network dataflow graph rewriting, which substitutes a subgraph one at a time. X-RLflow is based on a model-free RL agent that uses a graph neural network (GNN) to encode the target computation graph and outputs a transformed computation graph iteratively. We show that our approach can outperform state-of-the-art superoptimisation systems over a range of deep learning models and achieve by up to 40% on those that are based on transformer-style architectures.

View on arXivView PDF

Code Implementations(1)

ucamrl/xrlflowCommunity100%
MIT
130C, C++Mar 6, 20233 years agoMIT

Similar Papers

Cite this paper

@article{he2023xrlflow,
  title  = {X-RLflow: Graph Reinforcement Learning for Neural Network Subgraphs Transformation},
  author = {Guoliang He and Sean Parker and Eiko Yoneki},
  year   = {2023},
  eprint = {2304.14698},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2304.14698v1}
}

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/2304.14698.svg)](https://codeofpaper.com/paper/2304.14698)

Discussion