## 2 Materials and Methods
### Classification Models
#### 2.3.3 M-SSL Model for Tree Classification Based on Multisource Images  
The proposed M-SSL comprises two pre-trained models and a contrast network model. The two modules train HSI and MSI, respectively, and extract features. This M-SSL is presented in detail next. In M-SSL, which was proposed for multisource remote sensing imagery, Contrast-Net was applied to reduce the need for deep networks because it only deals with low-dimensional vectors. M-SSL is separated into two parts to reduce the computational cost of each component, by formatting fixed vectors (such as 1024 d) for image coding, feature extraction, and contrast learning. After training the pretext modules, features can be ex  
Figure 4: Feature extraction with MAAE for HSI (h-MAAE). tracted from the input of HSI and MSI images, respectively. A small proportion of samples are trained to obtain satisfactory classification performance. According to the features extracted from the pretext task for multi-source images, the downstream task is carried out for tree species classification. In this paper, a multi-tisource self-supervised learning model (M-SSL) for tree species classification is proposed based on PCL. The training samples of the dataset are represented as \(X\), where, =\(\{x_{1},\ x_{2},\ \cdots,\ x_{n}\}\), and \(n\) denotes the number of training samples. The goal of PCL is to find the optimal embedding input so that the image \(X\) is transformed into the dimension as \(W\), \(W=\{w_{1},w_{2},\ \cdots,w_{n}\}\). The transform function is represented as \(w_{i}=f_{\varepsilon}(x_{i})\), where \(x_{i}\) was transformed into \(w_{i}\). The objective function is calculated by InNCE loss, and the equation is presented as follows:  
\[L_{inNCE}=\sum_{i=1}^{n}-log\frac{\exp\left(w_{i}\cdot w_{i}^{\prime}/\tau \right)}{\sum_{j=0}^{r}\left(w_{i}\cdot w_{j}^{\prime}/\tau\right)} \tag{8}\]  
where \(i\) denotes the sample of input, \(w_{j}^{\prime}\) denotes a positive embedding, \(r\) denotes the negative embedding of other instances, and \(\tau\) denotes the temperature hyperparameter. These embeddings are obtained as \(w_{i}^{\prime}=f_{\varepsilon^{\prime}}(x_{i})\) with the input \(x_{i}\) and \(\varepsilon^{\prime}\), which is the average momentum encoding. When minimizing \(L_{inNCE}\), the distance between \(w_{i}\) and \(w_{i}^{\prime}\) becomes closer, and the distance between \(w_{i}\) and \(r\) negative embedding samples becomes further. However, the original \(L_{inNCE}\) loss function has the same concentration to some extent because it uses a fixed parameter \(\tau\). However, when calculating the distance between \(w_{i}\) and each negative embedding, some negative embedding samples are not representative. Therefore, PCL proposed a new loss function \(L_{Proto}\)[36]. As shown in Equations (9) and (10) based on \(L_{inNCE}\), where, the parameter \(c\) is used instead of \(w\) in the loss function \(L_{Proto}\), and the original parameter \(\tau\) is replaced by the estimated parameter \(\varnothing\) for each prototype concentration. \[L_{Proto}=\sum_{i=1}^{n}-\left(\frac{1}{M}\sum_{m=1}^{M}log\frac{\exp\left(w_ {i}\cdot c_{S}^{m}/\varnothing_{S}^{m}\right)}{\sum_{j=0}^{r}\left(w_{i}\cdot c _{j}^{m}/\varnothing_{j}^{m}\right)}\right) \tag{9}\]  
\[L_{ProNCE}=L_{inNCE}+L_{Proto} \tag{10}\]  
The detailed algorithm of M-SSL is shown in Algorithm 1. In the M-SSL algorithm, there are two encoders for query encoding and momentum encoding, respectively. The query encoder was transformed from \(x_{i}\) to \(w_{i}\), and the momentum encoder was assigned from \(x_{i}\) to \(w_{i}^{\prime}\); \(w_{i}\) and \(w_{i}^{\prime}\) were obtained by the same \(x_{i}\), but the two inputs of appropriate data augmentation for \(x_{i}\) increased. For example, \(x_{i}^{\prime}\) was obtained by geometry transformation, and \(x_{i}^{\prime\prime}\) was obtained by means of applying random cropping. Additionally, the query encoder \(\varepsilon\) and momentum encoder \(\varepsilon^{\prime}\) are presented as Equation (11).