VGB ench: Evaluating Large Language Models on Vector Graphics Understanding and Generation (2024)

Abstract: In the realm of vision models, the primary mode of representation is using pixels to rasterize the visual world. Yet this is not always the best or unique way to represent visual content, especially for designers and artists who depict the world using geometry primitives such as polygons. Vector graphics (VG), on the other hand, offer a textual representation of visual content, which can be more concise and powerful for content like cartoons, sketches and scientific figures. Recent studies have shown promising results on processing vector graphics with capable Large Language Models (LLMs). However, such works focus solely on qualitative results, understanding, or a specific type of vector graphics. We propose VGBench, a comprehensive benchmark for LLMs on handling vector graphics through diverse aspects, including (a) both visual understanding and generation, (b) evaluation of various vector graphics formats, (c) diverse question types, (d) wide range of prompting techniques, (e) under multiple LLMs and (f) comparison with VLMs on rasterized representations. Evaluating on our collected 4279 understanding and 5845 generation samples, we find that LLMs show strong capability on both aspects while exhibiting less desirable performance on low-level formats (SVG). Both data and evaluation pipeline will be open-sourced.

## introduction current vision models are mostly built on pixels, rasterizing the visual world into a matrix representation. such rasterized represents diverse visual content with equally sized elements. but pixels are not the only way to represent the visual world. for contents such as cartoons, sketches or scientific figures, a different representation using explicit geometry primitives can be more concise and beneficial. ## tasks and experiments we first introduce the source of our vector graphics images in sec. 3.1, and then describe the experiment settings in sec. 3.2. after that, we detail our tasks, benchmark creation, evaluation pipeline and results for vector graphics understanding and generation in sec. 3.3 and sec. 3.4, respectively. finally, we provide in-depth analyses on the performance under different llms, different sequence lengths, and reasoning processes in sec. 3.5. ## conclusion our study unveils new insights into the capabilities of llms in understanding and generating vector graphics. we discovered that llms demonstrate decent vector graphics understanding in tikz, graphviz, and svgs, with a particular strength in understanding vector graphics code with higherlevel semantics. we also found that llms often exhibit strong vector graphics generation capabilities. interestingly, advanced prompting techniques can significantly improve performance for low-level formats such as svg, and while gpt-4 had the strongest performance, open-source models like llama-3-70b and qwen2-72b show competitive performance. our work lays a groundwork for future studies into llms' vector graphics understanding and generation benchmarking, and we hope it will inspire further efforts to enhance these capabilities. we will release our benchmark dataset and evaluation pipeline.