# A Lightweight Convolutional Neural Network Method for Two-Dimensional PhotoPlethysmoGraphy Signals
## 2 Methods
### Lightweight Convolutional Neural Network, LW-CNN
Mathematically, this short-circuit connection can be expressed as y = F(x) + x, where y represents the output of the current layer, F(x) represents the feature map obtained by the current layer through operations such as convolution, and x is the output of the previous layer or layers, that is, the input of a short-circuit connection. This addition operation not only preserves the information of the original input but also allows the network to focus on learning the residual between the input and the output, that is, the difference between them. This residual learning method helps the network extract features more efficiently and makes the training of deep networks more stable. Since the gradient contains the derivative term concerning the input x, the gradient can be effectively propagated even in deep networks, alleviating the vanishing gradient problem. In addition, since the convolutional layers in the residual block are usually accompanied by batch normalization and ReLU activation functions, this further improves the stability and convergence speed of the network. Figure 4 shows a schematic diagram of a three-layer residual structure. The lightweight convolutional neural network model, LW-CNN, employed in this study primarily comprises an initial convolutional layer, three residual blocks, a global average pooling layer, a Dropout layer, and a fully connected layer. In the initial convolutional layer, a 3 \(\times\) 3 kernel performs convolutional operations on the input image with a stride of 2. Padding is applied to the image edges to ensure consistency in spatial dimensions, transforming the original image with three channels into a feature map with 32 channels. The three residual blocks are responsible for expanding the number of channels in the feature map, achieving values of 64 and 128 and maintaining it at 128, respectively. Within each residual block, two convolutional layers are incorporated, wherein the first one employs a 3 \(\times\) 3 kernel, and the second utilizes a 1 \(\times\) 1 kernel. The stride for the 3 \(\times\) 3 convolutional layers in the first and third residual blocks is set to 1, while it is 2 for the second residual block. The outputs are summed together by establishing shortcut connections between the two parts of each residual block, effectively addressing gradient vanishing problems and ensuring a smooth flow of information. A batch normalization layer and a ReLU activation function follow the initial and convolutional layers in the residual blocks. The former stabilizes the training process and expedites model convergence, while the latter enhances the model's representative capacity and improves classification accuracy. Subsequently, a global average pooling layer is employed to reduce the spatial dimensions of the feature map to 1 \(\times\) 1, yielding a feature vector. A Dropout layer is introduced to enhance the model's generalization capability further. During training, the Dropout layer randomly discards specific neuron outputs, preventing the model from over-relying on specific neurons and thereby enhancing the model's robustness. Finally, the feature vector is fed into a fully connected layer for classification to generate the final  
Figure 4: Schematic diagram of the residual structure. prediction. Experimental results show that setting the dropout rate to 0.5 achieves the best prediction performance. The schematic diagram of this lightweight convolutional neural network is depicted in Figure 5.