DialogBERT: Discourse-Aware Response Generation via Learning to Recover and Rank Utterances

Xiaodong Gu, Kang Min Yoo, Jung-Woo Ha

Introduction

Standard dialogue models, such as DialoGPT or BART, typically treat conversation history as a single, linear sequence of tokens. While effective for short-range dependencies, this "flat" approach often fails to capture high-level discourse-level coherence. In human conversation, the semantic link between utterances (e.g., "Coffee, please" followed by "Here you are") is clear at the turn level, but often obscured at the word level. Furthermore, token-level self-attention becomes computationally expensive as history grows, as every word must attend to every other word regardless of its turn.

DialogBERT addresses these challenges by introducing a hierarchical Transformer architecture that explicitly models dialogue as a sequence of utterances. By employing two novel training objectives—Masked Utterance Regression (MUR) and Distributed Utterance Order Ranking (DUOR)—the model learns to capture the "forest" of conversation rather than just the "trees" of individual words.

Proposed Methodology

The DialogBERT framework utilizes a Hierarchical Transformer Encoder-Decoder architecture, as illustrated in Figure 1.

The DialogBERT hierarchical architecture, consisting of an Utterance Encoder, a Context Encoder, and a Decoder.

The architecture consists of three primary components:

  1. Utterance Encoder: Processes individual words within a turn to create a single representative vector using the [CLS] token.
  2. Context Encoder: A higher-level Transformer that takes the sequence of utterance vectors and models how they relate to one another over the course of the conversation.
  3. Decoder: Generates the final response based on the context-aware representations provided by the encoders.

To train this architecture effectively, the authors propose two unsupervised objectives inspired by BERT:

  • Masked Utterance Regression (MUR): Similar to Masked Language Modeling, but at the discourse level. The model masks an entire utterance and reconstructs its original encoding vector using a regression loss (Mean Squared Error). This forces the context encoder to understand the semantic role a missing turn should fill.
  • Distributed Utterance Order Ranking (DUOR): The model is presented with a shuffled set of utterances and must assign a "ranking score" to each to reconstruct the original chronological order, teaching the model the logical flow of dialogue.

Experimental Evaluation

The model was evaluated on three diverse multi-turn conversation datasets: Weibo (large-scale social media), MultiWOZ (task-oriented dialogue), and DailyDialog (English chit-chat).

Quantitative Results

DialogBERT consistently outperformed strong baselines across all metrics. As shown in Figure 5, the proposed pre-training objectives (MURegr and DUOR) lead to superior performance compared to retrieval-based or classification-based alternatives.

Comparison of different pre-training objectives (MUR and DUOR) on the MultiWOZ and DailyDialog benchmarks.

On the DailyDialog dataset, DialogBERT achieved a Perplexity (PPL) of 20.49, significantly lower than BART (22.92) and DialoGPT (46.42). It also showed marked improvements in BLEU and NIST scores, indicating higher n-gram overlap and information gain. Human evaluations confirmed these findings, with judges preferring DialogBERT’s responses for being more coherent, informative, and human-like.

Key Insights

  • Regression vs. Retrieval: The authors found that regression (predicting the exact vector of a masked utterance) is more effective than retrieval (choosing the right utterance from a distractor set). Regression provides a more fine-grained signal, forcing the model to learn precise semantic nuances.
  • Efficiency in Depth: While DialogBERT includes an extra "context encoder," it does not incur significant latency. Because the context encoder operates on utterances (typically <10 per context) rather than hundreds of tokens, the computational overhead remains minimal.

Conclusion

DialogBERT demonstrates that explicitly modeling the hierarchical structure of dialogue significantly improves response coherence. By focusing on discourse-level objectives like MUR and DUOR, the model generates responses that are more logically tied to the preceding turns. Future work may involve scaling this approach to massive datasets or integrating it with external knowledge bases for complex task-oriented applications.

Summary updated

BibTeX
@inproceedings{gu2021dialogbert,
  author = {Xiaodong Gu and Kang Min Yoo and Jung-Woo Ha},
  title = {{DialogBERT: Discourse-Aware Response Generation via Learning to Recover and Rank Utterances}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2021},
  doi = {10.1609/aaai.v35i14.17527},
}
Figure