大语言模型理解数据可视化规则吗?
Do Large Language Models Understand Data Visualization Rules?
AI总结:
本文评估了大语言模型在数据可视化规则检测中的性能,发现其在基本规则上表现良好,但在复杂规则上存在局限。
摘要:
数据可视化规则源自数十年来设计和感知领域的研究,以确保图表交流的可信度。尽管先前的研究表明,大语言模型(LLMs)能够生成图表或标记误导性图表,但尚不清楚它们是否能够直接进行推理并执行可视化规则。基于约束的系统如Draco将这些规则编码为逻辑约束,以实现精确的自动检查,但维护符号编码需要专家努力,这促使使用LLMs作为灵活的规则验证器。在本文中,我们首次系统地评估了LLMs对可视化规则的合规性,使用来自答案集编程(ASP)的硬验证真实数据。我们将Draco的一小部分约束转换为自然语言陈述,并生成了一个包含2000个Vega-Lite规范的受控数据集,这些规范标注了显式的规则违规。LLMs在检测违规的准确性和提示的符合性方面进行了评估,后者衡量输出是否遵循所需的结构化格式。结果表明,前沿模型在符合性方面表现优异(Gemma 3 4B / 27B:100%,GPT-oss 20B:98%),并且能够可靠地检测常见违规(F1高达0.82),但对于更微妙的感知规则(某些类别F1 < 0.15)和由技术ASP公式生成的输出,性能下降。将约束转换为自然语言使小型模型的性能提高了高达150%。这些发现展示了LLMs作为灵活、语言驱动的验证器的潜力,同时突显了它们与符号求解器相比的当前局限性。
英文摘要:
Data visualization rules-derived from decades of research in design and perception-ensure trustworthy chart communication. While prior work has shown that large language models (LLMs) can generate charts or flag misleading figures, it remains unclear whether they can reason about and enforce visualization rules directly. Constraint-based systems such as Draco encode these rules as logical constraints for precise automated checks, but maintaining symbolic encodings requires expert effort, motivating the use of LLMs as flexible rule validators. In this paper, we present the first systematic evaluation of LLMs against visualization rules using hard-verification ground truth derived from Answer Set Programming (ASP). We translated a subset of Draco's constraints into natural-language statements and generated a controlled dataset of 2,000 Vega-Lite specifications annotated with explicit rule violations. LLMs were evaluated on both accuracy in detecting violations and prompt adherence, which measures whether outputs follow the required structured format. Results show that frontier models achieve high adherence (Gemma 3 4B / 27B: 100%, GPT-oss 20B: 98%) and reliably detect common violations (F1 up to 0.82),yet performance drops for subtler perceptual rules (F1 < 0.15 for some categories) and for outputs generated from technical ASP formulations.Translating constraints into natural language improved performance by up to 150% for smaller models. These findings demonstrate the potential of LLMs as flexible, language-driven validators while highlighting their current limitations compared to symbolic solvers.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。