Papers
Topics
Authors
Recent
Search
2000 character limit reached

Text2Vis: Mapping Text to Visualizations

Updated 5 July 2026
  • Text2Vis is a research area that converts natural-language queries into visual outputs by integrating text, data, and executable code.
  • It employs diverse methodologies such as semantic parsing, reinforcement learning, and progressive multi-turn dialogues to generate accurate and interpretable charts.
  • Benchmark-driven evaluations focus on code execution success, visualization clarity, and robustness across languages and data schemas, guiding future research in visualization intelligence.

Text2Vis denotes a family of research problems in which natural-language input is translated into a visual representation. In its contemporary data-centric form, the task takes a natural-language query over tabular data and produces both a concise textual answer and an executable visualization, so correctness depends not only on language generation but also on code execution and the semantic quality of the rendered chart (Rahman et al., 26 Jul 2025). The label has also been used in an earlier cross-media retrieval setting, where a short textual description is mapped into a high-level visual feature vector for image search in visual space (Carrara et al., 2016). Across these usages, Text2Vis studies the mapping from linguistic intent to visual structure, ranging from visual embeddings and infographic templates to visualization query languages, Python plotting code, and multimodal chart outputs.

1. Terminological scope and historical development

The meaning of Text2Vis has broadened over time. An early formulation appeared in 2016 as a neural model that generated a visual representation in the fc6-fc7 feature space of a deep CNN from short descriptive text, enabling similarity search directly in visual space without re-encoding the image corpus whenever the text-to-visual model changed (Carrara et al., 2016). That model used a shared hidden layer with two output branches, one for visual feature prediction and one for text reconstruction, and optimized the two losses through Stochastic Loss Selection rather than a fixed weighted sum (Carrara et al., 2016).

Later work shifted the emphasis from image retrieval to visualization generation. A 2019 proof-of-concept system, "Text-to-Viz: Automatic Generation of Infographics from Proportion-Related Natural Language Statements," converted simple proportion-related statements into infographic candidates through a text analyzer and a visual generator that varied layout, description, graphic, and color (Cui et al., 2019). By 2023, the task had become closely associated with natural-language-to-visualization-query generation, including cross-lingual settings such as CNvBench, which translated NvBench questions into Chinese while keeping database schemas in English (Ge et al., 2023).

The 2025 benchmark "Text2Vis: A Challenging and Diverse Benchmark for Generating Multimodal Visualizations from Text" consolidated the modern formulation. It explicitly defines the task as multimodal: a system must answer a data question, generate executable visualization code, and produce a chart that is readable and correct, rather than only emit a visualization specification or a chart type (Rahman et al., 26 Jul 2025). This benchmark-centered usage has become a focal point for subsequent agentic and reinforcement-learning work on text-to-visualization (Rahman et al., 8 Jan 2026).

2. Problem formulations and output spaces

A major distinction in Text2Vis research is the output representation. In schema-centric semantic parsing formulations, the input is a natural-language question plus database schema, and the output is a declarative visualization query. DataVisT5 states the task as generating a DV query yy from a natural-language question qq and schema SS for database DD (Wan et al., 2024). CNvBench uses a similar setup, where a Chinese question and an English database schema are mapped to a VQL/Vega-Lite-style structure (Ge et al., 2023).

The contemporary multimodal formulation is broader. RL-Text2Vis formalizes the input as

x=(query,table)∈D,x=(\text{query},\text{table})\in\mathcal{D},

with the model generating

y=(answer,code)∼πθ(⋅∣x),y=(\text{answer},\text{code})\sim \pi_\theta(\cdot\mid x),

and receiving reward only after code execution and chart rendering (Rahman et al., 8 Jan 2026). In this setting, token-level fluency is insufficient: the answer must be correct, the code must run, and the rendered visualization must align with the query and be interpretable.

Text2Vis 2025 operationalizes this multimodality through a structured sample bundle containing a data table, a natural language query, a short answer, visualization code, and annotated chart information. The generated code is in Python using Matplotlib and Seaborn, and metadata such as chart type, x-axis label, and y-axis label are also produced; appendix examples use JSON-style fields including "Question", "Answer", "Code", "TextSummary", "ChartType", "xlabel", and "ylabel" (Rahman et al., 26 Jul 2025). This representation makes the task simultaneously a reasoning problem, a code-generation problem, and a visualization-quality problem.

A further extension replaces one-shot translation with progressive interaction. PMVis models a dialogue trajectory

P={Pi∣Pi=(qi,vi), i=1,2,…,n},\mathcal{P}=\{P_i\mid P_i=(q_i,v_i),\ i=1,2,\dots,n\},

with the refinement rule

vi=f(vi−1,qi),v_i=f(v_{i-1},q_i),

so each turn yields a valid intermediate visualization query rather than only a final answer (Wenxin et al., 28 May 2026). This reframes Text2Vis as iterative intent refinement rather than single-pass parsing.

3. Benchmarks and dataset design

Text2Vis research is strongly benchmark-driven, but the benchmarks differ substantially in modality, language, robustness target, and interaction model. The modern Text2Vis benchmark is the most explicitly multimodal and analytically difficult, while CNvBench emphasizes cross-lingual schema linking, nvBench-Rob emphasizes robustness under paraphrase and schema variation, and PMVisBench emphasizes progressive multi-turn refinement.

Benchmark Scope Distinctive property
Text2Vis Query + table →\rightarrow answer + code + chart 1,985 multimodal samples (Rahman et al., 26 Jul 2025)
CNvBench Chinese NLQ + English schema →\rightarrow VQL First Chinese Text-to-Vis benchmark (Ge et al., 2023)
nvBench-Rob Robustness evaluation for Text2Vis NLQ and schema perturbations (Lu et al., 2024)
PMVisBench Progressive multi-turn text-to-vis Turn-by-turn executable targets (Wenxin et al., 28 May 2026)

Text2Vis 2025 contains 1,985 samples, with 1,935 derived from data tables and 50 web-data-retrieval cases (Rahman et al., 26 Jul 2025). Most tables come from the ChartQA corpus, originally scraped from Statista, Pew Research, Our World in Data, and OECD; the authors manually curated 2,001 high-quality tables before filtering and retaining the final set. To increase diversity and complexity, they synthesized 173 additional tables with OpenAI o1-preview and Gemini Flash 1.5 Pro, injecting missing values, multivariable dependencies, and nonlinear patterns. The tables span more than 60 countries and domains such as finance, healthcare, politics, energy, technology, demographics, and environment. Structurally, the tables average 10 rows and 3.2 columns, can be as large as 1,000 rows and 15 columns, and include 191 noisy tables with missing values or inconsistencies (Rahman et al., 26 Jul 2025).

Its queries are organized along five axes: closed-ended versus open-ended, single-query versus conversational, data-given versus web-data-retrieval, single-chart versus multi-chart, and answerable versus unanswerable. The reported distribution is roughly 90/10 closed/open, 80/20 single/conversational, 97/3 data-given/web retrieval, 90/10 single/multi-chart, and 89/11 answerable/unanswerable. Task types include 1,098 analytical, 686 exploratory, 191 predictive, and 10 prescriptive cases; reasoning difficulty is skewed toward 1,173 hard and 224 extra-hard questions (Rahman et al., 26 Jul 2025). More than 20 chart types are covered, including line charts, bar charts, scatter plots, boxplots, pie/donut charts, treemaps, waterfall charts, and dashboard-style multi-chart layouts (Rahman et al., 26 Jul 2025).

Other benchmarks probe complementary aspects of the field. CNvBench is built by manually translating NvBench questions into Chinese while keeping schemas in English, thereby isolating cross-lingual semantic linking and Chinese segmentation ambiguity (Ge et al., 2023). nvBench-Rob constructs three robustness subsets—nvBench-Rob_nlq, nvBench-Rob_schema, and nvBench-Rob_(nlq,schema)—from 1,182 development/test pairs spanning 104 databases, using LLM-assisted but human-verified perturbations of both questions and schema names (Lu et al., 2024). PMVisBench, derived from VisEval, contains 1,149 distinct visualizations, 2,523 NL–VIS pairs, and 146 databases, and is designed so that each intermediate VQL remains valid and meaningful under explicit rule constraints (Wenxin et al., 28 May 2026).

Underlying these developments is NvBench itself, though different papers report slightly different corpus statistics. CNvBench describes NvBench as 25,750 natural-language query–visualization pairs spanning 105 domains and 7,247 unique visualizations (Ge et al., 2023), whereas DataVisT5 reports 25,628 instances total and 152 databases for the benchmark used in its experiments (Wan et al., 2024). This suggests that Text2Vis research has inherited a heterogeneous benchmark lineage rather than a single canonical dataset specification.

4. Evaluation protocols and empirical findings

Evaluation in Text2Vis has moved from exact-match parsing metrics to multimodal, post-execution assessment. In DV-query benchmarks such as NVBench, standard metrics include EM, Vis EM, Axis EM, and Data EM, reflecting exact matches over the predicted visualization query and its components (Wan et al., 2024). CNvBench similarly reports tree matching accuracy and visualization-component matching accuracy (Ge et al., 2023). These metrics are appropriate when the output is a symbolic query, but they do not directly assess readability or semantic adequacy of a rendered chart.

Text2Vis 2025 introduces a fully automated LLM-based evaluation framework using GPT-4o as the primary judge and Gemini 1.5 Pro as a robustness check (Rahman et al., 26 Jul 2025). The four scored dimensions are Answer Match, Code Execution, Readability and Visualization Quality, and Chart Correctness. Answer Match and Code Execution are binary; Readability and Chart Correctness are on a 1-to-5 scale. A sample counts as a pass only if the code executes successfully, the answer matches ground truth, and both readability and chart correctness are at least 3.5. The readability rubric covers labels and titles, layout spacing, color accessibility, axis scaling, chart-type suitability, font and legend quality, and annotation clarity; chart correctness is judged by query alignment, data integrity, insight representation, handling missing data, and multi-step complexity (Rahman et al., 26 Jul 2025).

The automated scores align closely with human judgments. The reported average Pearson correlations are around 0.87 for answer match, 0.88 for readability, and 0.867 for chart correctness; Cohen’s kappa for final pass rate is about 0.78, and 1,985 samples can be scored in about 5 minutes for roughly \$2 (Rahman et al., 26 Jul 2025). This is significant because Text2Vis evaluation depends on properties that only become visible after execution and rendering.

Direct inference results on the benchmark show a large gap between proprietary and open-source systems. GPT-4o performs best, with about 87% code execution success, about 42% answer match, readability around 3.45, chart correctness around 3.15, and a final pass rate of 26%. Gemini 1.5 Flash reaches a 17% pass rate. Among open-source models, Qwen2.5-7B is strongest at roughly 13% pass rate, followed by DeepSeek-Coder-V2-Lite at about 10%; CodeLlama-34B performs surprisingly poorly, indicating that larger size does not necessarily improve structured-data understanding (Rahman et al., 26 Jul 2025).

On earlier symbolic-query benchmarks, DataVisT5 reports the strongest overall NVBench results in its comparison set. On NVBench without join, the 770M model with fine-tuning reaches Vis EM 0.9850, Axis EM 0.7983, Data EM 0.6770, and EM 0.6833; on NVBench with join, it reaches EM 0.3451 (Wan et al., 2024). These results remain relevant because they quantify the performance of models optimized for declarative query synthesis rather than multimodal answer-and-chart generation.

5. Modeling paradigms

Text2Vis methods have evolved through several distinct paradigms. Early systems treated the task as semantic parsing. CNvBench adapts a BRIDGE-style parser with a multilingual BERT question-schema encoder and an LSTM pointer-generator decoder, and adds Chinese qq0-gram information through a ZEN-inspired module to mitigate segmentation ambiguity (Ge et al., 2023). DataVisT5 recasts the task as structured text generation with a T5 architecture initialized from CodeT5+, hybrid pre-training over NVBench, Chart2Text, WikiTableText, and FeVisQA, and multi-task fine-tuning across text-to-vis, vis-to-text, FeVisQA, and table-to-text (Wan et al., 2024).

A second line of work addresses robustness rather than raw in-distribution accuracy. GRED decomposes Text2Vis into an NLQ-Retrieval Generator, a Visualization Query-Retrieval Retuner, and an Annotation-based Debugger, using text-embedding-3-large for retrieval and GPT-3.5-Turbo for generation and debugging (Lu et al., 2024). On the hardest nvBench-Rob_(nlq,schema) setting, GRED improves overall accuracy from 24.81% for RGVisNet to 54.85% (Lu et al., 2024). This indicates that retrieval and schema-grounded repair can compensate for the lexical overfitting of end-to-end parsers.

The 2025 Text2Vis benchmark introduces an explicitly cross-modal actor-critic agentic framework that is model-agnostic and operates as a one-step refinement loop over an initial qq1 output (Rahman et al., 26 Jul 2025). In the actor step, a baseline model generates an answer and visualization code. In the critic step, a separate model or execution environment produces structured answer feedback, code feedback, and optionally visual feedback from the rendered chart. The actor then refines the final response. The strongest reported setting pairs GPT-4o with GPT-4o as both actor and critic using answer+code feedback, improving answer match from 42% to 53%, readability from 3.45 to 3.99, chart correctness from 3.15 to 4.02, and final pass rate from 26% to 42%; adding visual feedback further raises readability and chart correctness to 4.02 and 4.23 without improving answer accuracy (Rahman et al., 26 Jul 2025).

RL-Text2Vis extends this post-execution perspective from inference-time refinement to training-time optimization. It formulates Text2Vis as

qq2

with qq3 and qq4, and uses Group Relative Policy Optimization with a two-stage reward: a format reward enforcing a valid JSON object with answer and code, and a composite reward

qq5

for textual correctness, code reward, and visualization quality (Rahman et al., 8 Jan 2026). On Text2Vis, Qwen2.5-14B improves from 78% to 97% code execution success, 29% to 35% answer match, 3.12 to 4.10 readability, 2.94 to 4.03 chart correctness, and 14% to 29% final pass. The paper also reports a 22% relative improvement in chart quality over GPT-4o (Rahman et al., 8 Jan 2026).

A fourth paradigm treats Text2Vis as progressive interaction rather than single-shot generation. PMVisAgent uses a User Agent, a System Agent, and a Validation Agent with a ReAct-style tool-use loop over syntax validation, schema validation, SQL execution, and ambiguity detection (Wenxin et al., 28 May 2026). On PMVisBench, its best qwen-plus configuration reaches 88.60% execution accuracy in the single-table setting and 77.86% in the multi-table setting, improving over Prompt4Vis by 17.57% and 23.21%, respectively (Wenxin et al., 28 May 2026). This makes explicit a shift from translation to verified, dialogue-conditioned refinement.

6. Technical challenges, misconceptions, and research trajectory

The main misconception about Text2Vis is that it is merely code generation or chart-type prediction. The modern benchmark literature rejects that reduction. Text2Vis 2025 is designed to test natural language understanding over tables, numerical reasoning, data retrieval, chart selection, code generation, handling of conversational context, unanswerability detection, and the ability to produce both readable and correct visualizations (Rahman et al., 26 Jul 2025). Error analysis identifies syntax and runtime errors, missing variables, incorrect data extraction, poor logic in multi-step reasoning, and weak visualization clarity as recurring failure modes (Rahman et al., 26 Jul 2025). These are not formatting errors; they are multimodal reasoning failures.

Robustness remains a major unresolved issue. On the original nvBench test set, RGVisNet achieves 85.17% accuracy on the no-cross-domain split, but on nvBench-Rob the same model drops to 45.87% on nvBench-Rob_nlq, 44.91% on nvBench-Rob_schema, and 24.81% on nvBench-Rob_(nlq,schema) (Lu et al., 2024). This demonstrates that strong benchmark accuracy can coexist with weak tolerance to lexical and phrasal variability. A similar limitation appears in one-shot interfaces: PMVis argues that forcing users to specify all visualization details in one utterance creates cognitive overload and often yields incorrect visualizations, whereas progressive refinement maintains a renderable intermediate visualization at every round (Wenxin et al., 28 May 2026).

The research trajectory is therefore moving toward integrated multimodal reasoning, verification, and post-execution optimization. Text2Vis 2025 explicitly argues that future work should move beyond simple chart generation toward systems that can answer questions, generate executable visualization code, handle conversational and retrieval-augmented tasks, and know when a query is unanswerable (Rahman et al., 26 Jul 2025). The authors point to expanding beyond Matplotlib and Seaborn to other visualization libraries such as Vega-Lite, D3.js, or Plotly; incorporating dynamic planning and tool selection into the agentic loop; improving web retrieval and multi-chart handling; and reducing the computational overhead of refinement (Rahman et al., 26 Jul 2025). RL-Text2Vis adds that supervised fine-tuning cannot directly optimize post-execution correctness, visual readability, or semantic alignment of rendered charts, which is why reinforcement learning with post-execution feedback becomes attractive in this domain (Rahman et al., 8 Jan 2026).

Taken together, these developments define Text2Vis as a structured multimodal generation problem in which language, tables, code, and rendered visual output must be jointly aligned. This suggests that the field is converging on a stronger notion of visualization intelligence: not the ability to emit a plausible plotting script, but the ability to reason over data, choose or revise an appropriate visual representation, execute it, and verify that both the answer and the figure are correct.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Text2Vis.