# A Diversity-Promoting Objective Function for Neural Conversation Models

Maximum mutual information decoding makes conversation models give less generic replies

Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, Bill Dolan · arXiv · 2015-10-11

- **Problem** Sequence-to-sequence chat models trained for likelihood return generic replies like I don't know. Likelihood only asks how probable a reply is, so safe replies win.
- **Method** MMI replaces likelihood with mutual information between message and reply, so generic replies lose. It leaves trained models unchanged and reranks an N-best list with a backward model.
- **Results** MMI-bidi reached BLEU 5.22 against 4.31 for the SEQ2SEQ baseline on Twitter.

## Why likelihood training favors generic replies

Sequence-to-sequence conversation models are trained to maximize the likelihood of a response given a message. For many inputs, the highest-scoring replies are short, generic lines such as I don't know, whatever the message says. Table 1 makes this concrete. For three inputs, the top-ranked replies from a 4-layer model with beam size 200 score between -0.79 and -0.91 in average log-likelihood, and all three are I don't know.

The more specific replies, such as My name is Robert, sit much lower in the N-best list at scores between -1.55 and -1.71, and the table's authors chose those by hand.

Part of the cause lies in the training data. In the OpenSubtitles training set, 0.45% of sentences contain I don't know, which is a high rate for a corpus of such diversity. The underlying issue is the direction of the dependency. A likelihood objective only asks how probable a response is given a message, so a reply that is probable in almost any context can win, while the inverse question about the message given the response is never asked.

## Scoring responses by mutual information

The standard decision rule picks the target with the highest log p(T\|S). The MMI criterion instead measures the pairwise mutual information between the input message S and the response T, which is the ratio of p(S,T) to the product of p(S) and p(T) in logarithm form. Because that ratio equals log p(T\|S) minus log p(T), the criterion stops rewarding responses that are probable no matter what the message is.

The authors add a weight λ on the marginal term, giving log p(T\|S) minus λ log p(T) as in Equation 9. Larger values of λ penalize generic responses more strongly. Applying Bayes' theorem rewrites this as (1 − λ) log p(T\|S) plus λ log p(S\|T), after dropping the log p(S) term, which does not depend on T and so does not change the argmax. Read this way, the score trades off predicting targets from sources, p(T\|S), against predicting sources from targets, p(S\|T).

Training a joint model with the MMI term was judged empirically hard, and changing λ would require retraining from scratch each time. The authors therefore trained ordinary maximum-likelihood models and applied the MMI criterion only at test time. Because λ enters only at decoding, it can be adjusted without retraining the network.

## MMI-antiLM and its position-weighted prior

Written directly, the second term of log p(T\|S) minus λ log p(T) acts as an anti-language model. It penalizes fluent responses along with generic ones, which can push the output toward ungrammatical wording. In principle a λ below 1 should prevent this, because the likelihood term ought to penalize ungrammatical responses more heavily. In practice the authors saw ungrammatical outputs that escaped that penalty.

The fix replaces p(T) with a term U(T) that multiplies each token's language-model probability by a weight g(k), and this weight decreases monotonically as the token index k grows. The reasoning is that early tokens shape the rest of the response, because the influence of the input fades as more words are generated. Penalizing early tokens therefore adds diversity, while the language model takes over later, where ungrammatical segments were observed, especially in long sentences.

The authors use a step function: g(k) equals 1 for k up to a threshold γ and 0 beyond it, so only the first γ words are penalized. The symbol γ is also the length weight in the decoding score, so the two uses are separate settings of one symbol. A smooth decay in g(k) was tried and did not improve performance. With the step function, the objective becomes log p(T\|S) minus λ log U(T), which can be decoded directly.

Decoding scores each candidate as p(T\|S) minus λU(T) plus γ times the target length Nt, with λ and γ tuned by MERT on N-best lists of candidates. Candidate lists come from a decoder with beam size 200 and a maximum length of 20. At each step, finished hypotheses are added to the list and the top 200 unfinished hypotheses are kept, so the final N-best list ends up larger than the beam.

## MMI-bidi and reranking an N-best list

The bidirectional form (1 − λ) log p(T\|S) plus λ log p(S\|T) cannot be decoded directly, because p(S\|T) needs the complete target before it can be computed. The search space over targets is too large to explore exhaustively. The authors therefore approximate. A standard sequence-to-sequence model first generates an N-best list from p(T\|S), and the second term then reranks that list.

Lists from a standard model are generally grammatical, so the chosen response is likely to be well formed.

Reranking has costs. Because the list is shaped first by the standard likelihood objective, the result is not globally optimal, and reranking depends on the base model producing a diverse enough N-best set, which must be long. At run time, each candidate is scored by linearly combining p(T\|S), λ p(S\|T) and γ Nt, and the weights λ and γ are tuned with MERT on the development set.

The backward model p(S\|T) has the same architecture as the forward model and is trained on the same data with messages and responses interchanged. Because there are only three features and two free parameters, grid search could have replaced MERT, and the search aims for the trade-off that scores best on BLEU.

## Network size and optimization settings

Each model is a deep LSTM with four encoder layers and four decoder layers, each with its own parameters. Every layer has 1,000 hidden neurons, and the word embeddings have dimension 1,000. Parameters and embeddings start from a uniform distribution over \[-0.08, 0.08\]. Training uses stochastic gradient descent with a fixed learning rate of 0.1, a batch size of 256, and gradient clipping at a norm threshold of 1.

On a single Tesla K40 GPU, training processed roughly 600 to 1200 tokens per second. The Table 1 example comes from a 4-layer model trained on 20 million conversation pairs from OpenSubtitles.

## Twitter and OpenSubtitles evaluation sets

The Twitter experiments use an extension of the Sordoni et al. (2015) triple dataset, with 23 million snippets drawn from 129M context-message-response triples collected from June through August 2012. Context is limited to the turn immediately before the message, and context and message are concatenated into one input. The development set has 2118 conversations and the test set has 2114 examples, with multiple references created by information retrieval.

The OpenSubtitles corpus holds roughly 60M-70M scripted lines and does not say which character speaks each line. Each line is treated as a full speaker turn, and consecutive turns are assumed to belong to one conversation. Because that assumption is noisy, evaluation uses IMSDB, which identifies speakers. Two subsets of 2k pairs each serve as development and test sets, with source and target lengths limited to the range \[6,18\].

BLEU is used for tuning and final evaluation, as multi-reference BLEU on Twitter and single-reference BLEU on OpenSubtitles. Perplexity is not used. Diversity is measured by counting distinct unigrams (distinct-1) and distinct bigrams (distinct-2) and dividing each count by the total number of generated tokens, which avoids favoring long responses.

## Twitter results

The authors read the MMI-bidi improvement over the baseline as showing up in both BLEU and diversity.

Both SMT rows were trained on about 50M examples, far more than the 23M used for the SEQ2SEQ and MMI models, so they differ in training data as well as in method.

## OpenSubtitles results

On OpenSubtitles, the baseline reached BLEU 1.28, distinct-1 0.0056 and distinct-2 0.0136. MMI-antiLM reached 1.74, 0.0184 and 0.066, and MMI-bidi reached 1.44, 0.0103 and 0.0303. The printed relative changes against the baseline are +35.9% BLEU, +228% distinct-1 and 407% distinct-2 for MMI-antiLM, and +28.2%, +83.9% and +122% for MMI-bidi.

The authors attribute the larger MMI-antiLM gain to the baseline giving very conservative replies here, because the input messages are diverse and complex and the references are more interesting than the generic outputs. MMI-bidi gained less, which the authors explain by its N-best lists from the baseline remaining conservative, so reranking has less to work with.

Baseline distinct-1 is lower on OpenSubtitles than on Twitter, 0.0056 against 0.017, which the authors take to mean other factors are involved, such as movie dialogue being concise and information-dense.

## Beam size and MMI-bidi

The beam of 200 used in the main experiments is described as conservative. On Twitter, MMI-bidi BLEU changes little as the beam shrinks: 5.90 at beam 200, 5.86 at beam 50 and 5.76 at beam 20. At beam 20 the N-best list still averages 173 elements with responses of varying length, which the authors judge enough for the backward model to have an effect.

## Pairwise human judgments on Twitter

Crowd judges compared paired outputs for a random sample of 1000 Twitter test items, with five judges per pair, choosing the better output or a tie. Judges were told to prefer outputs more specific to the message and preceding context over generic ones. Identical strings were given the same score by the algorithm, and the mean of the differences is reported as the gain.

MMI-bidi gained 0.29 over SMT, with a 95% interval of \[0.25, 0.32\], and 0.28 over SMT with neural reranking, with \[0.25, 0.32\]. Against the SEQ2SEQ baseline the gain was 0.11 with interval \[0.07, 0.14\], and against greedy SEQ2SEQ it was 0.08 with interval \[0.04, 0.11\]. At a significance level of α = 0.05, the authors report that MMI-bidi outperforms both SEQ2SEQ systems and both SMT systems.

A separate absolute rating used seven judges per output on a 5-point scale, and MMI-bidi outputs received a mean of 3.84 with a median of 3.85. The footnote says this absolute evaluation was run separately on the best system, with the annotators asked about overall quality.

## Sample outputs and the generic-reply rate

Table 4 sets baseline and MMI-antiLM responses side by side on OpenSubtitles, and the MMI-antiLM replies there are often longer and more situation-specific than the baseline's I don't know. The authors note that the baseline handles simple messages reasonably but switches to duller forms, such as I don't know what you are talking about, as messages grow more complex.

Table 5 pairs baseline and MMI-bidi replies on Twitter, and the authors describe the MMI-bidi replies as more diverse and interesting. The caption of Table 7 names MMI-antiLM as the model, while the body text says the same candidate table comes from MMI-bidi.

A footnote attached to the OpenSubtitles discussion says four generic strings make up 32% of all generated responses. The footnote does not say which model's output it counts.

## Diversity reranking as a comparison point

When MMR-based reranking was added to the method, lexical diversity rose but semantic diversity did not, with I don't know and I haven't a clue given as an example of the difference. That addition also gave no gain in performance. Earlier diversity work produced several mutually diverse outputs, such as non-redundant summary sentences or N-best lists.

The authors aim for a single non-trivial output and do not require identifying lexical overlap.

## Limits of the MMI evidence

MMI-bidi depends on the base model producing a highly diverse, informative N-best list, and the authors say its performance hinges on that. Reranking is not globally optimal, because the list is first shaped by the standard likelihood objective, and the approach requires generating a long N-best list for each message.

Treating each OpenSubtitles line as a turn adds noise, because consecutive lines may come from different conversations or characters, and the authors say this may make OSDb unreliable for evaluation. OpenSubtitles evaluation uses single-reference BLEU because IMSDB gives only one reference per message, which the authors give as a main reason for the lower BLEU values there.

The beam-size analysis gives 5.90 for MMI-bidi at beam 200, while Table 2 gives 5.22 for MMI-bidi with 23M training instances, and the paper does not explain the difference. Sampling from p(T\|S) as a diversity method was not compared, as the authors chose to optimize an objective directly.

## Paper info

- **Authors**: Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, Bill Dolan
- **Venue**: arXiv · Preprint
- **First published**: 2015-10-11
- **Added**: 2026-11-12
- **Updated**: 2016-6-10
- **Version**: v3
- **arXiv**: 1510.03055
- **Category**: cs.CL
- **Original paper terms**: [arXiv non-exclusive 1.0](https://arxiv.org/licenses/nonexclusive-distrib/1.0/)
- **What we show**: Paper info and commentary

[Original paper ↗](https://arxiv.org/abs/1510.03055v3) · [PDF ↗](https://arxiv.org/pdf/1510.03055v3)

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

## Quote from the paper

Jiwei Li, Michel Galley, Chris Brockett, Jianfeng Gao, Bill Dolan (2015). A Diversity-Promoting Objective Function for Neural Conversation Models. arXiv:1510.03055v3. https://arxiv.org/abs/1510.03055v3

**BibTeX**

```
@misc{li2015diversity,
  title = {{A Diversity-Promoting Objective Function for Neural Conversation Models}},
  author = {Jiwei Li and Michel Galley and Chris Brockett and Jianfeng Gao and Bill Dolan},
  year = {2015},
  eprint = {1510.03055},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1510.03055v3}
}
```

## Other paper commentary

- [A Call for Clarity in Reporting BLEU Scores](https://refivu.com/en/papers/626061b1-f2e9-4997-a6e6-2f15df6f8b3f-a-call-for-clarity-in-reporting-bleu-scores.md)
- [MS MARCO: A Human Generated MAchine Reading COmprehension Dataset](https://refivu.com/en/papers/5bd254d7-7f81-466f-936c-2233b75bea95-ms-marco-a-human-generated-machine-reading-comprehension.md)
- [NLTK: The Natural Language Toolkit](https://refivu.com/en/papers/26e265b2-45d0-4d0e-b6a7-a161ecf1fe09-nltk-the-natural-language-toolkit.md)
- [EDA: Easy Data Augmentation Techniques for Boosting Performance on Text Classification Tasks](https://refivu.com/en/papers/6bc7db3b-907c-40de-8993-2cc4b32ed04f-eda-easy-data-augmentation-techniques-for-boosting.md)
- [Thumbs up? Sentiment Classification using Machine Learning Techniques](https://refivu.com/en/papers/099cc783-1d4a-4899-b08c-ce3886810f1a-thumbs-up-sentiment-classification-using-machine-learning.md)
- [From Local to Global: A Graph RAG Approach to Query-Focused Summarization](https://refivu.com/en/papers/b90240e0-a6fe-4297-adb6-4ebd769e9c60-from-local-to-global-a-graph-rag-approach.md)
- [The Arcade Learning Environment: An Evaluation Platform for General Agents](https://refivu.com/en/papers/2c89eed5-9dfb-4243-8466-0655582e3266-the-arcade-learning-environment-an-evaluation-platform-for.md)
- [Federated Optimization: Distributed Machine Learning for On-Device Intelligence](https://refivu.com/en/papers/5f4eb215-ecfd-414d-aaa9-bd382c3c7b54-federated-optimization-distributed-machine-learning-for-on.md)
- [The Ethics of AI Ethics -- An Evaluation of Guidelines](https://refivu.com/en/papers/36e5de78-c499-4b96-ba0a-9d2daff8bde8-the-ethics-of-ai-ethics-an-evaluation-of.md)
- [Temporal Ensembling for Semi-Supervised Learning](https://refivu.com/en/papers/5823cdfc-4033-4589-9f86-a6c88d27f620-temporal-ensembling-for-semi-supervised-learning.md)
- [Modeling Long- and Short-Term Temporal Patterns with Deep Neural Networks](https://refivu.com/en/papers/2ced2044-9976-4c74-bbf8-ff344f253f42-modeling-long-and-short-term-temporal-patterns-with.md)
- [Tutorial on Variational Autoencoders](https://refivu.com/en/papers/51a9cfc2-6285-4935-b55a-3d6450af8eff-tutorial-on-variational-autoencoders.md)

## Terms in this paper

- [LSTM](https://refivu.com/en/terms/ba10547646d9-lstm)
- [BLEU](https://refivu.com/en/terms/42cd9b97719e-bleu)
- [beam search](https://refivu.com/en/terms/3e449f8f713b-beam-search)
- [SEQ2SEQ](https://refivu.com/en/terms/6f6133892227-seq2seq)
- [distinct-2](https://refivu.com/en/terms/b7b1e08c27aa-distinct-2)
- [Greedy search](https://refivu.com/en/terms/1f5b9b9e1209-greedy-search)
- [MERT](https://refivu.com/en/terms/f7e6ef8b5126-mert)
- [OpenSubtitles dataset](https://refivu.com/en/terms/c37c27ed8922-opensubtitles-dataset)
- [statistical machine translation](https://refivu.com/en/terms/1fb227f4cdce-statistical-machine-translation)

---

AI-written text can contain mistakes. [Refivu](https://refivu.com/en/papers/a4f62a40-246e-47fd-bbb9-33f09731586c-a-diversity-promoting-objective-function-for-neural)
