Conceptio › Archive › arXiv CS
arXiv CS open access

LocAttMamba: A Low-Complexity Mamba Framework with Attention-Based Multi-AP Fusion for Indoor Localization

MohammadMahdi Ghadaksaz et al. · arxiv_cs
arXiv CS · Papers
Open Source ↗Direct PDF ↓
distributed-systemsinternetnetworkingprotocols
Accurate and low-complexity indoor localization is important for location-based services in fifth generation (5G) and sixth generation (6G) networks, where positioning devices operate under limited computational budgets and non conditions. Indoor localization has been studied widely using traditiona
Conceptio Open Archive

Analyze & explore related research in Conceptio

Connect this record directly into your research workflow or AI agent. Explore citations across open repositories, query full text, and export structured proof bundles.

1

LocAttMamba: A Low-Complexity Mamba Framework with Attention-Based Multi-AP Fusion for Indoor Localization

arXiv:2610.05673v1 [cs.NI] 5 Oct 2026

MohammadMahdi Ghadaksaz, Mohammad Farzanullah, Graduate Student Member, IEEE Melike Erol-Kantarci, Fellow, IEEE

Abstract—Accurate and low-complexity indoor localization is important for location-based services in fifth generation (5G) and sixth generation (6G) networks, where positioning devices operate under limited computational budgets and non-line-of-sight (NLoS) conditions. Indoor localization has been studied widely using traditional signal-level localization approaches. However, these techniques often show degraded performance in NLoS scenarios. Recently, artificial intelligence (AI)-based techniques, including transformers, have been applied to address these challenges. While transformer-based architectures can capture the dependencies within the measurements collected from distributed access points (APs), their high computational complexity results in a large number of multiply-accumulate operations and long inference time. In contrast, lightweight recurrent and convolutional models trade this cost for degraded accuracy. In this paper, we propose LocAttMamba, a low-complexity localization framework in which the channel impulse response (CIR) and time-based features of each AP are processed by a separate Mamba encoder with near-linear complexity, and the resulting per-AP embeddings are fused through a multi-head attention layer that weights each AP according to its importance at every time step. The framework jointly predicts the user location and its per-axis uncertainty, which is refined through a post-hoc calibration step. We evaluate the proposed framework using two real-world 5G and ultra-wideband (UWB) measurement datasets. Our numerical results reveal that LocAttMamba obtains a mean two-dimensional (2-D) positioning error of 1.004 m and 0.599 m, respectively, on 5G and UWB datasets, outperforming the secondbest benchmark by 9.79% and 5.82%, while requiring the fewest multiply-accumulate operations among all evaluated models and being 4.4–16× faster than the transformer-based benchmarks. Index Terms—Mamba model, Attention-based fusion, Indoor Localization, Robustness.

I. I NTRODUCTION HE widespread deployment of fifth generation (5G) and the ongoing move toward sixth generation (6G) are pushing wireless communication forward quickly, and they are opening the way for the next generation of locationbased use cases, such as extended reality (XR), vehicle-toeverything (V2X) [1], and physical artificial intelligence (AI) [2]. This calls for localization methods that are accurate, efficient, robust, and low in computational cost, so that the strict quality of service (QoS) requirements for the emerging applications can be met. Indoor localization is especially important, since it supports navigation, safety and rescue operations, and personalized services. In addition, most devices have limited computing power and the measurements

T

MohammadMahdi Ghadaksaz, Mohammad Farzanullah, and Melike Erol-Kantarci are with the School of Electrical Engineering and Computer Science, University of Ottawa, Ottawa, ON K1N 6N5, Canada (e-mail: mghad017@uottawa.ca; mfarz086@uottawa.ca; melike.erolkantarci@uottawa.ca).

they collect are affected by noise and changing surrounding conditions. In this context, while global navigation satellite system (GNSS) is infeasible for indoor localization, and conventional, signal-level localization approaches have poor performance in non-line-of-sight (NLoS)-rich environments, deep learning (DL)-based approaches have drawn attention over the past few years [3]. In particular, multi-layer perceptron (MLP)-based models can capture complex, non-linear relationships within the input features, convolutional neural networks (CNNs) using two-dimensional (2-D) or three-dimensional (3-D) inputs can extract temporal and spatial patterns, and recurrent neural networks (RNNs) and long short-term memory (LSTM) networks can learn the temporal dependencies of a moving user. More recently, transformers [4] have been introduced as a substitute for RNNs and LSTMs for handling long-range dependencies [5]. However, their quadratic complexity in inference can result in high computational costs and memory usage, limiting their practicality in real-time scenarios. Beyond accuracy and computational cost, a practical challenge for DL-based indoor localization is the degradation of measurement quality. In real deployments, the channel impulse response (CIR) measurements collected by the access points (APs) are affected by interference and blockage, and can even be deliberately perturbed at the physical layer [6]. Prior works have shown that corrupted measurements from even a single source can significantly bias the position estimate of a DL-based model, and that adaptively weighting the measurement sources helps mitigate the impact of anomalous signals [7]. Moreover, even with clean measurements, the localization error can vary significantly across locations due to NLoS propagation and multipath, while a point estimate alone provides no indication of its reliability. To address this, the authors in [8] estimate the uncertainty of each base station and use it to weight their estimates, although the Monte Carlo dropout variant requires multiple forward passes. Closer to our framework, [9] predicts an uncertainty alongside each estimate within an attention-based fusion network to reject unreliable ones. However, this uncertainty is not calibrated, which means the predicted uncertainty may not match the actual error. To overcome the drawbacks of transformers, Mamba [10] has been introduced as an efficient alternative, which has recently been used in several wireless communication-related problems [11]–[13]. Mamba is based on the state-space models (SSMs), which offer near-linear time complexity. Mamba relies on a selection mechanism in which the state matrices and the time step become functions of the input, allowing the model to keep the relevant parts of the sequence and

2

discard the rest. Furthermore, Mamba considers a hardwareaware selective scan algorithm instead of standard sequential approach, which keeps the training and inference cost low. Nonetheless, a single Mamba processes a single sequence along the time dimension, which can limit its ability to capture spatial dependencies from multiple measurement sources. In this case, to capture both temporal and spatial dependency, Mamba can be combined with multi-head attention-based fusion technique [14] to fuse the information from multiple measurement sources. In this paper, we propose a low-complexity framework in which each AP is processed by a distinct bidirectional Mamba encoder, and the per-AP embeddings are fused through a multihead attention layer that adaptively down-weights distorted APs. Following [9], we also predict the uncertainty of each estimate, which, unlike [8], [9], is obtained from a single forward pass of a single model and is calibrated through a post-hoc step. A. Related Works Indoor localization has been widely studied using conventional, signal-level approaches, including geometric and fingerprinting-based methods [15]. In particular, geometric methods estimate the user location using time of arrival (ToA), time-difference of arrival (TDoA), angle of arrival (AoA), or received signal strength (RSS) measurements, where their performance significantly degrades in NLoS-rich environments [16]. On the other hand, fingerprinting-based methods match the collected measurements with a pre-collected radio map using simple similarity metrics, such as k-nearest neighbor (KNN), which limits their ability to exploit high-dimensional measurements, e.g., CIR, and to generalize beyond the surveyed reference points. Due to these limitations, DL-based indoor localization approaches have been proposed over the past few years [17]– [20]. In particular, the authors in [17] propose an MLP-based indoor localization approach using MLP and one-dimensional (1-D) CNN and having RSS and channel state information (CSI) as input features, where they show that their proposed approach obtains sub-meter localization error. Similarly, in [18], the authors introduce an MLP-Mixer architecture for CSI-fingerprinting localization in massive multiple-input multiple-output (mMIMO) orthogonal frequency-division multiplexing (OFDM) systems, where they show the effectiveness and robustness of their proposed algorithm. The authors in [19] consider a bidirectional LSTM architecture with temporal modeling for indoor localization, using magnetic data collected by a smartphone. The authors show that their proposed approach obtains lower localization error compared to unidirectional LSTM, MLP, and gated recurrent unit (GRU) benchmarks. In [20], the authors investigate an autoencoderbased CNN (ACNN) framework for indoor localization using Wi-Fi signals. Here, the authors consider multiple-APs measurement data, where they show the superiority of their design compared to several existing benchmarks, including standard CNNs. Several recent works explore attention-based [9], [21] and transformer-based [22], [23] indoor localization-based solu-

tions. In [21], the authors introduce secure CNN-attentionbased solution for indoor localization, where they consider CIR, TDoA, and APs’ position as input features. In this work, the authors compare their proposed solution against KNNbased and conventional geometric TDoA multilateration-based solutions, confirming the superiority of their framework. The authors in [9] introduce an uncertainty-aware multi-modal localization framework using vision and LiDAR modalities and CNN-attention mechanism, where predicted uncertainties are used to reject unreliable pose estimates, improving accuracy on real-world robot datasets. The authors in [23] investigate a heavy-weight transformer-based approach for indoor localization, obtaining lower root mean square error (RMSE) over several DL-based solutions. Likewise, in [22], the authors explore light to medium weight transformers to reduce the computational complexity of the heavy-weight transformer architecture, while maintaining the indoor localization performance. More recently, Mamba has also been explored for indoor localization [24]–[27]. The authors in [24] propose a Mambabased indoor localization framework for unmanned vehicles (UVs), where a transformer teacher trained on ultra-wideband (UWB) data distills its knowledge into a CSI-based Mamba student, yielding lower mean absolute error (MAE) than a plain Mamba while reducing multiply-accumulate operations and inference time with respect to the transformer. In [25], the authors investigate transformer- and Mamba-based models for on-device indoor localization using Bluetooth and Wi-Fi RSS measurements, where the localization is formulated as a room-level classification task. The authors in [26] propose a Mamba-based framework that learns the ranging patterns of UWB measurements in large-scale environments, obtaining higher accuracy than state-of-the-art approaches. Similarly, the authors in [27] use Mamba for multi-modal sensor fusion, achieving lower error than the baselines on an indoor positioning dataset. B. Motivations & Contributions Most existing research on indoor localization has relied on MLP, recurrent, convolutional, and transformer-based architectures, while the potential of Mamba has only recently started to be explored. This observation is evident in several prior works [9], [17]–[23]. In particular, studies such as [17], [18] rely on simple MLP-based solutions, which often fall short in more complex settings with multiple measurement APs. Other works (i.e., [19], [20]) adopt recurrent and convolutional architectures that obtain low inference time; however, they suffer from poor localization performance while still requiring a large number of multiply-accumulate operations and model parameters. On the other hand, although the authors in [21]–[23] employ attention- and transformer-based architectures to improve the accuracy, these solutions come with high computational complexity and multiply-accumulate operations, resulting in longer inference time, which complicates their deployment on positioning devices with limited computational power. Furthermore, most of the aforementioned works provide only a point estimate of the user location without

3

quantifying its confidence, whereas the works [8] and [9], which consider uncertainty, do not calibrate it. Lastly, although Mamba has recently been adopted for indoor localization, the existing works come with several limitations. In particular, [24] considers a cross-modal teacher model during training, which requires synchronized measurements from an additional modality, while [25] formulates the localization as a roomlevel classification task rather than estimating the user coordinates. Similarly, [26] uses UWB range measurements and does not exploit the multipath information in the CIR, whereas [27] focuses on aligning heterogeneous sensing modalities instead of multiple sources of the same modality, such as distributed APs. More importantly, none of these works provides a mechanism to adaptively weight the contribution of individual APs, which is essential when the measurements of some APs are degraded. To the best of our knowledge, this is the first time that a Mamba-based encoder combined with attentionbased fusion has been explored for indoor localization using real-world 5G and UWB measurements. The main contributions of this work are as follows: 1) We propose LocAttMamba, a novel low-complexity indoor localization framework in which the measurements from each AP are processed by a dedicated encoder built from stacked forward and reverse Mamba blocks, preserving the near-linear complexity of SSMs and thereby keeping the multiply-accumulate operations and the inference time low. The resulting per-AP embeddings are subsequently fused through a multi-head attention layer using a shared learnable query, which assigns a weight to each AP at every time step according to its importance, rather than treating all APs equally. This is the first work to combine Mamba-based encoders with attention-based AP fusion for indoor localization. 2) We evaluate the robustness of the proposed framework under degraded CIR quality, considering both singleAP and multiple-AP distortions over a wide range of signal to noise ratio (SNR) values. In addition, we analyze the learned attention weights and show that the fusion layer adaptively down-weights the distorted APs, which provides a degree of interpretability to the fusion mechanism and explains the graceful degradation observed under noisy conditions. 3) We conduct an extensive evaluation on two real-world datasets, namely a 5G and a UWB indoor localization dataset, against several benchmarks spanning conventional machine learning (ML), recurrent, convolutional, transformer-, and Mamba-based approaches. Beyond the localization error, we also report the multiplyaccumulate operations and the inference time of every benchmark, together with an ablation study over the fusion strategy, the input features, the sequence model, and the training objective, in order to isolate the contribution of each design choice. Our numerical results validate the effectiveness of the proposed framework. In particular, LocAttMamba achieves a mean error of 1.004 m on the 5G dataset and 0.599 m on the UWB dataset, outperforming the second-best benchmark

by 9.79% and 5.82%, respectively, while requiring the fewest multiply-accumulate operations among all evaluated models, i.e., 0.446 M/sample and 0.953 M/sample, and achieving the third-lowest inference time, which is 4.4–16× faster than the transformer-based benchmarks. Moreover, the post-hoc calibration reduces the normalized squared error statistic from 34.6 to 2.15, close to the ideal value of 2 for a two-dimensional Gaussian. Finally, under a fixed SNR of 5 dB with three distorted APs on the 5G dataset, the proposed framework obtains 37.85%, 74.80%, 67.76%, and 9.64% lower mean error compared to [24], [21], [22], and [19], respectively, confirming that the attention-based fusion effectively mitigates the impact of unreliable measurement sources.

C. Organization The remainder of this paper is organized as follows: Section II presents the discussed problem followed by the methodology in Section III. Section IV provides the numerical results and analysis, and finally Section V concludes the paper with conclusions and future works. II. PROBLEM DESCRIPTION In this section, we formulate the user localization problem using CIR and time-related feature measurements from multiple APs. Let us assume a dataset contains T time steps of CIR measurement with NAP APs. We denote the complex CIR at time step t with ν elements measured by AP i as: h i⊤ (t) (t) (t) (t) ∈ Cν , hi = hi,1 , hi,2 , · · · , hi,ν

(1)

(t)

where hi,k ∈ C is the k-th element of the measured CIR by AP i at time step t, for all k ∈ {1, 2, · · · , ν}. Furthermore, we assume the availability of the estimated TDoA and ToA(t) (t) offset, denoted as ξi ∈ R and ζi ∈ R, respectively. A set of W time steps of measurement starting at time step t for (t) AP i, denoted by Oi , is then given by: i h i nh (t) (t) (t) (t) (t+1) (t+1) (t+1) , ξi , ζi , Oi = hi , ξi , ζi , hi h io (2) (t+W −1) (t+W −1) (t+W −1) . . . , hi , ξi , ζi . To obtain a real-valued representation, we concatenate the real and imaginary parts of the CIR with the two time-related (t) features into a single feature vector zi ∈ R2ν+2 for each time step: h i⊤ (t) (t) (t) (t) (t) zi = ℜ(hi )⊤ , ℑ(hi )⊤ , ξi , ζi ∈ R2ν+2 ,

(3)

where ℜ (.) and ℑ (.) are the real and imaginary operators, (t) respectively. Subsequently, the observation matrix Zi , containing the W time steps of zi vectors, starting from time step t is expressed as: i⊤ h (t) (t) (t+1) (t+W −1) Zi = zi , zi , · · · , zi ∈ RW ×(2ν+2) .

(4)

4

In a similar manner, the 2-D location of the user during the W time steps window starting at time step t can be written as:   (t) (t) lx ly  (t+1) (t+1)   lx  ly  ∈ RW ×2 , (5) L(t) =  .. ..     . . (t+W −1)

lx (t)

(t+W −1)

ly

(t)

where lx and ly represent the user location at time step t over x-axis and y-axis, respectively. Equation (4) can be applied to all APs for i ∈ {1, 2, · · · , NAP } to construct synchronized matrices (t) (t) (t) Z1 , Z2 , · · · , ZNAP for each time step t. By aggregating the information from all APs and through the full time steps T , the training dataset Dtrain can be formed as: ( D

train

=

hh

i i hh i i (0) (0) (S) (S) Z1 , . . . , ZNAP , L(0) , Z1 , . . . , ZNAP , L(S) ,

...,

hh

(N S) (N S) , . . . , ZNAP Z1

i

,L

(N S)

i

) ,

(7)

In this case, we introduce a mapping function f : RNAP ×W ×(2ν+2) → RW ×2 , with trainable parameters Θ. Using the function f , we map the input observation matrices from all APs into the output predicted locations as: L = f ([Z1 , Z2 , · · · , ZNAP ] |Θ) .

(8)

Consequently, the optimal trainable parameters of f , denoted by Θ∗ , can be obtained by minimizing the loss function L of the predicted and ground-truth locations over Dtrain as: N i    h X (nS) (nS) (nS) Θ = arg min L f Z1 , Z2 , · · · , ZNAP |Θ , L(nS) . ∗

Θ

n=0

Structured SSMs (S4s) are a recently developed class of deep learning sequence models derived from SSMs in control theory, which characterize the evolution of a continuous-time system through its internal state. An SSM can be computed either as a recurrence, like a RNN, or as a convolution, like a CNN, combining efficient inference with parallelizable training [28]. It performs sequence-to-sequence transformations through an implicit latent state modeled by first-order differential equations. As an example, let us denote a continuous input and output sequence x(t) ∈ RNin and y(t) ∈ RNout , where Nin and Nout are the number of input features and output variables, respectively. Next, we denote m (t) ∈ Rdstate as the implicit state, with dstate representing the dimension. SSMs use three matrices A ∈ Rdstate ×dstate , B ∈ Rdstate ×Nin , and C ∈ RNout ×dstate as model parameters, which determine the function-to-function transformation through a continuous-time linear system SSM (A, B, C) (x(t)) as: m′ (t) = Am(t) + Bx(t),

(6)

where S is stride, and N can be calculated as follows:   T −W . N= S

A. Preliminaries: SSMs & Mamba

(9)

The loss function L will be discussed in details in next sections. Consequently, during the inference, the optimal parameters Θ∗ is used to predict the output locations as:   ∗ test test Ltest = f Ztest . (10) 1 , Z2 , · · · , ZNAP |Θ In Section III, we discuss our proposed LocAttMamba based solution, representing the mapping function f .

y(t) = Cm(t).

(11)

To perform sequence-to-sequence transformation, we discretize the continuous parameters of the system using a step size δ ∈ R>0 . By applying zero-order  hold (ZOH), the  discretized S4 model SSM Â, B̂, Ĉ, δ (X) is expressed as: mk = Âmk−1 + B̂xk ,

yk = Ĉmk .

(12) ⊤

∈ Here, mk ∈ Rdstate , X = [x0 , · · · , xk , · · · , xW −1 ] ⊤ RW ×Nin , Y = [y0 , · · · , yk , · · · , yW −1 ] ∈ RW ×Nout are the discretized state, input, and output, respectively, for a sequence length of W , with xk ∈ RNin and yk ∈ RNout being the k-th input and output  element. Furthermore, the discretized matrices Â, B̂, Ĉ are written based on simplified ZOH as: Â = exp (δA) ∈ Rdstate ×dstate , B̂ = (δA)

−1

(exp (δA) − Idstate ) (δB) ∈ R

Nout ×dstate

Ĉ = C ∈ R

(13) dstate ×Nin

,

(14)

.

(15)  In the S4 model shown in (12)-(15), matrices Â, B̂, Ĉ, δ are assumed to be constant, enabling a linear time-invariant (LTI) system. In particular, the LTI feature enables the computation of these models through a global convolution [28], significantly reducing the inference. However, the input independent structure of this SSM limits its ability in more complex problems. 

III. PROPOSED SCHEME This section presents the proposed LocAttMamba framework. First, we review the preliminaries of SSMs as the core building block of the Mamba architecture. Subsequently, we introduce the overall architecture of the proposed framework, where each AP is first processed using bidirectional Mamba blocks, and then the resulting per-AP embeddings are fused using a multi-head attention layer to predict the user location and its per-axis uncertainty.

B. Mamba Block While the S4 model in Section III-A is efficient, its inputindependent parameters limit its expressiveness. Mamba overcomes this by introducing a selection mechanism, in which the matrices B, C, and δ become functions of the input [10]. A scalar SSM is applied independently to each input channel, so that the discretized parameters, and hence the recurrence, become time-varying. We first describe the block

5

SSM

Gating

which guarantees δ k > 0. Since a scalar SSM is applied per channel, the state matrix A ∈ Rdinner ×dstate is diagonal and stored per channel, where each row contains the diagonal entries of one channel. The ZOH in (13)–(15) is then applied per time step, so that the discretized matrices become input-dependent: Âk = exp(diag (δ k ) A) ∈ Rdinner ×dstate ,

(23)

dinner ×dstate , B̂k = (δ k ⊙ x̃k ) b⊤ k ∈R dstate ĉk = ck ∈ R ,

(24) (25)

where Âk , B̂k ∈ Rdinner ×dstate and ⊙ denotes element-wise multiplication with broadcasting over the state dimension. Consequently, the recurrence in (12) becomes time-varying for Mamba as:

Discretization & SSM

Mk = Âk ⊙ Mk−1 + B̂k , Fig. 1. Block diagram of the Mamba block.

that produces these input-dependent parameters, and then the resulting selective recurrence. Fig. 1 shows the block diagram of the Mamba block [10]. Let U ∈ RW ×Nin be the block input. The input is projected into dimension dmodel using weight Win ∈ RNin ×dmodel as: U′ = UWin ∈ RW ×dmodel .

(16)

yk = Mk ĉk ,

(26)

where Mk ∈ Rdinner ×dstate is the state matrix, yk ∈ Rdinner is the output. Here, A remains a static learned parameter and the time-variation is introduced solely through δ k , Bk , and ck . Notably, the state converts to a matrix from a vector, due to the fact that Mamba considers independent SSMs for each of the input features, resulting in having dinner independent state vectors, and thus, having a dinner × dstate state matrix at each time step. The full SSM output is then written as: ⊤

YSSM = [y0 , · · · , yk , · · · , yW −1 ] ∈ RW ×dinner .

(27)

Using U′ , two branches are created. In the SSM branch, a linear projection is applied to U′ as:

In the gating branch, the U′ matrix is first projected using the weight W2 ∈ Rdmodel ×dinner as:

X′ = U′ W1 ∈ RW ×dinner ,

G′ = U′ W2 ∈ RW ×dinner ,

(17)

(28)

where W1 ∈ Rdmodel ×dinner is the projection weight, and dinner is the dimension to which the input is projected.

which is then passed through a SiLU function:

The output X′ is passed through depthwise 1-D Convolution with weight Wc ∈ Rdinner ×dconv as:

Finally, the outputs from the SSM and gating branch are combined using element-wise multiplication as:

X̂ = Conv1D(X′ , Wc ) ∈ RW ×dinner ,

Ỹ = YSSM ⊙ G ∈ RW ×dinner ,

which is then passed through a SiLU function:   X̃ = SiLU X̂ ∈ RW ×dinner ,

(18)

(19)

X̃ = [x̃0 , · · · , x̃k , · · · , x̃W −1 ] ∈ RW ×dinner ,

(20)

dinner

with x̃k ∈ R being the k-th element, are used to form input-dependent vectors bk ∈ Rdstate , ck ∈ Rdstate , and δ k ∈ Rdinner as: bk =x̃k WB ∈ Rdstate ,

ck = x̃k WC ∈ Rdstate ,

δ k = softplus(x̃k Wδ ) ∈ Rdinner ,

(30)

(31)

It is important to note that since Mamba uses inputdependent model parameters, the resulting system is no longer LTI, and thus, it cannot be evaluated as a global convolution; instead, Mamba employs a hardware-aware selective scan to compute (26) efficiently instead of the normal sequential one [10]. We will demonstrate the impact of using parallel scan in the next section.

(21)

where WB , WC ∈ Rdinner ×dstate are the projection weights of the state matrices, and Wδ ∈ Rdinner ×dinner is the projection weight for the time step. This yields bk , ck ∈ Rdstate and δ k ∈ Rdinner , and the softplus function is defined as: softplus(z) = log (1 + ez ) ,

(29)

which is passed through the linear weight W4 ∈ Rdinner ×dmodel to obtain the Mamba model output: Y = ỸW4 ∈ RW ×dmodel .

where SiLU(z) = z · 1+e1−z . Subsequently, rows of the obtained ⊤

G = SiLU(G′ ) ∈ RW ×dinner .

(22)

C. Proposed LocAttMamba Framework In this section, we will explain the proposed architecture of the mapping function f (.) for the user localization problem. Fig. 2 illustrates the proposed architecture. Specifically, we consider NAP encoders, each receiving an input sequence (nS) Zi ∈ RW ×(2ν+2) from the training dataset Dtrain , where

6

Linear

ReLU ReLU

Norm

Linear

Norm

Linear

Norm

Linear

Mamba Block

Norm

Reversed Mamba Block

Mamba Block

Reversed Mamba Block

MLP

MLP

Fig. 2. Block diagram of the proposed LocAttMamba approach.

n ∈ {0, . . . , N }. For notational simplicity, we omit the superscript (nS) in the following discussion. Each input sequence is then processed by its corresponding encoder through a stack of Mamba blocks, shown in Fig. 1, as follows: Yi = Mamba (Zi ) ∈ RW ×dmodel , Ŷi = J Mamba (JZi ) ∈ RW ×dmodel ,

(32)

W ×W

where J ∈ R is an anti-diagonal matrix with the elements along the anti-diagonal being 1, and all other elements being 0, forming the reverse Mamba. Projecting the input into dmodel and adding that as a residual branch, the outputs are added up to obtain Ẑi ∈ RW ×dmodel as: Ẑi = Yi + Ŷi + Zi Wres ∈ RW ×dmodel ,

(33)

where Wres ∈ R(2ν+2)×dmodel is the input projection weight. Subsequently, Ẑi is passed through several linear projection layers as:     Z̃i = Ẑi + ReLU Norm Ẑi Wψ1 Wψ2 ∈ RW ×dmodel , (34) where Z̃i ∈ RW ×dmodel is the output, Wψ1 ∈ Rdmodel ×dmodel and Wψ2 ∈ Rdmodel ×dmodel are the projection weights, the ReLU function is defined as: ReLU(z) = max (0, z) ,

(35)

and Norm represents the root mean square normalization which can be written for a vector u ∈ Rd as: u (36) Norm (u) = γ ⊙ r P , 1 2 u i d i

where γ ∈ Rdmodel is a vector with dmodel trainable elements, for each Norm layer. This sequence is repeated for nlayer , and the output is passed through a Norm layer to obtain the embedding Ei ∈ RW ×dmodel .

Subsequently, first, the embeddings Ei are stacked into a single tensor E ∈ RNAP ×W ×dmodel as: E = stack(E1 , . . . , ENAP ) ∈ RNAP ×W ×dmodel , E k ∈ RNAP ×dmodel

∀k ∈ {0, · · · , W − 1} ,

(37)

where E k ∈ RNAP ×dmodel denotes the stacked embedding for the k-th time step within the window W . To this point, we have obtained the output embeddings of the Mamba blocks and stacked them into E k . To combine these embeddings across the NAP APs and obtain an accurate track estimate, we use an attention mechanism [4], [14] that weights each AP according to its importance at every time step. To do so, the learnable projections WQ , WK , WV ∈ Rdmodel ×dmodel map a shared query q ∈ Rdmodel and the stacked embedding E k into the query q̂ ∈ Rdmodel , key Kk ∈ RNAP ×dmodel , and value Vk ∈ RNAP ×dmodel at each time step k: ⊤ q̂ = qWQ ∈ Rdmodel ,

(38)

⊤ Kk = E k WK ∈ RNAP ×dmodel , Vk = E k WV⊤ ∈ RNAP ×dmodel .

(39) (40)

For multi-head attention, these matrices are split into nH heads, where each head j ∈ {1, . . . , nH } works on a subspace of dimension dh = dmodel /nH (assuming dmodel is divisible by nH ). Splitting q̂, Kk , and Vk along their feature dimension gives the per-head slices as: q̂(j) ∈ Rdh ,

(j)

Kk ∈ RNAP ×dh ,

(j)

Vk ∈ RNAP ×dh .

(41)

(j)

Subsequently, we compute the attention score ϕk ∈ RNAP for each head as follows: q̂ (j) ϕk =

(j)

(j) ⊤

K √ k dh

∈ RNAP ,

(42)

7

which is normalized using Softmax function to obtain nor(j) malized attention weights αk ∈ RNAP as: (j)

(j) 

αk = Softmax ϕk

∈ RNAP ,

Algorithm 1: Proposed LocAttMamba algorithm AP Input: Per-AP feature sequences {Zi }N i=1 , W ×(2ν+2) Zi ∈ R . Output: Predicted locations µ ∈ RW ×2 and per-axis log-variances log σ 2 ∈ RW ×2 .

zp

e Softmax(z)p = P zp , e p

(43) (j) which is used to compute the context vector ρk ∈ Rdh as:

for each AP i = 1, . . . , NAP do for each encoder layer ℓ = 1, . . . , nlayer do (j) (j) (j) Process Zi in forward temporal direction ρk = αk Vk ∈ Rdh . (44) 3 Yi ← Mamba(Zi ) Next, the obtained context vectors are concatenated and pro- 4 Process Zi in reverse temporal direction jected using projection weight Wo ∈ Rdmodel ×dmodel as: Ŷi ← J Mamba(JZi )  (1) (n )  5 Merge both directions through a residual κk = ρk ∥ · · · ∥ ρk H Wo⊤ ∈ Rdmodel , Wo ∈ Rdmodel ×dmodel . connection: Ẑi ← Yi + Ŷi + Zi Wres (45) 6 Update Zi via a normalized feed-forward block Notably, the contribution of each AP’s embeddings in the with residual connection fusion is determined by the average normalized attention 7 end weight ᾱk ∈ RNAP across attention heads as: 8 AP embedding: Ei ← Norm(Zi ) nH 1 X (j) NAP 9 end ᾱk = α ∈R . (46) nH j=1 k 10 Stack the per-AP embeddings into E ← stack(E1 , . . . , ENAP ) Consequently, the predicted 2-D location µk = [µk,x , µk,y ] ∈ 11 Project the shared learnable ⊤ query: q̂ ← qWQ R2 and uncertainty σ k ∈ R2 are obtained as: 12 for each time step k = 0, . . . , W − 1 do ⊤ µk = [µk,x , µk,y ] = W2µ SiLU (W1µ κk ) ∈ R2 , (47) 13 Project the AP embeddings at time step k into keys  ⊤ ⊤ 2 2 and values: Kk ← E k WK , log σ 2k = log σk,x , log σk,y = W2σ SiLU (W1σ κk ) ∈ R2 , ⊤ Vk ← E k WV (48) 14 15 for each attention head j = 1, . . . , nH do where µk,x ∈ R and µk,y ∈ R denote the predicted loca- 16 Compute the importance weight of each AP: µ √  tion along the x- and y-axes, and W1 ∈ Rdmodel ×dmodel and (j) (j) αk ← Softmax q̂(j) (Kk )⊤ / dh µ 2×dmodel are the first and second projection weights of W2 ∈ R (j) (j) (j) Aggregate the AP values: ρk ← αk Vk the location head. Similarly, σk,x ∈ R and σk,y ∈ R denote 17 end the predicted uncertainty along the two axes, with W1σ ∈ 18 19 Concatenate and project heads to obtain κk dmodel ×dmodel σ 2×dmodel and W2 ∈ R the corresponding projection R 20 Predict µk and log σ 2k from κk via separate heads weights. Eventually, by stacking the predicted location and 21 end uncertainty over all time steps, we obtain the following: 22 Collect the predictions over all time steps into µ and µ ∈ RW ×2 , log σ 2 ∈ RW ×2 . (49) log σ 2 2 23 return µ, log σ The discussed architecture works as the mapping function f (.) written in (8), with Θ representing the parameters of the proposed LocAttMamba. The summary of this approach E. Post-hoc Uncertainty Calibration is shown in Algorithm 1. Since models trained with the β-NLL objective tend to be overconfident, we apply a post-hoc calibration step to the D. Loss Functions predicted per-axis variance. Let ek = µk − lk denote the To optimize the trainable parameters Θ by minimizing the prediction error at time step k and (σk,x , σk,y ) the predicted loss in (9), we first use mean square error (MSE) loss as: standard deviations. The calibration is measured by the mean W −1 normalized squared error: X 1 2 ! LMSE = ∥µk − lk ∥2 , (50) N X e2k,x e2k,y 2W 1 2 k=0 χ = + 2 , (52) 2 N σk,x σk,y k=1 which is used during the warm-up training. After warm-up, the model parameters are optimized using β-negative log where χ2 = 2 indicates a well-calibrated two-dimensional likelihood (NLL) loss as [29]: Gaussian, with larger values indicating overconfidence. To ! W −1 correct any miscalibration, we apply per-axis temperature 2 1 X  2 β (lk − µk ) Lβ-NLL = σk log σk2 + , (51) scaling [30], with scales fit on the validation set as: 2W σk2 v v k=0 u u u 1 X e2k,x u 1 X e2k,y which is used to simultaneously optimize µ and uncertainty t , sy = t (53) sx = 2 2 , Nval σk,x Nval σk,y head log σ, where ⌊.⌋ denotes the stop-gradient operator [29]. k k 1

2

8

TABLE I M ODEL AND T RAINING H YPER - PARAMETERS . Hyperparameter Number of Layers (nlayer ) State Dimension (dstate ) Inner Dimension (dinner ) Attention heads (nH ) Window Size (W ) Warm-up Epochs β

Value 2 16 32 4 25 6 0.5

Hyperparameter Learning Rate (η) Batch Size (BS ) Model Dimension (dmodel ) Weight Decay (λ) Stride (S) Total Epochs Optimizer

Value 0.003 16 32 0.05 5 15 AdamW

yielding calibrated uncertainties σ̃k,x = sx σk,x and σ̃k,y = sy σk,y , which are applied unchanged to the test set. The closed form in (53) is the exact minimizer of the Gaussian negative log-likelihood over a per-axis scale. IV. NUMERICAL RESULTS In this section, we present the numerical results obtained from our simulations. We investigate a real-world 5G indoor localization dataset in [31], which includes NAP, 5G = 6 APs and ν5G = 128 CIR elements in addition to TDoA and ToA-offset features. The dataset is publicly available and was collected with a bandwidth of 100 MHz and a carrier frequency of 3.7 GHz. Notably, the dataset provides separate train and test sets with Ttrain,5G = 18867 and Ttest,5G = 15722, where the test set is held out until the final evaluation. From the training set, the last 20% of time steps are used as the validation set, where the split is applied before windowing so that no window spans the train–validation boundary. To improve the reliability of the results, all simulations are conducted over 4 independent runs, and the reported performance metrics are averaged across these runs. Furthermore, we consider validation distance as the key evaluation metric defined as: q 2 2 d = (lx − µx ) + (ly − µy ) , (54) where lx (ly ) and µx (µy ) are the ground-truth and predicted locations along the x-axis (y-axis), respectively. We conduct experiments using the Kaggle computing platform with an Intel Xeon CPU running at approximately 2.2 GHz and two NVIDIA Tesla T4 GPUs with 16 GB memory each. For training, we use AdamW optimizer [32] with weight decay parameter λ for 15 epochs in total and 6 warm-up epochs. The input features are first normalized using Z-score normalization, where both the validation and test set use the statistics obtained from the training set for later normalization. Moreover, we use window size W = 25 and stride S = 5 for all the results presented in this paper. A. Fine-Tuning & Analysis First, we fine-tune the hyper-parameters of the proposed LocAttMamba with a single AP (i.e., a single Mamba block and no attention for fusion) for a faster tuning. We initialize the hyper-parameters based on [33], and then tune several architectural and training hyper-parameters. Fig. 3 shows the validation loss and validation distance across different learning rates η = [0.0001, 0.0003, 0.001, 0.003, 0.01], batch sizes BS = [8, 16, 32, 64], dstate = [8, 16, 32], and regularization

parameter λ = [0.01, 0.05, 0.1]. In particular, Fig. 3a illustrates that η = 0.003 and η = 0.01 obtain the lowest validation distance, while η = 0.003 offers lower variance for more stable performance. Similarly, Fig. 3b shows the performance across various batch sizes, where both BS = 16 and BS = 8 show an almost comparable performance, with BS = 16 having a slightly lower variance. Additionally, training with a BS = 8 results in a longer training time without substantial improvement. Subsequently, we tune the dimension dstate , shown in Fig. 3c. Notably, to avoid prolonged tuning, we consider dinner = dmodel = 2 × dstate . Fig. 3c demonstrates that dstate = 16 achieves the lowest validation loss and distance, while increasing the dstate to 32 not only increases the complexity of the model but also does not lead to any improvement. Finally, Fig. 3d shows the sweep over weight decay λ. It can be seen that this parameter has the lowest impact on the performance compared to previous one, with λ = 0.05 obtaining a slightly lower error overall. The summary of the hyper-parameters are shown in Table I. These hyper-parameters are used symmetrically for all Mamba blocks. Next, we analyze the impact of adding more APs on the validation distance. Fig. 4 shows the obtained validation distance with different number of APs in addition to the training and validation time. As it is expected, adding the information from more APs leads to performance enhancement. For instance, from 1 AP to 2 APs we observe 29.12% lower validation distance while increasing the training time by 94.99% and validation time by 77.61%. Similarly, from 5 APs to 6 APs, the improvement is 10.28% with training and validation time increasing by 17.59% and 17.47%, respectively. Fig. 4 also shows the impact of using selective scan [10] instead of standard sequential computation of the states inside the Mamba blocks. For instance, using the selective scan can reduce the training and validation for 6 APs by 50.08% and 18.97%, respectively. B. Ablation Study In this subsection, we conduct an ablation study– using the validation set– on fusion, model, training, and data features of the proposed model as: 1) Average Fusion: Using average instead of attention. 2) No Fusion: 6 Mamba blocks are trained separately, and the final location is the average of their prediction. 3) CIR-Only: Using only the CIR as the input. 4) CIR + TDoA: dropping the ToA-offset. 5) Unidirectional Mamba: Instead of having both Mamba and Reverse Mamba, we only keep the Mamba. 6) 1D CNN/RNN: Using 1-D CNN/RNN instead of the Mamba blocks. 7) Warm-up Only: Training only with the MSE loss. Table II shows the performance of the above-mentioned ablations with the associated performance degradation. For instance, replacing the attention layer with the Average Fusion leads to an almost 9.43% degradation, while with No Fusion the performance drops substantially by 51.76%. Similarly, removing TDoA and ToA-offset feature results in a 26.15%

9

0.5 0.4

5

S=8 S=16 S=32 S=64

0.45 0.40

4

0.35 0.30

3 2

4

6

8

Epoch

10

12

14

2

4

6

8

Epoch

10

12

14

2

4

6

8

Epoch

(a) Learning rate (η)

3.6

Loss

0.300 0.275 0.250

3.0

4

6

8

Epoch

10

12

14

0.275 0.250

4

4

6

8

Epoch

10

12

14

6

8

Epoch

10

12

14

0.175

=0.01 =0.05 =0.1

3.8 3.6 3.4 3.2 3.0 2.6

0.200 2

2

2.8

0.225

2.4 2

0.325 0.300

3.2

2.6

0.200

14

=0.01 =0.05 =0.1

0.350

3.4

2.8

0.225

12

Distance (m)

Distance (m)

0.325

10

0.375

dstate=8 dstate=16 dstate=32

3.8

Loss

0.350

3.0

(b) Batch size (BS )

4.0

dstate=8 dstate=16 dstate=32

0.375

3.5

2.5

0.20

0.2

0.175

4.0

0.25

0.3

S=8 S=16 S=32 S=64

4.5

Distance (m)

Loss

0.6

Distance (m)

0.7

=0.0001 =0.0003 =0.001 =0.003 =0.01

6

Loss

=0.0001 =0.0003 =0.001 =0.003 =0.01

0.8

2.4 2

(c) State dimension (dstate )

4

6

8

Epoch

10

12

14

2

4

6

8

Epoch

10

12

14

(d) Weight decay (λ)

Fig. 3. Validation loss and distance for (a) learning rate (η), (b) batch size (BS ), (c) state dimension (dstate ), and (d) weight decay (λ).

3.0

Best Distance Final Distance Train Time (Standard)

60

2.61 2.62

50

Distance (m)

2.5

40

1.85 1.85

2.0

1.36 1.37

1.5

1.26 1.27

30

1.07 1.07

1.0

0.96 0.96

1 AP

2 APs

3 APs

4 APs

Configuration

5 APs

6 APs

Ablation

Approach Average Fusion No Fusion CIR only Data CIR + TDoA Unidirectional Mamba Model 1D CNN RNN Training Warmup only LocAttMamba Fusion

Avg. Val. Dist. 1.06 ± 0.01 m 1.99 ± 0.06 m 1.30 ± 0.04 m 0.97 ± 0.04 m 1.14 ± 0.03 m 1.10 ± 0.02 m 1.10 ± 0.03 m 1.00 ± 0.01 m 0.96 ± 0.03 m

Performance Degradation 9.43% 51.76% 26.15% 1.03% 15.79% 12.73% 12.73% 4.00% —

20 10

0.5 0.0

TABLE II A BLATION S TUDY (6-AP S S ETTING )

70

Val Time (Standard) Train Time (Selective Scan) Val Time (Selective Scan)

Avg Time per Epoch (s)

3.5

0

Fig. 4. Obtained validation distance with different number of APs.

performance loss, whereas only removing the ToA-offset has a small 1.03% degradation. Notably, since ToA-offset is a single scalar feature, we keep that as the input feature since it will have minimum impact on the complexity. Subsequently, using only unidirectional Mamba or replacing the whole block with 1-D CNN or RNN can result in the performance degradation by 15.79%, 12.73%, and 12.73%, respectively. Finally, only using the MSE loss shows a small degradation as low as 4.00% compared to the full MSE + NLL training. C. Performance on The Test Set In this subsection, we evaluate the trained model on the unseen test set. Fig. 5 illustrates the predicted locations against the ground-truth locations, where each point’s color shows the prediction error. For instance, the points with darker colors have lower prediction errors, whereas the points with brighter colors close to yellow have higher prediction errors. The mean

error on the test set obtained by the proposed LocAttMamba is 0.999 m with median error of 0.865 m1 . Furthermore, we evaluate the calibration of the predicted uncertainty using the normalized squared error in (52). Before calibration, the model is substantially overconfident, with χ2 = 34.6 and per-axis ratios of 13.43 and 21.12 along the x- and y-axes, respectively. Applying the per-axis temperature scaling of (53), with scales sx = 3.26 and sy = 4.87 fit on the validation set, reduces the test-set statistic to χ2 = 2.15, close to the ideal value of 2. Here, the residual per-axis error-to-variance ratios are 1.11 and 0.75, indicating that the gross over-confidence is removed while the y-axis becomes mildly under-confident. The scales generalize well, where the validation-fitted values match the test-optimal scales within approximately 10%, confirming that the correction transfers to unseen data rather than overfitting the evaluation set. It is important to note that the post-hoc calibration does not impact the location head µ, and the temperature scaling is only applied to the uncertainty head. To understand the contribution of each AP in each region, the average attention weight ᾱ in (46) over all test time steps is illustrated in Fig. 6. It can be seen that APs have different levels of impact in different regions, based on their proximity 1 This number is obtained from a single run to visualize the predicted locations.

10

(a) ᾱ(0) = 0.2267 (b) ᾱ(1) = 0.1408 (c) ᾱ(2) = 0.1476

Fig. 5. Error over the predicted locations on the test set.

(d) ᾱ(3) = 0.1032 (e) ᾱ(4) = 0.1784

(f) ᾱ(5) = 0.2032

Fig. 6. Average attention weight for all APs.

and line-of-sight availability. For instance, AP number 5 has a higher attention weight in the lower left regions (shown in Fig. 6f), whereas AP 3 has the lowest average attention weight, due to the presence of an obstacle in front of the AP (shown in Fig. 6d). In Section IV-E, we will discuss the impact of noise on the attention weights to better observe the weighting mechanism in the fusion. D. Benchmark Comparison After evaluating the performance of the proposed LocAttMamba, we compare the performance against several existing benchmarks as: 1) Support vector machine (SVM): A conventional ML approach. 2) Bi-LSTM [19]: a Bi-LSTM-based approach for indoor fingerprinting. 3) ACNN [20]: An Autoencoder-based CNN indoor localization. 4) L-SwiGLU-T [22]: A lightweight transformer-based approach for indoor localization. 5) Swin-Loc [23]: A heavy-weight transformer architecture for sensing and localization. 6) Sec5GLoc [21]: A CNN-attention approach for indoor localization. 7) MambaLoc [24]: A Mamba-based indoor localization, trained as a standalone model since the considered datasets do not include the paired modality used for distillation in [24]. For a more reliable output, we also consider the UWB localization dataset in [31], containing TDoA and ToA-offset, and CIR with νUWB = 366. This dataset also includes NAP, UWB = 6, where the data is collected with a bandwidth of 499.2 MHz and a carrier frequency of 4 GHz with Ttrain,UWB = 18762 and Ttest,UWB = 3520. To compare the models, we consider mean, median, 75th percentile (P75), and 90th percentile (P90) error. Additionally, the complexity of each model is evaluated through its inference

time and multiply-accumulate operations. All the models are given the same input features as CIR, TDoA, and ToA-offset. Table III shows the overall performance of the benchmarks on both 5G and UWB test sets, averaged over 4 independent runs. It can be seen that the proposed LocAttMamba obtains the best mean error on both datasets, where it outperforms the second best model by 9.79% (Swin-Loc [23]) in 5G and 5.82% (L-SwiGLU-T [22]) in UWB. On the other hand, the Sec5GLoc [21] obtains a better median performance on 5G dataset by 5.61%, while having higher P75 and P90 error by 1.82% and 13.70%, respectively. Similarly, L-SwiGLU-T [22] has a lower median and P75 error by 13.27% and 4.17%, its P90 error is higher by 9.60%. In terms of the complexity of benchmarks, the proposed LocAttMamba has the lowest multiply-accumulate operations compared to all other benchmarks, while having third lowest inference time among the benchmarks. In particular, the BiLSTM [19] benchmark has much lower inference time by almost 18 times compared to the proposed LocAttMamba, however, the performance of this benchmark is much worse by almost 34.40% on 5G dataset and 2.76 times on the UWB dataset, completely outweighing its low inference time. Compared to Sec5GLoc [21], which has a 5.61% lower median error on the 5G dataset, the proposed LocAttMamba has 37.10% lower inference time and almost 63 times lower multiply-accumulate operations on the 5G dataset. Similarly, while L-SwiGLU-T [22] has lower median and P75 error in UWB dataset, it has roughly 1.5 times more multiplyaccumulate operations and almost 4.4 times higher inference time, making the model inappropriate for real-time deployment. It is important to note that all the models are tested using T4 GPU and batch size = 1 for inference time. To better illustrate the performance, the cumulative distribution function (CDF) of error of the benchmarks on the 5G test set is shown in Fig. 7. It can be seen that this figure confirms the results in Table III, where for instance, the Sec5GLoc [21] has a lower median with its CDF more leaned towards zero,

11

TABLE III B ENCHMARK C OMPARISON ACROSS 5G AND UWB SCENARIOS . Dataset

Model

Mean

Median

P75

P90

Inf. Time (ms/sample)

Multiply-Acc. (M/sample)

# Params

5G

SVM Bi-LSTM [19] ACNN [20] L-SwiGLU-T [22] Swin-Loc [23] Sec5GLoc [21] MambaLoc [24] LocAttMamba

3.166 ± 0.000 1.530 ± 0.046 2.153 ± 0.055 1.467 ± 0.036 1.113 ± 0.012 1.122 ± 0.019 2.012 ± 0.042 1.004 ± 0.010

2.844 ± 0.000 1.274 ± 0.042 1.764 ± 0.040 1.118 ± 0.031 0.976 ± 0.026 0.825 ± 0.017 1.732 ± 0.028 0.874 ± 0.014

4.144 ± 0.000 1.995 ± 0.069 2.646 ± 0.050 1.811 ± 0.041 1.467 ± 0.042 1.345 ± 0.027 2.661 ± 0.014 1.321 ± 0.018

5.700 ± 0.000 2.917 ± 0.106 3.755 ± 0.090 2.858 ± 0.066 1.955 ± 0.052 2.132 ± 0.023 3.751 ± 0.018 1.840 ± 0.015

51.051 ± 0.870 0.065 ± 0.001 1.198 ± 0.030 5.325 ± 0.037 18.895 ± 0.102 1.863 ± 0.026 0.261 ± 0.004 1.171 ± 0.027

43.936 2.151 13.592 1.288 905.770 27.945 0.721 0.446

N/A 2, 146, 690 13, 880, 846 218, 310 4, 005, 855 211, 986 657, 328 344, 804

UWB

SVM Bi-LSTM [19] ACNN [20] L-SwiGLU-T [22] Swin-Loc [23] Sec5GLoc [21] MambaLoc [24] LocAttMamba

1.595 ± 0.000 1.656 ± 0.026 0.850 ± 0.009 0.636 ± 0.021 1.632 ± 0.032 0.781 ± 0.048 1.953 ± 0.057 0.599 ± 0.011

1.393 ± 0.000 1.585 ± 0.028 0.762 ± 0.019 0.486 ± 0.004 1.519 ± 0.022 0.537 ± 0.047 1.816 ± 0.055 0.560 ± 0.007

2.022 ± 0.000 2.180 ± 0.039 1.111 ± 0.015 0.759 ± 0.017 2.166 ± 0.065 0.868 ± 0.062 2.592 ± 0.080 0.792 ± 0.017

2.735 ± 0.000 2.811 ± 0.061 1.531 ± 0.012 1.135 ± 0.035 2.773 ± 0.052 1.409 ± 0.078 3.374 ± 0.108 1.026 ± 0.029

136.706 ± 5.209 0.069 ± 0.001 1.214 ± 0.038 5.243 ± 0.053 18.952 ± 0.362 2.034 ± 0.048 0.253 ± 0.005 1.191 ± 0.014

123.206 5.075 19.441 1.390 2, 604.063 78.485 1.087 0.953

N/A 5, 071, 234 25, 581, 878 235, 446 9, 895, 487 211, 986 1, 022, 896 436, 196

1.0

LocAttMamba (Ours) Sec5GLoc SwinLoc LS-SwiGLU BiLSTM ACNN MambaLoc SVM

10

0.6

LocAttMamba (Ours) Sec5GLoc Swin-Loc L-SwiGLU-T BiLSTM ACNN MambaLoc SVM

-5 -7. 5 -10

5 2.5

7.5

(a) 5G

6 7

Fig. 7. Error CDF on 5G test set.

Mean Error (m)

6

while the proposed LocAttMamba approach has better P75 and P90 errors. Additionally, it can be seen that the SVM baseline has the worst CDF curve compared to other approaches.

-5 -7. 5 -10

5

0 -2. 5

4

0 -2. 5

3

Localization error (m)

5

1.2 1.0 0.8 0.6

4

7.5

2

.5

1

SNR (dB)

10

0

2

15

0.0

4

12

0.2

6

15 12 .5 10

0.4

8

Mean Error (m)

CDF P[error x]

0.8

3 2

E. Noise Robustness

5 2.5

7.5

15 12 .5 10

1

While the proposed LocAttMamba is superior on nearly all complexity and error metrics, it is important to consider realworld scenarios where the input CIR may face SNR degradation. Thus, in this subsection, we evaluate the robustness of the trained models under noisy CIR inputs. The CIR power at time step t, for AP i is written as:

SNR (dB) (b) UWB

Fig. 8. Mean error versus degraded SNR in (a) 5G and (b) UWB datasets.

ν

(t)

Pi

=

1 X (t) 2 hi,b . ν

(55)

b=1

(t)

Degraded CIR h̃i,b ∈ C can be written as:

Subsequently, noise power per complex tap for a target SNR (in dB), and per-component standard deviation: q dB (t) (t) (t) (t) (56) Ni = Pi 10−SNR /10 , σi = Ni /2.

      (t) (t) (t) (t) (t) (t) h̃i,b = hi,b + ni,b ⇐⇒ ℜ h̃i,b = ℜ hi,b + ℜ ni,b ,       (t) (t) (t) ℑ h̃i,b = ℑ hi,b + ℑ ni,b . (58)

Then, complex additive white Gaussian noise is added as:     (t) (t) (t) (t)ℜ (t)ℑ i.i.d. (t)2  ni,b = ℜ ni,b + j ℑ ni,b , ni,b , ni,b ∼ N 0, σi , (57)

We consider multiple-AP = {1, 3, 5} CIR degradation over a single SNR = 5 dB, and single-AP CIR degradation over range of SNRs.

12

TABLE IV ROBUSTNESS E VALUATION : A BSOLUTE M EAN E RROR ( M ) AT A FIXED DEGRADED SNR = 5 D B UNDER VARYING AP CIR DISTORTIONS 5G

Model Clean

1 AP

3 APs

5 APs

Clean

1 AP

UWB 3 APs

5 APs

SVM

3.166

8.941 ± 0.000

8.974 ± 0.000

8.974 ± 0.000

1.595

3.335 ± 0.005

5.501 ± 0.003

6.020 ± 0.003

Bi-LSTM [19]

1.530

1.570 ± 0.006

1.603 ± 0.014

1.641 ± 0.010

1.656

1.686 ± 0.010

1.783 ± 0.012

1.873 ± 0.026

ACNN [20]

2.153

2.217 ± 0.005

2.395 ± 0.007

2.483 ± 0.007

0.850

0.902 ± 0.003

1.016 ± 0.005

1.097 ± 0.010

L-SwiGLU-T [22]

1.467

3.107 ± 0.002

4.491 ± 0.015

5.906 ± 0.013

0.636

0.775 ± 0.006

1.329 ± 0.016

2.686 ± 0.012

Swin-Loc [23]

1.113

7.436 ± 0.028

17.635 ± 0.009

13.717 ± 0.012

1.632

3.117 ± 0.013

3.818 ± 0.011

4.734 ± 0.012

Sec5GLoc [21]

1.122

2.886 ± 0.001

5.747 ± 0.002

9.363 ± 0.001

0.781

1.274 ± 0.004

3.365 ± 0.007

6.990 ± 0.003

MambaLoc [24]

2.012

2.142 ± 0.002

2.330 ± 0.006

2.456 ± 0.010

1.953

2.099 ± 0.010

2.343 ± 0.020

2.477 ± 0.015

LocAttMamba

1.004

1.146 ± 0.004

1.448 ± 0.006

1.736 ± 0.014

0.599

0.673 ± 0.012

0.762 ± 0.015

0.849 ± 0.021

Table IV shows the performance of the benchmarks under varying AP distortions. For more reliable results, we consider adding 4 different noise seeds and average the results. It can be seen that the proposed LocAttMamba approach maintains its superiority on both datasets under multipleAP noise degradation. For instance, in 5G dataset and 3AP distortion, the proposed LocAttMamba obtains 37.85%, 74.80%, 67.76%, and 9.64% lower mean error compared to MambaLoc [24], Sec5GLoc [21], L-SwiGLU-T [22], and BiLSTM [19], respectively. Similarly, on the UWB dataset and 5-AP CIR degradation, the proposed LocAttMamba achieves 82.05%, 54.66%, and 22.62% lower mean error than Swin-Loc [23], Bi-LSTM [19], and ACNN [20], respectively. Notably, it can be observed that the Bi-LSTM [19] approach has a lower mean error in 5G dataset and 5-AP distortion by 5.48%, while having an inferior performance in all other settings. Subsequently, we consider degrading a single AP2 and sweep over different SNR values = [15 : 2.5 : −10]. Fig. 8 shows the mean error versus obtained SNR for both 5G and UWB datasets. Particularly, the proposed LocAttMamba maintains its performance in almost all SNRs across both datasets. For instance, in a moderate noise of SNR = 7.5 dB, the proposed LocAttMamba has 27.43% lower error than BiLSTM [19] in 5G and 11.96% lower error than L-SwiGLU-T [22] in UWB dataset as second best algorithms. Similarly, in an extreme noise of SNR = -10 dB, LocAttMamba obtains a much lower error than L-SwiGLU-T [22] and Bi-LSTM [19] by 73.44% and 47.38%, respectively, in the 5G dataset. However, in the UWB dataset, L-SwiGLU-T [22] and ACNN [20] achieve a lower error after SNR = -2.5 dB than LocAttMamba, where at SNR = -10 dB, they have 50.50% and 16.85% lower error, respectively, compared to LocAttMamba. Fig. 9 shows the average attention weight with single noisy AP 0 for clean CIR, SNR = 0 dB, and SNR = -10 dB. This figure shows how the attention layer reduces the impact of the distorted AP by reducing its attention weight. In particular, it can be seen that the attention weight for AP 0 has reduced from 0.2267 to 0.2057 when the SNR degrades to 0 dB and further reduces to 0.1784 when the SNR degrades to -10 dB. By reducing the attention weight of the distorted AP, the output predicted location becomes more accurate as other intact APs 2 The same AP is degraded for all algorithms.

(a) ᾱ(0) = 0.2267 (b) ᾱ(0) = 0.2057 (c) ᾱ(0) = 0.1784 Fig. 9. Average attention weight in 5G dataset and AP 0 for (a) clean CIR, (b) SNR = 0 dB, and (c) SNR = - 10 dB.

take over, though some degradation occurs. In particular, the attention weight of the distorted AP does not go to zero even with extreme noise due to the presence of clean TDoA and ToA-offset features. Table V shows the position of the proposed LocAttMamba across all evaluated metrics. V. CONCLUSIONS In this paper, we developed LocAttMamba, a lowcomplexity localization framework that processes per-AP CIR and time-based features with bidirectional Mamba encoders and fuses them across APs through a learned attention mechanism, jointly predicting the user location and its associated uncertainty. We conducted extensive experiments on two realworld 5G and UWB datasets, where the effectiveness of the proposed design was shown. In particular, the proposed LocAttMamba achieved 1.004 m mean error in 5G and 0.599 m mean error in UWB, outperforming the secondbest benchmarks by 9.79% and 5.82%, respectively, while requiring the fewest multiply-accumulate operations among all evaluated models with third-lowest inference time. Furthermore, under noisy CIR conditions, LocAttMamba maintained its superiority in nearly all multiple-AP and single-AP degradation scenarios, where the attention layer was shown to adaptively down-weight distorted APs. Overall, the proposed LocAttMamba obtains the best or near-best performance in accuracy, robustness, and complexity simultaneously, making it well-suited to real-world deployment. As future work, graph-based fusion techniques can be considered as the spatial relationships among APs naturally admit a graph representation.

13

TABLE V S UMMARY OF THE VARIOUS P ERFORMANCE C RITERIA . Category

Criterion

5G Best

UWB Best

LocAttMamba Position

Accuracy

Mean error Median error Tail error (P90)

LocAttMamba (1.00 m) Sec5GLoc (0.83 m) LocAttMamba (1.84 m)

LocAttMamba (0.60 m) L-SwiGLU-T (0.49 m) LocAttMamba (1.03 m)

Best on both 2nd on both Best on both

Robustness

Multiple APs Distorted (SNR = 5 dB) Single AP Distorted (Moderate Noise) Single AP Distorted (Extreme Noise)

LocAttMamba (5/6 cols) LocAttMamba LocAttMamba

LocAttMamba LocAttMamba L-SwiGLU-T

Best except 5G/5-AP Best on both Best on 5G, 3rd on UWB

Complexity

Multiply-Acc. / sample Inference latency

LocAttMamba (0.45M) Bi-LSTM

LocAttMamba (0.95M) Bi-LSTM

Best on both 3rd; 4.4–16× faster than transformers

ACKNOWLEDGMENTS This work has been supported by Canada Research Chairs program and NSERC Discovery grant. R EFERENCES [1] H. Lee et al., “Towards 6G hyper-connectivity: Vision, challenges, and key enabling technologies,” J. Commun. Netw, vol. 25, no. 3, pp. 344– 354, 2023. [2] Y. Li et al., “Physical artificial intelligence (PAI): The next-generation artificial intelligence,” Front. Inf. Technol. Electron. Eng., vol. 24, no. 8, pp. 1231–1238, 2023. [3] O. Kerdjidj et al., “Uncovering the potential of indoor localization: Role of deep and transfer learning,” IEEE Access, vol. 12, pp. 73 980–74 010, 2024. [4] A. Vaswani et al., “Attention is all you need,” in Adv. Neural Inf. Process. Syst. (NeurIPS), 2017, pp. 5998–6008. [5] S. Khan et al., “Transformers in vision: A survey,” ACM Comput. Surv., vol. 54, no. 10S, 2022. [6] P. Huang et al., “Attacking and defending deep-learning-based off-device wireless positioning systems,” IEEE Trans. Wireless Commun., vol. 23, no. 8, pp. 8883–8895, 2024. [7] D. Gufran et al., “SENTINEL: Securing indoor localization against adversarial attacks with capsule neural networks,” IEEE Trans. Comput.Aided Design Integr. Circuits Syst., vol. 43, no. 11, pp. 4021–4032, 2024. [8] A. Foliadis, M. H. C. Garcia, R. A. Stirling-Gallacher, and R. S. Thomä, “Reliable deep learning based localization with CSI fingerprints and multiple base stations,” in Proc. IEEE Int. Conf. Commun. (ICC), 2022, pp. 3214–3219. [9] H.-M. Won et al., “Localization meets uncertainty: Uncertainty-aware multi-modal localization,” Technologies, vol. 13, no. 9, 2025. [10] A. Gu and T. Dao, “Mamba: Linear-time sequence modeling with selective state spaces,” arXiv preprint arXiv:2312.00752, 2023. [11] M. A. Habib et al., “Generative AI for intent-driven network management in 6G RAN: A case study on the Mamba model,” IEEE Wireless Commun., pp. 1–8, 2026. [12] ——, “Hierarchical decision Mamba meets Agentic AI: A novel approach for RAN slicing in 6G,” pp. 120–124, 2026. [13] A. Mehrabian and V. W. Wong, “A-Gamba: An adaptive graph-mamba model for traffic prediction in wireless cellular networks,” IEEE Wireless Commun. Lett., vol. 14, no. 6, pp. 1801–1805, 2025. [14] M. Ilse et al., “Attention-based deep multiple instance learning,” in Int. Conf. Mach. Learn. (ICML), 2018, pp. 2127–2136. [15] F. Zafari, A. Gkelias, and K. K. Leung, “A survey of indoor localization systems and technologies,” IEEE Commun. Surveys Tuts., vol. 21, no. 3, pp. 2568–2599, 2019. [16] I. Guvenc and C.-C. Chong, “A survey on TOA based wireless localization and NLOS mitigation techniques,” IEEE Commun. Surveys Tuts., vol. 11, no. 3, pp. 107–124, 2009. [17] C.-H. Hsieh et al., “Deep learning-based indoor localization using received signal strength and channel state information,” IEEE Access, vol. 7, pp. 33 256–33 267, 2019. [18] L. Li et al., “D²-MLoc: Dual-domain MLP-Mixer framework for CSIfingerprinting indoor localization,” IEEE Trans. Cogn. Commun. Netw., vol. 11, no. 5, pp. 3276–3291, 2025. [19] M. Zardkoohi et al., “Indoor localization using smartphone magnetic sensor data: A bi-lstm neural network approach,” IEEE Access, vol. 13, pp. 165 795–165 809, 2025.

[20] H. Arslantas and S. Okdem, “Indoor localization with an autoencoderbased convolutional neural network,” IEEE Access, vol. 12, pp. 46 059– 46 066, 2024. [21] I. Alla and V. Loscri, “Sec5GLoc: Securing 5G indoor localization via adversary-resilient deep learning architecture,” in 2025 IEEE Conf. Commun. Netw. Secur. (CNS), 2025, pp. 1–9. [22] S. Masrur et al., “Transforming indoor localization: Advanced transformer architecture for NLOS dominated wireless environments with distributed sensors,” IEEE Trans. Mach. Learn. Commun. Netw., vol. 4, pp. 161–177, 2026. [23] X. Xu et al., “Swin-Loc: Transformer-based CSI fingerprinting indoor localization with MIMO ISAC system,” IEEE Trans. Veh. Technol., vol. 73, no. 8, pp. 11 664–11 679, 2024. [24] M. Bahnassy et al., “MambaLoc: Lightweight indoor localization for unmanned vehicles using cross-modal knowledge distillation,” in Proc. 33rd ACM Int. Conf. Adv. Geogr. Inf. Syst., 2025, p. 1288–1289. [25] T. Suwannaphong, F. Jovan, I. Craddock, and R. McConville, “Optimising TinyML with quantization and distillation of transformer and Mamba models for indoor localisation on edge devices,” Sci. Rep., vol. 15, p. 10081, 2025. [26] T.-M. Nguyen, Y. Yang, T.-D. Nguyen, S. Yuan, and L. Xie, “ULOC: Learning to localize in complex large-scale environments with ultrawideband ranges,” in Proc. IEEE Int. Conf. Robot. Autom. (ICRA), 2025. [27] W. Yang, X. Zhou, J. Guan, H. Du, and T. Bai, “GRAM-MAMBA: Holistic feature alignment for wireless perception with adaptive lowrank compensation,” 2025, arXiv preprint arXiv:2507.13803. [28] A. Gu et al., “Combining recurrent, convolutional, and continuous-time models with linear state space layers,” in Proc. Adv. Neural Inf. Process. Syst. (NeurIPS), vol. 34, 2021, pp. 572–585. [29] M. Seitzer et al., “On the pitfalls of heteroscedastic uncertainty estimation with probabilistic neural networks,” in Int. Conf. Learn. Represent. (ICLR), 2022. [30] C. Guo et al., “On calibration of modern neural networks,” in Int. Conf. Mach. Learn. (ICML), 2017, pp. 1321–1330. [31] Fraunhofer Institute for Integrated Circuits IIS, “Fingerprinting dataset for positioning,” https://www.iis.fraunhofer.de/en/ff/lv/dataanalytics/pos/ fingerprinting-dataset-for-positioning.html, 2024. [32] I. Loshchilov and F. Hutter, “Decoupled weight decay regularization,” in Int. Conf. Learn. Represent. (ICLR), 2019. [33] A. Mehrabian et al., “Mamba meets financial markets: A graph-mamba approach for stock price prediction,” in Proc. IEEE Int. Conf. Acoust., Speech Signal Process. (ICASSP), 2025, pp. 1–5.

Related documents

Record · ID 1194364 · SHA-256 1686e909d7fc0779
Retrieved via Conceptio: every document is proof-bundled with source, license, and retrieval metadata.
Bring this data into your agent: Connect via MCP or API · 20 free credits to start · no card required
Read the Docs → · View CLI source on GitHub · Conceptio Open Knowledge Archive