Discourse-Aware In-Context Learning for Temporal Expression Normalization

Akash Kumar Gautam, Lukas Lange, Jannik Strötgen

TL;DR

This paper explores using large language models (LLMs) for temporal expression (TE) normalization, a crucial step in information extraction. By leveraging in-context learning with a "discourse-aware" approach that considers document-level context and carefully selected examples, the authors achieve competitive results without traditional model training, especially for out-of-domain data.

What Problem Does This Paper Address?

Temporal expression (TE) normalization is the process of converting natural language mentions of time (e.g., "next Tuesday," "last year") into a standardized format like TimeML. Traditional rule-based systems are brittle and domain-specific, while modern deep learning approaches require extensive labeled data, which is scarce, especially for multilingual settings. This paper tackles the challenge of achieving robust TE normalization in data-scarce and multilingual scenarios by exploring the potential of LLMs through in-context learning (ICL). The core problem is how to effectively guide LLMs to perform this complex task without explicit fine-tuning, by providing them with the right context and examples.

Methods

The authors propose a "discourse-aware" in-context learning approach for TE normalization. Instead of treating each sentence in isolation, their method incorporates:

  • In-Context Learning (ICL): LLMs are prompted with a few examples (few-shot learning) of the task, along with instructions, to perform the normalization without any gradient updates.
  • Discourse-Awareness: They maintain a "context window" of previously processed sentences within the same document. This allows the LLM to leverage long-range temporal dependencies and discourse information, which is crucial for normalizing relative or underspecified temporal expressions.
  • Sample Selection Strategies: To optimize the few-shot examples provided to the LLM, they explore several strategies:
  • Target-agnostic: Selects diverse examples to represent the overall task.
  • Target-centric: Selects examples most similar to the target sentence or document.
  • Target-centric + Context Window: Combines target-centric selection with the discourse context window.
  • Expert Prompt: Uses examples derived from TimeML guidelines.
  • Prompt Construction: The final prompt includes system messages, guidelines (examples in TimeML format), and the target sentence.

Datasets

The experiments were conducted on several English datasets:

  • TempEval3: News-style data.
  • i2b2: Clinical data.
  • Ancient-Times: Historical text.
  • TempCourt: Court decisions (further split into ECJ, USC, ECHR).

They also evaluated multilingual capabilities using the Ancient-Times corpus across six languages: Arabic, Dutch, French, German, Spanish, and Vietnamese. No new benchmarks were introduced; existing datasets were used for evaluation.

Key Insights and Ideas

  • LLMs are powerful for TE normalization: The study demonstrates that LLMs, even without fine-tuning, can achieve competitive performance on TE normalization tasks.
  • Discourse context is key: Simply normalizing sentence by sentence is insufficient. Incorporating a context window of previous sentences significantly improves performance by capturing long-range dependencies.
  • Sample selection matters: The choice of few-shot examples is critical. "Target-centric + Context Window" proved to be the most effective strategy across many datasets.
  • Domain distance is a factor: The proposed ICL method shows particular strength when the target document is distant from the training data of traditional models, highlighting its adaptability.
  • Multilingual potential: LLMs can be leveraged for multilingual TE normalization without requiring language-specific resources, by using cross-lingual examples.

Key Results

  • The "Target-centric + Context Window" approach achieved the best ICL performance on five out of six English datasets.
  • The GPT-3.5 model showed strong performance, comparable to or exceeding previous state-of-the-art MLM baselines, especially on the i2b2 clinical corpus where domain distance was a factor.
  • The smaller open-source Zephyr model also showed promise, though it was outperformed by GPT-3.5, particularly on more complex datasets.
  • Multilingual samples generally improved performance, with parallel data yielding the highest gains.
  • The method was able to correctly normalize most explicit, vague, and implicit expressions, benefiting from LLM world knowledge. Relative and under-specified expressions remained challenging.

Limitations and Future Work

  • Limited languages: The experiments were restricted to seven languages, and insights may not generalize to all languages.
  • Context window limitations: While effective, the context window size might still be too limited for very long-distance dependencies in certain corpora (e.g., Ancient-Times).
  • Error analysis: Relative and under-specified expressions were identified as challenging areas, suggesting a need for better context incorporation or handling of ambiguity.
  • Future directions: The authors suggest that advanced example selection strategies could further enhance temporal reasoning abilities for improved TE normalization. They also note that using LLMs for TE extraction is a separate research question that warrants further investigation.

Summary updated

BibTeX
@inproceedings{gautam2024discourse,
  author = {Akash Kumar Gautam and Lukas Lange and Jannik Strötgen},
  title = {{Discourse-Aware In-Context Learning for Temporal Expression Normalization}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2024},
  doi = {10.18653/v1/2024.naacl-short.27},
}
Figure