Ternary MobileNets via Per-Layer Hybrid Filter Banks

Dibakar Gope, Jesse G. Beu, Urmish Thakker, Matthew Mattina

Abstract

MobileNets are the industry standard for efficient computer vision on mobile devices, yet they remain computationally heavy for ultra-low-power hardware like specialized ASICs and FPGAs. Ternary quantization, which restricts weights to -1, 0, and 1, can significantly reduce power consumption by replacing multiplications with simple additions. However, standard ternary quantization often leads to substantial accuracy drops in fragile architectures like MobileNets. This paper presents a "Hybrid Filter Bank" approach that strategically keeps a small fraction of convolutional filters in full precision while quantizing the remainder. This method achieves a 51% reduction in model size and 28% energy savings on ImageNet with minimal impact on predictive performance.

Introduction: The Challenge of Quantizing MobileNets

While quantization is a common technique for model compression, ternary quantization is particularly difficult for MobileNets. Prior attempts have seen accuracy drops of nearly 10%. A promising technique, StrassenNets, approximates matrix multiplications with ternary values but introduces a "computational explosion" of addition operations, especially in $1 \times 1$ convolutions. Since $1 \times 1$ convolutions constitute the majority of MobileNet's workload, this overhead can negate the benefits of quantization.

Computational overhead of StrassenNets in $3 \times 3$ vs $1 \times 1$ convolutions.

As shown in Figure 1, while the increase in additions for $3 \times 3$ convolutions is manageable (10/9 ratio), it doubles for $1 \times 1$ convolutions (2/1 ratio), creating a significant bottleneck for efficient deployment.

Methodology: Per-Layer Hybrid Filter Banks

The researchers propose Per-Layer Hybrid Filter Banks based on the observation that convolutional filters vary in their sensitivity to quantization. Some filters extract simple features like edges and are highly quantization-tolerant, while others extract complex features and are precision-critical.

The Hybrid Split and Execution

For each layer, a fraction $\alpha$ of the filters is maintained in full precision, while the remaining $1-\alpha$ filters are quantized to ternary values using the StrassenNets approach. During inference, the input feature map is convolved with both sets of filters in parallel. The resulting feature maps are then concatenated before proceeding to the next layer.

Filter Sensitivity Analysis

The authors quantified filter sensitivity by measuring the L2 distance of weights before and after quantization. They found that while most filters undergo minimal change, a few "exceptional" filters are significantly altered.

L2-loss analysis for different filter types under quantization.

Figure 2 illustrates this sensitivity: simple filters like a vertical line detector are easily approximated with low loss, whereas more complex filters like a sharpen filter require more precision (hidden units) to maintain low error. By preserving these critical filters in full precision, the network's overall representational power is maintained.

Key Results and Hardware Efficiency

The hybrid approach was evaluated using MobileNet-V1 (0.5 width multiplier) on the ImageNet dataset. The results demonstrate a compelling trade-off between efficiency and accuracy:

  • Accuracy: The hybrid model achieved 64.69% top-1 accuracy, nearly matching the 65.2% of the full-precision baseline (a marginal loss of 0.51%).
  • Efficiency: Model size was reduced by 51.07%, and energy per inference dropped by 27.98%.
  • Throughput: On a proposed custom hardware accelerator, the hybrid model maintained the same throughput as the baseline, successfully avoiding the slowdown associated with pure StrassenNets.

Conclusion and Future Directions

The Per-Layer Hybrid Filter Bank method provides a viable path for deploying high-performance MobileNets on ultra-low-power hardware. By balancing full-precision and ternary filters, the approach mitigates the accuracy loss typically seen in quantized MobileNets while significantly reducing energy and storage requirements. Future work may explore per-layer tuning of the hybrid ratio ($\alpha$) and the integration of activation quantization to further push the boundaries of on-device efficiency.

Summary updated

BibTeX
@inproceedings{gope2020ternary,
  author = {Dibakar Gope and Jesse G. Beu and Urmish Thakker and Matthew Mattina},
  title = {{Ternary MobileNets via Per-Layer Hybrid Filter Banks}},
  booktitle = {Workshops @ CVPR},
  year = {2020},
  doi = {10.1109/cvprw50498.2020.00362},
}
Figure