## 2 Materials and Methods
### Module Two: Multi-Level Spatial Aggregation Strategy (MSAS)  
In remote sensing image segmentation, relying solely on the semantics of a single pixel is often insufficient to accurately determine the category information of that pixel. It is necessary to fully utilize the neighboring pixels for joint determination. Therefore, a multi-level spatial feature aggregation module has been proposed. In Figure 4, Each branch divides the input into different pyramid scales, and the object context pooling is shared within each branch, then we concatenate the four output feature maps with a new feature map that is generated by increasing the channels of the input feature map by \(4\times(512\to 2048)\). Initially, this method compresses the channel dimension of the feature maps output by the backbone network through \(3\times 3\) convolutions. The specific formula is as follows:  
\[F_{reduced}=Conv_{3\times 3}(F) \tag{11}\]  
In the formula, \(F\) represents the input feature map, \(F_{reduced}\) represents the feature map after dimension reduction through a \(3\times 3\) convolution, and \(Conv_{3\times 3}\) represents the \(3\times 3\) convolution operation. This approach not only reduces the model's computational complexity and memory consumption, but also retains key information in the feature map to avoid excessive information loss. Secondly, to accurately capture contextual information across different spatial ranges, we first divide the dimension-reduced feature map into regions of multiple scales. This enables the model to capture feature information from local details to global structures, which is helpful for understanding and segmenting targets of various sizes and shapes. Then, within each region, we analyze information related to local features, such as color,  
Figure 4: The original feature maps are dimensionally reduced through \(1\times 1\) convolution, and then concatenated with the output feature maps of the encoding layer, forming the input for the multi-level spatial feature aggregation module (MSAS). MSAs further reduces the dimensionality of feature maps using \(3\times 3\) convolution and implements multi-scale pyramid pooling on this basis, capturing cross-level spatial information through an object context pooling (OCP) strategy. Additionally, a sparse self-attention mechanism is introduced to perform a weighted summation of the feature maps, thereby enhancing the model’s focus on key features. The processed feature maps are then concatenated with new feature maps whose number of channels has been increased (expanded from 512 channels to 2048 channels). This step not only significantly enhances the channel dimensionality of the feature maps, but also enriches the depth and detail of feature representation, providing more precise and detailed feature information for the model’s final output, thereby enhancing the model’s analytical capability and depth of semantic understanding in complex scenarios. shape, and texture in that area. On this basis, we use a self-attention mechanism to consider the relationships between pixels within each region, rather than the global relationships of the entire image. This approach processes spatial features at different scales and applies object-based max pooling to enhance the model's understanding of the interrelationships between different objects within various regions. The formula for this is as follows:  
\[F_{splitk}^{k}= Split(F_{reduced}k) \tag{12}\] \[F_{ocp}^{k}= OCP(F_{split}^{k}). \tag{13}\]  
In the formula, \(F_{splitk}\) represents the result of spatially partitioning the dimension-reduced feature map according to the scale \(k\times K\); \(split\) represents the spatial partitioning operation, which divides the dimension-reduced feature map into spatial units of scale \(K\), with the size of each region determined by \(k\), such as 1, 2, 3, or 6, resulting in the feature map being divided into multiple regions of corresponding scales.