In summary, as shown in Fig. , the DeepSets-based network architecture consists of two primary modules: the reaction-level encoder ϕ and route-level scorer σ, which take in route-level properties and reaction-level features as input respectively. The encoder network processes each reaction individually, producing a route-level encoding that, along with additional route properties, is passed to the scorer to compute the final score. The purpose of knowing the distance is to find out which route is the closest to the ground truth, thus selecting the best route. To measure this, a ranking test is conducted on the prediction of the test data. First, the routes are grouped by their target SMILES. Then for each target compound, the routes are ranked according to their TED distance to the ground truth route. The predicted distances are sorted, and the rank of the ground truth route among the predicted routes is obtained. This rank is shown in the second row of Figure .