# Adaptive Point Learning with Uncertainty Quantification to Generate Margin Lines on Prepared Teeth
## 5 Discussion  
Our analysis and results confirm the possibility of predicting margin lines on the surfaces of prepared teeth. We propose an end-to-end framework to automatically generate accurate margin lines in the form of point clouds (CD = 0.126, HD = 0.260) or splines (CD = 0.137, HD = 0.242). This includes a post-processing procedure to remove outliers, which enhances the accuracy of the results. The predicted splines without outliers were closer to the ground truth showing the effectiveness of the proposed post-processing algorithm to remove noise and produce better margin lines (Figure 8). Furthermore, the implementation of five-fold cross-validation demonstrated the reliability and generalizability of the proposed deep learning framework (Table 3). Our methodology to generate margin lines depends on a transformer model with adaptive query generation and denoising to generate the points representing the margin line. Previous related work in the literature depended on geometric optimization that requires initial point selection by the user [19] or segmentation techniques with a limited dataset [31]. Nevertheless, these approaches did not provide distance measures to quantitatively compare predicted and ground truth margin lines. Only recent work by [PERSON] et al. reported distance measures [32]. The reported HD values by all of our five folds were less than the threshold of 0.566 mm reported by [PERSON] et al. [32]. In terms of CD, [PERSON] et al. reported CD L2 values whereas in our analysis we reported CD L1 because it has a unit of mm, which is more interpretable than CD L2 that has a unit of mm\({}^{2}\). For the purpose of comparison, our CD L2 calculations reported a median value of 0.009 for spline predictions, which is less than the threshold reported by [PERSON] et al. (i.e., 0.1). In addition, our framework is fully automated, which distinguishes it from Dentbird hybrid framework tested by [32]. Additionally, we propose a novel confidence metric as a tool aimed to provide feedback to users during deployment of the trained model. The confidence metric aids dental professional by indicating whether to trust generated margin lines without ground truth. Although, it could be treated as a percentage, we present it in this work as a boolean metric for simplicity. By estimating the confidence of the generated point cloud, we provide an UQ tool that can handle noise and outliers in the predictions. Different from previous studies that used the loss function [47] or sensitivity analysis [58] to quantify uncertainty, we used the direct output of the model to quantify outliers and evaluate uncertainty. Furthermore, the combination of UQ with ensemble learning resulted in 88.81% of confident predictions--higher than any of the individual trained folds (Table 3). This also highlights the efficiency of the ensemble model to make better predictions compared with individual folds. While previous work presented confidence scores for point clouds in unsupervised registration [59] and object detection [60] tasks, to the best of the authors' knowledge, no  
Figure 10: Challenging test case showing margin line prediction (dotted) compared with ground truth (solid), both overlaid on the die. The contours of the mean curvatures values of the die mesh are shown. Blue represents high curvature and red represents low curvature. The die geometry is also shown without contours. work has discussed confidence metrics for transformer-based point cloud generation. We correlated the newly proposed confidence metric with the CD metric based on the validation and test sets. The implemented five-fold cross-validation reflected the reliability of the correlation as shown in Tables 4 and 5. It is very critical to avoid false positive predictions where the model could trust a produced margin line that should not be considered correct. As such, the precision metric, which was around 90% on average between the validation and test sets, is considered critical in our case.