VLM-in-the-Loop: A Plug-In Quality Assurance Module for ECG Digitization Pipelines
Organizations: The University of Texas at Austin
Abstract
ECG digitization could unlock billions of archived clinical records, yet existing methods collapse on real-world images despite strong benchmark numbers. We introduce VLM-in-the-Loop, a plug-in quality assurance module that wraps any digitization backend with closed-loop VLM feedback via a standardized interface, requiring no modification to the underlying digitizer. The core mechanism is tool grounding: anchoring VLM assessment in quantitative evidence from domain-specific signal analysis tools. In a controlled ablation on 200 records with paired ground truth, tool grounding raises verdict consistency from 71% to 89% and doubles fidelity separation (PCC 0.03 0.08), with the effect replicating across three VLMs (Claude Opus4, GPT-4o, Gemini2.5 Pro), confirming a pattern-level rather than model-specific gain. Deployed across four backends, the module improves every one: 29.4% of borderline leads improved on our pipeline; 41.2% of failed limb leads recovered on ECG-Digitiser; valid leads per image doubled on Open-ECG-Digitizer (2.5 5.8). On 428 real clinical HCM images, the integrated system reaches 98.0% Excellent quality. Both the plug-in architecture and tool-grounding mechanism are domain-parametric, suggesting broader applicability wherever quality criteria are objectively measurable.
Figures & tables
| Configuration | Consistency | PCC |
|---|---|---|
| Direct VLM (no rubric) | 71% [64%, 77%] | +0.03 |
| VLM + structured rubric | 82% [76%, 87%] | +0.05 |
| VLM + rubric + tool evidence | 89% [84%, 93%] | +0.08 |
| Full system (+ gate + routing) | 91% [86%, 94%] | +0.08 |
| Configuration | Claude | GPT-4o | Gemini |
|---|---|---|---|
| Verdict consistency (%) | |||
| Direct VLM | 71 | 66 | 68 |
| + rubric | 82 | 76 | 78 |
| + rubric + tools | 89 | 84 | 86 |
| Fidelity separation ( PCC) | |||
| Direct VLM | +0.03 | +0.02 | +0.03 |
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
| Stage | Parameter | Value | Rationale |
|---|---|---|---|
| Rotation | Hough threshold | 1200 | Detects strong horizontal lines |
| Rotation | Angle filter | 30 ∘ from horiz. | Excludes non-grid lines |
| Grid detect. | Red excess | Separates red/pink from gray | |
| Grid detect. | Coverage | 5% of pixels | Avoids false positives |
| Grid suppr. | Median kernel | Captures local background | |
| Grid suppr. | Desat. divisor | 25–80 | Adapts to grid saturation |
| Metric | No QA | Tool-only | Full (VLM) |
|---|---|---|---|
| Excellent (%) | 93.2 | 95.8 | 98.0 |
| Borderline leads | 412 | 338 | 265 |
| Leads improved | — | 74 (6.3%) | 147 (12.5%) |
| Median jitter | 0.0015 | 0.0013 | 0.0012 |
| Metric | Med | P90 | P95 | Max |
|---|---|---|---|---|
| Per-lead | ||||
| Jitter ratio | 0.0012 | 0.0029 | 0.0036 | 0.0231 |
| Reversal rate | 0.0152 | 0.0256 | 0.0304 | 0.0472 |
| Per-image (median across leads) | ||||
| Jitter ratio | 0.0011 | 0.0026 | 0.0030 | 0.0085 |
| Reversal rate | 0.0152 | 0.0248 | 0.0292 | 0.0360 |
| Component | No VLM | +VLM (all 428) |
|---|---|---|
| Tier routing (5,080 leads) | ||
| Tier 1 (SQI screen) | 2 (0.0%) | |
| Tier 2 (Morphological) | 3,904 (76.9%) | |
| Tier 3 (VLM) | 1,174 (23.1%) | |
| Per-image VLM verdicts ( ) | ||
| PASS ( ) | — | 162 (37.9%) |
| Metric | Ours | ECG-Dig. | Open-ECG | ECGMiner |
|---|---|---|---|---|
| Success rate | 428/428 | 428/428 | 428/428 | 0/428 |
| Valid leads | 5,049 | 3,091 | 1,088 | — |
| Leads/image | 11.8 | 7.2 | 2.5 | — |
| w/ 12 leads | 401 | 0 | 0 | — |
| Med. jitter | 0.0012 | 0.0319 | 0.0194 | — |
| Excellent | 98.0% | 0.6% | 18.7% | — |
| Metric | Ours | ECG-Dig. | Open-ECG | ECGMiner |
|---|---|---|---|---|
| Before VLM feedback | ||||
| Leads/image | 11.8 | 7.2 | 2.5 | 0.0 |
| Excellent (%) | 93.2 | 0.6 | 18.7 | — |
| After VLM feedback (up to 3 rounds) | ||||
| Leads/image | 11.9 | 9.1 | 5.8 | 0.0 |
| Excellent (%) | 98.0 | 8.4 | 31.5 | — |
| Generic Action | ECG-Dig. Adapter | Open-ECG Adapter |
|---|---|---|
| Expand ROI | Bbox 1.3, conf | Grid margin +20% |
| Re-threshold | Confidence 0.5 0.3 | Otsu offset 15 |
| Alt. grid detect. | Skip segmentation | Alt. color space |
| Reprocess lead | Re-run single lead | Re-extract column |
| Outcome | 7.2 9.1 leads | 2.5 5.8 leads |
| Backend | Init. deficit | Recovered | Recovery % |
|---|---|---|---|
| Ours | 147 / 5,136 | 147 | 100% |
| ECG-Digitiser | 2,045 / 5,136 | 812 | 39.7% |
| Open-ECG-Dig. | 3,069 / 5,136 | 1,411 | 46.0% |
| ECGMiner | 5,136 / 5,136 | 0 | 0% (abstain) |
| System | VLM | Agent | Loop | Plug | Dims | Ground |
|---|---|---|---|---|---|---|
| MT-Bench ( Zheng et al., 2023 ) | – | – | – | – | 1 | – |
| MLLM-Judge ( Chen et al., 2024 ) | ✓ | – | – | – | 1 | – |
| Prometheus-V ( Lee et al., 2024 ) | ✓ | – | – | – | 1 | Rubric |
| AgenticIQA ( Zhu et al., 2025 ) | ✓ | ✓ | – | – | Multi | – |
| Self-Refine ( Madaan et al., 2023 ) | – | – | ✓ | – | – | – |
| VLM-in-the-Loop | ✓ | ✓ | ✓ | ✓ | 4 | Tools |
| VLM Verdict | PCC (all) | PCC (V1–V6) | |
|---|---|---|---|
| PASS ( ) | 74 | 0.33 0.19 | 0.48 0.17 |
| BORDERLINE | 124 | 0.25 0.21 | 0.39 0.19 |
| FAIL ( ) | 2 | 0.11 0.08 | 0.18 0.12 |
| PASS vs. BORDER. PCC | +0.08 [.03, .13] | +0.09 [.03, .15] | |
| Lead | PCC | RMSE (mV) | SNR (dB) |
|---|---|---|---|
| I | 0.07 0.14 | 0.17 | 2.1 |
| II | 0.09 0.12 | 0.27 | 3.3 |
| III | 0.12 0.14 | 0.16 | 1.1 |
| aVR | 0.20 0.10 | 0.17 | 1.9 |
| aVL | 0.20 0.14 | 0.14 | 2.0 |
| aVF | 0.23 0.14 | 0.17 | 1.5 |
| Method | PASS | BORDERLINE | FAIL |
|---|---|---|---|
| SQI-threshold | 2.1% | 86.6% | 11.3% |
| Jrat-threshold | 91.1% | 8.7% | 0.2% |
| VLM QA module | 37.9% | 61.9% | 0.2% |
| Tier | Leads | Latency | Cost/lead |
|---|---|---|---|
| Tier 1 (SQI) | 2 (0.04%) | 1 s | $0 |
| Tier 2 (Morpho.) | 3,904 (76.9%) | 5 s | $0 |
| Tier 3 (VLM) | 1,174 (23.1%) | 15 s | $0.01 |
| Quality | Expert | VLM |
|---|---|---|
| Excellent/PASS | 21 (42%) | 19 (38%) |
| Good/BORDERLINE | 26 (52%) | 30 (60%) |
| Fair–Poor/FAIL | 3 (6%) | 1 (2%) |
| Agreement | 72% ( [0.29, 0.67]) | |
| Context | Priority | ||||
|---|---|---|---|---|---|
| AF Screening | 0.15 | 0.40 | 0.35 | 0.10 | P-wave, RR |
| STEMI | 0.15 | 0.35 | 0.40 | 0.10 | ST, T-wave |
| General Archive | 0.30 | 0.25 | 0.25 | 0.20 | Balanced |
| Research | 0.35 | 0.30 | 0.20 | 0.15 | Signal fidelity |
Electrocardiography
Electrocardiography studies the heart’s electrical signals to measure cardiac function and support diagnosis, monitoring, and research.
See all 108 papers