ApexOracle: AI for Pathogen-Specific Antibiotic Discovery
- ApexOracle is an AI system specialized in pathogen-conditioned antimicrobial discovery, integrating genomic and textual context to predict antibacterial efficacy and generate novel molecules.
- It fuses a diffusion language model trained on SELFIES with genomic embeddings (Evo2) and literature-based embeddings (Me-LLaMA) to enhance prediction accuracy and transfer learning to unseen pathogens.
- Performance evaluations show significant improvements in MIC regression, small-molecule classification, and synergy prediction, demonstrating its potential to guide rapid antibiotic design for emerging resistant strains.
ApexOracle is an artificial intelligence system for pathogen-aware antimicrobial discovery that is designed to perform two coupled tasks within one architecture: predict the antibacterial efficacy of an existing molecule against a specific pathogen strain, and generate de novo molecules conditioned on pathogen context, including strains not seen during training. In the paper “Predicting and generating antibiotics against future pathogens with ApexOracle,” the system is presented as a unified representation–generation architecture motivated by antimicrobial resistance and by the difficulty of transferring conventional antimicrobial models to emerging or previously unseen pathogens (Leng et al., 10 Jul 2025).
1. Problem formulation and scope
ApexOracle targets a pathogen-conditioned version of antimicrobial discovery rather than the weaker question of whether a molecule is “antibacterial in general.” The paper frames the central tasks as: determining whether a molecule will be effective against a particular pathogen strain, including novel or emerging strains, and generating de novo candidates tailored to such pathogens (Leng et al., 10 Jul 2025).
The stated motivation is the broader antimicrobial resistance problem. The paper cites estimates of about 4.95 million deaths per year associated with drug-resistant pathogens, and argues that existing computational pipelines are poorly suited to the “future pathogen” setting, where direct antimicrobial assay data may be limited or absent (Leng et al., 10 Jul 2025). The claimed deficiencies of prior approaches are specific: many predictors are not pathogen-specific; strain-specific systems do not transfer well to unseen pathogens; small-molecule models are often trained separately per strain; pathogen representations are weak; antimicrobial data are scarce and heterogeneous; cross-modal information is underused; and generation inherits the limitations of narrow target-specific predictors (Leng et al., 10 Jul 2025).
Within this framing, ApexOracle is positioned as a multimodal model that incorporates pathogen-specific context through genomic and literature-derived strain representations, rather than relying solely on molecular features. The paper states that it can predict MIC regression for antimicrobial peptides, binary antibiotic activity classification for small molecules, and synergy prediction through an extension, while also supporting pathogen-guided molecular generation (Leng et al., 10 Jul 2025).
2. Architecture and learned representations
ApexOracle is described as Omnimodel for pRedictive and generAtive antimicrobiaL discovEry and is organized around three representation modules: a Diffusion LLM (DLM) over SELFIES for molecules, Evo2 for genomic strain embeddings, and Me-LLaMA embeddings derived from pathogen-related textual knowledge gathered with Qwen2.5-Max (Leng et al., 10 Jul 2025).
The molecular backbone is a discrete diffusion LLM trained on SELFIES. SELFIES is used because it can encode both small molecules and peptides, including noncanonical amino acids and modifications; the paper reports that 71.5% of DBAASP AMP entries contain noncanonical elements (Leng et al., 10 Jul 2025). The DLM was pretrained on 121.6 million unique molecular sequences from PubChem, SmProt v2.0, UniRef, UniProt, and CycloPS-generated peptides, with molecules longer than 1,024 tokens discarded (Leng et al., 10 Jul 2025). The neural denoiser is implemented as a 12-layer Diffusion Transformer (DiT) with latent dimension 768, and the clean-sequence representation for downstream prediction is taken from the final transformer-layer <CLS> / beginner token embedding (Leng et al., 10 Jul 2025).
The diffusion process is specified in the paper. The forward corruption process is
and the reverse process uses a neural denoiser in place of the unknown clean token (Leng et al., 10 Jul 2025). The training objective is
To improve representation learning, the DLM is also trained with a multi-target regression objective on 209 RDKit descriptors, yielding the total loss
with (Leng et al., 10 Jul 2025).
Pathogen context is encoded in two modalities. For genomic embeddings, genomes are split with a sliding window of 11,000 nt and 10,000 nt step size, passed through Evo2-40B, and the 46th-layer hidden states are mean pooled over positions. The fragment embedding is
and the full genome embedding is
The paper also notes a practical scaling adjustment: Evo2 embeddings had magnitudes around and were uniformly scaled by (Leng et al., 10 Jul 2025).
For literature-derived strain embeddings, Qwen2.5-Max retrieves concise strain-specific information including species traits, unique mutations, and resistance or sensitivity information, after which the text is embedded with Me-LLaMA3-8B. The paper uses the penultimate-layer token embeddings directly:
To reduce overfitting to strain identifiers, the strain name is replaced with “this strain” before embedding (Leng et al., 10 Jul 2025).
Fusion is performed by cross-attention from the molecule representation into genome and text embeddings separately, followed by concatenation and task-specific MLP heads. The paper is explicit that it does not define an explicit alignment loss or contrastive objective between genomic and textual pathogen modalities (Leng et al., 10 Jul 2025).
3. Data resources and training setup
The AMP/MIC dataset was assembled from an in-house peptide dataset and DBAASP. After filtering, the final set contains 17,988 peptides, 5,632 pathogen strains, and 121,265 MIC measurements (Leng et al., 10 Jul 2025). The in-house source contributes 1,642 canonical linear peptides, 11 strains, and 15,718 MIC measurements, while DBAASP contributes 16,408 peptides, 5,630 strains, and 105,547 MIC measurements (Leng et al., 10 Jul 2025).
Peptides are converted to SELFIES using PepLink, a custom converter supporting 404 noncanonical amino acids, 11 intrachain-bond types, 242 N-terminal modifications, and 56 C-terminal modifications (Leng et al., 10 Jul 2025). MIC values originally reported in 0 are converted to 1, then transformed as
2
with special operators handled by heuristic rules: 3 are doubled, 4 is tripled, ranges are averaged, and 5 uses the central value (Leng et al., 10 Jul 2025).
For small-molecule classification, the dataset contains 49,331 (molecule, strain) pairs with binary activity labels across three strains: 39,312 molecules for S. aureus RN4220, 2,335 molecules for E. coli BW25113, and 7,684 molecules for A. baumannii ATCC 17978 (Leng et al., 10 Jul 2025). The synergy dataset contains 2,732 unique molecule-synergy-strain pairs, of which 88% are AMP–small molecule and 12% are AMP–AMP, with FICI binarized at 0.5 (Leng et al., 10 Jul 2025).
The DLM pretraining corpus contains 121.6 million molecules/sequences, with 1% held out for evaluation and 99% used for training. The source counts are 111,378,206 from PubChem, 825,632 from SmProt v2.0, 6,972,866 from UniRef, 3,749,540 from UniProt, and 10,000,000 from CycloPS (Leng et al., 10 Jul 2025).
Training and transfer are evaluated under several holdout schemes. In the strain-wise setting, each species uses 3-fold validation with 2/3 strains for training and 1/3 strains held out for testing. In the 3 species-wise setting, species are grouped into Fungi, Pseudomonadota, and Bacillota, and one cluster is held out. In the 11 species-wise setting, those broad groups are split further into 2, 4, and 5 clusters respectively, again holding out one cluster at a time (Leng et al., 10 Jul 2025). The paper defines “novel pathogens” and “unseen strains” operationally as pathogens whose strains or species clusters are completely absent from training labels in the corresponding split (Leng et al., 10 Jul 2025).
DLM training proceeds in two stages: 1 epoch optimizing only 6, then 2 epochs with 7 added. Training uses AdamW on 8 NVIDIA A100 80GB GPUs, with learning rate 8 initially, warmup over the first 2,500 steps, then 9, batch size 768 in the first stage and 480 in the second (Leng et al., 10 Jul 2025). Reported validation performance after training is perplexity 1.58 and NLL 0.46 (Leng et al., 10 Jul 2025).
4. Predictive tasks and empirical performance
ApexOracle is evaluated on three predictive tasks: MIC regression for AMP–strain pairs, binary small-molecule antibiotic classification, and synergy prediction (Leng et al., 10 Jul 2025). The reported metrics include 0, Pearson correlation, Spearman correlation, AUROC, and AUPRC (Leng et al., 10 Jul 2025).
For molecular representation benchmarking in pathogen-unaware MIC prediction, the DLM embeddings are evaluated on 19 bacterial strains with more than 700 MIC entries in DBAASP under 5-fold cross-validation. The paper states that ApexOracle’s DLM embeddings outperform all compared molecular models and surpass the second-best model by 27.1% in 1 (Leng et al., 10 Jul 2025).
For strain-aware MIC prediction on unseen strains under the strain-wise evaluation, the ensemble of 7 models achieves average 2, while a single model achieves average 3. Within this setting, the DLM molecular encoder achieves 13.5% higher 4 than the next-best molecular encoder without ensembling (Leng et al., 10 Jul 2025). Under broader transfer, the 3 species-wise setting gives ensemble average 5, and the 11 species-wise setting gives average 6 excluding cluster 9, identified as Mycoplasmatota, which the paper highlights as biologically atypical because of absent peptidoglycan cell walls and unusual membrane composition (Leng et al., 10 Jul 2025).
For small-molecule antibiotic classification, ApexOracle is evaluated in a zero-shot setting in which the target strain has no strain-specific small-molecule fine-tuning labels. Even in that setting, the paper states that it matched or outperformed two of four fine-tuned baseline models (Leng et al., 10 Jul 2025). In the direct 5-fold comparison with ensembling, ApexOracle improved by an average of 8.3% in AUROC and 37.7% in AUPRC across the three benchmark strains (Leng et al., 10 Jul 2025).
For synergy prediction, using 7-model ensembling under strain-wise 3-fold cross-validation, the reported performance is AUROC = 0.7539 and AUPRC = 0.7454 (Leng et al., 10 Jul 2025).
The paper’s interpretation of these results is that pathogen-context embeddings support zero-shot or low-data transfer to strains with little or no direct antimicrobial data. This suggests that the genomic and text modalities are functioning as inductive context rather than merely as auxiliary metadata, although the paper does not present an explicit modality-alignment objective or mechanistic attribution analysis (Leng et al., 10 Jul 2025).
5. Pathogen-guided molecular generation
ApexOracle’s generation component uses the same SELFIES DLM backbone together with predictor-based guidance during diffusion sampling. The generation process begins from a noisy or masked SELFIES sequence, denoises token-by-token with the learned reverse process, biases denoising using pathogen-conditioned predictors, and decodes the final SELFIES string as a candidate molecule (Leng et al., 10 Jul 2025).
For a single target property 7, the guidance is defined as
8
For multiple properties 9 with guidance strengths 0, the paper gives the multiplicatively reweighted token-level form in Eq. (7) (Leng et al., 10 Jul 2025). For continuous targets such as MIC, the paper introduces a transformed score using Eq. (8) so that guidance favors predicted values close to a target continuous value (Leng et al., 10 Jul 2025).
To avoid irreversible token errors, ApexOracle uses remasking. The transition is modified as
1
with 2 and 3 (Leng et al., 10 Jul 2025).
The generation experiments use 256 generation steps, target MIC set to 1, 4 annealed linearly from 0.5 to 0.2, and remasking active between 5 and 6 (Leng et al., 10 Jul 2025). Guidance is divided into three stages: Stage 1 uses MIC guidance only, Stage 2 activates remasking with peptide-classifier guidance, and Stage 3 returns to standard denoising with MIC guidance (Leng et al., 10 Jul 2025). Guidance strengths are reported as 7 in phases 1 and 3, and 8 in phase 2 (Leng et al., 10 Jul 2025).
The principal generation case studies target two held-out resistant strains: E. coli ATCC BAA-3170, described as colistin-resistant, and P. aeruginosa ATCC BAA-3197, described as resistant to fluoroquinolones, beta-lactams, and carbapenems (Leng et al., 10 Jul 2025). For both strains, pathogen-guided generation shifts predicted MIC distributions toward lower values relative to unconditional generation, and the generated molecules also show lower maximum Tanimoto similarity to compounds in DBAASP than unconditional generations (Leng et al., 10 Jul 2025). The paper interprets this as evidence of efficacy-oriented generation combined with structural novelty.
However, the evidence is explicitly in silico only. The paper reports predicted MIC distributions, Tanimoto-based novelty analysis, and SELFIES validity checks, but does not report wet-lab validation, toxicity analysis, off-target effects, metabolic stability, drug-likeness scores, or retrosynthetic feasibility (Leng et al., 10 Jul 2025).
6. Ablations, limitations, and significance
The paper includes modality ablations on a curated DBAASP subset with 67,304 AMP–strain activity pairs for which both genome and text are available. In these ablations, the DLM encoder is replaced by ChemBERTa for speed while leaving the rest of the architecture intact (Leng et al., 10 Jul 2025). The reported finding is that removing genomic embeddings causes the largest drop, removing text embeddings also causes a large drop, and removing the auxiliary small-molecule classification task causes a smaller but nontrivial decline. Figure 2i is summarized as showing that genome and text are of comparable importance and synergize (Leng et al., 10 Jul 2025).
The paper is explicit about several limitations. First, performance remains bounded by the training distribution; Mycoplasmatota is identified as a failure mode associated with biological divergence (Leng et al., 10 Jul 2025). Second, the text modality depends on existing scientific knowledge, so newly emerged pathogens with little literature may be weakly represented (Leng et al., 10 Jul 2025). Third, generation is optimized mainly for antibacterial potency and does not explicitly optimize toxicity, off-target effects, metabolic stability, or synthetic accessibility (Leng et al., 10 Jul 2025). Fourth, there is no laboratory validation of generated molecules in the reported study (Leng et al., 10 Jul 2025).
The practical significance claimed for ApexOracle is that it reframes antimicrobial discovery as a pathogen-conditioned multimodal inference-and-generation problem. Its central methodological claim is that combining a strong molecular foundation model, dual pathogen embeddings from genome and literature-derived text, and a unified prediction-generation architecture enables meaningful zero-shot or low-data transfer to future pathogens (Leng et al., 10 Jul 2025). A plausible implication is that the system is intended less as a single-task predictor than as a computational front end for rapid response workflows in which a new pathogen can be sequenced, embedded, screened against existing molecules, and used to condition de novo molecular generation. The paper itself stops at computational evidence, but it presents ApexOracle as a framework for “designing antibiotics of the future for pathogens of the future” (Leng et al., 10 Jul 2025).