---
title: "A Context-aware Natural Language Generator for Dialogue"
description: "A trainable dialogue generator uses the preceding user turn to adapt its wording while preserving the information it is supposed to convey."
canonical: "https://research.elamur.ai/free/en/papers/dusek-2016-context-aware-natural-language-generator/"
---
Elamur: [Mova](https://md.mova.elamur.ai/free/en/) · [Parse](https://mova.elamur.ai/free/en/parse/) · [Dictionary](https://md.dictionary.elamur.ai/free/en/) · [Translate](https://md.translate.elamur.ai/free/en/) · **Research** · [Gali](https://md.gali.elamur.ai/free/en/) · [MCP](https://mcp.elamur.ai/) · [Locations](https://md.locations.elamur.ai/free/en/) · [Weather](https://md.weather.elamur.ai/free/en/) · [Constitution](https://md.constitution.elamur.ai/)

[Elamur Research](https://md.research.elamur.ai/free/en/) · [this page in HTML](https://research.elamur.ai/free/en/papers/dusek-2016-context-aware-natural-language-generator/)

[Elamur Research](https://md.research.elamur.ai/free/en/) / [papers](https://md.research.elamur.ai/free/en/papers/) / [2016](https://md.research.elamur.ai/free/en/papers/2016/) / A Context-aware Natural Language Generator for Dialogue Systems

# A Context-aware Natural Language Generator for Dialogue Systems

Paper · 2016 · Ondřej Dušek and Filip Jurčíček

**Authors:** [Ondřej Dušek](https://md.research.elamur.ai/free/en/authors/ondrej-dusek/) and [Filip Jurčíček](https://md.research.elamur.ai/free/en/authors/filip-jurcicek/) · **Year:** 2016 · **Venue:** Proceedings of the 17th Annual Meeting of the Special Interest Group on Discourse and Dialogue · **Licence:** [CC BY 4.0 (ACL Anthology)](https://creativecommons.org/licenses/by/4.0/)

[**52** citations OpenAlex, 2026-10-14](https://openalex.org/works?filter=cites:W2518570122) · [Cited by **32** papers in our library of more than 163,000 papers whose bibliographies we read](https://md.research.elamur.ai/free/en/papers/dusek-2016-context-aware-natural-language-generator/cited-by/) · [Proceedings of the 17th Annual Meeting of the Special Interest Group on Discourse and Dialogue](https://aclanthology.org/volumes/W16-36/) · [licence](https://creativecommons.org/licenses/by/4.0/)

- [Publisher's page](https://aclanthology.org/W16-3622/)
- [PDF](https://aclanthology.org/W16-3622.pdf)
- [DOI 10.18653/v1/w16-3622](https://doi.org/10.18653/v1/w16-3622)
- [OpenAlex](https://openalex.org/W2518570122)

Citations: OpenAlex, 2026-10-14.

## Summary

A transit system can give someone the right route and still sound as though it has missed the question. If a rider asks for another option, the system can present the next itinerary as an available alternative or phrase the same information as an instruction to take a particular bus. Both responses can contain the required route details. They differ in how they pick up the conversation. Dušek and Jurčíček study whether the language generator in [dialogue systems](https://md.research.elamur.ai/free/en/topics/dialogue-systems/) can learn to make that choice from examples of what people say and how someone might answer them.

The generator starts with a dialogue act, a structured description of what the system is supposed to communicate. It might tell the generator to inform the rider about a bus and supply the line, departure time, and stops to mention. The authors add the preceding user utterance in several ways. They let the generator read it alongside the dialogue act, either in the same input sequence or through a separate encoder. They also try using the utterance after generation, to promote candidate replies that reuse a word or short phrase. A separate check favors replies that convey the required information.

On the Manhattan transit test data, feeding the user’s words into the generator by itself lowered both automatic scores relative to the baseline. Reranking alone helped. The strongest setting let the generator read the user utterance before the dialogue act and then used word and phrase overlap to choose a reply. This setting reached 69.26 on the [BLEU score](https://md.research.elamur.ai/free/en/concepts/bleu/) and 7.772 on NIST, compared with 66.41 and 7.037 for the baseline. The authors also asked people which reply sounded more natural after reading the user’s turn. In the sampled comparisons where the systems produced different replies, judges preferred the context-aware version in 52.5% of judgments.

The study shows how access to the preceding turn and the choice among candidate replies can work together. The examples include replies that pick up the rider’s wording and others that change the way a route is introduced. The automatic results establish a gain against reference replies in this dataset, and the human test adds a modest preference for the combined setting. The experiment uses transcriptions of individual user turns in a stand-alone generation task. How the generator would affect a live conversation with speech recognition remains open.

## Deep dive: A Context-aware Natural Language Generator for Dialogue Systems

A trainable dialogue generator uses the preceding user turn to adapt its wording while preserving the information it is supposed to convey. · about 36 minutes to read

**In this deep dive**

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

### The problem and its context

#### What the generator is responsible for

A task-oriented spoken dialogue system has to decide what action to take and express that action in words. The paper begins at the point where the action has already been decided. A dialogue act identifies the communicative action, such as informing the rider or requesting information. It can also specify slots, which are named attributes, together with the values that belong in them. A bus line is a slot and M102 is a value. A departure time is another slot. Together the action and its slots make up the meaning representation the generator receives.

This division of labor makes the problem concrete. When the input says to inform the rider about a departure, the generator has to turn the supplied facts into a sentence. It does not have to decide which itinerary to offer. Several sentences can express the same act and contain the same facts. One can lead with the availability of a bus, another with the departure time, and another with an instruction to board a particular line. These choices matter because the listener hears the sentence as part of an exchange.

The paper’s illustration uses a question about another option and a dialogue act containing details for M102. It contrasts an instruction to take the bus with a reply that presents the departure as an available option. Both cover the transit information. The second framing follows more directly from a question about whether an alternative exists. The example explains why [text generation](https://md.research.elamur.ai/free/en/topics/text-generation/) can make better use of context even when the dialogue act already specifies all the facts the speaker needs to convey.

A dialogue act can carry some consequences of earlier turns. For example, the action the system chooses may reflect what the user just requested. The act can still leave out the wording that made the request. A rider could ask whether there is a later option while the act represents the request in terms of the next alternative. The act lets the generator identify the substance of the confirmation. The rider’s phrasing gives it a choice about whether to present that confirmation in terms of lateness, sequence, or availability.

This distinction also matters when the request uses ordinary words that the dialogue act has little reason to preserve. A rider may talk about a connection or a route. The system can understand both expressions and select the same action. If the language generator sees only that action, it has no direct evidence of which expression the rider used. A reply can be useful with either word, but the speaker’s choice gives the generator a basis for favoring one in this exchange.

#### Why speakers’ wording matters

The paper calls this kind of adaptation *entrainment*. In the studies it discusses, people sometimes repeat words their conversation partners have used or adopt similar sentence structures. The authors describe this as an ordinary feature of conversation that can happen without conscious planning. They also cite evidence linking entrainment to successful interaction, along with observations that users of spoken dialogue systems adapt their language to the system’s prompts.

The direction of adaptation is important here. When a system repeatedly asks a question in a familiar way, a user can learn to respond using the system’s wording. Dušek and Jurčíček investigate the other direction. They ask whether the system can pick up how the user has just expressed a request. In the generation task they set up, the reply still has to serve the same purpose. The preceding utterance gives the system something to act on when choosing its phrasing.

Variation alone does not establish that adaptation has occurred. The authors describe systems that alternate among prepared replies or generate a list of possibilities and sample from it. Both strategies can keep a system from repeating the same sentence every time. If the choice is independent of the preceding utterance, however, there is no particular reason for the selected reply to echo the user’s vocabulary or fit the form of the question. The proposal is to make the source of the variation part of the input or part of the decision about which reply to deliver.

The paper also treats naturalness as a practical concern. It places generation in the chain between a system’s dialogue decisions and the user’s experience of those decisions. A service can select an appropriate action and express it awkwardly. Earlier work discussed by the authors ties generation choices to perceived naturalness and, in some settings, to whether people complete the task. This motivates the study. Its own experiments measure the sentences produced by the generator and how judges perceive selected pairs.

#### Where the proposal fits in earlier work

The authors build on their own [sequence-to-sequence generator for spoken dialogue](https://md.research.elamur.ai/free/en/papers/dusek-2016-sequence-sequence-generation-spoken-dialogue/). A sequence-to-sequence system reads an ordered representation of its input and produces an ordered series of output tokens. In this application, the input represents a dialogue act and the output is a reply. The earlier generator already provided a way to make candidate sentences and check whether they expressed what the dialogue act called for. The new work keeps that foundation and experiments with where to introduce the user’s words.

The paper places this foundation alongside other recurrent approaches to response generation. It discusses [recurrent generation with convolutional sentence reranking](https://md.research.elamur.ai/free/en/papers/wen-2015-stochastic-language-generation-dialogue-recurrent/), a [semantically conditioned LSTM generator](https://md.research.elamur.ai/free/en/papers/wen-2015-semantically-conditioned-lstm-based-natural/), and [selective generation with an encoder, aligner, and decoder](https://md.research.elamur.ai/free/en/papers/mei-2016-what-talk-about-how-selective/). The authors describe these related generators as working without the explicit context input studied here. They also discuss an [end-to-end trainable task-oriented dialogue system](https://md.research.elamur.ai/free/en/papers/wen-2017-network-based-end-end-trainable/) with implicit access to earlier context. Its treatment of the effect of that context on response wording falls outside the comparison Dušek and Jurčíček set up.

Earlier systems had explicitly tried to make computer-generated dialogue entrain. As the authors describe them, those approaches used rules for at least part of the process. Some targeted particular forms of adaptation. Others relied on manually chosen alternatives and rules for deciding when to use them. The work reviewed in the paper includes reports of improved perceived naturalness and of improvements in naturalness and task success together. Those results gave the authors a reason to take adaptation seriously as a generation problem.

Learning from a corpus changes what has to be specified in advance. With paired user turns and responses, a generator can in principle learn that multiple expressions are appropriate in related situations. A designer still decides what contextual evidence the system can see and how it can use that evidence. In this paper, one such decision is to include a score for shared words and short phrases. The word choices themselves can come from the training examples, without a manually enumerated set of entrainment expressions. The authors present this as, to their knowledge, the first fully trainable generator for spoken dialogue with this capability.

### The method, step by step

#### From the dialogue act to a set of replies

The generator has two jobs that are easiest to understand separately. It first proposes replies that could express a dialogue act. It then selects a reply, taking account of the information each candidate contains and, in the relevant settings, its overlap with the user’s turn. This separation is useful because a reply can be a plausible sentence and still leave a required detail out. It can also be factually complete and sound less at home in the exchange than another candidate.

The starting point is a dialogue act such as an instruction to inform a rider about a bus departure. The generator represents that act as a sequence of tokens. A token here is an item in the representation the network reads, such as a label from the dialogue act or a word in the user’s utterance. Each slot yields a triple consisting of the act type, the slot name, and its value. The triples are then joined into one sequence. Repeating the act type in the triples gives the encoder the action label alongside the information attached to it.

The data use placeholders for details such as stop names and times. This is called delexicalization. It lets the generator learn where a value belongs in a sentence without treating every stop or departure time as a separate wording problem. The same kind of response can then apply to different departures. The placeholders also leave something visible to check in the generated string. If a reply should contain a departure time, the evaluator can look for the corresponding placeholder in the output.

The method offers different places for the previous user turn to enter. It can go at the start of the input sequence, go through an encoder of its own, or be used to adjust the scores of replies the generator has already proposed. The first two options can change the replies available for selection. The last can change which available reply the system picks. The combined settings give the utterance both roles.

How the generator prepares and selects a reply The steps in order.

#### Reading the input in order

An encoder converts the input sequence into a sequence of numerical representations called hidden states. Each hidden state records information available to the encoder at a position in the sequence. Because the encoder is recurrent, it uses what it has already read when it processes the next item. This is how the representation of one token can take account of earlier tokens in the same input.

The authors use a recurrent neural network built from long short-term memory cells, abbreviated LSTM. An LSTM is a recurrent unit that can carry information forward through a sequence. The paper connects this architecture to earlier work on [generating sequences with recurrent neural networks](https://md.research.elamur.ai/free/en/papers/graves-2013-generating-sequences-recurrent-neural-networks/). The input to the unit is a vector representation of the current token, known as a [word embedding](https://md.research.elamur.ai/free/en/concepts/word-embeddings/) when the token is a word. The same idea of a learned vector applies to the generator’s structured input symbols.

```
hₜ = lstm(xₜ, hₜ₋₁)
```

Here `t` is the current encoder position, and `t−1` is the preceding position. The vector `xₜ` represents the input token at position `t`. The state `hₜ₋₁` summarizes what the recurrent encoder is carrying forward from the preceding position. The function `lstm` applies an LSTM update and returns the new state `hₜ`. The equals sign gives the state produced by that update.

The result is a state at each input position. The decoder can consult all of these states while writing the reply. That matters for a dialogue act with several details: a departure time and a line label occupy different positions, and each may be useful at a different stage of the sentence. When the preceding utterance is included at encoding time, the decoder can also draw on representations that contain cues to the wording of the request.

#### Writing the reply a token at a time

The decoder is another recurrent network with LSTM cells. It maintains its own state while generating the response. At each step, the decoder has access to the preceding output token and to an attention vector over the encoder states. Attention gives it a way to use information from different input positions at different points in the reply. The paper adopts this approach from [Neural Machine Translation by Jointly Learning to Align and Translate](https://md.research.elamur.ai/free/en/papers/bahdanau-2014-neural-machine-translation-jointly-learning/).

```
s₀ = hₙ
```

The symbol `s₀` denotes the decoder state before it emits the reply. The state `hₙ` is the encoder’s state at the last input position, with `n` denoting the input sequence length. The equality initializes the decoder with that encoder state. A special starting symbol provides the preceding token for the first decoding step.

The attention vector is a weighted sum of the encoder’s hidden states. The authors use a feed-forward network with a hidden layer using the `tanh` activation to determine the weights. A weighted sum lets several input positions contribute at once, with different strengths. In a reply about a departure, the information that helps the decoder produce a time expression may differ from the information that helps it introduce the bus line. Attention provides a mechanism for making those distinctions during generation.

```
sₜ = lstm((yₜ₋₁ ◦ cₜ)Wₛ, sₜ₋₁)
```

In this equation, `t` indexes decoding steps. The vector `sₜ` is the decoder’s current state and `sₜ₋₁` is its previous state. The vector `yₜ₋₁` represents the preceding output token, and `cₜ` is the attention vector for the current step. The symbol `◦` means concatenation, so the two vectors are placed end to end. Multiplication by `Wₛ`, a learned linear projection matrix, transforms the joined vector before the `lstm` function uses it and the preceding state to update the decoder.

```
p(yₜ | yₜ₋₁, …, x) = softmax((sₜ ◦ cₜ)Wᵧ)
```

Here `p` is a conditional probability. The vertical bar separates the token being predicted, `yₜ`, from the information used to predict it. The terms `yₜ₋₁, …` refer to the earlier output tokens, and `x` is the complete encoder input sequence. The current decoder state `sₜ` and attention vector `cₜ` are joined using `◦`. The matrix `Wᵧ` projects that joined vector into scores for the output vocabulary. The function `softmax` turns those scores into a probability distribution over the possible next tokens.

It helps to think about the different information available when the decoder comes to that decision. The dialogue act supplies the facts to express. The recurrent decoder state reflects the reply as it has developed so far. The attention vector makes information from the input accessible at the current step. If the input contains the user turn, the network can use it in predicting what token fits next. The architecture leaves the relationship between a user expression and a reply expression to be learned from the training data.

#### Giving the generator the preceding turn

The simplest way the authors add context is to place the user utterance before the serialized dialogue act. The encoder reads the user tokens and then the structured input in a single pass. Context tokens and dialogue-act tokens use distinct dictionaries. A dictionary here specifies the tokens recognized on that side of the input. Keeping the dictionaries separate allows the trainable representations to distinguish ordinary wording in the user’s utterance from symbols used to represent the system’s task.

Prepending changes which sequence the recurrent encoder processes, while leaving the basic encoder-decoder arrangement intact. By the time the encoder reads the dialogue act, its recurrent state has already processed the user’s words. Attention can also draw on positions in the combined sequence. This gives the decoder routes by which the preceding utterance can affect the sentence, even though the dialogue act follows the utterance and specifies what needs to be communicated.

The other encoding treatment gives the user utterance a separate recurrent encoder. The dialogue act continues to have its own encoder. The authors concatenate the representations from the two encoders, and the decoder uses vectors of doubled size for its input and attention operations. This is a different way of presenting the evidence: the user’s sentence and the structured act each get their own encoding process before their representations are brought together for generation.

The distinction between the two treatments is architectural. Prepending asks a single encoder to work through both kinds of input in order. Separate encoding asks the decoder to work with joined representations produced by distinct encoders. Both expose the decoder to the same kind of conversational evidence, namely the immediately preceding user utterance. In either case, the network still has to learn whether that evidence should affect a particular token or phrase.

The paper keeps these options close to the existing sequence-to-sequence design. It mentions convolution and max-pooling as other ways an encoder might process context. They are possibilities the authors point out, rather than parts of the tested generator. The implemented contrast is between a shared sequence and dedicated encoding for the user’s sentence.

#### Finding candidates and checking their content

The generator supports greedy decoding, which chooses the highest-probability next token at each step. The experiments use beam search. A beam is a working set of the best-scoring partial sequences the search has found. Each time the decoder extends its sequences, it retains the top `k` possibilities, with `k` denoting the number kept. A reply with a less probable beginning can thus remain in consideration while the search explores how it continues. The paper connects this search procedure to earlier work on [sequence-to-sequence learning](https://md.research.elamur.ai/free/en/papers/sutskever-2014-sequence-sequence-learning-neural-networks/).

Beam search supplies a list of complete candidates that the system can score again. That second scoring step is called reranking. A score used during search answers how probable a candidate is under the decoder. A reranker can ask a more targeted question about the completed sentence. The baseline already uses such a check for content, so the context-aware experiments build on a system with an explicit way of penalizing deviations from the dialogue act.

To carry out the content check, a recurrent classifier reads the candidate response token by token and encodes it into a fixed-size vector. A classification layer with sigmoid outputs predicts the presence of the dialogue-act types, slot names, and values it was trained to identify. These predictions form a vector of indicators for the items the candidate appears to express. The reranker compares those indicators with the input act and counts missing and irrelevant elements. Candidates that fare worse on that comparison receive a penalty.

The classifier therefore evaluates a sentence through its predicted content. It can favor a reply that mentions a required detail over a rival that leaves it out, even if the decoder prefers the rival. This makes the role of the content penalty different from the role of the context score. The former gives the system a reason to retain the substance of the reply. The latter gives it a reason to prefer wording that connects to the user’s turn.

The reranking stage depends on the search stage. If the beam has retained a candidate with suitable content and particularly apt wording, either scoring check has a chance to move it higher. A candidate that never survives the search is unavailable to both checks. This dependency is especially important when comparing a decoder that has seen the user’s words with one that first encounters their effect during reranking.

#### Rewarding a reply for lexical overlap

The context reranker measures how much the completed reply shares with the preceding user turn. It uses an [n-gram](https://md.research.elamur.ai/free/en/concepts/n-gram/), a contiguous sequence of tokens, as its unit of comparison. The authors focus on unigrams, which are individual tokens, and bigrams, which are adjacent token pairs. Unigrams give credit for reusing a word such as *later*. Bigrams can give credit for retaining a short expression such as *bus connection*.

The score uses modified precision. This asks how much of the candidate is matched in the comparison text, with limits on how frequently a repeated item can receive credit. For this reranker, the comparison text is the user’s utterance. The score is related to BLEU, whose original use is described in [Bleu: a Method for Automatic Evaluation of Machine Translation](https://md.research.elamur.ai/free/en/papers/papineni-2002-bleu-method-automatic-evaluation-machine/). The role is different here. During reranking, the system compares a possible reply with the user’s words in order to choose what to say.

```
l ← l + w · √(p₁p₂)
```

The `l` on the right is the candidate’s original log probability on the decoder’s list. The arrow assigns the updated score to `l` on the left. The quantities `p₁` and `p₂` are the modified unigram and bigram precisions of the reply against the user utterance. Their product under the square root gives their geometric mean. The weight `w` is set in advance for the run, `·` denotes multiplication, and `+` adds the weighted overlap reward to the original score.

The geometric mean makes the reward depend on both kinds of overlap. A candidate with individual words in common gets no reward from this expression if it has no matching adjacent pair. The check is therefore more selective than a count of shared words alone. At the same time, restricting it to short spans gives a candidate a chance to match without repeating a long portion of the user’s sentence.

The authors omit the BLEU brevity penalty from this score. They want the reranker to be able to favor a short reply when the overlap supports it. A brief confirmation can make sense if the user has already supplied the wording needed to understand what is being confirmed. The paper reports that preliminary trials with the penalty gave similar results. The stated reasons for choosing this overlap measure are ease of calculation, a defined score range, and its relationship to BLEU.

The reranker is used both on its own and with each context encoding treatment. By itself, it can find a reply that happens to match the user’s wording among candidates proposed from the dialogue act alone. With a context-aware encoder, the candidate set can already reflect the user’s words. This is the operational difference between giving the generator a cue while it is composing and using the same cue to review what it has composed.

#### Learning from paired turns and responses

The training data give the generator examples of a user utterance, a system dialogue act, and a target reply. The authors train the generator by minimizing cross-entropy, which penalizes low predicted probability for the target output tokens. They use the [Adam optimizer](https://md.research.elamur.ai/free/en/papers/kingma-2014-adam-method-stochastic-optimization/) to update the parameters. After each pass through the training data, they score generated replies on the development set with BLEU and retain the best-performing parameters.

The distinction between training and selection matters. During training, the target replies supply the words the generator is supposed to learn to predict. During development, the authors assess the sentences the generator actually produces and use that assessment to choose its parameters. The held-out test data then supply the final comparison between configurations. The word-overlap weight is another decision made with development data, separately from the training of the decoder.

The authors report an embedding size of 50 and an LSTM cell size of 128, chosen after preliminary experiments on the development set. The generator uses a learning rate of 0.0005 and a batch size of 20. The learning rate governs the scale of parameter updates, and the batch size determines how many examples are processed together for an update. Training is scheduled to run for between 50 and 1000 passes, inclusive. Its early stopping rule checks whether the top 10 validation BLEU scores have stayed unchanged for 100 passes.

The content classifier uses similar settings, with differences in its training schedule and validation criterion. It is trained for at least 20 and at most 100 passes through the data. The authors measure classification mistakes on both the training and development sets after each pass and give the development set 10 times the importance of the training set for validation. This classifier learns to recognize response content, whereas the generator learns to produce full replies from the input representation.

The authors make the implementation available as `tgen` and use the updated `alex_context_nlg_dataset` release for the experiments. The data are important to the definition of the task. An ordinary pairing of dialogue act and reply would let the system learn ways to verbalize the act. The added user utterance lets it learn when to choose among those ways based on conversational evidence.

### Experiments and results

#### The Manhattan transit data

The experiments use a corpus of bus and subway exchanges in Manhattan. It contains over 5,500 utterances and over 1,800 combinations of a dialogue act and a preceding user utterance. For each combination, there are three paraphrases of the system response. The user utterance is therefore associated with a specific intended system action and several acceptable ways to express it.

The dataset covers four types of action. An `iconfirm` acknowledges how the system has understood part of the user’s request. An `inform` provides information, for example about an itinerary. An `inform no match` reports that a suitable result was unavailable. A `request` asks the user for information needed in the conversation. These are different kinds of response even within one domain. A confirmation can be brief because it picks up information already in the exchange. A route description may need to carry several new details.

The train, development, and test proportions follow a 3:1:1 split. In training, each paraphrase serves as its own target instance. On development and test data, the three paraphrases instead serve as references for a single generated response. This gives the learning procedure exposure to alternative sentences, while the evaluation can give a reply credit against several acceptable formulations of the same act in the same context.

The reference replies are central to interpreting the automatic results. Each is associated with the same preceding user utterance and the same structured action. A system that responds in a contextually apt way has a chance to pick phrasing found in those references. Yet the references are a sample of valid ways to reply. A fluent response can make a suitable lexical or structural choice that none of them happens to capture.

Slot values such as times and stop names were replaced by placeholders for generation to reduce sparsity. That makes recurring patterns easier to learn across different routes and lets the authors count errors involving slots in the delexicalized output. It also narrows what the task asks of the generator. The experiments emphasize sentence construction and context-sensitive wording under a known dialogue act, with a representation that abstracts over many particular values.

The input utterance is a gold-standard transcription of the user’s immediately preceding turn. Every configuration that can use context therefore receives the words represented in the dataset without recognition errors. This lets the authors compare ways of exploiting a turn under controlled input conditions. The source of context in the experiment is the user’s wording itself, without variation introduced by alternative recognition hypotheses or an extended conversation history.

#### The baseline and the configurations compared

The baseline is the existing attention-based sequence-to-sequence generator with the content classifier. It receives the dialogue act but has no access to the user’s utterance. The overlap-only configuration keeps that input setup and adds a context score to the reranking stage. Any advantage for this setting must come through the choice among replies already proposed from the act alone.

The other configurations give the generator the user utterance, either prepended to the dialogue act or processed by a separate context encoder. Each of these configurations is tested with and without the overlap reranker. The resulting comparisons show whether each use of context helps on its own and how it behaves when the system has another opportunity to take account of the same turn after decoding.

The authors average results over 5 random initializations of the networks. Repeating training with different initial parameter values reduces dependence on a single run. For decoding, they use a beam size of 20 and a content reranker penalty weight of 100. The beam size controls the number of possibilities kept during search. The penalty weight governs the cost assigned when the content classifier detects a discrepancy between a reply and its dialogue act.

The overlap weight is chosen on development data. It is 5 when the overlap reranker is used alone or with the separate context encoder, and 10 when used with prepending. These values matter to the interpretation of a comparison between the combined systems. Each combination is evaluated with its chosen weight. The results describe those tuned configurations, so a difference between them cannot be attributed solely to the encoder architectures.

#### Automatic scores on held-out data

The paper reports BLEU and NIST for the test set. Both compare generated wording with reference wording through shared sequences of tokens. BLEU scores overlap using modified precision, while NIST gives greater weight to more informative matches. In this experiment, the comparison texts are the three reference replies for the dialogue act and user turn. These scores assess agreement with those replies and are distinct from the overlap score the reranker computes against the user utterance.

BLEU across generator settings on the Manhattan transit test set Prepending the user turn and reranking by overlap gives the highest BLEU score.

**The numbers**

| System or setting | BLEU |
| --- | --- |
| Baseline | 66.41 |
| Context overlap reranker | 68.68 |
| Prepended user turn | 63.87 |
| Prepended user turn with overlap reranker (this paper) | 69.26 |
| Separate context encoder | 63.08 |
| Separate context encoder with overlap reranker | 69.17 |

With the dialogue act as the generator’s only input, adding the overlap reranker raises test BLEU from 66.41 to 68.68. Giving the generator a context input and scoring its results without the overlap reranker produces a different pattern. Prepending reaches 63.87 and the separate encoder reaches 63.08, both below the baseline. The evidence from held-out data therefore depends on how context is used in the full procedure that chooses the final reply.

Both combinations score above the overlap-only system. Prepending plus reranking reaches the top test BLEU score of 69.26, and the separate encoder plus reranking reaches 69.17. The authors describe the gains of the combined settings over the baseline as about 2.8 BLEU points and report significance at the 99% level. They use [pairwise bootstrap resampling](https://md.research.elamur.ai/free/en/papers/koehn-2004-statistical-significance-tests-machine-translation/) for the significance assessment. This compares the systems repeatedly on resampled sets of paired cases to examine how stable the difference is across samples.

NIST across generator settings on the Manhattan transit test set The best NIST score comes from combining the prepended turn with overlap reranking.

**The numbers**

| System or setting | NIST |
| --- | --- |
| Baseline | 7.037 |
| Context overlap reranker | 7.577 |
| Prepended user turn | 6.456 |
| Prepended user turn with overlap reranker (this paper) | 7.772 |
| Separate context encoder | 6.818 |
| Separate context encoder with overlap reranker | 7.596 |

NIST shows the same broad pattern. The overlap-only setting scores 7.577 against the baseline’s 7.037. The individual encoding treatments score below the baseline, and both combinations improve on the overlap-only setting. The highest NIST result is 7.772 for prepending and reranking, followed by 7.596 for separate encoding and reranking. The individual encoding treatments change order between BLEU and NIST, so the comparison of the encoder choices in isolation depends partly on how the output is scored.

The authors also report slot error rate, abbreviated ERR. This metric reports the share of slot placeholders that are absent or unnecessary in the delexicalized output. ERR stays around 3% across the setups. An increase in reference overlap therefore coexists with a broadly similar level of errors on this particular content check. This offers some reassurance that the better overlap scores come with roughly stable coverage of the expected placeholders. The measure answers a narrower question than whether every aspect of a sentence’s meaning is correct.

The authors note that the development set had looked more favorable to the individual approaches: all three methods gave a mild BLEU improvement there. This is a relevant contrast because development data were used to select parameters and set the reranker’s weight. On held-out test data, the overlap-only treatment improves on the baseline, while the encoder-only treatments do worse. The test comparison thus gives a more qualified account of adding an input channel for context.

#### What people preferred

For the human test, the authors select the setting with the strongest BLEU and NIST scores, which prepends the user turn and then reranks on overlap. They compare it with the baseline in a blind pairwise test. Judges recruited through CrowdFlower see the user’s turn together with the two system replies. Their task is to choose the reply that sounds more natural in that exchange.

The researchers take a random sample of 1,000 pairs with different system outputs, drawing across all 5 random initializations. They collect 3 judgments for each pair. The focus on different outputs makes the human question meaningful: the two displayed replies give a judge a wording choice. It also defines the population to which the measured preference applies. The test reports how judges respond when the systems differ.

The context-aware reply is preferred in 52.5% of judgments. The paper reports statistical significance at the 99% level using pairwise bootstrap resampling. The size of the preference is modest. It gives the automatic scores an independent point of comparison, because the judges are choosing a sentence in context instead of counting its overlap with a reference. It also shows that reference-score improvements and the strength of a preference in head-to-head judgments communicate different things about the outputs.

The instruction to choose what sounds more natural is deliberately broad. A judge can take account of how smoothly the reply follows the user’s turn, how easy it is to understand, and how complete the sentence sounds. A turn-sensitive reply can gain on one of those dimensions and lose on another. The judgments capture how those dimensions come together for the particular reply pairs people saw.

### What the ablations show

#### Context helps at different points in the decision

The controlled comparisons vary whether the decoder can read the user turn and whether the reranker can compare a reply with it. This directly tests two different opportunities to benefit from the same words. The encoder can help propose candidates. The reranker can help choose among candidates. The baseline and the individual treatments show what happens when those opportunities are introduced separately.

The overlap-only setting shows that the baseline already produces some candidates worth promoting for situational reasons. Since generation for this setting sees the dialogue act alone, the improvement must come from the order in which the candidates are ranked. The overlap score supplies evidence that the baseline lacks at selection time. It can bring forward a reply that the decoder regards as plausible and whose wording happens to suit the turn.

The encoder-only settings show that supplying context during generation does not automatically give a better first choice on the test data. Both decrease BLEU and NIST. A candidate can be well suited to the preceding utterance and still receive a lower decoder score than a more conventional candidate. Conversely, introducing context can change the candidates in ways that make their wording less like the references. The aggregate scores identify the weakness of these configurations as complete systems. They do not by themselves locate which candidates gained or lost probability.

Combining either encoder treatment with overlap reranking improves on using the overlap reranker with the baseline decoder. This pattern is consistent with the authors’ explanation that context at encoding time can make useful candidates available and that the reranker helps bring them to the top. They suggest that feeding context to the decoder also introduces uncertainty about which continuation to choose. A score that explicitly rewards short matches to the user’s turn can guide that decision among the resulting candidates.

The candidate-list explanation remains an interpretation of the results. The paper does not report a direct comparison of how often the beam contains the best contextual reply under each encoder setting. It also does not give a rank-by-rank analysis of where the relevant candidates appear. The controlled comparisons establish the advantage of the combined procedure on this test set. Direct inspection of the full candidate lists would be needed to separate changes in what is proposed from changes in where the decoder initially places it.

The near agreement in BLEU between the combined systems also puts the architectural comparison in perspective. Prepending ranks highest on both test metrics, but the separate encoder combined with the same type of reranker shows the same broad advantage over the baseline. The paper reports significance for the improvement of the combinations, without establishing that the best prepending result is reliably better than the separate-encoder combination. The human study takes forward the top-scoring configuration and compares it with the baseline.

#### What the individual replies reveal

The paper includes examples that let the reader see what changes when the input act stays fixed and the way of producing a reply changes. One user asks about a later option. The dialogue act calls for confirming the next alternative. The baseline expresses the confirmation in terms of the next connection. The context-aware alternatives use the adjective *later*, and the separate-encoder combination also brings back the word *option*. The replies are tied to the same system action, but some echo the words that originally expressed the user’s request.

That example makes the distinction between slot content and wording visible. The idea of the next alternative is in the dialogue act. The choice to describe it as later involves the language the rider used. Since the overlap-only setting also produces wording with *later*, the example illustrates what a context-aware ranker can recover from a candidate set generated without the user turn. The separate-encoder result illustrates how the same input can yield an additional match on the noun used for the alternative.

In another example, the rider asks for a bus connection and the system has no matching result. The baseline response is brief and places its apology after the statement about the bus. The overlap-only setting describes the failed search using *route*. Both encoder-and-reranker combinations use *connection*, the noun the rider chose, and lead with an apology. The change concerns both how the failed search is phrased and how the sentence is organized.

The examples also include a rider who expresses a preference for the bus, followed by an act that supplies a route on M15. Most of the displayed settings return the same time-led formulation. The prepending combination instead produces a direct instruction with the line name next to the word *bus*. Here the visible difference is more about the framing and ordering of the itinerary than about introducing a new shared word. Seeing the user turn can coexist with identical responses from several settings on a particular item.

These examples show different degrees of response adaptation. Sometimes a single lexical choice changes. Sometimes the output keeps a larger piece of the user’s expression. Sometimes the main difference is the sentence structure used to deliver the facts. They also show that a candidate promoted for context can remain familiar as an ordinary transit reply. The learner is choosing how to phrase a known action, so a small adjustment can be enough to change how the reply relates to the turn.

The examples are illustrative. They make it possible to connect the scoring mechanisms to actual differences in replies, but they do not supply a frequency for each kind of adaptation. The automatic metrics pool effects across test cases. The examples help identify plausible contributors to those effects, including exactly the kind of short lexical reuse the reranker was designed to favor.

#### Why the preference was modest

The authors inspect the human judgments for reasons the context-aware reply was preferred by a relatively narrow margin. One possibility is that both responses frequently suit the turn. For a rider who has supplied a starting point, the system may ask about the destination in more than one familiar way. The authors observed that judges can favor the more common formulation in such a pair, even if the contextual alternative also makes sense. Where both replies fit, other properties of the wording can settle the choice.

Brevity provides another example. The context-aware setting sometimes gives a very compact confirmation after a user asks about an option at a particular time. The user’s question supplies enough context for a reply consisting almost entirely of the time. The authors observed that judges can still favor a fuller and more polished-sounding answer. A short response can be well linked to what came before and receive a weaker naturalness judgment for the way it sounds on its own.

The authors also note occasional disfluencies from both systems. An awkward sentence can affect a judgment even if the candidate is a good contextual match. Since the task asks for a single preference, the judge’s reaction to fluency and to contextual fit is recorded in the same choice. The error analysis gives plausible reasons for the reported preference, without assigning separate effect sizes to familiarity, brevity, or fluency.

This explains why the automatic comparison and the human inspection are complementary. Reference overlap can reward a turn-appropriate expression, and the examples can show how that expression arose. Human preference adds information about what happens when such an expression comes as part of a complete reply. For this generator, the words that pick up the user’s phrasing are one contributor to a judgment that also reflects how the whole sentence reads.

### Limitations

#### Limits identified by the authors

The authors emphasize the stand-alone nature of the experiment. The generator receives an already determined dialogue act and a correct transcription of the previous turn. It is not tested inside a live spoken interaction, where recognition and dialogue management would also shape what reaches the generator. Evaluating it in a deployed dialogue system is one of their main directions for further work.

Recognition is a concrete difference between the experiment and live use. The authors say the architecture can accept a recognizer’s 1-best hypothesis, meaning its single highest-ranked transcript. They also say that a longer history of user utterances can be supplied within the existing architecture. These are possible inputs, and the reported results are for the gold transcription of the immediately previous turn. They propose evaluating recognition output and adapting the system to accept n-best hypotheses, meaning several candidate transcripts.

These conditions matter for both ways of using context. An error in the recognized user turn would change the tokens the encoder reads. It could also affect which exact words and phrases the reranker rewards. The paper’s design lets the reader identify where those errors might enter. The size of their effect, and whether multiple recognition hypotheses would help, remain questions for the evaluations the authors propose.

A direct comparison with earlier handcrafted entrainment systems is also outside the authors’ stand-alone setup. They explain that those systems can use rules that refer to the full dialogue history. Their own experiments focus on the immediately preceding utterance. A live evaluation would give them a setting in which to compare these approaches with the broader conversational evidence available. The related-work discussion provides context for the proposal, while the empirical comparison is against the sequence-to-sequence baseline.

The authors propose a more flexible overlap measure that could recognize different forms of the same word. The implemented score relies on matching words or adjacent pairs, so different forms can miss out on a match even when their relation is clear to a reader. They also propose trying other ways to incorporate context and improving control over the fluency and eloquence of the outputs. Those directions follow from their observation that judges considered the quality of the whole sentence, including in cases where a short reply fit the turn.

#### Limits visible in the evaluation

The results describe a Manhattan transit corpus with a small set of dialogue-act types and repeated patterns of information. That makes the experimental conditions easy to understand. It leaves open how the same settings would behave in a domain with other kinds of actions, longer explanations, or context that stays relevant over several turns. The transfer would involve both the ways the input is represented and the kinds of wording the generator can learn from paired examples.

Delexicalization also shapes what the result establishes. Placeholders help the system reuse sentence patterns across different itineraries and make slot errors measurable. The reported slot error rate describes the presence of those expected placeholders in generated outputs. It does not show how well the system handles all the surface choices that arise around arbitrary names or values when they are expressed in full. Nor does counting placeholders check all the relations a reply implies among the details it mentions.

The test references provide several ways to phrase an answer, and they make the automatic comparison more informative than a comparison with a single target. They still cover only some acceptable replies. A wording choice can be appropriate in context and receive little credit if it shares few sequences with the references. Another reply can match standard transit wording well while showing minimal adaptation to the user. BLEU and NIST therefore measure related aspects of the problem alongside the human test and examples.

The study’s interpretation of entrainment is local. The context input is a single user turn, and the evidence concerns the wording of the next reply. Examples show reuse of words and short phrases, as well as shifts in response framing. The experiment does not trace whether a system keeps adapting to an individual over a longer conversation, whether a user in turn adapts to those replies, or whether the participants converge on stable wording. Those are different observations from agreement with the immediately preceding turn.

The reranking score also gives a specific operational meaning to context match. It rewards the presence of shared words and pairs of adjacent words. That makes its effect concrete and helps explain results such as reusing *connection*. A reply can also respond aptly to a turn through a synonym, a change in sentence form, or a brief answer that leaves shared material implicit. Exact overlap measures only part of that relationship. A close match can likewise occur on a phrase that contributes little to the quality of the reply.

The human test covers one context-aware configuration and the baseline. It supports a preference for the strongest automatic setting within the tested pairwise protocol. It does not determine whether adding the overlap reranker by itself would have produced a comparable preference or whether judges would have favored prepending over separate encoding. Those configurations are distinguished by automatic scores, with selected examples showing their behavior.

Judges also saw pairs with different replies. This provides a direct test of the quality of the differences they encounter. The study does not give an all-turn preference rate incorporating occasions when the systems agree. A live user would experience those occasions as well. The task was to choose which of two replies sounded more natural in context, so it leaves separate questions about factual understanding, task completion, and user satisfaction across an interaction unresolved.

Finally, the combined settings use different overlap weights. The test results tell a reader how the resulting configurations perform, after each weight has been chosen on development data. They give a weaker basis for deciding which encoder is intrinsically better or which would work best under the same overlap weight. The clearest finding concerns the role of context in proposing and selecting replies together under the paper’s experimental conditions.

### What came after

The later citing work takes up several questions made visible by this study. They include how to judge generated sentences, how to control wording separately from content, how to organize evaluation across generation tasks, and how to situate a response generator within a larger dialogue system. Citation places these works in conversation with the paper. Their topics describe different points of contact with its contribution.

[Why We Need New Evaluation Metrics for NLG](https://md.research.elamur.ai/free/en/papers/novikova-2017-why-we-need-new-evaluation/) takes up the question of what evaluation metrics capture in natural language generation. The connection is particularly direct in the transit experiments. A generated reply is compared with acceptable reference replies for automatic scoring, while a person judges how natural it sounds after the user’s turn. The combined setting improves the automatic scores and earns a modest human preference. Those observations make clear why an evaluation can benefit from distinguishing reference agreement from the quality that a person perceives in context. The later paper addresses the broader problem of evaluation metrics, of which this comparison is an instance.

[Controlling Linguistic Style Aspects in Neural Language Generation](https://md.research.elamur.ai/free/en/papers/ficler-2017-controlling-linguistic-style-aspects-neural/) addresses control of how a generated sentence is expressed. The shared question is how a generator can vary the realization of a message while retaining its intended content. Dušek and Jurčíček supply an immediate conversational cue, the user’s preceding words, and look for adaptation in the reply. The later work’s focus on linguistic style puts the emphasis on properties of the generated wording that one might want to control. That is a related formulation of the generation problem, with a different organizing question from whether a reply picks up a particular user turn.

[The GEM Benchmark: Natural Language Generation, its Evaluation and Metrics](https://md.research.elamur.ai/free/en/papers/gehrmann-2021-gem-benchmark-natural-language-generation/) brings generation and measurement together at the benchmark level. The transit study shows how the definition of a task and the choice of its metrics shape the conclusion. It specifies what information the generator sees, provides several reference replies for each evaluated case, measures slot errors, and compares selected system outputs with human judgments. A benchmark effort addresses this relationship between task design and evaluation more broadly. The connection is through the role of datasets and metrics in making a claim about generation interpretable.

[Recent advances in deep learning based dialogue systems: a systematic survey](https://md.research.elamur.ai/free/en/papers/ni-2022-recent-advances-deep-learning-based/) places work on dialogue systems in a wider research context. The context-aware generator provides a specific component-level example for that perspective. Given a dialogue act and a user turn, it asks what response the system should formulate and how that response should reflect the preceding words. A survey of dialogue systems can situate this question alongside the other decisions a system makes in an exchange. The experimental boundary in the original work remains relevant to that reading, since improvements in a stand-alone response generator establish a result for the wording component under known inputs.

## Cite

Cite as Ondřej Dušek and Filip Jurčíček. 2016. A Context-aware Natural Language Generator for Dialogue Systems. Proceedings of the 17th Annual Meeting of the Special Interest Group on Discourse and Dialogue.

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

```bibtex
@inproceedings{dusek2016context,
  title = {{A Context-aware Natural Language Generator for Dialogue Systems}},
  author = {Ondřej Dušek and Filip Jurčíček},
  booktitle = {Proceedings of the 17th Annual Meeting of the Special Interest Group on Discourse and Dialogue},
  year = {2016},
  doi = {10.18653/v1/w16-3622},
  url = {https://doi.org/10.18653/v1/w16-3622}
}
```

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