Progressive Spatial Recurrent Neural Network for Intra Prediction

Yueyu Hu, Wenhan Yang, Mading Li, Jiaying Liu

In the world of video compression, "Intra Prediction" is the art of guessing what a block of pixels looks like based solely on the pixels already decoded in the same frame. While standards like HEVC (H.265) have become incredibly efficient, they still rely on a relatively rigid set of 35 predefined angular modes. In a recent paper published in IEEE Transactions on Multimedia, researchers from Peking University propose a more flexible, data-driven approach: the Progressive Spatial Recurrent Neural Network (PS-RNN).

TL;DR

The PS-RNN replaces rigid, linear intra-prediction modes with a stacked spatial recurrent neural network that "flows" information from known pixels into unknown blocks. By training with a coding-aware loss function (SATD) and supporting variable block sizes, the method achieves an average 2.5% bit-rate reduction over the HEVC standard.

What Problem Does This Paper Address?

Traditional intra prediction in codecs like HEVC has two major "bottlenecks." First, it usually only looks at a single line of pixels (above and to the left) to make a prediction. This makes it highly sensitive to quantization noise. Second, its 35 modes (like "horizontal," "vertical," or "planar") are too simple to capture complex, non-linear textures like curves or intricate patterns.

While previous deep learning attempts used Fully-Connected (FC) or Convolutional Neural Networks (CNNs), they often struggled with the asymmetry of the problem: we have plenty of information on the top-left but zero information on the bottom-right. CNNs, which apply filters isotropically, don't naturally handle this directional "flow" of information well.

Methods

The authors introduce the Progressive Spatial Recurrent Neural Network (PS-RNN). Its architecture consists of three main stages:

  1. Preprocessing: Convolutional layers extract local features from the reference pixels and transform them into a feature space.
  2. Cascaded PS-RNN Units: This is the core innovation. The network uses three stacked spatial recurrent units. Each unit splits feature maps into horizontal and vertical planes, using Gated Recurrent Units (GRUs) to progressively propagate information across the block. This "progressive" nature allows the network to fill in the hard-to-predict bottom-right pixels by using the previously "predicted" regions as context.
  3. Reconstruction: A final convolutional layer maps the predicted features back into pixel space.

Crucially, the authors move away from the standard Mean Squared Error (MSE) loss. Instead, they use Sum of Absolute Transformed Difference (SATD). Because SATD involves a Hadamard transform, it better correlates with the actual bit-rate cost in a video codec, guiding the network to generate predictions that are not just "accurate" but "easy to compress."

Datasets

The model was trained on a diversified dataset of high-resolution images from the NTIRE 2017 challenge. To make the model robust to real-world coding conditions:

  • Images were downsampled to three different scales.
  • Training pairs were generated by encoding images with HEVC at four different Quantization Parameters (QP 22, 27, 32, 37) to simulate various levels of noise.
  • Evaluation was performed using the HEVC Test Model (HM) 16.15 across standard Common Test Condition (CTC) sequences.

Key Insights and Ideas

  • RNNs over CNNs: The authors argue that RNNs are a more "natural" fit for intra prediction than CNNs. Because intra prediction is a sequential process (predicting unknown from known), the recurrent hidden state acts as a memory that carries structural information across the block.
  • The "Aha" of SATD Loss: The paper demonstrates that MSE is a poor metric for video coding because it treats every pixel error independently. SATD, by looking at the frequency domain, recognizes that correlated errors are cheaper to encode than random noise. Training with SATD directly improved the rate-distortion curve.
  • Variable Block Size Support: Unlike many "toy" AI models that only work on 8x8 blocks, PS-RNN supports the flexible quadtree structure of HEVC (from 4x4 up to 32x32), making it much more practical for actual integration into a codec.

Key Results

  • Bit-rate Savings: The PS-RNN scheme achieved an average 2.5% BD-Rate reduction compared to the HEVC anchor. In some sequences (like "BasketballDrive"), the savings reached as high as 7.8%.
  • Qualitative Superiority: Visual comparisons show that while HEVC often produces blurry or "liney" artifacts on complex textures, PS-RNN can reconstruct sophisticated patterns (like circular rings or diagonal textures) even without the heavy lifting of Rate-Distortion Optimization (RDO).
  • Noise Robustness: The model performed even better in high-noise (high QP) scenarios, proving that the learned convolutional filters are better at "denoising" reference pixels than the simple filters used in standard HEVC.

Limitations and Future Work

The primary hurdle for PS-RNN is computational complexity. The paper notes that the decoding time is significantly higher than standard HEVC (over 200x the anchor). While the authors mention that hardware acceleration (GPUs/TPUs) can mitigate this, the sequential nature of RNNs is inherently harder to parallelize than CNNs.

Future work likely involves optimizing the network structure for real-time performance and exploring how these spatial RNNs can be adapted for the even newer Versatile Video Coding (VVC) standard.

Summary updated

BibTeX
@article{hu2019progressive,
  author = {Yueyu Hu and Wenhan Yang and Mading Li and Jiaying Liu},
  title = {{Progressive Spatial Recurrent Neural Network for Intra Prediction}},
  journal = {IEEE Trans. Multimedia},
  year = {2019},
  url = {https://openreview.net/forum?id=GWV5IzJmgm},
}
Figure