  The central challenge in automated synthesis planning is to be able to
generate and predict outcomes of a diverse set of chemical reactions. In
particular, in many cases, the most likely synthesis pathway cannot be applied
due to additional constraints, which requires proposing alternative chemical
reactions. With this in mind, we present Molecule Edit Graph Attention Network
(MEGAN), an end-to-end encoder-decoder neural model. MEGAN is inspired by
models that express a chemical reaction as a sequence of graph edits, akin to
the arrow pushing formalism. We extend this model to retrosynthesis prediction
(predicting substrates given the product of a chemical reaction) and scale it
up to large datasets. We argue that representing the reaction as a sequence of
edits enables MEGAN to efficiently explore the space of plausible chemical
reactions, maintaining the flexibility of modeling the reaction in an
end-to-end fashion, and achieving state-of-the-art accuracy in standard
benchmarks. Code and trained models are made available online at
https://github.com/molecule-one/megan.
