## 2 Methods
### Root Mean Square Propagation Algorithm  
\"K-means + GMM\" fits the photoacoustic pressure data into \(K\) Gaussian distributions; namely, the regional distribution information about \(K\) tissues is obtained. To further improve the accuracy of the sound speed field, it is necessary to search for more accurate sound speeds for each tissue based on regional distribution information. The clinical data information about biological tissues is usually selected for sound speed assignment in the reported methods. However, this method relies heavily on clinical data. Moreover, there are differences in tissue sound speeds among different individuals. The selection of sound speed based on clinical data may still be inaccurate. To avoid these problems, the RMSprop algorithm is used in this paper to realize the automatic optimization of the sound speed field. The RMSprop algorithm is an improved algorithm based on the gradient descent (GD) method, which continues the optimization strategy of the GD method. The fixed step length of the GD method is improved to the adaptive step length to improve the stability of the algorithm. To highlight the improvement purpose of the RMSprop algorithm, the GD method is first introduced. The GD method is an optimization algorithm used to solve the extreme value problem of function [22]. It iteratively optimizes the independent variables of function by calculating the negative gradient direction of the objective function. It is hoped that the optimal solution of the corresponding independent variables can be obtained when the objective function converges. It is known that the purpose of correcting the inhomogeneous sound speed field is to improve the quality of photoacoustic images and make it closer to the real distribution of biological tissue. When the GD method is applied to solve the optimal sound speed, the function evaluating the quality of photoacoustic images can be set as the objective function. The sound speed of each tissue is the \(K\) parameter of the objective function. This method can identify the best search direction of the sound speed field and realize the automatic update of the sound speed of each tissue. In the GD method, the initial sound speed vector and objective function are first set as follows:  
\[\mathbf{V}_{0}=[v_{0,1},\ v_{0,2},\cdots,\ v_{0,k},\cdots,\ v_{0,K}]^{T}, \tag{16}\]  
\[W_{1}=\sqrt{(\frac{p_{m+1,n}-p_{m-1,n}}{2})^{2}+(\frac{p_{m,n+1}-p_{m,n-1}}{2} )^{2}}, \tag{17}\]  
\[F=-\frac{\sum_{N_{W_{2}}}W_{2}}{N_{W_{2}}}. \tag{18}\]  
For the convenience of calculation, the sound speed of each tissue in the inhomogeneous sound speed field is formed into a sound speed vector in a fixed order. Equation (16) is the initial sound speed vector formed by the initial sound speed field. In Equation (17), \(W_{1}\) represents the gradient value of the pixel at the (\(m\),\(n\)) position. \(p_{m,n}\) represents the photoacoustic pressure value of the pixel at the (\(m\),\(n\)) position in the photoacoustic image. As shown in Equation (18), \(W_{2}\) represents the photoacoustic pressure gradient values at each tissue boundary extracted from the \(W_{1}\) data. \(N_{W_{2}}\) represents the number of tissue boundary gradient values in \(W_{2}\). The objective function \(F\) can be obtained by calculating the negative average of all the gradient values in \(W_{2}\). It is known that there are differences in photoacoustic pressure values in different tissue areas and the photoacoustic pressure values of the same type of tissue are very similar. When Equation (17) is applied to calculate the gradient, the gradient value of the pixels in the internal region of the tissue tends to be 0 due to the similarity of the tissues. The gradient value of the pixel in the tissue boundary region is determined by the photoacoustic pressure difference value of the tissue on both sides of the boundary. Its gradient value is larger relative to the gradient value inside the tissue.