## 2 Methodology
### The 1 st ML Model to Predict the Spatial Distribution of Particles on the Substrate
#### 2.2.1 KNN-KDE-Based Prediction Module
\[\text{weight}_{\text{y}}=0\times 1_{\{\tau_{\text{y}}<w_{\text{d}}\}}+\min\left(1, \frac{\text{r}_{\text{y}}-\text{w}_{\text{d}}}{\delta}\right)\times 1_{\{\tau_{\text{y}} \geq\text{w}_{\text{d}}\}} \tag{19}\]  
\[\text{weight}_{\text{z}}=0\times 1_{\{\tau_{\text{z}}<w_{\text{d}}\}}+\min\left(1, \frac{\text{r}_{\text{z}}-\text{w}_{\text{d}}}{\delta}\right)\times 1_{\{\tau_{\text{z}} \geq\text{w}_{\text{d}}\}} \tag{20}\]  
where \(\delta\) (=0.5) is a decay factor. Finally, the overall weight for each candidate point is computed by combining the weights from the \(y\)- and \(z\)-directions, as expressed in  
\[\text{weight}=\text{weight}_{\text{y}}\times\text{weight}_{\text{z}} \tag{21}\]  
In extreme cases, such as when all the neighbors are located within the dead zone or when the number of available samples is insufficient, several points situated at the edge of the dead zone are subsequently selected from the filtered-out candidates to ensure that these potential positions are not entirely lost. After the filtering and weighting processes, KDE is used to model the local probability distribution. \[\hat{\text{P}}(\zeta)=\frac{1}{\sum_{\text{i}}\text{w}_{\text{i}}}\sum_{\text{ i}=1}^{\text{N}}\text{w}_{\text{i}}\text{K}\left(\frac{\zeta-\zeta_{\text{i}}}{ \text{h}}\right) \tag{22}\]  
where h is the bandwidth, K(\(\cdot\)) is the kernel function (e.g., Gaussian kernel), N is the number of candidate points, w\({}_{\text{i}}\) corresponds to the weight of each candidate point, \(\zeta\) is the test point, and \(\zeta_{\text{i}}\) refers to the training data. Subsequently, sampling is performed based on the KDE model to generate a batch of candidate points. The sampling is divided into two modes:  
1. Random Sampling: With a predetermined probability P\({}_{\text{rand}}\), points are directly selected at random from the KDE output, focusing primarily on regions corresponding to the peaks of the probability density. 2. Farthest Sampling: For the remaining proportion (1-P\({}_{\text{rand}}\)), within a batch of sampled points, the point that is farthest from the local mean (calculated as the mean of the neighbors obtained via KNN) is selected, simulating potential extreme deposition points. To ensure that the prediction results are both sufficiently exploratory and consistent with physical priors (i.e., avoiding an excessively high probability for points within the dead zone), a target rejection rate r\({}_{\text{t}}\) is predefined. This parameter is further refined in the subsequent ChatGPT (OpenAI. ChatGPT [[[https://chatgpt.com/](https://chatgpt.com/)]([https://chatgpt.com/](https://chatgpt.com/))], accessed on 12 April 2025) optimization process through the dynamic adjustment of the search space. The formula for calculating the rejection rate r is presented as  
\[\text{r}=\frac{\text{N}_{\text{rejected}}}{\text{N}_{\text{batch}}} \tag{23}\]  
where N\({}_{\text{batch}}\) is the total number of points sampled in the current batch and N\({}_{\text{rejected}}\) is the number of points that fall within the dead zone. When the actual sampling rejection rate r deviates significantly from the target rejection rate r\({}_{\text{t}}\), it becomes necessary to adjust the KDE bandwidth (h) to modify the distribution of sampled points. When r is excessively high, it indicates that the bandwidth h is too large, resulting in an overly dispersed sampling distribution that even captures a substantial number of points in regions that should be masked; hence, h must be reduced to achieve a denser distribution (see Figure 5) [19]. Conversely, if r is too low, the current bandwidth h is set too small, causing the generated sampling points to be overly concentrated, with most falling within the effective region and almost no points being rejected (as illustrated in Figure 6) [19].