Enhancing Dialogue Generation via Dynamic Graph Knowledge Aggregation

Chen Tang, Hongbo Zhang, Tyler Loakman, Chenghua Lin, Frank Guerin

Abstract

Integrating external knowledge into dialogue systems is essential for generating human-like, contextually relevant responses. However, traditional methods often struggle with a "semantic gap" between structured knowledge graphs (KGs) and unstructured text. This paper presents SaBART (Subgraph-Aggregation BART), a novel framework that bridges this gap by involving the language model directly in the graph aggregation process. By utilizing dynamic hierarchical attention on "pseudo nodes," SaBART learns unified representations that significantly outperform existing Graph Neural Network (GNN) approaches in informativeness, diversity, and contextual relevance.

1. Introduction

For chatbots to move beyond simple pattern matching toward true reasoning, they must leverage external commonsense knowledge. While Knowledge Graphs like ConceptNet provide a rich source of information, integrating them into Transformer-based architectures remains a challenge. Most existing models treat the KG and the dialogue context as separate entities, leading to a representation gap where graph features feel like "foreign objects" to the language model (LM). SaBART addresses this by aligning the embedding spaces of both modalities from the start, ensuring that knowledge is not just appended, but integrated.

2. The Problem: The Representation Gap

In conventional setups, a GNN processes the graph structure independently of the text encoder. This results in two distinct hidden spaces: one for the conversation and one for the knowledge. When these features are combined, the mismatch often prevents the LM from fully utilizing the topological richness of the graph. Previous attempts to solve this by flattening the graph into text strings often lose the structural relationships that define the knowledge. SaBART seeks a middle ground: preserving graph topology while ensuring semantic alignment with the LM's internal representations.

3. Methodology

SaBART integrates graph knowledge through a multi-step, hierarchical process designed to maintain structural integrity while ensuring linguistic compatibility.

3.1 Dynamic Subgraph Construction

For every input post, the model retrieves relevant triples from ConceptNet. These triples are organized into subgraphs based on the entities mentioned in the dialogue, providing a focused knowledge context for the specific conversation.

3.2 Pseudo Nodes and Embedding Alignment

To prevent semantic misalignment, SaBART introduces "pseudo nodes." Instead of treating entities as abstract points, the model represents flattened triples as pseudo nodes initialized by the LM’s own embedding layer. This ensures that the graph features speak the same "language" as the text features from the moment of initialization.

3.3 Hierarchical Knowledge Aggregation

The model employs a dual-layered aggregation strategy:

  • Static Aggregation: This layer calculates a baseline global feature from all retrieved triples to provide a broad knowledge context.
  • Dynamic Aggregation: This is the core innovation of SaBART. The model uses two forward layers of attention where the query is the LM's own context vector ($H^{CLS}$). This allows the language model to actively "choose" which parts of the graph are most relevant to the current conversation, acting as a filter for the most pertinent knowledge "hops."

3.4 Unified Encoding and Generation

The final aggregated graph features are concatenated with the text features. This unified representation is then fed into a BART (Bidirectional and Auto-Regressive Transformers) decoder to generate the final response.

4. Experimental Setup

SaBART was evaluated using a large-scale commonsense dialogue dataset containing over 3.3 million training pairs. ConceptNet served as the primary knowledge source. The model was compared against several state-of-the-art (SOTA) baselines, including ConceptFlow, CCM, and a vanilla BART model.

5. Results and Analysis

SaBART achieved a new SOTA on the commonsense dialogue task, demonstrating substantial improvements across all primary metrics.

5.1 Quantitative Performance

SaBART effectively doubled the performance of the previous leader, ConceptFlow, in key areas:

  • Accuracy and Fluency: BLEU-2 scores rose from 0.1047 to 0.2113, and METEOR scores increased from 0.0942 to 0.1674.
  • Diversity: The model showed a massive jump in response variety, with Dist-2 (unique bigrams) reaching 0.2798 compared to ConceptFlow’s 0.1228.

5.2 Human Evaluation

In blind tests, human evaluators preferred SaBART’s responses for appropriateness and informativeness approximately 66-70% of the time when compared directly to ConceptFlow.

5.3 Representation Alignment

Visualization via t-SNE confirmed that SaBART successfully bridged the semantic gap. While traditional models showed graph embeddings clustering in isolated regions, SaBART’s graph embeddings were evenly interleaved with text word embeddings, proving a unified semantic space.

6. Conclusion and Future Work

SaBART demonstrates that the key to effective knowledge integration is not just the quantity of data, but the alignment of representations. By allowing the language model to drive the graph aggregation process, SaBART produces more diverse and contextually grounded dialogues.

Future research will focus on scaling this framework to larger models (such as Llama or GPT-4) and addressing the computational intensity of the training process. Additionally, improving the veracity of retrieved knowledge remains a priority to ensure the model does not propagate biases or misinformation present in external KGs.

Summary updated

BibTeX
@inproceedings{tang2023enhancing,
  author = {Chen Tang and Hongbo Zhang and Tyler Loakman and Chenghua Lin and Frank Guerin},
  title = {{Enhancing Dialogue Generation via Dynamic Graph Knowledge Aggregation}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.253},
}
Figure