Source-linked AI summary
MedGate-Fusion: Integrating First-Encounter Semantic Narratives and Physiological Biomarkers for Prospective Stroke Risk Stratification
Hemn Khdr, Mohammad Noaeen, Karim Keshavjee, Aziz Guergachi, Zahra Shakeri
TL;DR
Prospective primary-care stroke risk estimation must reconcile signals in routine measurements and clinical narratives. MedGate-Fusion combines first-encounter narrative embeddings with physiological markers and masks stroke terms to reduce target leakage. On the test dataset, it reached an AUROC of 0.848 and an AUPRC of 0.346.
Problem
Prospective stroke risk estimation is difficult because relevant signals are distributed across structured measurements and unstructured clinical narratives, which current risk calculators often underuse.
Source: §I · p. 1Method
MedGate-Fusion combines transformer-based semantic embeddings of first-encounter narratives with physiological biomarkers in a prospective design and redacts stroke-related terms before encoding.
Source: §I · p. 1, §II · p. 2Results
The MedGate-Fusion model reached an AUROC of 0.848 and an AUPRC of 0.346 on the test dataset.
Source: §V · p. 6Takeaways & Limitations
Clinical lift analysis indicates that the method captures five times more cases than random or standard screening protocols.
Source: §V · p. 6The Canadian cohort may reflect regional documentation patterns that do not generalize across healthcare systems, and the five-year window may not capture younger patients’ lifetime risk.
Source: D. EMR Limitations and Future Directions · p. 6
Abstract
from arXiv · showhide
Prospective stroke risk stratification in primary care is challenging because early risk signals are distributed across routine biomarkers and unstructured clinical narratives. We propose MedGate-Fusion, a multi-modal gated architecture that integrates transformer-based embeddings of first-encounter narratives with ten routinely recorded risk markers. We used electronic medical record data from the Canadian Primary Care Sentinel Surveillance Network (CPCSSN). Starting from 808,921 encounter-level observations, we constructed a first-encounter cohort and retained 102,736 unique patient records with non-empty narratives and sufficient data to evaluate a five-year stroke outcome. To reduce explicit target leakage from diagnostic mentions in notes, we applied dictionary-based redaction of stroke-related terms prior to semantic encoding.
I. INTRODUCTION
Prospective stroke risk estimation is difficult because relevant signals are spread across structured measurements and clinical narratives. MedGate-Fusion addresses gaps in prospective multimodal prediction by combining narrative semantics with physiological biomarkers while limiting leakage from diagnostic text.
I. INTRODUCTION
- Prospective risk estimation must integrate structured measurements with unstructured narratives, where clinically relevant signals are distributed across both.Stroke risk is elevated in people with cardiometabolic conditions, making early identification in primary care an opportunity for prevention.Source: §I · p. 1
- Prior work reports machine-learning gains for structured cardiovascular risk prediction and deep learning across diverse EHR and imaging inputs.These advances provide context for the paper’s focus on prospective multimodal stroke prediction.Source: §I · p. 1
- Prospective stroke models combining dense narratives and physiological measurements remain limited, and many fusion studies use retrospective designs or lack controls for diagnostic-text leakage.Earlier NLP approaches often reduced notes to keywords or frequency statistics, which cannot capture negation, timing, or compositional meaning.Source: §I · p. 1
- MedGate-Fusion combines transformer-based semantic embeddings with routinely collected physiological biomarkers in a prospective first-encounter design.The study also contributes leakage-aware cohort construction and redaction of stroke-related terms.Source: §I · p. 1
II. METHODS
The study formulates five-year stroke prediction from information recorded at a patient’s initial visit, constructs a first-encounter cohort, and masks stroke-related terms to mitigate leakage.
II. METHODS
- Each patient is represented at the initial documented visit by physiological measurements, a diagnostic narrative, and a binary stroke outcome during the subsequent five-year follow-up.The prospective objective restricts learning to data recorded before symptomatic or diagnostic documentation of the event.Source: §II · pp. 1–2
A. Data Source and Inclusion Criteria
- From 808,921 CPCSSN observations, the cohort retained each patient’s earliest record and excluded records without diagnostic narratives.First-encounter selection excludes later diagnostic entries and downstream documentation; cohort structure is summarized in Table I and Figure 1.Source: A. Data Source and Inclusion Criteria · p. 2
B. Leakage Mitigation and Semantic Scrubbing
- Leakage mitigation combines a first-visit temporal filter with dictionary masking of stroke-related terms such as stroke, cva, and infarct.The masked terms are replaced with a neutral [MASK] token so the model emphasizes initial-history patterns rather than event aftermath.Source: B. Leakage Mitigation and Semantic… · p. 2
C. Transformers for Semantic Representation
Clinical narratives are encoded as compact contextual embeddings using a sentence-transformer, whose self-attention represents relationships among clinical terms and dependencies across the history.
C. Transformers for Semantic Representation
- The all-MiniLM-L6-v2 sentence-transformer maps scrubbed narratives into 384-dimensional embeddings, selected to balance semantic quality, computational cost, and reproducibility.Larger domain-specific encoders are reserved for future comparison.Source: C. Transformers for Semantic… · p. 2
- Self-attention calculates weighted value representations from query–key compatibility, with the dot product measuring semantic similarity and √dk rescaling scores.The rescaling is described as stabilizing gradients during training.Source: C. Transformers for Semantic… · p. 2
- The transformer represents clinical history as a cohesive semantic sequence, capturing long dependencies between comorbidities that frequency-based models may ignore.Traditional models treat medical terms as independent tokens and lose temporal and pathological context.Source: C. Transformers for Semantic… · p. 2
D. The MedGate-Fusion Architecture
MedGate-Fusion combines specialized numerical and semantic experts through a context-aware gate that dynamically weights their signals. The design can prioritize narrative information when numerical measurements are inconclusive or missing.
D. The MedGate-Fusion Architecture
- MedGate-Fusion uses a gradient-boosted numerical expert and a semantic expert that processes transformer embeddings.The architecture integrates these specialized branches through contextual gating.Source: D. The MedGate-Fusion Architecture · p. 2
- The context-aware meta-learner uses a patient’s numerical context and both experts’ initial predictions to set a dynamic gate weight, rather than assuming modality importance is static.The gating coefficient is defined with a sigmoid activation.Source: D. The MedGate-Fusion Architecture · p. 2
- The fused prediction is a weighted combination of the numerical and semantic signals, and the gate can prioritize semantic information when laboratory values are inconclusive or missing.The paper reports weak predictive signal from discrete labs such as A1c and LDL, which have high population variance and negligible target correlation relative to narratives.Source: D. The MedGate-Fusion Architecture · p. 3
E. Imbalance Optimization and Objective Function
The objective uses class-frequency weighting to address rare stroke events, and evaluation uses patient-level stratified cross-validation to assess stability and generalization.
E. Imbalance Optimization and Objective Function
- Inverse class-frequency weights increase the penalty for errors on minority-class stroke cases.For class c, the weight is wc = N/(K nc), where N is the sample count, nc is the count for class c, and K = 2.Source: E. Imbalance Optimization and… · p. 3
- The weighted loss shifts the decision boundary toward detecting minority-class cases rather than maximizing global accuracy.The optimizer gives greater priority to misclassified stroke instances.Source: E. Imbalance Optimization and… · p. 3
- Stratified five-fold patient-level cross-validation prevents patient overlap between training and validation while assessing stability and generalization.Hyperparameters were selected within training folds using AUROC and AUPRC, and final performance was reported as mean ± standard deviation across folds.Source: E. Imbalance Optimization and… · p. 3
III. RESULTS
Across stratified folds, MedGate-Fusion achieved the strongest reported overall performance, while precision-recall and decision-space analyses further examined rare-event recovery and semantic contributions.
A. Predictive Performance and Statistical Benchmarking
- AUROC 0.848 and AUPRC 0.346 gave MedGate-Fusion the highest overall performance; its AUROC was 14.5% above Logistic Regression (p < 0.001).The comparison covered five stratified cross-validation folds.Source: A. Predictive Performance and… · p. 3
B. Precision-Recall Dynamics and Decision Space Separability
- AUPRC 0.346 accompanied stable precision at high recall in the rare-event precision-recall analysis.The passage attributes this pattern to the MedGate-Fusion model and describes low stroke prevalence as a class-imbalance challenge.Source: B. Precision-Recall Dynamics and… · p. 3
- The decision-space analysis showed stroke cases in high-probability clusters and a significant probability increase for true positives with transformer-derived features.The authors describe the narratives as capturing risk patterns not represented by traditional biomarkers.Source: B. Precision-Recall Dynamics and… · p. 3
C. Clinical Utility and Decile-based Lift Analysis
The clinical utility analysis reports a top-decile lift over random screening and calibration results, alongside figures and tables describing cohort characteristics and model comparisons.
C. Clinical Utility and Decile-based Lift Analysis
- Screening the highest 10% of the identified risk group captures five times more stroke cases than random screening.The paper presents this as a decile-based clinical lift analysis of practical value for primary-care intervention strategies.Source: C. Clinical Utility and Decile-based… · p. 3
- Table I presents baseline characteristics stratified by stroke status, with Welch’s t-test for continuous variables and Pearson’s chi-squared test for categorical variables.The caption expands SD, LDL, HDL, A1c, TG, and FBS.Source: Table I · p. 4
- Figure 1 describes non-linear overlap between stroke and control semantic projections and maps biomarker coefficient of variation against absolute Pearson correlation.The caption identifies the projection as t-SNE and the biomarker distribution as a signal-to-noise analysis.Source: Figure 1 · p. 4
- The Brier score of 0.065 indicates alignment between predicted probabilities and observed event frequencies in the calibration analysis.The analysis also evaluated the relationship between precision and sensitivity to establish an operating point.Source: C. Clinical Utility and Decile-based… · p. 4
IV. DISCUSSION
The discussion emphasizes the predictive signal in first-encounter narratives and their complementarity with biomarkers, supported by modality comparisons and information-gain analysis.
A. Semantic Information and Predictive Superiority
- The text-only transformer achieved AUROC 0.842, above numerical baselines at 0.720–0.740, while fusion reached AUROC 0.848.The authors interpret the strong text-only performance and additional fusion gain as complementary value rather than redundancy between modalities.Source: A. Semantic Information and Predictive… · pp. 4–5, Figure 2 · p. 5
- First-encounter narratives are described as encoding clinical context not fully captured by a small set of structured markers from one visit.The proposed contextual signals include comorbidity burden, symptom descriptions, and care patterns.Source: A. Semantic Information and Predictive… · p. 5
- Information Gain measures reduction in stroke-outcome uncertainty, and the authors report that text identifies high-risk sub-phenotypes not captured by standard laboratory markers and physical measurements.The passage characterizes the textual branch as a contextual sensor of systemic pathological deterioration.Source: A. Semantic Information and Predictive… · p. 5
B. Multi-modal Fusion and Decision Reliability
MedGate-Fusion combines semantic and numerical scores through a learned gate, but its AUROC gain over the Bio-Transformer branch is modest. The authors describe narratives as the primary signal and biomarkers as an incremental, clinically grounded anchor.
B. Multi-modal Fusion and Decision Reliability
- AUROC increased from 0.842 for the Bio-Transformer branch to 0.848 for MedGate-Fusion, a modest absolute gain.The authors attribute the primary signal to semantic narratives and describe structured biomarkers as adding incremental discrimination.Source: B. Multi-modal Fusion and Decision… · p. 5
- The fused score combines semantic and numerical scores using a learned gating coefficient to prioritize the more reliable modality.The paper writes the score as Sf = α·Ss + (1 − α)·Sn, where Ss and Sn are semantic and numerical scores.Source: B. Multi-modal Fusion and Decision… · p. 5
- Hemoglobin A1c and systolic blood pressure anchor transformer embeddings, while dictionary masking may add a weak signal reflecting documentation patterns.The authors therefore interpret strong text-only performance cautiously and do not treat fusion as proof of large gains over text alone.Source: B. Multi-modal Fusion and Decision… · p. 6
C. Clinical Implications and Prospective Validity
The paper reports clinical lift and prospective first-encounter results for stroke risk stratification, while identifying data-quality, generalizability, prediction-window, and computational constraints. The authors call for evaluation in broader populations and exploration of lighter semantic models.
C. Clinical Implications and Prospective Validity
- Screening the top 10% of high-risk patients captures five times more cases than random screening, and the model reaches an AUPRC of 0.346.The passage also reports that CHA2DS2-VASc typically yields AUROC values between 0.67 and 0.72 in recent studies.Source: C. Clinical Implications and… · p. 6
- The first-encounter protocol is presented as mitigating leakage and supporting prospective prediction; the reported AUROC is 0.848.The authors state that unstructured text alone can be sufficient for advanced predictive modeling in EMRs.Source: C. Clinical Implications and… · p. 6
D. EMR Limitations and Future Directions
- Systematic missingness and professional coding variability can introduce noise, and regional documentation patterns in the Canadian cohort may not generalize across healthcare systems.The authors identify these as limitations of the EMR data and multicenter study design.Source: D. EMR Limitations and Future Directions · p. 6
- The study evaluates a five-year prediction window, which may not capture younger patients’ total lifetime risk.The authors plan to extend observation to assess the longitudinal stability of semantic and numerical risk signals.Source: D. EMR Limitations and Future Directions · p. 6
- Semantic encoding demands may limit near-term adoption in small primary care settings, motivating planned exploration of lighter transformer architectures.The stated aim is to reduce hardware requirements while maintaining performance.Source: D. EMR Limitations and Future Directions · p. 6
V. CONCLUSION
The conclusion reports that first-encounter narratives and routine biomarkers support prospective stroke risk prediction in the Canadian primary-care cohort. Performance and clinical-lift results are accompanied by acknowledged data and generalizability limitations.
V. CONCLUSION
- From 808,921 CPCSSN observations, the study retained 102,736 high-quality first-encounter records, and Table II results support predictive signals in unstructured diagnostic narratives.The first clinical encounter for each patient was required for the prospective window.Source: §V · p. 6
- 0.848 AUROC and 0.346 AUPRC were achieved by MedGate-Fusion on the test dataset, compared with 0.842 AUROC for the Bio-Transformer branch without lab measurements.The conclusion describes numerical features as having marginal utility and suggests diagnostic text captures core latent risk.Source: §V · p. 6
- Clinical lift analysis reports five times more cases captured than random or standard screening protocols, while missingness and regional coding variability remain limitations.The conclusion calls for generalizability testing across international and diverse clinical populations.Source: §V · p. 6