Can machine learning predict antimicrobial resistance?
Table of Contents
Publication details
Article: Machine learning methods in predicting antimicrobial resistance
Authors: Mikhail Yu. Kuzmenkov, Alina G. Vinogradova, Alexey Yu. Kuzmenkov
Journal: Clinical Microbiology and Antimicrobial Chemotherapy, 2026, Vol. 28, No. 1, pp. 81–91
DOI: 10.36488/cmac.2026.1.81-91
Article type: Review
Download
Can bacterial resistance to an antimicrobial be inferred computationally rather than measured experimentally?
Advances in machine learning have made this an active field of research. Current models use patient characteristics, laboratory results, individual genetic features, and complete bacterial genome sequences. The methods range from relatively simple statistical algorithms to deep neural networks and transformer architectures.
The journal Clinical Microbiology and Antimicrobial Chemotherapy has published a review entitled Machine learning methods in predicting antimicrobial resistance, summarizing the current state of the field.
The central question is no longer whether machine learning can detect patterns associated with antimicrobial resistance, but rather:
How reliably can those patterns predict the resistance phenotype of new clinical isolates?
What can a model predict?
The general term “antimicrobial resistance prediction” covers several distinct tasks. A model may estimate:
- the probability that an organism is resistant to a particular agent;
- a susceptible or resistant category;
- the probability that a specific resistance mechanism is present;
- the antimicrobial class associated with a detected gene;
- the minimum inhibitory concentration (MIC).
Predicting a susceptibility category is a classification task. MIC prediction is a more complex regression task because the output is quantitative. A reliable quantitative prediction could potentially bring genomic analysis closer to conventional phenotypic testing.
Clinical data predict risk, not the bacterial genome
One approach uses patient-level information such as age, previous antimicrobial exposure, length of hospitalization, intensive care admission, infection site, and comorbidities.
These models can identify patients at increased risk of infection with a resistant organism. However, patient characteristics are only indirectly associated with resistance. They describe conditions in which particular resistant organisms are more likely to occur, but they do not directly characterize the resistance mechanism of an individual isolate.
A model that performs well in one hospital or patient population may therefore transfer poorly to another setting. Genomic data are potentially more informative when the objective is to predict the properties of the microorganism itself.
From known genes to whole-genome patterns
Traditional genomic AMR analysis largely searches for known resistance genes and mutations. This works well when the mechanism is known, its genetic determinant has been described, and the determinant is reliably associated with the phenotype.
Resistance, however, is not always determined by a single gene. Phenotype may depend on combinations of mutations, regulatory changes, gene copy number, efflux activity, altered permeability, and the broader genetic context.
This is where machine learning may add value. Instead of applying a predefined rule such as
“gene X detected → resistance to agent Y expected,”
a model can search for more complex combinations of features in large paired genomic and phenotypic datasets.
Relatively simple models can perform well
One study discussed in the review compared logistic regression, support vector machines, random forests, and a convolutional neural network for predicting resistance in Escherichia coli.
After converting genomes into genetic features, the models predicted resistance to ciprofloxacin, cefotaxime, ceftazidime, and gentamicin. The random forest achieved an AUC of 0.96 for ciprofloxacin.
This result also illustrates a major limitation: the model did not operate directly on an entirely unprocessed genome. Genetic information was extracted, transformed, and selected before training. Performance therefore depends not only on the algorithm, but also on how the genome is represented and which features are retained.
Neural networks can model interactions
Convolutional neural networks can identify local patterns within nucleotide sequences and account for the relative positions of changes within genes.
Multitask architectures provide another option: one model predicts resistance to several agents simultaneously. In studies of Mycobacterium tuberculosis, this design made it possible to learn shared genetic patterns associated with resistance to multiple drugs, reflecting the fact that resistance mechanisms do not always occur independently.
From sequences to genetic graphs
A genome can also be represented as a graph. Genes become nodes, while known functional relationships between them become edges.
The review describes research combining convolutional and graph neural networks to predict MICs for Mycobacterium tuberculosis and Pseudomonas aeruginosa. The model incorporated both gene sequences and known protein–protein interactions.
The reported coefficient of determination for MIC prediction was R² = 0.66, with a correlation of 0.87 between predicted and measured MIC values. This represents a shift from binary susceptible/resistant classification toward quantitative reconstruction of phenotype.
Can a genome be read like text?
Transformers were originally developed for natural-language processing. The analogy with genomics is intuitive: both text and DNA are sequences in which the significance of an element depends on context.
DNABERT-family models divide DNA sequences into short fragments that function like words in a genetic language. Rather than predicting resistance directly, the model can first construct a numerical representation of a sequence. That representation can then be used by another model for a downstream task such as AMR prediction.
At the time covered by the review, substantial studies directly applying DNABERT and DNABERT-2 to bacterial antimicrobial resistance prediction were still lacking.
What about large language models?
Generative language models have also been tested. Their limitations highlight the difference between a general-purpose language model and a specialized bioinformatics method.
Simply providing a DNA sequence to a general model and asking for an AMR class produces unsatisfactory results. Performance improves after adding information from specialist databases or further model training.
This raises a practical question: if prediction first requires matching the sequence to a known gene in a database, a conventional specialist search may be simpler and more reproducible. Generative models become valuable only when they reveal patterns that cannot be reduced to retrieving a known resistance determinant.
Learning the language of an entire genome
Models in the Evo family take a more fundamental approach. They are trained on very large collections of genomic sequences to learn general principles of genome organization.
Such models can evaluate mutation effects, expression-related features, and functional properties of sequences. Their internal genome representations may later support other analytical tasks.
Direct AMR prediction with these models remains a research direction, but the underlying idea is important: an algorithm may eventually capture genetic context beyond a manually defined list of known resistance genes.
High accuracy does not guarantee generalizability
One of the central challenges in machine learning is generalization.
A model may perform very well on data similar to its training set and then encounter a new dataset from another region or hospital, with a different circulating clone structure, an emerging resistance mechanism, a previously rare mutation, or a different data-generation process.
Its performance may change substantially. This problem is particularly important in bacteria because their genomes are highly variable and resistance mechanisms continue to evolve.
High performance on one test set is not equivalent to a universal capacity to predict antimicrobial resistance.
The neural network is not the hardest part
Further progress may depend less on creating increasingly complex architectures and more on improving genomic data collection and preprocessing.
Many models achieve strong results only after preselecting known resistance genes, known mutations, highly variable regions, or genes already associated with the phenotype of interest.
This creates a paradox: machine learning is intended to discover new patterns, but high accuracy is often achieved by constraining the model to mechanisms that are already known.
The next generation of methods needs to account for:
known mechanisms + new variants + combinations of changes + genetic context.
The ability to identify previously unknown genotype–phenotype associations may become one of the most important advantages of machine learning.
Training requires phenotype
To teach a model to predict resistance from a genome, every training genome must be linked to a measured phenotype. The training data therefore consist of pairs such as:
genome → antimicrobial susceptibility result
or preferably:
genome → quantitative MIC value
Genomic prediction does not reduce the importance of high-quality phenotypic testing. Phenotype is the reference against which new algorithms are trained and validated.
This conclusion aligns with the current EUCAST position: genomic prediction is developing rapidly, but for most organism–agent combinations it is not yet a universal replacement for phenotypic AST. See our related article, From genotype to phenotype: EUCAST on predicting antimicrobial susceptibility from WGS.
Why linked genotype and phenotype data matter
Building and validating predictive models requires more than a separate genome collection and a separate set of AST results. These data must be connected at the level of an individual isolate.
Linked datasets make it possible to investigate:
- which genetic markers are actually accompanied by phenotypic resistance;
- how MIC changes in the presence of a particular mutation;
- which combinations of mechanisms have the greatest phenotypic effect;
- why the same marker may be associated with different AST results;
- which resistant phenotypes remain unexplained by known mechanisms;
- whether a pattern learned in one population is reproduced in another.
Such datasets provide the basis for models that account for the local structure of antimicrobial resistance.
Genotype and phenotype in ABioGram
ABioGram enables genetic antimicrobial resistance markers to be analyzed together with phenotypic susceptibility results. This does not mean replacing phenotypic testing with an artificial-intelligence prediction.
Joint analysis examines whether a detected genetic mechanism corresponds to its observed phenotypic expression. At the isolate level, the linked sequence is:
organism → genetic marker → antimicrobial agent → phenotypic result
This structure can identify situations in which:
- a genetic marker is present but phenotypic resistance is absent;
- phenotypic resistance is detected but no known marker is found;
- several mechanisms occur simultaneously;
- the same marker is associated with different levels of susceptibility;
- genotype–phenotype relationships change over time or between healthcare organizations.
These data have analytical value in their own right. Their accumulation also creates a foundation for developing and externally validating machine-learning models on real local data.
Conclusion
Machine learning can already detect complex associations between bacterial genomes and antimicrobial resistance. For specific research tasks, models have achieved strong performance, and some approaches predict not only resistance categories but quantitative MIC values.
The main limitation today is not a lack of sufficiently complex neural networks. The decisive questions are what data the model receives, how genomic features are represented, and whether a learned association remains valid in new clinical isolates.
The next stage of AMR prediction will therefore likely combine three components:
high-quality phenotype + genomic data + methods capable of modeling genetic context.
With such data, machine learning may progress from reproducing known resistance mechanisms to identifying new and clinically meaningful genotype–phenotype relationships.
Source
Kuzmenkov MYu, Vinogradova AG, Kuzmenkov AYu.
Machine learning methods in predicting antimicrobial resistance.
Clinical Microbiology and Antimicrobial Chemotherapy. 2026;28(1):81–91.
DOI: 10.36488/cmac.2026.1.81-91
