about
Equivalence of Dataflow Graphs via Rewrite Rules Using a Graph-to-Sequence Model (arxiv.org)
5 points by brzozowski on Sep 23, 2020 | hide | past | pdf | discuss on HN

In plain words: A system reads two programs drawn as node-and-arrow graphs and writes the rewrite steps that turn one into the other, so they end up identical and the match is provable. It found a valid sequence for 96% of 10,000 test pairs, each checkable instantly.

Abstract · Equivalence of Dataflow Graphs via Rewrite Rules Using a Graph-to-Sequence Neural Model

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.

Steve Kommrusch, Théo Barollet, Louis-Noël Pouchet
arXiv:2002.06799 · cs.LG, cs.FL, stat.ML · submitted Feb 17, 2020 · updated Jun 3, 2021
abstract · pdf · html · 20 pages including references and appendices, 10 figures, updated to include acknowledgement

add comment on HN
Also discussed: Oct 2020 (3 points, 0 comments)