Skip to main content
QUICK REVIEW

[Paper Review] PromptNER: Prompt Locating and Typing for Named Entity Recognition

Yongliang Shen, Zeqi Tan|arXiv (Cornell University)|May 26, 2023
Topic ModelingComputer Science3 citations
TL;DR

PromptNER proposes a unified one-round prompt learning framework for named entity recognition that simultaneously locates and types entities using a dual-slot multi-prompt template with position [P] and type [T] slots. By enabling parallel prediction across all entities and employing a dynamic template filling mechanism via extended bipartite graph matching, PromptNER achieves state-of-the-art performance, especially in cross-domain few-shot settings, outperforming prior models by +7.7% average F1.

ABSTRACT

Prompt learning is a new paradigm for utilizing pre-trained language models and has achieved great success in many tasks. To adopt prompt learning in the NER task, two kinds of methods have been explored from a pair of symmetric perspectives, populating the template by enumerating spans to predict their entity types or constructing type-specific prompts to locate entities. However, these methods not only require a multi-round prompting manner with a high time overhead and computational cost, but also require elaborate prompt templates, that are difficult to apply in practical scenarios. In this paper, we unify entity locating and entity typing into prompt learning, and design a dual-slot multi-prompt template with the position slot and type slot to prompt locating and typing respectively. Multiple prompts can be input to the model simultaneously, and then the model extracts all entities by parallel predictions on the slots. To assign labels for the slots during training, we design a dynamic template filling mechanism that uses the extended bipartite graph matching between prompts and the ground-truth entities. We conduct experiments in various settings, including resource-rich flat and nested NER datasets and low-resource in-domain and cross-domain datasets. Experimental results show that the proposed model achieves a significant performance improvement, especially in the cross-domain few-shot setting, which outperforms the state-of-the-art model by +7.7% on average.

Motivation & Objective

  • Address the inefficiency and high computational cost of existing prompt learning methods for NER that require multiple rounds of inference.
  • Overcome the limitations of span-oriented and type-oriented prompting by unifying entity locating and typing into a single, parallel prediction framework.
  • Improve performance in low-resource and cross-domain NER scenarios where few-shot generalization is critical.
  • Design a label assignment mechanism that dynamically matches prompts to ground-truth entities without prior correspondence.
  • Enable efficient, scalable inference by eliminating the need for iterative or autoregressive generation across entity spans or types.

Proposed method

  • Introduce a dual-slot multi-prompt template with [P] for entity position and [T] for entity type, allowing simultaneous prediction of all entities in one forward pass.
  • Use a multi-prompt setup with M prompts per input, where each prompt contains a unique [P] and [T] slot pair to cover potential entities.
  • Design a dynamic template filling mechanism based on extended bipartite graph matching to assign ground-truth labels to [P] and [T] slots during training.
  • Model the label assignment as a one-to-many matching problem, allowing one entity to be predicted by multiple prompts to improve robustness and coverage.
  • Leverage pre-trained language models (e.g., BERT) to perform masked language modeling on the [T] slot while predicting span boundaries via [P] slot attention.
  • Optimize the model end-to-end using a differentiable loss function that incorporates the bipartite matching cost to align predicted slots with true entities.

Experimental results

Research questions

  • RQ1Can entity locating and typing be effectively unified in a single prompt learning framework to eliminate multi-round inference?
  • RQ2How can dynamic label assignment be achieved between prompts and ground-truth entities without requiring predefined correspondence?
  • RQ3Does the proposed dual-slot multi-prompt design improve performance on both flat and nested NER benchmarks, especially in low-resource and cross-domain settings?
  • RQ4To what extent does the model’s inference efficiency improve compared to autoregressive or iterative prompting baselines?
  • RQ5How sensitive is the model’s performance to prompt template design, particularly regarding the use of contextual tokens?

Key findings

  • PromptNER achieves a +7.7% average F1 improvement over the previous state-of-the-art model in cross-domain few-shot NER settings.
  • On the CoNLL03 dataset, PromptNER achieves 48.23× faster inference than TemplateNER, 25.86× faster than MRC, and 20.17× faster than BARTNER due to one-round parallel prediction.
  • The default template with only [P] and [T] slots (no contextual tokens) outperforms hard and soft templates with added tokens, likely due to sequence length constraints in BERT.
  • Soft templates slightly improve performance over hard templates, but the best results are achieved with a minimal, slot-only template design.
  • The extended bipartite graph matching mechanism with one-to-many assignment significantly improves label assignment accuracy and entity coverage.
  • PromptNER generalizes well across diverse settings, including flat, nested, in-domain, and cross-domain NER, demonstrating strong robustness and data efficiency.

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.