arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2304.14698cs.LGcs.AI
收藏

X-RLflow:面向神经网络子图变换的图强化学习

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

University of Cambridge(剑桥大学)

Guoliang He, Sean Parker, Eiko Yoneki

AI总结:

针对张量图超级优化中贪心搜索的局限,提出基于无模型强化学习与图神经网络的X-RLflow方法,通过迭代子图重写优化计算图,性能优于现有最优系统,在transformer类架构上最高提升40%。

摘要:

张量图超级优化系统对神经网络执行一系列子图替换操作,以寻找最优的计算图结构。这种图变换过程天然契合序贯决策框架,而现有系统通常采用贪心搜索方法,由于无法容忍暂时的性能下降,这类方法无法探索完整的搜索空间。本文中,我们探索另一种搜索方法——强化学习(RL),以解决张量图超级优化问题。我们提出的方法X-RLflow能够学习执行神经网络数据流图重写,每次替换一个子图。X-RLflow基于无模型RL智能体,该智能体使用图神经网络(GNN)对目标计算图进行编码,并迭代输出变换后的计算图。实验表明,我们的方法在一系列深度学习模型上的表现优于当前最优的超级优化系统,在基于transformer风格架构的模型上性能提升最高可达40%。

英文摘要:

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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑