Generating Diverse and High-Quality Texts by Minimum B ayes Risk Decoding (2024)

Abstract: One of the most important challenges in text generation systems is to produce outputs that are not only correct but also diverse.Recently, Minimum Bayes-Risk (MBR) decoding has gained prominence for generating sentences of the highest quality among the decoding algorithms. However, existing algorithms proposed to generate diverse outputs are predominantly based on beam search or random sampling, thus their output quality is capped by these underlying decoding algorithms. In this paper, we investigate an alternative approach – we develop diversity-promoting decoding algorithms by enforcing diversity objectives to MBR decoding.We propose two variants of MBR; (i) Diverse MBR (DMBR) that adds a diversity penalty to the decoding objective and (ii) k -medoids MBR (KMBR) that reformulates the decoding task as a clustering problem.We evaluate DMBR and KMBR on a variety of directed text generation tasks using encoder-decoder models and a language model with prompting. The experimental results show that the proposed method achieves a better trade-off than the diverse beam search and sampling algorithms overall.

## introduction there are many reasons why natural language generation systems want to produce outputs that are not only correct but also diverse. for example, in systems involving reranking candidate outputs, the reranking algorithms are more effective when the candidates are diverse @xcite @xcite . in image captioning, an image may contain many concepts with multiple levels of @xcite to achieve human-level image captioning, it is important for models to be able to output a variety of captions covering such diverse information @xcite . as an application, @xcite shows that a diverse set of image captions can be transformed into an entire descriptive paragraph explaining the image. for question generation tasks, a diversity-promoting question generation system can improve question answering systems @xcite and enhance the engagement in chatbots @xcite . this importance of diversity in text generation has brought many studies aimed at producing diverse outputs instead of the most probable ones. the majority of the approaches are based on either random sampling @xcite @xcite or beam search @xcite @xcite @xcite , thus the output quality is bounded by the quality of either random sampling or beam search. in this paper, we develop diverse decoding methods by extending minimum bayes risk (mbr) @xcite @xcite . mbr decoding is shown to generate higher quality sentences than random sampling and beam search in directed text generation tasks including machine translation, text summarization, and data-to-text @xcite . the procedure of the mbr decoding consists of the following steps. first, it samples a set of candidate outputs from the probability model. then, it computes the similarity of each sequence to the others according to a utility function. finally, it selects the sequence that maximizes the expected utility over the sequences. a naive approach to generate k outputs using mbr is to select the top-k outputs with the highest expected utility. however, it tends to select a set of similar sentences with a large overlap (see appendix c for examples). we propose two approaches to promote diversity in mbr: diverse mbr (dmbr) and k-medoids mbr (kmbr). dmbr extends mbr by introducing a diversity penalty to the objective so that it maximizes the weighted sum of the expected utility and diversity. dmbr can tune the quality-diversity trade-off by the weight hyperparameter. kmbr selects a set of sentences by solving the k-medoids problem (rdusseeun and @xcite . k-medoids is a variant of k-means where the center points are restricted to be one of the data points instead of anywhere in the space. we pick a center point from each cluster to generate diverse and high quality outputs. we evaluate dmbr and kmbr on machine translation, image captioning, question generation, generative common sense reasoning, and text summarization. the experimental results show that dmbr and kmbr achieve better trade-offs than diverse beam search and sampling algorithms. we also observe that dmbr and kmbr achieve higher oracle quality scores in all the tasks. ## background sequence-to-sequence generation is the task of generating an output sequence y given an input sequence x. probabilistic text generators define a probability distribution p θ (y|x) over an output space of hypotheses y conditioned on an input x. the set of complete hypotheses y is: in this paper, we consider a variant of the set decoding problem @xcite where the task is to generate a set of k sentences h that maximizes the sum of p human and the diversity according to the preference of human d human : ## minimum bayes risk decoding with diversity we now introduce mbr decoding to the set decoding problem with diversity objective @xcite . a naive way to generate k sentences by mbr decoding is to select the top-k hypotheses by eq. ( 6 ): however, it results in a set of similar sentences with a large overlap. in fact, it often finds almost duplicated sentences in machine translation tasks (tables 2 and 3 in appendix c). ## experiments we evaluate dmbr and kmbr in machine translation, image captioning, question generation, generative common sense reasoning, and text summarization. all experiments use bertscore @xcite as the utility function of the mbr. we compare the performance of the sampling algorithms, beam search, diverse beam search (dbs) @xcite , mbr, diverse mbr (dmbr), and k-medoids mbr (kmbr). we evaluate the quality and the diversity of the generated texts. as a quality metric, we report the mean, max, and min quality over each set of k sentences measured by bleu, rouge-l, or me-teor @xcite @xcite . we use distinct-n @xcite and pairwise-bleu (p-bleu) @xcite as diversity metrics. due to limitations in computational resources, we run experiments using the first 1000 entries of the dataset for all the experiments in this paper. we use huggingface's transformers library for running all the experiments @xcite . we initialize the clusters for pam used in kmbr by k-medoids++ with maximum iterations set to 300. for reproducibility, all the experiments are conducted using publicly available pretrained models and datasets. we use sacrebleu system @xcite to compute bleu scores. examples of generations are shown in appendix c. see appendix e for additional figures and the summary of the experimental results in tables. ## conclusions we study the problem of generating a set of texts with high quality and diversity. our approach is to promote diversity to mbr which is shown to generate high quality texts so that it can generate high quality and diverse outputs. we extend mbr and propose dmbr and kmbr that seek to optimize both the diversity and the quality when selecting a set of outputs. because both algorithms are too expensive to compute exactly, we devise approximate algorithms to make it feasible. we evaluate dmbr and kmbr on machine translation, image captioning, question generation, generative common sense reasoning, and text summarization tasks and show that overall they achieve better qualitydiversity trade-off than dbs. we also observe that both methods, especially kmbr, achieve a higher max bleu score than mbr, analogous to dbs achieving a higher bleu score than beam search.