Multi-task Learning for Joint Language Understanding and Dialogue State Tracking

This paper presents a novel approach for multi-task learning of language understanding (LU) and dialogue state tracking (DST) in task-oriented dialogue systems. Multi-task training enables the sharing of the neural network layers responsible for encoding the user utterance for both LU and DST and improves performance while reducing the number of network parameters. In our proposed framework, DST operates on a set of candidate values for each slot that has been mentioned so far. These candidate sets are generated using LU slot annotations for the current user utterance, dialogue acts corresponding to the preceding system utterance and the dialogue state estimated for the previous turn, enabling DST to handle slots with a large or unbounded set of possible values and deal with slot values not seen during training. Furthermore, to bridge the gap between training and inference, we investigate the use of scheduled sampling on LU output for the current user utterance as well as the DST output for the preceding turn.


Introduction
Task-oriented dialogue systems interact with users in natural language to accomplish tasks they have in mind, by providing a natural language interface to a backend (API, database or service). State of the art approaches to task-oriented dialogue systems typically consist of a language understanding (LU) component, which estimates the semantic parse of each user utterance and a dialogue state tracking (DST)   semantic parse generated by LU to update the DS at every dialogue turn. The DS accumulates the preferences specified by the user over the dialogue and is used to make requests to a backend. The results from the backend and the dialogue state are then used by a dialogue policy module to generate the next system response.
Pipelining dialogue system components often leads to error propagation, hence joint modeling of these components has recently gained popularity (Henderson et al., 2014;Mrkšić et al., 2017;Liu and Lane, 2017), owing to computational efficiency as well as the potential ability to recover from errors introduced by LU. However, combining joint modeling with the ability to scale to multiple domains and handle slots with a large set of possible values, potentially containing entities not seen during training, are active areas of research.
In this work, we propose a single, joint model for LU and DST trained with multi-task learning. Similar to Liu and Lane 2017, our model employs a hierarchical recurrent neural network to encode the dialogue context. Intermediate feature representations from this network are used for identifying the intent and dialogue acts, and tagging slots Utterance:  in the user utterance. Slot values obtained using these slot tags (as shown in Figure 2) are then used to update the set of candidate values for each slot. Similar to , these candidate values are then scored by a recurrent scoring network which is shared across all slots, thus giving an efficient model for DST which can handle new entities that are not present in the training set -i.e., out-of-vocabulary (OOV) slot values.
During inference, the model uses its own predicted slot tags and previous turn dialogue state. However, ground truth slot tags and dialogue state are used for training to ensure stability. Aiming to bridge this gap between training and inference, we also propose a novel scheduled sampling (Bengio et al., 2015) approach to joint language understanding and dialogue state tracking.
The paper is organized as follows: Section 2 presents related work, followed by Section 3 describing the architecture of the dialogue encoder, which encodes the dialogue turns to be used as features by different tasks in our framework. The section also defines and outlines the implementation of the LU and DST tasks. Section 4 describes our setup for scheduled sampling. We then conclude with experiments and discussion of results.

Related Work
The initial motivation for dialogue state tracking came from the uncertainty in speech recognition and other sources (Williams and Young, 2007), as well as to provide a comprehensive input to a downstream dialogue policy component deciding the next system action. Proposed belief tracking models have ranged from rule-based (Wang and Lemon, 2013), to generative (Thomson and Young, 2010), discriminative (Henderson et al., 2014), other maximum entropy models (Williams, 2013) and web-style ranking (Williams, 2014).
Language understanding has commonly been modeled as a combination of intent and dialogue act classification and slot tagging (Tur and De Mori, 2011). Recently, recurrent neural network (RNN) based approaches have shown good results for LU. Hakkani-Tür et al. 2016 used a joint RNN for intents, acts and slots to achieve better overall frame accuracy. In addition, models such as and Su et al. 2018 further improve LU results by incorporating context from dialogue history. Henderson et al. 2014 proposed a single joint model for single-turn LU and multi-turn DST to improve belief tracking performance. However, it relied on manually constructed semantic dictionaries to identify alternative mentions of ontology items that vary lexically or morphologically. Such an approach is not scalable to more complex domains (Mrkšić et al., 2017) as it is challenging to construct semantic dictionaries that can cover all possible entity mentions that occur naturally in a variety of forms in natural language. Mrkšić et al. 2017 proposed the NBT model which eliminates the LU step by directly operating on the user utterance. However, their approach requires iterating through the set of all possible values for a slot, which could be large or potentially unbounded (e.g. date, time, usernames). Perez and Liu 2017 incorporated end-to-end memory networks, as introduced in Sukhbaatar et al. 2015, into state tracking and Liu and Lane 2017 proposed an end-toend model for belief tracking. However, these two approaches cannot accommodate OOV slot values as they represent DS as a distribution over all possible slot values seen in the training set.
To handle large value sets and OOV slot values,  proposed an approach, where a set of value candidates is formed at each turn using dialogue context. The DST then operates on this set of candidates. In this work, we adopt a similar approach, but our focus is on joint modeling of LU and DST, and sampling methods for training them jointly.

Model Architecture
Let a dialogue be a sequence of T turns, each turn containing a user utterance and the preceding system dialogue acts output by the dialogue manager. Figure 3 gives an overview of our model architecture, which includes a user utterance encoder, a system act encoder, a state encoder, a slot tagger and a candidate scorer. At each turn t ∈ {1, ..., T }, the model takes a dialogue turn and the previous dialogue state D t−1 as input and outputs the predicted user intent, user dialogue acts, slot values in the user utterance and the updated Figure 3: Architecture of our joint LU and DST model as described in Section 3. x t is the sequence of user utterance token embeddings, a t is the system act encoding and blue arrows indicate additional features used by DST as detailed in Section 3.8. dialogue state D t .
As a new turn arrives, the system act encoder (Section 3.1) encodes all system dialogue acts in the turn to generate the system dialogue act vector a t . Similarly, the utterance encoder (Section 3.2) encodes the user utterance into a vector u t e , and also generates contextual token embeddings u t o for each utterance token. The state encoder (Section 3.3) then uses a t , u t e and its previous turn hidden state, d t−1 st , to generate the dialogue context vector d t o , which summarizes the entire observed dialogue, and its updated hidden state d t st . The dialogue context vector d t o is then used by the user intent classifier (Section 3.4) and user dialogue act classifier (Section 3.5). The slot tagger (section 3.6) uses the dialogue context from previous turn d t−1 o , the system act vector a t and contextual token embeddings u t o to generate refined contextual token embeddings s t o . These refined token embeddings are then used to predict the slot tag for each token in the user utterance.
The system dialogue acts and predicted slot tags are then used to update the set of candidate values for each slot (Section 3.7). The candidate scorer (Section 3.8) then uses the previous dialogue state D t−1 , the dialogue context vector d t o and other features extracted from the current turn (indicated by blue arrows in Figure 3) to update the scores for all candidates in the candidate set and outputs the updated dialogue state D t . The following sections describe these components in detail.

System Act Encoder
Previous turn system dialogue acts play an important role in accurate semantic parsing of a user utterance. Each system dialogue act contains an act type and optional slot and value parameters. The dialogue acts are first encoded into binary vectors denoting the presence of an act type. All dialogue acts which don't have any associated parameters (e.g. greeting and negate) are encoded as a binary indicator vector a t utt . Dialogue acts with just a slot s as parameter (e.g. request(date)) are encoded as a t slot (s), whereas acts having a candidate value c for a slot s as parameter (e.g. offer(time=7pm)) are encoded as a t cand (s, c). These binary vectors are then combined using equations 1-4 to obtain the combined system act representation a t , which is used by other units of dialogue encoder (as shown in Figure 3). In these equations, e s is a trainable slot embedding defined for each slot s.

Utterance Encoder
The user utterance takes the tokens corresponding to the user utterance as input. Special tokens SOS and EOS are added at the beginning and end of the token list. Let x t = {x t m ∈ R u d , ∀ 0 ≤ m < M t } denote the embedded representations of these tokens, where M t is the number of tokens in the user utterance for turn t (including SOS and EOS).
We use a single layer bi-directional GRU recurrent neural network (Cho et al., 2014) with state size d u and initial state set to 0, to encode the user utterance. The first output of the user utterance encoder is u t e ∈ R 2du , which is a compact representation of the entire user utterance, defined as the concatenation of the final states of the two RNNs.
which is the embedded representation of each token conditioned on the entire utterance, defined as the concatenation of outputs at each step of the forward and backward RNNs.

State Encoder
The state encoder completes our hierarchical dialogue encoder. At turn t, the state encoder generates d t o , which is an embedded representation of the dialogue context until and including turn t. We implement the state encoder using a unidirectional GRU RNN with each timestep corresponding to a dialogue turn. As shown in Figure 3, the dialogue encoder takes a t ⊕ u t e and its previous hidden state d t−1 st as input and outputs the updated hidden state d t st and the encoded representation of the dialogue context d t o (which are the same in case of GRU).

User Intent Classification
The user intent is used to identify the backend with which the dialogue system should interact. We predict the intents at each turn to allow user to switch intents during the dialogue. However, we assume that a given user utterance can contain atmost one intent and model intent prediction as a multi-class classification problem. At each turn, the distribution over all intents is calculated as where dim(p t i ) = |I|, W i ∈ R d×|I| and b i ∈ R |I| , I denoting the user intent vocabulary and d = dim(d t o ). During inference, we predict argmax(p t i ) as the intent label for the utterance.

User Dialogue Act Classification
Dialogue acts are structured semantic representations of user utterances. User dialogue acts are used by the dialogue manager in deciding the next system action. We model user dialogue act classification as a multilabel classification problem, to allow for the presence of more than one dialogue act in a turn (Tur and De Mori, 2011). At each turn, the probability for act a is predicted as . For each act α, p t a (α) is interpreted as the probability of presence of α in turn t. During inference, all dialogue acts with a probability greater than t u are predicted, where 0 < t u < 1.0 is a hyperparameter tuned using the dev set.

Slot Tagging
Slot tagging is the task of identifying the presence of values of different slots in the user utterance. We use the IOB tagging scheme (Tjong Kim Sang and Buchholz 2000, see Figure 2) to assign a label to each token. These labels are then used to extract the values for different slots from the utterance.
The slot tagging network consists of a singlelayer bidirectional LSTM RNN (Hochreiter and Schmidhuber, 1997), which takes the contextual token embeddings u t o generated by the utterance encoder as input. It outputs refined token embeddings s t o = {s t o,m , ∀ 0 ≤ m < M t } for each token, M t being the number of tokens in user utterance at turn t.
Models making use of dialogue context for LU have been shown to achieve superior performance . In our setup, the dialogue context vector d t−1 o encodes all the preceding turns and the system act vector a t encodes the system dialogue acts preceding the user utterance. As shown in Figure 3, d t−1 o is used to initialize 1 the hidden state (cell states are initialized to zero) for the forward and backward LSTM recurrent units in the slot tagger, while a t is fed as input to the tagger by concatenating with each element of u t o as shown below. We use an LSTM instead of a GRU for this layer since that resulted in better performance on the validation set.
s t e,bw , s t o,bw = LST M bw (s t in ) Let S be the set of all slots in the dataset. We define a set of 2|S| + 1 labels (one B-and I-label for each slot and a single O label) for IOB tagging. The refined token embedding s t o,m is used to predict the distribution across all IOB labels for token at index m as where dim(p t s,m ) = 2|S| + 1, W s ∈ R ds×2|S|+1 and b s ∈ R 2|S|+1 , d s = dim(s t o,m ) is the output size of slot tagger LSTM. During inference, we predict argmax(p t s,m ) as the slot label for the m th token in the user utterance in turn t.

Updating Candidate Set
A candidate set C t s is defined as a set of values of a slot s which have been mentioned by either the user or the system till turn t.  proposed the use of candidate sets in DST for efficiently handling slots with a large set of values. In their setup, the candidate set is updated at every turn to include new values and discard old values when it reaches its maximum capacity. The dialogue state is represented as a set of distributions over value set V t s = C t s ∪ {δ, φ} for each slot s ∈ S t , where δ and φ are special values dontcare (user is ok with any value for the slot) and null (slot not specified yet) respectively, and S t is the set of all slots that have been mentioned either by the user or the system till turn t.
Our model uses the same definition and update rules for candidate sets. At each turn we use the predictions of the slot tagger (Section 3.6) and system acts which having slot and value parameters to update the corresponding candidate sets. All candidate sets are padded with dummy values for batching computations for all slots together. We keep track of valid candidates by defining indicator features m t v (s, c) for each candidate, which take the value 1.0 if candidate is valid or 0.0 if not.

Candidate Scorer
The candidate scorer predicts the dialogue state by updating the distribution over the value set V t s for each slot s ∈ S t . For this, we define three intermediate features r t utt , r t slot (s) and r t cand (s, c). r t utt is shared across all value sets and is defined by equation 12. r t slot (s) is used to update scores for V t s and is defined by equation 13. Furthermore, r t cand (s, c) is defined for each candidate c ∈ C t s ⊂ V t s using equation 14 and contains all features that are associated to candidate c of slot s.
In the above equations, d t o is the dialogue context at turn t output by the state encoder (Section 3.3), a t utt , a t slot (s) and a t cand (s, c) are system act encodings generated by the system act encoder (Section 3.1), p t−1 δ (s) and p t−1 φ (s) are the scores associated with dontcare and null values for slot s respectively. p t−1 c (s) is the score associated with candidate c of slot s in the previous turn and is taken to be 0 if c ∈ C t s . m t v (s, c) are variables indicating whether a candidate is valid or padded (Section 3.8). We define another indicator feature m t u (c) which takes the value 1.0 if the candidate is a substring of the user utterance in turn t or 0.0 otherwise. This informs the candidate scorer which candidates have been mentioned most recently by the user.
Features used in Equations 12-14 are then used to obtain the distribution over V t s using Equations 15-17. In the above equations, l t s (δ) denotes the logit for dontcare value for slot s, l t s (c) denotes the logit for a candidate c ∈ C t s and l t s (φ) is a trainable parameter. These logits are obtained by processing the corresponding features using feedforward neural networks F F 1 cs and F F 2 cs , each having one hidden layer. The output dimension of these networks is 1 and the dimension of the hidden layer is taken to be half of the input dimension. The logits are then normalized using softmax to get the distribution p t s over V t s .

Scheduled Sampling
DST is a recurrent model which uses predictions from the previous turn. For stability during training, ground truth predictions from the previous turn are used. This causes a mismatch between training and inference behavior. We use scheduled sampling (Bengio et al., 2015) to bridge this mismatch. Scheduled sampling has been shown to achieve improved slot tagging performance on single turn datasets (Liu and Lane, 2016). Figure 4 shows our setup for scheduled sampling for DST, which is carried out at two different locations -slot tags and dialogue state.
The performance of slot tagger is critical to DST because any slot value missed by the slot tagger will not be added to the candidate set (unless it is tagged in another utterance or present in any system act). To account for this, during training, we sample between the ground truth slot tags (c t u ) and the predicted slot tags (c t u ), training initially withc t u (i.e. with keep probability p c = 1) but gradually reducing p c i.e. increasingly replacinḡ c t u with c t u . Using predicted slot tags during training allows DST to train in presence of noisy candidate sets.
During inference, the candidate scorer only has access to its own predicted scores in the previous turn (Equations 13 and 14). To better mimic this setup during training, we start with using ground truth previous scores taken fromD t−1 (i.e. with keep probability p D = 1) and gradually switch to D t−1 , the predicted previous scores, reducing p D .
Both p c and p D vary as a function of the training step k, as shown in the right part of Figure 4; only ground truth slot tags and dialogue state are used for training i.e. p c and p D stay at 1.0 for the first k pre training steps, and then decrease linearly as the ground truth slot tags and state are increasingly replaced by model predictions during training.

Experiments
The major contributions of our work are two-fold. First, we hypothesize that joint modeling of LU and DST results in a computationally efficient model with fewer parameters without compromising performance. Second, we propose the use of scheduled sampling to improve the robustness of DST during inference. To this end, we conduct experiments across the following two setups.
Separate vs Joint LU-DST - Figure 3 shows the joint LU-DST setup where parameters in the utterance encoder and state encoder are shared across LU tasks (intent classification, dialogue act classification and slot tagging) and DST (candidate scoring). As baselines, we also conduct experiments where LU and DST tasks use separate parameters for utterance and state encoders.
Scheduled Sampling -We conduct scheduled sampling (as described in Section 4) experiments in four different setups. 1. None -Ground truth slot tags (c t u ) and previous dialogue state (D t−1 ) are used for training. 2. Tags -Model samples between ground truth (c t u ) and predicted (c t u ) slot tags, sticking to ground truth previous state. 3. State -Model samples between ground truth (D t−1 ) and predicted (D t−1 ) previous state, sticking to ground truth slot tags. 4. Both -Model samples betweenD t−1 and D t−1 as well as betweenc t u and c t u . In the last three setups, we start sampling from predictions only after k pre = 0.3 k max training steps, as shown in Figure 4.

Evaluation Metrics
We report user intent classification accuracy, F1 score for user dialogue act classification, frame accuracy for slot tagging and joint goal accuracy and slot F1 score for DST. During DST evaluation, we always use the predicted slot values and the dialogue state in the previous turn. Slot frame accuracy is defined as the fraction of turns for which all slot labels are predicted correctly. Similarly, joint goal accuracy is the fraction of turns for which the predicted and ground truth dialogue state match for all slots. Since it is a stricter metric than DST slot F1, we use it as the primary metric to identify the best set of parameters on the validation set.

Datasets
We evaluate our approaches on two datasets: • Simulated Dialogues 2 -The dataset, described in Shah et al. 2017, contains dialogues from restaurant (Sim-R) and movie (Sim-M) domains across three intents. A challenging aspect of this dataset is the prevalence of OOV entities e.g. only 13% of the movie names in the dev/test sets also occur in the training data. • DSTC2 -We use the top ASR hypothesis and system dialogue acts as inputs. Dialogue act labels are obtained from top SLU hypothesis and state labels for requestable slots. DS labels are obtained from state labels for informable slots. We use a semantic dictionary (Henderson et al., 2014) to obtain ground truth slot tags. We also use the semantic dictionary to canonicalize the candidate values since the slot values in the dialogue state come from a fixed set in the DSTC2 dialogues and may be different from those present in the user utterance.

Training
We use sigmoid cross entropy loss for dialogue act classification and softmax cross entropy loss for all other tasks. During training, we minimize the sum of all task losses using ADAM optimizer (Kingma and Ba, 2014), for 100k training steps with batches of 10 dialogues each. We used gridsearch to identify the best hyperparameter values (sampled within specified range) for learning rate (0.0001 -0.005) and token embedding dimension (50 -200). For scheduled sampling experiments, the minimum keep rate i.e. p min is varied between 0.1 -0.9 with linear decay. The layer sizes for the utterance encoder and slot tagger are set equal to the token embedding dimension, and that of the state encoder to half this dimension. Slot Value dropout -To make the model robust to OOV tokens arising from new entities not present in the training set, we randomly replace slot value tokens in the user utterance with a special OOV token with a probability that linearly increases from 0.0 to 0.4 during training.
6 Results and Discussion Table 1 shows our results across the two setups described in Section 5, for the Simulated Dialogues datasets. For Sim-R + Sim-M, we observe that the joint LU-DST model with scheduled sampling (SS) on both slot tags and dialogue state performs the best, with a joint goal accuracy of 73.8% overall, while the best separate model gets a joint goal accuracy of 71.9%, using SS only for slot tags. Even for the no-SS baselines, the joint model performs comparably to the separate model (joint goal accuracies of 68.6% and 68.7% respectively), indicating that sharing results in a more efficient model with fewer parameters, without compromising overall performance. For each SS configuration, our results comparing separate and joint modeling are statistically significant, as determined by the McNemar's test with p < 0.05.
On the Sim-R dataset, the best joint model obtains a joint goal accuracy of 87.1%, while the best separate model obtains 85.0%. However, we observe a significant drop in joint goal accuracy for the Sim-M dataset for both the joint model and the separate model as compared to Sim-R. This can partly be attributed to the Sim-M dataset being much smaller than Sim-R (384 training dialogues as opposed to 1116) and that the high OOV rate of the movie slot in Sim-M makes slot tagging performance more crucial for Sim-M. While SS does gently bridge the gap between training and testing conditions, its gains are obscured in this scenario possibly since it is very hard for DST to recover from a slot value being completely missed by LU, even when aided by SS.
For the two datasets, we also observe a significant difference between the slot frame accuracy and joint goal accuracy. This is because an LU error penalizes the slot frame accuracy for a single turn, whereas an error in dialogue state propagates through all the successive turns, thereby drasti- cally reducing the joint goal accuracy. This gap is even more pronounced for Sim-M because of the poor performace of slot tagger on movie slot, which is often mentioned by the user in the beginning of the dialogue. The relatively high values of overall DST slot F1 for Sim-M for all experiments also corroborates this observation.  Table 2 shows our results on the DSTC2 dataset, which contains dialogues in the restaurant domain. The joint model gets a joint goal accuracy of 65.0% on the test set, which goes up to 67.0% with SS on slot tags. Approaches like NBT (Mrkšić et al., 2017) or Hierarchical RNN (Liu and Lane, 2017) are better suited for such datasets, where the set of all slot values is already known, thus eliminating the need for slot tagging. On the other hand, our setup uses slot tagging for candidate generation, which allows it to scale to OOV entities and scalably handle slots with a large or unbounded set of possible values, at the cost of performance.
Analyzing results for scheduled sampling, we observe that for almost all combinations of metrics, datasets and joint/separate model configurations, the best result is obtained using a model trained with some SS variant. For instance, for Sim-M, SS over slot tags and state increases joint goal accuracy significantly from 28.3% to 46.0% for joint model. SS on slot tags helps the most with Sim-R and DSTC2: our two datasets with the most data, and low OOV rates, while SS on both slot tags and dialogue state helps more on the smaller Sim-M. In addition, we also found that slot value dropout (Section 5.3), improves LU as well as DST results consistently. We omit the results without this technique for brevity.

Conclusions
In this work, we present a joint model for language understanding (LU) and dialogue state tracking (DST), which is computationally efficient by way of sharing feature extraction layers between LU and DST, while achieving an accuracy comparable to modeling them separately across multiple tasks. We also demonstrate the effectiveness of scheduled sampling on LU outputs and previous dialogue state as an effective way to simulate inference-time conditions during training for DST, and make the model more robust to errors.