AF Post MI logo

AF Post MI

New Onset Atrial Fibrillation Score Post Myocardial Infarction

About the AF Post MI risk model

AF Post MI is an open-access calculator that estimates the risk of new-onset atrial fibrillation (NOAF) in the months and years after an acute myocardial infarction. It is powered by an explainable machine learning survival model developed on 2,596 consecutive patients treated at the Royal Brisbane & Women's Hospital, Queensland, Australia, between 2013 and 2021.

Why predict atrial fibrillation after a heart attack?

NOAF is the most common arrhythmic complication of acute MI, and its occurrence is independently associated with stroke, heart failure, and both short- and long-term mortality. The problem is one of timing: routine inpatient care relies on 24–48 hours of telemetry, yet a substantial share of NOAF emerges after discharge. In our cohort the median time to first NOAF was 158 days (IQR 6–771).

Prolonged ambulatory monitoring and wearable ECG devices can close that gap, but deploying them to every post-MI patient is not feasible. Existing scores are a poor substitute: CHA₂DS₂-VASc and GRACE were built to predict thromboembolic and ischaemic risk rather than arrhythmogenesis, and discriminate only modestly for this outcome. The practical need is a way to decide which patients warrant extended rhythm surveillance.

The six predictors

The full model considered 57 clinical and echocardiographic variables. SHAP-guided feature selection then reduced it to a parsimonious six-variable model that a clinician can complete in under a minute, with no measurable loss of accuracy.

PredictorWhy it contributes
Obstructive 3-vessel CADThe single strongest predictor. Marks diffuse ischaemic burden and incomplete revascularisation.
CHA₂DS₂-VA scoreSummarises accumulated comorbidity: hypertension, diabetes, vascular disease, prior stroke.
AgePatients developing NOAF were on average 68.5 years old, versus 61.0 for those who did not.
Right atrial areaThe highest-ranked echocardiographic feature, and a marker of acute atrial stretch and loading.
Medical managementIdentifies a phenotype of diffuse disease and higher comorbidity burden not treated with PCI.
Body mass indexA recognised systemic modulator of atrial remodelling and arrhythmic vulnerability.

Notably, left ventricular ejection fraction did not differ between patients who did and did not develop NOAF (53.4% vs 53.5%), and left atrial size contributed little once the other features were present, a reminder that the intuitive markers are not always the informative ones.

How the model was built

Of 3,464 consecutive patients presenting with STEMI or NSTEMI between January 2013 and December 2021, 868 were excluded for prior AF or flutter, AF at presentation, incomplete echocardiographic or follow-up data, or coronary artery bypass grafting after the index MI. That left 2,596 patients. Over a median 3.8 years of follow-up, 227 (8.7%) developed NOAF.

Cases were identified from ICD-10 coding of hospital and outpatient encounters, then confirmed by independent chart review and ECG adjudication by two investigators. Mortality data came from linkage with the statewide Registry of Births, Deaths and Marriages. Patients who died without developing NOAF, or who reached the end of follow-up event-free, were right-censored.

The cohort was split by admission date rather than at random: a training cohort of 1,282 patients admitted 2013–2017, and a temporal holdout validation cohort of 1,314 patients admitted from 2018 onward. This is deliberately the harder test: it approximates prospective deployment and forces the model to survive genuine shifts in clinical practice over time, which a random split would hide.

An XGBoost survival model was trained with a Cox proportional hazards loss, optimising the negative partial log-likelihood via gradient tree boosting. Hyperparameters were tuned with nested 10-fold cross-validation. Development and reporting follow the TRIPOD+AI statement.

Validation performance

All figures below are from the independent temporal validation cohort: patients the model never saw during training, admitted in a later era.

0.83

C-index, 6-variable model

95% CI 0.82–0.84

0.84

C-index, full 57-variable model

vs 0.81 for Cox regression

0.05

IPCW Brier score at 3 years

predicted vs observed agreement

The machine learning model discriminated significantly better than conventional multivariable Cox regression (C-index 0.84 vs 0.81, p=0.02), and the six-variable version remained non-inferior to the full model (p=0.38). Because NOAF is uncommon, precision-recall analysis matters more than discrimination alone. Average precision was 0.36, against a no-skill baseline of 0.08, a more than four-fold enrichment in true-positive yield.

Decision curve analysis at three years confirmed net clinical benefit across the 5–15% threshold range (0.036 for the full model, 0.031 for the six-variable model, 0.029 for Cox regression), all well above monitor-everyone (0.012) or monitor-nobody (0.000) strategies.

Interpreting the risk categories

Predicted 3-year risk is reported in three bands, with thresholds chosen from the clinically actionable range identified by decision curve analysis. Cumulative incidence separated cleanly between all three (log-rank p<0.001 for every pairwise comparison).

  • Low risk: under 5% at 3 years

    Under 1% early, 2–3% by three years. Supports de-escalation of rhythm surveillance.

  • Intermediate risk: 5% to 15% at 3 years

    2–3% early, rising progressively to 7–10% by three years.

  • High risk: above 15% at 3 years

    Steep early accumulation: roughly 20% incidence by 30 days, exceeding 30% long-term.

That last figure is the clinically important one. High-risk patients had a median time to NOAF of just seven days, immediately beyond the window of routine inpatient telemetry. This defines an early arrhythmogenic window that current care pathways largely miss, and it is where extended Holter monitoring, wearable ECG, or implantable loop recorders would plausibly deliver the most value.

Identifying these patients early also informs antithrombotic planning. NOAF forces escalation to oral anticoagulation, often alongside antiplatelet therapy, with competing thrombotic and bleeding risks. Knowing in advance who is likely to need it allows bleeding-sparing regimens and earlier follow-up to be planned rather than improvised.

What the model reveals about mechanism

SHAP (SHapley Additive exPlanations) was used to quantify each predictor's contribution, both globally and for individual patients. The features it surfaced align with established mechanisms of atrial fibrillation (structural substrate, haemodynamic trigger, and systemic modulator) rather than appearing as an arbitrary statistical selection.

The prominence of right-sided echocardiographic parameters is a novel finding. The thin-walled, compliant right atrium is unusually sensitive to abrupt rises in filling pressure. In acute MI, transient right ventricular dysfunction (reflected in reduced RV outflow tract velocity time integral) or elevated left-sided filling pressures (raised tricuspid regurgitation peak velocity) transmit backward to produce right atrial stretch, promoting mechano-electrical coupling and ectopic activity from non-pulmonary-vein foci. Right atrial enlargement may also mark more chronic remodelling and fibrosis.

Limitations you should know about

This model has not been externally validated. It was developed at a single Australian tertiary centre, and while the temporal holdout is a stringent internal test, performance in different health systems and demographic compositions is unknown. Formal fairness analyses across sociodemographic subgroups were not performed.

Other constraints worth weighing:

  • The retrospective design admits selection bias and unmeasured confounding.
  • Death was treated as a censoring event rather than a competing risk, which may inflate absolute NOAF risk estimates.
  • Inflammatory markers, electrolytes, troponin, and in-hospital therapies were unavailable, and are established modulators of arrhythmogenesis.
  • Echocardiography was limited to standard clinical parameters; advanced markers such as myocardial strain may add incremental value.
  • All six inputs are required; the deployed tool does not yet handle missing or low-quality data.
  • Early post-infarct ventricular function may be underestimated because of myocardial stunning.

Research use only

This calculator is provided for research and educational purposes. It is not cleared by the FDA, EMA or TGA for standalone clinical decision-making, and must not replace clinical judgement. The model runs entirely in your browser; the values you enter are never transmitted or stored.

Frequently asked questions

What does the AF Post MI score predict?
It estimates an individual patient's probability of developing new-onset atrial fibrillation (NOAF) after an acute myocardial infarction, at 30 days, 6 months, and 3 years from the index admission. It is a time-to-event (survival) prediction, not a single fixed-horizon classifier.
Which patients was it developed for?
Adults admitted with STEMI or NSTEMI who had no prior atrial fibrillation or flutter, no AF at presentation, and who were managed with percutaneous coronary intervention or medically. Patients who underwent coronary artery bypass grafting after the index MI were excluded, because post-operative AF is a distinct entity.
Which variables does it need?
Six: obstructive 3-vessel coronary artery disease, CHA₂DS₂-VA score, age, right atrial area, medical (non-interventional) management, and body mass index.
How accurate is it?
In an independent temporal validation cohort of 1,314 patients, the six-variable model achieved a Harrell C-index of 0.83 (95% CI 0.82–0.84) and an IPCW Brier score of 0.05 at three years. It was non-inferior to the full 57-variable model (C-index 0.84) and outperformed conventional Cox regression (0.81).
Can I use it to make treatment decisions?
No. This is a research tool. It has not been externally validated outside the development centre, and it is not cleared by the FDA, EMA or TGA for standalone clinical decision-making. It is intended to support, not replace, clinical judgement.
Why does right atrial area matter more than left atrial size?
This was one of the more surprising findings. The thin-walled right atrium is highly sensitive to abrupt rises in filling pressure, so right atrial enlargement appears to capture the acute haemodynamic loading of the early post-infarct period. Left atrial enlargement reflects longer-term vulnerability and contributed comparatively little once the other features were accounted for.

The underlying research

Machine learning for time-to-event prediction of new-onset atrial fibrillation after myocardial infarction. Scanlon L, Xiong E, Lancini D, Mallouhi M, Vollbon W, Wanigatunga D, Nerlekar N, Chew DP, Atherton JJ, Prasad SB, Lin A. Manuscript submitted for publication; this page will be updated with the citation and DOI once available.

Affiliations: Department of Cardiology, Royal Brisbane and Women's Hospital, Herston, Queensland; Faculty of Health, Medicine and Behavioural Sciences, University of Queensland; School of Medicine and Dentistry, Griffith University; Queensland Statewide Cardiac Network (Queensland Cardiac Outcomes Registry); and the Monash Victorian Heart Institute, Monash University.

The study received institutional ethics approval. Patient-level data cannot be shared publicly for privacy reasons, but may be made available on reasonable request to the corresponding author subject to ethics committee approval.

Try the calculator

Six inputs, instant 30-day, 6-month and 3-year risk estimates.

Open the AF Post MI risk calculator