Zero-shot Temporal Relation Extraction with ChatGPT

Chenhan Yuan, Qianqian Xie, Sophia Ananiadou

Temporal Relation Extraction (TRE) is the task of determining the chronological order of events within a text. It is a fundamental component for building timelines, storyline construction, and temporal question answering. Traditionally, TRE has relied on supervised learning, which requires extensive human-annotated datasets—a process that is both costly and time-consuming. This paper investigates whether ChatGPT can perform TRE in a "zero-shot" capacity, identifying temporal relations without specific training data.

Methodology

Researchers from the University of Manchester evaluated ChatGPT using three distinct prompting strategies designed to elicit temporal reasoning:

  1. Zero-shot Prompt: A direct classification approach where the model is provided with a document and asked to identify the relation (e.g., before, after, equal, vague) between two specific event triggers.
  2. Event Ranking Prompt: This strategy asks ChatGPT to list all events that occurred before a specific trigger, treating events as elements in a sequence rather than isolated classification targets.
  3. Chain-of-Thought (CoT) Prompt: A multi-stage reasoning process. The model first determines if two triggers refer to the same event. If they are distinct, it is guided to reason through their temporal order step-by-step.
Comparison of the three prompting strategies: Zero-shot, Event Ranking, and Chain-of-Thought (CoT).

Datasets and Evaluation

The study utilized three benchmark datasets to test various aspects of temporal complexity:

  • MATRES: Focuses on local temporal relations, typically within a narrow context of one or two sentences.
  • TB-Dense (TimeBank-Dense): Features news documents with dense labeling for every event pair.
  • TDDMan (from TDDiscourse): Emphasizes global, discourse-level temporal ordering, requiring the model to track events across long distances in a document.

Key Insights

The "Small Class" Advantage

One of the most persistent problems in TRE is data imbalance; most events are simply "before" or "after" others. Supervised models often become biased toward these majority classes, failing to recognize rarer relations like "equal" or "vague." Interestingly, ChatGPT demonstrated a superior ability to identify these "minority" classes, suggesting a more nuanced internal representation of event relationships, even if its overall accuracy was lower.

The Impact of Prompting

The choice of prompt significantly influenced performance. The Chain-of-Thought (CoT) approach, which breaks the task into simpler binary decisions, yielded substantial improvements, increasing F1 scores by over 20 points in certain scenarios compared to basic zero-shot prompts.

The Consistency Crisis

Despite its strengths, ChatGPT exhibits significant "temporal hallucinations" and logical inconsistencies. For instance, it might correctly state that Event A happened before Event B in one prompt, but fail to list Event A when asked what happened before Event B in a subsequent query. It lacks a cohesive, global logical map of the document's timeline.

Examples of temporal inconsistency in ChatGPT's responses.

Results and Performance Gap

While ChatGPT shows promise as a generalist, it currently lags behind specialized, supervised models:

  • Performance Gap: On the MATRES dataset, the state-of-the-art supervised model (MulCo) achieved an F1 score of 88.2, whereas ChatGPT’s best performance (via CoT) reached only 52.4.
  • Long-Distance Failure: Performance dropped sharply on the TDDMan dataset (F1 of 24.3), indicating that ChatGPT struggles to maintain temporal coherence over long stretches of text.
  • Precision vs. Recall: ChatGPT frequently opted for "vague" answers when uncertain. This resulted in higher precision in some categories but significantly lower recall compared to models forced to make a definitive choice.

Conclusion and Future Directions

The research highlights two primary hurdles for LLMs in temporal reasoning: long-dependency issues and logical inconsistency. Future work should explore prompt engineering techniques that enforce consistency—such as self-correction loops—or hybrid models that integrate Large Language Models with symbolic logic to bridge the performance gap between general-purpose AI and specialized temporal models.

Summary updated

BibTeX
@inproceedings{yuan2023zero,
  author = {Chenhan Yuan and Qianqian Xie and Sophia Ananiadou},
  title = {{Zero-shot Temporal Relation Extraction with ChatGPT}},
  booktitle = {BioNLP @ ACL},
  year = {2023},
  doi = {10.18653/v1/2023.bionlp-1.7},
}
Figure