Elamur Research

An Enhanced Knowledge Injection Model for Commonsense Generation

Paper · 2020 · Zhihao Fan, Yeyun Gong, Zhongyu Wei et al.

Summary

A list of words can suggest a scene without telling you how to put it together. Given ear, feel, pain, and pierce, a reader can imagine someone feeling pain while getting an ear pierced. A system has to connect the action to the right body part, decide who experiences the pain, and supply enough detail to make the description read naturally. CommonGen tests this kind of text generation by asking systems to turn supplied concepts into plausible accounts of everyday situations. The paper asks whether a sentence retrieved from an external collection can help a system make those connections.

The authors start with BART, a pretrained system that reads one sequence of text and writes another. Their approach retrieves a sentence that overlaps with the requested concepts, then gives BART both the concepts and that sentence. The retrieved sentence, called a prototype, can suggest an action, a relationship, or a detail missing from the input. It can also describe the wrong object or draw the output away from a required concept. In the ear-piercing example, a prototype about a hand can still suggest how piercing and pain are related, while a closer example can lead BART to repeat a sentence that omits the requested concept feel.

The resulting system, EKI-BART, adds ways to control how the decoder uses a prototype. It marks which input tokens belong to the concept list and which came from the retrieved sentence. It learns to scale parts of each token’s encoded representation, adjusting the influence of potentially useful or distracting information. It also signals how close each prototype token is to the nearest occurrence of a supplied concept. This gives the decoder a way to find nearby context while leaving the whole retrieved sentence available as evidence.

On the CommonGen test set, BART supplied with a prototype improved over BART given only the concepts. EKI-BART then improved over BART supplied with the same kind of prototype, both for retrieval from Wikipedia and for retrieval from a collection oriented toward everyday descriptions. With the latter collection, test BLEU-4 was 36.10 for EKI-BART and 32.40 for BART with a prototype. The component comparisons favored learned scaling over rules that removed prototype tokens from the decoder’s direct view. The authors also found more test outputs with every requested concept present for EKI-BART than for BART with a prototype. Together, the comparisons show that an example can help a generator assemble a scene, and that how the generator reads the example affects what it keeps.

Deep dive: An Enhanced Knowledge Injection Model for Commonsense Generation

EKI-BART retrieves and edits example sentences to describe everyday scenes, improving CommonGen scores while keeping more of the requested concepts. · about 34 minutes to read

The problem and its context

A scene has to be composed from sparse clues

The input to CommonGen is a set of concepts. The output is a description that places those concepts in a plausible shared situation. The input specifies some of the ingredients, while the description has to supply the participants, decide how they relate, and express those relations in ordinary language. An action can involve an object, happen somewhere, and have a consequence. A short set of concepts may name only the action and the consequence, leaving the rest for the generator to infer. This is the issue the paper studies under the heading of commonsense reasoning.

The paper’s ear-piercing case makes the difference between including concepts and relating them concrete. The pain belongs to someone, the piercing affects a body part, and the action gives a reason for the sensation. An output can contain recognizable forms of the input words while making those roles difficult to follow. Conversely, a sentence can describe a piercing and mention pain in a plausible way while still leaving out a concept the task requires. A successful answer needs to satisfy the concept constraint and present a coherent situation. These are related demands, and the paper examines evidence about both.

Many of the useful choices concern material beyond the input. A description may need a person who carries out an action, an object that makes it possible, or a relation that establishes where one thing is relative to another. The authors point to object properties, spatial relations, physical regularities, event order, and social conventions as kinds of background knowledge that can matter. A sentence about an everyday situation can express several of these at once. The reader can often interpret them from how the sentence is put together even when what it assumes about the world is left implicit.

The task also concerns unfamiliar combinations. A system can encounter familiar actions and objects in a collection and still need to put them together in a way it has seen little evidence for during task training. A concept set is sparse enough that several completions may work. Once a generator begins to build a particular scene, however, its choices constrain one another. Introducing a participant or an object makes some continuations natural and others awkward. Fan and colleagues describe this as a problem of giving priority to a plausible combination. A retrieved sentence can help by proposing an arrangement of events or roles around which the generator can organize its output.

From choosing an answer to writing one

The paper situates CommonGen among benchmarks that probe ordinary expectations about events and concepts. SWAG supplies an event description and asks for a likely continuation. CommonsenseQA uses relationships from ConceptNet to construct questions about commonsense concepts. In both cases the system evaluates supplied possibilities. CommonGen puts the additional burden of formulating the answer on the system. The words of a possible answer, their arrangement, and the extra details that make the scene coherent are decisions the generator has to make. SWAG and CommonsenseQA illustrate the earlier settings.

The distinction matters when comparing tasks that all use the term commonsense. Recognizing a likely continuation and writing a scene from a set of cues require different kinds of evidence from the system. A coherent candidate continuation offers its own wording and participants for inspection. With a concept set, the system must first propose how those participants and actions fit together. The paper motivates retrieval in part as a way to supply that starting point. The example is available for inspection by the generator, and the generator still has the work of adapting it to the request.

Earlier work described in the paper also supplied external evidence for commonsense tasks. One approach used explanations written by people as additional material. Another built graphs of relevant concepts and relationships from ConceptNet. A graph gives the system a structured way to work with connections among concepts. A further approach extracted evidence from different external sources and reasoned over it. These precedents gave external knowledge a role in solving the task. Fan and colleagues focus on evidence already expressed in ordinary sentences, where a useful relation can be present as part of a complete scene. Explain Yourself! and KagNet exemplify the explanation and graph approaches.

The choice of plain text follows from the form of knowledge the authors want. A sentence can portray a person using an object for a purpose, doing something in a particular order, or reacting to an event. Its value may lie in how those details fit together. The authors argue that relevant connections of this kind may be absent from an existing knowledge base. A collection of descriptions gives them a way to look for evidence of a complete situation without first having to express that situation as a set of graph relations.

What retrieve-and-edit contributes

The paper draws on research in which a generator retrieves an existing output and uses it as a starting point for a new one. The underlying idea is that an example can settle some choices about how to construct a complex output. A prototype sentence might suggest a workable relationship between an action and a consequence, leaving the generator to swap in the required object and adjust the rest of the scene. The authors cite work on predicting structured outputs by editing existing ones as part of the motivation for this approach. They also situate their method alongside earlier sentence generation by editing prototypes. Generating Sentences by Editing Prototypes.

The related work offers several ways of making the retrieved text available. Some dialogue systems ranked responses already in a collection. Others generated replies after retrieval, with one approach encoding the original request and the retrieved response separately and another joining them into a single input. The paper also describes research that represented how the wording of the current query differed from that of the query linked to a prototype. In text summarization, one of the systems it describes retrieved possible headlines, selected one, and edited the selection.

A separate retrieve, edit, and rerank approach used BERT. Fan and colleagues distinguish their contribution by emphasizing what happens inside the generator when it reads a prototype. Even a well-chosen sentence can be helpful in one respect and misleading in another. Giving a sentence a high retrieval rank tells the generator little about which parts to use. The authors add mechanisms for weighting information at individual source positions, where the effects of helpful context and distracting details can be different.

This concern also explains why the authors experiment with collections of different kinds. A collection of everyday descriptions is a natural source of examples for CommonGen. Wikipedia provides text assembled for a broader purpose. Both can contain useful words and relations, and the sentences they return can differ in how directly they suggest a scene. Testing the same editing architecture with both collections gives the paper a way to examine the value of the prototype source as well as the value of the changes to the generator.

The method, step by step

Retrieve a sentence that suggests a scene

EKI-BART starts with the concepts requested for the current example. It uses their occurrence in a collection of sentences to retrieve a prototype. The prototype is a candidate scene, with wording and details drawn from the collection. During training, the generator also has a target description to learn from. At prediction time, it receives the requested concepts and the retrieved example, then writes a description. The concepts give the task its requirements. The prototype gives the generator an example of how some of those requirements might fit together.

The authors use separate in-domain and out-of-domain collections. They call the collection assembled for everyday descriptions Dᵢₙ. It combines VaTeX, SNLI, Activity, and sentences from the CommonGen training split. The paper associates captioning data with the kinds of scenes CommonGen asks for. Captions can contain objects and people in particular spatial arrangements or actions with visible participants. The collection also draws on the training material for the target task itself.

The out-of-domain collection, Dₒᵤₜ, consists of English Wikipedia text. It gives the method a source whose coverage extends beyond brief descriptions of everyday scenes. Both collections supply plain text to the same basic interface. What the generator receives is a selected sentence, regardless of which collection yielded it. The paper describes retrieval in terms of concept occurrence and examines the resulting overlap. Its architectural account starts from the prototype returned for the input.

The paper’s examples show what a partial match can offer. A sentence about piercing a hand can capture the connection between a piercing and the pain it causes. Given the requested word ear, an editor can use that connection to describe a person whose ear is pierced. An apparently closer example describes a person trying to pierce an earlobe and expressing pain. In the example, BART given that prototype repeats it, carrying over the way pain is expressed and leaving out feel. Retrieval quality therefore has several aspects. A sentence may resemble the requested scene, supply a reusable relationship, and still need an edit to meet the concept constraint.

How EKI-BART turns concepts into a scene

The steps in order.

How EKI-BART turns concepts into a sceneStep 1: Retrieve a prototype using the supplied concepts1. Retrieve a prototype using the supplied conceptsStep 2: Join concepts and prototype into one input2. Join concepts and prototype into one inputStep 3: Mark tokens by their source group3. Mark tokens by their source groupStep 4: Encode the input and scale its representations4. Encode the input and scale its representationsStep 5: Compute distances from prototype tokens to concepts5. Compute distances from prototype tokens to conceptsStep 6: Use distance signals in decoder attention6. Use distance signals in decoder attentionStep 7: Decode a description with beam search7. Decode a description with beam search

Keep track of where each token came from

The paper calls the requested sequence C, the retrieved prototype O, and the target sequence T. Although the task supplies a set of concepts, BART’s encoder reads a sequence. The authors put the concept tokens first and follow them with the prototype tokens. Both parts then pass through one encoder. The concatenation can be written as follows.

S = [C, O] = [c₁, …, cₙ꜀, o₁, …, oₙₒ]

S is the combined source sequence. C is the concept portion, and O is the prototype portion. Each c with a subscript denotes a token from the concept sequence, which has length n꜀. Each o with a subscript denotes a token from the prototype sequence, which has length nₒ. The brackets with items separated by commas indicate concatenation in the displayed order, and the ellipses stand for the intervening tokens.

Ordinary BART embeddings indicate the token and its position. EKI-BART adds a group embedding, a learned vector that indicates whether a token came from the explicit concept list or from the retrieved sentence. If the same concept appears in both places, its two occurrences have different group information. In the concept portion, it names something the output is expected to include. In the prototype, it is part of an example that can help explain the requested concept in context.

E(cⱼ) = Eᴮ(cⱼ) + Eᶜ

E is the final input embedding function. cⱼ is the concept token with index j. Eᴮ is the original BART embedding function, which supplies the token and position information. Eᶜ is the vector shared by tokens in the concept group. The plus sign denotes vector addition.

E(oₖ) = Eᴮ(oₖ) + Eᴼ

Here oₖ is the prototype token with index k. Eᴮ again provides the BART token and position embedding. Eᴼ is the vector shared by the prototype group, and E gives the sum that goes into the encoder. The group label enters before encoding, so it can inform how the encoder represents a token together with its context.

See where the decoder gets its evidence

BART follows the Transformer architecture. Its encoder turns the source sequence into a sequence of hidden states, which are vectors representing tokens in context. Encoder layers use self-attention to combine information from positions within the source and feed-forward networks to transform the resulting representations. The decoder also has self-attention and feed-forward networks. Between them it has encoder–decoder attention, often called cross-attention, through which it looks at the source while forming its output.

The distinction between encoder and decoder attention matters to the proposed changes. An encoder state for a concept can already carry information from the prototype because the two portions are encoded jointly. Cross-attention then determines how the decoder uses those states and the states at prototype positions. EKI-BART changes the representations and scores seen at that interface. The standard attention calculation provides a way to see exactly where the additions act.

sₓ(dᵤ, hᵥ) = (Wₓ,ᵩ dᵤ)ᵀ (Wₓ,ₖ hᵥ) / √dₖ

sₓ is the compatibility score in attention head x. An attention head is one of the parallel calculations through which the decoder reads the source. dᵤ is the decoder representation at position u in the current layer. hᵥ is the encoder state at source position v. Wₓ,ᵩ is the learned query projection for head x, and Wₓ,ₖ is its learned key projection. In the projection subscripts, ᵩ marks the query role and ₖ the key role. Each projection turns a hidden vector of size d into a vector of size dₖ, the head dimension. The superscript ᵀ transposes the projected query for the dot product, and √dₖ is the square root of the head dimension. The score is a scalar for this head, decoder position, and source position.

aₓ = softmax([sₓ(dᵤ, h₁), …, sₓ(dᵤ, hₙₕ)])

aₓ is the vector of attention weights for head x at decoder position u. The bracket contains the scores of dᵤ against the source states h₁ through hₙₕ, where nₕ is the number of encoder states. The ellipsis covers every intervening source position. Softmax turns the scores into non-negative weights that add to one. Increasing the score at a source position while holding the others fixed gives that position more of the weight.

vᵤ = Wₒ [W₁,ᵥ H a₁, …, Wₓ,ᵥ H aₓ, …, Wₓₘₐₓ,ᵥ H aₓₘₐₓ]

vᵤ is the combined source contribution to decoder position u. H is the matrix whose columns are the encoder states. a₁, aₓ, and aₓₘₐₓ are the attention weight vectors of the first, an intermediate, and the final head. xₘₐₓ denotes the number of heads, written X in the paper. W₁,ᵥ, Wₓ,ᵥ, and Wₓₘₐₓ,ᵥ are their learned value projections. In these projection subscripts, ᵥ marks the value role. H multiplied by a head’s weight vector gives a weighted sum of source states. Brackets join the projected contributions from all heads, with the ellipses covering the other heads. Wₒ is the learned projection that maps the joined vector back to the decoder’s hidden size.

d̂ᵤ = LN(dᵤ + vᵤ)

d̂ᵤ is the updated decoder representation at position u. dᵤ is the representation entering this attention sublayer, and vᵤ is the contribution read from the encoder. The addition gives the sublayer a residual connection, so the representation it started with is carried through alongside the new contribution. LN denotes layer normalization, applied to the combined vector.

In ordinary cross-attention, the source contribution thus depends on both the scores used to allocate attention and the representations from which content is read. A prototype can affect the decoder through either route. EKI-BART’s scaling module changes the states supplied to attention. Its distance indicator acts at the scoring stage by giving the decoder information about where a source token stands relative to a concept match.

Learn how much of each representation to pass through

The authors motivate scaling with a simpler case in which a single factor multiplies an entire encoder state. The key projection is linear, so multiplying the state by that factor multiplies the query–key score by the same amount. The paper drops the attention-head subscript for this argument. Written with s for the dot-product score, the identity is as follows.

F(λ) = s(dᵤ, λhᵥ) = λ((Wᵩ dᵤ)ᵀ(Wₖ hᵥ) / √dₖ) = λs(dᵤ, hᵥ) = λF(1)

F is the score viewed as a function of the scalar multiplier λ. dᵤ is the decoder query state, hᵥ is the encoder state being rescaled, and s is their scaled dot-product score. Wᵩ and Wₖ are the learned query and key projections for the head in question. The superscript ᵀ indicates a transpose, and √dₖ is the square root of the head dimension. F(1) is the score at unit scaling.

For a positive original score, the formula makes F increase as λ increases, and reducing λ lowers the score. For a negative score, the direction reverses. The paper’s prose calls the positive-score case decreasing, while the equation gives the increasing relationship. This matters because the calculation motivates the mechanism without supplying a universal rule for the behavior of attention. The softmax compares scores at all source positions, and the implemented module changes separate channels of each state. Its effect depends on how those changes interact with the projections and the decoder’s query.

The actual module calculates a vector of multipliers for each state. A channel here is a coordinate of the hidden representation. The same calculation can preserve some coordinates of a token’s state, shrink others, and amplify others. The calculation uses learned linear transformations with a nonlinear step between them, followed by a sigmoid to bound the output.

λ̃ᵥ = 2 × Sigmoid(W₂ ReLU(W₁ hᵥ + b₁) + b₂)

λ̃ᵥ is the vector of scaling factors for source position v. hᵥ is the encoder state at that position before scaling. W₁ and W₂ are learned weight matrices, and b₁ and b₂ are their learned bias vectors. ReLU applies a rectified linear activation, passing positive values through and setting negative values to zero. Sigmoid acts coordinate by coordinate and maps its input to a value between zero and one. The factor 2 expands that range so a multiplier can fall on either side of one.

h̃ᵥ = hᵥ ⊙ λ̃ᵥ

h̃ᵥ is the scaled encoder state at position v. hᵥ is the original state, and λ̃ᵥ supplies the multiplier for each of its coordinates. The symbol ⊙ means elementwise multiplication. The scaling is applied after the encoder has formed contextual states. A token can therefore be interpreted in the context of the whole joined source before the scaling module determines what representation to pass to the decoder.

The authors initialize the module with small random parameters to keep its first effects on the pretrained states modest. The paper describes the initialization distribution as normal with mean zero and small variance.

N(0, var)

N denotes a normal distribution, 0 is its mean, and var is its variance. With small initialization values in the scaling network, the inputs to the sigmoid are expected to be near zero. The sigmoid outputs then gather around 0.5, and multiplying by 2 puts the initial scaling factors near 1.0. As training proceeds, the module can learn larger departures from that starting point where they help predict the target description.

A hard mask would solve a different problem. It can block selected prototype positions from being read directly by the decoder. Scaling supplies a way to retain some information at a position even when other information there is distracting. The paper’s motivation is that a prototype’s potentially useful words include details absent from the requested set. Those details are exactly the ones a rule based strictly on concept membership would remove from direct attention.

Tell the decoder where the prototype mentions a concept

The prototype position indicator expresses a simple observation about sentences. Words near a mention of a required concept may describe how it participates in the scene. A nearby verb may say what happens to an object, and the surrounding words may identify who performs the action. The method uses proximity as a cue available to the decoder. It computes distances to the closest matching concept occurrence, so a sentence containing several such occurrences can provide several nearby regions of interest.

The authors begin with positions counted within the prototype. Positions containing one of the requested concepts serve as centers. For any prototype token, the raw distance is the smallest absolute difference between its position and a center position. Using Dᵣₐᵥ for that intermediate distance separates it from the final indicator, which the paper also writes as D.

Dᵣₐᵥ(sᵥ) = min { |v − p| : sₚ ∈ O and sₚ = c for some c ∈ C }

sᵥ is the source token at the prototype position being measured, and v is its position in that sentence. p ranges over the positions of matching tokens sₚ within O, the prototype. C is the concept portion of the input, c is a requested concept token, and ∈ denotes membership. The condition sₚ = c means that a token at p matches a provided concept. The bars give the absolute difference in positions, and min selects the smallest difference across the eligible centers. A matching prototype token itself has raw distance 0.

The final indicator keeps a special value for the explicit concept list. The prototype distances are shifted up so a concept mentioned in the example gets its own category. This separates the matching mention inside the example from the token that expresses the request.

D(sᵥ) = { Dᵣₐᵥ(sᵥ) + 1 if sᵥ belongs to O; 0 if sᵥ belongs to C }

D is the final distance indicator for source occurrence sᵥ. Dᵣₐᵥ is the raw distance used within the prototype. O and C are the prototype and concept portions of the source. The addition of 1 moves the raw prototype distances away from the value 0 reserved for concept-list positions. Group membership in this rule concerns where the occurrence appears in the concatenated sequence. A prototype occurrence can have the same token identity as a concept-list occurrence while receiving a different indicator.

The system then looks up a learned positional contribution and includes it with the query–key term. The dependence on distance is in the lookup. Tokens assigned the same distance category receive the same positional signal even if their meanings and encoded states differ.

ED(hᵥ) = Eᴰ(D(sᵥ))

ED is the positional contribution associated with source state hᵥ. Eᴰ is the learned embedding lookup for distance values. D is the indicator function, and sᵥ is the source token underlying hᵥ. This gives the attention computation information derived from the token’s location separately from the content in its hidden state.

s(dᵤ, hᵥ) = (Wᵩ dᵤ)ᵀ(Wₖ hᵥ) / √dₖ + ED(hᵥ)

s is the cross-attention score after adding the distance contribution, expressed as a scaled content score plus an effective bias. dᵤ is the decoder state at position u, hᵥ is the source state at position v, and Wᵩ and Wₖ are the query and key projections. The transpose ᵀ prepares the dot product, and √dₖ gives the content score its head-dimension scaling. ED(hᵥ) is the effective distance contribution on the score’s scale. The distances give the system categories it can learn to favor. The learned values determine how much influence each category has.

The position indicator and the scaling module convey different information. Scaling looks at the content in a contextualized source state. The distance cue depends on a token’s position relative to explicit matches in the prototype. A position close to a required concept can receive a useful cue even though the token there has a different identity. The decoder can combine this cue with its content score as it decides what part of the prototype is relevant to the next output token.

Train the generator on target descriptions

For each training example, the generator has the requested concepts, a prototype retrieved for those concepts, and a target description. The training objective gives high probability to the target sequence by giving high probability to its successive tokens in context. Earlier target tokens are available when learning how to predict the next one. This makes the learning signal about the quality of the final description. The group vectors, scaling network, and distance embeddings learn through their effect on that prediction.

max over θ log P(T | O, C, Gθ) = max over θ ∑ₖ log P(tₖ | O, C, Gθ, t₍<ₖ₎)

θ is the collection of trainable parameters for generator Gθ. T is the target description, O the retrieved prototype, and C the supplied concepts. P denotes probability and log its logarithm. The vertical bar marks conditioning on the information to its right. k is a target position, tₖ is the token there, and t₍<ₖ₎ is the prefix of target tokens preceding that position. The summation covers the target positions, and the maximization chooses parameters that favor the reference descriptions. Taking logarithms expresses the sequence objective as a sum of the token contributions.

The experiments start from BART Large and apply fine-tuning for CommonGen. The implementation uses cross-entropy, which assesses the distribution predicted for the target token, with label smoothing set to 0.1. Label smoothing spreads some of the training target’s probability beyond the observed token. Dropout is 0.1. The group embeddings, scaling module, and prototype position indicator use an initialization standard deviation of 5e-3.

The optimizer is Adam, with β₁ set to 0.9 and β₂ set to 0.999. The β settings govern the running estimates Adam uses when updating parameters. The paper reports a learning rate of 4e-5 with an inverse-square-root schedule and 500 warmup steps. The maximum number of tokens per batch is 1024, and the maximum update count is 5k.

At prediction time the generator builds candidate descriptions with beam search. A beam is a set of candidate sequences retained as the decoder extends them, giving it several possible continuations to pursue. The beam size is 5 and the length penalty is 0.0. The paper describes taking the sequence with the highest predicted probability among the final candidates. Concept coverage in the output is consequently an empirical result of the training and decoding procedure. The authors measure it by examining the generated descriptions.

Experiments and results

Data, comparison systems, and measures

The experiments use CommonGen’s training, validation, and test splits. The training split has 27,069 concept sets and 39,069 sentences. Validation has 993 concept sets and 4,018 sentences. Test has 1497 concept sets and 6,042 sentences. Reporting both counts is important because one concept set can have several target descriptions. In a task with plausible alternative ways of writing a scene, the distinction between an input and its reference texts affects how the evaluation is read.

The authors report that 95.53% of validation concept sets and 98.49% of test concept sets are novel. The unit of novelty in those figures is the set. That makes the split a test of generating from unfamiliar combinations of concepts. It leaves open how familiar the individual concepts and some of their relations already are from training or pretraining. The paper uses the validation split as the development set for its component comparisons and also reports those comparisons on test.

The baselines without pretraining include bRNN-CopyNet, Trans-CopyNet, MeanPooling-CopyNet, and LevenTrans. The first uses a bidirectional recurrent network, and the second uses a Transformer. Both pair attention with a copying mechanism, which can carry relevant input text into the output. MeanPooling-CopyNet addresses the fact that a set has no inherent ordering. It processes randomly permuted versions of the concepts and pools their representations for decoding. LevenTrans is the Levenshtein Transformer, an editing system that refines candidate text through successive steps. Incorporating Copying Mechanism in Sequence-to-Sequence Learning describes the earlier copying approach.

The pretrained group includes GPT-2, BERT-Gen, T5, and BART. UniLM and UniLM-v2 are also part of this comparison. The paper describes their training for CommonGen in sequence-to-sequence form, with the concepts as input and a description as output. This group establishes how strong generation systems fare when the task input consists of the concepts alone. BART is especially relevant because the prototype-conditioned variants are built from the same pretrained starting point.

For each external collection the paper compares retrieval alone, ordinary BART with a prototype, and EKI-BART with a prototype. In retrieval alone, the chosen sentence becomes the output immediately. This indicates what can be achieved by locating an existing sentence. Ordinary BART with a prototype sees the concatenation of concepts and the retrieved sentence. It offers a comparison for the joint effect of group embeddings, scaling, and the position indicator in EKI-BART. Repeating this comparison for each source collection helps distinguish changes associated with the text supplied from changes associated with how it is processed.

The main table records ROUGE-2 and ROUGE-L, BLEU-3 and BLEU-4, METEOR, CIDEr, and SPICE. These scores assess a generated description by comparing it with the reference text or reference content. BLEU-3 and BLEU-4 include comparisons of short token sequences at different orders. ROUGE-2 uses adjacent token pairs, while ROUGE-L looks at a shared sequence in the order it occurs. METEOR also assesses how a candidate aligns with a reference. CIDEr emphasizes agreement with reference descriptions, and SPICE assesses agreement in the scene content expressed by the descriptions. BLEU score, METEOR, CIDEr, and SPICE name the measures used in the paper.

The measures give several views of a prediction. A sentence can resemble the references in wording and also convey similar relations, or it can do well on one aspect and less well on another. Reading several columns helps place a change in context. The separate concept-coverage analysis asks a more direct question about whether the generated sentence expresses the input concepts. That question matters even when the most plausible wording differs from a reference.

What changes when the generator gets a prototype

The paper reports a broad advantage for its pretrained comparison systems over the ones trained from scratch on the task. On the CommonGen test set, LevenTrans scores 21.24 on ROUGE-L, while GPT-2 scores 38.01 and BART scores 41.44. The authors read the overall pattern as evidence for the value of large-corpus pretraining on this task. The baselines vary in architecture and training, so this is a comparison among systems. The tests that add prototypes to BART are more direct comparisons for the paper’s main question.

Prototype sources and editing systems on CommonGen test BLEU-4

Both prototype sources help BART, and the enhanced editor with everyday descriptions scores highest.

Prototype sources and editing systems on CommonGen test BLEU-4BART with concepts only: 24.90BART with concepts only24.90Retrieve from Wikipedia: 7.50Retrieve from Wikipedia7.50BART with a Wikipedia prototype: 30.30BART with a Wikipedia prototype30.30EKI-BART with a Wikipedia prototype: 32.10EKI-BART with a Wikipedia prototype32.10Retrieve from the in-domain collection: 26.40Retrieve from the in-domain collection26.40BART with an in-domain prototype: 32.40BART with an in-domain prototype32.40EKI-BART with an in-domain prototype (this paper): 36.10EKI-BART with an in-domain prototype(this paper)36.10
The numbers
System or settingBLEU-4
BART with concepts only24.90
Retrieve from Wikipedia7.50
BART with a Wikipedia prototype30.30
EKI-BART with a Wikipedia prototype32.10
Retrieve from the in-domain collection26.40
BART with an in-domain prototype32.40
EKI-BART with an in-domain prototype (this paper)36.10

Wikipedia retrieval by itself produces the weakest BLEU-4 result shown in the chart. Giving that retrieved text to BART as additional input improves on the concepts-only BART result. This illustrates the difference between the suitability of a sentence as an answer and its usefulness as an example. A retrieved sentence can supply enough of a relationship to help write a stronger description while remaining far from the desired answer when returned as is.

Retrieval from the in-domain collection gives a stronger starting point. Its test BLEU-4 score as a direct answer is 26.40. The analogous Wikipedia setting scores 7.50. The difference between retrieval sources is visible after generation as well. In every automatic metric column of the main CommonGen test table, the in-domain variant scores above its counterpart for retrieval alone, for BART given a prototype, and for EKI-BART. The authors interpret this pattern as evidence that the scene-oriented collection yields more relevant prototypes.

The benefit of the enhanced editor appears within each collection. On CommonGen test ROUGE-L, BART with a Wikipedia prototype scores 43.77 and EKI-BART reaches 45.42 with that collection. With the in-domain collection, the corresponding ROUGE-L scores are 44.71 and 46.53. On test SPICE, the Wikipedia-based comparison moves from 31.80 for BART to 32.50 for EKI-BART. The in-domain comparison moves from 32.70 to 33.40. These comparisons show the same ordering for measures that place different emphasis on the match between outputs and references.

The strongest setting is EKI-BART with an in-domain prototype. Its CommonGen test results include 25.43 on ROUGE-2, 46.00 on BLEU-3, 33.80 on METEOR, and 17.80 on CIDEr. For EKI-BART using Wikipedia, the corresponding test values are 24.36, 42.90, 32.00, and 16.80. Both EKI-BART variants score above their plain BART-with-prototype counterparts in all the reported columns. For example, plain BART with a Wikipedia prototype scores 15.82 on test CIDEr, and plain BART with an in-domain prototype scores 16.43. Plain BART with only the concepts scores 13.32 on that measure.

Some pretrained baselines also offer useful context for the result. UniLM scores 27.50 on CommonGen test BLEU-4 and T5 scores 27.20. Both are above the concepts-only BART score of 24.90 in that column. The variants of BART that receive and edit prototypes move above those baselines on this measure. The comparison between plain BART and EKI-BART within each retrieval condition is the one that most directly tests the authors’ architectural changes.

What was in the retrieved sentences

The authors also examine how many concept words in the prototypes co-occur with words in the ground-truth descriptions. They use the comparison to characterize the in-domain prototypes as more relevant to the task. Even in that collection, the paper reports that 40% of retrieved prototypes have at most 3 overlapping words. The retrieval analysis helps explain why a high-quality corpus still leaves work for the editor. Matching a few words can identify a useful example while leaving some of the requested scene to be constructed.

A measure of overlap captures part of a prototype’s relation to the answer. A sentence can contain a helpful connection between an action and a consequence with only a partial match to the desired vocabulary. A sentence with more matching words can still organize them around the wrong participant. The reported retrieval and generation results therefore answer complementary questions. Returning the prototype as the answer tests its suitability as a description. Passing it to the editor tests whether its information can be put to better use under the original concept constraints.

The stronger scores in both retrieval settings establish that the approach can use text from either of the collections the authors tried. The comparison also shows that the quality of the supplied text remains consequential after the editor has been added. EKI-BART improves the use of Wikipedia prototypes, and its highest results still come from the collection whose sentences are closer to CommonGen’s target situations.

What the ablations show

Marking source groups and scaling their representations

The main result combines group embeddings, scaling, and the position indicator. The ablation study separates their contributions by training variants with selected components on the in-domain collection. It reports BLEU-3, BLEU-4, and CIDEr on both development and test. The component baseline in the table is BART with the concepts and a retrieved prototype. Direct retrieval is included as a separate comparison. This setup makes it possible to ask what the additions contribute once a prototype is already available.

Group embedding alone improves the reported scores over BART with the same kind of input and ordinary embeddings. CommonGen development BLEU-3 rises from 41.60 to 43.10, and test BLEU-3 from 42.20 to 43.70. Test CIDEr is 16.43 for the baseline and 16.88 with group embedding. The authors interpret this as evidence that identifying which tokens are supplied concepts and which are part of the prototype helps the generator. The labels give it a persistent cue about the role of each input position even after the tokens begin to interact through the encoder.

Scaling alone is also better than ordinary BART with the prototype in this comparison. It yields 44.10 on development BLEU-3 and 44.70 on test BLEU-3, with CIDEr scores of 17.06 and 17.11 on the respective splits. The comparison shows that a transformation of the encoder states can help even when ordinary embeddings leave the source groups implicit. Because the states are contextualized, the transformation can respond to the way a token appears in the joined input.

Putting group embedding and scaling together improves on each component by itself. On development BLEU-4, group embedding alone scores 33.40, scaling alone scores 34.20, and their combination scores 35.00. On test BLEU-4, the corresponding scores are 33.90, 34.80, and 35.50. These results fit the distinction between the mechanisms. The group embedding supplies information about a token’s source. The scaling module changes what its contextual state contributes. Performance with both is consistent with the system making use of both kinds of information.

Adding proximity to a concept mention

The paper next adds the prototype position indicator to the variant that already has group embeddings and scaling. Its reported gain on BLEU-3 is 0.7 on the CommonGen development split and 0.8 on test. On development CIDEr, the combination scores 17.20 before the positional addition and 17.60 after it. On test CIDEr the corresponding values are 17.40 and 17.80. BLEU-4 also increases on both splits, reaching 35.60 on development and 36.10 on test with the full set of components.

This comparison tests the value of the explicit distance cue on top of the other changes. The concept list already tells the generator which words matter, and the encoder can use the order of the complete source. The position indicator adds a specific feature about each prototype token’s nearest matching mention. Its contribution suggests that making this relation available directly to cross-attention helps in the reported configuration. The study adds proximity information at the end of the sequence of ablations, so its independent contribution with other combinations of components remains open.

Comparing learned scaling with hard masks

The authors make a second comparison to test the premise that prototype information benefits from selective access. They start with BART with a prototype and group embeddings, then compare learned scaling with two hard masks. The masks act after the joined source has been encoded. The first masks every output state at a prototype position and retains the states at the explicit concept positions. The second keeps the direct access to prototype tokens matching supplied concepts and masks the other prototype positions.

The point at which the masks act matters. With joint encoding, information from a prototype can already have influenced the representations of the requested concepts. A mask applied afterwards can prevent the decoder from directly attending to a position while leaving that earlier influence inside other states. The comparison tests how much prototype information is made directly available to the decoder after source encoding.

Scaling and hard masks with in-domain prototypes on CommonGen test CIDEr

Both hard masks improve on ordinary prototype attention, and learned scaling gives the highest score.

Scaling and hard masks with in-domain prototypes on CommonGen test CIDErGroup embedding only: 16.88Group embedding only16.88Group embedding with all prototype positions masked: 16.96Group embedding with all prototypepositions masked16.96Group embedding with nonmatching prototype positions masked: 17.21Group embedding with nonmatchingprototype positions masked17.21Group embedding with learned scaling (this paper): 17.40Group embedding with learned scaling(this paper)17.40
The numbers
System or settingCIDEr
Group embedding only16.88
Group embedding with all prototype positions masked16.96
Group embedding with nonmatching prototype positions masked17.21
Group embedding with learned scaling (this paper)17.40

The order also appears on development CIDEr. The group-embedding baseline scores 16.52. Masking all prototype positions after encoding scores 16.84, and keeping only positions matching concepts in the prototype scores 17.01. Learned scaling reaches 17.20. On test BLEU-3 the baseline is 43.70, the masks score 44.60 and 44.90 in the same order, and learned scaling reaches 45.20. The hard masks tie on test BLEU-4 at 34.50. Scaling scores 35.50 there.

The masks’ improvements support the idea that direct access to all the prototype states can make generation harder. The additional improvement with scaling is consistent with prototype words outside the concept list carrying useful details. Such a word might help identify a participant, show what the participant does, or supply ordinary wording for a relation. A membership rule has only the match to go on when deciding what to keep. The scaling network sees the contextual representation and can adjust how much of it passes through. The ablation establishes the score ordering for the tested choices. It leaves the contribution of particular added words to be determined at the level of individual examples.

Counting what the output leaves out

The paper complements its reference-based metrics with an analysis of missing concepts. For the CommonGen test set, the authors count how many required concepts are absent from each output. Their figure groups outputs by that count and compares direct retrieval, BART with an in-domain prototype, and the in-domain EKI-BART. The comparison makes it possible to see whether a generation system repairs omissions in the retrieved sentence, one of the reasons to use the prototype as an input to an editor.

The authors report that both prototype-conditioned generators have about 300 more test instances with every concept present than direct retrieval does. EKI-BART also has more fully covered test instances than plain BART with an in-domain prototype. That ordering aligns with the paper’s concern that strongly worded or salient details in the prototype can draw the decoder away from the concepts. The enhanced editor is more often able to produce an output that includes all of them.

Coverage and plausibility are different properties of the output. The coverage tally directly addresses the requirement that the concepts appear. The reference-based scores provide evidence about how the generated descriptions compare with the available answers. The ear-piercing case shows why both are worth examining. A prototype can read naturally while missing a required term, and an output can use the terms in a way that makes the underlying scene awkward. Across the reported comparisons, the full system improves on both direct coverage and the automatic reference measures.

Limitations

The authors’ stated boundaries and plans

The authors point out that a collection of everyday descriptions may suit the target task especially well and have difficulty generalizing to other domains. They use Wikipedia to test whether retrieval from a different kind of collection can still help. This is a change in the source of the prototypes, with CommonGen as the evaluation task throughout. The result supports use of both tested sources for that task. Generalization to a different generation task is a separate question.

The authors also identify partial overlap and distracting prototype content as practical problems for the method. These are reasons for the scaling and position mechanisms, and they remain conditions under which EKI-BART operates. The paper’s examples show how differently two sentences associated with the same concepts can guide generation. Changes to the editor can improve its use of a prototype, while the evidence available for any particular input still depends on what retrieval finds.

In their future-work discussion, the authors propose representing the relationships among the concepts in a more structured way. The reported method relies on plain-text examples, learned transformations of contextual states, and a positional cue. More structured treatment of relations is a direction they identify for subsequent work. The experiments concern the sentence-based approach they implemented.

Boundaries of the evidence

The numerical evidence is concentrated on a single benchmark. The novelty statistics concern complete concept sets on the CommonGen splits. They show that the evaluation often asks the generator to deal with unfamiliar combinations. They provide no direct count of novel individual concepts, novel relations, or familiar scenes that happen to be cued by a new set of words. Different explanations for a successful output can therefore coexist. The system may have drawn a connection from its prototype, reused learned associations, or combined the two.

The two knowledge collections differ in several respects at once. The in-domain resource blends caption-related material, SNLI, and CommonGen training sentences. Wikipedia differs in style, purpose, and content. Better results with the in-domain resource show the value of that assembled collection under the study’s retrieval procedure. The comparison leaves open which constituent contributes most and how much of the benefit comes from topical relevance, descriptive style, or compatibility with the training examples.

The paper reports scores against references and a tally of missing concepts. These measures give a basis for comparing variants, especially when they agree. A reader interested in whether people consistently find the generated scenes physically plausible, coherent, or natural would need a separate evaluation of those judgments. The examples clarify some ways that generation can succeed or fail. Their role is illustrative, while the quantitative conclusions come from the benchmark measures and coverage counts.

The component comparisons are informative within their scope. The group embedding and scaling checks compare each in isolation and together. The positional cue is evaluated on top of both. The masking and concept-coverage analyses use in-domain retrieval, as do the component ablations. The full method’s improvement with Wikipedia supports the combined architecture in that setting. The relative importance of each addition with Wikipedia is still undetermined.

The description of retrieval gives the basis for matching and names the corpora. It leaves operational choices such as ranking among equally suitable sentences implicit. The distance formula also assumes that the prototype contains a concept occurrence to serve as a center. With an empty set of matches, the displayed minimum has no value, and the paper gives no fallback rule. Those details matter for reproducing the pipeline or using it with an input for which the collection offers weak evidence.

Finally, the scaling argument establishes what happens to a particular dot product when a state is multiplied by a scalar. The mechanism tested in EKI-BART changes individual coordinates and supplies the resulting state to attention. The benchmark gains and masking comparisons support that mechanism as implemented. They provide limited evidence about how individual features, words, or attention heads account for the gains. The paper’s strongest empirical conclusion is that this way of representing and selectively reading retrieved text improves CommonGen generation under the tested conditions.

What came after

A Survey of Knowledge-enhanced Text Generation cites Fan and colleagues’ paper. Its subject is the broader area of augmenting text generation with knowledge. EKI-BART addresses a concrete case within that area. The generator receives an external sentence that can supply background about a scene, and its attention mechanisms are adapted to decide how to use that sentence. The citation connects this CommonGen experiment to a discussion whose scope extends beyond that benchmark.

The survey citation establishes that the work was taken up in a broader account of knowledge-enhanced generation. The specific treatment of EKI-BART within that account remains unspecified. In particular, the citation supplies no follow-up measurement of the scaling module, the position indicator, or their effects with other prototype collections. The empirical account of those components comes from the original CommonGen experiments.

Cite

Cite as Zhihao Fan, Yeyun Gong, Zhongyu Wei, Siyuan Wang, Yameng Huang, Jian Jiao, Xuanjing Huang, Nan Duan and Ruofei Zhang. 2020. An Enhanced Knowledge Injection Model for Commonsense Generation. Proceedings of the 28th International Conference on Computational Linguistics.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.18653/v1/2020.coling-main.182

@inproceedings{fan2020enhanced,
  title = {{An Enhanced Knowledge Injection Model for Commonsense Generation}},
  author = {Zhihao Fan, Yeyun Gong, Zhongyu Wei, Siyuan Wang, Yameng Huang, Jian Jiao, Xuanjing Huang, Nan Duan and Ruofei Zhang},
  booktitle = {Proceedings of the 28th International Conference on Computational Linguistics},
  year = {2020},
  doi = {10.18653/v1/2020.coling-main.182},
  url = {https://doi.org/10.18653/v1/2020.coling-main.182}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/fan-2020-enhanced-knowledge-injection-model-commonsense/