Organizations: University of California, Irvine; Irvine, California, United States · Arizona State University; Tempe, Arizona, United States · California State University, Dominguez Hills; Carson, California, United States
Large language models (LLMs) enable waveform-to-text ECG interpretation and interactive clinical questioning, yet most ECG-LLM systems still rely on weak signal-text alignment and retrieval without explicit physiological or causal structure. This limits grounding, temporal reasoning, and counterfactual "what-if" analysis central to clinical decision-making. We propose CARE-ECG, a causally structured ECG-language reasoning framework that unifies representation learning, diagnosis, and explanation in a single pipeline. CARE-ECG encodes multi-lead ECGs into temporally organized latent biomarkers, performs causal graph inference for probabilistic diagnosis, and supports counterfactual assessment via structural causal models. To improve faithfulness, CARE-ECG grounds language outputs through causal retrieval-augmented generation and a modular agentic pipeline that integrates history, diagnosis, and response with verification. Across multiple ECG benchmarks and expert QA settings, CARE-ECG improves diagnostic accuracy and explanation faithfulness while reducing hallucinations (e.g., 0.84 accuracy on Expert-ECG-QA and 0.76 on SCP-mapped PTB-XL under GPT-4). Overall, CARE-ECG provides traceable reasoning by exposing key latent drivers, causal evidence paths, and how alternative physiological states would change outcomes.
Figures & tables
Figure 1. Motivation. Typical ECG-LLMs may over-diagnose STEMI in mimics by hallucinating confirmatory evidence (e.g., reciprocal ST depression). CARE-ECG mitigates this by reasoning over latent morphological biomarkers (e.g., concave ST morphology) and validating decisions via causal counterfactuals.
Figure 2. The CARE-ECG Framework. The Physiological Stream encodes ECGs into latent biomarkers and performs causal inference to predict P(y) and enable counterfactual analysis. The Agentic Stream leverages temporal context and causal drivers to guide retrieval and generation, while a Faithfulness Verifier checks signal-grounded alignment and triggers self-correction when needed.
Figure 3. Agentic reasoning workflow. CARE-ECG integrates temporal context ( Δz ) and causal evidence ( z~ ) before generating a grounded rationale, verified by a faithfulness gate with self-correction and fallback.
Module / Field
Prompted Instruction & Runtime Logic
1. Prompt Construction
Patient Query
Injects: Patient Query: {query}
Causal Factors
Injects: Key Causal Factors (from VAE/Graph): {formatted_causal} . (Logic: Comma-joined list of drivers; returns ’None’ if empty).
Retrieved Evidence
Injects: Retrieved Medical Facts (RAG): followed by enumerated list: [Fact i] {fact_i} .
Gen. Instruction
Static string: “Explain the prediction clearly and medically grounded , and attach citations using fact tags (e.g., [Fact 1] ).”
2. Generation Parameters
Table 1. Response Agent prompt & safety gate. The table summarizes the fact-tagged prompt template, decoding settings, hallucination scoring, and the RAG-only fallback rule used for grounded explanation generation.
Features
PTB-XL
MIMIC-IV ECG
Expert-ECG-QA
Data Characteristics
Content
Standard 12-lead ECGs with SCP-ECG statements.
Large-scale clinical ECG corpus for retrieval testing.
Table 2. Evaluation datasets and protocols. PTB-XL evaluates diagnosis grounding via Text → SCP mapping, MIMIC-IV ECG evaluates retrieval-based faithfulness, and Expert-ECG-QA evaluates interactive clinical reasoning.
Model
GPT-4 Backbone
LLaMA 3–8B Backbone
Acc
Prec
Rec
F1
Acc
Prec
Rec
F1
Dataset: Expert-ECG-QA
CARE-ECG (Ours)
0.84
0.79
0.87
0.83
0.77
0.73
0.80
0.76
ECG-Chat
0.76
0.72
0.80
0.75
0.71
0.68
0.73
0.70
Q-HEART
0.74
0.70
0.77
0.73
0.69
0.66
0.70
0.68
anyECG-Chat
0.71
0.68
0.72
0.70
0.66
0.64
0.67
0.65
Table 3. Answer Quality Metrics on Expert-ECG-QA and PTB-XL. For PTB-XL, free-text outputs were mapped to SCP diagnostic codes using keyword extraction and fuzzy label matching. Bold indicates best performance.
Model
GPT-4 Backbone
LLaMA 3–8B Backbone
CRC
Ground.
Cont.Rel.
CRC
Ground.
Cont.Rel.
Dataset: PTB-XL
CARE-ECG (Ours)
0.91
0.71
0.75
0.86
0.67
0.71
ECG-Chat
0.78
0.62
0.64
0.73
0.56
0.59
Q-HEART
0.75
0.60
0.61
0.71
0.54
0.57
anyECG-Chat
0.72
0.57
0.58
0.69
0.52
0.55
Table 4. Causal and Retrieval Metrics on PTB-XL, MIMIC-IV ECG, and Expert-ECG-QA. Bold denotes the best performance.
Figure 4. Faithfulness–robustness trade-off in the HR–SRS plane across datasets. Each panel shows HR (lower is better) versus SRS (higher is better) for all methods under two backbones. Points closer to the upper-left indicate more evidence-consistent explanations with fewer hallucinations.
Model
GPT-4 Backbone
LLaMA 3–8B Backbone
HR ( ↓ )
SRS ( ↑ )
HR ( ↓ )
SRS ( ↑ )
Dataset: PTB-XL
CARE-ECG (Ours)
0.06
0.81
0.08
0.77
ECG-Chat
0.12
0.72
0.15
0.68
Q-HEART
0.14
0.70
0.17
0.66
anyECG-Chat
0.15
0.68
0.18
0.64
Table 5. Hallucination and Factuality Metrics. HR : Hallucination Rate (lower ↓ is better); SRS : Summary Relevance Score (higher ↑ is better). Bold indicates best performance.
Variant
Modules
GPT-4 Backbone
LLaMA 3–8B Backbone
Lat
Graph
RAG
Verif.
CF
CRC
SRS
Gnd.
HR ↓
Prec
F1
CRC
SRS
Gnd.
HR ↓
Prec
F1
A0: Latent Baseline
✓
0.73
0.67
0.64
0.13
0.72
0.74
0.68
0.63
0.60
0.16
0.68
0.70
A1: + Causal Graphs
✓
✓
0.83
0.72
0.69
0.10
0.75
0.78
0.78
0.69
0.66
0.13
0.72
0.75
A2: + RAG Injection
✓
✓
✓
0.91
0.76
0.71
0.08
0.76
0.79
0.85
0.72
0.68
0.11
0.74
0.76
A3: + Verifier Fallback
✓
✓
✓
✓
0.96
0.82
0.75
0.05
0.79
0.83
0.90
0.78
0.71
0.08
0.76
0.80
A4: + Counterfactual (Full)
✓
✓
✓
✓
✓
0.97
0.84
0.77
0.04
0.81
0.85
0.91
0.80
0.73
0.07
0.78
0.82
Table 6. Ablation Study on Expert-ECG-QA (GPT-4 vs. LLaMA 3–8B). “Latent” denotes CausalVAE+temporal backbone; “Graph” denotes Bayesian inference over z~ ; “RAG” denotes causal-conditioned retrieval; “Verif.” denotes verifier-triggered fallback; “CF” denotes counterfactual minimal edits. Bold indicates best performance.
Figure 5. Incremental ablation curves for CARE-ECG. Each panel visualizes how key metrics evolve as modules are progressively added (A0 → A4 in Table 6 ). The curves provide a compact view of the monotonic improvements and the stage at which each metric changes most strongly.
Figure 6. Radar-style summary of multi-metric trade-offs. The radar view summarizes the consistent advantage of CARE-ECG across complementary reliability dimensions.
Business AI Lab, College of Technology, National Economics University, Vietnam · FPT University, Hanoi, Vietnam · A2I Lab, Phenikaa School of Computing, Phenikaa University, Hanoi, Vietnam +2