# OISE: Optimized Input Sampling Explanation with a Saliency Map Based on the Black-Box Model
## 3 Proposed Method
### Definition of the OISE-Based Black-Box Method  
Using random or Monte Carlo sampling to generate multiple masks and compute the significance of each mask typically requires a large number of masks and computations. It is complex, wastes time and resources, and the range of significant features in the generated saliency map is not particularly accurate. The OISE method can generate a saliency map without accessing a network, and does not need to rebuild the network architecture. It is applicable to all image meshes. The mask is generated in an optimized way, the loss function is optimized, and the mask is continuously updated to minimize the generated mask area, which affects the decision score. When computing the mask, we should reduce the amount of computation, reduce the complexity, and reduce the key display area of the saliency map in the final  
Figure 2: Flowchart of the OISE algorithm. This is the flowchart of the OISE technology. The masks are generated in an optimal way and the masks are continuously updated by optimizing the loss function to minimize the generated mask area and influence the decision score. output. The main content is to subsample the input image with the mask, record the response to each masked image, and then detect the basic model. The weights are derived from the output probabilities predicted by the masked images in the base model. The linear combination of multiplying the weights and masks and then adding them together is the final saliency map. \[S_{I,f}(\lambda)\approx\frac{1}{E[M]\cdot N}\sum_{i=1}^{N}f(I\odot M_{i})\cdot M _{i}(\lambda) \tag{1}\]  
where f is a black-box model that produces scalar confidence scores for a given input of I, I is the input image, m is the binary mask, and \(I\odot M\) denotes element multiplication. The importance of a pixel \(\lambda\) is its expected score on the mask M. The more important the pixel, the higher \(I\odot M\) is. First, input the image I to generate a mask pointing to the input image. Mask generation process:  
Initialize a random mask. Use gradient descent technology to optimize the MSE (Mean Square Error) loss function. \(X\), \(Y\) are the horizontal and vertical coordinates of the input image. To learn the desired model, we find the optimal parameters by minimizing the cost function \(\theta\). \[MSE=\frac{1}{N}(Y-X\theta)^{T}(Y-X\theta) \tag{2}\]  
Choose the initialized parameter value. For example, \(\theta=(0,0,0,\dots,0)\). Then, select the step \(\alpha=0.1\). Calculate the partial differential according to the loss function:  
\[\
abla MSE(\theta)= \begin{bmatrix}\frac{dMSE(\theta)}{d\theta_{0}}\\ \frac{dMSE(\theta)}{d\theta_{0}}\\ \vdots\\ \frac{dMSE(\theta)}{d\theta_{p}}\end{bmatrix} =\frac{2}{N}X^{T}(X\theta-Y) \tag{3}\]  
Update \(\theta\) until convergence. \[\theta=\theta-\alpha\
abla MSE(\theta)=\theta-\alpha X^{T}(X\theta-Y) \tag{4}\]  
Add \(L_{2}\) regulation to make the parameters close to 0, but not equal to 0. Reducing the parameter size, complexity, and mask area will affect the decision score:  
\[loss_{L_{2}}(w)=\sum_{i}w_{i}^{2} \tag{5}\]  
Update mask M according to the optimized loss function to mask the input image I. Then, the input image I is multiplied by the mask \(M_{i}\) to obtain the masked image \(I\odot M_{i}\) with i = 1,..., N.  
Input the cover image in the basic model f and output the weight value. The weights are the probability scores generated by the masks and are adjusted according to the distribution of the masks. The final saliency map is generated by a linear combination of the weights and the masked images, multiplied, and then summed. Finally, the weighted value of the mask is taken to obtain the saliency map. The complete process is shown in Algorithm 1.