Abstract
Panupong Pasupat, Sonal Gupta, Karishma Mandyam, Rushin Shah, Mike Lewis, Luke Zettlemoyer. Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP).
2019.
Introduction
Most commercial AI assistants traditionally rely on "flat" semantic parsing. For instance, a query like "Find directions to the coffee shop" identifies a single intent (GET_DIRECTION) and a slot (DESTINATION). However, human language is often compositional: "Find directions to John’s party" requires resolving John's address before retrieving directions.
To address this, researchers use Hierarchical Task Oriented Parsing (TOP), where intents and slots can be nested. While sequence-to-sequence (seq2seq) and transition-based models can generate these trees, they are often computationally expensive during training. This paper introduces a span-based hierarchical semantic parser that is significantly faster to train and more accurate than previous state-of-the-art models.
Methodology
The proposed parser treats semantic parsing as a task of labeling every possible span of text in an utterance.
- Span-based Labeling: For every span $(i, j)$ in a sentence, the model predicts a "unary chain" of labels. A single span might carry multiple hierarchical labels, such as being both a
SL:DESTINATIONand anIN:FIND_EVENTsimultaneously. - Factored Loss: Unlike previous span-based parsers that require an expensive CKY decoder during training, this model reinterprets the tree score as a joint distribution. This allows the loss to be calculated as simple cross-entropy for each span in parallel, removing the decoder bottleneck and drastically reducing training time.
- Edge Scores: To capture structural dependencies, the authors introduce "edge scores." These model the probability of a child node's label given its parent's label, enforcing the domain's ontology (e.g., ensuring a
GET_DIRECTIONintent contains appropriate slots). - CKY Decoding: While training is parallelized, the model uses a CKY (Cocke-Kasami-Younger) algorithm at inference time to ensure the final output is a valid, globally optimal tree.
Evaluation
The model was evaluated on the TOP (Task Oriented Parse) dataset, which contains approximately 31,000 training utterances across navigation and event domains. This dataset is specifically designed for hierarchical parsing, featuring nested structures that reflect complex user queries.
Key Results
The span-based model with edge scores outperformed all existing baselines in both accuracy and efficiency:
- Accuracy: It achieved 81.80% exact match accuracy, surpassing the previous best RNNG (80.63%) and seq2seq (78.24%) models.
- Training Speed: The model is remarkably efficient, requiring only 9 minutes per epoch to train, compared to 76 minutes for the RNNG baseline.
- F1 Score: It achieved a labeled bracket F1 of 93.63, indicating high precision and recall in identifying nested structures.
Discussion and Insights
Several key factors contributed to the model's success. By formulating the training objective to factor into independent span-level decisions, the authors enabled massive parallelism on GPUs. Furthermore, the introduction of edge scores provided structural awareness without the need for over-engineered span embedders.
A critical implementation detail was the use of an $\alpha$ hyperparameter. Because "empty" spans (those with no labels) vastly outnumber labeled ones, the authors introduced a scaling factor to down-weight the loss on empty spans, which was essential for balancing precision and recall.
Limitations and Future Work
While highly effective, the authors suggest that upgrading the current GloVe and biLSTM encoders to transformer-based models (like BERT) could further improve accuracy. Additionally, while training is fast, CKY decoding remains $O(n^3)$ at inference time; for extremely long utterances, a greedy top-down decoder might be a necessary alternative.
Summary updated