We investigated the difference in perplexity scores between molecules generated using a CLM via either beam search or multinomial sampling. In this regard, a CLM was pretrained with approximately 1.6 million molecules from ChEMBL (version 28) . Ten randomly selected targets were used for fine-tuning (Table ). For each macromolecular target, ligands that possessed a pChEMBL value larger than 6 were selected, where pChEMBL is defined as -log10(molar IC50, XC50, EC50, AC50, Ki, Kd, or potency). To emulate different low-data regimes typical of drug discovery, we prepared fine-tuning sets of different sizes that contained 5, 10, 20, or 40 randomly selected ligands for each target. For each of the 10 targets and each of the four fine-tuning sets, 10 or 50 SMILES strings were generated via beam search sampling (k = 10 or k = 50). A total of 1,000 SMILES strings were sampled every second epoch during 100 CLM fine-tuning epochs via multinomial sampling. In CLM fine-tuning using the smallest fine-tuning sets (five molecules), multinomial sampling consistently outperformed beam search sampling in terms of the perplexity score, as molecules with the best score (lowest perplexity) were obtained (Fig. ). Increasing the beam search width from k = 10 to k = 50 did not markedly improve the ability of this method in identifying molecules with higher perplexity scores (Fig. ). These observations were confirmed for the larger fine-tuning sets (Supplementary Figs. ). A potential explanation for this observation is the "greedy" nature of the beam search , which explores only a limited number of possibilities for next-character addition. By contrast, the "fuzzy" nature of multinomial sampling allows the generation of a greater number of molecules, and hence a broader exploration of the chemical space of interest.