arXiv:2610.06288cs.LGOct 2026

Manuscript Offprint

arXiv:2610.06288

Trajectory-Guided Tokenization of Complex CSI for Wi-Fi Sensing

Ziyi Wang, Kenuo Xu, Jichu Jiang, Yumeng Yang, Zheng Chen, Xiaofei Bai, Muge Chen, Xuyang Chen, Jinglei He, Jannik Hammel Nielsen, Stefan Schmid

ABSTRACT

Wi-Fi channel state information (CSI) enables contactless presence detection and gesture recognition. Its high-dimensional complex-valued time series require input representations that preserve informative temporal variations during compression. We propose Trajectory-Guided Tokenization (TGT), which combines complex trajectory decomposition with asymmetric attention to construct compact continuous tokens. For each antenna link and subcarrier, an orthonormal Helmert transform decomposes short, ordered temporal patches into local-center and centered-trajectory coordinates. Keys are learned from the centered-trajectory coordinates, while values retain both components. Learnable queries aggregate subcarriers into frequency slots, which are fused into temporal tokens. Trained jointly from scratch, TGT with TokenMLP achieves the highest mean accuracy of 92.83% among all evaluated frontend–backend combinations on the self-collected dataset. Experiments on EHUNAM and Widar further support the applicability of TGT to cross-domain presence detection and gesture recognition.

Index Terms— Wi-Fi sensing, CSI tokenization, complex trajectories, cross-domain generalization

1. INTRODUCTION

Wi-Fi sensing uses channel state information (CSI) to capture fine-grained variations in wireless propagation, enabling device-free recognition of human states and activities [1]. CSI describes complex-valued channel responses across subcarriers and antenna links, with successive measurements forming time series of amplitude and phase [2]. Human activity alters multipath propagation, inducing temporal variations in CSI [3] that deep neural networks learn to associate with human states and activities [1]. However, models trained under specific acquisition conditions may not generalize reliably to new environments, users, or device placements [4, 5, 6, 2]. As CSI reflects both the sensing target and propagation conditions, input representation is an important consideration for cross-domain generalization.

Existing CSI-based sensing methods such as SHARP [2] and SLNet [7] use motion-related representations derived from CSI, including Doppler traces and spectrograms, as inputs to convolutional networks. Other approaches instead encode CSI measurements directly. CSI-JEPA [8] encodes amplitude-based time-frequency patches but cannot distinguish CSI sequences that differ only in phase. In contrast, WiFi-JEPA [6] jointly embeds CSI amplitude and denoised phase while preserving time and antenna-link structure. However, its cross-environment generalization remains limited [6]. These approaches determine what information enters the model and how it is organized, but leave open which information should guide subcarrier weighting and which should be combined to form input representations. This motivates us to study CSI tokenization as a representation-learning problem: encoding complex observations into continuous feature vectors (i.e., tokens) to support diverse sensing tasks and improve generalization across environments.

To guide the weighting and combination of CSI observations, we view each subcarrier's short, ordered sequence of real and imaginary (I/Q) coordinates as a trajectory in the complex plane. Our central insight is that centered trajectories can guide subcarrier aggregation, while both local centers and centered trajectories are retained as the content to be aggregated. Similar temporal variations can occur around different local centers, which may vary across acquisition conditions. Using uncentered trajectories to determine subcarrier aggregation weights may therefore make these weights sensitive to shifts in local centers across environments. Removing these centers entirely, however, may discard useful context or slowly varying information. Related time-series methods also address the trade-off between removing statistical variation and preserving useful information: RevIN removes and restores instance statistics, while Non-stationary Transformers compensates for information lost through stationarization [9, 10].

We propose Trajectory-Guided Tokenization (TGT), a complex CSI tokenizer trained jointly with the downstream sensing model. TGT uses asymmetric cross-attention, with keys learned from centered trajectories and values retain-

∗^{*}Corresponding authors: Jannik Hammel Nielsen and Stefan Schmid.

Figure

Fig. 1. Overview of TGT, with dashed boxes corresponding to Sections 2.1–2.4. One antenna link is shown using P = 8 samples per patch; all links share the tokenizer.

ing both local complex means and trajectories. With TokenMLP, TGT achieves mean accuracies of 92.83% on the self-collected dataset and 90.44% on EHUNAM, supporting its applicability to cross-domain presence detection across datasets. Evaluation on Widar extends this evidence to a different sensing task, with TGT reaching 72.14% mean accuracy for cross-room gesture recognition with ResNet18.