HERMES:基于临床笔记的对比感知知识图谱推理与患者预后预测

arXiv cs.CL 论文

摘要

HERMES 是一个基于图的框架,它通过LLM引导的提取和对比逻辑建模,从临床笔记构建个性化知识图谱,并应用图注意力网络以改善患者预后预测,在MIMIC数据集上性能优于仅文本基线。

arXiv:2609.20825v1 Announce Type: new Abstract: Clinical predictive models often rely on structured Electronic Health Record data, such as time-series and procedure codes. While recent approaches have begun leveraging unstructured clinical notes, they typically encode them as flat sequences, which may lose explicit relational and temporal structure present in clinical narratives. In response, we propose HERMES, a graph-based framework that operates exclusively on clinical text while preserving clinical relationships. This approach builds on two key ideas. First, personalized Knowledge Graphs (KGs) are constructed through Large-Language-Model-guided extraction from clinical notes with Contrastive Logic Modeling that explicitly captures temporal dynamics and treatment failures and changes in outcomes. Second, a Graph Attention Network synthesizes patient representations through graph-based learning over the KGs. Experiments on MIMIC-III and MIMIC-IV for in-hospital mortality and 30-day readmission prediction show that HERMES consistently outperforms strong text-only baselines. Our findings demonstrate that explicit relational modeling with Contrastive Logic Modeling significantly advances predictive performance.
查看原文
查看缓存全文

缓存时间: 2026/09/21 08:56

# HERMES: Contrast-Aware Knowledge Graph Reasoning from Clinical Notes for Patient Outcome Prediction
Source: [https://arxiv.org/html/2609.20825](https://arxiv.org/html/2609.20825)
11institutetext:Business AI Lab, College of Technology, National Economics University, Vietnam
22institutetext:Hanoi University of Science and Technology, Hanoi, Vietnam
33institutetext:A2I Lab, Phenikaa School of Computing, Phenikaa University, Hanoi, Vietnam
44institutetext:Department of Head and Neck Surgery, Vietnam National Cancer Hospital & Hanoi Medical University, Hanoi, Vietnam
55institutetext:VNPT AI, VNPT Group, Hanoi, Vietnam
55email:\{bachng\.bai, 11247162\}@st\.neu\.edu\.vn, \{cuong\.vuongtuan, trang\.maixuan\}@phenikaa\-uni\.edu\.vn, duyyhn@gmail\.com, nguyentiencuong@vnpt\.vn, \{huanv, thienlv\}@neu\.edu\.vnHoang\-Ha NguyenTuan\-Cuong Vuong Trang Mai XuanCorresponding author\.Duy Quoc NgoTien\-Cuong Nguyen Huan VuThien Van Luong

###### Abstract

Clinical predictive models often rely on structured Electronic Health Record data, such as time\-series and procedure codes\. While recent approaches have begun leveraging unstructured clinical notes, they typically encode them as flat sequences, which may lose explicit relational and temporal structure present in clinical narratives\. In response, we propose HERMES, a graph\-based framework that operates exclusively on clinical text while preserving clinical relationships\. This approach builds on two key ideas\. First, personalized Knowledge Graphs \(KGs\) are constructed through Large\-Language\-Model\-guided extraction from clinical notes with Contrastive Logic Modeling that explicitly captures temporal dynamics and treatment failures and changes in outcomes\. Second, a Graph Attention Network synthesizes patient representations through graph\-based learning over the KGs\. Experiments on MIMIC\-III and MIMIC\-IV for in\-hospital mortality and 30\-day readmission prediction show that HERMES consistently outperforms strong text\-only baselines\. Our findings demonstrate that explicit relational modeling with Contrastive Logic Modeling significantly advances predictive performance\.

## 1Introduction

Electronic Health Records \(EHRs\) enable data\-driven risk prediction, including in\-hospital mortality and 30\-day readmission forecasting\. In the ICU, clinical evidence is documented in narrative notes capturing clinician reasoning, patient status, and treatment responses\. However, many predictive pipelines prioritize structured signals and treat notes as auxiliary inputs, underutilizing the clinical knowledge embedded in narratives\. Recent clinical language models \(LMs\)\[[15](https://arxiv.org/html/2609.20825#bib.bib1),[3](https://arxiv.org/html/2609.20825#bib.bib10)\]advance outcome prediction from notes, yet most approaches remain token\-centric and implicitly represent clinical dependencies through sequence representations\. Early prediction models treated clinical narratives as flat sequences, using Convolutional Neural Networks \(CNNs\), Recurrent Neural Networks \(RNNs\), and Transformers to represent token streams\[[15](https://arxiv.org/html/2609.20825#bib.bib1),[9](https://arxiv.org/html/2609.20825#bib.bib12)\]\. Although long\-context variants better accommodate lengthy ICU documentation\[[9](https://arxiv.org/html/2609.20825#bib.bib12)\], these approaches implicitly model clinical dependencies\. Hierarchical encoders\[[4](https://arxiv.org/html/2609.20825#bib.bib18)\]and token\-level graph models introduce local connectivity but remain token\-focused\. This paradigm cannot explicitly capture clinically meaningful relations, such as symptom\-to\-diagnosis evidence, treatment\-to\-response dynamics, and clinical contradictions\. Consequently, models fail to expose the structured clinical logic central to adverse outcomes\.

Knowledge\-enhanced methods advance representations by injecting external medical knowledge from ontologies or curated bases\[[2](https://arxiv.org/html/2609.20825#bib.bib17),[6](https://arxiv.org/html/2609.20825#bib.bib16)\], yet they depend on structured codes rather than free\-text\. Traditional machine learning approaches, such as logistic regression with TF\-IDF\[[12](https://arxiv.org/html/2609.20825#bib.bib19)\], remain competitive baselines due to simplicity and robustness, but treat text as bags\-of\-words and cannot capture temporal dependencies\. Recent advances in Large Language Models \(LLMs\) have enabled strong performance in clinical information extraction\[[1](https://arxiv.org/html/2609.20825#bib.bib13)\]\. Frameworks like EMERGE\[[17](https://arxiv.org/html/2609.20825#bib.bib15)\]and GraphCare\[[6](https://arxiv.org/html/2609.20825#bib.bib16)\]use LLMs to construct Knowledge Graphs \(KGs\) for prediction but depend on structured EHR data or external KGs\.

In response, this work proposes HERMES, a text\-only clinical prediction approach that combines narrative understanding with graph\-based reasoning\. HERMES differs in three key ways\. First, it constructs personalized KGs exclusively from clinical text using LLM\-guided extraction with lightweight Named Entity Recognition \(NER\) model, without external codes or knowledge bases\. Second, it employs Contrastive Logic Modeling to prioritize clinical dynamics\-temporal changes, treatment contradictions, and adverse outcomes that predict deterioration\. Third, it achieves consistent gains over text\-only baselines on two ICU benchmarks\.

Specifically, HERMES constructs personalized KGs from clinical text through a two\-stage extraction pipeline with Contrastive Logic Modeling that emphasizes temporal dynamics\. The pipeline extracts entities and their clinical relations while identifying critical patterns\-contradictions between findings and treatments, treatment failures, and temporal changes\-predictive of adverse outcomes\. The KGs are then processed by a Graph Attention Network \(GAT\)\[[14](https://arxiv.org/html/2609.20825#bib.bib4)\], producing patient\-level representations for outcome prediction\.

We evaluate HERMES on MIMIC\-III and MIMIC\-IV for in\-hospital mortality and 30\-day readmission prediction\. Across both datasets and tasks, the proposed text\-only approach consistently outperforms text\-only baselines, indicating that explicit relational modeling and attention\-based aggregation complement sequence representations\. Ablation results characterize the effects of different Graph Neural Network \(GNN\) backbones and pooling strategies, supporting GAT with max pooling as the optimal encoder\.

## 2Methodology

We consider each patient’s first ICU stay from their first visit\. Each stay contains a set of clinical notes𝒩=\{n1,n2,…,n\|𝒩\|\}\\mathcal\{N\}=\\\{n\_\{1\},n\_\{2\},\\dots,n\_\{\|\\mathcal\{N\}\|\}\\\}\. Given𝒩\\mathcal\{N\}, we aim to predict the patient’s clinical outcomey^∈\{0,1\}\\hat\{y\}\\in\\\{0,1\\\}for two clinical prediction tasks: in\-hospital mortality and 30\-day readmission\. Throughout the framework, we use the concatenated clinical notes,𝒩′\\mathcal\{N\}^\{\\prime\}, as input to both NER and LLM\-based extraction, leveraging the extended context window to preserve semantic relationships across the patient’s clinical documentation\.

Fig\.[1](https://arxiv.org/html/2609.20825#S2.F1)shows the overall architecture of our proposed HERMES framework\.

![Refer to caption](https://arxiv.org/html/2609.20825v1/x1.png)Figure 1:Overall architecture of our proposed HERMES framework\. The two extraction modules, Entity Extraction and Relation Extraction, process the input clinical notes𝒩\\mathcal\{N\}, generating entitiesEEand relationsRRfor each personalized KG\. The GAT then synthesizes KG representations for downstream prediction tasks\.### 2\.1Entity Extraction

Performing NER on unstructured data is challenging\. We address this by combining LLM\-guided extraction with clinical\-domain spaCy NER111[https://allenai\.github\.io/scispacy/](https://allenai.github.io/scispacy/)to maximize entity coverage\. The raw extracted entity set is defined as:

Eraw=ENER∪ELLM,E\_\{\\text\{raw\}\}=E\_\{\\text\{NER\}\}\\cup E\_\{\\text\{LLM\}\},\(1\)whereENERE\_\{\\text\{NER\}\}andELLME\_\{\\text\{LLM\}\}represent the entity sets obtained from spaCy\-based and LLM\-guided extraction, respectively\. Each entity is represented as a text string, and similarity comparisons are computed using cosine similarity based on text embeddings\.

#### 2\.1\.1Chain\-of\-Thought Reasoning

Our LLM\-guided extraction\[[1](https://arxiv.org/html/2609.20825#bib.bib13)\]uses the prompt templatePEP\_\{E\}\(Fig\.[2](https://arxiv.org/html/2609.20825#S2.F2)\) that follows a chain\-of\-thought method\[[16](https://arxiv.org/html/2609.20825#bib.bib8)\], requiring the LLM to reason over extractions and assign confidence scores to each entity\. LetCEC\_\{E\}denote the set of entity confidence scores, whereCE​\(e\)∈\[0,1\]C\_\{E\}\(e\)\\in\[0,1\]represents the confidence score for entityee\[[13](https://arxiv.org/html/2609.20825#bib.bib9)\], which are incorporated into Eq\. \([2](https://arxiv.org/html/2609.20825#S2.E2)\) and Eq\. \([3](https://arxiv.org/html/2609.20825#S2.E3)\) to guide entity consolidation, prioritizing higher\-confidence candidates during merging to form the final entity setEE\. We also preserve negation aspects \(for example, “no pneumothorax”, “denies pain”\) to maintain clinical semantics\. Failed extractions are retried until successful, ensuring no entity sets are empty\.

![Refer to caption](https://arxiv.org/html/2609.20825v1/x2.png)Figure 2:PromptPEP\_\{E\}for entity extraction\.
#### 2\.1\.2Entity Enhancement

We normalize the raw entities \(whitespace trimming, lowercasing\) to unify their representation format\. To consolidate the raw entity setErawE\_\{\\text\{raw\}\}and enhance entity quality, we implement a similarity\-based merging algorithm\. We define an entity scoring function:

Score​\(e\)=CE​\(e\)\+bonus​\(e\),\\mathrm\{Score\}\(e\)=C\_\{E\}\(e\)\+\\mathrm\{bonus\}\(e\),\(2\)whereCE​\(e\)C\_\{E\}\(e\)represents the confidence value assigned by the LLM during extraction \(the confidence for NER is fixed\), andbonus​\(e\)\\mathrm\{bonus\}\(e\)denotes an additional bonus term that accounts for extraction source and entity informativeness\.

For each pair of entitiesei,ej∈Erawe\_\{i\},e\_\{j\}\\in E\_\{\\text\{raw\}\}wheresim​\(ei,ej\)≥θs\\mathrm\{sim\}\(e\_\{i\},e\_\{j\}\)\\geq\\theta\_\{s\}, we apply:

Merge​\(ei,ej\)=\{ei,if​Score​\(ei\)\>Score​\(ej\)ej,otherwise,\\texttt\{Merge\}\(e\_\{i\},e\_\{j\}\)=\\begin\{cases\}e\_\{i\},&\\text\{if \}\\mathrm\{Score\}\(e\_\{i\}\)\>\\mathrm\{Score\}\(e\_\{j\}\)\\\\ e\_\{j\},&\\text\{otherwise\}\\end\{cases\},\(3\)whereθs\\theta\_\{s\}represents the similarity threshold\. This merging process consolidates similar entities while retaining the higher\-scoring candidate according to Eq\. \([3](https://arxiv.org/html/2609.20825#S2.E3)\), resulting in the final entity setEE\. We then employ a medical\-domain language model\[[10](https://arxiv.org/html/2609.20825#bib.bib7)\]to obtain the dense representation for each entity in the setEE:

𝐇E=TextEncoder​\(E\),\\mathbf\{H\}\_\{E\}=\\mathrm\{TextEncoder\}\(E\),\(4\)where𝐇E\\mathbf\{H\}\_\{E\}denotes the entity embeddings of the final setEEobtained from the language model\.

### 2\.2Relation Extraction

![Refer to caption](https://arxiv.org/html/2609.20825v1/x3.png)Figure 3:PromptPRP\_\{R\}for relation extraction\.While entity extraction identifies key clinical concepts, patient health trajectories depend on how these concepts interact\. We employ a second LLM\-guided stage for relation extraction, aiming to reconstruct the underlying clinical logic and temporal semantics\. We obtain the relation setRLLMR\_\{\\text\{LLM\}\}by using the prompt templatePRP\_\{R\}\(Fig\.[3](https://arxiv.org/html/2609.20825#S2.F3)\) with𝒩′\\mathcal\{N\}^\{\\prime\}and integrating the refined entity setEEfrom the previous stage:

RLLM=LLM​\(PR,𝒩′,E\)\.R\_\{\\text\{LLM\}\}=\\texttt\{LLM\}\(P\_\{R\},\\mathcal\{N\}^\{\\prime\},E\)\.\(5\)
By anchoring relations to extracted entities, we ensure the KG remains grounded in the extracted nodes while allowing the LLM to infer clinical relations from full patient context\.

#### 2\.2\.1Contrastive Logic Modeling

Contrastive Logic Modeling captures clinically important nuances by distinguishing beneficial from harmful treatments\. We instruct the LLM to model two relation types: \(1\) Dynamics capture temporal changes, clinical contradictions, and treatment outcomes\-highly predictive of adverse events; \(2\) Clinical Logic represents static medical knowledge linking observations, diagnoses, interventions, and anatomy\. Together, these ensure KGs encode both patient status and temporal evolution\.

![Refer to caption](https://arxiv.org/html/2609.20825v1/x4.png)Figure 4:Process of knowledge graph construction in the HERMES framework\.Bluearrows indicate standard relations, whileredarrows indicate contrastive relations\. The contrastive relations are bi\-directional by default\.
#### 2\.2\.2Confidence\-Based Filtering

To ensure reliable relation extraction for downstream prediction tasks, our relation refinement process employs a confidence\-based filtering mechanism\[[13](https://arxiv.org/html/2609.20825#bib.bib9)\]to remove ambiguous relations\. LetCRC\_\{R\}denote the set of relation confidence scores, whereCR​\(r\)∈\[0,1\]C\_\{R\}\(r\)\\in\[0,1\]represents the confidence score for relationr∈RLLMr\\in R\_\{\\text\{LLM\}\}\. The final relation setRRis defined as:

R=\{r∈RLLM∣CR​\(r\)≥τr\},R=\\\{r\\in R\_\{\\text\{LLM\}\}\\mid C\_\{R\}\(r\)\\geq\\tau\_\{r\}\\\},\(6\)whereRRdenotes the relation set, andτr\\tau\_\{r\}is the relation confidence threshold\.RRdefines KG connectivity𝒢=\(E,R\)\\mathcal\{G\}=\(E,R\), transforming unstructured notes into a structured knowledge representation\. Contrastive Logic Modeling shapes the KG topology, capturing clinical dependencies and temporal evolution\.

The process of knowledge graph construction is illustrated in Fig\.[4](https://arxiv.org/html/2609.20825#S2.F4)\.

### 2\.3Representation Learning

We encode each patient KG using a two\-layer GAT with residual connections and layer normalization, followed by graph pooling and an MLP classifier for outcome prediction\. GAT learns attention weights over neighboring nodes, focusing on informative entities without explicitly using relation types\.

#### 2\.3\.1Graph Attention Network\.

Letnnbe the number of entity nodes andddbe the node embedding dimension\. Forℓ∈\{0,1,2\}\\ell\\in\\\{0,1,2\\\}, we define𝐇ℓ∈ℝn×d\\mathbf\{H\}\_\{\\ell\}\\in\\mathbb\{R\}^\{n\\times d\}as the node feature matrix at GAT layerℓ\\ell, whoseii\-th row is the node embedding𝐡i\(ℓ\)∈ℝd\\mathbf\{h\}\_\{i\}^\{\(\\ell\)\}\\in\\mathbb\{R\}^\{d\}\. The input matrix𝐇0∈ℝn×d\\mathbf\{H\}\_\{0\}\\in\\mathbb\{R\}^\{n\\times d\}is initialized by incorporating the entity embeddings𝐇E\\mathbf\{H\}\_\{E\}\(Eq\. \([4](https://arxiv.org/html/2609.20825#S2.E4)\)\) with the KG structure𝒢\\mathcal\{G\}, where each node’s initial representation is a vector from𝐇0\\mathbf\{H\}\_\{0\}\. For each nodeii, we define its neighbor set𝒮​\(i\)\\mathcal\{S\}\(i\)as the set of nodes connected toiiin the KG, and we include a self\-loop so that a node can retain its own information during message passing\.

For each layerℓ∈\{1,2\}\\ell\\in\\\{1,2\\\}, nodeii, and a neighborj∈𝒮​\(i\)j\\in\\mathcal\{S\}\(i\), GAT first computes an unnormalized attention scoresi​j\(ℓ\)∈ℝs\_\{ij\}^\{\(\\ell\)\}\\in\\mathbb\{R\}:

si​j\(ℓ\)=LeakyReLU​\(𝐚T​\(𝐖𝐡i\(ℓ−1\)∥𝐖𝐡j\(ℓ−1\)\)\),s\_\{ij\}^\{\(\\ell\)\}=\\mathrm\{LeakyReLU\}\\left\(\\mathbf\{a\}^\{T\}\(\\mathbf\{W\}\\mathbf\{h\}\_\{i\}^\{\(\\ell\-1\)\}\\\|\\mathbf\{W\}\\mathbf\{h\}\_\{j\}^\{\(\\ell\-1\)\}\)\\right\),\(7\)where𝐖∈ℝd×d\\mathbf\{W\}\\in\\mathbb\{R\}^\{d\\times d\}is a learnable weight matrix,𝐚∈ℝ2​d\\mathbf\{a\}\\in\\mathbb\{R\}^\{2d\}is a learnable attention vector, and∥\\\|denotes concatenation\. These scores are normalized over the neighborhood ofiiusing a softmax to obtain attention coefficientsαi​j\(ℓ\)∈ℝ\\alpha\_\{ij\}^\{\(\\ell\)\}\\in\\mathbb\{R\}:

αi​j\(ℓ\)=exp⁡\(si​j\(ℓ\)\)∑k∈𝒮​\(i\)exp⁡\(si​k\(ℓ\)\),\\alpha\_\{ij\}^\{\(\\ell\)\}=\\frac\{\\exp\(s\_\{ij\}^\{\(\\ell\)\}\)\}\{\\sum\_\{k\\in\\mathcal\{S\}\(i\)\}\\exp\(s\_\{ik\}^\{\(\\ell\)\}\)\},\(8\)where the denominator sums over all neighborskkofii\(includingiiitself\)\. The coefficientαi​j\(ℓ\)\\alpha\_\{ij\}^\{\(\\ell\)\}controls how much information nodeiireceives from nodejj\.

Node representations are then updated by aggregating transformed neighbor features weighted by the attention coefficients:

𝐡i\(ℓ\)=ϕ​\(∑j∈𝒮​\(i\)αi​j\(ℓ\)​𝐖𝐡j\(ℓ−1\)\),\\mathbf\{h\}\_\{i\}^\{\(\\ell\)\}=\\phi\\left\(\\sum\_\{j\\in\\mathcal\{S\}\(i\)\}\\alpha\_\{ij\}^\{\(\\ell\)\}\\mathbf\{W\}\\mathbf\{h\}\_\{j\}^\{\(\\ell\-1\)\}\\right\),\(9\)whereϕ\\phiis a non\-linear activation function, which is ReLU in our implementation\. The framework uses multi\-head attention withKKheads and concatenates head outputs to form the layer output\.

LetGAT​\(⋅\)\\mathrm\{GAT\}\(\\cdot\)denote applying Eq\. \([9](https://arxiv.org/html/2609.20825#S2.E9)\) to all nodes of the layer in parallel\. We stack two GAT layers with residual connections and layer normalization:

𝐇ℓ=LayerNorm​\(𝐇ℓ−1\+GAT​\(𝐇ℓ−1\)\),\\mathbf\{H\}\_\{\\ell\}=\\mathrm\{LayerNorm\}\\\!\\left\(\\mathbf\{H\}\_\{\\ell\-1\}\+\\mathrm\{GAT\}\\\!\\left\(\\mathbf\{H\}\_\{\\ell\-1\}\\right\)\\right\),\(10\)where the initial embeddings are given by𝐇0\\mathbf\{H\}\_\{0\}\. After two layers,𝐇2\\mathbf\{H\}\_\{2\}contains the final node representations\.

#### 2\.3\.2Pooling and Classification\.

To obtain the graph representation for the patient, we aggregate the node representations in𝐇2\\mathbf\{H\}\_\{2\}using max pooling:

𝐡𝒢=MaxPool​\(𝐇2\),\\mathbf\{h\}\_\{\\mathcal\{G\}\}=\\mathrm\{MaxPool\}\\\!\\left\(\\mathbf\{H\}\_\{2\}\\right\),\(11\)where𝐡𝒢∈ℝd\\mathbf\{h\}\_\{\\mathcal\{G\}\}\\in\\mathbb\{R\}^\{d\}is the graph representation for the patient\. This representation is passed to a two\-layer MLP classifier to produce the predicted probabilityy^\\hat\{y\}:

y^=σ​\(MLP​\(𝐡𝒢\)\)\.\\hat\{y\}=\\sigma\\\!\\left\(\\mathrm\{MLP\}\(\\mathbf\{h\}\_\{\\mathcal\{G\}\}\)\\right\)\.\(12\)Here,MLP​\(⋅\)\\mathrm\{MLP\}\(\\cdot\)denotes a two\-layer multilayer perceptron that outputs a scalar logit, andσ​\(⋅\)\\sigma\(\\cdot\)is the sigmoid function for binary classification\.

We optimize the model using binary cross\-entropy \(BCE\) loss for both mortality and readmission prediction:

ℒ​\(y^,y\)=−1M​∑i=1M\[yi​log⁡y^i\+\(1−yi\)​log⁡\(1−y^i\)\],\\mathcal\{L\}\(\\hat\{y\},y\)=\-\\frac\{1\}\{M\}\\sum\_\{i=1\}^\{M\}\\left\[y\_\{i\}\\log\\hat\{y\}\_\{i\}\+\(1\-y\_\{i\}\)\\log\(1\-\\hat\{y\}\_\{i\}\)\\right\],\(13\)whereMMis the number of patients,yi∈\{0,1\}y\_\{i\}\\in\\\{0,1\\\}is the ground\-truth label, andy^i\\hat\{y\}\_\{i\}is the predicted probability\.

By learning over personalized KGs constructed from clinical notes, the GAT encoder integrates entity information with graph\-structured clinical associations, producing patient representations that support accurate outcome prediction\.

## 3Experiments

### 3\.1Experimental Setups

#### 3\.1\.1Evaluation Datasets

We evaluate on MIMIC\-III\[[8](https://arxiv.org/html/2609.20825#bib.bib2)\]and MIMIC\-IV\[[7](https://arxiv.org/html/2609.20825#bib.bib3)\]for in\-hospital mortality and 30\-day readmission prediction\. Following the experimental setup of EMERGE\[[17](https://arxiv.org/html/2609.20825#bib.bib15)\], we use the first 48 hours of each ICU stay, concatenating notes from consecutive 12\-hour segments\. This setup enables controlled comparison and leverages the extended context window to capture clinical trajectories\. The datasets statistics are shown in Table[1](https://arxiv.org/html/2609.20825#S3.T1)\.LabelMortality\\textbf\{Label\}\_\{\\text\{Mortality\}\}andLabelReadmission\\textbf\{Label\}\_\{\\text\{Readmission\}\}denote the number \(and percentage\) of positive labels for in\-hospital mortality and 30\-day readmission, respectively\.

Table 1:Dataset statistics after preprocessingThe two datasets differ substantially in documentation density: MIMIC\-III contains 168,194 total notes \(mean 10\.5 per patient\) with 221\.5 words per note on average, while MIMIC\-IV has 51,297 notes \(mean 3\.2 per patient\) with 196\.4 words per note\. This translates to significantly denser extracted KGs, where MIMIC\-III yields a mean of 133\.7 entities and 1,263\.4 relations per patient compared to 47\.4 entities and 61\.7 relations in MIMIC\-IV\. This reflects distributional differences between the two datasets\.

#### 3\.1\.2Evaluation Metrics

We evaluate using AUROC \(threshold\-independent discrimination\), AUPRC \(emphasizes positive\-class performance under imbalance\), and min\(\+P, Se\) \(minimum of precision and sensitivity\)\. Higher values indicate better performance\. In all results tables,BoldandUnderlineddenote best and second\-best results, respectively\.

#### 3\.1\.3Baseline Models

We compare our approach against a diverse set of baseline methods\. These include pre\-trained clinical language models such as ClinicalBERT\[[15](https://arxiv.org/html/2609.20825#bib.bib1)\], PubMedBERT\[[3](https://arxiv.org/html/2609.20825#bib.bib10)\], and Clinical\-Longformer\[[9](https://arxiv.org/html/2609.20825#bib.bib12)\]; Note\-HCR\[[4](https://arxiv.org/html/2609.20825#bib.bib18)\], a hierarchical RNN\-based model; and Logistic Regression with TF\-IDF features\[[12](https://arxiv.org/html/2609.20825#bib.bib19)\], a traditional machine learning baseline that can process full documents but lacks semantic understanding\. We additionally include a zero\-shot LLM prompting baseline \(GPT\-5\.4 mini222[https://developers\.openai\.com/api/docs/models/gpt\-5\.4\-mini](https://developers.openai.com/api/docs/models/gpt-5.4-mini)\) to assess the ceiling of general\-purpose LLM reasoning on this task\. We further evaluate different GNN variants, including Graph Convolutional Network \(GCN\), GAT, and Relational Graph Convolutional Network \(RGCN\), to assess their effectiveness\.

#### 3\.1\.4Implementation Details

Experiments are conducted on a single NVIDIA RTX 3060 GPU \(12 GB\)\. We use SapBERT\[[10](https://arxiv.org/html/2609.20825#bib.bib7)\]for entity embedding and Mistral\-Small\-3\.2\-24B\-Instruct333[https://docs\.mistral\.ai/models/mistral\-small\-3\-2\-25\-06](https://docs.mistral.ai/models/mistral-small-3-2-25-06)for LLM\-guided extraction\[[1](https://arxiv.org/html/2609.20825#bib.bib13)\], both models are kept frozen\. The GAT encoder has two layers with eight attention heads and ReLU activation, hidden dimension 128, and max pooling\. The two\-layer MLP classifier uses GELU\[[5](https://arxiv.org/html/2609.20825#bib.bib11)\]activation\. Training uses AdamW\[[11](https://arxiv.org/html/2609.20825#bib.bib14)\]with learning rate 0\.001, batch size 64, dropout 0\.2, and patience 10\. For extraction thresholds, we set entity similarityθs=0\.85\\theta\_\{s\}=0\.85and relation confidenceτr=0\.7\\tau\_\{r\}=0\.7\. Results are reported asmean±std\\text\{mean\}\\pm\\text\{std\}via bootstrapping \(1,000 resamples\)\.

### 3\.2Experimental Results

We compare HERMES against representative text\-only baselines on in\-hospital mortality and 30\-day readmission prediction in MIMIC\-III and MIMIC\-IV, as shown in Table[2](https://arxiv.org/html/2609.20825#S3.T2)\.

Table 2:Performance comparison between HERMES and different baselines on MIMIC\-III and MIMIC\-IV datasetsOverall, HERMES achieves the best results across both datasets and tasks\. Compared with the strongest non\-graph baseline\[[12](https://arxiv.org/html/2609.20825#bib.bib19)\], HERMES improves AUROC/AUPRC by \+2\.38/\+4\.82 points and \+1\.41/\+3\.56 points on MIMIC\-III and MIMIC\-IV mortality, respectively, while also yielding consistent gains for readmission \(\+2\.53 AUROC and \+4\.26 AUPRC on MIMIC\-IV\)\. These improvements suggest that explicitly modeling patient\-specific relations extracted from notes provides a strong predictive signal\.

It is also worth noting that the traditional ML baseline\[[12](https://arxiv.org/html/2609.20825#bib.bib19)\]remains quite competitive, likely due to its ability to capture key prognostic cues from early ICU notes\. However, unlike HERMES, this performance is driven primarily by surface\-level lexical signals rather than the underlying clinical and temporal relationships, such as evolving findings, treatment failures, and contradictions\. This is further evidenced by the zero\-shot prompting baseline\. Despite superior reasoning capability and broad medical knowledge, it achieves only 72\.36 AUROC on MIMIC\-III mortality, marginally above the pre\-trained clinical language models, yet substantially below simple ML baseline\[[12](https://arxiv.org/html/2609.20825#bib.bib19)\]\. This confirms that zero\-shot reasoning, regardless of model scale, cannot replace structured, task\-specific learning over explicit clinical relations\. Bridging this gap via prompting alone would likely require frontier LLM models with more complex reasoning pipelines, which are expensive and impractical for clinical deployment\.

### 3\.3Ablation Studies

#### 3\.3\.1Comparing Different GNN Backbones

We study the impact of the graph encoder by swapping the GNN backbone and pooling strategy while keeping the framework fixed\. We compare GCN, GAT, and RGCN under mean and max pooling, evaluated on the same prediction tasks, as shown in Table[3](https://arxiv.org/html/2609.20825#S3.T3)\.

Table 3:Performance comparison of different GNNs in HERMES on MIMIC\-III and MIMIC\-IV datasetsGAT with max pooling consistently performs best across both datasets and tasks, indicating that attention\-based neighborhood aggregation is effective for highlighting clinically informative entities and relations\. Across backbones, max pooling generally outperforms mean pooling, suggesting that a small set of high\-signal nodes often drives the prediction\.

## 4Conclusion

This work proposes HERMES, a novel framework that constructs personalized KGs from clinical text through LLM\-guided extraction with Contrastive Logic Modeling, which captures temporal dynamics, such as treatment contradictions, clinical outcomes, and patient changes\-that predict deterioration\. Experiments on MIMIC\-III and MIMIC\-IV demonstrate significant gains over text\-only baselines for mortality and readmission prediction, validating explicit relational modeling for clinical outcome prediction\. Future work may integrate multimodal data, refine the extraction pipeline, and validate on external hospital datasets to assess generalizability\. Intrinsic KG quality evaluation also remains a worthwhile direction for further validation\.

## Acknowledgement

This research is supported by the Ben Dam Me Award Fund, the Vietnam Young Talent Support Fund, and the Number One Brand, Tan Hiep Phat Group\.

## References

- \[1\]M\. Agrawal, S\. Hegselmann, H\. Lang, Y\. Kim, and D\. Sontag\(2022\)Large language models are few\-shot clinical information extractors\.InProc\. Conf\. Empirical Methods Nat\. Lang\. Process\.,pp\. 1998–2022\.Cited by:[§1](https://arxiv.org/html/2609.20825#S1.p2.1),[§2\.1\.1](https://arxiv.org/html/2609.20825#S2.SS1.SSS1.p1.5),[§3\.1\.4](https://arxiv.org/html/2609.20825#S3.SS1.SSS4.p1.3)\.
- \[2\]E\. Choi, M\. T\. Bahadori, L\. Song, W\. F\. Stewart, and J\. Sun\(2017\)GRAM: graph\-based attention model for healthcare representation learning\.InProc\. ACM SIGKDD Int\. Conf\. Knowl\. Discov\. Data Min\.,pp\. 787–795\.Cited by:[§1](https://arxiv.org/html/2609.20825#S1.p2.1)\.
- \[3\]Y\. Gu, R\. Tinn, H\. Cheng, M\. Lucas, N\. Usuyama, X\. Liu, T\. Naumann, J\. Gao, and H\. Poon\(2021\)Domain\-specific language model pretraining for biomedical natural language processing\.ACM Trans\. Comput\. Healthcare3\(1\)\.Cited by:[§1](https://arxiv.org/html/2609.20825#S1.p1.1),[§3\.1\.3](https://arxiv.org/html/2609.20825#S3.SS1.SSS3.p1.1),[Table 2](https://arxiv.org/html/2609.20825#S3.T2.24.24.24.7),[Table 2](https://arxiv.org/html/2609.20825#S3.T2.66.66.66.7)\.
- \[4\]M\. Hashir and R\. Sawhney\(2020\)Towards unstructured mortality prediction with free\-text clinical notes\.Journal of Biomedical Informatics108,pp\. 103489\.Cited by:[§1](https://arxiv.org/html/2609.20825#S1.p1.1),[§3\.1\.3](https://arxiv.org/html/2609.20825#S3.SS1.SSS3.p1.1),[Table 2](https://arxiv.org/html/2609.20825#S3.T2.36.36.36.7),[Table 2](https://arxiv.org/html/2609.20825#S3.T2.78.78.78.7)\.
- \[5\]D\. Hendrycks and K\. Gimpel\(2016\)Gaussian error linear units \(gelus\)\.arXiv arXiv:1606\.08415\.Cited by:[§3\.1\.4](https://arxiv.org/html/2609.20825#S3.SS1.SSS4.p1.3)\.
- \[6\]P\. Jiang, C\. Xiao, A\. R\. Cross, and J\. Sun\(2024\)GraphCare: enhancing healthcare predictions with personalized knowledge graphs\.InProc\. Int\. Conf\. Learn\. Represent\.,Cited by:[§1](https://arxiv.org/html/2609.20825#S1.p2.1)\.
- \[7\]A\. E\. Johnson, L\. Bulgarelli, L\. Shen, A\. Gayles, A\. Shammout, S\. Horng, T\. J\. Pollard, S\. Hao, B\. Moody, B\. Gow,et al\.\(2023\)MIMIC\-iv, a freely accessible electronic health record dataset\.Scientific data10\(1\),pp\. 1\.Cited by:[§3\.1\.1](https://arxiv.org/html/2609.20825#S3.SS1.SSS1.p1.2)\.
- \[8\]A\. E\. Johnson, T\. J\. Pollard, L\. Shen, L\. H\. Lehman, M\. Feng, M\. Ghassemi, B\. Moody, P\. Szolovits, L\. Anthony Celi, and R\. G\. Mark\(2016\)MIMIC\-iii, a freely accessible critical care database\.Scientific data3\(1\),pp\. 1–9\.Cited by:[§3\.1\.1](https://arxiv.org/html/2609.20825#S3.SS1.SSS1.p1.2)\.
- \[9\]Y\. Li, R\. M\. Wehbe, F\. S\. Ahmad, H\. Wang, and Y\. Luo\(2023\)A comparative study of pretrained language models for long clinical text\.Journal of the American Medical Informatics Association30\(2\),pp\. 340–347\.Cited by:[§1](https://arxiv.org/html/2609.20825#S1.p1.1),[§3\.1\.3](https://arxiv.org/html/2609.20825#S3.SS1.SSS3.p1.1),[Table 2](https://arxiv.org/html/2609.20825#S3.T2.12.12.12.8),[Table 2](https://arxiv.org/html/2609.20825#S3.T2.54.54.54.8)\.
- \[10\]F\. Liu, E\. Shareghi, Z\. Meng, M\. Basaldella, and N\. Collier\(2021\)Self\-alignment pretraining for biomedical entity representations\.InProc\. Conf\. North Amer\. Chapter Assoc\. Comput\. Linguist\.,pp\. 4228–4238\.Cited by:[§2\.1\.2](https://arxiv.org/html/2609.20825#S2.SS1.SSS2.p4.3),[§3\.1\.4](https://arxiv.org/html/2609.20825#S3.SS1.SSS4.p1.3)\.
- \[11\]I\. Loshchilov and F\. Hutter\(2019\)Decoupled weight decay regularization\.InProc\. Int\. Conf\. Learn\. Represent\.,Cited by:[§3\.1\.4](https://arxiv.org/html/2609.20825#S3.SS1.SSS4.p1.3)\.
- \[12\]M\. Mahbub, S\. Srinivasan, I\. Danciu, A\. Peluso, E\. Begoli, S\. Tamang, and G\. Peterson\(2022\)Unstructured clinical notes within the 24 hours since admission predict short, mid & long\-term mortality in adult icu patients\.PLOS ONE17,pp\. e0262182\.Cited by:[§1](https://arxiv.org/html/2609.20825#S1.p2.1),[§3\.1\.3](https://arxiv.org/html/2609.20825#S3.SS1.SSS3.p1.1),[§3\.2](https://arxiv.org/html/2609.20825#S3.SS2.p2.1),[§3\.2](https://arxiv.org/html/2609.20825#S3.SS2.p3.1),[Table 2](https://arxiv.org/html/2609.20825#S3.T2.42.42.42.7),[Table 2](https://arxiv.org/html/2609.20825#S3.T2.84.84.84.7)\.
- \[13\]K\. Tian, E\. Mitchell, A\. Zhou, A\. Sharma, R\. Rafailov, H\. Yao, C\. Finn, and C\. Manning\(2023\)Just ask for calibration: strategies for eliciting calibrated confidence scores from language models fine\-tuned with human feedback\.InProc\. Conf\. Empirical Methods Nat\. Lang\. Process\.,Cited by:[§2\.1\.1](https://arxiv.org/html/2609.20825#S2.SS1.SSS1.p1.5),[§2\.2\.2](https://arxiv.org/html/2609.20825#S2.SS2.SSS2.p1.4)\.
- \[14\]P\. Veličković, G\. Cucurull, A\. Casanova, A\. Romero, P\. Liò, and Y\. Bengio\(2018\)Graph attention networks\.InProc\. Int\. Conf\. Learn\. Represent\.,Cited by:[§1](https://arxiv.org/html/2609.20825#S1.p4.1)\.
- \[15\]G\. Wang, X\. Liu, H\. Liu, G\. Yang,et al\.\(2025\)A generalist medical language model for disease diagnosis assistance\.Nature Medicine\.Cited by:[§1](https://arxiv.org/html/2609.20825#S1.p1.1),[§3\.1\.3](https://arxiv.org/html/2609.20825#S3.SS1.SSS3.p1.1),[Table 2](https://arxiv.org/html/2609.20825#S3.T2.18.18.18.7),[Table 2](https://arxiv.org/html/2609.20825#S3.T2.60.60.60.7)\.
- \[16\]J\. Wei, X\. Wang, D\. Schuurmans, M\. Bosma, F\. Xia, E\. Chi, Q\. V\. Le, D\. Zhou,et al\.\(2022\)Chain\-of\-thought prompting elicits reasoning in large language models\.Advances in neural information processing systems35,pp\. 24824–24837\.Cited by:[§2\.1\.1](https://arxiv.org/html/2609.20825#S2.SS1.SSS1.p1.5)\.
- \[17\]Y\. Zhu, C\. Ren, Z\. Wang, X\. Zheng, S\. Xie, J\. Feng, X\. Zhu, Z\. Li, L\. Ma, and C\. Pan\(2024\)Emerge: enhancing multimodal electronic health records predictive modeling with retrieval\-augmented generation\.InProc\. ACM Int\. Conf\. Inf\. Knowl\. Manag\.,pp\. 3549–3559\.Cited by:[§1](https://arxiv.org/html/2609.20825#S1.p2.1),[§3\.1\.1](https://arxiv.org/html/2609.20825#S3.SS1.SSS1.p1.2)\.

相似文章

THBKG:面向决策对齐的临床进展预测的时间生物医学知识图谱

arXiv cs.LG

本文介绍了THBKG,一个时间异构生物医学知识图谱,涵盖11万实体和1110万条边,带有逐年证据时间戳,旨在仅使用决策时可用的证据来预测进入II期试验的靶点-疾病对是否会推进到III期。基于图谱的方法优于直接证据基线,尤其是在缺乏直接证据的配对中,作者将其作为持续更新的资源发布。