Skip to main content
QUICK REVIEW

[Paper Review] Template-Based Named Entity Recognition Using BART

Leyang Cui, Yu Wu|arXiv (Cornell University)|Jun 3, 2021
Topic ModelingComputer Science29 references11 citations
TL;DR

This paper proposes a template-based few-shot named entity recognition method using BART, treating NER as a sequence-to-sequence generation task where candidate spans are scored via filled templates (e.g., 'Bangkok is a location entity'). The approach significantly outperforms fine-tuned BERT and metric-based methods on low-resource domains, achieving 92.55 F1 on CoNLL03 and 10.88–15.34 F1 gains on MIT Movie, MIT Restaurant, and ATIS.

ABSTRACT

There is a recent interest in investigating few-shot NER, where the low-resource target domain has different label sets compared with a resource-rich source domain. Existing methods use a similarity-based metric. However, they cannot make full use of knowledge transfer in NER model parameters. To address the issue, we propose a template-based method for NER, treating NER as a language model ranking problem in a sequence-to-sequence framework, where original sentences and statement templates filled by candidate named entity span are regarded as the source sequence and the target sequence, respectively. For inference, the model is required to classify each candidate span based on the corresponding template scores. Our experiments demonstrate that the proposed method achieves 92.55% F1 score on the CoNLL03 (rich-resource task), and significantly better than fine-tuning BERT 10.88%, 15.34%, and 11.73% F1 score on the MIT Movie, the MIT Restaurant, and the ATIS (low-resource task), respectively.

Motivation & Objective

  • Address the challenge of few-shot named entity recognition in low-resource domains with different label sets than resource-rich source domains.
  • Overcome limitations of existing similarity-based metric methods that fail to update model parameters and rely on textual pattern similarity.
  • Enable zero-shot and few-shot adaptation to new entity types without retraining the output layer or requiring consistent label sets.
  • Improve knowledge transfer from source to target domains by leveraging the generative capabilities of pre-trained models like BART.
  • Support continual learning by allowing incremental addition of new entity types without catastrophic forgetting or retraining from scratch.

Proposed method

  • Treat NER as a sequence-to-sequence generation problem: input is the original sentence, and the target is a template filled with candidate spans and entity types (e.g., 'Bangkok is a location entity').
  • Fine-tune BART on source domain data using templates to learn to generate correct entity assertions for each span.
  • During inference, enumerate all candidate spans in the input sentence and score each using the model’s likelihood of generating the corresponding template.
  • Use templates for non-entities such as ‘<span> is not a named entity’ to enable binary classification of spans.
  • Leverage the pre-trained language model’s generalization ability to transfer knowledge across domains with differing writing styles and label sets.
  • Enable continual learning by fine-tuning on new domains without modifying the output layer or retraining from scratch.

Experimental results

Research questions

  • RQ1Can a generative pre-trained model like BART be effectively adapted for few-shot NER with arbitrary new entity types without retraining the output layer?
  • RQ2How does template-based NER compare to traditional sequence labeling and metric-based few-shot methods in low-resource cross-domain settings?
  • RQ3To what extent does the method generalize across domains with different writing styles and label distributions?
  • RQ4Does the method improve performance on low-frequency and mid-frequency entity types in few-shot scenarios?
  • RQ5Can the model support continual learning by incrementally incorporating new entity types without catastrophic forgetting?

Key findings

  • The proposed method achieves 92.55 F1 on the CoNLL03 benchmark, demonstrating strong performance on rich-resource NER.
  • On low-resource domains, the model outperforms fine-tuned BERT by 10.88, 15.34, and 11.73 F1 points on MIT Movie, MIT Restaurant, and ATIS, respectively.
  • The method shows superior robustness on mid-frequency and low-frequency entity types, with F1 gains of 6.6, 6.9, and 5.4 over BERT on MIT Restaurant, MIT Movie, and ATIS.
  • In continual learning experiments, fine-tuning the CoNLL03 model on MIT Movie and MIT Restaurant caused only a slight drop in CoNLL03 performance, indicating strong domain generalization.
  • t-SNE visualization shows that the template-based BART’s output embeddings are more domain-independent and sparsely distributed compared to BERT’s dataset-clustered embeddings, indicating better cross-domain generalization.
  • Error analysis reveals that performance drops when label semantics (e.g., 'SONG') are far from source domain labels (e.g., 'PERSON'), but the method still outperforms BERT on such rare or semantically distant labels.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.