# Domain-Invariant Few-Shot Contrastive Learning for Hyperspectral Image Classification
## 5 Discussion  
In Tables 4-6, we can see that although DIFSCL generally outperforms other comparative methods, its classification accuracy is lower than other methods in some categories. We have analyzed the reasons for this, which mainly include:  
1. We employed supervised contrastive learning to compute the similarity of sample features, thereby bringing features of samples with the same label closer and pushing those with different labels further apart. However, in hyperspectral imaging, some categories have very similar spectral data, and within the same category, there is a certain variation between some boundary samples and those at the center position. These factors together lead to classification errors. 2. Due to the extremely limited number of samples, the model cannot fully learn the features of the samples. The randomly selected labeled categories may contain outliers, which do not represent the general characteristics of the category well. 3. Although we use a conditional domain discriminator for domain adaptation, the effectiveness of the domain adaptation method is influenced by the differences between the source and target domains, leading to suboptimal classification performance in some categories. Moreover, HybridSN achieves the highest classification performance in several categories in the UP, IP, and Salinas datasets. This is due to the use of both 3D and 2D CNNs in HybridSN, which enables a more comprehensive capture of complex information in HSI. In the UP dataset, GIA-CFSL performs best in the large category Meadows, confirming that the method of capturing non-local relationships through graph information aggregation enhances the classification performance of large pixel modules in HSI. Compared with existing few-shot learning methods, our contribution to facilitating few-shot HSI classification tasks lies in explicitly combining domain adaptation methods with contrastive learning approaches. As shown in Table 12, previous contributions in few-shot learning for hyperspectral images either used domain adaptation methods alone, such as DCFSL [14], GIA-CFSL [15], and ADAFSL [16] (these methods propose their own solutions for domain adaptation) or solely employed contrastive learning methods, such as CDFSCL [27]. The data in Tables 7-9 confirm our experimental findings that supervised contrastive loss and the conditional domain discriminator can jointly promote cross-domain few-shot learning. Moreover, using superior data augmentation is also crucial, as shown in Table 7, where cropping data augmentation replaces noise augmentation with better effects. Additionally, in HSI, few-shot classification methods based on prototype networks, designing a more efficient feature extractor is a very direct way to improve classification performance. In this paper, we designed an MSAAN for feature extraction under the  
while promoting the aggregation of same-class samples and clearly distinguishing different categories through a loss function that subtracts the sum of exponential similarities of all samples from the similarity between same-class samples. Furthermore, our designed Multi-Scale Adaptive Attention Network (MSAAN) enhances the model's discriminative ability within the DIFSCL framework by capturing and integrating multi-level spatial features, improving both intra-class consistency and inter-class discriminability of features. Experimental results on three widely used HSI datasets prove that our method significantly outperforms other advanced few-shot learning methods in terms of classification accuracy and model generalization capability. Going forward, we aim to investigate how to combine weakly supervised learning techniques to further utilize unlabeled samples under limited sample conditions, aiming to enhance the model's learning efficiency and overall performance. Conceptualization, W.C.; methodology, W.C.; software, W.C.; validation, W.C., J.C., Y.Z. and X.W. All authors have read and agreed to the published version of the manuscript. This research received no external funding.