arXiv:2604.09691cs.CVcs.AI2026-04被引 1

用代码生成精准教育图,再用扩散模型美化,兼顾准确与美观。

CAGE: Bridging the Accuracy-Aesthetics Gap in Educational Diagrams via Code-Anchored Generative Enhancement

  • 先用大模型生成可执行代码构造正确结构
  • 再用控制网络引导扩散模型提升视觉质量
  • 适合教育内容生成,尤其需图文一致的场景

教育图示——如生物过程、化学结构、物理系统和数学概念的标注插图——是中小学教学中不可或缺的认知工具。然而,现有方法无法同时保证准确性和美观性。开源扩散模型虽视觉丰富,但严重扭曲文本标签;基于大模型的代码生成确保标签正确,但图像缺乏表现力;闭源API部分缓解此问题,却不可靠且成本过高。我们在400个中小学图示提示上量化了三类范式在标签保真度与视觉质量上的差距,采用自动化与人工评估结合的方法。为此提出CAGE(代码锚定生成增强):大模型生成可执行代码以构建结构正确的图示,随后通过控制网络引导扩散模型,在保持标签准确的前提下优化为视觉精美的图形。我们还引入EduDiagram-2K数据集,包含2,000对程序化与风格化图示,支持该流程,并展示初步成果与多媒体研究展望。

原文摘要 · Abstract (English)

Educational diagrams -- labeled illustrations of biological processes, chemical structures, physical systems, and mathematical concepts -- are essential cognitive tools in K-12 instruction. Yet no existing method can generate them both accurately and engagingly. Open-source diffusion models produce visually rich images but catastrophically garble text labels. Code-based generation via LLMs guarantees label correctness but yields visually flat outputs. Closed-source APIs partially bridge this gap but remain unreliable and prohibitively expensive at educational scale. We quantify this accuracy-aesthetics dilemma across all three paradigms on 400 K-12 diagram prompts, measuring both label fidelity and visual quality through complementary automated and human evaluation protocols. To resolve it, we propose CAGE (Code-Anchored Generative Enhancement): an LLM synthesizes executable code producing a structurally correct diagram, then a diffusion model conditioned on the programmatic output via ControlNet refines it into a visually polished graphic while preserving label fidelity. We also introduce EduDiagram-2K, a collection of 2,000 paired programmatic-stylized diagrams enabling this pipeline, and present proof-of-concept results and a research agenda for the multimedia community.

教育图示生成模型代码生成扩散模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。