Clear Sky Science · en

Prediction of antibiotic-associated cutaneous adverse drug reactions using electronic health record foundation models

· Back to index

Why predicting drug rashes matters

Anyone who has broken out in a rash after taking medicine knows how alarming it can be. Most of the time, these skin reactions are mild and fade on their own. But in rare cases, they can turn into life-threatening conditions that damage large areas of skin and require intensive care. Antibiotics are among the medicines most often linked to these reactions, yet doctors currently have no reliable way to know in advance which patients are most at risk. This study explores whether patterns hidden inside routine hospital records can help predict who is likely to develop an antibiotic-related skin reaction before it happens.

Skin reactions from medicines

Skin problems are the most common visible side effect of medicines. They range from itchy red spots to dangerous disorders such as Stevens–Johnson syndrome and toxic epidermal necrolysis, which can be fatal. Antibiotics, especially widely used types like penicillins and related drugs, are frequent triggers. Although these severe reactions are rare, any serious drug reaction can lengthen hospital stays, increase costs, and in the worst cases, lead to death. Despite this burden, there is no standard screening test that hospitals can apply to all patients to predict cutaneous adverse drug reactions, particularly those linked to antibiotics.

Turning hospital records into clues

Modern hospitals store enormous amounts of information in electronic health records: diagnoses, blood test results, prescribed drugs, and procedures, often captured over many years. In this study, researchers treated these long sequences of medical codes like lines of text in a document. They used “foundation models” borrowed from language technology—systems that learn general patterns from large datasets and can then be fine-tuned for specific tasks. The team analyzed records from more than 800,000 adult inpatients at three large Korean hospitals who stayed at least three days and received antibiotics. To reliably detect skin reactions, they did not rely only on diagnosis codes; they also mined nursing notes and structured nursing statements that recorded observations such as the presence of a rash or hives.

Figure 1
Figure 1.

Building and testing the prediction model

The researchers compared several approaches, from classic machine-learning methods like random forests to deep learning networks and three different foundation models for health records. For each patient, the models were asked to decide, at the moment of the latest antibiotic prescription, whether a skin reaction would occur within a short time. Among all methods, a model called CDM-BERT, specifically adapted to the common data format used by the hospitals, performed best. It correctly distinguished future rash cases from non-cases with very high accuracy in the hospital where it was trained, and it maintained strong performance when applied, without further adjustment, to the two other hospitals whose data looked somewhat different.

What the model learned about risk

To check whether the model was paying attention to medically meaningful information rather than random noise, the team examined which parts of the record most influenced its decisions. Higher importance was assigned to conditions known to be linked with drug reactions—such as cancer, chronic kidney disease, and chronic liver disease—and to certain drug categories, including antibiotics and anticonvulsants. Interestingly, at one hospital where drug codes did not match the training site, the model still worked well by relying more heavily on lab results and disease history, showing that it could adapt to different data environments. The researchers also split reactions into “immediate” (occurring soon after a dose) and “delayed” (appearing after longer exposure). The model was more confident and stable when predicting delayed reactions, which are currently the hardest to foresee with traditional tests.

Figure 2
Figure 2.

Limits, challenges, and next steps

Although the model’s performance is promising, it does not yet identify which exact antibiotic is to blame, nor can it separate mild rashes from the rare but devastating severe skin reactions that require urgent specialist care. The study also involved hospitals from a single country, and there were technical wrinkles such as differences in drug coding systems and the need to use rule-based searches on free-text nursing reports. Furthermore, translating the model’s internal “attention” patterns into simple clinical rules remains difficult, and the approach focused mainly on relatively mild skin problems rather than the full spectrum of severe reactions.

What this means for patients and clinicians

This work shows that by carefully combining routine hospital data with nursing observations, advanced computer models can estimate a patient’s risk of developing an antibiotic-related skin reaction, especially slower-onset reactions that lack reliable lab tests. In practice, such a tool could help doctors flag higher-risk patients for closer monitoring, alternative drug choices, or more cautious dosing, while leaving most patients to receive standard care. The study marks a step toward turning the “digital exhaust” of everyday medical practice into a safety net that catches serious drug reactions earlier, potentially preventing harm before it appears on the skin.

Citation: Kim, J., Kim, K., Yun, JE. et al. Prediction of antibiotic-associated cutaneous adverse drug reactions using electronic health record foundation models. npj Digit. Med. 9, 311 (2026). https://doi.org/10.1038/s41746-026-02503-x

Keywords: antibiotic side effects, drug-induced skin rash, electronic health records, medical AI prediction, adverse drug reactions