Abstract
Deep neural networks are often over-parameterized, posing challenges for deployment on resource-constrained hardware. While tensor decomposition offers a path toward model compression, determining the optimal tensor rank remains a difficult, manual process. This paper presents LR-BTNN, a framework that automates rank selection by representing weights within a Bayesian model using Tensor Train (TT) decomposition. By employing hierarchical sparsity-inducing priors and Stein Variational Gradient Descent (SVGD), the proposed method achieves significant compression—up to 137× on standard benchmarks—while maintaining or improving accuracy and providing robust uncertainty quantification.
Introduction
The deployment of deep learning models on edge devices, such as smartphones and IoT sensors, is frequently hindered by their massive memory and computational footprints. Tensor decomposition techniques, particularly the Tensor Train (TT) format, have emerged as a powerful tool for compressing weight matrices. However, these methods typically suffer from a "Goldilocks" problem: choosing a rank that is too high yields insufficient compression, while a rank that is too low degrades model performance. Finding the optimal rank is an NP-hard problem, often requiring exhaustive manual tuning or expensive "train-then-compress" pipelines.
This work addresses these challenges by integrating rank selection directly into the training process. By treating the tensor ranks as latent variables within a Bayesian framework, the model can automatically "shrink" its complexity based on the data.
Methodology
Tensor Train Decomposition and Hierarchical Priors
The core of the LR-BTNN approach is the representation of weight matrices in the TT-format. To enable automatic rank selection, the authors introduce a hierarchical Bayesian model. They place a Normal prior on the tensor cores, which is governed by a non-negative vector parameter ($\lambda$) following a Gamma distribution.
As shown in the graphical model above, the parameters $\lambda$ act as switches. If an entry in $\lambda$ shrinks toward zero during training, it effectively "turns off" the corresponding slice of the tensor core, thereby reducing the effective rank of the model.
Coupled Sparsity-Inducing Priors
A critical innovation in this work is the use of coupled priors. In a Tensor Train, the rank between two adjacent cores is shared; specifically, the number of columns in core $\mathcal{G}_k$ must match the number of rows in core $\mathcal{G}_{k+1}$. To reduce the rank effectively, the model must simultaneously shrink these corresponding dimensions.
By coupling the priors across adjacent cores, the framework ensures that the sparsity-inducing mechanism operates on the shared rank dimension, allowing the model to prune unnecessary components in a mathematically consistent manner.
Inference via Stein Variational Gradient Descent (SVGD)
To perform Bayesian inference at scale, the authors utilize Stein Variational Gradient Descent (SVGD). Unlike traditional Markov Chain Monte Carlo (MCMC) methods, which are computationally prohibitive for deep learning, SVGD provides a particle-based approximation of the posterior distribution. This allows the model to capture uncertainty while remaining computationally efficient. For applications requiring only a single compact model, a Maximum A Posteriori (MAP) estimation variant is also provided.
Experimental Evaluation
The researchers evaluated LR-BTNN on several computer vision benchmarks, comparing it against standard Bayesian Neural Networks (BNN) and non-adaptive Bayesian Tensorized Neural Networks (BTNN).
- MNIST: In a two-layer fully connected network, LR-BTNN achieved a 137× reduction in parameters. Remarkably, the compressed model also improved accuracy to 97.8%, compared to 92.1% for the standard BNN. The effective rank of the first layer automatically dropped from an initial maximum of 20 to approximately 5–8.
- CIFAR-10 (CNN): On a 6-layer convolutional neural network, the method produced a model 15.8× more compact than the baseline while maintaining competitive accuracy.
- CIFAR-10 (ResNet-110): Even on the already efficient ResNet-110 architecture, LR-BTNN achieved a 7.4× reduction in parameters.
Discussion and Key Insights
The primary advantage of LR-BTNN is its ability to perform end-to-end efficiency tuning. By training the compressed representation directly, it avoids the overhead of training a full-sized model first. Furthermore, the Bayesian nature of the model provides inherent uncertainty quantification, allowing the system to signal when it encounters ambiguous or out-of-distribution data—a vital feature for safety-critical deployments.
However, some limitations remain. The method shows diminishing returns on convolutional layers that are already small, such as those in deep ResNets. Additionally, while SVGD is more efficient than MCMC, it still requires maintaining multiple model instances (particles) during training, which increases memory overhead compared to standard stochastic gradient descent.
Conclusion
LR-BTNN represents a significant step forward in automated model compression. By combining tensor decomposition with coupled hierarchical priors, it eliminates the need for manual rank selection, providing a principled, data-driven approach to creating compact and reliable neural networks.
Summary updated