Injecting Domain Knowledge in Language Models for Task-oriented Dialogue Systems

Denis Emelin, Daniele Bonadiman, Sawsan Alqahtani, Yi Zhang, Saab Mansour

Abstract

Task-oriented dialogue (TOD) systems traditionally rely on complex external database queries to provide domain-specific information, such as restaurant details or travel schedules. This paper introduces a novel approach that "bakes" domain knowledge directly into a language model’s parameters using lightweight KB-adapters. By employing a two-stage process of knowledge memorization and utilization, the proposed architecture eliminates the need for brittle query engineering while maintaining high factual accuracy. Evaluations on the MultiWOZ benchmark and a new contrastive probe (KPRS) demonstrate that adapter-augmented models significantly outperform standard pre-trained baselines in both information retrieval and response generation.

Introduction

Standard Pre-trained Language Models (PLMs), such as GPT or BART, possess vast general knowledge but struggle with localized, specific facts required for task-oriented tasks—for instance, providing the exact phone number of a specific local business. The conventional solution involves querying an external Knowledge Base (KB) at runtime. However, this approach necessitates "query engineering"—the development of complex code wrappers and database interfaces that are often brittle and difficult to maintain.

This research proposes that for small-to-medium, relatively static KBs, it is more efficient to inject knowledge directly into the model. This allows the system to "remember" facts during the generation process, reducing architectural overhead and improving the fluidity of the dialogue.

Methodology: KB-Adapters

The core of this approach is the KB-adapter: small, trainable sub-modules inserted into the layers of a frozen PLM (specifically BART-Large). The integration follows a two-stage training pipeline designed to first store and then apply domain knowledge.

The Two-Stage Process

  1. Memorization Stage: Structured KB entries are converted into natural language statements. The model undergoes a "denoising" objective where it must fill in masked attributes (e.g., price ranges or locations) within these statements. During this phase, the primary PLM parameters remain frozen, forcing the adapters to serve as the dedicated repository for these specific facts.
  2. Utilization Stage: The PLM is unfrozen and fine-tuned on actual dialogue tasks. A weighted fusion function (a gating mechanism) is introduced, allowing the model to dynamically decide when to rely on its general pre-trained weights and when to extract information from the specialized KB-adapter.
The two-stage training process: Memorization (left) involves filling masked attributes to store knowledge, while Utilization (right) applies that knowledge to generate system responses.

Architectural Modularity

A key advantage of this architecture is its modularity. Because adapters are lightweight and independent, separate adapters can be trained for different domains (e.g., "Hotels," "Restaurants," "Attractions") and plugged into the same base model. This prevents "catastrophic forgetting," where learning new information typically overwrites previously acquired knowledge.

The multi-domain adapter architecture showing how different domain-specific adapters (A, B, and C) are integrated into the PLM layers and combined via an Adapter Fusion module.

Knowledge Representation

To bridge the gap between structured data and natural language processing, the researchers converted KB facts into two distinct formats:

  • Atomic Statements: Single facts presented in isolation (e.g., "Pizza Hut is located in the centre area").
  • Composite Statements: Multiple related facts combined into a cohesive paragraph.

Interestingly, the study found that representing KB facts as natural language sentences was more effective than using structured relational tuples (e.g., [Entity, Attribute, Value]). This suggests that because the underlying PLM was pre-trained on natural language, it can more easily ingest and retrieve information when it is presented in a familiar linguistic format.

Evaluation and Results

The models were evaluated using two primary datasets:

  • MultiWOZ 2.2: The standard benchmark for multi-domain task-oriented dialogue.
  • KPRS (Knowledge Probing using Response Selection): A new contrastive benchmark where the model must choose a correct KB-consistent response over a "distractor" response featuring a subtly altered fact.

Key Findings

  • Enhanced Retrieval: On the KPRS benchmark, adapter-augmented models outperformed the baseline BART model by 9–15% in accuracy, demonstrating a superior ability to recall specific facts.
  • Improved Dialogue Success: In end-to-end dialogue generation, the models showed significant gains in "Inform" and "Success" rates, indicating they provided the correct information requested by users more reliably.
  • Efficiency: Injecting knowledge via adapters proved more computationally efficient and effective than full-model fine-tuning on synthetic data.

Conclusion and Future Work

While KB-adapters offer a powerful alternative to external database queries for pseudo-dynamic data (information that changes infrequently), limitations remain. Currently, the method is less suited for real-time dynamic data, such as live hotel room availability, which would require frequent retraining. Additionally, the reliance on human-authored templates for fact conversion suggests a need for future domain-agnostic automation strategies. Expanding the model's ability to perform complex logical reasoning over its memorized facts remains a primary objective for subsequent research.

Summary updated

BibTeX
@inproceedings{emelin2022injecting,
  author = {Denis Emelin and Daniele Bonadiman and Sawsan Alqahtani and Yi Zhang and Saab Mansour},
  title = {{Injecting Domain Knowledge in Language Models for Task-oriented Dialogue Systems}},
  booktitle = {Conference on Empirical Methods in Natural Language Processing},
  year = {2022},
  doi = {10.18653/v1/2022.emnlp-main.820},
}
Figure