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

Opusanimation: Code-based dynamic chart generation

Bozheng Li, Miao Yang, Zhenhan Chen, Jiawang Cao, Mushui Liu, Yi Lu, Yongliang Wu, Bin Zhang, Yangguang Ji, Licheng Tang, Jay Wu, Wenbo Zhu

TL;DR

OpusAnimation introduces DCG-Bench, the first comprehensive benchmark for evaluating how Multimodal Large Language Models (MLLMs) generate dynamic, animated charts from text or video. By combining supervised fine-tuning with a novel reinforcement learning recipe—Joint-Code-Visual Reward (JCVR)—the authors developed a 3B-parameter model that outperforms much larger open-source models and rivals proprietary giants in creating complex, code-rendered visualizations.

What Problem Does This Paper Address?

While MLLMs have become remarkably adept at understanding and generating static charts, the world of data visualization is increasingly moving toward Dynamic Chart Generation (DCG). Animated charts offer higher information density and better narrative flow, yet they are significantly harder to generate.

The challenge is twofold:

  1. Complexity: Generating the JavaScript-enhanced HTML required for animations involves long, intricate code sequences where a single syntax error or logic flaw breaks the visualization.
  2. Temporal Dynamics: Models must understand motion—such as a line chart growing with an "elastic easing" effect—which requires fine-grained video understanding that static image-to-code benchmarks lack.

Prior to this work, there was no dedicated benchmark or specialized training pipeline to help MLLMs bridge the gap between static data and fluid, animated storytelling.

Methods

The authors propose a two-stage training paradigm to transform a base MLLM into a DCG expert:

  1. Cold-Start SFT: The model undergoes Supervised Fine-Tuning on detailed text-to-chart and video-to-chart tasks to learn the basic mapping between instructions and renderable code.
  2. JCV-GRPO: To prevent the model from simply memorizing code snippets (a common pitfall of SFT), the authors use Group Relative Policy Optimization (GRPO). The "secret sauce" here is the Joint-Code-Visual Reward. Instead of a simple pass/fail metric, a reward model (Gemini-2.5-Pro) evaluates the generated output through two lenses:
  3. Code Quality: Does the code follow the structural requirements?
  4. Visual Fidelity: Does the rendered animation actually match the requested motion and timing?

This dual-supervision ensures the model doesn't just write "correct-looking" code that fails to produce the intended visual effect.

The training recipe involves two stages: SFT for initialization and JCV-GRPO for optimization using dual code/video rewards.

Datasets

The researchers introduced two major resources:

  • DCG-8K: A high-quality dataset of 8,000 samples. It was built by taking seed templates from ECharts and AG Charts, applying random animation modifications, and rendering them into videos. Each sample includes the code, the video, detailed/simple descriptions, and 20 QA pairs for evaluation.
  • DCG-Bench: A 700-sample test split designed to evaluate models across three tasks: Detailed Text-to-Chart (D2C), Simple Text-to-Chart (S2C), and Video-to-Chart (V2C).
The data curation pipeline transforms raw ECharts code into a rich dataset of code-video-instruction triplets.

Key Insights and Ideas

  • SFT Memorizes, RL Generalizes: The authors found that continued SFT leads to overfitting on long code sequences. In contrast, GRPO allows the model to explore the generation space, leading to much better performance on unseen tasks (like Simple Text-to-Chart).
  • Visual Feedback is Essential: Relying solely on code-level rewards is insufficient. Incorporating video-based rewards acts as a crucial auxiliary signal that significantly boosts execution reliability and aesthetic accuracy.
  • Cross-Modal Knowledge Transfer: Interestingly, training on video-to-chart tasks significantly improved the model's performance on text-based tasks, suggesting that the model develops a deeper internal representation of how code structures relate to visual motion.
  • The 8:2 Ratio: Ablation studies revealed that a reward ratio of 80% code-based and 20% video-based feedback yielded the best results across all metrics.

Key Results

The resulting model, Qwen2.5-VL-DCG-3B, achieved impressive results:

  • Efficiency: Despite having only 3B parameters, it outperformed the 32B-parameter Qwen-coder-32B by 3.73% in execution rate.
  • Performance Gain: It beat the best open-source MLLMs with an average 8.31% performance gain across the three benchmark tasks.
  • Generalization: As shown in Figure 4, the JCV-GRPO training allowed the model to maintain steady improvement across all metrics (Execute Rate, Code Score, and Video Score) without the performance degradation seen in standard SFT.
Comparison showing JCV-GRPO's superior generalization compared to SFT across different metrics.

Limitations and Future Work

While the model punches above its weight, the authors note a few areas for improvement:

  • Backbone Choice: Error analysis (Figure 6) suggests that using a dedicated CodeLLM as the backbone (rather than a general MLLM) might further reduce syntax and reference errors.
  • Proprietary Gap: There is still a performance gap compared to the largest proprietary models (like GPT-4o or Claude 3.7), particularly in handling highly condensed "simple" instructions.
  • Future Directions: The authors suggest exploring agentic systems that can iteratively self-correct code based on visual feedback during the generation process.

Summary updated

BibTeX
@inproceedings{li2026opusanimation,
  author = {Bozheng Li and Miao Yang and Zhenhan Chen and Jiawang Cao and Mushui Liu and Yi Lu and Yongliang Wu and Bin Zhang and Yangguang Ji and Licheng Tang and Jay Wu and Wenbo Zhu},
  title = {{Opusanimation: Code-based dynamic chart generation}},
  booktitle = {COLM},
  year = {2026},
  url = {https://openreview.net/forum?id=pmjnOwPiyf},
}
Figure