Visually Descriptive Language Model for Vector Graphics Reasoning

Zhenhailong Wang, Joy Hsu, Xingyao Wang, Kuan-Hao Huang, Manling Li, Jiajun Wu, Heng Ji

Abstract

Despite significant advancements, current large multimodal models (LMMs) struggle to bridge the gap between low-level visual perception—focusing on shapes, sizes, and layouts—and high-level language reasoning involving semantics, events, and logic. This limitation becomes evident in tasks requiring precise visual perception, such as comparing geometric properties or solving visual algorithmic reasoning problems. To study this failure mode, we focus on an important visual domain: vector graphics—images composed purely of 2D objects and shapes. We propose the Visually Descriptive Language Model (VDLM) to build a bridge between low-level visual perception and high-level language reasoning. VDLM learns an intermediate symbolic representation called Primal Visual Description (PVD), which translates raw SVGs into a higher-level abstraction comprising primitive attributes. Without any human-annotated data, VDLM leads to significant improvements in state-of-the-art LMMs, such as GPT-4o, across various low-level multimodal perception and reasoning tasks.

Introduction: The Perception-Reasoning Gap

Standard LMMs (like GPT-4o or LLaVA) rely on vision encoders like CLIP. While CLIP is excellent at capturing high-level semantics, it often "blurs" low-level spatial details. This leads to a "perception-reasoning gap": a model might understand the logic of a maze but fail to "see" exactly where the walls are.

Comparison between standard LMMs and VDLM. While GPT-4o fails to correctly identify the block order in a tower, VDLM's structured PVD representation enables a correct answer.

The authors focus on vector graphics—images made of shapes and lines—as a challenging testbed. They found that even top-tier models fail 43% of the time when comparing the lengths of two line segments and 54% of the time when solving a tiny 2x2 maze. The challenge is twofold: how do we enable precise visual perception, and how do we translate that perception into a format a language model can actually reason with?

Methodology: The VDLM Pipeline

The authors propose a modular pipeline called VDLM, which consists of three main stages:

  1. Image-to-SVG: Since they assume they only have access to a rasterized image (like a PNG), they first use a rule-based converter (VTracer) to turn the pixels into Scalable Vector Graphics (SVG) code.
  2. SVG-to-PVD (The Perception Bridge): Raw SVG code is often too "noisy" and low-level for an LLM to interpret directly. The authors trained a specialized model (a fine-tuned Mistral-7b) to translate these raw SVG paths into Primal Visual Descriptions (PVD). PVD is a clean, structured JSON format that describes objects as primitives (e.g., {"type": "circle", "center": [10, 10], "radius": 5}).
  3. PVD-to-Reasoning: Finally, the PVD (textual description) and the original image are fed into a high-level reasoner (like GPT-4o). Because the model now has a "cheat sheet" of exact coordinates and shapes, its reasoning becomes much more accurate.
The VDLM pipeline: from input image to SVG decomposition, PVD generation, and final reasoning for a maze-solving task.

A key technical contribution is their Incremental Decomposition algorithm, which handles complex images by selectively adding SVG paths until the reconstructed image matches the original, effectively filtering out visual "noise."

Datasets and Evaluation

To train and test VDLM, the authors developed several key resources:

  • PVD-160k: A newly synthesized dataset of 160,000 <SVG, PVD> pairs used to train the SVG-to-PVD translation model. It covers circles, ellipses, rectangles, triangles, polygons, grids, and graphs.
  • Low-Level Reasoning Benchmark: A new evaluation suite comprising 9 tasks, including Angle Classification, Length Comparison, Shapeworld Spatial Reasoning, and Maze Solving (2x2 and 3x3).
  • VGBench-QA: Used to ensure the model still performs well on high-level semantic tasks (e.g., "What element of the environment is depicted?").

Key Results and Insights

VDLM significantly outperforms monolithic LMMs across the board on low-level tasks:

  • Overall Accuracy: VDLM (using GPT-4o as a reasoner) achieved 76.9% accuracy across 9 low-level tasks, compared to 66.3% for vanilla GPT-4o.
  • Maze Solving: On 2x2 mazes, VDLM improved accuracy from 46% to 61%. On 3x3 mazes, it jumped from a dismal 8% to 34%.
  • Geometric Precision: In Angle Classification (Acute vs. Obtuse), VDLM reached 90% accuracy, while vanilla GPT-4o sat at 63%.

Disentanglement and Interpretability: By separating perception (SVG-to-PVD) from reasoning (PVD-to-Answer), the framework offers improved interpretability. Researchers can now pinpoint whether a model failed because it didn't "see" the object correctly or because it made a logical mistake. Furthermore, the authors found that PVD only helps if the underlying reasoner is strong; weaker models like LLaVA-1.5-7B can become overwhelmed by the additional textual data.

Limitations and Future Work

While VDLM marks a significant step forward, it currently faces several constraints. It is limited to 2D vector-style primitives and cannot yet describe 3D structures or complex natural textures. Additionally, the multi-step pipeline introduces higher inference latency compared to monolithic models. Future directions include expanding the PVD ontology to include 3D structures and exploring "visual search" mechanisms to focus PVD generation on specific regions of interest within an image.

Summary updated

BibTeX
@article{wang2025visually,
  author = {Zhenhailong Wang and Joy Hsu and Xingyao Wang and Kuan-Hao Huang and Manling Li and Jiajun Wu and Heng Ji},
  title = {{Visually Descriptive Language Model for Vector Graphics Reasoning}},
  journal = {Accepted by TMLR},
  year = {2025},
  url = {https://openreview.net/forum?id=WzS33L1iPC},
}
Figure