  A central task in computational drug discovery is to construct models from
known active molecules to find further promising molecules for subsequent
screening. However, typically only very few active molecules are known.
Therefore, few-shot learning methods have the potential to improve the
effectiveness of this critical phase of the drug discovery process. We
introduce a new method for few-shot drug discovery. Its main idea is to enrich
a molecule representation by knowledge about known context or reference
molecules. Our novel concept for molecule representation enrichment is to
associate molecules from both the support set and the query set with a large
set of reference (context) molecules through a Modern Hopfield Network.
Intuitively, this enrichment step is analogous to a human expert who would
associate a given molecule with familiar molecules whose properties are known.
The enrichment step reinforces and amplifies the covariance structure of the
data, while simultaneously removing spurious correlations arising from the
decoration of molecules. Our approach is compared with other few-shot methods
for drug discovery on the FS-Mol benchmark dataset. On FS-Mol, our approach
outperforms all compared methods and therefore sets a new state-of-the art for
few-shot learning in drug discovery. An ablation study shows that the
enrichment step of our method is the key to improve the predictive quality. In
a domain shift experiment, we further demonstrate the robustness of our method.
Code is available at https://github.com/ml-jku/MHNfs.
