DLGR: A Rule-Based Approach to Graph Replacement for Deep Learning

Enze Ma
{"title":"DLGR: A Rule-Based Approach to Graph Replacement for Deep Learning","authors":"Enze Ma","doi":"10.1109/ICECCS54210.2022.00030","DOIUrl":null,"url":null,"abstract":"In deep learning libraries like TensorFlow, compu-tations are manually batched as computation graphs. Graph replacement is then an optimization that replaces one subgraph of a computation graph with another whilst keeping the graphs before and after replacement functionally equivalent. Meanwhile, in practice, it remains a challenge how graph replacements can be performed efficiently: graph replacement is usually conducted by human engineers, and thus it incurs many human efforts since a variety of deep learning models do exist and a number of model-specific replacements can be performed; the functionality equivalence of graphs before and after replacement is also not easy to guarantee. To tackle with this challenge, we introduce in this paper DLGR, a rule-based approach to graph replacement for deep learning. The core idea of DLGR is to define a set of replacement rules, each of which specifies the source and the tar-get graph patterns and constraints on graph replacement. Given a computation graph, DLGR then performs an iterative process of matching and replacing subgraphs in the source graph, and generates a replaced, and usually optimized computation graph. We conduct experiments to evaluate the capabilities of DLGR. The results clearly show the strengths of DLGR: compared with two existing graph replacement techniques, it provides with more replacement rules and saves engineers' development efforts in reducing up to 68 % lines of code.","PeriodicalId":344493,"journal":{"name":"2022 26th International Conference on Engineering of Complex Computer Systems (ICECCS)","volume":"55 1","pages":"0"},"PeriodicalIF":0.0000,"publicationDate":"2022-03-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"2022 26th International Conference on Engineering of Complex Computer Systems (ICECCS)","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.1109/ICECCS54210.2022.00030","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

In deep learning libraries like TensorFlow, compu-tations are manually batched as computation graphs. Graph replacement is then an optimization that replaces one subgraph of a computation graph with another whilst keeping the graphs before and after replacement functionally equivalent. Meanwhile, in practice, it remains a challenge how graph replacements can be performed efficiently: graph replacement is usually conducted by human engineers, and thus it incurs many human efforts since a variety of deep learning models do exist and a number of model-specific replacements can be performed; the functionality equivalence of graphs before and after replacement is also not easy to guarantee. To tackle with this challenge, we introduce in this paper DLGR, a rule-based approach to graph replacement for deep learning. The core idea of DLGR is to define a set of replacement rules, each of which specifies the source and the tar-get graph patterns and constraints on graph replacement. Given a computation graph, DLGR then performs an iterative process of matching and replacing subgraphs in the source graph, and generates a replaced, and usually optimized computation graph. We conduct experiments to evaluate the capabilities of DLGR. The results clearly show the strengths of DLGR: compared with two existing graph replacement techniques, it provides with more replacement rules and saves engineers' development efforts in reducing up to 68 % lines of code.
查看原文
分享 分享
微信好友 朋友圈 QQ好友 复制链接
本刊更多论文
DLGR:基于规则的深度学习图替换方法
在像TensorFlow这样的深度学习库中,计算被手动批处理为计算图。图替换是一种优化,它将计算图的一个子图替换为另一个子图,同时保持替换前后的图在功能上相等。同时,在实践中,如何有效地执行图替换仍然是一个挑战:图替换通常由人类工程师进行,因此由于存在各种深度学习模型,并且可以执行许多特定于模型的替换,因此它会引起许多人类的努力;替换前后图形的功能等价性也不容易保证。为了应对这一挑战,我们在本文中引入了DLGR,一种基于规则的深度学习图替换方法。DLGR的核心思想是定义一组替换规则,每条规则指定源图和目标图模式以及图替换的约束。给定计算图,DLGR对源图中的子图进行匹配和替换的迭代过程,生成替换后的、通常是优化后的计算图。我们通过实验来评估DLGR的能力。结果清楚地显示了DLGR的优势:与两种现有的图替换技术相比,它提供了更多的替换规则,并节省了工程师的开发工作,减少了多达68%的代码行。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 去求助
来源期刊
自引率
0.00%
发文量
0
期刊最新文献
Parameter Sensitive Pointer Analysis for Java Optimizing Parallel Java Streams Parameterized Design and Formal Verification of Multi-ported Memory Extension-Compression Learning: A deep learning code search method that simulates reading habits Proceedings 2022 26th International Conference on Engineering of Complex Computer Systems [Title page iii]
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
已复制链接
已复制链接
快去分享给好友吧!
我知道了
×
扫码分享
扫码分享
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:481959085
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1