TL;DR
ALGOGEN introduces a decoupled approach for algorithm visualization that improves reliability and success rates by separating algorithm execution from rendering, utilizing formal trace algebra and style languages.
Contribution
It proposes a novel decoupling paradigm with formal trace algebra and style languages, significantly reducing hallucinations in LLM-generated algorithm visualizations.
Findings
Achieves 17.3% higher success rate than end-to-end methods.
Demonstrates 99.8% success rate on a LeetCode benchmark.
Provides reliable, high-quality algorithm visualizations.
Abstract
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…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
