## 2 Materials and Methods
### Details Structure of LightExNet
#### 2.2.1 Overall Network Architecture
According to the network architecture diagram of LightExNet, the processing flow of data from input (3 channels of 224 \(\times\) 224 facial expression images) to output (probability of 7 classification results) is as follows:  
Figure 4: The structure of LightExNet. * STAGE0: The network accepts a 224 \(\times\) 224 RGB facial expression image as input, which undergoes initial processing through a standard convolutional operation. In this standard convolution, the convolution kernel is 3 \(\times\) 3, the step size is 2, and the output channel is 16 (the number of channels in MobileNetV2 is 32, and the results of the analysis of MobileNet V3 have been taken into account, the classification accuracy of the channel number set as 16 and 32 is almost the same in this stage, but it can reduce the computational complexity of the entire classification process to a certain extent). The output results are normalized, and the activation function is RELU6, and the final output is 112 \(\times\) 112 feature data of 16 channels. * STAGE1: The 112 \(\times\) 112 feature data of 16 channels output from STAGE0 is first input into the BTNK1 module (with parameters 16, 112, 1, 16) for processing. As illustrated in the upper-right section of the architecture diagram, the BTNK1 module's data flow closely follows the step-1 inverted residual block design from MobileNetV2, maintaining its fundamental operational characteristics. The input parameter C is the number of channels of the input data, W is the size of the input data (here the default height size and width size of the input data are the same), T is the expansion factor of the inverted residual structure, and C1 is the depth of the output feature matrix. If C and C1 are the same, the result after linear activation will be added to the input to form the final output result. Otherwise the module's output undergoes linear activation without adding to the input. After BTNK1, the feature data size is 16 \(\times\) 112 \(\times\) 112 (16 channels, height is 112, and width is also 112), and then input data to the BTNK2 module (parameters 16, 112, 6, 18) for processing, the detailed flow of the BTNK2 module is shown in the lower right of the structure diagram, and its flow is basically the same as that of the inverted residual module with a step size of 2 in MobileNet V2. The meaning of the input parameters here is similar to that of the input parameters in the BTNK1 module. Here the data output from BTNK2 is the first deep feature map \(\mathbf{F}_{d1}\in\mathbf{R}^{18\times 56\times 56}\) with the size of 18 \(\times\) 56 \(\times\) 56. At the same time, the system input tensor (3 \(\times\) 224 \(\times\) 224) undergoes processing through the AuxSTAGE1 module to form the first shallow feature map \(\mathbf{F}_{s1}\in\mathbf{R}^{6\times 56\times 56}\) with the size of 6 \(\times\) 56 \(\times\) 56. The first deep feature map \(\mathbf{F}_{d1}\) and the first shallow feature map \(\mathbf{F}_{s1}\) are cascaded in the channel dimension to form the first deep and shallow fusion feature map \(\mathbf{F}_{sd1}\in\mathbf{R}^{24\times 56\times 56}\) with the size of 24 \(\times\) 56 \(\times\) 56. This feature matrix is then subjected to the \"Attention Process\" module (consisting of the channel attention mechanism and the spatial attention mechanism, principles of the mechanism is described in detail later), ultimately generating a 24 \(\times\) 56 \(\times\) 56 feature matrix as the final output. * STAGE2: Following the Attention Process module, the output is a feature matrix of size 24 \(\times\) 56 \(\times\) 56, which is firstly input into the BTNK2 module (with the parameters 24, 56, 6, 24) for processing to form an output feature matrix of size 24 \(\times\) 28 \(\times\) 28, and then input the data to the BTNK1 module (parameters are 24, 28, 6, 24) for processing to form an output feature matrix with the size of 24 \(\times\) 28 \(\times\) 28, which is the second deep feature map \(\mathbf{F}_{d2}\in\mathbf{R}^{24\times 28\times 28}\).