Phylogeny-Regulated Self-Training for Genome-Based Resistance Prediction

Whole-genome sequences of bacterial pathogens are cheap and abundant, but the laboratory drug-susceptibility tests that turn a genome into a training label are not: they require culturing each isolate against each drug, which is exactly the kind of expert-intensive, bottlenecked annotation that limits clinical machine learning everywhere. Meanwhile, the predictions we want from those genomes are unreliable in a very specific way. Pathogens routinely carry known resistance genes that stay silent in the test tube — the colistin resistance gene mcr-9 can be completely dormant during standard susceptibility testing and only activate under drug pressure in the patient — while other strains survive lethal drug concentrations with no cataloged marker at all, as with a 27-nucleotide insertion in the rplV ribosomal gene that no standard molecular screen detects. This is genotype-phenotype discordance, and it is the failure mode that both rule-based catalogues and supervised neural predictors inherit from their training data.

The proposal here connects the two directions directly. I argue that the hundreds of thousands of unphenotyped genomes sitting in public archives are not just extra data — they are the medium in which discordance can be modeled, provided that semi-supervised learning is constrained by biology rather than run naively. The core mechanism is a transplant of an idea from medical imaging: Chen et al. showed that self-training on unlabeled images collapses from confirmation bias (the model reinforcing its own wrong guesses) unless pseudo-labels are projected onto an anatomical shape prior, with outliers beyond three standard deviations rejected. I propose the genomic analogue: pseudo-labels on unphenotyped bacterial genomes are accepted only when they are consistent with the isolate's phylogenetic neighborhood and its regulatory context, and discordant laboratory labels are treated as noisy observations rather than absolute truth.

Core Claim

The claim is specific: semi-supervised self-training on unlabeled pathogen genomes, regulated by phylogenetic and regulatory-context priors, will improve resistance prediction in exactly the regimes where current methods fail — second-line drugs with scarce phenotypic labels, and isolates whose resistance is invisible to curated marker catalogues — and unregulated self-training will make those regimes worse, not better. No existing work does this. GenTB trains supervised models on 20,408 labeled tuberculosis isolates and even analyzes its own disagreement cases, but never touches unphenotyped genomes. DeepAMR uses a denoising autoencoder, yet trains it end-to-end and fully supervised on isolates with complete susceptibility profiles; it does not pseudo-label anything. The DRIAMS work pretrains a masked autoencoder on mass spectra and shows strong cross-hospital transfer, but operates on proteomic spectra, not genomes, and involves no self-training loop. GenoARM selects minimal gene panels with reinforcement learning but is closed over a fixed vocabulary of roughly 200 cataloged resistance genes — structurally incapable of seeing an rplV-style insertion. My work uses the unlabeled genomes, keeps the feature space open to genome-wide variation, and adds the biological guardrails that none of these have.

Research Program

Three components, each concrete. First, a genome encoder pretrained by masked modeling: taking unitig or gene-token representations of all available isolates, labeled and unlabeled, and masking a fraction of tokens for reconstruction, following the pretraining logic that the DRIAMS study validated on spectra and that DeepAMR's autoencoder suggests for SNP profiles. Crucially, the vocabulary is genome-wide, not restricted to known resistance loci, because the discordant cases — the rplV duplication, the International Space Station isolates that survived antibiotics with no cataloged marker at all — live outside any curated panel.

Second, the regulated self-training loop, which is the proposal's key ingredient. After each round of supervised training on the labeled set, the model predicts pseudo-labels on unphenotyped genomes. A pseudo-label for an unlabeled isolate is accepted only when two guards pass:

$$\max_c P(c \mid g_u) > \tau \quad \text{and} \quad d\!\left(\phi(g_u),\; \mu_{c,\ell(u)}\right) < 3\,\sigma_{c,\ell(u)}$$

where $g_u$ is the unlabeled genome's feature vector, $P(c \mid g_u)$ the model's predicted resistance probability for drug $c$, $\tau$ a confidence threshold, $\phi(\cdot)$ the pretrained encoder's embedding, $\ell(u)$ the isolate's lineage inferred from the embedding itself (as DeepAMR's clustering layer does), and $\mu_{c,\ell(u)}$, $\sigma_{c,\ell(u)}$ the mean and spread of embeddings of labeled isolates in that lineage with phenotype $c$. The second condition is the direct genomic transplant of Chen et al.'s three-sigma shape rejection: a predicted "susceptible" for an isolate embedded among resistant relatives of the same lineage is rejected before it can enter training. A third, discrete guard handles regulatory context: when a canonical resistance marker is present but the labeled data shows that such markers are frequently silent without co-activators — as Hu et al. documented for NDM-1, which needs multi-component regulatory systems to function — the isolate is abstained from rather than pseudo-labeled. Abstention, not guessing, is the correct response to a silent mcr-9.

Third, noisy-label handling on the labeled side. GenTB's own discordance analysis found that prediction–phenotype disagreements often flag erroneous laboratory labels, and Tamblin et al. showed an entire assay (pyrazinamide at acidic pH) systematically skewing phenotypes. Rather than forcing hard binary cross-entropy against these labels, the model treats each laboratory label as a noisy observation of a latent true phenotype and down-weights isolates where the model's posterior strongly disagrees, following the spirit of Chen et al.'s replacement of hard targets with latent Gaussian variables. The clinical payoff is a ranked discordance report: isolates where the learned model and the laboratory label persistently disagree become the shortlist that experts actually re-test, converting the annotation bottleneck from "label everything" into "label the informative few."

Baselines

The naive reference point is the majority-class predictor — calling every isolate susceptible or resistant per the class base rate. This is not trivial in this domain: the Kover study explicitly notes that its sparse rule models were evaluated against this baseline, and for rare resistance on second-line drugs the base rate is a deceptively strong floor. Beating it on AUROC is necessary but not meaningful; the real targets are below.

The strongest existing method is DeepAMR, the multi-task denoising-autoencoder classifier, which reported a mean AUROC of 94.4% to 98.7% across isoniazid, ethambutol, rifampicin, pyrazinamide, MDR-TB, and pan-susceptibility on its 8,388-isolate multi-country cohort, with sensitivities of 94.3% for isoniazid, 91.5% for ethambutol, 87.3% for pyrazinamide, and 96.3% for MDR-TB. It is the strongest competitor because it is the best-performing published model on the best-phenotyped tuberculosis cohort and already uses unsupervised representation structure. To make the comparison fair, I will re-run DeepAMR's architecture on exactly the same isolates, the same SNP feature construction, the same train/test splits, and the same hyperparameter tuning budget (nested cross-validation over an equal search space and GPU-hours). Beating DeepAMR on its own turf at full label availability is not the claim; the claim is the label-scarce regime, so the decisive comparison is at 5%, 10%, and 20% of phenotypic labels retained, with the remaining isolates' labels deleted and used only as unlabeled genomes. Success means higher per-drug sensitivity and AUROC than supervised DeepAMR at every subsampling level, with the gap widening as labels shrink.

The second supervised competitor is GenTB-RF, the random forest from the GenTB study, which reported 77.6% mean sensitivity and 96.1% specificity across nine shared drugs on its 20,408-isolate cohort and rifampicin AUC of 0.96. The catalogue-based reference is Mykrobe, which on its Global set reported 100% sensitivity and 99% specificity for rifampicin but only 82% sensitivity for pyrazinamide — and, critically, only 25% pyrazinamide sensitivity before its catalogue was manually extended, a number that quantifies exactly the uncataloged-variant blindness this proposal attacks.

The most important baseline is the ablation that isolates the key ingredient: the identical self-training loop, same pretraining, same compute, same tuning, with the phylogenetic and regulatory guards removed — plain confidence-thresholded pseudo-labeling. If regulated self-training does not beat unregulated self-training, the proposal's central mechanism is wrong and the result will be reported as such.

Why not just…?

Why not just use curated mutation catalogues? Because catalogues are precisely the technology whose failure mode this proposal targets. Mykrobe's pyrazinamide sensitivity of 25% on the Global set before manual pncA extension shows what happens to a catalogue facing uncataloged variation; the rplV insertion documented by Han et al. was invisible to every standard molecular assay because it was structural and outside the enzymatic marker databases; and on the GenTB head-to-head, the catalogues TB-Profiler and Mykrobe achieved mean sensitivities of 74.4% and 71.9% against the random forest's 77.6%. Catalogues remain excellent for canonical first-line resistance — Mykrobe's 100% rifampicin sensitivity — and I will report them as the interpretability reference, but the discordant isolates are by definition the ones catalogues cannot call. My method's output should disagree with catalogues exactly on isolates like these; that disagreement rate, cross-checked against DeepAMR's finding that such disagreements flag both novel variants and erroneous labels, is itself a planned measurement.

Why not just train a supervised random forest or multi-task network on the labeled data? This is a real threat, and I will not argue around it: at full label availability, supervised methods may well match the proposed method, and the experiment at 100% labels is included precisely to check that. The argument is about the slope of the performance-versus-labels curve. Supervised models cannot ingest unphenotyped genomes at all, and the scarcity of second-line drug phenotypes — which GenTB itself flags with wide confidence intervals and poor sensitivity — is where the unlabeled pool should pay for itself. The subsampling experiment answers this directly: if the regulated method's advantage over supervised DeepAMR and GenTB-RF does not grow as labels shrink from 100% to 5%, the hypothesis is falsified.

Why not just pretrain an autoencoder and fine-tune, skipping the self-training loop? The DRIAMS study shows this works well for distribution shift — its masked autoencoder improved cross-hospital AUPRC by 9% on average, and cut the baseline's 36% hospital-transfer drop to 29% — and DeepAMR already embeds a denoising autoencoder in a supervised pipeline. So pretrain-then-finetune is a serious alternative and will be run as a fourth arm with identical pretraining. The evidence against it being sufficient comes from the imaging side of the annotation-bottleneck literature: Chen et al. found that standard semi-supervised algorithms like Fixmatch degrade substantially without an explicit domain prior, and that adding the shape regulator produced a 16.7% improvement over a purely supervised baseline in the 20-labeled-sample regime. Representation learning alone does not stop a pretrained encoder from confidently pseudo-labeling — or, in the pretrain-only setting, from silently misclassifying — a dormant resistance gene, because nothing in reconstruction loss distinguishes expressed from unexpressed copies of a sequence. The regulator ablation is designed to settle whether the guardrails, not the pretraining, carry the gain.

Why not just fund more laboratory susceptibility testing instead of building models? Because the cost structure is the problem being solved: each isolate-drug pair requires culture-based testing, the second-line and novel-compound panels are the least-tested precisely where prediction is hardest, and the GenTB and DRIAMS datasets — 20,408 and 631,000 phenotype calls respectively — represent years of routine clinical labor. The model does not replace the laboratory; it produces the discordance shortlist that makes expert re-annotation targeted, which is the practical answer to the bottleneck framing of Vecile et al.

Proposed Experiments

Three experiments, all on benchmarks in the literature. The first uses the DeepAMR cohort of 8,388 tuberculosis isolates with whole-genome SNP profiles and susceptibility labels for four first-line drugs, plus MDR and pan-susceptibility. Labels are subsampled to 5%, 10%, 20%, 50%, and 100%; the deleted-label isolates join the unlabeled pool. Metrics are per-drug AUROC and sensitivity, evaluated against supervised DeepAMR (reported: 94.4%–98.7% AUROC; isoniazid sensitivity 94.3%, pyrazinamide 87.3%), the pretrain-only arm, unregulated self-training, and the regulated method. A pre-registered secondary endpoint is the DeepAMR evaluation subset excluding known resistance-conferring SNPs, where DeepAMR showed its latent space still captures resistance — the regulated loop must beat supervised DeepAMR there, since that subset is the computational analogue of novel-mechanism discordance.

The second experiment uses the GenTB 20,408-isolate cohort for the discordance-report measurement. Here the endpoint is not raw accuracy but the value of the model's disagreement shortlist: of the isolates the model flags as label-susceptible-but-predicted-resistant (or the reverse), what fraction carry markers outside the 18 known loci, and what would expert re-testing of the top decile recover? GenTB's own discordance analysis supplies the precedent that such flags are informative; the contribution here is ranking them by a calibrated posterior rather than a hard disagreement.

The third experiment targets the silent-gene guard directly, using the five-pathogen NCBI Pathogen Detection benchmark (the E. coli, K. pneumoniae, Salmonella, S. aureus, and Acinetobacter isolates behind GenoARM's work, where 93.77% accuracy was reported from five genes plus metadata on E. coli). A held-out set of labeled isolates is masked as unlabeled, and the pseudo-label error rate is measured with and without each guard, with special attention to false-susceptible pseudo-labels on isolates carrying marker genes in "silent" co-factor configurations — the synthetic stand-in for mcr-9, constructed from the labeled data's marker-plus-co-activator statistics informed by the regulatory requirement documented by Hu et al. The phylogenetic guard is expected to cut lineage-inconsistent pseudo-labels; the regulatory guard is expected to cut the false-susceptibles that naive self-training generates. If the guards do not reduce pseudo-label error relative to unregulated self-training in this masked-truth setting, the mechanism fails even before downstream accuracy is considered, and the proposal's honest conclusion would be that generic semi-supervised learning suffices — a result worth publishing either way, given the confirmation-bias risk the imaging literature predicts.

The decisive check across all three: regulated self-training must beat unregulated self-training, not just supervised baselines, because the guardrails are the only thing separating this proposal from an application of Fixmatch to genomes. If they don't, the biology is decoration, and I would rather learn that from the masked-truth experiment than from a reviewer.