# Underwater SLAM Meets Deep Learning: Challenges, Multi-Sensor Integration, and Future Directions
## 8 Underwater SLAM Systems Evaluation and Comparison
### Localization Evaluation
#### 8.2.2 DL-Based SLAM Metrics  
In learning-based underwater SLAM systems, especially those involving DL, evaluation often goes beyond traditional pose errors. While standard localization metrics (APE, RPE, ATE, etc.) remain highly relevant, researchers have introduced or adapted additional metrics to better assess how well a DL-based SLAM system recovers motion and structure under challenging underwater conditions. The odometry loss function, employed in DL-based SLAM applications, comprises two primary terms, each scaled by specific weighting factors to prioritize critical components. The first term is the positional loss (\(\mathcal{L}_{\text{position}}\)), expressed as  
\[\mathcal{L}_{\text{position}}=\frac{1}{N}\sum_{i=1}^{N}\Bigl{|}p_{\text{pred}}^{ (i)}-p_{\text{true}}^{(i)}\Bigr{|}^{2} \tag{7}\]  
This equation utilizes mean squared error to measure the difference between predicted (\(p_{\text{pred}}\)) and accurate positional vectors (\(p_{\text{true}}\)) in all \(N\) instances. **Number of Instances (\(N\)):** This parameter indicates the number of data points over which the loss is computed. It depends on factors such as the sensor sampling rate and the mission duration. For instance, with a higher sampling rate or longer mission duration, \(N\) increases, providing a more extensive dataset for error calculation. The second term is the angular error (\(\Delta\psi\)), calculated as  
\[\Delta\psi=\psi_{\text{pred}}-\psi_{\text{true}} \tag{8}\]  
and normalized within the interval \([-\pi,\pi]\) using  
\[\Delta\psi=(\Delta\psi+\pi)\text{ mod }2\pi-\pi \tag{9}\]  
This ensures consistency in error measurement due to the periodic nature of angular data. **Normalization of Angular Errors:** Normalizing \(\Delta\psi\) within \([-\pi,\pi]\) ensures that the angular differences are measured correctly, accounting for the circular nature of the rotational data. This prevents discontinuities in error measurements when the angles overlap, such as transitioning from 359\({}^{\circ}\) to 0\({}^{\circ}\). The angular loss term (\(\mathcal{L}_{\text{angle}}\)) is defined as  
\[\mathcal{L}_{\text{angle}}=\frac{1}{N}\sum_{i=1}^{N}(\Delta\psi^{(i)})^{2} \tag{10}\]  
This represents the average squared angular errors across all instances. The total odometry loss (\(\mathcal{L}_{\text{odometry}}\)) combines these terms:  
\[\mathcal{L}_{\text{odometry}}=w_{\text{position}}\mathcal{L}_{\text{position}}+w _{\text{angle}}\mathcal{L}_{\text{angle}} \tag{11}\]  
where \(w_{\text{position}}\) and \(w_{\text{angle}}\) are weighting factors that balance the contributions of positional and angular errors. **Weighting Factors (\(w_{\text{position}}\), \(w_{\text{angle}}\)):** These parameters determine the relative importance of positional versus angular errors in the loss function. For example, if precisepositioning is more critical than orientation in a particular application, a higher value may be assigned to \(w_{\text{position}}\) compared to \(w_{\text{angle}}\). Adjusting these weights allows for tailoring the SLAM system to prioritize certain aspects of performance. **Beyond the basic odometry loss (positional and angular terms)** described earlier, state-of-the-art literature commonly employs segment-based evaluation metrics and scale-drift assessments, reflecting practices from the VO and SLAM communities [157; 158]. These metrics help capture specific aspects of trajectory estimation quality that are highly relevant when learning-based approaches are applied in complex underwater scenarios. **Segment-based Drift Metrics:** Inspired by terrestrial benchmarks (e.g., KITTI), segment-based metrics evaluate how the trajectory error accumulates over fixed distances or segments of the trajectory. For example, translational and rotational errors can be computed per 100 m or per fixed intervals. These evaluations produce metrics such as average translational drift (% per 100 m) and average rotational drift (\({}^{\circ}\)/100 m) [159].