Abstract
Task oriented dialog systems typically first parse user utterances to semantic frames comprised of intents and slots. Previous work on task oriented intent and slot-filling work has been restricted to one intent per query and one slot label per token, and thus cannot model complex compositional requests. Alternative semantic parsing systems have represented queries as logical forms, but these are challenging to annotate and parse. We propose a hierarchical annotation scheme for semantic parsing that allows the representation of compositional queries, and can be efficiently and accurately parsed by standard constituency parsing models. We release a dataset of 44k annotated queries (fb.me/semanticparsingdialog), and show that parsing models outperform sequence-to-sequence approaches on this dataset.
Introduction
Most current task-oriented dialog systems rely on a "flat" understanding of language, performing intent classification (e.g., GET_DIRECTIONS) and slot filling (e.g., San Francisco as a destination). While effective for simple requests, this paradigm fails on "compositional" queries where one request is nested inside another. For example, in the query "Driving directions to the Eagles game," the system must first resolve the "Eagles game" (an event) to find a location, and then calculate directions.
Traditional systems struggle to represent this hierarchy, and while complex logical forms can handle it, they are difficult to annotate at scale. This research introduces the Task Oriented Parsing (TOP) representation—a hierarchical scheme that is powerful enough for complex queries but simple enough to annotate and parse efficiently.
The TOP Representation and Methodology
The TOP representation structures a query as a tree, similar to a constituency parse in linguistics. The root is always an Intent (IN:), and its children can be text tokens or Slots (SL:). Crucially, a Slot can contain another nested Intent, allowing for recursive complexity.
To parse these structures, the authors adapted Recurrent Neural Network Grammars (RNNG). Unlike standard sequence-to-sequence (seq2seq) models that predict flat strings, an RNNG uses a transition-based stack to explicitly build a tree. This provides a strong inductive bias, forcing the model to think in terms of hierarchy. The authors compared RNNG against strong seq2seq baselines (CNN, LSTM, and Transformer) using a "Limited Output Token Vocabulary" (LOTV) to ensure the baselines focused on structural generation.
The TOP Dataset
The paper introduces the TOP Dataset, a benchmark of approximately 44,000 human-generated queries focused on navigation and events. Unlike older datasets like ATIS, which are largely non-recursive, 35% of TOP queries have a depth greater than 2. The authors found that this simple tree structure covers 99.7% of real-world user requests, justifying the use of trees over more complex graph-based logical forms.
Key Results
- Accuracy: The RNNG model achieved an exact match accuracy of 78.51%, outperforming the best seq2seq baseline (CNN at 75.87%).
- Structural Integrity: Because RNNG is architecturally designed to build trees, it produced 100% valid trees, whereas seq2seq models occasionally produced malformed outputs.
- Coverage: Moving from a flat representation to this hierarchical one improved the system's ability to represent user intent by 30%.
Limitations and Future Work
While the tree-based approach is highly effective, it cannot handle "re-entrancy" (e.g., "Set an alarm for 8am on Monday and Tuesday," where "8am" relates to two different days). This would require a graph-based representation. Future work involves scaling this approach to more diverse domains like shopping or smart home management and detailing the execution layer that translates these parses into API calls.
Summary updated