# WaveConv-sLSTM-KET: A Novel Framework for the Multi-Task Analysis of Oil Spill Fluorescence Spectra
## 2 Materials and Methods
### Multi-Task Spectral Analysis Framework
#### 2.3.1 Wavelet Transform CNN Block  
The WaveConv block, shown in Figure 3a, is a critical component for lightweight network design and multi-scale feature extraction from spectral data. It consists of a CNN module and a Wavelet CNN module. Traditional CNN models for spectral analysis typically include multiple convolutional layers and fully connected layers. Convolutional layers are used for feature extraction and dimensionality reduction (e.g., through convolutional layers with large kernel sizes and strides), while fully connected layers combine extracted feature maps nonlinearly to enhance predictive capability. However, fully connected layers introduce a large number of parameters, reducing computational efficiency and increasing the risk of overfitting. In our previous research, we proposed a lightweight spectral analysis model that replaces fully connected layers with Global Average Pooling (GAP), reducing parameter counts while maintaining prediction accuracy [12]. Thus, the CNN module in the WaveConv block incorporates the core design from this model, as illustrated in Figure 3b. The CNN module includes three convolutional layers with residual connections to improve stability. Each convolution performs the following operation:  
\[y=\text{ReLU}(\text{BN}(\text{Conv1d}(\text{BN}(\text{Conv1d}(\ x))))+\text{ Shortcut}(x)) \tag{1}\]  
where BN represents Batch Normalization, ReLU is the Rectified Linear Unit, and Shortcut denotes dimension-matched skip connections. After convolution, GAP compresses the feature dimensions to 1, and the features are flattened as the following:  
\[z_{\text{cnn}}=\text{Flatten}(\text{AdaptiveMaxPool1d}(y)) \tag{2}\]  
Figure 2: WaveConv-sLSTM-KET framework. However, CNNs can only extract local features, ignoring the sequential continuity of spectral data. For spectral analysis tasks, enhancing the model's ability to understand feature sequences improves robustness and aligns with physical logic. Therefore, we introduced the Wavelet Transform Convolution (WTConv) operation to enhance the model's multi-scale feature extraction capability. [PERSON] et al. [41] proposed an improved convolution operation, called Wavelet Transform Convolutions (WTConv), which increases the receptive field of the model without adding computational overhead. WTConv uses wavelet transforms to decompose features into high-frequency and low-frequency components, allowing convolution operations to focus on distinct frequency bands. Its effectiveness has been validated in image segmentation tasks. Inspired by WTConv, we simplified this into a Wavelet CNN module suitable for 1D data to extract multi-scale features, as illustrated in Figure 3c. The Wavelet CNN module operates as follows: First, a predefined wavelet filter (f\({}_{\text{wavelet}}\)) is applied to the input tensor X\(\in\)\(\mathbb{R}^{\beta\times\mathbb{C}\times L}\) (where B is the batch size, C is the number of channels, and L is the sequence length). The wavelet transform decomposes \(X\) into W\(\in\)\(\mathbb{R}^{\beta\times\mathbb{C}\times 2\times L/2}\), containing low-frequency and high-frequency (W\({}_{\text{LL}}\) and W\({}_{\text{LH}}\)) components, as shown in Equation (3). Similarly, f\({}_{\text{wavelet}}\) contains two filters: a low-pass filter and a high-pass filter (f\({}_{\text{LL}}\) and f\({}_{\text{LH}}\)). \[\text{W}=\text{WT}(X)=\text{Conv1d}(X,\text{f}_{\text{wavelet}},\text{stride}=2, \text{padding}=\text{pad}) \tag{3}\]  
After decomposition, convolutions are independently applied to the frequency components.