NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Neural Network Compression Framework for Fast Model Inference

Alexander Kozlov, Ivan Lazarevich, Vasily Shamporov, Nikolay Lyalyushkin, Yury Gorbachev

Introduction

Deep neural networks (DNNs) have achieved remarkable success across various domains, yet their deployment on resource-constrained edge devices remains a significant challenge due to high computational and memory requirements. To bridge this gap, Intel researchers introduced the Neural Network Compression Framework (NNCF), an open-source tool designed to streamline the optimization of PyTorch models. NNCF enables developers to apply advanced compression techniques—such as quantization, pruning, and binarization—directly within the training pipeline, ensuring high inference speeds without compromising model accuracy.

The NNCF Framework and Methodology

NNCF operates by wrapping standard PyTorch models in an NNCFNetwork layer. This abstraction allows the framework to trace the execution graph and dynamically inject compression-enabling logic into the model's operations. Unlike traditional tools that require manual code modifications, NNCF's automatic graph patching modifies PyTorch operators at runtime, allowing it to be integrated into existing training pipelines with minimal effort.

The NNCF training and compression pipeline, illustrating the flow from FP32 models to compressed, OpenVINO-compatible outputs.

The framework supports four primary compression strategies:

  1. Quantization: Utilizing Quantization-Aware Training (QAT) to convert 32-bit floating-point values into lower bit-widths (e.g., INT8 or INT4). By simulating compression during training via "FakeQuantization" layers, weights can adapt to precision loss.
  2. Binarization: An extreme form of quantization where weights and activations are represented by a single bit.
  3. Sparsity: Reducing model size by zeroing out redundant weights through magnitude-based or regularization-based pruning.
  4. Filter Pruning: A structured pruning approach that removes entire convolutional filters to decrease total floating-point operations (FLOPs).

A key innovation of NNCF is Algorithm Stacking, which allows multiple compression methods to be applied concurrently—for example, combining weight sparsity with INT8 quantization for maximum efficiency.

Key Insights and Implementation

The framework addresses critical nuances in low-precision arithmetic. While symmetric quantization is hardware-efficient, NNCF highlights that asymmetric quantization (incorporating a zero-point offset) is significantly better at preserving accuracy when dropping to very low bit-widths like 4-bit. Furthermore, NNCF can utilize Hessian-based mixed precision to automatically identify layers sensitive to precision loss, keeping them at 8-bit while more robust layers are compressed further to 4-bit.

Experimental Results

The effectiveness of NNCF was validated across a diverse set of tasks, including image classification (ImageNet), object detection (VOC, COCO), semantic segmentation (Camvid, Mapillary Vistas), and natural language processing (SQuAD, WikiText-2).

Comprehensive results for INT8 quantization across various architectures and tasks, showing minimal accuracy degradation compared to FP32 baselines.

As shown in the experimental data, INT8 quantization typically results in an accuracy drop of less than 0.5%, with some models even seeing slight improvements due to the regularizing effect of quantization. When deployed via the OpenVINO toolkit on Intel hardware, these compressed models achieved substantial inference speedups, such as 3.05x for ResNet-50 and 3.31x for SSD-300.

Conclusion and Future Work

NNCF provides a robust, production-ready solution for deep learning model compression. While the framework currently requires relatively large batch sizes (at least 256) during fine-tuning to maintain Batch Normalization statistics without folding, it significantly lowers the barrier to deploying high-performance models on the edge. Future developments will focus on expanding the library of supported models and integrating emerging compression techniques to keep pace with the evolving AI landscape.

Summary updated

BibTeX
@misc{kozlov2020neural,
  author = {Alexander Kozlov and Ivan Lazarevich and Vasily Shamporov and Nikolay Lyalyushkin and Yury Gorbachev},
  title = {{Neural Network Compression Framework for Fast Model Inference}},
  year = {2020},
  eprint = {2002.08679},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2002.08679},
}
Figure