Modern machine learning-based wireless localization using Wi-Fi signals continues to face significant challenges in achieving groundbreaking performance across diverse environments. A major limitation is that most existing algorithms do not appropriately weight the information from different routers during aggregation, resulting in suboptimal convergence and reduced accuracy. Motivated by traditional weighted triangulation methods, this paper introduces the concept of attention to routers, ensuring that each router's contribution is weighted differently when aggregating information from multiple routers for triangulation. We demonstrate, by incorporating attention layers into a standard machine learning localization architecture, that emphasizing the relevance of each router can substantially improve overall performance. We have also shown through evaluation over the open-sourced datasets and demonstrate that Attention to Routers outperforms the benchmark architecture by over 30% in accuracy.
Figures & tables
Figure 1: The input heatmaps H are encoded by E , processed by set-invariant attention f , and decoded by D to predict y , supervised with losses LLoc and LAoA .
Metric
Base (cm)
Ours (cm)
Δ
Median
63.17
45.01
+28.7%
Mean
77.90
54.01
+30.7%
90th Percentile
140.63
92.88
+34.0%
95th Percentile
172.00
114.32
+33.5%
99th Percentile
302.32
183.20
+39.4%
Table 1: Comparison of localization error between baseline and attention-based method across different statistical measures. Results are based on 3,966 total samples, showing consistent improvement across all percentiles with the attention-based approach. The method achieves a 28.7% reduction in median error ( 18.16 cm improvement) and up to 39.4% improvement at the 99th percentile.
Figure 2: (a) Performance comparison between Vanilla and Attention models across case difficulty levels: The mean localization error (in cm) is reported for three difficulty tiers: Easy (bottom 30% ), Medium (middle 40% ), and Hard (top 30% ) cases. (b) Spatial distribution of easy vs medium vs hard cases overlaid with AP locations: Easy (blue), Medium (orange) and Hard (red) samples are plotted with counts in the legend; APs are labeled and emphasized to show which access points are surrounded by high-error samples. (c) Router based Attention weight distribution: Shows the attention weights’ distribution for each AP. We can clearly see tighter distributions for APs that provide equal attention to all samples like AP1, and at AP4 which has more skewed distribution demonstrating skewed attention across samples.
School of Electrical and Computer Engineering University of Tehran Tehran, Iran · Advanced Robotics and Intelligent Systems Laboratory School of Electrical and Computer Engineering University of Tehran Tehran, Iran