---
title: 'ApexOracle: AI for Pathogen-Specific Antibiotic Discovery'
url: https://www.emergentmind.com/topics/apexoracle
type: topic
---

# ApexOracle: AI for Pathogen-Specific Antibiotic Discovery

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 [2507.07862].

## 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 [2507.07862].

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 [2507.07862]. 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 [2507.07862].

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 [2507.07862].

## 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 Language Model (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** [2507.07862].

The molecular backbone is a discrete diffusion language model 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** [2507.07862]. 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 [2507.07862]. 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** [2507.07862].

The diffusion process is specified in the paper. The forward corruption process is
$$
q(\mathbf{x}_t | \mathbf{x}_0) = \text{Cat}(\mathbf{x}_t; \alpha_t \mathbf{x}_0 + (1 - \alpha_t) \mathbf{m}),
$$
and the reverse process uses a neural denoiser $\text{NN}_\theta(\mathbf{x}_t,t)$ in place of the unknown clean token [2507.07862]. The training objective is
$$
\begin{align}
\mathcal{L}_{\text{DLM}} &= -\mathbb{E}_{t \sim \mathcal{U}(0,1],\, q(\mathbf{x}_t^{1:L} \mid \mathbf{x}_0^{1:L})} \notag \\
&\quad \left[ \frac{1}{t} \sum_{l=1}^{L} \log \left\langle \text{NN}_\theta^l (\mathbf{x}_t^{1:L}, t),\, \mathbf{x}_0^l \right\rangle \right].
\end{align}
$$
To improve representation learning, the DLM is also trained with a **multi-target regression** objective on **209 RDKit descriptors**, yielding the total loss
$$
\mathcal{L}_{\text{ApexOracle-DLM}}=\mathcal{L}_{\text{DLM}}+\lambda\cdot\mathcal{L}_{\text{MTR}},
$$
with $\lambda = 0.1$ [2507.07862].

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
$$
\mathbf{e}_i \;=\; \frac{1}{L_i}\sum_{t=1}^{L_i} \mathbf{h}_{i,t}^{(46)},
$$
and the full genome embedding is
$$
\mathbf{E} = [\mathbf{e}_1,\, \mathbf{e}_2,\, \dots,\, \mathbf{e}_M] \;\in\; \mathbb{R}^{M\times d_g}.
$$
The paper also notes a practical scaling adjustment: Evo2 embeddings had magnitudes around $10^{-15}$ and were uniformly scaled by **$10^{14}$** [2507.07862].

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:
$$
\mathbf{T} = [\mathbf{t}_1^{(p)},\, \mathbf{t}_2^{(p)},\, \dots,\, \mathbf{t}_N^{(p)}] \;\in\; \mathbb{R}^{N\times d_t}.
$$
To reduce overfitting to strain identifiers, the strain name is replaced with **“this strain”** before embedding [2507.07862].

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 [2507.07862].

## 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** [2507.07862]. 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** [2507.07862].

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** [2507.07862]. MIC values originally reported in $\mu g/mL$ are converted to $\mu mol$, then transformed as
$$
-\log_{10}\left(\frac{\text{MIC}}{10}\right),
$$
with special operators handled by heuristic rules: \(>, \ge, >=\) are doubled, \(\gg\) is tripled, ranges are averaged, and \(\pm\) uses the central value [2507.07862].

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 [2507.07862]. 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** [2507.07862].

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 [2507.07862].

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 [2507.07862]. 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 [2507.07862].

DLM training proceeds in two stages: **1 epoch** optimizing only $\mathcal{L}_{\text{DLM}}$, then **2 epochs** with $\mathcal{L}_{\text{MTR}}$ added. Training uses AdamW on **8 NVIDIA A100 80GB GPUs**, with learning rate **$3 \times 10^{-4}$** initially, warmup over the first **2,500 steps**, then **$10^{-4}$**, batch size **768** in the first stage and **480** in the second [2507.07862]. Reported validation performance after training is **perplexity 1.58** and **NLL 0.46** [2507.07862].

## 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** [2507.07862]. The reported metrics include \(R^2\), Pearson correlation, Spearman correlation, AUROC, and AUPRC [2507.07862].

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 \(R^2\)** [2507.07862].

For strain-aware MIC prediction on unseen strains under the **strain-wise evaluation**, the ensemble of **7 models** achieves average **\(R^2 = 0.5793\)**, while a single model achieves average **\(R^2 = 0.5032\)**. Within this setting, the DLM molecular encoder achieves **13.5% higher \(R^2\)** than the next-best molecular encoder without ensembling [2507.07862]. Under broader transfer, the **3 species-wise** setting gives ensemble average **\(R^2 = 0.3744\)**, and the **11 species-wise** setting gives average **\(R^2 = 0.4337\)** excluding cluster 9, identified as **Mycoplasmatota**, which the paper highlights as biologically atypical because of absent peptidoglycan cell walls and unusual membrane composition [2507.07862].

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** [2507.07862]. 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 [2507.07862].

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** [2507.07862].

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 [2507.07862].

## 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 [2507.07862].

For a single target property \(y\), the guidance is defined as
$$
p_{\theta}(\mathbf{x}_{t-1}^{1:L} | \mathbf{x}_{t}^{1:L}, t, y) \propto p(y | \mathbf{x}_{t-1}^{1:L}, \mathbf{x}_{t}^{1:L}, t) \, p_{\theta}(\mathbf{x}_{t-1}^{1:L} |\mathbf{x}_{t}^{1:L}, t).
$$
For multiple properties \(y_1, y_2\) with guidance strengths \(\gamma_1,\gamma_2\), the paper gives the multiplicatively reweighted token-level form in Eq. (7) [2507.07862]. 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 [2507.07862].

To avoid irreversible token errors, ApexOracle uses **remasking**. The transition is modified as
$$
\begin{split}
&p_{\theta}\bigl(\mathbf{x}_{t-1} \mid \mathbf{x}_t, t\bigr) = \\
&\begin{cases}
\mathrm{Cat}\bigl(\mathbf{x}_{t-1};\, (1-r_t)\mathbf{x}_t+r_t\mathbf{m}\bigr), & \mathbf{x}_t \neq \mathbf{m} \\
\mathrm{Cat}\!\Bigl(\mathbf{x}_{t-1};\, \frac{\beta_1\,\mathbf{m} + \beta_2\,\text{NN}_{\theta}(\mathbf{x}_t, t)}{1 - a_t}\Bigr), & \mathbf{x}_t = \mathbf{m},
\end{cases}
\end{split}
$$
with \(\beta_1 = (1 - \alpha_{t-1}-r_t\alpha_t)\) and \(\beta_2 = (\alpha_{t-1} - (1-r_t)\alpha_t)\) [2507.07862].

The generation experiments use **256 generation steps**, target MIC set to **1**, \(\sigma\) annealed linearly from **0.5 to 0.2**, and remasking active between **\(t_{on} = 0.55\)** and **\(t_{off} = 0.45\)** [2507.07862]. 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 [2507.07862]. Guidance strengths are reported as \(\gamma_1=15, \gamma_2=0\) in phases 1 and 3, and \(\gamma_1=0, \gamma_2=15\) in phase 2 [2507.07862].

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 [2507.07862]. 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 [2507.07862]. 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 [2507.07862].

## 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 [2507.07862]. 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** [2507.07862].

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 [2507.07862]. Second, the text modality depends on existing scientific knowledge, so newly emerged pathogens with little literature may be weakly represented [2507.07862]. Third, generation is optimized mainly for **antibacterial potency** and does not explicitly optimize toxicity, off-target effects, metabolic stability, or synthetic accessibility [2507.07862]. Fourth, there is **no laboratory validation** of generated molecules in the reported study [2507.07862].

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 [2507.07862]. 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” [2507.07862].

Source: https://www.emergentmind.com/topics/apexoracle