INQUIRING LINE

AI coding tools often just reward 'did it run at all?' before ever checking whether the result looks right.

How does the rendering reward weight code executability against visual fidelity failures?

This explores how code-generation systems that score their output by rendering it (turning the code into a webpage, chart or CAD model and judging the result) balance two kinds of failure: code that doesn't run at all, and code that runs but looks wrong.


This explores how rendering-based rewards trade off 'does the code run?' against 'does the result look right?'. The question assumes a single rendering reward, but the corpus has a family of them. Almost none of these papers weights the two concerns against each other as numbers on a sliding scale. The common design is a gate: code that fails to execute or render scores zero, and only code that passes gets graded on how it looks. ReLook is the clearest case. It gives a strict zero to any invalid render before its multimodal critic scores the screenshot, and it does this specifically to stop reward hacking Can multimodal LLMs judge front-end code quality better than tests?. WebGen-R1 reaches the same answer from the opposite side. It found that a vision-language judge happily praises a website that looks perfect while its buttons and logic are broken underneath. So it runs deterministic structural checks and a real build-render-execute pipeline before any visual scoring happens Can vision-language models alone detect broken website functionality?.

When systems do combine the two signals instead of gating, they tend to keep them as separate channels rather than blending them into one score. One webpage and plot aesthetics system uses three separate reward agents (execution, static visual appearance and interactive behaviour). With that setup a 4B model beat GPT-4o on aesthetics Can reward agents teach code to look better?. CAD-RL also uses three task-specific rewards and reaches both 99.6% executability and much better geometric accuracy, which suggests the two goals don't have to trade off when each gets its own reward Can task-specific rewards outperform general pretraining for CAD code?. MSRL orders the signals in time instead. It starts with cheap rule-based text checks and only later adds expensive visual comparisons judged by a multimodal model. In effect it teaches 'be valid' before 'be faithful' Can visual similarity rewards break the chart-to-code learning plateau?. ChartSimRL mixes attribute overlap (are the right colors and labels present?) with pixel-level visual similarity, aiming at errors that supervised fine-tuning leaves unfixed Can rendering-based rewards improve chart code generation?.

The surprising finding is that rewarding the visual result can protect executability without targeting it directly. RRVF rewards only how closely the rendered output matches the source image, not the code text Can visual matching alone train image-to-code models without text?. Yet on an unseen chart benchmark its models kept 96% code execution. A model fine-tuned to copy reference code fell from 69% to 49% Does visual reward training generalize better than code matching?. Code that doesn't run can't render, so a visual reward already carries an execution penalty. Copying exact code, by contrast, seems to teach surface patterns that break on new inputs.

The other half of the trade-off is how reliable the visual judge is. Elsewhere in the corpus, every text-to-image reward model tested missed the same structural flaws: warped geometry, duplicated objects and blended entities Do text-to-image rewards all miss the same structural flaws?. Preference models trained on photos don't carry over to judging graphic layouts either Why do image reward models fail at layout evaluation?. That helps explain why ALISA skips vision models altogether. It renders both pages, matches their elements, and computes alignment, grouping and style consistency directly, avoiding both the cost of a vision judge and the fragility of comparing code structure Can rendering-based metrics better reward WebUI code generation?. The overall lesson is that executability is cheap and objective to check, so it serves as the gate. Visual fidelity is where the subtle failures hide, and that is where the design effort and the risk of reward hacking end up.


Sources 11 notes

Can multimodal LLMs judge front-end code quality better than tests?

ReLook trains a reward model on visual screenshots rather than unit tests, using a strict zero-reward rule for invalid renders to prevent reward hacking. It outperformed baselines across three benchmarks by embedding pixel-level visual judgment into the policy training loop.

Can vision-language models alone detect broken website functionality?

WebGen-R1 found that VLM aesthetic scoring misses broken event handlers and logic chains hiding beneath visually perfect interfaces. The solution is to gate VLM scoring behind deterministic structural checks and actual build-render-execute pipelines first.

Can reward agents teach code to look better?

A three-agent reward system (execution, static visual, interactive) integrated into GRPO training enabled a 4B-parameter model to surpass GPT-4o and GPT-4.1 on webpage and plot aesthetics. The approach used 358K training examples and a new 840-case benchmark.

Can task-specific rewards outperform general pretraining for CAD code?

CAD-RL, trained with three domain-specific rewards and chain-of-thought guidance, achieves 99.63% executability and 78.7% geometric IoU under structured input, outperforming CAD-Coder by +8.3% IoU and +3.39% executability. This suggests hand-specified rewards can unlock latent reasoning in pretrained models for precise code generation.

Can visual similarity rewards break the chart-to-code learning plateau?

MSRL pairs cheap rule-based textual rewards with costly MLLM-judged visual rewards comparing rendered code to ground-truth charts, improving ChartMimic and ReachQA scores by 6–10% beyond supervised-learning baselines. A two-stage curriculum applies textual rewards first, then adds visual feedback.

Show all 11 sources
Can rendering-based rewards improve chart code generation?

ChartSimRL applies a two-part reward—Jaccard attribute overlap plus ResNet-18 visual similarity—to rendered chart images, addressing color and positioning errors that supervised fine-tuning alone cannot fix. This marks the first multimodal reward system for chart-to-code generation.

Can visual matching alone train image-to-code models without text?

RRVF rewards MLLMs for how closely rendered code output matches the source image, not for matching ground-truth text or code. This leverages asymmetry-of-verification: checking if rendered output matches is easier than generating code, making visual similarity a tractable RL reward signal.

Does visual reward training generalize better than code matching?

On an unseen chart benchmark, RRVF-trained models maintained 96% code execution accuracy (down only 2 points from training data), while supervised fine-tuning dropped from 69% to 49%. The difference suggests rewarding visual match rather than exact code teaches more transferable principles.

Do text-to-image rewards all miss the same structural flaws?

Every tested reward model—aesthetic, preference, and consistency-based—develops its own failure mode, but all consistently fail to penalize geometric distortions, object duplication, and entity blending. A lightweight adaptive reward model trained on human-judged artifact examples can fill this gap.

Why do image reward models fail at layout evaluation?

ImageReward, HPS, and PickScore models trained on photorealistic text-to-image data cannot capture human preferences for graphic layouts because they lack exposure to spatial relationships and compositional balance. This distributional mismatch shows that domain transfer for preference models cannot be assumed across visual domains.

Can rendering-based metrics better reward WebUI code generation?

ALISA computes RL rewards by rendering generated and ground-truth pages, then matching elements by text similarity and measuring spatial alignment, grouping, and style consistency. This avoids vision-model overhead and DOM-structure brittleness caused by code asymmetry in crawled training data.

Papers this line draws on 8

The research behind the notes this line reads — ranked by how closely each paper relates.