NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Same Picture, Different Code: Measuring Memorization in SVG Benchmarks

Vector graphics are pictures written as code. An SVG file lists shapes, curve control points and colors that a renderer turns into pixels. Few good vector files exist, so the models that write this code are trained on the same handful of public sources the field also uses for testing: GitHub dumps, and emoji sets such as Twemoji, Google Noto and Microsoft Fluent. That scarcity makes train–test overlap close to unavoidable, and nobody currently measures it. When a model "edits" a Twemoji icon correctly, we cannot tell whether it reasoned about geometry or recalled coordinates it saw during training.

This proposal uses a property unique to vector code. The same picture can be written in endlessly many different strings, and for many edits the correct answer on a rewritten file is known exactly. We build an audit that re-encodes benchmark SVGs. It shifts and rescales the coordinate frame, switches between absolute and relative path commands, reverses paths, subdivides curves, and converts rectangles into paths. None of these change what renders, and each yields a verifiable ground truth. We then compare how much each model's score drops on re-encoded public items against the drop on re-encoded items that were never public. The difference between those two drops isolates memorization from mere unfamiliarity. It also answers an open question the file raises: do SVG-specific tokenizers teach geometry, or do they help models memorize coordinate templates?

Core Claim

A model that understands the geometry in an SVG should be almost indifferent to how that geometry is written down. A model that has memorized benchmark files should lose accuracy when the string changes, even though the picture does not. The proposal makes three claims that the experiments below test.

The first claim is that a contamination estimate for vector models needs two drops, not one. Re-encoding moves every input somewhat off the training distribution, because a coordinate frame offset by 37.3 units is unusual regardless of memorization. So we compare the drop on public items with the drop on matched private items under identical transforms. Writing $s(\cdot)$ for a model's benchmark score, $T$ for a randomly drawn equivalence transform, $P$ for public benchmark items and $F$ for fresh private items of matched complexity, the contamination index is

$$C = \big[s(P) - s(T(P))\big] - \big[s(F) - s(T(F))\big].$$

A value of $C$ near zero means the public score is honest. A clearly positive $C$ means part of the public score comes from recall.

The second claim is that the method also produces verifiable test items. Many edit operations commute with coordinate transforms: recoloring, changing opacity and adding contours are unaffected by an affine change of frame, and cropping or flipping transform in a known way. As a result, $\mathrm{edit}(T(x)) = T(\mathrm{edit}(x))$ holds exactly or up to a known correction. This is the same checkable-by-construction idea that A²RBench uses when it verifies generated tasks through the cycle-consistency test $g(f(x)) = x$. Here, though, verification is done by geometry and rendering rather than by an author model writing Python. That difference sidesteps the "generator simplifies the task" ceiling that paper reports.

The third claim is that the audit can separate the tokenizer question from the data question. We measure $C$ for models that write SVG as plain text (StarVector) and for models with dedicated SVG tokens for tags, attributes and integer coordinates (LLM4SVG, InternSVG). We then fine-tune the two tokenizations in a controlled way on identical data.

Research Program

Transform library. We first build a library of render-preserving transforms. The group is coordinate frame changes (translation, uniform scaling, and viewBox re-parameterization with compensating coordinates), path re-serialization (absolute/relative commands, alternative start points, reversed traversal of closed paths, curve subdivision by de Casteljau splitting), primitive substitution (rect, circle and ellipse to equivalent paths) and reordering of elements whose rendered regions do not overlap. We accept a transform only if the rendered image matches the original within anti-aliasing tolerance at multiple resolutions. That check is automatic, so every item is verified rather than trusted.

Edit ground truths. For editing tasks, we derive the transformed ground truth analytically for the operations that commute. For the rest we re-derive it by applying the reference edit program. Items we cannot verify are dropped.

Transform strength. Transforms are drawn with a continuous strength parameter, running from cosmetic (whitespace, number formatting) to heavy (full reframing plus subdivision). This lets us plot a dose–response curve instead of a single number.

Private control pool. The second component is a small pool of native vector art that has never been published. It combines roughly a few hundred icons commissioned from designers under a non-publication agreement with a procedurally composed set. Both are matched to the public benchmarks on path count, command count and color count, so difficulty is comparable. This pool is kept private and used only as the $F$ term. Its small size is acceptable because it calibrates a difference, not a leaderboard.

Direct memorization probes. The third component probes memorization directly. We prompt with the first part of a benchmark SVG's path data and measure whether the model reproduces the remaining coordinates verbatim or with near-zero surprise. This adapts the token-level surprise method of Studying and improving reasoning in humans and machines, which found models predicting classic puzzles with near-certainty. These probes give an independent, item-level memorization signal against which we check $C$.

Controlled contamination. The fourth component is a planted-contamination experiment that calibrates the whole instrument. We fine-tune an open SVG model on a fixed slice of SAgoge data. Into that slice we insert chosen benchmark items at 0, 1, 4 and 16 repetitions, then measure how $C$ and the probes respond. If $C$ does not rise with planted repetitions, the audit does not work, and we would say so.

Baselines

Raw leaderboard. The do-nothing reference is the raw benchmark score as currently reported, with no correction. On SVGEditBench, GPT-4 reaches a Change Color mean squared error of 6.88e-5 against 0.0134 for GPT-3.5. On SArena editing, InternSVG reports a PSNR of 77.33 against 57.59 for Claude-Sonnet-4. For SVGEditBench V2 the file reports only that open-source models produce invalid SVG in up to 90% of attempts; no reported result found on Lacuna for its per-model MSE, DINOv2 or Chamfer tables, so we rerun those ourselves. We rerun every model on the original items under the same decoding settings and rendering resolution, so our "original" numbers are directly comparable to the transformed ones. The proposal adds value over this baseline if it changes a ranking or overturns a reported gap. The InternSVG-versus-Claude editing margin is the headline case to check, because InternSVG's training corpus was assembled from public vector sources.

Temporal split. The first contamination detector is the partition used in Unveiling Causal Reasoning in Large Language Models, which compares scores on items before and after the model's training cutoff. We apply it using commit dates of icons in the Twemoji, Noto and Fluent repositories. We give it the same items and models as our audit, and judge it by whether it recovers the planted contamination levels.

Surprise-based detection. The second detector scores each item by the model's per-token surprise on the original SVG string. This follows the token-level surprise method of Studying and improving reasoning in humans and machines. It is the strongest cheap competitor, because it needs no private data. We run it on the same items and models, with its threshold tuned on the planted-contamination models just as our index is.

Direct overlap. For open models whose training sets are public, SVG-Stack for StarVector and SAgoge for InternSVG, the most direct detector is exact and near-duplicate matching of benchmark files against the training corpus. We treat this as ground truth for validation rather than as a competitor. $C$ should be larger for items the overlap check flags. The audit's value is that it also works for closed models, where overlap checks are impossible.

Winning criterion for detection. The audit beats these detectors if its item-level scores rank the planted repetition levels better than both, measured by rank correlation with the known dose. It should also agree with the overlap check on open models.

Fresh-item baseline. The strongest existing way to obtain un-memorized items is LLM rewriting, in the spirit of Beyond Memorization. That paper converts verbatim questions into reasoning questions, which removed post-cutoff decay and cut influence-function Top-1 hits from 77.5% to 17.5%. Here, rewriting means having a frontier model redraw each benchmark SVG. We generate the same number of rewritten items with GPT-4o as we generate transformed ones, and verify both by rendering. Our transform approach should win on fidelity: a higher fraction of items whose ground truth remains exactly verifiable, and a smaller difficulty shift on the private pool.

Ablations. Two ablations isolate the key ingredient. The first applies only cosmetic transforms, such as whitespace and number formatting, which change few coordinate tokens. If memorization lives in coordinate sequences, these should leave $C$ near zero while heavy reframing does not. The second removes the private-pool term, leaving only $s(P) - s(T(P))$. This shows how much a single-drop estimate overstates contamination by counting distribution shift as recall.

Why not just…?

Why not just split benchmarks by upload date? Icon packs are revised in bulk and mirrored widely, so commit dates poorly reflect when an item entered crawls. More fundamentally, Beyond Memorization shows that post-cutoff decay depends on question format and can vanish or even reverse without any change in leakage. We still run the split as a baseline. The planted-contamination experiment will show directly whether it tracks known contamination.

Why not just build a fresh procedural SVG benchmark, DyVal-style? DyVal generates new reasoning problems from graphs and showed static-benchmark leaders scoring near zero. A procedural SVG generator would indeed resist leakage. But it would test a different distribution: synthetic shapes rather than the layered, professionally drawn icons the field cares about. It also cannot say whether existing published numbers are inflated. Our audit keeps the real items and changes only their encoding, and our private pool includes a procedural portion, so the comparison is built in. This is a real threat if procedural and commissioned items behave identically; in that case we would recommend the cheaper procedural route for future benchmarks.

Why not just run membership inference or overlap checks? For open-data models this is simpler, and we use it for validation. It fails for closed models, whose training data is unavailable. Surprise-based scores also conflate "memorized" with "easy to predict": a simple rectangle has low surprise whether or not it was seen. Our difference-in-differences design controls for exactly that. If the surprise detector matches our index on the planted-dose models, we will report that the cheap method suffices.

Why not just evaluate on rendered pixels, which ignores encoding? Rendering-based metrics are indeed what we score with. But the model still reads and writes the string, and that is where recall operates. SVGEditBench V2 already found that pixel error can look acceptable while path structure is broken. Pixel metrics alone therefore cannot separate recall from skill; changing the string while holding the pixels fixed can.

Proposed Experiments

Main audit. We apply the audit to the editing tasks of SVGEditBench, SVGEditBench V2 and SArena, and to the understanding split of SArena. For every model, we report original score, transformed score, private-pool drop and $C$, with bootstrap confidence intervals over items. Each is plotted against transform strength. The models are StarVector, LLM4SVG and InternSVG as SVG-specialized systems, a general open model of matched size (the Qwen2.5-7B backbone underlying InternSVG), and GPT-4o and Claude as closed systems.

Symbolic benchmark check. We run the CodeVQA protocol of VCode, where VCoder scores 54.0 against 41.7 for Claude-4-Opus. The question is whether reframing the generated SVG before the downstream question-answering step changes answers. This separates leakage from the source benchmarks' question-answer pairs from reliance on the SVG itself.

Tokenizer experiment. We fine-tune the same base model twice on an identical SAgoge slice with identical planted items: once with plain-text SVG and once with InternSVG-style tag, attribute and integer-coordinate tokens. We then compare $C$ and verbatim-completion rates at each planted dose. If specialized tokens raise memorization of planted items while leaving the private-pool score unchanged, that resolves the tension flagged between A²RBench's 17.7% symbolic-remapping drop and the claimed robustness of vector-specific tokenization. It would show that these tokenizers help recall rather than geometry. A null result would support the tokenizer designs.

Decisive checks. Three results would settle the project. First, $C$ should rise monotonically with planted repetitions. Second, $C$ should be higher on items the overlap check flags for open models. Third, cosmetic-only transforms should leave $C$ near zero while heavy reframing does not. If all three hold, the audit is a trustworthy instrument, and the scores it corrects become the first contamination-adjusted leaderboard for vector graphics. If the first fails, the audit is not measuring contamination, and we report that.