Abstract
Convolutional neural networks (CNNs) with deep architectures have substantially advanced the state-of-the-art in computer vision tasks. However, deep networks are typically resource-intensive and thus difficult to be deployed on mobile devices. Recently, CNNs with binary weights have shown compelling efficiency to the community, whereas the accuracy of such models is usually unsatisfactory in practice. In this paper, we introduce network sketching as a novel technique of pursuing binary-weight CNNs, targeting at more faithful inference and better trade-off for practical applications. Our basic idea is to exploit binary structure directly in pre-trained filter banks and to produce binary-weight models via tensor expansion. The whole process can be treated as a coarse-to-fine model approximation, akin to the pencil drawing steps of outlining and shading. To further speedup the generated models, namely the sketches, we also propose an associative implementation of binary tensor convolutions. Experimental results demonstrate that a proper sketch of AlexNet (or ResNet) outperforms the existing binary-weight models by large margins on the ImageNet large scale classification task, while the committed memory for network parameters only exceeds a little.
Introduction
Deep Convolutional Neural Networks (CNNs) have revolutionized computer vision, but their massive size makes them difficult to deploy on mobile and edge devices. While Binary Weight Networks (BWNs)—which restrict weights to just +1 and -1—offer massive savings in memory and eliminate expensive floating-point multiplications (FMULs), they typically suffer from a significant "accuracy gap" when trained from scratch on large datasets like ImageNet.
Furthermore, existing binarization methods often lack a clear way to trade off precision for efficiency. Network sketching addresses this by treating binarization as a "coarse-to-fine" approximation problem, similar to how a sketch artist first outlines a shape and then adds shading.
Methodology
The authors introduce two primary innovations to bridge the gap between binary efficiency and high-precision performance.
Filter Approximation via Tensor Expansion
Instead of training a binary network from scratch, the proposed method decomposes pre-trained full-precision filters into a linear combination of multiple binary bases ($W \approx \sum a_j B_j$). This process, illustrated in Figure 2, allows for a flexible trade-off between model fidelity and resource consumption.
Two algorithms are proposed for this expansion:
- Direct Expansion: A greedy approach that iteratively finds the best binary basis to reduce the current approximation error.
- Refined Expansion: An improved version that uses least-squares regression to refine the scale factors ($a_j$) at each step, leading to much faster convergence and higher fidelity.
Associative Implementation
When using multiple binary bases, the number of floating-point additions (FADDs) can increase, potentially creating a new bottleneck. To solve this, the authors exploit the similarity between binary bases by constructing a Dependency Tree using a Minimum Spanning Tree algorithm.
By computing one convolution as a small "correction" of a previous one based on the tree structure shown in Figure 6, the total number of additions required is drastically reduced. This associative implementation provides a 2x to 3x reduction in FADDs across various network layers.
Experimental Results
The researchers evaluated their method on the ImageNet (ILSVRC-2012) dataset, the gold standard for testing the scalability of model compression techniques. The "Network Sketching" approach significantly outperformed previous state-of-the-art binary models:
- AlexNet: A 3-bit refined sketch achieved 55.2% Top-1 accuracy, coming remarkably close to the full-precision reference (57.2%) and beating the previous best binary method (BWN at 53.8%) by a wide margin. It achieved this with roughly 10x fewer parameters (in bits).
- ResNet-18: The sketch achieved 67.8% Top-1 accuracy, nearly matching the 68.8% of the full-precision model, while using 7.4x less memory.
Discussion and Conclusion
The core insight of this work is that binarization does not need to be learned from scratch; pre-trained, over-parameterized models already contain the necessary information. By "sketching" that information using binary building blocks, researchers can precisely tune the trade-off between accuracy and memory footprint.
While the sketching process provides a high-fidelity starting point, the models still require a round of fine-tuning to fully recover accuracy. Future work may explore the sketching of activations to make the entire data path binary, potentially offering even greater speedups on specialized hardware.
Summary updated