Given the synthons obtained by the above atom-level module, we complete the synthons at the motif level. Our completion strategy is determined by the predicted reaction center n * and the predicted bond type k * . In particular, when n * ∈ B and k * > 0, the synthon is the product itself and has been a complete molecule. Therefore, we can derive the corresponding reactant directly by changing the bond type of the reaction center to the k * -th type. 2 In the remaining situations, i.e. i) n * ∈ A and ii) n * ∈ B and k * = 0, we achieve the synthon completion step based on the following hierarchical graph autoregression. Specifically, given a synthon Gs, we first derive a junction tree of its motifs, denoted as Ts = (Vs, Es), in which each node represents a motif. As shown in Figure , we construct a hierarchical graph by connecting the atoms of each motif in Gs to the corresponding node in Ts. Accordingly, for the nodes and the edges in the junction tree, we initialize their embeddings, denoted as {nu} and {euv}, by aggregating the corresponding atom-level embeddings {ci}, i.e.,