Visual Diffusion Models are Geometric Solvers
Nir Goren, Shai Yehezkel, Omer Dahary, Andrey Voynov, Or Patashnik, Daniel Cohen-Or
2025-10-27
Summary
This paper demonstrates that powerful image-generating AI models, called diffusion models, can actually *solve* geometry problems. Instead of using complicated math-based approaches, the researchers show these models can figure out solutions just by 'looking' at the problem as an image.
What's the problem?
Many geometry problems are incredibly difficult for computers to solve, even seemingly simple ones. The paper focuses on three such problems: figuring out if any curved shape can have a square drawn inside it, finding the shortest possible network to connect a set of points (Steiner Tree Problem), and creating a closed shape with straight lines (Simple Polygon Problem). Traditional methods struggle with these because they require complex calculations and can get stuck in local optima, meaning they find a good solution but not necessarily the *best* one.
What's the solution?
The researchers treated each geometry problem as an image. They then trained a standard image-generating model to take random noise and turn it into a clear image representing a solution to the problem. Essentially, the model learns what a correct solution *looks* like and can create it from scratch. This is different from previous attempts that needed special AI designs specifically for geometry; they used a regular image generator. The model doesn't need to 'understand' the geometry rules, it just learns to generate the correct visual pattern.
Why it matters?
This work is important because it suggests a new, simpler way to tackle hard geometry problems. Instead of trying to write complex code to solve them mathematically, we can leverage the power of image-generating AI. This approach could be applied to a much wider range of difficult geometric tasks and opens up possibilities for solving problems that were previously considered too challenging for computers.
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.