Quda: Natural Language Queries for Visual Data Analytics

Siwei Fu, Kai Xiong, Xiaodong Ge, Siliang Tang, Wei Chen, Yingcai WuarXiv 2020

Introduction

Natural Language Interfaces for Visualization (V-NLIs) represent a significant step toward democratizing data science, allowing users to "ask" questions of their data using everyday language. However, existing systems often rely on rigid, rule-based parsers that struggle with the inherent ambiguity, synonyms, and complex intents of human speech. To move beyond these limitations, machine learning models require large-scale, high-quality datasets labeled with specific analytic tasks.

Quda is a large-scale dataset of over 14,000 natural language queries designed to bridge this gap. By mapping human queries to low-level analytic tasks (such as "find outliers" or "sort"), Quda enables the training of robust deep learning models that can interpret semantic intent rather than just matching keywords.

The Quda Pipeline

The authors developed a rigorous three-stage pipeline to construct the Quda dataset, ensuring both the expert-level relevance of the queries and the linguistic diversity required for real-world application.

The three-stage pipeline for Quda dataset construction: expert collection, crowd-sourced paraphrasing, and hybrid validation.
  1. Expert Query Collection: The process began with 20 professional data analysts who interrogated 36 real-world data tables across 11 domains. This produced 920 "seed" queries reflecting authentic expert workflows.
  2. Paraphrase Generation: To capture linguistic variety, Amazon Mechanical Turk (MTurk) workers generated approximately 20 paraphrases for every expert seed query.
  3. Paraphrase Validation: A hybrid approach ensured quality. Crowd workers performed pairwise comparisons to identify the best matches, while a scoring function—utilizing a Universal Sentence Encoder and an SVM-based solver—filtered out low-quality or incorrect entries.

Dataset Characteristics

The resulting Quda dataset contains 14,035 queries annotated with one or more of 10 low-level analytic tasks, including Retrieve Value, Filter, Compute Derived Value, Find Extremum, Sort, Determine Range, Characterize Distribution, Find Anomalies, Cluster, and Correlate.

Comparison of Quda against standard NLP datasets across various metrics.

When compared against standard NLP corpora like 20 Newsgroups or IMDB, Quda exhibits a notably higher "density." This indicates that its queries are more likely to involve multiple overlapping tasks. For instance, a query like "What is the most liked video in the US?" requires both a Filter (location) and a Find Extremum (most liked). Quda is specifically architected to handle this multi-label reality.

Key Insights and Results

The authors fine-tuned a BERT model for multi-label text classification using Quda, yielding several critical insights:

  • Generalization Challenges: While the model achieved 97.7% precision on random data splits, performance dropped to 84.2% on an "expert" split involving entirely new users and tables. This highlights the difficulty of generalizing V-NLIs across diverse domains and individual speaking styles.
  • Semantic Understanding: Unlike rule-based systems that fail when specific keywords (like "distribute") are missing, the Quda-trained model recognizes semantic intent. It successfully identifies tasks even when users use vague or non-standard phrasing.
  • Practical Integration: The model was integrated into NL4DV, a popular V-NLI library. In case studies, the augmented version correctly identified tasks like "Find Anomalies" where the original rule-based logic failed.

Conclusion and Future Work

Quda provides a foundational resource for building more "human-friendly" visualization interfaces. While currently focused on tabular data and low-level tasks, it sets the stage for future expansions into complex data structures (like graphs or spatial data) and multi-turn conversational interfaces where systems must maintain context over a series of questions.

Summary updated

BibTeX
@misc{fu2020quda,
  author = {Siwei Fu and Kai Xiong and Xiaodong Ge and Siliang Tang and Wei Chen and Yingcai Wu},
  title = {{Quda: Natural Language Queries for Visual Data Analytics}},
  year = {2020},
  eprint = {2005.03257},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2005.03257},
}
Figure