# Multi-Scale Twin Networks for Coastal Zone Change Detection in Remote Sensing Imagery
## 3 Principles and Methods
### Edge Feature Extraction  
We used ResNet as the backbone network, with the initial fully connected layer removed, consisting of five layers: one convolutional layer (Conv1) and four residual blocks (Res2, Res3, Res4, Res5). ResNet introduces residual connections, which mitigate the vanishing/explosion gradient problem and enhance the trainability of deep neural networks. In the coastal zone change detection task, ResNet can gradually extract and integrate features at multiple scales while preserving details through its deep structure and residual connections, which helps process complex information in high-resolution coastal zone images. The backbone network performs downsampling operations with a stride of 2 in Res3 and Res4, obtaining feature maps at different scales. Removing the initial fully connected layer prevents the loss of spatial information due to flattening the input image. Moreover, removing the fully connected layer allows for more flexible use of convolutional layers to extract and process multi-scale features, improving the model's adaptability to images of different scales. Compared to land-based building change detection, a key challenge in coastal zone change detection is the irregularity of the change area's shape. Coastal changes such as erosion, sea-level rise, wetland degradation, and vegetation cover alterations typically exhibit complex and variable contours, making edge detection more challenging. To enhance the model's ability to capture complex edge changes in coastal zones, we introduced the high-frequency attention module (HFAM). The HFAM's high-frequency enhancement module effectively filters out low-frequency noise (e.g., large water bodies and sandy areas) using isotropic Sobel operators, allowing the model to focus on the edge regions where actual changes occur. Furthermore, the HFAM can detect both large-scale and small-scale local feature changes, effectively addressing challenges in dynamic coastal zone change scenarios. Moreover, traditional multi-scale feature extraction methods often generate a large number of feature maps. Although these feature maps contain both rich high- and low-frequency information, much of it is redundant or irrelevant, which increases model complexity and training difficulty while reducing detection accuracy. To optimize multi-scale feature processing and improve the extraction capability, we input feature maps of different scales into the HFAM, which operates in parallel with ResNet. This integrates global context information through the attention mechanism, captures long-range pixel dependencies, and enhances feature representation over a broader range, thus improving the overall detection performance. The HFAM follows the design pattern of the convolutional block attention module (CBAM) [18], consisting of two sub-modules: the spatial attention module and the high-frequency enhancement module. Its workflow is illustrated in Figure 2. First, the input feature map F passes through the spatial attention module, generating a spatial attention mask. The input feature map is then element-wise multiplied with the mask, and the result is summed to produce the spatial attention feature map M\({}_{\text{c}}\). Subsequently, the spatial attention feature map M\({}_{\text{c}}\) is passed into the high-frequency enhancement module, where high-frequency features M\({}_{\text{s}}\) are extracted using the Sobel operator [19]. Meanwhile, a weight map is generated through convolution, and an intermediate feature map F\({}^{\prime}\) is obtained by element-wise multiplication with the spatial attention feature map. Finally, the intermediate F\({}^{\prime}\) and high-frequency M\({}_{\text{s}}\) feature maps are fused along the channel dimension, and the feature map size is adjusted through \(1\times 1\) convolution to output the edge features M\({}_{\text{H}}\).