Instance-Based Learning of Span Representations: A Case Study through Named Entity Recognition

Hiroki Ouchi, Jun Suzuki, Sosuke Kobayashi, Sho Yokoi, Tatsuki Kuribayashi, Ryuto Konno, Kentaro Inui

Introduction

Most modern Natural Language Processing (NLP) models operate as "black boxes." While deep neural networks achieve high accuracy in tasks like Named Entity Recognition (NER), their internal logic remains opaque. When a model identifies "Apple" as an Organization rather than a Fruit, it is often impossible to trace the specific training data or features that drove that decision. This lack of interpretability is a significant barrier for high-stakes applications and human-machine collaboration.

In structured prediction tasks, the standard approach involves classifying tokens (using BIO tagging) or spans via a softmax layer. While effective, these methods do not provide inherent justifications for their labels. Furthermore, token-based tagging often struggles with "nested" entities, such as identifying "University of Tokyo" as an Organization while simultaneously recognizing "Tokyo" as a Location. This paper introduces an instance-based learning approach that replaces traditional classifiers with a transparent, retrieval-based mechanism.

Methodology: The Instance-Based Approach

The authors propose an instance-based span model that maps text spans into a high-dimensional feature space where similar entities cluster together. Instead of learning a fixed weight vector for each class (e.g., "Person" or "Location"), the model makes predictions by looking at "neighboring" examples from the training set.

Overview of the instance-based span model architecture, showing the vectorization of a query span and its similarity computation against training instances.

As illustrated in the figure above, the process involves three main steps:

  1. Span Representation: The model uses a standard neural encoder (such as BiLSTM or BERT) to create a vector representation for every possible word sequence in a sentence.
  2. Similarity Engine: At inference time, a "query" span (e.g., "Franz Kafka") is vectorized. The model calculates its similarity to all spans stored in the training set memory.
  3. Probability via Neighbors: The probability of a label is determined by the sum of similarities to training instances sharing that label. If the nearest neighbors in the feature space are labeled "Person," the query span is assigned that label, providing a direct, example-based explanation for the prediction.

To maintain computational efficiency during training, the authors utilize a sampling technique, randomly selecting a subset of sentences to act as the "memory" for each mini-batch.

Experimental Results

The researchers evaluated the model on three distinct benchmarks: CoNLL-2003 (flat NER), GENIA (nested NER), and CoNLL-2000 (syntactic chunking). The results demonstrate that instance-based learning does not require an "interpretability tax"; it performs as well as, or slightly better than, traditional softmax classifiers.

Comparison of F1 scores between classifier-based and instance-based models across flat and nested NER tasks using GloVe and BERT embeddings.

As shown in the table, the instance-based model achieved an F1 score of 90.73 on CoNLL-2003 (using GloVe), slightly outperforming the classifier-based baseline of 90.68. On the more complex GENIA dataset for nested NER, the model achieved 74.20, again surpassing the baseline. Qualitative analysis further revealed that the instance-based model consistently retrieved semantically relevant entities of the same type, whereas classifier-based models often retrieved "null" spans that were only superficially similar.

Key Insights and Future Work

The most powerful insight of this research is that interpretability can be achieved through nearest-neighbor retrieval. If the model misclassifies a span like "Air France" as a Location, researchers can inspect its neighbors to see if it was confused by other geographical entities like "Colombia." This makes debugging significantly more intuitive.

While the model provides clear rationales, it still faces challenges with semantic ambiguity (e.g., distinguishing between Organizations and Locations in context-poor scenarios). Future work may extend this framework to more complex tasks such as Semantic Role Labeling (SRL), Coreference Resolution, and Entity Linking, where connecting mentions to specific database entries like Wikipedia is critical.

Summary updated

BibTeX
@inproceedings{ouchi2020instance,
  author = {Hiroki Ouchi and Jun Suzuki and Sosuke Kobayashi and Sho Yokoi and Tatsuki Kuribayashi and Ryuto Konno and Kentaro Inui},
  title = {{Instance-Based Learning of Span Representations: A Case Study through Named Entity Recognition}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.acl-main.575},
}
Figure