Venue: NAACL 2019

# Answer-based Adversarial Training for

Generating Clarification Questions

 Sudha Rao

Microsoft Research, Redmond

Sudha.Rao@microsoft.com &Hal Daume III

University of Maryland, College Park

Microsoft Research, New York City

me@hal3.name

This research performed when the author was still at University of Maryland, College Park.

###### Abstract

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.

## 1 Introduction

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 [20]; in cases of gaps or mismatches in knowledge, we tend to ask questions [5]. 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 [46, 78, 9]. Unfortunately, training a sequence-to-sequence model directly on (context, question) pairs yields questions that are highly generic1, corroborating a common finding in dialog systems [15]. Our goal is to be able to generate clarification questions that are useful _and_ specific.

Footnote 1: For instance, under home appliances, frequently asking “Is it made in China?” or “What are the dimensions?”

To achieve this, we begin with a recent observation of rao2018deep, 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 (SS2.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 [1] for text [23], wherein the utility calculator plays the role of the "discriminator" and the question generator is the "generator" (SS2.2), which we train using the Mixer algorithm [26]. 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 Footnote 2: Code and data: [https://github.com/raosudin89/clarification_question_generation_pytorch](https://github.com/raosudin89/clarification_question_generation_pytorch)
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.





## 2 Training a Clarification Question Generator

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 SS 3.1). Representationally, our question generator is a standard sequence-to-sequence model with attention (SS2.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 (SS 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 (question, answer) pair is useful in this context (SS 2.3). This Utility is treated as a reward, which is used to update the question generator using the MixerRanzato et al. (2015) algorithm (SS 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 (SS2.4).

### Sequence-to-sequence Model for Question Generation

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 \(\tilde{c}\). The decoder uses this source representation to generate the target sequence one word at a time:

\[p(q|\tilde{c}) =\prod_{t=1}^{T}p(q_{t}|q_{1},q_{2},...,q_{t-1},\tilde{c_{t}}) \tag{1}\] \[=\prod_{t=1}^{T}\textit{softmax}(W_{s}\tilde{h}_{t})\quad;\] \[\text{where }\tilde{h}_{t} =\text{tanh}(W_{c}[\tilde{c_{t}};h_{t}])\]

In Eq 1, \(\tilde{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,

Footnote 3: Details are in Appendix A.

\[L_{\text{mle}}(D)=-\sum_{(c,q)\in D}\sum_{t=1}^{T}\log p(q_{t}| q_{1},...,q_{t-1},\tilde{c_{t}}) \tag{2}\]

Figure 1: Sample product description from Amazon paired with a clarification question and answer.

Figure 2: Sample post from stackexchange.com paired with a clarification question and answer.





### 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 (SS2.5) to generate an answer given a context and a question. We then use a pretrained Utility calculator (SS 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):

\[\begin{split} L(\theta)&=-\mathbb{E}_{q^{s}\sim p _{\theta}}r(q^{s})\quad;\\ \nabla_{\theta}L(\theta)&=-\mathbb{E}_{q^{s}\sim p _{\theta}}r(q^{s})\nabla_{\theta}\log p_{\theta}(q^{s})\end{split} \tag{3}\]

where \(q^{s}\) is a random output sample according to the model \(p_{\theta}\) and \(\theta\) 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_{\theta}\)). 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 \(\Delta\) time steps, and slowly shifts to optimizing the expected reward from Eq 3 for the remaining \((T-\Delta)\) time steps.

In our model, for the initial \(\Delta\) time steps, we minimize \(L_{\text{mle}}\) and for the remaining steps, we minimize the following Utility-based loss:

\[\small L_{\text{max-utility}}=-(r(q^{p})-r(q^{b}))\sum_{t=1}^{T}\log p(q_{t}| q_{1},...,q_{t-1},\hat{c}_{t}) \tag{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.

### Estimating Utility from Data

Given a (context, question, answer) triple, Rao and Daume III (2018) introduce a utility calculator \(\textsc{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

Figure 3: Overview of our GAN-based clarification question generation model (refer preamble of §2)

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 (question, 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) Hochreiter and Schmidhuber (1997) to generate a neural representation \(\bar{c}\) of the context by averaging the output of each of the hidden states. Similarly, we obtain neural representations \(\bar{q}\) and \(\bar{a}\) of \(q\) and \(a\) respectively using a question and an answer LSTM models. Finally, we use a feed forward neural network \(F_{\text{UTILITY}}(\bar{c},\bar{q},\bar{a})\) to predict the usefulness of the question.

### Utility GAN for Clarification Question Generation

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\in\mathcal{G}\) that produces outputs (in our case, questions). The discriminator is another model \(d\in\mathcal{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. Generically, the GAN objective is:

\[L_{\textsc{GAN}}(\mathcal{D},\mathcal{G})=\max_{d\in\mathcal{ D}}\min_{g\in\mathcal{G}} \mathbb{E}_{x\sim\hat{p}}\log d(x)+\\ \mathbb{E}_{z\sim p_{z}}\log(1-d(g(z))) \tag{5}\]

where \(x\) is sampled from the true data distribution \(\hat{p}\), and \(z\) is sampled from a prior defined on input noise variables \(p_{z}\).

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 modifications: a) We use Mixer algorithm as our generator (SS 2.2) instead of a purely policy gradient approach; and b) We use Utility calculator (SS 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:

\[L_{\textsc{GAN-U}}(\mathcal{U},\mathcal{M})= \max_{u\in\mathcal{U}}\min_{m\in\mathcal{M}}\mathbb{E}_{q\sim \hat{p}}\log u(c,q,\mathcal{A}(c,q))+ \tag{6}\] \[\mathbb{E}_{c\sim p}\log(1-u(c,m(c),\mathcal{A}(c,m(c))))\]

where \(\mathcal{U}\) is the Utility discriminator, \(\mathcal{M}\) is the Mixer generator, \(\hat{p}\) is our data of (context, question, answer) triples and \(\mathcal{A}\) is the answer generator.

### Pretraining Question Generator.

We pretrain our question generator using the sequence-to-sequence model 

(SS2.1) to maximize the log-likelihood of all (context, 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 (SS2.1) to maximize the log-likelihood of all ([context+question], answer) pairs in the training data. Parameters of this model are kept fixed during the adversarial training.4

Footnote 4: We leave the experimentation of updating parameters of answer generator during adversarial training to future work.

**Discriminator.** In our Utility GAN model (SS 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).

## 3 Experimental Results

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?

### Datasets

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 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) curated a dataset of \(61,681\) training, \(7,710\) tune and \(7,709\) test such triples from three related subdomains on stackexchange.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.

### Baselines and Ablated Models

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 (SS2.4) including the Utility discriminator and the Mixer question generator.5

Footnote 5: Experimental details are in Appendix B.

**Max-Utility** is our reinforcement learning baseline where the pretrained question generator model is further trained to optimize the Utility reward (SS2.2) without the adversarial training.

**MLE** is the question generator model pretrained on context, question pairs using maximum likelihood objective (SS2.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 baseline7.

 



### Evaluation Metrics

We evaluate initially with automated evaluation metrics, and then more substantially with crowdsourced human judgments.

#### 3.3.1 Automatic Metrics

**Diversity**, which calculates the proportion of unique trigrams in the output to measure the diversity as commonly used to evaluate dialogue generation Li et al. (2016).

BleuPapineni et al. (2002)8, which evaluates n-gram precision between the output and the references.

Footnote 8: [https://github.com/moses-smt/mosesdecoder/blob/master/scripts/generic/multi-bleu.perl](https://github.com/moses-smt/mosesdecoder/blob/master/scripts/generic/multi-bleu.perl)

MeteorBanerjee and Lavie (2005), which is similar to Bleu but includes stemmed and synonym matches to measure similarity between the output and the references.

#### 3.3.2 Human Judgements

We use Figure-Eight9, a crowdsourcing platform, to collect human judgements. Each judgement10 consists of showing the crowdworker a context and a generated question and asking them to evaluate the question along following axes:

Footnote 10: We paid crowdworkers 5 cents per judgment and collected five judgments per question.

RelevanteWe ask _"Is the question on topic?"_ and let workers choose from: Yes (1) and No (0)

GrammaticalityWe ask _"Is the question grammatical?"_ and let workers choose from: Yes (1) and No (0)

Seeking new informationWe ask _"Does the question ask for new information currently not included in the description?"_ and let workers choose from: Yes (1) and No (0)

SpecificWe ask _"How specific is the question?"_ and let workers choose from:

* Specific pretty much only to this product (or same product from different manufacturer)
* Specific to this and other very similar products
* Generic enough to be applicable to many other products of this type
* Generic enough to be applicable to any product under Home and Kitchen
* N/A (Not applicable) i.e. Question is not on topic OR is incomprehensible

UsefulnessWe ask _"How useful is the question to a potential buyer (or a current user) of the product?"_ and let workers choose from:

* Useful enough to be included in the product description
* Useful to a large number of potential buyers (or current users)
* Useful to a small number of potential buyers (or current users)
* Useful only to the person asking the question
* 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 (reported by Figure-Eight as confidence11) on each of the above five criteria. Agreement on Relevance, Grammaticalityand 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.

Footnote 11: [https://success.figure-eight.com/hc/en-us/articles/201855939-How-to-Calculate-a-Confidence-Score](https://success.figure-eight.com/hc/en-us/articles/201855939-How-to-Calculate-a-Confidence-Score)

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 \({\bf 1}\) and the scores 2, 1 and 0 to \({\bf 0}\).

### Automatic Metric Results

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 Diversitysince 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 Meteorscores.

\begin{table}
\begin{tabular}{p{71.1pt} p{142.3pt}}
**Criteria** & **Agreement** \\ \hline Relevance & 0.92 \\ Grammaticality & 0.92 \\ Seeking new information & 0.84 \\ Usefulness & 0.65 \\ Specificity & 0.72 \\ \end{tabular}
\end{table}
Table 1: Inter-annotator agreement on the five criteria used in human-based evaluation.



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.

### Human Judgements Analysis

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 cost of much lower specificity and lower usefulness.

Footnote 12: We could not ask crowdworkers evaluate the StackExchange data due to its highly technical nature.

Our full model, GAN-Utility, performs significantly 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 significantly 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.

## 4 Related Work

**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

\begin{table}
\begin{tabular}{l c c|c c c c} \hline \hline  & \multicolumn{3}{c|}{Amazon} & \multicolumn{3}{c}{StackExchange} \\ Model & Diversity & Bleu & Meteor & Diversity & Bleu & Meteor \\ \hline Reference & 0.6934 & — & — & 0.7509 & — & — \\ Lucene & 0.6289 & 4.26 & 10.85 & 0.7453 & 1.63 & 7.96 \\ \hline MLE & 0.1059 & **17.02** & 12.72 & 0.2183 & 3.49 & 8.49 \\ Max-Utility & 0.1214 & 16.77 & 12.69 & **0.2508** & 3.89 & 8.79 \\ GAN-Utility & **0.1296** & 15.20 & **12.82** & 0.2256 & **4.26** & **8.99** \\ \hline \hline \end{tabular}
\end{table}
Table 2: Diversity as measured by the proportion of unique trigrams in model outputs. Bigrams and unigrams follow similar trends. Bleu and Meteor scores using up to 10 references for the Amazon dataset and up to six references for the StackExchange dataset. Numbers in bold are the highest among the models. All results for Amazon are on the entire test set whereas for StackExchange they are on the 500 instances of the test set that have multiple references.

 

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 Bordes 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

Figure 4: Human judgements on the usefulness criteria.

\begin{table}
\begin{tabular}{l c c c c c} \hline \hline Model & Relevant [9-1] & Grammatical [9-1] & New Info [9-1] & Useful [9-1] & Specific [9-4] \\ \hline Reference & 0.96 & 0.99 & 0.93 & 0.72 & 3.38 \\ \hline 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** \\ \hline \hline \end{tabular}
\end{table}
Table 3: Results of human judgments on model generated questions on 300 sample Home & Kitchen product descriptions. Numeric range corresponds to the options described in §3.3. The difference between the bold and the non-bold numbers is statistically significant with p <0.05. Reference is excluded in the significance calculation.

Figure 5: Human judgements on the specificity criteria.

 

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 classifier trained only to distinguish between human and machine generated utterances.

## 5 Conclusion

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.

## Acknowledgments

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.

\begin{table}
\begin{tabular}{l|c c|c} \hline Title & Raining Cats and Dogs Vinyl Bathroom **Shower Curtain** & \\ \hline Product Description & This adorable shower curtain measures 70 by 72 inches and is sure to make a great gift! & \\ \hline Reference & does the vinyl smells? & Usefulness [0–4] & Specificity [0–4] \\ Lucene & other than home sweet home, what other sayings on the curtain? & 3 & 4 \\ MLE & is it waterproof ? & 2 & 4 \\ Max-Utility & is this shower curtain mildew ? & 0 & 0 \\ GAN-Utility & is this shower curtain milder resistant ? & 4 & 4 \\ \hline Title & PURSONIC HF200 Pedestal **Bladeless Fan \& Humidifier** All-in-one & \\ \hline Product Description & The first blackless fan to incoporate a humidifier! This product operates solely as a fan, a humidifier or both simultaneously. Atomizing function via ultrasonic. 5.SL tank lasts up to 12 hours. & \\ \hline Reference & i can not get the humidified to work & Usefulness [0–4] & Specificity [0–4] \\ Lucene & does it come with the vent kit & 1 & 2 \\ MLE & what is the wattage of this fan ? & 3 & 3 \\ Max-Utility & is this battery operated ? & 4 & 2 \\ GAN-Utility & does this fan have an automatic shut off ? & 4 & 4 \\ \hline \end{tabular}
\end{table}
Table 4: Example outputs from each of the systems for two product descriptions along with the usefulness and the specificity score given by human annotators.

 



## References

* Bahdanau et al. (2015) Dzmitry Bahdanau, Kyunghyun Cho, and Yoshua Bengio. 2015. Neural machine translation by jointly learning to align and translate. In _ICLR_.
* Banerjee and Lavie (2005) Satanjeev Banerjee and Alon Lavie. 2005. Meteor: An automatic metric for mt evaluation with improved correlation with human judgments. In _Proceedings of the acl workshop on intrinsic and extrinsic evaluation measures for machine translation and/or summarization_, pages 65-72.
* Bordes et al. (2016) Antoine Bordes, Y-Lan Boureau, and Jason Weston. 2016. Learning end-to-end goal-oriented dialog. _arXiv preprint arXiv:1605.07683_.
* Denton et al. (2015) Emily L Denton, Soumith Chintala, Arthur Szlam, and Rob Fergus. 2015. Deep generative image models using a Laplacian pyramid of adversarial networks. In _Advances in Neural Information Processing Systems_, pages 1486-1494.
* Du et al. (2017) Xinya Du, Junru Shao, and Claire Cardie. 2017. Learning to ask: Neural question generation for reading comprehension. In _Proceedings of the 55th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_, volume 1, pages 1342-1352.
* Duan et al. (2017) Nan Duan, Duyu Tang, Peng Chen, and Ming Zhou. 2017. Question generation for question answering. In _Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing_, pages 866-874.
* Goodfellow et al. (2014) Ian Goodfellow, Jean Pouget-Abadie, Mehdi Mirza, Bing Xu, David Warde-Farley, Sherjil Ozair, Aaron Courville, and Yoshua Bengio. 2014. Generative adversarial nets. In _Advances in Neural Information Processing Systems_, pages 2672-2680.
* Graesser et al. (2008) Art Graesser, Vasile Rus, and Zhiqiang Cai. 2008. Question classification schemes. In _Proc. of the Workshop on Question Generation_.
* Grice (1975) H Paul Grice. 1975. Logic and conversation. _1975_, pages 41-58.
* Heilman (2011) Michael Heilman. 2011. _Automatic factual question generation from text_. Ph.D. thesis, Carnegie Mellon University.
* Hochreiter and Schmidhuber (1997) Sepp Hochreiter and Jurgen Schmidhuber. 1997. Long short-term memory. _Neural computation_, 9(8):1735-1780.
* Jhamtani et al. (2017) Harsh Jhamtani, Varun Gangal, Eduard Hovy, and Eric Nyberg. 2017. Shakeseparizing modern language using copy-enriched sequence to sequence models. In _Proceedings of the Workshop on Sytislistic Variation_, pages 10-19.
* Labutov et al. (2015) Igor Labutov, Sumit Basu, and Lucy Vanderwende. 2015. Deep questions without deep understanding. In _Proceedings of the 53rd Annual Meeting of the Association for Computational Linguistics and the 7th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_, volume 1, pages 889-898.
* Li et al. (2016a) Jiwei Li, Michel Galley, Chris Brockett, Georgios Spitihourakis, Jianfeng Gao, and Bill Dolan. 2016a. A persona-based neural conversation model. In _Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_, volume 1, pages 994-1003.
* Li et al. (2016b) Jiwei Li, Will Monroe, Alan Ritter, Dan Jurafsky, Michel Galley, and Jianfeng Gao. 2016b. Deep reinforcement learning for dialogue generation. In _Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing_, pages 1192-1202.
* Li et al. (2017) Jiwei Li, Will Monroe, Tianlin Shi, Sebastien Jean, Alan Ritter, and Dan Jurafsky. 2017. Adversarial learning for neural dialogue generation. In _Proceedings of the 2017 Conference on Empirical Methods in Natural Language Processing_, pages 2157-2169.
* Liu et al. (2010) Zhiyuan Liu, Wenyi Huang, Yabin Zheng, and Maosong Sun. 2010. Automatic keyphrase extraction via topic decomposition. In _Proceedings of the 2010 conference on empirical methods in natural language processing_, pages 366-376. Association for Computational Linguistics.
* Lowe et al. (2016) Ryan Lowe, Iulian V. Serban, Mike Noseworthy, Laurent Charlin, and Joelle Pineau. 2016. On the evaluation of dialogue systems with next utterance classification. In _SIGDIAL_.
* Luong et al. (2015) Thang Luong, Hieu Pham, and Christopher D Manning. 2015. Effective approaches to attention-based neural machine translation. In _Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing_, pages 1412-1421.
* McAuley et al. (2015) Julian McAuley, Christopher Targett, Qinfeng Shi, and Anton Van Den Hengel. 2015. Image-based recommendations on styles and substitutes. In _Proceedings of the 38th International ACM SIGIR Conference on Research and Development in Information Retrieval_, pages 43-52. ACM.
* McAuley and Yang (2016) Julian McAuley and Alex Yang. 2016. Addressing complex and subjective product-related queries with customer reviews. In _Proceedings of the 25th International Conference on World Wide Web_, pages 625-635. International World Wide Web Conferences Steering Committee.
* Mostafazadeh et al. (2017) Nasrin Mostafazadeh, Chris Brockett, Bill Dolan, Michel Galley, Jianfeng Gao, Georgios Spitihourakis, and Lucy Vanderwende. 2017. Image-grounded conversations: Multimodal context for natural question and response generation. In _Proceedings of the Eighth International Joint Conference on Natural Language Processing (Volume 1: Long Papers)_, volume 1, pages 462-472.



Nasrin Mostafazadeh, Ishan Misra, Jacob Devlin, Margaret Mitchell, Xiaodong He, and Lucy Vanderwerde. 2016. Generating natural questions about an image. In _Proceedings of the 54th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_, volume 1, pages 1802-1813.
* Nallapati et al. (2016) Ramesh Nallapati, Bowen Zhou, Cicero dos Santos, Caglar Gulcehre, and Bing Xiang. 2016. Abstractive text summarization using sequence-to-sequence rnns and beyond. In _Proceedings of The 20th SIGNLL Conference on Computational Natural Language Learning_, pages 280-290.
* Papineni et al. (2002) Kishore Papineni, Salim Roukos, Todd Ward, and Wei-Jing Zhu. 2002. Bleu: a method for automatic evaluation of machine translation. In _Proceedings of the 40th annual meeting on association for computational linguistics_, pages 311-318. Association for Computational Linguistics.
* Pennington et al. (2014) Jeffrey Pennington, Richard Socher, and Christopher Manning. 2014. Glove: Global vectors for word representation. In _Proceedings of the 2014 conference on empirical methods in natural language processing (EMNLP)_, pages 1532-1543.
* Ranzato et al. (2015) Marc'Aurelio Ranzato, Sumit Chopra, Michael Auli, and Wojciech Zaremba. 2015. Sequence level training with recurrent neural networks. _arXiv preprint arXiv:1511.06732_.
* Rao and Daume III (2018) Sudha Rao and Hal Daume III. 2018. Learning to ask good questions: Ranking clarification questions using neural expected value of perfect information. In _Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers)_, volume 1.
* Rao and Tetreault (2018) Sudha Rao and Joel Tetreault. 2018. Dear Sir or Madam, May I introduce the GYAFC Dataset: Corpus, Benchmarks and Metrics for Formality Style Transfer. In _HLT-NAACL_. The Association for Computational Linguistics.
* Rennie et al. (2017) Steven J Rennie, Etienne Marcheret, Youssef Mroueh, Jarret Ross, and Vaibhava Goel. 2017. Self-critical sequence training for image captioning. In _CVPR_, volume 1, page 3.
* Rus et al. (2010) Vasile Rus, Paul Piwek, Svetlana Stoyanchev, Brendan Wyse, Mihai Lintean, and Cristian Moldovan. 2011. Question generation shared task and evaluation challenge: Status report. In _Proceedings of the 13th European Workshop on Natural Language Generation_, pages 318-320. Association for Computational Linguistics.
* Rus et al. (2010) Vasile Rus, Brendan Wyse, Paul Piwek, Mihai Lintean, Svetlana Stoyanchev, and Cristian Moldovan. 2010. The first question generation shared task evaluation challenge. In _Proceedings of the 6th International Natural Language Generation Conference_, pages 251-257. Association for Computational Linguistics.
* Serban et al. (2016) Iulian Vlad Serban, Alessandro Sordoni, Yoshua Bengio, Aaron C Courville, and Joelle Pineau. 2016. Building end-to-end dialogue systems using generative hierarchical neural network models. In _AAAI_, volume 16, pages 3776-3784.
* Serban et al. (2017) Iulian Vlad Serban, Alessandro Sordoni, Ryan Lowe, Laurent Charlin, Joelle Pineau, Aaron C Courville, and Yoshua Bengio. 2017. A hierarchical latent variable encoder-decoder model for generating dialogues. In _AAAI_, pages 3295-3301.
* Stoyanchev et al. (2014) Svetlana Stoyanchev, Alex Liu, and Julia Hirschberg. 2014. Towards natural clarification questions in dialogue systems. In _AISB symposium on questions, discourse and dialogue_, volume 20.
* Sutskever et al. (2014) Ilya Sutskever, Oriol Vinyals, and Quoc V Le. 2014. Sequence to sequence learning with neural networks. In _Advances in Neural Information Processing Systems_, pages 3104-3112.
* Williams (1992) Ronald J Williams. 1992. Simple statistical gradient-following algorithms for connectionist reinforcement learning. _Machine learning_, 8(3-4):229-256.
* Williams and Zipser (1989) Ronald J Williams and David Zipser. 1989. A learning algorithm for continually running fully recurrent neural networks. _Neural computation_, 1(2):270-280.
* Yin et al. (2016) Jun Yin, Xin Jiang, Zhengdong Lu, Lifeng Shang, Hang Li, and Xiaoming Li. 2016. Neural generative question answering. In _Proceedings of the Twenty-Fifth International Joint Conference on Artificial Intelligence_, pages 2972-2978. AAAI Press.
* Yu et al. (2017) Lantao Yu, Weinan Zhang, Jun Wang, and Yong Yu. 2017. SeqGAN: Sequence generative adversarial nets with policy gradient. In _arxiv_.

## Appendix A Sequence-to-sequence model details

In this section, we describe some of the details of the attention based sequence-to-sequence model introduced in Section 2.1 of the main paper. In equation 1, \(\tilde{h}_{t}\) is the attentional hidden state of the RNN at time \(t\) obtained by concatenating the target hidden state \(h_{t}\) and the source-side context vector \(\tilde{c}_{t}\), and \(W_{s}\) is a linear transformation that maps \(h_{t}\) to an output vocabulary-sized vector. Each attentional hidden state \(\tilde{h}_{t}\) depends on a distinct input context vector \(\tilde{c}_{t}\) computed using a global attention mechanism over the input hidden states as:

\[\tilde{c}_{t} =\sum_{n=1}^{N}a_{nt}h_{n}\] (7) \[a_{nt} =\text{align}(h_{n},h_{t})\] (8) \[=\exp\Big{[}h_{t}^{T}W_{a}h_{n}\Big{]}\Big{/}\!\sum_{n^{\prime}} \exp\Big{[}h_{t}^{T}W_{a}h_{n^{\prime}}\Big{]}\] 

The attention weights \(a_{nt}\) is calculated based on the alignment score between the source hidden state \(h_{n}\) and the current target hidden state \(h_{t}\).

## Appendix B Experimental Details

In this section, we describe the details of our experimental setup.

We tokenize and lowercase all inputs (context, question and answers). We set the max length of context to be 100, question to be 20 and answer to be 20. We find that increasing the length of contexts (to 150 or 200) of question/answer (to 40) yields similar results according to automatic metrics with increased experimentation time.

Our sequence-to-sequence model (Section 2.1) operates on word embeddings which are pretrained on in domain data using Glove Pennington et al. (2014). As frequently used in previous work on neural network modeling, we use an embeddings of size 200 and a vocabulary with cut off frequency set to 10. During train time, we use teacher forcing Williams and Zipser (1989). During test time, we use beam search decoding with beam size 5.

We use a hidden layer of size two for both the encoder and decoder recurrent neural network models with size of hidden unit set to 100. We use a dropout of 0.5 and learning ratio of 0.0001. In the Mixer model, we start with \(\Delta=T\) and decrease it by 2 for every epoch (we found decreasing \(\Delta\) to 0 is ineffective for our task, hence we stop at 2).

## Appendix C Analysis of System Outputs

### Amazon Dataset

First half of Table 5 shows the system generated questions for three product descriptions in the Amazon dataset.

In the first example, the product is a shower curtain. The Reference question is specific and highly useful. Lucene, on the other hand, picks a moderately specific ("how to clean it?") but useful question. MLE model generates a generic but useful "is it waterproof?". Max-Utility generates comparatively a much longer question but in doing so loses out on relevance. This behavior of generating two unrelated sentences is observed quite a few times in both Max-Utility and GAN-Utility models. This suggests that these models, in trying to be very specific, end up losing out on relevance. In the same example, GAN-Utility also generates a fairly long question which, although awkwardly phrase, is quite specific and useful.

In the second example, the product is a Duvet Cover Set. Both Reference and Lucene questions here are examples of questions that are pretty much useful only to the person asking the question. We find many such questions in both Reference and Lucene outputs which is the main reason for the comparatively lower usefulness scores for their outputs. All three of our models generate irrelevant questions since the product description explicitly says that the set is full size.

In the last example, the product is a set of mapping clothes. Reference question is quite specific but has low usefulness. Lucene picks an irrelevant question. MLE and Max-Utility generate highly specific and useful questions. GAN-Utility generates an ungrammatical question by repeating the last word many times. We observe this behavior quite a few times in the outputs of both Max-Utility and GAN-Utility models suggesting that our sequence-to-sequence models are not very good at maintaining long range dependencies.

### Stack Exchange Dataset

Second half of Table 5 shows the system generated questions for three posts from the Stack Exchange dataset.

The first example is of a post where someone describes their issue of not being able to recover from their boot. Reference and Lucene questions are useful. MLE generates a generic question that is not very useful. Max-Utility generates a useful question but has slight unsgrammaticality in it. GAN-Utility, on the other hand, generates a specific and an useful question.

In the second example, again Reference and Lucene questions are useful. MLE generates a generic question. Max-Utility and GAN-Utility both generate fairly specific question but contain unknown tokens. The Stack Exchange dataset contains several technical terms leading to a long tail in the vocabulary. Owing to this, we find that both Max-Utility and GAN-Utility models generate many instances of questions with unknown tokens.

In the third example, the Reference question is very generic. Lucene asks a relevant question. MLE again generates a generic question. Both Max-Utility and GAN-Utility generate specific and relevant questions 



\begin{table}
\begin{tabular}{l l c c} \hline \multicolumn{4}{c}{**Amazon Dataset**} \\ \hline Title & Extra Wide **Shower Curtain** for a Clawfoot Tub/opaque with Magnets \\ \hline Description & Approximately 180” Wide 70" Long. Extra Wide to keep the water and heat in. & \\  & Opaque in color to let the light in. Can be used as a liner or the curtain itself. & \\ Reference & does this curtain come with hooks? & 4 & 4 \\ Lucene & how to clean it ? i had it over 10 months now . & 3 & 3 \\  & and some mildew grow on it & 1 & 2 \\ MLE & is it waterproof ? & 1 & 2 \\ Max-Utility & what is the diameter of the bottom of the shower ? & 0 & 0 \\  & i have a kohler shower curtain . & \\ GAN-Utility & does this curtain have suction feet on the bottom of the shower curtain ? & 3 & 4 \\ \hline Title & Chezmoi Collection 7-piece Chic Ruched White **Duvet Cover Set**, Full Size (with Throw Pillows) & \\ \hline Description & Create a world of romance with the elegantly-styled, ruching,and luxurious all white duvet cover set. & Usefulness [0–4] Specificity [0–4] \\ \hline Reference & How long will it take to ship this to my pin code? & 1 & 1 \\ Lucene & and can you use the duvet as is ? & 1 & 4 \\  & if not what shall i purchase to put in it for winter or fall ? & \\ MLE & what are the dimensions of the king size ? & 0 & 0 \\ Max-Utility & what are the dimensions of the king size ? & 0 & 0 \\ GAN-Utility & does the king size come with a duvet cover & 0 & 0 \\  & or do you have to buy a king duvet ? & \\ \hline Title & Microfiber 3-Pack, **Pro-Clean Mapping Cloths** for Braava Floor Mopping Robot & \\ \hline Description & Braavas textured Pro-Clean microfiber mopping cloths remove dirt and hair from your floors. The cloths & can be washed and used hundreds of times. They are compatible with all Braava models, including the Pro-Clean Reservoir Pad. Each cloth is easy to attach and remove from the magnetic cleaning pad. & \\ Reference & do i have to use a new cloth every time i want to clean my floor? & 2 & 4 \\ Lucene & go they remove pet odor ? & 0 & 0 \\ MLE & will these work with the scooba ? & 3 & 3 \\ Max-Utility & do these cloths work on hardwood floors ? & 3 & 4 \\ GAN-Utility & will this work with the scoobba mobg mpop mop mop mop mop mop & 0 & 0 \\ \hline \end{tabular}

* **StackExchange Dataset**
* Title & how can i recover my boot ?
* Post & since last week i am trying to recover my boot . after the last update for ubuntu 12.04 & i lost it and nobody could help me , i used boot-repair but there are problems with dependences , which can't be fix . i will be very grateful if somebody could help me .
* Reference & what happens when you try to boot ?
* Name & can you get into bios ?
* Name & may much ram do you have ?
* Name & do you have a swap partition partition ?
* Name & may not have been found into safe mode ?
* Name & may not have been found into safe mode ?