Downloads · 30 days
17
17% of all-time downloads
mdg-nlp/T5-eventx-recognition-sentence
T5-eventx-recognition-sentence is a token classification model from mdg-nlp. Use it when you need labels on individual words, such as names. The card lists the license as apache-2.0.
This model is a fully fine-tuned version of google/flan-t5-small for Event Expression Extraction (EVENTX).
Downloads · 30 days
17
17% of all-time downloads
All-time downloads
102
Public
Parameters
35.3M
425 MB on disk
Likes
0
Public
Click a slice to open those files.
.pt283 MB · 66%
From the Hugging Face model README
This model is a fully fine-tuned version of google/flan-t5-small for Event Expression Extraction (EVENTX).
The model identifies spans in natural language text that correspond to events, including actions, occurrences, processes, and states expressed in a sentence.
The task is formulated as token-level sequence labeling using BIO tags.
| ID | Label | Description |
|---|---|---|
| 0 | O | Token is outside an event expression |
| 1 | B-E | Beginning of an event expression |
| 2 | I-E | Inside an event expression |
Event Expression Extraction (EVENTX)
Given an input sentence, the model identifies spans corresponding to event expressions.
For example:
Input:
The company announced the acquisition on Monday.
Event expressions:
announced
acquisition
Each token is assigned one of three BIO labels:
Event expression extraction provides structured information about events mentioned in text and can support downstream temporal reasoning, event ordering, relation extraction, and timeline construction.
T5 is an encoder-decoder transformer architecture. For this task, FLAN-T5-small is adapted for token classification and configured to operate as an encoder for sentence-level event expression extraction.
The model is one of the fine-tuned pretrained language model baselines used to study multi-dimensional generalization in temporal extraction tasks.
Dataset: mdg-nlp/eventx-recognition-original
0 -> O
1 -> B-E
2 -> I-E
| Configuration | Value |
|---|---|
| Base Model | google/flan-t5-small |
| Task | Event Expression Extraction |
| Formulation | Token Classification |
| Label Scheme | BIO |
| Fine-tuning | Full fine-tuning |
| Epochs | 3 |
| Learning Rate | 2e-5 |
| Optimizer | AdamW |
| Weight Decay | 0.01 |
| Warmup Steps | 500 |
| Train Batch Size | 16 |
| Evaluation Batch Size | 32 |
| Max Sequence Length | 128 |
All reported scores use micro-F1.
| Evaluation Setting | Micro-F1 |
|---|---|
| Base | 0.70 |
| T2C | 0.17 |
| Adversarial (Adv) | 0.68 |
| Length | 0.66 |
| Vocabulary (Voc) | 0.70 |
| Adversarial Perturbation (Adv_P) | 0.39 |
The evaluation settings measure generalization across the original task, cross-domain data, adversarial examples, structural changes, vocabulary variation, and adversarial perturbations.
from transformers import AutoTokenizer, AutoModelForTokenClassification
model_id = "mdg-nlp/T5-eventx-recognition-sentence"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForTokenClassification.from_pretrained(model_id)
text = "The company announced the acquisition on Monday."
inputs = tokenizer(text, return_tensors="pt", truncation=True)
outputs = model(**inputs)
predictions = outputs.logits.argmax(dim=-1)[0].tolist()
id2label = {
0: "O",
1: "B-E",
2: "I-E"
}
tokens = tokenizer.convert_ids_to_tokens(inputs["input_ids"][0])
for token, prediction in zip(tokens, predictions):
print(token, id2label[prediction])
This model was developed as part of research on multi-dimensional generalization in temporal extraction tasks.
The broader work studies temporal and event expression extraction under different forms of distribution shift, including domain shift, adversarial perturbations, vocabulary variation, compositional changes, and structural changes.
Author: Arnav Verma <br> Affiliation: New York University <br> Email: [email protected] <br>
If you use this model in your research, please cite the associated work when available.