Skip to main content
QUICK REVIEW

[Paper Review] GLiNER: Generalist Model for Named Entity Recognition using Bidirectional Transformer

Urchade Zaratiana, Nadi Tomeh|arXiv (Cornell University)|Nov 14, 2023
Topic ModelingComputer Science6 citations
TL;DR

GLiNER is a compact, bidirectional transformer-based model for zero-shot Named Entity Recognition (NER) that treats entity recognition as a matching task between entity type embeddings and span representations in a shared latent space. It outperforms both ChatGPT and fine-tuned LLMs on zero-shot NER benchmarks while enabling fast, parallel inference, making it efficient for resource-constrained environments.

ABSTRACT

Named Entity Recognition (NER) is essential in various Natural Language Processing (NLP) applications. Traditional NER models are effective but limited to a set of predefined entity types. In contrast, Large Language Models (LLMs) can extract arbitrary entities through natural language instructions, offering greater flexibility. However, their size and cost, particularly for those accessed via APIs like ChatGPT, make them impractical in resource-limited scenarios. In this paper, we introduce a compact NER model trained to identify any type of entity. Leveraging a bidirectional transformer encoder, our model, GLiNER, facilitates parallel entity extraction, an advantage over the slow sequential token generation of LLMs. Through comprehensive testing, GLiNER demonstrate strong performance, outperforming both ChatGPT and fine-tuned LLMs in zero-shot evaluations on various NER benchmarks.

Motivation & Objective

  • To develop a generalist NER model that can recognize arbitrary entity types without requiring predefined labels.
  • To overcome the limitations of autoregressive LLMs, such as slow sequential generation and high computational cost.
  • To enable efficient, parallel entity extraction using a smaller, bidirectional transformer architecture.
  • To improve zero-shot performance across diverse domains and low-resource languages.
  • To enhance robustness through data augmentation techniques like negative entity sampling and entity type dropping.

Proposed method

  • GLiNER uses a bidirectional transformer encoder (e.g., BERT or deBERTa) to generate contextualized token representations from a unified input sequence of entity type prompts and source text.
  • The model employs a span representation module that computes dense embeddings for all possible spans in the input text using token representations.
  • Entity type prompts are embedded into a shared latent space using a dedicated entity representation module.
  • Matching scores between span representations and entity embeddings are computed via dot product followed by sigmoid activation to predict entity types.
  • During training, negative entity types are sampled at 50% ratio to improve precision and reduce false positives.
  • Entity type dropping is applied during training, where a random subset of entity prompts is masked per input, enhancing model robustness to variable input complexity.
Figure 1: BiLM for Open NER. Previous models, such as UniNER (Zhou et al., 2023 ) (Fig. a), approach the task of open type NER by prompting LLMs with natural language instructions (using a multi-turn dialogue style). Our proposed GLiNER utilizes small bidirectional LMs and treats the NER task as mat
Figure 1: BiLM for Open NER. Previous models, such as UniNER (Zhou et al., 2023 ) (Fig. a), approach the task of open type NER by prompting LLMs with natural language instructions (using a multi-turn dialogue style). Our proposed GLiNER utilizes small bidirectional LMs and treats the NER task as mat

Experimental results

Research questions

  • RQ1Can a compact, non-autoregressive model based on bidirectional transformers outperform large autoregressive LLMs in zero-shot NER?
  • RQ2Does treating NER as a matching task in latent space enable faster, parallel inference compared to autoregressive generation?
  • RQ3How does negative entity sampling affect the balance between precision and recall in open-vocabulary NER?
  • RQ4To what extent can a model fine-tuned on diverse, open-domain data generalize to low-resource languages not seen during training?
  • RQ5Can data augmentation strategies like entity type dropping improve zero-shot generalization and robustness?

Key findings

  • GLiNER outperforms both ChatGPT and fine-tuned LLMs on zero-shot NER benchmarks, achieving higher F1 scores across multiple datasets.
  • The model achieves a 5.6% performance gain when training data is limited to 100 samples per dataset, indicating strong few-shot generalization.
  • With 50% negative entity sampling, the model achieves the best balance between precision (62.3%) and recall (59.7%), outperforming both 0% and 75% negative sampling strategies.
  • GLiNER surpasses ChatGPT in 8 out of 10 low-resource languages not included in its training data, demonstrating strong zero-shot multilingual generalization.
  • The use of entity type dropping during training improves out-of-domain evaluation performance by over 1.4 F1 points on average.
  • Pretraining on the Pile-NER dataset significantly boosts performance, especially in low-data regimes, showing successful positive transfer from large-scale, diverse data.
Figure 2: Model architecture . GLiNER employs a BiLM and takes as input entity type prompts and a sentence/text. Each entity is separated by a learned token [ENT] . The BiLM outputs representations for each token. Entity embeddings are passed into a FeedForward Network, while input word representati
Figure 2: Model architecture . GLiNER employs a BiLM and takes as input entity type prompts and a sentence/text. Each entity is separated by a learned token [ENT] . The BiLM outputs representations for each token. Entity embeddings are passed into a FeedForward Network, while input word representati

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.