首页 > AI前沿 > Who Drew That Pixel? Fine-Grained Visual Attribution for Image-to-Code Generation and Editing

Who Drew That Pixel? Fine-Grained Visual Attribution for Image-to-Code Generation and Editing

arXiv自然语言 2026-12-02 13:00 5 阅读 查看原文
用户现在需要把给定的新闻正文排版成语义化HTML片段,规则要严格遵守,不能有文档级标签,每个自然段用p,没有小节的话不用h2h3?不对,先看内容,是一段研究介绍?不对,看内容的结构,首先核心介绍的段落,然后还有?不对,原文是一整段?不对,仔细看原文,首先开头讲现状,然后提出方法,然后实验结果,然后应用效果,最后总结。不对,按照要求,每个自然段落用p包裹,列表的话这里没有列表,引用也没有,代码也没有。哦不对,原文是一整段吗?不对,再仔细看,原文的内容是连贯的一段?不对,等下,用户给的正文是一段?不对,再理清楚:首先,第一部分是说强化学习做图生代码的现有问题:Reinforcement learning...incorrectly. 这部分是现状问题。然后第二部分是提出方法:To address this...shared definitions. 然后第三部分是实验结果:Across five benchmarks...training-step time. 然后第四部分是额外收益:With an additional code-aware...editability. 然后第五部分是作为智能体工具的效果:As an agent tool...fewer tokens. 然后第六部分是总结:By linking rendered elements...editing. 不对?不对,不能随便拆分段落吧?哦不对,原文是连续的一段?不对,用户给的正文是一段吗?看用户给的正文,从头到尾是一段?不对,再仔细看,用户给的正文是连贯的一整段内容,没有分段?那不对,要按照自然段落,原文如果是一个自然段的话就用一个p?不对,不对,再看要求,保留所有信息,不能增删改。哦不对,等下,原文的内容结构,有没有需要划分小节的?没有,因为没有不同的主题模块?不对,再仔细看,用户的要求是长文用h2/h3划分小节,这里的内容不算特别长,而且原文是一整段?不对,不对,等下,我再仔细读原文: 原文内容: Reinforcement learning for image-to-code generation typically rewards the overall visual similarity between rendered outputs and reference images. However, methods such as GRPO assign the same advantage to every token in a program, giving code that draws an element correctly the same learning signal as code that draws it incorrectly. To address this, we introduce render attribution, which traces rendered elements back to their source code, enabling fine-grained visual feedback. During training, we decompose the reference and rendered images into individual elements, match them one-to-one based on geometric similarity, and assign element-specific advantages to the responsible code tokens, even across shared definitions. Across five benchmarks (VFIG-Bench, VFIG-OOD, SVG-Bench Emoji, DaTikZ-v3, and Design2Code) spanning SVG, TikZ, and HTML with three different starting models, our method outperforms GRPO (e.g., 23% lower LPIPS on VFIG-Bench), improving all 28 benchmark-metric comparisons with at most 1.3% additional training-step time. With an additional code-aware reward and corresponding credit assignment, it also better preserves code structure and improves editability. As an agent tool, render attribution improves LPIPS by 17% at the same turn budget even for a frontier agent (Claude Sonnet 5.5), and lets an open 27B agent surpass its 16-turn result in four turns with 84% fewer tokens. By linking rendered elements to their code, render attribution turns visual feedback into precise guidance for learning and editing. 哦,确实是一整段?不对,但是按照要求,每个自然段落用p包裹,那如果原文是一个自然段的话,就用一个p?不对,不对,有没有重要句子可以用strong?比如核心的render attribution的相关内容?不对,要求是重要句子可用strong,不要乱加。哦不对,还要注意,不能增删改内容。那等下,有没有需要划分小节的?比如,有没有不同部分?比如,问题与方法,实验结果,应用效果?不对,但是原文没有分段,不能随便加标题吧?不对,要求是长文用h2/h3划分小节,这里的内容如果要划分的话,是不是合适?不对,再想,用户说“保留原文所有信息,不得增删改内容”,如果加标题的话,是不是属于增了内容?哦对哦!要求4是不能增删改内容,所以不能随便加h2/h3的标题文字,因为原文没有那些标题。哦对,这点很重要。那原文是一整段,那是不是就用一个p包裹?不对,不对,再仔细看,原文的逻辑是不是可以拆分成几个自然段?不对,原文是连续的,但是用户给的原文是一段,那不能自己拆分段落吧?不对,等下,自然段落的定义,原文如果是作者写的一个自然段,那我们不能拆分,对吧?那现在,原文里有没有需要用strong的?比如核心的结论或者方法名?比如“render attribution”是核心方法,可以加strong?还有,比如重要的成果数据?不对,不要随便加,只有重要句子。哦不对,再看,要求是重要句子可用strong,那比如最后一句是核心结论?或者“we introduce render attribution, which traces rendered elements back to their source code, enabling fine-grained visual feedback.”这句是核心方法引入,可以加strong?不对,还是谨慎点,不要乱加,除非是明显的重要句子。哦不对,再看,有没有列表?没有。引用?没有。代码?没有。那现在,原文是一整段,所以用

包裹整个内容?不对,等下,会不会我理解错了,原文的段落是自然的,比如: 第一段:讲现有方法的问题和提出的方法及训练流程:Reinforcement learning...even across shared definitions. 第二段:讲实验结果:Across five benchmarks...training-step time. 第三段:讲额外收益和智能体应用效果:With an additional code-aware...fewer tokens. 第四段:总结:By linking rendered elements...editing. 不对,但是这样拆分是不是属于修改原文的内容?因为原文是一段,我拆分成几段,是不是违反了不得增删改?哦不对,段落拆分算不算改内容?不对,排版的话,自然段落的拆分,原文如果没有分段,那我们不能随便拆,对吧?哦,等下,用户给的正文是纯文本,是一个连续的段落,没有换行,所以它本身就是一个自然段,所以排版的时候用一个

包裹就可以?不对,但是再看,有没有什么需要处理的?比如里面的括号内容,正常保留就可以。哦对,还要注意,不要加任何多余的内容。那等下,要不要给核心的render attribution加strong?比如第一次出现的render attribution,还有后面的?不对,要求是重要句子可用strong,不是单个词。哦,那比如“To address this, we introduce render attribution, which traces rendered elements back to their source code, enabling fine-grained visual feedback.”这句是核心的方法引入,可以加strong?还有最后一句“By linking rendered elements to their code, render attribution turns visual feedback into precise guidance for learning and editing.”是核心结论,也可以加strong?不对,会不会过度?或者要不要加?哦,要求是“可用”,不是必须,所以如果确实是重要句子可以加。那现在,整理一下: 首先,原文是一整段,所以用

包裹,然后把重要的句子加?不对,等下,再仔细看,有没有可能我拆分段落是不对的?比如,原文是一段,所以只能一个p。那现在,写出来的话:

Reinforcement learning for image-to-code generation typically rewards the overall visual similarity between rendered outputs and reference images. However, methods such as GRPO assign the same advantage to every token in a program, giving code that draws an element correctly the same learning signal as code that draws it incorrectly. To address this, we introduce render attribution, which traces rendered elements back to their source code, enabling fine-grained visual feedback. During training, we decompose the reference and rendered images into individual elements, match them one-to-one based on geometric similarity, and assign element-specific advantages to the responsible code tokens, even across shared definitions. Across five benchmarks (VFIG-Bench, VFIG-OOD, SVG-Bench Emoji, DaTikZ-v3, and Design2Code) spanning SVG, TikZ, and HTML with three different starting models, our method outperforms GRPO (e.g., 23% lower LPIPS on VFIG-Bench), improving all 28 benchmark-metric comparisons with at most 1.3% additional training-step time. With an additional code-aware reward and corresponding credit assignment, it also better preserves code structure and improves editability. As an agent tool, render attribution improves LPIPS by 17% at the same turn budget even for a frontier agent (Claude Sonnet 5.5), and lets an open