Skip to main content
QUICK REVIEW

[Paper Review] Meta-Learning Triplet Network with Adaptive Margins for Few-Shot Named Entity Recognition

Chengcheng Han, Renyu Zhu|arXiv (Cornell University)|Feb 14, 2023
Topic ModelingComputer Science10 citations
TL;DR

MeTNet introduces a meta-learning triplet network that uses adaptive margins and prototype vectors only for entity types (not the O-class) to improve few-shot NER, demonstrating superior performance and releasing a Chinese dataset FEW-COMM.

ABSTRACT

Meta-learning methods have been widely used in few-shot named entity recognition (NER), especially prototype-based methods. However, the Other(O) class is difficult to be represented by a prototype vector because there are generally a large number of samples in the class that have miscellaneous semantics. To solve the problem, we propose MeTNet, which generates prototype vectors for entity types only but not O-class. We design an improved triplet network to map samples and prototype vectors into a low-dimensional space that is easier to be classified and propose an adaptive margin for each entity type. The margin plays as a radius and controls a region with adaptive size in the low-dimensional space. Based on the regions, we propose a new inference procedure to predict the label of a query instance. We conduct extensive experiments in both in-domain and cross-domain settings to show the superiority of MeTNet over other state-of-the-art methods. In particular, we release a Chinese few-shot NER dataset FEW-COMM extracted from a well-known e-commerce platform. To the best of our knowledge, this is the first Chinese few-shot NER dataset. All the datasets and codes are provided at https://github.com/hccngu/MeTNet.

Motivation & Objective

  • Address the challenge of representing the diverse O-class in few-shot NER by avoiding a single O prototype.
  • Leverage a triplet network to map samples and type prototypes into a discriminative low-dimensional space.
  • Learn adaptive margins (regions) per entity type to control classification regions and improve inference.
  • Enhance few-shot NER performance in both English and Chinese datasets, including cross-domain settings.
  • Provide dataset/code release to aid reproducibility and further research.

Proposed method

  • Represent words with BERT embeddings and initialize entity-type prototypes by averaging labeled instances.
  • Construct triples with an anchor as a type prototype, positives as same-type instances, and nearest negatives; generate multiple triples per type.
  • Propose an improved triplet loss with adaptive margins mi for each type, weighting samples by distance to anchors and optimizing absolute distances (minimizing d_p, maximizing d_n).
  • Use adaptive margins as region radii to define decision regions around each type prototype; predict O-class for instances outside all regions, otherwise assign the closest region’s type.
  • Train with a MAML-inspired two-stage update: first update on the support set to get theta', then update on the query set to update theta.

Experimental results

Research questions

  • RQ1Can representing only entity-type prototypes (not O-class) plus adaptive margins improve discrimination in few-shot NER?
  • RQ2Does an adaptive-margin triplet loss provide better regional guidance than fixed-margin or standard triplet losses?
  • RQ3How does MeTNet perform in both in-domain and cross-domain few-shot NER settings, including a new Chinese dataset?
  • RQ4What is the impact of the margin-based inference procedure on final label prediction compared to prototype-distance-based inference?

Key findings

  • MeTNet consistently outperforms state-of-the-art baselines on FEW-NERD in both 1-shot and 5-shot settings in in-domain and cross-domain tasks.
  • The adaptive-margin mechanism yields region-based decision rules that reduce O-class confusion by avoiding a single O prototype.
  • A margin-based inference procedure effectively labels queries by region containment or closest region center when overlapping regions occur.
  • Ablation studies show the triplet network and adaptive margins contribute significantly to performance, and MAML contributes to generalization.
  • The authors release the FEW-COMM Chinese dataset and provide code and hyperparameters for reproducibility.

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.