ConTextual: Improving Clinical Text Summarization in LLMs with Context-Preserving Token Filtering and Knowledge Graphs

Fahmida Liza Piya, Rahmatollah Beheshti, [email protected] · 2025

Read ConTextual: Improving Clinical Text Summarization in LLMs with Context-Preserving Token Filtering and Knowledge Graphs by Fahmida Liza Piya, Rahmatollah Beheshti, [email protected] (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2504-16394.txt.

Introduction

Fahmida Liza Piya and Rahmatollah Beheshti improve how language models summarize clinical notes without dropping the details that decide care. Doctor notes are rich but messy. Feeding every word to a model wastes effort and can bury vital cues.

Their framework first filters the text, keeping the tokens that carry clinical weight. A medical knowledge graph then adds structured context around those tokens. The result should read smoothly and stay faithful to the chart. Standard filters treat all words alike or follow brittle rules. Context-aware filtering is the paper's central bet. Better summaries save clinician time at the reading desk. The catalog record adds an email address as a third author in error.

Catalog record

CREATORFahmida Liza Piya, Rahmatollah Beheshti, [email protected]
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE61 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2504-16394

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

ConTextual: Improving Clinical Text Summarization in LLMs with Context-Preserving Token Filtering and Knowledge Graphs Fahmida Liza Piya, Rahmatollah Beheshti, [email protected] Abstract Unstructured clinical data can serve as a unique and rich source of information that can meaningfully inform clinical practice. Extracting the most pertinent context from such data is critical for exploiting its true potential toward optimal and timely decision-making in patient care. While prior research has explored various methods for clinical text summarization, most prior studies either process all input tokens uniformly or rely on heuristic-based filters, which can overlook nuanced clinical cues and fail to prioritize information critical for decision-making. In this study, we propose Contextual , a novel framework that integrates a Context-Preserving Token Filtering method with a Domain-Specific Knowledge Graph (KG) for contextual augmentation. By preserving context-specific important tokens and enriching them with structured knowledge, ConTextual improves both linguistic coherence and clinical fidelity. Our extensive empirical evaluations on two public benchmark datasets demonstrate that ConTextual consistently outperforms other baselines. Our proposed approach highlights the complementary role of token-level filtering and structured retrieval in enhancing both linguistic and clinical integrity, as well as offering a scalable solution for improving precision in clinical text generation 1 1 1 Our code repository is publicly available at: https://github.com/healthylaife/ConTextual.git . . 1 Introduction Electronic health records (EHRs) are central to modern medical informatics, providing a rich repository of structured and unstructured data that drives clinical decision-making and research ( Piya et al., 2024 ; Wornow et al., 2023 ; Poulain et al., 2022 ) . While structured data enables systematic analyses, unstructured components—such as discharge summaries and progress notes—contain nuanced clinical insights that are difficult to summarize due to their reliance on complex medical terminology, subtle contextual cues, and intricate interrelationships ( Hossain et al., 2023 ) . Efficiently extracting and summarizing these insights is critical for improving patient care ( Piya and Beheshti, 2025 ) , yet it remains an open challenge. Recent advancements in large language models (LLMs) have significantly accelerated progress in natural language processing (NLP), particularly in tasks such as clinical summarization and entity extraction ( Chen et al., 2024 ; Aali et al., 2025 ; Ellershaw et al., 2024 ) . In addition to the rapid development of general-purpose LLMs—such as GPT-4 ( Achiam et al., 2023 ) , LLaMA 3 ( Grattafiori et al., 2024 ) , and Gemma ( Team et al., 2025 ) —domain-specific models like BioInstruct ( Wang et al., 2023 ) , MediSwift ( Bhardwaj et al., 2024 ) , and BioMedLM ( Boag et al., 2024 ) have been introduced to better capture the structure and semantics of biomedical corpora, improving the understanding of medical narratives. These types of models have demonstrated considerable promise in enhancing the accuracy and efficiency of clinical documentation and information extraction ( Chen et al., 2024 ; Hu et al., 2024a ) . However, they face critical limitations in real-world clinical settings. Specifically, unstructured clinical narratives are often verbose, redundant, and contain various types of nomenclature and jargon, increasing computational demands and obscuring essential information captured in the notes ( Hu et al., 2024b ) . Reliance on fine-tuning and pretraining domain-specific LLMs further amplifies these challenges, as such processes require substantial computational resources and time ( Christophe et al., 2024 ; Liu et al., 2024a ) . These constraints highlight the need for scalable, domain-aware methodologies that balance contextual fidelity with computational efficiency. Model compression and optimization techniques such as pruning ( Ling et al., 2024 ) , quantization ( Lang et al., 2024 ) , and distillation ( Muralidharan et al., 2024 ) address some of these computational challenges by reducing the resource demands of deploying LLMs without significantly sacrificing their performance ( Zhu et al., 2024 ) . Such approaches are particularly relevant in healthcare, where the efficient processing of large volumes of data is crucial for timely and accurate patient care. Optimizing LLMs for clinical use can mitigate their high resource requirements, making them more suitable for integration into existing clinical workflows and systems. Recent studies evaluating LLMs on clinical note summarization highlight significant limitations in fidelity and coherence. Models often generate factually incorrect or fabricated content (hallucinations), posing a major obstacle for clinical use ( Oeshy et al., 2024 ; Fayyaz et al., 2024 ; Poulain et al., 2024 ) . For example, a physician review of GPT-4-generated emergency department summaries found hallucinated details in 42% of cases and omission of relevant clinical information in 47% ( Williams et al., 2024 ) . Such omissions of key medications, diagnoses, or events are common, sometimes due to oversimplification of complex cases ( Lee et al., 2024 ) . LLMs also struggle with temporal reasoning: they may misrepresent the chronology of care by focusing on outdated or irrelevant diagnoses (treating them as current) and not recognizing when earlier presumptive diagnoses were later ruled out ( Xiong et al., 2024 ) . Even when factual coverage is adequate, the narrative quality can be suboptimal – generated summaries are often less concise and lack the realistic clinical tone or structured flow of human-written notes ( Van Veen et al., 2024 ) . Moreover, current LLMs face context length constraints, often requiring truncation or segmentation of long patient records; as a result, many evaluations use isolated note segments instead of full longitudinal records, risking loss of important context ( Ravaut et al., 2023 ) . These limitations – hallucinations, omissions, poor handling of temporal context, and subpar coherence – underscore that while LLMs show promise in reducing documentation burden, they are not yet fully reliable for autonomous clinical summarization ( Wang et al., 2024 ; Hager et al., 2024 ) . To address these challenges, we propose ConTextual , a novel framework that integrates a context-preserving token filtering (CPTF) approach with a domain-specific knowledge graph (KG) to enhance clinical text summarization. CPTF leverages attention mechanisms to dynamically identify and retain semantically significant tokens, minimizing computational costs while preserving critical clinical information. To mitigate information loss from token filtering, the domain-specific KG encodes structured relationships among clinical entities, such as diagnoses, treatments, and outcomes. This integration ensures that the retained tokens are enriched with domain-relevant context, enabling the framework to maintain contextual fidelity in complex clinical scenarios. Generalizable Insights about Machine Learning in the Context of Healthcare The proposed framework provides a scalable and efficient solution for processing verbose clinical narratives. By prioritizing clinically significant tokens and enriching them with structured knowledge, ConTextual achieves superior information retention, computational efficiency, and contextual depth. Our extensive evaluations demonstrate superior performance in summarization ability and reduction in latency and computational costs, making the framework particularly suited for complex and resource-constrained healthcare environments. Although tailored for clinical note summarization, the modular design of ConTextual supports broader applicability to other biomedical domains requiring efficient and domain-specific natural language understanding, such as medical literature review. In particular, our contributions are as follows: • We propose a context-preserving token filtering (CPTF) method that dynamically compresses unstructured clinical text by removing redundancy while retaining essential information. • We construct a domain-specific knowledge graph (KG) and integrate it with the CPTF to form a structured and interpretable framework that enhances contextual fidelity during token selection.

Read the complete text