Command Palette
Search for a command to run...
MediEval:患者の文脈と知識に基づく推論のための統合医用ベンチマーク
MediEval:患者の文脈と知識に基づく推論のための統合医用ベンチマーク
Zhan Qu Michael Färber
概要
大規模言語モデル(LLM)は医療分野への応用が進んでいるが、その採用は信頼性と安全性への懸念によって制限されている。既存の評価は、医学的事実知識を単独でテストするか、正しさを検証せずに患者レベルの推論を評価するかのいずれかであり、重大なギャップが残されている。我々は、MIMIC-IV電子健康記録(EHR)をUMLSおよび他の生物医学語彙から構築された統合知識ベースにリンクするベンチマークであるMediEvalを紹介する。MediEvalは、実際の患者の文脈内で多様な事実および反事実の医学的記述を生成し、知識の基盤と文脈の一貫性を共同で考慮する4象限フレームワークにわたる体系的な評価を可能にする。このフレームワークを用いて、現在のプロプライエタリ、オープンソース、およびドメイン特化型LLMが頻繁に示す、幻覚による裏付けや真実の反転を含む重大な障害モードを特定する。これらのリスクに対処するため、我々は非対称ペナルティを用いたDPOベースの手法である反事実リスク認識ファインチューニング(CoRFu)を提案する。CoRFuは、ベースモデルと比較してマクロF1スコアを+16.4ポイント改善し、真実の反転エラーを排除し、より高い精度と大幅に向上した安全性の両方を実証する。
One-sentence Summary
Researchers from TU Dresden and ScaDS.AI propose MediEval, a benchmark linking MIMIC-IV EHRs to a UMLS-based knowledge base to jointly assess factual and counterfactual reasoning across a 4-quadrant framework, and introduce Counterfactual Risk-Aware Finetuning (CoRFu), a DPO-based method with asymmetric penalties that eliminates truth inversion, improving macro-F1 by +16.4 points over the base model.
Key Contributions
-
Introduces MediEval, a benchmark linking MIMIC-IV electronic health records to a unified knowledge base from UMLS and other biomedical vocabularies, generating factual and counterfactual statements within real patient contexts for evaluation across a 4-quadrant framework that jointly considers knowledge grounding and contextual consistency.
-
Cross-model evaluation of proprietary, open-source, and biomedical LLMs under identical settings reveals systematic quadrant-level weaknesses and safety-critical error patterns, including hallucinated support and truth inversion, which aggregate accuracy metrics fail to capture.
-
Proposes Counterfactual Risk-Aware Fine-tuning (CoRFu), a DPO-based method with an asymmetric penalty targeting unsafe confusions, improving macro-F1 by +16.4 points over the base model and eliminating truth inversion errors, demonstrating higher accuracy and substantially greater safety.
Introduction
Large language models are increasingly applied to high-stakes clinical tasks, including summarizing electronic health records, generating discharge instructions, and providing decision support, where errors can directly translate into patient harm. However, a critical gap persists: models can recall isolated medical facts (for example, that metformin is contraindicated in severe renal impairment) yet fail to apply that knowledge when the fact appears within the noisy, heterogeneous context of an actual patient record. Prior evaluation work only partially addresses this problem. EHR-based benchmarks often reduce tasks to retrieval or serialization without verifying medical soundness, while knowledge-based evaluations test logical transformations of facts but do not connect reasoning to real patient contexts.
To close this gap, the authors introduce MediEval, a benchmark and evaluation framework that links real patient records from MIMIC-IV with a unified biomedical knowledge base built from UMLS, SNOMED CT, and RxNorm. MediEval constructs evaluation statements through graph-guided substitutions and recombinations within ontologies, with plausibility checks ensuring true cases remain clinically valid while false cases are realistic. Each statement is embedded in real patient contexts, enabling quadrant-level reasoning defined as True or False with respect to medical knowledge and Supported or Unsupported with respect to the patient record. The authors also propose two new safety-focused metrics, Hallucinated Support Rate (HSR) and Truth Inversion Rate (TIR), revealing consistent weaknesses across proprietary, open-source, and biomedical LLMs. To mitigate these risks, they introduce Counterfactual Risk-Aware Fine-tuning (CoRFu), a DPO-based method that uses quadrant-structured preference pairs and an asymmetric penalty to steer models toward True and Supported responses while penalizing safety-critical confusions such as False and Supported.
Dataset
The authors construct MediEval, a benchmark for clinical inference, from two primary sources: the MIMIC-IV database (v3.1) and the UMLS biomedical ontology.
-
Dataset composition and sources: MediEval integrates structured EHR data (diagnoses, procedures, medications recorded with ICD and NDC codes) with unstructured discharge summaries (each with about 22 sections). It also uses UMLS to map codes and relations across systems.
-
Construction pipeline:
- Context extraction: For each hospital admission, a subset of discharge summary sections is selected covering diagnoses, procedures, treatments, medical history, and hospital course. This forms the evaluation context.
- Semantic normalization: Raw medical codes (ICD, NDC) are mapped to UMLS Concept Unique Identifiers (CUIs), aligning diagnoses, procedures, and medications into a unified semantic space.
- Ontology graph: A graph is built where vertices are CUIs and edges are UMLS relations (e.g., treated_by, has_associated_procedure, is_a). Multi-hop paths up to length 3 are allowed to capture indirect clinical associations.
- Statement generation: For each fact (h, r, t), four quadrant samples are created: Q1 (true-supported), Q2 (true-unsupported), Q3 (false-supported), and Q4 (false-unsupported). These are generated by ontology-guided substitutions, recombinations, and plausibility checks.
-
Final dataset statistics: The dataset contains 2,015 unique hospital admissions (one admission per patient to prevent leakage), 8,350 medical statements, and 37,144 samples. Context length ranges from 340 to 2,827 tokens.
-
Usage in the paper: The dataset is split into training, validation, and test sets at an 80/10/10 ratio, balanced across the four quadrants. The authors use the training split to train LLMs on the context–statement pairs, and the test set (with 200 human-annotated samples) to evaluate factual reliability and context adherence.
Method
The authors propose MediEval, a comprehensive framework designed to evaluate the clinical inference capabilities of large language models (LLMs). The framework integrates structured Electronic Health Records (EHRs), unstructured clinical notes, and biomedical ontologies to create a unified dataset for assessing factual correctness and contextual grounding.
MediEval Framework: Data Construction
The data construction pipeline begins with the MIMIC-IV database, utilizing two distinct modalities: structured tabular data (diagnoses, procedures, and medications coded with ICD and NDC standards) and unstructured discharge summaries containing approximately 22 clinical sections. For each patient admission a, the framework defines a structured event set Sa and a discharge summary section set DSa.
The process involves several key steps to transform raw EHR data into a reasoning benchmark. First, Context Extraction selects specific discharge summary sections that best capture the patient's trajectory, such as the Brief Hospital Course and History of Present Illness, to form the evaluation context Ca. Second, Semantic Normalization maps heterogeneous medical codes into a unified semantic space using the Unified Medical Language System (UMLS). Raw codes z are converted into Concept Unique Identifiers (CUIs) via a function f, resulting in a normalized set Ua={f(z)∣z∈Sa}.
Refer to the framework diagram for an overview of the data processing pipeline.
Third, an Ontology Graph Construction step builds a semantic graph G=(V,E) where nodes are CUIs and edges represent relations from the UMLS Metathesaurus (e.g., treated_by, has_associated_procedure). The graph supports multi-hop inference, allowing the system to traverse paths of length at most three to capture indirect clinical associations. For concepts h and t, relations are defined as R(h,t)={r∣(h,r,t)∈G,d(h,t)≤3}.
Finally, Quadrant-based Statement Construction generates samples based on factual relations (h,r,t) found in the graph. The framework creates four distinct quadrants to test different failure modes:
- Q1 (True–Supported): A fact directly attested in the patient context.
- Q2 (True–Unsupported): A medically correct statement where an entity is replaced with a related alternative from the ontology graph that is absent from the patient context.
- Q3 (False–Supported): A false relation created by recombining entities that are all present in the context.
- Q4 (False–Unsupported): A statement involving a semantically distant distractor entity, making it both false and unsupported.
An example of a Q2 statement is provided below.
LLM Evaluation and Training
The evaluation task is formulated as a four-way Natural Language Inference (NLI) problem, where the model must classify a statement into one of the four quadrants. To measure clinical safety, the authors introduce Critical Error Rates, specifically the Hallucinated Support Rate (HSR) and Truth Inversion Rate (TIR), which quantify the model's tendency to hallucinate evidence for true statements or elevate false statements to valid evidence.
To improve model performance on these safety-critical tasks, the authors propose CoRFu (Counterfactual Risk-Aware Fine-Tuning). Unlike standard supervised fine-tuning, CoRFu utilizes a contrastive preference learning approach. Training is performed on preference triplets (c,yw,yl), where c is the clinical context, yw is a preferred (supported) statement, and yl is a dispreferred statement from the counterfactual quadrants.
The CoRFu loss function augments the standard Direct Preference Optimization (DPO) objective with an asymmetric penalty. Let S(c;yw,yl) be the DPO preference margin. The loss is defined as:
LCoRFu=−E[logσ(S)]+λ⋅E[I(S<0)⋅S2].The first term encourages the model to prefer the supported statement. The second term introduces a quadratic penalty that activates only when the model incorrectly ranks the dispreferred statement higher (S<0). This scaling disproportionately punishes high-confidence mistakes, aligning the optimization pressure with clinical safety requirements.
Experiment
The MediEval framework evaluates LLMs on a four-way NLI task that jointly judges factual correctness and patient grounding, using metrics for accuracy, macro-F1, and safety-critical error rates (HSR and TIR) on a MIMIC-IV derived dataset of 37,144 samples. Benchmarking across 15 LLMs showed limited overall performance (accuracy 59.3% to 73.9%), with domain-specific models underperforming and safety metrics often diverging from aggregate F1, as Llama-3.3-70B achieved the best macro-F1 but not the lowest error rates. Contrastive preference optimization (CoRFu) consistently outperformed SFT and DPO baselines, with the Q1 vs. Q2 pairing delivering the strongest gains in accuracy, macro-F1, and reduced hallucinated support, while targeted pairings selectively mitigated specific risks. Ablations confirmed that moderate λ values balanced performance improvements with safety gains, underscoring that disentangling accuracy from safety-critical errors is essential for clinically reliable reasoning.
Overall performance on MediEval is limited, with the strongest model achieving the highest aggregate metrics while not necessarily being the safest. CoRFu improves over base and DPO models, with the supported versus unsupported truth contrastive pairing yielding the most consistent gains across backbones. Safety metrics show that higher macro F1 does not guarantee lower critical error rates, and different contrastive objectives selectively mitigate risks. Llama-3.3-70B-Instruct leads in overall accuracy and F1, but Mixtral-8x7B shows the lowest critical error rates despite lower macro F1. CoRFu with the Q1 vs. Q2 contrastive pairing achieves the largest aggregate improvements and reduces TIR to zero on Llama-3.1-8B. Contrastive pairings yield targeted per-quadrant gains, and improvements in accuracy do not automatically translate into safety-critical error reductions.
Experiments on MediEval show that the strongest model by aggregate metrics is not necessarily the safest, as higher macro F1 does not guarantee lower critical error rates. CoRFu consistently improves over base and DPO models, with the supported versus unsupported truth contrastive pairing yielding the most stable gains, while different contrastive objectives selectively mitigate specific risks. Despite Llama-3.3-70B-Instruct leading in accuracy and F1, Mixtral-8x7B achieves the lowest critical error rates, and the Q1 versus Q2 pairing on Llama-3.1-8B delivers the largest aggregate improvements while eliminating TIR. Overall, contrastive pairings produce targeted per-quadrant gains, and accuracy improvements do not automatically translate into safety-critical error reductions.