Clinical Temporal Relation Extraction with Probabilistic Soft Logic Regularization and Global Inference

Yichao Zhou, Yu Yan, Rujun Han, J. Harry Caufield, Kai-Wei Chang, Yizhou Sun, Peipei Ping, Wei Wang

Abstract

Extracting accurate timelines from clinical case reports is essential for medical research but remains challenging due to the unstructured nature of narrative data. Traditional models often produce inconsistent temporal relations or rely on computationally expensive global constraints. This paper introduces CTRL-PG, a framework that integrates BERT-based language modeling with Probabilistic Soft Logic (PSL) and a greedy global inference mechanism. By incorporating temporal transitivity as a differentiable loss function during training and employing a "Check-And-Add" algorithm during inference, CTRL-PG achieves state-of-the-art performance on clinical and general-domain benchmarks while maintaining linear time complexity.

Introduction: The Challenge of Clinical Timelines

Clinical case reports (CCRs) contain rich longitudinal data, but the sequence of medical events—symptoms, diagnoses, and treatments—is often scattered throughout the text. Automatically reconstructing a chronological timeline is a structured prediction task known as temporal relation extraction.

Existing approaches face two primary hurdles. First, local inconsistency: models predicting relations between pairs of events in isolation may produce illogical results, such as predicting that Event A occurred before B, B before C, and C before A. Second, computational complexity: while frameworks like Integer Linear Programming (ILP) can enforce global consistency, they are often NP-hard and do not scale well to the long, complex narratives found in medical documentation.

A temporal relation graph illustrating the complexity of events and their chronological links in a clinical report.

The CTRL-PG Framework

To address these issues, the authors developed CTRL-PG (Clinical Temporal ReLation Exaction with PSL and Global Inference). The framework bridges the gap between the contextual understanding of deep learning and the logical consistency of symbolic reasoning.

1. BERT-based Encoder

The model utilizes a BERT encoder to generate high-dimensional embeddings for pairs of clinical events. These embeddings capture the linguistic context surrounding event mentions, which are then passed through a feed-forward network (FFN) and a softmax layer to produce a probability distribution over temporal relations (e.g., Before, After, Overlap).

2. Probabilistic Soft Logic (PSL) Regularization

The core innovation lies in the use of PSL to enforce temporal logic during training. Instead of treating rules like transitivity (e.g., if A overlaps B and B overlaps C, then A overlaps C) as hard constraints, the authors use Łukasiewicz t-norms to transform them into a continuous, differentiable loss function ($L_{psl}$). This allows the model to be penalized for "illogical" predictions during the backpropagation phase, effectively teaching the model the underlying structure of time.

The CTRL-PG architecture, showing the integration of BERT embeddings with PSL regularization and global temporal inference.

3. Global Temporal Inference (GTI)

During inference, the model employs a "Check-And-Add" algorithm to ensure a conflict-free final timeline. The process begins by anchoring the timeline with high-confidence predictions, such as relations between explicit time expressions (e.g., "Monday" vs. "Tuesday"). It then greedily adds other event-event and event-time relations in decreasing order of their predicted probability, but only if they do not contradict the existing "Timegraph." This approach maintains linear time complexity, making it highly scalable.

Experimental Evaluation

The model was evaluated on two distinct datasets to test its performance and generalizability:

  • I2B2-2012: A benchmark clinical dataset containing 310 discharge summaries.
  • TB-Dense (TimeBank-Dense): A news-domain dataset used to evaluate the model's robustness outside of clinical text.

Key Results

CTRL-PG established new state-of-the-art results:

  • I2B2-2012: The model achieved an 80.20 F1 score, outperforming vanilla BERT baselines by 2.0% and ILP-based structured prediction models by 2.5%.
  • TB-Dense: It reached a 65.2 F1 score, a 2.5% improvement over the baseline.
  • Ablation Analysis: Removing PSL regularization led to a 1.44% drop in performance, while removing Global Inference caused a 1.83% decrease. These results confirm that both the "soft" logic during training and the "hard" logic during inference are critical for accuracy.

Conclusion and Future Directions

CTRL-PG demonstrates that integrating symbolic logic into deep learning architectures can significantly improve the consistency and accuracy of temporal extraction. By moving logic from a post-processing step into the training loop, the model learns to respect the fundamental properties of time.

While highly effective, the authors note that the model currently struggles with recurring events (e.g., multiple instances of the same symptom over time). Future research will focus on improving event coreference and expanding the logic rules to accommodate more complex clinical scenarios, such as overlapping treatment cycles and multi-stage disease progression.

Summary updated

BibTeX
@inproceedings{zhou2021clinical,
  author = {Yichao Zhou and Yu Yan and Rujun Han and J. Harry Caufield and Kai-Wei Chang and Yizhou Sun and Peipei Ping and Wei Wang},
  title = {{Clinical Temporal Relation Extraction with Probabilistic Soft Logic Regularization and Global Inference}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i16.17721},
}
Figure