Image segmentation with traveling waves in an exactly solvable recurrent neural network

Luisa H. B. Liboni, Roberto C. Budzinski, Alexandra N. Busch, Sindy Löwe, Thomas A. Keller, Max Welling, Lyle E. Muller · DOI

Abstract

Traditional image segmentation relies heavily on deep learning models that function as "black boxes," requiring extensive training and massive datasets. This paper introduces a complex-valued recurrent neural network (cv-RNN) that segments images through the spatiotemporal dynamics of traveling waves. By leveraging the physics of recurrent interactions and the mathematical transparency of linear algebra, the proposed system achieves unsupervised segmentation with fixed weights. The model demonstrates high accuracy on synthetic datasets and generalizes to natural images without parameter tuning, offering a biologically inspired and interpretable alternative to conventional computer vision approaches.

Introduction

Image segmentation—the process of partitioning an image into multiple segments or objects—is a cornerstone of computer vision. While modern deep learning architectures excel at this task, they are often computationally expensive and lack interpretability. Furthermore, these models typically require supervised training on specific features to recognize and separate objects.

In contrast, biological systems like the visual cortex utilize dense recurrent connectivity and exhibit traveling waves of activity to process visual information. This research explores whether these dynamical principles can be harnessed to perform segmentation in a training-free, mathematically transparent manner. The authors propose a system where segmentation emerges naturally from the interaction of oscillators, rather than through learned pattern matching.

The cv-RNN Framework

The core of this approach is a complex-valued Recurrent Neural Network (cv-RNN). Unlike standard neural networks where nodes output real-valued scalars, each node in this network maintains a state defined by a complex number $z$, representing both an amplitude $|z|$ and a phase $\text{Arg}(z)$.

Architecture of the cv-RNN, showing the mapping from image input to complex node dynamics via a Gaussian adjacency matrix.

The network operates through several key mechanisms:

  1. Frequency Modulation: Input pixel intensities are mapped to the intrinsic frequencies of the nodes. Brighter pixels cause nodes to oscillate at higher frequencies.
  2. Gaussian Recurrent Connectivity: Nodes are connected to their neighbors with weights that decay according to a Gaussian distribution. This local connectivity mimics the architecture of the brain and facilitates the formation of spatial clusters.
  3. Two-Layer Processing: The system uses a hierarchical approach. The first layer employs broad connectivity to synchronize the foreground objects against the background. The second layer then refines this by using narrower connectivity to allow individual objects to develop distinct traveling wave patterns.
  4. Exact Solvability: Because the dynamics are linear, the system's state can be solved at any time step using eigendecomposition. This "exact solvability" allows researchers to analyze the specific eigenvectors responsible for boundary formation, effectively "opening the black box."

Results and Generalization

The cv-RNN was tested on a variety of datasets, ranging from simple geometric shapes to complex natural scenes. Remarkably, the network uses a single, fixed set of weights across all tasks, requiring no training or fine-tuning for different image types.

Segmentation results for synthetic shapes and natural images (coins and a bear), showing the progression from input to phase-based segmentation.

On synthetic datasets (2Shapes and 3Shapes), the model achieved pixel-wise clustering accuracies of 93% and 86%, respectively. More importantly, the system demonstrated robust generalization to natural images. As shown in the results, the cv-RNN successfully segmented a collection of coins and a bear in a natural environment by identifying "pockets" of synchronized activity. The model even handles overlapping objects by utilizing the directional nature of traveling waves; different objects produce distinct phase dynamics even when their pixels occupy the same spatial region.

Discussion and Future Directions

The cv-RNN represents a significant step toward interpretable computer vision. By treating segmentation as a dynamical process, the authors show that complex visual tasks can be solved using fixed, biologically plausible rules. The use of leading eigenvectors to drive segmentation provides a mathematical proof of the system's behavior, a rarity in neural network research.

However, challenges remain. The current model's performance is sensitive to the spatial scale of objects relative to its fixed connectivity. Future iterations may incorporate a hierarchy of layers with varying connectivity scales to handle multi-scale images. Additionally, while the system is excellent at segmenting objects, it does not inherently classify them. Integrating learning mechanisms for object recognition while maintaining the dynamical segmentation core is a promising avenue for future work.

Summary updated

BibTeX
@inproceedings{liboni2025image,
  author = {Luisa H. B. Liboni and Roberto C. Budzinski and Alexandra N. Busch and Sindy Löwe and Thomas A. Keller and Max Welling and Lyle E. Muller},
  title = {{Image segmentation with traveling waves in an exactly solvable recurrent neural network}},
  booktitle = {Proceedings of the National Academy of Sciences},
  year = {2025},
  doi = {10.1073/pnas.2321319121},
}
Figure