Binary Neural Networks
Research, training tools and publications
Overview
Binary neural networks (BNNs) use two-valued representations, typically −1 and +1, for selected weights and/or activations in convolutional and linear layers. Normalization and other selected operations can remain in full precision.
When both weights and activations are binary, dot products can use bitwise XNOR and population-count operations. Packed binary weights require one bit per value: a theoretical 32× reduction in weight storage compared with float32. Whole-model memory use and execution speed depend on the architecture, packing and inference implementation.
The resources below support training and experimentation, alongside publications on binary architectures, optimization and quantization. The bnn framework provides PyTorch binarization helpers; High-Capacity Expert Binary Networks has a separate implementation and evaluation checkpoint from the 2021 release. Related publications also include QBB, which uses multiple binary bases for large language model quantization.
Practical notes
-
Choose what to binarize
Quantize selected weights and activations while retaining useful full-precision operations, such as normalization.
-
Separate training from deployment
The PyTorch helper supports training and experimentation. Hardware-optimized binary inference is not included.
-
Measure the complete system
Weight packing, remaining full-precision layers and the inference runtime determine actual storage and speed.
Resources
PyTorch tools for binary-network research and the original Expert Binary Networks release.
Install the published bnn helper package using either command below. See its repository for dependency requirements and examples. The Expert Binary Networks evaluation instructions describe how to use its checkpoint with ImageNet validation data.
BNN training framework
Configure weight and activation binarization, build binary-network layers and explore the provided training examples.
PyTorch · bnn library
High-Capacity Expert Binary Networks
The original ICLR 2021 implementation of Expert Binary Convolution and its network architectures, with an ImageNet evaluation checkpoint.
ICLR 2021 · PyTorch
Install with pip
pip install bnn
Or install with conda
conda install -c 1adrianb bnn