AI in cardiology, explained so you can explain it.
A plain-language companion to the 2026 ESC scientific statement on artificial intelligence for non-expert cardiologists. Every idea gets one line, one picture, one cardiology example and one warning. Search the bar above whenever a term trips you up.
The whole paper in four sentences.
Almost all AI in cardiology is machine learning: a computer works out patterns from thousands of ECGs, scans or records instead of following rules a person wrote. It can see things we cannot, but it only knows the data it was fed, flaws included. So the questions that matter are clinical ones: was it tested on patients like mine, somewhere else, with no patient in both the training and the test group, and did it change outcomes? You do not need to code, but you do need to know enough to ask those questions and stay in charge of the decision.
Source: De Lucia R, Cluitmans M, RamÃrez J, et al. Artificial intelligence in cardiology for non-experts: decoding key terms and understanding machine learning methodologies. European Heart Journal - Digital Health 2026;7:ztag154. doi.org/10.1093/ehjdh/ztag154. Each card ends with where to find the idea in the paper. Examples marked "added" are mine, not the authors'.
01
The big picture
Four words get used as if they mean the same thing. They do not. Each one sits inside the one before it.
How the words fit together
Every generative AI system is deep learning, every deep learning system is machine learning, and all of it is AI. The reverse is not true: a random forest is ML but not deep learning.
Paper: "Fundamentals of artificial intelligence", p. 4
Artificial intelligence AI
Computer systems built to do things that usually need human thinking: spotting patterns, making decisions, understanding language.
Picture itThe umbrella word. Saying "we used AI" tells you as little as saying "we used a drug".
Narrow AI does one job (read this ECG for AF). General AI would adapt to any task like a person. Everything in clinical use today is narrow.
In cardiologyThe automated ECG interpretation printed at the top of a 12-lead is narrow AI. So is software that traces the LV border on an echo.
Paper: "Artificial intelligence", p. 4
Machine learning ML
A computer learns the rule from examples instead of being handed the rule.
Picture itOld-style software is a recipe someone wrote down: "if RR intervals are irregular and there is no P wave, print AF". Machine learning is a trainee who is shown 100,000 ECGs with the diagnosis attached and works out the recipe alone.
In cardiologyThis is what almost every "AI" cardiology paper actually means. When you read AI, mentally substitute "a model that learned from data".
Watch outThe model learns whatever separates the examples, which may not be what you intended. If all the AF ECGs came from one machine, it may learn the machine.
Paper: "Machine learning", p. 4
Algorithm, model, parameters
The algorithm is the learning method. The model is what you have after the method has been run on data. Parameters are the numbers inside the model that got adjusted.
Picture itThe algorithm is the training programme. The model is the trained registrar. The parameters are everything the registrar now carries in their head.
"Random forest" is an algorithm. "The random forest we trained on 10,000 CONFIRM registry patients" is a model. Two teams using the same algorithm on different data get different models.
Paper: "Algorithm", p. 4
Deep learning
Machine learning done with neural networks that have many layers stacked up.
"Deep" only means many layers. More layers let the network build complicated ideas out of simple ones: edges, then shapes, then whole patterns. It needs a lot of data and computing power, and it is hard to see inside. Full walk-through under neural networks.
Paper: "Deep neural networks", p. 8
02
Data words
A model is only ever as good as what it was fed. These are the words for what goes in.
Dataset
The collection of examples used to train and test a model.
In cardiology50,000 ECGs with their reports. 10,000 echo clips with the measured ejection fraction. A registry spreadsheet of heart failure admissions.
Watch outAlways ask where the dataset came from. One tertiary centre in one country is a narrow view of the world.
Paper: "Dataset, structured and unstructured data", p. 4
Structured vs unstructured data
Structured data fits in a spreadsheet. Unstructured data does not.
Structured
Unstructured
Looks like
Rows and columns, one value per box
Signals, pictures, video, free text
Cardiology
Age, BP, eGFR, troponin, NYHA class
Raw ECG trace, echo loop, CMR, clinic letter
Usual tools
Regression, trees, forests, boosting
Neural networks (CNNs, transformers), language models
Unstructured data is harder to use because the model first has to turn it into numbers that mean something. That step is feature extraction.
Paper: "Dataset, structured and unstructured data", p. 4
Labelling
Attaching the right answer to each example so the model has something to learn from.
Picture itA stack of ECGs is just paper. A stack of ECGs each stamped "AF" or "sinus rhythm" by a cardiologist is a teaching set.
In cardiologyThe label might be a diagnosis (AF), a measurement (EF 35%), or an outcome (died within 5 years). In one study the paper lists, chest X-rays were labelled using findings from each patient's echo.
Watch outThe model can never be better than its labels. If the labels came from one tired reader, or from billing codes, the model learns those errors faithfully. Always ask: who labelled, and against what reference standard?
Paper: "Labelling", p. 4; Table 1, p. 14 to 15
Feature
One measurable input the model uses. In statistics you would call it a variable or predictor.
In cardiologyHeart rate, PR interval, QRS duration, age, LA volume. For an image, the features are numbers describing brightness, texture and shape, since a computer does not see "a ventricle", only pixel values.
Paper: "Feature engineering", p. 4; Figure 1A, p. 5
Feature selection
Choosing which of your existing variables to keep, and dropping the rest.
Picture itPacking for a trip. You own 60 items of clothing and take the 8 that matter. Nothing is altered, you just choose.
In cardiologyTo recognise sinus rhythm you keep "P wave before each QRS", "RR regularity" and "PR interval", and drop QT dispersion and T wave axis. The paper's first Table 1 example used automated feature selection on 25 clinical and 44 CT angiography variables to predict 5-year mortality.
Paper: Figure 1B, p. 5; Table 1 (Motwani 2017)
Feature extraction
Creating new, compact descriptors out of raw data, usually by maths rather than by a human measuring things.
Picture itSelection is choosing which ingredients to use. Extraction is reducing a whole pot of stock down to a spoonful of concentrate: new, smaller, and still carrying the flavour.
In cardiologyA 10-second, 12-lead ECG sampled 500 times a second is 60,000 voltage readings. A deep network squeezes that into a few hundred numbers that capture shape and timing. Those numbers can pick up patterns no human reads off the trace, which is how models find hints of future AF in a normal-looking sinus rhythm ECG.
Watch outExtracted features usually have no clinical name. You cannot point at one and say "that is the P wave". This is where the black box begins.
Paper: "Feature engineering", p. 4; Figure 1C, p. 5
Preprocessing
Cleaning and standardising raw data before the model sees it.
In cardiologyRemoving baseline wander and mains interference from ECGs. Resampling recordings from different machines to the same rate. Cropping echo images to the same size. Converting units so one hospital's troponin matches another's.
Watch outIf the model was trained on carefully cleaned signals and your ward ECGs are noisy, performance will drop. The preprocessing is part of the product.
Paper: "Preprocessing", p. 10
03
Four ways a model learns
The dividing line is simple: does the model get to see the right answer while it trains?
The model is shown inputs with the correct answer attached, and adjusts itself until its guesses match the answers.
Two flavours, depending on what the answer looks like:
Classification: the answer is a category. AF or sinus rhythm. HCM or not. Which of 12 rhythm classes.
Regression: the answer is a number. Ejection fraction. Systolic BP. Serum cholesterol.
In cardiologyMost published cardiology AI is supervised. Paper examples: a network classifying 12 rhythm classes from 91,232 single-lead ECGs, scoring 0.837 against 0.780 for the average cardiologist on the study's F1 measure; and an ECG model trained on more than 1.2 million ECG and echo pairs to detect structural heart disease.
Watch outSupervised models inherit every flaw in their labels, and they can only predict the outcome they were trained on.
Check yourself: is predicting LVEF from an ECG classification or regression?
Regression if the output is the EF number. Classification if the output is "EF below 40%: yes or no". Same data, different framing.
Paper: "Supervised learning", p. 6; "How does supervised machine learning work?", p. 10 to 11; Table 1 (Hannun 2019, Poterucha 2025)
Unsupervised learning
No answers are given. The model looks for structure on its own: which patients resemble each other, which variables move together.
Picture itYou tip a box of unlabelled family photos on the table. Without knowing anyone, you can still sort them into piles: beach, weddings, the same child at different ages.
In cardiologyHeart failure with preserved EF is one label covering very different patients. Clustering on echo and clinical data split it into distinct phenogroups with different prognoses. A 2025 study in the paper compressed over 1.1 million ECGs, then grouped 20,291 AF patients into five phenogroups by future risk.
Watch outIt generates hypotheses, not answers. Clusters always appear, even in random noise. They need to be reproduced in other data and shown to matter clinically.
Paper: "Unsupervised learning", p. 6; "How does unsupervised machine learning work?", p. 11 to 12; Table 2 (Gurnani 2025)
Semi-supervised learning
A small labelled set plus a large unlabelled set, used together.
Picture itA consultant has time to report 500 echoes. The archive holds 500,000. The model learns general echo "grammar" from the full archive and the specific diagnosis from the 500.
It exists because expert labelling is slow and expensive. A close cousin, self-supervised learning, invents its own practice tasks from unlabelled data (for example, hide part of an ECG and predict the hidden part). This is how foundation models are built.
Paper: "Semi-supervised", p. 6; "Generative artificial intelligence", p. 19
Reinforcement learning
An "agent" tries actions, gets rewarded or penalised, and gradually learns the sequence of decisions that earns the most reward overall.
Picture itA toddler learning to walk. Nobody supplies the correct muscle sequence. Falls are the penalty, steps are the reward, and thousands of attempts do the teaching.
In cardiologyRare. The natural fit is a drug you titrate repeatedly against a response, and the paper's reference list includes work on optimising warfarin dosing in AF. The long-term hope is a "digital twin": a simulated patient accurate enough for an agent to practise treatment strategies on.
Watch outTrial and error on real patients is unethical, and simulations of human physiology are not yet good enough to practise in. That is why you see so little of it in medicine.
Paper: "Reinforcement learning", p. 6; "What is the difference between reinforcement learning and the previous models?", p. 12
Transfer learning and fine-tuning
Start from a model someone already trained on a big general task, then adjust it for your specific one.
Picture itYou do not teach a new cardiology registrar to read. They arrive with medical school done. You only teach the cardiology. The pretrained model is the medical degree, fine-tuning is the specialty training.
In cardiologyA network pretrained on millions of everyday photographs already knows edges and textures. Fine-tune it on 5,000 echo images and it gets far further than a network started from scratch on the same 5,000.
Paper: "Reinforcement learning" (closing lines on transfer learning), p. 6
04
The models
The paper uses one running case for the tree family: working out why a patient fainted. The same case is used here.
Decision tree
A flowchart of questions. Each answer sends you down a branch until you reach a conclusion.
Try it: a toy syncope tree interactive
The vocabulary: each question is a node (strictly a non-leaf node), each answer is a branch, and each endpoint is a leaf. A classification tree ends in a category. A regression tree ends in a number. The algorithm, not a person, chooses which question to ask at each point by finding the split that best separates the outcomes in the training data.
In cardiologyYou already use hand-built trees: every guideline flowchart is one. The ML version writes its own flowchart from data.
Watch outOne tree is easy to read but fragile. Change a few training patients and the questions change. That weakness is what forests and boosting fix. The toy tree above is for teaching only, not for managing syncope.
Paper: "Tree-based methods" and "Example of decision tree", p. 6; Figure 2A, p. 7
Random forest
Hundreds of slightly different decision trees built side by side, which then vote.
Picture itYou present the syncope case at an MDT. Each colleague has seen a slightly different mix of patients in their career and asks the questions in a different order. You go with the majority. One eccentric opinion gets outvoted.
How the trees are made different: each one is trained on a random resample of the patients, drawn with replacement so some appear twice and some not at all. That resample is a bootstrap sample, and the whole trick is called bagging. Combining many models is called an ensemble.
In cardiologyRisk prediction from registry-style tables of clinical variables, where forests are a standard strong choice.
Watch outYou gain stability and lose readability. Nobody can read 500 trees, so the forest is already a partial black box.
Paper: "Tree-based methods", p. 6; "Ensembles of decision trees", p. 12; Figure 2B, p. 7
Gradient boosting GBM, XGBoost
Trees built one after another, each new tree concentrating on what the previous ones got wrong.
Picture itInstead of asking the whole MDT at once, you send the case along a corridor. The first colleague gives a rough answer. The second only looks at where the first was wrong and corrects it. The third corrects what is still off. By the tenth door the answer is sharp.
Random forest
Gradient boosting
Trees built
In parallel, independently
In sequence, each depends on the last
Combined by
Vote or average
Adding up corrections
Main benefit
Stability
Squeezes out accuracy
In cardiologyIn the 10,030-patient CONFIRM registry, a boosted ensemble using clinical and CT angiography variables predicted 5-year death better than the Framingham score. XGBoost is one popular, fast implementation.
Watch outBecause each tree chases the remaining errors, boosting will eventually chase noise. It needs careful stopping rules, or it overfits.
Paper: "Tree-based methods", p. 6; Figure 2C, p. 7; Table 1 (Motwani 2017)
Neural network
Layers of simple calculating units, each passing its result to the next layer, with the strength of every connection tuned during training.
Input layer: receives the raw data. For an ECG, the trace is chopped into a long list of voltage readings and each reading feeds one input.
Hidden layers: where the learning lives. Early layers notice slopes and sharp edges. Middle layers combine those into peak shapes. Deep layers hold abstract "rhythm motifs".
Output layer: a probability for each possible answer, for example sinus rhythm 0.90, AF 0.10.
Each connection has a weight: a number saying how much one unit listens to another. "Training" means showing an example, measuring how wrong the output was, and nudging every weight slightly to be less wrong. Repeat millions of times.
Picture itA reporting chain. Juniors each notice one small thing ("steep upslope here"). Registrars combine several junior reports ("narrow spike followed by a dome"). The consultant combines those into a verdict. Nobody wrote down what each person should look for. The whole chain settled into its roles through feedback on the final answer.
Watch out: the black boxThe deep-layer patterns have no clinical name. The network gives you 0.90 without being able to say "because the P waves are present". That is what people mean by "black box", and it is why explainability tools exist.
Paper: "Neural network" and "Example of neural network", p. 6 to 8; Figure 3, p. 8
Convolutional neural network CNN
A neural network designed for images. It slides small pattern detectors across the picture to find where each pattern occurs.
Filter (or kernel): a small grid, say 3 by 3 pixels, that responds to one pattern such as a vertical edge. The network learns its own filters.
Feature map: the result of sliding one filter across the image. A map of "where is this pattern".
Pooling: shrinking the map while keeping the strongest responses, so later layers see the bigger picture.
Image segmentation: a variant that labels every pixel (this pixel is LV cavity, this is myocardium) instead of giving one answer for the whole image.
Picture itMoving a magnifying glass over a chest X-ray one small patch at a time, asking the same question at every patch: "is there an edge here?" Then doing it again on the results, asking "do these edges form a curve?"
In cardiologyEcho, CMR, CT, chest X-ray, and also ECGs treated as a picture or signal. Paper examples: detecting LV structural abnormality from 71,589 chest X-rays, and beat-by-beat assessment of cardiac function from echo video.
Watch outA CNN trained on adult echoes should not be used on children. The paper gives exactly this as a contraindication.
Paper: "Convolutional neural networks", p. 8 to 9; Figure 4, p. 9; Table 1 (Bhave 2024, Ouyang 2020)
Transformer and attention
A network that looks at every part of the input at once and learns which parts are relevant to each other.
Older sequence models (recurrent networks, LSTMs) read a signal one step at a time, and what they saw early fades. A transformer uses self-attention: every beat can be compared directly with every other beat, however far apart.
Picture itReading a rhythm strip through a slot that shows two beats at a time, versus laying the whole strip on the desk. With the whole strip in view you immediately see that beat 5 came early and the pause after it compensates.
In cardiologyA transformer trained on 737,815 ECGs picked up hidden signatures of AF in sinus rhythm ECGs from patients with embolic stroke of undetermined source. Transformers are also the engine inside large language models.
Paper: "Transformer architecture and attention mechanisms", p. 9; Table 1 (Choi 2024)
Contrastive learning
The model learns by comparison: pull similar examples together, push different ones apart. No diagnosis labels needed.
Picture itA new sonographer who has never been taught any diagnoses, but is told only "these two clips are the same patient, those two are not". After a million comparisons they have a sharp sense of what makes hearts alike or different, and can then learn each diagnosis from a handful of examples.
In cardiologyEchoCLIP learned from very large collections of echoes this way, then adapted to specific measurement and diagnosis tasks. It answers the biggest practical bottleneck in medical AI: not enough expert-labelled data.
Paper: "Contrastive learning", p. 9
Regularised regression LASSO, ridge, elastic net
Ordinary regression with a built-in penalty for complexity, so it does not overreact to noise when you have many variables.
Picture itYou give the model a fixed budget of "influence" to spend across its variables. It can no longer afford to give 200 biomarkers a little weight each, so it spends on the few that carry real signal and sets the rest to zero or near zero.
In cardiologyA study with 300 patients and 5,000 proteomic or genomic markers. Plain regression would fit perfectly and mean nothing. Elastic net is the variant that copes best when variables are correlated with each other, which cardiovascular measurements usually are.
Watch outWith heavy penalties a clinically important variable can be shrunk away, which makes the result harder to interpret.
Paper: "Regularized regression", p. 12
Support vector machine SVM
Finds the boundary that separates two groups with the widest possible gap between them.
Only the ringed points nearest the boundary decide where it goes. Those are the "support vectors".
When no straight line can separate the groups, a kernel re-plots the data in more dimensions where a clean cut becomes possible. Picture two groups mixed on a tabletop: lift one group into the air and a flat sheet can now pass between them.
In cardiologyHeart sound classification and arrhythmia detection, especially with small to medium datasets that have many variables per patient.
Watch outVery sensitive to its settings (which kernel, how strict the margin). Those settings are hyperparameters: choices made by the data scientist before training, as opposed to parameters, which the model learns.
Paper: "Support vector machines", p. 12
05
Finding hidden patterns
The unsupervised toolbox. Two jobs: put similar patients into groups (clustering), and boil many variables down to a few (dimensionality reduction).
Clustering and k-means
Sorting patients into groups so that people within a group resemble each other more than they resemble people in other groups.
k-means is the simplest method. You choose the number of groups, k. The algorithm drops k centre points at random, assigns each patient to the nearest centre, moves each centre to the middle of its patients, and repeats until nothing changes.
In cardiologySplitting "heart failure" or "AF" into subtypes with different risks and treatment responses, using clinical, imaging and electrical measurements together.
Watch outYou choose k, so the number of "phenotypes discovered" is partly your decision. k-means also struggles when there are very many variables or when groups are not roughly round blobs.
Paper: "Clustering", p. 11; "k-Means clustering", p. 13
Hierarchical clustering
Builds a family tree of patients: the two most alike are joined first, then the next closest, until everyone is connected.
A dendrogram. The lower two patients join, the more alike they are. Cut the tree higher for fewer, broader groups, or lower for more, finer ones.
In cardiologyThe well-known "phenomapping" of HFpEF used hierarchical clustering on echo and clinical data. Its strength is that you can see relationships at every level rather than committing to one k.
Paper: "Clustering", p. 11; "k-Means clustering" (hierarchical paragraph), p. 13
Latent class analysis LCA
Clustering for yes/no and category data. It assumes hidden patient types exist and works out the probability that each patient belongs to each type.
Picture itA questionnaire of ten yes/no items: diabetes, smoker, prior MI, CKD and so on. LCA finds, for example, a "metabolic" type who mostly tick the same four boxes and a "vascular" type who tick a different set. Each patient gets "80% likely type A, 20% type B" instead of a hard assignment.
Paper: "k-Means clustering" (latent class paragraph), p. 13
Dimensionality reduction and PCA
Replacing many overlapping measurements with a few combined scores that keep most of the information.
"Dimensions" just means number of variables per patient. A gene-expression panel may have 20,000. Many move together, so the true amount of independent information is far smaller. Principal component analysis finds the direction along which patients differ most and makes that the first new score, then the next most informative direction, and so on.
Picture itHeight, arm span, leg length and shoe size are four numbers that mostly say one thing: body size. PCA would hand you a single "size" score and lose almost nothing.
In cardiologyCondensing atrial gene-expression data into a few components linked to AF. Summarising ECG waveform shape into a handful of numbers.
SVD (singular value decomposition) is closely related maths that does the same job. Tensor factorisation extends the idea to data with more than two axes, such as patients by variables by time.
Watch outThe new scores are blends. "Component 2" is not a thing you can measure at the bedside, so interpretation takes work. PCA and SVD only capture straight-line relationships.
Paper: "Dimensionality reduction", p. 11 to 12; "Principal component analysis, singular value decomposition and tensor factorization", p. 13
Autoencoder
A neural network forced to squeeze its input through a narrow middle and then rebuild it. What survives the squeeze is a compact summary.
If the rebuilt ECG matches the original, the small code in the middle must contain everything important. That code can then be used for clustering or prediction.
Picture itSummarising a long discharge letter in one line, then asking a colleague to rewrite the full letter from only that line. If they manage, your one line was a good summary.
It is PCA's more flexible cousin: it can capture curved, non-linear relationships. A variational autoencoder (VAE) learns a smooth range of codes rather than single points, which also lets it generate new, realistic examples such as synthetic ECGs.
Watch outNeeds a lot of data and computing, and the code is hard to interpret.
Anomaly detection learns what "usual" looks like and flags whatever does not fit.
In cardiologyContinuous telemetry or wearable data: the system learns a patient's normal pattern and raises a flag when the signal drifts, before a defined diagnosis exists.
Topological data analysis (TDA) is a newer method that studies the overall "shape" of a dataset (loops, branches, clumps) to find structure other methods miss. The paper is clear that it is less mature in cardiology than the other methods here. Recognise the name, and do not worry about the mechanics.
Paper: "Unsupervised machine learning algorithms: advantages and disadvantages" and "Topological data analysis", p. 13
06
Judging a model
This is the chapter that matters most for a clinician. The paper says you must be able to judge whether a model will work on your patients, and most of that judgment comes from the ideas below.
Training, validation, test, external
Data is divided into separate piles so the model is always examined on cases it has never seen.
Performance means more the further right it was measured.
Training set: the model fits its parameters to this. A high score here proves nothing.
Validation (tuning) set: used repeatedly to choose settings and thresholds. Because choices were made to look good on it, its score is optimistic.
Internal test set: locked away, opened once at the end. If the team changes the model after peeking, they need a fresh test set.
External validation: the finished, frozen model run on data from other hospitals, other machines, other years, other populations. The strictest and most believable result.
Watch outPapers often report the validation or internal test figure in the abstract. Look for the external figure. If there is none, the model has not left home yet.
Paper: "How does supervised machine learning work?", p. 10 to 11; "Rigorous validation and testing", p. 17
Data leakage
When information from the test set sneaks into training, the model looks brilliant in the paper and disappoints on the ward.
The commonest form in cardiology: one patient has several ECGs or scans, and they are split at random. Some land in training and some in testing. The model can then score well by recognising the patient (their particular QRS shape, their body habitus) instead of the disease.
Picture itAn exam where half the questions are word-for-word from the revision sheet. The top mark tells you about memory, not understanding.
Watch outThe fix is splitting at patient level: every recording from one person goes entirely into training or entirely into testing. If a paper with near-perfect results does not say it did this, be sceptical. The paper says this point is often overlooked.
Check yourself: 2,000 echoes from 400 patients are randomly split 80/20 by echo. Problem?
Yes. Each patient has about five echoes, so nearly every test patient also appears in training. The reported accuracy will overestimate performance on new patients. Split the 400 patients instead: 320 to training, 80 to testing.
Paper: "Model training", p. 10
Overfitting, underfitting, bias and variance
Too simple a model misses the pattern. Too flexible a model memorises the noise. The goal is the middle.
Try it: drag the flexibility slider interactive
Error on the training patients (filled dots)
Error on new patients (hollow dots)
Underfitting
Overfitting
Model is
Too simple or under-trained
Too flexible for the amount of data
Training score
Poor
Excellent
New-data score
Poor
Poor
Statistical name
High bias: wrong in a consistent way
High variance: changes wildly with the sample
Like a trainee who
Calls every broad complex rhythm "VT"
Memorised last year's exam ECGs and is lost on new ones
Clinical risk
Missed diagnoses
Great paper, fails after deployment
The tell-tale sign of overfitting is a big gap between training performance and test performance. Remedies include more data, a simpler model, regularisation, and ensembles.
Paper: "Bias and variance" and "Overfitting and underfitting", p. 10
Accuracy, sensitivity, specificity and AUC
A model gives each patient a score. Where you draw the line between "positive" and "negative" decides who gets missed and who gets a false alarm.
Try it: move the threshold and the prevalence interactive
Sensitivity: of the people with the disease, the share the model catches.
Specificity: of the people without it, the share the model correctly clears.
Accuracy: share of all calls that were right. Misleading when a disease is rare, as the lab shows.
AUC (area under the ROC curve): one number for how well the model ranks patients across every possible threshold. 0.5 is a coin toss, 1.0 is perfect. In plain words: pick one diseased and one healthy patient at random, and the AUC is the chance the model scores the diseased one higher.
Discrimination vs calibration: discrimination is ranking (AUC). Calibration asks whether a predicted "20% risk" really means about 20 in 100 have the event. A model can rank well and still give risks that are all twice too high.
In cardiologyIn the paper's Table 1, a neural network predicting 10-year cardiovascular events in 378,256 primary care patients reached an AUC of 0.764, against 0.728 for the standard ACC risk algorithm. A real gain, and also a reminder that ML improvements on tabular data are often modest.
Watch outThe paper warns that without strong external validation, all of these numbers can substantially overestimate real clinical usefulness. A high AUC is not a patient benefit.
Added: the plain-language AUC definition, positive predictive value and the prevalence slider are standard diagnostic-test teaching that I have included to make the paper's list of metrics usable. The curves are illustrative, not from a real model.
Paper: "Accuracy and evaluation", p. 10; "Rigorous validation and testing", p. 17; Table 1 (Weng 2017)
Generalisability and population shift
Will the model work on patients, machines and settings different from the ones it learned from?
Picture itA registrar trained entirely in a transplant centre, then posted to a district general. Same medicine, very different case mix. Their instincts about "what is common" are now miscalibrated.
In cardiologyTrained in a tertiary centre, used in the community. Trained on one vendor's ECG machine, used on another. Trained on one ancestry group, used on another. Trained on adults, used on children. Any of these is a population shift, and performance can fall without any warning from the software.
Watch outThe paper lists this first among the things a cardiologist must master. Before using a tool, find out who it was trained and validated on, and decide whether your patient belongs to that group. If not, treat it as a contraindication.
Paper: "Defining the scope of artificial intelligence literacy for cardiologists", p. 4; "Rigorous validation and testing", p. 17
Robustness
The model still gives sensible answers when the input is messy or a bit different from what it saw in training.
In cardiologyA patient with a tremor, poorly placed limb leads, a difficult echo window, a pacemaker spike. A robust model copes or says it cannot read the input. A brittle one confidently outputs nonsense.
Paper: "Robustness", p. 10
Explainability SHAP, LIME, saliency maps
Tools that show which parts of the input most influenced the model's answer.
SHAP: gives every input variable a share of the credit for one prediction. "Age pushed this patient's risk up by 8 points, statin use pulled it down by 3."
LIME: builds a simple, readable model that imitates the complex one just around a single patient.
Saliency map: a heat map over an image or ECG showing where the model was "looking".
Watch out: this is the paper's sharpest warningThese tools show what the model paid attention to. They do not show what causes disease, and they do not show that the model understands anything. A highlighted ECG segment means "this region was statistically linked to the outcome in the training data". It may be a true signal, a proxy, a confounder, or an accident of that dataset.
Picture itEye-tracking a medical student during an OSCE. You learn where they looked. You do not learn whether they understood what they saw.
Added example, not from the paper: in well-known chest X-ray research, models predicting pneumonia were found to rely partly on which hospital and scanner the film came from, picked up from markers on the image, because sicker patients came from particular sites. Heat maps showed the model attending to those markers as well as the lungs. That is a shortcut, and it only showed up because someone checked.
Your jobCheck for pathophysiological plausibility. If an AF model highlights the P wave region and RR intervals, good. If it highlights the lead label or the calibration pulse, something is wrong. The data scientist compares whether different explanation methods agree. You judge whether the explanation makes medical sense.
Even a model with a sensible explanation still needs proper clinical validation.
Paper: "Explainability", p. 10; "Defining the scope of artificial intelligence literacy for cardiologists", p. 4; "Transparency and interpretability", p. 17
Accuracy is not outcomes
Most cardiology AI studies show the model can tell patients apart. Very few show that using it makes patients better off.
The paper describes a ladder of evidence. Most tools are still on the lower rungs:
Discrimination and calibration on stored data (the great majority of papers).
Diagnostic yield or workflow effects when used prospectively.
Improved patient outcomes in a randomised trial (a handful).
In cardiologyThe paper points to a small number of pragmatic randomised trials of AI-ECG: one found more new diagnoses of low ejection fraction in primary care, and one reported lower 90-day mortality among hospital inpatients when an AI-ECG alert was used. The authors stress that these results belong to those tools in those settings and say nothing about ML tools in general.
Watch outTreat an AI tool like a new drug or device. "It works in the lab" is phase 1. Ask for the trial.
Paper: "How does supervised machine learning work?", p. 11; "Challenges and implementation strategies", p. 19
07
Classical statistics vs machine learning
"Isn't this just regression with better marketing?" is the question you will be asked most. Here is the honest answer.
Different goals, overlapping tools
Classical statistics
Supervised ML
Main question
Why? How much does X change Y?
What will happen to this patient?
Aim
Inference, explanation
Prediction
Starts from
A hypothesis chosen in advance
The data, with few assumptions
Variables
A handful, picked by the researcher
Hundreds or thousands, interactions found automatically
Output you read
Odds ratio, confidence interval, p value
Risk score, AUC
Best with
Smaller, clean, tabular data
Large, complex data: images, signals, many variables
Interpretability
High
Often low
Picture itA statistician is a detective: who did it, and how sure are we? An ML model is a weather forecaster: will it rain tomorrow? The forecaster does not need to explain the physics as long as the forecast is reliable.
In cardiology"Does an SGLT2 inhibitor reduce heart failure admissions, and by how much?" is a statistics question. "Which of the 400 patients in my heart failure clinic will be admitted in the next 30 days?" is an ML question.
Watch outThe line is blurry. Logistic regression is used in both camps. And better prediction does not automatically mean better care: the paper says the effect on treatment decisions and outcomes still needs prospective testing.
Paper: "What is the difference between classical statistical models and supervised machine learning?", p. 11
08
Choosing a model
You will not choose alone, but the paper wants you in the room at the start of the project, able to follow the reasoning. It comes down to three things: what kind of data, how much of it, and how much you need to see inside the model.
Which family fits?
Try it: describe the project interactive
The rules of thumb behind it, all from the paper:
For tables of clinical variables, tree ensembles (random forest, gradient boosting) often still beat neural networks.
For images, signals and text, neural networks are the state of the art.
Complexity is roughly the number of parameters: about tens for a logistic regression, up to around a billion for the largest networks. More parameters need more data and are harder to interpret.
When data is limited, a foundation model plus fine-tuning is a good compromise.
When interpretability is essential, prefer the simpler model. It is also less prone to overfitting.
Paper: "Key considerations when selecting an artificial intelligence model", p. 18
09
Generative AI
Everything so far analyses data. Generative AI produces new content.
Generative AI
AI that creates new text, images or other content instead of only classifying what it is given.
Picture itA classifier is an examiner: it marks the ECG "AF" or "not AF". A generative model is an author: it writes the report, or draws a new ECG that never existed.
Several designs exist, including generative adversarial networks (GANs) and variational autoencoders, but recent progress is mostly driven by foundation models built on transformers.
Paper: "Generative artificial intelligence: Overview", p. 19
Foundation model
One very large model, pretrained on enormous amounts of data, that can be adapted to many different tasks with little extra training.
Picture itA doctor fresh from medical school and foundation years: broad general training, not yet a specialist, but able to become a cardiologist, a GP or a radiologist with a modest amount of extra teaching. The old approach was to train a new person from birth for each single task.
Few-shot learning: it picks up a new task from a handful of examples.
Zero-shot: it attempts a task it was never specifically trained for, with no examples.
Multimodal: it handles several data types together, such as text, images and ECGs.
In cardiologyECG foundation models that screen for several conditions, including risk of ventricular arrhythmia. EchoCLIP for echo interpretation. Multimodal models combining late-gadolinium CMR, ECG and clinical data to predict malignant ventricular arrhythmias in non-ischaemic cardiomyopathy.
Paper: "Generative artificial intelligence: Overview" and "Applications", p. 19
Large language model LLM
A foundation model trained on vast amounts of text that can read and write human language.
Related older term: natural language processing (NLP), any method that pulls usable information out of free text such as clinic letters and EHR notes.
In cardiologyDrafting clinic letters from a recorded consultation. Summarising a long admission. Rewriting an echo report in language a patient can follow. Pulling NYHA class out of thousands of free-text notes for an audit.
Paper: "Machine learning applications", p. 9; "Applications", p. 19
Hallucination
A generative model stating something fluent, confident and false.
Picture itThe medical student who does not know the answer on the ward round and, instead of saying so, produces a smooth and plausible one. The delivery is identical whether it is right or wrong.
In cardiologyA discharge summary that includes a normal angiogram the patient never had. A guideline "quote" with a class of recommendation that does not exist. A reference list with real-looking papers that were never written.
Watch outThe model is built to produce likely-sounding text, not to check facts. Anything clinical it writes needs a human to verify it against the source record.
Paper: "Challenges and implementation strategies", p. 19
Where to start using it
The paper's advice: begin with low-risk, high-return tasks and build trust before moving to anything patient-facing or diagnostic.
Start here
Transcribing and summarising consultations. Prefilling letters and reports. Scheduling and admin.
With care
Plain-language summaries of results for patients. Chatbots that help patients prepare for appointments.
Still research
Diagnostic ECG and imaging foundation models. Multimodal risk prediction. Few have been tested prospectively in real practice.
Open issues the paper flags: privacy and security of patient data, hallucinations, black-box reasoning, and unresolved legal accountability when an AI-influenced decision goes wrong.
Paper: "Applications" and "Challenges and implementation strategies", p. 19
10
Safety, oversight and regulation
What the paper expects of you personally, and the safeguards that should surround any AI tool.
Three levels of AI literacy
You are expected to be a safe, critical user. You are not expected to be an engineer.
1. You must master
The clinical life cycle and risks of a model. Will it generalise to my patients? Where could it fail, and how badly? When must it not be used?
2. You should recognise
The trust gap and automation bias. That explanations from the model need checking for pathophysiological sense.
3. Leave to data scientists
Hyperparameter tuning, coding explainability methods, running the formal failure-mode calculations.
Picture itYou prescribe amiodarone safely without being able to synthesise it. You know its indications, contraindications, interactions and monitoring. The paper asks for the same relationship with AI tools.
Paper: "Defining the scope of artificial intelligence literacy for cardiologists", p. 4
Human in the loop
A clinician reviews the AI output and makes the final decision. The AI advises and the human decides.
In cardiologyThe AI flags "possible low EF" on an ECG. A clinician decides whether to order the echo. The AI pre-measures the EF. The echocardiographer checks the tracing and signs the report.
The paper's position: AI should augment clinical decision-making, never replace it, and the clinician keeps ultimate responsibility. Systems need a clear way to override them. Where a model cannot explain itself, its limits must be documented and human oversight becomes the main safeguard.
Paper: "Human oversight, artificial intelligence design and model transparency", p. 18 to 19
Automation bias and the trust gap
Two opposite errors: believing the machine because it is a machine, or ignoring it because you cannot see how it works.
Picture itAutomation bias is following the sat-nav into the river. The trust gap is switching the sat-nav off and getting lost in a city you do not know.
In cardiologyYou have seen automation bias already: the machine prints "acute MI" on an ECG with artefact, and it gets escalated. Or it prints "normal ECG" and a subtle posterior MI is missed because someone read the label, not the trace.
Watch outThe remedy for both is the same: know what the tool was validated for, look at the raw data yourself, and treat the output as one opinion.
Paper: "Defining the scope of artificial intelligence literacy for cardiologists", p. 4
Thinking about failure FMEA
Failure mode and effects analysis: list the ways a tool could go wrong, how likely each is, and how bad the result would be, before it goes wrong.
In cardiologyFor an AI-ECG tool: noisy trace (common, could cause a false AF call, moderate harm). Paced rhythm it never saw in training (occasional, unpredictable output). Lead reversal (occasional, could mimic pathology). For each one: what catches it?
You should be familiar with the way of thinking. Doing the formal scoring is the data scientist's and quality team's job.
Paper: "Defining the scope of artificial intelligence literacy for cardiologists", p. 4
Six safeguards for any AI tool
Safeguard
What it means
What to ask
Rigorous validation
Tested on diverse, independent data
Where was it externally validated, and on whom?
Transparency
You can see how it reached an answer, or its limits are documented
What explanation do I get with each output?
Continuous monitoring
Performance is tracked after launch and the model is updated as practice changes
Who is watching its performance here, this year?
Ethics and fairness
Checked for worse performance in under-represented groups
How does it perform by sex, age, ancestry?
Regulation
Meets device and AI law
What is its regulatory class and approval?
Multidisciplinary team
Clinicians, data scientists, ethicists, regulators involved
Was a clinician involved in building it?
Watch out: algorithmic biasHere "bias" means unfairness, a different sense from the statistical bias in chapter 6. If the training data under-represents women, older patients or some ancestry groups, the model will tend to perform worse for them, and the average accuracy figure will hide it.
Paper: "Strategies for assessing and controlling artificial intelligence quality and safety", p. 17 to 18
Regulation in brief
AI that influences diagnosis or treatment is regulated as a medical device, and in Europe also as "high-risk" AI.
SaMD (software as a medical device): software that itself performs a medical function, with no hardware attached. An ECG-reading algorithm is SaMD.
EU Medical Device Regulation (MDR): the main European rulebook for these tools, covering safety and data protection.
EU AI Act: sits on top of the MDR. It classes AI in medical products as high-risk, which brings duties around risk management, transparency, documentation and human oversight.
FDA: the United States has its own framework for AI and ML based SaMD.
Risk classes: devices are graded by potential harm. Higher classes (the paper cites IIb and III) need stricter human oversight.
Watch outRegulatory approval means a tool met a safety and performance bar. It does not mean it was shown to improve outcomes, or that it suits your population. Legal accountability for AI-influenced decisions is still unsettled.
Paper: "Limitations and regulations", p. 19 to 20; "Ethical considerations", p. 17
11
Read an AI paper in ten questions
The whole statement turned into a checklist. Tick as you read a paper or a vendor brochure. Each question links back to the idea behind it.
Appraisal checklist
The checklist is my synthesis of the statement's guidance. It is a reading aid, not a validated appraisal instrument.
12
Explain it to anyone
Scripts you can say out loud, pitched for four audiences.
Four ready-made explanations
To a patient"The computer has looked at hundreds of thousands of heart tracings from other people, along with what turned out to be wrong with them. It has learned to notice patterns that can be too subtle for the eye. It is a second opinion that is fast and never tired, but it only knows what it has been shown, so I check its answer against everything I know about you before we decide anything."
To a sceptical colleague"It is pattern recognition trained on data, nothing mystical. Think of it as a new diagnostic test. I want the same things I would want from any test: who was it validated in, what is the sensitivity and specificity in a population like ours, was that measured at a different hospital, and has anyone shown it changes outcomes? If those answers are good, I will use it as one input. If not, it stays a research tool."
To a medical student"Normal software follows rules a human wrote. Machine learning writes its own rules from examples. Give it labelled examples and it learns to predict, which is supervised learning. Give it unlabelled data and it finds groups, which is unsupervised. Neural networks are one way of doing this that works well on images and signals. The two classic ways it goes wrong are memorising the training data, called overfitting, and being tested on patients it has already seen, called leakage."
To a manager deciding whether to buy"Three questions for the vendor. One: show me performance at a hospital that was not involved in building it, on patients like ours. Two: what happens when it is wrong, and how will our clinicians know and override it? Three: who monitors its performance here after go-live, and what is its regulatory class? A tool with no answer to any one of those is not ready."
Five things people get wrong
People say
More accurate
"The AI understands the ECG"
It found statistical patterns linked to the label. That is not understanding.
"99% accurate"
On which patients, measured where, and how rare is the disease? See metrics and leakage.
"The heat map shows why"
It shows where the model looked, not a cause. See explainability.
"More complex is better"
On tabular data, simpler models often match or beat neural networks. See choosing.
"It is approved, so it works here"
Approval is a safety bar. Your population may differ. See generalisability.
A-Z
Glossary
Every term on this page in one line. Tap a term to jump to its full explanation.