---
license: mit
datasets:
- uoft-cs/cifar10
- uoft-cs/cifar100
- ILSVRC/imagenet-1k
language:
- en
metrics:
- accuracy
base_model:
- ReActNet
---
A&B BNN: Add&Bit-Operation-Only Hardware-Friendly Binary Neural Network
[](https://arxiv.org/abs/2403.03739)
[](https://cvpr.thecvf.com/virtual/2024/poster/29447)
[](https://scholar.google.com/scholar?cluster=9219398500921383941)
[](https://xploreqa.ieee.org/document/10656026)
[](https://huggingface.co/papers/2403.03739)
[](https://github.com/Ruichen0424/AB-BNN)
[](https://youtu.be/L8cWTetcU2M?si=V_fH1YXVKhlaEdf4)
[](https://www.bilibili.com/video/BV1PM4m1S7T1)
## 🚀 Introduction
This repository contains the **pre-trained weights** for the paper **"A&B BNN: Add&Bit-Operation-Only Hardware-Friendly Binary Neural Network"**, published in **CVPR 2024**.
**A&B BNN** proposes to directly remove part of the multiplication operations in a traditional BNN and replace the rest with an equal number of bit operations. It introduces the mask layer and the quantized RPReLU structure based on the normalizer-free network architecture.

### ✨ Key Highlights
* **Hardware-Friendly**: Removes multiplication operations, replacing them with bit operations.
* **Competitive Performance**: Achieves **92.30%**, **69.35%**, and **66.89%** on CIFAR-10, CIFAR-100, and ImageNet respectively.
* **Innovative Structures**: Introduces mask layer and quantized RPReLU.
## 🏆 Model Zoo & Results
We provide pre-trained models for **CIFAR-10**, **CIFAR-100**, and **ImageNet**. You can download the `.h5` files directly from the [**Files and versions**](https://huggingface.co/Ruichen0424/AB-BNN/tree/main/models) tab in this repository.
| Dataset |
Structure |
# Params |
Top-1 Acc |
| CIFAR10 |
ReActNet-18 |
11.18 M |
91.94% |
| ReActNet-A |
28.32 M |
89.44% |
| CIFAR100 |
ReActNet-18 |
11.23 M |
69.35% |
| ReActNet-A |
28.41 M |
63.23% |
| ImageNet |
ReActNet-18 |
11.70 M |
61.39% |
| ReActNet-34 |
21.82 M |
65.19% |
| ReActNet-A |
29.33 M |
66.89% |
## 💻 Usage
This repository hosts the **model weights only**.
For the **training scripts**, **inference codes**, and detailed usage instructions, please refer to our official GitHub repository.
[](https://github.com/Ruichen0424/AB-BNN)
## 📜 Citation
If you find our code useful for your research, please consider citing:
```bibtex
@inproceedings{ma2024b,
title={A\&B BNN: Add\&Bit-Operation-Only Hardware-Friendly Binary Neural Network},
author={Ma, Ruichen and Qiao, Guanchao and Liu, Yian and Meng, Liwei and Ning, Ning and Liu, Yang and Hu, Shaogang},
booktitle={2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
pages={5704--5713},
year={2024},
organization={IEEE}
}
```