Training compact convolutional neural networks (CNNs) presents a fundamental paradox. We need small models for mobile phones and embedded devices because they are fast and memory-efficient. However, these "thin and shallow" networks are notoriously difficult to train from scratch. Traditionally, developers resort to Knowledge Distillation (KD)—using a massive "teacher" model to babysit the small "student" model—or complex pruning techniques.
ExpandNets offers a clever alternative: Linear Over-parameterization.
TL;DR
ExpandNets improves the performance of compact networks by "expanding" their layers into multiple consecutive linear layers during training. This creates a temporary, over-parameterized model that is easier to optimize. Once training is finished, these layers are algebraically collapsed back into the original compact architecture for inference, providing "big model" accuracy with "small model" efficiency.
The Problem: Why are Small Networks Hard to Train?
In deep learning, "wider and deeper" has long been the mantra for better accuracy. Over-parameterization creates a smoother loss landscape, making it easier for optimization algorithms like Stochastic Gradient Descent (SGD) to find good solutions.
When we design a compact network for an edge device, we intentionally strip away that over-parameterization. The resulting "SmallNets" often get stuck in poor local minima or suffer from "gradient confusion," a phenomenon where different mini-batches provide conflicting update signals to the optimizer. The authors sought a way to give these small models the optimization benefits of a large model without actually making the final deployed product any bigger.
Methods: Linear Expansion and Contraction
The core idea behind ExpandNets is linear expansion. Mathematically, two linear operations in a row (like two matrix multiplications or two convolutions without an activation function in between) are equivalent to a single linear operation.
The authors propose three specific strategies to expand a compact network during training:
- Expanding General Convolutions (Expand-CL): A single $k \times k$ convolution is replaced by a sequence of three: a $1 \times 1$ (to expand channels), a $k \times k$, and another $1 \times 1$ (to project back).
- Expanding Kernels (Expand-CK): A large kernel (like $7 \times 7$) is replaced by a series of $3 \times 3$ convolutions. This maintains the same receptive field but adds more parameters.
- Expanding Fully-Connected Layers (Expand-FC): A single linear layer is split into two or three consecutive linear layers.
The "Magic" Trick: Contraction Crucially, there are no nonlinearities (like ReLU) between these expanded layers. Because they are purely linear, you can multiply the weights together after training to "contract" the expanded stack back into a single layer. This contracted layer is identical in shape to the original compact model. The user gets the exact architecture they asked for, but with better-trained weights.
Key Insights and Ideas
- Optimization over Capacity: The benefit of ExpandNets isn't that it "learns more" (since the final capacity is exactly the same), but that it "learns better." The expanded parameter space allows the optimizer to navigate the loss landscape more effectively.
- Reducing Gradient Confusion: The authors empirically show that ExpandNets have higher "gradient consistency." In a standard small net, different batches of data often try to pull the weights in wildly different directions. Expansion stabilizes this process, leading to smoother convergence.
- Flatter Minima: Visualization of the loss landscapes shows that ExpandNets converge to "flatter" minima. In deep learning theory, flatter minima are strongly associated with better generalization to new, unseen data.
- Complementary to Distillation: You don't have to choose between ExpandNets and Knowledge Distillation. Using both together yields the best results, though ExpandNets alone often beats standard KD.
Key Results
The authors validated ExpandNets across a wide range of computer vision tasks and architectures (SmallNet, MobileNet, YOLO-LITE, U-Net), showing consistent gains:
- Image Classification (ImageNet): A MobileNet trained with ExpandNets saw a 2.92% jump in top-1 accuracy (66.48% to 69.40%) without changing the inference cost at all.
- Object Detection (PASCAL VOC): YOLO-LITE's mean Average Precision (mAP) improved from 27.34% to 30.97%.
- Semantic Segmentation (Cityscapes): U-Net improved its mIOU from 56.59 to 57.85.
Limitations and Future Work
While powerful, the approach has trade-offs. You pay for the accuracy boost with longer training times and higher GPU memory usage during the training phase. Additionally, the paper notes that expansion is most effective on compact models; for already massive networks, the benefits are less pronounced.
ExpandNets proves that you don't always need a massive "teacher" to train a small model. Sometimes, you just need to give the model a little more room to maneuver during its formative training phase.
Summary updated