# Transformer Self-Attention Change Detection Network with Frozen Parameters
## 2 Methodology
### Global Information Aggregation Unit (GIAU)  
The unique aspect of change detection tasks lies in the handling of two remote sensing pictures taken at various times and the generation of a mask image that identifies the changed and unchanged regions. This implies that the two sets of feature information extracted by a pair of ResNets with shared weights need to be aggregated into one set of feature information that is strongly correlated with the changed regions. Furthermore, due to the difference in capture time, the two images often exhibit variations beyond the identified changed regions, such as shooting angle deviations, shadow effects, cloud cover, and seasonal vegetation changes. To extract the true changed regions from these noise sources, simple fusion approaches may lead to a loss of information integrity or even compromise the extracted feature information. We propose a novel Feature Fusion Unit (FFU) to perform the fusion and extraction of two sets of feature information. The FFU consists of three independent units and receives the feature sets extracted during the downsampling stage. To facilitate comprehensive interaction between these sets, we designed the Global Information Aggregation Unit (GIAU), which selectively extracts the information most relevant to the changed regions.  
The GIAU is designed to handle variations in input remote sensing images, such as angular deviations, shadows, and seasonal changes. The core mechanism involves first subtracting features from the two images and applying a convolutional layer to compute the differences. These differences are used to calculate weights, which are then multiplied with the feature maps to enhance relevant change information. The operations in the GIAU, particularly the convolutional layer, enable the model to focus on the most significant changes, effectively addressing variations in environmental conditions. Furthermore, the selective extraction mechanism is enhanced by aggregating features from the two images, which helps to focus on genuine changes rather than noise or irrelevant variations. Figure 2 shows a schematic diagram of the GIAU, where the inputs of the GIAU are set to \(f_{1}\in R^{B\times C\times H\times W}\) and \(f_{2}\in R^{B\times C\times H\times W}\). First, we subtract \(f_{1}\) and \(f_{2}\) and then send the result to a \(3\times 3\) convolutional layer that keep the number of channels. Then, we use the output of the \(3\times 3\) convolutional layer as the weight to multiply the two input information and add the inputs \(f_{1}\) and \(f_{2}\). Afterwards, the obtained two pieces of information are sent to the \(3\times 3\) convolutional layer, in which the number of channels is halved in the channel dimension. Finally, the output of the convolutional layer with the number of channels is halved, and the first two pieces of input information are added and sent to the \(1\times 1\) convolutional layer without changing the number of channels to obtain the final output \(f_{out}\in R^{B\times C\times H\times W}\). The specific arithmetic expression is as follows:  
\[f_{3}=\text{Conv}_{3\times 3}(|f_{1}-f_{2}|), \tag{1}\]  
\[f_{4}=\text{Concat}((f_{1}+f_{1}\times f_{3}),(f_{2}+f_{2}\times f_{3})), \tag{2}\]  
\[f_{\text{out}}\,=\text{Conv}_{\text{belt}}(f_{1}+f_{1}+\text{Conv}_{3\times 3 }(f_{4})), \tag{3}\]  
where \(|\cdot|\) represents the absolute value operation, and \(\text{Concat}(\cdot,\cdot)\) represents the concatenation along the channel dimension.