Table of Contents
Fetching ...

Generation of maximal snake polyominoes using a deep neural network

Benjamin Gauthier, Alain Goupil, Fadel Toure

Abstract

Maximal snake polyominoes are difficult to study numerically in large rectangles, as computing them requires the complete enumeration of all snakes for a specific grid size, which corresponds to a brute force algorithm. This technique is thus challenging to use in larger rectangles, which hinders the study of maximal snakes. Furthermore, most enumerable snakes lie in small rectangles, making it difficult to study large-scale patterns. In this paper, we investigate the contribution of a deep neural network to the generation of maximal snake polyominoes from a data-driven training, where the maximality and adjacency constraints are not encoded explicitly, but learned. To this extent, we experiment with a denoising diffusion model, which we call Structured Pixel Space Diffusion (SPS Diffusion). We find that SPS Diffusion generalizes from small grids to larger ones, generating valid snakes up to 28x28 squares and producing maximal snake candidates on squares close to the current computational limit. The model is, however, prone to errors such as branching, cycles, or multiple components. Overall, the diffusion model is promising and shows that complex combinatorial objects can be understood by deep neural networks, which is useful in their investigation.

Generation of maximal snake polyominoes using a deep neural network

Abstract

Maximal snake polyominoes are difficult to study numerically in large rectangles, as computing them requires the complete enumeration of all snakes for a specific grid size, which corresponds to a brute force algorithm. This technique is thus challenging to use in larger rectangles, which hinders the study of maximal snakes. Furthermore, most enumerable snakes lie in small rectangles, making it difficult to study large-scale patterns. In this paper, we investigate the contribution of a deep neural network to the generation of maximal snake polyominoes from a data-driven training, where the maximality and adjacency constraints are not encoded explicitly, but learned. To this extent, we experiment with a denoising diffusion model, which we call Structured Pixel Space Diffusion (SPS Diffusion). We find that SPS Diffusion generalizes from small grids to larger ones, generating valid snakes up to 28x28 squares and producing maximal snake candidates on squares close to the current computational limit. The model is, however, prone to errors such as branching, cycles, or multiple components. Overall, the diffusion model is promising and shows that complex combinatorial objects can be understood by deep neural networks, which is useful in their investigation.
Paper Structure (10 sections, 3 equations, 6 figures)

This paper contains 10 sections, 3 equations, 6 figures.

Figures (6)

  • Figure 1: Different representations of snake polyominoes.
  • Figure 2: Maximal snake-like structures (above) - stairs, a triangle of dead cells and the confined tail/head. Snake malformations (below) - branching, cycle, forest of snakes and an open head/tail. Note that for the open head/tail, the disjointed segments should be considered part of the same snake, as if the grid was bigger than shown here.
  • Figure 3: The backward diffusion process to obtain a maximal snake using an SPS Diffusion model. The arrows indicate the number of diffusion steps used for the next image $(\mathbf{x}_t)$. The initial pure noise image $\mathbf{x}_{1000}$ is diffused into a maximal snake image $\mathbf{x}_0$.
  • Figure 4: Architecture of the SPS Diffusion model. The model is given $\mathbf{x}_t$, which returns the noise to remove $\epsilon_\theta(\mathbf{x}_t,t)$ (Sec. \ref{['sec:diffusion_training']} discusses this further). The labels for the image size indicate the dimensions after the operation of the block below has been applied.
  • Figure 5: Two maximal snakes generated by the SPS Diffusion model in grids seen during training.
  • ...and 1 more figures