fmeneguiPTEN

Article in English · PT / EN changes navigation only.

Can System-One AI Models Classify ECG Images?

ECG
AI
Experiments
Can two general-purpose decision models identify ECG abnormalities from images? A zero-shot evaluation on CODE Test using AUROC and probability calibration.
Author

Felipe Meneguitti Dias

Published

October 15, 2026

I wanted to try something simple: what happens when we show an ECG to an AI model that was not built specifically for ECG interpretation?

There are already good models trained on ECG signals. Here, I was curious about two newer systems that take an image and return a structured decision. Would they recognize common ECG findings? And when they say YES or NO, how meaningful are their probabilities?

This is an exploratory experiment, not a clinical diagnostic tool.

The models

I tested Jev 1.14.0 and GPT-6 Luna Decisions, accessed through OpenAI’s Decisions API.

Both belong to a category I refer to here as System-One AI: models designed to make direct, structured decisions instead of writing long explanations. The name is an analogy, not a claim about how these networks think.

Both APIs can look at an image and answer questions such as “Is atrial fibrillation present?” They return YES or NO and a probability for each answer. That gives us more to evaluate than a binary prediction alone.

The ECGs

I used 827 exams from the CODE Test dataset. The original recordings are digital signals, but the models only saw images of twelve-lead ECGs.

The images were created using ecg-plot, in the same Sangha-style layout used in an earlier ECG image study. The rendered images and reference labels are available in the public CODE Test repository.

We evaluated six findings:

Label Finding Positive exams
1dAVb First-degree AV block 28
RBBB Right bundle branch block 34
LBBB Left bundle branch block 30
SB Sinus bradycardia 16
AF Atrial fibrillation 13
ST Sinus tachycardia 37

This is a multilabel task. One ECG can have more than one finding. And an ECG with none of these six labels is not necessarily normal.

I resized each image once, keeping its aspect ratio, and sent the same PNG to both APIs. Neither received the raw signals, clinical history, or correct labels. The resizing itself may hide small details, which is one limitation of this setup.

Real ECG inputs and recorded JSON outputs

These examples are original benchmark inputs. Their saved answer objects are reproduced below with no changes to choices, confidence values or probabilities. Reference labels are evaluation metadata and were never sent to the models. These two illustrative cases are not a representative performance sample.

CODE Test ecg_0

CODE Test ecg_0: twelve-lead tracing used in the recorded evaluation

CODE Test ecg_0, the twelve-lead ECG input used by both models.

Reference labels: none of the six target labels.

The following compact view retains the exact returned choices and YES probabilities. The model outputs have not been corrected to match the reference labels.

{
  "jev": {
    "1dAVb": {"choice": "NO", "p_yes": 0.42},
    "RBBB": {"choice": "NO", "p_yes": 0.43},
    "LBBB": {"choice": "NO", "p_yes": 0.49},
    "SB": {"choice": "NO", "p_yes": 0.37},
    "AF": {"choice": "NO", "p_yes": 0.14},
    "ST": {"choice": "NO", "p_yes": 0.46}
  },
  "gpt-decisions": {
    "1dAVb": {"choice": "NO", "p_yes": 0.14},
    "RBBB": {"choice": "NO", "p_yes": 0.02},
    "LBBB": {"choice": "NO", "p_yes": 0.0},
    "SB": {"choice": "NO", "p_yes": 0.07},
    "AF": {"choice": "NO", "p_yes": 0.0},
    "ST": {"choice": "NO", "p_yes": 0.0}
  }
}

Download the saved answer objects and reference labels.

Show saved JSON with YES/NO probabilities and confidence

The answers and model fields below are copied from the saved run records. The outer object pairs both models with the benchmark labels. This is not a complete HTTP response.

{
  "image": "ecg_0",
  "reference_labels": {
    "1dAVb": 0,
    "RBBB": 0,
    "LBBB": 0,
    "SB": 0,
    "AF": 0,
    "ST": 0
  },
  "jev": {
    "model": "jev-1.14.0",
    "answers": {
      "1dAVb": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.16,
        "probabilities": {
          "YES": 0.42,
          "NO": 0.58
        }
      },
      "RBBB": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.14,
        "probabilities": {
          "YES": 0.43,
          "NO": 0.57
        }
      },
      "LBBB": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.02,
        "probabilities": {
          "YES": 0.49,
          "NO": 0.51
        }
      },
      "SB": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.26,
        "probabilities": {
          "YES": 0.37,
          "NO": 0.63
        }
      },
      "AF": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.72,
        "probabilities": {
          "YES": 0.14,
          "NO": 0.86
        }
      },
      "ST": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.08,
        "probabilities": {
          "YES": 0.46,
          "NO": 0.54
        }
      }
    }
  },
  "gpt-decisions": {
    "model": "gpt-6-luna-decisions",
    "answers": {
      "1dAVb": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.72,
        "probabilities": {
          "YES": 0.14,
          "NO": 0.86
        }
      },
      "RBBB": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.96,
        "probabilities": {
          "YES": 0.02,
          "NO": 0.98
        }
      },
      "LBBB": {
        "type": "choice",
        "choice": "NO",
        "confidence": 1.0,
        "probabilities": {
          "YES": 0.0,
          "NO": 1.0
        }
      },
      "SB": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.86,
        "probabilities": {
          "YES": 0.07,
          "NO": 0.93
        }
      },
      "AF": {
        "type": "choice",
        "choice": "NO",
        "confidence": 1.0,
        "probabilities": {
          "YES": 0.0,
          "NO": 1.0
        }
      },
      "ST": {
        "type": "choice",
        "choice": "NO",
        "confidence": 1.0,
        "probabilities": {
          "YES": 0.0,
          "NO": 1.0
        }
      }
    }
  }
}

CODE Test ecg_1

CODE Test ecg_1: twelve-lead tracing used in the recorded evaluation

CODE Test ecg_1, the twelve-lead ECG input used by both models.

Reference labels: LBBB.

The following compact view retains the exact returned choices and YES probabilities. The model outputs have not been corrected to match the reference labels.

{
  "jev": {
    "1dAVb": {"choice": "NO", "p_yes": 0.24},
    "RBBB": {"choice": "NO", "p_yes": 0.37},
    "LBBB": {"choice": "YES", "p_yes": 0.64},
    "SB": {"choice": "NO", "p_yes": 0.17},
    "AF": {"choice": "YES", "p_yes": 0.52},
    "ST": {"choice": "NO", "p_yes": 0.39}
  },
  "gpt-decisions": {
    "1dAVb": {"choice": "NO", "p_yes": 0.1},
    "RBBB": {"choice": "NO", "p_yes": 0.13},
    "LBBB": {"choice": "YES", "p_yes": 0.53},
    "SB": {"choice": "NO", "p_yes": 0.13},
    "AF": {"choice": "NO", "p_yes": 0.03},
    "ST": {"choice": "NO", "p_yes": 0.04}
  }
}

Download the saved answer objects and reference labels.

Show saved JSON with YES/NO probabilities and confidence

The answers and model fields below are copied from the saved run records. The outer object pairs both models with the benchmark labels. This is not a complete HTTP response.

{
  "image": "ecg_1",
  "reference_labels": {
    "1dAVb": 0,
    "RBBB": 0,
    "LBBB": 1,
    "SB": 0,
    "AF": 0,
    "ST": 0
  },
  "jev": {
    "model": "jev-1.14.0",
    "answers": {
      "1dAVb": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.52,
        "probabilities": {
          "YES": 0.24,
          "NO": 0.76
        }
      },
      "RBBB": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.26,
        "probabilities": {
          "YES": 0.37,
          "NO": 0.63
        }
      },
      "LBBB": {
        "type": "choice",
        "choice": "YES",
        "confidence": 0.28,
        "probabilities": {
          "YES": 0.64,
          "NO": 0.36
        }
      },
      "SB": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.66,
        "probabilities": {
          "YES": 0.17,
          "NO": 0.83
        }
      },
      "AF": {
        "type": "choice",
        "choice": "YES",
        "confidence": 0.04,
        "probabilities": {
          "YES": 0.52,
          "NO": 0.48
        }
      },
      "ST": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.22,
        "probabilities": {
          "YES": 0.39,
          "NO": 0.61
        }
      }
    }
  },
  "gpt-decisions": {
    "model": "gpt-6-luna-decisions",
    "answers": {
      "1dAVb": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.8,
        "probabilities": {
          "YES": 0.1,
          "NO": 0.9
        }
      },
      "RBBB": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.74,
        "probabilities": {
          "YES": 0.13,
          "NO": 0.87
        }
      },
      "LBBB": {
        "type": "choice",
        "choice": "YES",
        "confidence": 0.06,
        "probabilities": {
          "YES": 0.53,
          "NO": 0.47
        }
      },
      "SB": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.74,
        "probabilities": {
          "YES": 0.13,
          "NO": 0.87
        }
      },
      "AF": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.94,
        "probabilities": {
          "YES": 0.03,
          "NO": 0.97
        }
      },
      "ST": {
        "type": "choice",
        "choice": "NO",
        "confidence": 0.92,
        "probabilities": {
          "YES": 0.04,
          "NO": 0.96
        }
      }
    }
  }
}

What I asked

I kept the prompt short on purpose. I did not give the models a list of cardiology rules. For each finding, I asked:

Assess the 12-lead ECG image in `ecg_image`.
Is {condition} present?
Evaluate this finding independently of other diagnoses.

YES: {condition} is present
NO:  {condition} is absent

For atrial fibrillation, {condition} becomes Atrial fibrillation. GPT Decisions received the equivalent independent questions, using its own API format.

The complete request payloads and inference scripts are retained privately for reproducibility.

One example illustrates why the probabilities matter. On ECG ecg_0, both models correctly answered NO for LBBB. But Jev assigned 0.49 to YES, while GPT Decisions assigned 0.00. The decisions matched, but the models expressed very different levels of certainty.

These are probabilities returned by the APIs, not validated estimates of clinical risk.

How I measured performance

Jev returned predictions for all 827 images. GPT Decisions succeeded on 826 and failed on ecg_818. I excluded that image from both models so the comparison uses exactly the same 826 ECGs.

I focused on two questions.

Discrimination: does a model give higher scores to ECGs that truly have a finding? I measured this with the area under the ROC curve (AUROC). A value near 0.5 indicates little ability to rank positive and negative cases. A value near 1.0 is much better.

Calibration: when a model says 70%, does the finding actually occur about 70% of the time among exams with that predicted probability? A model can rank cases well while reporting poor probabilities.

I also calculated the Brier Score, the average squared difference between the predicted probability and the true label. Lower is better. Brier reflects both probability calibration and discrimination, so it should not be treated as a pure calibration measure.

Results

ROC and calibration results for six ECG findings, comparing Jev and GPT Decisions with bootstrap uncertainty bands.

Figure 1. Top: ROC curves for the six findings. The values marked AUROC show the area under each curve. Bottom: predicted versus observed probabilities, with score histograms. The dashed line marks perfect calibration. Shaded regions show pointwise 95% bootstrap intervals from 1,000 stratified resamples. Calibration curves use shape-preserving PCHIP interpolation between observed bin means, without extrapolating beyond the data. The interpolation changes the display, not the model predictions.

Finding Jev AUROC GPT AUROC Jev Brier ↓ GPT Brier ↓
1dAVb 0.453 0.457 0.135 0.066
RBBB 0.601 0.805 0.137 0.039
LBBB 0.976 0.953 0.173 0.025
SB 0.730 0.789 0.158 0.021
AF 0.613 0.697 0.185 0.022
ST 0.778 0.966 0.228 0.026

GPT Decisions had a higher macro-AUROC (0.778 versus 0.692) and a lower mean Brier Score (0.033 versus 0.169). Jev did particularly well on LBBB, with an AUROC of 0.976.

The differences across findings are striking. For some diagnoses, the models could rank exams fairly well. For others, especially first-degree AV block, they struggled.

I would not draw strong clinical conclusions from these numbers. Only 13 exams were positive for AF and 16 for SB. That makes calibration estimates especially uncertain. The shaded intervals describe uncertainty within this sample, not a formal statistical test of which model is better. A prevalence-only baseline would also be useful when interpreting Brier Scores.

How does this compare with an ECG-specific model?

Sangha et al. (2022) trained a model specifically to classify ECG images. Their paper reports results on the cardiologist-validated CODE Test set of 827 ECGs, which is the same cohort used in this experiment. Below are the AUROCs for all six diagnoses, taken directly from Table 1 of their paper.

Finding Sangha image model AUROC (95% CI)
First-degree AV block (1dAVb) 0.995 (0.991–0.999)
Right bundle branch block (RBBB) 0.995 (0.992–0.999)
Left bundle branch block (LBBB) 1.000 (1.000–1.000)
Sinus bradycardia (SB) 0.997 (0.994–1.000)
Atrial fibrillation (AF) 0.997 (0.993–1.000)
Sinus tachycardia (ST) 0.998 (0.996–1.000)

Source: Sangha et al., Nature Communications (2022), Table 1, image-based model, cardiologist-validated test set (N = 827). The reported class-weighted mean AUROC was 0.997 (95% CI 0.994–1.000).

These are impressive results for a model trained specifically on ECG images. They also give useful context for our exploratory experiment. The published numbers and our API results are not an exactly matched head-to-head evaluation: our paired analysis uses 826 ECGs, and image preprocessing and model development differ. See the original study for the full evaluation.

Where to go next

The CODE Test is a useful starting point, but it is small for this kind of evaluation. I would like to repeat the experiment on larger and more varied collections.

PTB-XL contains 21,799 ECG recordings and many diagnostic labels. It could help us see whether these findings hold with more exams and different conditions.

The George B. Moody PhysioNet Challenge 2024 is another interesting direction because it includes ECG images with different layouts and visual artifacts. That would test something the clean CODE renderings cannot: how robust the models are to the kinds of images we see outside a controlled benchmark.

Update, October 2026: We have now completed the larger experiment. Read the PTB-XL follow-up with 21,796 paired ECGs, AUROC, calibration and F1-score. The PhysioNet Challenge 2024 remains a separate evaluation protocol.

Final thoughts

Both models could read an ECG image and return structured answers. That alone is interesting, but it does not mean they can interpret ECGs reliably.

GPT Decisions generally performed better in this experiment, while Jev showed strong discrimination for LBBB. More importantly, the experiment reminded me that making a decision, ranking cases correctly, and assigning useful probabilities are different abilities.

References

  1. Sangha V, Mortazavi BJ, Haimovich AD, et al. (2022). Automated multilabel diagnosis on electrocardiographic images and signals. Nature Communications, 13, 1583. Primary source for the specialist model and its CODE Test AUROCs.
  2. Ribeiro AH, Ribeiro MH, Paixão GMM, et al. (2020). Automatic diagnosis of the 12-lead ECG using a deep neural network. Nature Communications, 11, 1760. Background on the CODE study and ECG classification.
  3. Wagner P, Strodthoff N, Bousseljot RD, et al. (2020). PTB-XL, a large publicly available electrocardiography dataset. Scientific Data, 7, 154. Reference for the proposed larger evaluation.
  4. George B. Moody PhysioNet Challenge 2024. ECG image digitization and classification challenge.
  5. ecg-plot. Library used to render ECG signals as images.
  6. CODE Test rendered ECG images and reference labels. Public repository with the Sangha-style renderings.
  7. TypeSafe AI and OpenAI API documentation. Model and API references.

Cite this post

Copy this entry into your .bib file.

@misc{dias2026-system-one-ecg,
  author = {Dias, Felipe Meneguitti},
  title = {{Can System-One AI Models Classify ECG Images?}},
  year = {2026},
  month = {10},
  howpublished = {Blog post},
  url = {https://fmenegui.com/blog/system-one-ecg/},
  note = {Published on 2026-10-15}
}
Download .bib

In LaTeX, use \cite{dias2026-system-one-ecg}.

Search