NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Learning Cross-Context Entity Representations from Text

Jeffrey Ling, Nicholas FitzGerald, Zifei Shan, Livio Baldini Soares, Thibault Févry, David Weiss, Tom KwiatkowskiarXiv 2020

Abstract

Language modeling tasks, in which words, or word-pieces, are predicted on the basis of a local context, have been very effective for learning word embeddings and context dependent representations of phrases. Motivated by the observation that efforts to code world knowledge into machine readable knowledge bases or human readable encyclopedias tend to be entity-centric, we investigate the use of a fill-in-the-blank task to learn context independent representations of entities from the text contexts in which those entities were mentioned. We show that large scale training of neural models allows us to learn high quality entity representations, and we demonstrate successful results on four domains: (1) existing entity-level typing benchmarks, including a 64% error reduction over previous work on TypeNet (Murty et al., 2018); (2) a novel few-shot category reconstruction task; (3) existing entity linking benchmarks, where we match the state-of-the-art on CoNLL-Aida without linking-specific features and obtain a score of 89.8% on TAC-KBP 2010 without using any alias table, external knowledge base or in domain training data and (4) answering trivia questions, which uniquely identify entities. Our global entity representations encode fine-grained type categories, such as Scottish footballers, and can answer trivia questions such as: Who was the last inmate of Spandau jail in Berlin?

Introduction

Traditional artificial intelligence systems often rely on human-engineered knowledge bases like Freebase or structured encyclopedias to represent world knowledge. However, these resources are inherently brittle: they are expensive to maintain, limited in scope, and often fail to capture the evolving nature of information. While modern NLP models like BERT excel at understanding local context, they do not naturally aggregate disparate information about a specific entity into a single, reusable representation.

This paper introduces RELIC (Representations of Entities Learned in Context), a method designed to learn global, context-independent entity embeddings by observing how entities are described across a massive corpus. By treating the entity embedding matrix as a differentiable knowledge store, RELIC captures deep world knowledge without the need for manual curation.

Methodology

RELIC utilizes a large-scale "fill-in-the-blank" (cloze) task. The model is presented with a sentence where an entity mention is replaced by a [MASK] token and must predict the unique identity of the missing entity from a pool of 5 million candidates derived from English Wikipedia.

Architecture and Training

The system consists of two primary components:

  1. Context Encoder: A BERT-base model that transforms the surrounding text into a fixed-length vector.
  2. Entity Embedding Table: A unique 300-dimensional vector for every entity in English Wikipedia.

The model is trained to maximize the cosine similarity between the context vector and the correct entity's embedding using a noise-contrastive loss. A critical aspect of this training is the mask rate—the frequency with which the entity's surface name is hidden from the model.

The Masking Trade-off

A central insight of the RELIC framework is the fundamental tension between entity linking and entity typing. To excel at linking (identifying a specific name in text), the model benefits from seeing the surface name during training. Conversely, to excel at typing (understanding the semantic category of an entity), the model must be forced to ignore the name and rely solely on descriptive context.

Entity linking performance (F1) decreases as the mask rate increases, highlighting the importance of surface names for linking.
Entity typing performance (mAP) improves with higher mask rates, forcing the model to learn from descriptive context.

Experimental Results

RELIC was evaluated across several diverse benchmarks, demonstrating robust performance in both high-data and low-data regimes.

  • Entity Linking: On CoNLL-Aida, RELIC matched the state-of-the-art (94.9% accuracy) without using hand-engineered features, alias tables, or external knowledge bases. It achieved 89.8% on TAC-KBP 2010.
  • Entity Typing: On the TypeNet benchmark, RELIC achieved a 64% error reduction in low-data settings compared to previous state-of-the-art models. It also outperformed existing methods on the FIGMENT dataset.
  • Zero-Shot Trivia: By treating trivia questions as context and retrieving the nearest entity embedding, RELIC correctly answered 51% of TriviaQA questions. Notably, it could identify Rudolf Hess as the "last inmate of Spandau jail" without access to the evidence text typically required by QA models.
  • Few-Shot Category Completion: The model significantly outperformed previous methods at reconstructing complex categories, such as "Actresses from London" or "Scottish footballers," given only a few examples.

Conclusion

RELIC demonstrates that high-quality, context-independent entity representations can be learned directly from text at scale. By aggregating information from thousands of mentions, the model effectively compresses world knowledge into a high-dimensional space. While the current implementation relies on a large embedding table, future work may explore more memory-efficient scaling and multi-step logical reasoning to further enhance the model's utility as a differentiable knowledge base.

Summary updated

BibTeX
@misc{ling2020learning,
  author = {Jeffrey Ling and Nicholas FitzGerald and Zifei Shan and Livio Baldini Soares and Thibault Févry and David Weiss and Tom Kwiatkowski},
  title = {{Learning Cross-Context Entity Representations from Text}},
  year = {2020},
  eprint = {2001.03765},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2001.03765},
}
Figure