Inside the body of a very sick 55-year-old woman at UC San Francisco, bacteria was winning the evolutionary arms race.
At first, a routine antibiotic seemed to subdue her blood infection, acquired during cancer treatment.
But then her fever soared. Tests showed the pathogen, one of the many species of increasingly antibiotic-resistant bacteria, had rebelled. As doctors attempted to save her life, the bacteria quickly amassed a constellation of genetic mutations that helped it outsmart the drug — and then, over time, others.
Evolution typically occurs slowly. But UCSF doctors were witnessing evolution over the course of days, in one person, as each treatment failed.
In a last-ditch effort, they reached for a powerful fourth medicine to save her life.
The bacteria finally succumbed. After more than two months of care, the patient, who is unidentified to protect her privacy, survived.
This year, an estimated 1 million people may not be so lucky. Our bodies are turning into incubators for the world’s next supercharged bacteria, which can resist treatment and spread through the population, experts warn.
Old antibiotics are losing their effectiveness — and new ones aren’t being discovered fast enough.
Researchers are enlisting computers to catch up. A revolution in machine learning — the branch of artificial intelligence that learns by looking at data patterns and examples — promises to transform drug development.
“It's absolutely critical to identify additional antibiotics that can combat this issue,” said UCSF physician-scientist Dr. Chaz Langelier, who helped investigate the patient’s illness. Resistance, he said, “is something that scares me.”
By the middle of the century, drug-resistant bacteria will be associated with 8.22 million deaths, rivaling those killed by cancer in 2022, according to an in-depth global analysis of antimicrobial resistance published in the journal Lancet. In the U.S., more than 35,000 people already die of resistant bacteria every year — and new research recently revealed that the incidence of bacteria that carry a dangerous drug-resistance gene has jumped nearly 70% since 2019.
The traditional approach to drug discovery — digging through dirt and water samples, like prospectors — is no longer working, experts say.
Enlisting high-performance computers, researchers sift through chemical libraries with a vast universe of promising molecular structures that could become the ingredients of future drugs. The machines detect anything that holds promise, saying: “That’s an antibiotic.”
Building on that progress, scientists use generative AI to expand their search, creating molecules that don’t exist or have never been discovered. Using millions of molecular building blocks and chemical reactions, algorithms digitally design brand-new structures that can fight antibiotic-resistant bacteria. Then the recipes are shipped to chemical companies that, Lego-like, build the medicines.
The whole process takes just a fraction of the time a laboratory would need to perform the same task.


“For the last 60 years, we’ve discovered few structurally novel antibiotics,” said James Zou, a soft-spoken and bespectacled biomedical data scientist at Stanford, whose team has created chemical structures and recipes for several novel compounds aimed at killing drug-resistant pathogens.
Now, he said, “We want to use AI to design entirely new molecules that have never been seen in nature.”
Digging deeper
Biology is, in essence, just code. AI’s algorithms can sort through vast amounts of code and identify, or build, anything that might act like an antibiotic.
“People are scared about AI,” said César de la Fuente, whose AI model at the University of Pennsylvania designed 50,000 protein fragments that kill bacteria. “But this is using AI for good.”
To be sure, the process is complicated and takes coaxing. And any new compound will still have to undergo human clinical trials, which are notoriously slow and frustrating. But AI could help accelerate the long haul of drug development, boosting efficiency and success rates.
Penicillin, discovered in a soil fungus in 1928, is widely recognized as one of the greatest advances in therapeutic medicine. Before penicillin and other antibiotics, an infection caused by a simple cut or cough, or even childbirth, could turn deadly.
Dirt was the logical place to look for more. For millions of years, soil microbes have competed in the natural world, fighting for space and food. To kill off their neighbors, they produce antibiotics.
Using shovels and buckets, scientists discovered additional antibiotics quickly and easily.
“We got really good at digging up piles of dirt, finding the microbes that made antibiotics and then purifying them,” said Jon Stokes, of McMaster University in Hamilton, Ontario, who is partnering with Stanford and the Massachusetts Institute of Technology (MIT) for research in AI drug discovery.
But by the mid-1960s, scientists ran out of easily culturable microbes. In the 1970s, discoveries shrank to a mere trickle. The last entirely new class of antibiotics was discovered in 1987. Of the 27 compounds now being developed and tested against the world’s most dangerous pathogens, most are derivatives of existing antibiotics, according to a World Health Organization report.
“Bacteria are continuously evolving,” said Kyle Swanson, a 29-year-old Stanford computer scientist who works with Zou to discover new antibiotics. Using computers, “We can continuously play this game where we’re trying to keep up.”
‘They had a priest come into my room’
Antibiotic-resistant bacteria were once primarily found in health care facilities, where they could proliferate among those with weakened immune systems. But beginning in the 1990s, they started to appear more widely.
At age 25, Tatiana Chiprez Vargas was in excellent health. A former college soccer player and newlywed, she had just returned to Stockton after a honeymoon in Honolulu in June 2014.

On a sunny afternoon, she began to feel flu-like symptoms at her new job in a child care program and went home. By 5 a.m. she was vomiting and felt so weak she needed to hold on to the walls to walk to her car. Doctors suspected strep throat, and she was sent home with routine antibiotics.
Several hours later, her fever soared so high that she was rushed back to the hospital. She was prescribed a different round of antibiotics, designed to kill a broad spectrum of common germs.
But her symptoms only worsened. She coughed up blood. She struggled to breathe. Her thoughts grew foggy. “They had a priest come into my room,” she recalls. “That’s how intense it was.”
The infection refused to subside. After days in the intensive care unit, a laboratory culture identified the organism that had infected her lungs, causing pneumonia: MRSA, or methicillin-resistant Staphylococcus aureus, a bacterium so hardy that few drugs can kill it.


There was a brief window of time when methicillin, introduced in 1959 to kill bacteria resistant to penicillin, would have quickly cured Vargas. But in merely two years, the bacteria learned how to dodge it. Resistance emerged in the United Kingdom in 1961; by 1968, it landed in the U.S., with an alarming outbreak reported in 18 patients at a Boston hospital. MRSA is now a problem in hospitals worldwide — and is an increasingly common cause of community-acquired bacterial infection, often affecting healthy adults with no apparent risk factors for infection.
Vargas was fortunate: Doctors found an antibiotic that worked. She defied mortality odds that can soar as high as 40%.
But the impact of her illness lingers. Pneumonia has returned twice, requiring repeat weeklong hospitalizations. A delayed cure and recurrent infections may have damaged her lungs, she said. In treatment, time is of the essence: If antibiotics are quickly effective, patients have a better chance of regaining full health.
This summer, 11 years after her initial illness, she again coughed up blood. Doctors found a nodule in her lung, likely caused by inflammation or scarring. She has a persistent cough.
“I don't know if I’m ever going to be recovered,” said Vargas, now a full-time social worker and mother of two. “I’ve learned to live with it.”
Hundreds of potential drugs by lunchtime
Many potential drugs are hiding somewhere in the world’s giant theoretical library of chemical compounds, estimated to number at 10 to the 60th power. That’s a 1 with 60 zeros behind it — more than the number of atoms in the solar system.
Scientists at Stanford, McMaster, MIT and the University of Pennsylvania are enlisting AI to explore this vast chemical landscape, then concoct something new. Biotech companies, like the South San Francisco-based Genentech, are also exploring this approach.
At Stanford, the search starts in the David Packard Electrical Engineering Building, in austere rooms with laptops and whiteboards covered with swirling clusters of sketched symbols.
There are no test tubes. No petri dishes. No mice. There are only computers, set loose on data.
Just as AI creates content by feeding on enormous troves of text, images and videos, it can also be trained to find or create medicines when fed data from a vast chemical library of thousands of molecular structures.
Scientists translate this complexity — the three-dimensional atoms and chemical bonds of many molecular structures — into a structured format of numbers and symbols that the computer’s algorithms can understand. Then they train an AI model by showing it antibiotic structures.
The trained AI trawls the library for anything with bacteria-killing properties. As it learns, it makes predictions. With experience, its predictions grow more accurate.
“Machine learning can look at existing antibiotics to understand patterns and the way that those molecules work,” said Stanford’s Swanson. “Then we can try to apply some of those similar patterns to design a new drug with even more efficacy.”
“It’s a balancing act,” he added. “We want them to be similar enough to still have an antibacterial effect — but also sufficiently different that they work in a new way, and can overcome resistance.”
This approach can sort through vast quantities of potential medicines in a matter of days.
While AI provides the computational power, robots are automating tedious lab work, dispensing chemicals and bacterial cells into microplates in just seconds, Stokes said. This collaboration increases efficiency, speed and precision.
If humans tested thousands of molecules for antibacterial activity, it would take years, Stokes said.
“It’s incredible,” said the University of Pennsylvania’s de la Fuente. “In my lab, in just a few hours, we can discover hundreds of thousands of new potential drug candidates, digitally. By lunchtime on any given day, I know that we’ll have a lot more molecules to play around with — and then by dinnertime, a lot more.”
At MIT, a related strategy is also yielding several drug candidates. One, named Halicin — in honor of HAL, the supercomputer in the film “2001: A Space Odyssey” — is promising enough to advance.
“Looking at the structure of a compound — bond by bond, substructure by substructure — it (AI) can make a calculation of the probability that it could be antibacterial,” said James Collins, who leads MIT’s Antibiotics-AI Project.
Building on this work, Collins and his colleagues have synthesized several compounds that combat hard-to-treat infections of gonorrhea and MRSA. These techniques are also being harnessed to fight diseases, like cancer, lupus and arthritis.
Global scale
Internationally, antibiotic resistance is growing into an even larger slow-motion emergency.
India, parts of Latin America, sub-Saharan Africa and South Asia are global strongholds for superbugs.
In India, a newly emerging strain of dangerous tuberculosis — XDR, or extensively drug-resistant, TB — shows how quickly microbes can learn to dodge treatment. First identified there in 2006, the disease has already spread to over 100 countries. Caused by bacteria called Mycobacterium tuberculosis, it is transmitted through the air by coughing, sneezing and talking.
Tragic social conditions can foster antibiotic resistance. Infections can fester and spread where the urban poor gather in single rooms or live along railway platforms or roads without sanitation or reliable meals.
But in a world of rapidly mutating bacteria, anyone is vulnerable.
Smart and fiercely devoted to academic success, Bhakti Chavan, of Mumbai, had just completed her master’s degree in biotechnology when she felt swelling on the right side of her neck.
Her family doctor prescribed a course of three routine “first-line” antibiotics, the most common and least expensive approach to TB therapy.
Chavan’s first-line antibiotic treatment: Rifampicin, isoniazid and pyrazinamide.
The swelling persisted, so her family sought a second opinion. Genetic analysis of a lymph node biopsy revealed that she had drug-resistant tuberculosis, also known as DR-TB. So her care was escalated to a five-drug regimen of “second-line” antibiotics that are more potent, more expensive and more toxic.
Chavan’s second-line antibiotic treatment: Kanamycin (injectable), ethionamide, moxifloxacin, linezolid and Akurit 3 (a combination of rifampicin, isoniazid and ethambutol).
Subsequent testing delivered even worse news. Bhakti had extensively drug-resistant TB, or XDR-TB. Alarmed, doctors referred her to a clinic run by the international nonprofit Doctors Without Borders, which was the only site at the time that could prescribe novel “third-line” antibiotics, a last resort.
Chavan’s third-line antibiotic treatment: Capreomycin (injectable), ethionamide, moxifloxacin, linezolid, bedaquiline, delamanid, clofazimine and cycloserine.
She was cured by an extraordinarily difficult two-year treatment regimen involving eight different drugs. Most of the medications were tablets or capsules, taken every day. One required a daily visit to a health center for a painful injection, which disrupted any hope of a normal life.
The long ordeal — involving a total of 16 drugs — was shadowed by anxiety, she recalled. “I was always worried. What if the medicines stopped working and I was left with no options?”
“If drug-resistant strains can affect me, they can affect anyone, because these pathogens are already circulating in the environment,” she said.

Even some of these last-resort drugs are losing effectiveness, increasing the risk of infections that cannot be treated. The International Organization for Economic Cooperation and Development projects a twofold surge in resistance to last-resort antibiotics by 2035, compared to 2005 levels.
The powerful drugs caused severe side effects, ranging from weakness and blurred vision to depression. Her vomiting was so violent that she became dehydrated, needing hospitalization. One drug had to be abandoned.
Her skin, once a warm golden brown, turned reddish. Her hair thinned. She didn’t see friends and felt isolated. “I stopped looking into the mirror,” she said.
After a year, she began feeling better. Now 29, her hair is once again thick and glossy. She is happy with a rewarding job and successful marriage. But the normal skin tone on her hands has not returned. There is still some tingling and numbness in her legs.
In an effort to contain the threat of XDR-TB, India has launched a National Action Plan for Antimicrobial Resistance, which seeks to restrict over-the-counter antibiotic sales, regulate antibiotic use in agriculture, improve surveillance and boost infection prevention techniques in clinics.
“This challenge is not unique to India, yet India is trying to come to terms with it,” said microbiologist Kamini Walia, who coordinates the Antimicrobial Resistance Initiative at the Indian Council of Medical Research in New Delhi.
“The thing is,” she said, “our pipeline is running dry, and that is what is worrying the physicians. We are running out of options.”
‘We can’t isolate ourselves’
So far, XDR-TB remains very rare in California, with only four cases reported from 2020 to 2024.
But drug-resistant bacteria do not respect borders, spreading globally through international travel and trade, experts warn. In one recent UCSF study, nine of 10 health care workers who visited Nepal or Nigeria brought home E. coli bacteria carrying antibiotic-resistant genes.
Extensively drug-resistant typhoid fever — a lethal disease with few antimicrobial treatment options, not yet established in the U.S. — briefly landed in San Francisco in 2020, carried by a person who had vacationed in Pakistan. Severely ill and hospitalized at UCSF, he was saved by advanced third-line antibiotics. His infection was contained and did not spread to others.
“The emergence of a resistant pathogen, even in places far away, means that that pathogen can be a problem in the United States,” said Dr. Langelier, of UCSF. “It’s a global problem that we can’t isolate ourselves from easily.”
Even common microbes can be very dangerous to fragile patients. An estimated one-third of Americans carry Staphylococcus aureus, or staph, on their skin or in their noses; of those, about 1% of those people, or more than 3 million people, carry methicillin-resistant Staph aureus, a strain that is hard to treat. Healthy people may carry MRSA and not know it — then transmit it to people whose immune systems are compromised.
In 2022, UCSF reported an outbreak in 15 people — 13 infants and 2 health care providers — who were infected during a highly virulent MRSA outbreak in a neonatal intensive care unit with critically ill and premature newborns. Genetic analysis revealed that the infections were linked, and could be traced back to an infant who had been sick seven months earlier, suggesting that a caregiver had a prolonged “silent” or symptomless infection that had spread to babies. They were all treated and recovered.
A similar outbreak in 10 infants was reported at UC Irvine Medical Center in 2016. The first baby tested positive in August; by the end of December, seven infants had sickened. Another baby tested positive in February, and two more in March, according to the Los Angeles Times. None of the babies died.
To prevent outbreaks, UCSF, UC Irvine and many other hospitals have strict control measures and test all babies for the infection in the NICU. The UC hospitals have experienced no new outbreaks.
But the overall number of drug-resistant infections in the U.S. continues to be a threat, according to the U.S. Centers for Disease Control. Progress was upended during the COVID-19 pandemic, as hospitals faced a nationwide shortage of infectious disease experts and protective masks, gloves and gowns. Six types of these infections surged 20% during the pandemic compared to the pre-pandemic period. The most recently updated data in 2022 found these illnesses remained at pre-pandemic levels.
‘Like Jurassic Park’
Scientists are now looking beyond existing chemical libraries. While nature’s dataset is finite, generative AI can design drugs from scratch. Then that design is turned into a physical molecule and tested.
“We can engineer entirely new potential medicines that evolution never tried,” said de la Fuente. His team's AI model identified two drug candidates that were tested in sick mice and proved that they could fend off the deadly pathogen Acinetobacter baumannii.
Even after a compound is built, the experiments continue. Extra bits are added. Others are subtracted. Is it better? Is it worse?It’s not enough for something to just be antibacterial, scientists caution. To treat patients, it must have other characteristics as well, such as safety and solubility. Something that works in the digital world may not work in humans.



So AI is needed to help with that, too. Computational filters can anticipate side effects in the human body, said Stokes, who co-founded the startup Stoked Bio to bring novel treatments to patients.
But discovery is just the first step. AI-designed antibiotics are still in the early days — and drug development is a notoriously high-risk endeavor.
The next steps — “optimization” to improve chemical structures, larger animal trials, toxicity testing, manufacturing and clinical trials in humans — are expensive and complex, requiring the resources, infrastructure and expertise of large pharmaceutical companies, according to Duxin Sun and Dr. Christian Macedonia, who follow the use of AI in drug development in their work in academia and industry.
It’s a big leap from an academic lab to a pharmacist’s shelf. While AI can quickly identify compounds that work on cells in a petri dish or in mice, the success of these compounds in human tests — where the majority of potential drugs fail — is less certain, they said.
“It is good research,” said Sun, associate dean for research and professor of pharmaceutical sciences at the University of Michigan. “But it is way too early — 15 years too early — to claim it will solve the resistance problem.”
Another challenge is commercial: Antibiotics have a poor return on investment, due to low sales and profits. That’s because a powerful new product will be considered a drug of “last resort,” used sparingly and held in reserve to preserve its effectiveness. Unlike a drug for a chronic condition that a patient needs for many years, an antibiotic is a short-term treatment, said Macedonia, an adjunct professor of pharmaceutical sciences at the University of Michigan.
And once out in the real world, an elegant new antibiotic will face tough adversaries — just like its forebears. Bacteria divide every 20 to 30 minutes; with each division, there’s a chance that a mutation will confer resistance.
“It’s like Jurassic Park. Life finds a way,” said Stokes.
This makes constant innovation a necessity.
But computers can help us outrun this inevitable evolution, if they help us build medicines faster, cheaper and in greater numbers.
“Then we don’t care about resistance,” he said. “Because even when we have resistance to one antibiotic, we’ll have another one sitting on a shelf — ready to go.”
