In Equation , the non-linear transformation is denoted through W (e.g. multi-layer perceptron -MLP) with molecular encoding h O . Effectively, the model is performing a multiclass classification over the entire template library. Neuralysm acted as a proof-of-concept approach to the community outperforming the previously state-of-the-art expert-based systems by a great margin. However, the approach of ranking templates through a softmax classifier (and similar models, see ESI Table -Direct Template Selection) comes with a significant shortcoming: For template libraries of large size, the model has to distribute likelihoods between all templates in the compiled library, rendering the task very challenging. To overcome this issue, two different approaches have been proposed. First, Dai et al. realised that the template relevance classification task (Equation ) can be reformulated into a joint conditional probability prediction. Instead of classifying templates solely based on the product molecule, their model (Graph Logic Network-GLN) constructs a joint probability distribution over templates and reactant molecules as: