TL;DR
This paper introduces Dywave, a novel dynamic tokenization framework for heterogeneous IoT sensing signals. Dywave aligns input tokens with intrinsic temporal structures and physical events, leading to more compact and semantically rich representations. This approach significantly improves accuracy and efficiency for downstream tasks like human activity recognition, outperforming existing methods by up to 12% in accuracy and reducing token lengths by up to 75%.
What Problem Does This Paper Address?
Internet of Things (IoT) devices generate a constant stream of diverse, non-stationary, and multi-scale sensing signals. These signals are crucial for intelligent applications like activity recognition and environmental monitoring. However, standard "tokenization" methods, which break down continuous signals into discrete units for machine learning models, struggle with the inherent complexity of these signals. Existing approaches often use fixed-size windows, which are content-agnostic and misaligned with the actual physical events or semantic boundaries within the data. This leads to fragmented information, inefficient computation (allocating equal resources to redundant and informative parts), and a need for extensive, application-specific tuning. Dywave aims to bridge this "tokenization gap" by creating dynamic, event-aligned tokens that better capture the underlying signal dynamics.
Methods
Dywave employs a five-stage pipeline:
- Wavelet Decomposition: It uses the Maximal Overlap Discrete Wavelet Transform (MODWT) to decompose the raw signal into multi-resolution components, capturing both high-frequency transients and low-frequency trends while preserving temporal alignment.
- Hierarchical Embedding Extraction: The decomposed signals are split into "detail" (high-frequency) and "context" (low-frequency) streams. These streams are processed by specialized lightweight encoders (convolutional for detail, transformer for context) and then fused into a unified, per-timestep embedding.
- Temporal Anchor Formation: Dywave estimates "saliency" at each timestep by measuring representational dissimilarity between adjacent embeddings. This saliency score indicates where temporal resolution is most warranted. Temporal non-maximum suppression (NMS) and top-k selection are then used to identify "anchors" at semantic transitions, forming compact sets of important time points.
- Dynamic Temporal Fusion: Timesteps are grouped around these anchors. Within each group, embeddings are aggregated using saliency-weighted pooling, emphasizing informative transitions and down-weighting redundant intervals. This creates event-aligned tokens whose length adapts to the signal's semantic complexity.
- Reconstruction Loss (Training Only): A lightweight decoder reconstructs wavelet coefficients from the fused embeddings. This auxiliary loss acts as a regularizer, ensuring that the compressed tokens retain multi-scale signal structure and preventing information loss.
Datasets
Dywave was evaluated on five real-world IoT sensing datasets:
- Ego4D: Large-scale egocentric dataset with IMU recordings for complex activities. Used for both short and long-context evaluation, and cross-sequence generalization.
- Moving Object Detection (MOD): Seismic and acoustic signals for object classification. Used for short-context evaluation and cross-domain generalization (with an out-of-distribution subset).
- Physical Activity Monitoring (PAMAP2): IMU data for human activity recognition. Used for short-context evaluation across modalities.
- Real World Human Activity Recognition (RWHAR): IMU data for human activity recognition. Used for short-context evaluation.
- Wearable Stress and Affect Detection (WESAD): Multimodal physiological dataset (ECG, EMG, etc.) for stress and affect recognition. Used for short-context evaluation.
Key Insights and Ideas
- The "Tokenization Gap" in IoT: The paper clearly articulates that raw sensor signals lack the intuitive, discrete semantic units found in text or images, creating a fundamental challenge for standard tokenization.
- Physics-Informed Tokenization: By leveraging wavelet decomposition and focusing on signal dynamics, Dywave grounds its tokenization in the physical processes generating the data, rather than arbitrary temporal splits.
- Adaptive Granularity is Key: The core insight is that optimal tokenization isn't fixed but must adapt to the signal's temporal density and semantic importance. Dywave's dynamic approach achieves this by identifying "saliency" and forming anchors at event boundaries.
- Compression without Information Loss: The reconstruction loss is crucial for ensuring that the adaptive compression doesn't discard essential multi-scale signal characteristics, leading to better downstream performance.
- Robustness to Noise and Domain Shifts: Dywave's event-aligned approach makes it inherently more robust to noise and better at generalizing across different domains and sequence lengths compared to fixed-patch methods.
Key Results
- Accuracy Gains: Dywave outperforms state-of-the-art methods by up to 12% in accuracy across various datasets and tasks (e.g., Human Activity Recognition, Stress Assessment).
- Computational Efficiency: Dywave reduces input token lengths by up to 75%, leading to significantly improved computational efficiency and lower latency, especially for long sequences.
- Reduced Hyperparameter Tuning: Unlike fixed-patch methods that require extensive tuning of patch size and stride, Dywave's adaptive approach is more stable and requires less per-domain tuning.
- Improved Robustness: Dywave shows superior performance under noisy conditions and better generalization capabilities when fine-tuning with limited data or transferring across domains/sequence lengths.
- Fine-grained Micro-Activity Decomposition: Dywave can automatically identify and segment subtle, short-duration "micro-activities" within complex human actions, providing a richer understanding of behavior.
Limitations and Future Work
- Computational Overhead: While Dywave reduces backbone computation, its preprocessing steps (wavelet decomposition, hierarchical embedding) introduce some overhead, which might be a concern for ultra-low-power edge devices. Future work could explore alternative techniques to reduce this preprocessing cost.
- Explicit Temporal Information: Dywave implicitly captures temporal dynamics through its embeddings but doesn't explicitly encode absolute elapsed time. Future work could explore explicit modeling of physical time to improve synchronization and interpretability.
- Wavelet Basis Choice: The choice of wavelet basis can influence anchor selection. While the default basis shows robustness, future research could explore learnable wavelet modules for adaptive basis selection.
- Multimodal Interaction: Dywave currently focuses on unimodal signals. Extending it to explicitly model cross-modal interactions and temporal synchronization in multimodal settings is a promising direction.
- Task-Specific Supervision: The current framework relies on task-labeled data for supervision. Future work could explore self-supervised training to learn tokenization boundaries without task-specific annotations, enabling domain-agnostic adaptation.
- Extension to Other Tasks: Dywave is currently designed for classification. Extending its dynamic tokenization to tasks like time-series forecasting and anomaly detection is a potential future direction.
Summary updated