SGA: Plug&Play Geometric Verification for Educational Video Synthesis

2026-07-20Artificial Intelligence

Artificial IntelligenceComputer Vision and Pattern RecognitionGraphicsMultiagent SystemsMultimedia
AI summary

The authors address a problem where code generated by large language models (LLMs) for creating educational animations can have spatial issues, like objects overlapping incorrectly. They introduce the Symbolic Geometric Agent (SGA), a tool that checks and fixes these spatial problems by analyzing parts of the animation code before it runs fully. They also created a way to measure how well the animations keep objects visually clear without needing to render the full animation, called the Manim Visual Quality Score (MVQS). Their tests show that using SGA improves the spatial quality of animations generated by different LLMs and pipelines.

Large Language ModelsPedagogical AnimationsManimSymbolic Scene GraphSpatial CorrectnessGeometric OcclusionManim Visual Quality ScoreCode2VideoAgentic Pipelines
Authors
Lopez Jhon, Hinojosa Carlos, Ghanem Bernard
Abstract
Recent work leverages Large Language Models (LLMs) to generate executable code for pedagogical animations using libraries such as Manim. However, ensuring spatial correctness and visual legibility remains challenging, as existing frameworks emphasize pedagogical content while overlooking geometric occlusions. We propose the Symbolic Geometric Agent (SGA), a plug-and-play module for code-centric animation pipelines that intercepts LLM-generated code, performs partial execution to extract symbolic scene graphs, and applies targeted refinement when spatial conflicts are detected. We further introduce the Manim Visual Quality Score (MVQS), a deterministic rendering-free proxy for spatial integrity. Experiments on the MMMC-Code benchmark across four LLM backbones and two agentic pipelines show that SGA achieves a peak MVQS of 73.11 (Code2Video + GPT-5.1), corresponding to a 16.1% relative improvement over the raw baseline, and improves MVQS in 7 of 8 backbone x pipeline configurations.