[Paper Review] FleXOR: Trainable Fractional Quantization
This paper proposes FleXOR, a trainable fractional quantization method that enables sub-1-bit weight compression using XOR-gate networks integrated into neural networks. By modeling XOR operations via a differentiable $\text{anh}(x)$ activation for backpropagation, the method learns optimal bit patterns during training, achieving higher accuracy and smaller model sizes than binary neural networks on MNIST, CIFAR-10, and ImageNet.
Quantization based on the binary codes is gaining attention because each quantized bit can be directly utilized for computations without dequantization using look-up tables. Previous attempts, however, only allow for integer numbers of quantization bits, which ends up restricting the search space for compression ratio and accuracy. In this paper, we propose an encryption algorithm/architecture to compress quantized weights so as to achieve fractional numbers of bits per weight. Decryption during inference is implemented by digital XOR-gate networks added into the neural network model while XOR gates are described by utilizing $ anh(x)$ for backward propagation to enable gradient calculations. We perform experiments using MNIST, CIFAR-10, and ImageNet to show that inserting XOR gates learns quantization/encrypted bit decisions through training and obtains high accuracy even for fractional sub 1-bit weights. As a result, our proposed method yields smaller size and higher model accuracy compared to binary neural networks.
Motivation & Objective
- To overcome the limitation of integer-only quantization bit counts in existing methods.
- To enable compression at fractional bit rates per weight, expanding the search space for model compression.
- To design a differentiable architecture that supports end-to-end training of quantized weights using XOR-gate networks.
- To achieve higher model accuracy and smaller model size compared to binary neural networks.
Proposed method
- Integrates digital XOR-gate networks directly into the neural network to perform decryption during inference without dequantization.
- Uses $\text{anh}(x)$ as a differentiable approximation for XOR operations to enable gradient flow during backpropagation.
- Trains the network end-to-end to learn optimal bit patterns for fractional bit quantization.
- Applies the method to compress weights to sub-1-bit representations using trainable XOR logic.
- Employs a learnable quantization scheme where bit decisions are optimized during training.
- Supports fractional bit rates by allowing non-integer bit allocations per weight through XOR-based encoding.
Experimental results
Research questions
- RQ1Can fractional bit quantization be achieved in a differentiable and trainable manner?
- RQ2Can XOR-gate networks be effectively integrated into deep neural networks for inference without dequantization?
- RQ3Does using $\text{anh}(x)$ as a surrogate for XOR enable effective backpropagation and model convergence?
- RQ4Can the proposed method achieve higher accuracy and smaller model size than binary neural networks at sub-1-bit compression?
Key findings
- The proposed FleXOR method achieves high accuracy even at fractional sub-1-bit quantization levels, demonstrating the feasibility of non-integer bit compression.
- The integration of XOR-gate networks enables direct computation on quantized weights without look-up tables, reducing memory and computational overhead.
- The use of $\text{anh}(x)$ as a differentiable surrogate for XOR allows effective backpropagation and end-to-end training.
- Experiments on MNIST, CIFAR-10, and ImageNet show that FleXOR outperforms binary neural networks in both model accuracy and compression efficiency.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.