Skip to main content
QUICK REVIEW

[Paper Review] BANER: Boundary-Aware LLMs for Few-Shot Named Entity Recognition

Quanjiang Guo, Yihong Dong|arXiv (Cornell University)|Dec 3, 2024
Topic ModelingComputer Science3 citations
TL;DR

BANER proposes a boundary-aware contrastive learning strategy and domain-adaptive LoRAHub to enhance few-shot named entity recognition in LLMs. By improving entity boundary perception and aligning prototypes across domains, BANER achieves state-of-the-art performance across multiple benchmarks, especially in low-resource and cross-domain settings.

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.

Motivation & Objective

  • Address the challenge of inaccurate entity span detection in few-shot NER, where models often over- or under-detect entity boundaries due to poor boundary perception.
  • Overcome the misalignment of entity type prototypes between source and target domains, which degrades cross-domain few-shot classification performance.
  • Leverage large language models (LLMs) effectively for few-shot information extraction, where prior methods have shown limited success despite LLMs' general capabilities.
  • Improve zero-shot and few-shot transfer performance by integrating contrastive learning and domain adaptation within a two-stage framework.
  • Demonstrate the effectiveness and generalizability of the proposed method across diverse LLM architectures and low-resource datasets.

Proposed method

  • Introduce a boundary-aware contrastive learning strategy that minimizes the distance between span embeddings and their corresponding entity type embeddings, enhancing LLMs' perception of entity boundaries.
  • Apply this contrastive learning on the 25th hidden layer of LLaMA-2, which yields the highest F1 score, indicating optimal abstraction for boundary-aware feature learning.
  • Utilize LoRAHub for domain adaptation, enabling joint pretraining on the source domain and adaptive alignment of prototypes in the target domain to preserve and transfer entity type knowledge.
  • Decompose the NER task into two stages: (1) span detection using boundary-aware contrastive learning, and (2) type classification using domain-aligned prototypes.
  • Fine-tune both stages jointly using support examples from the target domain, improving generalization and reducing distribution shift effects.
  • Apply prompt engineering with fixed templates for both span detection and classification, ensuring consistency and interpretability in LLM inference.

Experimental results

Research questions

  • RQ1Can boundary-aware contrastive learning significantly improve the accuracy of entity span detection in few-shot NER, especially for generalized or rare entity spans?
  • RQ2To what extent does domain-adaptive prototype alignment via LoRAHub enhance cross-domain few-shot classification performance in NER?
  • RQ3How does the choice of LLM hidden layer affect the quality of boundary-aware representations in the contrastive learning objective?
  • RQ4Does the integration of contrastive learning and domain adaptation lead to consistent performance gains across different LLM architectures and datasets?
  • RQ5How effective is BANER compared to standard LLMs and prior SOTA methods in low-shot and cross-domain few-shot NER settings?

Key findings

  • BANER achieves an average F1 score of 49.0 across all few-shot NER benchmarks (1-shot and 5-shot), significantly outperforming the baseline LLaMA-2-7B, which scores only 26.7.
  • Removing the boundary-aware contrastive learning strategy leads to a substantial drop in performance—especially on sparse datasets like I2B2—indicating its critical role in accurate span detection.
  • The ablation study shows that LoRAHub-based domain adaptation contributes most to performance gains, with a 7.5-point improvement in average F1 when included.
  • The method generalizes well across LLMs: BANER achieves higher F1 scores than the 0-shot baseline on Mistral-7B and LLaMA-3-8B, demonstrating broad applicability.
  • The 25th hidden layer of LLaMA-2 yields the best balance between precision and recall (F1 = 46.9), suggesting it captures optimal high-level representations for boundary-aware learning.
  • Even without fine-tuning in both stages, BANER maintains strong performance (42.2 average F1), indicating that the source-domain prototypes are already well-aligned and effective for zero-shot transfer.

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.