DartsReNet: Exploring New RNN Cells in ReNet Architectures

Brian B. Moser, Federico Raue, Jörn Hees, Andreas DengelICANN 2020

Introduction

While Convolutional Neural Networks (CNNs) are the standard for computer vision, the ReNet architecture presents a compelling alternative by treating images as sequences of patches processed by Recurrent Neural Networks (RNNs). Unlike convolutions, which have a limited receptive field, RNNs can more naturally capture global context across an entire image. However, ReNet has traditionally relied on off-the-shelf RNN cells like LSTMs or GRUs, which were designed for 1D sequential data like text. This research introduces DartsReNet, applying Differentiable Architecture Search (DARTS) to discover RNN cells specifically optimized for the two-dimensional nature of visual data.

The ReNet Framework

The ReNet approach differs fundamentally from the sliding-window mechanism of CNNs. It decomposes an image into a grid of non-overlapping patches. These patches are then processed through a series of bidirectional RNNs. Specifically, the network performs a horizontal sweep across the rows, followed by a vertical sweep across the columns. This two-stage process ensures that every patch's representation incorporates information from the entire image.

The ReNet mechanism: (1) horizontal bidirectional sweep followed by (2) vertical bidirectional sweep across image patches.

To move beyond generic RNN designs, the authors utilized DARTS (Differentiable Architecture Search). Instead of manually engineering cell structures, DARTS treats the architecture search as a continuous optimization problem. It explores a vast search space of operations—including ReLU, Sigmoid, Tanh, and Identity—to find the most efficient configuration for the ReNet backbone.

The study explored three primary variants:

  1. Vanilla ReNet: A standard DARTS search for the optimal RNN cell.
  2. Sigmoid Weighting: A "soft attention" mechanism where the cell learns to weight the importance of specific patches.
  3. Directional Weight Sharing: A parameter-efficient version where forward and backward RNNs share weights.

Key Insights from Discovered Cells

The automated search revealed several surprising trends that deviate from traditional RNN design:

  • The Decline of Tanh: While the Tanh activation is a cornerstone of LSTMs and GRUs, the DARTS-discovered cells almost entirely ignored it, favoring Sigmoid and ReLU instead.
  • Sequential Depth: The discovered cells tended to be deep and sequential rather than branching into parallel paths. This mirrors the evolution of CNNs toward deeper architectures like ResNet.
  • Linearity and Gradient Flow: The inclusion of Identity functions was common, suggesting that maintaining linear paths for gradient flow is as critical in RNN cells as it is in deep CNNs.
An example of a discovered RNN cell, showing a complex, predominantly sequential structure of Sigmoid, ReLU, and Identity operations.

Results and Evaluation

DartsReNet demonstrated significant performance gains over traditional ReNet baselines on standard benchmarks:

  • CIFAR-10: The best DARTS-found cell (using Directional Weight Sharing) achieved 91.00% accuracy, a massive improvement over the 75.30% achieved by a GRU-based baseline. Remarkably, it did so with fewer parameters (4.0M vs. 4.8M).
  • SVHN Generalization: To test if the "visual logic" was universal, cells searched on CIFAR-10 were evaluated on the Street View House Numbers (SVHN) dataset. The Vanilla DartsReNet reached 97.43%, outperforming the GRU baseline of 95.16%, proving that these cells generalize well across different visual domains.

Conclusion and Future Work

DartsReNet proves that specialized RNN cells can drastically improve the performance of sequence-based image models. By automating the design process, the researchers moved away from 1D-legacy architectures to cells that respect the spatial properties of images. Future research will focus on scaling these models to high-resolution datasets like ImageNet and addressing the sequential processing bottlenecks of RNNs to improve training and inference speed.

Summary updated

BibTeX
@misc{moser2020dartsrenet,
  author = {Brian B. Moser and Federico Raue and Jörn Hees and Andreas Dengel},
  title = {{DartsReNet: Exploring New RNN Cells in ReNet Architectures}},
  year = {2020},
  eprint = {2304.05838},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.05838},
}
Figure