TL;DR
This paper introduces the Convolutional Learnable-Group Weightless Neural Network (CLGN), a novel architecture that integrates convolutional layers into Weightless Neural Networks (WNNs) using LUTs. CLGN achieves superior accuracy and better resource efficiency compared to existing WNNs, making it highly suitable for edge computing devices.
What Problem Does This Paper Address?
Traditional Deep Neural Networks (DNNs) often require significant computational resources and memory, making them unsuitable for deployment on resource-constrained edge devices. While Weightless Neural Networks (WNNs), which use Lookup Tables (LUTs) for computation, offer a more compact alternative, they have historically struggled to achieve competitive accuracy. Existing WNNs either require very large models to boost accuracy or employ training methods that are challenging to implement and can lead to poor generalization. This paper aims to bridge this gap by developing a WNN architecture that combines the efficiency of WNNs with the representational power of convolutional operations, leading to higher accuracy with reduced resource consumption.
Methods
The core innovation is the Convolutional Learnable-Group Weightless Neural Network (CLGN). Key components include:
- LUT-n-Based Convolutional Layers: Instead of traditional convolutional kernels, CLGN uses LUTs to perform convolution. This allows for the direct implementation of convolutional operations using the native logic elements of hardware like FPGAs. To handle larger receptive fields than a single LUT can cover, multiple LUTs are used per binary map, each sampling different input combinations.
- Multi-threshold Binarization and Thresholded Pooling: Input features are binarized using multiple thresholds to preserve magnitude information. A threshold pooling layer is then used to aggregate binary convolutional outputs, enhancing robustness and controlling dimensionality.
- Learnable GroupSum Connections: This module aggregates the outputs of the WNN's LUTs. Unlike traditional GroupSum modules with fixed connections, CLGN's GroupSum uses learnable connections, allowing for more flexible and task-adaptive aggregation of features. Sparse connections are enforced by selecting only the top-C connections.
- Hierarchical Training Strategy: CLGN employs a two-stage training process. First, the convolutional and pooling layers are trained using a lightweight MLP teacher to guide the learning of discrete operators. Once trained, these layers are frozen, and the WNN and GroupSum modules are trained. This approach effectively disentangles feature extraction from classification.
Datasets
The paper evaluates CLGN on the following datasets:
- MNIST
- KMNIST
- SVHN
- CIFAR-10
- Speech Commands
These are standard benchmarks for evaluating neural network performance, particularly for image and audio recognition tasks.
Key Insights and Ideas
- Convolutional Operations are Beneficial for WNNs: Integrating convolutional layers, traditionally absent in WNNs, significantly boosts accuracy without a proportional increase in resource usage. This suggests that spatial feature extraction is crucial even for compact, binary networks.
- LUTs as Building Blocks for Convolution: Using LUTs directly for convolutional kernels is a natural fit for hardware acceleration (like FPGAs) and allows for more efficient implementation compared to emulating convolutions with complex logic.
- Learnable Connections are Key for GroupSum: Making the GroupSum connections learnable, rather than fixed, allows for better feature aggregation and improved model performance. This highlights the importance of adaptive mechanisms in WNNs.
- Hierarchical Training is Effective for Discrete Networks: The two-stage training approach, using an MLP to guide the initial training of discrete operators, effectively overcomes the challenges of training non-differentiable components in WNNs.
Key Results
- Superior Accuracy: CLGN consistently achieves higher test accuracy across various datasets compared to existing WNN approaches, often approaching or exceeding the performance of BNNs on some tasks.
- Reduced Resource Consumption: CLGN uses significantly fewer LUTs and has a smaller parameter size compared to many state-of-the-art WNNs while achieving better accuracy.
- FPGA Performance: On an FPGA, CLGN demonstrates a favorable trade-off between accuracy and resource usage, outperforming other WNNs in accuracy while maintaining competitive LUT counts.
- Microprocessor Performance: On a Raspberry Pi 4B, CLGN shows competitive memory usage and a manageable increase in latency compared to other WNNs, especially considering its higher accuracy.
- Trade-off: While CLGN offers improved accuracy and efficiency, it does incur a slight reduction in inference speed compared to some simpler WNNs due to the added convolutional operations.
Limitations and Future Work
- Inference Latency: While CLGN achieves better accuracy with fewer resources, its inference latency is higher than some simpler WNN models due to the convolutional operations. The authors suggest that LGN (a variant without convolutional layers) might be more suitable for applications where extreme inference throughput or minimal latency is paramount.
- MLP Role: The MLP used in the hierarchical training strategy provides moderate accuracy gains. The authors suggest future work could explore more principled training strategies to further enhance the optimization of discrete convolutional operators.
- Further Exploration of Learnable GroupSum: The paper provides a detailed analysis of the learnable GroupSum mechanism, suggesting it's a key contributor to CLGN's performance. Further research could explore its application in other WNN architectures.
Summary updated