## 3 Materials and Methods
### Neighborhood Selection and Feature Generation  
After preprocessing the tunnel point cloud data and isolating the tunnel lining points, the next critical step involves feature selection and design. This process begins with  
Figure 3: Schematic diagram of tunnel cross-section point cloud for polar coordinate calculation.  
defining the local neighborhood around each point, which is essential for describing the 3D structure through geometric and intensity-based features. Neighborhood selection establishes the local spatial context for each point, with its effectiveness directly influencing feature relevance and accuracy. Common approaches include k-neighborhood, spherical neighborhood, and cylindrical neighborhood, as described in [32]. In this research, k-nearest neighbors (k-NN) are employed to define the neighborhood for each point. Based on these neighborhoods, five discriminative features are derived, including smoothed intensity, distance to the fitted ellipse, anisotropy, isotropy, and sphericity. The descriptions of these features are summarized as follows:  
Intensity feature. Leakage points typically exhibit lower intensity values than the tunnel lining. This difference enables distinguishing leakage regions from the intact tunnel lining. However, scanning occlusions may introduce noisy intensity values, leading to potential misclassification of some lining points as leakage. To address this, the smoothed intensity is computed by averaging the intensity values within the k-neighborhood using Equation (4).  
\[Smoothed\;intensity=\sum_{i=1}^{k}intensity_{i}/k \tag{4}\]  
where \(k\) Intensity feature. Leakage points typically exhibit lower intensity values than the tunnel lining. This difference enables distinguishing leakage regions from the intact tunnel lining. However, scanning occlusions may introduce noisy intensity values, leading to potential misclassification of some lining points as leakage. To address this, the smoothed intensity is computed by averaging the intensity values within the k-neighborhood using Equation (4).  
Geometric features. Geometric features capture spatial structural variations and include four geometric features:  
(a) Distance to the fitted ellipse: it measures the 2D distance from each point in a slice to the fitted ellipse. Leakage points near circumferential joints often protrude slightly, resulting in larger distances compared to lining. The distance is calculated using Equation (5):  
\[d=\left|\frac{(x-h)^{2}}{a^{2}}+\frac{(z-k)^{2}}{b^{2}}-1\right| \tag{5}\]  
where \(\left|\cdot\right|\) represents the absolute value.  
(b) Anisotropy: it reflects the variation in data distribution across different directions. Leakage regions exhibit irregular shapes, leading to high anisotropy in the local point distribution.  
(c) Isotropy: it reflects the uniformity of data across all directions. In contrast to anisotropy, leakage exhibits lower isotropy, whereas the tunnel lining demonstrates higher isotropy.  
(d) Sphericity: it quantifies the similarity of local point clusters to a sphere. Leakage points with irregular distributions have lower sphericity, while tunnel lining points exhibit higher sphericity. More explanation about anisotropy, isotropy and sphericity can be seen in [32].  
To ensure cross-scale and cross-dataset comparability, all geometric features are normalized using Equation (6). In such a way, feature values remain within [0, 1].  
\[F^{\prime}=\left(F-F_{min}\right)/\left(F_{max}-F_{min}\right) \tag{6}\]  
where \(F_{min}\) represents the minimum values of features, and \(F_{max}\) are the maximum values of features.