WorksComputer Science
MolReJev: Decision Models Are In-Context Molecular Predictors
Abstract
Molecular prediction helps prioritize compounds for screening. Specialized predictors are trained for a fixed set of tasks, limiting cross-task generalization. Language models can condition on task descriptions and have recently shown promise in molecular prediction. However, generating answers token by token adds inference cost, and general-purpose models often lack task-specific molecular knowledge. We thus propose MolReJev, which combines Jev-style candidate scoring with in-context learning (ICL) on a language model. MolReJev retrieves similar labeled examples from existing task data and scores candidate labels jointly in one forward pass. ICL improves predictions from the released general-purpose Kev checkpoint and the separately trained MolReJev. For the trained model, gains span all evaluation groups, including held-out tasks, and extend to compounds absent from training. MolReJev generally outperforms MolecularGPT on matched evaluations and nearest-neighbor prediction with the same examples. With four examples, MolReJev and a trained text baseline achieve similar ROC-AUC, with higher measured throughput for MolReJev. These results show that decision models can serve as in-context molecular predictors for compounds, drug pairs, and reactions.
Introduction
A compound that inhibits one protein can be inactive against another. Activity predictions help prioritize compounds for a particular screen, and properties such as blood–brain barrier permeability inform which candidates to advance. Changes in the assay or target can reduce the accuracy of predictors trained on existing data ([15]). For a new target with only a handful of labeled compounds, the challenge is to use those labels to rank the rest of the library ([37]).
Language models can condition predictions on task descriptions. Controlled perturbation studies show that even small structural edits can affect their performance on molecular tasks ([22]). In-context learning (ICL) provides labeled examples of how related molecules behave on the task, with the model weights held fixed. MolReGPT retrieves similar molecule–caption pairs for translation ([18]), and MolecularGPT uses structurally related labeled compounds for property prediction ([25]).
Text-based prediction requires sequential decoding. Scoring a candidate label that spans multiple tokens also requires evaluating its sequence likelihood. Jev-style decision models score supplied labels jointly and return a probability distribution in one forward pass ([40]). We therefore ask whether decision models can learn from labeled molecular examples in context and use them to make predictions on new tasks.
We propose MolReJev, which combines Jev-style candidate scoring with ICL on a language model. For each query, MolReJev retrieves similar labeled examples from existing data for the task and scores the candidate labels in light of those examples. MolReJev (Untrained) uses the released general-purpose Kev checkpoint1 with its weights fixed. For MolReJev (Trained), we train a separate decision model on Qwen3-4B across molecular tasks using the same prompt format.
Figure 1 shows an evaluation query from an FS-Mol assay for polo-like kinase 3 (PLK3). Two of the four retrieved references are shown. They share the query’s scaffold and carry different labels. The active reference has one additional fluorine on the aryl ring, and the inactive reference differs in its alkoxy group. MolReJev uses the retrieved structures and their labels to score the query.
Retrieved examples improve predictions from the released Kev checkpoint and from the separately trained model. The trained model improves in all 18 evaluation groups, with gains on held-out tasks and compounds absent from molecular training. MolReJev outperforms MolecularGPT on most matched evaluations and usually exceeds nearest-neighbor prediction given the same examples. The trained text baseline also benefits from ICL. With four examples, MolReJev achieves comparable predictive performance and higher measured throughput. These results support decision models as in-context predictors for compounds, drug pairs, and reactions.
Related Work
Decision models. Jev assigns probabilities to options supplied in the input (TypeSafe AI, [40]). Kev implements this interface on open-weight backbones, using a pointer head to score option positions (Vinyals et al., [41]). Jev has been evaluated on text classification, routing, and content moderation (Deußer et al., [8]). Lyu & Xia [28] use it to rerank candidate items in personalized recommendation. In medicine, Du et al. [9] evaluate decision accuracy, consistency under changes in question format, and the ability to abstain.
In-context learning across molecular tasks. Language models can infer a task from examples in the prompt (Brown et al., [5]), and the choice of examples affects prediction accuracy ([33, 23]). Training on demonstrations across tasks can improve transfer ([30, 6]), and instruction tuning specifies tasks through natural-language descriptions ([43, 34]). In molecular prediction, FS-Mol benchmarks transfer to new assays using labeled support molecules (Stanley et al., [37]). Nearest-neighbor methods use labels of similar compounds, prototypical networks compare queries with class representations (Snell et al., [36]), and property-aware relation networks learn how compounds relate under a given property (Wang et al., [42]). MolReGPT and ICMA retrieve examples for molecule–text translation ([18, 19]), and MolReflect retrieves prior alignments to refine links between substructures and caption phrases (Li et al., [20]). MolecularGPT combines instruction tuning with retrieved examples for property prediction (Liu et al., [25]). Analyses of chemical language models probe the faithfulness of generated reasoning and whether latent states act as soft prompts ([21, 27]).
MolReJev
Problem formulation
A task supplies a description , candidate labels , and a labeled reference pool with . Given a query , we score each candidate label. The PLK3 assay in Figure 1 defines two labels, DrugBank defines 86 interaction types, and USPTO defines 50 reaction classes. Queries are single molecules, drug pairs, or reactions. Small molecules and reactions use SMILES (Weininger, 1988), and antibodies use amino acid sequences. Binding tasks also include the target sequence.
Figure 1. PLK3 evaluation query and two of its four retrieved references from FS-Mol assay CHEMBL1963697 (Stanley et al., [37]; Mendez et al., [29]). The X and Y substituents specify the compounds on the shared scaffold. The query label is hidden.
Context retrieval and prompt construction
For each query, we rank references in by their similarity scores and take the top . For small molecules, we use Tanimoto similarity on MACCS fingerprints ([10, 2]). For drug pairs, we average the Tanimoto scores of the two drugs matched by position. We use cosine similarity on TF–IDF vectors of amino acid trigrams for antibodies and character trigrams of reaction SMILES for reactions. Ties follow reference-pool order (Table 10). Training queries exclude themselves, and evaluation queries are disjoint from the reference pool for their task.
Demonstration retrieval. Each query type uses the representation and similarity listed here; the four most similar references are placed in the prompt in decreasing order of similarity, with ties broken by row order. A training query never retrieves itself.
| Query type | Representation | Similarity | Reference pool |
| Small molecule | SMILES | MACCS Tanimoto | the task’s pool |
| Antibody | amino acid sequence | cosine, TF–IDF of trigrams | the task’s pool |
| Drug pair | two SMILES, order kept | mean of the two MACCS Tanimoto scores, drug 1 to drug 1 and drug 2 to drug 2 | DrugBank training split (first 70% after shuffling with seed 42) |
| Reaction | reactants » products | cosine, TF–IDF of character trigrams | official training split less the validation rows |
Table 10.
The prompt starts with the task description and the target sequence when available. We then list the retrieved examples and their labels in decreasing order of similarity and append the unlabeled query. We use the final sentence of as the question. The candidate labels follow as separate delimited options, and the prompt ends with a <decide> token. Figure 2 shows the prompt and scores for the PLK3 query. Appendix § 7 gives the template.
Figure 2. Candidate scoring for the PLK3 query in Figure 1. The diagram shows two of the four examples in the packed input. Trained MolReJev assigns scores of 5.14 to no and 3.67 to yes, predicting no, the recorded label.
Candidate scoring
MolReJev uses a pointer head based on Kev. MolReJev (Untrained) runs the released Kev checkpoint with the retrieved examples in context, keeping its weights fixed. For the trained setting, we use the Qwen3-4B backbone (Yang et al., [47]) and train a randomly initialized pointer head alongside the backbone adapters on molecular records. For each label , the model reads the final-layer hidden state at the label’s closing delimiter and compares it with , the hidden state at <decide>. The projections are shared across labels, with . Given the retrieved examples , the score and probability of label are
Training minimizes the negative log probability of the observed label.
One pass scores every member of . Within a binary task we rank queries by , which orders them by the probability of yes; for the multi-class tasks we take the label of highest score as the prediction. Larger candidate sets lengthen the input, but all labels are scored in a single forward pass.
Cross-task training
Each training record uses one labeled pool member as the query and its four nearest remaining neighbours from the same task as demonstrations. We construct 489,116 such records from the molecular tasks (440,116), DrugBank DDI (40,000), and USPTO (9,000) (Table 8). We train for one epoch and report one run per trained system in the main results.
| Dataset | Tasks | Train records | Eval queries |
| FS-Mol (train assays) | 4,507 | 379,912 | 211,145 |
| BACE | 1 | 1,024 | 152 |
| BBBP | 1 | 1,024 | 197 |
| HIV | 1 | 1,024 | 256 |
| SIDER (27 organ classes) | 27 | 27,648 | 3,861 |
| Tox21 (12 assays) | 12 | 12,288 | 3,072 |
| BioSNAP | 35 | 812 | 309 |
| AVIDa-hIL6 | 16 | 16,384 | 4,096 |
| Multi-class datasets | |||
| DrugBank DDI (86 classes) | 1 | 40,000 | 38,362 |
| USPTO reactions (50 classes) | 1 | 9,000 | 10,000 |
| FS-Mol held-out assays | 157 | 0 | 11,676 |
| CYP450 | 5 | 0 | 1,280 |
| ToxCast | 530 | 0 | 83,342 |
| ClinTox | 2 | 0 | 294 |
| BindingDB | 152 | 0 | 4,996 |
| AVIDa-hIL6 held-out | 15 | 0 | 3,840 |
| AVIDa-SARS-CoV-2 | 12 | 0 | 3,072 |
| AVIDa-hTNFα | 1 | 0 | 256 |
| Total (18 groups) | 489,116 | 380,206 |
Table 8. Datasets. “Tasks” counts tasks with evaluation queries after filtering. “Train records” gives the number of training records constructed from pool rows; 0 indicates an evaluation-only dataset. DrugBank DDI and USPTO each have 1,000 validation queries, excluded from this table.
MolReJev and the text baseline of Appendix § 8.§ 1 see the same records and share their optimization settings: rank-16 LoRA adapters (Hu et al., [13]) (, dropout 0.05) on all linear projections, AdamW (Loshchilov & Hutter, [26]) with weight decay 0.01, a one-cycle schedule with a peak learning rate of chosen on the molecular records for both heads, an effective batch of eight records, and bfloat16 precision. Two details follow the format rather than the optimizer. MolReJev caps a record at 3,072 tokens and the text baseline at 4,096, which leaves out 120 and 12 records respectively. MolReJev trains a pointer head of width 256 alongside its adapters, two 2560 × 256 projections with biases and 1.31M parameters in all; the text baseline updates only its adapters, as its language-model head shares weights with the input embeddings and stays frozen.
We call the language-model backbone before training Qwen3-4B and the two trained systems MolReJev (Trained) and Qwen3-4B-Text. We use MolReJev for the trained setting unless specified. By default, we supply four retrieved examples (). Kev denotes the released checkpoint at , and MolReJev (w/o ICL) denotes the trained weights at . For held-out tasks, we retrieve examples from each task’s own pool with the weights held fixed.
Experimental Settings
We evaluate two settings of the MolReJev framework. MolReJev (Untrained) uses the released Kev checkpoint, and MolReJev uses the model trained across molecular tasks. § 3.4 gives the training details and Appendix § 7 lists the configurations.
Datasets and splits. We evaluate small-molecule properties, compound–protein interactions, antibody binding, drug–drug interaction and reaction classification in 18 groups (Table 8). Ten groups test new queries from tasks seen during training. The other eight test tasks excluded from that training. FS-Mol contributes both types: its 4,507 training assays and its 157 held-out assays form separate groups. AVIDa-HIL6 likewise contributes two groups split by antigen variant. A single dataset may contain several tasks; for example, Tox21 has 12 toxicity endpoints. Appendix § 7 gives the split rules and query counts.
Baselines. Qwen3-4B uses its original language-model head, scoring binary queries by the Yes–No logit difference and multiclass queries by candidate-string log-likelihood. Qwen3-4B-Text receives the same prompt content as MolReJev, lists the candidate labels one per line, and generates a JSON answer. We score binary queries with the Yes–No logit difference (Appendix § 8.§ 1). We also evaluate the released MolecularGPT adapter (Liu et al., [25]) in its original prompt format on ten binary and two multiclass groups that require neither protein nor antibody sequences.
The -nearest-neighbor predictor uses the same four references, weighting their labels by similarity for binary tasks and using majority voting for multiclass tasks. We fit a random forest per task on 16, 64, or all labeled reference records, capped by the pool size (Table 14). On held-out FS-Mol assays, we also evaluate the released ProtoNet checkpoint with randomly sampled support molecules (Appendix § 7).
| Dataset (tasks) | Pool size | RF full | MolReJev |
| Datasets used in training | |||
| FS-Mol (4507) | 399 | 0.715 | 0.782 |
| BACE (1) | 1,361 | 0.885 | 0.861 |
| BBBP (1) | 1,768 | 0.704 | 0.694 |
| HIV (1) | 37,008 | 0.831 | 0.821 |
| SIDER (27) | 1,284 | 0.644 | 0.640 |
| Tox21 (12) | 5,893 | 0.746 | 0.751 |
| BioSNAP (35) | 23 | 0.800 | 0.797 |
| AVIDa-hIL6 (16) | 13,727 | 0.951 | 0.926 |
| Multi-class datasets (accuracy / macro-F1) | |||
| DrugBank DDI (86 classes) | 134,265 | 0.876 / 0.763 | 0.843 / 0.779 |
| USPTO reactions (50 classes) | 9,000 | 0.949 / 0.948 | 0.912 / 0.911 |
| Datasets not used in training | |||
| FS-Mol held-out (157) | 268 | 0.717 | 0.760 |
| CYP450 (5) | 9,618 | 0.851 | 0.834 |
| ToxCast (530) | 2,274 | 0.628 | 0.628 |
| ClinTox (2) | 1,314 | 0.717 | 0.810 |
| BindingDB (152) | 129 | 0.923 | 0.916 |
| AVIDa-hIL6 held-out (15) | 14,052 | 0.954 | 0.944 |
| AVIDa-SARS-CoV-2 (12) | 2,990 | 0.750 | 0.726 |
| AVIDa-hTNFα (1) | 4,186 | 0.917 | 0.893 |
| Mean, 16 ROC-AUC groups | — | 0.796 | 0.799 |
Table 14. Full-pool random forests and labeled pool sizes. RF fits all available pool records for each task. Pool sizes are means across tasks for binary groups and total record counts for the two multi-class groups. Binary entries report ROC-AUC, and multi-class entries report accuracy / macro-F1 on the full test sets. MolReJev uses four retrieved demonstrations. Bold marks the highest displayed score for each metric. Means weight the 16 binary groups equally.
Evaluation metrics. For a task with positive and negative query sets and , ROC-AUC measures how often a positive query scores above a negative query [12]. For query scores , it gives half credit to ties:
We average over tasks with both labels within each group, then weight all 16 ROC-AUC groups equally. For a multiclass task with queries and classes present in the evaluation labels, we report
Here and are the true and predicted labels, and , , and count true positives, false positives, and false negatives for class .
Results
In-context learning in a decision model
We test how much four retrieved examples improve decision models at fixed weights and compare trained MolReJev with Qwen3-4B given four examples each. Table 1 shows the group-level results for Qwen3-4B and trained MolReJev at both example counts. Table 2 summarizes the fixed-weight Kev comparison and the four-example comparison using mean ROC-AUC.
| Dataset group | Qwen3-4B | Qwen3-4B | MolReJev | MolReJev |
| ROC-AUC (seen in molecular training) | ||||
| FS-Mol (4507) | 0.481 | 0.577 | 0.644 | 0.782 |
| BACE (1) | 0.421 | 0.598 | 0.600 | 0.861 |
| BBBP (1) | 0.542 | 0.654 | 0.514 | 0.694 |
| HIV (1) | 0.477 | 0.776 | 0.820 | 0.821 |
| SIDER (27) | 0.513 | 0.581 | 0.562 | 0.640 |
| Tox21 (12) | 0.466 | 0.651 | 0.652 | 0.751 |
| BioSNAP (35) | 0.498 | 0.618 | 0.495 | 0.797 |
| AVIDa-hIL6 (16) | 0.540 | 0.909 | 0.558 | 0.926 |
| ROC-AUC (held out from molecular training) | ||||
| FS-Mol held-out assays (157) | 0.491 | 0.566 | 0.635 | 0.760 |
| CYP450 (5) | 0.523 | 0.804 | 0.593 | 0.834 |
| ToxCast (530) | 0.487 | 0.556 | 0.561 | 0.628 |
| ClinTox (2) | 0.461 | 0.673 | 0.536 | 0.810 |
| BindingDB (152) | 0.522 | 0.808 | 0.528 | 0.916 |
| AVIDa-hIL6 held-out (15) | 0.495 | 0.906 | 0.588 | 0.944 |
| AVIDa-SARS-CoV-2 (12) | 0.459 | 0.654 | 0.452 | 0.726 |
| AVIDa-hTNFα (1) | 0.469 | 0.852 | 0.631 | 0.893 |
| Mean ROC-AUC (8 held-out groups) | 0.488 | 0.727 | 0.565 | 0.814 |
| Mean ROC-AUC (16 groups) | 0.490 | 0.699 | 0.586 | 0.799 |
| Multiclass accuracy | ||||
| DrugBank DDI (86 classes) | 0.005 | 0.778 | 0.361 | 0.843 |
| USPTO reactions (50 classes) | 0.020 | 0.633 | 0.684 | 0.912 |
| Multiclass macro-F1 | ||||
| DrugBank DDI (86 classes) | 0.000 | 0.680 | 0.015 | 0.779 |
| USPTO reactions (50 classes) | 0.001 | 0.630 | 0.667 | 0.911 |
Table 1. Molecular prediction with retrieved examples. ROC-AUC is averaged over tasks within each group. Mean rows weight the indicated groups equally. Bold marks the best score in each row.
| Comparison | System | Examples () | Mean ROC-AUC |
| Fixed Kev weights | Kev | 0 | 0.491 |
| Fixed Kev weights | MolReJev (Untrained) | 4 | 0.711 |
| Four examples each | Qwen3-4B | 4 | 0.699 |
| Four examples each | MolReJev (Trained) | 4 | 0.799 |
Table 2. Mean ROC-AUC across 16 groups. The first pair tests the effect of retrieved examples at fixed Kev weights. The second compares systems given four examples each.
Four examples raise mean ROC-AUC by 0.220 for Kev and by 0.213 for trained MolReJev. With four examples each, MolReJev reaches 0.799 versus 0.699 for Qwen3-4B. The ICL gains extend to DrugBank DDI and USPTO, where MolReJev chooses among dozens of labels and leads Qwen3-4B in accuracy and macro-F1 at .
Ablation on in-context examples
Both ablations use up to the first 32 queries per binary task and 1,000 queries per multiclass task.
Number of examples. We vary the number of examples from zero to eight for both decision model settings on the same queries. Figure 3 summarizes the sweep over nine ROC-AUC groups and two multiclass datasets.
Figure 3. Effect of the demonstration count . Binary groups report ROC-AUC on up to 32 queries per task, with evaluable task counts in parentheses. The mean weights the nine groups equally. DrugBank DDI and USPTO report accuracy on 1,000 queries per dataset. Bold marks the best displayed score within each model and row.
The first example accounts for most of the gain in mean ROC-AUC for MolReJev (Untrained), raising it from 0.482 to 0.694. It also yields the largest accuracy gain on both multiclass subsamples. The untrained setting’s mean peaks at two examples, and eight of nine ROC-AUC groups score lower at four. The trained setting’s mean increases at each tested count, reaching 0.794 at eight examples. Individual groups can still decline as more examples are added.
Retrieval strategy. The retrieval seeds vary the examples while keeping the queries and weights fixed. The four most similar references give the best scores across the groups tested (Table 3).
| Dataset group | Most similar | Random | Balanced | Least similar |
| ROC-AUC (seen in molecular training) | ||||
| FS-Mol (4507) | 0.783 | 0.663 0.001 | 0.689 0.001 | 0.613 |
| SIDER (26) | 0.660 | 0.569 0.030 | 0.574 0.023 | 0.572 |
| Tox21 (12) | 0.739 | 0.661 0.025 | 0.652 0.026 | 0.650 |
| BioSNAP (35) | 0.797 | 0.664 0.033 | 0.664 0.017 | 0.443 |
| AVIDa-hIL6 (12) | 0.902 | 0.544 0.035 | 0.755 0.054 | 0.678 |
| ROC-AUC (held out from molecular training) | ||||
| FS-Mol held-out assays (157) | 0.760 | 0.640 0.003 | 0.656 0.002 | 0.616 |
| CYP450 (5) | 0.850 | 0.598 0.042 | 0.578 0.029 | 0.601 |
| ToxCast (482) | 0.632 | 0.574 0.005 | 0.583 0.007 | 0.563 |
| BindingDB (146) | 0.919 | 0.662 0.013 | 0.731 0.011 | 0.437 |
| AVIDa-hIL6 held-out (7) | 1.000 | 0.514 0.081 | 0.715 0.082 | 0.410 |
| Multiclass accuracy | ||||
| DrugBank DDI (86 classes) | 0.829 | 0.312 0.012 | — | 0.309 |
| USPTO reactions (50 classes) | 0.930 | 0.779 0.007 | — | 0.735 |
| Multiclass macro-F1 | ||||
| DrugBank DDI (86 classes) | 0.758 | 0.031 0.005 | — | 0.027 |
| USPTO reactions (50 classes) | 0.930 | 0.755 0.006 | — | 0.712 |
Table 3. Effect of example selection in MolReJev with four demonstrations. ROC-AUC uses up to 32 queries per task, with evaluable task counts in parentheses. Multiclass metrics use 1,000 queries per dataset. Random and class-balanced sampling report the mean sample standard deviation over four draws. Class-balanced sampling uses two examples per class for binary tasks. Bold marks the best score in each row.
On DrugBank DDI, accuracy falls from 0.829 with the nearest examples to 0.312 with random examples. Class-balanced selection recovers part of the loss from random sampling on AVIDa-hIL6, where positive examples are scarce. A USPTO case illustrates that MolReJev can select a label absent from its retrieved examples (Appendix § 11).
Generalization to new tasks and new compounds
Across eight groups held out from molecular training, MolReJev reaches a mean ROC-AUC of 0.814 using task descriptions and four retrieved examples at fixed weights (Table 1). Given four examples each, MolReJev leads Qwen3-4B in every held-out group, with the largest gains on held-out FS-Mol and ClinTox.
ProtoNet classifies a query by its distance to class prototypes formed by averaging the embeddings of labeled support molecules in each class (Snell et al. [36]). With four retrieved molecules, MolReJev’s ROC-AUC falls between the ProtoNet settings with 16 and 64 randomly sampled support molecules on the same 157 held-out FS-Mol assays (Table 4).
| Method | Support / demos | ROC-AUC |
| ProtoNet | random 16 rows | 0.687 |
| ProtoNet | random 64 rows | 0.773 |
| Random forest | 16 rows | 0.604 |
| Random forest | 64 rows | 0.672 |
| kNN | most similar 4 | 0.666 |
| MolReJev | most similar 4 | <u>0.760</u> |
Table 4. ROC-AUC on the same 157 held-out FS-Mol assays. Bold and underline mark the highest and second-highest scores, respectively. Full-pool random forest results are in Table 14.
Queries absent from training. In held-out FS-Mol, 77.4% of query molecules also occur in training records for other assays. We evaluate the queries with and without overlap separately (Appendix § 9).
On compounds absent from training, four examples raise MolReJev’s ROC-AUC from 0.544 to 0.739 across 30 qualifying FS-Mol assays. With four examples, MolReJev leads both its zero-example setting and Qwen3-4B with four examples in all six held-out groups with enough queries of both labels in each subset (Figure 4).
Figure 4. ROC-AUC on query molecules absent from molecular training, averaged over qualifying held-out tasks (counts in parentheses). Qwen3-4B and MolReJev use the same four references. MolReJev (w/o ICL) uses the same trained weights with no references.
Comparison with molecular baselines
Table 5 compares MolReJev with kNN, task-specific random forests, and MolecularGPT. With access to the same four references as kNN, MolReJev leads in 14 of the 16 ROC-AUC groups and on both multiclass tasks. On USPTO, the accuracy gap is 0.319, showing that the same references can support markedly different predictions depending on how they are used. Similarity-weighted kNN leads on AVIDa-hIL6 and AVIDa-hTNF2.
| Dataset group | kNN | RF 16 | RF 64 | MolecularGPT | MolReJev |
| ROC-AUC (seen in molecular training) | |||||
| FS-Mol (4507) | 0.664 | 0.628 | 0.693 | 0.695 | 0.782 |
| BACE (1) | 0.841 | 0.473 | 0.679 | 0.760 | 0.861 |
| BBBP (1) | 0.651 | 0.552 | 0.662 | 0.718 | 0.694 |
| HIV (1) | 0.784 | 0.639 | 0.643 | 0.774 | 0.821 |
| SIDER (27) | 0.638 | 0.524 | 0.526 | 0.559 | 0.640 |
| Tox21 (12) | 0.658 | 0.592 | 0.606 | 0.664 | 0.751 |
| BioSNAP (35) | 0.670 | 0.787 | 0.800 | — | 0.797 |
| AVIDa-hIL6 (16) | 0.939 | 0.582 | 0.641 | — | 0.926 |
| ROC-AUC (held out from molecular training) | |||||
| FS-Mol held-out assays (157) | 0.666 | 0.604 | 0.672 | 0.625 | 0.760 |
| CYP450 (5) | 0.789 | 0.604 | 0.656 | 0.866 | 0.834 |
| ToxCast (530) | 0.580 | 0.547 | 0.570 | 0.620 | 0.628 |
| ClinTox (2) | 0.632 | 0.590 | 0.608 | 0.586 | 0.810 |
| BindingDB (152) | 0.864 | 0.850 | 0.913 | — | 0.916 |
| AVIDa-hIL6 held-out (15) | 0.943 | 0.493 | 0.687 | — | 0.944 |
| AVIDa-SARS-CoV-2 (12) | 0.688 | 0.434 | 0.515 | — | 0.726 |
| AVIDa-hTNFα (1) | 0.902 | 0.738 | 0.720 | — | 0.893 |
| Mean ROC-AUC (16 groups) | 0.744 | 0.602 | 0.662 | — | 0.799 |
| Multiclass accuracy | |||||
| DrugBank DDI (86 classes) | 0.805 | — | — | 0.748 | 0.843 |
| USPTO reactions (50 classes) | 0.593 | — | — | 0.514 | 0.912 |
| Multiclass macro-F1 | |||||
| DrugBank DDI (86 classes) | 0.736 | — | — | 0.698 | 0.779 |
| USPTO reactions (50 classes) | 0.586 | — | — | 0.514 | 0.911 |
Table 5. Comparison with molecular baselines. kNN and MolReJev use the same four references. RF uses 16 or 64 labels per task (full pools in Table 14). MolecularGPT’s multiclass entries use 1,000 queries per dataset. The other columns use the full test sets. On the MolecularGPT subsamples, MolReJev scores 0.829 accuracy and 0.758 macro-F1 on DDI and 0.930 on both metrics on USPTO. Bold marks the highest displayed score per row.
Access to labeled data changes the random forest comparison. MolReJev generally leads forests fitted to 16 or 64 labels per task, while full-pool forests lead in 11 of 16 ROC-AUC groups (Table 14). MolReJev leads on both FS-Mol splits in either setting.
MolReJev leads MolecularGPT in eight of ten property prediction groups and on the matched DrugBank DDI and USPTO subsamples. MolecularGPT leads on BBBP and CYP450.
Comparison with text generation
Both trained systems start from Qwen3-4B and use the same training pool. On the same evaluation queries, both gain substantially from four examples (Table 6). The difference in gains (MolReJev minus Qwen3-4B-Text) is (95% paired bootstrap CI [, ]). With four examples, the ROC-AUC gap is ([, ]). Both intervals span zero. Appendix § 8.§ 1 gives the bootstrap protocol and results by split.
| System | Gain from ICL | ||
| MolReJev | 0.586 | 0.799 | +0.213 |
| Qwen3-4B-Text | 0.562 | 0.795 | +0.233 |
Table 6. Effect of in-context examples for the two trained models. Mean ROC-AUC weights the 16 dataset groups equally. The gain is the change from zero to four examples.
Qwen3-4B-Text generates a label string and provides a first-token ranking score for binary tasks. MolReJev returns a probability distribution over all candidates in one pass, including labels that share a prefix. For example, 66 of the 86 DrugBank labels begin with #Drug1. MolReJev’s predictions stay within the supplied label set. On USPTO, two generated answers fell outside that set (Appendix § 11, Case 2).
Excluding retrieval, MolReJev processes 2.7–3.8 times as many records per second as Qwen3-4B-Text in our setup (Table 7). The models use inputs of similar length. The largest speedup occurs on DrugBank DDI, where the text model decodes the longest label strings (Appendix § 8.§ 1).
| Task | MolecularGPT | Qwen3-4B-Text | MolReJev |
| Molecular groups | 84.85 | 38.70 | 120.40 |
| DrugBank DDI | 1.47 | 3.52 | 13.46 |
| USPTO | 2.37 | 11.93 | 32.09 |
Table 7. Inference throughput in records per second, excluding retrieval. Appendix § 8.§ 1 describes each model’s timing protocol. Bold marks the highest throughput in each row.
Conclusion
MolReJev combines Jev-style candidate scoring with in-context learning for molecular prediction. Retrieved examples improve predictions from the general-purpose Key checkpoint and from the separately trained MolReJev. For the trained model, the gains extend to held-out tasks and compounds absent from training. MolReJev generally outperforms MolecularGPT on matched evaluations and nearest-neighbor prediction using the same examples. The paired comparison with Qwen3-4B-Text shows that both trained models benefit from in-context learning and attain similar mean ROC-AUC with four examples. MolReJev produces a probability distribution over the candidate labels in one forward pass and has higher measured throughput. A single decision model can thus use labeled examples at inference time to make predictions across molecular properties, drug–drug interactions, and reaction classes.
Experimental Protocol
Datasets and splits
For the binary molecular tasks, we split the labeled records into a reference pool and separate evaluation queries. All demonstrations come from the pool. We retain up to 256 queries per task, preserving the class ratio. We exclude tasks with fewer than three queries of either class or fewer than five pool records. In training, we draw queries from the pool, excluding each query from its own demonstrations. We cap training queries at 128 per FS-Mol assay and 1,024 per task elsewhere.
FS-Mol (Stanley et al., [37]). We use the official train/test assay split. We require at least 60 records, both activity labels, and a ChEMBL assay description, retaining 4,624 of the 26,774 training assays in our data files. Within each assay, 25 % of each class is held out for queries. The query and pool size requirements leave 4,507 training assays and all 157 held-out assays. BACE, BBBP, HIV, SIDER, Tox21, ToxCast, ClinTox (Wu et al., [46]): we split on Bemis–Murcko scaffolds (Bemis & Murcko, [3]) in an 8:1:1 ratio. Train and validation molecules form the pool, and test molecules are queries. BioSNAP (Leskovec) and BindingDB (Liu et al., [24]). DrugBank’s published split (Bai et al., [1]); train and validation rows are the pool, test rows are queries; one task per target protein. BioSNAP retains 35 of 1,822 targets and BindingDB retains 152 of 1,441 targets after size filtering. AVIDa-hIL6 (Tsuruta et al., [38]): one task per antigen variant; the 15 mutants listed in the dataset paper are held out as whole tasks (evaluation-only); wild type and the other 15 mutants are training tasks, each with a 25/75 query/pool split. CYP450: the file’s own train/test split; the training part is the pool, the test part is queries; evaluation-only. AVIDa-SARS-CoV-2 (Tsuruta et al., [39]): published train/test files; train rows are the pool, test rows are queries; evaluation-only. AVIDa-hTNFα: single antigen; 25 % of each class as queries; evaluation-only.
DrugBank DDI. the TDC (Huang et al., [14]) DrugBank records (Wishart et al., [45]), shuffled with seed 42 into 70% training, 10% validation and 20% test. Training queries are 40,000 records drawn from the training split with class stratification, taking at least records of each class and the remainder in proportion. Validation queries are 1,000 records drawn at random from the validation split. The evaluation queries are the whole test split, 38,362 records. Demonstrations come from all 134,265 rows of the training split, a larger set than the training queries.
USPTO. the SynRXN schneider_b split (Phan et al., [31]; Schneider et al., [35]), whose training part holds 200 reactions of each of the 50 classes. We hold out 20 of each class as validation queries, 1,000 records excluded from the reference pool, and use the remaining 9,000 as both the training queries and the reference pool. The evaluation queries are 200 reactions of each class sampled at random from the official test set, 10,000 of its 40,000 records, so the evaluation set is balanced across classes.
Model configurations
Model configurations on the Qwen3-4B backbone. Molecular training uses rank-16 LoRA adapters. CE denotes cross-entropy.
| Qwen3-4B | Qwen3-4B-Text | MolReJev | |
| Starting checkpoint | Qwen3-4B | Qwen3-4B | Qwen3-4B |
| Prediction head | LM head | LM head | Pointer head |
| Molecular training | × | ✓ | ✓ |
| Molecular training loss | – | Vocabulary CE | Candidate CE |
| Peak learning rate | – | ||
| Maximum record length | – | 4,096 | 3,072 |
Table 9.
Retrieval and prompt construction
Table 10 specifies the similarity measure and reference pool for each input type. MACCS fingerprints are computed with RDKit [16].
For USPTO, the TF–IDF vocabulary is fitted only on the reference pool, with a minimum term frequency of two.
Prompt templates. The state begins with the task description (minus its final sentence), followed by any context sequence (antigen or target protein), then “Here are some examples.”, then demonstration pairs (each a SMILES or antibody sequence with a task label), and finally the query in the same format without a label. The question is the final sentence of the task description, used verbatim.
For the decision model, the state and question are packed into a single sequence using Kev’s delimiter tokens:
<state> [state text]
<q> [question] <opt> no </opt> <opt> yes </opt> <decide>
The delimiters reuse existing Qwen special tokens (<state> = <|fim_prefix|>, <q> = <|fim_middle|>, <opt> = <|box_start|>, </opt> = <|box_end|>, <decide> = <|fim_suffix|>). The pointer head reads the final hidden states at the </opt> tokens and at <decide> to compute scores as described in § 3.3.
For Qwen3-4B-Text, we concatenate the state, question, and candidate labels listed one per line, followed by the JSON answer prefix {"answer": ". The generated answer text must exactly match an option string; invalid outputs count as errors.
The state for the PLK3 query in Figure 1 and Figure 2 is shown below, with line breaks added to fit.
PUBCHEM_BIOASSAY: Navigating the Kinome.
(Class of assay: other) Panel member name: PLK3.
Here are some examples.
SMILES: COc1nccn2c(-c3ccnc(NCC(C)(C)CO)n3)c(-c3ccc(F)cc3F)nc12
label: Yes
SMILES: CC(C)COc1nccn2c(-c3ccnc(NCC(C)(C)CO)n3)c(-c3ccc(F)cc3)nc12
label: No
SMILES: CC(C)Oc1nccn2c(-c3ccnc(NCC(C)(C)CO)n3)c(-c3ccc(F)cc3F)nc12
label: No
SMILES: CNc1nccn2c(-c3ccnc(NCC(C)(C)CO)n3)c(-c3ccc(F)cc3)nc12
label: No
SMILES: COc1nccn2c(-c3ccnc(NCC(C)(C)CO)n3)c(-c3ccc(F)cc3)nc12
Question: Is this molecule effective to this assay?
For antibody tasks (AVIDa), the field name is Sequence instead of SMILES, and the antigen sequence appears before the demonstrations. For BioSNAP and BindingDB, the target protein sequence is included in the same position. Task descriptions come from released MolecularGPT prompts (Liu et al., [25]) (BACE, BBBP, HIV, Tox21, ToxCast, CYP450), ChEMBL assay descriptions (Mendez et al., [29]) (FS-Mol), or templates we wrote (SIDER, ClinTox, BioSNAP, BindingDB, AVIDa).
Evaluation and baseline protocols
Evaluation. We assign tied scores their average rank and omit tasks with only one label from the ROC-AUC mean. Macro-F1 averages over classes present in the evaluation labels. Table 8 gives task and query counts for the main evaluation. In analyses limited to the first 32 queries, some tasks no longer contain both labels. The demonstration-count and retrieval tables report the number of tasks contributing to each mean.
Ablation protocol. For the demonstration-count sweep, the zero- and four-example conditions use the same query IDs. The one- and two-example prompts use the nearest members of the stored four; for eight examples we retrieve again from the task pool. The retrieval comparison fixes the count at four and varies the choice of examples: most similar, randomly sampled, class-balanced random, or least similar.
MolecularGPT. We use the authors’ LoRA adapter on Llama-2-7B-chat and format the input with their prompt template. For binary tasks, we score queries by the Yes–No logit difference. The comparison covers tasks that require neither protein nor antibody sequence input.
Random forest and kNN. Random forests (Breiman, [4]) use 100 trees with ECFP4 count features (Rogers & Hahn, [32]) for small molecules or hashed amino acid trigram counts for antibodies. We sample 16 or 64 pool records with class stratification, using the whole pool if it is smaller. The full-pool forest fits all pool records. For DDI, we concatenate the two drugs’ Morgan count vectors in their given order. For USPTO, we subtract the summed reactant fingerprints from the summed product fingerprints. The kNN predictor uses the same four neighbors as MolReJev. Ties in multi-class voting are resolved in favour of the label of the nearest tied neighbour. Full-pool results and pool sizes are reported in Table 14.
ProtoNet. We use the FS-Mol checkpoint for ProtoNet (Snell et al., [36]; Stanley et al., [37]), a metric-based predictor trained in episodes on molecular graphs and fingerprints. For each of the 157 held-out FS-Mol assays, its support comprises 16 or 64 randomly sampled pool molecules. Table 4 compares these settings with MolReJev using four retrieved examples on the same queries.
Additional Baseline Results
Text generation
Qwen3-4B-Text and MolReJev share a backbone, a training pool, and the optimization settings described in § 3.4. Qwen3-4B-Text generates a JSON answer. Table 11 gives the per-group results, including the zero-example condition for the trained text baseline.
| Dataset (tasks) | Qwen3-4B (text prompt, ) | Qwen3-4B-Text | Qwen3-4B-Text | MolReJev () |
| Datasets used in training | ||||
| FS-Mol (4507) | 0.634 | 0.627 | 0.778 | 0.782 |
| BACE (1) | 0.795 | 0.595 | 0.859 | 0.861 |
| BBBP (1) | 0.675 | 0.629 | 0.705 | 0.694 |
| HIV (1) | 0.778 | 0.749 | 0.795 | 0.821 |
| SIDER (27) | 0.609 | 0.552 | 0.669 | 0.640 |
| Tox21 (12) | 0.633 | 0.588 | 0.730 | 0.751 |
| BioSNAP (35) | 0.631 | 0.525 | 0.833 | 0.797 |
| AVIDa-hIL6 (16) | 0.933 | 0.613 | 0.942 | 0.926 |
| Multi-class datasets (accuracy / macro-F1) | ||||
| DrugBank DDI (86 classes) | 0.616 / 0.117 | — | 0.839 / 0.782 | 0.843 / 0.779 |
| USPTO reactions (50 classes) | 0.558 / 0.551 | — | 0.935 / 0.934 | 0.912 / 0.911 |
| Datasets not used in training | ||||
| FS-Mol held-out (157) | 0.636 | 0.628 | 0.760 | 0.760 |
| CYP450 (5) | 0.800 | 0.657 | 0.826 | 0.834 |
| ToxCast (530) | 0.566 | 0.546 | 0.624 | 0.628 |
| ClinTox (2) | 0.683 | 0.373 | 0.723 | 0.810 |
| BindingDB (152) | 0.840 | 0.509 | 0.914 | 0.916 |
| AVIDa-hIL6 held-out (15) | 0.934 | 0.604 | 0.942 | 0.944 |
| AVIDa-SARS-CoV-2 (12) | 0.681 | 0.510 | 0.719 | 0.726 |
| AVIDa-hTNFα (1) | 0.867 | 0.283 | 0.903 | 0.893 |
| Mean, 16 ROC-AUC groups | 0.731 | 0.562 | 0.795 | 0.799 |
Table 11. Per-group results for the text and decision models. Qwen3-4B (text prompt) uses the same base checkpoint as Qwen3-4B in Table 1 and the prompt format of Qwen3-4B-Text. Binary groups report ROC-AUC, and multiclass groups report accuracy / macro-F1. The overall mean weights the 16 ROC-AUC groups equally.
With four demonstrations, the trained text baseline produces zero invalid outputs among 38,362 DrugBank DDI queries and two among 10,000 USPTO queries, giving valid-option rates of 100% and 99.98%, respectively.
Paired comparison across example counts. For each task, we compute the change in ROC-AUC from to for each model and subtract the text model’s gain from MolReJev’s. We average within each group and weight the groups equally. The 95% bootstrap percentile intervals ([11]) use the 2.5th and 97.5th percentiles of 2,000 draws with seed 0. We resample tasks with replacement within each group. In groups with fewer than 30 tasks, we also resample queries with replacement within each selected task. The four conditions share the same draw to preserve pairing. Table 12 reports the differences.
| Comparison | Dataset groups | Difference | 95% CI |
| Gain difference | All (16) | ||
| Gain difference | Seen (8) | ||
| Gain difference | Held out (8) | ||
| Four examples | All (16) | ||
| Zero examples | Held out (8) |
Table 12. Paired ROC-AUC differences (MolReJev minus Qwen3-4B-Text). The gain difference compares the changes from zero to four examples. The held-out gain interval ends at approximately before rounding.
The zero-example difference on held-out groups is concentrated in AVIDa-hTNFα, where the gap of 0.348 contributes 0.043 to the eight-group mean.
Timing protocol. All timings exclude retrieval. We time MolReJev and Qwen3-4B-Text on one NVIDIA H200 in bfloat16, with one run per model and workload on the first 4,000 molecular, 1,000 DDI, and 1,000 USPTO records. MolReJev tokenizes prompts within the timed loop. Qwen3-4B-Text uses Hugging Face generate with FlashAttention-2 ([7]), with timing starting after prompt tokenization and length sorting. MolecularGPT runs on Llama-2-7B-chat with its own prompt format and scoring protocol, and its timing includes prompt tokenization.
| Task | Text baseline output | Text baseline input | MolReJev input |
| Molecular properties | 2.0 | 364.7 | 345.7 |
| DrugBank DDI (86 classes) | 18.6 | 2255.5 | 2319.5 |
| USPTO (50 classes) | 7.1 | 981.0 | 975.3 |
Table 13. Mean sequence lengths per record. For Qwen3-4B-Text, the input includes the JSON answer prefix, and the output includes the answer text and its closing quote.
Full-pool random forests
Table 14 reports the labeled pool size for each group and compares random forests fitted to the full pool with MolReJev using four retrieved examples.
Generalization and Training Overlap
A query and its reference pool are disjoint within each task, but the same structure may occur in several tasks. FS-Mol compounds can be screened in several assays, and the same antibody can be tested against different antigens. We measure how often a query occurs in the training records of another task and compare prediction on these queries with prediction on compounds absent from molecular training.
Overlap with training records
An evaluation query is shared if its canonical SMILES (or raw sequence for antibodies) appears in any training record of a different task. Task similarity is the cosine of TF-IDF vectors: character 3-gram vectors of the protein or antigen sequence for BioSNAP, BindingDB and AVIDa tasks (which share description text), and word-level vectors of the task description for all others. For each shared query, we identify the most similar training task containing that molecule. Label agreement is the fraction of queries for which the two tasks assign the same label.
Prevalence. Table 15 gives the counts. Sharing is high for FS-Mol (75 %), FS-Mol held-out (77 %) and AVIDa-hIL6 (72–73 %), moderate for BBBP, SIDER, Tox21, BioSNAP, CYP450, ToxCast and ClinTox (36–57 %), and low for BACE (1 %), HIV (6 %) and BindingDB (13 %). AVIDa-SARS-CoV-2 and AVIDa-hTNFα have no shared queries. Where the most similar training task has text similarity , labels agree 73 % (FS-Mol), 65 % (FS-Mol held-out) and 99.6–99.8 % (AVIDa-hIL6).
| Dataset | Queries | Shared | Shared (%) | Similar | Label agreement (%) |
| Used in training | |||||
| FS-Mol | 211,145 | 159,130 | 75.4 | 112,464 | 73.1 |
| BACE | 152 | 2 | 1.3 | 0 | – |
| BBBP | 197 | 111 | 56.3 | 0 | – |
| HIV | 256 | 16 | 6.3 | 0 | – |
| SIDER | 3,861 | 1,485 | 38.5 | 0 | – |
| Tox21 | 3,072 | 1,289 | 42.0 | 0 | – |
| BioSNAP | 309 | 175 | 56.6 | 0 | – |
| AVIDa-hIL6 | 4,096 | 2,937 | 71.7 | 2,937 | 99.8 |
| Not used in training | |||||
| FS-Mol held-out | 11,676 | 9,040 | 77.4 | 7,306 | 65.0 |
| CYP450 | 1,280 | 482 | 37.7 | 0 | – |
| ToxCast | 83,342 | 41,299 | 49.6 | 0 | – |
| ClinTox | 294 | 106 | 36.1 | 0 | – |
| BindingDB | 4,996 | 662 | 13.3 | 6 | 50.0 |
| AVIDa-hIL6 held-out | 3,840 | 2,812 | 73.2 | 2,812 | 99.6 |
| AVIDa-SARS-CoV-2 | 3,072 | 0 | 0.0 | 0 | – |
| AVIDa-hTNFα | 256 | 0 | 0.0 | 0 | – |
Table 15. Evaluation queries whose molecule (or antibody) appears in a training record of another task. “Similar” means the most similar such task has description (or sequence) similarity ; agreement is computed over those queries (BindingDB: 6 queries). Dataset sizes as in Table 8.
Performance on shared and unshared queries
We compute ROC-AUC separately for shared and unshared queries within each task. Both subsets must contain at least three queries of each class. This requirement retains 535 of 4,507 FS-Mol training assays and 30 of 157 held-out assays, favouring assays with more queries; BACE, HIV, BioSNAP, AVIDa-SARS-CoV-2 and AVIDa-hTNFα retain no qualifying task. Table 16 reports three conditions: the untrained backbone with demonstrations (A), MolReJev (B), and MolReJev without demonstrations (C).
Table 16: ROC-AUC of the untrained backbone with demonstrations (A), MolReJev (B), and MolReJev without demonstrations (C) on queries whose molecule is unshared (U) or shared (S) with a training record of another task, averaged over the listed tasks. Each task holds at least three queries of each class in both subsets. The BBBP and ClinTox estimates each average over fewer than five tasks, and the shared subset of BindingDB holds 154 queries.
| Dataset | Tasks | Queries U / S | A: untrained U | A: untrained S | B: MolReJev U | B: MolReJev S | C: no demos U | C: no demos S |
| Used in training | ||||||||
| FS-Mol | 535 | 27,583 / 39,034 | 0.571 | 0.586 | 0.677 | 0.696 | 0.512 | 0.527 |
| BBBP | 1 | 86 / 111 | 0.725 | 0.596 | 0.778 | 0.633 | 0.533 | 0.501 |
| SIDER | 26 | 2,288 / 1,430 | 0.600 | 0.577 | 0.645 | 0.665 | 0.523 | 0.658 |
| Tox21 | 10 | 1,484 / 1,076 | 0.605 | 0.665 | 0.710 | 0.769 | 0.619 | 0.650 |
| AVIDa-hIL6 | 7 | 449 / 1,343 | 0.935 | 0.929 | 0.976 | 0.945 | 0.511 | 0.554 |
| Not used in training | ||||||||
| FS-Mol held-out | 30 | 1,531 / 1,983 | 0.627 | 0.602 | 0.739 | 0.727 | 0.544 | 0.540 |
| CYP450 | 5 | 798 / 482 | 0.805 | 0.810 | 0.839 | 0.858 | 0.566 | 0.660 |
| ToxCast | 365 | 32,965 / 32,393 | 0.547 | 0.565 | 0.632 | 0.638 | 0.559 | 0.596 |
| ClinTox | 2 | 188 / 106 | 0.822 | 0.574 | 0.832 | 0.749 | 0.490 | 0.574 |
| BindingDB | 10 | 821 / 154 | 0.888 | 0.819 | 0.948 | 0.912 | 0.570 | 0.494 |
| AVIDa-hIL6 held-out | 9 | 517 / 1,787 | 0.939 | 0.903 | 0.973 | 0.945 | 0.540 | 0.624 |
Table 16.
On both subsets, MolReJev exceeds the untrained backbone and benefits from demonstrations in all eleven groups. With demonstrations, the shared subset leads in five groups and the unshared subset in six. Without them, the shared subset leads in eight. The subsets differ in compounds and labels, so their scores reflect more than prior exposure.
Retrieval Variability and Class Balance
Table 3 reports means and sample standard deviations across four retrieval draws at fixed weights and query sets. The standard deviations use the denominator . About 4 % of A V I D a-hIL6 antibodies are positive, so four random examples seldom include a binder. Drawing two binders and two nonbinders improves ROC-AUC on both splits. Retrieving the four closest antibodies gives the highest ROC-AUC on both.
Case Studies
Figure 5 compares predictions from MolReJev and Qwen3-4B-Text on three multiclass queries. Both models receive the same four retrieved demonstrations for each query.

Figure 5. Multiclass cases showing the queries, retrieved demonstrations and similarities, gold labels, and both predictions. Parentheses give MolReJev probabilities. Case 1 gives the full DDI labels. Reaction drawings omit solvents, spectators, and minor byproducts.
Case 1: Mixed demonstration labels. Two demonstrations carry the gold label “D1 may increase the hypotensive activities of D2.” The other two carry “The metabolism of D2 can be increased when combined with D1.” MolReJev gives these labels probabilities of 0.541 and 0.419, respectively. The text baseline predicts the metabolism type.
Case 2: A label outside the supplied set. MolReJev predicts the gold class “Methylation” with probability 0.922. The text baseline generates “Aldehyde to ketone oxidation,” a string outside the 50 candidate labels.
Case 3: A class absent from the examples. MolReJev assigns 0.996 probability to the gold class, “Sonogashira coupling,” even though none of the demonstrations belong to that class. The text baseline predicts “Bromo Suzuki-type coupling.” The query contains the alkyne–halide coupling pattern associated with the gold class.
References
- [1]Peizhen Bai, Filip Miljković, Bino John, and Haiping Lu. Interpretable bilinear attention network with domain adaptation improves drug–target prediction. Nature Machine Intelligence, 5(2):126–136, 2023.arxiv.org/abs/2208.02194
- [2]Dávid Bajusz, Anita Rácz, and Károly Héberger. Why is tanimoto index an appropriate choice for fingerprint-based similarity calculations? Journal of cheminformatics, 7(1):20, 2015.DOI
- [3]Guy W. Bemis and Mark A. Murcko. The properties of known drugs. 1. molecular frameworks. Journal of medicinal chemistry, 39(15):2887–2893, 1996.pubmed.ncbi.nlm.nih.gov/8709122
- [4]Leo Breiman. Random forests. Machine learning, 45(1):5–32, 2001.
- [5]Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, et al. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901, 2020.arxiv.org/abs/2005.14165
- [6]Yanda Chen, Ruiqi Zhong, Sheng Zha, George Karypis, and He He. Meta-learning via language model in-context tuning. In Proceedings of the 60th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pp. 719–730, 2022.
- [7]Tri Dao. Flashattention-2: Faster attention with better parallelism and work partitioning. In International Conference on Learning Representations, volume 2024, pp. 35549–35562, 2024.arxiv.org/abs/2307.08691
- [8]Tobias Deußer, Rajkumar Ramamurthy, Lorenz Sparrenberg, and Rafet Sifa. Evaluating and benchmarking the system one model jev. arXiv preprint arXiv:2609.37647, 2026.
- [9]Yanrui Du, Danyang Zhao, Sendong Zhao, Wenhao Li, Yibo Gao, Haochun Wang, Zhuoer Xu, Shiwen Cui, and Bing Qin. How reliable are system-one decisions in medicine? a comparative study of jev, jev-like models, and llms. arXiv preprint arXiv:2610.18529, 2026.arxiv.org/abs/2610.18529
- [10]Joseph L Durant, Burton A Leland, Douglas R Henry, and James G Nourse. Reoptimization of mdl keys for use in drug discovery. Journal of chemical information and computer sciences, 42(6):1273–1280, 2002.
- [11]Bradley Efron and Robert J. Tibshirani. An Introduction to the Bootstrap. Chapman and Hall, 1993. doi: 10.1201/9780429246593.DOI
- [12]James A Hanley and Barbara J McNeil. The meaning and use of the area under a receiver operating characteristic (roc) curve. Radiology, 143(1):29–36, 1982.pubmed.ncbi.nlm.nih.gov/7063747
- [13]Edward J Hu, Yelong Shen, Phillip Wallis, Zeyuan Allen-Zhu, Yuanzhi Li, Shean Wang, Lu Wang, and Weizhu Chen. Lora: Low-rank adaptation of large language models. arXiv preprint arXiv:2106.09685, 2021.arxiv.org/abs/2106.09685
- [14]Kexin Huang, Tianfan Fu, Wenhao Gao, Yue Zhao, Yusuf Roohani, Jure Leskovec, Connor W Coley, Cao Xiao, Jimeng Sun, and Marinka Zitnik. Therapeutics data commons: Machine learning datasets and tasks for drug discovery and development. arXiv preprint arXiv:2102.09548, 2021.arxiv.org/abs/2102.09548
- [15]Yuanfeng Ji, Lu Zhang, Jiaxiang Wu, Bingzhe Wu, Lanqing Li, Long-Kai Huang, Tingyang Xu, Yu Rong, Jie Ren, Ding Xue, et al. Drugood: Out-of-distribution dataset curator and benchmark for ai-aided drug discovery—a focus on affinity prediction problems with noise annotations. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 37, pp. 8023–8031, 2023.
- [16]Greg Landrum et al. Rdkit documentation. Release, 1(1-79):4, 2013.
- [18]Jiatong Li, Yunqing Liu, Wenqi Fan, Xiao-Yong Wei, Hui Liu, Jiliang Tang, and Qing Li. Empowering molecule discovery for molecule-caption translation with large language models: A chatgpt perspective. IEEE transactions on knowledge and data engineering, 36(11):6071–6083, 2024.DOI
- [19]Jiatong Li, Wei Liu, Zhihao Ding, Wenqi Fan, Yuqiang Li, and Qing Li. Large language models are in-context molecule learners. IEEE Transactions on Knowledge and Data Engineering, 37(7): 4131–4143, 2025.DOI
- [20]Jiatong Li, Yunqing Liu, Wei Liu, Jingdi Lei, Di Zhang, Wenqi Fan, Dongzhan Zhou, Yuqiang Li, and Qing Li. Molreflect: Towards in-context fine-grained alignments between molecules and texts. IEEE Transactions on Knowledge and Data Engineering, 2026a.DOI
- [21]Jiatong Li, Yuxuan Ren, Weida Wang, Xiaoyong Wei, and Yatao Bian. Chemical chain-of-thought functions as a hallucination-prone molecular scratchpad. arXiv preprint arXiv:2607.20935, 2026b.arxiv.org/abs/2607.20935
- [22]Jiatong Li, Weida Wang, Changmeng Zheng, Shufei Zhang, Yatao Bian, Xiao-yong Wei, and Qing Li. Do llms truly generalize in the molecular domain? a perturbation-based analysis. arXiv preprint arXiv:2607.01800, 2026c.arxiv.org/abs/2607.01800
- [23]Jiachang Liu, Dinghan Shen, Yizhe Zhang, William B Dolan, Lawrence Carin, and Weizhu Chen. What makes good in-context examples for gpt-3? In Proceedings of Deep Learning Inside Out (DeeLIO 2022): The 3rd workshop on knowledge extraction and integration for deep learning architectures, pp. 100–114, 2022.
- [24]Tiqing Liu, Yuhmei Lin, Xin Wen, Robert N Jorissen, and Michael K Gilson. Bindingdb: a web-accessible database of experimentally determined protein–ligand binding affinities. Nucleic acids research, 35(suppl_1):D198–D201, 2007.pubmed.ncbi.nlm.nih.gov/17145705
- [25]Yuyan Liu, Sirui Ding, Sheng Zhou, Wenqi Fan, and Qiaoyu Tan. Moleculargpt: Open large language model (llm) for few-shot molecular property prediction. arXiv preprint arXiv:2406.12950, 2024.arxiv.org/abs/2406.12950
- [26]Ilya Loshchilov and Frank Hutter. Decoupled weight decay regularization. arXiv preprint arXiv:1711.05101, 2017.arxiv.org/abs/1711.05101
- [27]Kaiyuan Lu, Jiatong Li, and Yatao Bian. Reasoning or just prompting? probing the mechanism of latent chemical reasoning. arXiv preprint arXiv:2610.34173, 2026.arxiv.org/abs/2610.34173
- [28]Hanjia Lyu and Yinglong Xia. Decision-oriented recommendation reranking: An empirical study of its promise and limitations. arXiv preprint arXiv:2609.40241, 2026.arxiv.org/abs/2609.40241
- [29]David Mendez, Anna Gaulton, A Patrícia Bento, Jon Chambers, Marleen De Veij, Eloy Félix, María Paula Magariños, Juan F Mosquera, Prudence Mutowo, Michał Nowotka, et al. Chembl: towards direct deposition of bioassay data. Nucleic acids research, 47(D1):D930–D940, 2019.DOI
- [30]Sewon Min, Mike Lewis, Luke Zettlemoyer, and Hannaneh Hajishirzi. Metaicl: Learning to learn in context. In Proceedings of the 2022 conference of the North American chapter of the Association for Computational Linguistics: Human Language Technologies, pp. 2791–2809, 2022.
- [31]Tieu-Long Phan, Nhu-Ngoc Nguyen Song, and Peter F Stadler. Synrxn: An open benchmark and curated dataset for computational reaction modeling. Scientific Data, 13(1):625, 2026.DOI
- [32]David Rogers and Matthew Hahn. Extended-connectivity fingerprints. Journal of chemical information and modeling, 50(5):742–754, 2010.DOI
- [33]Ohad Rubin, Jonathan Herzig, and Jonathan Berant. Learning to retrieve prompts for in-context learning. In Proceedings of the 2022 conference of the North American chapter of the association for computational linguistics: human language technologies, pp. 2655–2671, 2022.
- [34]Victor Sanh, Albert Webson, Colin Raffel, Stephen H Bach, Lintang Sutawika, Zaid Alyafeai, Antoine Chaffin, Arnaud Stiegler, Teven Le Scao, Arun Raja, et al. Multitask prompted training enables zero-shot task generalization. arXiv preprint arXiv:2110.08207, 2021.arxiv.org/abs/2110.08207
- [35]Nadine Schneider, Daniel M Lowe, Roger A Sayle, and Gregory A Landrum. Development of a novel fingerprint for chemical reactions and its application to large-scale reaction classification and similarity. Journal of chemical information and modeling, 55(1):39–53, 2015.
- [36]Jake Snell, Kevin Swersky, and Richard Zemel. Prototypical networks for few-shot learning. Advances in neural information processing systems, 30, 2017.arxiv.org/abs/1703.05175
- [37]Megan Stanley, John F Bronskill, Krzysztof Maziarz, Hubert Misztela, Jessica Lanini, Marwin Segler, Nadine Schneider, and Marc Brockschmidt. Fs-mol: A few-shot learning dataset of molecules. In Thirty-fifth Conference on Neural Information Processing Systems Datasets and Benchmarks Track (Round 2), 2021.
- [38]Hirofumi Tsuruta, Hiroyuki Yamazaki, Ryota Maeda, Ryotaro Tamura, Jennifer Wei, Zelda E Mariet, Poomarin Pholyphisut, Hidetoshi Shimokawa, Joseph R Ledsam, Lucy Colwell, et al. Avida-hil6: a large-scale vh dataset produced from an immunized alpaca for predicting antigen-antibody interactions. Advances in Neural Information Processing Systems, 36:42077–42096, 2023.arxiv.org/abs/2306.03329
- [39]Hirofumi Tsuruta, Hiroyuki Yamazaki, Ryota Maeda, Ryotaro Tamura, and Akihiro Imura. A sars-cov-2 interaction dataset and vhh sequence corpus for antibody language models. Advances in Neural Information Processing Systems, 37:116149–116171, 2024.arxiv.org/abs/2405.18749
- [40]TypeSafe AI. Introducing System One Models & Jev. https://typesafe.ai/blog/introducing-system-one-models-and-jev, September 2026.
- [41]Oriol Vinyals, Meire Fortunato, and Navdeep Jaitly. Pointer networks. Advances in neural information processing systems, 28, 2015.
- [42]Yaqing Wang, Abulikemu Abuduweili, Quanming Yao, and Dejing Dou. Property-aware relation networks for few-shot molecular property prediction. Advances in Neural Information Processing Systems, 34:17441–17454, 2021.arxiv.org/abs/2107.07994
- [43]Jason Wei, Maarten Bosma, Vincent Y Zhao, Kelvin Guu, Adams Wei Yu, Brian Lester, Nan Du, Andrew M Dai, and Quoc V Le. Finetuned language models are zero-shot learners. arXiv preprint arXiv:2109.01652, 2021.arxiv.org/abs/2109.01652
- [45]David S Wishart, Yannick D Feunang, An C Guo, Elvis J Lo, Ana Marcu, Jason R Grant, Tanvir Sajed, Daniel Johnson, Carin Li, Zinat Sayeeda, et al. Drugbank 5.0: a major update to the drugbank database for 2018. Nucleic acids research, 46(D1):D1074–D1082, 2018.DOI
- [46]Zhenqin Wu, Bharath Ramsundar, Evan N Feinberg, Joseph Gomes, Caleb Geniesse, Aneesh S Pappu, Karl Leswing, and Vijay Pande. Molculenet: a benchmark for molecular machine learning. Chemical science, 9(2):513–530, 2018.arxiv.org/abs/1703.00564
- [47]An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chenggen Huang, Chenxu Lv, et al. Qwen3 technical report. arXiv preprint arXiv:2505.09388, 2025.arxiv.org/abs/2505.09388



