3.1. Model Convergence and Localization Accuracy
This section presents the comparative evaluation of model performance, focusing on the progressive improvement in prediction quality from the simple model M1 onwards. To quantify performance differences, the area above the CDF curve (AAC) serves as the principal metric, providing a direct measure of how closely prediction errors cluster around smaller magnitudes. This metric enables consistent comparisons across all models.
Figure 4 depicts the AAC metric through the cumulative distribution function (CDF) of localization error for model M1 trained using 2500 time steps (TS) as a reference. The light red shading highlights the AAC, defined as the region between the CDF curve and the maximum cumulative probability line at y = 1. This visualization emphasizes the deviation of each model’s error distribution from the ideal case of perfect localization (AAC = 0). Lower AAC values correspond to curves that rise more steeply toward the upper boundary, indicating that errors concentrate at smaller magnitudes and thus reflect superior localization accuracy.
Table 3 presents the main results of the training experiments. The simple model, M1, consists of a single GRU layer with 50 units followed by a dense output layer with 2 units. This simple architecture achieves its best results when trained on the first 2500 TS for 75 epochs and provides a lightweight reference point against which more complex models are evaluated. Building on this foundation, model M2 introduces greater depth by stacking three GRU layers of 128 units each, combined with dropout regularization to mitigate overfitting. M2 obtains its best results using 500 TS and explores the benefits of increased representational capacity. Both models obtain an AAC of approximately 8.0, indicating no relevant error reduction at this stage.
To further refine performance, M3 employs four GRU layers with 41, 77, 235, and 172 units and incorporates dropout. Its key distinction lies in the use of Optuna for hyperparameter optimization. This approach allows the model to adapt its configuration more effectively to the data (including the optimal number of GRU layers and units), obtaining its best results using only 250 TS. Model M4 comprises one GRU layer with 100 units, integrates dropout, and importantly introduces a multi-head attention mechanism. This addition enables the model to focus selectively on the most informative features, enhancing its ability to capture complex relationships in the input signals. Like M3, it benefits from Optuna-driven optimization, with best results obtained using 750 TS during training. Overall, M4 achieves the lowest error as measured by AAC (6.71).
Finally, M5 combines a bidirectional GRU with an attention mechanism, allowing it to capture dependencies in both forward and backward directions of the sequence. With 34 units in the BiGRU layer, dropout regularization, and three attention heads, this model represents the most sophisticated configuration in the study. It is also optimized with Optuna and trained for 68 epochs, with best results obtained using 1500 TS. This model corresponds to the second-best configuration, after M4, as evidenced by its AAC (6.90).
Figure 5 presents the training and validation loss curves obtained for the five models under study. The x-axis shows the full training histories, while the ’Epochs’ column in
Table 3 lists the best epoch selected by early stopping. The simple model (M1) exhibits a steep reduction in training loss, yet the validation curve stabilizes at a relatively high level, indicating limited generalization capacity. Both training and validation curves present an appreciable level of fluctuations that suggest the onset of overfitting. When additional GRU layers and dropout are introduced in M2, the training curve descends less steeply, but the validation curve still shows sizable fluctuations. The incorporation of hyperparameter optimization in M3 produces smoother trajectories, with the validation curve converging at a slightly lower value than in the previous models, reflecting improved adaptation to the data.
The effect of attention mechanisms becomes evident in M4, where the validation curve descends smoothly to a level noticeably lower than the previous models. This behavior demonstrates enhanced stability and generalization, consistent with the quantitative improvements reported in
Table 3. Finally, M5, which combines bidirectional GRUs with attention, achieves performance comparable to M4. Its validation curve descends to a level similar to M4, with comparable smoothness. The
Figure 5 illustrates the progressive improvement in convergence behavior as architectural complexity and optimization strategies are introduced, culminating in the superior performance of the attention-based models improved through Optuna hyperparameter optimization.
Figure 6 compares true versus predicted x and y coordinates for the five models (M1 to M5) across the three data splits: (a) training, (b) validation, and (c) test. Each panel shows scatter plots of predicted versus true x (left column) and y (right column) values, with the diagonal line indicating perfect prediction. The legend identifies M1 to M5 models, while points from the attention-based model M4 appear highlighted in crimson red to facilitate visual comparison.
In the training set (panel a), all models closely follow the diagonal line of perfect prediction for both x and y coordinates, with the majority of points tightly clustered around it. However, at both extremes, the points begin to scatter more noticeably from the perfect prediction line. The scatter in the y coordinates (right) appears larger than in the x coordinates. This behavior on the training data indicates that even the simpler architectures can fit the observed trajectories when evaluated on seen samples. In the validation set (panel b), small differences among models become apparent. However, this type of plot does not readily reveal the superiority of more precise models such as M4 over the others. Again, the scatter in the y-axis appears more pronounced than in the case of the x coordinate. In the test set (panel c), the trends observed on the validation set persist on the held-out test data. M4 results maintain a slight edge with respect to the others, while again the y-axis shows a larger scatter of points.
Figure 6 visually corroborates that the error in the training dataset remains smaller than in the validation and test datasets and that predicting the y-axis of the location coordinates presents greater difficulty. This difficulty is influenced by the 2D floor-plan geometry (120 m in the x-dimension and 60 m in the y-dimension) and by the gNB layout, which provides denser variation along x than along y in this deployment. Note that the “8 m height” reported for gNBs refers to the z-axis (installation elevation), not to the y-dimension of the floor plan (see
Figure 1a in Conti et al. [
10]).
Table 4 presents performance metrics for the five models (M1-M5) on the test dataset. M4 achieves the best overall performance with the lowest MAE values (6.42 for x, 7.89 for y), the best AAC score of 6.71, and shares the lowest RMSE (x) of 8.00 with M3, while also maintaining the lowest RMSE (y) at 10.39. M5 ranks second with strong y-coordinate predictions but weaker x-coordinate accuracy, while M1 shows the poorest performance across all metrics with the highest errors. M2 and M3 demonstrate intermediate performance, with M3 achieving a competitive AAC of 7.46. The results indicate progressive improvement from M1 to M4, with M4 representing the most accurate model for localization tasks.
3.2. Impact of Time Steps on Performance
Figure 7 presents the distribution of AAC values for the five competing models (M1 to M5) using violin plots with embedded boxplots, combining density estimation with range visualization. The AAC values on the y-axis correspond to results from training and testing each model with different time step (TS) values, representing the number of data points extracted from the magnitude in decibels of the PRS signal. Each model yields 12 different results, as TS values range from 10 to the maximum possible value in the data (3288). The precise TS values are indicated along the horizontal axis of the figure. The AAC metric quantifies prediction error, where lower values indicate better model performance.
The results reveal distinct performance tiers among the models. M1 and M2 demonstrate the weakest performance, with AAC median values at approximately 8.75 and 9.0, indicating both low accuracy and high variability as shown in the interquartile range (IQR) of the boxplots. M3 shows intermediate performance with a median near 8.0 and reduced distribution spread, reflected in its shorter IQR.
In contrast, M4 and M5 display notably stronger performance, with median AAC values around 7.2 to 7.4 and narrow IQR lengths, particularly for model M5. The elongated violin shapes for these models indicate the presence of outliers corresponding to models trained using only 10 TS, as shown in
Figure 7. This figure clarifies not only which models perform best but also whether the performance differences are practically meaningful. The visualization thus provides clear evidence that M4 and M5 represent the most effective modeling approaches, achieving consistently lower error levels with reduced variability.
Figure 8 presents a heatmap illustrating the relationship between the number of TS used in training and AAC values across the five model configurations (M1 to M5). The visualization employs a continuous color scale where darker regions indicate lower AAC values and lighter regions correspond to higher AAC values. The horizontal axis represents TS ranging from 10 to 3288, while the vertical axis displays the five model variants.
The heatmap reveals distinct performance patterns as the number of TS increases. Performance variation is nonuniform across configurations, with certain regions exhibiting decreased AAC values, indicating improved accuracy, and others showing relatively elevated values, indicating less favorable outcomes. Models M1 and M2 produce consistently higher AAC values (8.00 to 10.54) across most time step configurations, with M2 showing a notable peak at 2000 TS. In contrast, models M3, M4, and M5 exhibit lower AAC values overall, with M4 and M5 achieving optimal performance (lowest AAC values of 6.71 and 6.90, respectively) within the range of 500 to 2500 TS. Model M4 shows particularly strong performance at 750 and 2500 TS, while M5 maintains relatively stable low values across the 500 to 2000 range. The visualization emphasizes the sensitivity of model performance to input data length and provides a comprehensive overview of how training efficiency and error metrics depend on the volume of temporal samples utilized.
Increasing TS increases the input sequence length and, therefore, the amount of information presented to the model. However, beyond a moderate TS range, additional PRS samples are often highly correlated and can be dominated by fading/noise realizations, while also increasing effective model capacity needs relative to the limited number of trainings UEs (N = 1000). This can lead to diminishing returns and occasional degradation in generalization. From a system perspective, this suggests selecting a moderate TS that balances accuracy against inference cost.
3.3. Robustness Analysis and Computational Efficiency
Figure 9 depicts the cumulative distribution functions (CDFs) of localization error for the baseline reference and the five proposed models. The curves allow direct comparison of how frequently smaller errors occur across different architectures. The baseline reference, drawn from Conti et al. [
10], shows relatively high error percentiles in the InF DH scenario at 3.5 GHz with a 5 MHz bandwidth configuration: the 50th percentile at 11.50 m, the 90th at 26.72 m, the 95th at 36.72 m, and the 99th at 55.65 m.
Against this benchmark, the trained models progressively shift the CDF curves upward and leftward, indicating improved accuracy. The simplest GRU model (M1) and its deeper variant (M2) achieve noticeable gains, with AAC values near 8.0, meaning that approximately 90% of errors fall below 15 m. Model M3, optimized with Optuna, reduces the AAC to 7.46, concentrating more probability mass at lower distance levels.
The most pronounced improvement is observed with M4, which integrates multi-head attention. Its AAC drops to 6.71, and the CDF shows that a larger proportion of UE location errors concentrates at lower values compared to earlier models. The bidirectional GRU with attention (M5) follows closely, with an AAC of 6.90, also demonstrating a substantial reduction in high percentile errors.
Figure 9 highlights a clear performance hierarchy. While the baseline curve indicates that nearly 90% of cases fall below 26.72 m error, the attention-based models reduce this threshold significantly, concentrating the majority of predictions below the 15 m error level. The numerical shifts in percentiles and AAC values confirm that attention mechanisms yield the most consistent accuracy gains.
To account for the stochastic nature of hyperparameter optimization, models M3, M4, and M5 undergo 10 independent Optuna runs each. Specifically, M3 receives optimization when trained using 250 time steps (TS) of data, M4 using 750 TS, and M5 using 1500 TS, with each configuration explored across 10 separate runs. The results presented in
Figure 9 correspond to the best-performing run for each model. A subsequent statistical analysis of the 10 AAC values obtained per model reveals important insights into their comparative performance and variability. Model M3 exhibits a mean AAC of 7.73 with a standard deviation of 0.13, indicating highly consistent performance across runs. Model M4 achieves the lowest mean AAC of 7.03, though with greater variability (standard deviation of 0.27), while M5 shows intermediate performance with a mean of 7.20 and standard deviation of 0.22. One-way ANOVA confirms statistically significant differences among the three models (F = 29.25,
p < 0.000001). Post-hoc pairwise comparisons using Bonferroni-corrected
t-tests reveal that M4 significantly outperforms M3 (
p < 0.000001) and that M5 significantly outperforms M3 (
p < 0.000004), while the difference between M4 and M5 remains not statistically significant (
p = 0.134). These findings confirm that the multi-head attention mechanism in M4 delivers the most robust accuracy gains, despite introducing additional performance variability across optimization runs.
To strengthen the evaluation, two lightweight learning baselines commonly used in fingerprinting applications, Support Vector Regression (SVR) and a compact Convolutional Neural Network (CNN) were added. These methods offer a fair comparison while maintaining computational feasibility for edge deployment scenarios. The SVR method fits kernel regressors on standardized feature vectors using an RBF kernel with C = 100, gamma = ‘scale’, and epsilon = 0.1. Two separate SVRs, one predicting x coordinates and one predicting y coordinates, were trained, then stacked their outputs to form the final (x,y) prediction. Both methods were evaluated using coordinate-wise RMSE on train/validation/test splits.
The CNN method treats each sample as a 1D signal by reshaping the standardized PRS-derived feature vector to (n_features, 1) and learns location through a regression network. The architecture contains three convolution blocks, Conv1D (64, kernel = 5), Conv1D (128, kernel = 5), Conv1D (64, kernel = 3), each using ReLU activation, BatchNormalization, MaxPooling1D, and Dropout. A Flatten layer connects to Dense(128), Dense(64), and Dense(2) layers that output (x,y) coordinates. The model is trained using the Adam optimizer (learning rate 0.001), with early stopping and best-model checkpointing based on validation loss.
Both baseline learning methods obtain inferior performance compared to the proposed approaches. The SVR baseline achieves RMSE (x) of 9.95, RMSE (y) of 12.38, and AAC of 12.54. The CNN baseline performs similarly with RMSE (x) of 9.21, RMSE (y) of 12.41, and AAC of 13.11. The best model (M4) outperforms both lightweight baselines with RMSE (x) of 8.00, RMSE (y) of 10.39, and AAC of 6.71. This demonstrates that M4 reduces positioning error by approximately 50% compared to standard machine learning approaches while maintaining computational efficiency suitable for edge deployment.
An ablation study isolated the effect of multi-head attention and dropout in the optimized model M4. The study trained four configurations under identical preprocessing, hyperparameters, and early stopping criteria: (i) GRU + attention + dropout (full), (ii) GRU + dropout (no attention), (iii) GRU + attention (no dropout), and (iv) GRU only (baseline). Performance evaluation employed RMSE, MAE, and AAC. The full model achieved the best test performance (RMSE = 9.95 m, AAC = 6.98), removing attention increased error (RMSE = 10.22 m, AAC = 7.96), while removing dropout produced the largest degradation (RMSE = 11.34 m, AAC = 8.44). A GRU-only baseline (no attention, no dropout) yielded RMSE = 10.73 m and AAC = 8.21. This ablation confirms that attention provides a measurable benefit and dropout plays a critical role in robust generalization.
To address computational burden concerns, the study measured training time, inference latency, and memory consumption across all models using an NVIDIA T4 GPU in Google Colab. Training time ranges from 53.39 s for M3 (the lightweight model) to 286.81 s for M5 (the BiGRU-based architecture), with M1, M2, and M4 requiring 71.44, 68.03, and 84 s, respectively. The BiGRU model (M5) thus demands approximately 5.4× longer training than M3 and 3.4× longer than M4, reflecting the increased complexity of recurrent architectures. However, inference latency remains modest across all models, spanning 0.62 ms/trial (M2 and M4) to 1.76 ms/trial (M5), with M1 and M3 at 1.09 and 0.91 ms/trial, respectively. All models maintain sub-2 ms inference times, making them compatible with real-time 5G positioning requirements where latencies of several milliseconds are typically acceptable. Memory consumption varies substantially, from 31.88 MB for the compact M3 architecture to M5 requiring a moderate 445.01 MB, approximately 14× more than M3. For real-world 5G deployment, these latency and memory profiles suit edge computing nodes or centralized positioning servers where batch processing of multiple UE requests can amortize computational overhead, and the sub-2 ms inference enables positioning updates at rates exceeding 500 Hz if needed.