Sensitivity-Aware Mixed-Precision Quantization and Width Optimization of Deep Neural Networks Through Cluster-Based Tree-Structured Parzen Estimation

Seyedarmin Azizi, Mahdi Nazemi, Arash Fayyazi, Massoud Pedram · OpenReview

Abstract

As the complexity and computational demands of deep learning models rise, the need for effective optimization methods for neural network designs becomes paramount. This work introduces an innovative search mechanism for automatically selecting the best bit-width and layer-width for individual neural network layers. This leads to a marked enhancement in deep neural network efficiency. The search domain is strategically reduced by leveraging Hessian-based pruning, ensuring the removal of non-crucial parameters. Subsequently, we detail the development of surrogate models for favorable and unfavorable outcomes by employing a cluster-based tree-structured Parzen estimator. This strategy allows for a streamlined exploration of architectural possibilities and swift pinpointing of top-performing designs. Through rigorous testing on well-known datasets, our method proves its distinct advantage over existing methods. Compared to leading compression strategies, our approach records an impressive 20% decrease in model size without compromising accuracy. Additionally, our method boasts a 12x reduction in search time relative to the best search-focused strategies currently available. As a result, our proposed method represents a leap forward in neural network design optimization, paving the way for quick model design and implementation in settings with limited resources, thereby propelling the potential of scalable deep learning solutions.

Introduction

Deploying complex deep neural networks (DNNs) on resource-constrained "edge" devices, such as smartphones or IoT sensors, presents a significant challenge. While techniques like quantization (reducing bit-precision) and structured pruning (removing filters) are effective, finding the optimal configuration for every layer is a "needle in a haystack" problem. The search space grows exponentially with network depth, and many DNNs exhibit "flat loss landscapes" where numerous configurations yield similar performance, complicating standard optimization algorithms. This paper introduces a highly efficient search mechanism that simultaneously optimizes the bit-width and layer-width of DNNs to overcome these hurdles.

Methodology

The proposed framework addresses these challenges through a multi-stage optimization process:

  1. Hessian-Based Search Space Pruning: Second-order derivatives (the Hessian matrix) of the loss function are used to rank layer sensitivity. By applying k-means clustering to the Hessian trace values, the search space is strategically restricted, focusing higher bit-width candidates only on the most sensitive layers.
  2. k-Means Tree-Structured Parzen Estimation (TPE): The core of the search is an enhanced Bayesian optimization method. Unlike standard TPE, which uses a fixed threshold to separate "good" and "bad" configurations, this approach uses k-means clustering to define these boundaries dynamically. This provides a cleaner signal for the optimizer, especially in flat landscapes, and includes an annealing process to refine the search.
  3. Joint Optimization and the "Widening Paradox": The framework simultaneously optimizes bit-width and layer-width. A key insight is that increasing a layer's width while decreasing its bit-width can sometimes result in a model that is both more accurate and more hardware-efficient than a standard narrow, high-precision model.
Algorithm 1: Optimization framework using k-means TPE.

Results and Discussion

The method was evaluated across several benchmarks, including ImageNet (ResNet-18, MobileNetV2), CIFAR-10/100, and general machine learning tasks (Iris, Titanic) to demonstrate convergence speed. Key results include:

  • Search Efficiency: The approach achieved a 12x average speedup in search time compared to existing sequential model-based optimization methods.
  • Model Compression: On ImageNet with ResNet-18, model size was reduced to just 4.01MB (a 10.9x improvement in latency over a 16-bit baseline) while maintaining 70.8% accuracy.
  • Convergence Speed: The k-means TPE algorithm demonstrated significantly faster convergence toward optimal configurations compared to standard TPE, as evidenced in mixed-precision quantization tasks.
Convergence of k-means TPE vs. standard TPE on ResNet18.

Compared to state-of-the-art methods like BOMP-NAS, the proposed approach produced ResNet-20 models on CIFAR-10 that were 31.5% smaller while completing the search 9.23x faster. For the notoriously difficult MobileNetV2, the method achieved a compression to 1.5MB with only a 0.6% accuracy drop on ImageNet.

Conclusion

This research represents a significant advancement in neural network design optimization. By leveraging Hessian-based pruning and a novel k-means TPE, the approach significantly reduces search time and model size without sacrificing accuracy. While the current hardware-aware objective is tailored to Xilinx FPGA architectures, the underlying search logic is universal. Future work will explore applying this joint optimization to more complex architectures, such as Transformers, where the interplay between attention mechanisms and quantization remains an open area of research.

Summary updated

BibTeX
@misc{azizi2023sensitivity,
  author = {Seyedarmin Azizi and Mahdi Nazemi and Arash Fayyazi and Massoud Pedram},
  title = {{Sensitivity-Aware Mixed-Precision Quantization and Width Optimization of Deep Neural Networks Through Cluster-Based Tree-Structured Parzen Estimation}},
  year = {2023},
  eprint = {2308.06422},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2308.06422},
}
Figure