arXiv:2505.24499cs.CV2025-05中稿 · CVPR被引 4

用强化学习让AI画画时先说思路,提升矢量图生成质量

Reason-SVG: Enhancing Structured Reasoning for Vector Graphics Generation with Reinforcement Learning

  • 让AI生成图形时同步输出设计思路,实现边思考边作图
  • 在10,000组配对数据上训练,使图形结构与语义更准确
  • 适合需要精准可编辑图形的设计师或自动化系统使用

生成高质量可缩放矢量图形(SVG)对大语言模型(LLM)而言极具挑战,因其需具备结构有效性、语义准确性与视觉一致性等高级推理能力,而现有LLM常在此类任务中表现不佳。本文提出Reason-SVG,一种增强结构化推理的新型框架。该框架首创“边思考边作图”(Drawing-with-Thought, DwT)范式,使模型同时生成SVG代码与明确的设计理由。采用两阶段训练策略:首先通过监督微调(SFT)在DwT范式上训练模型,建立基础推理能力;其次利用群体相对策略优化(GRPO)的强化学习(RL),驱动模型生成更优的DwT与SVG推理。为支持推理驱动的生成,设计混合奖励函数,综合评估DwT推理的存在性与有效性,以及结构正确性、语义对齐和视觉质量。此外,构建了包含10,000个SVG-DwT配对的高质数据集SVGX-DwT-10k,每条SVG均基于显式推理生成。通过集成DwT、SFT与混合奖励引导的强化学习,Reason-SVG显著提升大语言模型与视觉语言模型在生成准确且视觉一致的SVG方面的性能。

原文摘要 · Abstract (English)

Generating high-quality Scalable Vector Graphics (SVGs) is challenging for Large Language Models (LLMs), as it requires advanced reasoning for structural validity, semantic accuracy, and visual coherence -- areas where current LLMs often struggle. In this work, we introduce Reason-SVG, a novel framework equipped with enhanced structured reasoning for SVG generation. Reason-SVG pioneers the ``Drawing-with-Thought'' (DwT) paradigm, in which models generate both SVG code and explicit design rationales. Reason-SVG follows a two-stage training strategy: First, Supervised Fine-Tuning (SFT) trains the LLM on the DwT paradigm to develop foundational reasoning abilities. Second, Reinforcement Learning (RL), utilizing Group Relative Policy Optimization (GRPO), empowers the model to generate both DwT and SVG rationales through refined, reward-driven reasoning. To enable reasoning-driven SVG generation, we design a Hybrid Reward function that evaluates the presence and effectiveness of DwT reasoning, along with structural validity, semantic alignment, and visual quality. We also introduce the SVGX-DwT-10k dataset, a high-quality corpus of 10k SVG-DwT pairs, where each SVG code is generated based on explicit DwT reasoning. By integrating DwT, SFT, and Hybrid Reward-guided RL, Reason-SVG significantly improves the performance of LLMs and VLMs in generating accurate and visually coherent SVGs.

矢量图生成强化学习结构推理AI作图

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