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), specifically Long Short-Term Memory (LSTM) networks, face significant scalability challenges when processing high-dimensional sequential data like video. The primary bottleneck lies in the massive input-to-hidden weight matrices. This paper explores the "Tensor Ring LSTM" (TR-LSTM), which utilizes Tensor Ring Decomposition (TRD) to compress these matrices. By employing a circular chain of tensor cores, TR-LSTM achieves extreme compression ratios—up to 34,000x—while simultaneously improving recognition accuracy by mitigating overfitting and capturing essential low-rank correlations.

Introduction

Action recognition in video requires processing sequences of high-resolution frames. In a standard LSTM, the input-to-hidden layer must map a high-dimensional input vector (e.g., 50,000+ pixels) to a hidden state. This results in weight matrices with tens of millions of parameters. Such large models are prone to overfitting on limited datasets and are difficult to deploy on resource-constrained edge devices.

While previous methods like Tensor Train (TT) decomposition offered some relief, they suffer from a rigid "olive-shaped" rank distribution due to the requirement that boundary ranks be equal to one. This paper introduces the Tensor Ring (TR) structure to overcome these limitations.

Methodology: Tensor Ring Decomposition

The core innovation is the replacement of standard linear layers with a Tensor Ring Layer (TRL). Unlike the linear chain of the Tensor Train, a Tensor Ring connects the first and last cores in a circular topology.

Graphical representation of matrix and tensor notation used in TRD.

As shown in the figure above, standard matrix operations are reformulated into tensor contractions. In TRD, a high-dimensional weight tensor is decomposed into a sequence of smaller 3rd-order tensors (cores). Because the ring structure removes the boundary rank constraints, it offers greater representational power and flexibility than TT. Mathematically, TRD can be viewed as a linear combination of multiple TT models, allowing it to capture more complex dependencies with fewer parameters.

TR-LSTM Architecture

The TR-LSTM integrates TRL into the LSTM gates. The input and hidden states are reshaped into higher-order tensors, and the weight matrix is represented as a tensor ring. The entire architecture is end-to-end differentiable, allowing the tensor cores to be learned directly via backpropagation. This approach acts as a natural information bottleneck, forcing the model to learn the most salient features of the video data while discarding noise.

Experimental Results

The TR-LSTM was evaluated on the UCF11 and HMDB51 datasets.

Extreme Compression and Accuracy

On the UCF11 dataset, the TR-LSTM demonstrated remarkable efficiency. While a standard LSTM required 59 million parameters, the TR-LSTM achieved superior accuracy using only 1,725 parameters—a compression ratio exceeding 34,000x. In end-to-end training (raw pixels to labels), TR-LSTM reached 86.9% accuracy, significantly outperforming the vanilla LSTM (69.7%) and the TT-LSTM (79.6%).

Integration with Pre-trained Features

When integrated with spatial features from a pre-trained Inception-V3 CNN, the TR-LSTM continued to excel, reaching 93.8% on UCF11 and 63.8% on HMDB51. These results indicate that TR-LSTM can effectively replace standard LSTMs in state-of-the-art pipelines to reduce memory footprint without sacrificing performance.

Conclusion

Tensor Ring Decomposition provides a powerful framework for compressing RNNs. By breaking the structural constraints of previous tensor methods, TR-LSTM achieves unprecedented compression ratios while improving generalization on complex action recognition tasks. Future work will explore applying TRD to even more complex multi-stream architectures and optimizing the computational efficiency of tensor contractions.

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