NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Predictive coding feedback results in perceived illusory contours in a recurrent neural network

Zhaoyang Pang, Callum Biggs O'May, Bhavin Choksi, Rufin VanRullen

Introduction

Standard feedforward neural networks often fail to perceive visual illusions like the Kanizsa square because they prioritize local features over global context. In contrast, the human visual system utilizes extensive top-down feedback connections to integrate information. This study investigates whether equipping a convolutional neural network (CNN) with brain-inspired predictive coding feedback loops allows it to "see" illusory contours and experience the hallucinated brightness enhancements typical of human perception.

Methods: Predictive Coding Architecture

The researchers developed a three-layer hierarchical stacked autoencoder, incorporating both feedforward encoding and feedback decoding layers. This architecture implements predictive coding dynamics, where higher layers generate predictions about the activity in lower layers. Discrepancies between these predictions and actual activity (prediction errors) are used to iteratively refine the network's internal representations over multiple timesteps.

Architecture of the predictive coding network showing feedforward and feedback pathways.

The model underwent a two-phase training process:

  1. Unsupervised Pretraining: The network learned to reconstruct natural images from the CIFAR100 dataset, capturing the statistical regularities of real-world contours.
  2. Supervised Finetuning: A classification head was added to distinguish between physical squares and randomly oriented "Pac-Man" shapes. Crucially, the model was never exposed to illusory configurations during training.

Datasets and Experimental Design

The study utilized a custom Kanizsa Shapes Dataset consisting of 32x32 images categorized into four classes: Square (physical squares), Random (randomly oriented inducers), All-in (the Kanizsa illusion), and All-out (a non-illusory control). To ensure robustness, the dataset included variations in luminance, position, and Gaussian noise.

Examples of the four image classes across different noise levels used for training and testing.

Key Insights and Results

The experiments revealed that feedback is essential for perceiving illusions. Purely feedforward networks failed to recognize the Kanizsa square, whereas the recurrent model's probability of classifying the "All-in" illusory image as a square rose to nearly 48% over 100 timesteps, compared to ~20% for control shapes.

Furthermore, the network's generative pathway allowed for a literal look at its internal "perceptions." The model reconstructed the illusory square with a distinct brightness difference from the background, mirroring the human experience of illusory brightness enhancement. This emergent property was only observed when the network was pretrained on natural images, suggesting that susceptibility to illusions is a byproduct of adapting to complex real-world statistics.

Ablation studies highlighted a tension between "dueling error corrections": feedback error drives the hallucination by applying high-level concepts (like "square") to the input, while feedforward error attempts to anchor the representation to the literal pixel data.

Limitations and Future Work

While the 3-layer model remained stable, deeper architectures like a predictive VGG-11 (PVGG) showed transient illusory perception that faded over time. This suggests that maintaining stable representations of simple shapes may be challenging for networks with highly abstract features. Future research aims to apply this predictive coding framework to other phenomena, such as multi-stable perception (e.g., the Necker cube) and Gestalt rules of organization.

Summary updated

BibTeX
@article{pang2021predictive,
  author = {Zhaoyang Pang and Callum Biggs O'May and Bhavin Choksi and Rufin VanRullen},
  title = {{Predictive coding feedback results in perceived illusory contours in a recurrent neural network}},
  journal = {Neural Networks},
  year = {2021},
  doi = {10.1016/j.neunet.2021.08.024},
}
Figure