ToNER: Type-oriented Named Entity Recognition with Generative Language Model

Guochao Jiang, Ziqin Luo, Yuchen Shi, Dixuan Wang, Jiaqing Liang, Deqing Yang

Abstract

In recent years, the fine-tuned generative models have been proven more powerful than the previous tagging-based or span-based models on named entity recognition (NER) task. It has also been found that the information related to entities, such as entity types, can prompt a model to achieve NER better. However, it is not easy to determine the entity types indeed existing in the given sentence in advance, and inputting too many potential entity types would distract the model inevitably. To exploit entity types’ merit on promoting NER task, in this paper we propose a novel NER framework, namely ToNER based on a generative model. In ToNER, a type matching model is proposed at first to identify the entity types most likely to appear in the sentence. Then, we append a multiple binary classification task to fine-tune the generative model’s encoder, so as to generate the refined representation of the input sentence. Moreover, we add an auxiliary task for the model to discover the entity types which further fine-tunes the model to output more accurate results. Our extensive experiments on some NER benchmarks verify the effectiveness of our proposed strategies in ToNER that are oriented towards entity types’ exploitation.

1. Introduction

Named Entity Recognition (NER)—the task of identifying and categorizing entities like "London" (Location) or "Apple" (Organization) in text—has recently shifted from simple sequence tagging to using generative models like T5 or BART. However, these models face a significant "noise" problem. To trigger the model, researchers usually provide a "schema" (a list of all possible entity types) in the prompt. If a dataset has dozens of entity types, the prompt becomes cluttered, distracting the model and leading to hallucinations or missed entities. This creates a "chicken-and-egg" problem: to get accurate NER, the model needs to know which types to look for, but it doesn't know which types are relevant until it processes the sentence.

2. Methodology

The proposed ToNER (Type-oriented NER) framework addresses the noise problem by breaking the process into three main components:

  1. Entity Type Matching Model (f_TM): Before the main generative model processes the text, a lightweight BERT-like encoder compares the input sentence against semantic descriptions of every possible entity type. It filters out unlikely types based on a threshold (e.g., delta=0.8), creating a "refined schema" of only the most probable candidates.
  2. Encoder Fine-tuning with Type Classification: Instead of relying solely on standard generative loss, a multiple binary classification task is added to the generative model's encoder. This forces the encoder to learn representations that specifically highlight the presence of relevant entity types.
  3. Auxiliary Task & ToNER-EXP: An auxiliary task is introduced where the model is trained to simply list the entity types found in the text. A variant, ToNER-EXP, incorporates "Chain-of-Thought" (CoT) explanations (generated by GPT-4 during training) to teach the model the reasoning behind specific entity classifications.
Overview of the ToNER and ToNER-EXP frameworks, illustrating the type matching and prompting process.

3. Experimental Evaluation

The framework was evaluated on five diverse NER benchmarks:

  • CoNLL2003: Standard news wire articles (4 types).
  • OntoNotes 5.0: A large, multi-genre corpus (18 types).
  • JNLPBA: Technical biomedical data (5 types).
  • ACE2004 & ACE2005: Datasets containing "nested" entities.

4. Results and Analysis

ToNER achieved state-of-the-art (SOTA) results across several benchmarks. On CoNLL2003, it reached an F1 score of 93.83, and on OntoNotes 5.0, it achieved 91.30. The generative approach proved particularly effective for nested NER tasks like ACE2004/2005.

4.1 Key Insights

  • Filtering Benefits: Reducing the search space for the decoder significantly improves accuracy. By only prompting the model with "credible" types, the model's attention is much more focused.
  • The Model Size Paradox: Interestingly, the "Large" version of ToNER (780M parameters) often outperformed the "XL" version (3B parameters) on several tasks. This suggests that without massive amounts of task-specific data, larger models are harder to fine-tune effectively for niche tasks.
  • Emergent Reasoning: Adding Chain-of-Thought explanations (ToNER-EXP) actually decreased performance on smaller and medium-sized models. This performance boost only emerged at the "XXL" (11B parameter) scale, indicating that complex reasoning is an emergent property.
Performance comparison between ToNER and ToNER-EXP across 'large' and 'xl' model sizes.

5. Conclusion

ToNER demonstrates that type-oriented filtering and multi-task learning can significantly enhance generative NER. While the study focused on Encoder-Decoder models, future work will explore Decoder-only architectures and further refine auxiliary tasks to complement the primary extraction goal.

Summary updated

BibTeX
@inproceedings{jiang2024toner,
  author = {Guochao Jiang and Ziqin Luo and Yuchen Shi and Dixuan Wang and Jiaqing Liang and Deqing Yang},
  title = {{ToNER: Type-oriented Named Entity Recognition with Generative Language Model}},
  booktitle = {International Conference on Computational Linguistics},
  year = {2024},
  url = {https://openreview.net/forum?id=6Th0KzOMgG},
}
Figure