[Paper Review] Knowledge Enhanced Contextual Word Representations
This paper proposes KnowBert, a method to enhance contextual word representations in BERT by integrating structured knowledge from multiple knowledge bases (KBs) like WordNet and Wikipedia using a Knowledge Attention and Recontextualization (KAR) mechanism. By jointly training entity linkers and the language model on unlabeled text, KnowBert improves factual recall, reduces perplexity, and achieves state-of-the-art performance on downstream tasks such as relation extraction, entity typing, and word sense disambiguation, outperforming BERT$_{\text{LARGE}}$ in several benchmarks.
Contextual word representations, typically trained on unstructured, unlabeled text, do not contain any explicit grounding to real world entities and are often unable to remember facts about those entities. We propose a general method to embed multiple knowledge bases (KBs) into large scale models, and thereby enhance their representations with structured, human-curated knowledge. For each KB, we first use an integrated entity linker to retrieve relevant entity embeddings, then update contextual word representations via a form of word-to-entity attention. In contrast to previous approaches, the entity linkers and self-supervised language modeling objective are jointly trained end-to-end in a multitask setting that combines a small amount of entity linking supervision with a large amount of raw text. After integrating WordNet and a subset of Wikipedia into BERT, the knowledge enhanced BERT (KnowBert) demonstrates improved perplexity, ability to recall facts as measured in a probing task and downstream performance on relationship extraction, entity typing, and word sense disambiguation. KnowBert's runtime is comparable to BERT's and it scales to large KBs.
Motivation & Objective
- To address the limitation of contextual word representations in retaining factual knowledge from real-world entities.
- To develop a general, scalable method for integrating multiple knowledge bases into large pre-trained language models without task-specific fine-tuning.
- To improve masked language modeling perplexity and factual recall by grounding contextual representations in structured knowledge.
- To achieve state-of-the-art performance on downstream NLP tasks requiring factual reasoning, such as relation extraction and word sense disambiguation.
- To maintain computational efficiency and compatibility with existing BERT-based systems by inserting knowledge injection as a lightweight module.
Proposed method
- Introduce a Knowledge Attention and Recontextualization (KAR) module that inserts between two layers of BERT to inject knowledge from external KBs.
- Use an integrated entity linker to retrieve entity embeddings from KBs (e.g., WordNet, Wikipedia) for spans in the input text.
- Apply word-to-entity attention to recontextualize contextual word representations using retrieved entity embeddings, enabling long-range interactions.
- Jointly pre-train the entity linker and the language model using a multitask objective combining self-supervised language modeling and a small amount of entity linking supervision on unlabeled text.
- Insert special tokens [E1], [/E1], [E2], [/E2] to mark subject and object spans in relation extraction, and [E], [/E] for entity typing.
- Use TuckER for entity embeddings and ensure compatibility with various KB formats through minimal structural requirements.
Experimental results
Research questions
- RQ1Can integrating structured knowledge from multiple KBs improve the factual recall and quality of contextual word representations in pre-trained models?
- RQ2Does end-to-end joint training of entity linking and language modeling on unlabeled text lead to better generalization and factual knowledge integration?
- RQ3Can a lightweight, modular insertion of knowledge into BERT improve performance on downstream NLP tasks without sacrificing inference speed?
- RQ4How does the performance of the enhanced model compare to BERT$_{\text{LARGE}}$ and other knowledge-augmented models on intrinsic and extrinsic evaluations?
- RQ5To what extent can the method scale to large KBs and support diverse knowledge sources like ConceptNet or domain-specific KBs?
Key findings
- KnowBert-W+W achieves a test F1 score of 76.1 on the WiC dataset, outperforming BERT$_{\text{LARGE}}$ by 1.4% and reducing the gap to human performance by 13.3%.
- On TACRED relation extraction, KnowBert-W+W achieves 70.9% F1, surpassing BERT$_{\text{LARGE}}$ by 1.4% and ERNIE by 3.5%.
- For entity typing, KnowBert-W+W achieves 76.1 F1, a 0.6% improvement over ERNIE and a 2.5% improvement over BERT$_{\text{BASE}}$.
- The model reduces masked language model perplexity compared to BERT$_{\text{BASE}}$, demonstrating improved language modeling quality after knowledge injection.
- Despite using the smaller BERT$_{\text{BASE}}$ architecture, KnowBert-W+W outperforms BERT$_{\text{LARGE}}$ in factual recall and intrinsic probing tasks.
- The KAR module adds minimal computational overhead, maintaining runtime comparable to BERT, and allows seamless replacement of BERT with KnowBert in downstream applications.
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.