## 3 Related Work  
Although the MAML algorithm and its variants do not use parameters other than those of the base-learner, network training is quite slow and computationally expensive as it contains second-degree derivatives. In particular, the meta-update of the MAML algorithm includes gradient nested in gradient, or second-degree derivatives, which significantly increases the computational cost. In order to solve the above problem, several approximation techniques have been proposed to accelerate the algorithm. [PERSON] et al. [12] developed the MAML by ignoring the second derivatives, calculating the slope in the meta-update, which they called FOMAML (First Order MAML). More specifically, MAML optimizes the:  
\[\min_{\theta}\mathbb{E}_{T\sim p(T)}\big{[}L\big{(}\mathbb{U}_{T}^{k}(\theta )\big{)}\big{]}, \tag{11}\]  
where \(\mathbb{U}_{T}^{k}\) is the process by which k samples are taken from task \(T\) and \(\theta\) is updated. This procedure employs the support set and the query set, so the optimization can be rewritten as follows:  
\[\min_{\theta}\mathbb{E}_{T\sim p(T)}\big{[}L_{T,Q}(\mathbb{U}_{T,S}(\theta)) \big{]} \tag{12}\]  
Finally, MAML uses the slope method to calculate the following:  
\[gMAML=L_{T,Q}(\mathbb{U}_{T,S}(\theta))=\mathbb{U}_{T,S}^{\prime}(\theta)L^{ \prime}_{T,Q}\big{(}\overline{\theta}\big{)}, \tag{13}\]  
where \(\overline{\theta}=\mathbb{U}_{T,S}(\theta)\) and \(\mathbb{U}_{T,S}^{\prime}\) is the Jacobian renewal matrix of \(\mathbb{U}_{T,S}\) where the FOMAML considers \(\mathbb{U}_{T,S}^{\prime}\) as unitary, so it calculates the following:  
\[g\text{FOMAML}=L^{\prime}_{T,Q}\big{(}\overline{\theta}\big{)} \tag{14}\]  
The resulting method still calculates the meta-gradient for the parameter values after updating \(\theta^{\prime}\), which is an effective post-learning method from a theoretical point of view. However, experiments have shown that the yield of this method is almost the same as the one obtained by a second derivative. Most of the improvement in MAML comes from the gradients of the objective at the post-update parameter values, rather than the second-order updates from differentiating through the gradient update. A different implementation employing first degree derivatives was studied and analyzed by [PERSON] et al. [13]. They introduced the reptile algorithm, which is a variation of the MAML, using only the first derivative. The basic difference from FOMAML is that the last step treats \(\overline{\theta}\)\(-\)\(\theta\) as a slope and feeds it into an adaptive algorithm such as ADAM. Algorithm 2 presents reptile. ```
1:Initialize \(\theta\), the vector of initial parameters
2:foriteration\(=1,2,\dots,\)do
3:Sample task \(T\), corresponding to Loss \(L_{T}\) on weighs vector \(\overline{\theta}\)
4:Compute \(\overline{\theta}=\mathbb{U}_{T}^{k}(\theta)\), denoting k steps of gradient descent or Adam algorithm
5:Update \(\theta\leftarrow\theta+\varepsilon\big{(}\overline{\theta}-\theta\big{)}\)
6:endfor
```  
**Algorithm 2**. Reptile algorithm. MAML also suffers from training instability, which can currently only be alleviated by arduous architecture and hyperparameter searches. [PERSON] et al. proposed an improved variant of the algorithm, called MAML++, which effectively addresses MAML problems, by providing a much improved training stability and removing the dependency of training stability on the model's architecture. Specifically, [PERSON] et al. [14] found that simply replacing max-pooling layers with stridden convolutional layers makes network trainingunstable. It is clearly shown in Figure 3 that in two of the three cases, the original MAML appears to be unstable and irregular, while all 3 MAML++ models appear to converge consistently very quickly, with much higher generalization accuracy without any stability problems. It was estimated that the instability was caused by a gradient degradation (gradient explosion or vanishing gradient) which was due to the depth of the network.