Visual Diffusion Models are Geometric Solvers
Nir Goren, Shai Yehezkel, Omer Dahary, Andrey Voynov, Or Patashnik, Daniel Cohen-Or
TL;DR
The paper demonstrates that visual diffusion models can serve as geometric solvers by operating directly in pixel space, reframing hard geometric problems as image-generation tasks. It trains a standard conditional diffusion model on problem-conditioned images to generate approximate solutions for the Inscribed Square Problem, Steiner Tree, and Simple Polygon, and then refines them with a snapping procedure or edge-extraction pipeline. Using a U-Net backbone and DDIM-style sampling, the method produces diverse, robust solutions and shows generalization to larger instances beyond the training distribution, while maintaining competitive alignment and geometric quality. This work introduces a simple, architecture-agnostic paradigm that bridges generative modeling and geometric problem solving, with potential broad applicability to a wide class of challenging geometric tasks.
Abstract
In this paper we show that visual diffusion models can serve as effective geometric solvers: they can directly reason about geometric problems by working in pixel space. We first demonstrate this on the Inscribed Square Problem, a long-standing problem in geometry that asks whether every Jordan curve contains four points forming a square. We then extend the approach to two other well-known hard geometric problems: the Steiner Tree Problem and the Simple Polygon Problem. Our method treats each problem instance as an image and trains a standard visual diffusion model that transforms Gaussian noise into an image representing a valid approximate solution that closely matches the exact one. The model learns to transform noisy geometric structures into correct configurations, effectively recasting geometric reasoning as image generation. Unlike prior work that necessitates specialized architectures and domain-specific adaptations when applying diffusion to parametric geometric representations, we employ a standard visual diffusion model that operates on the visual representation of the problem. This simplicity highlights a surprising bridge between generative modeling and geometric problem solving. Beyond the specific problems studied here, our results point toward a broader paradigm: operating in image space provides a general and practical framework for approximating notoriously hard problems, and opens the door to tackling a far wider class of challenging geometric tasks.
