Abstract
K-ADAPTER is a modular framework that injects factual and linguistic knowledge into large pre-trained models like RoBERTa without modifying their original parameters. By using independent, "plug-in" neural adapters for different types of information, the framework prevents "catastrophic forgetting" and enables the flexible, continual addition of new knowledge.
Introduction
Large-scale pre-trained language models like RoBERTa have demonstrated remarkable capabilities in capturing general linguistic patterns. However, they often lack deep factual reasoning and struggle with complex linguistic structures. Traditional methods for "knowledge infusion"—fine-tuning models on specialized datasets—frequently suffer from catastrophic forgetting, where new knowledge overwrites previously learned information. Furthermore, these methods result in entangled representations, making it difficult to isolate or update specific types of knowledge.
The Problem of Knowledge Infusion
Standard approaches to infusing knowledge into models like BERT or RoBERTa involve fine-tuning the entire model on knowledge-rich datasets, such as Wikipedia triplets or dependency trees. This process has two significant drawbacks:
- Catastrophic Forgetting: The model's general-purpose language mastery can be degraded as it specializes in new tasks.
- Entangled Representations: It becomes nearly impossible to distinguish between factual knowledge and grammatical understanding within the model's weights, hindering diagnostic and update capabilities.
Methodology: The K-ADAPTER Framework
K-ADAPTER maintains a frozen backbone (e.g., RoBERTa-Large) and delegates knowledge acquisition to compact, specialized modules called adapters. These adapters are attached to intermediate layers of the backbone.
Architecture
Each adapter consists of $K$ layers. Each layer includes two projection layers and $N$ transformer layers with skip connections. These adapters take hidden states from the backbone as input and produce "knowledge-enhanced" representations.
Decoupled Training
Adapters are trained independently on different tasks. Since there is no information flow between adapters during training, they can be developed in parallel and added to the model as modular components. The authors developed two specific adapters:
- facAdapter (Factual): Trained on relation classification using a subset of T-REx (Wikipedia text aligned with Wikidata triplets).
- linAdapter (Linguistic): Trained to predict dependency relations (head indices) using the Book Corpus.
For downstream tasks, the outputs from the backbone and the relevant adapters are concatenated to provide a multi-faceted representation.
Experimental Setup
The researchers evaluated K-ADAPTER across several knowledge-driven tasks:
- Entity Typing: Using the OpenEntity and FIGER datasets.
- Question Answering: Including CosmosQA (commonsense reasoning) and SearchQA/Quasar-T (open-domain QA).
- Relation Classification: Evaluated on the TACRED dataset.
- Probing: The LAMA (LAnguage Model Analysis) probe was used to assess factual recall (e.g., "Dante was born in [MASK]") without fine-tuning.
Key Results and Insights
K-ADAPTER consistently outperformed the base RoBERTa model and other knowledge-enhanced baselines.
- Entity Typing: On the FIGER dataset, K-ADAPTER (F+L) improved Macro F1 by 2.88% over the WKLM model.
- Question Answering: On CosmosQA, it achieved 81.83% accuracy, surpassing the base RoBERTa (80.59%).
- Relation Classification: On TACRED, it reached an F1 score of 72.04, outperforming models like ERNIE and KnowBERT.
- LAMA Probing: The model showed significant improvement in memorizing facts, achieving a 7.0 P@1 score on Google-RE compared to RoBERTa’s 4.8.
Synergy and Efficiency
The experiments demonstrated that factual and linguistic knowledge are complementary; the combined "F+L" version typically outperformed individual adapters. Furthermore, K-ADAPTER is efficient: each adapter has approximately 42M parameters, which is significantly smaller than the 355M parameters of RoBERTa-Large. This modularity also provides interpretability, as adapters can be selectively enabled or disabled.
Conclusion
K-ADAPTER provides a scalable and efficient way to infuse specialized knowledge into large-scale pre-trained models. By keeping the backbone frozen, it preserves general language capabilities while allowing for the continual addition of new, disentangled knowledge modules. Future work may explore expanding the scope of adapters to include visual or mathematical reasoning and investigating more sophisticated fusion techniques.
Summary updated