# Lp-Norm Inversion of Gravity Data Using Adaptive Differential Evolution
## 2 Differential Evolution
### Improved Differential Evolution Algorithm  
(1) Improvement of Mutation Strategy When conducting gravity inversion, to obtain a smooth density model, it is necessary to use a proper smoothing technique to process the disturbance direction. For the disturbance direction \(d_{i,j}\) of variable \(m_{i,j}\), the adjacent variables and weights information are represented as shown in Figure 1. Assuming the weight of each adjacent point is \(W_{s,i,j}\), then the smoothed \(d_{s,\ i,j}\) can be calculated by:  
\[d_{s,\ i,j}=\frac{\sum_{l-1}^{1}\sum_{m=-1}^{1}W_{s,i+l,j+m}d_{i+l,j+m}}{\sum_ {l=-1}^{1}\sum_{m=-1}^{1}W_{s,i+l,j+m}} \tag{10}\]  
In order to use the above formula repeatedly, the coefficients associated with all \(d_{ij}\) can be converted into a sparse matrix \(S\), in which the \(k\)-th row stores the weight information of direction \(k\) and its adjacent elements. Finally, the smooth matrix is expressed as:  
Figure 1: Square-shaped window of perturbation direction \(d_{ij}\). (**a**) \(d_{ij}\)’s neighborhood; (**b**) The weight information for \(d_{i,j}\) and its adjacent position. \[\mathbf{S}=\mathbf{S}^{f_{s}} \tag{11}\]  
where the parameter \(f_{s}\) is the times of applying the smooth filter. Usually, we use \(f_{s}=2\), implying that the density of each \(k\)-element is calculated taking into account the values of the adjacent 18 elements. Obviously, A greater value of \(f_{s}\) increases the scope used for the smoothing around the \(k\)-element. Here, the adaptive differential evolution algorithm (JADE) proposed by [PERSON] and [PERSON] [40] is used, in which the mutation strategy is \"current-to-pbest/1\", showed in:  
\[\mathbf{v}_{i}^{G}=\mathbf{m}_{i}^{G}+F_{i}\Big{(}\mathbf{m}_{pbest}^{G}-\mathbf{m}_{i}^{G} \Big{)}+F_{i}\Big{(}\mathbf{m}_{r1}^{G}-\mathbf{m}_{r2}^{G}\Big{)} \tag{12}\]  
where \(\mathbf{m}_{pbest}^{G}\) is randomly selected from the top \(p_{b}*100\%\) vectors in the \(G\)-th generation \((p_{b}\in[0,1])\). \(F_{i}\) is the scale factor related to the vector \(\mathbf{x}_{i}\). \(r1,r2\) used to construct the disturbance direction \(d_{i}\) for each mutant vector are mutually different random integers in the range of \([1,NP]\). Applying the smooth matrix to the perturbation direction formed by vectors r1 and r2, the new mutation strategy is:  
\[\mathbf{v}_{i}^{G}=\mathbf{m}_{i}^{G}+F_{i}\Big{(}\mathbf{m}_{pbest}^{G}-\mathbf{m}_{i}^{G} \Big{)}+F_{i}\mathbf{S}\Big{(}\mathbf{m}_{r1}^{G}-\mathbf{m}_{r2}^{G}\Big{)} \tag{13}\]  
In which, the difference vector part formed by the _pbest_ vector \(\mathbf{m}_{pbest}^{G}\) and the target vector \(\mathbf{m}_{i}^{G}\) is not smoothed, because smoothing will destroy the convex combination of \(\mathbf{m}_{pbest}^{G}\) and \(\mathbf{m}_{i}^{G}\). Adaptive Guided Evolution  
In JADE, the parameter \(p_{b}\) in the \"current-to-\(p\)best\" mutation strategy is fixed throughout the evolution process and needs to be manually set according to the problem. Then, in order to improve the exploration ability of mutation mechanism, [PERSON] and [PERSON] [41] assigned an independent \(p_{b,i}\) to each target vector \(\mathbf{m}_{i}\) by applying a uniform distribution. Here, the value of \(p_{b,i}\) is adaptively and independently generated for each vector \(\mathbf{x}_{i}\) based on the gaussian perturbation scheme. And \(p_{b,i}\) is defined as:  
\[p_{b,i}=randn_{i}\big{(}\mu_{p_{b}},0.1\big{)} \tag{14}\]  
The average value \(\mu_{p_{b}}\) is initialized to 0.5. If \(p_{b,i}\) is not in the interval \([2/NP,0.5]\), it will be truncated. At the end of each search, \(\mu_{p_{b}}\) is updated as follows:  
\[\mu_{p_{b}}=\big{(}1-c_{p}\big{)}\mu_{p_{b}}+c_{p}\cdot\text{mean}_{A}\big{(} S_{p}\big{)} \tag{15}\]  
Here, \(S_{p}\) is the set of successful \(p_{b}\) values in each iteration, \(c_{p}\in(0,1)\) is the learning rate of \(\mu_{p_{b}}\), \(\text{mean}_{A}\) represents the arithmetic mean. According to the above formula, it can be seen that the greedy here is controlled by \(\mu_{p_{b}}\), unlike in JADE, which is controlled by \(p_{b}\).