Recurrent Relational Networks

Rasmus Berg Palm, Ulrich Paquet, Ole Winther

The Challenge of Multi-Step Reasoning

Standard deep learning architectures, like Multi-Layer Perceptrons (MLPs) or Convolutional Neural Networks (CNNs), typically process information in a single forward pass. While powerful, these models struggle with tasks requiring chains of interdependent inference.

Consider a Sudoku puzzle: you cannot solve the whole grid at once. Instead, you look at one cell, see how it constrains its neighbors, and iteratively narrow down the possibilities. Traditional neural networks lack this "object-centric" inductive bias—the understanding that the world is made of discrete objects that affect each other over time. Previous attempts to solve this, like the standard "Relational Network" (RN), were limited to just one or two steps of reasoning, making them insufficient for complex logic.

Recurrent Relational Networks (RRNs) extend standard relational modules by allowing them to iterate over multiple "reasoning steps." By passing messages over a graph of objects, RRNs can solve complex logic puzzles and multi-step reasoning tasks that stump traditional "one-shot" neural networks.

The Recurrent Relational Network (RRN)

The authors introduce the RRN, which treats a problem as a graph where nodes represent objects and edges represent their relationships.

RRN Message Passing Architecture
  1. Message Passing: At each time step $t$, every node $i$ sends a message to its neighbors. This message is calculated by an MLP based on the current states of both the sending and receiving nodes.
  2. Recurrent Updates: Each node collects all incoming messages and updates its internal hidden state using a recurrent cell (like a GRU or LSTM). Crucially, the original input features are "re-injected" at every step to prevent the model from forgetting the initial problem constraints.
  3. Convergent Training: Unlike standard networks that only care about the final output, RRNs are trained to minimize the loss at every step. This encourages the network to learn a stable, convergent algorithm—essentially a "neural program"—that moves closer to the solution with every iteration.

Putting RRNs to the Test

The researchers evaluated the RRN on three distinct benchmarks, yielding several key insights:

1. bAbI: Textual Question-Answering

bAbI is a classic dataset for textual question-answering (e.g., "Where is the football?"). The RRN achieved state-of-the-art results, consistently solving 20/20 tasks. Surprisingly, the RRN solved all 20 tasks using only a single step of relational reasoning. This suggests that bAbI might not actually require complex multi-step logic, or that the model learned to compress multiple steps into one.

2. Pretty-CLEVR: Controlling Reasoning Complexity

Because bAbI proved too easy, the authors introduced Pretty-CLEVR, a new diagnostic dataset. It requires the model to find an object by following a chain of "jumps" (e.g., "Starting at the red cube, what is the shape of the closest object? Now what is the closest to that?"). This allowed researchers to precisely control the number of reasoning steps required.

Results demonstrated that RRNs scale linearly with the complexity of the task. Standard Relational Networks failed as the number of "jumps" increased, but RRNs maintained high accuracy simply by running for more steps.

3. Sudoku: Learning a Convergent Algorithm

The most impressive demonstration of the RRN was on 9x9 Sudoku grids with varying difficulty (17 to 34 "givens"). The model solved 96.6% of the hardest Sudoku puzzles (those with only 17 numbers provided), significantly outperforming other differentiable methods like Loopy Belief Propagation.

Sudoku Accuracy vs. Reasoning Steps

Crucially, while the model was trained for only 32 steps, it continued to improve if run for 64 steps at test time. This proves the model isn't just memorizing a sequence; it has learned a general-purpose, convergent solving strategy.

Limitations and Future Work

While RRNs are powerful, they have a few notable constraints:

  • Graph Dependency: The model requires a predefined graph. If the relationships between objects are unknown or highly dynamic, the model must default to a "fully connected" graph, which is computationally expensive ($O(N^2)$ edges).
  • Greedy Bias: Training with a loss at every step might encourage the model to find "greedy" solutions that work in the short term but lead to local minima in more complex puzzles.

The authors suggest that future RRNs could be integrated into larger systems where a "perceptual front-end" (like a CNN) extracts objects from raw images, and the RRN performs the high-level logic over those extracted representations.

Summary updated

BibTeX
@inproceedings{palm2018recurrent,
  author = {Rasmus Berg Palm and Ulrich Paquet and Ole Winther},
  title = {{Recurrent Relational Networks}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2018},
  url = {https://openreview.net/forum?id=B1WkMY-OWB},
}
Figure