Weakly-supervised Semantic Parsing with Abstract Examples

Omer Goldman, Veronica Latcinnik, Udi Naveh, Amir Globerson, Jonathan Berant

Introduction

The goal of semantic parsing is to map language utterances to executable programs. Early work on statistical learning of semantic parsers utilized supervised learning, where training examples included pairs of language utterances and programs Zelle and Mooney (1996); Kate et al. (2005); Zettlemoyer and Collins (2005, 2007). However, collecting such training examples at scale has quickly turned out to be difficult, because expert annotators who are familiar with formal languages are required. This has led to a body of work on weakly-supervised semantic parsing Clarke et al. (2010); Liang et al. (2011); Krishnamurthy and Mitchell (2012); Kwiatkowski et al. (2013); Berant et al. (2013); Cai and Yates (2013); Artzi and Zettlemoyer (2013). In this setup, training examples correspond to utterance-denotation pairs, where a denotation is the result of executing a program against the environment (see Fig. 1). Naturally, collecting denotations is much easier, because it can be performed by non-experts.

Training semantic parsers from denotations rather than programs complicates training in two ways: (a) Search: The algorithm must learn to search through the huge space of programs at training time, in order to find the correct program. This is a difficult search problem due to the combinatorial nature of the search space. (b) Spuriousness: Incorrect programs can lead to correct denotations, and thus the learner can go astray based on these programs. Of the two mentioned problems, spuriousness has attracted relatively less attention Pasupat and Liang (2016); Guu et al. (2017).

Recently, the Cornell Natural Language for Visual Reasoning corpus (CNLVR) was released Suhr et al. (2017), and has presented an opportunity to better investigate the problem of spuriousness. In this task, an image with boxes that contains objects of various shapes, colors and sizes is shown. Each image is paired with a complex natural language statement, and the goal is to determine whether the statement is true or false (Fig. 1). The task comes in two flavors, where in one the input is the image (pixels), and in the other it is the knowledge-base (KB) from which the image was synthesized. Given the KB, it is easy to view CNLVR as a semantic parsing problem: our goal is to translate language utterances into programs that will be executed against the KB to determine their correctness Johnson et al. (2017b); Hu et al. (2017). Because there are only two return values, it is easy to generate programs that execute to the right denotation, and thus spuriousness is a major problem compared to previous datasets.

In this paper, we present the first semantic parser for CNLVR. Semantic parsing can be coarsely divided into a lexical task (i.e., mapping words and phrases to program constants), and a structural task (i.e., mapping language composition to program composition operators). Our core insight is that in closed worlds with clear semantic types, like spatial and visual reasoning, we can manually construct a small lexicon that clusters language tokens and program constants, and create a partially abstract representation for utterances and programs (Table 1) in which the lexical problem is substantially reduced. This scenario is ubiquitous in many semantic parsing applications such as calendar, restaurant reservation systems, housing applications, etc: the formal language has a compact semantic schema and a well-defined typing system, and there are canonical ways to express many program constants.

We show that with abstract representations we can share information across examples and better tackle the search and spuriousness challenges. By pulling together different examples that share the same abstract representation, we can identify programs that obtain high reward across multiple examples, thus reducing the problem of spuriousness. This can also be done at search time, by augmenting the search state with partial programs that have been shown to be useful in earlier iterations. Moreover, we can annotate a small number of abstract utterance-program pairs, and automatically generate training examples, that will be used to warm-start our model to an initialization point in which search is able to find correct programs.

We develop a formal language for visual reasoning, inspired by Johnson et al. (2017b), and train a semantic parser over that language from weak supervision, showing that abstract examples substantially improve parser accuracy. Our parser obtains an accuracy of 82.5%, a 14.7% absolute accuracy improvement compared to state-of-the-art. All our code is publicly available at https://github.com/udiNaveh/nlvr_tau_nlp_final_proj.

Setup

Given a training set of NN examples {(xi,ki,yi)}i=1N\{(x_{i},k_{i},y_{i})\}_{i=1}^{N}, where xix_{i} is an utterance, kik_{i} is a KB describing objects in an image and yi∈{\textscTrue,\textscFalse}y_{i}\in\{\textsc{True},\textsc{False}\} denotes whether the utterance is true or false in the KB, our goal is to learn a semantic parser that maps a new utterance xx to a program zz such that when zz is executed against the corresponding KB kk, it yields the correct denotation yy (see Fig. 1).

Programming language

The original KBs in CNLVR describe an image as a set of objects, where each object has a color, shape, size and location in absolute coordinates. We define a programming language over the KB that is more amenable to spatial reasoning, inspired by work on the CLEVR dataset Johnson et al. (2017b). This programming language provides access to functions that allow us to check the size, shape, and color of an object, to check whether it is touching a wall, to obtain sets of items that are above and below a certain set of items, etc.We leave the problem of learning the programming language functions from the original KB for future work. More formally, a program is a sequence of tokens describing a possibly recursive sequence of function applications in prefix notation. Each token is either a function with fixed arity (all functions have either one or two arguments), a constant, a variable or a λ\lambda term used to define Boolean functions. Functions, constants and variables have one of the following atomic types: Int, Bool, Item, Size, Shape, Color, Side (sides of a box in the image); or a composite type Set(?), and Func(?,?). Valid programs have a return type Bool. Tables 1 and 2 provide examples for utterances and their correct programs. The supplementary material provides a full description of all program tokens, their arguments and return types.

Unlike CLEVR, CNLVR requires substantial set-theoretic reasoning (utterances refer to various aspects of sets of items in one of the three boxes in the image), which required extending the language described by Johnson et al. (2017b) to include set operators and lambda abstraction. We manually sampled 100 training examples from the training data and estimate that roughly 95% of the utterances in the training data can be expressed with this programming language.

Model

We base our model on the semantic parser of Guu et al. (2017). In their work, they used an encoder-decoder architecture Sutskever et al. (2014) to define a distribution pθ(z∣x)p_{\theta}(z\mid x). The utterance xx is encoded using a bi-directional LSTM Hochreiter and Schmidhuber (1997) that creates a contextualized representation hih_{i} for every utterance token xix_{i}, and the decoder is a feed-forward network combined with an attention mechanism over the encoder outputs Bahdanau et al. (2015). The feed-forward decoder takes as input the last KK tokens that were decoded.

More formally the probability of a program is the product of the probability of its tokens given the history: pθ(z∣x)=∏tpθ(zt∣x,z1:t−1)p_{\theta}(z\mid x)=\prod_{t}p_{\theta}(z_{t}\mid x,z_{1:t-1}), and the probability of a decoded token is computed as follows. First, a Bi-LSTM encoder converts the input sequence of utterance embeddings into a sequence of forward and backward states h1{F,B},…,h∣x∣{F,B}h^{\{F,B\}}_{1},\ldots,h^{\{F,B\}}_{|x|}. The utterance representation x^\hat{x} is x^=[h∣x∣F;h1B]\hat{x}=[h_{|x|}^{F};h_{1}^{B}]. Then decoding produces the program token-by-token:

where ϕz\phi_{z} is an embedding for program token zz, v^\hat{v} is a bag-of-words vector for the tokens in xx, zi:j=(zi,…,zj)z_{i:j}=(z_{i},\dots,z_{j}) is a history vector of size K, the matrices Wq,Wα,WsW_{q},W_{\alpha},W_{s} are learned parameters (along with the LSTM parameters and embedding matrices), and ’;’ denotes concatenation.

Searching through the large space of programs is a fundamental challenge in semantic parsing. To combat this challenge we apply several techniques. First, we use beam search at decoding time and when training from weak supervision (see Sec. 4), similar to prior work Liang et al. (2017); Guu et al. (2017). At each decoding step we maintain a beam BB of program prefixes of length nn, expand them exhaustively to programs of length n+1n+1 and keep the top-∣B∣|B| program prefixes with highest model probability.

Second, we utilize the semantic typing system to only construct programs that are syntactically valid, and substantially prune the program search space (similar to type constraints in Krishnamurthy et al. (2017); Xiao et al. (2016); Liang et al. (2017)). We maintain a stack that keeps track of the expected semantic type at each decoding step. The stack is initialized with the type Bool. Then, at each decoding step, only tokens that return the semantic type at the top of the stack are allowed, the stack is popped, and if the decoded token is a function, the semantic types of its arguments are pushed to the stack. This dramatically reduces the search space and guarantees that only syntactically valid programs will be produced. Fig. 2 illustrates the state of the stack when decoding a program for an input utterance.

Given the constrains on valid programs, our model pθ′(z∣x)p^{\prime}_{\theta}(z\mid x) is defined as:

Discriminative re-ranking:

The above model is a locally-normalized model that provides a distribution for every decoded token, and thus might suffer from the label bias problem Andor et al. (2016); Lafferty et al. (2001). Thus, we add a globally-normalized re-ranker pψ(z∣x)p_{\psi}(z\mid x) that scores all ∣B∣|B| programs in the final beam produced by pθ′(z∣x)p^{\prime}_{\theta}(z\mid x). Our globally-normalized model is:

and is normalized over all programs in the beam. The scoring function sψ(x,z)s_{\psi}(x,z) is a neural network with identical architecture to the locally-normalized model, except that (a) it feeds the decoder with the candidate program zz and does not generate it. (b) the last hidden state is inserted to a feed-forward network whose output is sψ(x,z)s_{\psi}(x,z). Our final ranking score is pθ′(z∣x)pψg(z∣x)p^{\prime}_{\theta}(z|x)p^{g}_{\psi}(z\mid x).

Training

We now describe our basic method for training from weak supervision, which we extend upon in Sec. 5 using abstract examples. To use weak supervision, we treat the program zz as a latent variable that is approximately marginalized. To describe the objective, define R(z,k,y)∈{0,1}R(z,k,y)\in\{0,1\} to be one if executing program zz on KB kk results in denotation yy, and zero otherwise. The objective is then to maximize p(y∣x)p(y\mid x) given by:

where Z\mathcal{Z} is the space of all programs and B⊂ZB\subset\mathcal{Z} are the programs found by beam search.

In most semantic parsers there will be relatively few zz that generate the correct denotation yy. However, in CNLVR, yy is binary, and so spuriousness is a central problem. To alleviate it, we utilize a property of CNLVR: the same utterance appears 4 times with 4 different images. We used the KBs in CNLVR, for which there are 4 KBs per utterance. When working over pixels there are 24 images per utterance, as 6 images were generated from each KB. If a program is spurious it is likely that it will yield the wrong denotation in one of those 4 images.

Thus, we can re-define each training example to be (x,{(kj,yj)}j=14)(x,\{(k_{j},y_{j})\}_{j=1}^{4}), where each utterance xx is paired with 4 different KBs and the denotations of the utterance with respect to these KBs. Then, we maximize p({yj}j=14∣x,)p(\{y_{j}\}_{j=1}^{4}\mid x,) by maximizing the objective above, except that R(z,{kj,yj}j=14)=1R(z,\{k_{j},y_{j}\}_{j=1}^{4})=1 iff the denotation of zz is correct for all four KBs. This dramatically reduces the problem of spuriousness, as the chance of randomly obtaining a correct denotation goes down from 12\frac{1}{2} to 116\frac{1}{16}. This is reminiscent of Pasupat and Liang (2016), where random permutations of Wikipedia tables were shown to crowdsourcing workers to eliminate spurious programs.

We train the discriminative ranker analogously by maximizing the probability of programs with correct denotation ∑z∈Bpψg(z∣x)R(z,k,y)\sum_{z\in B}p^{g}_{\psi}(z\mid x)R(z,k,y).

This basic training method fails for CNLVR (see Sec. 6), due to the difficulties of search and spuriousness. Thus, we turn to learning from abstract examples, which substantially reduce these problems.

Learning from Abstract Examples

The main premise of this work is that in closed, well-typed domains such as visual reasoning, the main challenge is handling language compositionality, since questions may have a complex and nested structure. Conversely, the problem of mapping lexical items to functions and constants in the programming language can be substantially alleviated by taking advantage of the compact KB schema and typing system, and utilizing a small lexicon that maps prevalent lexical items into typed program constants. Thus, if we abstract away from the actual utterance into a partially abstract representation, we can combat the search and spuriousness challenges as we can generalize better across examples in small datasets.

“There are exactly 3 yellow squares touching the wall.”

“There are at least 2 blue circles touching the wall.”

While the surface forms of these utterances are different, at an abstract level they are similar and it would be useful to leverage this similarity.

We therefore define an abstract representation for utterances and logical forms that is suitable for spatial reasoning. We define seven abstract clusters (see Table 3) that correspond to the main semantic types in our domain. Then, we associate each cluster with a small lexicon that contains language-program token pairs associated with this cluster. These mappings represent the canonical ways in which program constants are expressed in natural language. Table 3 shows the seven clusters we use, with an example for an utterance-program token pair from the cluster, and the number of mappings in each cluster. In total, 25 mappings are used to define abstract representations.

As we show next, abstract examples can be used to improve the process of training semantic parsers. Specifically, in sections 5.1-5.3, we use abstract examples in several ways, from generating new training data to improving search accuracy. The combined effect of these approaches is quite dramatic, as our evaluation demonstrates.

We begin by demonstrating that abstraction leads to rather effective coverage of the types of questions asked in a dataset. Namely, that many questions in the data correspond to a small set of abstract examples. We created abstract representations for all 3,163 utterances in the training examples by mapping utterance tokens to their cluster label, and then counted how many distinct abstract utterances exist. We found that as few as 200 abstract utterances cover roughly half of the training examples in the original training set.

The above suggests that knowing how to answer a small set of abstract questions may already yield a reasonable baseline. To test this baseline, we constructured a “rule-based” parser as follows. We manually annotated 106 abstract utterances with their corresponding abstract program (including alignment between abstract tokens in the utterance and program). For example, Table 1 shows the abstract utterance and program for the utterance “There are exactly 3 yellow squares touching the wall”. Note that the utterance “There are at least 2 blue circles touching the wall” will be mapped to the same abstract utterance and program.

Given this set of manual annotations, our rule-based semantic parser operates as follows: Given an utterance xx, create its abstract representation xˉ\bar{x}. If it exactly matches one of the manually annotated utterances, map it to its corresponding abstract program zˉ\bar{z}. Replace the abstract program tokens with real program tokens based on the alignment with the utterance tokens, and obtain a final program zz. If xˉ\bar{x} does not match return True, the majority label. The rule-based parser will fail for examples not covered by the manual annotation. However, it already provides a reasonable baseline (see Table 4). As shown next, manual annotations can also be used for generating new training data.

2 Data Augmentation

While the rule-based semantic parser has high precision and gauges the amount of structural variance in the data, it cannot generalize beyond observed examples. However, we can automatically generate non-abstract utterance-program pairs from the manually annotated abstract pairs and train a semantic parser with strong supervision that can potentially generalize better. E.g., consider the utterance “There are exactly 3 yellow squares touching the wall”, whose abstract representation is given in Table 1. It is clear that we can use this abstract pair to generate a program for a new utterance “There are exactly 3 blue squares touching the wall”. This program will be identical to the program of the first utterance, with IsBlue replacing IsYellow.

More generally, we can sample any abstract example and instantiate the abstract clusters that appear in it by sampling pairs of utterance-program tokens for each abstract cluster. Formally, this is equivalent to a synchronous context-free grammar Chiang (2005) that has a rule for generating each manually-annotated abstract utterance-program pair, and rules for synchronously generating utterance and program tokens from the seven clusters.

We generated 6,158 (x,z)(x,z) examples using this method and trained a standard sequence to sequence parser by maximizing log⁡pθ′(z∣x)\log p^{\prime}_{\theta}(z|x) in the model above. Although these are generated from a small set of 106 abstract utterances, they can be used to learn a model with higher coverage and accuracy compared to the rule-based parser, as our evaluation demonstrates.Training a parser directly over the 106 abstract examples results in poor performance due to the small number of examples.

The resulting parser can be used as a standalone semantic parser. However, it can also be used as an initialization point for the weakly-supervised semantic parser. As we observe in Sec. 6, this results in further improvement in accuracy.

3 Caching Abstract Examples

We now describe a caching mechanism that uses abstract examples to combat search and spuriousness when training from weak supervision. As shown in Sec. 5.1, many utterances are identical at the abstract level. Thus, a natural idea is to keep track at training time of abstract utterance-program pairs that resulted in a correct denotation, and use this information to direct the search procedure.

Concretely, we construct a cache CC that maps abstract utterances to all abstract programs that were decoded by the model, and tracks the average reward obtained for those programs. For every utterance xx, after obtaining the final beam of programs, we add to the cache all abstract utterance-program pairs (xˉ,zˉ)(\bar{x},\bar{z}), and update their average reward (Alg. 1, line 10). To construct an abstract example (xˉ,zˉ)(\bar{x},\bar{z}) from an utterance-program pair (x,z)(x,z) in the beam, we perform the following procedure. First, we create xˉ\bar{x} by replacing utterance tokens with their cluster label, as in the rule-based semantic parser. Then, we go over every program token in zz, and replace it with an abstract cluster if the utterance contains a token that is mapped to this program token according to the mappings from Table 3. This also provides an alignment from abstract program tokens to abstract utterance tokens that is necessary when utilizing the cache.

We propose two variants for taking advantage of the cache CC. Both are shown in Algorithm 1. 1. Full program retrieval (Alg. 1, line 12): Given utterance xx, construct an abstract utterance xˉ\bar{x}, retrieve the top DD abstract programs A\mathcal{A} from the cache, compute the de-abstracted programs ZZ using alignments from program tokens to utterance tokens, and add the DD programs to the final beam. 2. Program prefix retrieval (Alg. 1, line 9): Here, we additionally consider prefixes of abstract programs to the beam, to further guide the search process. At each step tt, let BtB_{t} be the beam of decoded programs at step tt. For every abstract program zˉ∈A\bar{z}\in{\mathcal{A}} add the de-abstracted prefix z1:tz_{1:t} to BtB_{t} and expand Bt+1B_{t+1} accordingly. This allows the parser to potentially construct new programs that are not in the cache already. This approach combats both spuriousness and the search challenge, because we add promising program prefixes to the beam that might have fallen off of it earlier. Fig. 3 visualizes the caching mechanism.

A high-level overview of our entire approach for utilizing abstract examples at training time for both data augmentation and model training is given in Fig. 4.

Experimental Evaluation

The Bi-LSTM state dimension is 3030. The decoder has one hidden layer of dimension 5050, that takes the last 4 decoded tokens as input as well as encoder states. Token embeddings are of dimension 12, beam size is 4040 and D=10D=10 programs are used in Algorithm 1. Word embeddings are initialized from CBOW Mikolov et al. (2013) trained on the training data, and are then optimized end-to-end. In the weakly-supervised parser we encourage exploration with meritocratic gradient updates with β=0.5\beta=0.5 Guu et al. (2017). In the weakly-supervised parser we warm-start the parameters with the supervised parser, as mentioned above. For optimization, Adam is used Kingma and Ba (2014)), with learning rate of 0.0010.001, and mini-batch size of 88.

Pre-processing

Because the number of utterances is relatively small for training a neural model, we take the following steps to reduce sparsity. We lowercase all utterance tokens, and also use their lemmatized form. We also use spelling correction to replace words that contain typos. After pre-processing we replace every word that occurs less than 5 times with an UNK symbol.

Evaluation

We evaluate on the public development and test sets of CNLVR as well as on the hidden test set. The standard evaluation metric is accuracy, i.e., how many examples are correctly classified. In addition, we report consistency, which is the proportion of utterances for which the decoded program has the correct denotation for all 4 images/KBs. It captures whether a model consistently produces a correct answer.

Baselines

We compare our models to the Majority baseline that picks the majority class (True in our case). We also compare to the state-of-the-art model reported by Suhr et al. (2017) when taking the KB as input, which is a maximum entropy classifier (MaxEnt). For our models, we evaluate the following variants of our approach:

Rule: The rule-based parser from Sec. 5.1.

Sup.: The supervised semantic parser trained on augmented data as in Sec. 5.2 (5,5985,598 examples for training and 560560 for validation).

WeakSup.: Our full weakly-supervised semantic parser that uses abstract examples.

+Disc: We add a discriminative re-ranker (Sec. 3) for both Sup. and WeakSup.

Main results

Table 4 describes our main results. Our weakly-supervised semantic parser with re-ranking (W.+Disc) obtains 84.084.0 accuracy and 65.065.0 consistency on the public test set and 82.582.5 accuracy and 63.963.9 on the hidden one, improving accuracy by 14.714.7 points compared to state-of-the-art. The accuracy of the rule-based parser (Rule) is less than 22 points below MaxEnt, showing that a semantic parsing approach is very suitable for this task. The supervised parser obtains better performance (especially in consistency), and with re-ranking reaches 76.676.6 accuracy, showing that generalizing from generated examples is better than memorizing manually-defined patterns. Our weakly-supervised parser significantly improves over Sup., reaching an accuracy of 81.781.7 before re-ranking, and 84.084.0 after re-ranking (on the public test set). Consistency results show an even crisper trend of improvement across the models.

1 Analysis

We analyze our results by running multiple ablations of our best model W.+Disc on the development set.

To examine the overall impact of our procedure, we trained a weakly-supervised parser from scratch without pre-training a supervised parser nor using a cache, which amounts to a re-implementation of the Randomer algorithm Guu et al. (2017). We find that the algorithm is unable to bootstrap in this challenging setup and obtains very low performance. Next, we examined the importance of abstract examples, by pre-training only on examples that were manually annotated (utterances that match the 106106 abstract patterns), but with no data augmentation or use of a cache (−-Abstraction). This results in performance that is similar to the Majority baseline.

To further examine the importance of abstraction, we decoupled the two contributions, training once with a cache but without data augmentation for pre-training (−-DataAugmentation), and again with pre-training over the augmented data, but without the cache (−-BeamCache). We found that the former improves by a few points over the MaxEnt baseline, and the latter performs comparably to the supervised parser, that is, we are still unable to improve learning by training from denotations.

Lastly, we use a beam cache without line 9 in Alg. 1 (−-EveryStepBeamCache). This already results in good performance, substantially higher than Sup. but is still 3.43.4 points worse than our best performing model on the development set.

Orthogonally, to analyze the importance of tying the reward of all four examples that share an utterance, we trained a model without this tying, where the reward is 1 iff the denotation is correct (OneExampleReward). We find that spuriousness becomes a major issue and weakly-supervised learning fails.

We sampled 50 consistent and 50 inconsistent programs from the development set to analyze the weaknesses of our model. By and large, errors correspond to utterances that are more complex syntactically and semantically. In about half of the errors an object was described by two or more modifying clauses: “there is a box with a yellow circle and three blue items”; or nesting occurred: “one of the gray boxes has exactly three objects one of which is a circle”. In these cases the model either ignored one of the conditions, resulting in a program equivalent to “there is a box with three blue items” for the first case, or applied composition operators wrongly, outputting an equivalent to “one of the gray boxes has exactly three circles” for the second case. However, in some cases the parser succeeds on such examples and we found that 12% of the sampled utterances that were parsed correctly had a similar complex structure. Other, less frequent reasons for failure were problems with cardinality interpretation, i.e. ,“there are 2” parsed as “exactly 2” instead of “at least 2”; applying conditions to items rather than sets, e.g., “there are 2 boxes with a triangle closely touching a corner” parsed as “there are 2 triangles closely touching a corner”; and utterances with questionable phrasing, e.g., “there is a tower that has three the same blocks color”.

Other insights are that the algorithm tended to give higher probability to the top ranked program when it is correct (average probability 0.180.18), compared to cases when it is incorrect (average probability 0.080.08), indicating that probabilities are correlated with confidence. In addition, sentence length is not predictive for whether the model will succeed: average sentence length of an utterance is 10.910.9 when the model is correct, and 11.111.1 when it errs.

We also note that the model was successful with sentences that deal with spatial relations, but struggled with sentences that refer to the size of shapes. This is due to the data distribution, which includes many examples of the former case and fewer examples of the latter.

Related Work

Training semantic parsers from denotations has been one of the most popular training schemes for scaling semantic parsers since the beginning of the decade. Early work focused on traditional log-linear models Clarke et al. (2010); Liang et al. (2011); Kwiatkowski et al. (2013), but recently denotations have been used to train neural semantic parsers Liang et al. (2017); Krishnamurthy et al. (2017); Rabinovich et al. (2017); Cheng et al. (2017).

Visual reasoning has attracted considerable attention, with datasets such as VQA Antol et al. (2015) and CLEVR Johnson et al. (2017a). The advantage of CNLVR is that language utterances are both natural and compositional. Treating visual reasoning as an end-to-end semantic parsing problem has been previously done on CLEVR Hu et al. (2017); Johnson et al. (2017b).

Our method for generating training data resembles data re-combination ideas in Jia and Liang (2016), where examples are generated automatically by replacing entities with their categories.

While spuriousness is central to semantic parsing when denotations are not very informative, there has been relatively little work on explicitly tackling it. Pasupat and Liang (2015) used manual rules to prune unlikely programs on the WikiTableQuestions dataset, and then later utilized crowdsourcing Pasupat and Liang (2016) to eliminate spurious programs. Guu et al. (2017) proposed Randomer, a method for increasing exploration and handling spuriousness by adding randomness to beam search and a proposing a “meritocratic” weighting scheme for gradients. In our work we found that random exploration during beam search did not improve results while meritocratic updates slightly improved performance.

Discussion

In this work we presented the first semantic parser for the CNLVR dataset, taking structured representations as input. Our main insight is that in closed, well-typed domains we can generate abstract examples that can help combat the difficulties of training a parser from delayed supervision. First, we use abstract examples to semi-automatically generate utterance-program pairs that help warm-start our parameters, thereby reducing the difficult search challenge of finding correct programs with random parameters. Second, we focus on an abstract representation of examples, which allows us to tackle spuriousness and alleviate search, by sharing information about promising programs between different examples. Our approach dramatically improves performance on CNLVR, establishing a new state-of-the-art.

In this paper, we used a manually-built high-precision lexicon to construct abstract examples. This is suitable for well-typed domains, which are ubiquitous in the virtual assistant use case. In future work we plan to extend this work and automatically learn such a lexicon. This can reduce manual effort and scale to larger domains where there is substantial variability on the language side.

Acknowledgements

This research was partially supported by The Israel Science Foundation grant 942/16, and by the Yandex Initiative for Machine Learning.

References