AdaVis: Adaptive and Explainable Visualization Recommendation for Tabular Data

Songheng Zhang, Haotian Li, Huamin Qu, Yong Wang

TL;DR

AdaVis is a new recommendation system that moves beyond "black-box" models to suggest multiple appropriate visualizations for a single dataset. By leveraging a knowledge graph with box embeddings and an attention mechanism, it provides both adaptive chart choices and clear, natural-language explanations for its decisions.

What Problem Does This Paper Address?

Automated visualization recommendation is a lifesaver for users who aren't data experts. However, current machine learning (ML) approaches suffer from two major flaws:

  1. The "One-to-One" Fallacy: Most models assume there is only one "correct" way to visualize a dataset. In reality, a dataset of student grades could be equally well-served by a bar chart (to show averages) or a box plot (to show distribution).
  2. The Black Box Problem: Deep learning models like VizML or Data2Vis are notoriously opaque. They might suggest a scatter plot, but they can't tell the user why—leaving users to wonder if the recommendation is based on meaningful data trends or just noise.

The authors introduce AdaVis to bridge this gap, focusing on adaptability (recommending multiple valid charts) and explainability (providing "local" interpretations for specific datasets).

Methods

AdaVis treats visualization recommendation as a logical reasoning task over a Knowledge Graph (KG).

The Knowledge Graph Structure

The KG consists of five entity types: single-column features (e.g., mean, variance), cross-column features (e.g., correlation), data columns, datasets, and visualization choices (e.g., bar chart, x-axis).

Box Embeddings: The Secret Sauce

Standard KG models represent entities as points in space. AdaVis instead uses box embeddings (axis-aligned hyper-rectangles).

  • Why boxes? A box can contain multiple points. This naturally models 1-to-N relationships. If a dataset (the "head" entity) is projected into a "visualization box," any chart type falling inside that box is considered a valid recommendation. This allows the system to adaptively suggest multiple charts if the data supports them.

Attention Mechanism for Explanations

To solve the "black box" issue, AdaVis incorporates an attention mechanism. When the model makes a recommendation, it calculates which specific data features (like "is sorted" or "has outliers") contributed most to that decision. These weights are then plugged into rule-based templates to generate natural language explanations, such as: "Line and scatter are recommended because Column A values are arranged in disorder and Column B has outliers."

Datasets

The researchers used the VizML corpus, a massive dataset of roughly 30,000 dataset-visualization pairs crawled from Plotly Chart Studio. They filtered this down to two-column tabular datasets and focused on four standard chart types: bar charts, scatter plots, line charts, and box plots.

Key Insights and Ideas

  • Cross-Column Features are Critical: One of the paper's "aha" moments is the validation of cross-column features. While previous models (like KG4Vis) focused on individual columns, AdaVis shows that the relationship between columns (e.g., do they share a data type? are they correlated?) is often the deciding factor for the best visualization.
  • Adaptability as a Geometric Problem: By using box embeddings, the authors turned a fuzzy recommendation problem into a precise geometric intersection problem. If a dataset has features that overlap with the "requirements" of both a line chart and a bar chart, it will geometrically fall into the intersection of those boxes.
  • Local vs. Global Interpretation: Most explainable AI provides "global" explanations (e.g., "this model generally likes bar charts for categorical data"). AdaVis provides "local" explanations, telling you exactly why this specific dataset got this specific recommendation.

Key Results

AdaVis was tested against several baselines, including KG4Vis and Decision Trees:

  • Accuracy: In single-class recommendations, AdaVis achieved a Hit@2 score of 0.8421, outperforming KG4Vis (0.8111) and GQE (0.7268).
  • Adaptability: When tasked with recommending two or three appropriate charts, AdaVis significantly outperformed all baselines in F1 score (0.6621 for two choices vs. 0.5337 for the next best model).
  • User Validation: Interviews with both experts and novices confirmed that the natural language explanations were clear and helped users trust the system, even when they were unfamiliar with certain chart types (like box plots).

Limitations and Future Work

Despite its strengths, AdaVis has a few hurdles to clear:

  • Chart Variety: Currently, it only supports four standard chart types. Extending this to more complex visualizations (like heatmaps or geographic maps) would require a more diverse training corpus.
  • User Intent: The model recommends based on data characteristics but doesn't yet account for the user's specific goal (e.g., "I want to find outliers" vs. "I want to see a trend").
  • Training Overhead: Extracting 120 different features and training a complex KG model is computationally expensive and time-consuming compared to simpler heuristic-based systems.

The authors suggest that future versions could incorporate "What-if" functionality, allowing users to see how changing a data feature would alter the recommendation.

Summary updated

BibTeX
@article{zhang2024adavis,
  author = {Songheng Zhang and Haotian Li and Huamin Qu and Yong Wang},
  title = {{AdaVis: Adaptive and Explainable Visualization Recommendation for Tabular Data}},
  journal = {IEEE Trans. Vis. Comput. Graph.},
  year = {2024},
  doi = {10.1109/tvcg.2023.3316469},
}
Figure