UCSF scientists paired a gene-based biomarker with generative AI to spot dangerous lung infections in ICU patients with striking accuracy. The approach could speed diagnosis and sharply reduce unnecessary antibiotics.
Lung infections like pneumonia are among the world’s leading killers, yet even in modern intensive care units they can be surprisingly hard to diagnose. That uncertainty often pushes doctors to prescribe powerful antibiotics just in case — a lifesaving instinct that also fuels drug resistance and exposes patients to unnecessary side effects.
Researchers at the University of California San Francisco say a new approach that combines a blood-based biomarker with generative artificial intelligence could change that equation.
In an observational study of critically ill adults, published today in the journal Nature Communications, the team’s model correctly identified lower respiratory infections 96% of the time. It also did a better job than intensive care clinicians at telling apart infectious and noninfectious causes of respiratory failure.
The researchers estimate that if their model had been available when the patients were admitted, it could have cut inappropriate antibiotic use by more than 80%.
“We’ve devised a method that gives results much faster than a culture, and it could be easy to implement in the clinic,” senior author Chaz Langelier, an associate professor of medicine at UCSF, said in a news release. “We’re confident that it could lead to faster diagnosis and curtail the unnecessary use of antibiotics.”
Cultures, which involve growing bacteria from patient samples, are a standard way to confirm infection, but they can take days and sometimes fail to grow anything at all. In the meantime, physicians must decide whether to start or continue antibiotics based on incomplete information from scans, lab tests and bedside exams.
The UCSF model tackles that problem from two directions at once.
One piece is a biomarker based on a gene called FABP4, which Langelier’s group identified in 2023 as a promising signal of lower respiratory infection. FABP4 helps modulate inflammation and is less active in certain immune cells than in normal lung cells. By measuring how strongly the gene is expressed, the researchers can infer whether the body is mounting the kind of response that usually accompanies a serious lung infection.
The other piece is a generative AI system that reads and interprets the patient’s electronic medical record. Using GPT-4 on a privacy-protecting platform developed at UCSF, the team designed prompts that guided the AI to sift through clinical notes, lab values, imaging reports and other data to decide whether pneumonia or another lower respiratory infection was likely.
The study drew on data from two groups of ICU patients. Ninety-eight patients were recruited before the COVID-19 pandemic, when most infections were bacterial. Another 59 were recruited during the pandemic, when viral infections, including COVID-19, were more common.
When the researchers tested each method on its own — either the FABP4 biomarker or the AI analysis — each reached about 80% diagnostic accuracy. The real gains came when they combined the two.
They then compared the model’s performance with the diagnoses made by the ICU physicians who admitted the patients. Those doctors prescribed antibiotics for pneumonia in most cases, reflecting the high stakes of missing a dangerous infection. The combined biomarker-plus-AI model was more selective, labeling fewer patients as having pneumonia while still catching nearly all true infections.
To better understand how the AI was making its calls, the team also pitted it against three physicians who specialize in internal medicine and infectious diseases. Both the AI and the human experts got about the same number of diagnoses right, but they appeared to lean on different types of information. The AI tended to give more weight to radiology reports from chest X-rays, while the physicians focused more on narrative clinical notes.
“It was almost showing a cultural difference, if you can say that about an AI,” added co-first author Natasha Spottiswoode, an assistant professor of medicine at UCSF. “It shows how AI can complement the work physicians do.”
Rather than keeping their AI prompts proprietary, the researchers published them in the paper and encouraged other clinicians to try similar approaches on their own HIPAA-compliant AI platforms. The idea is to make the technique accessible, not just to data scientists, but to frontline doctors.
Co-first author Hoang Van Phan, a bioinformatician at UCSF, stressed that the tool is designed to be user-friendly.
“Using this is unbelievably simple, you don’t have to be a bioinformatician,” he said in the news release.
The team is now working to validate the model as a clinical test that could be used in real time, not just in retrospective analysis. That will require further studies to confirm its reliability in different hospitals and patient populations, as well as careful attention to safety and oversight.
If it holds up, the approach could offer a powerful new way to personalize care in the ICU: quickly identifying which patients truly need aggressive antibiotics and which do not, while giving clinicians a clearer picture of what is happening in the lungs.
Next, the researchers plan to turn their attention to sepsis, the body’s overwhelming and often deadly response to infection. Like pneumonia, sepsis is notoriously hard to diagnose early and accurately, and it remains the most common cause of death in hospitals.
More broadly, the work highlights how combining biological insights — such as gene-based biomarkers — with advanced AI systems may help solve some of medicine’s toughest diagnostic puzzles. For patients struggling to breathe in an ICU bed, that could mean faster answers, more targeted treatment and a better chance at recovery.

