Towards Natural Language-Based Visualization Authoring

Yun Wang, Zhitao Hou, Leixian Shen, Tongshuang Wu, Jiaqi Wang, He Huang, Haidong Zhang, Dongmei Zhang

TL;DR

This paper introduces a novel pipeline for Natural Language-Based Visualization Authoring, moving beyond simple data queries to support the iterative design process. By introducing a structured intermediate layer called "editing actions," the researchers decouple natural language understanding from specific software, creating a reusable interpreter that allows users to build and style complex charts using conversational commands.

What Problem Does This Paper Address?

Most existing Natural Language Interfaces (NLIs) for visualization are "analysis-oriented." They excel at one-shot queries like "Show me the relationship between profit and sales," but they struggle with the "authoring" phase—the iterative process of refining a chart’s aesthetics, layout, and specific encodings.

Currently, if you want to move a legend, change a specific bar's color to pink, or turn a dashed line into a solid one, you usually have to hunt through complex "WIMP" (Windows, Icons, Menus, Pointers) interfaces. This creates a steep learning curve. The challenge is that "authoring" requires a much more granular and flexible set of commands than "analysis," and building a custom NL interpreter for every single visualization tool is prohibitively expensive for developers.

Methods

The authors propose an authoring-oriented NLI pipeline that centers on a new formalization: Editing Actions.

  1. Editing Actions: These are structured, machine-executable commands represented as a triplet: {operation, objects, parameters}. For example, "Turn the dashed lines black" becomes {SetColor, [shape=line, type=dashed], color=black}.
  2. The Multi-Stage Interpreter: To translate human speech into these actions, the team built a deep-learning-based interpreter that works in three stages:
  3. Data Entry Abstraction: It identifies data-specific terms (like column names) and replaces them with placeholders to simplify the text for the model.
  4. Information Extraction: Using a Bi-LSTM-CRF (Bidirectional Long Short-Term Memory with Conditional Random Fields) model, it performs multi-label classification to identify the intent and sequence labeling to find the objects and parameters.
  5. Action Synthesis: It bundles the extracted pieces into valid editing action tuples and ranks them by priority (e.g., data operations should happen before styling).

The beauty of this approach is that the interpreter is tool-agnostic. A developer only needs to build an "Operation Mapper" to connect these standard editing actions to their specific software's API.

Datasets

The researchers trained their model on a dataset of 10.7k utterances.

  • Real Data: They crowdsourced 4.7k utterances via Amazon Mechanical Turk (AMT) by showing workers pairs of charts and asking them to describe the steps to get from Chart A to Chart B.
  • Synthetic Data: They augmented the real data with 6k synthetic examples generated through paraphrasing and syntactic templates to ensure the model could handle diverse phrasing.

Key Insights and Ideas

  • Decoupling is Key: By creating the "Editing Action" layer, the authors solved the reusability problem. You don't need to retrain a massive model to add NL support to a new tool; you just need to map the actions.
  • Delta Modeling: Unlike previous grammars (like Vega-Lite) that describe a final state, editing actions model the delta (the change). This matches how humans think during design: "Make this part bigger," or "Change that color."
  • Handling Vagueness: The system explicitly accounts for "vague parameters" (e.g., "make it a bit darker") and "object selectors" (e.g., "the red bar"), leaving the final pixel-perfect execution to the specific application's logic.
  • Incremental Authoring: The user study revealed that people prefer short, incremental commands (averaging 3.6 words) over long, complex sentences when they are in "authoring mode."

Key Results

The system was evaluated both quantitatively and through user studies with a proof-of-concept tool called VisTalk and an Excel add-in.

  • Model Performance: The interpreter achieved an F1 score of 94.75% for operation classification and 97.34% for entity tagging, proving that the Bi-LSTM-CRF architecture is highly effective for this domain.
  • User Satisfaction: In a study with 12 participants, users gave VisTalk high marks for Ease of Use (4.25/5) and Enjoyment (4.67/5).
  • Productivity: 11 out of 12 users agreed that the NL interface improved their productivity, specifically noting that it saved them from "menu diving." One participant noted, "I don’t need to think of where [the buttons] are."

Limitations and Future Work

  • Ambiguity and Context: While the system handles basic context, it can struggle with complex coreferences (e.g., knowing exactly which "it" the user refers to in a long session).
  • "Cold Start" Problem: Users sometimes didn't know what commands were possible. The authors suggest that future versions should include better "discoverability" features, like auto-complete or suggested actions.
  • Multimodal Integration: The authors acknowledge that NL isn't always the best tool. Future work should explore "multimodal" interfaces where a user might point at a bar with a mouse and say, "Make this one blue."
  • Data Hunger: As users try more complex, "bespoke" visualizations, the training dataset will need to expand significantly to cover more niche design intents.

Summary updated

BibTeX
@article{wang2023towards,
  author = {Yun Wang and Zhitao Hou and Leixian Shen and Tongshuang Wu and Jiaqi Wang and He Huang and Haidong Zhang and Dongmei Zhang},
  title = {{Towards Natural Language-Based Visualization Authoring}},
  journal = {IEEE Trans. Vis. Comput. Graph.},
  year = {2023},
  doi = {10.1109/tvcg.2022.3209357},
}
Figure