Skip to main content
QUICK REVIEW

[Paper Review] Label-Agnostic Sequence Labeling by Copying Nearest Neighbors

Sam Wiseman, Karl Stratos|arXiv (Cornell University)|Jun 10, 2019
Topic ModelingComputer Science31 references5 citations
TL;DR

This paper proposes a label-agnostic sequence labeling method that copies token-level labels from retrieved nearest neighbors in a similarity-based retrieval framework. By decoupling prediction from label-specific representations, the model achieves strong zero-shot transfer performance—outperforming strong baselines on fine-grained labeling tasks without retraining—while a dynamic programming decoding strategy further improves accuracy and interpretability by minimizing distinct copied segments.

ABSTRACT

Retrieve-and-edit based approaches to structured prediction, where structures associated with retrieved neighbors are edited to form new structures, have recently attracted increased interest. However, much recent work merely conditions on retrieved structures (e.g., in a sequence-to-sequence framework), rather than explicitly manipulating them. We show we can perform accurate sequence labeling by explicitly (and only) copying labels from retrieved neighbors. Moreover, because this copying is label-agnostic, we can achieve impressive performance when transferring to new sequence-labeling tasks without retraining. We additionally consider a dynamic programming approach to sequence labeling in the presence of retrieved neighbors, which allows for controlling the number of distinct (copied) segments used to form a prediction, and leads to both more interpretable and accurate predictions.

Motivation & Objective

  • To address the limitations of label-dependent retrieve-and-edit models in transfer learning and interpretability.
  • To develop a sequence labeling approach that is agnostic to label types, enabling zero-shot transfer to new tasks without retraining.
  • To improve prediction interpretability and accuracy by controlling the number of distinct copied segments from retrieved neighbors.
  • To enable effective sequence labeling using only label copying from nearest neighbors, without relying on sequence-to-sequence generation.

Proposed method

  • The model retrieves M nearest neighbors from a training database using a learned similarity function, such as BERT-based sentence embeddings.
  • For each input token, the model predicts its label by copying the label of the most similar token in a retrieved neighbor’s sequence.
  • The method is inherently label-agnostic, as predictions depend only on input similarity, not on label types or label-specific parameters.
  • A dynamic programming decoding strategy is introduced to minimize the number of distinct copied segments while balancing prediction confidence.
  • The decoding objective combines segment count (weighted by hyperparameter c) and expected mislabeling cost, encouraging compact, interpretable predictions.
  • The approach is applicable to any model that can retrieve neighbors at test time, even standard sequence labelers.

Experimental results

Research questions

  • RQ1Can a sequence labeling model achieve competitive performance using only label copying from nearest neighbors, without learning label-specific representations?
  • RQ2How does label-agnostic copying compare to standard label-dependent models in zero-shot transfer to new labeling tasks?
  • RQ3Can a dynamic programming decoding strategy improve both accuracy and interpretability by reducing the number of distinct copied segments?
  • RQ4Does minimizing segment count lead to better generalization or robustness in sequence labeling?
  • RQ5Can this method effectively leverage pre-trained representations like BERT for similarity-based retrieval?

Key findings

  • The model achieves 90.20 F1 on the CoNLL 2003 NER test set with optimal dynamic programming decoding, improving from 89.94 F1 without it.
  • In the zero-shot transfer setting, performance improves from 71.74 F1 to 73.61 F1 when using the dynamic programming decoding with c=0.5.
  • The model maintains strong performance on standard sequence labeling tasks (e.g., 89.94 F1 on CoNLL 2003) without fine-tuning, even when trained on a different task.
  • On average, predictions use only about 1.5 distinct copied segments per example, demonstrating high compactness and interpretability.
  • The method significantly outperforms strong baselines in transfer learning scenarios, especially when moving from coarse to fine-grained labeling.
  • The dynamic programming approach enables a controllable trade-off between prediction confidence and segment count, with higher c values yielding better performance.

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.