SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2407.10972 · EMNLP · 2024

VGBench: Evaluating Large Language Models on Vector Graphics Understanding and Generation

Mu Cai, Yong Lee, Jianrui Zhang, Bocheng Zou

arXiv · PDF · Open in the Atlas

Code that ran

3 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 3 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2407.10972.json · badge: /api/ran/2407.10972.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
vgbench/VGBench canonical (classifier label)
classifier basis: census
3 ran · 3 no recorded run
FunctionStatusWhere it lives
convert_sample_format Ran
ran; our contract draft was wrong, not the code
vgbench/VGBench/evaluate.py
code served (permissive licence) · get_code("e87679a61667de51")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

# Construct a sample dict with the required nested structure
sample = {
    'idx': 'q1',
    'query': {
        'q': 'What is the capital of France?',
        'o': ['Paris', 'London', 'Berlin', 'Madrid'],
        'a': 0
    },
    'data': {
        'code': 'print("hello")'
    }
}

ARGS = {
    'sample': sample,
    'ans': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
generate_system_message Ran
ran; our contract draft was wrong, not the code
vgbench/VGBench/generate_questions.py
code served (permissive licence) · get_code("f377c500498620f8")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json

def generate_system_message(vector_format: str, qtype: str):
    if vector_format == 'tikz':
        if qtype == 'concept':
            json_example = {'q': 'What is the type of this image?', 'o': ['A: Topological Figures', 'B: Graphical Figures', 'C: Geometric Figures', 'D: Three-Dimensional Figures'], 'a': 'B'}
            return 'Generate a JSON object containing a quiz question based on an image rendered from an TiKz file.                     The caption is also provided to help you better curate the question, but note that the caption is not leaked to the observer.                     If the caption does not clearly correspond to the image, just discard that caption, never over-rely on the it.                     The question should be designed to test a model\'s perception to the image by making the correct answer evident only upon seeing the image.                     Include four answer options, ensuring that the correct answer is straightforward to identify for someone who actually view this image.                     The question should relate to the image\'s semantic category.                     Provide the JSON structure with fields for the question, the four options (labeled A, B, C, D), and the correct answer indicated.                     Below is an example of how to structure the question, options and the answer within the JSON format.                     Example 1: you propose a question :"What is the type of this image?" with the following four options,\n                     A: Topological Figures\n                     B: Graphical Figures\n                     C: Geometric Figures\n                     D: Three-Dimensional Figures\n                     If the correct answer is B, you should output: %s                     The example is just for illustrating the format, not for content.                    Unlike the example, you should focus on the type of the image.                    Ensuring that the correct answer is straightforward to identify for someone who actually view this image.                    You are NOT allowed to ask questions about any specific object in the image.                    Do not add any additional character including "`". Your output should start with "{" and end with "}"' % json.dumps(json_example)
        elif qtype == 'counting':
            json_example = {'q': 'How many layers does this neural network have?', 'o': ['A: 2', 'B: 3', 'C: 4', 'D: 5'], 'a': 'B'}
            return 'Generate a JSON object containing a quiz question based on an image rendered from an TiKz file.                 The caption is also provided to help you better curate the question, but note that the caption is not leaked to the observer.                 If the caption does not clearly correspond to the image, just discard that caption, never over-rely on the it.                 The question should be designed to test a model\'s perception to the image by making the correct answer evident only upon seeing the image.                 Include four answer options, ensuring that the correct answer is straightforward to identify for someone who actually view this image.                 The question should relate to the image\'s semantic category.                 Provide the JSON structure with fields for the question, the four options (labeled A, B, C, D), and the correct answer indicated.                 Below is an example of how to structure the question, options and the answer within the JSON format.                 Example 1: you propose a question :"How many layers does this neural network have?" with the following four options,\n                 A: 2\n                 B: 3\n                 C: 4\n                 D: 5\n                 If the correct answer is B, you should output: %s                 The example is just for illustrating the format, not for content.                Your question should test the model\'s ability to count specific objects in the image. Your options should be numbers.                Ensuring that the correct answer is straightforward to identify for someone who actually view this image.                You are NOT allowed to ask questions about any specific object in the image.                Do not add any additional character. Your output should start with "{" and end with "}"' % json.dumps(json_example)
        elif qtype == 'relation':
            json_example = {'q': "What's the relation between the red node and the black node?", 'o': ["A: the red node is the black node's father", "B: the black node is the red node's father", 'C: the red node and the black node are siblings', "D: the red node is the black node's aunt"], 'a': 'B'}
            return 'Generate a JSON object'
    return ''

ARGS = {
    'vector_format': 'tikz',
    'qtype': 'concept'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
load_questions Ran
ran; our contract draft was wrong, not the code
vgbench/VGBench/build_dataset.py
code served (permissive licence) · get_code("d54d6d247c2fb8dc")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import os
import tempfile

# Create a temporary directory structure with mock data files
tmpdir = tempfile.mkdtemp()
data_dir = os.path.join(tmpdir, 'data')
os.makedirs(data_dir, exist_ok=True)

# Create a sample format directory
vformat_dir = os.path.join(data_dir, 'vqa_v2')
os.makedirs(vformat_dir, exist_ok=True)

# Create mock questions JSON file
mock_questions = [
    {"question_id": 1, "image_id": 1, "question": "What color is the car?"},
    {"question_id": 2, "image_id": 2, "question": "How many people are in the image?"}
]

questions_file = os.path.join(vformat_dir, 'questions_train.json')
with open(questions_file, 'w') as f:
    json.dump(mock_questions, f)

# Change to the temp directory so relative paths work
original_cwd = os.getcwd()
os.chdir(tmpdir)

ARGS = {
    'vformat': 'vqa_v2',
    'q_type': 'train'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calculate_activation_statistics Not yet run
unverified (harvested, no recorded run)
vgbench/VGBench/evaluate_fid_score.py
code served (permissive licence) · get_code("ffd8c42a422834f1")
How it ran

no invocation recorded.

calculate_frechet_distance Not yet run
unverified (harvested, no recorded run)
vgbench/VGBench/evaluate_fid_score.py
code served (permissive licence) · get_code("0def50a351111624")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

get_activations Not yet run
unverified (harvested, no recorded run)
vgbench/VGBench/evaluate_fid_score.py
code served (permissive licence) · get_code("3f1d9512c08824f8")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 2 later) and 4 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
calculate_frechet_distance 74 other papers
65 dated earlier, 2 the same month, 6 later, 1 same year, order not determinable
1610.09585 (2016-10)
Conditional Image Synthesis With Auxiliary Classifier GANs
1706.08500 (2017-06)
GANs Trained by a Two Time-Scale Update Rule Converge to a Local Nash Equilibrium
1807.11458 (2018-07)
To learn image super-resolution, use a GAN to learn how to do image degradation first
and 71 more not named here
calculate_activation_statistics 10 other papers
7 dated earlier, 3 later
Chou_How_to_Backdoor_Diffusion_Models_CVPR_2023_paper (2023 (year only))
How to Backdoor Diffusion Models?
2305.08192 (2023-05)
Diffusion Models for Imperceptible and Transferable Adversarial Attack
2306.06874 (2023-06)
VillanDiffusion: A Unified Backdoor Attack Framework for Diffusion Models
and 7 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

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 at https://vgbench.github.io.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2407.10972")
get_code_for_paper("2407.10972")
have("2407.10972")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2407.10972.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2407.10972.svg)](https://syntology.ai/paper/2407.10972)

Connect an agent — have() is free.