基于图-序列神经模型重写规则的数据流图等价性
Equivalence of Dataflow Graphs via Rewrite Rules Using a Graph-to-Sequence Neural Model
摘要:
在这项工作中,我们的目标问题,可证明计算的等价性表示为两个程序之间的图。为此,我们将两个程序之间的等效问题形式化为找到一组从一个程序到另一个程序的保留语义的重写规则,使得重写后两个程序在结构上相同,因此在平凡上等效。然后,我们开发了第一个图形序列神经网络系统的程序等价性,训练产生这样的重写序列从一个精心制作的自动示例生成算法。我们广泛评估我们的系统上丰富的多类型线性代数表达式语言,使用任意组合的100+图形重写公理的等价。我们的系统输出通过推理正确的重写序列为96%的10,000个程序对隔离测试,使用30个长期的程序。在所有情况下,产生的序列的有效性以及程序等价性的可证明断言都是可计算的,在可忽略的时间内。
英文摘要:
In this work we target the problem of provably computing the equivalence between two programs represented as dataflow graphs. To this end, we formalize the problem of equivalence between two programs as finding a set of semantics-preserving rewrite rules from one into the other, such that after the rewrite the two programs are structurally identical, and therefore trivially equivalent. We then develop the first graph-to-sequence neural network system for program equivalence, trained to produce such rewrite sequences from a carefully crafted automatic example generation algorithm. We extensively evaluate our system on a rich multi-type linear algebra expression language, using arbitrary combinations of 100+ graph-rewriting axioms of equivalence. Our system outputs via inference a correct rewrite sequence for 96% of the 10,000 program pairs isolated for testing, using 30-term programs. And in all cases, the validity of the sequence produced and therefore the provable assertion of program equivalence is computable, in negligible time.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。