Fig. 12: Procedure used by the conditional transformer to learn structural transformations under the conditions of the reaction template.

The index of the reaction template is added to the beginning of the input SMILES sequence as a conditional token. In this example, the model implicitly learns the propionyl chloride from the information of the reaction template, the reactant, and the product.