Abstract
Sequence-to-Sequence (Seq2Seq) models have achieved encouraging performance on the dialogue response generation task. However, existing Seq2Seq-based response generation methods suffer from a low-diversity problem: they frequently generate generic responses, which make the conversation less interesting. In this paper, we address the low-diversity problem by investigating its connection with model over-confidence reflected in predicted distributions. Specifically, we first analyze the influence of the commonly used Cross-Entropy (CE) loss function, and find that the CE loss function prefers high-frequency tokens, which results in low-diversity responses. We then propose a Frequency-Aware Cross-Entropy (FACE) loss function that improves over the CE loss function by incorporating a weighting mechanism conditioned on token frequency. Extensive experiments on benchmark datasets show that the FACE loss function is able to substantially improve the diversity of existing state-of-the-art Seq2Seq response generation methods, in terms of both automatic and human evaluations.
Introduction
Chatbots often suffer from "boring response syndrome," repeatedly outputting generic phrases like "I don't know." This research addresses the low-diversity problem in standard Sequence-to-Sequence (Seq2Seq) models. While these models are effective at learning grammar, they tend to be incredibly repetitive in open-domain dialogue.
The authors argue that the root cause lies in the standard Cross-Entropy (CE) loss function. CE loss treats every token occurrence equally, regardless of its frequency in the training data. Because words like "I," "the," and "don't" appear vastly more often than specific nouns or verbs, the model's total loss becomes dominated by these high-frequency tokens. This leads to loss imbalance, where the model becomes "over-confident" in generic tokens and "under-trained" on rare, informative ones.
The Over-confidence Problem
A critical insight of this work is the "Leading Token Trap." Model over-confidence is most damaging at the very start of a sentence. If a model is excessively certain about the first word, the search space for the remainder of the response is immediately restricted to generic paths.
As shown in Table 4, the model exhibits extreme over-confidence in the token "i" as the first word in the OpenSubtitles dataset, with a predicted probability of 74% in the validation set. This statistical bias forces the model toward safe, generic responses to minimize loss during training.
Frequency-Aware Cross-Entropy (FACE)
To mitigate this, the authors propose FACE (Frequency-Aware Cross-Entropy) loss. Instead of treating every token equally, FACE applies a weight ($w_i$) to the loss of each token based on its frequency. The core principle is to lower the weight for frequent tokens and increase it for rare ones.
The paper explores two primary weighting strategies:
- Pre-weighting: Weights are calculated as a linear function of a token's relative frequency in the dataset prior to training.
- Post-weighting: A "train-and-refine" strategy where the model is first trained normally, then fine-tuned using a weight that penalizes the model if it assigns higher probability to a token more frequent than the ground-truth token.
Additionally, they introduce a parameter-free Confidence Penalty (CP). This adds an entropy-based term to the loss function that discourages the model from becoming too certain about a single generic token, effectively smoothing the output distribution.
Experimental Results
The researchers evaluated FACE on two massive dialogue benchmarks: OpenSubtitles (OSDb) (~30M pairs) and Twitter (~904K triples).
One of the primary advantages of FACE is its architectural simplicity. Unlike previous solutions like Maximum Mutual Information (MMI), which require complex decoding or "reverse models," FACE achieves diversity by modifying the learning objective itself.
As illustrated in Table 6, FACE and CP utilize standard greedy decoding and a single attention head, avoiding the extra computational overhead required by MMI or Multi-Head Attention (MHAM) models. Despite this simplicity, the results were significant:
- Diversity Boost: On the OSDb dataset, the d-2 score (percentage of distinct bigrams) increased from 8.63% in the baseline to 20.47% with FACE.
- Human Preference: In pairwise blind tests, humans preferred FACE responses over standard Seq2Seq responses 38.6% to 21.5%. Against the MMI-bidi baseline, FACE was preferred 61.9% to 20.9%.
Discussion and Limitations
While FACE substantially improves diversity, it introduces new challenges. The authors note that FACE is less stable than standard CE loss because shifting focus to rare tokens can make the learning procedure more volatile. Consequently, FACE works best as a fine-tuning step after a model has already acquired basic linguistic competence through standard CE training.
Furthermore, while FACE improves the "interestingness" of short-term responses, future work is required to determine its effectiveness in maintaining coherence across long, multi-turn dialogues.
Summary updated