## 2 Methods
### Root Mean Square Propagation Algorithm
The photoacoustic pressure gradient value \(W_{2}\) of each tissue boundary can be extracted by setting a threshold value. When the imaging effect is better, the photoacoustic pressure value in the tissue boundary area shows a \"cliff-like\" change. The gradient amplitude value of the boundary area extracted by the threshold is larger and the boundary is more accurate. When the imaging effect is poor, the photoacoustic pressure value in the tissue boundary region shows a gentle \"stepped\" change due to the possible blurring and artifacts in the image. This makes the gradient amplitude value lower in the border area. The above analysis shows that the gradient values of each tissue boundary in a photoacoustic image can reflect the quality of the image. When Equation (18) is applied to calculate the value of the objective function, the better the quality of the photoacoustic image, the smaller the value of the objective function. Taking the \(s\)th iteration as an example, the gradient vector of the objective function at the sound speed vector \(\mathbf{V_{s}}\) is calculated. The gradient vector contains K derivatives. When the derivative of each type of tissue is calculated, only the sound speed of this tissue is changed and the sound speeds of other tissues remain unchanged, \(\partial v_{s,k}\) is obtained. The value of the objective function before and after changing \(v\) is calculated to obtain the D-value \(\partial F_{s,k}\). The derivative of the kth tissue region is \(g_{s,k}=\partial F_{s,k}/\partial v_{s,k}\). The gradient vector for this iteration is as follows:  
\[\
abla F(\mathbf{V_{s}})=[g_{s,1},\ g_{s,2},\cdots,\ g_{s,k},\cdots,\ g_{s,K}]^{T}. \tag{19}\]The negative direction of the gradient vector is the direction with the fastest descent at \(\mathbf{V}_{s}\). Along this search direction, the sound speeds of various tissues are updated as follows:  
\[\mathbf{V}_{s+1}=\mathbf{V}_{s}-\lambda\
abla\mathbf{F}(\mathbf{V}_{s}). \tag{20}\]  
where \(\mathbf{V}_{s+1}\) represents the updated sound speed vector and \(\lambda\) is the predefined constant step length. The distribution size of different tissues in real biological tissues may be very different. When calculating the derivative of each tissue, the objective function is more sensitive to changes in the sound speed of the tissue with large regional distribution. This causes its derivative to differ from that of other tissues. In this case, if the fixed step length is applied to update the sound speed value, it may lead to large differences in the updated amplitude of the sound speed values of various tissues. The sound speed of tissue with large regional distribution may converge faster and even incorrectly compensate for sound speed errors in other tissues. It not only interferes with the updates to the sound speed of other tissues and seriously affects the stability of the convergence process, but also may trap the sound speed field into a local optimum. To solve this problem, the RMSprop algorithm is introduced to realize the improvement in the constant step length in the GD method. The RMSprop algorithm adaptively adjusts the step length of the sound speed of each tissue according to the weighted average of the square of the historical derivatives of the corresponding tissue [23]. If the derivative of the tissue is larger, the RMSprop algorithm will automatically reduce its step length. If the derivative of the tissue is smaller, its step length will automatically increase accordingly. The step length of adaptive adjustment can balance the amplitude of the sound speed update, which makes the convergence process more stable, and the accuracy of the sound speed field can be improved.