## 3 Methodology
### Point Cloud Processing Algorithm
Local Feature Extraction (KNN and Local Attention)  
In 2019, the DGCNN research proposed to dynamically construct a local neighborhood graph by using k-nearest neighbor (KNN) algorithm to extract local geometric features of points on the graph structure [33]. Firstly, for each point, the set of KNN is calculated based on the Euclidean distance of the point cloud to construct the KNN neighborhood, and the obtained neighborhood point features are fed into the next local feature processing section. Point Cloud Transformer (PCT) proposes a transformer-based local attention mechanism for local feature modeling of point cloud data [34]. In this study, the single-head attention mechanism is used in the local feature extraction module, while the multi-head attention mechanism is used only in the global feature extraction. This design reduces the computational complexity. Local multi-head attention requires computing multiple  
Figure 2: The point cloud processing workflow. query-key pairs for the neighborhood of each point, which is more computationally intensive than single-head attention. For large-scale point clouds or embedded scenarios, it is more efficient to use single-head attention. The local module quickly extracts geometric features through the single-head self-attention mechanism. For the local neighborhood of each point, the input features are the feature matrices of the neighborhood points. A linear projection is used to generate the query, key, and value. The similarity of query and key is calculated by dot product and then normalized by softmax to obtain the attention weights of the local neighborhood:  
\[A_{\text{local}}\ =\ \text{softmax}\Bigg{(}\frac{Q_{\text{local}}\ \cdot K_{\text{ local}}^{T}}{\sqrt{d_{k}}}\Bigg{)} \tag{6}\]  
\(A_{\text{local}}\) means local attention weights. \(Q_{\text{local}}\) means local query vectors. It is a set of query vectors extracted from a local region. \(K_{\text{local}}^{T}\) means the transpose of the local key vectors. \(\sqrt{d_{k}}\) is the scaling factor, which is used to prevent the dot product values from becoming too large. The dot product of the query and key vectors computes a similarity score between each query vector and each key vector within the local region. A larger value indicates that the two vectors are more related. softmax is the normalization function, which transforms the raw attention scores into a valid probability distribution. This is a weight matrix that represents the importance of each point in the neighborhood to the other points. Using the attention weight \(A_{\text{local}}\) to weight the feature V of the neighborhood points, the aggregated local features can be obtained. 4. Global feature extraction (multi-head attention at full point cloud scope)  
Point-to-point relationships at the global scale are more complex, and single-head attention is not sufficient to express the dependencies between all points. Global feature extraction needs to model a more complex context, and using multi-head attention can better serve the global task and provide final global features. So, this module uses the multi-head attention mechanism. The input to this stage comes from the local features extracted in the previous stage. Three matrices, Q, K, and V, projected through local features are used for the multi-head self-attention mechanism. The dot product of Q and K is used and normalized to obtain the attention weights for the full pair of points. Finally, the features are weighted and summed to output global features. 5. Multi-scale feature fusion  
The Point Transformer proposes a weighted fusion strategy of local and global features, which is used to enhance the representation of point cloud features [35]. According to the strategy, this study weighted the fusion of local and global features in this step to generate the final point cloud feature representation. 6. Global pooling  
Global max pooling is the core module of PointNet, which is used to aggregate the point features into the global features of point clouds.