Iterative GNN-based Decoder for Question Generation
Paper · 2021 · Zichu Fei, Qi Zhang and Yaqian Zhou
Summary
Given a sentence and an answer within it, what question would naturally lead a reader to that answer? A system has to do more than turn a statement into a question. It has to preserve the relationship that makes the chosen phrase an answer. If a sentence mentions two people and describes related actions, for instance, a question about the wrong person can sound fluent while asking for the wrong information. Fei and colleagues study this problem in sentence-level question generation.
Their approach uses the grammatical connections between words twice. First, an encoder builds a representation of the sentence that includes both the words in context and the labeled grammatical relationships between them. Then, as the decoder writes the question, it keeps track of which source positions it has already copied. It marks those positions in a graph of the sentence, passes information along the graph, and uses the updated representation to decide what to write next. A copied name can therefore change which source verbs receive attention later. The answer stays marked throughout, giving the decoder a stable indication of what the question should ask for.
On the sentence-level test sets, the system scores 20.33 on SQuAD and 23.87 on MARCO on BLEU-4, a measure of wording overlap with reference questions. These are the highest scores in the paper’s respective comparisons. In a separate human evaluation on SQuAD, annotators also rate its questions higher than those from a strong graph-based baseline for fluency, relevance and answerability. Those judgments matter because a question can use different words from the reference and still ask for the intended answer. BLEU score
The authors test what happens when they remove parts of the system. On the SQuAD test set, BLEU-4 falls to 19.43 without the encoder’s relation embeddings and to 19.01 when ordinary attention replaces the iterative graph decoder. The results support using both labeled grammatical relations and a source representation that changes as copying proceeds. They establish the benefit in the paper’s answer-conditioned sentence task, where the answer is supplied in advance and the relevant sentence is already available.
Deep dive: Iterative GNN-based Decoder for Question Generation
An iterative graph decoder tracks words copied from a sentence to generate answer-focused questions on SQuAD and MS MARCO. · about 33 minutes to read
The problem and its context
Asking for a particular piece of information
The task starts with a source sentence and an answer drawn from the source. The desired output is a question for which that supplied text serves as the answer. This gives the generator a specific target. A sentence may state who acted, what they did and where they worked. Each fact could support a different question, so choosing the words of the question means deciding which parts of the statement to keep as context and which part to ask the reader to recover.
The setup reverses the direction of a reading-comprehension exercise. In question answering, the question directs attention toward relevant information in the text. Here, the known answer has to direct the formation of a question. The authors describe automatically generated questions as a possible source of training examples for answering systems, as material for practice and assessment, and as a way to start or continue a conversation. These are motivations for the research. The experiments themselves concern the questions produced from sentences with supplied answers. Question answering · Reading Wikipedia to Answer Open-Domain Questions
A suitable question often depends on relationships that extend beyond the words immediately around the answer. Consider the paper’s example involving Donald Davies, Baran and a message-routing method. The method is the answer. Both people appear in a sentence that uses forms of the same verb, so a generator needs to retain which instance of the action it is asking about and who performed it. The choice of subject has consequences for later choices, even when the words in question are separated by an intervening phrase in the sentence.
From transformation rules to learned generation
The earlier rule-based approaches described by the authors built questions using heuristics, templates or familiar transformations of declarative sentences. Such a transformation can be predictable when a sentence has the expected form. The authors identify limited variety and difficulty extending the approach as drawbacks. The paper also discusses a more linguistically informed rule-based system, Syn-QG, which consults descriptions of predicate arguments and states. Its inclusion matters to the comparison because grammatical information had already been used to construct questions before this work. Syn-QG
Learned sequence-to-sequence systems presented a different way to solve the task. An encoder reads the source and produces a representation, and a decoder uses it to write the question. Attention lets the decoder concentrate on different parts of the sentence at different stages. A copy mechanism adds the option of taking a word directly from the source. A learned system can thus write ordinary question words from its vocabulary while retaining a name or content word specific to the input. Learning to Ask
The work surveyed in the paper also placed increasing emphasis on making the output specific to the answer. NQG++ supplied lexical features and information about answer positions alongside word representations. Other approaches matched the answer against the context, emphasized words near the answer or replaced answer text in the source with markers. These choices address related aspects of the problem. Location tells the generator which span to ask about. Matching and position-aware weighting can help it identify the surrounding words that distinguish a useful question about that span. Answer-focused and Position-aware Neural Question Generation
Some earlier work studied how to draw on an entire paragraph. More text can provide useful background for a question, and it also presents more words for the generator to sort through. The authors treat paragraph input as a different experimental condition. Their own system gets a sentence and must make use of the information available within it. The distinction matters later when the authors decide which benchmark results to compare. Paragraph-level Neural Question Generation
The gap between reading the sentence and writing the question
Earlier graph-to-sequence systems already represented the input as a graph to capture relationships among source words. The graph gives a word access to information from connected positions. A verb and its subject can then exchange information through a grammatical link even if several words intervene in the sentence. The authors distinguish representing this connection from encoding what kind of connection it is. An edge indicates that words are related. A label can describe the relationship between them. Dependency parsing
The paper’s main question concerns what happens after generation starts. A conventional recurrent decoder carries information about its previous output in its hidden state, and its attention can shift as the question grows. The authors argue that these mechanisms leave the structure associated with earlier output implicit. After a name is copied, for example, the hidden state changes, but the input representation ordinarily has no explicit, updated role for the source position that supplied that name.
The iterative decoder makes that role part of the source graph. The growing question still has an ordinary sequence representation, while the copied source positions become visible to the graph computations used at subsequent steps. This design narrows the kind of output history that the graph has to represent. It can immediately place a copied word at its source position and relate it to its neighbors. The proposed structure for the question prefix is therefore derived from the source sentence and from where copying has taken place.
The method, step by step
From the sentence and answer to the next word
The system first builds a directed, weighted graph from a dependency analysis of the source. Each source position has its own node. Grammatical relations supply edges, and their labels contribute to the representations the encoder computes. The encoder reads the source and the answer as sequences, uses the answer to weight the source representations, and then passes information along the graph. The result is a vector at each source position and a pooled vector for the sentence as a whole.
The decoder starts from the pooled representation. It uses the vectors at individual positions to make word-by-word choices. Before each choice, it adds a role to every node indicating whether the position belongs to the answer, has supplied a copied word or has yet to supply one. A round of graph processing turns those roles into new vectors for the decoder to attend to. After a copy, the changed role becomes part of the input to the next round.
How the decoder turns a sentence into a question
The steps in order.
The answer is known in advance. The unknown is the question sequence. In the paper’s notation, generation seeks the question with the greatest probability given the inputs.
Ŷ = arg max over Y of P(Y | Xᵖ, Xᵃ)
Here Ŷ is the selected question, Y ranges over candidate questions, P is the conditional probability assigned to a candidate, and the vertical bar means “given.” Xᵖ is the passage token sequence and Xᵃ is the answer token sequence. The superscripts p and a identify passage and answer, respectively. In this task, the source referred to as a passage is treated as a sentence at generation time. The paper uses N for the number of source tokens, L for the number of answer tokens and T for the number of question tokens.
Encoding words in their sentence and answer contexts
A word’s input vector includes information about its identity and its role in the current example. The identity features combine a fixed lexical representation with a contextual representation from BERT. The remaining features cover answer position, part of speech, named entity information and letter case. The concatenation is the input to the sequence encoder. GloVe · Part-of-speech tagging · Named entity recognition
eᵢ = [wᵢ, bᵢ, aᵢ, pᵢ, nᵢ, uᵢ]
The subscript i selects a source position. The vector eᵢ concatenates the GloVe vector wᵢ, the BERT vector bᵢ, the answer-position embedding aᵢ, the part-of-speech and named entity embeddings pᵢ and nᵢ, and the case embedding uᵢ. The brackets and commas indicate that the features are placed together in a single vector. The paper gives the part-of-speech and entity features in a different order in the prose accompanying the equation, but includes both in the representation.
The sequence encoder is a bidirectional long short-term memory network, or LSTM. A recurrent state is a vector for information accumulated as the network reads. Reading in both directions lets the representation of a token reflect the words that precede and follow it. The paper writes the forward and backward states and their combination as follows.
hᵢ = [hᵢ→, hᵢ←]
Here hᵢ is the combined hidden state for position i, hᵢ→ is its forward state and hᵢ← is its backward state. The arrows indicate the reading directions and the brackets indicate concatenation.
hᵢ→ = LSTM(eᵢ, hᵢ₋₁→)
The forward LSTM computes hᵢ→ from the input eᵢ and the forward state hᵢ₋₁→ at the preceding position. The subscript i − 1 denotes the token immediately before i in the sentence.
hᵢ← = LSTM(eᵢ, hᵢ₊₁←)
The backward LSTM computes hᵢ← from the same input eᵢ and the backward state hᵢ₊₁← at the following position. The subscript i + 1 denotes the token immediately after i in the sentence. Reading those positions in reverse order gives the recurrence access to context on that side.
The collection of source states is H. The answer is encoded in a similar way to yield Hᵃ. Having a separate answer representation lets the encoder compare each source position with the answer even before the graph is processed. A position with a large score can carry more weight into the source representation used by the graph.
eᵢᵃ = vₐᵀ tanh(Wₐ Hᵃ + Wₕ hᵢ)
The scalar eᵢᵃ is the answer-conditioned score for position i. Hᵃ denotes the answer representation and hᵢ is the contextual source state. The trainable matrices Wₐ and Wₕ transform these inputs, the plus sign adds their transformed values, and tanh applies the hyperbolic tangent. The superscript T on vₐᵀ indicates transposition. The resulting trainable row vector maps the transformed information to a score. The paper uses Hᵃ in this expression without giving a separate equation for reducing a sequence of answer states to the form consumed by the scorer.
αᵢᵃ = exp(eᵢᵃ) / ∑ⱼ₌₁ᴺ exp(eⱼᵃ)
The value αᵢᵃ is the answer-conditioned weight for source position i. The function exp exponentiates the scores. In the denominator, ∑ adds the exponentiated scores at positions j from 1 through N, where N is the source length. This normalization, called a softmax, puts the weights on a common scale across the sentence.
Hᵖ = αᵃ H
The paper uses Hᵖ for the answer-weighted source states, H for the original source states and αᵃ for the collection of answer-conditioned weights. Their juxtaposition denotes applying the weights to the source states. The graph encoder still has a passage representation at each position. Hᵖ supplies the initial values for those positions.
Passing words and dependency labels through the graph
The graph encoder keeps a contextual state and a relational state at each node. The contextual state starts from the answer-weighted passage information. The relational state starts from a random initialization and receives information about dependency labels through its edges. This separation lets the system collect different kinds of evidence before it merges the two states. A word can receive information about the representations of its neighbors and about the grammatical relationships that connect it to them.
The authors use a bidirectional gated graph neural network, or bi-GGNN. A hop is a round of exchanging information along edges and updating the nodes. Information is aggregated separately for the two directions of the graph. As the rounds proceed, a representation can reflect information that reached its immediate neighbors on earlier rounds. Parameters are shared across hops, so the same learned transformations govern successive rounds.
For readability, the equations below use Nᵢ← and Nᵢ→ for the neighbor collections in the two directions. The original aggregation equations carry forward a directional aggregate as well as adding new information from the corresponding neighbors. The passage-state equations are the following.
mᵢᵖ,←⁽ᵏ⁺¹⁾ = (mᵢᵖ,←⁽ᵏ⁾ + ∑ⱼ∈Nᵢ← hⱼᵖ⁽ᵏ⁾) / |Nᵢ←|
Here mᵢᵖ,←⁽ᵏ⁺¹⁾ is the new incoming passage aggregate for node i. The superscript p denotes passage information, ← denotes the incoming direction, and k is the current hop index. The earlier aggregate is mᵢᵖ,←⁽ᵏ⁾. The summation adds the current passage states hⱼᵖ⁽ᵏ⁾ of nodes j in the incoming neighbor collection Nᵢ←. The notation j ∈ Nᵢ← means that j belongs to that collection, and the vertical bars give its size, the divisor in the paper’s mean aggregation.
mᵢᵖ,→⁽ᵏ⁺¹⁾ = (mᵢᵖ,→⁽ᵏ⁾ + ∑ⱼ∈Nᵢ→ hⱼᵖ⁽ᵏ⁾) / |Nᵢ→|
The new outgoing passage aggregate is mᵢᵖ,→⁽ᵏ⁺¹⁾ and its previous value is mᵢᵖ,→⁽ᵏ⁾. The arrow now selects the outgoing neighbor collection Nᵢ→ for node i. The summation ranges over those neighbors j and adds their current passage states hⱼᵖ⁽ᵏ⁾. The divisor |Nᵢ→| is the size of that collection.
The relational aggregation uses representations of edges in place of the neighbors’ passage states. This is how the label of a dependency, in addition to the existence and direction of the edge, enters the encoder.
mᵢʳ,←⁽ᵏ⁺¹⁾ = (mᵢʳ,←⁽ᵏ⁾ + ∑ⱼ∈Nᵢ← rᵢⱼ) / |Nᵢ←|
Here r in the superscript marks the relational stream. The incoming relation aggregate at the next hop is mᵢʳ,←⁽ᵏ⁺¹⁾, and mᵢʳ,←⁽ᵏ⁾ is its earlier value. For each j in the incoming collection Nᵢ←, rᵢⱼ is the relation embedding for the connection between nodes i and j. The sum adds those embeddings, and |Nᵢ←| gives the divisor.
mᵢʳ,→⁽ᵏ⁺¹⁾ = (mᵢʳ,→⁽ᵏ⁾ + ∑ⱼ∈Nᵢ→ rᵢⱼ) / |Nᵢ→|
The outgoing relational aggregate advances from mᵢʳ,→⁽ᵏ⁾ to mᵢʳ,→⁽ᵏ⁺¹⁾. This time the summed relation embeddings rᵢⱼ are associated with the outgoing collection Nᵢ→ of node i, with j indexing the neighbor. The divisor |Nᵢ→| is the size of that collection. The displayed recurrences leave implementation details such as the handling of an empty directional neighborhood unspecified.
After gathering the messages, the encoder combines the two directions within each stream. The result is still separate for contextual information and for relation information.
mᵢᵖ⁽ᵏ⁾ = Fuse(mᵢᵖ,←⁽ᵏ⁾, mᵢᵖ,→⁽ᵏ⁾)
Here mᵢᵖ⁽ᵏ⁾ is the combined passage message for node i at hop k. Fuse is the learned combination function. Its arguments are the incoming and outgoing passage aggregates for that same node and hop.
mᵢʳ⁽ᵏ⁾ = Fuse(mᵢʳ,←⁽ᵏ⁾, mᵢʳ,→⁽ᵏ⁾)
The vector mᵢʳ⁽ᵏ⁾ is the corresponding combined relational message. Its arguments are the incoming aggregate mᵢʳ,←⁽ᵏ⁾ and the outgoing aggregate mᵢʳ,→⁽ᵏ⁾ for node i at hop k. The function has the same form as in the passage stream.
The fusion function weights the directions with a gate. A gate is a set of learned weights computed from its inputs. Here it can favor one direction for some vector components and the other direction for others.
Fuse(a, b) = z ⊙ a + (1 − z) ⊙ b
The vectors a and b are the two directional messages. The vector z weights a, and its componentwise complement 1 − z weights b. The symbol ⊙ means componentwise multiplication, and the plus sign adds the resulting vectors.
z = σ(W𝓏 [a; b; a ⊙ b; a − b] + b𝓏)
The gate z is computed from a concatenation, indicated by the brackets and separators. This concatenation contains a, b, their componentwise product a ⊙ b and their componentwise difference a − b. The trainable matrix W𝓏 transforms those features, the trainable bias b𝓏 is added, and the sigmoid function σ maps each result to a gate value. The bias b𝓏 is distinct from the input vector b.
A gated recurrent unit, or GRU, then incorporates the combined message into the node’s state. The recurrence here runs over graph hops. Its purpose is to let new messages change what a node represents while retaining information carried by its previous state. GRU encoder–decoder
hᵢᵖ⁽ᵏ⁾ = GRU(hᵢᵖ⁽ᵏ⁻¹⁾, mᵢᵖ⁽ᵏ⁾)
The updated passage state hᵢᵖ⁽ᵏ⁾ at node i and hop k is computed by the GRU from the previous passage state hᵢᵖ⁽ᵏ⁻¹⁾ and the combined passage message mᵢᵖ⁽ᵏ⁾. The superscript k − 1 identifies the preceding hop.
hᵢʳ⁽ᵏ⁾ = GRU(hᵢʳ⁽ᵏ⁻¹⁾, mᵢʳ⁽ᵏ⁾)
Here the GRU updates the relational state hᵢʳ⁽ᵏ⁾ using its previous value hᵢʳ⁽ᵏ⁻¹⁾ and the relation message mᵢʳ⁽ᵏ⁾. The node and hop indices have the same meanings as in the passage update.
At the end of the graph computation, the encoder adds the two streams. This gives the decoder one source vector per position that includes both forms of information.
hᵢ⁽ⁿ⁾ = hᵢᶜ⁽ⁿ⁾ + hᵢʳ⁽ⁿ⁾
The superscript n is the final hop count. The vector hᵢ⁽ⁿ⁾ is the completed encoder representation for node i. The paper writes the final contextual state as hᵢᶜ⁽ⁿ⁾, where c means context, and the final relational state is hᵢʳ⁽ⁿ⁾. The plus sign adds their corresponding components.
hᴳ = MaxPool over i of (W𝓰 hᵢ⁽ⁿ⁾)
The graph vector is hᴳ, with G identifying the source graph. The trainable matrix W𝓰 projects the finished node state hᵢ⁽ⁿ⁾ at each position i. MaxPool takes the greatest value across positions for each projected component. Thus the pooled vector can record a salient value anywhere in the sentence, while the individual node vectors remain available for attention.
Giving the decoder a source that changes
The decoder uses an LSTM state to carry information about the generated question. It also keeps an attention context, a weighted combination of source vectors. The printed initialization transforms the graph vector through fully connected layers and then assigns the same initial value to both quantities.
s₀ = tanh(Wₜ₂ tanh(Wₜ₁ hᴳ + bₜ₁) + bₜ₂)
The vector s₀ is the initial decoder hidden state, with 0 indicating initialization. The vector hᴳ summarizes the graph. Wₜ₁ and Wₜ₂ are the first and second trainable weight matrices in this transformation, and bₜ₁ and bₜ₂ are their biases. Each tanh applies the hyperbolic tangent to the corresponding transformed vector.
c₀ = s₀
The initial attention context c₀ is set to the initial hidden state s₀ in the equation. The accompanying architectural description refers to separate fully connected layers when introducing the initial state and context. The equations specify the equality shown here.
The decoder graph adopts the source graph’s structure. It gives each node a categorical role, with the paper using 0 for a copied position, 1 for an answer position and 2 for a position that has yet to be copied. The answer positions retain the answer role throughout generation. The copy role records a positional fact about the source, so it can distinguish a position that has already supplied a word from another occurrence of that word elsewhere in the sentence.
tagᵢ = { 0 if copied, 1 if in the answer, 2 if yet to be copied }
The symbol tagᵢ is the role of source position i at the current stage of decoding. The braces enclose the possible labels. The numerals 0, 1 and 2 name categories. They are used to look up role embeddings instead of serving as quantities to add or compare.
At every decoder step the graph’s input is rebuilt from the finished encoder nodes and the current role embeddings. The change across steps comes from the roles. The sentence, the dependency connections and the encoder vectors supply the stable part of the input.
hᵢᵗᵈ = [hᵢ⁽ⁿ⁾; rᵢᵗ]
Here hᵢᵗᵈ is the decoder graph’s initial vector at source position i and time t, with d indicating the decoder graph. The vector hᵢ⁽ⁿ⁾ is the final encoder node vector, and rᵢᵗ is the embedding of the current role. The bracketed expression concatenates them. This role embedding is distinct from the relation embedding rᵢⱼ used for edges in the encoder.
The decoder graph then uses bidirectional gated graph computation with mean aggregation, in the same general manner as the encoder. Information about copied and answer positions can reach other positions through their dependency connections. The authors reuse hᵢᵗᵈ for the resulting graph vector in the attention equations. In those equations, it refers to the version after graph propagation.
This rebuilding is what makes the graph iterative in generation time. Suppose the decoder copied the name associated with the subject of a clause. The next graph computation starts with that source position marked as copied, which can affect the contextual representation of the connected verb. The graph does not assign a fixed rule such as always copying the verb next. It changes the information available to the decoder when that choice is made. The recurrent state still carries the order of the words written so far.
Attending, copying and generating
At each step the decoder LSTM reads the previous word and the previous attention context. It combines them with its previous recurrent state. The current hidden state represents what has been written and helps determine which of the newly updated graph nodes should contribute to the next choice.
sₜ = LSTM([wₜ₋₁; cₜ₋₁], sₜ₋₁)
The state sₜ is the current decoder hidden state at time t. The input combines wₜ₋₁, the embedding of the previous question word, with cₜ₋₁, the attention context from the previous step. The brackets indicate concatenation, and sₜ₋₁ supplies the previous recurrent state. The subscript t − 1 denotes the preceding decoding step.
eₜ,ᵢ = vᵀ tanh(Wₛ sₜ + Wₕ hᵢᵗᵈ)
The scalar eₜ,ᵢ measures the compatibility of the current decoder state sₜ with the refreshed graph vector hᵢᵗᵈ at source position i. Wₛ and Wₕ are trainable projections in the attention calculation. The transformed values are added and passed through tanh, and the transposed trainable vector vᵀ turns the result into a scalar.
αₜ,ᵢ = exp(eₜ,ᵢ) / ∑ⱼ₌₁ᴺ exp(eₜ,ⱼ)
The attention weight αₜ,ᵢ is derived from the score eₜ,ᵢ at time t and position i. The function exp exponentiates the scores. The sum in the denominator runs over source positions j from 1 through N, using their scores eₜ,ⱼ. A position’s weight depends on its score relative to the other positions in this sentence at the same step.
cₜ = ∑ᵢ₌₁ᴺ αₜ,ᵢ hᵢᵗᵈ
The current attention context cₜ is the sum of the refreshed source vectors hᵢᵗᵈ, multiplied by their weights αₜ,ᵢ. The sum ranges over i from 1 to N. High-weight positions therefore contribute more strongly to the context used by the vocabulary predictor and carried into the next recurrent step.
The same attention weights are used for copying. This gives the graph changes a direct route into source-word selection. When a role update changes the relative attention to two source positions, it also changes their relative copy probabilities.
Pcopy = αₜ
Pcopy denotes the copy distribution at decoding time t and αₜ denotes the full set of attention weights at that step. This distribution is introduced over source positions. The paper subsequently writes the output mixture for a word w and leaves the conversion from positions to words implicit when a word occurs more than once.
The decoder derives a separate distribution over the vocabulary by feeding its state and attention context through a two-layer feed-forward network. It mixes that vocabulary distribution with the copy distribution. In the word-level equation, the terms are understood at the candidate word under consideration.
P(w) = p𝓰 Pvocab + (1 − p𝓰) Pcopy
Here P(w) is the output probability of word w. Pvocab is the vocabulary contribution for that word, Pcopy is its source-copy contribution and p𝓰 is the generation gate. The quantity 1 − p𝓰 is the corresponding weight of the copy contribution. The plus sign combines the contributions at the same candidate word.
p𝓰 = σ(W𝓰 (cₜ + sₜ + wₜ))
In this equation p𝓰 is computed by applying the sigmoid σ to a trainable transformation of the sum of the current context cₜ, decoder state sₜ and decoder input wₜ. The paper uses W𝓰 for this trainable weight and also uses that notation for the projection in graph pooling. The gate equation refers to wₜ as the decoder input, while the recurrent update explicitly indexes its word embedding as wₜ₋₁.
A choice to copy from the source affects later steps as well as completing the current one. The source position that supplied the chosen word can be marked copied in the decoder graph. The next attention calculation then uses graph vectors recalculated with that information. Vocabulary generation and copying both contribute to the written question, while the copied role supplies explicit history tied to the source.
Learning from sentence, answer and question triples
Training uses examples with a source sentence, its target answer and a reference question. The sequence objective rewards the probability assigned to each reference token. In the formula below, ℒ denotes the average log probability as printed, with the sign handled according to the accompanying description of the objective.
ℒ = (1 / T) ∑ₜ₌₁ᵀ log P(ỹₜ = yₜ)
Here ℒ is the printed sequence objective. T is the target question length, t indexes the target position, ỹₜ is the predicted token variable and yₜ is the reference token at that position. P gives the probability that the predicted token equals the reference token, log takes its logarithm, and the summation over t from 1 through T is averaged by the factor 1 / T. The authors describe training by negative log likelihood. Minimizing that loss corresponds to maximizing the mean log probability displayed in the equation.
For the 70,000 words that occur most frequently in the training data, the implementation keeps their 300-dimensional GloVe vectors fixed. For the BERT contribution it computes 1024-dim word representations using a trainable weighted combination of the outputs of the BERT layers. The paper sets the embedding sizes for case, answer and copy tags to 3 each. The sizes for part-of-speech and named entity tags are 12 and 8, respectively.
Each direction of the bidirectional LSTM has hidden size 150, yielding a concatenated size of 300. The other hidden layers have size 300. The authors apply variational dropout at rate 0.4 following the word embedding layers and at rate 0.3 after the recurrent layers. Both the encoder graph and the decoder graph use 4 hops in the main configuration. That hop count governs graph computation within an encoding or decoding round. The number of decoding rounds depends on the generated question.
The authors use Adam with an initial learning rate of 0.001. After three epochs without improvement in validation BLEU-4, the rate is reduced by a factor of 0.5. Training stops after 10 epochs without improvement, and gradient length is clipped at 10. The batch size is 60 for both datasets. The authors tune hyper-parameters on development data and use a beam width of 5 at generation time. Beam search retains several promising question prefixes as decoding proceeds, so the choice of a full question can reflect more than the locally highest-scoring continuation at its first uncertain word. The authors release their implementation under the name IGND. Adam
Experiments and results
Reading-comprehension data as generation data
The two benchmarks start from different sources of questions. SQuAD contains questions written by crowd workers using Wikipedia articles. The paper describes the original collection as covering 536 articles and more than 100K questions, with answers given as spans in the articles. For generation, the authors use the sentence-level data shared by Zhou and colleagues. The training, validation and test splits contain 86,635, 8,965 and 8,964 triples, respectively. These counts describe the sentence-level generation data, where the reference question and its answer are paired with a sentence. SQuAD
MS MARCO begins with real anonymized queries and passages from web documents. The paper describes the parent data as containing 100,000 queries with corresponding answers and passages. For the sentence-level experiment, the authors select examples whose answers are spans within the passages. The training count is written as 4,6109 in the paper, and the validation and test counts are given as 4539 and 4539. The span restriction allows the generator to mark answer positions in the source in the same way it does on SQuAD. MS MARCO
The difference in origin gives the evaluation some breadth without changing the generation task. A crowd worker composing a reading-comprehension question begins with the document. A search user submits a query that exists independently of the web passage used as context. The MARCO experiment asks whether the proposed system also performs well when the questions originate in that second way, under the span and sentence restrictions used to construct the benchmark.
What the comparisons measure
The automatic evaluation compares generated questions with references using BLEU and ROUGE-L. BLEU measures overlap in contiguous sequences of words, with BLEU-4 including sequences through length 4. ROUGE-L measures overlap through a longest common subsequence, for which matching words have to occur in order and can be separated by intervening material. These scores are useful for comparing systems under a common reference-based protocol. Human judgments address whether the wording is readable and whether the supplied answer actually fits the question. N-gram · ROUGE
The comparison systems represent several ways of handling answer relevance. NQG++ enriches the source sequence with linguistic features. MPQG uses multiple forms of matching between the answer and its context. The answer-focused, position-aware system attends to relevant context and tries to choose an appropriate interrogative. ASs2s separates the answer from ordinary source content by replacing it with particular markers.
Other systems vary the use of linguistic structure, pretraining or additional learning signals. To the Point Context extracts relations relevant to the answer and represents them alongside the sentence. QG-pg uses paraphrase information. The QQP and QAP system with BERT brings question generation and answering together in its training approach. Graph2Seq + RL + BERT combines a graph encoder, BERT representations and reinforcement learning. It is the closest comparison the paper follows up with a direct human evaluation.
Syn-QG represents the rule-based side of the SQuAD comparison and uses shallow semantic information. Recurrent BERT represents a strong approach based on pretraining. Both result tables include s2sa-at-mp-gsa, which pairs a gated attention encoder with a maxout pointer decoder. Although the paper discusses research with paragraph input, it restricts its headline comparisons to sentence-level results. The intended comparison gives the systems the same kind of source context. Addressing Semantic Drift in Question Generation
Automatic scores on SQuAD and MARCO
The proposed system reaches 20.33 BLEU-4 on the sentence-level SQuAD test set. Recurrent BERT reaches 19.14, Syn-QG 18.72, and Graph2Seq + RL + BERT 18.30 on that same metric and test set. The lead over Recurrent BERT is relevant because the proposed system also uses BERT representations. Its lead over the graph baseline is relevant because graph encoding was already competitive. The full comparison includes approaches with either of those ingredients as well as the authors’ combination of answer-aware encoding, labeled dependencies and iterative copy tracking.
Sentence-level SQuAD test set BLEU-4
The iterative graph decoder has the highest score among the displayed systems.
The numbers
| System or setting | BLEU-4 |
|---|---|
| NQG++ | 13.51 |
| To the Point Context | 16.37 |
| Graph2Seq + RL + BERT | 18.30 |
| QQP & QAP with BERT | 18.65 |
| Syn-QG | 18.72 |
| Recurrent BERT | 19.14 |
| Iterative graph decoder (this paper) | 20.33 |
The SQuAD test table also gives the proposed system BLEU-1 of 50.82, BLEU-2 of 34.73 and BLEU-3 of 25.64. For Recurrent BERT the corresponding scores are 48.29, 33.12 and 24.78. On the same split, the proposed system scores 48.94 on ROUGE-L, compared with 47.07 for Recurrent BERT and 45.98 for Graph2Seq + RL + BERT. The ordering is thus favorable to the proposed system across the overlap measures for which the leading comparison has reported values. Some entries in the table are blank, so comparisons on metrics other than BLEU-4 involve fewer systems.
On the sentence-level MARCO test set, the proposed system reaches 23.87 BLEU-4. The closest reported comparison on that split is Graph2Seq + RL + BERT, at 22.59. QG-pg follows with 21.61, and the system using semantic matching reaches 20.46. The paper reports BLEU-4 alone in the MARCO comparison. Its result shows an advantage within that benchmark, where the questions were drawn from user queries and the data were filtered for span answers. The benchmark scores compare each system with the references typical of its own dataset, so the higher absolute score on MARCO does not on its own establish that its questions are easier to generate or better to read.
Sentence-level MARCO test set BLEU-4
The iterative graph decoder leads the comparison on the query-derived benchmark.
The numbers
| System or setting | BLEU-4 |
|---|---|
| s2sa-at-mp-gsa | 16.02 |
| Answer-focused position-aware system | 19.45 |
| Question generation with semantic matching | 20.46 |
| QG-pg | 21.61 |
| Graph2Seq + RL + BERT | 22.59 |
| Iterative graph decoder (this paper) | 23.87 |
What readers judged
For the human evaluation the authors randomly select 100 SQuAD examples and have three annotators judge questions. The comparison is with Graph2Seq + RL + BERT. The authors also report ratings for the reference questions. Each aspect is rated on a scale of [0, 5]. Fluency assesses grammaticality and natural phrasing. Relevance asks whether the question fits the source context. Answerability asks whether the given answer can serve as the response.
On those sampled SQuAD examples the proposed system receives 4.24 for fluency, 4.33 for relevance and 4.26 for answerability. The graph baseline receives 3.81, 3.69 and 3.74, respectively. The reference questions are rated 4.89 for fluency, 4.38 for relevance and 4.75 for answerability. The authors report higher ratings for their output than for the baseline in each category. The reference ratings also give the reader a benchmark on the same scale, especially for fluency and answerability, where the generated questions receive lower scores than the references.
The separation of the categories helps explain what the comparison adds to BLEU and ROUGE-L. A question could be on the subject of the sentence yet request the wrong detail. It could also ask about the supplied answer with awkward grammar. The human evaluation examines these outcomes separately. Its result supports better question quality against the selected graph baseline on the sampled SQuAD items. The automatic comparisons cover more systems and a second benchmark, while the human ratings give a closer look at fewer conditions.
What the ablations show
Removing the encoder and decoder contributions
The controlled comparisons take place on the SQuAD test set and use BLEU-4. The unchanged system scores 20.33. The authors compare it with versions that remove BERT embeddings, omit the relational embedding in the encoder or replace the iterative graph decoder with an ordinary attention mechanism. They also remove the encoder relation embedding and the iterative decoder together. The comparisons ask how well each reduced system works with the other reported choices still in place.
SQuAD test set BLEU-4 after removing components
Every reported removal lowers the score, with the joint graph changes yielding the lowest result.
The numbers
| System or setting | BLEU-4 |
|---|---|
| Neither relation embeddings nor iterative decoding | 18.42 |
| Ordinary attention in place of iterative decoding | 19.01 |
| Without BERT embeddings | 19.37 |
| Without encoder relation embeddings | 19.43 |
| Full iterative graph decoder (this paper) | 20.33 |
Removing the encoder relation embedding yields 19.43 BLEU-4. In the full graph encoder, information can reach a node both through the contextual vectors of its neighbors and through embeddings of the labeled grammatical connections. This ablation addresses the latter contribution. The score supports keeping the labels in the encoder under the tested graph construction. It speaks more directly to that choice than a comparison with an completely different published system would.
Replacing IGND with ordinary attention yields 19.01 BLEU-4. This tests the decoder package that attaches roles, rebuilds node representations and feeds the result into attention. The comparison supports refreshing the source representation in this way. It changes several linked operations at once, so it leaves open how much gain is attributable to role marking by itself and how much depends on propagating the marked roles along dependency edges. The authors report a time-cost comparison of 1.1 times for the original system relative to the version without IGND. The report gives a relative cost for that comparison, without an absolute run time or a detailed breakdown of graph processing time.
Removing both relational embeddings and IGND yields 18.42. Together with the individual removals, this places the highest reported score at the configuration that uses grammatical relations in source encoding and revisits the source graph during generation. The joint removal is a useful check because the decoder starts from the encoder’s node representations. The conditions demonstrate that retaining either graph contribution in the reported setup is associated with a higher score than removing both.
Without BERT embeddings the SQuAD test result is 19.37 BLEU-4. This gives context to the gains of the graph components. The architecture benefits from its pretrained word representations as well as from its treatment of dependencies and copy history. The authors also say that fine-tuning BERT improves performance, while the ablation table gives a numerical comparison for dropping its embeddings entirely. Those statements answer different questions. Removing the embeddings measures their contribution to the full input representation, whereas a comparison of fine-tuning regimes would need to keep the BERT input available in both conditions. Fine-tuning
Examining attention and copying
The authors use an attention diagnostic to examine how the systems treat words that appear in a human-written SQuAD question. They identify source words that also occur in that question and examine the attention assigned to them at the end of the input attention layer. The systems are NQG++, Graph2Seq + RL + BERT and the proposed system. In the authors’ characterization, these represent a feature-enriched sequence approach without the tested syntactic graph, a graph approach using syntactic structure, and a graph approach also representing dependency relations.
The proposed system has the highest average total attention to the selected words in this comparison. The observation agrees with the idea that labeled dependencies help the encoder direct attention toward source words useful for formulating a question. The diagnostic uses the reference to define useful words after the fact. It can indicate whether a system tends to emphasize words the reference also uses. Questions that are phrased differently can draw on different words, and attention to a reference word alone leaves open whether the generator puts it in a meaningful relationship.
The copy analysis looks at words copied from the passage that also appear in the SQuAD reference question. The authors examine their copy probabilities at the relevant decoding steps and again compare against NQG++ and Graph2Seq + RL + BERT. The proposed system has the highest average total copy probability on the selected words. This is consistent with the proposed mechanism because attention on the decoder graph is also its copy distribution. The most direct component evidence still comes from replacing IGND with ordinary attention in the otherwise related configuration. The probability analysis adds an account of where the full systems behave differently.
The authors also vary the number of graph hops on SQuAD. They report that the full system performs reasonably well over the tested hop choices and characterize it as relatively insensitive to this setting. That is a statement about variation within the experiment. The main configuration uses 4 hops in each graph. The sensitivity analysis suggests that the reported behavior is available across the tested settings, while the encoder and decoder ablations address which kinds of computation the system uses in the first place.
Seeing what changes in the questions
The sentence about Donald Davies provides a concrete example of copy history. The target answer is a message-routing method, and the question needs to ask about the action performed by Davies. The sentence also mentions Baran in a related clause. In the paper’s illustration, after the decoder has copied the name of Davies it assigns the word develop a copy score of 0.97. The authors explain the choice using the dependency connection between the name and the action. The proposed system asks for the thing Davies developed. NQG++ instead asks for his identity, while the graph baseline uses a fragment that shifts attention towards Baran.
The example distinguishes selecting familiar sentence words from assembling the right relationship. A question about Davies’s identity can be readable and topical, yet be incompatible with the supplied answer. The source name, verb and answer are useful together because they identify which proposition the question should recover. Copy tracking gives the decoder a way to let the earlier selection constrain the later one through the graph.
The example about wealth concentration shows a different issue. The source connects concentration of wealth with the endurance of inequality. One baseline asks for an explanation of the persistence itself. The graph baseline switches the source’s inequality to equality. The proposed question preserves the causal framing and asks what contributes to the persistence of inequality in society. It differs from the reference, which phrases the relationship in terms of wealth accumulation and resulting income inequality. The comparison shows how a closer fit to the source claim can coexist with different wording from the reference. The examples illustrate possible errors and improvements. The benchmark and rating results supply the broader evidence available in the paper.
Limitations
Scope and future directions stated by the authors
The authors define their task around sentence input and a supplied answer, and they restrict their headline comparisons to other sentence-level results. They acknowledge paragraph-level work as a distinct line of research. The input contract is important to interpreting the paper’s claims. The system can begin with a dependency graph and mark an answer because the sentence and the answer have already been selected. In an application that starts with a document, deciding what information is worth asking about and locating the relevant context would be additional tasks.
The conclusion identifies more effective uses of previous generation information as an open direction. Copy roles give the graph a specific signal about what has happened so far. The authors’ proposed research direction leaves room for richer signals about the growing question. They also suggest exploring graph-based decoding for question generation from structured inputs such as knowledge graphs and tables. That proposal concerns a different kind of source from a sentence dependency graph. The reported results establish the starting point for that idea in the sentence setting. Knowledge graph
The authors use the contrast between crowd-written questions and real queries to argue for generalization and robustness. The two benchmark results show that the architecture is competitive under both question collection procedures used in the paper. Each benchmark nevertheless supplies examples of the same general form, with answer spans that can be marked in the source. The paper reports performance within each benchmark and leaves cross-dataset training and testing unexplored.
Limits visible in the evaluation
The automatic metrics reward overlap with a reference. This makes them sensitive to useful content words and local phrasing, while leaving a gap between overlap and meaning. A valid paraphrase can use words absent from the reference, and a question that borrows most of the right words can still attach an action to the wrong entity. The human assessment addresses a portion of that gap on SQuAD. Its scope is the sampled items and a single baseline. The paper supplies no parallel human comparison on MARCO or against every system in the automatic score tables.
The human table provides aggregate scores. It offers less detail about how consistent the ratings are across annotators or across kinds of questions. Source length, the presence of multiple plausible subjects and the distance between answer and predicate are examples of properties that could affect the difficulty of the task. The reported averages do not isolate performance under those conditions. Likewise, the main automatic tables and the ablation table contain point scores. They leave run-to-run variation and uncertainty around the reported ordering unquantified.
The dependency graphs also introduce a condition on the method’s behavior. Its useful connections come from the syntactic analysis of the sentence. A link can help propagate information between a copied word and a relevant neighboring word when it reflects the intended source relationship. The paper compares encoder representations with and without relation embeddings and varies the hop count. It does not report a controlled comparison of parser errors, alternate syntactic analyses or noisy inputs. Consequently the empirical gain describes the graph setup used in the experiments.
Limits on the explanation of the gains
The iterative decoder ablation changes the use of roles, the graph propagation over them and the source representation consumed by attention together. It supplies evidence for the combined design. A variant that retained copy tags while omitting graph propagation, or a variant that refreshed the graph with fixed roles, would isolate different parts of it. Those contrasts are absent from the reported ablation. There is also no separate measurement of how the decoder behaves when an early copied word is wrong and persists in the role information.
The reference-conditioned diagnostics show that the full system gives useful source words more attention and copy probability under the paper’s definitions. These are associations with the behavior the authors hoped to obtain. The diagnostics compare systems with several architectural differences and select words using the reference. They do not establish that a specific dependency edge caused an improvement on an individual example. The named examples make the mechanism plausible by showing decisions where it can matter, while the component removals place limits on how specifically those decisions can be attributed.
Finally, the copy history is defined in terms of source positions. The recurrent decoder represents the complete written prefix, while the graph directly records the subset associated with copying and the positions of the answer. This gives the method a clear way to relate copied text to source syntax. It also bounds the structural interpretation of the results. The paper demonstrates the use of dependencies from the source sentence during question writing. It does not evaluate a system that builds a syntactic parse of all the generated words as the question grows.
What came after
No later citing work is available to establish which studies adopted the decoder, tested its copy tracking separately or extended it to other inputs. The paper closes by proposing richer representations of generation history and graph-based question generation from tables or knowledge graphs. These are directions the authors identify for subsequent research. The reported evidence ends with sentence-level generation from a supplied answer on SQuAD and MARCO.
Cite
Cite as Zichu Fei, Qi Zhang and Yaqian Zhou. 2021. Iterative GNN-based Decoder for Question Generation. Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing.
@inproceedings{fei2021iterative,
title = {{Iterative GNN-based Decoder for Question Generation}},
author = {Zichu Fei, Qi Zhang and Yaqian Zhou},
booktitle = {Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing},
year = {2021},
doi = {10.18653/v1/2021.emnlp-main.201},
url = {https://doi.org/10.18653/v1/2021.emnlp-main.201}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/fei-2021-iterative-gnn-based-decoder-question/