## 3 Proposed Method
### Endmember Network
Given an intermediate feature map \(F\in\mathbb{R}^{W\times H\times C}\) as the input, where W, H and C represent the width, height and channel dimension, because our goal was to obtain useful spectral information from HSIs by capturing local cross-channel interaction, we only focused on the interaction between each channel and its k neighbors. Therefore, the weight of \(y_{i}\) is calculated using  
\[w_{i}=\sigma\left(\sum_{j=1}^{k}\alpha_{i}^{j}y_{i}^{j}\right),y_{i}^{j}\in \Omega_{i}^{k} \tag{3}\]  
where \(\Omega_{i}^{k}\) represents the set of k channels adjacent to \(y_{i}\). By capturing the local feature information across channels, only the part of the network between all channels needs to be learned so that the overall efficiency is very high. For this operation, the attention of each channel includes the parameters of \(k\times C\). At the same time, in order to further reduce the complexity of the unmixing module, all channels have the same parameters, which are expressed as follows:  
\[w_{i}=\sigma\left(\sum_{j=1}^{k}\alpha y_{i}^{j}\right),y_{i}^{j}\in\Omega_{i} ^{k} \tag{4}\]  
Figure 2: Schematic diagram of the efficient convolutional block attention module (ECBAM). In general, ECA is accomplished using a 1D convolution with a kernel size of k, which is expressed as follows:  
\[\text{M}_{\text{Ca}}(\text{F})=\sigma(\text{C1D}(\text{GAV}(\text{F})) \tag{5}\]  
where C1D indicates a 1D convolution and GAV denotes the global average pooling. The kernel size k determines the interaction coverage captured, which is adaptive to the channel dimension C. The mapping \(\varphi\) between the kernel size k and channel C is expressed as follows:  
\[\text{C}=\varphi(\text{k}) \tag{6}\]  
The mapping \(\varphi\) is known from [49], and k is nonlinearly proportional to C. The approximate mapping \(\varphi\) is mapped using the following exponential function:  
\[\text{C}=\varphi(\text{k})=2^{(\varepsilon*\text{k}-\text{b})} \tag{7}\]  
Finally, the value of k can be obtained as follows:  
\[\text{k}=\lambda(\text{C})=\left|\frac{\log_{2}(\text{C})}{\varepsilon}+\frac{ \text{b}}{\varepsilon}\right|_{\text{odd}} \tag{8}\]  
where \(\left|\text{v}\right|_{\text{odd}}\) represents the odd number closest to v.  
The spatial attention map is generated with the spatial attention module. First, average pooling and max pooling operations are applied along the channel axis, and then average and max operations are performed on the input features in the channel dimension. Two 2D features are obtained then a hidden layer containing a single convolution kernel is used to convolute them. Finally, these features are concatenated together according to the channel dimension to obtain a 2D spatial attention map. The specific calculation used in the spatial attention module is as follows:  
\[ \begin{split}\text{M}_{\text{Sa}}(\text{F})=\sigma\Big{(}\vec{f} ^{\prime\times 7}&([\text{AvgPool}(\text{M}_{\text{Sa}}(\text{F})); \text{MaxPool}(\text{M}_{\text{Ca}}(\text{F}))])\Big{)}\\ &=\sigma\Big{(}\vec{f}^{\prime\times 7}\Big{(}\Big{[}\text{F}_{ \text{avg}}^{\text{Sa}};\text{F}_{\text{max}}^{\text{Sa}}\Big{]}\Big{)}\Big{)} \end{split}  \tag{9}\]  
where \(\sigma\) denotes the sigmoid function and \(\vec{f}^{\prime\times 7}\) denotes the convolution operation with a filter size of \(7\times 7\). Overall, for a given intermediate feature \(\text{F}\in\mathbb{R}^{\text{H}\times\text{W}\times\text{C}}\), the ECBAM can be generalized as follows:  
\[ \begin{split}\text{F}^{\prime}=\text{M}_{\text{Ca}}(\text{F}) \otimes\text{F}\\ \text{F}^{\prime\prime}=\text{M}_{\text{Sa}}(\text{F}^{\prime}) \otimes\text{F}^{\prime}\end{split}