[Paper Review] Learning Frequency Domain Approximation for Binary Neural Networks
This paper proposes Frequency Domain Approximation (FDA-BNN), a novel method for training binary neural networks by approximating the gradient of the sign function using a Fourier series of sine functions in the frequency domain. By preserving low-frequency components—where most of the signal energy lies—and using a noise adaptation module to correct high-frequency approximation errors, FDA-BNN achieves state-of-the-art accuracy on CIFAR-10 and ImageNet, outperforming existing methods by up to 1.2% top-1 accuracy on ResNet-18.
Binary neural networks (BNNs) represent original full-precision weights and activations into 1-bit with sign function. Since the gradient of the conventional sign function is almost zero everywhere which cannot be used for back-propagation, several attempts have been proposed to alleviate the optimization difficulty by using approximate gradient. However, those approximations corrupt the main direction of factual gradient. To this end, we propose to estimate the gradient of sign function in the Fourier frequency domain using the combination of sine functions for training BNNs, namely frequency domain approximation (FDA). The proposed approach does not affect the low-frequency information of the original sign function which occupies most of the overall energy, and high-frequency coefficients will be ignored to avoid the huge computational overhead. In addition, we embed a noise adaptation module into the training phase to compensate the approximation error. The experiments on several benchmark datasets and neural architectures illustrate that the binary network learned using our method achieves the state-of-the-art accuracy. Code will be available at extit{https://gitee.com/mindspore/models/tree/master/research/cv/FDA-BNN}.
Motivation & Objective
- To address the optimization difficulty in binary neural networks (BNNs) caused by the non-differentiable sign function.
- To improve gradient approximation of the sign function beyond existing methods that distort the main gradient direction.
- To maintain the dominant low-frequency components of the sign function, which carry most of its energy, for more accurate backpropagation.
- To reduce computational cost by truncating high-frequency Fourier terms while compensating for residual error via a noise adaptation module.
- To achieve state-of-the-art performance in BNNs through improved gradient estimation in the frequency domain.
Proposed method
- Approximate the gradient of the sign function using a finite Fourier series composed of sine functions, which provides a lossless representation when infinite terms are used.
- Truncate the Fourier series to a fixed number of terms (n) to reduce computational overhead, focusing on preserving low-frequency components that dominate the signal energy.
- Introduce a noise adaptation module during training to compensate for approximation errors introduced by truncating high-frequency Fourier coefficients.
- Gradually increase the number of Fourier terms (n) during training to allow the network to progressively learn a better approximation of the sign function.
- Use the Fourier-based approximation in place of the straight-through estimator (STE) for backpropagation, enabling end-to-end training of BNNs.
- Apply the method to both weights and activations in binary convolutional layers, with full-precision first and last layers retained for classification.
Experimental results
Research questions
- RQ1Can a frequency domain approximation of the sign function preserve the main gradient direction more accurately than existing gradient estimators in BNNs?
- RQ2Does truncating the Fourier series to a finite number of terms maintain sufficient representational power while reducing computational cost?
- RQ3Can a noise adaptation module effectively correct the approximation error from high-frequency component truncation in the Fourier-based gradient estimator?
- RQ4Does the proposed FDA-BNN method achieve superior accuracy compared to state-of-the-art BNNs on standard benchmarks like CIFAR-10 and ImageNet?
- RQ5How does the progressive increase in Fourier terms during training affect convergence and final performance?
Key findings
- On ImageNet with ResNet-18, FDA-BNN achieves a top-1 accuracy of 60.2% and top-5 accuracy of 82.3%, surpassing the Bireal-Net + PReLU baseline by 1.2% and 1.0% respectively.
- When replacing the gradient computation in ReActNet with FDA-BNN, the model achieves 66.0% top-1 and 86.4% top-5 accuracy, outperforming the original ReActNet by 0.5% and 0.3%.
- On AlexNet, FDA-BNN achieves 46.2% top-1 accuracy and 69.7% top-5 accuracy, outperforming LNS by 1.8% on top-1 accuracy.
- The method maintains high performance across multiple architectures and datasets, demonstrating generalization and robustness.
- The ablation study confirms that increasing the number of Fourier terms (n) during training improves performance, validating the progressive learning strategy.
- The noise adaptation module contributes to performance gains by reducing the error from truncated high-frequency components in the Fourier approximation.
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.