# Dynamic Weighted CNN-LSTM with Sliding Window Fusion for RFFE Final Test Yield Prediction
## 2 Materials and Methods
### Establishment of Yield Prediction Submodel
Its primary purpose is to first use convolutional layers to capture local short-term yield fluctuations and then employ LSTM to model long-term dependencies. This approach not only uncovers the intrinsic characteristics of the yield time series but also largely avoids the issue of information loss caused by long sequences, while ensuring the correlation between yield segments. Model B: A CNN-LSTM model for historical yield prediction. Construct a multifeature input yield prediction Model B based on CNN-LSTM. As analyzed during the dataset creation, in addition to the final yield of RFFE chips, the impact of certain test items must also be considered. For example, issues in the PA (power amplifier) process during chip manufacturing can lead to failures in a series of test items, such as output power, gain, and PAE (Power Added Efficiency). Therefore, yield prediction should also account for such feature-related influencing factors. In this context, a multifeature input yield prediction Model B based on CNN-LSTM has been constructed. Model B is designed to utilize multidimensional feature data collected during the production process (including yield and other process parameters) to more comprehensively capture the intrinsic factors influencing yield variations. By concatenating feature-related influencing factors with historical yield as multichannel inputs, Model B enables the model to simultaneously focus on multiple influencing factors, thereby demonstrating significant advantages in capturing the inherent correlations within the data. The construction method of Model B is similar to that of Model A, with the addition of multiple channels at the input layer, and its construction approach references Model A. Model C: A sliding window averaging model. Build submodel C to effectively mitigate the impact of short-term fluctuations and noise inherent in RFFE final test yield data; this study introduces an enhanced sliding window average prediction model (submodel C). Unlike conventional moving average techniques that rely solely on historical yield averages, this submodel integrates adaptive calibration to refine baseline predictions, offering a robust complement to the CNN-LSTM-based submodels. By leveraging past yield data over consecutive timesteps, submodel C computes a smoothed estimate of future yield, serving as a stabilizing reference within the multistrategy fusion framework. The design of submodel C incorporates the following advanced mechanisms: a dynamic sliding window is defined with a configurable size (set to 5 timesteps in this study, based on empirical analysis of production cycle stability) and a flexible step length. This ensures smooth transitions while maximizing data utilization across varying test conditions. The core computation employs a moving average formula, expressed as:  
\[MAt=\frac{1}{n}\sum_{i=t-n+1}^{t}Y_{i} \tag{4}\]  
where \(MA_{t}\) represents the moving average at time \(t\), \(n\) is the window size, and \(Y_{i}\) denotes the yield at timestep \(i\). To enhance innovation, an adaptive weighting scheme is introduced, adjusting the contribution of each timestep within the window based on its temporal proximity and variance, thereby prioritizing recent and stable data points. This is calculated as:  
\[MA_{t}=\sum_{i=t-n+1}^{t}w_{i}Y_{i} \tag{5}\]  
\[w_{i}=\frac{e^{-\alpha(t-i)}}{\sum_{j=t-n+1}^{t}e^{-\alpha(t-i)}} \tag{6}\]  
where \(w_{i}\) is the weight for timestep \(i\) and \(\alpha\) is a decay factor tuned to balance responsiveness and smoothness (set to 0.1 after optimization). This submodel provides a foundational yield estimate, reducing noise interference and short-term anomalies, while its adaptive nature strengthens the fusion process by offering a calibrated baseline that complements the feature-rich predictions of submodels A and B. Its simplicity ensures computational efficiency, making it ideal for real-time deployment in mass production environments.