Biomedical AI · Published

Quantum Angle–distance kernel for ECG classification and anomaly detection: a quantum-inspired framework for biomedical signal analysis

Venue
BioData Mining
Published
2026-01-29
DOI
10.1186/s13040-026-00519-3
Citations
2 citations
Google Scholar · 2026-09-03
Last verified
2026-07-26

Research question

Can a compact kernel combine angular similarity and distance from a normal reference to classify ECG beats with an inspectable decision geometry?

Condensed abstract

The study introduces a classically simulated quantum angle–distance kernel (QADK). Engineered morphology, spectral, and phase features are encoded as complex vectors; fidelity and reference-relative distance form a kernel used with support vector machines for supervised classification and one-class anomaly detection.

Key contribution

A decomposable kernel joining angular alignment with deviation from a normal reference, evaluated with repeated patient-level splits, anomaly detection, ablations, and computational analysis.

My contribution

The published author-contribution statement credits Arman Salehi with writing and generating the computational code.

Method overview

Each heartbeat is summarized by eight morphology, spectral, and phase descriptors. A parameterized encoding maps the vector into a complex state. The kernel combines squared fidelity with a reference-relative projection gap, producing a Gram matrix for an SVM.

From heartbeats to geometry

Two beats can align closely yet relate differently to a normal reference. Move a state, then see the geometry and every pairwise score respond.

  1. 187-sample beat
  2. 8 descriptors
  3. Complex encoding
  4. Kernel matrix
  5. SVM
State x 60° State y 90°
Encoded state geometryUnit vectors x and y, their projections onto the horizontal reference, and their relative alignment. Geometry uses half the input angle in a real two-dimensional state plane.|0⟩unit-state planereference →
K(x,y)=α F+β D

A kernel, pair by pair

Select a cell to inspect its two states.

10°60°90°130°170°
10°
60°
90°
130°
170°
01
Rows follow the angle order above.Toy scores, not classification accuracy.
Fidelity F0.933Angular alignment
Reference gap D0.025Squared projection difference
Current K(x,y)0.47950% fidelity + 50% reference
Inspect a kernel term

The states are 15.0° apart in this real-state plane. Fidelity measures their alignment; the reference term measures the difference between their horizontal projections.

A two-dimensional teaching example of the paper’s kernel terms, not ECG feature extraction or a patient prediction. α + β = 1 here for exploration; the paper tunes the weights separately. Kernel definition and worked example.

Dataset and evaluation

Data

The paper evaluates pre-segmented, 187-sample ECG heartbeats from the ECG Heartbeat Categorization dataset, using the PTB diagnostic records for the binary normal-versus-pathological task.

Protocol

The supervised study reports 100 patient-level Monte Carlo 80/20 splits, alongside one-class anomaly detection, ablation studies, sensitivity analysis, and comparisons with linear and RBF SVMs, a 1D CNN, and an MLP.

Main results

QADK-SVM reported AUC-ROC 0.977 ± 0.003, macro F1 0.923 ± 0.005, and accuracy 0.937 ± 0.004. One-class anomaly detection reported AUC 0.884 ± 0.005.

AUC-ROC0.977 ± 0.003
Macro F10.923 ± 0.005
Accuracy0.937 ± 0.004
One-class AUC0.884 ± 0.005

Baseline comparison

The reported QADK model clearly exceeded the linear SVM and MLP on headline measures. The RBF SVM retained a small lead before embedding adjustment; the paper reports that tuning the embedding reduced that gap below 0.5 percentage points.

Limitations and failure modes

  • All quantum operations were simulated classically; no quantum hardware was evaluated.
  • Gram-matrix construction scales quadratically with sample count.
  • The model uses engineered heartbeat descriptors rather than end-to-end raw-signal learning.
  • Unsupervised clustering remained weak, and prospective clinical utility or external-site generalization was not established.

Reproducibility

A small, inspectable implementation of the two-dimensional kernel arithmetic.

Worked example checkedChecked locally 2026-09-05 · bundle v1.0.0

Paper-associated code
Zenodo record 17652604 This external archive is separate from the small check below. Its full environment was not executed here.
Inputs for this check
Two teaching angles, 60° and 90°, with equal weights. No ECG records are needed.
Prerequisites
Python 3.10+ · standard library only · CPU · no network or large dataset download. A notebook environment is optional.
Full study data
ECG Heartbeat Categorization dataset (PTB records) Consult the paper and dataset documentation before attempting the full study.

Run the small check

  1. Download and extract the complete bundle.
  2. Open a terminal in the extracted folder and run python check.py.
  3. Evaluate fidelity, the squared reference-projection gap, and their weighted sum. Compare every value with the supplied expected output.

Includes Python, an equivalent notebook, source JSON, expected output, and SHA-256 provenance. The notebook runs from the extracted folder.

Expected output and individual files

F = 0.933013 · D = 0.025255 · K = 0.479134

What this does not establish

This does not reproduce feature extraction, patient-wise splits, model training, or ECG accuracy. The equal normalized weights belong to this teaching example.

These checks use the portfolio’s existing sourced records. External archive links could not be freshly rechecked during package preparation. A passing check is not a full-paper replication.

The decisions behind the method

A research note on similarity geometry, patient-wise evaluation, and what the QADK study does—and does not—show.

Read the research note

Verification sources

Cite this work

Download .bibDownload .ris

Arman Salehi, Hamid Reza Goudarzi, Ashkan Heydarian (2026). Quantum Angle–distance kernel for ECG classification and anomaly detection: a quantum-inspired framework for biomedical signal analysis. BioData Mining, 19, Article 14. https://doi.org/10.1186/s13040-026-00519-3

BibTeX
@article{salehi2026qadk,
  title = {Quantum Angle–distance kernel for ECG classification and anomaly detection: a quantum-inspired framework for biomedical signal analysis},
  author = {Arman Salehi and Hamid Reza Goudarzi and Ashkan Heydarian},
  year = {2026},
  doi = {10.1186/s13040-026-00519-3},
  journal = {BioData Mining},
  volume = {19},
  article-number = {14},
  publisher = {Springer Nature}
}

Publication record last verified 2026-07-26.

Discuss this research

Interested in reference geometry, patient-wise evaluation, or a stronger kernel baseline? Include the settings that prompted your question.

Draft a research question

Opens your email app with the paper and current experiment. Nothing is sent automatically.