arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2605.25447cs.CL
收藏

GeoSVG-RL:面向布局约束的文本到SVG图表生成的几何感知强化学习

GeoSVG-RL: Geometry-Aware Reinforcement Learning for Layout-Constrained Text-to-SVG Diagram Generation

University of California, Merced(加州大学梅尔德分校);The University of Queensland(昆士兰大学);vivo Mobile Communication Co., Ltd.(vivo移动通信有限公司)

Sifan Li, Yujun Cai, Hongkai Chen, Yiwei Wang

AI总结:

提出GeoSVG-RL框架,通过强化学习优化策略,利用几何反馈奖励(渲染有效性、画布适配、锚点放置、文本包含、图一致性和代码整洁性)解决文本到SVG图表生成中的结构脆弱性问题,显著提升箭头锚点精度和文本框内率。

摘要:

生成结构化、可编辑的图表对当代大型语言模型来说仍然是一个重大挑战,尽管它们在通用向量代码生成方面表现出色。主要困难在于输出的结构脆弱性;微小的错误,如未对齐的连接器端点、文本标签与边框重叠或复杂布局超出画布边界,都会使生成的SVG文件在专业应用中无法使用。为了解决这些问题,我们引入了GeoSVG-RL,一个专门为布局约束的文本到SVG生成设计的强化学习框架。与仅依赖于最大化令牌级可能性的标准训练目标不同,我们的方法针对明确的、可执行的几何反馈优化策略。模型首先生成一个结构化的布局计划,作为后续SVG代码生成的几何契约。然后通过浏览器支持的验证器渲染该代码,从而在六个关键维度上计算细粒度奖励:渲染有效性、画布适配、精确锚点放置、文本包含、图一致性和代码整洁性。我们利用组相对策略优化(GRPO)来优化模型,每个提示采样多个候选,以便基于相对质量进行更新。从合成数据上的监督预热阶段开始,GeoSVG-RL在结构可靠性方面取得了显著提升,特别是在箭头锚点精度和文本框内率方面。定量评估表明,我们的方法在局部几何精度和图连通性保持方面持续优于当前最先进的系统,为自动化且可靠的技术插图提供了一条稳健的路径。

英文摘要:

Generating structured, editable diagrams remains a significant challenge for contemporary large language models, despite their proficiency in general-purpose vector code generation. The primary difficulty lies in the structural fragility of the output; minor errors such as misaligned connector endpoints, text labels overlapping borders, or complex layouts drifting beyond the canvas boundaries render the resulting SVG files functionally unusable for professional applications. To address these issues, we introduce GeoSVG-RL, a specialized reinforcement learning framework designed for layout-constrained text-to-SVG generation. Unlike standard training objectives that rely solely on maximizing token-level likelihood, our approach optimizes the policy against explicit, executable geometric feedback. The model first produces a structured layout plan that serves as a geometric contract for the subsequent generation of the SVG code. This code is then rendered through a browser-backed verifier, enabling the calculation of fine-grained rewards across six critical dimensions: rendering validity, canvas fitting, precise anchor placement, text containment, graph consistency, and code cleanliness. We utilize Group Relative Policy Optimization (GRPO) to refine the model, sampling multiple candidates per prompt to facilitate updates based on relative quality. Starting from a supervised warm-start phase on synthetic data, GeoSVG-RL achieves substantial gains in structural reliability, particularly in arrow-anchor accuracy and text-in-box rates. Quantitative evaluations demonstrate that our method consistently outperforms current state-of-the-art systems in local geometric precision and the preservation of graph connectivity, providing a robust pathway toward automated yet reliable technical illustration.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑