Generative Inference Demo

This demo showcases how neural networks can perceive visual illusions and develop Gestalt principles of perceptual organization through generative inference.

How to use this demo:

  • Load pre-configured examples: Click on any visual illusion below and hit "Load Parameters" to automatically set up the optimal parameters for that illusion
  • Run the inference: After loading parameters or setting your own, hit "Run Inference" to start the generative inference process
  • You can also upload your own images and experiment with different parameters to see how they affect the generative inference process
Model
Inference Method
0 40
1 600
0 1
0 0.05
0.01 2
Model Layer

Visual Illusion Examples

Select an illusion to load its parameters and see how generative inference reveals perceptual effects

Neon Color Spreading


Kanizsa Square


Cornsweet Illusion

Instructions: Both blocks are gray in color (the same), use your finger to cover the middle line. Hit 'Load Parameters' and then hit 'Run Generative Inference' to see how the model sees the blocks.


Rubin's Face-Vase (Object Prior)


Confetti Illusion


Ehrenstein Illusion


Grouping by Continuity


Figure-Ground Illusion

About Generative Inference

Generative inference is a technique that reveals how neural networks perceive visual stimuli. This demo primarily uses the Prior-Guided Drift Diffusion method.

Prior-Guided Drift Diffusion

Moving away from a noisy representation of the input images

IncreaseConfidence

Moving away from the least likely class identified at iteration 0 (fast perception)

Parameters:

  • Drift Noise: Controls the amount of noise added to the image at the beginning
  • Diffusion Noise: Controls the amount of noise added at each optimization step
  • Update Rate: Learning rate for the optimization process
  • Number of Iterations: How many optimization steps to perform
  • Model Layer: Select a specific layer of the ResNet50 model to extract features from
  • Epsilon (Stimulus Fidelity): Controls the size of perturbation during optimization

Generative Inference was developed by Tahereh Toosi.