Palo Alto Health Labs
Resource · Data labeling

ECG annotation and arrhythmia algorithm evaluation: beat and rhythm labels, PhysioNet reference databases and ANSI/AAMI EC57 reporting

Beat and rhythm labels, the AAMI classes, the standard reference databases, EC57 metrics and FDA expectations, from PhysioNet, WFDB, AAMI and FDA sources only.

Format
Guide
Read time
10 min
Sources
PhysioNet, WFDB, AAMI, FDA
Updated
Oct 27, 2026

The short answer

To evaluate an arrhythmia algorithm the way device makers and FDA reviewers expect, you compare its output, beat by beat and episode by episode, against expert reference annotations on standard ECG databases. You then report the results using the method in ANSI/AAMI EC57, which FDA recognizes. The standard databases are the MIT-BIH Arrhythmia, AHA, European ST-T, Noise Stress Test and CU databases. All except the AHA Database are free on PhysioNet; the AHA Database is available only from ECRI. The reference software for the beat-by-beat comparison is bxb, part of the free WFDB toolkit.

EC57 calls itself a recommended practice, not a performance standard. It tells you how to test and report, not what score to hit. Its own scope says database results are “uncertain indicators of performance in clinical settings.” That makes the quality of your own reference labels just as important as the benchmark.

Sources: ANSI/AAMI EC57:2012/(R)2020 (AAMI catalog page); ANSI/AAMI EC57:2012/(R)2020 (publisher preview pages), section 1.1; FDA recognized consensus standard 3-118; PhysioNet AHA Database page; bxb man page. This page is a summary for planning, not regulatory advice for a specific device.

Beat labels and the five AAMI classes

PhysioNet databases store reference labels as WFDB annotation files. Each annotation has a time (sample number), a type code and optional fields: subtype, channel, number and an auxiliary text string. Beat-type codes come from the MIT-BIH convention. For evaluation, they are collapsed into five classes:

AAMI classMeaningPhysioBank beat codes mapped to it (bxb)
NNormal or bundle branch block beatN (normal), L (left BBB), R (right BBB), B (BBB, unspecified)
SSupraventricular ectopic beat (SVEB)A (atrial premature), a (aberrated atrial premature), J (nodal premature), S (supraventricular premature), e (atrial escape), j (nodal escape), n (supraventricular escape)
VVentricular ectopic beat (VEB)V (premature ventricular contraction), r (R-on-T PVC), E (ventricular escape)
FFusion of ventricular and normal beatF
QUnclassifiable, including pacedQ (unclassifiable), / (paced), f (fusion of paced and normal), ? (not classified during learning)

The mapping above is the one coded in bxb. If SVEB statistics are not requested, the S codes are counted as N. A comment in the WFDB source notes that the AAMI recommended practice excludes records containing paced beats from its reporting requirements, and ecgeval ships record lists that leave them out. In the MIT-BIH database, four records include paced beats: 102, 104, 107 and 217.

Sources: PhysioBank annotations reference; WFDB source code (bxb.c); ecgeval; MIT-BIH Arrhythmia Database Directory.

Rhythm and non-beat labels

Rhythms are not labeled beat by beat. A rhythm change annotation (+) carries an auxiliary string that marks the start of the new rhythm, for example (N normal sinus rhythm, (AFIB atrial fibrillation, (AFL atrial flutter, (VT ventricular tachycardia, (SVTA supraventricular tachyarrhythmia, (B ventricular bigeminy and (VFL ventricular flutter. Ventricular fibrillation or flutter episodes can also be bracketed with [ and ]. Other non-beat codes mark signal quality changes (~), isolated QRS-like artifacts (|), ST changes (s), T-wave changes (T), non-conducted P waves (x) and free-text comments (").

EC57-style evaluation needs only beat annotations from the algorithm under test. Rhythm, VF, AF and ST annotations are needed only if you claim those features.

Sources: PhysioBank annotations reference; Evaluating ECG Analyzers (WFDB Applications Guide).

The reference databases

DatabaseWhat it containsReference labelsAccess
MIT-BIH Arrhythmia (MITDB)48 half-hour, two-channel records from 47 subjects; 360 HzBeat by beat, about 110,000 beats; rhythm labelsFree on PhysioNet (ODC-By 1.0)
AHA DatabaseDevelopment set: 80 records in 8 classes of ventricular ectopy; test set: 75 records; 250 HzBeat by beat on the final 30 minutes; SVEBs not separated from normalOnly from ECRI, not PhysioNet
European ST-T (EDB)90 two-hour excerpts from 79 subjects; 250 HzBeats, plus 367 ST and 401 T-wave episodesFree on PhysioNet
Noise Stress Test (NSTDB)12 half-hour ECG records plus 3 noise records (bw, ma, em)Copies of the clean reference labels; SNRs 24 to −6 dBFree on PhysioNet
CU Ventricular Tachyarrhythmia (CUDB)35 eight-minute records of sustained VT, flutter and VF; 250 HzRhythm onset labels; beat labels are not definitiveFree on PhysioNet
MIT-BIH Supraventricular (SVDB)78 half-hour recordsAdds supraventricular examples missing from MITDBFree on PhysioNet
MIT-BIH Atrial Fibrillation (AFDB)25 ten-hour recordings, mostly paroxysmal AF; 250 HzManual rhythm labels; beat files are uncorrected detector outputFree on PhysioNet

The WFDB guide lists the AHA, MIT-BIH, European ST-T, Noise Stress Test and CU databases as the ones EC38 and EC57 require. The supraventricular and AF databases are useful supplements for SVEB and AF claims. The AHA Database was built at Washington University in St. Louis with AHA sponsorship and NHLBI funding, and completed in 1985. PhysioNet's page states that it “has not been made available by ECRI for download from PhysioNet or any other site; it may be obtained only from ECRI.” PhysioNet hosts one sample record that was excluded from the database, plus converters that translate ECRI's formats into WFDB format.

Sources: MIT-BIH Arrhythmia Database (PhysioNet); PhysioNet AHA Database page; WFDB a2m man page; European ST-T Database; MIT-BIH Noise Stress Test Database; CU Ventricular Tachyarrhythmia Database; MIT-BIH Supraventricular Arrhythmia Database; MIT-BIH Atrial Fibrillation Database; Evaluating ECG Analyzers: databases.

What EC57 performance reporting looks like

What is measuredStatisticWFDB tool
QRS detectionSensitivity (Se) = TP / (TP + FN); positive predictivity (+P) = TP / (TP + FP)bxb
VEB and SVEB classificationSe, +P and false positive rate (FPR = FP / (TN + FP)) per record and in totalbxb (SVEB with -C, -L or -S)
Ectopic runsRun sensitivity and positive predictivity for couplets, short runs and long runsrxr
VF and AFEpisode and duration sensitivity and positive predictivityepicmp
ST segmentEpisode detection plus ST deviation measurement errorepicmp
Heart rate and HRVMeasurement error against the reference annotationsmxm; bxb RR statistics

Some rules are built into the reference tools:

The bxb man page says it is the reference implementation of the EC38 and EC57 beat-by-beat comparison and “must be used to obtain the beat-by-beat performance statistics cited in EC38 and EC57 in order to be in compliance with these standards.” The rxr tool handles runs, epicmp handles VF, AF and ST episodes, and ecgeval runs the full set and summarizes it.

Sources: bxb man page; Evaluating ECG Analyzers (WFDB Applications Guide); ANSI/AAMI EC57:2012/(R)2020 (publisher preview pages), section 1.1. The man pages cite the 1998 editions of EC38 and EC57; we have not checked the clause numbers against the 2012 text.

Noise stress testing

The Noise Stress Test Database adds calibrated recorded noise to two clean MIT-BIH records (118 and 119). After the first 5 minutes, two-minute noisy segments alternate with two-minute clean ones. Signal-to-noise ratios are 24, 18, 12, 6, 0 and −6 dB. Electrode motion artifact is used because it “can mimic the appearance of ectopic beats and cannot be removed easily by simple filters.” The reference labels are copies of the clean originals, so every extra or missed beat is the algorithm's error.

The WFDB guide notes that “EC38 specifies that performance on these records must be reported, although no specific performance levels are required.” The nst tool can generate more noisy records from any ECG record. This is useful for wearable signals, which carry more motion artifact than Holter tapes.

Sources: MIT-BIH Noise Stress Test Database; Evaluating ECG Analyzers: noise stress testing.

What FDA expects

FDA recognizes ANSI/AAMI EC57:2012 as consensus standard 3-118 (complete recognition, entered January 30, 2014). The recognition covers arrhythmia detectors and alarms, ST-segment monitors, cardiac monitors, electrocardiographs and ambulatory ECGs with analysis algorithms (21 CFR 870.1025, 870.2300, 870.2340 and 870.2800). The current AAMI edition is EC57:2012, reaffirmed in 2020.

For arrhythmia detectors, the special control under 21 CFR 870.1025 is FDA's 2003 guidance. It still cites EC57:1998 and recommends:

It also says a device tested only for specific arrhythmias should be labeled only for those.

Public 510(k) summaries show how this appears in practice. The summary for K151269, an ECG patch arrhythmia detector, states that its algorithm “has been tested in accordance with the requirements of the FDA recognized standard ANSI/AAMI EC57: 2012.” The summary for K173461, a wearable ECG recorder, reports validation on MIT-BIH, AHA and MIT-BIH AF data plus a private database “annotated using experienced medical professionals, using prospectively defined guidelines.” Search similar devices in the FDA 510(k) database.

Sources: FDA recognized consensus standard 3-118; FDA Class II Special Controls Guidance: Arrhythmia Detector and Alarm (2003); 21 CFR 870.1025; K151269; K173461; AAMI EC57 catalog page.

Limits and common pitfalls

Sources: ANSI/AAMI EC57:2012/(R)2020 (publisher preview pages), section 1.1; Evaluating ECG Analyzers: databases; MIT-BIH Arrhythmia Database; MIT-BIH Atrial Fibrillation Database; CU Ventricular Tachyarrhythmia Database.

Labeling your own ECG data: a checklist

Sources: MIT-BIH Arrhythmia Database; European ST-T Database; FDA arrhythmia detector guidance; bxb man page. The checklist is our practice summary.

Key references

Related resources

Frequently asked questions

What is ANSI/AAMI EC57?

EC57 is an AAMI recommended practice for testing and reporting the performance of cardiac rhythm and ST-segment measurement algorithms. The current edition is EC57:2012, reaffirmed in 2020. It covers beat-by-beat, run-by-run, VF/AF and ST comparisons on standard databases. It is not a performance standard and does not set pass marks. FDA recognizes EC57:2012 as consensus standard 3-118.

Is the AHA ECG database available on PhysioNet?

No. PhysioNet states that the AHA Database has not been made available by ECRI for download from PhysioNet or any other site, and may be obtained only from ECRI. PhysioNet hosts only one sample record that was excluded from the database, plus WFDB tools to convert ECRI's formats.

What are the AAMI beat classes?

For evaluation, MIT-BIH beat codes are grouped into five classes: N (normal and bundle branch block beats), S (supraventricular ectopic beats), V (ventricular ectopic beats), F (fusion of ventricular and normal beats) and Q (unclassifiable, including paced beats).

Which metrics does EC57 use for beat detection and classification?

Sensitivity and positive predictivity for QRS detection, and sensitivity, positive predictivity and false positive rate for ventricular and supraventricular ectopic beats. These are computed beat by beat with a 0.15 second matching window after a 5-minute learning period, using the WFDB bxb tool as the reference implementation.

Scope it in 30 minutes

Book a scoping call and we'll name the smallest engagement that moves you forward. Most teams start with the fixed-scope Initial Audit.

Book a 30-min scoping call

Prefer to write? Send a short note.