Don't Parse, Generate! A Sequence to Sequence Architecture for Task-Oriented Semantic Parsing

Subendhu Rongali, Luca Soldaini, Emilio Monti, Wael HamzaWWW 2020 · DOI

Abstract

Virtual assistants such as Amazon Alexa, Apple Siri, and Google Assistant often rely on a semantic parsing component to understand which action(s) to execute for an utterance spoken by its users. Traditionally, rule-based or statistical slot-filling systems have been used to parse "simple" queries; that is, queries that contain a single action and can be decomposed into a set of non-overlapping entities. More recently, shift-reduce parsers have been proposed to process more complex utterances. These methods, while powerful, impose specific limitations on the type of queries that can be parsed; namely, they require a query to be representable as a parse tree. In this work, we propose a unified architecture based on Sequence to Sequence models and Pointer Generator Network to handle both simple and complex queries. Unlike other works, our approach does not impose any restriction on the semantic parse schema. Furthermore, experiments show that it achieves state of the art performance on three publicly available datasets (ATIS, SNIPS, Facebook TOP), relatively improving between 3.3% and 7.7% in exact match accuracy over previous systems. Finally, we show the effectiveness of our approach on two internal datasets.

The Challenge of Complex Queries

Virtual assistants must interpret user "intents" (e.g., PlayMusic) and extract relevant "slots" (e.g., ArtistName). While traditional slot-filling models excel at simple queries like "Play Journey," they often struggle with complex queries involving nested logic. For example, the query "How far is the coffee shop?" requires identifying a destination, which itself contains a nested request for a restaurant location.

Example of a complex, nested semantic parse tree for the query "How far is the coffee shop?"

Existing solutions for complex queries, such as shift-reduce parsers, often impose rigid constraints, requiring queries to be representable as formal parse trees. This makes them difficult to scale across different tagging schemas.

The Seq2Seq-Ptr Architecture

Researchers from Amazon Alexa AI propose Seq2Seq-Ptr, a unified architecture that treats semantic parsing as a sequence generation task. This approach moves away from traditional parsing toward a "translation" framework consisting of three main components:

  1. Encoder: A pre-trained BERT or RoBERTa model encodes the input utterance, leveraging massive linguistic knowledge.
  2. Decoder: A standard Transformer decoder generates the semantic parse as a linearized string (e.g., PlaySongIntent SongName( @ptr3 @ptr4 )).
  3. Pointer Generator Network: This is the core innovation. Instead of generating specific entity values (like rare song titles) from a fixed vocabulary, the model uses a pointing mechanism to copy specific indices from the original query into the output.
The Seq2Seq-Ptr architecture combining a BERT encoder with a Transformer decoder and Pointer Generator Network.

By representing both simple and complex queries in the same sequence format, a single architecture can handle everything from flat slot-filling to deeply nested structures.

Key Results and Insights

The Seq2Seq-Ptr model established new state-of-the-art (SOTA) benchmarks for Exact Match (EM) accuracy across several datasets:

  • SNIPS: 87.14% (a 7.7% relative improvement over previous SOTA).
  • ATIS: 87.12% (a 4.5% relative improvement).
  • Facebook TOP: 86.67% (a 3.3% relative improvement over the best single-model system).

Beyond accuracy, the authors found that RoBERTa consistently outperformed standard BERT as an encoder. Additionally, despite having no hard grammatical constraints, 98% of the generated parses for complex queries were well-formatted and valid.

Limitations and Future Directions

While highly effective, the model faced challenges in domains with extreme entity diversity, such as the internal Music dataset. In these cases, traditional BiLSTM-CRF taggers occasionally performed better due to the simpler nature of word-by-word tagging for infinite vocabularies. Future work will explore applying this architecture to "non-conforming" grammars where slots might overlap or consist of non-consecutive words.

Summary updated

BibTeX
@inproceedings{rongali2020don,
  author = {Subendhu Rongali and Luca Soldaini and Emilio Monti and Wael Hamza},
  title = {{Don't Parse, Generate! A Sequence to Sequence Architecture for Task-Oriented Semantic Parsing}},
  booktitle = {The Web Conference},
  year = {2020},
  doi = {10.1145/3366423.3380064},
}
Figure