Vector-Bench: Can Models Surgically Edit SVG Code?
Summary
Vector-Bench is a new, compact, and challenging benchmark designed to evaluate instruction-based SVG code editing models, focusing on both requested changes and the preservation of unrequested elements. It comprises 40 SVG repair tasks, each featuring a corrupted SVG program, an author-written visual instruction, a hidden target program, an average of 5.05 annotated repairs, and 60.55 protected objects. Instructions describe visible defects without exposing technical identifiers or data. The benchmark employs a deterministic binary specification reward, requiring requested repairs to meet attribute-aware perceptual tolerances while ensuring unrequested rendering- or application-relevant structure remains semantically unchanged and the output is a valid SVG. An evaluation of 34 model endpoints, including 25 open-weight, 5 control, and 4 frontier closed models, across 1360 requests revealed that the strongest endpoint achieved only 15.0% full specification success, despite a 43.7% mean repair progress, indicating a significant challenge in achieving precise, specification-faithful SVG editing. All prompts, outputs, scoring code, and reports are publicly released.
Key takeaway
For Machine Learning Engineers developing or evaluating code generation models for vector graphics, you should recognize that current models significantly underperform in precise, "surgical" SVG editing. Your evaluation metrics must extend beyond apparent visual repair progress to include strict semantic preservation of unrequested elements and valid SVG output. This benchmark highlights that achieving 15.0% full specification success is a major hurdle, indicating a need for new architectural approaches or training methodologies focused on code fidelity.
Key insights
Surgically editing SVG code requires precise changes while preserving untouched elements, a challenge current models largely fail.
Principles
- Instruction-based vector editing needs both change and preservation.
- Output judgment as raster images can mask unintended changes.
- Semantic preservation of unrequested structure is critical.
Method
Vector-Bench defines a binary specification reward: requested repairs meet perceptual tolerances, unrequested structure remains semantically unchanged, and output must be a valid SVG.
In practice
- Evaluate models on both repair progress and unintended changes.
- Use attribute-aware perceptual tolerances for SVG edits.
- Focus on semantic preservation of untouched code.
Topics
- SVG Editing
- Vector Graphics
- Code Generation Models
- Benchmark Evaluation
- Semantic Preservation
- Instruction Following
Best for: Research Scientist, AI Scientist, Machine Learning Engineer
Related on AIssential
See Counsel's argued verdicts on the open AI decisions leaders are weighing →
Editorial summary, takeaway, and curation by AIssential. Original article published by Artificial Intelligence.