# 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.3 Kolmogorov-Arnold Network-Enhanced Transformer Block  
The transformer architecture, first introduced by [PERSON] et al. [43], has revolutionized natural language processing due to its outstanding attention mechanism and position-encoding methods. It has since been widely adopted in fields such as computer vision, time-series analysis, and spectral data classification. However, transformers have certain limitations. The feedforward layers in traditional transformers consist of multiple fully connected layers, which are the main contributors to the model's parameters. This increases computational complexity and memory requirements, making transformer-based oil spill analysis models challenging to deploy on resource-constrained hardware. Moreover, the simplistic linear transformations and activation functions in the feedforward layers struggle to model the highly nonlinear relationships in spectral data, while dense parameterization increases the risk of overfitting.  
To address these issues and enable the model to focus on different parts of the oil spill spectra simultaneously--capturing both local and global dependencies--we propose an improved transformer structure. Kolmogorov-Arnold Networks (KANs) replace the feedforward layers in the original transformer, eliminating the need for fully connected  
Figure 4: (**a**) sLSTM block; (**b**) sLSTM module.  
layers. Additionally, the multi-head attention mechanism is enhanced by applying KAN-based nonlinear mapping to its output, reducing the parameter count while improving nonlinear representation capabilities. This module, referred to as the Kolmogorov-Arnold Network-Enhanced Transformer (KET) block, is illustrated in Figure 5a.  
KAN, introduced by [PERSON] et al. [44], leverages learnable activation functions on edges to replace traditional linear weights. This novel architecture enhances model expressiveness and interpretability, particularly for compositional tasks. The computational process of the KAN module is shown in Figure 5b. Each learnable edge function (\(\phi_{j,i}\)) combines a base activation function (\(b(x)\)) and a spline (\(s(x)\)), defined as follows:  
\[\phi_{j,i}(x)=w\cdot(b(x)+s(x)) \tag{7}\]  
where \(b(x)=silu(x)\) and \(s(x)=\sum_{k}c_{k}B_{k}(x)\), with \(B_{k}(x)\) being B-spline basis functions. In the proposed KET block, each linear transformation in the original feedforward layer is replaced by the following:  
\[f_{KAN}(x)=\Phi_{2}(\Phi_{1}(x)) \tag{8}\]  
where \(\Phi_{1}\) and \(\Phi_{2}\) are KAN layers with learnable spline-based edge functions.  
Additionally, the attention mechanism output in the transformer is passed through KAN-based nonlinear mapping:  
\[\text{KAN}(\text{Q},\text{K},\text{V})=\Phi_{KAN}(\text{ATTENTION}(Q,K,V)) \tag{9}\]  
Figure 5: **(a)** KET block, **(b)** KAN module.  
This ensures that the model effectively captures complex compositional structures and single-variable feature intricacies. By replacing the original dense layers with KAN, the KET block achieves a more compact representation, reducing the parameter count while maintaining performance. With the incorporation of KAN's learnable nonlinear mapping capabilities, the KET block captures complex spectral features and relationships that are often overlooked by traditional dense layers. Furthermore, KAN's reduced sensitivity to noise makes the enhanced transformer module more robust when handling real-world spectral data. The lower parameter count also makes the spectral analysis framework more suitable for deployment on resource-constrained devices, enabling real-time oil spill spectral analysis.