Dual Contrastive Learning for Unsupervised Knowledge Selection

Xiang Cao, Lei Wang, Yujiu Yang

Introduction

Standard AI dialogue systems often suffer from generating generic, uninformative responses such as "I don't know" or "That's interesting." To mitigate this, researchers have integrated external knowledge sources (e.g., Wikipedia) into sequence-to-sequence (Seq2Seq) models. However, a significant hurdle remains: Unsupervised Knowledge Selection. In real-world scenarios, "gold labels" indicating which specific fact corresponds to a given response are rarely available. Existing models often struggle to bridge the gap between a conversation's context and the most relevant external facts, leading to suboptimal knowledge utilization.

The Dual Contrastive Learning Framework

To address these challenges, the authors propose Dual Contrastive Learning (DCL). This framework shifts the perspective of knowledge selection from a purely generative task to a discriminative one. The core hypothesis is that correctly selected knowledge should not only facilitate response generation but also uniquely identify the correct response among several alternatives.

The Dual Contrastive Learning architecture, illustrating the interaction between prior and posterior distributions through contrastive objectives.

The architecture consists of a source encoder, a knowledge encoder, and a dual contrastive knowledge selector. The selector manages two primary distributions:

  1. Prior Distribution: Derived from the conversation context (the prompt).
  2. Posterior Distribution: Derived from the actual response (available during training).

The "Dual" nature of the model comes from two novel contrastive losses:

  • Prior Contrast: Forces the model to align the context-based knowledge selection with the correct response while pushing it away from knowledge distributions associated with other turns in the dialogue.
  • Posterior Contrast: Ensures the response-based knowledge selection is more similar to its corresponding context than to unrelated prompts.

To ensure the selected facts are effectively integrated into the final text, the model employs a Hierarchical Gated Fusion Unit (HGFU) within the decoder. By using other turns within the same dialogue as "negative samples," the model learns to capture the specific nuances that make a fact relevant to a particular moment in a conversation.

Experimental Setup

The model was evaluated on two benchmark datasets for knowledge-grounded dialogue:

  • PersonaChat: Focuses on maintaining consistent speaker personas based on specific traits.
  • Wizard-of-Wikipedia (WoW): Involves discussing specific topics using Wikipedia snippets. Notably, the authors treated WoW as an unsupervised task, ignoring existing knowledge labels to test the model's robustness in label-scarce environments.

Results and Analysis

The DCL model demonstrates superior performance over competitive baselines, including standard Seq2Seq and the Posterior Knowledge Selection (PostKS) model.

Performance comparison of the proposed model against baselines across PersonaChat and Wizard-of-Wikipedia datasets.

As shown in the results table, the DCL model consistently achieves higher Knowledge-F1 scores, indicating more accurate retrieval and utilization of external facts. Furthermore, improvements in DISTINCT-1/2/3 metrics suggest that the model generates more diverse and less repetitive language.

An ablation study revealed that the Prior Contrast objective is particularly critical. Since the prior distribution is what the model relies on during inference (when the ground-truth response is unknown), strengthening this component directly translates to better real-world performance.

Conclusion and Future Directions

Dual Contrastive Learning provides a powerful, unsupervised mechanism for improving knowledge selection in dialogue systems. By treating knowledge as a discriminator, the model moves beyond "global" facts toward "local," context-specific information. Future work may involve transitioning from GRU-based architectures to more modern Transformer-based models and exploring finer-grained knowledge selection at the entity or span level to further enhance precision.

Summary updated

BibTeX
@inproceedings{cao2022dual,
  author = {Xiang Cao and Lei Wang and Yujiu Yang},
  title = {{Dual Contrastive Learning for Unsupervised Knowledge Selection}},
  booktitle = {SEKE},
  year = {2022},
  doi = {10.18293/seke2022-054},
}
Figure