## 4 Methodology
### Daf-FasterNet
#### 4.2.2 Deformable Attention to Capture Salient Information--DAS  
In the original FasterNet, the authors did not design an attention mechanism, resulting in low accuracy in handling combustion state recognition tasks. The attention mechanisms in convolutional neural networks can be roughly divided into channel attention, spatial attention, and mixed-domain attention. These methods use techniques such as aggregation, subsampling, and pooling to include specific attention computations, which, while improving recognition accuracy, significantly increase the computational load of the model. For industrial production scenarios, due to limitations in computing equipment or the requirement for low latency, these attention mechanisms are challenging to satisfy. Therefore, a lightweight attention mechanism, DAS [32] (structure shown in Figure 8), was introduced to improve FasterNet, enhancing recognition accuracy while maintaining a lightweight design. First, a depthwise separable convolution (DSC) is used as a bottleneck layer. This convolution method reduces the number of channels in the feature map, converting their number from \(c\) to \(\alpha\times c\). \(c\) is the selected dimension reduction parameter, balancing computational efficiency and accuracy (generally, \(0<\alpha<1\)). Extensive experimental results have shown that \(\alpha=0.2\) is the optimal choice [31]. After the bottleneck layer, instance normalization layer is applied. This process removes instance-specific contrast information from the image, improving the robustness of deformable convolution attention during training. This is followed by GELU nonlinear activation. These operations enhance the representation capability of the features, contributing to the effectiveness of the attention mechanism. Equation (11) represents the normalization compression process, where \(X\) is the input feature and \(W_{1}\) is the depthwise separable convolution. \[X_{c}=GELU(Instancnorm(XW_{1})), \tag{11}\]  
Figure 8: DAS attention mechanism. The compressed feature data, after being compressed by Equation (11), represent the feature context and are then passed through a deformable convolution (DC). This convolution uses a dynamic grid (offset \(\triangle p\)) instead of a regular grid, which helps focus on relevant image regions. Equation (12) presents the operation of the deformable convolution kernel, where \(k\) is the kernel size and its weights are applied at fixed reference points in \(p_{ref}\), similar to the regular kernel in a CNN. \(\Delta p\) is a trainable parameter that helps the kernel find the most relevant features, even if they are outside the reference kernel. \(w_{p}\) is another trainable parameter between 0 and 1. The values of \(\Delta p\) and \(w_{p}\) depend on the features on which the kernel function operates. \[deform(p)=\sum_{k=1}^{k}w_{k}\cdot w_{p}\cdot X(p_{ref,k}+\Delta p_{k}), \tag{12}\]  
After the deformable convolution, layer normalization is applied. Then, a Sigmoid activation function (\(\sigma\)) is used (as shown in Equation (13)). This convolution operation changes the number of channels from \(\alpha\times c\) to the original input (\(c\)). \[A=\sigma(LayerNorm(deform(X_{c}))), \tag{13}\]  
The output of Equation (13) represents an attention gate. This gate controls the flow of information from the feature map, with each element's value in the gate tensor ranging from 0 to 1. These values determine which parts of the feature map are emphasized or filtered out. Finally, to integrate the DAS attention mechanism into the CNN model, the method performs element-wise multiplication between the original input tensor and the attention tensor obtained in the previous step. \[X_{out}=X\odot A, \tag{14}\]  
The result of the multiplication in Equation (14) is the input of the next layer of the CNN model, seamlessly integrating the attention mechanism without needing to change the backbone architecture.