Pooled Contextualized Embeddings for Named Entity Recognition

Alan Akbik, Tanja Bergmann, Roland VollgrafNAACL 2019

Abstract

Contextualized word embeddings have significantly advanced Natural Language Processing by allowing word representations to vary based on their immediate surroundings. However, these models often struggle with "underspecified" contexts where local information is insufficient to resolve ambiguity. This paper proposes Pooled Contextualized Embeddings, a method that maintains a dynamic memory of a word's previous contextual embeddings. By pooling these historical representations and concatenating them with the current local embedding, the model leverages global context to improve Named Entity Recognition (NER). The approach achieved new state-of-the-art results on the CoNLL-03 benchmark across three languages.

Introduction: The Localist Weakness

While models like ELMo and Flair capture nuances of word usage within a sentence, they are inherently "localist." They typically process text sentence-by-sentence, lacking a mechanism to remember how a word was used earlier in a document.

Consider a sports headline: "Fung Permadi (Taiwan) v Indra". For a character-level model, "Indra" could easily be a person or an organization. A human reader resolves this by recalling that "Indra" was identified as a badminton player in a previous paragraph. Standard contextual models lack this long-term memory, making them prone to errors in such underspecified contexts.

Proposed Method: Dynamic Memory and Pooling

The authors introduce a dynamic memory mechanism that aggregates multiple contextual instances of a word into a global representation.

Architecture of Pooled Contextualized Embeddings showing the interaction between the current sentence and the memory of previous mentions.

The workflow for embedding a word consists of four primary steps:

  1. Local Embedding: A standard contextual string embedding is generated for the word using a character-level RNN.
  2. Memory Update: This embedding is stored in a key-value "memory" map, indexed by the word string.
  3. Pooling: The model retrieves all previous embeddings for that string from memory and applies a pooling operation—Mean, Min, or Max—to create a single pooled embedding.
  4. Concatenation: The current local embedding is concatenated with the pooled global embedding. This creates a vector that captures both the immediate context and the historical usage of the word.

During training, the memory is reset at the start of each epoch to ensure the model learns to build these representations dynamically. During inference, the memory is preserved, allowing the model's understanding of entities to evolve as it processes more text.

Experimental Results

The researchers evaluated the pooled approach on the CoNLL-03 (English, German, Dutch) and WNUT-17 (emerging entities) datasets.

Comparison of Pooled Contextualized Embeddings against previous state-of-the-art models across multiple NER benchmarks.

As shown in the results, the pooled approach outperformed previous state-of-the-art models, including BERT and ELMo, on the CoNLL-03 tasks. Specifically, the model achieved an F1-score of 93.18 on English CoNLL-03.

Key Insights

  • Pooling Strategies: While performance was competitive across all strategies, Min pooling generally yielded the best results for English and German, whereas Mean pooling was more effective for Dutch and the noisier WNUT-17 dataset.
  • Global Context Utility: The model effectively "borrows" clarity from previous mentions. Entities are often clearly defined upon their first introduction and referred to more ambiguously later; pooling allows the model to utilize that initial clarity.
  • Dataset Sensitivity: The gains were less pronounced on the WNUT-17 dataset (49.59 F1). This is likely because entities in noisy, short-form text like Twitter repeat less frequently, providing fewer opportunities for the memory mechanism to provide useful global context.

Conclusion and Future Work

Pooled Contextualized Embeddings provide a simple yet powerful wrapper for existing embedding functions. By incorporating a global memory, the model overcomes the limitations of purely local context.

Future research directions include addressing recency bias—perhaps through weighted pooling that favors more recent mentions—and optimizing computational memory for very large-scale applications where the number of unique strings in the memory map could become significant.

Summary updated

BibTeX
@inproceedings{akbik2019pooled,
  author = {Alan Akbik and Tanja Bergmann and Roland Vollgraf},
  title = {{Pooled Contextualized Embeddings for Named Entity Recognition}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2019},
  doi = {10.18653/v1/n19-1078},
}
Figure