Table of Contents
Fetching ...

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.

Visual Diffusion Models are Geometric Solvers

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.
Paper Structure (29 sections, 6 equations, 9 figures, 4 tables)

This paper contains 29 sections, 6 equations, 9 figures, 4 tables.

Figures (9)

  • Figure 1: We introduce a visual diffusion approach to solving hard geometric problems directly in pixel space. Shown here on the Inscribed Square Problem, where we task the model with finding a square such that all of its four vertices lie on a given curve. Our method uncovers diverse approximate solutions, corresponding to different random seeds.
  • Figure 2: Example of a curve (black) with three inscribed squares. Note that the inscribed squares are defined only by having all four vertices on the curve: they need not be fully contained within the curve, and they may overlap with each other.
  • Figure 3: Inscribed square $x_0$ predictions across denoising steps. Each row corresponds to a different seed (inscribed square). Columns show selected $x_0$ predictions for decreasing timesteps $t$ from left to right (leftmost: $t{=}T$; penultimate: $t{=}0$). For $t\neq 0$ we render only the filled mask; at $t{=}0$ we also draw square edges and the minimum-area bounding box. The rightmost column ("snapped") shows the rigidly snapped version of the $t{=}0$ prediction on the curve, with an arrow from the original centroid to the snapped centroid.
  • Figure 4: Solutions produced by our model. Each Jordan curve (black) is accompanied by predicted inscribed squares (colored).
  • Figure 5: Example of a Steiner Minimal Tree. Left: The input terminal nodes, colored in red. Right: The Steiner Minimal Tree for this instance, where auxiliary Steiner points are colored in dark gray.
  • ...and 4 more figures