Pretrained Language Models for Dialogue Generation with Multiple Input Sources
Paper · 2020 · Yu Cao, Wei Bi, Meng Fang et al.
Summary
A conversational reply can fit the speaker and still miss the point of the conversation. In personalized dialogue systems, the speaker’s profile tells the system what it can plausibly say about itself. The conversation tells it what would make sense to say now. Cao and colleagues ask how a pretrained language model can use both kinds of information while composing a reply. A common approach puts the profile, dialogue history, and developing reply into a single sequence. The authors use those same inputs but give each its own attention operation, so each can contribute separately at every stage of decoding. The experiment concerns the rule that brings those contributions together.
Starting from GPT2, the authors build an encoder to read the profile and history separately and a decoder to write the turn. As the decoder works on the reply, it can attend to its own preceding text, the profile, and the dialogue history. The authors compare ways to combine the resulting representations. An average gives the sources equal coefficients. Other rules select a maximum or minimum, learn how much to weight each source, mix features through a linear transformation, or use the profile and developing reply to determine how to combine history information. The comparison takes place on PersonaChat, where each example provides a profile, preceding turns, and a reference reply.
On the PersonaChat test set, linear fusion raises the BLEU score from 3.211% with average fusion to 4.147%. Human judgments expose a different part of the result. The average-fusion system scores 2.149 for relevance to the conversation history, compared with 2.355 for learned scalar weights and 2.332 for linear fusion. The single-sequence GPT2 comparison scores 2.385 for history relevance. Both learned alternatives score higher than that comparison on persona consistency, while average fusion has the highest persona-consistency score among the evaluated systems.
The clearest advantage for learned weighting appears in the human comparisons on longer conversations. Replies from the weighting systems win 53.2% of comparisons against average fusion in the long-history group and lose 18.6%. The shorter groups show more ties and a less decisive advantage. The result gives a specific reason to reconsider the average: it can produce fluent, persona-consistent turns while giving too little influence to a conversation that contains several potentially relevant details.
Deep dive: Pretrained Language Models for Dialogue Generation with Multiple Input Sources
Cao and colleagues test how a GPT2-based dialogue system can combine a speaker profile, conversation history, and the reply it is writing. · about 35 minutes to read
The problem and its context
A reply has several kinds of context
In a personalized conversation, the speaker’s profile supplies standing information such as an occupation, an interest, or a detail about where the speaker lives. Such information stays available across turns. A conversation history serves a different purpose. It records what the participants have said up to the current point, including the latest question and any earlier remarks needed to understand it. The reply under construction has a role of its own. Once the system starts a thought, the words it has already produced constrain how it can finish.
The difference is easy to see in a conversation about pets, a situation that appears in the paper’s examples. A profile can establish that the speaker has a cat. The dialogue can establish that the other participant has just mentioned a dog and supplied its name. The speaker can respond to the dog’s name and then mention the cat. To produce that turn, a system has to connect the current topic to an appropriate profile detail, then continue coherently after the first part of its response. A profile fact by itself supplies only part of that work. The turn also needs to acknowledge the remark that made the fact relevant.
This is a text generation problem because the output is a new response. The profile offers factual constraints, and the dialogue offers reasons to bring some of those facts into the exchange. There can be several sensible continuations. The speaker might comment on the dog, ask a question about it, or introduce the cat. An architecture for this setting therefore needs a way to make information available without requiring every piece of it to appear in the answer.
The same distinction motivates the paper’s reference to knowledgeable dialogue. There, the additional source may be an article instead of a personal profile. Its contents can help answer a question or develop a topic, while the dialogue establishes which part of the article is relevant. The paper uses personalized conversation as its experimental setting. It introduces article-grounded dialogue to show why the question of combining sources arises beyond profiles. The earlier work it cites includes both a persona-based approach to conversation and the research that introduced PersonaChat.
Why the pretrained starting point matters
The authors situate the study in work on pretraining. They describe earlier successes in natural language understanding, where a system trained in advance could be adapted to a particular task. Their examples include BERT and research on multi-task deep networks for language understanding. The accompanying work on generation asked how to bring those pretrained capabilities into the process of writing new text. In conversation, one line of work adapted pretrained generators to dialogue, including DialoGPT.
A generator designed around a single sequence offers a straightforward route to fine-tuning. Training can put the input text in front of the desired output and teach the generator to continue from there. A dialogue history followed by a reply fits that pattern. Persona information can also go at the front. The result is one sequence in which the profile comes first, previous turns follow, and the reply occupies the end. A system can add learned type information to distinguish those portions even though they travel through the same sequence.
This layout makes the profile visible to the reply and maintains the pretrained generator’s basic operating format. It also leaves the allocation of attention across the three portions to the mechanisms that process that single sequence. Being able to distinguish a profile token from a history token does not give each source a separate representation when the system combines evidence. Cao and colleagues investigate what becomes possible when that combination is an explicit operation.
How earlier work separated the inputs
An alternative described by the authors duplicates a pretrained network to form an encoder and a decoder. The encoder reads the supplied material. The decoder writes the next turn using the encoder’s representations and the reply already in progress. The paper also mentions BART as an example in which pretraining produces a complete encoder–decoder system. Its mention helps distinguish two starting points for this architecture. A system can be pretrained in that form, or an existing single-sequence generator can be adapted to serve both roles.
The immediate predecessor for the paper’s design is the work of Golovanov and colleagues. In the personalized dialogue setup that Cao and colleagues describe, the decoder has attention operations for the reply, the profile, and the history. The earlier system makes copies of the decoder attention mechanism to obtain the separate readings and combines them by averaging. That gives the decoder distinct routes to the inputs and a simple way to return to the representation size expected by the rest of the network.
The potential weakness of averaging follows from the variable roles of the sources. A question about the speaker can make a profile detail particularly pertinent. A remark about a topic established earlier in the exchange can make the history more important. The conversation also changes in length over time. If earlier turns make the crucial detail harder for history attention to select, an average has no adjustable coefficient with which to restore the influence of that branch. The paper takes up this issue without requiring any changes to the information available in each example.
Cao and colleagues also describe an earlier system by Zheng and colleagues that learns how to weight multiple attentions using an additional predictor. They distinguish their study by experimental setting. The earlier comparison did not use publicly released pretrained systems or public datasets, according to the paper, which made direct comparison with other reported results difficult. Cao and colleagues make PersonaChat and a GPT2 starting point the basis for comparing several fusion rules under one experimental design.
The question is narrower than whether pretraining helps dialogue in general. It concerns the operation that follows separate attentions. Once the decoder has a reading of its reply, a reading of the profile, and a reading of the history, it still has to turn them into a single representation for the next part of decoding. That is the point at which the paper varies the architecture.
The method, step by step
Give each source a distinct role
Consider the state of the system just before it writes more of a reply. The profile and the preceding conversation have already been supplied. The reply is the changing part. During training, the system has a reference turn from which to learn to predict the response. During inference, it has the response prefix it has produced so far. These inputs determine what the encoder and decoder need to do.
The authors initialize both parts from GPT2. The encoder processes the profile and the history separately, using the same encoder for both. The decoder receives those two encoded sequences and processes the reply in progress. Each decoder block obtains separate attention outputs for the three sources. The fusion rule combines those outputs before decoding continues through the network.
How the decoder uses the three input sources
The steps in order.
Separate encoding means that the profile is encoded as a profile sequence and the history as a conversation sequence. The encoder does not receive a joint profile-and-history sequence whose tokens can attend across that boundary. The two readings meet in the decoder. At that point the reply state can serve as a common question to both inputs. A decoder position might need information about the speaker from one source and information about a recent turn from the other.
The dimensions of the outputs make the operation practical. The profile and the history can have different lengths. Each attention operation nonetheless produces a result indexed by the reply positions. Once the decoder has a profile reading and a history reading at each such position, it can combine them with the reply’s self-attention output. The sources align by the location that requested the information, regardless of how many tokens they contain.
Read fixed context and generate changing text
The encoder and decoder begin from duplicated pretrained parameters. They have independent parameters during fine-tuning. The encoder is allowed to process the whole available profile or history with no directional attention mask. A mask would restrict which positions can see which others. Here, a token in an input sequence can use context from positions on either side because the entire sequence is available before the reply is written.
The input representations for the profile and the history bring together token, position, and token-type embeddings. An embedding is a vector representation. The token component carries information about the input item, the position distinguishes where it occurs, and the type supplies information about the kind of input being represented. The encoder turns these representations into contextual states, which are what the decoder will query.
The decoder keeps GPT2’s directional self-attention for the reply. Its triangular mask lets a reply position use earlier reply information while blocking access to later positions through that operation. The restriction matters because generation proceeds with only a prefix available. During training, access to later reply tokens through self-attention would supply information the system would lack during generation. By contrast, the profile and the history are available in full. The decoder’s attentions to these inputs do not need that directional mask.
A decoder block consequently has distinct attention modules. Self-attention reads the reply state. A separate module reads the profile, and another reads the dialogue history. The authors initialize all three from the attention module at the corresponding layer of GPT2. They then allow the parameters to develop independently. Starting from the same pretrained module gives the three operations a common initialization without forcing a useful query for personal facts to have exactly the same parameters as a useful query for conversation context.
How the decoder attends to an encoded source
The mechanism comes from the Transformer’s attention operation. In self-attention, the same sequence supplies the queries, keys, and values. A query represents what a position is looking for. A key is the representation against which a query is compared. A value contains the information the operation will collect. The paper calls the decoder’s attentions to the other sequences bi-attention. Here the reply supplies the queries and an encoded source supplies both the keys and values.
For a single head of bi-attention, the authors use the following operation.
A = softmax(((H_c W_Q)(H_a W_K)ᵀ) / √d)(H_a W_V)
A is the resulting attention output for the head. H_c is the current reply state, taken from the preceding layer or from the reply embeddings when the decoder starts. H_a is an auxiliary sequence’s encoded state. It is the persona state H_p for profile attention or the history state H_h for history attention. The subscripts c, a, p, and h distinguish the current reply, the auxiliary input in general, the profile, and the history. W_Q, W_K, and W_V are learned matrices that project the states into queries, keys, and values. The superscript ᵀ transposes the matrix of projected keys. The products between queries and transposed keys give compatibility scores. d is the dimension used for scaling in the paper’s formula, and √d is its square root. softmax converts the scores for a query into weights over the auxiliary positions. The final matrix multiplication uses those weights to combine the projected values.
For each reply position, the operation compares the query with positions in the selected input. If some positions get more weight, their values have more influence on the resulting vector. Several attention heads allow several such readings within the same module. The formula describes a head. The fusion comparison takes place on the outputs of the whole attention modules.
The resulting layout is important for interpreting the paper. The authors write L_c for the length of the reply state and L_a for the length of the auxiliary input. Before attention, the auxiliary sequence has L_a rows. After the reply queries it, the representation has L_c rows because the operation produces an answer for each reply position. The paper calls the three module outputs A_c, A_p, and A_h. They have the same reply length and feature dimension. The network needs a fused A_f of the same shape so decoding can continue.
The contents of A_h therefore already depend on the history and on the current reply state. A later rule that assigns more weight to A_h acts on a reading of the history, not directly on a history token or an utterance. That distinction matters when examining the learned scalar weights. They tell us about coefficients on branch outputs. An individual sentence in the history can receive different treatment inside the branch even when the coefficient on the whole branch stays fixed.
Fuse the attention outputs by a fixed rule
Average fusion is the simplest comparison. It takes corresponding entries from the reply, profile, and history outputs and averages them. The function is the same across layers, positions, and examples. The attention outputs themselves can still vary with the inputs, so an average does not force every reply to use the same information. It fixes the operation that combines the representations after the attentions have done their work.
The authors also test an elementwise maximum and an elementwise minimum. For any position and feature, maximum fusion keeps the largest entry among the sources. Minimum fusion keeps the smallest. Different features can take their values from different branches, even at the same position. The rule itself has no learned parameters. For instance, the feature with the largest value might be in the history output for one reply position and in the profile output for another.
A minimum or maximum operates on activation values. It does not assess whether a sentence is pertinent to the conversation or consistent with the profile. Any benefit comes from how the network learns to represent information under that fixed combining operation. These settings help establish how far a change in the fusion function can go before introducing any learned fusion coefficients.
Learn a coefficient for each source
The scalar method, abbreviated sw, gives each decoder layer a learned weight for the reply branch, the profile branch, and the history branch. The authors compute the fused result as follows.
A_f = (w_c A_c + w_p A_p + w_h A_h) / (w_c + w_p + w_h)
A_f is the fused attention output. A_c, A_p, and A_h are the attention outputs for the current reply, profile, and history. The scalars w_c, w_p, and w_h are the corresponding learned weights. A scalar multiplying a matrix scales every entry in that matrix. The plus signs add the scaled outputs, and division by the sum of the weights normalizes the combination. The paper assigns a separate set of scalars to each decoder layer.
The weights stay fixed once training is complete. A layer can give the history branch greater influence whenever that layer is used, for instance, while a later layer can adopt a different balance. For any particular reply, the history representation still varies with the input and with the query. The learned coefficient simply controls how that representation enters the next stage. This makes sw a relatively direct way to ask whether a single equal balance across sources and layers is too restrictive.
The dimension-weighted method, dw, gives each source a learned vector of weights. Corresponding features across the attention outputs can now have different source proportions. Written for a feature entry at a reply position, the normalized combination is as follows.
A_f[i,j] = (w_c[j] A_c[i,j] + w_p[j] A_p[i,j] + w_h[j] A_h[i,j]) / (w_c[j] + w_p[j] + w_h[j])
i indexes a reply position, and j indexes a feature dimension. A_f[i,j] is the fused entry at that position and dimension. A_c[i,j], A_p[i,j], and A_h[i,j] are the corresponding entries in the three attention outputs. w_c[j], w_p[j], and w_h[j] are the source weights for feature j. Each weight vector has length d, the feature dimension. The products scale the entries and the divisor is the sum of their corresponding weights. The same feature weights apply across positions for a given layer.
This version leaves the combination aligned along feature coordinates. If the decoder is constructing a particular output feature, the rule uses the corresponding feature from each source. It can give that coordinate more influence from the profile and give another more influence from the history. It has no operation for moving information from one coordinate to another within the fusion itself.
Mix features with a linear transformation
The linear method starts by concatenating the reply, profile, and history attention outputs along the feature dimension. Each reply position now has access to all the features returned by all three attentions. A learned linear transformation converts that larger representation to the decoder’s working width. An output coordinate can draw information from any input coordinate in any of the branches.
There are two different uses of concatenation in the paper. The single-sequence baseline concatenates the source texts before the network reads them. Linear fusion concatenates representations produced by distinct attentions after each input has already been read in relation to the reply. The latter lets each source supply a separate answer at the same reply position before the learned transformation mixes them.
Like the scalar and dimension weights, the parameters of the linear transformation stay fixed at inference. Its outputs still change with the input representations. The added flexibility comes from how those representations can interact in the projection. A feature returned by profile attention can contribute to an output feature alongside a differently indexed feature from the history. Dimension weighting restricts that interaction to corresponding features.
Use the reply and persona to combine history readings
The attention-based method, att, makes the fusion weights depend on the current inputs. It constructs compatibility scores from the reply and profile attention outputs, then uses the resulting weights to mix the history attention output. This gives the history branch a special role. It supplies the values being combined, while the reply and profile determine the combination.
Z = softmax((sign(A_c A_pᵀ) ⊙ √|A_c A_pᵀ|) / √d) A_h
Z is the fused result. A_c, A_p, and A_h are the reply, profile, and history attention outputs. A_pᵀ is the transpose of the profile output. The matrix product A_c A_pᵀ compares the reply and profile representations. sign preserves the positive or negative sign of each score. The absolute-value bars | | remove the sign before the square root √ is taken. ⊙ denotes elementwise multiplication, which restores the sign after that square root. The denominator √d scales the transformed scores by the square root of the feature dimension. softmax converts the scores to weights, and multiplying by A_h uses those weights to combine the history representations.
Each matrix in the formula is already indexed by reply position. The matrix of scores thus relates rows of the reply attention output to rows of the profile attention output. It is not a fresh comparison with the raw tokens in the persona profile. The history matrix contains the readings of the history already produced for the reply positions. The final operation mixes those readings using the computed weights.
The square root lets the operation transform the magnitudes while the sign preserves whether the original score was positive or negative. The key architectural distinction for the experiment is the choice of values. Profile and reply information affect the weights, while the history representation supplies the content entering the weighted sum. By comparison, scalar weighting and linear fusion give the reply and profile outputs direct paths into the final representation.
Train the source readings and the reply prediction together
The authors use a common linear prediction layer on the encoder and decoder outputs. They split the training objective into a persona language loss, a history language loss, and a reply prediction loss. Each is a cross-entropy loss, which measures how much probability the predictions give to the target sequence. The model predicts scores for candidate tokens and is penalized when those scores give too little probability to the corresponding target tokens. The authors describe the design as drawing on multitask learning because the network is trained with objectives for the individual sources as well as for the desired reply.
L = α L_persona + β L_history + γ L_pred
L is the overall training loss. L_persona compares predictions from the profile encoding with the profile targets. L_history does the same for the dialogue history. L_pred is the decoder’s prediction loss for the reference reply. α, β, and γ are hyper-parameters for the persona, history, and reply losses, respectively. Each coefficient multiplies its associated loss, and the sum determines the training objective. These coefficients control the training signals. The fusion weights control the combination of attention outputs inside a decoder block.
The prediction layer shares weights with the decoder’s embedding layer. That is a specific tie within the architecture. The encoder and decoder parameters remain independent, as do the three attention modules within each decoder layer. For the additional fusion mechanism, the appendix reports uniform initialization for the source-weighting methods and initialization from a normal distribution for linear and attention-based fusion.
The authors build their GPT2 variants with HuggingFace Transformers and use the small GPT2 configuration, with 12 layers and 768 hidden dimensions. They report an initial learning rate of 5e-4, a warmup proportion of 0.002, and linear decay after warmup. The additional fusion module uses a learning rate of 5× the current rate for the other parameters. Training runs for 5 epochs with mini-batches of size 256. The authors manually select hyper-parameters using BLEU, METEOR, and NIST. They optimize the combined loss with Adam.
The implementation details say that only the latest 7 utterances are kept to stay within the input length limit. The authors run beam search at inference time with a beam width of three on every system they test. Beam search considers several candidate continuations as it constructs the reply. The authors add a length penalty to influence the search’s treatment of candidates of different lengths, with the aim of preserving variety in the output. The paper reports running the experiments on a single NVIDIA V100 with CUDA10 and makes the implementation available.
Experiments and results
The examples and the comparisons
The dataset is PersonaChat, also used in the ConvAI2 challenge. The paper reports 164,356 utterances across 10,981 dialogues and 1,155 personas. An example contains the preceding conversation, a reference continuation, and the persona description used to condition that continuation. The dataset allows histories of up to 15 utterances and descriptions of no more than 5 sentences. These dataset limits describe the examples available before any shortening for a particular system. The training setup separately reports retaining the latest 7 history utterances.
The authors use a sequence-to-sequence system with attention as the end-to-end single-input baseline. Its encoder and decoder each use a 6-layer Transformer. The connection to earlier sequence-to-sequence attention is the ability of a decoder to choose relevant information from the encoder’s representations as it generates. The baseline supplies a comparison with a system outside the paper’s family of GPT adaptations. The paper credits the earlier work on learning alignment and translation together for this attention-based sequence-to-sequence approach.
TransferTransfo puts the persona, dialogue history, and reply in sequence and uses token-type embeddings to mark their roles. Its pretrained starting point is OpenAI GPT. The authors build TransferGPT2 by substituting GPT2 in that arrangement. These systems test what can be done with a single stream of text carrying information about the source of each portion. The appendix reports using the official TransferTransfo implementation with its default fine-tuning settings.
The earlier multi-input comparison, MI-GPT, uses OpenAI GPT for the encoder and decoder and averages the separate attention outputs. The authors report using the official earlier implementation with its default settings. Their GPT2-avg baseline uses the proposed GPT2 adaptation with average fusion. It is the principal reference for judging the fusion variants because the same architecture provides the separate attention branches. Comparisons with the earlier multi-input system offer context, but that earlier work and the authors’ adaptation also differ in their treatment of attention parameters.
The experimental family attaches the name of a fusion rule to GPT2. GPT2-max and GPT2-min use the static extrema. GPT2-sw and GPT2-dw use normalized scalar or feature-specific weights. GPT2-linear learns a transformation of the combined feature representation. GPT2-att uses the input-dependent rule whose values come from history attention. These setting names identify what differs at the point where the three readings meet.
What the evaluation measures
The paper’s evaluation combines comparisons with reference text, measures of the generated corpus, and human judgments. BLEU, METEOR, and NIST-4 serve as automatic measures of similarity to the reference replies. In this context, that is a measure of agreement with the phrasing of a recorded continuation. A dialogue example can have more than one plausible reply, so a word sequence that fits the history may still differ from the reference. The paper therefore reports these scores alongside judgments about the replies themselves. The measures draw on earlier work on BLEU and METEOR.
Entropy-4 and corpus-level Distinct-2 describe aspects of output variety. The entropy measure concerns the distribution of recurring word sequences. Distinct-2 concerns variety among adjacent token pairs across the generated corpus. Average reply length gives another piece of context for the diversity scores. A group of shorter replies can have a different pattern of repeated phrases from a group of longer ones, and the two diversity measures need not rank the systems in the same order.
The authors also evaluate 200 PersonaChat dialogue examples with human judgments. Fluency and relevance to the dialogue history use a scale from 1 to 3. Persona consistency uses a binary scale with values 0 and 1. Fluency concerns how naturally the reply reads. History relevance, called h-rel in the paper, concerns whether the reply fits the conversation. Persona consistency, called p-consist, concerns whether the reply is compatible with the speaker description. Scoring these aspects separately lets a fluent sentence receive a low history score if it ignores the conversation, or a relevant sentence receive a low consistency score if it invents a conflicting personal detail.
The human evaluation covers representative systems, including the reference replies, the single-stream and average-fusion GPT comparisons, and the scalar and linear weighting alternatives. It gives direct evidence about those alternatives’ conversation and profile scores. The automatic comparison is broader. It includes settings such as minimum fusion, dimension weighting, and attention-based fusion for which the main results do not report human ratings.
Reference similarity favors learned fusion
On the PersonaChat test set, GPT2-linear has the highest BLEU, METEOR, and NIST-4 scores in the reported comparison. Its BLEU is 4.147%, its METEOR is 8.988%, and its NIST-4 is 1.408. GPT2-sw is close on NIST-4 with 1.407, and obtains 3.949% BLEU and 8.881% METEOR. Against GPT2-avg, which scores 3.211% BLEU, 8.149% METEOR, and 1.291 NIST-4, the two settings improve all three reference-similarity measures. The GPT2-avg comparison keeps the encoder–decoder arrangement and the separate attention branches in view while changing the operation that brings their outputs together.
Fusion settings on the PersonaChat test set by BLEU
Linear fusion leads the comparison, with scalar weighting ahead of the fixed fusion rules.
The numbers
| System or setting | BLEU % |
|---|---|
| GPT2-avg | 3.211 |
| GPT2-max | 3.344 |
| GPT2-min | 3.774 |
| GPT2-sw | 3.949 |
| GPT2-dw | 3.714 |
| GPT2-linear (this paper) | 4.147 |
| GPT2-att | 3.659 |
The fixed rules also produce changes worth examining. GPT2-min records 3.774% BLEU, 8.661% METEOR, and 1.388 NIST-4 on the test set. In those comparisons, an untrained fusion rule improves on the average simply by selecting a different way to combine features. GPT2-max obtains 3.344% BLEU and 8.156% METEOR, but its NIST-4 is 1.206. Thus it improves the first two measures over average fusion while scoring lower on the third. GPT2-att follows a similar pattern across those measures. It records 3.659% BLEU and 8.449% METEOR, with NIST-4 at 1.249.
The ranking within the weighting approaches depends on the metric. GPT2-dw reaches 3.714% BLEU, 8.694% METEOR, and 1.385 NIST-4. All three are below the corresponding GPT2-sw values. Linear fusion leads the overlap measures, while scalar weighting has the higher corpus-level Distinct-2, at 15.294% against 15.237% for linear fusion. The paper’s broader conclusion in favor of weighting comes from considering several measures together. The individual rankings give a more precise account of what changes.
The comparison across systems also shows the effect of using different pretrained starting points. In the single-stream setup, TransferGPT2 obtains 2.273% BLEU, 7.872% METEOR, and 1.194 NIST-4, while TransferTransfo obtains 2.054% BLEU, 7.672% METEOR, and 1.183 NIST-4. In the average-fusion multi-input comparisons, MI-GPT records 3.151% BLEU, 8.112% METEOR, and 1.264 NIST-4. GPT2-avg is higher on those measures. The authors describe this general pattern as evidence for GPT2 as a starting point. The substitution in the single-stream comparison is the more direct test of that claim.
The end-to-end Seq2seq baseline registers 1.769% BLEU, 6.926% METEOR, and 1.028 NIST-4 on the PersonaChat test set. It is below the pretrained dialogue systems on the reference-similarity metrics. That establishes the baseline’s place in the reported comparison. The experiment on fusion takes its main evidence from the GPT2 variants, where the systems have much more in common.
Variety and length give a different ordering
The single-stream comparisons have high diversity scores among the generated systems. TransferTransfo reaches 8.429 Entropy-4 and 17.917% Distinct-2, with an average reply length of 7.824. TransferGPT2 records 8.263 Entropy-4 and 16.444% Distinct-2, with an average length of 8.036. GPT2-avg gives 7.904 Entropy-4 and 13.612% Distinct-2, with an average length of 8.932. The authors note that the concatenated-input systems tend to produce shorter replies even as they obtain higher diversity scores.
Learned fusion raises diversity measures within the GPT2 encoder–decoder family in the reported results. GPT2-linear records 8.279 Entropy-4, 15.237% Distinct-2, and a mean length of 9.011 on the test set. GPT2-sw has 8.228 Entropy-4, 15.294% Distinct-2, and a mean length of 9.068. Both diversity comparisons improve on GPT2-avg. The paper reports 10.725 Entropy-4 and 36.688% Distinct-2 for the human reference replies, with an average length of 11.507. The references give context for how much of the variety in PersonaChat the generated outputs display.
A higher diversity score captures variation across outputs. Relevance asks whether particular variation is appropriate for the current example. These evaluations can therefore move in different directions. A system may frequently use different phrases while making little use of a particular earlier turn. Another may draw consistently on the persona, repeatedly using common patterns for introducing profile facts. The diversity scores describe the corpus-level pattern, while the relevance and consistency scores are judgments about individual replies.
Human judgments reveal a trade-off
The relevance ratings put a different comparison at the center of the results. The longer-output, average-fusion systems attain strong persona consistency but score below the single-stream comparisons on history relevance. On the human-evaluated PersonaChat subset, TransferGPT2 scores 2.385 for history relevance and TransferTransfo scores 2.348. MI-GPT scores 2.150 and GPT2-avg scores 2.149. This ordering differs from the test-set reference-similarity metrics, which favor the average-fusion systems over the corresponding single-stream comparisons.
Learned scalar and linear fusion raise history relevance relative to GPT2-avg. GPT2-sw scores 2.355 and GPT2-linear scores 2.332. The scalar result is the highest for the proposed fusion variants with human judgments. TransferGPT2 remains highest among the generated systems in the aggregate history comparison, and the human reference replies score 2.645. The aggregate scores support the claim that weighting recovers much of the history relevance seen with a concatenated input. The history-length analysis identifies where it can surpass that comparison.
Human-rated history relevance on the PersonaChat evaluation subset
Scalar and linear fusion improve on averaging, while the concatenated GPT2 comparison leads the generated replies overall.
The numbers
| System or setting | History relevance |
|---|---|
| MI-GPT | 2.150 |
| GPT2-avg | 2.149 |
| TransferTransfo | 2.348 |
| TransferGPT2 | 2.385 |
| GPT2-linear | 2.332 |
| GPT2-sw (this paper) | 2.355 |
| Human replies | 2.645 |
Persona consistency moves in the opposite direction when replacing the single-stream comparisons with average fusion. TransferGPT2 scores 0.548 and TransferTransfo scores 0.542 on the human-evaluated subset. MI-GPT reaches 0.628 and GPT2-avg reaches 0.648. The learned alternatives retain an advantage over the single-stream systems, with scores of 0.595 for GPT2-sw and 0.602 for GPT2-linear. Their consistency scores fall below GPT2-avg. The tradeoff is consequently visible on both sides. The weighting methods recover conversation relevance relative to averaging, while averaging retains the highest persona-consistency score among the evaluated systems. The human reference replies score 0.598 for persona consistency.
Fluency varies less across the evaluated settings. On the same subset, the reference replies score 2.901. GPT2-avg scores 2.838, GPT2-sw scores 2.814, GPT2-linear scores 2.777, and TransferGPT2 scores 2.785. The authors attribute the generally high fluency in part to the pretrained starting point. The clustering of the fluency scores helps explain why the paper puts so much emphasis on the other dimensions. A generator can write a fluent sentence before it has learned to connect the right personal detail with the right moment in the conversation.
What the ablations show
Changing fusion within one architecture
The comparison among GPT2 fusion settings is the paper’s closest controlled test of the proposed change. It preserves the encoder–decoder architecture and the three separate attention outputs, then compares rules for combining them. This gives average fusion a particular role. It represents the same separation of sources but keeps their combination fixed and equal. Improvements over it point to the combining operation within the tested setup.
The fixed rules establish that equal averaging is a consequential choice even among operations with no trainable fusion parameters. Minimum fusion outperforms it on the reference-similarity metrics reported in the main table. Maximum fusion gives a smaller improvement in BLEU and METEOR and a lower NIST-4. Since both rules make a selection by feature, their different results show that moving away from an average is only part of the story. The direction and form of that change matter.
Scalar and dimension weighting test whether it helps to let source coefficients vary by feature. The dimension-specific setting provides more adjustable coefficients, but scalar weighting scores higher on the reported reference-similarity measures. It also has higher Entropy-4 and Distinct-2 on the PersonaChat test set. This is a result about the two tested parameterizations under the authors’ training procedure. It leaves open what feature-specific weighting might do under different conditions. Within this experiment, a layer-dependent balance among whole sources is enough to produce a strong improvement.
Linear fusion opens another kind of flexibility. It can combine features across dimensions, whereas dimension weighting combines corresponding features only. It yields the highest reference-similarity scores in the comparison. On the human-evaluated subset, scalar weighting has the higher aggregate history-relevance and fluency scores of the two, while linear fusion has the higher persona-consistency score. The evaluation consequently distinguishes the benefit of richer feature mixing on the automatic measures from the balance the two systems achieve in judged replies.
The attention-based setting tests a narrower kind of input dependence. Its weights adapt to the reply and profile representations, and the history branch supplies the values. The authors connect its weaker results to this arrangement. A profile can influence the selection of history representations without contributing its own representation directly to the fused output. The design also removes the direct contribution of the reply attention output at that point. The result provides evidence about this specific attention-based construction. Its performance combines the effects of input-dependent weights and the asymmetric choice of values.
Grouping human judgments by conversation length
The paper asks whether the recovery in history relevance depends on how much dialogue precedes the reply. The authors take the 200 examples used in human evaluation and group them by dialogue history length. The long group has more than 9 utterances, the short group has 3 utterances or fewer, and the remaining examples form the medium group. Within each group, they compare replies on the history-relevance score. They report the percentages for which the first setting wins, ties, or loses against the second.
For this analysis, the authors group GPT2-sw and GPT2-linear as the weighting systems. On long histories, these systems win 53.2% of the human history-relevance comparisons against GPT2-avg, tie 28.2%, and lose 18.6%. In the medium group they win 37.0%, tie 31.1%, and lose 31.9%. In the short group the corresponding values are 29.3%, 45.2%, and 25.5%. The higher share of ties in the short group fits the paper’s observation that the fusion methods behave more similarly when the available history is brief. The stronger advantage in the long group accounts for the paper’s emphasis on longer conversations.
The weighting systems also do better against TransferGPT2 within the long group. They win 39.7% of those history-relevance comparisons, tie 35.5%, and lose 24.8%. In the medium group, they win 28.9%, tie 37.1%, and lose 34.0%. In the short group, they win 24.1%, tie 43.7%, and lose 32.2%. This result and the aggregate score answer different questions. The long group favors weighting in the pairwise comparison. Across the full human-evaluated subset, TransferGPT2 retains the higher mean history-relevance score.
The paper also groups the average-fusion multi-input baselines and compares them with the single-input baselines. In this comparison, the multi-input baselines lose 52.2% of the time for long histories, 48.9% for medium histories, and 38.3% for short histories. Their win shares are 17.7%, 22.2%, and 18.9% in the same groups. This repeats the single-stream advantage over average fusion across the length groups while showing a particularly large loss share in the long group.
The authors’ explanation starts inside the history attention operation. When the history is longer, there are more positions across which a reply query can spread its attention. An important token can then contribute relatively little to the history reading. The fusion operation takes that reading and places it alongside the profile and the reply readings. If it always averages, the contribution of the history branch stays tied to the contribution of the other branches. A learned rule can put additional weight on useful history features or give the history reading more influence in a layer. The observed comparisons establish that the weighting systems better preserve judged relevance on longer examples. The explanation about individual history tokens is the authors’ account of how that pattern may arise.
This account involves two levels of weighting. The history attention module weights positions within the encoded conversation. Fusion then determines the influence of its output alongside the outputs of the other attention modules. The length comparison changes the kind of examples on which the entire system is evaluated. It does not separately intervene on one operation while holding the other fixed. Consequently, it locates a condition under which the fusion choice matters, with the token-level explanation remaining an interpretation of the mechanism.
Inspecting the layer weights
The scalar setting makes it possible to examine the learned coefficients directly. The paper visualizes their normalized values for the profile, history, and reply in each decoder layer. The source weights differ across layers and can be unequal within a layer. The authors describe a pattern in which lower layers show greater differences among the weights and higher layers tend towards more similar values.
This provides a direct comparison with an assumption made by average fusion. The trained system does not settle on uniform coefficients everywhere when it has the option to learn separate ones. The authors relate the layer pattern to the way already encoded profile and history information is represented at different depths. The figure establishes the distribution of fusion coefficients. It does not reveal which dialogue turn contributed to a specific reply or how much a particular profile statement mattered. The scalar is applied after each attention branch has formed its representation, and the later decoder operations also affect the output.
Together with the human results, the visualization suggests a reason the scalar rule can be effective despite its simplicity. There is evidence of different source balances across layers. Such a difference can be learned with one coefficient per source at each layer, without making the fusion dynamically select a new set of coefficients for each example. What changes from conversation to conversation is the content presented by each branch.
Looking at individual replies
The appendix illustrates how the same scores can come from different kinds of reply. In one example with a history labeled length 13, the other speaker introduces a dog and supplies its name. The persona for the replying speaker includes having a cat. The human reply acknowledges the other speaker and brings up the cat. TransferGPT2 responds to the dog’s name but changes the speaker’s household pets. GPT2-avg stays close to the topic of pets while also giving an inconsistent count. GPT2-linear acknowledges the name and mentions a cat, linking the current exchange to the relevant part of the profile. On that example, TransferGPT2 and GPT2-linear both receive 3 for history relevance. Their persona-consistency scores are 0 and 1, respectively. A turn can receive full history credit while getting its speaker’s details wrong.
A different example, with a history labeled length 9, ends with a question about work. The profile includes living in New York and liking jazz. The reply from GPT2-avg invents a domestic occupation. The scalar reply mentions city life and jazz, and the linear reply mentions laboratory work in New York. The average-fusion response receives 2 for history relevance, while the scalar and linear responses receive 3. All three receive 1 for persona consistency in that example. The profile can be compatible with several different replies, and the directness with which a reply takes up the latest question can distinguish them on history relevance.
The shorter cases show how these patterns can weaken or reverse. In a history labeled length 5, the other participant says they take teddy bears to children at a hospital. The reply examples include different uses of profile details, including ice cream and being a homebody. GPT2-avg, GPT2-sw, and GPT2-linear each receive 3 for history relevance and 1 for persona consistency, even though their wording and how they introduce personal information differ. The scores allow several responses to satisfy the same conversational criteria.
In the case labeled length 3, the final turn concerns difficulty seeing colors and help from a family member. The scalar system introduces a personal detail about schooling and a future occupation. It scores 1 on history relevance and 1 on persona consistency. GPT2-linear acknowledges the participant’s difficulty and asks a question. It scores 3 on history relevance and 0 on persona consistency. This shows in concrete terms why the paper reports the two judgments separately. A reply that expresses the profile can miss the immediately preceding remark, while a reply that addresses that remark can receive no credit for persona consistency.
These examples illustrate behaviors that the aggregate results alone cannot distinguish. They show acknowledgment of a current remark, reuse of a personal detail, and direct insertion of profile material at an awkward point. They also show cases where the systems receive the same numerical judgment despite producing visibly different turns. The length-group comparison is the paper’s broader evidence about when the differences recur.
Limitations
Scope and trade-offs identified by the authors
The authors’ proposed explanation for the attention-fusion result is specific to the tested design. Their input-dependent method combines history values, leaving the reply and persona to shape the weights. They regard that restriction as a reason it does less well than the weighting methods on most automatic measures. The study therefore supports a comparison with a particular kind of attention-based fusion. It leaves open how input-dependent fusion would perform with direct value contributions from every source.
The authors also identify limits to the observed advantage in the short cases. Their examples show that when history is brief, the encoder–decoder systems can fall back on generic replies or surface profile details. They interpret the lack of history as making it difficult to connect the profile to an ongoing topic. A more flexible fusion rule can change the relative influence of the inputs, while the available conversation still determines what connections can be made.
The conclusion proposes extending the architecture to other dialogue tasks and to a different number of sources. The experiments concern PersonaChat with a profile, dialogue history, and the reply in progress. The paper establishes the behavior of the tested rules in that case. Its references to grounding a response in a knowledge article explain a broader motivation, while results for that setting remain outside the experiment.
The authors restrict human evaluation to baselines and representative learned weighting systems selected in light of the automatic results. The detailed human claims therefore concern scalar and linear fusion. Minimum fusion achieves competitive reference similarity in parts of the experiment, but the paper provides no direct human comparison showing where it would fall on the balance between history relevance and persona consistency. The same qualification applies to the dimension-weighted and attention-based settings.
Limits of the experimental evidence
The scope is one dataset and one reported size of GPT2. The comparisons show what happened after the authors adapted that pretrained generator and used the reported training and decoding procedure. They do not establish a general ordering of these fusion rules across pretrained starting points, profile formats, or dialogue tasks. In particular, a source such as an article can differ from a persona description in length and in how much relevant information it contains. The paper’s design can accept a separate source, while the best way to fuse it remains an empirical question.
The length analysis has an important qualification. The implementation appendix reports retaining the latest 7 utterances. The human analysis defines a long group with more than 9 utterances, and the case study includes an example labeled length 13. The paper does not fully specify the relation between those analysis labels and how many utterances each system actually processed in those cases. The findings establish differences among examples grouped by their reported history lengths. They do not, by themselves, show that a system used an utterance more than 9 turns back or that every utterance counted in a long example was present in the decoder’s input.
The pairwise percentages describe the distributions of wins, ties, and losses within those length groups. The comparison does not give the number of examples in each group or uncertainty intervals for those percentages. In particular, a difference between the medium and short results could depend on the composition of those groups. The group results show where the reported advantage appears in this evaluation. The precision with which that advantage would recur in further samples is unspecified.
The human consistency score also needs to be read with the rating criterion in mind. The human references themselves score 0.598 on the evaluated subset, below the mean for GPT2-avg. That ordering shows that the rating is a particular judgment about the supplied persona. It cannot serve by itself as an overall quality ranking of the references and the generated replies. Similarly, a reply can fit the profile and read fluently without giving an appropriate answer to the previous speaker. Reporting all three judgments is what makes such failures visible.
The automatic metrics are also part of the manual hyper-parameter selection procedure. They are informative about agreement with the reference and about changes across settings, but they offer a limited basis for identifying the most useful response in any individual conversation. The strongest reference-agreement result belongs to linear fusion, while the best aggregate human history-relevance score among generated replies belongs to TransferGPT2. That difference is consistent with the evaluation measuring overlapping but distinct aspects of the output.
Finally, the paper varies the fusion rules as complete mechanisms. It does not separately remove the auxiliary training losses, hold the cross-source features constant while changing their coefficients, or compare alternative choices of values within the attention-based rule. The scalar visualization indicates that learned layers take advantage of unequal coefficients. The human experiments show where that choice accompanies better judged relevance. Neither analysis independently isolates every component that produced the improvement.
What came after
No later citing study is identified for this paper. The authors’ conclusion leaves an extension open to other dialogue tasks and to setups with a different number of information sources. Their experiments establish the comparison for PersonaChat, where the sources are a speaker profile, a conversation history, and the developing reply. They provide no later evaluation of how the same fusion rules behave when one of those inputs is replaced by a knowledge article or when a further source is added.
Cite
Cite as Yu Cao, Wei Bi, Meng Fang and Dacheng Tao. 2020. Pretrained Language Models for Dialogue Generation with Multiple Input Sources. Findings of the Association for Computational Linguistics: EMNLP 2020.
@inproceedings{cao2020pretrained,
title = {{Pretrained Language Models for Dialogue Generation with Multiple Input Sources}},
author = {Yu Cao, Wei Bi, Meng Fang and Dacheng Tao},
booktitle = {Findings of the Association for Computational Linguistics: EMNLP 2020},
year = {2020},
doi = {10.18653/v1/2020.findings-emnlp.81},
url = {https://doi.org/10.18653/v1/2020.findings-emnlp.81}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/cao-2020-pretrained-language-models-dialogue-generation/