arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 1902.02194cs.AI
收藏

神经网络引导的表达式转换

Neural-Network Guided Expression Transformation

IC, EPFL(洛桑联邦理工学院信息学院(IC, EPFL));EPFL(洛桑联邦理工学院信息学院)

Romain Edelmann, Viktor Kunčak

摘要:

优化编译器以及其他翻译器系统通常通过根据等价保持规则重写表达式来工作。给定一个输入表达式及其优化形式,找到应用的规则序列是一项重要的任务。大多数情况下,这些工具没有提供任何形式的证据来证明原始表达式及其优化形式之间的等价性。在这项工作中,我们建议重建证明的等价性简单的数学表达式,事实上,通过寻找路径的等价性保持表达式之间的转换。我们建议找到这些序列的转换使用搜索算法,引导下的神经网络启发式。使用Tree-LSTM递归神经网络,我们学习表达式的分布式表示,其中向量之间的曼哈顿距离大致对应于表达式之间的重写距离。然后,我们展示了如何可以有效地使用神经网络来搜索转换路径,从而大大提高速度相比,一个不知情的穷举搜索。在我们的一个实验中,我们的神经网络引导的搜索算法能够在每个实例2秒超时的情况下解决更多的实例,而不是在每个实例5分钟超时的情况下进行广度优先搜索。

英文摘要:

Optimizing compilers, as well as other translator systems, often work by rewriting expressions according to equivalence preserving rules. Given an input expression and its optimized form, finding the sequence of rules that were applied is a non-trivial task. Most of the time, the tools provide no proof, of any kind, of the equivalence between the original expression and its optimized form. In this work, we propose to reconstruct proofs of equivalence of simple mathematical expressions, after the fact, by finding paths of equivalence preserving transformations between expressions. We propose to find those sequences of transformations using a search algorithm, guided by a neural network heuristic. Using a Tree-LSTM recursive neural network, we learn a distributed representation of expressions where the Manhattan distance between vectors approximately corresponds to the rewrite distance between expressions. We then show how the neural network can be efficiently used to search for transformation paths, leading to substantial gain in speed compared to an uninformed exhaustive search. In one of our experiments, our neural-network guided search algorithm is able to solve more instances with a 2 seconds timeout per instance than breadth-first search does with a 5 minutes timeout per instance.

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

↑