# Local Batch Normalization-Aided CNN Model for RSSI-Based Fingerprint Indoor Positioning
## 2 Background
### Layer Normalization and Its Limitations  
In their work, [PERSON] et al. proposed layer normalization (LN) as a method to normalize the summed inputs within a hidden layer. The process is independent of mini-batch statistics [20]. Distinct from batch normalization (BN), which normalizes data batch-wide mean and variance, LN computes statistics for each individual training instance separately. This independence from batch size allows LN to be effectively applied to various neural network architectures, including models where batch statistics are unreliable, such as recurrent neural networks (RNNs).  
The core mathematical process of LN involves computing the mean and standard deviation for all neurons in a layer for each individual training case. The key steps are as follows:  
1. Calculate the Mean and Standard Deviation: Compute the mean \(\mu^{l}\) and standard deviation \(\sigma^{l}\) across all hidden units in a layer for a given training instance: \[\mu^{l}=\frac{1}{H}\sum_{i=1}^{H}a_{i}^{l},\ \sigma^{l}=\sqrt{\frac{1}{H}\sum_{i=1}^{H} \left(a_{i}^{l}-\mu^{l}\right)^{2}}\] (4)
2. Normalize: Standardize the inputs using the computed statistics to ensure zero mean and unit standard deviation: \[\hat{a}_{i}^{l}=\frac{a_{i}^{l}-\mu^{l}}{\sigma^{l}+\epsilon}\] (5)
3. Scale and Shift: Introduce learnable parameters, the scale factor \(\gamma\) and the shift factor \(\beta\), to adjust the normalized activations: \[y_{i}^{l}=\gamma\hat{a}_{i}^{l}+\beta,\] (6)  
The parameters \(\mu^{l}\) and \(\sigma l\) were introduced by [PERSON] et al. [20] as part of the LN method, while \(\hat{a}_{i}^{l}\) and \(y_{i}^{l}\) represent general normalized activations and outputs, respectively.  
Variable Definitions:  
\(a_{i}^{l}\) is the summed input to the \(i\)-th neuron in layer \(l\).  
\(\hat{a}_{i}^{l}\) is the normalized activation of the \(i\)-th neuron in layer \(l\).  
\(\mu^{l}\) is the mean of all neurons in layer \(l\).  
\(\sigma^{l}\) is the standard deviation of all neurons in layer \(l\).  
\(H\) represents the number of hidden units in the layer, rather than the mini-batch size.  
\(\epsilon\) is a small constant added to prevent division by zero.  
\(y_{i}^{l}\) is the final output of the LN process for the \(i\)-th neuron in layer \(l\).  
\(\gamma\) and \(\beta\) are learnable parameters that scale and shift the normalized data, respectively.  
In contrast to BN, where \(\gamma\) and \(\beta\) are learned on a per-feature-channel basis, LN applies a single \(\gamma\) and \(\beta\) across all neurons within a layer. LN provides several advantages over BN. By eliminating the reliance on batch-dependent statistics, LN maintains its effectiveness even when dealing with models trained using small batch sizes or in an online learning setting. LN is also beneficial in architectures like RNNs, where it helps stabilize training and mitigate issues such as exploding and vanishing gradients. Recent studies suggest that layer normalization has limitations in certain architectures. In particular, modified layer normalization (MLN) has been shown to offer improvements in specific settings [26]. Moreover, layer normalization has been found to be less effective than self-normalizing networks (SNNs) in some contexts [27]. These findings indicate that the effectiveness of normalization techniques can be highly architecture-dependent, with different methods excelling in distinct scenarios.