An AI learned to turn chart images into the code that redraws them — but which training signal actually taught it that: matching the picture, or getting the code right?
How much of MSRL's improvement comes from visual rewards versus rule rewards?
This explores how MSRL, a reinforcement learning method that trains models to turn a chart image into the plotting code that reproduces it, divides its gains between two reward types: rule-based checks on the code text, and a visual score comparing the rendered chart to the original.
This explores how MSRL's improvement splits between its rule-based code checks and its visual reward, which compares the chart the code draws with the original. The short answer is that the collection can't tell you. The material on MSRL describes a two-stage setup. The model first trains only on rule-based checks of code correctness, then gets a visual reward from a multimodal model that judges how closely the rendered chart matches the target. MSRL reports gains of 6.2% and 9.9% on two chart benchmarks, but the source doesn't include an ablation (a test that removes one reward to measure what the other contributes). Because the visual reward is only added in the second stage, the two can't be pulled apart from the reported numbers either. (That MSRL note isn't among the notes retrieved for this question, so it isn't cited here.)
The neighbouring work suggests what each reward type is good for. ChartSimRL, a close relative on the same chart-to-code task, also pairs a rule-like signal (overlap between chart attributes) with a visual similarity score on the rendered image. It argues that the visual part catches color and positioning errors that supervised fine-tuning alone misses Can rendering-based rewards improve chart code generation?. So the rough division of labor seems to be this: rules confirm the code is correct and the values are right, and visual rewards catch whether the chart actually looks right.
The clearest evidence that visual rewards add something rules don't comes from generalization, not raw scores. Models trained by rewarding a visual match (RRVF) held 96% code execution on a chart benchmark they hadn't seen. Supervised training that matched reference code fell from 69% to 49% Does visual reward training generalize better than code matching?. Rewarding what the output looks like, rather than the exact code text, seems to teach skills that carry over to new charts. If visual rewards help MSRL, it may show up more on unfamiliar charts than in the benchmark numbers.
Rules alone can still go a long way. AeSlides trained slide generation using only rule-based layout measurements taken from the rendered output, and raised aspect-ratio compliance from 36% to 85% Can rule-based rewards fix LLM slide layout quality?. CAD-RL reached 99.6% executability with three hand-written, task-specific rewards Can task-specific rewards outperform general pretraining for CAD code?. One detail blurs the rule-versus-visual split: AeSlides' rules measure the rendered page, not the markup. The more useful question may be whether a reward looks at the output as drawn or at the code as written. In the code-aesthetics work, the visual reward is one of three separate reward agents Can reward agents teach code to look better?.
A caution from a different area also applies. In reasoning research, much of what RL training gains turns out to come from activating abilities the base model already had, not from what a particular reward teaches What does reward learning actually do to model reasoning?. If that holds for chart code, MSRL's first, rules-only stage may do most of the work of unlocking existing skill, and the visual stage may mostly polish the result. That's a hypothesis, not a finding. Settling it would take an ablation the corpus doesn't have.
Sources 6 notes
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.
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.
AeSlides uses GRPO with render-time metrics to train slide generation, raising aspect-ratio compliance from 36% to 85% and outperforming reflection methods and Claude-Sonnet-4.5. The key: scoring rendered HTML directly rather than judging markup.
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.
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.
Show all 6 sources
Research shows RLVR improves sampling efficiency within existing capability boundaries without expanding them. A single training example suffices for activation, and spurious rewards work nearly as well as correct ones for models with appropriate pretraining.
Papers this line draws on 8
The research behind the notes this line reads — ranked by how closely each paper relates.
- Spurious Rewards: Rethinking Training Signals in RLVR
- ChartEditor: A Reinforcement Learning Framework for Robust Chart Editing
- Code Aesthetics with Agentic Reward Feedback
- Breaking the SFT Plateau: Multimodal Structured Reinforcement Learning for Chart-to-Code Generation
- Rendering-Aware Reinforcement Learning for Vector Graphics Generation
- ReLook: Vision-Grounded RL with a Multimodal LLM Critic for Agentic Web Coding
- ChartMaster: Advancing Chart-to-Code Generation with Real-World Charts and Chart Similarity Reinforcement Learning
- AeSlides: Incentivizing Aesthetic Layout in LLM-Based Slide Generation via Verifiable Rewards