the Translator’s output will be an MR whose order
might not correspond to that of the gold truth. For
this reason, the Reorderer is trained to restore the
correct order of the original MR.
Our experiments on GEOALIGNED demonstrate
that compared to a multilingual BART model (Liu
et al.,2020), TPOL achieves similar performance
on the random test split but significantly outper-
forms on the compositional split across all lan-
guages. For example, on the query split in En-
glish, mBART obtains
69.4%
in exact-match ac-
curacy and TPOL obtains
87.8%
. This result also
improves on the
74.6%
obtained by SPANBASED
(Herzig and Berant,2021), another approach that
leverages alignment annotations.
Because most semantic parsing datasets do not
contain alignment information, we experiment with
alignments generated automatically. On GEO,
TPOL trained with automatic alignments still out-
performs mBART, and in particular on the English
query split it improves by almost 10 points. Further-
more, we show competitive results on the popular
SCAN dataset (Lake and Baroni,2018).
In summary, the main contributions of this paper
are:
1.
We propose TPOL, a modular two-step ap-
proach for semantic parsing which explicitly
leverages monotonic alignments;
2.
Our experiments show that TPOL improves
compositional generalization without compro-
mising overall performance;
3.
We show that even without gold alignments
TPOL can achieve competitive results.
2 Related Work
Recently, the semantic parsing community has
raised the question of whether current models can
generalize compositionally, along with an effort to
test for it (Lake and Baroni,2018;Finegan-Dollak
et al.,2018;Kim and Linzen,2020). The consen-
sus is that conventional seq2seq models struggle
to generalize compositionally (Loula et al.,2018;
Keysers et al.,2020). Moreover, large pre-trained
language models have been shown not to improve
compositional generalization (Oren et al.,2020;
Qiu et al.,2022b). This has prompted the com-
munity to realize that parsers should be designed
intentionally with compositionality in mind (Lake,
2019;Gordon et al.,2020;Weißenhorn et al.,2022).
It has also been pointed out that compositional ar-
chitectures are often designed for synthetic datasets
and that compositionality on non-synthetic data is
under-tested (Shaw et al.,2021).
Data augmentation techniques have been pro-
posed to improve compositional generalization
(Andreas,2020;Yang et al.,2022;Qiu et al.,
2022a). Another strategy is to exploit some level of
word alignments. In general, there has been a resur-
gent interest in alignments as it has been shown that
they can be beneficial to neural models (Shi et al.,
2020). It has also been conjectured that the lack of
alignment information might hamper progress in
semantic parsing (Zhang et al.,2019). As a result,
the field has seen some annotation efforts in this
regard (Shi et al.,2020;Herzig and Berant,2021;
Locatelli and Quattoni,2022).
Alignments have been modeled implicitly: Wang
et al. (2021) treat alignments as discrete structured
latent variables within a neural seq2seq model, em-
ploying a framework that first reorders the NL and
then decodes the MR. Explicit use of alignment
information has also been explored: Herzig and Be-
rant (2021) use alignments and predict a span tree
over the NL. Sun et al. (2022) recently proposed
an approach to data augmentation via sub-tree sub-
stitutions. In text-to-SQL, attention-based models
that try to capture alignments have been proposed
(Lei et al.,2020;Liu et al.,2021b), as well as at-
tempts that try to leverage them directly (Sun et al.,
2022).
Our two-step approach resembles statistical ma-
chine translation, which decomposes the translation
task into lexical translation and reordering (Chang
et al.,2022). Machine translation techniques have
previously been applied to semantic parsing. The
first attempt was by Wong and Mooney (2006),
who argued that a parsing model can be viewed as
a syntax-based translation model and used a statis-
tical word alignment algorithm. Later a machine
translation approach was used on the GEO dataset,
obtaining what was at the time state-of-the-art re-
sults (Andreas et al.,2013). More recently, Agar-
wal et al. (2020) employed machine translation to
aid semantic parsing.
3 Preliminaries: Word Alignments
This section briefly explains word alignments,
showing the difference between monotonic and
non-monotonic alignments, and illustrates the no-
tion of monotonic translations.