AF Post MI
New Onset Atrial Fibrillation Score Post Myocardial Infarction
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.
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 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.
| Predictor | Why it contributes |
|---|---|
| Obstructive 3-vessel CAD | The single strongest predictor. Marks diffuse ischaemic burden and incomplete revascularisation. |
| CHA₂DS₂-VA score | Summarises accumulated comorbidity: hypertension, diabetes, vascular disease, prior stroke. |
| Age | Patients developing NOAF were on average 68.5 years old, versus 61.0 for those who did not. |
| Right atrial area | The highest-ranked echocardiographic feature, and a marker of acute atrial stretch and loading. |
| Medical management | Identifies a phenotype of diffuse disease and higher comorbidity burden not treated with PCI. |
| Body mass index | A 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.
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.
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.
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.
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.
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:
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.
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