[Paper Review] KI-BERT: Infusing Knowledge Context for Better Language and Domain Understanding
KI-BERT proposes a novel method to infuse knowledge context from ConceptNet and WordNet into BERT during fine-tuning by using entity token types, vector space projection, positional alignment, and selective attention. It significantly outperforms BERT-base and even surpasses BERT-large on domain-specific tasks like SciTail and academic subsets of QQP, MNLI, and QNLI.
Contextualized entity representations learned by state-of-the-art transformer-based language models (TLMs) like BERT, GPT, T5, etc., leverage the attention mechanism to learn the data context from training data corpus. However, these models do not use the knowledge context. Knowledge context can be understood as semantics about entities and their relationship with neighboring entities in knowledge graphs. We propose a novel and effective technique to infuse knowledge context from multiple knowledge graphs for conceptual and ambiguous entities into TLMs during fine-tuning. It projects knowledge graph embeddings in the homogeneous vector-space, introduces new token-types for entities, aligns entity position ids, and a selective attention mechanism. We take BERT as a baseline model and implement the "Knowledge-Infused BERT" by infusing knowledge context from ConceptNet and WordNet, which significantly outperforms BERT and other recent knowledge-aware BERT variants like ERNIE, SenseBERT, and BERT_CS over eight different subtasks of GLUE benchmark. The KI-BERT-base model even significantly outperforms BERT-large for domain-specific tasks like SciTail and academic subsets of QQP, QNLI, and MNLI.
Motivation & Objective
- To address the limitation of state-of-the-art transformer-based language models (TLMs) like BERT, which do not explicitly leverage knowledge context from knowledge graphs.
- To improve language and domain understanding by infusing semantic knowledge about entities and their relationships from external knowledge graphs during fine-tuning.
- To develop a technique that effectively handles both conceptual entities (e.g., World War I) and ambiguous entities (e.g., 'drain' with multiple senses) using knowledge graphs.
- To demonstrate that knowledge infusion during fine-tuning leads to superior performance, especially on low-resource domain-specific datasets.
- To release a domain-adaptive, knowledge-enhanced BERT variant (KI-BERT) that outperforms BERT and other knowledge-augmented models on benchmark tasks.
Proposed method
- Project knowledge graph embeddings (from ConceptNet and WordNet) into the same vector space as BERT’s hidden states using linear transformation.
- Introduce new token types for entities to distinguish them from regular tokens and enable specialized attention mechanisms.
- Align entity positions in the input sequence with their corresponding positions in the knowledge graph to preserve structural context.
- Apply a selective attention mechanism that dynamically attends to relevant knowledge graph neighbors based on context, improving attention focus on pertinent facts.
- Fine-tune the enhanced BERT model end-to-end with downstream tasks, allowing knowledge infusion to be learned in context.
- Use disambiguation models to identify correct word senses for polysemous words (e.g., 'mass', 'drain') before injecting sense-specific knowledge from WordNet.
Experimental results
Research questions
- RQ1Can knowledge context from external knowledge graphs improve the performance of BERT on downstream NLP tasks, especially in low-resource or domain-specific settings?
- RQ2How does injecting knowledge for both conceptual entities (e.g., historical events) and ambiguous entities (e.g., polysemous words) affect model generalization and reasoning?
- RQ3Does knowledge infusion during fine-tuning outperform pre-training stage knowledge integration or no knowledge infusion at all?
- RQ4To what extent does KI-BERT’s performance gain scale with decreasing training data size, particularly in domain-specific NLP tasks?
- RQ5Can selective attention and entity-specific token types effectively guide the model to utilize relevant knowledge without disrupting learned representations?
Key findings
- KI-BERT-base achieves a GLUE average score of 80.47, significantly outperforming BERT-base (78.9) and surpassing BERT-large on domain-specific benchmarks.
- KI-BERT-base outperforms BERT-large on SciTail (a science domain task) and academic subsets of QQP, QNLI, and MNLI, despite having only one-third of BERT-large’s parameters.
- The performance gain from knowledge infusion is most pronounced on smaller datasets, indicating strong suitability for low-resource domain adaptation.
- Ablation studies show that removing any component—selective attention, entity token types, positional alignment, or vector space projection—leads to a measurable drop in performance.
- Infusing knowledge context increases prediction confidence for correct answers by 3.3% on average, with an additional 1.5% improvement when more entities are infused.
- KI-BERT maintains high confidence in correct predictions (e.g., 99.99% confidence for BERT, but improved to ~97% for KI-BERT) while reducing overconfidence in incorrect predictions, suggesting improved reasoning robustness.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.