A Knowledge-Injected Curriculum Pretraining Framework for Question Answering

Xin Lin, Tianhuang Su, Zhenya Huang, Shangzi Xue, Haifeng Liu, Enhong Chen · DOI

TL;DR

This paper introduces KICP, a novel framework for pre-training language models (LMs) to excel at knowledge-based question answering (KBQA). KICP injects knowledge from knowledge graphs (KGs) into LMs through a curriculum of increasingly complex reasoning tasks, significantly improving performance and generalization.

What Problem Does This Paper Address?

Knowledge-based question answering (KBQA) is a crucial task that bridges natural language understanding with structured knowledge, enabling systems to answer questions by querying knowledge graphs (KGs). While pre-trained language models (LMs) have shown great promise in natural language understanding (NLU), they often struggle with effectively leveraging external knowledge from KGs for complex reasoning. Existing methods for integrating KGs into LMs either rely on specific techniques that limit flexibility or focus primarily on improving language understanding rather than complex, human-like reasoning. This gap leaves LMs ill-equipped for sophisticated KBQA tasks that require multi-hop reasoning and the synthesis of information from multiple knowledge facts.

Methods

KICP tackles this challenge with a three-pronged approach:

  • Knowledge Injection (KI): This module converts KG triples (e.g., entity-relation-entity or entity-attribute-value) into natural language sentences. It generalizes this process into three key steps: text characterization (converting KG elements to text, handling IDs by mapping to names, and textualizing attribute values), sentence construction (assembling these textual elements into sentences using various techniques like templates or generative models), and masking (preparing sentences for masked language model pre-training). This flexible approach allows KICP to work with diverse KG structures and sentence generation methods.
  • Knowledge Adaptation (KA): To mitigate the potential negative impact of generated sentences (which might differ from natural language) on the LM's NLU abilities, KA keeps the original LM parameters frozen. It then introduces a trainable "knowledge adapter" module that learns from the KG-generated corpus. This adapter enhances the LM's representations with KG knowledge while preserving its core NLU capabilities.
  • Curriculum Reasoning (CR): To equip LMs with complex reasoning skills, CR constructs pre-training corpora that mimic human reasoning patterns. It organizes these corpora into three "lessons" with increasing difficulty:
  • Lesson 1 (Knowledge Learning): Focuses on single KG triples.
  • Lesson 2 (CoT Learning): Introduces multi-hop reasoning by assembling sentences from multiple related triples, inspired by chain-of-thought prompting.
  • Lesson 3 (Composition Learning): Presents the final complex reasoning compositions without explicit intermediate steps, mimicking real-world QA scenarios. The LM is trained sequentially through these lessons, from easy to hard, facilitating a more effective learning process.

Datasets

KICP was evaluated on four datasets:

  • CN-QA: A Chinese KBQA dataset derived from a smart voice assistant, utilizing a KG named CN-KG.
  • ComplexWebQuestions: A public KBQA dataset with complex questions, built on WebQuestions and Freebase.
  • FreebaseQA: Another public KBQA dataset based on Freebase, featuring simple and complex questions from TriviaQA.
  • Math23K: A generative math word problem dataset where answers are mathematical expressions, using the HowNet KG.

Key Insights and Ideas

  • Generalizability is Key: The paper emphasizes the importance of a general framework for knowledge injection, moving beyond task-specific or resource-dependent methods.
  • Curriculum Learning for Reasoning: Applying curriculum learning to reasoning tasks is shown to be effective, breaking down complex reasoning into manageable steps and improving model learning.
  • Preserving NLU is Crucial: The knowledge adaptation module highlights the need to balance knowledge acquisition with the preservation of the LM's fundamental language understanding abilities.
  • Attribute Knowledge Matters: The ablation studies suggest that incorporating attribute knowledge from KGs, in addition to relational knowledge, is beneficial for KBQA performance.

Key Results

KICP consistently outperformed various baselines, including standard LMs like BERT and RoBERTa, as well as existing knowledge-enhanced models like ERNIE and K-BERT, across the evaluated KBQA datasets. For instance, on CN-QA, KICP achieved a significant improvement in F1 score (0.639) compared to BERT (0.607). The framework also demonstrated strong generalization capabilities, performing well on the generative Math23K dataset. Ablation studies confirmed the effectiveness of both the knowledge adaptation module and the curriculum reasoning approach. The paper also showed that KICP requires less labeled data to achieve comparable or superior performance compared to BERT, indicating better generalization.

Limitations and Future Work

The authors acknowledge a few limitations:

  • Corpus Diversity: The generated corpus, while effective, could be more diverse and closer to natural language.
  • Generative LMs: The current framework is primarily designed for understanding-based LMs. Future work could extend it to generative LMs.
  • Knowledge Source: KICP currently relies solely on KGs. Exploring other forms of knowledge could further enhance its capabilities.

The paper suggests generalizing the framework to generative LMs and investigating more diverse knowledge sources as promising future directions.

Summary updated

BibTeX
@inproceedings{lin2024knowledge,
  author = {Xin Lin and Tianhuang Su and Zhenya Huang and Shangzi Xue and Haifeng Liu and Enhong Chen},
  title = {{A Knowledge-Injected Curriculum Pretraining Framework for Question Answering}},
  booktitle = {The Web Conference},
  year = {2024},
  doi = {10.1145/3589334.3645406},
}
Figure