# Animation2Code: Evaluating Temporal Visual Reasoning in Video-to-Code Generation

*Anya Ji, Abhijith Varma Mudunuri, David Chan, Alane Suhr*

[NeurIPS page](https://neurips.cc/virtual/2026/poster/138932) · [Open on the map](../papers.html#p138932)

Category: [Multimodal, Audio & Medical Reasoning](../pcat/1.md) › [Video World Reasoning Benchmarks](../pgroup/452.md) · Type: benchmark or dataset · Keywords: video-to-code generation, temporal visual reasoning, benchmark dataset, animation evaluation, human-aligned metrics, web animation

Areas: [Multimodal](../areas/multimodal.md) › Multimodal Visual Reasoning › Video Generation Benchmarks; [Evaluation & Benchmarks](../areas/evaluation.md) › Multimodal System Benchmarks › Physical Consistency Evaluation; [Benchmarks for LLMs & Agents](../areas/bench-llm-agents.md) › Embodied Agent Benchmarks › Spatial Reasoning; [Benchmarks for Vision, Video & Multimodal](../areas/bench-multimodal.md) › Multimodal Capability Benchmarks › Video Generation Benchmarks

## Summary
Animation2Code introduces a benchmark and task for evaluating temporal visual reasoning in video-to-code generation, revealing that current models struggle with temporal consistency even when achieving high appearance similarity.

## Explained to a 5-year-old
We made a bunch of videos that show moving pictures like cartoons. We want computers to look at those videos and write code that can make the same animations appear on a webpage. We also made a new way to check if the computer’s code moves the pictures at the right times. When we tested the best computer programs, they could make the pictures look right but often moved them at the wrong moments. This helps us know where computers need to get better at understanding how things change over time.

## Explained to a 5-year-old, longer
We have a collection of videos that show animations, like a ball bouncing or a character walking. These videos come with the exact code that makes the animations work on a webpage. The goal is to teach computers to read the videos and automatically write similar code. To do this, we created a new test called the animation-to-code task. This test includes many different kinds of animations, so it covers a lot of possible situations. We also built special scores that tell us if the computer’s code looks like the original animation and if it moves at the right times. The scores separate two ideas: how similar the pictures look and how well the timing matches. When we tried the best computer models on this test, they did well at making the pictures look similar. However, they often failed to keep the actions happening in the correct order over time. Even when we tried to improve the models by fine-tuning them, the timing problems stayed. This shows that current computers still struggle with understanding how things change as time goes on. The new benchmark and metrics give us a clear way to see where future models need to get better.

## For a technical reader
The paper introduces Animation2Code, a benchmark that pairs web animation videos with their HTML/CSS/JavaScript implementations. It defines a new task-animating code generation-where models must produce code that renders temporally coherent animations. The authors provide human-aligned metrics to separately assess visual fidelity and temporal alignment, enabling precise evaluation. Empirical results show that state-of-the-art models excel at visual similarity but fall short on temporal consistency, even after fine-tuning. This benchmark and its evaluation suite are publicly available for further research.

## Problem
Existing visual-to-code models focus on static images and lack the ability to generate code that correctly captures motion and temporal dynamics in animated content.

## Method
We create a benchmark dataset of video-animation pairs with HTML/CSS/JavaScript code and introduce human-aligned metrics that separate visual similarity from temporal alignment, then evaluate existing models on this benchmark.

## Results
The approach shows that existing models achieve high visual similarity but exhibit poor temporal consistency on animated video-to-code tasks, even after fine-tuning.

## Contributions
We introduce the animation-to-code task, a benchmark dataset of web animation videos with code, and human-aligned metrics to evaluate temporal reasoning, revealing limitations of current models.

## Practical relevance
It provides a public benchmark dashboard to evaluate and improve video-to-code models for dynamic web animations.

## Research questions this paper is counted under

- [How can video generation models be made to produce physically plausible and consistent motion?](../q/9.md)

This page was written by language models from the title and abstract of each paper, and the answers were checked by two other models. It can be wrong: check the paper itself. [Suggest a correction](../feedback/?on=p/138932)
