Compressing Recurrent Neural Networks with Tensor Ring for Action Recognition

Yu Pan, Jing Xu, Maolin Wang, Jinmian Ye, Fei Wang, Kun Bai, Zenglin Xu

Abstract

Recurrent Neural Networks (RNNs) and Long Short-Term Memory (LSTM) networks are fundamental to sequential data processing but face significant challenges when applied to high-dimensional video data. The massive weight matrices required for processing raw pixels lead to memory bottlenecks and overfitting. This paper presents the Tensor Ring LSTM (TR-LSTM), which utilizes Tensor Ring Decomposition (TRD) to compress these gargantuan matrices into a circular sequence of low-rank core tensors. The proposed TR-LSTM achieves a staggering 34,000x compression ratio while simultaneously improving accuracy on video action recognition tasks, demonstrating that low-rank tensor structures can act as effective regularizers.

Introduction: The Scalability Challenge in Video RNNs

Standard LSTMs suffer from a "weight explosion" when dealing with high-dimensional inputs. For a typical video frame with over 57,000 pixels, a single hidden layer of 256 units requires approximately 14 million parameters. This scale makes deployment on edge devices nearly impossible and often leads to models that memorize noise rather than learning generalizable patterns. While previous compression techniques like Tensor Train (TT) decomposition have been explored, they are limited by a rigid linear structure that constrains the model's expressive power.

Methodology: Tensor Ring Decomposition

The authors introduce the Tensor Ring Layer (TRL) to replace standard linear projections. In this approach, a weight matrix is reshaped into a high-dimensional tensor and decomposed into a sequence of smaller "core" tensors.

Basic tensor notations: (a) a matrix, (b) matrix contraction, and (c) a 3-way tensor.

The "Ring" Innovation

Unlike the Tensor Train (TT), which connects cores in a linear chain, the Tensor Ring connects the first and last core tensors together.

A Tensor Train (TT) decomposition representing a tensor as a linear sequence of cores.

This circularity addresses the "olive problem" inherent in TT models, where ranks are forced to be small at the boundaries and large in the middle. The Tensor Ring allows for more uniform and flexible rank settings, providing a more expressive representation that can be trained end-to-end via backpropagation.

Experimental Results and Insights

The TR-LSTM was evaluated on the UCF11 and HMDB51 video action recognition benchmarks.

Extreme Compression and Performance

On the UCF11 dataset, a vanilla LSTM with 59 million parameters achieved 69.7% accuracy. In contrast, the TR-LSTM reached 86.9% accuracy using only 1,725 parameters. This represents a compression ratio of over 34,000x. When integrated with a pre-trained Inception-V3 feature extractor, the model reached a state-of-the-art 93.8% accuracy on UCF11.

Compression as Regularization

A key finding is that the compressed TR-LSTM often outperforms the full-rank vanilla model. By forcing the weights into a low-rank circular structure, the authors created an "information bottleneck" that filters out high-frequency noise and prevents overfitting, leading to superior generalization on small-to-medium datasets.

Conclusion and Future Work

Tensor Ring Decomposition provides a powerful framework for compressing deep learning models without sacrificing—and often improving—performance. While the current implementation requires manual rank selection and faces computational complexity in the backward pass ($O(R^5)$), it opens new doors for deploying sophisticated video recognition models on resource-constrained hardware. Future research will focus on automated rank determination and extending the ring structure to other architectures like Attention-based models.

Summary updated

BibTeX
@inproceedings{pan2019compressing,
  author = {Yu Pan and Jing Xu and Maolin Wang and Jinmian Ye and Fei Wang and Kun Bai and Zenglin Xu},
  title = {{Compressing Recurrent Neural Networks with Tensor Ring for Action Recognition}},
  booktitle = {AAAI Conference on Artificial Intelligence},
  year = {2019},
  doi = {10.1609/aaai.v33i01.33014683},
}
Figure