Clear Sky Science · en

Interpretable machine learning models for stroke risk prediction in patients with newly diagnosed atrial fibrillation

· Back to index

Why predicting stroke risk matters

Atrial fibrillation, a common heart rhythm problem, greatly increases the chance of having a stroke. Doctors currently rely on a simple point-based score to decide who should receive blood-thinning drugs, but this score often misses high-risk patients and can label some lower-risk people as needing treatment. This study explores whether smarter, but still understandable, computer models can do a better job of estimating short‑term stroke risk using only information that every clinic already has: age, existing health conditions, and common medications.

Figure 1
Figure 1.

A common heart problem with serious consequences

Atrial fibrillation affects tens of millions of people worldwide and is a leading cause of disabling and deadly strokes. Even with modern blood thinners, many patients remain at risk, especially in the first year after the heart rhythm problem is diagnosed. The most widely used tool today, the CHA₂DS₂‑VASc score, assigns points for factors like age, high blood pressure, and prior stroke. While simple, it cannot capture more subtle patterns in a person’s medical history and often performs only modestly well in predicting who will suffer a stroke over time.

Building smarter yet simple-to-use risk tools

The researchers drew on electronic health records from more than 9,500 adults in a major Taiwanese hospital who had just been diagnosed with atrial fibrillation. They then tested their models in two separate hospital branches with over 2,500 additional patients. Instead of relying on complex lab tests or imaging, they intentionally limited the inputs to age, chronic illnesses such as diabetes and high blood pressure, and recent use of common drugs like blood thinners, heart rhythm medicines, and diabetes pills. Using this basic information, they built two types of computer models: a traditional logistic regression model, which behaves like a transparent weighted checklist, and a more flexible extreme gradient boosting model, which can capture intricate, non‑linear relationships. Both models were designed to output a personalized probability of having a stroke within one year of diagnosis.

Testing accuracy, fairness, and real-world usefulness

When the new models were compared with the standard score, they were far better at sorting patients into those who would and would not suffer a stroke. In both the original and external hospital groups, the machine learning models correctly distinguished high‑ and low‑risk patients about 90% of the time, whereas the standard score’s accuracy was closer to two‑thirds. The new tools also produced risk estimates that matched observed stroke rates much more closely, an important property for trustworthy decision‑making. Importantly, when the researchers examined performance separately in women and men, they found no meaningful differences, suggesting that the models did not unfairly favor one sex over the other, unlike the older score that automatically adds a point for being female.

From predictions to better treatment decisions

To see whether these improved predictions might change care, the team used decision curve analysis, a method that weighs the benefits of preventing strokes against the harms of unnecessary treatment. Across a wide range of treatment thresholds, both models offered substantially more benefit than the standard score, identifying over 100 additional truly high‑risk patients per 1,000 without increasing needless anticoagulant use. Over three to five years of follow‑up, patients labeled as high‑risk by the new models clearly gained from taking modern blood thinners: their stroke rates were lower compared with similar high‑risk patients who did not receive these drugs, while those classified as low‑risk did not show a clear benefit. In contrast, groups defined as high‑ or low‑risk by the older score sometimes showed confusing or even reversed patterns, hinting at misclassification. The researchers also used visual explanation techniques to show how specific factors, such as prior stroke, age, or use of certain heart rhythm drugs, pushed an individual’s risk estimate up or down, helping make the models’ reasoning more transparent to clinicians.

Figure 2
Figure 2.

What this means for patients and doctors

This study shows that it is possible to build accurate, understandable stroke risk tools using only information that is already available at the time atrial fibrillation is diagnosed. By better identifying who truly faces high short‑term stroke risk, these models can help doctors more confidently prescribe blood thinners to those who need them most, while avoiding unnecessary treatment in lower‑risk people. Although further testing in other countries and health systems is needed, this work points toward a future where everyday clinical decisions are guided by intuitive, data‑driven tools that tailor stroke prevention to each individual patient.

Citation: Lin, J.CW., Chang, CM., Pan, HY. et al. Interpretable machine learning models for stroke risk prediction in patients with newly diagnosed atrial fibrillation. npj Digit. Med. 9, 289 (2026). https://doi.org/10.1038/s41746-026-02470-3

Keywords: atrial fibrillation, stroke prediction, machine learning, risk stratification, anticoagulant therapy