Saved in:
Bibliographic Details
Main Authors: Vargas, Edwin, Correa, Claudia, Hinojosa, Carlos, Arguello, Henry
Format: Preprint
Published: 2024
Subjects:
Online Access:https://arxiv.org/abs/2404.01278
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866911821678510080
author Vargas, Edwin
Correa, Claudia
Hinojosa, Carlos
Arguello, Henry
author_facet Vargas, Edwin
Correa, Claudia
Hinojosa, Carlos
Arguello, Henry
contents Quantized neural networks employ reduced precision representations for both weights and activations. This quantization process significantly reduces the memory requirements and computational complexity of the network. Binary Neural Networks (BNNs) are the extreme quantization case, representing values with just one bit. Since the sign function is typically used to map real values to binary values, smooth approximations are introduced to mimic the gradients during error backpropagation. Thus, the mismatch between the forward and backward models corrupts the direction of the gradient, causing training inconsistency problems and performance degradation. In contrast to current BNN approaches, we propose to employ a binary periodic (BiPer) function during binarization. Specifically, we use a square wave for the forward pass to obtain the binary values and employ the trigonometric sine function with the same period of the square wave as a differentiable surrogate during the backward pass. We demonstrate that this approach can control the quantization error by using the frequency of the periodic function and improves network performance. Extensive experiments validate the effectiveness of BiPer in benchmark datasets and network architectures, with improvements of up to 1% and 0.69% with respect to state-of-the-art methods in the classification task over CIFAR-10 and ImageNet, respectively. Our code is publicly available at https://github.com/edmav4/BiPer.
format Preprint
id arxiv_https___arxiv_org_abs_2404_01278
institution arXiv
publishDate 2024
record_format arxiv
spellingShingle BiPer: Binary Neural Networks using a Periodic Function
Vargas, Edwin
Correa, Claudia
Hinojosa, Carlos
Arguello, Henry
Computer Vision and Pattern Recognition
Quantized neural networks employ reduced precision representations for both weights and activations. This quantization process significantly reduces the memory requirements and computational complexity of the network. Binary Neural Networks (BNNs) are the extreme quantization case, representing values with just one bit. Since the sign function is typically used to map real values to binary values, smooth approximations are introduced to mimic the gradients during error backpropagation. Thus, the mismatch between the forward and backward models corrupts the direction of the gradient, causing training inconsistency problems and performance degradation. In contrast to current BNN approaches, we propose to employ a binary periodic (BiPer) function during binarization. Specifically, we use a square wave for the forward pass to obtain the binary values and employ the trigonometric sine function with the same period of the square wave as a differentiable surrogate during the backward pass. We demonstrate that this approach can control the quantization error by using the frequency of the periodic function and improves network performance. Extensive experiments validate the effectiveness of BiPer in benchmark datasets and network architectures, with improvements of up to 1% and 0.69% with respect to state-of-the-art methods in the classification task over CIFAR-10 and ImageNet, respectively. Our code is publicly available at https://github.com/edmav4/BiPer.
title BiPer: Binary Neural Networks using a Periodic Function
topic Computer Vision and Pattern Recognition
url https://arxiv.org/abs/2404.01278