## 4 Previous Related Work
### sKAdam Optimizer  
The sKAdam algorithm, introduced in [18], derives its name from the fusion of the scalar Kalman filter and the Adam optimizer. Notably different from the FDEKF, this implementation of the EKF manifests two significant distinctions. Firstly, it does not serve directly as a learning algorithm; rather, it functions to filter the gradient obtained through backpropagation while the learning process is facilitated by the Adam Optimizer. Secondly, the scalar Kalman filter allocates a separate filter to each component of the gradient, also distinguishing itself in this sense from the FDEK.  
The sKAdam algorithm has its origins in the KAdam algorithm, introduced earlier by the same authors. KAdam operates with filter sets, assigning a group for each layer within the neural network. However, unlike KAdam, the approach in sKAdam involves employing 1-D Kalman filters for each parameter within the loss function. Furthermore,the measurement noise covariance is forced to drop exponentially as the training process progresses with the sKAdam algorithm. As a consequence of these modifications, sKAdam develops scalar operations instead of calculations with matrices and vectors, and on the other hand, the decreasing noise allows for achieving lower values in the loss function [18].  
The authors claim that the filter can add significant and relevant variations to the gradient, causing a similar effect to the strategy of adding white noise to the gradient that other researchers have implemented to improve learning in very deep neural networks to find better solutions in the function of loss [18].  
For hyper-parameter configuration in sKAdam, the same recommendations are made as for Adam, where applicable. For the filter model, the authors make conventional recommendations, plus the particularity of the exponential decay factor of the measurement noise covariance.  
In Algorithm 3, it is shown the pseudocode for sKAdam [18].  
```
Require:\(\alpha\): Stepsize \(\beta_{1},\beta_{2}\in[0,1)\): Exponential decay rates for the moment estimates \(\gamma\): Exponentially decay constant for the measurement noise Require:\(f(\theta)\): Stochastic objective function with parameters \(\theta\) Require:\(\theta_{0}\): Initial parameter vector \(m_{0}\gets 0\) (Initialize \(1^{st}\) moment vector) \(v_{0}\gets 0\) (Initialize \(2^{nd}\) moment vector) \(\hat{x}_{0|0}\gets 0\) (Initialize state estimates vector) \(k_{0}\gets 0\) (Initialize Kalman gains vector) \(p_{0|0}\gets 0\) (Initialize covariances vector) \(t\gets 0\) (Initialize timestep) while\(\theta_{t}\) not converged do \(t\gets t+1\) \(g_{t}\leftarrow\
abla_{\theta}f_{t}(\theta_{t-1})\). Get gradients of stochastic objective w.r.t. parameters at timestep \(t\) \(\hat{x}_{t|t-1}\leftarrow\hat{x}_{t-1|t-1}\). Compute a priori state estimate \(p_{t|t-1}\gets p_{t-1|t-1}+1\). Compute a priori covariance \(r_{t}\gets e^{-t/\gamma}\). Compute measurement noise \(k_{t}\gets p_{t|t-1}/(p_{t|t-1}+r_{t})\). Compute Kalman gain \(\hat{x}_{t|t}\leftarrow\hat{x}_{t|t-1}+k_{t}\cdot(g_{t}-\hat{x}_{t|t-1})\). Compute a posteriori state estimate \(\hat{g}_{t}\leftarrow\hat{x}_{t|t}\). Set estimated gradient \(p_{t|t}\gets p_{t|t-1}-k_{t}\cdot p_{t|t-1}\). Compute a posteriori covariance \(m_{t}\leftarrow\beta_{1}\cdot m_{t-1}+(1-\beta_{1})\cdot\hat{g}_{t}\). Update biased \(1^{st}\) moment estimate \(t\) \(v_{t}\leftarrow\beta_{2}\cdot v_{t-1}+(1-\beta_{2})\cdot\hat{g}_{t}^{2}\). Update biased \(2^{nd}\) raw moment estimate \(t\) \(\hat{m}_{t}\gets m_{t}/(1-\beta_{1}^{t})\). Compute bias-corrected \(1^{st}\) moment estimate \(\hat{v}_{t}\gets v_{t}/(1-\beta_{2}^{t})\). Compute bias-corrected \(2^{nd}\) raw moment estimate \(\theta_{t}\leftarrow\theta_{t-1}-\alpha\cdot\hat{m}_{t}/(\sqrt{\hat{v}_{t}}+ \epsilon)\). Update parameters endwhile return \(\theta_{t}\). Resulting parameters
```  
**Algorithm 3** sKAdam Optimizer [18]