Tensortrim: dynamic tensor-train decomposition for efficient neural network compression
摘要
The compression of machine learning models has become increasingly crucial in the era of edge computing and resource-constrained devices. As models grow in complexity and size, their deployment on mobile devices, IoT sensors, and other limited-resource environments becomes challenging. Effective model compression reduces memory and energy consumption, shortens inference latency, and enables real-time applications on a wider range of devices. Within this context, low-rank decomposition is a widely adopted technique that reduces parameters by factorizing large weight tensors into low-rank components. However, its effectiveness hinges on selecting appropriate tensor ranks for each decomposed tensor, a task that remains difficult and is often heuristic. In this work, we propose an automatic rank determination method, Layer-Wise Imprinting Quantitation (LWIQ), built on Tensor Train(TT) decomposition, to address this problem. LWIQ integrates proxy classifiers at the layer level, evaluates each layer’s impact on end-to-end accuracy, and derives tensor ranks automatically from the computed layer importance. The LWIQ method provides two practical advantages for deployment. First, it is budget-aware: a single scaling factor reprofiles the per-layer ranks to accommodate various computational budget constraints, eliminating the need for repetitive rank recalculations across different budget scenarios. Second, leveraging LWIQ’s low-shot nature, we introduce LWIQ-Sample, which estimates per-layer ranks from a small, representative subset of data rather than the full training set, preserving fidelity while substantially reducing selection overhead. Experiments on the CIFAR and ImageNet datasets demonstrate that our LWIQ approach achieves superior rank-search efficiency by carrying out decomposition before the standard training phase. Notably, LWIQ requires fewer than 30 additional training epochs on CIFAR and fewer than 10 on ImageNet to determine these rank configurations. These results underscore the potential of our LWIQ approach in advancing the field of model compression by enabling more informed tensor rank adjustments, thereby improving the deployability of modern models across resource-constrained devices and applications.