Ered: Enhanced Text Representations with Entities and Descriptions

Qinghua Zhao, Shuai Ma, Yuxuan LeiarXiv 2022

Abstract

External knowledge, such as entities and their descriptions, is crucial for human understanding of text. While many pre-trained models attempt to incorporate this knowledge, they often do so implicitly through weight updates or by appending long descriptions directly to the input, which can distract the model's attention. This paper introduces Ered, a framework that explicitly includes both entities and entity descriptions during the fine-tuning stage. Ered uses a separate knowledge module to represent descriptions and fuses these with the backbone model layer-by-layer. To bridge the semantic gap between text and external knowledge, we design two auxiliary tasks: entity/description enhancement and an entity enhancement/pollution task. Experiments across six datasets demonstrate that Ered achieves new state-of-the-art results on several knowledge-oriented benchmarks.

Introduction

Pre-trained language models (PLMs) like BERT and RoBERTa excel at linguistic patterns but often lack the specific factual grounding required for complex reasoning, particularly regarding "tail entities"—rare concepts infrequent in training data. Current solutions typically fall into two categories: implicit injection via further pre-training (which is computationally expensive) or explicit appending of descriptions (which can overwhelm the model's attention mechanism and memory).

Ered addresses these limitations by explicitly utilizing pre-trained entity embeddings and textual descriptions during fine-tuning without cluttering the primary model's attention space.

The Ered Architecture

The Ered architecture is designed around three core components that allow for efficient and explicit knowledge integration:

  1. The Backbone Model: A standard PLM (e.g., RoBERTa or LUKE) that processes the primary input text.
  2. The Knowledge Module (K-Module): A separate, lightweight PLM (such as DistilBERT) with frozen parameters. This module independently processes long entity descriptions, preventing them from distracting the backbone's attention.
  3. The Fusion Module: Instead of a single merge at the output, Ered employs layer-wise fusion. Specific layers of the K-Module are connected to corresponding layers in the backbone. Entity embeddings and description vectors are concatenated and fused into the backbone's hidden states as data flows through the network.
The Ered architecture featuring layer-wise fusion between the Backbone and Knowledge Module.

Bridging the Semantic Gap

Simply merging vectors from different models can lead to semantic misalignment. To ensure the text and external knowledge spaces are compatible, Ered introduces two auxiliary tasks governed by hyperparameters $\alpha$ and $\beta$:

  • Entity/Description Enhancement ($L_a$): Forces the model to use fused knowledge to predict main task labels.
  • Entity Enhancement/Pollution ($L_{ap}$): A discriminator task where the model must distinguish between a representation enhanced by the correct entity versus one "polluted" by a randomly sampled entity.

Experimental Results

The researchers evaluated Ered across six diverse datasets, including Entity Typing (Open Entity, FIGER), Relation Classification (FewRel, TACRED), and general tasks like Sentiment Analysis (SST).

Key Findings

  • State-of-the-Art Performance: Ered reached 78.1 F1 on Open Entity and 90.3 F1 on FewRel, outperforming previous benchmarks like LUKE.
  • Versatility: Even on standard tasks like SST, Ered improved accuracy to 96.90%, suggesting that linguistic tasks benefit from factual grounding.
  • Hyperparameter Sensitivity: The auxiliary tasks are critical. As shown in the sensitivity analysis, the weights $\alpha$ and $\beta$ significantly impact performance across different datasets, confirming that proper alignment of semantic spaces is necessary for effective knowledge integration.
Performance sensitivity across four datasets (Open Entity, FewRel, TACRED, and SST) relative to auxiliary task weights alpha and beta.

Conclusion

Ered demonstrates that explicit, layer-wise integration of entity embeddings and descriptions can significantly boost PLM performance on knowledge-intensive tasks. While running two modules increases inference overhead, the authors note that since the K-Module is frozen, description representations can be pre-computed and cached, making Ered a viable candidate for real-world deployment. Future work will focus on further optimizing this caching and exploring more efficient bridging mechanisms.

Summary updated

BibTeX
@misc{zhao2022ered,
  author = {Qinghua Zhao and Shuai Ma and Yuxuan Lei},
  title = {{Ered: Enhanced Text Representations with Entities and Descriptions}},
  year = {2022},
  eprint = {2208.08954},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2208.08954},
}
Figure