Compositional Task-Oriented Parsing as Abstractive Question Answering

Wenting Zhao, Konstantine Arkoudas, Weiqi Sun, Claire Cardie

Introduction

Task-Oriented Parsing (TOP) is a critical component of modern voice assistants, responsible for converting natural language utterances into machine-executable semantic trees. While simple commands are handled effectively by current models, "compositional" requests—where multiple intents or slots are nested—present a significant challenge. For instance, a request like "Get directions to the nearest parking near S Beritania Street" requires the model to resolve multiple layers of spatial and categorical logic.

Standard linearized parse tree for a compositional navigation query.

Traditionally, TOP is treated as a sequence-to-sequence translation task where the model generates a "linearized" string of brackets and labels. However, pretrained language models (PLMs) like T5 or BART are optimized for natural language, not the artificial syntax of linearized trees. This "vocabulary gap" often leads to poor performance, especially in low-resource or few-shot scenarios.

Reimagining Parsing as Question Answering

Researchers from Cornell and Amazon Alexa AI propose a shift in paradigm: treating TOP as an Abstractive Question Answering task. Instead of forcing a model to generate code-like strings, the system is prompted to answer natural language questions about the user's intent and the associated slots.

The authors introduced two primary methodologies:

  1. Multi-turn QA (MT QA): The model builds the semantic tree incrementally through a series of questions (e.g., "What is the user's intent?" followed by "What are the slots for this intent?"). Previous answers serve as context for subsequent steps, aiding in the resolution of nested structures.
  2. Single-turn QA (ST QA): The model generates a natural language description of the entire tree structure in a single pass.

By including domain metadata (available intents and slots) directly in the prompt, the task shifts from complex generation to a more manageable "copy-and-paste" operation for the PLM.

Experimental Results

The approach was evaluated on the TOPv2 and Pizza datasets, both known for their hierarchical and compositional complexity.

Performance comparison (Exact Match) across various domains on the TOPv2 dataset.

The results demonstrate that "naturalizing" the parser significantly boosts performance. On the full TOPv2 dataset, the QA-based methods outperformed standard sequence-to-sequence baselines by an average of 3.07 absolute points in Exact Match (EM) accuracy.

The most dramatic improvements occurred in few-shot settings. With only 10 samples per intent, the MT QA model achieved a 28% improvement over the best baseline. This suggests that while models struggle to learn a new "bracketed language" from limited data, they can effectively apply their pre-existing linguistic knowledge to answer questions about a sentence.

Key Insights

  • Compositionality and Depth: Analysis showed that the advantage of the QA approach increases as the nesting depth of the query grows. Breaking down complex logic into discrete questions allows the model to handle deep hierarchies that often cause traditional linearizers to fail.
  • The Power of Pretraining: Utilizing a Masked Span Prediction (MSP) objective during fine-tuning—aligning the task more closely with the model's original pretraining—further enhanced results in data-scarce environments.
  • Trade-offs: While Multi-turn QA offers superior accuracy for complex queries, it introduces higher latency due to multiple sequential model calls. Single-turn QA provides a faster alternative with competitive performance.

Conclusion

By reframing task-oriented parsing as natural language question answering, this research bridges the gap between the "unnatural" requirements of machine-readable code and the "natural" strengths of pretrained language models. This approach not only sets new benchmarks for complex query parsing but also provides a robust framework for building voice assistants that can learn from very few examples.

Summary updated

BibTeX
@inproceedings{zhao2022compositional,
  author = {Wenting Zhao and Konstantine Arkoudas and Weiqi Sun and Claire Cardie},
  title = {{Compositional Task-Oriented Parsing as Abstractive Question Answering}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2022},
  doi = {10.18653/v1/2022.naacl-main.328},
}
Figure