Year: 2018

Abstract:
Semantic parsing, which maps a natural language sentence into a machinereadable representation of its meaning, is highly constrained by the limited annotated training data. Inspired by the idea of coarse-to-fine, we propose a generalto-detailed neural network (GDNN) by incorporating middle coarse cross-domain sketch (CDS) among utterances and their logic forms. For utterances in different domains, the General Network will extract CDS using an encoder-decoder model in a multi-task learning setup. Then for some utterances in a specific domain, the Detailed Network will generate the detailed target parts using a sequenceto-sequence architecture with advanced attention to both utterance and generated CDS. Our experiments show that compared to direct multi-task learning, CDS has improved the performance in semantic parsing task which converts users’ requests into meaning representation language (MRL). We also use experiments to illustrate that CDS works by adding some constraints to the target decoding process, which further proves the effectiveness and rationality of CDS.

heading: 1 INTRODUCTION
text: Recently many natural language processing (NLP) tasks based on the neural network have shown promising results and gained much attention because these studies are purely data-driven without linguistic prior knowledge. Semantic parsing task which maps a natural language sentence into a machine-readable representation (Fan et al. (2017)), as a particular translation task, can be treated as a sequence-to-sequence problem (Dong & Lapata (2016)). Lately, a compositional graph-based semantic meaning representation language (MRL) has been introduced (Kollar et al. (2018a)), which converts utterance into logic form (action-object-attribute), increasing the ability to represent complex requests. This work is based on MRL format for semantic parsing task.
Semantic parsing highly depends on the amount of annotated data and it is hard to annotate the data in logic forms such as Alexa MRL. Several researchers have focused on the area of multi-task learning and transfer learning (Hakkani-Tür et al. (2016), Fan et al. (2017), Kollar et al. (2018b)) with the observation that while these tasks differ in their domains and forms, the structure of language composition repeats across domains (Herzig & Berant (2017)). Compared to the model trained on a single domain only, a multi-task model that shares information across domains can improve both performance and generalization. However, there is still a lack of interpretations why the multi-task learning setting works (Ruder (2017)) and what the tasks have shared. Some NLP studies around language modeling (Le & Mikolov (2014), Vaswani et al. (2017), Devlin et al. (2018)) indicate that implicit commonalities of the sentences including syntax and morphology exist and can share among domains, but these commonalities have not been fully discussed and quantified.
To address this problem, in this work, compared to multi-task learning mentioned above which directly use neural networks to learn shared features in an implicit way, we try to define these cross-domain commonalities explicitly as cross-domain sketch (CDS). E.g., Search weather in 10 days in domain Weather and Find schedule for films at night in domain ScreeningEvent both have action SearchAction and Attribute time, so that they share a same MRL structure like SearchAction(Type(time@?)), where Type indicates domain and ? indicates attribute value which is copying from the original utterance. We extract this domain general MRL structure as CDS. Inspired by the research of coarse-to-fine (Dong & Lapata (2018)), we construct a two-level encoder-decoder by using CDS as a middle coarse layer. We firstly use General Network to get the CDS for every
utterance in all domains. Then for a single specific domain, based on both utterance and extracted CDS, we decode the final target with advanced attention while CDS can be seen as adding some constraints to this process. The first utterance-CDS process can be regarded as a multi-task learning setup since it is suitable for all utterances across the domains. This work mainly introducing CDS using multi-task learning has some contributions listed below:
1) We make an assumption that there exist cross-domain commonalities including syntactic and phrasal similarity for utterances and extract these commonalities as cross-domain sketch (CDS) which for our knowledge is the first time. We then define CDS on two different levels (action-level and attribute-level) trying to seek the most appropriate definition of CDS.
2) We propose a general-to-detailed neural network by incorporating CDS as a middle coarse layer. CDS is not only a high-level extraction of commonalities across all the domains, but also a prior information for fine process helping the final decoding.
3) Since CDS is cross-domain, our first-level network General Network which encodes the utterance and decodes CDS can be seen as a multi-task learning setup, capturing the commonalities among utterances expressions from different domains which is exactly the goal of multi-task learning.

heading: 2 RELATED WORK

heading: 2.1 SPOKEN LANGUAGE UNDERSTANDING
text: Traditional spoken language understanding (SLU) factors language understanding into domain classification, intent prediction, and slot filling, which proves to be effective in some domains (Gupta et al. (2006)). Representations of SLU use pre-defined fixed and flat structures, which limit its expression skills like that it is hard to capture the similarity among utterances when the utterances are from different domains (Kollar et al. (2018b)). Due to SLU’s limited representation skills, meaning representation language (MRL) has been introduced which is a compositional graph-based semantic representation, increasing the ability to represent more complex requests (Kollar et al. (2018a)). There are several different logic forms including lambda-calculus expression (Kwiatkowski et al. (2011)), SQL (Zhong et al. (2018)), Alexa MRL (Kollar et al. (2018a)). Compared to fixed and flat SLU representations, MRL (Kollar et al. (2018a)) based on a large-scale ontology, is much stronger in expression in several aspects like cross-domain and complex utterances.

heading: 2.2 SEQUENCE-TO-SEQUENCE FOR SEMANTIC PARSING
text: Mapping a natural language utterance into machine interpreted logic form (such as MRL) can be regarded as a special translation task, which is treated as a sequence-to-sequence problem (Sutskever et al. (2014)). Then Bahdanau et al. (2015) and Luong et al. (2015) advance the sequence-tosequence network with attention mechanism learning the alignments between target and input words, making great progress in the performance. Malaviya et al. (2018) explore the attention mechanism with some improvements by replacing attention function with attention sparsity. Besides, to deal with the rare words, Gu et al. (2016) incorporate the copy mechanism into the encoder-decoder model by directly copying words from inputs. Lately, many researchers have been around improving sequence-to-sequence model itself, in interpreting the sentence syntax information. Eriguchi et al. (2016) encode the input sentence recursively in a bottom-up fashion. Wu et al. (2017) generate the target sequence and syntax tree through actions simultaneously. Another aspect which has caught much attention is constrained decoding. Krishnamurthy et al. (2017) and Post & Vilar (2018) add some constraints into decoding process, making it more controllable. Dong & Lapata (2016) use the recurrent network as encoder which proves effective in sequence representation, and respectively use the recurrent network as decoder and tree-decoder. Krishnamurthy et al. (2017) employ the grammar to constrain the decoding process. Dong & Lapata (2018), believe utterance understanding is from high-level to low-level and by employing sketch, improve the performance.

heading: 2.3 MULTI-TASK LEARNING
text: For semantic parsing task especially in MRL format, it is expensive and time-consuming to annotate the data, and it is challenging to train semantic parsing neural models. Multi-task learning aims to
use other related tasks to improve target task performance. Liu & Lane (2016b) deal with traditional SLU piper-line network by jointly detecting intent and doing slot filling. Sogaard & Goldberg (2016) share parameters among various tasks, according to the low-level and high-level difference. Hershcovich et al. (2018) divide the representation network into task-specific and general which is shared during multi-task learning. Fan et al. (2017) and Herzig & Berant (2017) directly share the encoder or decoder neural layers (model params) through different semantic parsing tasks. In Kollar et al. (2018b), multi-task learning also mainly acts sharing the params of the network.

heading: 3 APPROACH

heading: 3.1 DEFINITION OF CROSS-DOMAIN SKETCH
text: For human language expressions, especially task-oriented requests, there exist commonalities across sentences including linguistic syntax and phrase similarity. They can be seen with general sentence templates. Table 1 shows some examples.
Since sentence templates are too many, we try to leverage these common regularities more abstractly. We extract these invariant commonalities which are implicit across domains, and call them as crossdomain sketch (CDS) in a canonical way.
We define CDS in meaning representation language (MRL) format (action-object-attribute) and on two levels (action-level and attribute-level). Action-level CDS means to acquire the same action for utterances from different domains while the attribute-level CDS means to extract more detailed information. See examples in Table 1. Instead of extracting CDS from utterance directly, we try converting from logic form into CDS reversely, because it is easier to deal with structural logic form than utterance in natural language form. We analyze the dataset Snips and use a rule-based method to obtain CDS. We strip logic forms from domain-specific components and preserve domainindependent parts including general actions and attributes.
We do some statistics on the dataset Snips (Goo et al. (2018)) used in this paper. We convert attributes [object type, movie type, restaurant type] into {object type}, [object name, restaurant name, movie name] into {object name}, [year, timeRange] into {time}, [location name, current location] into {object location}, [country, city] into {place}. All those attributes account for 55% of all attributes which indicate the existence and feasibility of CDS.

heading: 3.2 MODEL
text: Figure 1 shows our overall network, which contains a two-level encoder-decoder. The General Network encodes utterance and decodes cross-domain sketch (CDS). Since this process is domaingeneral, it can be done to all domains, which is a multi-task setup. The Detailed Network firstly encodes the CDS and the utterance, then it decodes the target result based on both utterance and CDS. This process is domain-dependent, so that it is a fine-tuning process in a specific domain.

heading: 3.2.1 PROBLEM DEFINITION
text: For an input utterance u = u1, u2, ...u|u|, and its middle result cross-domain sketch (CDS) c = c1, c2, ...c|c|, and its final result logic form y = y1, y2, ...y|y|, the conditional probability is:
p(y|u, c) = |y|∏ t=1 p(yt|y<t , u, c) p(c|u) = |c|∏ t=1 p(ct|c<t , u) (1)
where y<t = y1, y2, ...y|t−1|, and c<t = c1, c2, ...c|t−1|.

heading: 3.2.2 UTTERANCE ENCODER
text: The neural encoder of our model is similar to neural machine translation (NMT) model, which uses a bi-directional recurrent neural network. Firstly each word of utterance is mapped into a vector ut ∈ Rd via embedding layer and we get a word sequence u = (u1, ..., u|u|). Then we use a bi-directional recurrent neural network with long short-term memory units (LSTM) (Hochreiter & Schmidhuber (1997)) to learn the representation of word sequence. We generate forward hidden state −→ hut = fLSTM ( −−→ hut−1, ut) and backward state ←− hut = fLSTM ( ←−− hut−1, ut). The t-th word will be hut = [ −→ hut , ←− hut ].
We construct two kinds of utterance encoders, general utterance encoder for General Network and specific utterance encoder for Detailed Network (see in Figure 1), so as to extract different information for different purposes. The general utterance encoder, meant to pay more attention to cross-domain commonalities of utterances, is used by all utterances from all domains. The specific utterance encoder, which is domain-dependent, belongs to one specific domain and is more sensitive to details. We call encoder outputs hugt from general utterance encoder and h us t from specific utterance encoder. When the two encoders share the same parameters that is hugt = h us t , we call it identical encoding and when they are not, we call it separate encoding, inspired by (Sogaard & Goldberg (2016);Krishnamurthy et al. (2017);Liu et al. (2017);Abdou et al. (2018)) which explore the sharing mechanisms of multi-task learning and propose some improvements.

heading: 3.2.3 CDS DECODER & ENCODER
text: The General Network is meant to obtain cross-domain sketch (CDS) c conditioned on utterance u, using an encoder-decoder network. After encoding utterance by general utterance encoder for all domains, we obtain hugt (see Section 3.2.2). Then we start to decode CDS.
The decoder is based on a unidirectional recurrent neural network, and the output vector is used to predict the word. The cd represents CDS decoder.
hcdt = fLSTM (h cd t−1, ct) (2)
where ct is the previously predicted word embedding.
The LuongAttention (Luong et al. (2015)) between decoding hidden state dt and encoding sequence ei(i = 1, 2, ...|e|) at time step t is computed as:
st,i = exp(dt, ei)∑|c|
k=1 exp(dt, ek) (3)
at = |e|∑ i=1 st,iei (4)
Based on equations (3) and (4), we compute the attention aut by setting dt = h cd t and ei = h ug i (i = 1, 2, ...|u|). The t-th predicted output token will be:
hcdtatt = tanh(Wcdh cd t +Wcua u t ) (5)
p(ct|c<t , u) = softmax(Wcoh cd tatt + bco) (6)
where W, b are parameters. After decoding CDS words c = (c1, ..., c|c|), we use an encoder to represent its meaning and due to words’ relation with forward and backward contexts, we choose to use a bi-directional LSTM. We generate forward hidden state −→ hcet and backward state ←− hcet . The t-th word will be hcet = [ −→ hcet , ←− hcet ].

heading: 3.2.4 TARGET DECODER
text: Through specific utterance encoder and cross-domain sketch (CDS) encoder, we acquired t-th word representation hust and h ce t . Finally with advanced attention to both encoded utterance u and CDS c, we decode the final target y. The decoder is based on a unidirectional recurrent neural network, and the output vector is used to predict the word. The y represents target decoder.
hyt = fLSTM (h y t−1, yt) (7)
where yt is the previously predicted word embedding. During target decoding process and at time step t, we not only compute the attention to utterance encoding outputs hus but also compute the attention to CDS encoding outputs hce. The attention between target hidden state and utterance is aut by computing attention between hyt and encoding sequence h us i (i = 1, 2, ...|u|) based on equations (3) and (4). The attention between target hidden state and CDS is act by also computing attention between hyt and h ce i (i = 1, 2, ...|c|) in the same way. Then the t-th predicted output token will be based on the advanced two-aspect attention:
hytatt = tanh(Wyh y t +Wyua u t +Wyca c t) (8)
p(dt|d<t , u) = softmax(Wyoh y tatt + byo) (9)

heading: 3.3 MODEL TRAINING AND INFERENCE
text: For training process, the objective is:
max ∑
(u,c,y)∈T
p(y|u, c) + p(c|u) (10)
T is the training corpus. For inference process, we firstly obtain cross-domain sketch (CDS) via c̃ = argmax p(c|u) then we get the final target logic form via ỹ = argmax p(y|u, c̃). For both decoding processes, we use greedy search to generate words one by one.

heading: 4 EXPERIMENTS

heading: 4.1 DATASETS
text: Existed semantic parsing datasets, e.g., GEO (Zettlemoyer & Collins (2012)), ATIS (Zettlemoyer & Collins (2007)), collect data only from one domain and have a very limited amount, which can not fully interpret the effectiveness of cross-domain sketch (CDS) since it needs large dataset among different domains.
In this case, we mainly consider the semantic parsing task Snips (Goo et al. (2018)) based on MRL format (action-object-attribute). Snips collects users’ requests from a personal voice assistant. The original dataset is annotated in spoken language understanding (SLU) format (intent-slot). It has 7 intent types and 72 slot labels, and more statistics are shown in Table 2. Based on the format (intent-slot), we pre-process this dataset into MRL format by some pre-defined rules, then we regard the intent as domain/task and share CDS among them. The details are shown in Table 3.

heading: 4.2 SETTINGS
text: We use Tensorflow in all our experiments, with LuongAttention (Luong et al. (2015)) and copy mechanism. The embedding dimension is set to 100 and initialized with GloVe embeddings (Pennington et al. (2014)). The encoder and decoder both use one-layer LSTM with hidden size 50. We apply the dropout selected in {0.3,0.5}. Learning rate is initialized with 0.001 and is decaying during training. Early stopping is applied. The mini-batch size is set to 16. We use the logic form accuracy as the evaluation metric.

heading: 4.3 RESULTS AND ANALYSIS
text: Firstly, in order to prove the role of the cross-domain sketch (CDS) in helping to guide decoding process with multi-tasking learning setup, we do several experiments, and the results are shown in Table 4. For joint learning, we apply several multi-task architectures from (Fan et al. (2017)), including one-to-one, one-to-many and one-to-shareMany. One-to-one architecture applies a single sequence-to-sequence model across all the tasks. One-to-many only shares the encoder across all the tasks while the decoder including the attention parameters is not shared. In one-to-shareMany model, tasks share encoder and decoder (including attention) params, but the output layer of decoder is task-independent.
From the Table 4, in general, joint learning performs better than single task learning. In joint learning, one-to-one is the best and performs way better than one-to-many and one-to-shareMany, probably limited by the dataset’s size and similarity among tasks. By incorporating CDS, our GDNN (general-to-detailed neural network) models have all improved the performance to different degrees. The CDS is defined on two levels (action-level and attribute-level, see examples in Table 3) and attribute-level CDS improves greater than action-level CDS, which is in our expectation since it offers more information for tasks to share. We also experiment on different utterance encoding setups with identical encoding and separate encoding (see Section 3.2.2). The separate encoding setup performs better than sharing the same encoder for utterance, which integrates the fact that different encoders pay different attention to the utterances due to different purposes which means one is more general and the other is more specific detailed.
We also list the full results of GDNN in Table 5 below, including CDS accuracy by General Network, target accuracy by Detailed Network when feeding with right CDS, and the final accuracy, which further proves the effectiveness of CDS.
Moreover, we compare our experiments with traditional models which regard the task as intent classification and slot filling (IC SF). The results are shown in Table 6 below.
From Table 6, we can see compared to IC SF models (based on sequence labeling format), Seq2Seq perform worse (71.4% compared to 73.2%) due to its fewer assumptions and larger decode size as well as its difficulty of training, which is usual in comparing IC SF models and sequence-tosequence models. Through using CDS, the performance has significantly improved. On the one
hand, CDS extract the cross-domain commonalities among tasks helping to make the multi-task learning more specific, which can be seen as an advance to multi-task learning.
On the other hand, CDS can be seen adding some constraints to the final target decoding process which has offered more information for the decoding process, compared to direct joint Seq2Seq. To better prove and explain this idea, we do some experiments according to constraint decoding aspect. We try to compare the sub-process of converting utterance to CDS through different models, e.g., IC SF, Seq2Seq. From the Table 7, we can see that Seq2Seq achieve the comparable results (87.7%) to IC SF model (84.9%) for generating CDS from utterance, which further explains that, the fact joint seq2seq performs worse (71.4%, see Table 6) than IC SF model (73.2%) is owing to the lack of guidance and constraints during the follow-up decoding process. By incorporating CDS, we add some constraints to this decoding process thus obtaining better performance.

heading: 5 CONCLUSIONS AND FUTURE WORK
text: In this paper, we propose the concept of cross-domain sketch (CDS) which extracts some shared information across domains, trying to fully utilize the cross-domain commonalities such as syntactic and phrasal similarity in human expressions. We try to define CDS on two levels and give some examples to illustrate our idea. We also present a general-to-detailed neural network (GDNN) for converting an utterance into a logic form based on meaning representation language (MRL) form. The general network, which is meant to extract cross-domain commonalities, uses an encoderdecoder model to obtain CDS in a multi-task setup. Then the detailed network generates the final domain-specific target by exploiting utterance and CDS simultaneously via attention mechanism. Our experiments demonstrate the effectiveness of CDS and multi-task learning.
CDS is able to generalize over a wide range of tasks since it is an extraction to language expressions. Therefore, in the future, we would like to perfect the CDS definition and extend its’ ontology to other domains and tasks. Besides, in this paper, we use attention mechanism to make use of CDS which is still a indirect way. We would like to explore more effective ways such as constraint decoding to further enhance the role of CDS.

Review summaries:
This paper introduces “Cross domain schemas” (CDS) for semantic parsing of utterances made to a virtual assistant. CDS captures similarities in requests according to the underlying actions or attributes being discussed, regardless of the user’s high-level intent. Also introduced is a model which leverages CDS to improve semantic parsing of utterances to a meaning representation language (MRL). This model first parses an utterance to CDS, then uses an encoding of the CDS jointly with the utterance encoding to decode a meaning representation. By treating different intents as separate domains, the authors construct a multi-task learning setup for CDS and MRL parsing. Results are provided for the Snips dataset of virtual assistant queries. 

This paper describes a two-stage encoder-decoder model for semantic parsing. The model first decodes a cross-domain schema (CDS) representation from the input utterance, then decodes the final logial form from both the utterance and CDS. The model outperforms other multitask Seq2Seq models on the Snips (Goo et al., 2018) dataset, but is still behind the traditional slot-filling models (Goo et al., 2018).