In the field of pharmaceutical and chemical engineering, a huge amount of potentially valuable molecules have been created in laboratories. However, searching for their commercially feasible synthesis pathways is very expensive and time-consuming, and thus, most of these molecules still cannot be applied in practice. To reduce the search space of the synthesis pathways, many researchers consider predicting candidate reactants from given products in an automatic way , which leads to the molecular retrosynthesis task. This task is significant for many critical applications, e.g., accelerating the development of new drugs and reducing the cost of chemical products, which has gained lots of attention in the past few decades .