TL;DR
This paper demonstrates that Matrix Product State (MPS) tensor train decompositions are superior to the more common Matrix Product Operator (MPO) approach for compressing LSTM networks. By leveraging MPS, the authors achieve significant parameter reduction and faster inference speeds on natural language processing (NLP) tasks, maintaining performance levels close to full-sized models through the use of knowledge distillation.
What Problem Does This Paper Address?
As AI moves from the cloud to the "edge" (mobile phones, IoT devices, and embedded systems), the massive size of state-of-the-art models becomes a major roadblock. While Convolutional Neural Networks (CNNs) have seen success with various compression techniques, Recurrent Neural Networks (RNNs)—specifically LSTMs—remain difficult to shrink without significant accuracy loss.
The authors identify a specific bottleneck in current RNN compression: most literature relies on Matrix Product Operators (MPO). While MPOs reduce storage, they often require the weight matrix to be reconstructed during inference, which consumes significant time and memory. The authors propose Matrix Product State (MPS) as a more efficient alternative that avoids this reconstruction step entirely.
Methods
The core of the paper is the application of Tensor Train Decompositions to the weight matrices of LSTMs.
- MPS vs. MPO: The authors provide a theoretical analysis (Theorem 1) showing that MPS is fundamentally more efficient for inference. Unlike MPO, which treats the weight matrix as an operator, MPS treats it as a state, allowing the model to compute the product of a weight matrix and an input vector ($Wx$) without ever building the full, large matrix $W$.
- Initialization and Normalization: Training compressed tensors is notoriously unstable. The authors introduce a specific variance-scaling initialization for tensor cores and utilize Layer Normalization to stabilize the training process.
- Knowledge Distillation (KD): To bridge the performance gap between a tiny compressed model and a large "teacher" model, the authors use two KD techniques:
- KDW (Knowledge Distillation on Weights): Penalizing the difference between the student's and teacher's weights.
- KDA (Knowledge Distillation on Activations): Penalizing the difference between the linear activations of the two models.
Datasets
The researchers evaluated their approach on two standard NLP language modeling benchmarks:
- Penn Treebank (PTB): A smaller, classic dataset with a 10,000-word vocabulary.
- Google One Billion Words: A massive, high-complexity dataset where they used the 100,000 most frequent words for their vocabulary.
Key Insights and Ideas
- The Reconstruction Trap: The "aha moment" is the realization that MPO's storage efficiency is deceptive if you still have to pay the computational cost of reconstructing the matrix at runtime. MPS bypasses this, making it the "right answer" for edge deployment.
- KD is Essential for High Compression: As shown in the perplexity boxplots, performance degrades as compression increases. However, Knowledge Distillation (especially on activations) significantly flattens this curve, allowing for much higher compression rates with minimal "perplexity penalty."
- Permutation Matters: The authors note that the efficiency of these decompositions depends on how the dimensions of the weight matrix are mapped into the tensor cores. Combining row and column dimensions strategically is key to keeping the "inner ranks" small.
Key Results
- Inference Speedup: In head-to-head benchmarks on a CPU, a 4-core MPS model was roughly 2.6x faster than a 2-core MPO model (1.39s vs 3.64s) at a similar compression rate.
- Competitive Accuracy: On the Penn Treebank dataset, the full model achieved a perplexity of 79.91. Using MPO with distillation on weights (KDW), they achieved a nearly identical perplexity of 79.95 at a 1.78x compression rate.
- Scalability: On the massive Google corpus, the MPO models reached a minimum perplexity of 65.9 (compared to the full model's 67.48), while MPS models remained competitive at 69.4, proving the techniques scale to large-scale real-world data.
Limitations and Future Work
- Hardware Optimization: While the theoretical number of operations is lower for MPS, current deep learning libraries (like PyTorch or TensorFlow) are highly optimized for standard matrix multiplications. Realizing the full speedup of tensor decompositions often requires custom kernels.
- Automated Architecture Search: The authors manually chose the number of cores and dimensions (as seen in the table below). Future work could involve automated methods to find the optimal tensor shape for a given task.
Summary updated