  Electrocardiograms (ECGs) are commonly used by cardiologists to detect
heart-related pathological conditions. Reliable collections of ECGs are crucial
for precise diagnosis. However, in clinical practice, the assignment of
captured ECG recordings to incorrect patients can occur inadvertently. In
collaboration with a clinical and research facility which recognized this
challenge and reached out to us, we present a study that addresses this issue.
In this work, we propose a small and efficient neural-network based model for
determining whether two ECGs originate from the same patient. Our model
demonstrates great generalization capabilities and achieves state-of-the-art
performance in gallery-probe patient identification on PTB-XL while utilizing
760x fewer parameters. Furthermore, we present a technique leveraging our model
for detection of recording-assignment mistakes, showcasing its applicability in
a realistic scenario. Finally, we evaluate our model on a newly collected ECG
dataset specifically curated for this study, and make it public for the
research community.
