# A Cross-Level Iterative Subtraction Network for Camouflaged Object Detection
## 3 CISNet Method
### Enhanced Guidance Attention  
Although we obtain complementarity-enhanced features from the previous process, some noise and blurred edges may still exist in \(\{F_{level_{i}}\}_{i=1}^{3}\). The most common solution is to use fully convolutional decoders, which have the ability to capture high-level semantics, but local convolution and pooling operations restrict the receptive field range. As well, self-attention mechanisms also face difficulties in modeling high-frequency information and capturing fine contours, which may result in biases when predicting object boundaries. Inspired by the Multi-Dconv Head Transposed Attention [54], we design enhanced guidance attention (EGA) to further explore the multi-scale local contextual information and capture a broader range of relationships between different feature maps, improving the segment accuracy of camouflaged objects. The structural details of EGA are shown in Figure 3.  
Given the complementarity-enhanced feature \(\{F_{level_{i}}\}_{i=1}^{3}\) and the output \(\{X_{i+1}\}_{i=1}^{3}\) from deeper EGA (for the initial EGA, the two inputs are \(F_{level_{3}}\) and \(E_{4}\)), EGA first generates _query_ (**Q**), _key_ (**K**) and _value_ (**V**) matrices. **Q** and **V** are generated by adding up the results of three parallel convolutions of \(1\times 5\), \(5\times 1\), and \(3\times 3\) applied on normalized \(X_{i+1}\) and \(F_{level_{i}}\) separately. In this process, strip convolutions with \(1\times 5\), \(5\times 1\) are used to capture long-range dependencies in the horizontal and vertical directions, while a standard \(3\times 3\) convolution is employed to gather more local context information. Combining these three layers of convolution is conducive to detecting camouflaged objects with different sizes and shapes because we use square windows to detect features and strip windows, making our approach more advantageous compared to methods such as dilatation convolution and pyramid pooling. **K** is obtained by normalizing \(X_{i+1}\). Subsequently, we concat **Q** and **K** to generate an enhanced \(\textbf{K}^{\prime}\), which can be formulated as  
\[\textbf{K}^{\prime}=Conv_{1\times 1}([\textbf{Q},\textbf{K}]) \tag{3}\]  
where \([\textbf{Q},\textbf{K}]\) is the concatenation operation and \(Conv_{1\times 1}\) is the \(1\times 1\) convolution layer to compress the number of feature channels from 128 to 64.  
In the next step, we reshape **Q** and \(\textbf{K}^{\prime}\) matrices such that their dot-product interaction generates an attention map **A**. Then, we apply attention map **A** to **V** to obtain a more precise detection than \(F_{level_{i}}\). In addition, we fuse the original \(F_{level_{i}}\) to the results via a skip connection to further complement its semantic information. Overall, the EGA process is expressed as  
\[X_{i}=\textbf{V}\cdot Softmax(\frac{\textbf{Q}^{\top}\textbf{K}^{\prime}}{ \alpha})\ +\ F_{level_{i}},\ \ \ i=1,2,3. \tag{4}\]  
where \(\alpha\) is a learnable scaling parameter to control the magnitude of the dot product of **Q** and \(\textbf{K}^{\prime}\) before applying the softmax function. We use \(P\) predicted by \(X_{1}\) as the final prediction map, which is simultaneously supervised by ground truth.