## 2 Methods
### Proposed Method
#### 2.2.3 Base Feature Extractor  
A sequence of convolutional layers and pooling operations is contained within the SENet (Squeeze-and-Excitation Network). In the input stage, the global average pooling (GAP) layer calculates the average value of all the pixel values within each feature map, thereby generating a singular value that encapsulates the global semantic information. Noting the importance, GAP only captures the low-frequency information of the input features, potentially overlooking valuable high-frequency details. Subsequent paragraphs then explain the principles of the discrete cosine transform (DCT) and demonstrate that GAP can be seen as a particular instance of the DCT. Figure 1: Overview of DCTransformer network for the HSI classification task. Figure 2: The structure of the proposed DFE module. For an input \(X\in\mathbb{R}^{H\times W\times C}\) where \(H\) is the height, \(W\) is the width, and \(C\) is the number of spectral channels of \(X\), the 2D-DCT frequency spectrum \(g\in\mathbb{R}^{H\times W}\) is defined as follows:  
\[g_{h,w}=\sum_{p=0}^{H-1}\sum_{j=0}^{W-1}x_{p,q}\text{cos}\bigg{(}\frac{\pi h}{ H}\bigg{(}p+\frac{1}{2}\bigg{)}\bigg{)}\cos\bigg{(}\frac{\pi w}{W}\bigg{(}q+ \frac{1}{2}\bigg{)}\bigg{)} \tag{2}\]  
where \(h\in\{0,1,\ldots,H-1\}\) and \(w\in\{0,1,\ldots,W-1\}\), which control the frequency of the cosine functions. Suppose \(h\) and \(w\) are 0; we can demonstrate that the GAP is an extreme stage that has the lowest-frequency component, where \(H\) and \(W\) can be regarded as the normalizing constants:  
\[ \begin{split} g_{0,0}&=\sum_{p=0}^{H-1}\sum_{q=0}^{W -1}x_{p,q}\cos\bigg{(}\frac{0}{H}\bigg{(}p+\frac{1}{2}\bigg{)}\bigg{)}\cos \bigg{(}\frac{0}{W}\bigg{(}q+\frac{1}{2}\bigg{)}\bigg{)}\\ &=\sum_{p=0}^{H-1}\sum_{q=0}^{W-1}x_{p,q}\\ &=\text{GAP}(x)\cdot H\cdot W.\end{split}  \tag{3}\]  
In this paper, we introduced the DCT block to replace the traditional GAP, because the high-frequency information between spectral features is also crucial for the classification task. We constructed a certain number of frequency components that are denoted as J; each frequency component is designed by a special set of \([h,w]\). To apply the optimal number of J, we perform convolutional operations on the input to reduce the spatial size to \(8\times 8\) (\(H\times W\)). Following a simple idea, for an input \(X\in\mathbb{R}^{H\times W\times C}\), we design \(h\in\{1,2,\ldots,H-1\}\) and \(w\in\{1,2,3,\ldots,W-1\}\), and those frequency components can represented as follows:  
\[J_{i}=\cos\bigg{(}\frac{\pi h_{i}}{H}\bigg{(}p+\frac{1}{2}\bigg{)}\bigg{)}\cos \bigg{(}\frac{\pi w_{i}}{W}\bigg{(}q+\frac{1}{2}\bigg{)}\bigg{)} \tag{4}\]  
where \(i\in\{1,\ldots,N\}\) and \(N\) is the maximum of the \(H\) and \(W\) and where \(p\) and \(q\) indicate the position of each pixel. In other words, the \(J\in\mathbb{R}^{N\times H\times W}\) can be regarded as a special filter, and each frequency component \(J_{i}\in\mathbb{R}^{H\times W}\) can be written as a two-dimensional DCT matrix \(A\), such as the following formula:  
\[J_{i_{p,q}}= \begin{bmatrix}C_{h}(0)C_{w}(0)&C_{h}(0)C_{w}(1)&\cdots&C_{h}(0) C_{w}(q)\\ C_{h}(1)C_{w}(0)&C_{h}(1)C_{w}(1)&\cdots&C_{h}(1)C_{w}(q)\\ \vdots&\vdots&\ddots&\vdots\\ C_{h}(p)C_{w}(0)&C_{h}(p)C_{w}(1)&\cdots&C_{h}(p)C_{w}(q).\end{bmatrix}  \tag{5}\]  
With Equation (5), we observe that the DCT operation places high-frequency information in the bottom-right corner of the spatial domain, while low-frequency information is placed in the top-left corner. \(C_{h}(\cdot)=\cos\Big{(}\frac{\pi h_{i}}{H}\Big{(}\cdot+\frac{1}{2}\Big{)} \Big{)}\), and \(C_{w}(\cdot)=\cos\Big{(}\frac{\pi w_{i}}{W}\Big{(}\cdot+\frac{1}{2}\Big{)} \Big{)}\). For each channel of the input HSIs, calculate it using Equation (6), until all frequency components are traversed.