Table of Contents
Fetching ...

BANER: Boundary-Aware LLMs for Few-Shot Named Entity Recognition

Quanjiang Guo, Yihong Dong, Ling Tian, Zhao Kang, Yu Zhang, Sijie Wang

TL;DR

BANER tackles few-shot NER by decoupling span detection and type classification while enhancing both with boundary-aware contrastive learning and cross-domain prototype alignment via LoRAHub. It introduces boundary-aware samples and a specialized loss to improve entity boundary perception in LLMs, and constructs adaptive, domain-aligned prototypes for accurate typing. Across Few-NERD and cross-dataset benchmarks, BANER consistently outperforms prior two-stage methods, demonstrating robustness across multiple LLM architectures. The approach offers practical impact for rapid, domain-adaptive NER with limited labeled data, while acknowledging prompt design and computational constraints as directions for future work.

Abstract

Despite the recent success of two-stage prototypical networks in few-shot named entity recognition (NER), challenges such as over/under-detected false spans in the span detection stage and unaligned entity prototypes in the type classification stage persist. Additionally, LLMs have not proven to be effective few-shot information extractors in general. In this paper, we propose an approach called Boundary-Aware LLMs for Few-Shot Named Entity Recognition to address these issues. We introduce a boundary-aware contrastive learning strategy to enhance the LLM's ability to perceive entity boundaries for generalized entity spans. Additionally, we utilize LoRAHub to align information from the target domain to the source domain, thereby enhancing adaptive cross-domain classification capabilities. Extensive experiments across various benchmarks demonstrate that our framework outperforms prior methods, validating its effectiveness. In particular, the proposed strategies demonstrate effectiveness across a range of LLM architectures. The code and data are released on https://github.com/UESTC-GQJ/BANER.

BANER: Boundary-Aware LLMs for Few-Shot Named Entity Recognition

TL;DR

BANER tackles few-shot NER by decoupling span detection and type classification while enhancing both with boundary-aware contrastive learning and cross-domain prototype alignment via LoRAHub. It introduces boundary-aware samples and a specialized loss to improve entity boundary perception in LLMs, and constructs adaptive, domain-aligned prototypes for accurate typing. Across Few-NERD and cross-dataset benchmarks, BANER consistently outperforms prior two-stage methods, demonstrating robustness across multiple LLM architectures. The approach offers practical impact for rapid, domain-adaptive NER with limited labeled data, while acknowledging prompt design and computational constraints as directions for future work.

Abstract

Despite the recent success of two-stage prototypical networks in few-shot named entity recognition (NER), challenges such as over/under-detected false spans in the span detection stage and unaligned entity prototypes in the type classification stage persist. Additionally, LLMs have not proven to be effective few-shot information extractors in general. In this paper, we propose an approach called Boundary-Aware LLMs for Few-Shot Named Entity Recognition to address these issues. We introduce a boundary-aware contrastive learning strategy to enhance the LLM's ability to perceive entity boundaries for generalized entity spans. Additionally, we utilize LoRAHub to align information from the target domain to the source domain, thereby enhancing adaptive cross-domain classification capabilities. Extensive experiments across various benchmarks demonstrate that our framework outperforms prior methods, validating its effectiveness. In particular, the proposed strategies demonstrate effectiveness across a range of LLM architectures. The code and data are released on https://github.com/UESTC-GQJ/BANER.

Paper Structure

This paper contains 34 sections, 17 equations, 6 figures, 7 tables.

Figures (6)

  • Figure 1: (a) shows under/over-detected false spans, (b) shows correct spans obtained by adopting our boundary-aware LLM, (c) shows unaligned entity type prototypes, (d) shows aligned prototypes obtained by our domain adaption strategy.
  • Figure 2: Overall structure of the proposed BANER. (a) Entity span detection with pre-training in the source domain. (b) Entity type classification with fine-tuning in the support samples of target domain. (c) Inference on the query set of target domain.
  • Figure 3: F1 Score for different LLMs under the GUM 5-shot setting.
  • Figure 4: F1 Score, Recall, and Precision for different hidden layers under the GUM 5-shot setting.
  • Figure 5: Example of the prompt in entity span detection.
  • ...and 1 more figures