## 3 Methodology
### Lightweight CNN Models for Machining Feature Recognition
#### 3.2.1 FeatureNetLite  
To our best knowledge, Ref. [14] first attempted to apply 3D CNN to machining feature recognition and proposed voxel-based FeatureNet. Voxel is a concept in 3D computer graphics that refers to a 3D grid that represents the occupancy of space within an object. However, FeatureNet has a lot of parameters (33.94 M) and FLOPs (12.51 G), so we apply lightweight techniques to it and propose FeatureNetLite. The topological architecture of the proposed FeatureNetLite is similar to PP-LCNet [50]. However, PP-LCNet is designed for 2D image classification and incompatible with our 3D voxel machining feature classification task. Therefore, this paper modified the convolution block of the network to allow for accepting 3D voxel input with fewer parameters (1.91 M) and lower FLOPs (0.14 G). As depicted in Figure 5, the FeatureNetLite consists of two parts:  
The first part is a CNN backbone for feature extraction, which contains a stem Conv3D block, multiple depth-wise separable convolution 3D (DSConv3D) blocks, a global average pooling 3D (GAP3D) layer, and a Conv3D layer after GAP3D. As the core of the entire network, DSConv3D is a 3D variant of depth-wise separable convolution [51], which is widely used in mobile networks. In FeatureNetLite, the DSConv3D block is used instead of a standard 3D convolution block, allowing the network to significantly increase computation efficiency while preserving the same learning capability. Additionally, the DSConv3D block makes the convolutional layers more sparse, which can effectively avoid overfitting. Figure 6 shows the difference between the DSConv3D block and a standard 3D convolution block. The DSConv3D block is composed of depth-wise convolution 3D [52], batch normalization 3D [53], point-wise convolution 3D [52], and HardSwish nonlinear activation function [49]. At the head of block, there is a depth-wise convolution 3D, which only uses one convolutional kernel for each input channel. After the depth-wise convolution 3D, BatchNorm3D is applied to reduce internal covariate shift and speed up the training process. Aiming at better quality of the activation function, ReLU is replaced by HardSwish, which can  
Figure 5: A detailed view of FeatureNetLite; \(k=3\) denotes convolution kernel size is set to 3. Figure 6: The difference between the DSConv3D block and a standard 3D convolution block. significantly increase performance while avoiding a large number of exponential operations. The HardSwish activation function is defined as follows:  
\[\text{HardSwish}(x)=\left\{ \begin{array}{ll}0,&x\leq-3\\ x,&x\geq 3\\ \frac{x(x+3)}{6},&otherwise\end{array} \right. \tag{9}\]  
In addition, a Squeeze-and-Excite (SE) module [54] is added to DSConv3D blocks to improve recognition performance. The SE is a channel attention module that enables the network to pay more attention to the channel with important information and less to irrelevant information. However, extensive use of an SE module results in a significant increase in inference time. To keep the balance between accuracy and inference speed, the SE module is only added to the blocks near the tail of network. Subsequently, point-wise convolution 3D, whose kernel size is set to 1, is applied to compute the weighted combination of the output of the depth-wise convolution 3D. Due to the above designs, the parameters and computational complexity of DSConv3D are significantly reduced compared to a regular convolution layer. The last Conv3D layer with kernel size set to 1 lifts up the output of network from \(512\times 1^{3}\) to \(1280\times 1^{3}\), which slightly increases inference time but greatly improves nonlinear fitting ability. The second part involved in the network is a softmax classifier, which is commonly adopted in multi-classification task. The classifier only contains a fully connected (FC) layer and a softmax nonlinear activation function. The output dimension of the classifier is the number of machining feature classes in FeatureNet dataset.