An AI model trained on large amounts of genetic data can predict whether bacteria will become antibiotic-resistant. The new study shows that antibiotic resistance is more easily transmitted between genetically similar bacteria and mainly occurs in wastewater treatment plants and inside the human body.
By understanding how resistance in bacteria arises, we can better combat its spread. This is crucial to protect public health and the healthcare system's ability to treat infections."
Erik Kristiansson, Professor at the Department of Mathematical Sciences at Chalmers University of Technology and the University of Gothenburg, Sweden
Antibiotic resistance is one of the biggest threats to global health, according to the World Health Organization (WHO). When bacteria become resistant, the effect of antibiotics disappears, which makes conditions such as pneumonia and blood poisoning difficult or impossible to treat. Increased antibiotic-resistant bacteria also make it more difficult to prevent infections associated with many medical procedures, such as organ transplantation and cancer treatment. A fundamental reason for the rapid spread of antibiotic resistance is bacteria's ability to exchange genes, including the genes that make the bacteria resistant.
"Bacteria that are harmful to humans have accumulated many resistance genes. Many of these genes originate from harmless bacteria that live in our bodies or the environment. Our research examines this complex evolutionary process to learn how these genes are transferred to pathogenic bacteria. This makes predicting how future bacteria develop resistance possible," says Erik Kristiansson.
Complex data from all over the world
In the new study, published in Nature Communications and conducted by researchers at the Chalmers University of Technology, the University of Gothenburg, and the Fraunhofer-Chalmers Centre, the researchers developed an AI model to analyse historical gene transfers between bacteria using information about the bacteria's DNA, structure, and habitat. The model was trained on the genomes of almost a million bacteria, an extensive dataset compiled by the international research community over many years.
"AI can be used to the best of its ability in complex contexts, with large amounts of data," says David Lund, doctoral student at the Department of Mathematical Sciences at Chalmers and the University of Gothenburg. "The unique thing about our study is, among other things, the very large amount of data used to train the model, which shows what a poweful tool AI and machine learning is for describing the complex, biological processes that make bacterial infections difficult to treat".
New conclusions about when antibiotic resistance arises
The study shows in which environments the resistance genes were transferred between different bacteria, and what it is that makes some bacteria more likely than others to swap genes with each other.
"We see that bacteria found in humans and water treatment plants have a higher probability of becoming resistant through gene transfer. These are environments where bacteria carrying resistance genes encounter each other, often in the presence of antibiotics," says David Lund.
Another important factor that increases the likelihood that resistance genes will "jump" from one bacterium to another is the genetic similarity of the bacteria. When a bacterium takes up a new gene, energy is required to store the DNA and produce the protein that the gene codes for, which means a cost for the bacterium.
"Most resistance genes are shared between bacteria with a similar genetic structure. We believe that this reduces the cost of taking up new genes. We are continuing the research to understand the mechanisms that control this process more precisely," says Erik Kristiansson.
Hoping for a model for diagnostics
The model's performance was tested by evaluating it against bacteria, where the researchers knew that the transfer of resistance genes had occurred, but where the AI model was not told in advance. This was used as a kind of exam, where only the researchers had the answers. In four cases out of five, the model could predict whether a transfer of resistance genes would occur. Erik Kristiansson says that future models will be able to be even more accurate, partly by refining the AI model itself and partly by training it on even larger data.
"AI and machine learning make it possible to efficiently analyse and interpret the enormous amounts of data available today. This means that we can really work data-driven to answer complex questions that we have been wrestling with for a long time, but also ask completely new questions", says Erik Kristiansson.
The researchers hope that in the future, the AI model can be used in systems to quickly identify whether a new resistance gene is at risk of being transferred to pathogenic bacteria, and translate this into practical measures.
"For example, AI models could be used to improve molecular diagnostics to find new forms of multi-resistant bacteria or for monitoring wastewater treatment plants and environments where antibiotics are present," says Erik Kristiansson.
Source:
Journal reference:
Lund, D., et al. (2025). Genetic compatibility and ecological connectivity drive the dissemination of antibiotic resistance genes. Nature Communications. doi.org/10.1038/s41467-025-57825-3.