ALGOGEN: Tool-Generated Verifiable Traces for Reliable Algorithm Visualization
Not on the map. Why?
Abstract (arXiv)
Algorithm Visualization (AV) helps students build mental models by animating algorithm execution states. Recent LLM-based systems such as CODE2VIDEO generate AV videos in an end-to-end manner. However, this paradigm requires the system to simultaneously simulate algorithm flow and satisfy video rendering constraints, such as element layout and color schemes. This complex task induces LLM hallucinations, resulting in reduced execution success rates, element overlap, and inter-frame inconsistencies. To address these challenges, we propose ALGOGEN, a novel paradigm that decouples algorithm execution from rendering. We first introduce Visualization Trace Algebra (VTA), a monoid over algorithm visual states and operations. The LLM then generates a Python tracker that simulates algorithm flow and outputs VTA-JSON traces, a JSON encoding of VTA. For rendering, we define a Rendering Style Language (RSL) to templatize algorithm layouts. A deterministic renderer then compiles algorithm traces with RSL into Manim, LaTeX/TikZ, or Three.js outputs. Evaluated on a LeetCode AV benchmark of 200 tasks, ALGOGEN achieves an average success rate improvement of 17.3% compared to end-to-end methods, with 99.8% versus 82.5%. These results demonstrate that our decoupling paradigm effectively mitigates LLM hallucinations in complex AV tasks, providing a more reliable solution for automated generation of high-quality algorithm visualizations. Demo videos and code are available in the project repository.
Key facts. No citing papers in the map yet (data through 14 Oct 2026). Builds on 30 of its 61 references that are in the map. First posted on arXiv 12 May 2026.
Builds on
30 of 61 references.
References · 30
- 2023Judging LLM-as-a-Judge with MT-Bench and Chatbot Arenacited by 8,626
- 2021Evaluating Large Language Models Trained on Codecited by 8,320
- 2023Toolformer: Language Models Can Teach Themselves to Use Toolscited by 4,182
- 2023Self-Refine: Iterative Refinement with Self-Feedbackcited by 3,442
- 2023Is Your Code Generated by ChatGPT Really Correct? Rigorous Evaluation of Large Language Models for Code Generationcited by 1,391
- 2022Program of Thoughts Prompting: Disentangling Computation from Reasoning for Numerical Reasoning Taskscited by 1,076
- 2024A Survey on Large Language Models for Code Generationcited by 658
- 2023Large Language Models as Tool Makerscited by 303
- 2023A Dynamic LLM-Powered Agent Network for Task-Oriented Agent Collaborationcited by 290
- 2023OpenAGI: When LLM Meets Domain Expertscited by 197
- 2022DocPrompting: Generating Code by Retrieving the Docscited by 153
- 2025ChartCoder: Advancing Multimodal Large Language Model for Chart-to-Code Generationcited by 92
18 more
- 2024Offline Training of Language Model Agents with Functions as Learnable Weightscited by 48
- 2024DiffusionFake: Enhancing Generalization in Deepfake Detection via Guided Stable Diffusioncited by 29
- 2025Learning to Generate Structured Output with Schema Reinforcement Learningcited by 29
- 2025Code2Video: A Code-centric Paradigm for Educational Video Generationcited by 27
- 2026Flow caching for autoregressive video generationcited by 25
- 2025TheoremExplainAgent: Towards Video-based Multimodal Explanations for LLM Theorem Understandingcited by 24
- 2023GPTutor: a ChatGPT-powered programming tool for code explanationcited by 23
- 2023Continual Face Forgery Detection via Historical Distribution Preservingcited by 23
- 2024Towards Accurate Post-Training Quantization of Vision Transformers via Error Reductioncited by 23
- 2025nvAgent: Automated Data Visualization from Natural Language via Collaborative Agent Workflowcited by 23
- 2023I&S-ViT: An Inclusive & Stable Method for Pushing the Limit of Post-Training ViTs Quantizationcited by 19
- 2023Solving Oscillation Problem in Post-Training Quantization Through a Theoretical Perspectivecited by 17
- 2024Large Language Models as Software Components: A Taxonomy for LLM-Integrated Applicationscited by 17
- 2024RLE: A Unified Perspective of Data Augmentation for Cross-Spectral Re-identificationcited by 16
- 2025MDReID: Modality-Decoupled Learning for Any-to-Any Multi-Modal Object Re-Identificationcited by 7
- 2024Knowing Where to Focus: Attention-Guided Alignment for Text-based Person Searchcited by 4
- 2025Test-Time Iterative Error Correction for Efficient Diffusion Modelscited by 4
- 2024Utilizing ChatGPT in a Data Structures and Algorithms Course: A Teaching Assistant's Perspectivecited by 1
Built on by
Not cited yet.