Manuscript Offprint
arXiv:2611.02041ECGJev: Question-Conditioned Option Scoring for 12-Lead ECG Interpretation
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original. This text is shared under the same licence.
ABSTRACT
Clinical interpretation of a 12-lead electrocardiogram (ECG) often requires answering targeted diagnostic questions with clear, quantifiable decisions. We introduce ECGJev, the first ECG framework built on a decision decoder, a pretrained language model trained to return a probability for every listed option. A question-conditioned bridge compresses frozen waveform and spectrogram features into 16 ECG tokens, and a two-stage procedure adapts the bridge and low-rank adapters on the decoder's native option readout using diagnostic labels alone, scoring all options for a question in one forward pass. Evaluated across four ECG benchmarks, ECGJev achieves the highest macro-F1 on CPSC2018 (80.46%), PTB-XL (71.68%) and Chapman (96.86%), and generalizes competitively to the small-sample PTB cohort. Concept probes and perturbation analyses further show that its predictions rely directly on the ECG input, remain stable under option-order and wording variations, and transfer zero-shot to unseen waveform concepts. Our code is available at https://github.com/zhuoyuanli-lab/ECGJev.
Index Terms— ECG interpretation, spectrogram images, question conditioning, decision models
1. INTRODUCTION
Interpreting a 12-lead electrocardiogram (ECG) relates beat timing, conduction intervals and wave morphology [1], motivating multiscale gating, lightweight and noise-routed models [2, 3, 4, 5] and foundation encoders [6, 7].
A spectrogram complements the waveform with local frequency content laid out for an image encoder; TSRNet [8] combined both views for anomaly detection, yet adapting them as the queried finding changes remains open.
Language offers a flexible way to specify that finding. While classification heads on foundation encoders [7, 9] score fixed label sets in one pass, they lock the output space and cannot interpret textual criteria or unseen queries; ECG-language encoders [10, 11] match global descriptions without question-specific token selection. Conversely, generative
ECG-LLMs [12, 13, 14, 15] accept open questions, but detour structured judgments through free-text generation—requiring post-hoc parsing while exposing predictions to vocabulary-wide competition and prompt biases.
We instead formulate direct option scoring via a pretrained decision model. StartLux-Decision [16] trains language models directly to output probability distributions over lettered options rather than free text, providing a typed decision primitive adaptable from diagnostic labels alone. Prior ECG models have not explored this paradigm. Passing hundreds of signal and spectral tokens to the decoder while isolating query-relevant evidence—e.g., RR regularity vs. conduction intervals—motivates conditioning compression on the query before option scoring [17].
ECGJev (Fig. 1) makes three contributions. (1) To our knowledge, it is the first ECG model built on a decision decoder: compressed ECG tokens enter a pretrained decision model whose native option readout is optimized directly from diagnostic labels, aligning training with inference. By decoupling displayed option letters from clinical option meanings under randomized option-order adaptation, it suppresses lexical token priors and position bias for unbiased diagnostic judgment. (2) We design a lightweight question-conditioned multimodal bridge that fuses frozen waveform and spectrogram features into 16 ECG tokens with low-rank decoder adapters (13.40M trainable parameters on CPSC2018) and no free-text supervision. (3) Across four benchmarks, ECGJev outperforms both foundation-encoder heads and generative ECG-LLMs on CPSC2018, PTB-XL and Chapman, delivering decisive option probabilities, option-order invariance, and zero-shot transfer to waveform concepts.
2.1. Task and ECG representations
Given a 12-lead recording x and a diagnostic question about label d, ECGJev scores the options True and False. Each question is accompanied by clinical guidance, a short

Fig. 1. ECGJev connects two views of the same recording to a diagnostic question: (a) frozen waveform and spectrogram-image encoders; (b) question-conditioned compression into 16 ECG tokens; (c) direct option scoring; and (d) description alignment followed by the disease-question loss. The clinical guidance is a textual description of the queried disease. Token counts illustrate CPSC2018.
textual description of disease . Questions are evaluated separately for multilabel prediction. For mutually exclusive rhythm classes, the largest True–False score difference determines the prediction.
Recordings are resampled to 500 Hz (12 s for CPSC2018, 10 s otherwise), notch-filtered at 50 Hz, band-pass filtered at 0.67–40 Hz, baseline-corrected and z-score normalized following established preprocessing protocols [2, 3]. The waveform branch takes the pre-pooling features of frozen ECG-Founder [7]: 24 tokens of width 1,024 for CPSC2018. For the spectral branch, each lead's short-time Fourier transform (Hann window 256, hop 32, FFT size 512) gives over 0–40 Hz, clipped at training-set 1st/99th percentiles. The image is resized to and encoded by a frozen ViT-B/16 [18]. Discarding the CLS token and pooling its patch grid to four frequency rows yields tokens per lead, i.e. tokens of width 768.
2.2. Question-conditioned compression
We project both views to width and concatenate their tokens to form . Fixed sinusoidal temporal and frequency encodings and learned lead and view embeddings identify their origins. We average the frozen decoder embeddings of the question and its clinical guidance to obtain . Options and ECG tokens are excluded from this average.
Let denote learned queries and a learned projection to width . The initial queries are
where is a column vector of ones that broadcasts the question vector to all queries, and the learned scalar starts at
0.1. Two blocks of cross-attention to and feed-forward updates produce 16 compressed tokens. Projection and layer normalization map them to the decoder width, yielding . The token budget is thus fixed while the compression can adapt to the question.
2.3. Option scoring and adaptation
Decision decoder. We adopt the 0.8B StartLux-Decision checkpoint [16], a 24-layer Qwen3.5-based architecture mixing linear and full attention at width 1,024. Pretrained with soft cross-entropy over option-letter probabilities across 2.7M general-domain text decisions (classification, question answering, safety and tool use), it provides a dedicated option-scoring readout prior to physiological-signal adaptation. The tokens occupy the decoder's continuous-input positions alongside the question, clinical guidance and lettered options. Let be its hidden state at the last non-padding prompt position. If maps option meaning to its displayed letter and is the corresponding frozen output-head vector, then
Here , the softmax probability of True over the two options, equals the sigmoid of the margin ; letters are mapped back to meanings. Each question requires one causal forward pass and no answer-token generation.
Unbiased option scoring via symbol decoupling. Generative models such as Q-Heart and anyECG-chat approximate decisions via “yes”/“no” token likelihoods, where both tokens compete across the full vocabulary under a text-generation
Table 1. Classification comparison across four ECG benchmarks (%, mean ± SD over three runs). F1 denotes macro-F1; Acc. denotes label-wise binary accuracy on multilabel tasks and four-class accuracy on Chapman. Bold/underline: best/second-best score per column.
| Model | Setting | CPSC2018 | PTB-XL | Chapman | PTB | ||||
|---|---|---|---|---|---|---|---|---|---|
| F1 ↑ | Acc. ↑ | F1 ↑ | Acc. ↑ | F1 ↑ | Acc. ↑ | F1 ↑ | Acc. ↑ | ||
| xECG [9] | head | 75.14 ± 0.13 | 95.57 ± 0.07 | 70.52 ± 0.31 | 86.65 ± 0.37 | 95.39 ± 1.10 | 96.84 ± 0.63 | 43.42 ± 6.30 | 90.09 ± 2.65 |
| MERL [10] | head | 65.24 ± 0.29 | 92.15 ± 0.35 | 69.15 ± 0.18 | 85.51 ± 0.21 | 88.23 ± 0.83 | 91.43 ± 0.38 | 21.20 ± 0.23 | 59.78 ± 4.07 |
| Q-Heart [14] | adapter | 76.06 ± 1.07 | 95.50 ± 0.18 | 71.22 ± 0.41 | 88.78 ± 0.13 | 91.18 ± 0.27 | 94.79 ± 0.12 | 14.82 ± 0.80 | 94.40 ± 0.00 |
| anyECG-chat [15] | LoRA | 70.02 ± 1.90 | 95.25 ± 0.08 | 62.24 ± 3.55 | 87.28 ± 0.25 | 93.42 ± 0.47 | 96.10 ± 0.36 | 13.23 ± 2.99 | 94.22 ± 0.41 |
| ECGJev | ours | 80.46 ± 0.67 | 96.68 ± 0.16 | 71.68 ± 0.38 | 87.52 ± 0.41 | 96.86 ± 0.74 | 98.23 ± 0.34 | 35.02 ± 8.68 | 83.69 ± 4.67 |
Table 2. Ablation study on CPSC2018 (%, mean ± SD). Δ: performance gain of full ECGJev over each ablated variant (percentage points). Bold/underline: best/second-best scores.
| Variant | Macro-F1 | Accuracy | ||
|---|---|---|---|---|
| Score | Δ | Score | Δ | |
| ECGJev | 80.46 ± 0.67 | — | 96.68 ± 0.16 | — |
| Spectrogram only | 64.57 ± 0.73 | +15.89 | 92.45 ± 0.52 | +4.23 |
| w/o conditioning | 79.75 ± 1.04 | +0.71 | 96.52 ± 0.12 | +0.16 |
| Name-only | 79.98 ± 1.02 | +0.48 | 96.55 ± 0.16 | +0.13 |
| Length control | 79.60 ± 0.83 | +0.86 | 96.59 ± 0.08 | +0.09 |
| w/o alignment | 79.04 ± 1.58 | +1.42 | 96.51 ± 0.39 | +0.17 |
objective, inheriting lexical frequency priors and prompt-order sensitivity. Conversely, fixed classification heads cannot read clinical criteria or score unseen concepts. ECGJev overcomes both limitations: Stage 2 optimizes the exact native decision margin used at inference while mapping arbitrary option letters back to clinical meanings via under random letter-order swaps. Decoupling surface symbols from diagnostic semantics suppresses lexical and position biases while unifying multilabel screening, mutually exclusive rhythm selection and zero-shot concept probing under one typed readout (Sec. 3.4).
Stage 1 (description alignment) trains the bridge without question conditioning. For record and disease , the logit compares the mean compressed token with the frozen embedding of the guidance for ; , and the learned bias is initialized from training prevalence. Annotated-present labels are positives, annotated-absent labels negatives, and unknown labels are masked in a binary cross-entropy loss (10 epochs, batch 32, learning rate ). Stage 2 (disease-question loss) applies the same masked binary cross-entropy to , equivalent to cross-entropy over the two options. It updates the bridge and language-layer low-rank adapters (LoRA, rank 16) [19], 13.40M parameters on CPSC2018; the encoders, decoder base and output head remain frozen. AdamW uses bridge/LoRA learning rates and batch 8 for at most 8 epochs, with early stopping and checkpoint selection by validation average precision (AP). Training covers all target questions per record, each drawn from two of three
fixed wordings per disease with the option order swapped at random; evaluation uses one fixed wording.
3. EXPERIMENTS AND RESULTS
3.1. Datasets and evaluation protocol
Data. Following established preprocessing and stratified partitioning protocols [2, 3], each dataset is split 70% / 15% / 15% (train / validation / test): CPSC2018 [20] with nine diagnostic labels (4,814 / 1,032 / 1,031); PTB-XL [21, 22, 23] with five diagnostic superclasses (15,258 / 3,270 / 3,270); Chapman [24] with four mutually exclusive rhythm classes—atrial fibrillation, supraventricular tachycardia, sinus bradycardia and sinus rhythm (6,082 / 1,296 / 1,299); and PTB [25, 23] (350 / 75 / 75) across ten shared diagnostic codes.
Metrics. Macro-F1 weights classes equally, and multilabel accuracy measures label-wise binary accuracy. Multilabel outputs are binarized at validation-optimal F1 thresholds (four-class argmax on Chapman); values are mean ± SD over three runs.
Comparators. All baselines are adapted per training split with validation-selected checkpoints. Foundation encoders xECG [9] and MERL [10] train classification heads on frozen pooled features. Q-Heart [14] fine-tunes task adapters (no-retrieval setting) and scores the summed “yes”–“no” log-likelihood margin; anyECG-chat [15] fine-tunes its multimodal bridge and LoRA adapters (23.3M parameters, frozen 8B backbone) on the first-token “yes”–“no” log-probability margin.
3.2. Comparison across four datasets
Table 1 shows that ECGJev attains the highest macro-F1 on CPSC2018 (80.46%), PTB-XL (71.68%) and Chapman (96.86%) across multilabel and exclusive rhythm tasks, beating the best baseline by 4.40 F1 points on CPSC2018 (96.68% accuracy) and 1.47 on Chapman (98.23% accuracy), and 8B anyECG-chat by 9.44 points on PTB-XL (87.52% accuracy). On small-sample PTB, where imbalance inflates negative accuracy, generative baselines collapse to negative priors (13.23%–14.82% F1), whereas ECGJev’s decision prior reaches 35.02%—more than doubling both LLMs.

Record 37: Does this ECG support normal ECG? [label: annotated]
ECGJev (options): True 0.891; False 0.109.
Q-Heart (windows 0/1): “ yes” / “ yes”.
anyECG-chat (free text): “Review of the ECG on 2164-12-15 does not support the diagnosis of a normal ECG, as the patient’s sinus rhythm is not necessarily normal.”
Record 37: Does this ECG support atrial fibrillation? [label: not annotated]
ECGJev (options): True 0.001; False 0.999.
Q-Heart (windows 0/1): “ no” / “ no”.
anyECG-chat (free text): “Review of the ECG does not suggest atrial fibrillation, as the rhythm is simply sinus.”

Record 2: Does this ECG support normal ECG? [label: not annotated]
ECGJev (options): True 0.002; False 0.998.
Q-Heart (windows 0/1): “ no” / “ no”.
anyECG-chat (free text): “Reviewing the ECG, the abnormal axis and low QRS voltages in leads I, II, III, aVL, and V5 may not be due to myocardial ischemia, but the overall pattern suggests a possible ischemic process.”
Record 2: Does this ECG support atrial fibrillation? [label: annotated]
ECGJev (options): True 0.982; False 0.018.
Q-Heart (windows 0/1): “ yes” / “ yes”.
anyECG-chat (free text): “Reviewing the ECG, the atrial fibrillation is not supported by the ECG, as the rhythm is not specified as atrial fibrillation.”
Fig. 2. Two representative CPSC2018 validation ECGs (lead II waveform and 0–40 Hz spectrogram; gray denotes padding). ECGJev uses all 12 leads and outputs explicit two-option probabilities; Q-Heart and free-text anyECG-chat responses are verbatim.
3.3. Component analysis
Table 2 ablates key components on CPSC2018 (16 ECG tokens). Full ECGJev attains the highest macro-F1 (80.46%) and accuracy (96.68%) with the lowest SD (0.67% vs. 0.73%–1.58%). Using spectrograms alone lowers F1 by 15.89 points, showing that waveforms carry the primary morphology signal while spectrograms add complementary time–frequency cues. Omitting Stage 1 alignment ( , SD = 1.58%), removing conditioning ( , ), or replacing clinical guidance with disease names ( ) or length-matched text ( ) consistently lowers F1 and increases variance.
3.4. Question-specific behavior and interpretation
In Fig. 2, ECGJev and Q-Heart match all four annotations, while ECGJev directly grades each option (True 0.891 and 0.982 on positives vs. 0.002 otherwise); free-text anyECG-chat hedges on record 2 without a clear decision.
Table 3. Zero-shot waveform concept probing on PTB-XL [21, 22]. AUROC is averaged over three runs; denotes positive test instances per annotated concept [26].
| Queried concept | AUROC | |
|---|---|---|
| Prolonged PR | 155 | 0.755 |
| Irregular RR | 227 | 0.743 |
| ST depression | 151 | 0.895 |
| ST elevation | 4 | 0.605 |
| Inverted T waves | 44 | 0.883 |
Following prior ECG concept-probing protocols [22, 26], Table 3 evaluates zero-shot transfer to five unseen waveform concepts on PTB-XL [21]. Trained on superclass labels alone, ECGJev generalizes well to repolarization and conduction queries (0.895 AUROC on ST depression, 0.883 on inverted T waves, and 0.755/0.743 on prolonged PR and irregular RR), with lower sensitivity only on rare ST elevation ( ).
Perturbation tests confirm symbol-meaning decoupling and signal grounding: reversing True/False letters shifts mean AP by at most 0.30 points across PTB-XL, Chapman and PTB (near-zero position bias), whereas zeroing ECG tokens drops PTB-XL AP from 77.20% to 25.42%, verifying reliance on ECG input rather than prompt priors.
4. DISCUSSION AND CONCLUSION
By coupling frozen dual-view ECG encoders with a pre-trained decision decoder, ECGJev turns clinical queries into composable, unbiased decision primitives. Unlike closed-set linear heads or multi-billion-parameter chat MLLMs prone to lexical priors, position bias and post-hoc parsing, our 0.8B framework adapts from routine labels alone (13.40M trainable parameters) to return explicit option probabilities in one forward pass—allowing downstream workflows to tune operating thresholds or escalate ambiguous cases without re-prompting, while transferring zero-shot to waveform concepts. Future work will refine clinical query formulations and strengthen the model's judgment of detailed ECG feature descriptions for more reliable diagnostic decision-making.
In conclusion, ECGJev connects 12-lead ECG waveforms and spectrograms to a decision decoder via 16 question-conditioned tokens, symbol-decoupled option scoring and two-stage label adaptation, achieving superior classification across CPSC2018, PTB-XL and Chapman with stable, directly actionable diagnostic probabilities.
5. COMPLIANCE WITH ETHICAL STANDARDS
This study used only public, de-identified ECG datasets [20, 21, 24, 25]; no new data were collected. The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.
6. REFERENCES
[1] Muhammad Ilham Rizqyawan, Peter Macfarlane, Stathis Hadjidemetriou, et al., “Beat-SSL: Capturing local ECG morphology through heartbeat-level contrastive learning with soft targets,” in Proc. IEEE ISBI, 2026.
[2] Xidong Wu, Mingke Yan, Renqiao Wang, and Liping Xie, “Multiscale feature enhanced gating network for atrial fibrillation detection,” Comput. Methods Programs Biomed., vol. 261, pp. 108606, 2025.
[3] Haotian Tang, Mingke Yan, Xidong Wu, Hongkai Lai, Yang Zhang, Hanyu Cui, and Liping Xie, “Lightweight element-wise product enhanced neural network for efficient arrhythmia detection on embedded devices,” Comput. Methods Programs Biomed., vol. 273, pp. 109101, 2026.
[4] Xidong Wu, Mingke Yan, Haotian Tang, Dongchen Wu, and Liping Xie, “MSCGN: Multiscale complementary gating network for time series classification,” Biomed. Signal Process. Control, vol. 112, pp. 108563, 2026.
[5] Zhengyang Miao, Xidong Wu, and Liping Xie, “MDF: A model dispatching framework with noise-estimator-centric experts for robust biosignal classification,” in Proc. IEEE ICASSP, 2026, pp. 7241–7245.
[6] Antônio H. Ribeiro, Manoel Horta Ribeiro, Gabriela M. M. Paixão, et al., “Automatic diagnosis of the 12-lead ECG using a deep neural network,” Nat. Commun., vol. 11, no. 1, pp. 1760, 2020.
[7] Jun Li, Aaron D. Aguirre, Valdery Moura Junior, et al., “An Electrocardiogram Foundation Model Built on over 10 Million Recordings,” NEJM AI, vol. 2, no. 7, pp. Aloa2401033, 2025.
[8] Nhat-Tan Bui, Dinh-Hieu Hoang, Thinh Phan, et al., “TSR-NET: Simple Framework for Real-Time ECG Anomaly Detection with Multimodal Time and Spectrogram Restoration Network,” in Proc. IEEE ISBI, 2024.
[9] Riccardo Lunelli, Angus Nicolson, Samuel Martin Pröll, et al., “BenchECG and xECG: a benchmark and baseline for ECG foundation models,” arXiv:2509.10151, 2025.
[10] Che Liu, Zhongwei Wan, Cheng Ouyang, et al., “Zero-shot ECG classification with multimodal learning and test-time clinical knowledge enhancement,” in Proc. ICML, 2024, vol. 235 of PMLR, pp. 31949–31963.
[11] Yuanyuan Tian, Zhiyuan Li, Yanrui Jin, et al., “Foundation model of ECG diagnosis: Diagnostics and explanations of any form and rhythm on ECG,” Cell Reports Medicine, vol. 5, no. 12, pp. 101875, 2024.
[12] Xiang Lan, Feng Wu, Kai He, et al., “GEM: Empowering MLLM for grounded ECG understanding with time series and images,” arXiv:2503.06073, 2025.
[13] Ruoqi Liu, Yuelin Bai, Xiang Yue, et al., “Teach multimodal LLMs to comprehend electrocardiographic images,” arXiv:2410.19008, 2024.
[14] Hung Manh Pham, Jialu Tang, Aaqib Saeed, et al., “Q-Heart: ECG question answering via knowledge-informed multimodal LLMs,” arXiv:2505.06296, 2025.
[15] Haitao Li, Ziyu Li, Yiheng Mao, et al., “anyECG-chat: A generalist ECG-MLLM for flexible ECG input and multi-task understanding,” arXiv:2506.00942, 2025.
[16] Xialie Zhuang, Zunhai Su, Jia Pan, et al., “StartLux-Decision: AutoThink decision models with reinforcement learning for calibrated deliberative decisions,” arXiv:2610.17309, 2026, Weights: https://huggingface.co/startlux-models/StartLux-Decision-0.8B, CC BY-NC 4.0.
[17] Wenliang Dai, Junnan Li, Dongxu Li, et al., “InstructBLIP: Towards general-purpose vision-language models with instruction tuning,” in Proc. NeurIPS, 2023, vol. 36.
[18] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, et al., “An image is worth 16x16 words: Transformers for image recognition at scale,” in Proc. ICLR, 2021.
[19] Edward J. Hu, Yelong Shen, Phillip Wallis, et al., “LoRA: Low-rank adaptation of large language models,” in Proc. ICLR, 2022.
[20] Feifei Liu, Chengyu Liu, Lina Zhao, et al., “An Open Access Database for Evaluating the Algorithms of Electrocardiogram Rhythm and Morphology Abnormality Detection,” J. Med. Imaging Health Inform., vol. 8, no. 7, pp. 1368–1373, 2018.
[21] Patrick Wagner, Nils Strodthoff, Ralf-Dieter Bousseljot, et al., “PTB-XL, a large publicly available electrocardiography dataset,” Sci. Data, vol. 7, no. 1, pp. 154, 2020.
[22] Nils Strodthoff, Temesgen Mehari, Claudia Nagel, et al., “PTB-XL+, a comprehensive electrocardiographic feature dataset,” Sci. Data, vol. 10, no. 1, pp. 279, 2023.
[23] Ary L. Goldberger, Luis A. N. Amaral, Leon Glass, et al., “PhysioBank, PhysioToolkit, and PhysioNet: Components of a new research resource for complex physiologic signals,” Circulation, vol. 101, no. 23, pp. e215–e220, 2000.
[24] Jianwei Zheng, Jianming Zhang, Sidy Danioko, et al., “A 12-lead electrocardiogram database for arrhythmia research covering more than 10,000 patients,” Sci. Data, vol. 7, pp. 48, 2020.
[25] Ralf-Dieter Bousseljot, “The PTB diagnostic ECG database,” PhysioNet, version 1.0.0, 2004.
[26] Chan Lee, Dasom Noh, Minjy Suh, Hyewon Lee, and Sunyoung Kwon, “Cross-modal concept transfer: From ECG signals to images for explainable disease prediction,” in Medical Image Computing and Computer Assisted Intervention – MICCAI 2026, 2026.