Unsupervised Contrastive Learning for Robust RF Device Fingerprinting Under Time-Domain Shift

Jun Chen, Weng-Keen Wong, Bechir Hamdaoui

Abstract

Radio Frequency (RF) device fingerprinting identifies wireless devices through unique hardware-induced signal characteristics. However, deep learning models for RF fingerprinting often suffer from performance degradation due to "domain shift" caused by environmental changes over time. This paper proposes a Contrastive-Based Domain Adaptation (CTL) framework that leverages unsupervised contrastive learning. By treating frames from the same transmission as positive pairs, the model learns domain-invariant features from unlabeled target data. Experimental results on real-world IoT device datasets show accuracy improvements of up to 27.8% over standard deep learning baselines, demonstrating significant robustness to time-domain shifts.

Introduction

RF device fingerprinting is a promising security technique for identifying IoT devices based on microscopic hardware imperfections. Despite the success of deep learning in this field, models are often fragile when deployed in dynamic environments. This "domain shift"—where signal distributions change due to factors like temperature, receiver movement, or interference—masks the device's hardware signature. Traditional domain adaptation methods often struggle with RF data complexity or rely on unstable adversarial training. This work addresses these challenges by introducing an unsupervised contrastive learning approach that extracts stable, hardware-specific features without requiring extensive manual labeling in the target domain.

Methodology

The proposed Contrastive-Based Domain Adaptation (CTL) framework utilizes a three-stage pipeline: pre-training, training, and testing.

Contrastive Learning Architecture

The core of the CTL framework is a MoCo V3-based architecture with a modified ResNet-18 backbone. During the unsupervised pre-training stage, the model processes unlabeled data from both the source and target domains. It learns a representation space by pulling together "positive pairs" (frames from the same transmission) and pushing apart "negative pairs" (frames from different transmissions). This allows the model to ignore environmental "noise" and focus on hardware "signatures."

The pre-training stage of the Contrastive Model, showing the base encoder, momentum encoder, and the contrastive loss calculation.

RF-Specific Data Augmentation

To enhance robustness, the framework employs two levels of data augmentation designed specifically for RF signals:

  • Weak Augmentation: Random scaling of signal amplitude.
  • Strong Augmentation: A combination of random "jittering" (adding noise) and "segmentation permutation" (shuffling signal intervals along the time axis).
Comparison of weak augmentation (scaling) and strong augmentation (permutation and jittering) applied to the original RF signal.

Training and Evaluation

Following pre-training, a classifier is attached to the learned encoder and trained using labeled data from the source domain. Finally, the model is evaluated on the target domain to test its generalization capabilities under domain shift.

Experimental Results

The framework was evaluated using a testbed of 15+ PyCom/IoT devices (Fipy and Lopy boards) transmitting IEEE 802.11b WiFi frames. Data was collected over multiple days to simulate time-domain shift, where "Day 1" served as the source domain and subsequent days as the target.

Key findings include:

  • Significant Accuracy Gains: The CTL model outperformed standard ResNet-18 (CNN) baselines by 10.8% to 27.8% across various scenarios. In wired scenarios, accuracy improved from ~50% to over 70%.
  • Importance of Target Data: Pre-training on unlabeled target data proved crucial. Models pre-trained only on source data performed significantly worse, highlighting the importance of exposing the model to the target domain's distribution—even without labels.
  • Robustness in Wireless Scenarios: Even in challenging wireless environments with multi-path fading, the CTL model maintained strong performance, often exceeding baselines by over 20 percentage points. Confusion matrices revealed that the approach specifically fixes "stubborn" misclassifications where standard CNNs were overconfident in incorrect predictions.

Conclusion

This paper demonstrates that unsupervised contrastive learning is a powerful tool for overcoming domain shift in RF device fingerprinting. By focusing on hardware-specific features that remain invariant across different transmissions and environments, the CTL framework provides a robust solution for real-world IoT security. Future work will explore the framework's performance in high-mobility environments and its scalability to larger device populations.

Summary updated

BibTeX
@inproceedings{chen2024unsupervised,
  author = {Jun Chen and Weng-Keen Wong and Bechir Hamdaoui},
  title = {{Unsupervised Contrastive Learning for Robust RF Device Fingerprinting Under Time-Domain Shift}},
  booktitle = {ICC},
  year = {2024},
}
Figure