Learning Contextual Dependencies with Convolutional Hierarchical Recurrent Neural Networks

Zhen Zuo, Bing Shuai, Gang Wang, Xiao Liu, Xingxing Wang, Bing Wang

Introduction

Convolutional Neural Networks (CNNs) have revolutionized computer vision by effectively extracting local features through hierarchical layers. However, a fundamental limitation persists: standard CNN operations like convolution and pooling are inherently local. While stacking layers increases the receptive field, these networks often struggle to capture long-range spatial dependencies and multi-scale contextual relationships. For instance, identifying a "beach" requires understanding the relationship between "sand" and "sea," a global context that local filters might miss.

To address this, the paper introduces Convolutional Hierarchical Recurrent Neural Networks (C-HRNNs). This architecture integrates hierarchical recurrent layers into a CNN framework to explicitly model spatial and scale dependencies, significantly improving performance in scene classification tasks.

The C-HRNN Architecture

The C-HRNN framework consists of three primary stages designed to bridge the gap between local feature extraction and global contextual understanding.

The overall framework of C-HRNNs, illustrating the flow from CNN feature maps to hierarchical RNN layers and finally to fully connected layers.

1. CNN Feature Extraction

The model utilizes the first five convolutional layers of a standard backbone (such as AlexNet) to generate mid-level feature maps. These maps serve as the input to the subsequent recurrent stages.

2. Hierarchical Recurrent Layers (HRNN)

The core innovation lies in the HRNN layers, which replace traditional global pooling. The HRNN processes features across two dimensions:

  • Spatial Dependencies: To apply RNNs to 2D spatial data, the authors employ a four-directional scanning strategy. By scanning from top-left to bottom-right, bottom-right to top-left, top-right to bottom-left, and bottom-left to top-right, the network ensures that every region receives context from the entire image.
  • Scale Dependencies: Features are processed at multiple scales (e.g., 6x6, 3x3, 2x2, 1x1). Information from coarser, global scales is fed into finer, local scales as additional input, providing a global "prior" that helps resolve local ambiguities.
The four-directional scanning mechanism used to capture comprehensive spatial context across the 2D feature map.

3. Classification

The outputs from all scales are concatenated and passed through final fully connected (FC) layers for classification. The authors evaluated two recurrent unit types: the Hierarchical Simple Recurrent Network (HSRN) and the more robust Hierarchical Long Short-Term Memory (HLSTM).

Experimental Results

The C-HRNN model was benchmarked against several large-scale datasets, including ILSVRC 2012 (ImageNet), Places 205, SUN 397, and MIT Indoor.

  • Scene Recognition: On the Places 205 dataset, the C-HLSTM achieved an accuracy of 53.91%, outperforming the AlexNet baseline of 50.06%.
  • Object Recognition: On ILSVRC 2012, the model reduced the top-1 error rate to 35.85%, compared to 38.21% for the SPP-net baseline.
  • Fine-grained Scene Analysis: The model showed exceptional performance on the MIT Indoor dataset, reaching 75.67% accuracy—a nearly 7% improvement over previous state-of-the-art methods like MOP-CNN.

Qualitative analysis revealed that C-HRNNs learn more semantically consistent features. By incorporating global context, the network is less likely to misclassify visually similar textures that appear in different environments.

Conclusion

By fusing the local feature extraction power of CNNs with the sequential modeling capabilities of RNNs, C-HRNNs provide a structured way to learn complex spatial and scale dependencies. While LSTMs introduce additional computational overhead, the significant gains in scene classification accuracy demonstrate the vital importance of global context in understanding complex visual environments.

Summary updated

BibTeX
@article{zuo2016learning,
  author = {Zhen Zuo and Bing Shuai and Gang Wang and Xiao Liu and Xingxing Wang and Bing Wang},
  title = {{Learning Contextual Dependencies with Convolutional Hierarchical Recurrent Neural Networks}},
  journal = {IEEE Trans. Image Process.},
  year = {2016},
  doi = {10.1109/tip.2016.2548241},
}
Figure