Introduction
Deep Neural Networks (DNNs) have become the standard for computer vision tasks, yet their deployment remains constrained by significant computational and memory requirements. High-performance models typically necessitate expensive hardware, creating a barrier for edge deployment and resource-limited environments. This paper introduces LightLayers, a method designed to reduce the number of trainable parameters in DNNs by applying matrix factorization to the two most fundamental building blocks of computer vision: the Convolutional (Conv2D) and Dense (Fully-Connected) layers.
Methodology
The core innovation of LightLayers is the decomposition of standard weight matrices into smaller constituent parts. This approach allows for a tunable trade-off between model size and expressive power through a hyperparameter $k$.
LightConv2D
In a standard Conv2D layer, the convolutional kernel represents a significant portion of the model's parameters. LightConv2D applies matrix factorization to these kernels, breaking a large kernel into two smaller parts linked by the hyperparameter $k$. This reduction in parameter count allows the model to capture essential features with a fraction of the original memory footprint.
LightDense
Similarly, the LightDense layer replaces a single large weight matrix $W$ of size $(M \times N)$ with two smaller matrices, $W1$ $(M \times k)$ and $W2$ $(k \times N)$. By choosing a value for $k$ that is significantly smaller than $M$ or $N$, the total number of parameters is drastically reduced. This $k$ hyperparameter acts as a "compression knob," allowing researchers to optimize the model for specific hardware constraints.
Experimental Setup
The researchers evaluated the efficiency of LightLayers by integrating them into a standard CNN architecture featuring two-layer convolutional blocks, batch normalization, ReLU activations, and global average pooling. The models were tested against standard Conv2D and SeparableConv2D layers across four benchmarks:
- MNIST: Handwritten digits (10 classes).
- Fashion MNIST: Clothing items (10 classes).
- CIFAR-10: General objects (10 classes).
- CIFAR-100: Complex objects (100 classes).
Results and Analysis
Experimental results demonstrate that LightLayers consistently achieve high parameter efficiency, often reducing the parameter count by 3x to 4x compared to baseline models.
- MNIST: The model achieved 97.75% accuracy with only 6,135 parameters ($k=3$), a 67% reduction from the baseline Conv2D (18,818 parameters, 98.87% accuracy).
- Fashion MNIST: With $k=5$, the model reached 88.20% accuracy using 9,621 parameters, nearly halving the baseline's size with a minimal 3% drop in accuracy.
- CIFAR-10: LightLayers proved 3.75 times more efficient than standard Conv2D, though the accuracy trade-off was more pronounced (~13% drop).
- CIFAR-100: While maintaining a 4x parameter reduction, the accuracy drop was significant (5.89% vs 32.62% baseline), suggesting that highly complex tasks with many classes require higher $k$ values to maintain feature hierarchies.
Discussion and Conclusion
LightLayers provides a flexible framework for model compression, proving particularly effective for simpler datasets where DNNs are traditionally over-parameterized. The method's primary strength lies in its tunability, allowing for deployment on low-power portable devices and edge hardware.
Future work will focus on scaling LightLayers to high-resolution datasets and developing automated algorithms to determine the optimal value of $k$ during the training process. Additionally, applying these lightweight layers to specialized domains like biomedical imaging could facilitate critical edge-based diagnostic tools.
Summary updated