Modern Hopfield Networks for Few- and Zero-Shot Reaction Prediction
Philipp Seidl, Philipp Renz, Natalia Dyubankova, Paulo Neves, Jonas Verhoeven, Jörg K. Wegner, Sepp Hochreiter, and Günter Klambauer

Schematic representation of the approach: the Hopfield layer learns to associate the encoded input molecule, the state pattern ξ, with the memory of encoded templates, the stored patterns X.
Chemical synthesis is a crucial step in discovery of new molecules. Chemical synthesis of new molecules is a complex process with branching at each step of a series of chemical reactions. Computer-assisted synthesis planning facilitates discovery of new synthesis paths. Its central part is reaction prediction, which has been significantly enhanced by machine learning models.
We introduce a new reaction prediction approach that uses a deep learning architecture based on a continuous modern Hopfield network. We focus on identifying relevant reaction templates to find reactants that produce a given molecule. The architecture comprises a molecule encoder, a reaction template encoder, and a Hopfield layer. The molecule and reaction template encoder networks learn the relevant representations of molecules and reaction templates, respectively. The Hopfield layer associates a molecule with all templates in the memory. We use contrastive learning approach that incorporates template descriptions and detects the best matching template description for the given molecule. This approach enables few- and zero-shot learning for reaction prediction, which allows modeling chemical reactions with limited or no training examples. Our architecture outperforms existing methods on the established benchmarks, mainly due to improved performance on rare templates.
arXiv:2104.03279, 2021-04-07.