The two similarities, k 1 and k 2 , exhibit weak correlation and distinctions, as illustrated in Figure . Regarding the models, we selected the identical transformer employed in Section 3 and a straightforward sequence-to-sequence recurrent neural network (RNN) model, comprising a gated recurrent unit (GRU ) encoder and decoder with 512 units each. Both models were trained with and without the ranking loss (refer to Equation ), incorporating the two distinct similarity metrics, k 1 and k 2 , for 30 epochs. We tested all the models by randomly selecting the same 1,000 source compounds from the test set and running beam search with beam size B = 100. For all the generated compounds we reported the validity (see Section 2.6) and the correlation (see Section 2.6) between the chosen similarity. Table shows the results demonstrating that the utilization of ranking loss consistently enhances the correlation between NLL and similarity (either k 1 or k 2 in this instance), independently of the specific model or dataset employed. Additionally, in conjunction with the experimental findings outlined in Sections 3 and B.1, we have provided a comprehensive overview, demonstrating the consistency of our framework across diverse datasets, models, and similarity metrics. The lower performances of the RNN compared to the Transformer are expected and attributed to its considerably smaller number of parameters, making it inherently more challenging to train. Nonetheless, it is important to highlight that the generated compounds exhibit a validity exceeding 70% across all cases, and the correlation consistently improves with the adoption of the ranking loss.