Abstract
In recent years, Pre-trained Language Models (PLMs) have shown their superiority by pre-training on unstructured text corpus and then fine-tuning on downstream tasks. On entity-rich textual resources like Wikipedia, Knowledge-Enhanced PLMs (KEPLMs) incorporate the interactions between tokens and mentioned entities in pre-training, and are thus more effective on entity-centric tasks such as entity linking and relation classification. Although exploiting Wikipedia's rich structures to some extent, conventional KEPLMs still neglect a unique layout of the corpus where each Wikipedia page is around a topic entity (identified by the page URL and shown in the page title). In this paper, we demonstrate that KEPLMs without incorporating the topic entities will lead to insufficient entity interaction and biased (relation) word semantics. We thus propose KEPLET, a novel Knowledge-Enhanced Pre-trained LanguagE model with Topic entity awareness. In an end-to-end manner, KEPLET identifies where to add the topic entity's information in a Wikipedia sentence, fuses such information into token and mentioned entities representations, and supervises the network learning, through which it takes topic entities back into consideration. Experiments demonstrated the generality and superiority of KEPLET which was applied to two representative KEPLMs, achieving significant improvements on four entity-centric tasks.
Introduction
Modern Natural Language Processing (NLP) has been revolutionized by Knowledge-Enhanced Pretrained Language Models (KEPLMs) such as LUKE and ERNIE. These models move beyond simple word-level understanding by incorporating "mentioned entities"—the specific, hyperlinked entities found within a text. However, a significant architectural "blind spot" remains: the omission of the topic entity.
In structured corpora like Wikipedia, every sentence is implicitly anchored to a central subject—the page title. For instance, in a sentence like "She released Crazy in Love" found on the Beyoncé Wikipedia page, the pronoun "She" refers to Beyoncé, and the verb "released" describes a specific relationship between the topic entity and the mentioned song. Conventional KEPLMs often treat sentences as isolated snippets, failing to leverage this global context. This neglect leads to insufficient entity interaction and biased word semantics, where the model may struggle to resolve co-references or distinguish between ambiguous entities.
The KEPLET Framework
To address these limitations, we introduce KEPLET (Knowledge-Enhanced Pre-trained LanguagE model with Topic entity awareness). KEPLET integrates topic entities into the learning process through three core mechanisms:
1. Fusing Position Identification
Not every token in a sentence requires topic-level context. KEPLET employs a gated neural network to identify "fusing positions"—specific locations where topic information is most beneficial. This typically includes pronouns (e.g., "she," "it") or ambiguous mentions where the global topic provides necessary clarification for the local semantics.
2. Entity Feature Fusion
Once the relevant positions are identified, the model injects the topic entity’s features into the hidden representations of those tokens. We explored two primary methods for this integration:
- Concatenation Fusion: Directly appending topic features.
- Attention Fusion: Utilizing a query-key-value mechanism to dynamically filter noise and integrate only the most relevant topic data.
Our findings indicate that Attention Fusion is superior, as it more effectively manages the interaction between the global topic and local sentence context.
3. Topic-Entity-Aware Contrastive Loss
To ensure the model actively utilizes the topic information, we introduced a novel pre-training objective. This contrastive learning loss encourages the model to minimize the distance between a sentence’s representation and its actual topic entity, while maximizing the distance from unrelated topic entities within the same training batch. This forces the network to learn the inherent relationship between the text and its overarching subject.
Experimental Results
KEPLET was evaluated as a "plug-in" enhancement for existing state-of-the-art models, specifically LUKE and ERNIE, using the December 2018 Wikipedia dump for pre-training. We tested the framework across four major entity-centric benchmarks:
- Relation Classification (TACRED): KEPLET improved the LUKE-base model's F1 score by 0.6%, a notable gain in a highly competitive benchmark.
- Entity Typing (Open Entity): When applied to LUKE-large, KEPLET achieved a new state-of-the-art F1 score of 77.58.
- Named Entity Recognition (CoNLL-2003) & Question Answering (SQuAD 1.1): The model demonstrated consistent performance gains, proving the versatility of topic awareness across different NLP tasks.
Key Insights
Our analysis revealed several critical takeaways for knowledge-enhanced modeling:
- The Importance of Global Anchors: Topic entities act as global anchors that resolve ambiguity. By reintroducing them, the model gains a clearer understanding of the "who" and "what" behind the text.
- Early Fusion Advantage: Injecting topic information at lower layers of the Transformer (e.g., Layer 1) yielded better results than late-stage injection. Lower layers handle more general, comprehensive knowledge, making them more receptive to global context.
- Selective Integration: The gating mechanism is vital. Rather than "dumping" topic information across the entire sequence, selective integration ensures that the model only modifies representations where the topic entity adds genuine value, such as resolving co-references.
Conclusion and Future Work
KEPLET demonstrates that topic awareness is a crucial, yet previously overlooked, component of knowledge-enhanced pre-training. By aligning local sentences with their global topic entities, KEPLET significantly improves the semantic depth of language models.
While the current framework relies on entity-rich datasets like Wikipedia, future research will explore expanding KEPLET to multi-language settings—where topic entities are often language-invariant—and domain-specific applications such as medical fact-checking. Despite the computational costs of pre-training, the resulting models remain efficient for fine-tuning on consumer-grade hardware, making KEPLET a practical advancement for the NLP community.
Summary updated