BERT for Temporal Expression Recognition

Overview

This model is a fine-tuned version of google-bert/bert-base-cased for temporal expression recognition.

The model performs token-level sequence labeling to identify temporal expressions in natural language text using BIO tagging.

Labels

  • 0: O
  • 1: B-T
  • 2: I-T

where:

  • O represents tokens outside a temporal expression.
  • B-T represents the beginning of a temporal expression.
  • I-T represents a token inside a temporal expression.

Task

Temporal Expression Recognition

Given an input text, the model identifies spans corresponding to temporal expressions such as dates, times, durations, and other references to time.

The task is formulated as token classification using BIO sequence labeling.


Purpose

This model was developed as a supporting model for adversarial dataset construction rather than as a primary model for downstream temporal reasoning experiments.

Its purpose is to identify the locations of temporal expressions in the original input text before adversarial transformations are applied.

Temporal reasoning examples often contain specific spans that carry important temporal information. Applying perturbations without identifying these spans can unintentionally modify the temporal expression itself, alter the underlying temporal relationship, or otherwise change the meaning of the original example.

This model provides token-level temporal expression boundaries that can be used by the adversarial data-generation pipeline to locate and distinguish temporal expressions from the surrounding context.

The resulting span information allows the adversarial generation process to perform more controlled transformations of the input while keeping track of the temporal expressions present in the original example.

The model therefore serves as an auxiliary component of the adversarial dataset generation pipeline. It is not intended to represent the primary model being evaluated for temporal reasoning or generalization.


Role in the Adversarial Generation Pipeline

At a high level, the model is used as follows:

  1. An original text example is provided to the model.
  2. The model performs token-level temporal expression recognition.
  3. Tokens belonging to temporal expressions are identified using the B-T and I-T labels.
  4. These detected spans provide structural information about where temporal expressions occur in the input.
  5. The span information is used during construction of adversarial variants of the original examples.

This separation between expression detection and adversarial transformation helps make the data-generation process more controlled.


Usage

from transformers import AutoTokenizer, AutoModelForTokenClassification, pipeline

model_id = "mdg-nlp/updated-time-ner-bert-base-cased"

tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForTokenClassification.from_pretrained(model_id)

classifier = pipeline(
    "token-classification",
    model=model,
    tokenizer=tokenizer
)

text = "The patient returned to the hospital on Monday."

predictions = classifier(text)

print(predictions)

Limitations

  • Temporal expressions that differ substantially from those encountered during fine-tuning may not be identified correctly.
  • Tokenization can affect predicted expression boundaries.
  • Complex or ambiguous temporal expressions may result in incomplete or incorrect spans.
  • The model is intended primarily as a supporting component for adversarial dataset construction.
  • Predictions should not be interpreted as complete temporal reasoning or temporal relation predictions.

Research Context

This model was developed as part of research studying the behavior and generalization of NLP models under adversarial and other distributional changes.

Within that research pipeline, the model provides temporal expression span information needed during the construction of adversarial examples. The resulting adversarial data can then be used independently to study how models behave when the original inputs are systematically perturbed.


Contact

Author: Arnav Verma
Affiliation: New York University (2026–Present), University of North Texas (2023–2026)


Citation

If you use this model in your research, please cite the associated work when available.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for mdg-nlp/updated-time-ner-bert-base-cased

Finetuned
(2944)
this model