9
2084 IEEE INTERNET OF THINGS JOURNAL, VOL. 6, NO. 2, APRIL 2019 Internet of Things Meets Brain–Computer Interface: A Unified Deep Learning Framework for Enabling Human-Thing Cognitive Interactivity Xiang Zhang , Graduate Student Member, IEEE, Lina Yao , Member, IEEE, Shuai Zhang, Student Member, IEEE, Salil Kanhere, Senior Member, IEEE, Michael Sheng, Member, IEEE, and Yunhao Liu, Fellow, IEEE Abstract—A brain–computer interface (BCI) acquires brain signals, analyzes, and translates them into commands that are relayed to actuation devices for carrying out desired actions. With the widespread connectivity of everyday devices realized by the advent of the Internet of Things (IoT), BCI can empower indi- viduals to directly control objects such as smart home appliances or assistive robots, directly via their thoughts. However, realiza- tion of this vision is faced with a number of challenges, most importantly being the issue of accurately interpreting the intent of the individual from the raw brain signals that are often of low fidelity and subject to noise. Moreover, preprocessing brain signals and the subsequent feature engineering are both time- consuming and highly reliant on human domain expertise. To address the aforementioned issues, in this paper, we propose a unified deep learning-based framework that enables effective human-thing cognitive interactivity in order to bridge individu- als and IoT objects. We design a reinforcement learning-based selective attention mechanism (SAM) to discover the distinctive features from the input brain signals. In addition, we propose a modified long short-term memory to distinguish the interdimen- sional information forwarded from the SAM. To evaluate the efficiency of the proposed framework, we conduct extensive real- world experiments and demonstrate that our model outperforms a number of competitive state-of-the-art baselines. Two practi- cal real-time human-thing cognitive interaction applications are presented to validate the feasibility of our approach. Index Terms—Brain–computer interface (BCI), cognitive, deep learning (DL), Internet of Things (IoT). I. I NTRODUCTION I T IS expected that by 2020 over 50 billion devices will be connected to the Internet. The proliferation of the Internet of Things (IoT) is expected to improve efficiency and impact various domains including home automation, manufacturing Manuscript received May 11, 2018; revised July 31, 2018; accepted October 20, 2018. Date of publication October 24, 2018; date of current version May 8, 2019. (Corresponding author: Xiang Zhang.) X. Zhang, L. Yao, S. Zhang, and S. Kanhere are with the School of Computer Science and Engineering, University of New South Wales, Kensington, NSW 2052, Australia (e-mail: [email protected]; [email protected]; [email protected]; [email protected]). M. Sheng is with the Department of Computing, Macquarie University, Sydney, NSW 2109, Australia (e-mail: [email protected]). Y. Liu is with the Department of Computer Science and Engineering, Michigan State University, East Lansing, MI 48824 USA (e-mail: [email protected]). Digital Object Identifier 10.1109/JIOT.2018.2877786 and industries, transportation, and healthcare [1]. Individuals will have the opportunity to interact and control a wide range of everyday objects through various means of interactions including applications running on their smartphone or wear- able devices, voice, and gestures. brain–computer interface (BCI) 1 is emerging as a novel alternative for supporting interaction between IoT objects and individuals. BCI estab- lishes a direct communication pathway between human brain and an external device thus eliminating the need for typi- cal information delivery methods [2]. Recent trends in BCI research have witnessed the translation of human thinking capabilities into physical actions, such as mind-controlled wheelchairs and IoT-enabled appliances [3], [4]. These exam- ples suggest that the BCI is going to be a major aiding technology in human-thing interaction [5]. BCI-based cognitive interactivity offers several advantages. One is the inherent privacy arising from the fact that brain activity is invisible and thus impossible to observe and repli- cate [6]. The other is the convenience and real-time nature of the interaction, since the human only needs to think of the interaction rather than undertake the corresponding physical motions (e.g., speak, type, and gesture) [7]. However, the BCI-based human-thing cognitive interactiv- ity faces several challenges. While the brain signals can be measured using a number of technologies such as electroen- cephalogram (EEG) [2], functional near-infrared spectroscopy (fNIR) [8], and magnetoencephalography (MEG) [9], all of these methods are susceptible to low fidelity and are also easily influenced by environmental factors and sentiment status (e.g., noise and concentration) [10]. In other words, the brain signals generally have very low signal-to-noise ratios, and inherently lack sufficient spatial or temporal resolution and insight on activities of deep brain structures [5]. As a result, while current cognitive recognition systems can achieve about 70%–80% accuracy, this is not sufficient to design practical systems. Second, data preprocessing, parameter selection (e.g., filter type, filtering band, segment window, and overlapping), and feature engineering (e.g., feature selection and extraction both in the time domain and frequency domain) are all time-consuming and highly dependent on human expertise in the domain [11]. 1 The BCI mentioned in this paper refers to noninvasive BCI. 2327-4662 c 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission. See http://www.ieee.org/publications_standards/publications/rights/index.html for more information. Authorized licensed use limited to: Michigan State University. Downloaded on July 13,2021 at 14:48:43 UTC from IEEE Xplore. Restrictions apply.

Internet of Things Meets Brain–Computer Interface: A

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Internet of Things Meets Brain–Computer Interface: A

2084 IEEE INTERNET OF THINGS JOURNAL, VOL. 6, NO. 2, APRIL 2019

Internet of Things Meets Brain–Computer Interface:A Unified Deep Learning Framework for Enabling

Human-Thing Cognitive InteractivityXiang Zhang , Graduate Student Member, IEEE, Lina Yao , Member, IEEE,

Shuai Zhang, Student Member, IEEE, Salil Kanhere, Senior Member, IEEE,Michael Sheng, Member, IEEE, and Yunhao Liu, Fellow, IEEE

Abstract—A brain–computer interface (BCI) acquires brainsignals, analyzes, and translates them into commands that arerelayed to actuation devices for carrying out desired actions. Withthe widespread connectivity of everyday devices realized by theadvent of the Internet of Things (IoT), BCI can empower indi-viduals to directly control objects such as smart home appliancesor assistive robots, directly via their thoughts. However, realiza-tion of this vision is faced with a number of challenges, mostimportantly being the issue of accurately interpreting the intentof the individual from the raw brain signals that are often oflow fidelity and subject to noise. Moreover, preprocessing brainsignals and the subsequent feature engineering are both time-consuming and highly reliant on human domain expertise. Toaddress the aforementioned issues, in this paper, we proposea unified deep learning-based framework that enables effectivehuman-thing cognitive interactivity in order to bridge individu-als and IoT objects. We design a reinforcement learning-basedselective attention mechanism (SAM) to discover the distinctivefeatures from the input brain signals. In addition, we propose amodified long short-term memory to distinguish the interdimen-sional information forwarded from the SAM. To evaluate theefficiency of the proposed framework, we conduct extensive real-world experiments and demonstrate that our model outperformsa number of competitive state-of-the-art baselines. Two practi-cal real-time human-thing cognitive interaction applications arepresented to validate the feasibility of our approach.

Index Terms—Brain–computer interface (BCI), cognitive, deeplearning (DL), Internet of Things (IoT).

I. INTRODUCTION

IT IS expected that by 2020 over 50 billion devices will beconnected to the Internet. The proliferation of the Internet

of Things (IoT) is expected to improve efficiency and impactvarious domains including home automation, manufacturing

Manuscript received May 11, 2018; revised July 31, 2018; acceptedOctober 20, 2018. Date of publication October 24, 2018; date of currentversion May 8, 2019. (Corresponding author: Xiang Zhang.)

X. Zhang, L. Yao, S. Zhang, and S. Kanhere are withthe School of Computer Science and Engineering, Universityof New South Wales, Kensington, NSW 2052, Australia(e-mail: [email protected]; [email protected];[email protected]; [email protected]).

M. Sheng is with the Department of Computing, Macquarie University,Sydney, NSW 2109, Australia (e-mail: [email protected]).

Y. Liu is with the Department of Computer Science andEngineering, Michigan State University, East Lansing, MI 48824 USA(e-mail: [email protected]).

Digital Object Identifier 10.1109/JIOT.2018.2877786

and industries, transportation, and healthcare [1]. Individualswill have the opportunity to interact and control a wide rangeof everyday objects through various means of interactionsincluding applications running on their smartphone or wear-able devices, voice, and gestures. brain–computer interface(BCI)1 is emerging as a novel alternative for supportinginteraction between IoT objects and individuals. BCI estab-lishes a direct communication pathway between human brainand an external device thus eliminating the need for typi-cal information delivery methods [2]. Recent trends in BCIresearch have witnessed the translation of human thinkingcapabilities into physical actions, such as mind-controlledwheelchairs and IoT-enabled appliances [3], [4]. These exam-ples suggest that the BCI is going to be a major aidingtechnology in human-thing interaction [5].

BCI-based cognitive interactivity offers several advantages.One is the inherent privacy arising from the fact that brainactivity is invisible and thus impossible to observe and repli-cate [6]. The other is the convenience and real-time nature ofthe interaction, since the human only needs to think of theinteraction rather than undertake the corresponding physicalmotions (e.g., speak, type, and gesture) [7].

However, the BCI-based human-thing cognitive interactiv-ity faces several challenges. While the brain signals can bemeasured using a number of technologies such as electroen-cephalogram (EEG) [2], functional near-infrared spectroscopy(fNIR) [8], and magnetoencephalography (MEG) [9], all ofthese methods are susceptible to low fidelity and are alsoeasily influenced by environmental factors and sentimentstatus (e.g., noise and concentration) [10]. In other words, thebrain signals generally have very low signal-to-noise ratios,and inherently lack sufficient spatial or temporal resolutionand insight on activities of deep brain structures [5]. Asa result, while current cognitive recognition systems canachieve about 70%–80% accuracy, this is not sufficientto design practical systems. Second, data preprocessing,parameter selection (e.g., filter type, filtering band, segmentwindow, and overlapping), and feature engineering (e.g.,feature selection and extraction both in the time domainand frequency domain) are all time-consuming and highlydependent on human expertise in the domain [11].

1The BCI mentioned in this paper refers to noninvasive BCI.

2327-4662 c© 2018 IEEE. Personal use is permitted, but republication/redistribution requires IEEE permission.See http://www.ieee.org/publications_standards/publications/rights/index.html for more information.

Authorized licensed use limited to: Michigan State University. Downloaded on July 13,2021 at 14:48:43 UTC from IEEE Xplore. Restrictions apply.

Page 2: Internet of Things Meets Brain–Computer Interface: A

ZHANG et al.: IoT MEETS BCI 2085

Fig. 1. Schematic of cognitive IoT framework.

To address the aforementioned issues, in this paper, we pro-pose a unified deep learning (DL) [12] framework for enablinghuman-thing cognitive interactivity. As shown in Fig. 1, ourframework measures the user’s brain activity (such as EEG,FNIRS, and MEG) through a specific brain signal collectionequipment. The raw brain signals are forwarded to the cloudserver via Internet access. The cloud server uses a person-dependent pretrained DL model for analyzing the raw signals.The analysis results interpreted signals could be used for actu-ating functions in a wide range of IoT applicants, such as smartcity [13] (e.g., transportation control and agenda schedule),smart hospital [14], [15] (e.g., emergency call and anomalymentoring), and smart home [16], [17] (e.g., appliances controland assistive robot control).

The proposed unified DL framework aims to interpret thesubjects’ intent and decode it into the corresponding com-mands which are discernible for the IoT devices. Based on ourprevious study [5], [18], for each single brain signal sample,the self-similarity is always higher than the cross-similarity,which means that the intraintent cohesion of the samplesis stronger than the interintent cohesion. In this paper, wepropose a weighted average spatial long short-term memory(WAS-LSTM) to exploit the latent correlation between signaldimensions. The proposed end-to-end framework is capable ofmodeling high-level, robust, and salient feature representationshidden in the raw human brain signal streams and capturingcomplex relationships within data. The main contributions ofthis paper are highlighted as follows.

1) We propose a unified DL-based framework to interpretindividuals’ brain activity for enabling human-thing cog-nitive interactivity. To our best knowledge, we are thevery first work that bridging BCI and IoT to investigateend-to-end cognitive brain-to-thing interaction.

2) We apply deep reinforcement learning, with designedreward, state, and action model, to automatically dis-cover the most distinguishable features from the inputbrain signals. The discovered features are forwarded to amodified DL structure, in particular, the proposed WAS-LSTM, to capture the cross-dimensional dependency inorder to recognize user’s intention.

3) We also present two operational prototypes of theproposed framework: a brain typing system and a cogni-tive controlled smart home service robot, which demon-strate the efficacy and practicality of our approach.

II. PROPOSED FRAMEWORK

In this section, we present the cognition detection frame-work in detail. The subjects’ brain activity can be measured bya number of methods like EEG, fMRI, and MEG. In this paper,we exploit EEG due to its unique features, such as low-cost,low-energy, privacy, and portability. The proposed frameworkis depicted in Fig. 2. The main focus of the approach is toexploit the latent dependency among different signal dimen-sions. To this end, the proposed framework contains severalcomponents: 1) the replicate and shuffle (RS) processing;2) the selective attention learning; and 3) the sequential LSTM-based classification. In the following, we will first discuss themotivations of the proposed method and then introduce theaforementioned components in details.

A. Motivation

How to exploit the latent relationship between EEG signaldimensions is the main focus of the proposed approach. Thesignals belonging to different cognitions are supposed to havedifferent interdimension dependent relationships which con-tain rich and discriminative information. This information iscritical to improve the distinctive signal pattern discovery.

In practice, the EEG signal is often arranged as 1-D vec-tor, the signal is less informative for the limited and fixedelement arrangement. The elements order and the numberof elements in each signal vector can affect the elementdependency. For example, the interdimension dependency in{0, 1, 2, 3, 4} and {1, 2, 3, 4, 0} are not reciprocal; similarly,{0, 1, 2, 3, 4} and {0, 1, 1, 2, 3, 4} are not reciprocal. In manyreal-world scenarios, the EEG data are concatenated followingthe distribution of biomedical EEG channels. Unfortunately,the practical channel sequence, with the fixed order andnumber, may not be suitable for interdimension dependencyanalysis. Therefore, we propose the following three techniquesto amend the drawback.

First, we RS the input EEG signal vector on dimension-wise in order to provide as much latent dependency as possibleamong feature dimensions (Section II-B).

Second, we introduce a focal zone as a selective attentionmechanism (SAM), where the optimal interdimension depen-dency for each sample only depends on a small subset offeatures. Here, the focal zone is optimized by deep reinforce-ment learning which has been shown to achieve both goodperformance and stability in policy learning (Section II-C).

Third, we propose the WAS-LSTM classifier by extractingthe distinctive interdimension dependency (Section II-D).

B. Data Replicate and Shuffle

Suppose the input EEG data can be denoted by X ={(xi, yi), i = 1, 2, . . . , I} where (xi, yi) denotes the 1-D EEGsignal, called one sample in this paper, and I denotes the num-ber of samples. In each sample, the feature xi ∈ R

K containsK elements and the corresponding ground truth yi ∈ R is aninteger that denotes the sample’s category. Different categoriescorrespond to various brain activities. xi can be described asa vector with K elements, xi = {xik, k = 1, 2, . . . , K}.

Authorized licensed use limited to: Michigan State University. Downloaded on July 13,2021 at 14:48:43 UTC from IEEE Xplore. Restrictions apply.

Page 3: Internet of Things Meets Brain–Computer Interface: A

2086 IEEE INTERNET OF THINGS JOURNAL, VOL. 6, NO. 2, APRIL 2019

Fig. 2. Flowchart of the proposed framework. The focal zone x̄i is a selected fragment from x′i to feed in the state transition and the reward model. In eachstep t, one action is selected by the state transition to update st based on the agent’s feedback. The reward model evaluates the quality of the focal zone to thereward rt . The dueling DQN is employed to find the optimal focal zone x̄∗i which will be feed into the LSTM-based classifier to explore the interdimensiondependency and predict the sample’s label y′i. FCL denotes fully connected layer. The state transition contains four actions: left shifting, right shifting, extend,and condense. The dashed line indicates the focal zone before the action while the solid line indicates the position of the focal zone after the action.

To provide more potential interdimension spatial dependen-cies, we propose a method called RS. RS is a two-step featuretransformation method which maps xi to a higher dimensionalspace x′i with more complete element combinations

xi ∈ RK → x′i ∈ R

K′ , K′ > K.

In the first step (replicate), we replicate xi for h = K′%K + 1times where % denotes remainder operation. Then we get anew vector with length as h ∗ K which is not less than K′; inthe second step (shuffle), we randomly shuffle the replicatedvector in the first step and intercept the first K′ element togenerate x′i. Theoretically, compared to xi, the number andorder of elements in x′i are more diverse. For instance, set xi ={1, 3, 4, 2}, in which the four elements are arranged in a fixedorder and limited combinations, it is difficult to mine the latentpattern in xi; however, set the replicated and shuffled signal asx′i = {3, 1, 2, 3, 4, 4, 1, 2}, the equal difference characteristic iseasy to be found in the fragment {1, 2, 3, 4} (the second to fifthelements of x′i). Therefore, a major challenge in this paper isto discover the fragment with rich distinguishable information.To solve this problem, we propose a attention-based selectivemechanism which is detailed introduced in Section II-C.

C. Selective Attention Mechanism

In the next process, we attempt to find the optimal depen-dency which includes the most distinctive information. But K′,the length of x′i, is too large and is computationally expen-sive. To balance the length and the information content, weintroduce the attention mechanism [19] to emphasize the infor-mative fragment in x′i and denote the fragment by x̄i, whichis called focal zone. Suppose x̄i ∈ R

K̄ and K̄ denotes thelength of the focal zone. For simplicity, we continue to denotethe kth element by x̄ik in the focal zone. To optimize thefocal zone, we employ deep reinforcement learning as theoptimization framework for its excellent performance in policyoptimization [20].

1) Overview: As shown in Fig. 2, the focal zoneoptimization includes two key components: the environment(including state transition and reward model), and the agent.Three elements (the state s, the action a, and the reward r)are exchanged in the interaction between the environment andthe agent. In the following we elaborate these three elementswhich are crucial to our proposed deep reinforcement learningmodel.

1) The state S = {st, t = 0, 1, . . . , T} ∈ R2 describes

the position of the focal zone, where t denotes thetime stamp. In the training, s0 is initialized as s0 =[(K′ − K̄)/2, (K′ + K̄)/2]. Since the focal zone is a shift-ing fragment on 1-D x′i, we design two parameters todefine the state: st = {starttidx, endt

idx}, where starttidx andendt

idx separately denote the start index and the end indexof the focal zone.2

2) The action A = {at, t = 0, 1, . . . , T} ∈ R4 describes

which the agent could choose to act on the environment.In our case, we define four categories of actions for thefocal zone (as described in the state transition part inFig. 2): left shifting, right shifting, extend, and condense.Here, at time stamp t, the state transition only chooseone action to implement following the agent’s policyπ : st+1 = π(st, at).

3) The reward R = {rt, t = 0, 1, . . . , T} ∈ R is calculatedby the reward model, which will be detailed later. Thereward model � : rt = �(st) receives the current stateand returns an evaluation as the reward.

4) We employ the dueling deep Q networks (DQNs) [21]as the optimization policy π(st, at), which is enabledto learn the state-value function efficiently. DuelingDQN learns the Q value V(st) and the advantagefunction A(st, at) and combines them: Q(st, at) ←V(st), A(st, at). The primary reason we employ a duel-ing DQN to optimize the focal zone is that it updates all

2For example, for a random x′i = [3, 5, 8, 9, 2, 1, 6, 0], the state {starttidx =2, endt

idx = 5} is sufficient to determine the focal zone as [8, 9, 2, 1].

Authorized licensed use limited to: Michigan State University. Downloaded on July 13,2021 at 14:48:43 UTC from IEEE Xplore. Restrictions apply.

Page 4: Internet of Things Meets Brain–Computer Interface: A

ZHANG et al.: IoT MEETS BCI 2087

the four Q values at every step while other policy onlyupdates one Q value at each step.

2) Reward Model: Next, we introduce the design of thereward model, which is one important contribution of thispaper. The purpose of the reward model is to evaluate howthe current state impacts our final target which refers to theclassification performance in our case. Intuitively, the statewhich can lead to the better classification performance shouldhave a higher reward: rt = F(st). As a result, in the standardreinforcement learning framework, the original reward modelregards the classification accuracy as the reward. F refersto the WAS-LSTM. Note, WAS-LSTM focuses on the spa-tial dependency between different dimensions at the sametime-point while the normal LSTM focuses on the tempo-ral dependency between a sequence of samples collected atdifferent time-points. However, WAS-LSTM requires consid-erable training time, which will dramatically increase theoptimization time of the whole algorithm. In this section,we propose an alternative method to calculate the reward:construct a new reward function rt = G(st) which is posi-tively related with rt = F(st). Therefore, we can employ Gto replace F . Then, the task is changed to construct a suit-able G which can evaluate the interdimension dependency inthe current state st and feedback the corresponding reward rt.We propose an alternative G composed by three components:the autoregressive model [22] to exploit the interdimensiondependency in x′i, the Silhouette Score [23] to evaluate thesimilarity of the autoregressive coefficients, and the rewardfunction based on the silhouette score.

The autoregressive model [22] receives the focal zone x̄i

and specifies that how the last variable depends on its ownprevious values. Then, to evaluate how rich information istaken in the autoregressive coefficients, we employ silhouettescore [24] sst to interpret the consistence of ϕ. The silhouettescore measures how similar an object is to its own clustercompared to other clusters and a high silhouette value indicatesthat the object is well matched to its own cluster and poorlymatched to neighboring clusters. Specifically, in our case, thehigher silhouette score means that ϕ can be better clusteredand the focal zone x̄i is be easier classified. At last, based onthe sst ∈ [−1, 1], we design a reward function

rt = esst+1

e2 − 1− β

K′.

The function contains two parts, the first part is a normalizedexponential function with the exponent sst+ 1 ∈ [0, 1], whichencourages the reinforcement learning algorithm to search thebetter st w that leads to a higher sst. The motivation of theexponential function is that: the reward growth rate is increas-ing with the silhouette score’s increase.3 The second part is apenalty factor for the focal zone length to keep the bar shorterand the β is the penalty coefficient.

In summary, the aim of focal zone optimization is to learnthe optimal focal zone x̄∗i which can lead to the maximumreward. The optimization totally iterates N = ne ∗ ns timeswhere ne and ns separately denote the number of episodes

3For example, for the same silhouette score increment 0.1, sst : 0.9→ 1.0can earn higher reward increment than sst : 0.1→ 0.2.

and steps [21]. ε-greedy method [25] is employed in the statetransition.

D. Weighted Average Spatial LSTM Classifier

In this section, we propose WAS-LSTM classification fortwo purposes. The first attempt is to capture the cross-relationship among feature dimensions in the optimized focalzone x̄∗i . The LSTM-based classifier is widely used for itsexcellent sequential information extraction ability which isapproved in several research areas such as natural languageprocessing [26]. Compared to other commonly employed spa-tial feature extraction methods, such as CNNs, LSTM lessdependent on the hyper-parameters setting. However, the tra-ditional LSTM focuses on the temporal dependency among asequence of samples. Technically, the input data of traditionalLSTM is 3-D tensor shaped as [nb, nt, K̄] where nb and nt

denote the batch size and the number of temporal samples,separately.

In this paper, we transpose the input data as [nb, nt, K̄]→[nb, K̄, nt] following the equation (AT)ijk = Aikj, in whichform, each sample has shape [K̄, nt] and the WAS-LSTM paysattention to each sample column and explores the latent depen-dencies between the various elements in the same column.WAS-LSTM aims to capture the dependency among variousdimensions at one temporal point, therefore, we set nt = 1.

The second advantage of WAS-LSTM is that it could sta-bilize the performance of LSTM via moving average method.In LSTM, each cell’s output contains the information beforeit, however, the neural network’s convergence and stability arefluctuated over different times of training. To enhance the con-vergence and stability, we calculate the LSTM outputs Oi byaveraging the weighted past two outputs instead of only thefinal one (Fig. 2)

Oi = w1Oi(K̄−1) + w2OiK̄

where w1 and w2 are the corresponding weights whichcan adjust the importance proportion of Oi(K̄−1) and OiK̄ .The weights can be automatically learned by the neuralnetwork [27] or be manually set. In this paper, we simply man-ually set w1 = w2 = 0.5 in order to save computing resources.The predicted label is calculated by y′i = L(x̄∗i ) where Ldenotes the LSTM algorithm. �2-norm (with parameter λ) isadopted as regularization to prevent overfitting. The sigmoidactivation function is used on hidden layers. The loss func-tion is cross-entropy and is optimized by the AdamOptimizeralgorithm.

III. EXPERIMENTS

In this section, we design local real-world experimentsto evaluate the efficiency and effectiveness of the proposedframework. First, the experimental setting is reported. Then,we compare our model with competitive state-of-the-artbaselines and evaluate the performance in detail. Finally,we investigate the impact of crucial factors such as theframework latency and the reward model.

A. Experimental Setting

We conduct the EEG collection by using a portable andeasy-to-use commercialized Emotiv Epoc+ headset. The

Authorized licensed use limited to: Michigan State University. Downloaded on July 13,2021 at 14:48:43 UTC from IEEE Xplore. Restrictions apply.

Page 5: Internet of Things Meets Brain–Computer Interface: A

2088 IEEE INTERNET OF THINGS JOURNAL, VOL. 6, NO. 2, APRIL 2019

(a) (b)

Fig. 3. EEG data collection: (a) collection scenario and (b) gathered EEGsignal.

TABLE IIMAGERY ACTION, LABEL, AND CORRESPONDING COMMANDS

IN CASE STUDIES

headset contains 14 channels and the sampling rate is 128Hz. The local dataset can be accessed from this link.4 Thisexperiment is carried out using seven subjects (four males andthree females) aged from 23 to 26. During the experiment, thesubject wearing the Emotiv Epoc+5 EEG collection headset,faces the computer screen and focuses on the correspondinghint which appears on the screen [shown in Fig. 3(a)]. EEGsignals are recorded when the subject is imaging certainactions (without any physical action). The certain actionscontains: upward arrow, downward arrow, leftward arrow,rightward arrow, and a cycle. Beyond that, the EEG signalsthat the subject stays relaxation with eye closed are alsorecorded. In total, there are six categories of EEG signals.The imagery action associated with brain activities and thecorresponding labels used in this paper are listed in Table I.In summary, this experiment contains 241 920 sampleswith 34 560 samples for each subject. For each participant,the dataset is divided into a training set and a testing set.The training set contains 31 104 samples and the testing setcontains 3456 samples. The classification results are evaluatedby a number of metrics, including accuracy, precision, recall,F1-score, confusion matrix, receiver operating characteristic(ROC) curve, and area under curve (AUC) score.

B. Overall Comparison and Analysis

In the training stage, based on the tuning experience, thehyper-parameters setting are listed as follows. In the selectiveattention learning: the order of autoregressive is 3; K̄ = 128,the dueling DQN has four layers and the node number in eachlayer are: 2 (input layer), 32 (FCL), 4 (A(st, at)) + 1 (V(st)),and 4 (output). The decay parameter γ = 0.8, ne = ns = 50,

4[Online]. Available: https://drive.google.com/open?id=0B9MuJb6Xx2PIM0otakxuVHpkWkk

5[Online]. Available: https://www.emotiv.com/product/emotiv-epoc-14-channel-mobile-eeg/

TABLE IIOVERALL COMPARISON WITH THE STATE-OF-THE-ART BASELINES.

DL DENOTES DEEP LEARNING

N = 2, 500, ε = 0.2, learning rate= 0.01, memory size =2000, length penalty coefficient β = 0.1, and the minimumlength of focal zone is set as 10. In the DL classifier: thenode number in the input layer equals to the number of featuredimensions, three hidden layers with 164 nodes, two layers ofLSTM cells (164 cells), and one output layer (six nodes). Thelearning rate = 0.001, �2-norm coefficient λ = 0.001, forgetbias = 0.3, batch size = 9, and iterate for 1000 iterations.

To demonstrate the efficiency of our approach, we compareour model with several competitive state-of-the-art methods.

1) Hsu [28] extracts several potential features, includingamplitude modulation, spectral power and asymmetryratio, adaptive autoregressive model, and wavelet fuzzyapproximate entropy, followed by an SVM classifier, toclassify the binary motor imagery EEG signals.

2) Tabar and Halici [29] combine convolutional neuralnetworks (CNNs) and stacked Autoencoder (SAE) toautomatically classify EEG data.

3) Martis et al. [30] artificially extracted several nonlinearfeatures on different EEG frequency bands (includingdelta, theta, lower alpha, upper alpha, lower beta, upperbeta, and lower gamma) and forward to SVM with radialbasis function kernel.

Table II shows the overall comparison between our approachwith nDL baselines, DL baselines, and the state-of-the-artmodels. RF denotes random forest, AdaB denotes adaptiveboosting, and LDA denotes linear discriminant analysis. Inaddition, the key parameters of the baselines are listed here:linear SVM (C = 1), RF (n = 200), and KNN (k = 3).In LSTM, nsteps = 5, another set is the same as the WAS-LSTM classifier, along with the gated recurrent unit (GRU).The CNN contains two stacked convolutional layers (both withstride [1, 1], patch [2, 2], zero-padding, and the depth are fourand eight, separately), one pooling layer (stride [1, 2], zero-padding) and one fully connected layer (164 nodes). Reluactivation function is employed in the CNN.

The observations in Table II show that our approach out-performs all the baselines by achieving the highest accuracyof 0.9363 on the six-class classification. In addition, ourmodel (SAM + WAS-LSTM) performs better than the soloWAS-LSTM, which demonstrates that the SAM has a posi-tive contribution to the classification. The confusion matrix,

Authorized licensed use limited to: Michigan State University. Downloaded on July 13,2021 at 14:48:43 UTC from IEEE Xplore. Restrictions apply.

Page 6: Internet of Things Meets Brain–Computer Interface: A

ZHANG et al.: IoT MEETS BCI 2089

(a) (b) (c)

Fig. 4. Recognition results. (a) Confusion matrix. (b) ROC curves with AUC scores. (c) Latency.

ROC curves, and AUC scores of the proposed framework arereported in Fig. 4. We can observe that the last class, rep-resenting the eye-closed state, obtains the best performancecompared to other five classes. This demonstrates that the eye-closed state is the easiest to be recognized, which is reasonablewhile all the other classes are in eye-open state and are eas-ier to be interrupted by the environmental factors. Moreover,through the results comparison of SAM+WASGRU and ourmodel (SAM+WASLSTM) (Table II), we can observe that thelatter achieves higher performance which indicates (0.9363 >

0.9135) the LSTM slightly outperforms GRU in our scenarios.The reason can be inferred is that LSTM can remember longersequences than GRU.

C. Impact of Key Factor

1) Latency: To design effective and real-world cognitiveinteractive applications, both the accuracy and latency of intentrecognition are equally important. Subsequently, we comparethe latency of the proposed framework with several typicalstate-of-the-art algorithms and the results are presented inFig. 4(c). It is observed that our approach has competitivelatency compared with other methods. The overall latency isless than 1 s. The DL-based techniques in this paper do notexplicitly lead to extra latency.

2) Reward Model: Furthermore, we conduct extensiveexperiments to demonstrate the efficiency of the proposedreward model G. First, we measure a batch of data pairs ofthe reward (represents the reward of G) and the WAS-LSTMclassifier accuracy (represents the reward of F). The rela-tionship between the reward and the accuracy is shown inFig. 5. The figure illustrates that the accuracy has an approx-imately linear relationship with the reward. The correlationscoefficient is 0.8258 (with p-value as 0.0115), which showsthat the accuracy and reward are highly positive related. As aresult, we can estimate arg maxx̄∗ F by arg maxx̄∗ G. Moreover,another experiment is carried out to measure the single steptraining time of two reward models G and F . The train-ing times are marked as T1 and T2, respectively. Fig. 6qualitatively shows that T2 is much higher than T1 (eightstates represent eight different focal zones). Quantitatively, thesum of T1 over eight states is 35237.41 s while the sum ofT2 is 601.58 s. These results demonstrate that the proposedapproach, designing a G to approximate and estimate the F ,

Fig. 5. Relationship between the classifier accuracy and the reward. Thecorrelationship coefficient is 0.8258 while the p-value is 0.0115.

Fig. 6. Reward model training time in various states. T1 and T2 separatelydenote the training time in reward model G and F .

saves 98.3% = 1 − 601.58/35237.41 training time in focalzone optimization.

IV. CASE STUDY

Inspired by the high accuracy and low latency of ourproposed framework for human intent recognition, we pro-ceed to develop two real-world cognitive IoT prototypes: 1) abrain typing system and 2) mind-controlled assistive robot forthe smart home.

A. Brain Typing System

Due to the high intent recognition accuracy, we develop anonline brain typing system to convert user’s thoughts to texts.The video demo clip can be found at the given link.6 Thebrain typing system [Fig. 7(a)] consists of two components:the pretrained deep learning model and the online BCI system.The pretrained DL model, which is trained offline, aims toaccurately recognize the user’s typing intent in real time. Theonline system contains five components: 1) the EEG headset;2) the client 1 (data collector); 3) the server; 4) the client 2(typing command receiver); and 5) the typing interface. Theuser wears the Emotiv EPOC+ headset which collects EEGsignals and sends the data to client 1 through a Bluetooth

6[Online]. Available: https://youtu.be/Dc0StUPq61k

Authorized licensed use limited to: Michigan State University. Downloaded on July 13,2021 at 14:48:43 UTC from IEEE Xplore. Restrictions apply.

Page 7: Internet of Things Meets Brain–Computer Interface: A

2090 IEEE INTERNET OF THINGS JOURNAL, VOL. 6, NO. 2, APRIL 2019

(a) (b)

Fig. 7. Human-thing cognitive applications. (a) Brain typing system. (b) Cognitive robot in IoT scenario.

connection. The raw EEG signals are transported to the serverthrough a TCP connection.

Specifically, the typing interface [up right corner inFig. 7(a)] can be divided into three levels: 1) the initialinterface; 2) the subinterface; and 3) the bottom interface. Allthe interfaces have similar structure: three character blocks(separately distributed in left, up, and down directions), a dis-play block, and a cancel button. The display block shows thetyped output and the cancel button is used to cancel the lastoperation. The typing system in total includes 27 = 3 ∗ 9characters (26 English alphabets and the space bar) and allof them are separated into three character blocks (each blockcontains nine characters) in the initial interface. Overall, thereare three alternative selections and each selection will lead toa specific subinterface which contains nine characters. Again,the 9 = 3∗3 characters are divided into three character blocksand each of them is connected to a bottom interface. In thebottom interface, each block represents only one character.

In the brain typing system, there are five commands to con-trol the interface: “left,” “up,” “right,” “cancel,” and “confirm.”Each command corresponds to a specific motor imagery EEGcategory (as shown in Table I). Since the user can hardly con-centrate for a long time (usually, less than 10 s), the brainactivity may represent none of the valid commands sometimes.Nevertheless, the proposed DL framework cannot distinguishthe invalid brain activity, we leave one specific brain categoryto represent the invalid signal. If the individual’s brain sig-nal is not in any of the five valid categories, it is classifiedas the invalid category and the brain typing system will donothing under this situation.7 Moreover, based on the exper-iments results in Section III-B, the eye-closed state has thehighest precision and accuracy, therefore, we select this stateas the confirmation command for the reason that “confirma-tion” is the most crucial command in typing system. To typeevery single character, the interface is supposed to acceptsix commands. Consider typing the letter “I” as an exam-ple. The sequence of commands to be entered is as follows:left (choose the left block with characters A ∼ I), confirm,right (choose the right block with characters G ∼ I), confirm,right (choose the right block with characters I), confirm.

7Similarly, in the cognitive robot case, the robot will remain the previousstate under the invalid command.

In our practical deployment, the sampling rate of EmotivEPOC+ headset is set as 128 Hz, which means the servercan receive 128 EEG recordings each second. Since the brain-wave signal varies rapidly and is very easy to be affectedby noises, the EEG data stream is sent to server every halfsecond, which means that the server receives 64 EEG sam-ples each time. The 64 EEG samples are classified by the DLframework and generate 64 categories of intents. we calculatethe mode of 64 intents and regard the mode as the final intentdecision. Furthermore, to achieve steadiness and reliability, theserver sends the command to client 2 only if three consecu-tive decisions remain consistent. After the command is sent,the command list will be reset and the system will wait untilthe next three consistent decisions are made.

B. Cognitive Robot

Another important application for BCI-inspired IoT isextending the orientation of smart homes by integrating thesubject’s intent and the real-world IoT objects to effectivelycontrol things of interest.

To demonstrate the feasibility of the proposed framework,we report the second use case as implementing cognitive inter-activity in an IoT-based smart home system. The IoT-basedsmart home is equipped with sensors, wherein IR sensors,ambient sound, heat, as well as contact sensors are mountedon furniture and used in the home environment in a nonintru-sive manner. In our case, within the smart home environmentwhich is perceived by the embedded sensor-networks, a simu-lated robot is cognitively navigated to perform a routine task.In the specific scenario, the robot, learns user’s intent fromEEG recordings via the proposed framework, to take the IoTobject (e.g., a can of beverage) from a table in the kitchenand put it in a table in the living room. The desired objectis aggregate with RFID tag which helps to identify the loca-tion. The IoT scenario is depicted in Fig. 7(b) and the democan be found at here.8 The user’s intent is carried in the EEGrecordings which are forwarded to the DL-based frameworkfor interpretation. The recognized intent is send to sensor hivethrough WLAN to navigate the robot to get the desired object.Starting from the table near the kitchen, the PR2 robot receivesaction commands (as shown in Table I) and walks forward

8[Online]. Available: https://youtu.be/VZYX1095Vkc

Authorized licensed use limited to: Michigan State University. Downloaded on July 13,2021 at 14:48:43 UTC from IEEE Xplore. Restrictions apply.

Page 8: Internet of Things Meets Brain–Computer Interface: A

ZHANG et al.: IoT MEETS BCI 2091

until the specific position with the auxiliary of RFID tag. Then,the robot grasps the object, turns back and walks along the pathto the table in living room and unlooses hands to put the bev-erage on the table. The simulation result shows that the robotcan 100% precisely grasp and unloose object according to thepath planned in the subject’s mind. The simulation platform isin Gazebo toolbox and the robot controlling program is pow-ered by robot operating system. This case randomly selectssome EEG raw data from Subject 1 dataset as simulationinputs.

V. DISCUSSION

Here, we present several open challenges.1) The experiment only contains seven subjects limited

by the practical conditions, a larger and more diversedataset is necessary to illustrate the effects of theproposed model.

2) The SAM component with focal zone is designed toautomatically explore the latent dimension sequence ofthe input EEG data, nevertheless, the employment ofSAM increases the training time resulted from moreiterations of the LSTM cell.

3) Most importantly, the RS stage shuffles the orderand replicate the number of input dimensions to dis-cover the optimal order in order to the best performance,but the optimal order can not be guaranteed to appearafter the RS, thus try more times if the classificationresult is unsatisfactory.

4) The WAS-LSTM exploits the spatial information amongEEG channels, thus a number of channels are requiredto provide enough information.

VI. CONCLUSION

We propose a unified DL framework to bridge BCI andIoT in order to enable cognitive interactivity. We proposeWAS-LSTM to extract interdimension dependency among theinput signal of the human brain activities which are selectedby the SAM. We conduct real-world experiments to evaluatethe proposed framework and the results demonstrate that ourmodel outperforms the state-of-the-art baselines. Furthermore,our experience in developing two case studies, namely thebrain typing system and the cognitive robot, are reported inthis paper. These case studies validate the feasibility of theproposed framework.

REFERENCES

[1] L. Yao, Q. Z. Sheng, and S. Dustdar, “Web-based management of theInternet of Things,” IEEE Internet Comput., vol. 19, no. 4, pp. 60–67,Jul./Aug. 2015.

[2] A. Vallabhaneni, T. Wang, and B. He, “Brain–computer interface,” inNeural Engineering. Boston, MA, USA: Springer, 2005, pp. 85–121.

[3] A. Teles et al., “Using brain–computer interface and Internet of Thingsto improve healthcare for wheelchair users,” in Proc. 11th Int. Conf.Mobile Ubiquitous Comput. Syst. Services Technol. (UBICOMM), 2017,pp. 92–94.

[4] B. Jagadish, M. P. R. S. Kiran, and P. Rajalakshmi, “A novel systemarchitecture for brain controlled IoT enabled environments,” in Proc.IEEE 19th Int. Conf. E-Health Netw. Appl. Services (Healthcom), 2017,pp. 1–5.

[5] X. Zhang et al., “Converting your thoughts to texts: Enabling braintyping via deep feature learning of EEG signals,” in Proc. PerCom,2018, pp. 1–10.

[6] B. Nguyen, D. Nguyen, W. Ma, and D. Tran, “Investigating thepossibility of applying EEG lossy compression to EEG-based userauthentication,” in Proc. IEEE IJCNN, 2017, pp. 79–85.

[7] T. Nakamura, V. Goverdovsky, and D. P. Mandic, “In-ear EEG biomet-rics for feasible and readily collectable real-world person authentica-tion,” IEEE Trans. Inf. Forensics Security, vol. 13, no. 3, pp. 648–661,Mar. 2018.

[8] M. A. Rahman and M. Ahmad, “Evaluating the connectivity of motorarea with prefrontal cortex by fNIR spectroscopy,” in Proc. IEEE ECCE,2017, pp. 296–300.

[9] M. Iijima and N. Nishitani, “Cortical dynamics during sim-ple calculation processes: A magnetoencephalography study,” Clin.Neurophysiol. Pract., vol. 2, pp. 54–61, Dec. 2016. [Online]. Available:https://www.sciencedirect.com/science/article/pii/S2467981X1630021X

[10] M. A. Rahman and M. Ahmad, “A straight forward signal processingscheme to improve effect size of fNIR signals,” in Proc. IEEE ICIEV,2016, pp. 439–444.

[11] E. Haselsteiner and G. Pfurtscheller, “Using time-dependent neuralnetworks for EEG classification,” IEEE Trans. Rehabil. Eng., vol. 8,no. 4, pp. 457–463, Dec. 2000.

[12] Y. LeCun, Y. Bengio, and G. Hinton, “Deep learning,” Nature, vol. 521,no. 7553, p. 436, 2015.

[13] M. Angelidou, “Smart city planning and development shortcomings,”TeMA J. Land Use Mobility Environ., vol. 10, no. 1, pp. 77–94, 2017.

[14] K. Dhariwal and A. Mehta, “Architecture and plan of smart hospitalbased on Internet of Things (IoT),” Int. Res. J. Eng. Technol., vol. 4,no. 4, pp. 1976–1980, 2017.

[15] X. Zhang et al., “Multi-modality sensor data classification with selectiveattention,” in Proc. IJCAI, 2018, pp. 3111–3117.

[16] A. R. Al-Ali, I. A. Zualkernan, M. Rashid, R. Gupta, and M. Alikarar, “Asmart home energy management system using IoT and big data analyticsapproach,” IEEE Trans. Consum. Electron., vol. 63, no. 4, pp. 426–434,Nov. 2017.

[17] L. Yao et al., “WITS: An IoT-endowed computational framework foractivity recognition in personalized smart homes,” Computing, vol. 100,no. 4, pp. 369–385, 2018.

[18] X. Zhang, L. Yao, C. Huang, Q. Z. Sheng, and X. Wang, “Intent recog-nition in smart living through deep recurrent neural networks,” in Proc.Int. Conf. Neural Inf. Process., 2017, pp. 748–758.

[19] P. Cavanagh et al., “Attention-based motion perception,” Science,vol. 257, no. 5076, pp. 1563–1565, 1992.

[20] V. Mnih et al., “Human-level control through deep reinforcementlearning,” Nature, vol. 518, no. 7540, pp. 529–533, 2015.

[21] Z. Wang et al., “Dueling network architectures for deep reinforcementlearning,” in Proc. 33rd Int. Conf. Mach. Learn., vol. 48, Jun. 2016,pp. 1995–2003.

[22] H. Akaike, “Fitting autoregressive models for prediction,” Ann. Inst.Stat. Math., vol. 21, no. 1, pp. 243–247, 1969.

[23] A. Laurentini, “The visual hull concept for silhouette-based imageunderstanding,” IEEE Trans. Pattern Anal. Mach. Intell., vol. 16, no. 2,pp. 150–162, Feb. 1994.

[24] L. Lovmar, A. Ahlford, M. Jonsson, and A.-C. Syvänen, “Silhouettescores for assessment of SNP genotype clusters,” BMC Genomics, vol. 6,no. 1, p. 35, 2005.

[25] M. Tokic, “Adaptive ε-greedy exploration in reinforcement learningbased on value differences,” in Proc. Annu. Conf. Artif. Intell., 2010,pp. 203–210.

[26] F. A. Gers and E. Schmidhuber, “LSTM recurrent networks learn simplecontext-free and context-sensitive languages,” IEEE Trans. Neural Netw.,vol. 12, no. 6, pp. 1333–1340, Nov. 2001.

[27] X. Zhang et al., “MindID: Person identification from brain wavesthrough attention-based recurrent neural network,” in Proc. ACM Conf.Pervasive Ubiquitous Comput. (UbiComp), 2018, Art. no. 149.

[28] W.-Y. Hsu, “Assembling a multi-feature EEG classifier for left–rightmotor imagery data using wavelet-based fuzzy approximate entropyfor improved accuracy,” Int. J. Neural Syst., vol. 25, no. 8, 2015,Art. no. 1550037.

[29] Y. R. Tabar and U. Halici, “A novel deep learning approach for classi-fication of EEG motor imagery signals,” J. Neural Eng., vol. 14, no. 1,2016, Art. no. 016003.

[30] R. J. Martis et al., “Epileptic EEG classification using nonlinear param-eters on different frequency bands,” J. Mech. Med. Biol., vol. 15, no. 3,2015, Art. no. 1550040.

Authorized licensed use limited to: Michigan State University. Downloaded on July 13,2021 at 14:48:43 UTC from IEEE Xplore. Restrictions apply.

Page 9: Internet of Things Meets Brain–Computer Interface: A

2092 IEEE INTERNET OF THINGS JOURNAL, VOL. 6, NO. 2, APRIL 2019

Xiang Zhang (GS’17) received the master’s degreefrom the Harbin Institute of Technology, Harbin,China, in 2016. He is currently pursuing thePh.D. degree at the School of Computer Scienceand Engineering, University of New South Wales,Kensington, NSW, Australia.

His current research interests include deep learn-ing, brain–computer interface, Internet of Things,and human activity recognition.

Lina Yao (M’14) received the Ph.D. degree incomputer science from the University of Adelaide,Adelaide, SA, Australia.

She is currently a Lecturer with the School ofComputer Science and Engineering, University ofNew South Wales, Kensington, NSW, Australia. Hercurrent research interests include machine learningand data mining with applications to the Internetof Things, brain–computer interface, informationfiltering and recommending, and human activityrecognition.

Dr. Yao is a member of the ACM.

Shuai Zhang (S’17) received the bachelor’s degreefrom the School of Information Management,Nanjing University, Nanjing, China. He is currentlypursuing the Ph.D. degree at the School of ComputerScience and Engineering, University of New SouthWales, Kensington, NSW, Australia, and Data61,CSIRO, Canberra, ACT, Australia.

His current research interests include recom-mender systems, deep learning, and Internet ofThings.

Mr. Zhang is a member of the ACM.

Salil Kanhere (S’00–M’03–SM’11) received thePh.D. degree from Drexel University, Philadelphia,PA, USA.

He is an Associate Professor with the Schoolof Computer Science and Engineering, Universityof New South Wales, Kensington, NSW, Australia.He has authored or co-authored 170 peer-reviewedpapers and delivered over 20 tutorials and keynotetalks. His current research interests include theInternet of Things, pervasive computing, crowdsourcing, sensor networks, and security.

Dr. Kanhere was a recipient of the Humboldt Research Fellowship. He isa member of the ACM.

Michael Sheng (M’02) received the Ph.D. degree incomputer science from the University of New SouthWales (UNSW), Kensington, NSW, Australia.

He was a Post-Doctoral Research Scientist withthe CSIRO ICT Centre, Canberra, ACT, Australia.He spent ten years with the School of ComputerScience, University of Adelaide, Adelaide, SA,Australia. He is a Full Professor and the Head of theDepartment of Computing, Macquarie University,Sydney, NSW. From 1999 to 2001, he was also aVisiting Research Fellow with UNSW.

Yunhao Liu (M’04–SM’06–F’15) received the B.S.degree from the Automation Department, TsinghuaUniversity, Beijing, China, the M.A. degree fromBeijing Foreign Studies University, Beijing, and theM.S. and Ph.D. degrees in computer science andengineering from Michigan State University, EastLansing, MI, USA.

He is currently an MSU Foundation Professor andthe Chairperson with the Department of ComputerScience and Engineering, Michigan State University.He holds the Chang Jiang Chair Professorship (No

Pay Leave) with Tsinghua University.

Authorized licensed use limited to: Michigan State University. Downloaded on July 13,2021 at 14:48:43 UTC from IEEE Xplore. Restrictions apply.