Introduction
Human perception is inherently compositional. We do not perceive the world as a static grid of pixels, but as a dynamic collection of distinct objects that persist through time and interact according to physical laws. Replicating this "intuitive physics" in artificial intelligence has traditionally relied on supervised learning, where models are trained on ground-truth labels from physics simulators. However, the true challenge lies in unsupervised discovery: can a model learn to identify objects and their relational rules directly from raw visual input?
Relational Neural Expectation Maximization (R-NEM) addresses this by combining unsupervised clustering with a relational inductive bias. Unlike monolithic models that treat a scene as a single entity, R-NEM decomposes videos into individual object representations, allowing it to model complex interactions like collisions and generalize to scenes with more objects than encountered during training.
The R-NEM Framework
The R-NEM architecture builds upon Neural Expectation Maximization (N-EM) by introducing a dedicated relational component. The process is iterative and follows an encoder-decoder structure designed for predictive coding.
The framework consists of two primary stages:
- Neural Expectation Maximization (N-EM): The model treats image pixels as a mixture of different object components. Through an iterative process analogous to the Expectation-Maximization algorithm, it groups pixels into separate distributed representations ($\theta_k$) for each discovered object.
- Relational Interaction Function ($\Upsilon$): This is the core innovation. Instead of evolving object states in isolation, R-NEM computes pairwise interactions between all discovered objects. An internal attention mechanism determines which interactions are relevant—for instance, focusing on two balls only when a collision is imminent. Because these rules are shared across all pairs, the model is inherently permutation-invariant and can scale to a variable number of objects.
Experimental Evaluation
The authors evaluated R-NEM across three challenging tasks designed to test physical reasoning and generalization:
- Bouncing Balls: Binary videos of four balls with varying physical properties. This task specifically tested the model's ability to extrapolate; models were trained on 4 balls but tested on scenes containing 6 to 8 balls.
- Bouncing Balls with an Invisible Curtain: A variant where balls pass behind an occluder, testing whether the model can maintain internal representations of hidden objects (object permanence).
- Space Invaders (Atari): A visually complex environment where the model must group numerous small, moving entities (aliens, shields, bullets) based on shared motion patterns.
Key Insights and Results
R-NEM demonstrated significant improvements over standard recurrent architectures. In the bouncing balls task, it achieved substantially lower Binomial Cross-Entropy (BCE) loss compared to LSTMs and non-relational RNN-EM models. Crucially, while the performance of standard LSTMs degraded when the number of objects increased, R-NEM's performance remained stable, proving it had learned generalizable physical rules rather than memorizing specific patterns.
Beyond prediction, the model's ability to perform unsupervised segmentation is a key highlight. It achieved an Adjusted Rand Index (ARI) of approximately 0.8, meaning it correctly partitioned pixels into objects 80% of the time without any human-provided labels. As shown in the qualitative results, the model's masks ($\gamma$) become increasingly refined over time, and it successfully maintains separate components ($\psi_k$) for each ball, even through occlusions.
In Space Invaders, the model exhibited emergent grouping behavior. Even when limited to a small number of components, it grouped entities like columns of aliens together based on their synchronized movement, demonstrating a sophisticated understanding of visual regularities.
Conclusion and Future Work
R-NEM proves that compositionality is a powerful inductive bias for unsupervised learning. By forcing the model to represent scenes as sets of interacting parts, it achieves superior generalization and physical reasoning.
However, challenges remain. The current framework struggles with complex, dynamic backgrounds and can become unstable when the number of objects exceeds ten. Future research may focus on scaling these interactions and integrating top-down feedback, allowing the model to group objects based on specific goals or tasks rather than purely visual regularities.
Summary updated