Does Dialog Length matter for Next Response Selection task? An Empirical Study

Jatin Ganhotra, Sachindra JoshiarXiv 2021

Abstract

In the last few years, the release of BERT, a multilingual transformer based model, has taken the NLP community by storm. BERT-based models have achieved state-of-the-art results on various NLP tasks, including dialog tasks. One of the limitation of BERT is the lack of ability to handle long text sequence. By default, BERT has a maximum wordpiece token sequence length of 512. Recently, there has been renewed interest to tackle the BERT limitation to handle long text sequences with the addition of new self-attention based architectures. However, there has been little to no research on the impact of this limitation with respect to dialog tasks. Dialog tasks are inherently different from other NLP tasks due to: a) the presence of multiple utterances from multiple speakers, which may be interlinked to each other across different turns and b) longer length of dialogs. In this work, we empirically evaluate the impact of dialog length on the performance of BERT model for the Next Response Selection dialog task on four publicly available and one internal multi-turn dialog datasets. We observe that there is little impact on performance with long dialogs and even the simplest approach of truncating input works really well.

Introduction

Transformer-based models like BERT have a standard maximum sequence length of 512 wordpiece tokens. This constraint is driven by the quadratic memory cost of self-attention. While the research community has responded with "Long-context" architectures like Longformer or Big Bird to handle thousands of tokens, this study investigates whether such complexity is necessary for the specific task of Next Response Selection (NRS). Real-world dialogues, particularly in technical support, often exceed 512 tokens, but it remains unclear if distant history is essential for predicting the immediate next turn.

Methodology

The researchers evaluated a standard uncased BERT-base model using a "tail-only" truncation strategy. When a dialogue exceeded the 512-token limit, the model retained only the most recent tokens (the "tail") and discarded the earlier context. Performance was then compared across two subsets:

  1. Short dialogues: Context length < 512 tokens.
  2. Long dialogues: Context length > 512 tokens.

By analyzing metrics such as Recall ($R_n@k$) and Mean Reciprocal Rank (MRR), the study aimed to determine if losing the "head" of a long conversation significantly degraded performance.

Dataset Characteristics

The study utilized four public benchmarks (Ubuntu V1 & V2, Douban, and E-commerce) and one internal Tech-Support dataset. A key finding was the inherent bias in public benchmarks: most contain very few long dialogues.

Dataset statistics showing the distribution of short vs. long dialogues across various corpora.

As shown in Figure 1, public datasets like Ubuntu and Douban have only ~4-5% of samples exceeding the 512-token limit. Conversely, the internal Tech-Support dataset provides a more robust testbed for long-context modeling, with 40.8% of its samples exceeding the limit.

Empirical Results

Quantitative results demonstrate that simple truncation is remarkably robust for the NRS task. Surprisingly, the model often performed better on long dialogue subsets than on short ones, suggesting that longer conversations may provide clearer signals for response selection despite truncation.

Performance metrics for Ubuntu Corpus V1 and V2, comparing short (<512) and long (>512) dialogue subsets.

In the Ubuntu V1 dataset (Figure 4), the $R_{10}@1$ score for short dialogues was 0.808, while it rose to 0.900 for long dialogues. Similarly, in the Tech-Support dataset—where nearly half the data is long—the MRR remained stable (0.929 for short vs. 0.931 for long), indicating that the loss of early context did not hinder the model's predictive accuracy.

Discussion and Conclusion

The findings suggest a strong "Recency Bias" in dialogue: the most critical information for the next turn is typically contained in the immediate preceding utterances. This explains why the "tail-only" strategy is so effective.

Furthermore, the paper highlights a benchmark bias in the NLP community. Because existing public datasets are skewed toward short conversations, researchers may be over-engineering complex architectures for a problem that is statistically rare in those datasets. For Next Response Selection, standard BERT with simple truncation remains a highly competitive and efficient baseline, calling into question the immediate necessity for sparse-attention models in this specific domain. Future work should focus on tasks like dialogue summarization where long-range dependencies may be more critical.

Summary updated

BibTeX
@misc{ganhotra2021does,
  author = {Jatin Ganhotra and Sachindra Joshi},
  title = {{Does Dialog Length matter for Next Response Selection task? An Empirical Study}},
  year = {2021},
  eprint = {2101.09647},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2101.09647},
}
Figure