Introduction
In the modern data design workflow, finding the right visualization for inspiration or reuse is a common yet challenging task. Traditional chart retrieval systems often fail to capture the nuance of a user's creative goals. To address this, the framework WYTIWYR ("What-You-Think-Is-What-You-Retrieve") introduces a multi-modal approach that bridges the gap between raw pixels and user intent. By combining image-based queries with natural language prompts, WYTIWYR allows for a more flexible, "intent-aware" search process.
The Challenge: Beyond Pixel-Matching
Existing chart retrieval systems typically fall into two categories, both of which have significant limitations:
- Example-based retrieval: These systems look for images that are pixel-wise similar. However, they often fail to distinguish between different chart types if the visual layout is similar, and they cannot interpret specific design preferences.
- Definition-based retrieval: These rely on rigid, pre-defined metadata. While accurate, this approach is difficult to scale and often requires clean SVG files, whereas most real-world visualizations are found as messy bitmap images on the web.
The core issue is the neglect of user intent. A designer might like the layout of one chart but require the data trend of another, or they might want to apply a specific aesthetic (e.g., "minimalist") to a known structure. WYTIWYR addresses this by allowing users to decouple visual attributes and refine their search using text.
The WYTIWYR Framework
The authors propose a two-stage framework designed to keep the human in the loop throughout the retrieval process.
Stage 1: Attribute Disentanglement
When a user provides a query chart, the system first "tears down" the image into its constituent parts. Using four specialized ResNet50 classifiers, the framework identifies primary attributes: Type, Color, Trend, and Layout. To handle "extended attributes"—such as specific styles or contexts not present in the training data—the system leverages CLIP (Contrastive Language-Image Pre-training) for zero-shot classification.
Stage 2: Multi-modal Fusion and Retrieval
Retrieval is executed through a dual-branch process:
- Intent-aware Filtering: The system narrows the database to charts matching the user’s selected primary attributes (e.g., filtering for only "Line Graphs").
- Multi-modal Encoding: Using a CLIP-based encoder, the system fuses the query image with the user’s natural language prompt (e.g., "fancy style with icons") into a single joint representation.
- Similarity Modeling: Finally, results are ranked by combining global pixel similarity, specific attribute scores, and the multi-modal feature match.
Datasets and Evaluation
To test the robustness of WYTIWYR, the researchers utilized a massive corpus of 33,260 images:
- Beagle Dataset: 29,260 bitmap charts crawled from the web (including D3 and Plotly examples).
- Pinterest Collection: 4,000 "difficult" instances featuring highly stylized, irregular, and artistic charts that typically challenge standard models.
The dataset spans 18 distinct chart types, from standard bar charts to complex chord diagrams and dendrograms.
Key Insights
- The Power of Disentanglement: By separating a chart into independent attributes, the system enables "attribute transfer." A user can maintain the "Increasing Trend" of a query chart while swapping the "Bar Chart" type for a "Line Graph."
- CLIP as a Semantic Bridge: Leveraging CLIP (trained on 400 million image-text pairs) allows the system to understand abstract concepts like "3D style" without requiring a specifically labeled dataset for every possible aesthetic.
- Noise Reduction: The researchers found that elements like legends or emojis often interfere with color classification. They implemented a segmentation step using ISNet to strip away backgrounds and focus the model on the core data encoding.
Results and Performance
WYTIWYR demonstrated significant quantitative improvements over traditional methods. In retrieval tests measuring F1-scores, the framework outperformed HOG (Histogram of Oriented Gradients) and standard CNN-based retrieval. For instance, in "Top-3" retrieval for chart types, WYTIWYR achieved an F1-score of 0.95, compared to 0.91 for standard CNNs and 0.61 for HOG.
Qualitatively, the system proved capable of "fuzzy retrieval." When queried with a scatter plot and the text "life expectancy," it successfully retrieved Gapminder-style bubble charts—a task that would be impossible for systems relying solely on visual geometry.
Limitations and Future Work
Despite its success, the authors noted several areas for improvement:
- Prompt Sensitivity: As with many CLIP-based models, small changes in text wording can significantly alter results, making prompt engineering a challenge for users.
- Dataset Bias: Rare chart types (e.g., circular packing charts) remain harder to retrieve accurately than ubiquitous types like bar or line charts.
- Domain Specificity: While CLIP is powerful, it is trained on general internet images. Fine-tuning on a dedicated corpus of "chart-description" pairs could further improve performance on expert-level visualization terminology.
Future iterations of the framework may include a "Trade-off Control" slider, allowing users to manually weight whether the system should prioritize the visual appearance of the query image or the semantic intent of the text prompt.
Summary updated