Manuscript Offprint

arXiv:2608.26233

Pruning Binarized Neural Networks: A Dedicated Framework and Globally Weighted Algorithms

Roan Rubiales, Jean Pierre David

Abstract

Extreme compression of deep neural networks, up to full binarization, dramatically reduces memory footprint and arithmetic complexity, facilitating deployment on constrained edge hardware with field-programmable gate arrays (FPGAs) and microcontrollers. Although combining binarization with pruning promises additional efficiency gains, existing pruning strategies are ill-suited to binarized representations and rarely translate into meaningful hardware savings. We introduce a PyTorch-based, research-oriented framework that incorporates freezing and pruning mechanisms for designing and optimizing binarized neural networks. The framework enables rapid and reproducible evaluation of state-of-the-art approaches and the fast prototyping of new ones. Leveraging this framework, we propose a novel pruning method that accounts for the relative importance of learned parameters across abstraction levels. Such a global weighting mechanism consistently achieves a superior trade-off between model accuracy and pruning rate, achieving a 70% pruning rate on VGG11 with constant accuracy, while state-of-the-art results reach only 41% in the binarized setting.

1 Introduction

Over the past decade, deep-learning-powered technologies have found many applications across a variety of fields in computer science and even in everyday use. Deep learning has become more prevalent across our society thanks to advances in model architecture and in high-performance computing hardware, especially GPUs and AI-specific ASICs. However, deep learning and, more generally, AI require a substantial number of floating-point operations per inference, leading to high power consumption that limits deployment on edge platforms and restricts use in domains such as robotics, medical implants, and AIoT devices.

To address this challenge, the research community has developed methods to adapt state-of-the-art deep learning models to the constraints of edge platforms such as microcontrollers and FPGAs. Among the most widely adopted techniques are quantization (Gholami et al. 2021; Courbariaux, Bengio, and David 2015), pruning (Liang et al. 2021; Chen, Anderson, and Kim 2023; Munagala, Prabhu, and Namboodiri 2020; Li and Ren 2020) and lighter architectures (Sandler et al. 2018; Rastegari et al. 2016; Liu et al. 2020; Zhang et al. 2021; Martinez et al. 2020).

In practice, these techniques can often be combined to reduce model size and FLOPs — sometimes even eliminating floating-point operations altogether — while preserving high accuracy. Nevertheless, they remain insufficient to enable efficient FPGA or microcontroller implementations of complex deep learning models for several reasons. First, the computational complexity of multiply-accumulate (MAC) operations, especially in floating-point arithmetic, is prohibitive on FPGAs, as each floating-point operation incurs a substantial hardware cost. Although integer and fixed-point arithmetic significantly reduce this cost, the sheer number of operations required by most state-of-the-art architectures still exceeds what can be efficiently synthesized on an FPGA. Second, the memory footprint of the weights presents a major bottleneck. On FPGAs, each pipeline stage can access quite limited on-chip storage resources (flip-flops and embedded memories), forcing many models to rely on external memory. This reliance severely degrades performance and negates the advantages of hardware acceleration.

Among the most effective approaches for reducing both the number and complexity of operations is binarization (Courbariaux, Bengio, and David 2015; Rastegari et al. 2016), an extreme form of quantization in which all weights and activations are constrained to 1-bit precision. While not yet widely adopted, binarization minimizes the hardware cost of arithmetic operations and enables highly efficient implementations.

Pruning binarized neural networks is inherently challenging because all weights have the same magnitude. Nevertheless, pruning strategies specifically adapted to this setting can achieve significantly higher compression rates without degrading model accuracy. Prior work further demonstrates that pruning can reduce not only model size but also generalization error, acting as an implicit regularizer in binarized networks.

Despite its effectiveness and widespread use, joint pruning and binarization remain poorly supported by mainstream deep learning frameworks, posing substantial challenges for research and development in this area.

In this paper, we propose three contributions addressing these challenges:

• We propose a proof-of-concept PyTorch framework that enables hardware-oriented training of binarized neural networks and their adaptation via customizable pruning and freezing (sparse training) algorithms.

• We formulate a global weighting mechanism for magnitude-based pruning algorithms that guides the pruning process, yielding a superior ratio of pruning rate to accuracy.

• Built on the two previous contributions, we propose three binary-aware pruning algorithms to optimize and convert a full-precision pretrained neural network into a binary one.

The rest of this paper is organized as follows. Section 2 reviews related work on both Binary Neural Networks (BNNs) and pruning algorithms. Sections 3 and 4 describe our proposed framework and pruning algorithms. The test methodology and results are presented in Section 5 and discussed in Section 6. The last section concludes with suggestions for future work.

References (17)