betaFeedback

WorksComputer Science

ReVAgent: Multi-Agent Reasoning-Intensive Video Generation

Abstract

A central challenge in generating instructional videos for reasoning-intensive topics is to show how and why the state changes at each step. Even when an animation renders successfully, the depicted object relationships and state transitions can conflict with the explanation, making the reasoning difficult to follow. We present ReVAgent, a multi-agent framework that solves a problem, generates keyframes for its explanation, and synthesizes an instructional video. The agents share the execution record of a solution program, reuse intermediate results and constructions in the scenes, and check rendered keyframes to guide revisions to the solution or the scenes. We also introduce a multidimensional rubric for assessing whether generated videos present the problem clearly, organize the steps coherently, and use visuals to explain the reasoning. We calibrate a multimodal judge using human ratings and apply it to instructional videos for mathematics and algorithms. In the evaluated samples, ReVAgent presents multi-step reasoning coherently and uses diagrams to show how key operations lead to subsequent states.

Introduction

Video generation has advanced rapidly in recent years, yet generating reasoning-intensive videos remains challenging. For example, generating logically coherent educational videos for mathematics and algorithms requires turning solution steps and their rationale into visual explanations that help learners understand how a solution is reached step by step. Let’s consider Kruskal’s minimum spanning tree algorithm. At each step, the video should preserve the input graph and edge weights, distinguish accepted edges, and show a new edge being accepted only if it joins two different components. Such logical coherence requires each scene’s quantities, symbols, and object relations to match the corresponding solution step, and changes between scenes to reflect the computations, constructions, or algorithmic operations being explained.

On one hand, general-purpose video generation models [1, 2] can synthesize coherent videos from text or reference images. In videos that teach mathematics or algorithms, however, numbers, operators, and geometric relations carry information about the solution, so an error in a single visual element can change the meaning of the explanation. As Figure 1(a) illustrates, even with reference images for the first and last frames, video generation models [3] can omit mathematical symbols or deform objects in intermediate frames. Such errors can cause the visuals to diverge from the corresponding solution steps, making it difficult for these models to reliably depict multi-step reasoning in instructional videos.

Figure 1. Approaches and challenges in logically coherent educational video generation. (a) Conventional video generation models synthesize frames directly and can omit symbols or distort objects in intermediate frames. (b) Code-driven agents control visuals through animation scripts, but the rendered relations between objects can conflict with the explanation even when the scripts execute successfully. (c) ReVAgent uses a three-stage pipeline from a textual solution to keyframes and then to video. Its agents reuse solution outputs to construct scenes, check the resulting keyframes, and provide feedback for revision to align formulas, graphics, and their changes with the solution steps.

On the other hand, code-driven approaches offer a promising way to keep symbols and graphics accurate throughout a solution while providing explicit control over what is shown and how it changes. These approaches provide this control through programmatic rendering [4], using animation tools such as Manim [5] to draw formulas and graphics from explicit specifications. Advances in large language models (LLMs) enable agents in Code2Video [6] and TheoremExplainAgent [7] to plan explanations and write executable animation scripts [8]. Even when scripts run successfully, rendered object relations may conflict with a solution step [7, 9]. In Figure 1(b), two trapezoids described as forming a parallelogram still leave a gap where they should meet. Even with a correct solution, agents must reimplement its object relations and state changes in animation code. This additional translation makes visual control dependent on code implementation, limiting how fully agents can use their reasoning to organize and adapt visual explanations.

To advance reasoning-intensive video generation with logically coherent visual explanations, we propose ReVAgent, a multi-agent framework for logically coherent educational video generation. ReVAgent stores the intermediate states and mathematical constructions produced by the solution program in a shared record and uses them as the basis for scene construction (Figure 1(c)). The visual agent directly reuses these results to plan the explanation order, organize formulas and graphics, and choose what to highlight, reducing the need to reimplement mathematical relations in animation code. A unified renderer converts scene specifications into video, providing explicit control over symbols, graphics, and their changes. The verification agent checks the rendered keyframes against the original problem and solution record to assess their agreement with the corresponding reasoning steps, and routes detected issues to the responsible agent for revision. Figure 2 shows selected frames from ReVAgent videos on the shoelace formula and Kruskal’s algorithm.

Selected frames from ReVAgent videos

Figure 2. Selected frames from ReVAgent videos. (a) In the shoelace-formula video, the vertex coordinates are preserved and the edge used in the current calculation is highlighted. (b) The Kruskal video highlights the edge that merges two components and shows the final minimum spanning tree with its total weight.

We evaluate ReVAgent on mathematical and algorithmic tasks by comparing it with state-of-the-art general-purpose and code-driven video generation methods. On the reported video subsets, ReVAgent obtains competitive scores on video quality and semantic metrics and ranks highest among the compared generation methods on all six instructional dimensions assessed by the human-calibrated judge. Our main contributions are as follows.

  1. Staged, controllable generation for reasoning-intensive videos. We propose a staged framework from solutions through keyframes to video. Structured scene specifications and a unified renderer explicitly control formulas, graphics, and their changes at each solution step, reducing symbol omissions and object distortions

in direct video synthesis.

  1. Reasoning-visual coordination through shared solution records. Shared solution records connect solving, scene planning, and frame verification. The visual agent directly reuses computed results and geometric constructions, reducing the need to reimplement mathematical relations in animation code. Frame verification routes detected issues to the responsible agents for revision, improving consistency between visuals and solution steps.

  1. Multidimensional instructional evaluation. We define criteria including step coherence, reasoning clarity, and visual helpfulness, and calibrate a multimodal judge with human ratings.

Related Work

General-purpose video generation. Large-scale video generation models have extended synthesis to longer clips and multi-shot sequences [10, 11, 12], with text or reference images guiding the output [13, 14]. Sora [15] demonstrates generation across a range of durations, resolutions, and aspect ratios, and Seedance 1.0 [1] supports multi-shot generation from text or images. Open-weight models such as Wan [2] and CogVideoX [16] provide publicly available implementations for comparative study [17, 18]. Mathematical and algorithmic instruction also requires that formulas, relations between depicted objects, and state changes across scenes agree with the corresponding solution steps. This requirement motivates code-driven approaches that specify visual elements and their changes explicitly [6].

Code-driven educational video generation. Animation libraries such as Manim [5] let authors write scripts that specify the layout, transformations, and timing of formulas and graphics. As large language models (LLMs) gained the ability to write these scripts from instructional content, agent-based systems began to divide the work into planning, code generation, and revision after rendering. TheoremExplainAgent [7] plans theorem explanations and implements them as Manim animations. Code2Video [6] turns lecture content into storyboards and uses visual feedback to refine the rendered layout. VisualEDU [19] uses code and visual feedback to generate step-by-step explanations of mathematical problems. LASEV [20] coordinates solution, illustration, and narration agents, with the illustration agent generating code from a reviewed textual solution. For algorithm visualization, ALGOGEN [21] renders execution traces emitted by generated trackers. SGA [9] extracts scene graphs from animation code to detect spatial conflicts. ReVAgent links instructional scenes to executed solution steps, directly reuses selected geometric constructions produced by the solver, and uses the same solution evidence to review the rendered keyframes.

Method

Problem Formulation and Overview

Given a problem qq, our goal is to generate an educational video VV whose explanations, formulas, and graphics follow the steps of its solution. The input qq includes the problem statement, its conditions and numerical data, and any provided diagrams or presentation requirements.

Figure 3 summarizes ReVAgent. In Problem Solving, a solver agent generates a program and executes it to obtain a solution record TT. In Visual Explanation, a visual agent uses TT to plan an ordered scene sequence SS, from which a fixed renderer produces keyframes II. In Video Synthesis, the renderer composes the scenes into a candidate video V~\tilde{V}.

Figure 3. ReVAgent framework illustrated with a circumcircle problem. (a) Given A(1,1)A(1,1), B(7,1)B(7,1), and C(3,5)C(3,5), the solver computes x=4x=4 and y=−12x+4y=-\frac{1}{2}x+4 as the perpendicular bisectors of ABAB and ACAC, respectively. They intersect at O=(4,2)O=(4,2), with OA2=OB2=OC2=10OA^2=OB^2=OC^2=10. The execution record T=(y,τ,W)T=(y,\tau,W) stores the answer y=(4,2,10)y=(4,2,10) and the constructions. (b) The visual agent reuses the stored bisectors and circle to illustrate how the circumcenter is found. (c) The renderer composes the scenes into a candidate video. (d) The verifier checks the rendered keyframes against the problem, execution record, and scene specifications before acceptance and routes defects for repair.

q→ExecAsolveT→RimageAvisual(S,I)→EncodeMV~.(1)q \xrightarrow[\mathrm{Exec}]{\mathcal{A}_{\mathrm{solve}}} T \xrightarrow[\mathcal{R}_{\mathrm{image}}]{\mathcal{A}_{\mathrm{visual}}} (S,I) \xrightarrow[\mathrm{Encode}]{\mathcal{M}} \tilde{V}. \tag*{(1)}

The visual agent reuses computed graphics and coordinates; the verifier checks frames against the corresponding solution steps, enabling reasoning–visual alignment across agents. In Verification and Refinement, the verifier reviews each candidate’s keyframes II alongside qq, TT, and SS. A passing candidate becomes VV. When the verifier identifies defects, it sends them to the agent responsible for revision.

Executable Logical Reasoning

The solver agent chooses a strategy for qq and expresses it as a program PP. The executor runs PP on the numerical data supplied in qq and collects the returned solution record TT.

P=Asolve(q),T=(y,τ,W)=Exec⁡(P;q).(2)P = \mathcal{A}_{\mathrm{solve}}(q), \qquad T = (y,\tau,W) = \operatorname{Exec}(P;q). \tag*{(2)}

The answer yy contains the requested quantities. The trace τ\tau records step identifiers, explanations, and intermediate computational states. The evidence WW stores computed checks and any geometric constructions returned by the program, including their coordinates and primitive parameters. The visual agent can reuse these constructions directly. The verifier verifier assesses the mathematical validity of the answer, step claims, and constructions against qq.

Reasoning-Grounded Visual Planning

The visual agent organizes the explanation into an ordered sequence S=(s1,…,sK)S=(s_1,\ldots,s_K).

sk=(bk,ek,ϕk,Ok,Hk),Hk⊆Ok,(3)s_k=(b_k,e_k,\phi_k,O_k,H_k),\qquad H_k\subseteq O_k, \tag*{(3)}

Here, bkb_k identifies the corresponding step in τ\tau, eke_k and ϕk\phi_k specify the instructional text and formula, and OkO_k and HkH_k denote the visible and highlighted objects, respectively. The step identifier lets the verifier compare the scene with its corresponding computational state.

The visual agent can select constructions from the execution record and add explanatory objects.

Ok=Okexec∪Okgen,Okexec⊆O(W).(4)O_k=O_k^{\mathrm{exec}}\cup O_k^{\mathrm{gen}},\qquad O_k^{\mathrm{exec}}\subseteq O(W). \tag*{(4)}

Here, O(W)O(W) is the set of primitives stored in WW. The system resolves each construction reference by copying its primitives with their original coordinates and geometric parameters. The visual agent controls which objects are shown and highlighted, and the verifier also checks the newly generated objects. For each scene, the fixed renderer produces a keyframe Ik=Rimage(ek,ϕk,Ok,Hk)I_k=\mathcal{R}_{\mathrm{image}}(e_k,\phi_k,O_k,H_k), yielding I=(I1,…,IK)I=(I_1,\ldots,I_K).

Controlled Scene-to-Video Rendering

We use a custom scene renderer that draws graphics, instructional text, and formulas according to each scene specification and highlights the designated objects. It produces one keyframe per scene for verification and renders and encodes the video frames in scene order as an MP4 video.

At normalized time un∈[0,1]u_n\in[0,1], the update operator M\mathcal{M} applies predefined motion rules to supported dynamic primitives and leaves static primitives unchanged. The nn-th frame of scene kk is

Fk,n=Rimage(ek,ϕk,{M(o,un):o∈Ok},Hk).(5)F_{k,n}=\mathcal{R}_{\mathrm{image}}(e_k,\phi_k,\{\mathcal{M}(o,u_n):o\in O_k\},H_k). \tag*{(5)}

The renderer holds each scene on screen for reading and concatenates the resulting clips CkC_k in scene order. It encodes the candidate as V=Encode⁡(C1∥⋯∥CK)V=\operatorname{Encode}(C_1\Vert\cdots\Vert C_K). Encoding and decoding checks assess file validity. The verifier uses the associated rendered keyframes for content review.

Verification and Refinement

The verification agent receives the original problem, execution record, scene specifications, and all rendered keyframes.

(cm,cg,ct,E)=Averify(q,T,S,I).(6)(c_m,c_g,c_t,\mathcal{E})=\mathcal{A}_{\mathrm{verify}}(q,T,S,I). \tag*{(6)}

The agent assesses mathematical correctness (cmc_m), whether the rendered graphics depict the corresponding reasoning steps (cgc_g), and whether the student-facing text is readable (ctc_t). It records defects and their locations in E\mathcal{E}. Acceptance requires all three binary checks to pass and the issue list to be empty.

a=1[cm=cg=ct=1∧E=∅].(7)a=\mathbf{1}[c_m=c_g=c_t=1\land\mathcal{E}=\varnothing]. \tag*{(7)}

A single factual recheck may reassess the reasons for rejection using the same evidence, keyframes, and acceptance criterion.

On rejection, the system sends the reported issues and repair suggestions to the solver agent if cm=0c_m=0 and to the visual agent otherwise. Revising the solution regenerates TT and its dependent scenes, keyframes, and video. Revising the scenes retains TT and regenerates the visual outputs. The verifier reviews the regenerated keyframes. Execution, scene validation, and rendering failures return to the stage responsible for the failure.

The loop returns the first candidate that meets the review criteria and allows up to R=3R = 3 revisions. If no candidate passes within this budget, the system returns the candidate video that best meets the review criteria, together with its review status.

Evaluation

We use fixed automatic metrics to assess video quality and semantic relevance, and propose a multidimensional instructional evaluation rubric. Based on this rubric, we calibrate the prompt of a multimodal judge using human ratings to assess perceived instructional quality and viewers’ self-reported understanding.

Video Quality and Semantic Evaluation

We use imaging quality (IQ), aesthetic quality (AQ), motion smoothness (MS), and text–video similarity (CLIP-T) to assess the image quality, visual aesthetics, motion continuity, and task-related semantic relevance of generated videos.

IQ and AQ use the corresponding image-quality and aesthetic evaluation models from VBench [22]. For sampled frames {Fi}i=1K\{F_i\}_{i=1}^{K} from a video VV, the scores are defined as

IQ⁡(V)=1100K∑i=1KgIQ(Fi),\operatorname{IQ}(V) = \frac{1}{100K}\sum_{i=1}^{K} g_{\mathrm{IQ}}(F_i),
AQ⁡(V)=110K∑i=1KgAQ(Fi),(8)\operatorname{AQ}(V) = \frac{1}{10K}\sum_{i=1}^{K} g_{\mathrm{AQ}}(F_i), \tag*{(8)}

where gIQg_{\mathrm{IQ}} is the MUSIQ-SPAQ image-quality scorer and gAQg_{\mathrm{AQ}} is the aesthetic scorer based on CLIP image features.

MS measures motion smoothness by comparing an intermediate frame predicted from its neighboring frames with the observed frame:

MS⁡(V)=1−1255J∑j=1JMAE⁡(Mj,A(Lj,Rj)),(9)\operatorname{MS}(V) = 1 - \frac{1}{255J}\sum_{j=1}^{J}\operatorname{MAE}(M_j, A(L_j,R_j)), \tag*{(9)}

where (Lj,Mj,Rj)(L_j, M_j, R_j) is a consecutive frame triplet, AA denotes the AMT-S interpolation model, and MAE is the mean absolute pixel error.

CLIP-T measures semantic relevance through the similarity between video-frame and task-description features:

CLIP-T⁡(V,q)=1K∑i=1Kcos⁡(fimg(Fi),ftxt(q)),(10)\operatorname{CLIP\text{-}T}(V,q) = \frac{1}{K}\sum_{i=1}^{K}\cos(f_{\mathrm{img}}(F_i), f_{\mathrm{txt}}(q)), \tag*{(10)}

where qq is the task description, and fimgf_{\mathrm{img}} and ftxtf_{\mathrm{txt}} are the CLIP image and text encoders, respectively [23].

SplitHumanLLMMAE ↓Spearman ↑
Calibration90.3490.584.260.394
Validation88.8490.583.760.654
Test89.3290.804.480.640

Table 1. Multimodal judge agreement with human ratings. Scores and MAE use a 100-point scale.

In implementation, IQ, AQ, and CLIP-T use 32 uniformly sampled frames per video, while MS is computed on the original frame sequence; higher scores indicate better performance for all four metrics.

Human-Calibrated Instructional Evaluation

A human-calibrated multimodal judge evaluates videos from the learner’s perspective across six dimensions on a five-point scale. Legibility and problem clarity assess readable visual information and clear problem conditions and goals; visual helpfulness and self-reported understanding reflect how graphics support comprehension and viewers’ subjective understanding. Step coherence and reasoning clarity assess how solution steps connect and why key steps are taken, emphasizing clear, coherent presentation of the solution process and its rationale in reasoning-intensive videos. Human and judge scores are reported on a 100-point scale (×20).

The human evaluation set comprises 60 generated videos and ten online teaching videos, with 1,577 valid video-level rating records collected from 45 raters. All 45 raters were students taking a data structures and algorithms course. For video vv and dimension dd, we use the mean opinion score across raters [24] as the human evaluation target:

MOS⁡v,d=1nv,d∑i=1nv,dri,v,d,(11)\operatorname{MOS}_{v,d} = \frac{1}{n_{v,d}}\sum_{i=1}^{n_{v,d}} r_{i,v,d}, \tag*{(11)}

where ri,v,dr_{i,v,d} is the score assigned by rater ii, and nv,dn_{v,d} is the corresponding number of valid ratings.

To align the judge with the human rating scale, we partition the videos by problem family into 38 calibration samples, 12 development samples, and 20 held-out validation samples, with no problem family shared across the sets. Calibration refines the prompt using rubric descriptions, representative human-rated examples, domain statistics, and feedback on prediction errors. The final prompt and judge configuration are selected based on development-set performance. This process does not update model parameters.

The calibrated judge predicts the six human mean scores from the problem statement and video frames, and provides supporting visual evidence. Once frozen, the same judge is applied to videos from all methods and the online teaching references. In implementation, we uniformly sample 24 frames per video and use the same prompt and scoring rules.

Experiments

We evaluate ReVAgent on mathematical and algorithmic instructional video generation tasks. Combining video quality and semantic evaluation with human-calibrated instructional evaluation, we compare the instructional quality, visual quality, and semantic relevance of videos generated by different methods. We also use qualitative examples to analyze reasoning steps and visual explanations, and ablation studies to examine the roles of the solver, visual, and verification agents.

Experimental Setup

The planned comparison uses a shared set of 100 tasks, including 50 mathematical and 50 algorithmic tasks. We compare ReVAgent with four video generation models, Wan2.1-T2V 1.3B, Wan2.2-T2V 27B [26], MiniMax H3-33B, and LTX-2.5 22B [25], as well as Direct Manim, Code2Video, VisualEDU, and ManimAgent. Code-based methods and ReVAgent use Qwen3.8-27B and Qwen3.5-4B backbones. On shared tasks, methods receive the same problems, input data, and instructional requirements. The four text-to-video models use the same fixed 100 English-language tasks. All methods are evaluated with the same automatic metrics and frozen human-calibrated judge.

Video Quality and Semantic Comparison

Among the video samples reported in Table 2, the 27B ReVAgent configuration shows its largest lead over the baselines in aesthetic quality (AQ), scoring 0.578 and exceeding the strongest baseline, MiniMax H3-33B, by 0.181. ReVAgent also ranks first in task-related semantic relevance (CLIP-T), edging out Direct Manim, the strongest code-based baseline on this metric, by 0.002. Both methods use code to explicitly specify and render formulas, diagrams, and labels. This can help preserve task-specific content that direct pixel generation may distort or omit. The pixel-based baselines in the table obtain lower CLIP-T scores.

TypeMethodBackboneIQ ↑AQ ↑MS ↑CLIP-T ↑
Video generation modelsWan2.1-T2V 1.3B [2]—0.7140060.3093200.9875370.194899
Video generation modelsLTX-2.5 22B [25]—0.5121010.3372380.9918670.203191
Video generation modelsWan2.2-T2V 27B [26]—0.7004170.3520590.9931640.227803
Video generation modelsMiniMax H3-33B [27]—0.6208940.3970490.9933960.262174
Agent-based code generationDirect ManimQwen3.5-4B0.3504650.2804530.9975040.228532
Agent-based code generationDirect ManimQwen3.8-27B0.4109020.3654240.995869<u>0.271676</u>
Agent-based code generationCode2Video [6]Qwen3.5-4B0.2697080.3069690.9973560.223261
Agent-based code generationCode2Video [6]Qwen3.8-27B0.3497670.3530480.9983470.246425
Agent-based code generationVisualEDU [19]Qwen3.5-4B0.3840040.2675340.9962920.171941
Agent-based code generationVisualEDU [19]Qwen3.8-27B0.3788800.3673610.9952590.256650
Agent-based code generationManimAgent [28]Qwen3.5-4B0.3431520.3057050.9974200.239756
Agent-based code generationManimAgent [28]Qwen3.8-27B0.3653100.3511900.9973010.260913
Our methodReVAgentQwen3.5-4B0.619047<u>0.462111</u>0.9968610.233369
Our methodReVAgentQwen3.8-27B0.6917070.5778070.9969360.273723

Table 2. Video quality and semantic comparison. Higher is better; bold/<u>underline</u> mark best/second-best. Backbone denotes the generation LLM (—: not applicable).

Wan2.1 and Wan2.2 achieve the two highest imaging quality (IQ) scores, illustrating the advantage pixel-based generators can have in low-level frame quality. ReVAgent remains close to both, trailing them by only 0.022 and 0.009, respectively. On motion smoothness (MS), ReVAgent trails the best-scoring method, Code2Video, by only 0.0014. § 5.3 further examines formula legibility, the coherence of reasoning steps, and how well diagrams support the explanation.

Human-Calibrated Instructional Comparison

Table 3 shows that the 27B ReVAgent configuration achieves the highest scores across all six evaluation dimensions in the reported video subsets, with a six-dimensional average of 91.52. Its step coherence, reasoning clarity, and visual helpfulness scores reach 92.12, 88.40, and 90.10, exceeding Code2Video by 5.56, 5.92, and 5.86 points, respectively. These results indicate favorable organization of reasoning steps, presentation of supporting explanations, and correspondence between diagrams and instructional content within the evaluated samples.

TypeMethodBackboneLegibility ↑Problem Clarity ↑Step Coherence ↑Reasoning Clarity ↑Visual Helpfulness ↑Self-reported Understanding ↑
Video generation modelsWan2.1-T2V 1.3B [2]—25.6022.0421.8420.5422.6221.22
Video generation modelsLTX-2.5 22B [25]—38.3236.4230.4225.9831.1227.88
Video generation modelsWan2.2-T2V 27B [26]—49.7838.2837.4830.0439.4832.76
Video generation modelsMiniMax H3-33B [27]—55.6059.2249.0040.6647.3647.12
Agent-based code generationDirect ManimQwen3.5-4B76.3372.6758.3354.0056.0059.00
Agent-based code generationDirect ManimQwen3.8-27B89.9290.9086.7882.1083.5684.96
Agent-based code generationCode2Video [6]Qwen3.5-4B81.3385.3371.6769.2565.7572.33
Agent-based code generationCode2Video [6]Qwen3.8-27B90.7091.4086.5682.48<u>84.24</u>85.12
Agent-based code generationVisualEDU [19]Qwen3.5-4B84.0090.0076.0072.0068.0078.00
Agent-based code generationVisualEDU [19]Qwen3.8-27B89.4888.3283.0276.6080.5480.98
Agent-based code generationManimAgent [28]Qwen3.5-4B74.3871.2863.8359.8857.8563.45
Agent-based code generationManimAgent [28]Qwen3.8-27B90.6888.5083.0478.3081.6081.96
Our methodReVAgentQwen3.5-4B<u>93.62</u><u>92.15</u><u>89.23</u><u>86.15</u>82.31<u>87.62</u>
Our methodReVAgentQwen3.8-27B95.3293.6492.1288.4090.1089.56

Table 3. Human-calibrated instructional comparison. Frozen judge predictions on a 100-point scale. Higher is better; bold/<u>underline</u> mark best/second-best among generation methods.

Wan2.1 and Wan2.2 have the two highest reported IQ values and six-dimensional judge means of 22.30 and 37.98, respectively. MiniMax H3-33B and LTX-2.5 22B obtain six-dimensional means of 49.83 and 31.69, respectively, both well below ReVAgent’s 91.52.

Although some code-based baselines score close to ReVAgent on legibility and problem clarity, their rendered outputs still differ in how they position labels relative to diagrams and organize content on screen. The next section uses a common Heron’s formula task to examine how these differences affect the reader’s ability to follow the derivation.

Visualization Analysis

Figure 4 compares nine methods on the same Heron’s formula task at 95% video progress. The pixel-based text-to-video models exhibit errors in mathematical notation and geometry. Wan2.1 and Wan2.2 obtain the two highest imaging quality (IQ) scores, yet some text and numbers in the Wan2.1 frame are difficult to read, and Wan2.2 misspells the semiperimeter label and depicts a curved outline in place of the triangle. MiniMax H3-33B renders unrelated coordinate curves with malformed labels. LTX-2.5 22B shows two circular outlines and an incomplete list of side lengths. These errors make it difficult to connect the visuals to the problem statement and the calculation steps.

Comparison of visualization results

Figure 4. Comparison of visualization results. All nine methods address the same Heron’s formula task with side lengths 3, 4, and 5. The panels show full frames at 95% of each video. Panels (a–d) show video generation models, (e–h) show code-based baselines, and (i) shows ReVAgent.

The code-based baselines show the correct area, but some labels and layouts make the frames harder to read. Code2Video places the side lengths near the vertices, leaving viewers to infer which length belongs to each edge. Direct Manim has overlapping titles, while VisualEDU places some labels away from the corresponding diagram elements, displays low-contrast formulas, and clips content at the bottom of the frame. For beginners, these issues make it harder to interpret the labels and follow the derivation, reducing the videos’ suitability as standalone teaching material for a wider audience.

ReVAgent presents the explanation and diagram in separate areas of the frame and retains the original triangle, all three side labels, the semiperimeter, and the area in the final view. The differences in layout, contrast, and label placement are consistent with the aesthetic quality (AQ) results in § 5.2, where ReVAgent scores 0.578 and the best code-based baseline scores 0.367.

Generation Efficiency

We measure generation efficiency as generation time per minute of output video, computed by dividing total generation time by total actual playback duration. Timing covers inference, rendering or encoding, and the method’s own revisions. ReVAgent takes 5.42 minutes per minute of video, compared with 19.92 minutes for Direct Manim, or about 27% of its time. VisualEDU and ManimAgent take 92.56 and 48.18 minutes, respectively. ReVAgent has a lower generation time per minute of video than all four Manim baselines (Figure 5(b)). Our method reuses a fixed renderer and organizes execution results into structured scenes, avoiding the need to generate and debug a complete animation program for each problem. LTX-2.5 22B takes 5.32 minutes per minute of video, while its six instructional quality scores range from 25.98 to 38.32, with low step coherence and reasoning clarity.

Figure 5. Agent ablations and generation time. (a) Six-dimensional quality scores with Qwen3.5-4B. (b) Generation time analysis.

The qualitative analysis and quality evaluation show that longer generation time does not necessarily lead to better instructional presentation. Wan2.2 and MiniMax H3-33B take longer to generate videos than ReVAgent, yet their videos still exhibit errors in mathematical notation and diagrams that deviate from the problem. LTX-2.5 22B is slightly faster, but its low step coherence and reasoning clarity indicate that fast visual generation alone is insufficient for a clear instructional explanation. ReVAgent achieves higher instructional quality scores while maintaining a low generation cost, providing a better balance between generation efficiency and instructional quality.

Agent Ablations

We ablate four agents on the same 20 tasks with Qwen3.5-4B (Figure 5(a)). Fixed reference solutions replace the solver; Qwen-Image generates keyframes from the problem and steps; RIFE interpolates the original keyframes; and removing the reviewer disables visual review and feedback. Full leads all six dimensions. Removing the solver and reviewer lowers reasoning clarity by 57.2% and 46.8%, respectively. Replacing the keyframe agent lowers legibility by 30.3%. RIFE retains 91.7 legibility but 38.4% lower self-reported understanding, suggesting that smooth interpolation alone cannot preserve reasoning continuity.

To examine errors introduced when correct solutions become instructional graphics, we use 20 verified programmatic solutions and their per-step construction coordinates in a separate controlled study with Qwen3.5-4B, without review. Reuse and rewriting receive identical data; construction catalogs are shuffled. Direct use omits fewer input labels and reduces output tokens by 65.3% (Table 4). Removing construction–step links or supplying only the final answer and input figure makes intermediate stages less consistent. These results support our cross-agent reasoning–visual alignment: reusing the solver’s constructions at the corresponding explanation steps reduces omissions and stage mismatches. This criterion directly checks the correctness of graphics and states at each stage, and the results support our method’s ability to preserve consistency between intermediate reasoning states and their visual representations in reasoning-intensive instructional video generation.

ConditionComplete ↑Mean output tokens ↓
Use per-step graphics20/201033
Rewrite drawing commands15/202981
No diagram–step links11/201156
Final answer + input figure3/202685

Table 4. Reasoning–visual alignment. Complete: valid format/rendering and correct four-stage geometry/state with original labels.

Conclusion

We introduced ReVAgent, a multi-agent framework for generating instructional videos for mathematics and algorithms. ReVAgent uses a shared program execution record to build instructional scenes and verify rendered keyframes, linking formulas, diagrams, and state changes to specific solution steps. We also developed a six-dimensional rubric for instructional quality and used human ratings to calibrate a multimodal judge. On the evaluated video samples, ReVAgent achieved the highest aesthetic quality score and ranked first among the compared generation methods on all six dimensions assessed by the judge, including step coherence, reasoning clarity, and visual helpfulness. Executable reasoning thus supports coherent visual explanations.

LLM Usage Statement

In our experiments, ReVAgent uses the models identified as Qwen3.8-27B and Qwen3.5-4B for problem solving, scene planning, and keyframe verification. The code-generation baselines are evaluated with the same backbones, while the video generation baselines use their respective pretrained models. For human-calibrated instructional evaluation, we calibrate a prompt for the frozen Qwen3.8-27B judge using human ratings, then apply the fixed prompt to score videos on six dimensions of instructional quality.

We use OpenAI Codex to assist with manuscript writing, literature search, citation verification, and code development. The code supports running experiments, aggregating results, revising selected diagrams, and adjusting LaTeX layout. The authors take responsibility for all submitted content.

References

  1. [1]Yu Gao, Haoyuan Guo, Tuyen Hoang, Weilin Huang, Lu Jiang, Fangyuan Kong, Huixia Li, Jiashi Li, Liang Li, Xiaojie Li, Xunsong Li, Yifu Li, Shanchuan Lin, Zhijie Lin, Jiawei Liu, Shu Liu, Xiaonan Nie, Zhiwu Qing, Yuxi Ren, Li Sun, Zhi Tian, Rui Wang, Sen Wang, Guoqiang Wei, Guohong Wu, Jie Wu, Ruiqi Xia, Fei Xiao, Xuefeng Xiao, Jiangqiao Yan, Ceyuan Yang, Jianchao Yang, Runkai Yang, Tao Yang, Yihang Yang, Zilyu Ye, Xuejiao Zeng, Yan Zeng, Heng Zhang, Yang Zhao, Xiaozheng Zheng, Peihao Zhu, Jiaxin Zou, and Feilong Zuo. Seedance 1.0: Exploring the boundaries of video generation models. arXiv preprint arXiv:2506.09113, 2025.arxiv.org/abs/2506.09113
  2. [2]Team Wan, Ang Wang, Baole Ai, Bin Wen, Chaojie Mao, Chen-Wei Xie, Di Chen, Feiwu Yu, Haiming Zhao, Jianxiao Yang, Jianyuan Zeng, Jiayu Wang, Jingfeng Zhang, Jingren Zhou, Jinkai Wang, Jixuan Chen, Kai Zhu, Kang Zhao, Keyu Yan, Lianhua Huang, Mengyang Feng, Ningyi Zhang, Pandeng Li, Pingyu Wu, Ruihang Chu, Ruili Feng, Shiwei Zhang, Siyang Sun, Tao Fang, Tianxing Wang, Tianyi Gui, Tingyu Weng, Tong Shen, Wei Lin, Wei Wang, Wei Wang, Wemmeng Zhou, Wente Wang, Wenting Shen, Wenyuan Yu, Xianzhong Shi, Xiaoming Huang, Xin Xu, Yan Kou, Yangyu Lv, Yifei Li, Yijing Liu, Yiming Wang, Yingya Zhang, Yitong Huang, Yong Li, You Wu, Yu Liu, Yulin Pan, Yun Zheng, Yuntao Hong, Yupeng Shi, Yutong Feng, Zeyinzi Jiang, Zhen Han, Zhi-Fan Wu, and Ziyu Liu. Wan: Open and advanced large-scale video generative models. arXiv preprint arXiv:2503.20314, 2025.arxiv.org/abs/2503.20314
  3. [3]Zeyinzi Jiang, Zhen Han, Chaojie Mao, Jingfeng Zhang, Yulin Pan, and Yu Liu. VACE: All-in-one video creation and editing. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 17191–17202, 2025.arxiv.org/abs/2503.07598
  4. [4]Jingxuan Wei, Cheng Tan, Qi Chen, Gaowei Wu, Siyuan Li, Zhangyang Gao, Linzhuang Sun, Bihui Yu, and Ruifeng Guo. From words to structured visuals: A benchmark and framework for text-to-diagram generation and editing. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 13315–13325, 2025.arxiv.org/abs/2411.11916
  5. [5]Vitor R. Coluci. Animações de conceitos da teoria de erros usando Manim/Python. Revista Brasileira de Ensino de Física, 44:e20210239, 2022.DOI
  6. [6]Yanzhe Chen, Kevin Qinghong Lin, and Mike Zheng Shou. Code2Video: A code-centric paradigm for educational video creation. In Proceedings of the 43rd International Conference on Machine Learning, pages 15370–15396. PMLR, 2026.arxiv.org/abs/2510.01174
  7. [7]Max Ku, Cheuk Hei Chong, Jonathan Leung, Krish Shah, Alvin Yu, and Wenhu Chen. TheoremExplainAgent: Towards video-based multimodal explanations for LLM theorem understanding. In Proceedings of the 63rd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6663–6684, 2025.arxiv.org/abs/2502.19400
  8. [8]Jingwei Liu, Ling Yang, Hao Luo, Fan Wang, Hongyan Li, and Mengdi Wang. Preacher: Paper-to-video agentic system. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 17129–17139, 2025.arxiv.org/abs/2508.09632
  9. [9]Jhon Lopez, Carlos Hinojosa, and Bernard Ghanem. SGA: Plug & play geometric verification for educational video synthesis. In Findings of the Association for Computational Linguistics: EMNLP 2026, pages 9533–9549, 2026.arxiv.org/abs/2607.18116
  10. [10]Yuwei Guo, Ceyuan Yang, Ziyan Yang, Zhibei Ma, Zhijie Lin, Zhenheng Yang, Dahua Lin, and Lu Jiang. Long context tuning for video generation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 17281–17291, 2025.arxiv.org/abs/2503.10589
  11. [11]Ozgur Kara, Krishna Kumar Singh, Feng Liu, Dugyu Ceylan, James M. Rehg, and Tobias Hinz. ShotAdapter: Text-to-multi-shot video generation with diffusion models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 28405–28415, 2025.arxiv.org/abs/2505.07652
  12. [12]Yihao Meng, Hao Ouyang, Yue Yu, Qiuyu Wang, Wen Wang, Ka Leong Cheng, Hanlin Wang, Shuai­lei Ma, Yixuan Li, Cheng Chen, Yanhong Zeng, Xing Zhu, Yujun Shen, and Huamin Qu. HoloCine: Holistic generation of cinematic multi-shot long video narratives. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 461–471, 2026.arxiv.org/abs/2510.20822
  13. [13]Zongyu Lin, Wei Liu, Chen Chen, Jiasen Lu, Wenze Hu, Tsu-Jui Fu, Jesse Allardice, Zhengfeng Lai, Liangchen Song, Bowen Zhang, Cha Chen, Yiran Fei, Lezhi Li, Yinfei Yang, Yizhou Sun, and Kai-Wei Chang. STIV: Scalable text and image conditioned video generation. In Proceedings of the IEEE/CVF International Conference on Computer Vision (ICCV), pages 16249–16259, 2025.arxiv.org/abs/2412.07730
  14. [14]Peixuan Zhang, Zijian Jia, Kaiqi Liu, Shuchen Weng, Si Li, and Boxin Shi. STAGE: Storyboard-anchored generation for cinematic multi-shot narrative. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 659–669, 2026.arxiv.org/abs/2512.12372
  15. [15]Tim Brooks, Bill Peebles, Connor Holmes, Will DePue, Yufei Guo, Li Jing, David Schnurr, Joe Taylor, Troy Luhman, Eric Luhman, Clarence Ng, Ricky Wang, and Aditya Ramesh. Video generation models as world simulators. Technical report, OpenAI, 2024.
  16. [16]Zhuoyi Yang, Jiayan Teng, Wendi Zheng, Ming Ding, Shiyu Huang, Jiazheng Xu, Yuanming Yang, Wenyi Hong, Xiao-han Zhang, Guanyu Feng, Da Yin, Yuxuan Zhang, Weihang Wang, Yean Cheng, Bin Xu, Xiaotao Gu, Yuxiao Dong, and Jie Tang. CogVideoX: Text-to-video diffusion models with an expert transformer. In International Conference on Learning Representations, pages 83048–83077, 2025.arxiv.org/abs/2408.06072
  17. [17]Shuai Yang, Wei Huang, Ruihang Chu, Yicheng Xiao, Yuyang Zhao, Xianbang Wang, Muyang Li, Enze Xie, Yingcong Chen, Yao Lu, Song Han, and Yukang Chen. LongLive: Real-time interactive long video generation. In International Conference on Learning Representations, pages 90037–90059, 2026.arxiv.org/abs/2509.22622
  18. [18]Xin Huang, Zhengqi Li, Guande He, Mingyuan Zhou, and Eli Shechtman. Self forcing: Bridging the train-test gap in autoregressive video diffusion. In Advances in Neural Information Processing Systems, pages 167283–167308, 2025.arxiv.org/abs/2506.08009
  19. [19]Hao Chen, Tianyu Shi, Pengran Huang, Zeyuan Li, Jiahui Pan, Qianglong Chen, and Lewei He. VisualEDU: A benchmark for assessing coding and visual comprehension through educational problem-solving video generation. In Findings of the Association for Computational Linguistics: EMNLP 2025, pages 16363–16394, Suzhou, China, 2025. Association for Computational Linguistics.DOI
  20. [20]Lingyong Yan, Jiulong Wu, Dong Xie, Weixian Shi, Deguo Xia, and Jizhou Huang. Beyond end-to-end video models: An LLM-based multi-agent system for educational video generation. In Proceedings of the 32nd ACM SIGKDD Conference on Knowledge Discovery and Data Mining V.2, pages 8369–8378, 2026.DOI
  21. [21]Kunpeng Liao, Yuxiao Ma, Yisheng Lin, Hualin Zeng, Xiawu Zheng, and Rongrong Ji. ALGOGEN: Tool-generated verifiable traces for reliable algorithm visualization. In Findings of the Association for Computational Linguistics: ACL 2026, pages 3168–3189, 2026.arxiv.org/abs/2605.12159
  22. [22]Ziqi Huang, Yinan He, Jiashuo Yu, Fan Zhang, Chenyang Si, Yuming Jiang, Yuanhan Zhang, Tianxing Wu, Qingyang Jin, Nattapol Chanpaisit, Yaohui Wang, Xinyuan Chen, Limin Wang, Dahua Lin, Yu Qiao, and Ziwei Liu. VBench: Comprehensive benchmark suite for video generative models. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 21807–21818, 2024.arxiv.org/abs/2311.17982
  23. [23]Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision. In Proceedings of the 38th International Conference on Machine Learning, pages 8748–8763. PMLR, 2021.arxiv.org/abs/2103.00020
  24. [24]Jiarui Wang, Huiyu Duan, Guangtao Zhai, Juntong Wang, and Xiongkuo Min. AIGV-Assessor: Benchmarking and evaluating the perceptual quality of text-to-video generation with LMM. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 18869–18880, 2025.arxiv.org/abs/2411.17221
  25. [25]Lighttricks. LTX-2.5: Official model card and checkpoints. Hugging Face model card, 2026.
  26. [26]Wan Team. Wan2.2-T2V-A14B-Diffusers model card. Hugging Face model card, 2025.
  27. [27]MiniMax. MiniMax H3 model card. Hugging Face model card, 2026.
  28. [28]Wenjia Jiang, Zongyuan Cai, Yuanhang Shao, Chenru Wang, Boyan Han, Zhixue Song, Keyu Chen, Shengwei An, Xu Yang, and Zhou Yang. ManimAgent: Self-evolving multimodal agents for visual education. In Proceedings of the 2026 Conference on Empirical Methods in Natural Language Processing, pages 57798–57822, Budapest, Hungary, 2026. Association for Computational Linguistics.arxiv.org/abs/2606.30296

Paper details

vlnc:W_cufqph67
Version
v1 · latest
Published
Fresh — added to the Hub within the last 30 days
Added
License
CC BY 4.0
Usage

views · 7

downloads · 0

A view counts once per browser per day, a download each time the PDF is requested.

  • Computer Science

Codex

View statement
Looking for related papers…
Contents