논문 해설
See Before You Code: Learning Visual Priors for Spatially Aware Educational Animation Generation
코드를 작성하기 전에 보기: 공간 인식 교육용 애니메이션 생성을 위한 시각적 사전 지식 학습
- 연구 문제 LLM이 만든 Manim 코드는 실행되어도 겹침과 애니메이션 연속성 결함이 남으며, 이는 렌더링 후에만 드러납니다.
- 연구 방법 OmniManim은 공유 장면 상태와 Vision Agent의 희소 키프레임 경계 상자 예측, 보간 인식 항, 렌더 진단 기반 국소 수정을 결합합니다.
- 주요 결과 EduRequire-500 주요 비교에서 OmniManim은 render@final과 Overlap 등에서 강한 결과를 보이며, 절제 실험은 Vision Agent 제거 시 시각 지표가 크게 떨어짐을 보여 줍니다.
코드는 실행되어도 렌더 결과가 깨질 수 있습니다
LLM이 생성한 Manim 코드는 실행 자체는 성공해도 요소 겹침, 정렬 어긋남, 애니메이션 연속성 붕괴 같은 렌더 결과의 결함을 자주 보입니다. 이 결함은 코드만 읽어서는 안정적으로 찾기 어렵고 실제로 렌더링한 뒤에야 드러납니다. 저자들은 이 문제를 렌더 피드백을 고려한 제약 코드 생성으로 정식화합니다. 즉 자연어 요구를 받아, 렌더링 후에만 평가할 수 있는 구조화된 품질 기준을 만족하는 실행 가능한 코드를 생성하는 것이 목표입니다.

Figure 1 : Common render-time failure modes in LLM-generated educational animations. Although the generated code is executable, the rendered outputs still exhibit viewport overflow, element overlap, remnant content from previous frames, and scale mismatch. These defects are difficult to detect from code alone and motivate our render-feedback-aware formulation.
원문 · CC BY 4.0 · Yuejia Li, Ke He, Junheng Li, Shutong Chen, Jingkang Xia, Zhiyue Su, Junchi Zhang, Mang Ye · See Before You Code: Learning Visual Priors for Spatially Aware Educational Animation Generation · 원문 그림 인용 · 원본 PDF 2쪽에서 그림 영역을 추출했습니다.이 논문이 다루는 핵심 어려움은 기호적 추론과 세밀한 공간 배치 계획을 함께 요구한다는 점입니다. 저자들은 LLM이 전자에는 비교적 능하지만 후자에는 신뢰하기 어렵다고 설명합니다. 다중 에이전트 구조도 레이아웃 결정을 여전히 언어 모델에 맡기므로 이 간극을 해소하지 못한다고 주장합니다.
Vision Agent는 희소 키프레임의 경계 상자를 예측합니다
OmniManim은 장면 파싱, Vision Agent의 레이아웃 예측, Code Agent의 코드 생성, Repair Agent의 렌더 진단과 국소 수정으로 구성됩니다. 핵심은 Vision Agent가 코드 생성 전에 객체별 정규화 경계 상자를 희소 키프레임마다 명시적으로 제공하는 것입니다. Vision Agent는 먼저 장면 상태를 객체 토큰으로 인코딩하고, 제목·도형·수식·주석 같은 주요 의미 영역을 나타내는 거친 공간 사전 분포를 예측합니다.

Figure 2 : Overview of OmniManim. The system maintains a shared scene state across four coupled agents: Scene Agent, Vision Agent, Code Agent, and Repair Agent. The Vision Agent predicts keyframe layouts, the Code Agent converts them into executable Manim code, and the Repair Agent uses render diagnostics to refine the result.
원문 · CC BY 4.0 · Yuejia Li, Ke He, Junheng Li, Shutong Chen, Jingkang Xia, Zhiyue Su, Junchi Zhang, Mang Ye · See Before You Code: Learning Visual Priors for Spatially Aware Educational Animation Generation · 원문 그림 인용 · 원본 PDF 4쪽에서 그림 영역을 추출했습니다.이어서 잡음이 섞인 상자에서 시작해 정규화된 경계 상자 공간에서 반복 잡음 제거를 수행합니다. 각 단계는 현재 상자, 객체 토큰, 공간 사전 분포를 조건으로 상자 갱신량을 예측하고, 결과를 0과 1 사이로 자르는 clamp를 적용합니다. 저자들은 교육용 레이아웃이 객체 사이의 관계에 강하게 의존하므로 단일 단계 회귀보다 공동으로 해결하는 반복 방식이 적합하다고 설명합니다.
보간 인식 항은 인접 키프레임 사이의 중간 충돌을 벌점으로 부과합니다
정적 레이아웃과 달리 교육용 애니메이션에서는 두 인접 키프레임이 각각 유효해도 그 사이 보간 프레임에서 겹침이나 관계 위반이 생길 수 있습니다. 이를 줄이기 위해 저자들은 인접한 두 키프레임 k와 k+1 사이의 보간 연산 Π를 근사하고, 시간 단계 집합 U에서 보간된 상자를 만듭니다. 그런 다음 끝점에서는 유효하지만 보간 중 충돌하는 객체 쌍에 벌점을 줍니다.
이 항은 max(0, IoU(b̃_i(u), b̃_j(u)) − τ_coll)의 합으로 정의되며, 객체 쌍은 i와 j가 다른 경우에 대해 더해집니다. 최종 목적은 L = L_diff + λ1 L_box + λ2 L_coll + λ3 L_rel + λ4 L_bound + λ5 L_interp입니다. 원문 구현에서 U는 0.25, 0.50, 0.75로 설정되며, 가중치는 λ1=2, λ2=5, λ3=3, λ4=3, λ5=2로 고정됩니다.
두 데이터셋과 평가 프로토콜은 학습과 측정을 분리합니다
저자들은 학습용 ManimLayout-1K와 평가용 EduRequire-500을 새로 구축했습니다. ManimLayout-1K는 GitHub와 튜토리얼 사이트의 Manim 애니메이션 1,000개에서 렌더링 정확성과 시각 품질을 기준으로 골라 키프레임 단위 장면-레이아웃 쌍 22,579개를 추출한 데이터셋입니다. EduRequire-500은 학습 출처와 분리해 전문가가 독립적으로 작성한 500개 과제의 벤치마크입니다.

Table 7 : Representative EduRequire-500 task examples. Requirements are taken from the benchmark; visual elements and difficulty labels summarize the expected animation structure for descriptive analysis.
원문 · CC BY 4.0 · Yuejia Li, Ke He, Junheng Li, Shutong Chen, Jingkang Xia, Zhiyue Su, Junchi Zhang, Mang Ye · See Before You Code: Learning Visual Priors for Spatially Aware Educational Animation Generation · 원문 그림 인용 · 원본 PDF 16쪽에서 그림 영역을 추출했습니다.평가는 실행 가능성, 교육적 품질, 시각 품질, 효율을 함께 봅니다. CV 기반 지표는 렌더링된 프레임에서 겹침, 레이아웃 품질, 애니메이션 연속성, 시각 일관성을 측정합니다. 내용 정확성, 교육적 명료성, 참여도는 Claude Opus 4.6을 평가자로 쓰는 다단계 VLM 판단으로 보조 검사와 함께 측정했다고 원문은 설명합니다.

Table 1 : Definition of the main evaluation metrics
원문 · CC BY 4.0 · Yuejia Li, Ke He, Junheng Li, Shutong Chen, Jingkang Xia, Zhiyue Su, Junchi Zhang, Mang Ye · See Before You Code: Learning Visual Priors for Spatially Aware Educational Animation Generation · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.EduRequire-500 주요 비교에서 OmniManim은 렌더링과 겹침 지표에서 강한 결과를 보입니다
EduRequire-500 주요 비교에서 각 요구사항은 다섯 번 실행하고 방법별 평균을 보고합니다. 모든 방법은 초기 생성 뒤 최대 한 번의 수정 라운드만 허용됩니다. 이 조건에서 OmniManim은 렌더링 성공률 지표 render@final과 겹침 지표 Overlap에서 가장 뚜렷한 우위를 보였습니다.

Table 2 : Main comparison results on our EduRequire-500 benchmark. Higher is better except for Tok and Time. See Table 1 for metric definitions. Subscripts on multi-agent methods indicate the base language model used within the pipeline.
원문 · CC BY 4.0 · Yuejia Li, Ke He, Junheng Li, Shutong Chen, Jingkang Xia, Zhiyue Su, Junchi Zhang, Mang Ye · See Before You Code: Learning Visual Priors for Spatially Aware Educational Animation Generation · 원문 그림 인용 · 원본 PDF 7쪽에서 그림 영역을 추출했습니다.Code2Video는 가장 강한 비-Omni 다중 에이전트 기준선이지만 주요 시각 지표에서는 OmniManim에 뒤집니다. 토큰 사용량은 OmniManim이 더 많다고 원문이 보고하며, 저자들은 다단계 계획과 검증·수정 구조 때문이라고 해석합니다. 벽시계 시간은 Vision Agent 추론과 LLM 생성을 부분적으로 병렬화하여 경쟁력을 유지한다고 설명합니다.

Figure 3 : Qualitative comparison between OmniManim and Code2Video on diverse educational animation tasks. Top: OmniManim produces more coherent spatial organization and preserves clearer structural relations across different subjects. Bottom: Code2Video often generates locally plausible frames but suffers from fragmented layouts, misalignment, and missing or weakened relational structures, as highlighted in red.
원문 · CC BY 4.0 · Yuejia Li, Ke He, Junheng Li, Shutong Chen, Jingkang Xia, Zhiyue Su, Junchi Zhang, Mang Ye · See Before You Code: Learning Visual Priors for Spatially Aware Educational Animation Generation · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.인간 평가는 공간 품질 차원의 개선을 확인합니다
인간 평가는 EduRequire-500의 층화 추출된 60개 과제에서 20명의 학부 평가자가 수행했습니다. 각 과제에 대해 OmniManim, GPT-5.4, Code2Video의 결과를 네 명이 독립적으로 일곱 차원에서 0부터 100 사이로 채점했습니다. 전체 평균은 OmniManim 81.0, Code2Video 68.4, GPT-5.4 76.0으로 보고됩니다.

Table 3 : Human evaluation on 60 tasks from EduRequire-500. Each task-method pair is rated by four independent raters. Scores are means on a 0–100 scale (higher is better); ∆ denotes OmniManim minus the corresponding baseline after task-level aggregation; p-values are from paired Wilcoxon signed-rank tests over task-level means ( N= 60 ). ∗∗∗p <10 −3, ∗∗p <10 −2, ∗p <0.05 . Full protocol and extended results are provided in the supplementary material.
원문 · CC BY 4.0 · Yuejia Li, Ke He, Junheng Li, Shutong Chen, Jingkang Xia, Zhiyue Su, Junchi Zhang, Mang Ye · See Before You Code: Learning Visual Priors for Spatially Aware Educational Animation Generation · 원문 그림 인용 · 원본 PDF 8쪽에서 그림 영역을 추출했습니다.특히 OV와 LQ 차원에서 Code2Video 대비 차이가 컸습니다. 원문은 OmniManim과 Code2Video의 OV 차이를 +32.1, LQ 차이를 +21.4로 보고합니다. 다만 AC와 VC는 최강 기준선과 비슷한 수준이라고 설명합니다. 원문은 다중 비교 보정을 하지 않았다고 명시하므로 p값은 그 조건에서 읽어야 합니다.
절제 실험은 Vision Agent와 보간 인식 항의 기여를 분리합니다
절제 실험은 Vision Agent를 제거한 설정, Stage 1만 쓰는 설정, Stage 2만 쓰는 설정, λ5=0으로 보간 인식 목적을 제거한 설정을 완전 모델과 비교합니다. 평가 지표는 OV, LQ, AC, VC입니다. Vision Agent를 제거하면 모든 시각 지표에서 가장 큰 하락이 나타납니다. 예를 들어 OV는 0.763에서 0.491로 떨어집니다.

Table 4 : Ablation of the Vision Agent and the interpolation-aware objective on EduRequire-500. We report the visual metrics that are directly aligned with the main evaluation. Higher is better for all metrics. Delta values in parentheses indicate changes relative to the full model.
원문 · CC BY 4.0 · Yuejia Li, Ke He, Junheng Li, Shutong Chen, Jingkang Xia, Zhiyue Su, Junchi Zhang, Mang Ye · See Before You Code: Learning Visual Priors for Spatially Aware Educational Animation Generation · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.
Figure 4 : Qualitative comparison of the ablation variants of the Vision Agent. Top row: predicted object layouts with object-level diagnostics. Bottom row: corresponding rendered frames. From (a) to (e), spatial organization becomes progressively cleaner and more stable as more components and constraints of the full design are included.
원문 · CC BY 4.0 · Yuejia Li, Ke He, Junheng Li, Shutong Chen, Jingkang Xia, Zhiyue Su, Junchi Zhang, Mang Ye · See Before You Code: Learning Visual Priors for Spatially Aware Educational Animation Generation · 원문 그림 인용 · 원본 PDF 9쪽에서 그림 영역을 추출했습니다.보간 인식 항을 제거하면 OV는 0.763에서 0.734로, AC는 0.802에서 0.750으로 낮아집니다. 이 결과는 해당 설정에서 보간 인식 최적화가 연속성 지표에 기여함을 보여 줍니다. 다만 이 절제 결과는 EduRequire-500의 주어진 설정과 가중치에서 얻은 것이므로 다른 데이터셋이나 과제로 바로 일반화할 수 없습니다.
CV 지표와 적용 범위는 교육적 판단을 대체하지 않습니다
저자들은 CV 지표가 반복적인 렌더 수준 실패, 즉 공간 충돌, 국소 과밀, 불안정한 움직임, 급격한 시각 불일치를 측정하도록 설계되었다고 밝힙니다. 따라서 교육학, 사실 정확성, 미적 스타일에 대한 전문가 판단을 대신하지 않는다고 원문에 명시되어 있습니다.
또한 OmniManim은 코드 중심의 Manim 애니메이션을 위해 설계되었으며, 개방형 비디오 생성이나 고도로 양식화된 제작 환경에서의 동작은 다를 수 있습니다. Vision Agent는 객체 경계 상자 수준에서 작동하므로 타이포그래피, 세밀한 그래픽 디자인, 카메라 효과는 충분히 모델링하지 않는다고 설명합니다.
논문 정보
- 저자
- Yuejia Li, Ke He, Junheng Li, Shutong Chen, Jingkang Xia, Zhiyue Su, Junchi Zhang, Mang Ye
- 학회·저널
- arXiv · 프리프린트
- 최초 공개일
- 2026년 5월 15일
- 등록일
- 2026년 11월 4일
- 수정일
- 2026년 5월 15일
- 버전
- v1
- arXiv
- 2605.15585
- 분류
- cs.AI · cs.CV
- 원문 이용 조건
- CC BY 4.0
- 제공 범위
- 논문 정보, 해설, 허용된 원문 그림
AI 해설은 논문 원문과 별개의 설명이며 오류가 있을 수 있습니다. 원문과 그림은 각 출처의 이용 조건과 따로 표시된 권리를 따릅니다.
초록
Large language models can generate executable code for educational animations, but the resulting renders often exhibit visual defects, including element overlap, misalignment, and broken animation continuity. These defects cannot be reliably detected from the code alone and become apparent only after execution. We formalize this problem as render-feedback-aware constrained code generation: given a natural language specification, the model must generate executable code whose rendered output satisfies structured quality criteria that can be evaluated only after rendering. To address this problem, we introduce OmniManim, a render-feedback-aware educational animation generation framework built around a shared scene state, explicit visual planning, structured post-render diagnostics, and localized repair. Within OmniManim, the Vision Agent is a task-specific visual planning module: it predicts sparse keyframe layouts with coarse-to-fine bounding-box denoising and optimizes an interpolation-aware objective to reduce intermediate-frame failures induced by downstream animation interpolation. We further construct two datasets, ManimLayout-1K and EduRequire-500, and provide a reproducible evaluation protocol covering executability, instructional quality, visual quality, and efficiency. On EduRequire-500, OmniManim improves measured render quality over both single-model baselines and existing multi-agent frameworks. Systematic ablation studies further verify that explicit visual planning, especially its coarse spatial prior, bounding-box refinement, and interpolation-aware optimization, is central to these gains.
원문 인용
Yuejia Li, Ke He, Junheng Li, Shutong Chen, Jingkang Xia, Zhiyue Su, Junchi Zhang, Mang Ye (2026). See Before You Code: Learning Visual Priors for Spatially Aware Educational Animation Generation. arXiv:2605.15585v1. https://arxiv.org/abs/2605.15585v1
BibTeX
@misc{li2026before,
title = {{See Before You Code: Learning Visual Priors for Spatially Aware Educational Animation Generation}},
author = {Yuejia Li and Ke He and Junheng Li and Shutong Chen and Jingkang Xia and Zhiyue Su and Junchi Zhang and Mang Ye},
year = {2026},
eprint = {2605.15585},
archivePrefix = {arXiv},
url = {https://arxiv.org/abs/2605.15585v1}
}