Detection of Rogue RF Transmitters Using Generative Adversarial Nets
Detection of Rogue RF Transmitters Using Generative Adversarial Nets
Abstract—Understanding and analyzing the radio frequency jeopardize the utility of the sensor network. Existence of such
(RF) environment have become indispensable for various au- threats underscore the need for techniques that recognize and
tonomous wireless deployments. To this end, machine learning authenticate transmitter identity irrespective of the network
techniques have become popular as they can learn, analyze and
even predict the RF signals and associated parameters that char- protocols and the communication technologies being used.
acterize a RF environment. However, classical machine learning However, correctly identifying a transmitter and being able
methods have their limitations and there are situations where to characterize it in real time remains a challenging problem.
such methods become ineffective. One such setting is where active Use of secure mechanisms to authenticate RF transmitters
adversaries are present and try to disrupt the RF environment has been a common way to identify malicious transmitters.
through malicious activities like jamming or spoofing. In this
paper we propose an adversarial learning technique for identifying However, implementation of such secure mechanisms adds to
rogue RF transmitters and classifying trusted ones by designing the computation and communication overhead for real time
and implementing generative adversarial nets (GAN). The GAN systems such as connected autonomous vehicles. Recent devel-
exploits the in-phase (I) and quadrature imbalance (i.e., the opments in radio frequency machine learning (RFML) systems
IQ imbalance) present in all transmitters to learn the unique have given rise to the possibility of using these methods for
high dimensional features that can be used as “fingerprints”
for identifying and classifying the transmitters. We implement automated real time authentication of RF transmitters. These
a generative model that learns the sample space of the IQ values methods can also be used in adversarial settings for tasks such
of the known transmitters and use the learned representation to as the identification of malicious transmitters by through the
generate fake signals that imitate the transmissions of the known use of learning powered transmitter forensics [2].
transmitters. We program 8 universal software radio peripheral Unlike the image or speech processing domain, where
(USRP) software defined radios as trusted transmitters and
collect over-the-air raw IQ data from them using a RTL-SDR in a machine learning techniques have been widely successful,
laboratory setting. We also implement a discriminator model and learning in the RF domain is just beginning to see some
show that the discriminator is able to discriminate between the breakthroughs. For processing images, spatial correlations and
trusted transmitters from fake ones with 99.9% accuracy. Finally, knowledge of previously observed objects make future predic-
the trusted transmitters are classified using convolutional neural tions possible. Similarly, in speech recognition recognizable
network (CNN) and fully connected deep neural networks (DNN).
Results reveal that the CNN and DNN are able to correctly patterns emerge from known sequences that can be used to
discriminate between the 8 trusted transmitters with 81.6% and synthesize phrases and words. In essence such techniques are
96.6% accuracies respectively. built on prior distributions and patterns that make general-
Keywords: RF fingerprinting, GAN, machine learning, izations possible. However, such techniques cannot be easily
deep neural network, IQ imbalance, USRP, confusion matrix. extended to the RF domain because of the unpredictable and
varied nature of the RF signals. To make matters worse, the
I. I NTRODUCTION presence of adversaries make it even more difficult to learn
Localization, identification, and characterization of radio and characterize RF signals. For one smart adversaries can
frequency (RF) signal sources (aka RF transmitters) are in- spoof transmitters and introduce noise in the transmission
dispensable for applications such as locating a cell phone, channels making it harder to learn unique characteristics of
identifying a jammer, detecting the presence or absence of a the transmitters, in essence manipulating the learning phase
signal, tracking objects, etc. Localization of a RF transmitter to render the detection model ineffective. Thus, application of
is a well studied problem where the received power at a RFML systems for RF synthesis and recognition has become
receiver is utilized to estimate the distance to the trans- an interesting and open research area.
mitter, given some known transmitters and path-loss models For machine learning techniques to be effective, one must
(see [1] and the references therein). With more and more choose an attribute or feature that is unique to a transmitter,
autonomous deployments of wireless networks, identification irrespective of the signals it transmits. One such commonly
of transmitters has also become important. For example, a used feature is the rise time signature that is generated by slight
wireless sensor network relies on trustworthy signals; how- variations of the component values during the manufacturing
ever, malicious transmitters can contaminate the signals and process. Though the rise time signature has mostly been used
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on February 20,2024 at 08:29:21 UTC from IEEE Xplore. Restrictions apply.
978-1-5386-7646-2/19/$31.00 ©2019 IEEE
2019 IEEE Wireless Communications and Networking Conference (WCNC)
for signal intelligence and by regulatory agencies, it performs lation between the complex-valued IQ data constellations.
poorly in the presence of malicious entities. Moreover, the rise We design another deep neural network to improve the
time signature is commercially unavailable , hence cannot be accuracy of the CNN.
used as a standard signature. ‘IQ imbalance’ is another feature • Our models have been validated on a laboratory test
that is affected at the time of manufacturing due to the use of bed consisting of several universal software radio periph-
noisy mixers, oscillators and unbalanced low pass filters [3]. eral (USRP) B210s [6] and one RTL-SDR receiver [7].
This is the imbalance between the in-phase (I) and quadrature The USRPs transmitted signals on a particular frequency
(Q) components of a signal which is the result of interaction which were received by the RTL-SDR. The collected
of the radio frequency with the local oscillator frequency dataset had 1024 complex IQ samples per timestamp,
which is required to get the intermediate frequency. Though generating 2048 features. The generative and discrimi-
there are techniques to compensate for this imbalance [4], native models were trained and tested on the collected
the fact remains that all transceivers exhibit this unique IQ dataset. The unique pattern of variation of the IQ im-
imbalance. The IQ imbalance depends on the choice of the balances for each radio is captured as features by the
hardware components used, and is an unwanted byproduct of multiple layers of the neural network.
the manufacturing process that is hard to imitate. This imbal- • The novelty of the proposed work lies in accurately
ance can be used as a basis for feature engineering (automated modeling and implementing the proposed generative and
or otherwise) for transmitter identification and recognition. discriminative models on real hardware using raw IQ
However, this fact is also known by the adversaries. Thus, data. To the best of our knowledge, this is the first paper
their target would be to learn and estimate the probability that uses GANs to identify adversarial RF signals and for
distribution of the training data used for model creation, given fingerprinting radio transmitters.
a particular sample space. The adversaries can use a generative Next we describe the current and previous work in machine
model to generate fake signals so as to spoof the transmission learning based transmitter identification.
of known transmitters. Generative Adversarial Nets (GAN) [5]
uses a generative model which enables the realistic generation II. BACKGROUND AND R ELATED W ORK
of samples from a given distribution which can then be used to During the process of designing and manufacturing cheap
train a discriminator for identifying real samples drawn from radio hardware certain imperfections have become the norm.
fake ones obtained from the generator. The IQ imbalance is one such imperfection that is unique to
In this paper, we use generative adversarial nets (GAN) different radio hardware and are caused by imperfections in
to detect rogue transmitters. Unlike most machine learning local oscillators and mixers. As a result of this, the in-phase (I)
techniques, GAN has been designed to learn in adversarial and quadrature (Q) components of the modulator are not or-
situations. We propose and implement a generative model and thogonal. When a signal is transmitted using a particular radio
a discriminative model to (i) detect unknown and/or rogue transmitter, some IQ imbalance is imposed over the complex-
transmitters and (ii) classify the known transmitters. We lever- valued IQ data during transmission [8] as shown in Fig. 1.
age the fact that the IQ imbalance for every radio transmitter is IQ imbalance leads to performance degradation for higher
unique and could be exploited by the GAN to generate unique order modulations because the symbol rotation becomes more
features or fingerprints. The main contributions of this paper sensitive with increasing number of constellations towards I
are: and Q branches [9].
Quadrature
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on February 20,2024 at 08:29:21 UTC from IEEE Xplore. Restrictions apply.
2019 IEEE Wireless Communications and Networking Conference (WCNC)
Noise
using convolutional autoencoders which can eventually learn Adversarial (I/Q Generator)
n(t)
Feedback
Modulation Schemes m(t)
g(t)
to recognize different digital modulation schemes. They also Generator
s(t)
G
proposed a method to evaluate the quantitative metrics on Signal Amplitude r(t)
reconstructed data to recognize the schemes. Another study for
modulation classification using raw IQ samples was presented Signal Phase l(t)
Trusted?
The authors proposed a recurrent neural network model using I/Q Data Feature GAN
(Through SDR) Extractor Implementation
long short term memory (LSTM) cell, yielding 90% accuracy
for synthetic dataset [14]. Fig. 2. Proposed GAN architecture
An in-depth study on the performance of deep learning
based radio signal classification was proposed in [15]. The
authors considered 24 modulation schemes with a rigorous G. The proposed GAN architecture is shown in Fig. 2. G and
baseline method that uses higher order moments and strong D are the generative and discriminative models respectively.
boosted gradient tree classification for detection. The authors The adversary generates random modulation scheme (m(t)),
also applied their method on real over-the-air data collected signal amplitude (r(t)), and phase (l(t)) and mixes additive
by Software Defined Radios (SDRs). An approach based on white Gaussian noise (n(t)) with that. The generated signal
the concept of adversary was proposed in [2] for synthesizing (g(t)) which is initially random in nature improves over time
new physical layer modulation and coding schemes. The as the generator learns from the discriminator and improves
adversarial approach is targeted to learn the channel response on its accuracy to imitate real data. On the other hand, the
approximations in any arbitrary communication system, en- discriminator (D) gets input from both the generator (G) and
abling the design of a smarter channel autoencoder. All these Trusted transmitters. This helps it to learn to differentiate
proposed approaches demonstrate how difficult it is to make between real and fake inputs. The known transmitter data is
machine learning techniques effective in the RF domain. collected and fed to the discriminator (D) as raw IQ values.
Motivated by the above mentioned works, we focus on Overall, the target is to train G in such a way that will
transmitter identification in the presence of adversaries. The maximize the probability of D making a mistake. G tunes its
idea of training discriminative models via an adversarial hyper parameters with the feedback from D. We argue, GAN
process was first proposed by Goodfellow [5]. Since then, is an efficient way to generate correlated data samples and
generative adversarial nets (GAN) have been adopted for var- thereby approach an accurate generative model– something
ious fields and applications, particularly for image processing the rogue transmitters aim to achieve. Once the model is
where GANs have proved their efficacy [16]–[18]. trained, the generated signals are synthesized to mimic rogue
transmitters based on the sample space of IQ signal data from
III. P ROPOSED GAN FOR RF F INGERPRINTING the known transmitters.
Recent advances in neural networks have made it possible to
obtain robust models with low generalization errors by training B. The Generative Model
“deep” neural architectures efficiently. The “depth” signifies As far as the generator is concerned, the overall problem can
the number of iterative operations performed on the input data be treated as an N -class decision problem where the input is a
using each layer’s transfer function and deeper architectures complex base-band time series representation of the received
allow the network to learn robust feature representations signal. That is, the dataset is the in-phase and quadrature
from the input data. Though such techniques demand higher components of a radio signal obtained at discrete time periods
computation and involve complicated layer-by-layer backprop- through analog to digital conversion with a carrier frequency
agation, nevertheless, most deep learning systems are able to to obtain a 1 × N complex valued vector. Classically, this is
perform training on deep networks using some variation of written as:
gradient decent with adaptive learning rates (e.g., Adam [19]),
regularization to avoid overfitting (e.g., Dropout [20]) and s(t) = c1 m(t) + c2 r(t) + c3 l(t) (1)
the use of backpropagation. Our intention is to design neural where s(t) is a continuous time series signal modulated onto
network models that can train in the presence of adversaries a sinusoid with either varying frequency, phase, amplitude,
and discriminate between fake and known transmitters through trajectory, or some permutation of multiple parameters. Here,
automatic fingerprinting. m(t), r(t), and l(t) are the time series continuous signals
A. Proposed GAN Architecture for modulation, amplitude, and phase respectively, selected
randomly by the generator. The coefficients c1 , c2 , and c3 are
The GAN framework has two primary models, a generative some path loss or constant gain terms associated with m(t),
model (G) that generates fake data from a given data distribu- r(t), and l(t) respectively. The output g(t) is obtained as:
tion, and a discriminative model (D) that estimates the prob-
ability that a sample came from the training data rather than g(t) = s(t) + n(t) (2)
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on February 20,2024 at 08:29:21 UTC from IEEE Xplore. Restrictions apply.
2019 IEEE Wireless Communications and Networking Conference (WCNC)
presented in Fig. 4. For the receiver, we used a RTL-SDR [7] Fig. 5. A Simplified View of GAN Implementation
which captured over-the-air raw IQ data and stored them on
file.
B. Machine Learning Libraries
Signal Processing and Data Collection
There are several libraries and tools that implement deep
learning frameworks with support of immensely concurrent
Random QPSK Dataset
Signal Mod Transmitters Receiver
Generation
Data GPU architecture that reduce the burden of programming the
USRP RTL-SDR (#samples, traditional routines for training of larger neural networks. We
GNURadio rtlsdr
B210 2*sample size)
Python
Library
use Keras [22] as the frontend and Tensorflow [23] as the
backend. Keras is an overlay on neural network primitives with
Fig. 3. Signal Generation and Data Collection Technique Tensorflow [23] or Theano [24] that provides a customizable
interface for quick deployment of complex neural networks.
We collected the IQ signal data with a sample size of 1024. We also use Numpy, Scipy, and Matplotlib Python libraries.
Each data sample had 2048 entities consisting of the I and Q
values for the 1024 samples. A larger sample size would mean C. Experimental Setup and Performance Metrics
more training examples for the neural network. The choice of We conducted the experiments on a Ryzen 8 Core system
1024 samples was sufficient to capture the unique pattern of having 64 GB RAM and a GTX 1080 Ti GPU unit having 11
IQ imbalances and at the same time it was not computationally GB memory. We focused on three main aspects:
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on February 20,2024 at 08:29:21 UTC from IEEE Xplore. Restrictions apply.
2019 IEEE Wireless Communications and Networking Conference (WCNC)
Generated Data
[0,1] OR [1,0]
Dense tanh
Dense tanh
Dense tanh
Dense tanh
Random
Output
Fake
Dense
Input
Noise Data OR Dropout= 0.5 Dropout= 0.5
Trusted
Softmax
Data
(None, 100) 2
(None, 2)
(None, 1024) (None, 512)
(None, 512) (None, 1024) (#samples, (None, 2048)
2*sample size)
Signal Processing and
Data Collection
V. GAN I MPLEMENTATION is able to detect the Fake transmitters with about 99.9%
accuracy, as shown in the confusion matrix in Fig. 7. Note
For implementing the GAN, we use the over-the-air data that one epoch consists of a forward and a backward pass
collected from the trusted transmitters. The generator (G) gen- through the designed model over the entire dataset. It is clear
erates fake data from the same sample space to impersonate as from the confusion matrix that the number of false negatives
a transmitter. Trusted and fake data are fed to the discriminator and false positives are very low and well within acceptable
(D) with an equal and unbiased probability. We design the range [25]. Once the GAN is trained, it will be able to detect
discriminator and generator separately, as shown in Fig. 5. rogue transmitters from over-the-air reception of raw IQ data.
The generator starts with randomly generating data within
the sample space [-1,1]. Two dense layers of size 512 and A. CNN Implementation
1024 are applied with tanh activation function. Then one dense The main motivation for implementing a convolution neural
layer of 2× sample size (2048 in this case) is invoked with network was to capture the correlation between IQ values of
the sigmoid activation function. G continues to learn the data samples. The CNN has three Conv2D layers of 1024, 512 and
distribution (pg ) and generating fake samples of size 2048 256 filters, a Flatten operation, and three fully connected (FC)
within the signal IQ values sample space. D consists of one layers of 512, 256 and 8 nodes as shwon in Fig. 8. We use
input layer of 2048 nodes, two hidden layers of 1024 and Dropout [20] of 0.25 and 0.5 after each conv2D and dense
512 nodes respectively, and finally a softmax output layer of layer respectively. We use kernel size of (2,3) and stride of
2 nodes to classify an input as either Fake or Trusted. We (2,2) at each Conv2D layer. We also apply a pooling layer
use tanh as activation function at the hidden layer and added MaxPooling2D after each Conv2D layer with pool size of
Dropout [20] of 0.5 in between those layers for regularization. (2,2) and stride of (2,2). We use ReLU [26] activation for all
The overall GAN implementation is shown in Fig. 6. convolution and fully connected layers, other than the softmax
We train both the generator and discriminator through itera- layer of the output nodes.
tive sequential learning to strengthen the generative model over We obtain 89.07% and 81.6% accuracy for 4 and 8 transmit-
time. We use categorical cross-entropy training on Adam [19] ter classification respectively using the aforementioned CNN.
optimizer for gradient based optimization. We notice that the The low accuracies are due to the poor correlation among sam-
discriminator was able to detect the fake transmitters with 50% ples from the same radio. The accuracy plots and confusion
accuracy before the adversarial training. After several epochs matrices for both the cases are shown in Figs. 9 and 10. Both
(< 50) of adversarial training, the optimal discriminator (D∗ ) training and validation accuracy increase with the number of
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on February 20,2024 at 08:29:21 UTC from IEEE Xplore. Restrictions apply.
2019 IEEE Wireless Communications and Networking Conference (WCNC)
Conv Layer 1
Conv Layer 2
Conv Layer 3
Dense tanh
Dense tanh
Output
Input
Signal Processing
Data
Input
Output
Dense
FC
FC
FC
and Flatten Signal Processing Data Dropout= 0.5 Dropout= 0.5
Data Collection and
Data Collection
512 256 8 8
(None, 1024, 2) Softmax 8
1024 512 256 (None, 8)
(None, 1024) (None, 512)
(None, 2048)
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on February 20,2024 at 08:29:21 UTC from IEEE Xplore. Restrictions apply.
2019 IEEE Wireless Communications and Networking Conference (WCNC)
Authorized licensed use limited to: NATIONAL INSTITUTE OF TECHNOLOGY ROURKELA. Downloaded on February 20,2024 at 08:29:21 UTC from IEEE Xplore. Restrictions apply.