Search arXiv⌕ Search

arXiv · 2612.00307

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

Abstract

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.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Hexuan Wang, Zixian Ma, Ranjay Krishna, Jaemin Cho. 2026-11-30. Who Drew That Pixel? Fine-Grained Visual Attribution for Image-to-Code Generation and Editing. https://searcharxiv.org/abs/2612.00307

Citations retain the original authors and DOI and include this site’s record URL. If this discovery service contributed to your research, you can also cite Search arXiv by Indiciae: BibTeX · RIS.

KEEP EXPLORING

Related papers

IB-AdCSCNet:Adaptive Convolutional Sparse Coding Network Driven by Information Bottleneck

In the realm of neural network models, the perpetual challenge remains in retaining task-relevant information while effectively discarding redundant data during propagation. In this paper, we introduce IB-AdCSCNet, a deep learning model grounded in information bottleneck theory. IB-AdCSCNet seamlessly integrates the information bottleneck trade-off strategy into deep networks by dynamically adjusting the trade-off hyperparameter $λ$ through gradient descent, updating it within the FISTA(Fast Iterative Shrinkage-Thresholding Algorithm ) framework. By optimizing the compressive excitation loss function induced by the information bottleneck principle, IB-AdCSCNet achieves an optimal balance between compression and fitting at a global level, approximating the globally optimal representation feature. This information bottleneck trade-off strategy driven by downstream tasks not only helps to learn effective features of the data, but also improves the generalization of the model. This study's contribution lies in presenting a model with consistent performance and offering a fresh perspective on merging deep learning with sparse representation theory, grounded in the information bottleneck concept. Experimental results on CIFAR-10 and CIFAR-100 datasets demonstrate that IB-AdCSCNet not only matches the performance of deep residual convolutional networks but also outperforms them when handling corrupted data. Through the inference of the IB trade-off, the model's robustness is notably enhanced.

cs.CV↗

Superpixel Segmentation: A Long-Lasting Ill-Posed Problem

For many years, image over-segmentation into superpixels has been essential to computer vision pipelines, by creating homogeneous and identifiable regions of similar sizes. Such constrained segmentation problem would require a clear definition and specific evaluation criteria. However, the validation framework for superpixel methods, typically viewed as standard object segmentation, has rarely been thoroughly studied. In this work, we first take a step back to show that superpixel segmentation is fundamentally an ill-posed problem, due to the implicit regularity constraint on the shape and size of superpixels. We also demonstrate through a novel comprehensive study that the literature suffers from only evaluating certain aspects, sometimes incorrectly and with inappropriate metrics. Concurrently, recent deep learning-based superpixel methods mainly focus on the object segmentation task at the expense of regularity. In this ill-posed context, we show that we can achieve competitive results using a recent architecture like the Segment Anything Model (SAM), without dedicated training for the superpixel segmentation task. This leads to rethinking superpixel segmentation and the necessary properties depending on the targeted downstream task.

cs.CV↗

Geometric Prior-Guided Neural Implicit Surface Reconstruction in the Wild

Neural implicit surface reconstruction using volume rendering techniques has recently achieved significant advancements in creating high-fidelity surfaces from multiple 2D images. However, current methods primarily target scenes with consistent illumination and struggle to accurately reconstruct 3D geometry in uncontrolled environments with transient occlusions or varying appearances. While some neural radiance field (NeRF)-based variants can better manage photometric variations and transient objects in complex scenes, they are designed for novel view synthesis and lack the surface constraints needed for precise surface reconstruction. To overcome this limitation, we introduce a novel approach that applies multiple geometric constraints to the implicit surface optimization process, enabling more accurate reconstructions from unconstrained image collections. First, we utilize sparse 3D points from structure-from-motion (SfM) to refine the signed distance function estimation for the reconstructed surface, with a displacement compensation to accommodate noise in the sparse points. Additionally, we employ robust normal priors derived from a normal predictor, filtered using edge detection and a reprojection consistency check, to improve alignment with the actual surface geometry. Experiments show that our method achieves the best average performance among the compared methods on the Heritage-Recon benchmark of internet photo collections and performs comparably to the strongest baselines on two standard multi-view datasets. Our approach enables high-quality 3D reconstruction of landmarks and objects, making it applicable to diverse scenarios such as digital preservation of cultural heritage sites and 3D object modeling.

cs.CV↗