{"title": "Dynamic Bayesian Networks for Brain-Computer Interfaces", "book": "Advances in Neural Information Processing Systems", "page_first": 1265, "page_last": 1272, "abstract": null, "full_text": "                Dynamic Bayesian Networks for\n                     Brain-Computer Interfaces\n\n\n\n                 Pradeep Shenoy                               Rajesh P. N. Rao\n        Department of Computer Science                Department of Computer Science\n            University of Washington                      University of Washington\n                Seattle, WA 98195                            Seattle, WA 98195\n      pshenoy@cs.washington.edu                        rao@cs.washington.edu\n\n\n\n\n                                          Abstract\n\n         We describe an approach to building brain-computer interfaces (BCI)\n         based on graphical models for probabilistic inference and learning. We\n         show how a dynamic Bayesian network (DBN) can be used to infer\n         probability distributions over brain- and body-states during planning and\n         execution of actions. The DBN is learned directly from observed data\n         and allows measured signals such as EEG and EMG to be interpreted in\n         terms of internal states such as intent to move, preparatory activity, and\n         movement execution. Unlike traditional classification-based approaches\n         to BCI, the proposed approach (1) allows continuous tracking and predic-\n         tion of internal states over time, and (2) generates control signals based\n         on an entire probability distribution over states rather than binary yes/no\n         decisions. We present preliminary results of brain- and body-state es-\n         timation using simultaneous EEG and EMG signals recorded during a\n         self-paced left/right hand movement task.\n\n\n\n1    Introduction\n\nThe problem of building a brain-computer interface (BCI) has received considerable atten-\ntion in recent years. Several researchers have demonstrated the feasibility of using EEG\nsignals as a non-invasive medium for building human BCIs [1, 2, 3, 4, 5] (see also [6] and\narticles in the same issue). A central theme in much of this research is the postulation of\na discrete brain state that the user maintains while performing one of a set of physical or\nimagined actions. The goal is to decode the hidden brain state from the observable EEG\nsignal, and to use the decoded state to control a robot or a cursor on a computer screen.\n\nMost previous approaches to BCI (e.g., [1, 2, 4]) have utilized classification methods ap-\nplied to time slices of EEG data to discriminate between a small set of brain states (e.g., left\nversus right hand movement). These methods typically involve various forms of prepro-\ncessing (such as band-pass filtering or temporal smoothing) as well as feature extraction on\ntime slices known to contain one of the chosen set of brain states. The output of the clas-\nsifier is typically a yes/no decision regarding class membership. A significant drawback of\nsuch an approach is the need to have a \"point of reference\" for the EEG data, i.e., a synchro-\nnization point in time where the behavior of interest was performed. Also, classifier-based\napproaches typically do not model the uncertainty in their class estimates. As a result, it\n\n\f\nis difficult to have a continuous estimate of the brain state and to associate an uncertainty\nwith the current estimate.\n\nIn this paper, we propose a new framework for BCI based on probabilistic graphical mod-\nels [7] that overcomes some of the limitations of classification-based approaches to BCI.\nWe model the dynamics of hidden brain- and body-states using a Dynamic Bayesian Net-\nwork (DBN) that is learned directly from EEG and EMG data. We show how a DBN can be\nused to infer probability distributions over hidden state variables, where the state variables\ncorrespond to brain states useful for BCI (such as \"Intention to move left hand\", \"Left hand\nin motion\", etc). Using a DBN gives us several advantages in addition to providing a contin-\nuous probabilistic estimate of brain state. First, it allows us to explicitly model the hidden\ncausal structure and dependencies between different brain states. Second, it facilitates the\nintegration of information from multiple modalities such as EEG and EMG signals, allow-\ning, for example, EEG-derived estimates to be bootstrapped from EMG-derived estimates.\nIn addition, learning a dynamic graphical model for time-varying data such as EEG allows\nother useful operations such as prediction, filling in of missing data, and smoothing of state\nestimates using information from future data points. These capabilities are difficult to ob-\ntain while working exclusively in the frequency domain or using whole slices of the data\n(or its features) for training classifiers. We illustrate our approach in a simple Left versus\nRight hand movement task and present preliminary results showing supervised learning and\nBayesian inference of hidden state for a dataset containing simultaneous EEG and EMG\nrecordings.\n\n\n2    The DBN Framework\n\nWe study the problem of modeling spontaneous movement of the left/right arm using EEG\nand EMG signals. It is well known that EEG signals show a slow potential drift prior to\nspontaneous motor activity. This potential drift, known as the Bereitschaftspotential (BP,\nsee [8] for an excellent survey), shows variation in distribution over scalp with respect to\nthe body part being moved. In particular, the BP related to movement of left versus right\narm shows a strong lateral asymmetry. This allows one to not only estimate the intent to\nmove prior to actual movement, but also distinguish between left and right movements.\nPrevious approaches [1, 2] have utilized BP signals in classification-based BCI protocols\nbased on synchronization cues that identify points of movement onset. In our case, the\nchallenge was to model the structure of BPs and related movement signals using the states\nof the DBN, and to recognize actions without explicit synchronization cues.\n\nFigure 1 shows the complete DBN (referred to as Nfull in this paper) used to model the left-\nright hand movement task. The hidden state Bt in Figure 1(a) tracks the higher-level brain\nstate over time and generates the hidden EEG and EMG states Et and Mt respectively.\nThese hidden states in turn generate the observed EEG and EMG signals. The dashed\narrows indicate that the hidden states make transitions over time. As shown in Figure 1(b),\nthe state Bt is intended to model the high-level intention of the subject. The figure shows\nboth the values Bt can take as well the constraints on the transition between values. The\nactual probabilities of the allowed transitions are learned from data.\n\nThe hidden states Et and Mt are intended to model the temporal structure of the EEG and\nEMG signals, which are generated using a mixture of Gaussians conditioned on Et and\nMt respectively. In the same way as the values of Bt are customized for our particular\nexperiment, we would like the state transitions of Et and Mt to also reflect their respective\nconstraints. This is important since it allows us to independently learn the simpler DBN\nNemg consisting of only the node Mt and the observed EMG signal. Similarly, we can\nalso independently learn the model Neeg consisting of the node Et and the observed EEG\nsignal. We use the models shown in Figure 2 for allowed transitions of the states Mt and Et\nrespectively. In particular, Figure 2(a) indicates that the EMG state can transition along one\n\n\f\n                                                                                             transition\n                                                                                                                                                                                                                              Left        Left           Post\n                                                                             B                                                 B\n                                                                             t                                                      t+1                                                                                                   Movt           Movt\n                                                                                                                                                                                                                             Intent\n\n\n\n                                                            E                                                      E\n                                                             t                               transition             t+1                                                                                             Rest\n\n                                                                                  M                                                        M\n                                                                                   t                                                                                                                 t+1\n\n\n\n                                                                                                                                                                                                                               Rt          Rt            Post\n                                                                                                                                                                                                                             Intent       Movt           Movt\n                                                           EEG                    EMG                              EEG                     EMG\n                                                                   t                    t                               t+1                                                                            t+1\n\n\n\n\n                                                                                  (a) The Complete Network                                                                                                                  (b) Allowed Brain States  \n                                                                                                                                                                                                                                                               Bt\n\n\n\n\n\nFigure 1: Dynamic graphical model for modeling brain and body processes in a self-\npaced movement task: (a) At each time instant t, the brain state Bt generates the EEG\nand EMG internal states Et and Mt respectively, which in turn generate the observed EEG\nand EMG. The dotted arrows represent transitions to a state at the next time step. (b) The\ntransition graph for the brain state Bt. The probability of each allowed transition is learned\nfrom input data.\n\n\nof three chains of states (labeled (1), (2), and (3)), representing the rest state, a left-hand\naction and a right-hand action respectively. In each chain, the state Mt in each time step\neither retains its old value with a given probability (self-pointing arrow) or transitions to the\nnext state value in that particular chain. The transition graph of Figure 2(b) shows similar\nconstraints on the EEG, except that the left and right action chains are further partitioned\ninto intent, action, and post-action subgroups of states, since each of these components are\ndiscernible from the BP in EEG (but not from EMG) signals.\n\n\n                                                                                                                                                                                                                                                (chain of states)\n\n                                                                                                      (chain of states)                                                                                        e                          LI             LM          LPM\n                                                                                                                                                                                                                    1\n                                                                  m                          m                                 m            )\n                                                                        1                      p+1                             q                 s\n )                                                                                                                                                                                                                                                (2)\n      s                                                                                                                                               te\n                                                                                                       (2)\n           te                                                                                                                                               ta\n                 ta                                                                                                                                               f s                                         (1)\n                       f s                                        (1)                                                                                                     o                                                      e\n                               o                                                                                                                                                                                                     0\n                                                                                   m                                                                                           in\n                                                                                        0\n                                    in                                                                                                                                               a\n                                          a                                                                                                                                               h\n                                               h                                                                                                                                               (c\n                                                    (c                                                                                                                                                                                            (3)\n                                                                                                       (3)                                                                                                    ek\n                                                             m                                                                                                                                                                            RI\n                                                                  p                          m                                 m                                                                                                                         RM          RPM\n                                                                                               q+1                                  r\n\n                                                                                                  (chain of states)                                                                                                                             (chain of states)\n                                                                  (a) Transition Constraints on  \n                                                                                                              M                                                                                                     (b) Transition Constraints on  \n                                                                                                                                                                                                                                                         E\n                                                                                                              t                                                                                                                                           t\n\n\n\n\n\nFigure 2: Constrained transition graphs for the hidden EMG and EEG states Et and\nMt respectively. (a) The EMG state transitions between its values mi are constrained to\nbe in one of three chains: the chains model (1) rest, (2) left arm movement, and (3) right\narm movement. (b) In the EEG state transition graph, the left and right movement chains\nare further divided into state values encoding intent (LI/RI), movement (LM/RM), and post\nmovement (LPM/RPM).\n\n\n\n3                                                         Experiments and Results\n\n3.1                                                       Data Collection and Processing\n\nThe task: The subject pressed two distinct keys on a keyboard with the left hand or right\n\n\f\nhand at random at a self-initiated pace. We recorded 8 EEG channels around the motor area\nof cortex (C3, Cz, C4, FC1, FC2, CP1, CP2, Pz) using averaged ear electrodes as reference,\nand 2 differential pairs of EMG (one on each arm). Data was recorded at 2048Hz for a\nperiod of 20 minutes, with the movements being separated by approximately 3-4s.\n\n               Average for Left Hand                    Average for Right Hand\n\n                                                   4\n          2\n                                                   2\n          0\n                                                   0\n        -2\n                                                  -2\n        -4\n                                        C3        -4                              C3\n        -6                              C4                                        C4\n                                                  -6\n                -0.5       0     0.5      1               -0.5      0      0.5      1\n                         Time                                     Time\n\n\nFigure 3: Movement-related potential drift recorded during the hand-movement task:\nThe two plots show the EEG signals averaged over all trials from the motor-related channels\nC3 and C4 for left (left panel) and right hand movement (right panel). The averages indicate\nthe onset and laterality of upcoming movements.\n\nProcessing: The EEG channels were bandpass-filtered 0.5Hz-5Hz, before being downsam-\npled and smoothed at 128Hz. The EMG channels were converted to RMS values computed\nover windows for an effective sampling rate of 128Hz.\n\nData Analysis: The recorded data were first analyzed in the traditional manner by aver-\naging across all trials. Figure 3 shows the average of EEG channels C3 and C4 for left\nand right hand movement actions respectively. As can be seen, the averages for both chan-\nnels are different for the two classes. Furthermore, there is a slow potential drift preceding\nthe action and a return to the baseline potential after the action is performed. Previous\nresearchers [1] have classified EEG data over a window leading up to the instant of action\nwith high accuracy (over 90%) into left or right movement classes. Thus, there appears to\nbe a reliable amount of information in the EEG signal for at least discriminating between\nleft versus right movements.\n\nData Evaluation using SVMs: To obtain a baseline and to evaluate the quality of our\nrecorded data, we tested the performance of linear support vector machines (SVMs) on\nclassifying our EEG data into left and right movement classes. The choice of linear SVMs\nwas motivated by their successful use on similar problems by other researchers [1]. Time\nslices of 0.5 seconds before each movement were concatenated from all EEG channels and\nused for classification. We performed hyper-parameter selection using leave-one-out cross-\nvalidation on 15 minutes of data and obtained an error of 15% on the remaining 5 minutes\nof data. Such an error rate is comparable to those obtained in previous studies on similar\ntasks, suggesting that the recorded data contains sufficient movement-related information\nto be tested in experiments involving DBNs.\n\nLearning the parameters of the DBN: We used the Graphical Models Toolkit\n(GMTK) [9] for learning the parameters of our DBN. GMTK provides support for express-\ning constraints on state transitions (as described in Section 2). It learns the constrained\nconditional probability tables and the parameters for the mixture of Gaussians using the\nexpectation-maximization (EM) algorithm.\n\nWe constructed a supervisory signal from the recorded key-presses as follows: A period of\n\n\f\n100ms around each keystroke was labeled \"motor action\" for the appropriate hand. This\nsignal was used to train the network Nemg in a supervised manner. To generate a super-\nvisory signal for the network Neeg, or the full combined network Nfull (Figure 1), we\nadded prefixes and postfixes of 150ms each to each action in this signal, and labeled them\n\"preparatory\" and \"post-movement\" activity respectively. These time-periods were chosen\nby examining the average EEG and EMG activity over all actions. Thus, we can use partial\n(EEG only) or full evidence in the inference step to obtain probability distributions over\nbrain state. The following sections describe our learning procedure and inference results in\ngreater detail.\n\n\n\n3.2    Learning and Inference with EMG\n\n\nOur first step is to learn the simpler model Nemg that has only the hidden Mt state and the\nobserved EMG signal. This is to test inference using the EMG signal alone. The parameters\nof this DBN were learned in a supervised manner.\n\nWe used 15 minutes of EMG data to train our simplified model, and then tested it on the\nremaining 5 minutes of data. The model was tested using Viterbi decoding (a single pass\nof max-product inference over the network). In other words, the maximum a posteriori\n(MAP) sequence of values for hidden states was computed. Figure 4 shows a 100s slice of\ndata containing 2 channels of EMG, and the predicted hidden EMG state Mt. The states 0,\n1 and 2 correspond to \"no action\", left, and right actions respectively. In the shown figure,\nthe state Mt successfully captures not only all the obvious arm movements but also the\nactions that are obscured by noise.\n\n\n\n3.3    Learning the EEG Model\n\n\nWe used the supervisory signal described earlier to learn the corresponding EEG model\nNeeg. Note that the brain-state can be inferred from the hidden EEG state Et directly, since\nthe state space is appropriately partitioned as shown in Figure 2(b).\n\nFigure 5 shows the result of inference on the learned model Neeg using only the EEG\nsignals as evidence. The figure shows a subset of the EEG channels (C3,Cz,C4), the super-\nvisory signal, and the predicted brain state Bt (the MAP estimate). The figure shows that\nmany of the instances of action (but not all) are correctly identified by the model.\n\nOur model gives us at each time instant a MAP-estimated state sequence that best describes\nthe past, and the probability associated with that state sequence. This gives us, at each time\ninstant, a measure of how likely each brain state Bt is, with reference to the others. For\nconvenience, we can use the probability associated with the REST state (see Figure 1) as\nreference. Figure 6 shows a graphical illustration of this instantaneous time estimate. The\nplotted graphs are, in order, the supervisory signal (i.e., the \"ground truth value\") and the\ninstantaneous measures of likelihood of intention/movement/post-movement states for the\nleft and right hand respectively. For convenience, we represent the likelihood ratio of each\nstate's MAP probability estimate to that of the rest state, and use a logarithmic scale. We\nsee that the true hand movements are correctly inferred in a surprisingly large number of\ncases (log likelihood ratio crosses 0). Furthermore, the actual likelihood values convey a\nmeasure of the uncertainty in the inference, a property that would be of great value for\ncritical BCI applications such as controlling a robotic wheelchair.\n\nIn summary, our graphical models Nemg and Neeg have shown promising results in cor-\nrectly identifying movement onset from EMG and EEG signals respectively. Ongoing work\nis focused on improving accuracy by using features extracted from EEG, and inference us-\ning both EEG and EMG in Nfull (the full model).\n\n\f\n                                            14\n                                            12\n                                            10\n                                                   8\n                                                   6\n                                                   4\n                                                   2\n         Left Hand EMG\n                                                                 10    20    30    40    50      60    70    80    90    100\n\n\n\n                                            30\n\n                                            20\n\n                                            10\n\n                          Right Hand EMG\n                                                                 10    20    30    40    50      60    70    80    90    100\n\n                                                   2\n\n\n\n                                                   1\n\n\n                                            Predicted State 0\n                                                                 10    20    30    40    50      60    70    80    90    100\n                                                                                    Time (seconds)\n\n\n\n\n\nFigure 4: Bayesian Inference of Movement using EMG: The figure shows 100 seconds of\nEMG data from two channels along with the MAP state sequence predicted by our trained\nEMG model. The states 0,1,2 correspond to \"no action\", left, and right actions respectively.\nOur model correctly identifies the obscured spikes in the noisy right EMG channel\n\n\n\n4    Discussion and Conclusion\n\n\nWe have shown that dynamic Bayesian networks (DBNs) can be used to model the tran-\nsitions between brain- and muscle-states as a subject performs a motor task. In particular,\na two-level hierarchical network was proposed for simultaneously estimating higher-level\nbrain state and lower-level EEG and EMG states in a left/right hand movement task. The\nresults demonstrate that for a self-paced movement task, hidden brain states useful for BCI\nsuch as intention to move the left or right hand can be decoded from a DBN learned directly\nfrom EEG and EMG data.\n\nPrevious work on BCIs can be grouped into two broad classes: self-regulatory BCIs and\nBCIs based on detecting brain state. Self-regulatory BCIs rely on training the user to regu-\nlate certain features of the EEG, such as cortical positivity [10], or oscillatory activity (the\n rhythm, see [5]), in order to control, for example, a cursor on a display. The approach\npresented in this paper falls in the second class of BCIs, those based on detecting brain\nstates [1, 2, 3, 4]. However, rather than employing classification methods, we use proba-\nbilistic graphical models for inferring brain state and learning the transition probabilities\nbetween brain states.\n\nSuccessfully learning a dynamic graphical model as suggested in this paper offers several\nadvantages over traditional classification-based schemes for BCI. It allows one to explic-\nitly model the hidden causal structure and dependencies between different brain states. It\nprovides a probabilistic framework for integrating information from multiple modalities\n\n\f\n                  2\n\n\n\n                  0\n\n\n\n                 -2\n           C3 0              1000    2000    3000    4000    5000    6000    7000    8000\n                  2\n\n\n\n                  0\n\n\n\n                 -2\n           Cz          0     1000    2000    3000    4000    5000    6000    7000    8000\n\n                  2\n\n\n\n                  0\n\n\n\n                 -2\n          C4           0     1000    2000    3000    4000    5000    6000    7000    8000\n\n                  6\n\n\n                  4\n\n\n                  2\n\n\n                  00         1000    2000    3000    4000    5000    6000    7000    8000\n         True Brain State\n                  6\n\n\n                  4\n\n\n                  2\n\n\n                  00         1000    2000    3000    4000    5000    6000    7000    8000\n         Predicted Brain State\n\n\n\n\nFigure 5: Bayesian Inference of Brain State using EEG: The figure shows 1 minute of\nEEG data (at 128Hz) for the channels C3, Cz, C4, along with the \"true\" brain state and\nthe brain state inferred using our DBN model with only EEG evidence. State 0 is the rest\nstate, states 1 through 3 represent left hand movement, and 4 through 6 represent right hand\nmovement (see Figure 1(b)).\n\n\n\nsuch as EEG and EMG signals, allowing, for example, EEG-derived estimates to be boot-\nstrapped from EMG-derived estimates. A dynamic graphical model for time-varying data\nsuch as EEG also allows prediction, filling in of missing data, and smoothing of state esti-\nmates using information from future data points, properties not easily achieved in methods\nthat work exclusively in the frequency domain or use data slices for training classifiers. Our\ncurrent efforts are focused on investigating methods for learning dynamic graphical models\nfor motor tasks of varying complexity and using these models to build robust, probabilistic\nBCI systems.\n\n\nReferences\n\n [1] B. Blankertz, G. Curio, and K.R. Mueller. Classifying single trial EEG: Towards\n     brain computer interfacing. In Advances in Neural Information Processing Systems\n     12, 2001.\n\n [2] G. Dornhege, B. Blankertz, G. Curio, and K.-R. Mueller. Combining features for\n     BCI. In Advances in Neural Information Processing Systems 15, 2003.\n\n [3] J. D. Bayliss and D. H. Ballard. Recognizing evoked potentials in a virtual environ-\n     ment. In Advances in Neural Information Processing Systems 12, 2000.\n\n [4] P. Meinicke, M. Kaper, F. Hoppe, M. Heumann, and H. Ritter. Improving transfer\n     rates in brain computer interfacing: a case study. In Advances in Neural Information\n     Processing Systems 15, 2003.\n\n [5] J.R. Wolpaw, D.J. McFarland, and T.M. Vaughan. Brain-computer interfaces for com-\n     munication and control. IEEE Trans Rehab Engg, pages 222226, 2000.\n\n\f\n          6\n\n\n          4\n\n\n          2\n\n\n          00             500     1000     1500            2000          2500     3000     3500             4000\n                                                  Supervisory Signal\n\n          20\n\n\n               0\n\n\n         -20\n\n\n         -40\n\n\n         -60\n\n\n         -80                                                                                       zero\n                    0     500     1000     1500             2000         2500     3000     3500             4000\n                                                                                                   pre\n                                          Left action Log(P(state)/P(rest))                        movt\n                                                                                                   post\n\n          20\n\n\n               0\n\n\n         -20\n\n\n         -40\n\n\n         -60                                                                                       zero\n                                                                                                   pre\n         -80                                                                                       movt\n                    0     500     1000     1500             2000         2500     3000     3500    post     4000\n                                          Right action Log(P(state)/P(rest))\n\n\n\n\nFigure 6: Probabilistic Estimation of Brain State: The figure shows the supervisory\nsignal, along with a probabilistic measure of the current state for left and right actions\nrespectively. The measure shown is the log ratio of the instantaneous MAP estimate for the\nrelevant state and the estimate for the rest state.\n\n\n [6] J. R. Wolpaw et al. Brain-computer interface technology: a review of the first inter-\n     national meeting. IEEE Trans Rehab Engg, 8:164173, 2000.\n\n [7] R. E. Neapolitan. Learning Bayesian Networks. Prentice Hall, NJ, 2004.\n\n [8] M. Jahanshahi and M. Hallet. The Bereitschaftspotential: movement related cortical\n     potentials. Kluwer Academic, New York, 2002.\n\n [9] J. Bilmes and G. Zweig. The graphical models toolkit: An open source software sys-\n     tem for speech and time-series processing. In IEEE Intl. Conf. on Acoustics, Speech,\n     and Signal Processing, Orlando FL, 2002.\n\n[10] N. Birbaumer, N. Ghanayim, T. Hinterberger, I. Iverson, B. Kotchubey, A. Kiibler,\n     J. Perelmouter, E. Taub, and H. Flor. A spelling device for the paralyzed. In Nature,\n     398: 297-298, 1999.\n\n\f\n", "award": [], "sourceid": 2664, "authors": [{"given_name": "Pradeep", "family_name": "Shenoy", "institution": null}, {"given_name": "Rajesh", "family_name": "Rao", "institution": null}]}