We present an approach for generating clarification questions with the goal of eliciting new information that would make the given textual context more complete. We propose that modeling hypothetical answers (to clarification questions) as latent variables can guide our approach into generating more useful clarification questions. We develop a Generative Adversarial Network (GAN) where the generator is a sequence-to-sequence model and the discriminator is a utility function that models the value of updating the context with the answer to the clarification question. We evaluate on two datasets, using both automatic metrics and human judgments of usefulness, specificity and relevance, showing that our approach outperforms both a retrieval-based model and ablations that exclude the utility model and the adversarial training. A goal of natural language processing is to develop techniques that enable machines to process naturally occurring language. However, not all language is clear and, as humans, we may not always understand each other (Grice, 1975); in cases of gaps or mismatches in knowledge, we tend to ask questions (Graesser et al., 2008). In this work, we focus on the task of automatically generating clarification questions: questions that ask for information that is missing from a given linguistic context. Our clarification question generation model builds on the sequence-to-sequence approach that has proven effective for several language generation tasks (Sutskever et al., 2014; Serban et al., 2016; Yin et al., 2016; Du et al., 2017). Unfortunately, training a sequence-to-sequence model directly on (context, question)  This research performed when the author was still at University of Maryland, College Park. pairs yields questions that are highly generic 1 , corroborating a common finding in dialog systems (Li et al., 2016b). Our goal is to be able to generate clarification questions that are useful and specific. To achieve this, we begin with a recent observation of Rao and Daume III (2018), who consider the task of question reranking: a good clarification question is the one whose answer has a high utility , which they define as the likelihood that this question would lead to an answer that will make the context more complete (  2.3). Inspired by this, we construct a model that first generates a question given a context, and then generates a hypothetical answer to that question. Given this (context, question, answer) triple, we train a utility calculator to estimate the usefulness of this question. We then show that this utility calculator can be generalized using ideas for generative adversarial networks (Goodfellow et al., 2014) for text (Yu et al., 2017), wherein the utility calculator plays the role of the discriminator and the question generator is the generator (  2.2), which we train using the MIXER algorithm (Ranzato et al., 2015). We evaluate our approach on two datasets: Amazon product descriptions (Figure 1) and Stack Exchange posts (Figure 2). Our two main contributions are: 1. An adversarial training approach for generating clarification questions that models the utility of updating a context with an answer to the clarification question. 2 2. An empirical evaluation using both automatic metrics and human judgments to show that our adversarially trained model generates questions that are more useful and specific to the context than all the baseline models. Is it made in China? or What are the dimensions? 2 Code and data: https://github.com/ raosudha89/clarification_question_generation_pytorch Our goal is to build a model that, given a context, can generate an appropriate clarification question. Our dataset consists of ( context , question , answer ) triples where the context is an initial textual context, question is the clarification question that asks about some missing information in the context and answer is the answer to the clarification question (details in  3.1). Representationally, our question generator is a standard sequence-to-sequence model with attention (  2.1). The learning problem is: how to train the sequence-to-sequence model to generate good clarification questions. An overview of our training setup is shown in Figure 3. Given a context, our question generator, which is a sequence-to-sequence model, outputs a question. In order to evaluate the usefulness of this question, we then have a second sequence-to-sequence model called the answer generator that generates a hypothetical answer based on the context and the question (  2.5). This (context, generated question and generated answer) triple is fed into a UTILITY calculator, whose initial goal is to estimate the probability that this (ques-tion, answer) pair is useful in this context (  2.3). This UTILITY is treated as a reward, which is used to update the question generator using the MIXER (Ranzato et al., 2015) algorithm (  2.2). Finally, we reinterpret the answer-generator-plus-utility-calculator component as a discriminator for differentiating between (context, true question, generated answer) triples and (context, generated question, generated answer) triples , and optimize the generator for this adversarial objective using MIXER (  2.4). We use a standard attention based sequence-to-sequence model (Luong et al., 2015) for our question generator. Given an input sequence (context) c = ( c 1 , c 2 , ..., c N ) , this model generates an output sequence (question) q = ( q 1 , q 2 , ..., q T ) . The architecture of this model is an encoder-decoder with attention. The encoder is a recurrent neural network (RNN) operating over the input word embeddings to compute a source context representation  c . The decoder uses this source representation to generate the target sequence one word at a time: p ( q |  c ) = T (cid:89) t =1 p ( q t | q 1 , q 2 , ..., q t  1 ,  c t ) = T (cid:89) t =1 softmax ( W s  h t ) ; where  h t = tanh ( W c [ c t ; h t ]) (1) In Eq 1,  h t is the attentional hidden state of the RNN at time t and W s and W c are parameters of the model. 3 The predicted token q t is the token in the vocabulary that is assigned the highest probability using the softmax function. The standard training objective for sequence-to-sequence model is to maximize the log-likelihood of all ( c, q ) pairs in the training data D which is equivalent to minimizing the following loss, L mle ( D ) =  (cid:88) ( c,q )  D T (cid:88) t =1 log p ( q t | q 1 , ..., q t  1 ,  c t ) (2) 3 Details are in Appendix A. Figure 3: Overview of our GAN-based clarification question generation model (refer preamble of  2) 2.2 Training the Generator to Optimize UTILITY Training sequence-to-sequence models for the task of clarification question generation (with context as input and question as output) using maximum likelihood objective unfortunately leads to the generation of highly generic questions, such as What are the dimensions? when asking questions about home appliances. Recently, Rao and Daume III (2018) observed that the usefulness of a question can be better measured as the utility that would be obtained if the context were updated with the answer to the proposed question. Following this observation, we first use a pretrained answer generator (  2.5) to generate an answer given a context and a question. We then use a pretrained UTILITY calculator (  2.3 ) to predict the likelihood that the generated answer would increase the utility of the context by adding useful information to it. Finally, we train our question generator to optimize this UTILITY based reward. Similar to optimizing metrics like BLEU and ROUGE , this UTILITY calculator also operates on discrete text outputs, which makes optimization difficult due to non-differentiability. A successful recent approach dealing with the non-differentiability while also retaining some advantages of maximum likelihood training is the Mixed Incremental Cross-Entropy Reinforce (Ranzato et al., 2015) algorithm (MIXER ). In MIXER , the overall loss L is differentiated as in REINFORCE (Williams, 1992): L (  ) =  E q s  p  r ( q s ) ;   L (  ) =  E q s  p  r ( q s )   log p  ( q s ) (3) where q s is a random output sample according to the model p  and  are the parameters of the network. The expected gradient is then approximated using a single sample q s = ( q s 1 , q s 2 , ..., q s T ) from the model distribution ( p  ). In REINFORCE , the policy is initialized randomly, which can cause long convergence times. To solve this, MIXER starts by optimizing maximum likelihood for the initial  time steps, and slowly shifts to optimizing the expected reward from Eq 3 for the remaining ( T  ) time steps. In our model, for the initial  time steps, we minimize L mle and for the remaining steps, we minimize the following UTILITY -based loss: L max-utility =  ( r ( q p )  r ( q b )) T (cid:88) t =1 log p ( q t | q 1 , ..., q t  1 ,  c t ) (4) where r ( q p ) is the UTILITY based reward on the predicted question and r ( q b ) is a baseline reward introduced to reduce the high variance otherwise observed when using REINFORCE . To estimate this baseline reward, we take the idea from the self-critical training approach Rennie et al. (2017) where the baseline is estimated using the reward obtained by the current model under greedy decoding during test time. We find that this approach for baseline estimation stabilizes our model better than the approach used in MIXER . Given a (context, question, answer) triple, Rao and Daume III (2018) introduce a utility calculator UTILITY ( c, q, a ) to calculate the value of updating a context c with the answer a to a clarification question q . They use the utility calculator to estimate the probability that an answer would be a meaningful addition to a context. They treat this as a binary classification problem where the positive instances are the true (context, question, answer) triples in the dataset whereas the negative instances are contexts paired with a random (ques-tion, answer) from the dataset. Following Rao and Daume III (2018), we model our UTILITY calculator by first embedding the words in c and then using an LSTM (long-short term memory) (Hochre-iter and Schmidhuber, 1997) to generate a neural representation  c of the context by averaging the output of each of the hidden states. Similarly, we obtain neural representations  q and  a of q and a respectively using a question and an answer LSTM models. Finally, we use a feed forward neural network FUTILITY ( c,  q,  a ) to predict the usefulness of the question. The UTILITY calculator trained on true vs random samples from real data (as described in the previous section) can be a weak reward signal for questions generated by a model due to the large discrepancy between the true data and the model's outputs. In order to strengthen the reward signal, we reinterpret the UTILITY calculator (coupled with the answer generator) as a discriminator in an adversarial learning setting. That is, instead of taking the UTILITY calculator to be a fixed model that outputs the expected quality of a (question, answer) pair, we additionally optimize it to distinguish between true (question, answer) pairs and model-generated ones. This reinterpretation turns our model into a form of a generative adversarial network (GAN) (Goodfellow et al., 2014). GAN is a training procedure for generative models that can be interpreted as a game between a generator and a discriminator. The generator is a model g  G that produces outputs (in our case, questions). The discriminator is another model d  D that attempts to classify between true outputs and model-generated outputs. The goal of the generator is to generate data such that it can fool the discriminator; the goal of the discriminator is to be able to successfully distinguish between real and generated data. In the process of trying to fool the discriminator, the generator produces data that is as close as possible to the real data distribution. where x is sampled from the true data distribution  p , and z is sampled from a prior defined on input noise variables p . Although GANs have been successfully used for image tasks, training GANs for text generation is challenging due to the discrete nature of outputs in text. The discrete outputs from the generator make it difficult to pass the gradient update from the discriminator to the generator. Recently, Yu et al. (2017) proposed a sequence GAN model for text generation to overcome this issue. They treat their generator as an agent and use the discriminator as a reward function to update the generative model using reinforcement learning techniques. Our GAN-based approach is inspired by this sequence GAN model with two main mod-ifications: a) We use MIXER algorithm as our generator (  2.2) instead of a purely policy gradient approach; and b) We use UTILITY calculator (  2.3) as our discriminator instead of a convolutional neural network (CNN). Theoretically, the discriminator should be trained using (context, true question, true answer) triples as positive instances and (context, generated question, generated answer) triples as the negative instances. However, we find that training a discriminator using such positive instances makes it very strong since the generator would have to not only generate real looking questions but also generate real looking answers to fool the discriminator. Since our main goal is question generation and since we use answers only as latent variables, we instead use (context, true question, generated answer ) as our positive instances where we use the pretrained answer generator to get the generated answer for the true question. Formally, our objective function is: LGAN-U ( U , M ) = max u U min m M E q   p log u ( c, q, A ( c, q ))+ E c   p log(1  u ( c, m ( c ) , A ( c, m ( c )))) (6) where U is the UTILITY discriminator, M is the MIXER generator,  p is our data of (context, question, answer) triples and A is the answer generator. (  2.1) to maximize the log-likelihood of all (con-text, question) pairs in the training data. Parameters of this model are updated during adversarial training. Answer Generator. We pretrain our answer generator using the sequence-to-sequence model (  2.1) to maximize the log-likelihood of all ([con-text+question], answer) pairs in the training data. Parameters of this model are kept fixed during the adversarial training. 4 Discriminator. In our UTILITYGAN model (  2.4), the discriminator is trained to differentiate between true and generated questions. However, since we want to guide our UTILITY based discriminator to also differentiate between true (good) and random (bad) questions, we pretrain our discriminator in the same way we trained our UTILITY calculator. For positive instances, we use a context and its true question, answer from the training data and for negative instances, we use the same context but randomly sample a question from the training data (and use the answer paired with that random question). We base our experimental design on the following research questions: 1. Do generation models outperform simpler retrieval baselines? 2. Does optimizing the UTILITY reward improve over maximum likelihood training? 3. Does using adversarial training improve over optimizing the pretrained UTILITY ? 4. How do the models perform when evaluated for nuances such as specificity & usefulness? We evaluate our model on two datasets. Amazon. In this dataset, context is a product description on amazon.com combined with the product title, question is a clarification question asked to the product and answer is the seller's (or other users') reply to the question. To obtain these data triples, we combine the Amazon question-answering dataset (McAuley and Yang, 2016) with the Amazon reviews dataset (McAuley et al., 2015). We show results on the Home & Kitchen category of this dataset since it contains a large number of questions and is relatively 4 We leave the experimentation of updating parameters of answer generator during adversarial training to future work. easier for human-based evaluation. It consists of 19 , 119 training, 2 , 435 tune and 2 , 305 test examples (product descriptions), with 3 to 10 questions (average: 7) per description. Stack Exchange. In this dataset, context is a post on stackexchange.com combined with the title, question is a clarification question asked in the comments section of the post and answer is either the update made to the post in response to the question or the author's reply to the question in the comments section. Rao and Daume III (2018) cu-rated a dataset of 61 , 681 training, 7 , 710 tune and 7 , 709 test such triples from three related subdomains on stackexchage.com (askubuntu, unix and superuser). Additionally, for 500 instances each from the tune and the test set, their dataset includes 1 to 6 other questions identified as valid questions by expert human annotators from a pool of candidate questions. We compare three variants (ablations) of our proposed approach, together with an information retrieval baseline: GAN-Utility is our full model which is a UTILITY calculator based GAN training (  2.4) including the UTILITY discriminator and the MIXER question generator. 5 Max-Utility is our reinforcement learning baseline where the pretrained question generator model is further trained to optimize the UTILITY reward (  2.2) without the adversarial training. MLE is the question generator model pretrained on context, question pairs using maximum likelihood objective (  2.1). Lucene 6 is our information retrieval baseline similar to the Lucene baseline described in Rao and Daume III (2018). Given a context in the test set, we use Lucene, which is a TF-IDF based document ranker, to retrieve top 10 contexts that are most similar to the given context in the train set. We randomly choose a question from the human written questions paired with these 10 contexts in the train set to construct our Lucene baseline 7 . 7 For the Amazon dataset, we ignore questions asked to products of the same brand as the given product since Amazon replicates questions across same brand allowing the true question to be included in that set. the proportion of unique trigrams in the output to measure the diversity as commonly used to evaluate dialogue generation (Li et al., 2016b). BLEU (Papineni et al., 2002) 8 , which evaluates n-gram precision between the output and the references. METEOR (Banerjee and Lavie, 2005), which is similar to BLEU but includes stemmed and synonym matches to measure similarity between the output and the references. We use Figure-Eight 9 , a crowdsourcing platform, to collect human judgements. Each judgement 10 consists of showing the crowdworker a context and a generated question and asking them to evaluate the question along following axes: Relevance : We ask Is the question on topic? and let workers choose from: Yes (1) and No (0) Grammaticality : We ask Is the question gram-matical? and let workers choose from: Yes (1) and No (0) Seeking new information : We ask Does the question ask for new information currently not included in the description? and let workers choose from: Yes (1) and No (0) Specificity : We ask How specific is the ques-tion? and let workers choose from: 4: Specific pretty much only to this product (or same product from different manufacturer) 3: Specific to this and other very similar products 2: Generic enough to be applicable to many other products of this type 1: Generic enough to be applicable to any product under Home and Kitchen 0: N/A (Not applicable) i.e. Question is not on topic OR is incomprehensible Usefulness : We ask How useful is the question to a potential buyer (or a current user) of the prod-uct? and let workers choose from: 8 https://github.com/moses-smt/ mosesdecoder/blob/master/scripts/ generic/multi-bleu.perl 9 https://www.figure-eight.com 10 We paid crowdworkers 5 cents per judgment and collected five judgments per question. 4: Useful enough to be included in the product description 3: Useful to a large number of potential buyers (or current users) 2: Useful to a small number of potential buyers (or current users) 1: Useful only to the person asking the question 0: N/A (Not applicable) i.e. Question is not on topic OR is incomprehensible OR is not seeking new information 3.3.3 Inter-annotator Agreement Table 1 shows the inter-annotator agreement (re-ported by Figure-Eight as confidence 11 ) on each of the above five criteria. Agreement on Relevance , Grammaticality and Seeking new information is high. This is not surprising given that these criteria are not very subjective. On the other hand, the agreement on usefulness and specificity is quite moderate since these judgments can be very subjective. Since the inter-annotator agreement on the usefulness criteria was particularly low, in order to reduce the subjectivity involved in the fine grained annotation, we convert the range [0-4] to a more coarse binary range [0-1] by mapping the scores 4 and 3 to 1 and the scores 2, 1 and 0 to 0 . Table 2 shows the results on the two datasets when evaluated according to automatic metrics. In the Amazon dataset, GAN-Utility outperforms all ablations on DIVERSITY , suggesting that it produces more diverse outputs. Lucene, on the other hand, has the highest DIVERSITY since it consists of human written questions, which tend to be more diverse because they are much longer compared to model generated questions. This comes at the cost of lower match with the reference as visible in the BLEU and METEOR scores. In terms of BLEU and METEOR , there is inconsistency. Although GAN-Utility outperforms all baselines according to METEOR , the fully ablated MLE model has a higher BLEU score. This is because BLEU score looks for exact n-gram matches and since MLE produces more generic outputs, it is much more likely that it will match one of 10 references compared to the specific/diverse outputs of GAN-Utility, since one of those ten is highly likely to itself be generic. In the StackExchange dataset GAN-Utility outperforms all ablations on both BLEU and METEOR . Unlike in the Amazon dataset, MLE does not outperform GAN-Utility in BLEU . This is because the MLE outputs in this dataset are not as generic as in the amazon dataset due to the highly technical nature of contexts in StackExchange. As in the Amazon dataset, GAN-Utility outperforms MLE on DIVERSITY . Interestingly, the Max-Utility ablation achieves a higher DIVERSITY score than GAN-Utility. On manual analysis we find that Max-Utility produces longer outputs compared to GAN-Utility but at the cost of being less grammatical. Table 3 shows the numeric results of human-based evaluation performed on the reference and the system outputs on 300 random samples from the test set of the Amazon dataset. 12 All approaches produce relevant and grammatical questions. All models are all equally good at seeking new information, but are weaker than Lucene, which performs better at seeking new information but at the 12 We could not ask crowdworkers evaluate the StackExchange data due to its highly technical nature. cost of much lower specificity and lower usefulness. Our full model, GAN-Utility, performs signifi-cantly better at the usefulness criteria showing that the adversarial training approach generates more useful questions. Interestingly, all our models produce questions that are more useful than Lucene and Reference, largely because Lucene and Reference tend to ask questions that are more often useful only to the person asking the question, making them less useful for potential other buyers (see Figure 4). GAN-Utility also performs signifi-cantly better at generating questions that are more specific to the product (see details in Figure 5), which aligns with the higher DIVERSITY score obtained by GAN-Utility under automatic metric evaluation. Table 5 contains example outputs from different models along with their usefulness and specificity scores. MLE generates questions such as is it waterproof? and what is the wattage? , which are applicable to many other products. Whereas our GAN-Utility model generates more specific question such as is this shower curtain mildew resistant? . Appendix C includes further analysis of system outputs on both Amazon and Stack Exchange datasets. Question Generation. Most previous work on question generation has been on generating reading comprehension style questions i.e. questions that ask about information present in a given text (Heilman, 2011; Rus et al., 2010, 2011; Duan et al., 2017). Our goal, on the other hand, is to generate questions whose answer cannot be found Model Relevant [0-1] Grammatical [0-1] New Info [0-1] Useful [0-1] Specific [0-4] Reference 0.96 0.99 0.93 0.72 3.38 Lucene 0.90 0.99 0.95 0.68 2.87 MLE 0.92 0.96 0.85 0.91 3.05 Max-Utility 0.93 0.96 0.88 0.91 3.29 GAN-Utility 0.94 0.96 0.87 0.96 3.52 Table 3: Results of human judgments on model generated questions on 300 sample Home & Kitchen product descriptions. in the given text. Outside reading comprehension questions, Liu et al. (2010) use templated questions to help authors write better related work sections whereas we generate questions to fill information gaps. Labutov et al. (2015) use crowdsourcing to generate question templates whereas we learn from naturally occurring questions. Mostafazadeh et al. (2016, 2017) generate natural and engaging questions, given an image (and some initial text). Whereas, we generate questions specifically for identifying missing information. Stoyanchev et al. (2014) generate clarification questions to resolve ambiguity caused by speech recognition failures during dialog, whereas we generate clarification questions to resolve ambiguity caused by missing information. The recent work most relevant to our work is by Rao and Daume III (2018). They build a model which given a context and a set of candidate clarification questions, ranks them in a way that more useful clarification questions would be higher up in the ranking. In our work, we build on their ideas to propose a model that generates (instead of ranking) clarification questions given a context. Neural Models and Adversarial Training for Text Generation. Neural network based models have had significant success at a variety of text generation tasks, including machine translation (Bahdanau et al., 2015; Luong et al., 2015), summarization (Nallapati et al., 2016), dialog (Bor-des et al., 2016; Li et al., 2016a; Serban et al., 2017), textual style transfer (Jhamtani et al., 2017; Rao and Tetreault, 2018) and question answering (Yin et al., 2016; Serban et al., 2016). Our task is most similar to dialog, in which a wide variety of possible outputs are acceptable, and where lack of specificity in generated outputs is common. We addresses this challenge using an adversarial network approach (Goodfellow et al., 2014), a training procedure that can generate natural-looking outputs, which have been effective for natural image generation (Denton et al., 2015). Due to the challenges in optimizing over discrete output spaces like text, Yu et al. (2017) introduced a Seq(uence)GAN approach where they overcome this issue by using REINFORCE to optimize. Our GAN-Utility model is inspired by the SeqGAN model where we replace their policy gra-Title Raining Cats and Dogs Vinyl Bathroom Shower Curtain Product This adorable shower curtain measures 70 by 72 Description inches and is sure to make a great gift! dient based generator with a MIXER model and their CNN based discriminator with our UTILITY calculator. Li et al. (2017) train an adversarial model similar to SeqGAN for generating next utterance in a dialog given a context. However, unlike our work, their discriminator is a binary clas-sifier trained only to distinguish between human and machine generated utterances. In this work, we describe a novel approach to the problem of clarification question generation. We use the observation of Rao and Daume III (2018) that the usefulness of a clarification question can be measured by the value of updating a context with an answer to the question. We use a sequence-to-sequence model to generate a question given a context and a second sequence-to-sequence model to generate an answer given the context and the question. Given the (context, generated question, generated answer) triple, we calculate the utility of this triple and use it as a reward to retrain the question generator using reinforcement learning based MIXER model. Further, to improve upon the utility calculator, we reinterpret it as a discriminator in an adversarial setting and train both the utility calculator and the MIXER model in a minimax fashion. We find that our adversarial training approach produces more useful and specific questions compared to both a model trained using maximum likelihood objective and a model trained using utility reward based reinforcement learning. There are several avenues of future work. Following Mostafazadeh et al. (2016), we could combine text input with image input in the Amazon dataset (McAuley and Yang, 2016) to generate more relevant and useful questions. One significant research challenge in the space of free text generation problems when the set of possible outputs is large, is that of automatic evaluation (Lowe et al., 2016): in our results we saw some correlation between human judgments and automatic metrics, but not enough to trust the automatic metrics completely. Lastly, we hope to integrate such a question generation model into a real world platform like StackExchange or Amazon to understand the real utility of such models and to unearth additional research questions. We thank the three anonymous reviewers for their helpful comments and suggestions. We also thank the members of the Computational Linguistics and Information Processing (CLIP) lab at University of Maryland for helpful discussions. This work was supported by NSF grant IIS-1618193. Any opinions, findings, conclusions, or recommendations expressed here are those of the authors and do not necessarily reflect the view of the sponsors.
objective objective objective result abstain abstain method method abstain abstain objective result objective method result method objective result other objective abstain abstain abstain result method abstain abstain objective method abstain abstain abstain other abstain other abstain objective method method abstain abstain other abstain abstain abstain result result result abstain abstain abstain abstain abstain method abstain abstain method abstain abstain method abstain abstain abstain abstain abstain abstain abstain abstain abstain method method abstain abstain abstain other abstain abstain abstain method abstain abstain method method method abstain abstain abstain abstain abstain abstain abstain abstain result result abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain other other abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain abstain result abstain abstain abstain abstain result result abstain abstain abstain abstain abstain other other other other method method other method method abstain other objective other other method method other method abstain other method objective method method method result objective abstain method result abstain other other other other