PRISM: A Benchmark for Long-Horizon Programmatic Spatial Reasoning
Qiran Zhang ⋅ Yuheng Wang ⋅ Runde Yang ⋅ Lin Wu ⋅ Jingru Fan ⋅ Shu Yao ⋅ Jie Zhang ⋅ Tianle Zhou ⋅ Huatao Li ⋅ Ruijie Shi ⋅ Yihan Li ⋅ Chen Qian
Abstract
Programmatic video generation through code offers geometric precision and temporal coherence beyond pixel-level diffusion models, yet rigorously evaluating whether language models can maintain spatially correct layouts throughout evolving animation sequences remains an open problem. We introduce **PRISM**, a large-scale benchmark for long-horizon programmatic spatial reasoning comprising 10,372 human-calibrated instruction-code pairs ($20\times$ larger than prior programmatic video generation benchmarks), grounded in real-world knowledge visualization scenarios across English and Chinese and spanning 437 subject categories. We further propose a funnel-style evaluation framework with four complementary metrics: *Code-Level Reliability* for executability, *Spatial Reasoning* for layout correctness over full animation sequences, and *Prompt-Aware Dynamic Visual Complexity* (PADVC) and *Temporal Density* (TD) for diagnosing dynamic expression and temporal activity. Systematic evaluation of seven mainstream LLMs reveals a striking *Execution-Spatial Gap*: the average drop from execution success rate to spatial pass rate is approximately 41 percentage points, showing that runnable code does not necessarily yield spatially coherent visual output. These findings motivate evaluation beyond executability and establish PRISM as a benchmark for spatially coherent code generation.
Successful Page Load