# LIMUNet: A Lightweight Neural Network for Human Activity Recognition Using Smartwatches
## 3 Materials and Methods
### LIMUNet Algorithm Design
#### 3.2.2 The Design Details of CNN Structure and Residual Bottleneck Layer  
The core of the network consists of six convolutional blocks, each designed to extract features from the input data. Each block follows the same structure: 2D Convolution (Conv2D) extracts spatial features from the input with a kernel size of (6, 1), which performs convolution over the time-series dimension while keeping the sensor channel dimension fixed. The stride for each convolution is set to (2, 1) to downsample the time-series length but retain the sensor channel structure. Batch normalization normalizes the output of the convolution to ensure stable training and prevent vanishing/exploding gradients. Dropout: A 0.1 dropout rate is applied to prevent overfitting by randomly deactivating a portion of the neurons during training. The convolutional blocks incrementally increase the number of output channels to allow the network to learn more complex feature representations as data progress through the network. The number of channels in each block is progressively doubled to enhance feature extraction capacity. The detailed design of each convolutional block is as follows:  
* Block 1: 8 filters, kernel size (6, 1), stride (2, 1);
* Block 2: 64 filters, kernel size (6, 1), stride (2, 1);
* Block 3: 128 filters, kernel size (6, 1), stride (2, 1);
* Block 4: 256 filters, kernel size (6, 1), stride (2, 1);
* Block 5: 512 filters, kernel size (6, 1), stride (2, 1);
* Block 6: 1024 filters, kernel size (6, 1), stride (2, 1).  
Each block reduces the temporal dimension of the input data while increasing the depth of the feature maps, allowing the model to progressively capture more abstract and high-level representations of the time-series data.  
In addition to depthwise separable convolution, this paper also adopts the residual bottleneck layer as a network model, which not only further lightens the model but also enhances the effectiveness of feature extraction [7]. The residual bottleneck layer is developed from the bottleneck layer in the ResNet algorithm. In ResNet's Bottleneck Layer, a compression-convolution-expansion method is adopted, where pointwise convolution with a size reduces the dimensionality of the channels, followed by convolution using depthwise separable convolution kernels with a size, and finally, pointwise convolution with a size is used for channel expansion, restoring the original number of channels, thereby reducing the computational complexity during convolution and improving the operational efficiency of the residual module [26]. However, this approach reduces the number of channels before convolution, which can affect feature extraction, leading to a decrease in the number of extractable features and negatively impacting the model's recognition performance. The residual bottleneck layer adopts an approach opposite to that of the bottleneck layer, first expanding the number of channels in the input feature map through pointwise convolution and then performing feature extraction using depthwise separable convolution on the feature map with a larger number of channels, ultimately merging the channels of the feature map with convolution kernels to reduce the number of channels. Using the residual bottleneck layer can result in more features being obtained compared to a regular bottleneck layer, which can improve the accuracy of human perception algorithms. The structure of the residual bottleneck layer adopted in this paper is shown in Figure 3. To adapt to the data structure of the IMU information collected by smartwatches, improvements have been made to the residual bottleneck layer in this paper. In the feature extraction phase, this paper adopts a depth-first convolution structure to prevent the disruption of the independence between different channel data.