In particular, our HGAR model consists of an atom-level synthon generation module and a motif-level synthon completion module. The atom-level synthon generation module predicts the positions and types of the reaction centers in products and obtains the corresponding synthons from the products. The motif-level synthon com-pletion module adds motifs to the synthons autoregressively. Compared with the atom-level completion commonly used in existing semi-template methods, our motif-level completion requires much fewer steps and improve the reliability of results. The pipeline of the HGAR-based molecular retrosynthesis is shown in the following two subsections.