XNLI: Explaining and Diagnosing NLI-Based Visual Data Analysis

Yingchaojie Feng, Xingbo Wang, Bo Pan, Kamkwai Wong, Yi Ren, Shi Liu, Zihan Yan, Yuxin Ma, Huamin Qu, Wei Chen

TL;DR

This paper introduces XNLI, a system designed to make Natural Language Interfaces (NLIs) for visual data analysis more transparent and debuggable. XNLI provides explanations of how user queries are translated into visualizations, offers interactive tools to correct errors, and gives hints for refining queries, ultimately improving user accuracy and understanding without disrupting the analysis flow.

What Problem Does This Paper Address?

Natural Language Interfaces (NLIs) are increasingly used to help users create visualizations by simply describing their analytical intentions. However, a significant challenge arises when the generated visualization doesn't match the user's expectations. Without understanding the complex, multi-step process by which the NLI interprets the query and generates the visualization (involving data transformations and visual encodings), users struggle to diagnose what went wrong and how to correct it. This lack of transparency can lead to frustration, distrust in NLI tools, and hinder effective data analysis. XNLI aims to bridge this gap by making the NLI's internal workings visible and actionable.

Methods

XNLI tackles the problem through a multi-component system:

  • Provenance Generator: This component visualizes the entire process of transforming a user's natural language query into a visualization. It breaks down the process into three key aspects: attributes (data columns), tasks (analytical operations like filtering or aggregation), and visual encodings (how data is mapped to visual elements like chart types and axes). It uses Vega-Lite grammar to represent these steps and provides sample data to illustrate transformations.
  • Interactive Widgets: For identified ambiguities or potential errors in the NLI's interpretation, XNLI offers interactive widgets. These allow users to directly adjust aspects like attribute selection, task parameters, or visual encodings, providing a more direct way to correct issues than solely relying on query revision.
  • Hint Generator: This module provides actionable feedback to users. It offers two types of hints:
  • Rule-based hints: These flag potential issues in the original query, such as typos in attribute names or ambiguous terms.
  • Interaction-based hints: These are generated after users make adjustments via the interactive widgets. They offer suggestions for rephrasing the query and provide concrete examples of valid query formulations.

The system's workflow involves users inputting a query, XNLI generating a visualization and explanations, users interacting with widgets or receiving hints to refine their query, and finally, obtaining the desired visualization.

Datasets

The paper primarily uses the IMDb movie dataset for its pilot study, usage scenarios, and user study. This dataset contains information on movie items and their attributes. For the user study, an additional car dataset and a housing dataset were also used for specific task types to mitigate learning effects.

Key Insights and Ideas

  • Transparency is Key to Debugging: The core insight is that users cannot effectively diagnose and correct NLI-generated visualizations without understanding the underlying interpretation and transformation process. XNLI's explanations directly address this by demystifying the NLI's "black box."
  • Multi-faceted Explanations are Crucial: Breaking down the NLI process into attributes, tasks, and visual encodings provides a structured way for users to pinpoint errors. This is more effective than a monolithic explanation.
  • Interactive Correction Complements Query Revision: While query revision is important, interactive widgets offer a more intuitive and immediate way for users to correct specific aspects of the visualization process, especially for issues that are hard to express precisely in natural language.
  • Hints as Learning Tools: The hint system not only helps users fix immediate problems but also serves as a pedagogical tool, teaching them how to phrase queries more effectively for the NLI in the future.
  • User Trust is Built on Transparency: By making the process visible, XNLI aims to increase user trust in NLI-based data analysis, moving beyond a "black box" interaction model.

Key Results

  • Improved Accuracy: A user study showed that XNLI significantly improved task accuracy compared to a baseline NLI system without explanations. Participants achieved an average accuracy of 0.96 with XNLI, versus 0.81 with the baseline.
  • Comparable Efficiency: While accuracy improved, the completion time for tasks was comparable between XNLI and the baseline, indicating that the explanations did not hinder efficiency.
  • Positive User Feedback: Participants found XNLI easy to learn and use, with high ratings for the helpfulness of explanations, interactive widgets, and query hints. They reported that explanations helped them assess visualization correctness, understand the NLI process, and increase trust in NLI-based analysis.
  • Effective Error Diagnosis: Users frequently used the explanation components to diagnose and fix problems, particularly preferring interactive widgets for minor adjustments and query revision for more complex issues.

Limitations and Future Work

  • Query Example Naturalness: The paper acknowledges that the generated query examples, while effective, can sometimes be "a little wordy" and may not always sound as natural as human-generated queries. Future work aims to improve the diversity and naturalness of these examples, potentially using generative language models.
  • Baseline Comparison: The authors suggest that a stronger baseline, perhaps one incorporating simple ambiguity widgets, could provide a more rigorous comparison for evaluating the systematic explanations.
  • Follow-up Queries: XNLI currently focuses on one-off queries. Future work includes providing explanations for follow-up queries in conversational visual analysis, which is crucial for more complex, multi-turn interactions.
  • Personalization and Control: Enhancing the system's ability to offer higher levels of control and personalization of the NLI process is another area for future development.
  • Longitudinal Studies: The authors plan to conduct longitudinal studies to further investigate the long-term impact of systematic explanations on building trust and facilitating human-machine collaboration.

Summary updated

BibTeX
@article{feng2024xnli,
  author = {Yingchaojie Feng and Xingbo Wang and Bo Pan and Kamkwai Wong and Yi Ren and Shi Liu and Zihan Yan and Yuxin Ma and Huamin Qu and Wei Chen},
  title = {{XNLI: Explaining and Diagnosing NLI-Based Visual Data Analysis}},
  journal = {IEEE Trans. Vis. Comput. Graph.},
  year = {2024},
  doi = {10.1109/tvcg.2023.3240003},
}
Figure