L1-Norm Batch Normalization for Efficient Training of Deep Neural Networks
Shuang Wu Guoqi Li Lei Deng Liu Liu Yuan Xie Luping Shi

















L1-Norm Batch Normalization for Efficient Training of Deep Neural Networks
    
  
  
  
  
  
  
  Shuang Wu^*,
  Guoqi Li^*,
  Lei Deng,
  Liu Liu,
  Yuan Xie,
  and Luping Shi^†




S. Wu and G. Li contribute equally to this work. S. Wu, G. Li and L. Shi are with the Department of Precision Instrument, Center for Brain Inspired Computing Research, Tsinghua University, Beijing, 100084, China (e-mail: wus15@mails.tsinghua.edu.cn; liguoqi@mail.tsinghua.edu.cn; lpshi@mail.tsinghua.edu.cn)

L. Deng, L. Liu and Y. Xie are with Department of Electrical and Computer Engineering, University of California, Santa Barbara, CA93106, USA (e-mail: leideng@ucsb.edu; liu_liu@ucsb.edu; yuanxie@ucsb.edu)

^† Corresponding to: lpshi@mail.tsinghua.edu.cn




    December 30, 2023
===================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================





Batch Normalization (BN) has been proven to be quite effective at accelerating and improving the training of deep neural networks (DNNs).
However, BN brings additional computation, consumes more memory and generally slows down the training process by a large margin, which aggravates the training effort.
Furthermore, the nonlinear square and root operations in BN also impede the low bit-width quantization techniques, which draws much attention in deep learning hardware community.

In this work, we propose an L1-norm BN (L1BN) with only linear operations in both the forward and the backward propagations during training.
L1BN is shown to be approximately equivalent to the original L2-norm BN (L2BN) by multiplying a scaling factor which  equals to √(π/2).
Experiments on various convolutional neural networks (CNNs) and generative adversarial networks (GANs) reveal that L1BN maintains almost the same accuracies and convergence rates compared to L2BN but with higher computational efficiency.
On FPGA platform, the proposed signum and absolute operations in L1BN can achieve 1.5× speedup and save 50% power consumption, compared with the original costly square and root operations, respectively.
This hardware-friendly normalization method not only surpasses L2BN in speed, but also simplify the hardware design of ASIC accelerators with higher energy efficiency. Last but not the least, L1BN promises a fully quantized training of DNNs, which is crucial to future adaptive terminal devices.




  L1-norm,
  batch normalization (BN),
  deep neural network (DNN),
  discrete online learning
  






§ INTRODUCTION


Nowadays, deep neural networks (DNNs) <cit.> are successfully permeating various real-life applications, for instance, computer vision <cit.>, speech recognition <cit.>,

machine translation <cit.>, Go game <cit.>, and multi-model tasks across them <cit.>.
However, training DNNs is complicated and needs elaborate tuning of various hyperparameters, especially on large datasets where the training samples are so variant.
The distribution shift of mini-batch inputs will affect the outputs of following layers successively and eventually make the network's outputs and gradients vanish or explode.
This internal covariate shift phenomenon leads to slower convergence in training, requires careful adaption of learning rate and increases the importance of appropriate parameters initialization <cit.>.

To address this problem, batch normalization (BN) <cit.> has been proposed to facilitate convergence, as well as reduce the difficulty of annealing learning rate and initializing parameters.
The randomness from the mini-batch statistics serves as a regularizer during training and improves the final accuracy.
Besides, most generative adversarial networks (GANs) also rely on BN in both the generator and the discriminator <cit.>.
BN is proved critically to help deep generators launch a normal training process, as well as prevent generators from mode collapse which is a common failure observed in GANs.
BN performs such helpfully in training DNNs that it has almost been a standard configuration along with the activation function, e.g., the rectified linear units (ReLU), coupled as BN-ReLU, not only in various deep learning models <cit.>, but also in the deep learning accelerator community <cit.>.






Inspired by BN, weight normalization <cit.> uses the L2-norm of the incoming weights to normalize the summed inputs to a neuron. Layer normalization <cit.> transposes the statistics of a training batch to all of the summed inputs in a single training case, which do not re-parameterize the original network. Both methods eliminate the dependencies among the examples in a mini-batch and can be applied successfully to recurrent models. Batch renormalization <cit.> proposes an affine transformation to ensure that the training and inference models generate the same outputs that depend on individual examples rather than the entire mini-batch.


However, the BN layer usually causes considerable training overhead for speed and energy consumption in both the forward and backward propagations during training.
On the one hand, the additional computations are quite heavy, especially for resource-limited ASIC devices.
When it comes to online learning, i.e., deploying the training process onto terminal devices, the resource problem of BN becomes more salient and has challenged its extensive applications in various scenarios.
On the other, the square and root operations introduce strong nonlinearity that makes it difficult to employ low bit-width quantization algorithms.
Although a lot of quantization methods have been proposed to reduce the memory cost and accelerate the computation <cit.>, the BN layer still remains in float32 precision or avoided for simplicity <cit.>.





In this paper, we propose an L1-norm BN (L1BN), in which the L2-norm variance of each neuron's activation within one mini-batch is replaced by an L1-norm variance.
By deriving the chain rule for differentiating the L1BN layer when implementing backpropagation training, we find that the costly and strongly nonlinear square and root operations can be replaced by hardware-friendly signum and absolute operations.
We prove that L1BN is actually equivalent to the original L2BN by multiplying a scaling factor √(π/2).
To verify the proposed method, various experiments have been conducted on convolutional neural networks (CNNs) over datasets including Fashion-MNIST <cit.>, SVHN <cit.>, CIFAR10/100 <cit.> and ILSVRC12 <cit.>, as well as the generative adversarial networks (GANs) over CIFAR10 and LSUN-Bedroom <cit.>.
The results indicate that the L1BN is able to achieve comparable accuracy and convergence speed with the L2BN, but with higher computational efficiency.
Compared to the original complex square and root operations, on FPGA platform, L1BN achieves 1.5× speedup, and 50% power saving, respectively.
We believe that this new normalization method promises the fully quantized low-precision dataflow for training deep models and hardware-friendly learning framework for future resource-limited terminal devices.



§ PROBLEM FORMULATION

Stochastic gradient descent (SGD), known as incremental gradient descent, is a stochastic approximation of the gradient descent optimization and iterative method for minimizing an objective function that is written as a sum of differentiable functions:

    Θ= arg min_Θ1/N∑_i=1^N ℓ(x_i,Θ)

where x_i for i=1, 2, ... N is the training set containing totally N samples, and ∑_i=1^N ℓ(x_i,Θ) is the empirical risk by summarizing the risk at each sample, and ℓ(x_i,Θ) is typically associated with the i-th observation in the dataset.
When considering a mini-batch size of m updates in SGD, the true gradient of the cost function ℓ is approximated by m samples, i.e., the gradient of each iteration in SGD can be simply estimated by processing the gradient of each sample and update with the average values

    Θ←Θ - α·1/m∑_i=1^m∂ℓ(x_i,Θ)/∂Θ

where α is the learning rate. While SGD with mini-batch is simple and effective, it requires careful tuning of the model hyperparameters, especially the learning rate used in optimizer, as well as the initial values of the model parameters.
Otherwise neural network will start with most of the activations saturated and make the training hard to converge.
Another issue is that the inputs of each layer are affected by the parameters of all preceding layers, so that small changes to the network parameters amplify as the network becomes deeper. This leads to the problem that the outputs and gradients of network will easily explode or vanish.
Thus, SGD slows down the training by requiring lower learning rates and careful parameter initialization, and makes it notoriously hard to train models with saturating nonlinearities, which affects the networks' robustness and challenges its extensive applications.

In <cit.>, the authors refer to this phenomenon
as internal covariate shift, and address this problem by normalizing layer inputs.
This method draws its strength from making normalization a part of the model architecture and performing the normalization across each training mini-batch, which is termed as “Batch normalization" (BN).
Batch normalization allows us to use much higher learning rates and be less careful about initialization. Besides, the randomness from the batch statistics serves as a regularizer during training and in many cases eliminates the need for Dropout.




 §.§ Conventional L2BN

Specifically, BN normalizes each scalar feature independently by making it have zero mean and unit variance.
For a layer with d-dimensional input x = {x^(1),...,x^(k),..., x^(d)}, each dimension is the input of a neural activation that is normalized by

    x̂^(k) =x^(k)-E[x^(k)]/√(Var[x^(k)])

where the expectation E[x^(k)] and variance Var[x^(k)] are computed over all training samples.

Usually for a mini-batch containing m samples, we use μ_ℬ and σ_ℬ^2+ϵ to estimate E[x^(k)] and Var[x^(k)], respectively, which gives that

    x̂^(k)_i=x_i^(k)-μ_ℬ/√(σ_ℬ^2+ϵ)

where ϵ is a sufficiently small positive parameter for avoiding the numerical error, the mini-batch mean μ_ℬ and variance σ_ℬ  are given by

    μ_ℬ=1/m∑_i=1^mx_i

and

    σ_ℬ=√(1/m∑_i=1^m(x_i-μ_ℬ)^2)

respectively. It is easy to see that σ_ℬ is calculated based on a L2-norm.

To guarantee that the transformation inserted into the network can represent the identify transform, a pair of parameters γ^(k) and β^(k) that scale and shift the normalized value are introduced

    y^(k) = γ^(k)x̂^(k) + β^(k)

where γ and β are parameters to be trained along with the original model parameters.

To implement backpropagation training when batch normalization is involved, the chain rule is derived as follows:

    [                                                            ∂ℓ/∂x̂_i = ∂ℓ/∂ y_i·γ; ;                      ∂ℓ/∂σ_ℬ^2 = ∑_i=1^m∂ℓ/∂x̂_i· (x_i-μ_ℬ)  ·-1/2(σ_ℬ^2+ϵ)^-3/2; ;                                          ∂ℓ/∂μ_ℬ = ∑_i=1^m∂ℓ/∂x̂_i·-1/√(σ_ℬ^2+ϵ); ; ∂ℓ/∂ x_i = ∂ℓ/∂x̂_i·1/√(σ^2_ℬ+ϵ)  +
        ∂ℓ/∂σ^2_ℬ·2(x_i-μ_ℬ)/m +
        ∂ℓ/∂μ_ℬ·1/m; ;                                                     ∂ℓ/∂γ = ∑_i=1^m∂ℓ/∂ y_i·x̂_i; ;                                                          ∂ℓ/∂β = ∑_i=1^m∂ℓ/∂ y_i; ;                                                                                  ]


Although BN accelerates the convergence of training DNNs, it requires additional computation and generally slows down the training process by a large margin.
Table <ref> shows speed tests of training with or without BN.
All models are built on Tensorflow <cit.> and trained on one or two Titan-Xp GPUs. Section <ref> will detail the implementation and training hyperparameters.
For BN, we apply it's accelerated version: fused batch normalization.
Note that since the L2-norm is applied to estimate σ_ℬ, we term this method as the L2-norm Batch normalization (L2BN).
It is seen that, in L2BN, the BN layer requires square and root operations during the training phase.
These operations are  costly, especially on resource-limited ASIC devices. Besides, the square and root operation introduce strong nonlinearity that makes the bit-width quantization difficult. To address this issue, we propose an L1-norm batch normalization (L1BN) in this work.






 §.§ Proposed L1BN

Our idea is very simple, which is just to apply the L1-norm to estimate σ_ℬ.
In Theorem 1, it will be proven that the L1BN is equivalent to L2BN by multiplying a scaling factor √(π/2).
The simulation results will further show that L1BN maintains the same accuracy and convergence speed compared to L2BN but with higher computational efficiency.
The L1BN is formulated as

    y_i=γ·x̂_i+β

and

    x̂_i=x_i-μ_ℬ/σ_ℬ+ϵ

where γ, β, μ_ℬ and ϵ  have the same meaning as in L2BN,


  

whereas σ_ℬ is a term calculated with the L1-norm of mini-batch inputs as follows:

    σ_ℬ=1/m∑_i=1^m|x_i-μ_ℬ|

The motivation of the replacement of the L2-norm variance by its L1-norm version is that the L1-norm variance is strongly linear correlated with the L2-norm variance.

During training we need to back propagate the gradient of loss ℓ through this transformation, as well as compute the gradients with respect to the parameters of the BN transform.
To implement the backward propagation when L1-norm is involved, the chain rule is derived as follows:

    [                                                   ∂ℓ/∂x̂_i = ∂ℓ/∂ y_i·γ; ;                     ∂ℓ/∂σ_ℬ  =∑_i=1^m∂ℓ/∂x̂_i· (x_i-μ_ℬ)  ·-1/(σ_ℬ+ϵ)^2; ; ∂ℓ/∂μ_ℬ = ∑_i=1^m∂ℓ/∂x̂_i·-1/σ_ℬ+ϵ +   ∂ℓ/∂σ_ℬ·-1/m∑_i=1^m sgn(x_i-μ_ℬ); ;       ∂ℓ/∂ x_i   = ∂ℓ/∂σ_ℬ·1/m{sgn(x_i-μ_ℬ) - 1/m∑_j=1^m sgn(x_j-μ_ℬ) }; ;                                         +∂ℓ/∂x̂_i·1/σ_ℬ+ϵ + ∂ℓ/∂μ_ℬ·1/m ]

and ∂ℓ/∂γ, ∂ℓ/∂β has exactly the same form as in Equation <ref>.











It is easy to see that

    sgn(x̂_i)=sgn(x_i-μ_ℬ)


Let

    [                 μ(∂ℓ/∂x̂_i)=1/m∑_i=1^m∂ℓ/∂x̂_i; ; μ(∂ℓ/∂x̂_i·x̂_i )= 1/m∑_i=1^m (∂ℓ/∂x̂_i·x̂_i ) ]


Then, by substituting Equations <ref> and <ref> into Equation <ref>,  we can obtain that

    [     ∂ℓ/∂x_i = 1/σ_ℬ+ϵ{∂ℓ/∂x̂_i - μ(∂ℓ/∂x̂_i) -; ; μ(∂ℓ/∂x̂_i·x̂_i ) ·
     [sgn(x̂_i)-μ(sgn(x̂_i)] } ]

Note that the square and root operations can be avoided for implementing forward computation and back propagation when the L1BN is involved. As seen in Experiments section, L1BN significantly reduces the computational cost compared L2BN.

Theorem 1:
For a normally distributed random variable X with mean μ and variance σ, define a random variable Y such that Y = |X-E(X)|, we have

    σ/E(|X-E(X)|=√(π/2)



Proof:
Note that X-E(X) belongs to a normal distribution with zero mean and variance σ. Then Y=|X-E(X)| has a folded normal distribution or half-normal distribution <cit.>.
Denote μ_Y as the mean of Y, we have

    μ_Y=√(2/π)σ e^-μ^2/2σ^2

based on the statistical property of half-normal distribution. As μ=0, we can obtain that

    σ/μ_Y=√(π/2)


Remark 1:
By Theorem 1, let γ_L_2 and γ_L_1 be the parameters in Equation <ref> and <ref> for L2BN and L1BN, respectively. Ideally we have

    γ_L_2=  √(π/2)·γ_L_1

if the inputs of all layers belong to Gaussian distribution with zero mean. In this case, by  denoting the standard derivation  of the output of all layers for L1BN and L2BN as σ_L_1 and σ_L_2, respectively, we have

    σ_L_2=  √(π/2)·σ_L_1




The above remark is validated in the Experiments section.





§ L1BN IN MLP AND CNN

As same to L2BN, L1BN can be applied to any set of activations in networks including but not limited to multi-layer perceptrons (MLPs) and CNNs.
The only difference lies in that the L1-norm is applied to calculate   σ.
As show in Equation <ref>, in order to compensate the difference in  standard deviation, we use the strategy as follows:



  * When the rescale factor γ is not applied in batch normalization, we multiply σ_L_1 by √(π/2) in Equation <ref> to approximate the original σ_L_2.


  * When the rescale factor γ is applied in batch normalization, we just use σ_L_1 and let the trainable parameters γ_L_1 “learn" to compensate the difference automatically through back-propagation training.


The other normalization processes of L1BN are the just exactly the same to that of L2BN. For an MLP, each neuron is normalized based on m samples of a training batch before the activation function.
While for a CNN, different elements of the same feature map at different locations are normalized in the same way.
Similar to L2BN <cit.>, we jointly normalize all the activations in a mini-batch, over all locations.
Let ℬ be the set of all values in a feature map across both the elements of a mini-batch and spatial locations, so for a mini-batch of size m and feature maps of size h × w, the effective mini-batch of size is |ℬ| = mhw.
Then, the pair of parameters γ and β per feature map can be learned, rather than per activation.
So during inference the BN transform applies the same linear transformation to each neural activation in a given feature map.

The Algorithm for L1BN is presented in Algorithm <ref>.



§ EXPERIMENTS





 §.§ L1BN on classification tasks


To evaluate the equivalence between the L1-norm batch normalization and it's original L2-norm version, we test both methods in various image classification tasks. For classification, we parameterize model complexity and task complexity, then apply two-dimensional demonstrations on multiple datasets with different CNN architectures. For each demonstration, all the  hyper-parameters between    L2BN and L1BN remain the same, the only difference is the using of L2-norm or L1-norm BN. In the following experiments, SGD with momentum 0.9 is the default optimizer setting:






1) Simple task with shallow model: Fashion-MNIST <cit.> is a MNIST-like fashion product database that contains 70k grayscale 28×28 images and preferably represents modern CV tasks. We use a variation of LeNet-5 <cit.> with 32C5-MP2-64C5-MP2-512FC-10Softmax. The learning rate η is set to 0.1 and divided by 10 at epoch 30 and epoch 60. The average accuracy of 10 runs on the test set is reported. As for SVHN <cit.> dataset, we use a VGG-like network <cit.> with totally 7 layer: 2×(128C3)-MP2-2×(256C3)-MP2-2×(512C3)-MP2-1024FC-10Softmax. The original
images are scaled and biased to the range of [-1,+1], training epochs are reduced to 40 since it is a rather big dataset. The learning rate η is set to 0.1 and divided by 10 at epoch 20 and epoch 30.

2) Moderate tasks with very deep model: Residual blocks <cit.> and densely connected blocks <cit.> are proven to be quite efficient in very deep CNNs with much fewer weights. In order to test the effects brought by L1-norm in these structures on CIFAR <cit.> datasets, we train a standard 110-layer ResNet and a Wide-DenseNet (L=40, K=48) with bottle-neck layers for CIFAR10, as well as a standard 100-layer DensetNet for CIFAR100. In both datasets, images are firstly channel-wise normalized and then follow the data augmentation in <cit.> for training: 4 pixels are padded on each side, and a 32×32 patch is randomly cropped from the padded image or its horizontal flip. For testing, only single view of the original 32×32 image is evaluated. Learning rates and annealing methods are the same as that in the original papers.

3) Complicated task with deep wide model: For ILSVRC12 <cit.> dataset with 1000 categories, we adopt AlexNet <cit.> model but remove dropout and replace local response normalization layers with L1 or L2 batch normalization layers. Images are first rescaled such that the shorter sides are of length 256, and then cropped out centrally to 256×256. For training, images are then randomly cropped to 224×224 and horizontally flipped. For testing, the single center crop in validation set is evaluated. The model is trained with mini-batch size of 256 and totally 80 epochs. The weight decay is set to 5e-4, learning rate is set to 1e-2 and divided by 10 at epoch 40 and epoch 60.




4) Complicated task with deep slim model: Recently compact convolutions such as group convolution <cit.> and depthwise convolution <cit.> draws extensive attention with fewer parameters and operations with the same performance. Therefore, we further reproduce the MobileNet <cit.> and evaluate L1-norm batch normalization on ILSVRC12 dataset. At this time, weight decay decreases to 4e-5, the learning rate is set to 0.1 initially and linearly anneals to 1e-3 after 60 epochs. We apply the Inception data argumentation defined in TensorFlow-Slim image classification model library <cit.>. The training is performed on two Titan-Xp GPUs and the population statistics {μ,σ} for batch normalization are updated according to calculations from single GPU, so the equivalent batchsize for BN is 128.

The main results on multiple datasets with different CNN architectures are shown in Table <ref>, all error rates are the average of best accuracies in multiple repeated experiments. Besides, the training curves of two methods in ResNet-110 are shown in Figure <ref>. We have two major observations:

(1) From the perspective of the final results, L1-norm BN is equal to or slightly surpasses the original L2-norm BN in many occasions.
We argue that this performance improving is caused by the enlarged variation statistics: according to Equation <ref>, the “standard derivation” of L1-norm is 1.25× greater than that of L2-norm.
Although the following linear layer of BN can “learn” to alleviate the scaling by adjusting parameter γ, L1-norm somehow brings in an additional form of randomness and may further regularize large model and finally perform better performance.
Section <ref> will detail the empirical explanation and give more evidences.
As for MobileNet, this compact model has less trouble with overfitting. Besides, there are so few parameters in its depthwise filters. The result in Table <ref> indicates that the additional L1-norm regularization may hurt the accuracy by a small margin.




(2) From the perspective of training curves, the test error of L1BN is a bit more unstable at the beginning. Although this can be improved by more accurate initialization: initialize γ from 1.0 (L2-norm) to 0.8 (L1-norm), the two loss curves almost overlap completely. So we directly embrace this instability and let networks find their way out. We observe no other regular distinctions of two optimization processes in all our CNN experiments.








 §.§ L1BN on generative tasks

Since the training of GANs is a zero-sum game between two neural networks with no guarantee of convergence, most GAN implementations rely on BN in both the generator and the discriminator to help stabilize training, and prevent the generator from collapsing all samples to a single point which is a common failure mode observed in GANs. In this case, the quality of generated results will be more sensitive to any numerical or hyperparameters differences. Therefore we apply L1-norm BN to two GANs tests to prove its effectiveness.

Firstly, we generate 32×32 CIFAR10 images using the same architectures as described in DCGAN <cit.>.
For the results of DCGAN, we use the non-saturating loss function proposed in the original GAN formulation <cit.>.
For results of WGAN-GP, the network remains the same except that no BN is applied to discriminator as suggested in <cit.>.
Besides, the training techniques, e.g., using wasserstein distance, gradient penalty, are adopted.
Generated images are measured by the widely used metric Inception score (IS) introduced in <cit.>.
Since IS fluctuates in multiple tests after every 10k generator iteration, we report both the average score of the last 20 evaluation (AVG) and the best score (BEST) of the overall training.
Note that the training techniques introduced in <cit.> are not used in our implementations.
Besides, the hyperparameters and network structures are not the same.
Incorporating these techniques might further bridge the performance gap of our models.
We just used pure tests without any further fine tuning which are proven to really make a difference <cit.>.
Table <ref> shows that L1BN still equivalent to L2BN in such hyperparameter-sensetive adversarial occasions.




Secondly, we perform experiments on LSUN-Bedrooms <cit.> 128×128 image generation task with all the L2-norm BN replaced with L1-norm BN.
In this case, an additional upsample de-convolution and downsample convolution is applied to DCGAN's generator and discriminator, respectively.
In order to stabilize training and avoid mode collapses, we follow the WGAN-GP method and no BN is applied to discriminator.
Since in field of GANs there is no convincing evaluating indicator or loss function to compare the generator's performance for LSUN, Figure <ref> just intuitively shows samples of generated images after 300k generator iterations. Still, both methods generate comparable samples with detailed texture, we observe no significant differences in artistic style.




 §.§ Layerwise and channelwise comparasion


We further offer a layerwise and channelwise perspective to show the approximated equivalence between L1-norm and L2-norm scaling. After training a ResNet-110 for 100 epochs, we fix all the parameters and moving averaged statistics and feed the model with a batch of test images. Since the numerical difference between L1BN and L2BN will accumulate among layers, we guarantee that the inputs of each layer for both algorithms are the same. But within each individual layer, the standard deviation (L2-norm) σ_L_2 and the  L1-norm deviation σ_L_1 of channel outputs are calculated simultaneously.





In Remark 1, it is pointed out that, when the input signals belong to Gaussian distribution, ideally L1BN and L2BN are equivalent if we multiply  √(π/2) in Equation <ref> for L1BN. This implies that, if all the other conditions are the same, the standard derivation of the output of L2BN at each layer is √(π/2) multiple of that of L1BN.
The average ratios σ_L_2/σ_L_1 are shown in Figure <ref>, which demonstrates this phenomenon well. As seen the colormap in Figure <ref>, compared to L2-norm, the L1-norm statics are theoretically smaller and will cause larger outputs. When the distribution of the data points in the intermediate layers (from layer 38 to layer 73) is relatively closer to Gaussian distribution, the ratio σ_L_2/σ_L_1 is close to the value of √(π/2)≈ 1.25. The histograms of σ_L_2 and σ_L_1 are similar except for a phase shifting in the log scale x axis, which is consistent with Theorem 1 and Remark 1.

All in all,

the use of L1-norm brings in an additional form of randomness and may further regularize large model and can perform better performance.






 §.§ Computational efficiency of L1BN 

Via replacing the L2-norm variance by L1-norm variance, L1BN improves the computational efficiency. We firstly estimate the computational overhead of basic arithmetic operations on FPGA platform, all in 32-bit floating-point representation.
Table <ref> shows the comparison of these four operations.
An Intel FPGA board (DE5-Net) is used to measure the performance and to estimate the cost of the operations based on Altera OpenCL toolchain.
Altera's PowerPlay Early Power Estimator is used to estimate power consumption.
The time and power data are reduced by the reference value of null operation.
Compared to square and root operations, signum and absolute operations saves registers and doesn't require DSP blocks.




Secondly, the time and power consumption of L1-norm and L2-norm on state-of-art CNN models are estimated in Figure <ref>.
We count the total number of signum, absolute, square and root operation according to Equation <ref>, <ref>, <ref>, <ref>. Then weight them with power and time statistics in Table <ref>.
Since the root operation is performed only once for each channel, we can omit its power and time consumption and aggressively compare the sum of signum and absolute operations with the square operations in most MLPs and CNNs.
The L1-norm can approximately achieve 1.5× speedup and 50% power saving in practice.
We can conclude that by removing the complex square and root operations in conventional L2BN layer, L1BN is able to greatly improve the training efficiency on overhead of hardware resources, time and power consumption, especially for resource-limited mobile devices where DSP or FPU are not available.




























































§ DISCUSSIONS AND CONCLUSIONS

To minimize the cost of conventional L2-norm based batch normalization layer, we propose the L1-norm based batch normalization.
By removing the costly square and root operations during training, L1BN enables higher computational efficiency.
We derive the chain rule for differentiating the L1BN layer when implementing backpropagation training, and it is shown that the costly and strongly nonlinear square and root operations can be replaced by hardware-friendly absolute and signum operations.
We also prove that L1BN is equivalent to L2BN by multiplying a scaling factor of √(π/2) when the inputs obey a Gaussian distribution with zero mean, which is commonly designed in conventional deep neural works.
Various structures of CNNs and GANs, and different datasets are tested, which present comparable classification accuracy, generation quality and convergence rate.
Cost comparisons of basic operations are estimated on FPGA platform, the L1-norm operations are able to obtain 1.5× and 50% energy saving as well.
Other hardware resources, such as register and DSP blocks, can also be reduced.




Previous accelerators mainly target at the off-line inference, i.e., the deployment of a well-trained compressed network.
Wherein the multiply-accumulate (MAC) operations usually occupy most attention whereas the costly BN can be regarded as a scale and bias layer once training is done.
However, the capability of continual learning in real-life and on-site occasions is essential for future artificial general intelligence (AGI).
Where an autonomous agent has to explore and exploit, accumulate experiences, summarize and extract knowledge, and eventually evolve higher-level intelligence.
So online training is very import for both the data center over the cloud equipped with thousands of CPUs, GPUs as well as on edge devices with dedicated resource-limited FPGA, ASIC, wherein the BN should not be bypassed.
The advantages of L1BN with less resource overhead, faster speed, and lower energy, not only benefit most of the current deep learning models, but also make the highest ideal (AGI) one step closer.

On the other side, transferring both training and inference processes to low-precision representation is an effective leverage to alleviate the burden of hardware design.
Regretfully, most existing quantizing methods also remain the BN layer in full-precision (float32) in both the forward and backward passes because of the strongly nonlinearity of square and root operations.


Via replacing these complex operations by absolute and signum operations, L1BN greatly promises the fully quantized neural networks with low-precision dataflow for efficient online training, which is crucial to future adaptive terminal devices.

















IEEEtran

