# Satellite On-Board Change Detection via Auto-Associative Neural Networks
## 2 Materials and Methods
### Dimensionality Reduction  
The dataset described in Section 2.1 was pre-processed. The red, green and blue bands (namely, band 2, band 3 and band 4) were considered for each image, having a finer spatial resolution of 10 m. Moreover, they have been proved suitable in various change detection techniques, especially the red band, in both vegetated and urban environments [24].  
Figure 6: AANN topology.  
After co-registration of each pair, the images were divided into sub-images, i.e., patches, with a dimension of \(32\times 32=1024\) pixels for a total of 55,191 patches. Each patch was normalized in the 0-1 interval, and the same procedure was done for the images in the test set [35]. We decided to set the goal of reducing the data dimensionality of one order; therefore, we aimed to represent each sub-image with 32 components. On one side, this clearly defines a benchmark for the level of reduction, which can be useful for future studies; on the other side, it is consistent with on-line implementations.  
The training dataset was split into two distinct parts, training and validation set, with a proportion of 80% and 20%, respectively as summarized in Table 1. The AANN training performance was evaluated both on the training set and on the validation set because, according to the early stopping algorithm, the training of the net was stopped when the error on the validation set reaches its minimum [11].  
The final AANN architecture resulted in the following topology: 1024 units in the input and output layers, 128 units in the encoded and decoded layer and 32 units in the bottleneck layer. The number of 128 units stems from a trial-and-error approach in which it was observed that other lengths of these intermediate layers did not improve the final performance. The model was developed in Python with TensorFlow2 and Keras libraries and trained with the mean squared error (MSE) loss function and Adam optimizer [36]; the batch size was set to 64. A backpropagation algorithm was applied for the weights matrix update [37]. Figure 7 shows the trend of the loss function for the training and validation sets.  
In the DWT dimensionality reduction procedure, the input image patches are similarly obtained by splitting the test images into sub-images of size \(32\times 32\) pixels. The Haar filter was chosen as the mother wavelet, and the number for the decomposition level was set to 2 [33], as shown in Figure 8.  
\begin{table}
\begin{tabular}{l c} \hline Total number of images & 55 \\ Total number of patches & 55,191 \\ Training patches (80\%) & 44,153 \\ Validation patches (20\%) & 11,038 \\ \hline \end{tabular}
\end{table}
Table 1: Train and validation distribution.  
Figure 7: Loss function trend.  
Figure 9 aims at comparing the patch reconstruction with both techniques AANN and DWT. Figure 9a,d shows the original test patches, extracted from the dataset at the R band (band number 4), at times t1 and t2; the significant variation in the lower left corner of the sub-image can be noted. Figure 9b,e, in the middle, illustrates the reconstructed patch obtained as the output of the AANN, after propagation of the original patch through the bottleneck layer. In Figure 9c,f, the DWT reconstruction is shown; only the first 32 coefficients of DWT were extracted, setting the remaining ones to zero.