# Deep Learning-Based Optimization for Maritime Relay Networks
## 3 Relay Network Based on Deep Learning
1.4 Generate SNR Assuming a Rayleigh channel, the generated channel parameter \(\lambda\) follows a uniform distribution \(\lambda\sim U(\lambda_{a},\lambda_{b})\), which models the random yet bounded variability in channel conditions. The SNR vectors \(\gamma_{1}\) and \(\gamma_{2}\) follow the exponential distribution \(\gamma_{i}\sim Exp(\lambda)\), which is consistent with the theoretical Rayleigh fading model. 1.5 Pack data  Repeat steps 1.1-1.4 for \(2K\) times. Re-organize all data and pack them into \(\mathbf{X}=[\mathbf{X_{t}},\mathbf{X_{p}}]\). Step 2: Generate output data 2.1 \(\hat{K}^{*}\) is the selection result of the optimal strategy. 2.2 Monte Carlo method is used to calculate the connectivity probability of the optimal result. Pack the results into \(\mathbf{Y}=[\mathbf{Y_{t}},\mathbf{Y_{p}}]\). Step 3: Predict relay selection 3.1 Pack the training samples \([\mathbf{X_{t}},\mathbf{Y_{t}}]\) and



### Data Features Extractor

The feature extractor is specifically designed for highly mobile nodes in dynamic networks, with a focus on efficiently capturing essential patterns from fluctuating input data. Initially, CNN layers are utilized to extract latent features from raw data. These layers transform low-level input variations into high-level representations, which are subsequently passed to fully connected layers for further processing. This hierarchical structure significantly enhances the model's capacity to recognize complex relationships, such as those between communication links. CNNs, as multilayer neural networks within a deep supervised learning framework, are designed to process diverse data types, including time-series and spatially structured data. Although traditionally applied to two-dimensional image processing tasks, the same principles can be effectively extended to handle one-dimensional sequential data [22]. In the proposed scheme, the CNN architecture incorporates convolutional and pooling layers, where each convolutional layer applies a set of kernels for feature extraction. The resulting features are passed through a Rectified Linear Unit (ReLU) activation function, which introduces non-linearity into the model. Pooling layers, particularly max-pooling, play a critical role in reducing the feature dimensions while retaining essential information, thereby improving computational efficiency and mitigating overfitting risks. The integration of convolutional and pooling layers not only reduces the complexity of the feature space but also ensures robustness to variations in the input data. By preserving the invariance of feature mappings, the model adapts effectively to dynamic input conditions. The max-pooling operation can be represented by (25) as:

\[y_{t}^{j}=\max\ pooling(x_{t}^{j-1},s_{\text{scale}},s_{\text{stride}}), \tag{25}\]

the pooling window size \(s_{\text{scale}}\) is set to \(2\times 2\), and the stride \(s_{\text{stride}}\) is set to 2. These settings are chosen to balance computational efficiency and feature preservation, ensuring effective downsampling of the input feature maps while maintaining critical data characteristics. The CNN extracts data features through layer-by-layer convolution and pooling operations. The filter's window size and stride can be flexibly set based on the input data dimensions and the complexity of the features to be captured. The convolutional layers of the CNN are capable of identifying spatial features relevant to relay node selection, such as wave height, wind speed and ocean current direction. The extraction of these features helps enhance the predictive performance of the model. The calculation formula is shown in Equation (26). \[l_{t}=\tanh(x_{t}*k_{t}+b_{t}), \tag{26}\]

where \(l_{t}\) represents the output value after convolution, \(\tanh\) is the activation function, \(x_{t}\) is the input vector, \(k_{t}\) is the weight of the convolution kernel and \(b_{t}\) is the bias of the convolution kernel.