Semi-Supervised Learning with GANs for Device-Free Fingerprinting Indoor Localization

Device-free wireless indoor localization is a key enabling technology for the Internet of Things (IoT). Fingerprint-based indoor localization techniques are a commonly used solution. This paper proposes a semi-supervised, generative adversarial network (GAN)-based device-free fingerprinting indoor localization system. The proposed system uses a small amount of labeled data and a large amount of unlabeled data (i.e., semi-supervised), thus considerably reducing the expensive data labeling effort. Experimental results show that, as compared to the state-of-the-art supervised scheme, the proposed semi-supervised system achieves comparable performance with equal, sufficient amount of labeled data, and significantly superior performance with equal, highly limited amount of labeled data. Besides, the proposed semi-supervised system retains its performance over a broad range of the amount of labeled data. The interactions between the generator, discriminator, and classifier models of the proposed GAN-based system are visually examined and discussed. A mathematical description of the proposed system is also presented.


I. INTRODUCTION
Many current and future Internet of Things (IoT) applications, such as smart homes, assisted living, and elderly monitoring, are enabled or facilitated by indoor location information [1], [2]. To this end, fingerprint-based wireless indoor localization approaches are widely used, which involve an offline site survey phase ("fingerprinting the venue") and an online localization phase. A reliable fingerprinting localization system that can extract and exploit the core features of the wireless signals, which are subject to environmental variations, is essential. Deep learning-based approaches to wireless indoor localization have been introduced [3]- [6]. In [3], a deep neural network (DNN) model for indoor localization was proposed and a visualization framework was developed to interpret the workings of the DNN. In [4], a deep learning framework with a greedy learning algorithm was proposed. In [5], a deep convolutional neural network (DCNN) model was proposed, where the measured wireless data were transformed into the image form. In [6], different deep learning models and different wireless measurements for indoor localization were compared.
The aforementioned deep learning-based solutions are based on supervised learning, i.e., only labeled data collected in the site survey are used to train the fingerprinting localization This work was supported in part by the Ministry of Science and Technology, Taiwan, under Grants MOST 106-2628-E-001-001-MY3 and MOST 109-2221-E-001-013- MY3. system. However, data labeling is labor-intensive and timeconsuming, and thus it is practically useful to utilize unlabeled data which can be collected continuously in an indoor environment with low cost. Indoor localization systems based on semi-supervised learning, which use a small amount of labeled data and a large amount of unlabeled data for training, have been proposed [7]- [12]. In [7], a manifold learning technique for building accurate fingerprints from partially labeled data was proposed. In [8], a semi-supervised deep extreme learning machine (SDELM), exploiting semi-supervised learning, deep learning, and extreme learning machine (ELM), was developed. In [9], a semi-supervised learning framework with two training phases was proposed. In [10], a generative model was used to expand the training dataset with few labeled training data. In [11], graph-based semi-supervised learning was proposed to reduce the data collection time for indoor localization. In [12], a manifold alignment approach to reduce the overall fingerprint calibration effort was developed.
The generative adversarial network (GAN) [13] is a machine learning framework composed of two competing and mutually enhancing neural networks, i.e., a generator and a discriminator. A deep convolutional neural network-based architecture was introduced into GAN [14], termed deep convolutional generative adversarial network (DCGAN), which greatly improves the quality of the generated artificial data. In [15], a new discriminator model that serves dual purposes was proposed, i.e., simultaneously acting as a traditional discriminator (real/fake binary classification) and a classifier (multiclass classification on a given dataset). Inspired by these studies, in this work, we propose a DCGAN-based semi-supervised devicefree fingerprinting indoor localization system. In our system, the measured wireless channel state information (CSI) data are used directly, instead of being transformed into an image form as in [5], [10], to avoid possible redundant dimensions (redundant image pixels) resulted from the transformation. The main contributions of this paper are summarized as follows:  significantly improved performance over the supervised classifier when only a small amount of labeled data is available. The proposed model exploits the unlabeled data that can be collected continuously over time without human intervention or effort. • Interpretation and discussion: The interactions between the generator, discriminator, and classifier of the proposed semi-supervised DCGAN model are discussed and visually examined.
The rest of the paper is organized as follows. Section II introduces the proposed semi-supervised learning scheme for fingerprinting indoor localization. Section III presents experimental results and discussion. Section IV concludes the paper.

II. SEMI-SUPERVISED LEARNING FOR DEVICE-FREE FINGERPRINTING INDOOR LOCALIZATION
We consider a 2D wireless indoor localization problem. We consider the fingerprinting approach and a device-free system (i.e., no tracking device is attached to the target to be positioned). Ambient or purpose-built wireless mediums could be used. The device-free fingerprinting indoor localization is modeled as a classification problem. The objective is to identify the location of a target, among M target locations, by matching the online testing data with the offline database ("fingerprints"). Machine learning-based approaches are adopted for performing the matching.
The architecture of the proposed semi-supervised DCGAN model for fingerprinting indoor localization is depicted in Fig. 1. The DCGAN is composed of a Generator model G and a Discriminator model D. The training of DCGAN involves a two-step iterative process: training D and training G. In training D, the fake samples generated by G are mixed with the real samples (usually the proportion is 1 : 1) as the input for D. D is trained together with a Classifier model C as a dual separate model with shared weights [16]. Specifically, D is iteratively trained to perform two tasks: predict the class of the real labeled samples, and distinguish the fake samples from the real unlabeled samples. After D is trained, G is subsequently trained to generate improved fake samples. The overall training of DCGAN involves solving a minimax optimization with a properly defined loss function [16].
The proposed model is described in detail as follows.
1) Generator G: G is a deconvolutional network composed of an input layer, a fully-connected layer, L g = 3 deconvolutional (also called transposed-convolutional) layers, and an output layer. The input layer takes a W g = 100 dimensional Gaussian random vector as its input, denoted as z = [z 1 , z 2 , . . . , z Wg ] . The output of the fully-connected layer (denoted as FC) is described by where is the weight matrix with the t (FC) i,j element representing the weight connecting neuron i in the FC layer and neuron j in the input layer, s (FC) is the bias vector of the fullyconnected layer, ReLU(·) is the nonlinear activation function, . . , H g , to fit the subsequent deconvolution operations to produce the desired dimensions of the output (fake) CSI samples.
The first deconvolutional layer (denoted as Deconv-1) works The output in the kth slice (resulted from the kth kernel) of Deconv-1 is described as is the bias of the kth kernel of Deconv-1, and T k,d denotes the weight connecting neuron i in the dth slice of the FC layer and neuron j in the kth slice of the Deconv-1 layer. Note that T (1) k,d is a sparse Toeplitz matrix where all elements along a diagonal have the same value. Then, the output feature map of Deconv-1 can be described as v (1) The output in the kth slice (resulted from the kth kernel) of Deconv-l, for l = 2, . . . , L g , is described as where T The output layer is a deconvolutional layer working with K The deconvolution operation of the output layer is described as where T (Lg+1) represents the transposed convolution operation with the sole kernel in the output layer, s (Lg+1) is the bias, and tanh(·) is the hyperbolic tangent activation function. The output layer produces the fake CSI sample denoted by x g = x g,1 , x g,2 , . . . , x g,W (Lg +1) g , which has the same dimension as the real CSI samples.
2) Discriminator D (Including Classifier C): D is a convolutional network composed of an input layer, L d = 3 convolutional layers, and an output layer. The input layer accepts the W d = W = 120 dimensional CSI sample The first convolutional layer (denoted as Conv-1) filters the input x with K The output in the kth slice (resulted from the kth kernel) of Conv-1 is described as where LeakyReLU(·) is the nonlinear activation function, b (1) k is the bias of the kth kernel of Conv-1, and W Subsequent convolutional layer operations can be described similarly. Conv-l (l = 2, . . . , L d ) filters the output volume of Conv-(l − 1), which is of dimensions W The output in the kth slice (resulted from the kth kernel) of Conv-l, for l = 2, . . . , L d , is described as After the operations of all convolutional layers, the feature map produced by Conv-L d is written as a where for m = 1, . . . , M , is used to produce y = σ(c), and the index of the largest component in y is the class prediction. The input layer, the L d convolutional layers, and the output layer with the customized function λ (or softmax function σ, respectively) form the Discriminator model D (or Classifier model C, respectively), as shown in Fig. 1.

A. Dataset and Models
The dataset used in this study was collected in a real indoor, conference-room-like scenario. In this scenario, a fixed-location Wi-Fi transmitter (Tx) and a fixed-location laptop receiver (Rx) were deployed in a conference room at the Research Center for Information Technology Innovation, Academia Sinica. The dimensions and layout of the environment are shown in Fig. 2. There are M = 16 target locations, denoted by p m , m = 1, 2, . . . , M . CSI samples [17] were collected at the fixed-location receiver (using the tool [18]) when a subject person stood at each location without any tracking device attached. The dataset contains a training set and a testing set, collected at different times and in different days. The training set has 400 CSI samples for each location (6400 for all locations) and the testing set has 200 CSI samples  for each location (3200 for all locations). Each CSI sample is a W = 120 dimensional vector (30 subcarriers with 2 × 2 MIMO) with location label p m . The CSI samples are used as unlabeled data in the model training if the label information is not used.
The training of DCGAN involves a two-step iterative process, i.e., training D/C and training G. In training D/C, first, C is trained with the full labeled training set (i.e., all 6400 labeled real CSI samples) or reduced labeled training set. The reduced labeled training set is formed by randomly selecting an equal number of labeled real CSI samples from each location. The reduced labeled training set is of size 16, 32, 64, . . . , 3200 (1, 2, 4, . . . , 200 labeled real CSI samples for each location). C is trained with Adam optimizer [19] and categorical crossentropy loss function. Then, D is trained with the full training set with labels removed (i.e., 6400 unlabeled real CSI samples) plus the same number of unlabeled fake CSI samples generated from G. D is trained with the Adam optimizer and binary cross-entropy loss function. After D/C is trained, G is then trained with Adam optimizer and binary cross-entropy loss function with fixed D/C, to generate improved fake CSI samples.
The CNN model is adopted as the benchmark. The CNN model has the same architecture as the C in DCGAN. Also,

B. Performance Comparison and Discussion
The performance of semi-supervised DCGAN and supervised CNN with equal but varying numbers of labeled real CSI samples is reported in Table I. When trained with sufficient labeled data (e.g., 3200 or 6400 labeled real CSI samples), both DCGAN and CNN achieve comparable performance, around 87% accuracy. When trained with reduced amount of labeled data, CNN attains suffered performance while DCGAN retains the performance. The performance advantage of DCGAN over CNN is remarkable when as few as 16 or 32 labeled real CSI samples (1 or 2 per location) are used. This shows the economy and robustness of DCGAN with respect to the amount of labeled data.
Next, we examine the impact of the Generator G on the classification performance for DCGAN. To this end, we replace the original G in the proposed DCGAN by a simplified G comprised of only an input layer and an output layer (without the deconvolutional layers). The D/C models are intact. The training process of this simplified DCGAN is the same as the original DCGAN. Table II compares their performance with varying numbers of labeled CSI samples. It is seen that a simplified G compromises the ability of DCGAN to perform well when only limited numbers of labeled data are available. Specifically, the simplified DCGAN can no longer retain the performance when the number of labeled CSI samples reduces from 6400 to 16.
The interaction between G and C in DCGAN is not as intuitive as that between G and D. After all, G is trained to generate improved fake samples so that D can hardly distinguish them from the real ones. However, the results here suggest that G could affect C. This may be explained as follows. When the labeled data are sufficient, C can be well trained alone (and produce good classification results) regardless of the structure of G. In contrast, when the labeled data are insufficient, C cannot be well trained alone without extra information, which is provided from G. In this case, a compromised G (in terms of architecture and trainable parameters) provides limited extra information and leads to compromised model classification performance. A sophisticated G helps train a good D, and consequently a good C, in the considered DCGAN architecture.
Finally, we visually examine the progressive generation of fake CSI samples by G during training as compared to the real CSI samples. Here, the DCGAN model adopts the reduced labeled training set of size 16. For plotting purposes, the unlabeled fake samples generated by G are assigned with the label predicted by C of the same model, and compared with the real CSI samples of the same label. The values of real and fake CSI samples are normalized to [−1, 1] for plotting. Fig. 3 shows the results for two example locations: location p 2 (first row) and location p 8 (second row). For either location, Fig. 3   100) resemble the real CSI samples fairly closely. While some distortions can be observed in between, the general patterns of the real CSI samples are replicated in the generated fake CSI samples for the same label (e.g., for location p 2 , the peaks above zero between the 100th-120th channels are seen in both real and fake CSI samples; for location p 8 , sub-zero values for all channels after the 30th channel are seen in both real and fake CSI samples). Besides, there are consistent (location-specific) patterns across different fake CSI samples for the same label. The results provide visual reference for the interaction between G and C in the considered DCGAN: G learns to not only generate fake CSI samples that are indistinguishable from the real ones (the objective of D), but also generate fake CSI samples that carry location-related information to aid classification (the objective of C).

IV. CONCLUSION
In this paper, we have presented a GAN-based semisupervised approach to the device-free fingerprinting indoor localization problem. We showed that the proposed scheme achieves an increasingly advantageous performance when trained with an increasingly reduced number of labeled training samples, as compared to the supervised approach. Since data labeling is costly, the results suggested a practical use case for the proposed scheme. Furthermore, the training process of the proposed model was visualized, and the interactions between the G, D, and C of the proposed model were discussed.