## 2 Materials and Methods
### Details Structure of LightExNet  
#### 2.2.1 Overall Network Architecture  
In this paper, the facial expression recognition task is divided into 7 categories, and the input image size is fixed at 224 \(\times\) 224 \(\times\) 3. This article refers to the MobileNet v2 framework and proposes a lightweight network LightExNet that is more suitable for facial expression features. In order to fully extract original image information, LightExNet is structured as a network based on deep and shallow feature fusion. The network structure is dedicated to fully extracting the shallow features of different scales in the original image and fusing them with the deep features, and then further extracting the useful information in the image through embedding channel and the spatial attention mechanism, and in the final classification process, according to the characteristics of the classification of face expression recognition, an improved central loss function is used to further improve the accuracy of  
Figure 3: Inverted residual block. the classification results, and at the same time the loss function adopts the corresponding measures to reduce the amount of computation. Through extensive experimentation and iterative refinement, we have established the final LightExNet architecture as shown in Figure 4.  
In the structure diagram, the left part is the data processing flowchart of the whole network, the middle part is the specific operation process and parameters of STAGE0-STAGE5 and AuxSTAGE1-4, and the right part is the data processing flowchart of two types of Bottleneck. Among them, the six links of STAGE0-STAGE5 mainly refer to the backbone network of the lightweight network MobileNet V2, and the four links of AuxSTAGE1-4 use the DW (Depthwise Convolution) convolution and PW(Pointwise Convolution) convolution, respectively, to scale the input original image to four different sizes to form four shallow networks, and to obtain four shallow feature maps with different scales \(\mathbf{F}_{\text{s1}}\in\mathbf{R}^{\text{c}_{1}\times\text{h}_{1}\times\text{w}_{1}},\mathbf{F}_{\text{s2}}\in\mathbf{R}^{\text{c}_{2}\times\text{h}_{2}\times\text{w}_{2}},\mathbf{F}_{\text{s3}}\in\mathbf{R}^{\text{c}_{3}\times\text{h}_{3}\times\text{w}_{3 }},\mathbf{F}_{\text{s4}}\in\mathbf{R}^{\text{c}_{4}\times\text{h}_{4}\times\text{w}_{4 }}\). The four shallow feature maps are then superposed with four deep feature maps of the same size in the backbone network: \(\mathbf{F}_{d1}\in\mathbf{R}^{\text{c}_{1}\times\text{h}_{1}\times\text{w}_{1}}\), \(\mathbf{F}_{\text{d2}}\in\mathbf{R}^{\text{c}_{2}\times\text{h}_{2}\times\text{w}_{2}}\), \(\mathbf{F}_{\text{d3}}\in\mathbf{R}^{\text{c}_{3}\times\text{h}_{3}\times\text{w}_{3 }}\), and \(\mathbf{F}_{\text{d4}}\in\mathbf{R}^{\text{c}_{4}\times\text{h}_{4}\times\text{w}_{4 }}\), respectively, in the channel dimension. Then four deep and shallow feature fused feature maps are generated: \(\mathbf{F}_{sd1}\in\mathbf{R}^{(\text{c}_{1}+\text{c}_{1})\times\text{h}_{1}\times \text{w}_{1}}\), \(\mathbf{F}_{sd2}\in\mathbf{R}^{(\text{c}_{2}+\text{c}_{2})\times\text{h}_{2}\times \text{w}_{2}}\), \(\mathbf{F}_{sd3}\in\mathbf{R}^{(\text{c}_{3}+\text{c}_{3})\times\text{h}_{3}\times \text{w}_{3}}\), and \(\mathbf{F}_{sd4}\in\mathbf{R}^{(\text{c}_{4}+\text{c}_{4}^{*})\times\text{h}_{4}\times \text{w}_{4}}\). This architecture performs channel-wise superposition of deep and shallow feature maps rather than simple element-wise addition. This approach not only preserves shallow-level features from the original input (minimizing information loss) but also mitigates gradient vanishing issues associated with increasing convolutional depth. Furthermore, since deep layers exhibit larger receptive fields while shallow layers retain finer details, this design inherently enables multi-scale feature fusion. To further enhance feature extraction from the cascaded outputs, we introduce a novel dual attention mechanism (channel and spatial), denoted as the \"Attention Process\" module in the structural diagram.