FedWiLoc: Federated Wi-Fi Indoor Localization
- FedWiLoc is a privacy-preserving federated learning framework that processes CSI data on-device to generate secure embeddings for indoor localization.
- It employs a split architecture with a customized ResNet34 encoder and MLP decoder to ensure raw CSI remains secure while achieving sub-meter median accuracy.
- FedWiLoc integrates a geometry-aware loss function with robust federated averaging to handle multipath environments and dynamic AP conditions.
FedWiLoc denotes a class of privacy-preserving, federated learning-based systems for Wi-Fi indoor localization, specifically designed to address user privacy, resilience to multipath environments, and generalization across deployments. The paradigm was introduced and evaluated in the context of Channel State Information (CSI) and Wi-Fi fingerprinting settings, using both neural and nonparametric models (Roy et al., 20 Dec 2025, Yin et al., 2020, Etiabi et al., 2022). FedWiLoc incorporates a split architecture, federated model training, privacy enhancement, and a geometry-aware loss function, yielding sub-meter median localization accuracy in practical deployments.
1. Split Architecture and Signal Encoding
FedWiLoc’s architecture segregates CSI signal processing and localization inference to maximize privacy while maintaining data utility. At each Wi-Fi Access Point (AP), raw 802.11n/ac CSI samples are processed on-device into fixed-size angle-of-arrival (AoA) and time-of-flight (ToF) heatmaps, eliminating the need to transmit high-dimensional, privacy-sensitive raw CSI beyond the AP.
A lightweight ResNet34 backbone, with a custom 1-channel input convolutional layer, is paired with a three-layer MLP to encode the AoA-ToF heatmap into a 64-dimensional embedding vector, representing a concise, information-preserving CSI signature (total 256 bytes per embedding). When a user requests location inference, 3–4 nearby APs each transmit only their embedding over a secure link to the user device. The device performs the final MLP-based decoding to produce the location estimate, without ever learning the raw CSI from any AP. The embedding design ensures that, even if intercepted, it is intractable to recover raw CSI or user location without access to the private on-device decoder (Roy et al., 20 Dec 2025).
2. Federated Learning and Parameter Aggregation
FedWiLoc leverages a federated learning (FL) framework based on FedAvg to collaboratively train the encoder (ResNet34+MLP) across APs, thus prohibiting central aggregation of user or AP-specific data. The process entails:
- Initialization of encoder model parameters on a central server, followed by broadcast to all APs.
- Each AP collects on-site CSI samples and performs local stochastic gradient updates over 10 mini-batches.
- Periodically, each AP transmits only the updated encoder weights (excluding batch normalization statistics) to the server.
- The server aggregates weights via FedAvg:
where is the number of APs.
- The aggregated encoder is redistributed to all APs for subsequent local training.
No raw CSI or user identities are exposed at any stage, meeting stringent privacy criteria. Furthermore, inference is conducted solely on the user’s device, preventing potential central points of compromise by man-in-the-middle (MitM) or compromised APs. A compromised AP learns only its local CSI and the corresponding embeddings, never data of other APs or the decoder (Roy et al., 20 Dec 2025, Yin et al., 2020).
3. Geometry-Aware Loss Function
Accurate localization in multipath-rich indoor spaces requires robust supervision. FedWiLoc introduces a geometry-coupled loss, optimizing both AoA estimation and triangulated 2D positioning. The training objective is a Huber-based sum of three terms:
where
- , are ground-truth and predicted AoA values;
- is the ground-truth location, is estimated via least squares triangulation from the predicted AoAs of multiple APs;
- weight the contributions (empirically , );
- control Huber transition robustness.
The geometry-aware loss ensures that local angle estimates and their spatial intersection jointly contribute to accurate global coordinates, discouraging spurious angle combinations that yield implausible locations. This is essential for mitigating the effects of severe multipath and NLOS conditions (Roy et al., 20 Dec 2025).
4. Experimental Evaluation and Accuracy
FedWiLoc has been evaluated in six environments (totaling ∼2,000 sq ft)—ranging from LoS-dominated offices to complex NLOS and multipath layouts—with 4 APs per environment. The median error achieved was 58 cm, with a 90th percentile error of 135 cm. In direct comparison:
- SpotFi: FedWiLoc reduces median error by 81% on average,
- DLoc: average improvement 28.5%, reaching 61.9% in the most challenging setting.
Cross-scenario generalization, including training on subsets of environments or mixed bandwidth scenarios (40/80 MHz), yielded median errors of 0.8–2.1 m (90th percentile ≤3.7 m). AoA errors remained ≤1.6° mean, with sub-degree median errors in five of six scenarios, showing resilience under dynamic channel conditions (Roy et al., 20 Dec 2025).
5. Privacy Guarantees and System Overheads
FedWiLoc enforces privacy through several mechanisms:
- Raw CSI and user ground-truth positions are never transmitted from APs.
- Model updates (encoder weights) are shared without per-sample user information and can be further protected using homomorphic encryption or differential privacy, as in general FL literature (Yin et al., 2020).
- Inference is decentralized; final positions are decoded only on the user device.
Communication overhead is minimal: ∼0.8 KB per localization request (3–4 embeddings), transmitted in ≈1 ms over 802.11ac, and periodic federated encoder aggregation involves ∼10 MB of weights (ResNet34), amortized over many inference rounds. APs require hardware adequate for low-latency ResNet34 inference (∼10 GFLOP/inference), while user devices require only minimal compute for decoding (∼0.5 MFLOP). Deployment necessitates coordinated CSI capture and synchronization within ∼10 ms, and FedAvg accommodates dynamic AP membership (Roy et al., 20 Dec 2025).
6. Comparison to Alternative Federated Localization Approaches
The FedWiLoc approach (as in (Roy et al., 20 Dec 2025)) can be contrasted with related approaches:
| Approach | Communication/Client | Median Error (m) | Key Privacy Mechanism |
|---|---|---|---|
| FedWiLoc | ~0.8 KB/request | 0.58 | CSI never leaves AP; on-device decoding |
| Federated DNN (Yin et al., 2020) | ~0.5 MB/round | 2.45 | Model updates, DP/HE |
| Federated Distillation (Etiabi et al., 2022) | 640 bits/round | 0.35–0.38 | Only segment-averaged logits |
FedWiLoc’s main implementation distinguishes itself via on-edge CSI encoding, direct geometric supervision, and avoidance of transmitting raw or reconstructable radio data. Federated distillation-based localizers offer further communication reduction (≈99.8%), but incur modest accuracy penalties and may be preferable for ultra-low-bandwidth IoT deployments.
7. Limitations and Potential Extensions
As highlighted in multiple works (Roy et al., 20 Dec 2025, Etiabi et al., 2022, Yin et al., 2020), several challenges and possible extensions exist:
- Hardware constraints: Real-time ResNet inference at scale may necessitate model pruning or quantization.
- Synchronization: Tight timing for CSI capture and embedding exchange among APs and users is required for optimal multipath resolution.
- Variable AP membership and non-i.i.d. data: Federated averaging and related methods naturally accommodate dynamic network topologies, but heterogeneous data distribution can impact convergence; methods such as FedProx or robust aggregation can partially mitigate this.
- Privacy-compliant aggregation: Differentially private and homomorphic secure update mechanisms further reduce risk, with minor statistical impact.
- Alternative FL protocols: Communication-efficient variants—federated distillation, compressed model aggregation, hybrid GNN/GP models, or edge pre-aggregation—can be considered for bandwidth-limited or edge-centric deployments (Etiabi et al., 2022, Yin et al., 2020).
A plausible implication is that FedWiLoc-style architectures may serve as a foundation for future large-scale, privacy-focused, sub-meter indoor positioning systems, adaptable to both commodity hardware and emerging Wi-Fi/IoT infrastructures.