Skip to main content
QUICK REVIEW

[Paper Review] FLERT: Document-Level Features for Named Entity Recognition

Stefan Schweter, Alan Akbik|arXiv (Cornell University)|Nov 13, 2020
Topic ModelingComputer Science22 references15 citations
TL;DR

This paper proposes FLERT, a method that enhances named entity recognition (NER) by incorporating document-level context through transformer-based models, using a fixed 64-token window of left and right context per sentence. It demonstrates that fine-tuning with enforced document boundaries yields state-of-the-art results across multiple CoNLL-03 datasets, improving F1 scores by up to 1.81 points on German and 1.5 points on Dutch.

ABSTRACT

Current state-of-the-art approaches for named entity recognition (NER) typically consider text at the sentence-level and thus do not model information that crosses sentence boundaries. However, the use of transformer-based models for NER offers natural options for capturing document-level features. In this paper, we perform a comparative evaluation of document-level features in the two standard NER architectures commonly considered in the literature, namely "fine-tuning" and "feature-based LSTM-CRF". We evaluate different hyperparameters for document-level features such as context window size and enforcing document-locality. We present experiments from which we derive recommendations for how to model document context and present new state-of-the-art scores on several CoNLL-03 benchmark datasets. Our approach is integrated into the Flair framework to facilitate reproduction of our experiments.

Motivation & Objective

  • To evaluate the impact of document-level features in NER independently of other model components.
  • To compare two dominant transformer-based NER architectures: fine-tuning and feature-based LSTM-CRF.
  • To identify optimal hyperparameters for document-level context, including window size and document boundary enforcement.
  • To achieve new state-of-the-art performance on standard CoNLL-03 NER benchmarks using document-level context.
  • To integrate the method into the Flair NLP framework for reproducibility and community use.

Proposed method

  • For each sentence to be tagged, the model is fed with 64 subtokens of left and right context to form a document-aware input sequence.
  • The model uses self-attention in the transformer encoder to allow cross-sentence influence on word representations, enabling document-level context modeling.
  • Two architectures are evaluated: (1) fine-tuning the full transformer with a linear head for token-level prediction, and (2) using the transformer only as a feature extractor for an external LSTM-CRF model.
  • The best-performing configurations are selected using development set performance, with hyperparameters like context window size and document boundary enforcement tuned via ablation.
  • Document boundaries are enforced during training by truncating context at document-level markers, which improves performance.
  • The final model is integrated as the FLERT extension in the Flair NLP framework for public release and reproducibility.

Experimental results

Research questions

  • RQ1How does incorporating document-level context affect NER performance compared to sentence-level modeling?
  • RQ2Which of the two standard NER architectures—fine-tuning or feature-based LSTM-CRF—benefits more from document-level features?
  • RQ3What is the optimal context window size for document-level features in NER?
  • RQ4Does enforcing document boundaries during training improve model performance, and why might this be necessary?
  • RQ5Can document-level features lead to new state-of-the-art results on standard CoNLL-03 NER benchmarks?

Key findings

  • Document-level features significantly improve NER performance, increasing the average F1 score by 1.15 points across all languages compared to sentence-level modeling.
  • Fine-tuning the full transformer model with document-level features outperforms the feature-based LSTM-CRF approach by approximately 2 points in average F1 score.
  • Enforcing document boundaries during training improves performance across all languages, indicating that transformers do not inherently respect document boundaries without explicit supervision.
  • The optimal context window size is 64 tokens on each side, as it yields the highest performance across all languages in the fine-tuning setup.
  • FLERT achieves new state-of-the-art results on the German and Dutch CoNLL-03 datasets, improving F1 by 1.81 and 1.50 points respectively compared to prior work.
  • The largest performance gains from document-level features are observed for the ORG (organization) and PER (person) entity types, suggesting that cross-sentence context is most beneficial for these categories.

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.