---
title: 'DeepFi: Deep Learning for Indoor Localization'
url: https://www.emergentmind.com/topics/deepfi-framework
type: topic
---

# DeepFi: Deep Learning for Indoor Localization

DeepFi is a deep learning-based indoor localization framework exploiting fine-grained Channel State Information (CSI). Distinct from traditional received signal strength (RSS)-based systems, DeepFi leverages the stability and diversity of per-subcarrier CSI to create robust fingerprints for each reference location. The system employs deep belief networks (DBNs) with location-specific training and probabilistic matching to achieve high localization accuracy in both line-of-sight (LOS) and non-line-of-sight (NLOS) indoor environments [1603.07080].

## 1. CSI Hypotheses and Fingerprinting Rationale

DeepFi's design is grounded in three empirically validated hypotheses about indoor wireless channel behavior:

1. **Temporal Stability of CSI Amplitudes**: At a fixed location, per-subcarrier CSI amplitudes exhibit significantly lower temporal variance than RSS. For 90% of evaluated locations, the standard deviation of normalized CSI amplitudes remains below 10% of the mean, compared to only 40% for RSS.
2. **Spatial Diversity via Clustering**: Multipath and fading induce natural clustering among the 30 CSI subcarrier amplitudes per packet, with typical cluster counts (1–6) varying by location. This spatial structure underpins location distinguishability.
3. **Antenna-Specific Richness**: For Intel 5300 devices, each of the three antennas generates distinct 30-element CSI amplitude vectors per packet, producing 90-dimensional feature vectors. This full 90-dimensional input provides substantially richer fingerprints than any subset.

These hypotheses establish the informativeness and repeatability of CSI-derived fingerprints, motivating the application of deep architectures, rather than superficial feature engineering, for localization tasks.

## 2. System Workflow: Training and Inference Phases

DeepFi operates in two distinct phases:

- **Offline Training**: For each of $N$ reference locations, $m$ packets are collected, each providing a normalized $\mathbf{v}\in\mathbb{R}^{90}$. A location-specific DBN with four hidden layers is trained using greedy, layer-wise learning (Contrastive Divergence, CD-1). The resulting weight matrices and biases constitute the fingerprint for that location.
- **Online Localization**: A mobile device acquires $n$ test packets at an unknown position. Each test vector $\mathbf{v}_t$ is passed through every stored DBN (forward propagation only), yielding reconstructions $\hat{\mathbf{y}}_{t,i}$ for reference location $i$. A radial basis function (RBF) computes likelihood scores:
  $$
  \Pr(\mathbf{v}_t|L_i) = \exp\left(-\frac{\|\mathbf{v}_t-\hat{\mathbf{y}}_{t,i}\|}{\lambda\sigma}\right)
  $$
  with $\sigma$ as the packet variance and $\lambda$ an empirically determined scaling. The likelihoods are averaged across all packets, forming $\Pr(\mathbf{v}|L_i)$, and posterior probabilities are computed assuming a uniform prior. The system outputs the location estimate as the posterior-weighted sum of all reference locations.

## 3. Deep Belief Network Architecture

Each location’s DBN processes the 90-dimensional normalized CSI input:

- **Layer Configuration**:
  - Visible layer: 90 units
  - Hidden layers: Four layers with descending unit counts; e.g., in the living room, $(K_1,K_2,K_3,K_4)=(300,150,100,50)$; in the lab, $(500,300,150,50)$
- **Activation Functions**:
  - Pretraining: Binary stochastic units with sigmoid activation, $\sigma(x)=\frac{1}{1+e^{-x}}$, using Restricted Boltzmann Machines (RBMs).
  - Fine-tuning: Real-valued sigmoid units during backpropagation.
- **Parameter Storage**: Eight weight matrices ($W_1$–$W_4$, and their transposes) and biases ($b^0$–$b^4$) collectively embody the location fingerprint.

The model’s joint distribution factors through stacked mappings: 
$$
\Pr(\mathbf{v}, \mathbf{h}^1, \mathbf{h}^2, \mathbf{h}^3, \mathbf{h}^4) = \Pr(\mathbf{v}|\mathbf{h}^1)\Pr(\mathbf{h}^1|\mathbf{h}^2)\Pr(\mathbf{h}^2|\mathbf{h}^3)\Pr(\mathbf{h}^3,\mathbf{h}^4)
$$
with explicit layerwise conditional probabilities and energy-based modeling for the top RBM layer.

## 4. Layer-wise Greedy Learning and Optimization

Training proceeds through two main stages for each location-specific DBN:

- **Greedy Pre-Training**: Each hidden layer is initialized and trained sequentially as an RBM. One iteration of CD-1 is used per training update, reducing the model’s complexity to $O(\text{\# layers}\cdot m\cdot \text{\#hidden}\cdot \text{\#visible})$, avoiding the computational expense of a fully joint optimization.
- **Fine-Tuning**: After pre-training, the entire network is “unrolled,” and weights are refined using reconstruction error loss $L(\mathbf{v})=\|\mathbf{v}-\hat{\mathbf{v}}\|^2$. This step employs backpropagation through all forward and reverse (transposed) weights, improving discriminative power for fingerprint matching.

A plausible implication is that such layer-wise training allows efficient scaling to numerous locations, as each DBN can be independently trained on corresponding local data.

## 5. Probabilistic Matching and Localization Estimation

DeepFi uses an RBF-based matching scheme to compare unknown CSI vectors against stored fingerprints:

- **RBF Likelihoods**: For each location $i$, reconstruction error is mapped to a likelihood $\Pr(\mathbf{v}_t|L_i)$ as defined above.
- **Multiple Observations**: Averaging over $n$ packets reduces noise, with likelihoods computed as
  $$
  \Pr(\mathbf{v}|L_i) = \frac{1}{n}\sum_{t=1}^n \exp\left(-\frac{\|\mathbf{v}_t-\hat{\mathbf{y}}_{t,i}\|}{\lambda\sigma}\right)
  $$
- **Posterior Inference and Positioning**: Posteriors $\Pr(L_i|\mathbf{v})$ are normalized over all $N$ locations, and the estimated position is
  $$
  \hat{L} = \sum_{i=1}^N \Pr(L_i|\mathbf{v})\cdot L_i
  $$
  yielding a continuous-valued localization output.

## 6. Data Preprocessing and Feature Extraction

CSI amplitude vectors are linearly normalized to $(0,1)$ within each packet as:
$$
v_i \leftarrow \frac{|\text{CSI}_i|-\min}{\max-\min}
$$
No manual principal component analysis (PCA) or subcarrier clustering is conducted: the DBN automatically discovers the compact, discriminative embeddings. In practical deployments, online packets are grouped into batches (e.g., 10 packets per batch) to accelerate inference via parallel processing.

## 7. Experimental Evaluation and Performance Metrics

DeepFi was validated in two environments:

- **Living Room (4×7 m, LOS)**: 50 0.5-m gridbed training points; 12 test points.
- **Computer Laboratory (6×9 m, NLOS)**: 50 training, 30 test points.

Performance against baselines is summarized below:

| Method     | Living Room Error (m) | Laboratory Error (m) |
|:-----------|----------------------|----------------------|
| DeepFi     | $0.94\pm 0.56$       | $1.81\pm 1.34$       |
| FIFS       | $1.24\pm 0.57$       | $2.33\pm 1.02$       |
| Horus      | $1.54\pm 0.70$       | $2.60\pm 1.46$       |
| ML         | $2.16\pm 1.04$       | $2.85\pm 1.55$       |

Notable results include:

- In the living room, 60% of test locations using DeepFi exhibit sub-1m error, compared to 25% for FIFS.
- In the laboratory, 60% of locations achieve sub-1.7m accuracy under DeepFi; FIFS and Horus reach 70% under 3m.
- Utilizing all three antennas (90-dimensional input) reduces mean error by approximately 15% compared to single-antenna variants.
- Robustness to dynamic changes: Moving obstacles 1–3m from the access point leaves most CSI correlations largely unchanged; more than 80% of test locations retain CSI correlation above 0.8 despite these changes or human movement.
- Increasing test packets from 5 to 300 marginally improves mean error (from $1.93m$ to $1.83m$) while increasing online time (from 1.7s to 4.2s); batching balances this tradeoff.

A plausible implication is that DeepFi’s robustness and fine granularity are suitable for dense deployments with high environmental variability.

## 8. Significance and Comparative Analysis

DeepFi establishes that DBN-based CSI fingerprinting, guided by empirical channel characteristics, can deliver sub-meter to meter-scale indoor localization accuracy using a single access point. Its data-driven approach, reliance on rich per-subcarrier and per-antenna features, and probabilistic RBF matching enable significant improvements over RSS-based and simpler CSI-averaging schemes [1603.07080]. No manual feature crafting or clustering is necessary; the system’s deep architecture autonomously learns embeddings suited to the task. The resulting fingerprints offer both specificity and resilience to moderate environmental changes in typical indoor settings.

Source: https://www.emergentmind.com/topics/deepfi-framework