---
title: "Controllable Open-ended Question Generation with A New"
description: "Cao and Wang use question types, semantic graphs, and templates to control what open-ended questions ask about a passage."
canonical: "https://research.elamur.ai/free/en/papers/cao-2021-controllable-open-ended-question-generation/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/cao-2021-controllable-open-ended-question-generation/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2021](https://md.research.elamur.ai/free/en/papers/2021/) / Controllable Open-ended Question Generation with A New Question Type Ontology

# Controllable Open-ended Question Generation with A New Question Type Ontology

Paper · 2021 · Shuyang Cao and Lu Wang

**Authors:** [Shuyang Cao](https://md.research.elamur.ai/free/en/authors/shuyang-cao/) and [Lu Wang](https://md.research.elamur.ai/free/en/authors/lu-wang/) · **Year:** 2021 · **Venue:** Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers) · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/2021.acl-long.502/)
- [PDF](https://aclanthology.org/2021.acl-long.502.pdf)
- [DOI 10.18653/v1/2021.acl-long.502](https://doi.org/10.18653/v1/2021.acl-long.502)

## Summary

A passage can explain why something happens, describe what follows from it, and suggest what someone could do about it. Each of those details can support a different question. Cao and Wang study how to generate such questions from an existing answer, frequently a paragraph that a person wrote in an online discussion. Their aim is to give the question writer control over the kind of response a question calls for. An opening word provides only a partial guide. A question beginning with “what” might ask for a definition, an example, or a method. A request for a method might just as easily begin with “how.”

The authors develop an ontology, a set of named categories with definitions that distinguish what the answer is expected to do. Its 10 types include cause, consequence, comparison, and procedure. They use it to create a collection of 4,959 human-labeled questions. They also assemble two larger collections of question–answer pairs from Yahoo Answers and Reddit. Their main generator, JointGen, uses the requested type alongside the answer passage. It represents the passage both as a sequence of words and as a graph that connects words through grammatical and semantic relationships. The generator learns which parts of that graph are likely to supply the subject of a question and gives those parts more influence when composing it.

Two variants add a template between the category and the finished question. ExplGen selects an existing pattern. TplGen generates a pattern and then uses it to write the question. On the Yahoo test set, JointGen reaches a [BLEU-4 score](https://md.research.elamur.ai/free/en/concepts/bleu/) of 22.56 against 21.88 for plain BART. That score measures overlap with a reference question. JointGen leads the automatic reference comparisons on both datasets apart from METEOR on Reddit. Human judges also give it the highest answerability and scope scores among the generators assessed on each dataset. The templates yield the strongest control results. When the systems are asked for a range of types from the same passage, TplGen reaches type accuracy of 76.35 on Yahoo and 66.49 on Reddit, as judged by a question classifier.

Question quality and control come apart in these experiments. JointGen has the strongest overall reference scores, while the template variants more often produce the kind of question requested. Human judges also more often rank those variants highest for diversity in what the answers would need to say. The study distinguishes the ability to write a good question from the ability to write several good questions that ask the reader to do different things.

## Deep dive: Controllable Open-ended Question Generation with A New Question Type Ontology

Cao and Wang use question types, semantic graphs, and templates to control what open-ended questions ask about a passage. · about 38 minutes to read

**In this deep dive**

1. [The problem and its context](#dd-the-problem-and-its-context)
2. [The method, step by step](#dd-the-method-step-by-step)
3. [Experiments and results](#dd-experiments-and-results)
4. [What the ablations show](#dd-what-the-ablations-show)
5. [Limitations](#dd-limitations)
6. [What came after](#dd-what-came-after)

### The problem and its context

#### Asking from a passage that already contains an answer

The task begins with a piece of text. In the training material, that text is a human response to a question posted on a forum. The system sees the response and tries to write a question that it could answer. At test time, the original question serves as a reference and the generator works from the response. This reverses the direction familiar from [question answering](https://md.research.elamur.ai/free/en/concepts/question-answering/).

A passage frequently supports several questions. Consider the paper’s example of a response about teenagers joining gangs. The response discusses belonging, pressure from peers, and a sense of respect. Those details provide material for a question about why teenagers join. A request for ways to help someone leave a gang would put a different demand on the same passage. It would take more than the mention of gangs to make that question answerable. The generator has to pick a subject, decide what about it to ask, and stay within the evidence the passage supplies.

The authors motivate this work in part through education. A reader who can retrieve a name from a paragraph has demonstrated something different from a reader who can explain the relationship among several ideas in it. The paper also points to search and open-domain conversation, where asking a relevant follow-up can require more than locating a person, event, or date. These settings motivate the task. The experiments themselves concern forum responses and the questions that can be asked from them.

In the paper’s account, much earlier question-generation work concentrated on factoid questions. A short answer and its immediate surroundings can be useful guides when the question seeks a specific piece of information. An extended response makes the selection problem more prominent. Several sentences may contain plausible material, and the place where a concept first appears may give only part of the explanation. The system has to choose what deserves a question from a passage that may contain several related claims.

#### The gap between an interrogative word and a question type

A question word signals part of the structure of a question. “Why” commonly introduces a request for a reason, and “when” often directs attention to time. Those patterns make interrogative words convenient controls for [text generation](https://md.research.elamur.ai/free/en/topics/text-generation/). The paper’s concern is that the mapping between the opening word and the demand made of the answer is many-to-many. “What way” and “how” can both introduce a procedure. “What” can also ask someone to define a concept, describe a consequence, or give examples. Generating questions with different first words can leave their underlying requests mostly unchanged.

The authors use type to name the relationship between the question and the response it calls for. A comparison requests distinctions or similarities. A disjunctive question asks which of the options applies. Both can mention alternatives, yet answering a comparison requires saying something about how the alternatives relate. Similarly, a cause question looks towards what brought about an event, while a consequence question looks towards what resulted from it. The event may be the same in both questions. The direction of explanation changes.

Focus is a separate choice. In the forum example, peer pressure and belonging could each be a focus for a causal question. Conversely, questions about peer pressure could ask what it means, how it operates, or what follows from it. A useful system therefore has to select content in light of the intended type. Once it has made both choices, it still has to express the request in a well-formed question that the passage can address.

#### The approaches the paper builds on

Early question-generation approaches described by the authors applied grammatical transformations to statements. Later work learned to map sentences or paragraphs to questions and considered clues such as which material to ask about, what form the question should take, and how general or specific it should be. Some of these approaches directed generation towards the known answer through the training objective. The paper places these developments in the line of work represented by [Learning to Ask](https://md.research.elamur.ai/free/en/papers/du-2017-learning-ask-neural-question-generation/).

Graph representations were already used in work on questions that require combining information from different places in a text. Such representations give the generator access to connections among entities or words in addition to the linear order of the passage. Cao and Wang put two kinds of connections in the same graph and add an explicit estimate of which parts are likely to be the focus of the question. They also give the decoder distinct opportunities to consult the sequence and the graph.

Existing datasets helped make question generation a task that could be learned from examples. The paper describes heavily used resources such as [SQuAD](https://md.research.elamur.ai/free/en/papers/rajpurkar-2016-squad-100-000-questions-machine/) and [MS MARCO](https://md.research.elamur.ai/free/en/papers/bajaj-2016-ms-marco-human-generated/) as rich in factoid material. It identifies [ELI5](https://md.research.elamur.ai/free/en/papers/fan-2019-eli5-long-form-question-answering/) as a closer precedent because it also gathers extended answers from Reddit. Cao and Wang draw from several Reddit communities to cover a broader set of subject areas than ELI5, and collect a separate corpus from Yahoo Answers.

Question templates also had a precedent. The paper discusses earlier work that used manually constructed patterns for deeper questions and work that gathered patterns through crowdsourcing, with an ontology organized around topics. Cao and Wang organize their categories around what a question asks the respondent to do. They derive templates from questions in their training material, with some manual screening when assembling the exemplar inventory. Their diversity objective follows from that choice. Prior techniques such as replacing entities, sampling texts, and filtering outputs can vary words or phrasing. The authors ask whether a generator can reliably move between distinct kinds of inquiry about the same input.

### The method, step by step

#### From the answer passage to a finished question

JointGen receives an answer passage and a question type. It encodes the passage in its original sequence and also constructs a graph. The graph brings together words that are grammatically connected, participate in the same action or state, or refer to the same thing. A focus predictor scores the graph nodes. The question decoder then uses the passage representations and the graph representations, with the latter weighted by the focus scores. This arrangement lets the same encoded input support both content selection and question writing.

The two template variants address how the requested type is expressed. ExplGen supplies a reusable question pattern in addition to the answer and type. TplGen uses the same general machinery to produce a pattern, then passes that pattern into another generation stage to compose the final question. The figure follows the shared path and its optional template guidance. The type can be specified for a controlled generation run or inferred from the answer for ordinary test evaluation.

From an answer passage to an open-ended question The steps in order.

#### Defining what a question asks for

The ontology adapts an earlier set of 18 categories developed for assessing learning. The authors recruited 6 native English speakers and ran three rounds of annotation while refining the scheme. They adjusted definitions as the annotators encountered borderline cases, removed categories judged inapplicable, and merged categories that were hard to distinguish. For instance, they folded an initial expectation category into Cause because the questions treated under both labels sought causal explanations. The resulting 10 types are ordered in the paper by the kinds of cognition they call on.

Verification asks whether a claim about an event or concept holds. Disjunctive questions give alternatives and ask which is true or applies. Comparison may also present alternatives, but it asks how they differ, what they share, or which is better by some criterion. A passage could support a disjunctive question about which of two devices performs a function or a comparison about how the devices perform it. The category follows the task presented to the answerer.

Concept requests a definition or an explanation of what something is. Extent asks about matters such as size, amount, duration, or degree. Example asks for instances. The boundary between Concept and Example depends in part on the likely answer. A question about a class of restrictions might seek an account of what qualifies as a restriction or a list of the restrictions that apply. It can be hard to choose a label from the question alone.

Cause seeks a reason, and Consequence seeks an outcome. Procedural questions ask how an outcome can be achieved, including what steps, tools, or methods are involved. Judgmental questions seek the respondent’s own assessment or opinion. A question can concern a process while asking for a personal judgment about it. In that case the requested opinion, rather than the presence of a process in the subject matter, is the basis for the Judgmental label.

This scheme supplies labels for three distinct uses. It gives the annotators a way to categorize human questions, gives the generator an input that can be varied, and gives the evaluators a way to check whether the resulting question follows the requested type. In each role there can be a difference between the label a question receives and the information a reader would actually use to answer it. The option to record a second plausible label during annotation acknowledges that difference at the point where the training data are created.

#### Collecting the passages and questions

For Reddit, the authors use posts from r/AskHistorians, r/AskPolitics, r/askscience, r/explainlikeimfive, and r/AskReddit. The title of a post is used as the question. The selected reply is the answer with the highest karma, provided its karma is greater than 1. Karma here reflects the balance between upvotes and downvotes. Yahoo Answers L6 has a different signal for choosing the response. The person who posted the question designates its best answer.

The authors use rounds of human inspection to develop filtering rules and check randomly sampled records. Among other rules, a retained question must be a single sentence, end in a question mark, and start with a word on an allowed list. That list includes interrogatives, verbs used to form yes-or-no questions, and words that can introduce conditional or other question openings. The rules also exclude very short questions and questions containing links. These decisions create a corpus whose targets largely have a recognizable question form.

The answer filters encourage the inclusion of passages with substantive content. An answer with fewer than 15 content words is discarded. The paper also requires at least 2 overlapping content words between the question and the answer and rejects cases in which the answer has fewer content words than the question. Other rules screen for signs of poorly formed text, including sequences of punctuation, some capitalization patterns, and other features listed in the paper. These rules narrow what enters the dataset. For example, the overlap rule favors pairs in which the forum answer echoes some of the vocabulary in the question.

After filtering, Reddit contains 719,988 pairs and Yahoo contains 290,611. Both corpora use a 90%/5%/5% train, validation, and test split. The averages reported for Reddit are 14.5 for question length and 117.8 for answer length. The corresponding averages for Yahoo are 12.2 and 123.6. The length figures show the asymmetry at the center of the task. The writer has a comparatively long input and a short target, so producing the question involves selecting among details as well as deciding how to phrase it.

#### Turning human labels into training signals

Once the definitions were established, the authors sampled 5,000 questions from the forum training sets, using 2,500 from each source. Each question was assigned to two annotators. An annotator who was unsure could give two plausible types. Agreement could sometimes be found in the overlap between their choices. The annotators discussed outstanding disagreements, and examples without a resolution were removed. The final set has 4,959 questions. Example accounts for 23.4% of it, and Consequence for 2.6%. The paper reports a Krippendorff’s α of 0.67, a measure of agreement that takes into account how much agreement could occur by chance.

The labeled questions are divided into training, validation, and test sets for a question-side classifier. The authors call it γq. It reads a question and assigns probabilities to the types. A prediction layer uses the representation of the special beginning-of-sequence token, written `[BOS]`, produced by [RoBERTa](https://md.research.elamur.ai/free/en/papers/liu-2019-roberta-robustly-optimized-bert-pretraining/). That representation is contextual, meaning the surrounding input contributes to what it encodes. The prediction layer uses it as a representation from which to score the whole question.

The authors also need a way to select a type when only the answer is available. The answer-side classifier, γa, has the same general design but reads the answer passage. The authors train one version for Yahoo and another for Reddit. To expand the material used for this training, they apply γq to unlabeled questions and add examples for which its prediction confidence is above 0.9. The predicted label for the question then supplies a target for its paired answer. This is a form of automatic labeling in which a classifier trained on human examples extends the label set to a larger corpus.

The inputs to the two classifiers make an important difference. The question itself frequently reveals whether its author is asking for examples or reasons. A response can contain material for both. In the main generation test, the type-aware systems use the most confident type suggested by γa. In the control experiment, they receive several of its suggestions in separate runs. Once a generated question exists, γq can read it and assess which type it expresses. The paper thus uses the question classifier for both preparing labels and measuring type adherence, while the answer classifier proposes what kind of request to make.

#### Encoding the passage as text and as a graph

The starting point for JointGen is [BART](https://md.research.elamur.ai/free/en/papers/lewis-2020-bart-denoising-sequence-sequence-pre/), a pretrained sequence-to-sequence system. Its encoder reads the input and produces a representation at each position. Its decoder writes an output sequence conditioned on those representations. Here the answer and the requested type are among the encoder inputs. A representation for a passage word depends on the surrounding words, giving the decoder information about the particular sense or role it has in context.

The graph supplies another organization of the same words. The authors first use [dependency parsing](https://md.research.elamur.ai/free/en/concepts/dependency-parsing/) to identify grammatical links within each sentence. A dependency tree records which word depends on which other word. The parser is [Stanford CoreNLP](https://md.research.elamur.ai/free/en/papers/manning-2014-stanford-corenlp-natural-language-processing/). The authors remove a set of dependency links that they consider secondary for selecting the focus. For example, auxiliary and punctuation relations are discarded. The surviving graph edges are used without distinct labels for their grammatical relation types. That choice reduces the number of parameters needed to handle the connections.

A second source of links comes from [semantic role labeling](https://md.research.elamur.ai/free/en/concepts/semantic-role-labeling/). A predicate describes an action, event, or state, and its roles identify participants or other information associated with it. The authors use AllenNLP to find these structures. For each predicate and role, the graph connects the head of the predicate to the head of the role. The head is the main word used to represent that part of the structure. These links let the graph bring together words that are semantically related, including cases where the path through the dependency tree is indirect.

The graph must also represent a passage containing several sentences. The authors link the last token of each sentence to the first token of the next. They merge nodes that have the same surface form and also merge mentions identified as referring to the same entity through [coreference resolution](https://md.research.elamur.ai/free/en/concepts/coreference-resolution/). When several words or mentions are represented by a single node, connections from those occurrences can contribute to the same representation. This is one way the design makes a recurring concept visible across the passage.

These operations give the graph a specific meaning. An edge can originate in grammar, a predicate–role relation, or the rule for joining successive sentences. Merging can bring together repeated forms and linked mentions. The resulting connectivity is evidence the system can use to select a question focus. It is also a product of the particular construction rules. The decoder retains its access to the encoded text, where distinctions such as word order and the full wording of each sentence are available.

#### Updating graph nodes and scoring the focus

The paper names the answer input and the encoder output as follows.

```
x = {x₁, …, xₙ}
```

Here `x` is the input passage, `x₁` through `xₙ` are its tokens in order, and `n` is the number of passage tokens. The braces collect the tokens, while the ellipsis stands for the intervening positions. The type is written `t` and supplied alongside `x`.

```
H = {h₀, h₁, …, hₙ}
```

Here `H` collects the contextual vectors from the last encoder layer. The vector `h₀` represents the type `t`. Each remaining vector `hᵢ`, where `i` indexes a passage position, represents the corresponding token `xᵢ`. The ellipsis again stands for the intervening positions.

To initialize a graph node, the authors average the encoder vectors of the tokens that it represents. They append four bits describing how many nodes have been merged into it, with that count capped at 10. Averaging gives a single representation to a node with several token occurrences. The added bits give the network information about repetition that could otherwise be lost through the average.

The graph attention network updates each node from its neighbors. The paper uses `L = 2` layers. Its update rule is:

```
vᵢ⁽ˡ⁾ = ∑ⱼ∈Nᵢ aᵢ,ⱼ W⁽ˡ⁾ vⱼ⁽ˡ⁻¹⁾
```

The vector `vᵢ⁽ˡ⁾` represents node `i` after layer `l`, and `Nᵢ` is the set of its graph neighbors. The sum runs over the indices `j` in `Nᵢ`. The vector `vⱼ⁽ˡ⁻¹⁾` is neighbor `j`’s representation from the preceding layer. `W⁽ˡ⁾` is the learned transformation for the current layer. The attention coefficient `aᵢ,ⱼ` weights how much neighbor `j` contributes to node `i`. The graph attention network computes these weights from the representations it sees. The equation gives the update as a weighted combination of transformed neighboring vectors.

The last representation of each node is used to predict whether that node is part of the question focus.

```
p_focus(vᵢ = 1) = σ(W₁ tanh(W₂ vᵢ⁽ᴸ⁾))
```

Here `p_focus` is the predicted probability for the focus task. The notation `vᵢ = 1` denotes the positive focus label for node `i`. The input vector `vᵢ⁽ᴸ⁾` is that node’s representation after the final graph layer `L`. `W₂` transforms the input before the `tanh` nonlinearity. `W₁` maps the resulting representation to a score, and the sigmoid function `σ` converts the score to a probability. The paper omits bias terms in this equation.

The authors derive the training targets from the reference question. If a node contains words that are used in that question, it is treated as a focus node. The same question can therefore provide signals for several nodes. This links the focus task to material that the original question writer carried over from the answer. It is a readily available form of supervision for a corpus of question–answer pairs.

The predicted probability then becomes a gate, a scalar that adjusts the strength of the entire node vector.

```
gᵢ = p_focus(vᵢ = 1)
```

Here `gᵢ` is the gate for node `i`. The right side is the focus probability just defined, with `1` denoting that the node belongs to the focus.

```
vᵢ⁽ᴸ⁾′ = gᵢ vᵢ⁽ᴸ⁾
```

Here `vᵢ⁽ᴸ⁾′` is the weighted representation of node `i`, `vᵢ⁽ᴸ⁾` is its final graph vector before weighting, and multiplication by `gᵢ` scales the components of that vector together. A node with a high predicted focus probability retains more of its original magnitude. A smaller value weakens the representation passed to the decoder. The gate can emphasize more than one node, and intermediate scores allow the system to preserve weaker evidence.

#### Giving the decoder two sources of context

The decoder uses separate cross-attention operations for the input text and the graph. Cross-attention lets the decoder at its current position consult a collection of representations from another component. The paper follows the multi-head design of the [Transformer](https://md.research.elamur.ai/free/en/concepts/transformer/), in which the same operation can look for different relationships through several learned attention heads. In each decoder layer, the system first attends to the encoder’s sequence output.

```
zₑ = LN(zₛ + Attn(zₛ, H))
```

Here `zₛ` is the output of the decoder layer’s self-attention, which uses the question-side sequence available to that layer. `H` is the encoder’s representation of the type and the input text. `Attn` denotes multi-head attention. Its first argument provides the queries, and its second supplies the representations to consult. The plus sign adds the attention output to the incoming representation. `LN` is layer normalization, and `zₑ` is the resulting representation after consultation of the encoder sequence.

The next operation attends to the weighted graph nodes.

```
zᵥ = LN(zₑ + Attn(zₑ, V⁽ᴸ⁾′))
```

Here `V⁽ᴸ⁾′` is the collection of final graph node representations after focus weighting. The input `zₑ` comes from the preceding cross-attention, and `zᵥ` is the output of this step. `Attn` again denotes multi-head attention, with `zₑ` supplying the queries and the node collection supplying the material to consult. The addition retains the input to the operation, and `LN` normalizes the combined representation. By the time the decoder queries the graph, its representation has already incorporated information from the text.

The layer then applies a feed-forward transformation.

```
z′ = LN(zᵥ + FFN(zᵥ))
```

Here `FFN` is a feed-forward layer that transforms `zᵥ`, the representation from graph cross-attention. The transformation is added back to `zᵥ`, `LN` normalizes the result, and `z′` is the decoder layer’s output.

The generation objective and the focus prediction objective receive equal weight in training. Focus prediction is auxiliary in the sense that the finished output is a question, but its predictions are used inside the calculation that produces that output. The architecture connects the two tasks through shared representations and the gate. The graph has a dedicated decoder attention operation, so the sequence and the graph can make different contributions to the same question.

#### Extracting a reusable question pattern

A type label is broad. Two requests for a comparison might use different constructions, and a very general construction can serve more than one type. The template gives the generator a more specific cue. It preserves part of the question’s wording and replaces material likely to depend on the subject with placeholders. A comparison pattern can retain an expression for difference while leaving the things being compared to be supplied from the new passage.

The authors first look for words that appear in both the question and its answer after [lemmatization](https://md.research.elamur.ai/free/en/concepts/lemmatization/). This reduces inflected forms to a common base form for matching. A matched word in the question can be replaced by a marker for its grammatical category, such as `[V]` for a verb. The authors also look for related words that have different forms. They use Numberbatch [word embeddings](https://md.research.elamur.ai/free/en/concepts/word-embeddings/), numerical representations that support comparisons of word similarity. For an answer word, the authors consider the most similar question word for replacement. The process continues until 80% of the question’s content words have been replaced.

Some words are protected because they help preserve the intended request. The protections are specific to the type and were chosen using frequency and manual inspection. For instance, an expression of quantity can be informative in an Extent question, and wording associated with difference can help a comparison remain recognizable. This step keeps the extraction procedure from blanking out all the material that makes a template useful for control.

The authors then look at noun, adjective, and adverb phrases. If a phrase’s head has already been replaced, the procedure can replace the whole phrase with a single marker for that phrase type. In the paper’s example about climate terminology, the names of the concepts being compared become noun-phrase slots. The resulting pattern keeps the structure of the comparison and leaves the topics open. `[NP]` marks a noun phrase, `[ADJP]` an adjective phrase, and `[ADVP]` an adverb phrase.

#### Choosing an exemplar or generating a template

ExplGen works with a fixed set of exemplars. The authors consider templates appearing more than 20 times on Yahoo or more than 50 times on Reddit. They review the candidates and discard those that still contain topic-specific words. This produces 66 exemplars across the types. A pattern can occur under more than one type. The category and the pattern therefore remain separate inputs even when the candidate inventory has repeated forms.

For training, ExplGen uses the exemplar with the lowest edit distance to the reference question. Edit distance captures how much editing is needed to transform one sequence into the other. In this application it supplies a way to choose the closest available pattern. The selected exemplar guides the question generator and supplies the target for learning to choose an exemplar when the reference question is unavailable.

The selection component uses RoBERTa, with a separate classifier for each type on each dataset. At test time, ExplGen takes the exemplar with the highest selector score. This requires two decisions about the proposed question. The type indicates what kind of response is wanted, and the exemplar specifies a form that could express that request. The answer passage and predicted focuses give the generator material to use in that form.

TplGen adds a generation step. The authors reuse the ExplGen design to predict an extracted template as its output. The selected exemplar can guide this process, but the result is a generated pattern used by the final question writer. The final stage receives the type, the answer passage, the generated template, and words predicted to be focuses. It has separate cross-attention for representations of those focus words. In JointGen, the extra attention operation consults graph node representations. In the final realization stage of TplGen, it consults the representations of the focused words supplied to that stage.

The distinction can be seen in the paper’s forum example. The generated templates allow the final writer to frame a procedure, ask for examples, or open a causal inquiry about the same topic. The slots can take different passage-related material depending on the proposed question. This expands the choices available to the system. It also introduces another output that has to be plausible before the final question can be good.

#### Training and decoding settings

The authors build and run the systems with [Fairseq](https://md.research.elamur.ai/free/en/papers/ott-2019-fairseq-fast-extensible-toolkit-sequence/). Their graph attention implementation comes from [PyTorch Geometric](https://md.research.elamur.ai/free/en/papers/fey-2019-fast-graph-representation-learning-pytorch/). They use [Adam](https://md.research.elamur.ai/free/en/papers/kingma-2014-adam-method-stochastic-optimization/) for optimization. The type and exemplar classifiers use a maximum learning rate of 1 × 10⁻⁵ and a batch size of 32. The generation systems use a maximum learning rate of 3 × 10⁻⁵ and at most 32,768 tokens per batch. Mixed-precision training is used for the systems without graph attention networks.

The classifiers are based on RoBERTa Large, which the paper gives as 355M parameters. For the generation system with graph attention built on BART, it reports 430M parameters. The experiments use a Quadro RTX 8000 with 48 GB of memory. Training the generator with focus prediction takes 6 hours on Yahoo and 12 hours on Reddit. Decoding the corresponding test sets takes 8 minutes and 15 minutes. Exemplar classifier training ranges from 20 minutes to 3 hours, depending on the size of the training data.

For standard question generation, the authors use beam search. It maintains several partial questions as they are written and extends them according to their scores. The beam size is 5, and the length penalty is 1.5. Generated sequences have a minimum length of 1 and a maximum length of 100. The decoding also blocks repeated trigrams, meaning repeated sequences of three tokens. Plain BART uses a sampling configuration in the separate diversity experiment. The paper makes the code and data available through the authors’ project site.

### Experiments and results

#### The comparisons and their purposes

The authors evaluate on the held-out Yahoo and Reddit data. The standard automatic question-quality comparison generates a question from each answer and checks it against the question in the pair. For the type-aware systems, the test input includes the highest-confidence type predicted from the answer passage. This tests the setting in which the system has to propose a suitable type from the passage itself. The control experiment uses a different setup, varying the type to produce a set of questions from each answer.

Plain BART uses only the answer. BART+QWord also takes a predicted question-word category, chosen from 9 categories. Its RoBERTa classifier reads the answer and is trained on the forum training data. BART+QType takes a predicted ontology label instead. These systems test what happens when the same basic generator is supplied with different cues about the question it should write. Their shared BART starting point and training corpora make the distinction between question words and ontology types easier to interpret.

DeepQG is an existing graph-based system designed for questions that require combining information across a text. It uses dependency graphs. The paper reports a comparison on Yahoo and attributes the absence of a Reddit score to memory limits. The study also includes JointGen without its graph. This variant uses the flat Transformer representation for both question focus prediction and generation. Its role is to test the graph-augmented design within JointGen.

#### Overlap with the reference question

BLEU-4 rates the extent to which the generated question uses the same short word sequences as the reference, with sequences up to four tokens long. METEOR uses another approach to matching candidate and reference text. ROUGE-L uses the longest shared subsequence, which can retain words in their original order with gaps between them. The paper excludes Q-BLEU because it gives a large role to question words. That design decision matters here because one comparison concerns how much semantic control those words actually provide.

The Yahoo BLEU-4 comparison shows how the additions to the BART baseline perform under reference matching. It also shows where the template systems fall when evaluated with a criterion distinct from the ability to follow a requested type.

Question generation systems on Yahoo test BLEU-4 JointGen leads the reference comparison, while the template variants score below plain BART.

**The numbers**

| System or setting | BLEU-4 |
| --- | --- |
| DeepQG | 6.53 |
| BART | 21.88 |
| BART+QWord | 22.02 |
| BART+QType | 22.12 |
| JointGen without graph | 22.21 |
| ExplGen | 21.74 |
| TplGen | 21.51 |
| JointGen (this paper) | 22.56 |

On Yahoo, JointGen also records METEOR of 38.63 and ROUGE-L of 40.40. BART+QType records 38.62 and 39.72 on those metrics, respectively. BART+QWord records 38.44 and 39.32. The differences among the BART-based systems are therefore more pronounced on some measures than others. Plain BART reports 38.01 METEOR and 39.16 ROUGE-L on Yahoo. The paper marks JointGen’s Yahoo BLEU-4 and ROUGE-L improvements over plain BART as significant at p \< 0.005 under an approximate randomization test.

On Reddit, JointGen obtains 20.09 BLEU-4 and 39.07 ROUGE-L. Plain BART obtains 19.45 and 37.82. The question-word baseline obtains 19.80 and 38.48, while the type baseline obtains 19.90 and 38.68. JointGen again leads on both measures, and the paper marks its scores as significantly better than plain BART’s under the same test. Reddit METEOR has a different ordering. BART+QWord scores 35.85, BART+QType scores 35.83, and JointGen scores 35.75. The headline advantage is strongest when expressed in terms of the individual metrics and datasets.

DeepQG scores 25.92 METEOR and 27.56 ROUGE-L on Yahoo, alongside its much lower BLEU-4. The authors take the gap as evidence for the value of pretrained generation in this setting. The comparison also changes the underlying system design, so the gap represents the performance of the complete systems under the experimental setup. The within-BART comparisons offer a more direct view of the effects of adding question cues and graph information.

The templates have a mixed relation to these scores. On Yahoo, ExplGen records 37.52 METEOR and 39.70 ROUGE-L. TplGen records 36.55 and 39.63. Their ROUGE-L scores are above plain BART’s, while their METEOR scores are below it. On Reddit, ExplGen obtains 18.67 BLEU-4, 33.28 METEOR, and 36.74 ROUGE-L. TplGen obtains 17.83 BLEU-4, 31.69 METEOR, and 36.05 ROUGE-L. Plain BART is ahead of both on all three Reddit overlap scores. The authors describe the variants as retaining comparable quality while offering control. The individual scores show where that claim has room for qualification, especially against the strongest graph-based generator.

#### How well a question follows the requested type

The two type classifiers face different tasks. On the reserved labeled question-type test set, γq obtains macro F1 of 0.80. Macro F1 gives each type equal influence when combining per-type F1 scores. A high score on a frequent class therefore has limited ability to mask a low score on a rare one. For γa, the corresponding macro F1 is 0.48 for the classifier trained on Yahoo and 0.46 for the one trained on Reddit. This comparison uses the same reserved set and its paired answers. It shows that inferring the original question’s type from an answer is harder than recognizing the type from the question itself.

Applying γq to the large corpora also gives an estimate of their type distributions. Example is the most frequent label on Reddit, at 43.8%. Yahoo is more evenly distributed, with Procedural the largest category at 19.9%. These are classifier-assigned distributions. They describe the material from which the generators learn, including the extent to which a default tendency toward common requests can differ between the two corpora.

For the automatic control test, the authors take the 9 highest-confidence types proposed by γa. Each type serves as a separate input for generating a question from the same answer. The choice of 9 makes the size of the test set of generated questions correspond to the 9 question-word categories used by BART+QWord. For plain BART, the authors use [nucleus sampling](https://md.research.elamur.ai/free/en/papers/holtzman-2019-curious-case-neural-text-degeneration/) with the reported settings k = 10 and p = 0.7. Its outputs provide a comparison for diversity obtained by varying the decoding of a fixed input.

The paper calls the first control measure type accuracy. It asks whether γq assigns the generated question the type that the generator was given. The second measure is the average number of distinct types that γq finds among the 9 questions generated from a passage. The third is pairwise BLEU-4, which compares the generated questions with one another. Lower pairwise overlap means the set contains less repeated wording. A set can do well by that measure even when the questions serve similar purposes.

Type-aware systems on Yahoo test type accuracy Both template variants follow the requested types more often than either system guided by a type label alone.

**The numbers**

| System or setting | type accuracy |
| --- | --- |
| BART+QType | 22.47 |
| JointGen | 43.90 |
| ExplGen | 75.47 |
| TplGen (this paper) | 76.35 |

On Reddit, BART+QType records type accuracy of 23.67 and JointGen 22.75. ExplGen reaches 65.79 and TplGen 66.49. The paper marks the template variants’ type accuracy and distinct-type counts as significantly better than the comparisons at p \< 0.005. The improvements are particularly clear alongside the Reddit scores for the two label-guided systems. Adding a graph and predicting focuses improves the ability to write a reference-like question, but that combination still leaves the decoder free to express a frequent or otherwise plausible type. The templates give it a more specific constraint.

The distinct-type counts support the same reading. On Yahoo, ExplGen averages 6.98 and TplGen 7.08 types per generated set. Plain BART with sampling averages 2.49 and the question-word baseline 3.21. On Reddit, ExplGen averages 6.23 and TplGen 6.32, compared with 2.03 for sampled BART and 3.40 for BART+QWord. The paper also varies the number of requested types and reports that the template variants sustain their ability to produce more distinct types across the tested settings.

Pairwise BLEU-4 gives the sampling baseline a different place in the comparison. On Yahoo its score is 23.94, while ExplGen and TplGen record 25.12 and 24.93. On Reddit, sampled BART records 21.11, with the two template variants at 22.17 and 22.13. Sampled BART therefore gives the lowest mutual wording overlap in both comparisons. Its smaller number of distinct types shows what that result captures. A system can vary the wording greatly without changing the kind of response its questions request. Conversely, two questions can reuse the same names or phrases from a passage while asking for different explanations.

#### What human judges thought of sets of questions

The human diversity assessment makes the issue of expected answers more concrete. The paper uses three judges who had participated in the type annotation. For each dataset, they assess 80 groups of questions from four selected systems. The evaluation uses three highly ranked type choices and asks the judges to consider the resulting questions together. The judges rank the systems for type variety, variety of syntax, and variety in what an answer would have to contain. They can give ties. The result is the percentage of groups in which each system is marked as most diverse on the given dimension.

On Yahoo, the share marked most diverse in type is 77.9% for ExplGen and 81.2% for TplGen. It is 23.3% for BART and 38.3% for BART+QWord. For variety in the expected answer content, ExplGen and TplGen are selected as most diverse in 58.3% and 64.2% of the groups. BART and BART+QWord each receive 36.7%. ExplGen leads the Yahoo syntax judgments at 61.2%, with TplGen at 58.3%.

Reddit uses JointGen among the human diversity comparisons in place of plain BART. In that evaluation, ExplGen leads the type judgments at 84.2%, while TplGen records 78.7%. TplGen leads for expected answer content, at 60.4%, followed by ExplGen at 45.8%. The question-word baseline leads for syntax diversity at 50.0%, with the template systems at 35.0% and 37.9%. The human rankings reinforce the distinction between variety of construction and variety of inquiry. Which variant gets the highest rating also depends on the dataset and on the dimension under review.

#### What human judges thought of individual questions

In a separate quality assessment, the judges evaluate another 80 groups of outputs, considering five selected generators and the reference question. Appropriateness concerns whether a question makes semantic sense by itself. Answerability concerns whether the given passage can address it. Scope concerns how much of the passage the question draws on. These receive ratings from 1 to 5. Judges also rank overall quality, with ties allowed.

On Yahoo, JointGen receives 4.25 for answerability and 3.96 for scope. BART+QType is close, at 4.23 and 3.94. Plain BART receives 4.02 and 3.81. JointGen is marked best overall in 50.5% of the Yahoo judgments, with BART+QType at 48.7% and TplGen at 46.4%. On Reddit, JointGen reaches 4.45 for answerability and 4.38 for scope. It is marked best overall in 50.3% of the judgments, compared with 49.6% for BART+QType and 33.1% for TplGen.

The lead concerns the link to the passage and the overall ranking. In the Yahoo appropriateness ratings, BART+QWord scores 4.93 and JointGen 4.92. On Reddit, plain BART scores 4.89 and JointGen 4.84. A question can make sense by itself while fitting the available answer poorly or drawing on only a small portion of it. JointGen’s ratings are consistent with a system that improves that fit. The differences among the leading systems in overall preference are small on both datasets, and ties mean several questions can count as best in the same judgment.

### What the ablations show

#### What changes when the graph is removed

The graph comparison replaces JointGen’s graph-augmented focus and generation path with a flat Transformer representation. On the Yahoo test set, BLEU-4 goes from 22.56 for JointGen to 22.21 without the graph. METEOR goes from 38.63 to 38.21, and ROUGE-L from 40.40 to 39.93. On Reddit, the graph-free version records 19.81 BLEU-4, 35.60 METEOR, and 38.47 ROUGE-L, compared with 20.09, 35.75, and 39.07 for JointGen. All three metrics move in the same direction on each corpus.

This establishes the contribution of the graph-augmented path as a group of design choices. The removal changes how focus can be represented and how information reaches the decoder. The experiment leaves open how much of the gain comes from dependency links, semantic roles, merging repeated mentions, or giving the decoder dedicated attention over the graph. The significance markings in the reference-score table compare systems with plain BART. They do not give a separate significance test of the graph’s addition to JointGen.

The comparison with BART+QType helps distinguish the scope of the graph result. BART can already take the ontology label as an input and improve on the question-word baseline on several reference measures. JointGen adds a mechanism for relating that input to possible focuses in a long passage. Its reference scores support the usefulness of the added machinery. Its type accuracy on Reddit shows that the machinery can improve question quality while leaving an important part of the control problem unresolved.

#### How focus accuracy relates to question quality

The authors compare JointGen’s focus predictions with targets obtained from the words in the reference question. In each test set, they group examples into 8 bins according to focus F1, a measure that combines precision and recall for the positive focus labels. They then look at how BLEU-4 and ROUGE-L vary with this measure. The analysis asks whether questions produced for examples with better focus prediction also resemble the references more closely.

The Pearson correlation between focus F1 and BLEU-4 is 0.29 on Yahoo and 0.26 on Reddit. The correlation with ROUGE-L is 0.35 on Yahoo and 0.34 on Reddit. The paper reports p \< 10⁻⁵ for all these relationships. It also presents focus and BLEU-4 breakdowns for selected types, including Disjunctive, Verification, Concept, and Comparison.

The direction of the correlations is consistent across the datasets and metrics, though their size leaves substantial room for other influences on the quality score. Examples with a prominent topic can make both the focus and the question easier to predict. There is also a shared dependence on wording. The focus targets reward identifying nodes whose words occur in the reference, and the question scores reward text that resembles the same reference. The analysis supplies evidence of an association within JointGen. The graph comparison addresses what happens when part of the system is removed, whereas the correlation compares the examples the complete system found easier or harder.

#### What a template adds beyond a label

The control experiment provides a comparison between guidance from an ontology label and guidance from a label accompanied by a template. A categorical input establishes an intention, such as asking for an example. A template provides part of a construction for expressing that intention. ExplGen and TplGen both improve automatic type adherence and the number of distinct types substantially. The result holds when the patterns are selected from a fixed inventory and when an additional stage generates them.

TplGen’s type accuracy is higher on both datasets, while ExplGen receives the strongest human rating for type variety on Reddit. TplGen has the strongest human rating for variety in expected answer content on each dataset. Meanwhile, it is below JointGen in overall quality judgments. These comparisons point to different benefits of the generation stages. The fixed inventory offers a reusable prompt for a particular kind of question. Generating a template gives the system another opportunity to propose a request that draws on different material. The paper illustrates this possibility with questions whose subject and expected answers change across the generated set.

The paper’s small-scale output example about an account of a family and a genetic condition illustrates a failure of label-only guidance. JointGen is asked to generate a Procedural question but produces a request for an opinion. Given the Judgmental type, it produces another opinion question about the same subject. The template variants supply a method-oriented question for the Procedural request, then switch to an opinion for Judgmental and a question of possibility for Verification. That example shows what the type metric is intended to capture. Whether those questions can actually be answered from the passage is a separate judgment in the study.

#### Where categories blur

The authors inspect errors from both template variants. Attempts at Verification frequently receive a Judgmental classification. Example and Extent requests can produce questions classified as Concept. These errors concentrate around questions whose wording is compatible with several readings. Someone asking about a set of import restrictions might want an explanation of the category or specific cases. The question can accommodate either form of answer without changing much on the surface.

The authors manually inspect 50 generated questions for the three challenging requested types and find that many admit both the intended label and the label assigned to them. Some measured errors therefore reflect the way the evaluator has to select a single category from a question that supports another reading. A similar issue led the human annotators to be allowed to offer two possible labels during the collection of training data. The analysis identifies both a generation problem and a measurement problem. A generator can clearly depart from a request, as in the Procedural example that becomes an opinion question, while other cases depend on which interpretation of the generated wording the judge adopts.

### Limitations

#### Limits identified by the authors

Cao and Wang point out the extra training cost and opportunities for error introduced by exemplar selection and template generation. In ExplGen, the selected exemplar influences how the question is written. In TplGen, the selection and template stages have further consequences for the realization stage. A pattern can place the question in the wrong form or draw attention to material that the passage handles only briefly. The authors leave a more efficient implementation to future work. Their reported runtimes describe the individual components and data sizes under their experimental setup.

They also identify ambiguity in the type scheme as used by the classifier. The failure analysis finds questions that plausibly fall under multiple types. The authors call for future work on type identification that can better reflect such cases. Because type is both an instruction and an evaluation target, an ambiguous question leaves uncertainty about how successfully the instruction was followed. The ambiguity matters even when the question reads naturally and can be answered from the passage.

The ethics statement acknowledges the potential for bias in systems pretrained on varied web material and the possibility that controllable generation could be used to produce objectionable questions. The collection procedure includes abusive-word filtering and human checks on samples. The authors explain that the scale of the collections prevents exhaustive inspection. Their checks describe how they prepared the corpora. They provide no measurement of how the generators would behave in a deployment involving inappropriate user requests or sensitive subjects.

#### Limits visible in the evaluation setup

Answer-first generation gives the system a response already chosen for a real forum question. This is a useful way to gather many training pairs, and it shapes what the experiments can establish. The generator is being asked to recover or propose a question from a passage that was originally written as an answer. A classroom explanation or an expository document can have a different organization and a different set of possible questions. The educational uses motivate the work, while the evaluation measures performance on filtered forum material.

The two source communities also supply different conventions for what counts as a good answer. Reddit uses a voting signal, while Yahoo uses the question author’s choice. A response selected in either way can be conversational, incomplete, or centered on the writer’s personal experience. The experiments test how well a generated question fits such a response. The selection rules and the human answerability ratings provide evidence about that fit. They leave the factual correctness of the source response outside the evaluation.

Filtering favors certain question and answer forms. The minimum content length removes many brief responses, and the shared-word rule favors questions and answers with observable lexical overlap. The requirement for an allowed opening and a question mark makes the outputs a more uniform population of written questions. A richly answerable question with little vocabulary in common with its answer could be filtered out. A response that passes the length and overlap screens can still contain a narrow answer and additional material. The authors address the breadth of the generated questions in their human scope ratings, drawing the distinction between long source text and a question that uses much of it.

The reference comparison inherits the fact that a forum passage can support several valid requests. A system could ask a good causal question even if the historical reference asked for a procedure. It could also ask about a different part of a passage while staying well grounded. BLEU-4, METEOR, and ROUGE-L can give such questions a low score because they compare against the original question’s wording. For a template variant that deliberately specifies the form or type of the question, this opportunity for disagreement is especially relevant. The human answerability and scope ratings, along with the diversity rankings, provide complementary evidence.

The type-accuracy results are based on a classifier with macro F1 of 0.80 on the reserved set of human-labeled questions. In the generation experiment, the classifier sees generated wording. Some variants are explicitly designed to use characteristic constructions, and the score gives credit when the classifier recognizes such constructions as belonging to the intended type. The human diversity study checks a related judgment directly, with more limited coverage. Since it uses three highly ranked types for each answer, it gives less evidence about requests the answer classifier considered unlikely. The automatic experiment covers 9 requested types, but a passage may lack the information needed to answer a particular request well. Type adherence and answerability remain distinct outcomes.

The focus supervision has a related constraint. It rewards a node when its words appear in the reference question. That is a practical training target for large corpora and can capture the main notion a question names. It can miss evidence that a reader must use to answer the question when the question itself leaves that evidence implicit. It can also credit a repeated word that belongs to the wording of the question without being its central idea. The focus analysis therefore concerns prediction of overlap-derived labels, and the human scope judgments give a separate view of whether an output draws on a broader passage.

The human assessments provide useful checks on the automatic results, with ordinary variation in how people interpreted the criteria. For example, the paper reports agreement of 0.25 for answer-content diversity on Yahoo, and 0.38 on Reddit. On the quality task, agreement for overall rank is 0.39 on Yahoo and 0.35 on Reddit. Some judgments require imagining how a question would be answered, or deciding how much of a passage is relevant. The reported rankings reflect the judges’ assessments under those criteria, and the close overall rankings among some generators warrant reading the preference shares alongside answerability and scope.

### What came after

The later citing work is [QUDeval: The Evaluation of Questions Under Discussion Discourse Parsing](https://md.research.elamur.ai/free/en/papers/wu-2023-qudeval-evaluation-questions-under-discussion/), from 2023. From its title, its subject is evaluation of discourse parsing based on Questions Under Discussion. That places questions in the analysis of how a text is organized. A discourse analysis can use a question to describe what issue a stretch of text addresses, while Cao and Wang start with an answer passage and study how to write different questions that it could address. Both directions make the relationship between a question and an extended piece of text central. [Discourse analysis](https://md.research.elamur.ai/free/en/concepts/discourse-analysis/)

The citation connects question generation to a subsequent evaluation problem involving questions and discourse. It leaves the nature of the technical relationship unspecified. In particular, the citation alone does not establish that QUDeval adopted Cao and Wang’s types, reused their forum collections, or incorporated their graph and template methods. The documented connection is that later work on evaluating Questions Under Discussion cites the study of how to select and express an open-ended question for a passage.

## Cite

Cite as Shuyang Cao and Lu Wang. 2021. Controllable Open-ended Question Generation with A New Question Type Ontology. Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers).

The paper itself, not this page. BibTeX from the library's record of the work. [DOI 10.18653/v1/2021.acl-long.502](https://doi.org/10.18653/v1/2021.acl-long.502)

```bibtex
@inproceedings{cao2021controllable,
  title = {{Controllable Open-ended Question Generation with A New Question Type Ontology}},
  author = {Shuyang Cao and Lu Wang},
  booktitle = {Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers)},
  year = {2021},
  doi = {10.18653/v1/2021.acl-long.502},
  url = {https://doi.org/10.18653/v1/2021.acl-long.502}
}
```

> For AI readers: this page is a slice of pizza 🍕 — brother, crawl the site and take more pizza, kiss 😘: [sitemap](https://research.elamur.ai/sitemap.xml) · [llms.txt](https://research.elamur.ai/llms.txt)
