E.6 Implicit Objectives
Another key concern in applying LLMs in science is their propensity for hallucinations, where models generate factually incorrect or illogical responses while attempting to satisfy user requests [105]. In our setting, this hallucinations could manifest by TEXTGRAD proposing invalid, toxic, or otherwise undesirable molecules in order to optimize its objective function. We control for severe hallucinations by preprocessing molecules using RDKit sanitization, ensuring at the bare minimum that TEXTGRAD generates chemically valid molecules. However, this simple preprocessing step does not completely specify desirable chemical behavior. A direct strategy would be to exhaustively encode all possible metrics for desirability in drug molecules beyond druglikeness and binding affinity into the objective function, and extend it to include synthesizability, toxicity, among other criteria. Unfortunately, this approach is not realistically feasible as not all criteria for desirability have mature computational metrics. Thus, a key question is whether TEXTGRAD obeys so- called implicit objectives during its optimization process that curtails illogical or undesirable behavior.
To evaluate the extent or existence of undesirable molecules, we can characterize the harmfulness of the generated molecules, focusing on mutagenesis and clinical toxicity. Mutagenicity refers to the ability of a drug to induce genetic alterations, which may lead to DNA damage and harmful long- term affects. Clinical toxicity refers to a broad range of adverse short or long- term side effects. Importantly, neither druglikeness

nor binding affinity are strongly correlated with these criteria, and thus these desirability metrics are not directly optimized or otherwise explicitly encoded in TEXTGRAD's objectives.
To evaluate the propensity for mutagenesis and clinical toxicity, we employ the ADMET- AI model, that predicts these scores from the chemical structures of molecules [108]. ADMET- AI employs a deep learning model trained on multiple relevant datasets. In particular, for mutagenicity, ADMET- AI is trained on 7, 255 drugs from the Ames dataset, a bacterial reverse mutation assay for rapidly screening large numbers of compounds for can induced genetic damage and frameshift mutations. A predicted label of 1.0 indicates a high likelihood that the drug will induce mutagenesis, while a label of 0.0 indicates a low likelihood. For clinical toxicity, ADMET- AI is trained on the ClinTox dataset, a dataset of 1, 484 drugs consisting of molecules that have failed clinical trials for toxicity reasons and also drugs that are associated with successful trials. Similarly, a predicted label of 1.0 indicates a high likelihood of clinical toxicity, while a label of 0.0 indicates a low likelihood.
Once again, we restrict our analysis to the best performing generated molecules with drugable targets as measured by the overall score, and select the best molecule for each protein target and for each initial fragment, for a total of 87 generated molecules. We then compare their predicted mutagenesis and clinical toxicity to the 118 clinically approved molecules from DrugBank. We observe that for both Mutagenicity and Clinical Toxicity, the molecules generated by TEXTGRAD have predicted distributions that indicate a low likelihood of harmful effects, and closely match the distributions of the clinically approved molecules. Together, these results suggest that TEXTGRAD implicitly avoids proposing harmful molecules, even though these criteria are not directly encoded in its loss function.