Abstract
Temporal Relation Extraction (TREX) in clinical narratives is essential for reconstructing patient timelines, yet it remains a significant challenge due to long-range dependencies and dense medical jargon. This paper introduces GRAPHTREX, a novel framework that integrates span-based entity extraction with Heterogeneous Graph Transformers (HGT). By employing "global landmarks" (Window Nodes) and linguistic "Context Nodes," the model effectively bridges distant clinical events. Evaluated on the I2B2 2012 and E3C datasets, GRAPHTREX achieves a new state-of-the-art F1 score of 68.81%, demonstrating significant improvements in identifying long-range temporal relations that traditional models often miss.
Introduction
In Electronic Health Records (EHRs), critical patient insights are often buried in unstructured "free-text" notes. Understanding the precise order of events—such as whether a medication preceded or followed a symptom—is vital for clinical decision support. This task, known as Temporal Relation Extraction (TREX), is complicated by the dense nature of clinical language and the length of medical documents. Traditional Transformer models like BERT often struggle with these long-range connections due to limited context windows, while standard pipeline methods frequently suffer from cascading errors between entity and relation extraction steps.
Methods: The GRAPHTREX Framework
GRAPHTREX addresses these limitations by moving from simple sequence labeling to a document-level graph approach. The architecture consists of three primary stages:
- SPANTREX (Span-based Extraction): Utilizing BioMedBERT, the model identifies all possible token sequences (spans) up to a specific length, classifying them as events (e.g., "hypotensive") or time expressions (e.g., "12/04/18").
- Heterogeneous Graph Construction: To facilitate document-wide reasoning, the model constructs a graph containing three types of nodes:
- Entity Nodes: Representing the extracted events and dates.
- Context Nodes: Pooling information from text situated between entities.
- Window Nodes (Global Landmarks): Acting as hubs for document segments, these nodes allow information to propagate across long distances without the quadratic cost of full attention.
- Heterogeneous Graph Transformer (HGT): The HGT is applied to this graph to perform relational reasoning. For instance, if Event A is linked to Event B, and B to C, the graph helps the model infer the relationship between A and C, even if they are separated by pages of text.
Evaluation and Results
The model was evaluated on the I2B2 2012 Temporal Relations Challenge corpus (310 discharge summaries) and the E3C (European Clinical Case Corpus) to test generalizability.
GRAPHTREX established a new state-of-the-art on the I2B2 2012 dataset with a 68.81% Tempeval F1 score, representing a 5.5% improvement over previous benchmarks. Notably, the model's greatest strength lies in its handling of "distant" relations, where it showed an 8.9% improvement over its own non-graph baseline (SPANTREX).
Discussion and Key Insights
Ablation studies highlighted that Context Nodes—which represent linguistic cues between entities—provided the single largest performance boost. Furthermore, the use of Window Nodes proved to be a successful architectural solution for the "long-document problem" by creating a hierarchical structure for information propagation.
Despite these gains, challenges remain. Clinical data scarcity due to privacy regulations limits cross-system validation. Additionally, future work will focus on integrating structured medical ontologies (like UMLS) and implementing "hard" temporal logic constraints to prevent the prediction of logically inconsistent timelines (e.g., circular temporal relations).
Conclusion
GRAPHTREX represents a significant advancement in clinical TREX by leveraging graph-based reasoning to overcome the limitations of standard sequence models. By treating clinical notes as interconnected graphs of events, landmarks, and context, the framework provides a more robust and accurate reconstruction of the patient journey.
Summary updated