<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="research-article">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">Front. Neurosci.</journal-id>
<journal-title>Frontiers in Neuroscience</journal-title>
<abbrev-journal-title abbrev-type="pubmed">Front. Neurosci.</abbrev-journal-title>
<issn pub-type="epub">1662-453X</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="doi">10.3389/fnins.2021.552666</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Neuroscience</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Contextual MEG and EEG Source Estimates Using Spatiotemporal LSTM Networks</article-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name><surname>Dinh</surname> <given-names>Christoph</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="aff" rid="aff3"><sup>3</sup></xref>
<xref ref-type="corresp" rid="c001"><sup>&#x002A;</sup></xref>
<xref ref-type="author-notes" rid="fn002"><sup>&#x2020;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/1048578/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Samuelsson</surname> <given-names>John G.</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
<xref ref-type="aff" rid="aff5"><sup>5</sup></xref>
<xref ref-type="author-notes" rid="fn002"><sup>&#x2020;</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/646328/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Hunold</surname> <given-names>Alexander</given-names></name>
<xref ref-type="aff" rid="aff6"><sup>6</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/95457/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>H&#x00E4;m&#x00E4;l&#x00E4;inen</surname> <given-names>Matti S.</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/79954/overview"/>
</contrib>
<contrib contrib-type="author">
<name><surname>Khan</surname> <given-names>Sheraz</given-names></name>
<xref ref-type="aff" rid="aff1"><sup>1</sup></xref>
<xref ref-type="aff" rid="aff2"><sup>2</sup></xref>
<xref ref-type="aff" rid="aff4"><sup>4</sup></xref>
<uri xlink:href="http://loop.frontiersin.org/people/64066/overview"/>
</contrib>
</contrib-group>
<aff id="aff1"><sup>1</sup><institution>Athinoula A. Martinos Center for Biomedical Imaging, Massachusetts General Hospital</institution>, <addr-line>Charlestown, MA</addr-line>, <country>United States</country></aff>
<aff id="aff2"><sup>2</sup><institution>Department of Radiology, Massachusetts General Hospital (MGH)</institution>, <addr-line>Charlestown, MA</addr-line>, <country>United States</country></aff>
<aff id="aff3"><sup>3</sup><institution>Institute for Medical Engineering, Research Campus STIMULATE, Otto-von-Guericke University</institution>, <addr-line>Magdeburg</addr-line>, <country>Germany</country></aff>
<aff id="aff4"><sup>4</sup><institution>Harvard Medical School</institution>, <addr-line>Boston, MA</addr-line>, <country>United States</country></aff>
<aff id="aff5"><sup>5</sup><institution>Harvard-MIT Division of Health Sciences and Technology (HST), Massachusetts Institute of Technology</institution>, <addr-line>Cambridge, MA</addr-line>, <country>United States</country></aff>
<aff id="aff6"><sup>6</sup><institution>Institute of Biomedical Engineering and Informatics, Technische Universit&#x00E4;t Ilmenau</institution>, <addr-line>Ilmenau</addr-line>, <country>Germany</country></aff>
<author-notes>
<fn fn-type="edited-by"><p>Edited by: Miguel Castelo-Branco, Coimbra Institute for Biomedical Imaging and Translational Research (CIBIT), Portugal</p></fn>
<fn fn-type="edited-by"><p>Reviewed by: Alberto Sorrentino, University of Genoa, Italy; Th&#x00E9;odore Papadopoulo, Research Centre Inria Sophia Antipolis M&#x00E9;diterran&#x00E9;e, France; Annalisa Pascarella, Istituto per le Applicazioni del Calcolo &#x201C;Mauro Picone&#x201D; (IAC), Italy; Arpan Banerjee, National Brain Research Centre (NBRC), India</p></fn>
<corresp id="c001">&#x002A;Correspondence: Christoph Dinh, <email>christoph.dinh@mne-cpp.org</email></corresp>
<fn fn-type="other" id="fn002"><p><sup>&#x2020;</sup>These authors have contributed equally to this work</p></fn>
<fn fn-type="other" id="fn004"><p>This article was submitted to Brain Imaging Methods, a section of the journal Frontiers in Neuroscience</p></fn>
</author-notes>
<pub-date pub-type="epub">
<day>09</day>
<month>03</month>
<year>2021</year>
</pub-date>
<pub-date pub-type="collection">
<year>2021</year>
</pub-date>
<volume>15</volume>
<elocation-id>552666</elocation-id>
<history>
<date date-type="received">
<day>16</day>
<month>04</month>
<year>2020</year>
</date>
<date date-type="accepted">
<day>25</day>
<month>01</month>
<year>2021</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#x00A9; 2021 Dinh, Samuelsson, Hunold, H&#x00E4;m&#x00E4;l&#x00E4;inen and Khan.</copyright-statement>
<copyright-year>2021</copyright-year>
<copyright-holder>Dinh, Samuelsson, Hunold, H&#x00E4;m&#x00E4;l&#x00E4;inen and Khan</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/"><p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p></license>
</permissions>
<abstract>
<p>Most magneto- and electroencephalography (M/EEG) based source estimation techniques derive their estimates sample wise, independently across time. However, neuronal assemblies are intricately interconnected, constraining the temporal evolution of neural activity that is detected by MEG and EEG; the observed neural currents must thus be highly context dependent. Here, we use a network of Long Short-Term Memory (LSTM) cells where the input is a sequence of past source estimates and the output is a prediction of the following estimate. This prediction is then used to correct the estimate. In this study, we applied this technique on noise-normalized minimum norm estimates (MNE). Because the correction is found by using past activity (context), we call this implementation Contextual MNE (CMNE), although this technique can be used in conjunction with any source estimation method. We test CMNE on simulated epileptiform activity and recorded auditory steady state response (ASSR) data, showing that the CMNE estimates exhibit a higher degree of spatial fidelity than the unfiltered estimates in the tested cases.</p>
</abstract>
<kwd-group>
<kwd>MEG</kwd>
<kwd>EEG</kwd>
<kwd>source estimation</kwd>
<kwd>spatiotemporal source estimation</kwd>
<kwd>spatial filtering</kwd>
<kwd>grid-based Markov localization</kwd>
<kwd>LSTM</kwd>
<kwd>deep learning</kwd>
</kwd-group>
<contract-num rid="cn001">1U01EB023820</contract-num>
<contract-num rid="cn001">4R01EB009048</contract-num>
<contract-num rid="cn001">1R01NS104585</contract-num>
<contract-num rid="cn001">5P41EB015896</contract-num>
<contract-sponsor id="cn001">National Institutes of Health<named-content content-type="fundref-id">10.13039/100000002</named-content></contract-sponsor>
<contract-sponsor id="cn002">Microsoft<named-content content-type="fundref-id">10.13039/100004318</named-content></contract-sponsor>
<counts>
<fig-count count="7"/>
<table-count count="0"/>
<equation-count count="28"/>
<ref-count count="69"/>
<page-count count="15"/>
<word-count count="0"/>
</counts>
</article-meta>
</front>
<body>
<sec id="S1">
<title>Introduction</title>
<p>Magneto- and electroencephalography (M/EEG) have excellent sub-millisecond temporal resolution but limited spatial resolution. The most commonly used M/EEG distributed source estimation methods, e.g., MNE, dSPM, and sLORETA, are linear and source estimates are derived time-sample by time-sample, without considering the temporal sequence (<xref ref-type="bibr" rid="B28">Hamalainen and Ilmoniemi, 1994</xref>; <xref ref-type="bibr" rid="B11">Dale et al., 2000</xref>; <xref ref-type="bibr" rid="B51">Pascual-Marqui, 2002</xref>). In other words, these methods fit their source estimates directly to the sensor data without assuming any relationship between the neuronal current distributions across time. This inverse problem is ill-posed because different current distributions can produce the same or similar electric potentials and magnetic fields around the head as detected by the limited amount of M/EEG sensors (<xref ref-type="bibr" rid="B31">Helmholtz, 1853</xref>; <xref ref-type="bibr" rid="B30">H&#x00E4;m&#x00E4;l&#x00E4;inen et al., 1993</xref>). The ill-posedness of the inverse problem along with the low SNR in M/EEG recordings cause the limited spatial resolution of the MEG and EEG technologies (<xref ref-type="bibr" rid="B56">Samuelsson et al., 2020</xref>).</p>
<p>A few different approaches have been developed to deal with this ill-posedness. The most common approach involves penalty terms on the source amplitude (regularization) or constraints limiting the solution space of the inverse problem. Constraining the solution space can be achieved by, e.g., assuming spatial smoothness (<xref ref-type="bibr" rid="B52">Pascual-Marqui et al., 1994</xref>; <xref ref-type="bibr" rid="B16">Dinh et al., 2015</xref>, <xref ref-type="bibr" rid="B14">2018</xref>) or imposing focal estimates (<xref ref-type="bibr" rid="B21">Gorodnitsky et al., 1995</xref>). Bayesian methods that employ an estimated source covariance matrix as a prior have also been employed to restrict the solution space to sparse source reconstructions (<xref ref-type="bibr" rid="B53">Phillips et al., 2005</xref>; <xref ref-type="bibr" rid="B47">Mattout et al., 2006</xref>) or by computing posterior distributions based on hierarchical priors (<xref ref-type="bibr" rid="B57">Sato et al., 2004</xref>; <xref ref-type="bibr" rid="B48">Nummenmaa et al., 2007</xref>; <xref ref-type="bibr" rid="B9">Costa et al., 2017</xref>). These methods, however, commonly assume that the prior probability distribution of the sources is independent of time. This assumption ignores the temporal structure of the underlying neural activity that could be used to help reduce the ill-posedness of the inverse problem by constraining the solution space.</p>
<p>It is well-known that the human brain is intricately interconnected and several studies have shown that dynamic spatiotemporal interactions are central features of brain activity (<xref ref-type="bibr" rid="B38">Khan et al., 2015</xref>). For example, intracranial cortical recordings show strong local spatial correlations within 10 mm along the cortex (<xref ref-type="bibr" rid="B5">Bullock et al., 1995</xref>; <xref ref-type="bibr" rid="B12">Destexhe et al., 1999</xref>; <xref ref-type="bibr" rid="B43">Leopold et al., 2003</xref>) and physiologically motivated spatiotemporal models of neuronal networks have had success in explaining EEG and MEG data (<xref ref-type="bibr" rid="B27">Gross et al., 2001</xref>; <xref ref-type="bibr" rid="B37">Jirsa et al., 2002</xref>; <xref ref-type="bibr" rid="B66">Wright et al., 2003</xref>; <xref ref-type="bibr" rid="B35">Izhikevich and Edelman, 2008</xref>). These observations indicate that neural activity has a distinct spatiotemporal dynamics meaning that the brain state at any given time is a function of past brain activity, i.e., its context (<xref ref-type="bibr" rid="B40">Kozhemiako et al., 2020</xref>).</p>
<p>There have been efforts to include spatiotemporal dynamics in M/EEG source estimation but these methods have assumed certain constrained spatiotemporal interactions. One such example is the use of Bayesian source estimation methods that incorporate temporal smoothness constraints, which specify various prior distributions for the sources in space and time (<xref ref-type="bibr" rid="B3">Baillet and Garnero, 1997</xref>; <xref ref-type="bibr" rid="B26">Greensite, 2003</xref>; <xref ref-type="bibr" rid="B61">Somersalo et al., 2003</xref>; <xref ref-type="bibr" rid="B19">Friston et al., 2008</xref>; <xref ref-type="bibr" rid="B44">Limpiti et al., 2008</xref>; <xref ref-type="bibr" rid="B64">Trujillo-Barreto et al., 2008</xref>; <xref ref-type="bibr" rid="B69">Zumer et al., 2008</xref>; <xref ref-type="bibr" rid="B4">Bolstad et al., 2009</xref>; <xref ref-type="bibr" rid="B50">Ou et al., 2009</xref>; <xref ref-type="bibr" rid="B62">Sorrentino et al., 2009</xref>; <xref ref-type="bibr" rid="B46">Lucka et al., 2012</xref>; <xref ref-type="bibr" rid="B65">Vivaldi and Sorrentino, 2016</xref>; <xref ref-type="bibr" rid="B6">Calvetti et al., 2019</xref>). Mixed-Norm estimates have been introduced that impose spatial stationarity of the source estimates within a given time window and quasinorm penalties to promote spatial sparsity (<xref ref-type="bibr" rid="B22">Gramfort et al., 2012</xref>; <xref ref-type="bibr" rid="B24">Gramfort et al., 2013b</xref>; <xref ref-type="bibr" rid="B63">Strohmeier et al., 2014</xref>). Linear state-space models have also been employed that either apply temporally independent approximations (<xref ref-type="bibr" rid="B20">Galka et al., 2004</xref>) or a parametric approach (<xref ref-type="bibr" rid="B45">Long et al., 2011</xref>) to reduce their computational burden. Recent studies have introduced more realistic spatiotemporal dynamic models using Kalman filters, which take local cortical interactions into account (<xref ref-type="bibr" rid="B41">Lamus et al., 2012</xref>; <xref ref-type="bibr" rid="B54">Pirondini et al., 2018</xref>) by assuming a linear relationship between subsequent samples. This approach implicitly includes the estimation history but with the limiting assumption that past activity is linearly related to the subsequent activation and directly manifests in the source estimate. Although these models have shown promise, the potential of incorporating non-linear long range dynamic interactions without strict <italic>a priori</italic> assumptions to improve inverse solutions has remained largely unexplored.</p>
<p>Meanwhile, recent advances in machine learning have focused on sequential data sets, e.g., recurrent neural networks (RNN), enabling contextual data recognition (<xref ref-type="bibr" rid="B42">LeCun et al., 2015</xref>; <xref ref-type="bibr" rid="B58">Schmidhuber, 2015</xref>). These new contextual capabilities have been demonstrated to significantly improve classification accuracy in natural language processing (NLP) and have been successfully applied in, e.g., text and speech recognition (<xref ref-type="bibr" rid="B25">Graves et al., 2013</xref>; <xref ref-type="bibr" rid="B8">Chorowski et al., 2015</xref>). Although some studies have used machine learning techniques to classify various brain states or seizures based on MEG and particularly EEG data, most studies have done so in sensor space and the use of machine learning techniques in the M/EEG inverse problem has yet to be fully explored (<xref ref-type="bibr" rid="B33">Hofmann et al., 2018</xref>; <xref ref-type="bibr" rid="B2">Ali et al., 2019</xref>; <xref ref-type="bibr" rid="B68">Yu et al., 2019</xref>).</p>
<p>Here we investigate whether contextual machine learning techniques can be applied to reduce the ill-posedness of the M/EEG inverse problem, thus utilizing the superior temporal resolution of M/EEG to increase the spatial fidelity of source estimates. This approach thus constitutes a spatiotemporal inverse method that is based on deep learning without too strong explicit <italic>a priori</italic> modeling assumptions, except for those intrinsic to MNE, which has been the main focus of previous spatiotemporal inverse methods. In our approach, source estimates are spatially filtered, or &#x201C;corrected,&#x201D; by a prediction that has been generated by a network of long short-term memory (LSTM) cells (<xref ref-type="bibr" rid="B32">Hochreiter and Schmidhuber, 1997</xref>) from a sequence of previous source estimates. LSTM cells constitute a special type of RNN which has consistently shown success when applied to data with a temporal structure, e.g., in natural language processing and grid-based markov localization problems, and is thus a suitable candidate for a spatiotemporal inverse operator.</p>
<p>In this study we implemented the technique together with noise-normalized minimum norm estimates (MNE), and therefore call this implementation Contextual Minimum Norm Estimates (CMNE). Importantly, this method can also be described in the framework of linear algebra, where the weighing vector is being updated in a time-dependent manner using the prior context. Conceptually, the main advantage of the CMNE approach over recursive Bayesian filters like the Kalman filter is that its model is not explicitly defined and can instead be learned from the data; RNNs are thus more general than Kalman filter approaches. We tested our CMNE implementation on simulated epileptiform and recorded M/EEG data from auditory steady state response (ASSR) experiments. An earlier preprint version of this work was posted at arXiv (<xref ref-type="bibr" rid="B15">Dinh et al., 2019</xref>).</p>
</sec>
<sec id="S2" sec-type="materials|methods">
<title>Materials and Methods</title>
<sec id="S2.SS1">
<title>Contextual Estimates</title>
<p>We begin by describing our method and the specific implementation used in this study. The implementation of the presented method can be found at <ext-link ext-link-type="uri" xlink:href="https://github.com/chdinh/cmne">https://github.com/chdinh/cmne</ext-link>. We then describe the data analysis and training of the LSTM network. We denote vectors and scalars by lowercase and matrices by uppercase characters.</p>
<p>M/EEG signals are linked to their neural sources by a time-invariant gain matrix <italic>G</italic>, which incorporates the forward model:</p>
<disp-formula id="S2.E1"><label>(1)</label><mml:math id="M1"><mml:mrow><mml:mrow><mml:msub><mml:mi>y</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mrow><mml:mi>G</mml:mi><mml:msub><mml:mi>x</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow><mml:mo>+</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
<p>where the vector <italic>y</italic><sub>t</sub> represents the sensor data at time <italic>t</italic>, the vector <italic>x</italic><sub>t</sub> represents the true source distribution, and <italic>n</italic><sub>t</sub> is the noise. In the following, we will be using the whitened measured signals <inline-formula><mml:math id="INEQ1"><mml:msub><mml:mover accent="true"><mml:mi>y</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub></mml:math></inline-formula> and whitened gain matrix <inline-formula><mml:math id="INEQ2"><mml:mover accent="true"><mml:mtext>G</mml:mtext><mml:mo stretchy="false">~</mml:mo></mml:mover></mml:math></inline-formula>,</p>
<disp-formula id="S2.E2"><label>(2)</label><mml:math id="M2"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>y</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:msubsup><mml:mi>C</mml:mi><mml:mi>n</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo>/</mml:mo><mml:mn>2</mml:mn></mml:mrow></mml:mrow></mml:msubsup><mml:msub><mml:mi>y</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:mrow></mml:math></disp-formula>
<p>and</p>
<disp-formula id="S2.E3"><label>(3)</label><mml:math id="M3"><mml:mrow><mml:mrow><mml:mover accent="true"><mml:mi>G</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mo>=</mml:mo><mml:mrow><mml:msubsup><mml:mi>C</mml:mi><mml:mi>n</mml:mi><mml:mrow><mml:mo>-</mml:mo><mml:mrow><mml:mn>1</mml:mn><mml:mo>/</mml:mo><mml:mn>2</mml:mn></mml:mrow></mml:mrow></mml:msubsup><mml:mi>G</mml:mi></mml:mrow></mml:mrow><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
<p>where <italic>C</italic><sub>n</sub> is the noise covariance matrix. Most source estimates <inline-formula><mml:math id="INEQ3"><mml:msub><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub></mml:math></inline-formula> are found by minimizing a cost function,</p>
<disp-formula id="S2.E4"><label>(4)</label><mml:math id="M4"><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mi>arg</mml:mi><mml:mrow><mml:munder><mml:mo movablelimits="false">min</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub></mml:munder><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:msubsup><mml:mrow><mml:mo fence="true">||</mml:mo><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>y</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:mrow><mml:mover accent="true"><mml:mi>G</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:msub><mml:mi>x</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo fence="true">||</mml:mo></mml:mrow><mml:mn>2</mml:mn><mml:mn>2</mml:mn></mml:msubsup><mml:mo>+</mml:mo><mml:mrow><mml:mi>f</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:mrow></mml:math></disp-formula>
<p>where the first term is the Euclidean norm of the difference between the measured data <inline-formula><mml:math id="INEQ4"><mml:msub><mml:mover accent="true"><mml:mi>y</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub></mml:math></inline-formula> and the predicted signal <inline-formula><mml:math id="INEQ5"><mml:mrow><mml:mover accent="true"><mml:mi>G</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> based on the model <inline-formula><mml:math id="INEQ6"><mml:mover accent="true"><mml:mi>G</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover></mml:math></inline-formula> and source distribution <italic>x</italic><sub>t</sub>, while <italic>f</italic>(<italic>x</italic><sub>t</sub>) incorporates <italic>a priori</italic> assumptions or regularization. In MNE, <inline-formula><mml:math id="INEQ8"><mml:mrow><mml:mrow><mml:mi>f</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:msup><mml:mi mathvariant="normal">&#x03BB;</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:msubsup><mml:mi>x</mml:mi><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow><mml:mi>T</mml:mi></mml:msubsup><mml:msubsup><mml:mi>C</mml:mi><mml:mrow><mml:mtext>R</mml:mtext></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub></mml:mrow></mml:mrow></mml:math></inline-formula>, where <italic>C</italic><sub>R</sub> is the source covariance matrix and &#x03BB;<sup>2</sup> is the Tikhonov regularization parameter, which was set to &#x03BB;<sup>2</sup> = 1/SNR<sup>2</sup> = 1/9, assuming an SNR of 3. The solution to this minimization problem can be written as a product of the measured data <inline-formula><mml:math id="INEQ10"><mml:msub><mml:mover accent="true"><mml:mi>y</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub></mml:math></inline-formula> and an inverse kernel <italic>K</italic>,</p>
<disp-formula id="S2.E5"><label>(5)</label><mml:math id="M5"><mml:mrow><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mi>K</mml:mi><mml:mover accent="true"><mml:msub><mml:mi>y</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>~</mml:mo></mml:mover></mml:mrow></mml:mrow><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
<disp-formula id="S2.E6"><label>(6)</label><mml:math id="M6"><mml:mrow><mml:mrow><mml:mi>K</mml:mi><mml:mo rspace="5.3pt">=</mml:mo><mml:mrow><mml:msub><mml:mi>C</mml:mi><mml:mi>R</mml:mi></mml:msub><mml:msup><mml:mover accent="true"><mml:mi>G</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mi>T</mml:mi></mml:msup><mml:mpadded width="-1.7pt"><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mrow><mml:mover accent="true"><mml:mi>G</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:msub><mml:mi>C</mml:mi><mml:mi>R</mml:mi></mml:msub><mml:msup><mml:mover accent="true"><mml:mi>G</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mi>T</mml:mi></mml:msup></mml:mrow><mml:mo>+</mml:mo><mml:mrow><mml:msup><mml:mi mathvariant="normal">&#x03BB;</mml:mi><mml:mn>2</mml:mn></mml:msup><mml:mi>I</mml:mi></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msup></mml:mpadded></mml:mrow></mml:mrow><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
<p>which is thus time-invariant and is applied sample-wise to compute the source estimate <inline-formula><mml:math id="INEQ11"><mml:msub><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub></mml:math></inline-formula> from each measurement <inline-formula><mml:math id="INEQ12"><mml:msub><mml:mover accent="true"><mml:mi>y</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub></mml:math></inline-formula>. In dynamic statistical parametric mapping (dSPM) (<xref ref-type="bibr" rid="B11">Dale et al., 2000</xref>), the inverse kernel <italic>K</italic> is normalized with respect to the noise energy mapped to each source;</p>
<disp-formula id="S2.E7"><label>(7)</label><mml:math id="M7"><mml:mrow><mml:mrow><mml:msub><mml:mi>K</mml:mi><mml:mrow><mml:mtext>dSPM</mml:mtext></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mtext>dSPM</mml:mtext></mml:mrow></mml:msub><mml:mi>K</mml:mi></mml:mrow></mml:mrow><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
<p>where <italic>W</italic><sub><italic>dSPM</italic></sub> is a diagonal matrix;</p>
<disp-formula id="S2.E8"><label>(8)</label><mml:math id="M8"><mml:mrow><mml:mrow><mml:msub><mml:mi>W</mml:mi><mml:msub><mml:mrow><mml:mtext>dSPM</mml:mtext></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub></mml:msub><mml:mo>=</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:msqrt><mml:mrow><mml:msub><mml:mtext>diag</mml:mtext><mml:mi>i</mml:mi></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mi>K</mml:mi><mml:msub><mml:mi>C</mml:mi><mml:mi>n</mml:mi></mml:msub><mml:msup><mml:mi>K</mml:mi><mml:mi>T</mml:mi></mml:msup></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msqrt></mml:mfrac></mml:mrow><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
<p>In this study, the dSPM estimates were rectified and then normalized by z-scoring;</p>
<disp-formula id="S2.E9"><label>(9)</label><mml:math id="M9"><mml:mrow><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:msub><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>-</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x03BC;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:msub><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mo>/</mml:mo><mml:mi mathvariant="normal">&#x03C3;</mml:mi></mml:mrow><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:msub><mml:mi>t</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:msub><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mrow><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
<p>In CMNE, the estimates are then reweighted with a time-dependent diagonal weighting matrix whose diagonal elements are the output of the LSTM network;</p>
<disp-formula id="S2.E10"><label>(10)</label><mml:math id="M10"><mml:mrow><mml:mrow><mml:msub><mml:mi>b</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:msubsup><mml:mi>W</mml:mi><mml:mi>t</mml:mi><mml:mrow><mml:mi>C</mml:mi><mml:mi>M</mml:mi><mml:mi>N</mml:mi><mml:mi>E</mml:mi></mml:mrow></mml:msubsup><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
<disp-formula id="S2.E11"><label>(11)</label><mml:math id="M11"><mml:mtable><mml:mtr><mml:mtd columnalign="center"><mml:mrow><mml:mrow><mml:mtext>diag</mml:mtext><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>W</mml:mi><mml:mi>t</mml:mi><mml:mrow><mml:mi>C</mml:mi><mml:mi>M</mml:mi><mml:mi>N</mml:mi><mml:mi>E</mml:mi></mml:mrow></mml:msubsup><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mo>|</mml:mo><mml:mrow><mml:mtext>LSTM</mml:mtext><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mo>{</mml:mo><mml:msub><mml:mi>b</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>}</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mo rspace="5.3pt">,</mml:mo><mml:mi mathvariant="normal">&#x2026;</mml:mi><mml:mo rspace="5.3pt">,</mml:mo><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:mrow></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>|</mml:mo></mml:mrow></mml:mrow></mml:mtd></mml:mtr><mml:mtr><mml:mtd columnalign="center"><mml:mrow><mml:mrow><mml:mi/><mml:mo>/</mml:mo><mml:mpadded width="-1.7pt"><mml:msub><mml:mrow><mml:mrow><mml:mi>max</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mo>|</mml:mo><mml:mrow><mml:mtext>LSTM</mml:mtext><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mo>{</mml:mo><mml:msub><mml:mi>b</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>}</mml:mo></mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mo rspace="5.3pt">,</mml:mo><mml:mi mathvariant="normal">&#x2026;</mml:mi><mml:mo rspace="5.3pt">,</mml:mo><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:mrow></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>|</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo fence="true">|</mml:mo></mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mo>&#x2265;</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:mpadded></mml:mrow><mml:mo>,</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math>
</disp-formula>
<disp-formula id="S2.E12"><label>(12)</label><mml:math id="M12"><mml:mrow><mml:msubsup><mml:mi>W</mml:mi><mml:mi>t</mml:mi><mml:mrow><mml:mi>C</mml:mi><mml:mi>M</mml:mi><mml:mi>N</mml:mi><mml:mi>E</mml:mi></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mi>I</mml:mi><mml:mo fence="true">|</mml:mo></mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mo>=</mml:mo><mml:mn>0</mml:mn><mml:mo>.</mml:mo><mml:mo>.</mml:mo><mml:mi>k</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mrow></mml:math></disp-formula>
<p>where <italic>b</italic><sub>t</sub> is the final contextual estimate, LSTM is our network of LSTM cells, <italic>k</italic> is the number of LSTM cells in our network, which is a hyperparameter, and <inline-formula><mml:math id="INEQ13"><mml:msubsup><mml:mi>W</mml:mi><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow><mml:mrow><mml:mi>C</mml:mi><mml:mi>M</mml:mi><mml:mi>N</mml:mi><mml:mi>E</mml:mi></mml:mrow></mml:msubsup></mml:math></inline-formula> is a diagonal matrix whose diagonal entries is the prediction output of the LSTM network after the first <italic>k</italic> time steps, when the LSTM network has sufficient history to make a prediction, and the identity matrix before then. After the first <italic>k</italic> timesteps, the CMNE estimate itself is used as input to the LSTM network, forming a Markov chain;</p>
<disp-formula id="S2.E13"><label>(13)</label><mml:math id="M13"><mml:mrow><mml:mrow><mml:msub><mml:mi>b</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:msubsup><mml:mi>W</mml:mi><mml:mi>t</mml:mi><mml:mrow><mml:mi>C</mml:mi><mml:mi>M</mml:mi><mml:mi>N</mml:mi><mml:mi>E</mml:mi></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>b</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>=</mml:mo><mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mo>,</mml:mo><mml:mi mathvariant="normal">&#x2026;</mml:mi><mml:mo>,</mml:mo><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mi>k</mml:mi></mml:mrow></mml:mrow></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:mrow><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
<p>In this approach, we thus use two spatial filters, first the filter found by the inverse of the noise covariance matrix (dSPM) and secondly the spatial filter given by the LSTM prediction which contains the contextual information. These two filters serve different functionalities; dSPM gives statistical scores with respect to the baseline while keeping the weights static. In contrast, the CMNE weights are updated in a recursive fashion. This algorithm is illustrated in <xref ref-type="fig" rid="F1">Figure 1</xref>.</p>
<fig id="F1" position="float">
<label>FIGURE 1</label>
<caption><p>Schematic illustration of CMNE outlining the major steps. (1) M/EEG data are measured, saved and processed as per standard protocol. (2) Based on the measurement data <italic>y</italic><sub><italic>t</italic></sub>, a source estimate <inline-formula><mml:math id="INEQ14"><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub></mml:math></inline-formula> is found by dSPM. (3) The dSPM source estimate <inline-formula><mml:math id="INEQ15"><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub></mml:math></inline-formula> is corrected by a prediction <inline-formula><mml:math id="INEQ16"><mml:mrow><mml:mover accent="true"><mml:mi>b</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> of what the estimate is expected to be based upon previous activations. This prediction <inline-formula><mml:math id="INEQ17"><mml:mrow><mml:mover accent="true"><mml:mi>b</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> is found by an LSTM network (explained in step 5). The correction is an elementwise product &#x2217; of the source estimate <inline-formula><mml:math id="INEQ18"><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub></mml:math></inline-formula> and the prediction <inline-formula><mml:math id="INEQ19"><mml:mrow><mml:mover accent="true"><mml:mi>b</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>, and the resulting product <inline-formula><mml:math id="INEQ20"><mml:mrow><mml:mi>b</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> is the CMNE estimate: <inline-formula><mml:math id="INEQ21"><mml:mrow><mml:mrow><mml:mi>b</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>&#x2217;</mml:mo><mml:mover accent="true"><mml:mi>b</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:math></inline-formula>. (4) The CMNE estimate <inline-formula><mml:math id="INEQ22"><mml:mrow><mml:mi>b</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> is put into a stack together with the k previous activations <inline-formula><mml:math id="INEQ23"><mml:mrow><mml:mi>b</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mrow><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mi>k</mml:mi></mml:mrow><mml:mo>:</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>. (5) This stack of previous CMNE estimates is given to the LSTM network to predict the next activation <inline-formula><mml:math id="INEQ24"><mml:mrow><mml:mover accent="true"><mml:mi>b</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mrow><mml:mi>t</mml:mi><mml:mo>+</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>. This forms an iterative circle, i.e., a Markov chain (MC) (<xref ref-type="bibr" rid="B13">Dinh, 2015</xref>). In the first <italic>k</italic> time steps there is not enough prior history to make a prediction and the dSPM estimates are therefore not corrected and used as input to the LSTM network instead of the CMNE estimates.</p></caption>
<graphic xlink:href="fnins-15-552666-g001.tif"/>
</fig>
<p>The employed LSTM network consists of an LSTM cell sequence, shown in <xref ref-type="fig" rid="F2">Figure 2</xref>, where each cell <italic>i</italic> has a source estimate of the corresponding past time step <inline-formula><mml:math id="INEQ30"><mml:mrow><mml:mi>b</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mrow><mml:mi mathvariant="normal">t</mml:mi><mml:mo>-</mml:mo><mml:mi mathvariant="normal">i</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> as its input, which was standardized by z-scoring. For the first <italic>k</italic> time steps, before we have enough previous estimates to generate a prediction, the non-contextual dSPM estimates <inline-formula><mml:math id="INEQ31"><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:msub></mml:math></inline-formula> are used (<xref ref-type="fig" rid="F1">Figure 1</xref>). Each LSTM cell consists of four fully connected neural networks (NN); the &#x201C;forget gate layer,&#x201D; &#x201C;input gate layer,&#x201D; &#x201C;candidate cell state layer,&#x201D; and &#x201C;output gate layer.&#x201D; All of those networks have sigmoidal activation functions except for the candidate cell state layer which has tanh activation functions. The actual output <italic>h</italic><sub>t</sub> of the LSTM cell is a filtered subset of the cell state <italic>S</italic><sub>t</sub>. The number of neurons in each neural network layer <italic>d</italic> is another hyperparameter, in addition to the number of LSTM cells <italic>k</italic>. There are thus two hyperparameters in this network; <italic>k</italic> and <italic>d</italic>. The LSTM network is followed by a densely connected neural network layer with linear activation functions, i.e., a linear transformation with adaptable entries, mapping the output of the last LSTM cell <italic>h</italic><sub><italic>t</italic></sub> to the prediction <inline-formula><mml:math id="INEQ32"><mml:mover accent="true"><mml:msub><mml:mi>b</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>&#x00AF;</mml:mo></mml:mover></mml:math></inline-formula> (<xref ref-type="fig" rid="F2">Figure 2</xref>). The processing steps of each LSTM cell can thus be summarized in the following equations (<xref ref-type="bibr" rid="B32">Hochreiter and Schmidhuber, 1997</xref>);</p>
<disp-formula id="S2.E14"><label>(14)</label><mml:math id="M14"><mml:mrow><mml:mpadded width="+2.8pt"><mml:msub><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:msub></mml:mpadded><mml:mo>=</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x03C3;</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mrow><mml:msubsup><mml:mi>b</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>T</mml:mi></mml:msubsup><mml:mpadded width="+2.8pt"><mml:msub><mml:mi>W</mml:mi><mml:mi>f</mml:mi></mml:msub></mml:mpadded></mml:mrow><mml:mo rspace="5.3pt">+</mml:mo><mml:mrow><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi>V</mml:mi><mml:mi>f</mml:mi></mml:msub></mml:mrow><mml:mo rspace="5.3pt">+</mml:mo><mml:msub><mml:mi>B</mml:mi><mml:mi>f</mml:mi></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:math></disp-formula>
<disp-formula id="S2.E15"><label>(15)</label><mml:math id="M15"><mml:mrow><mml:msub><mml:mi>i</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo rspace="5.3pt">=</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x03C3;</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mrow><mml:msubsup><mml:mi>b</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>T</mml:mi></mml:msubsup><mml:mpadded width="+2.8pt"><mml:msub><mml:mi>W</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mpadded></mml:mrow><mml:mo rspace="5.3pt">+</mml:mo><mml:mrow><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi>V</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo rspace="5.3pt">+</mml:mo><mml:msub><mml:mi>B</mml:mi><mml:mi>i</mml:mi></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:math></disp-formula>
<disp-formula id="S2.E16"><label>(16)</label><mml:math id="M16"><mml:mrow><mml:mpadded width="+2.8pt"><mml:mover accent="true"><mml:msub><mml:mi>S</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>~</mml:mo></mml:mover></mml:mpadded><mml:mo rspace="5.3pt">=</mml:mo><mml:mrow><mml:mtext>tanh</mml:mtext><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mrow><mml:msubsup><mml:mi>b</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>T</mml:mi></mml:msubsup><mml:mpadded width="+2.8pt"><mml:msub><mml:mi>W</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:mpadded></mml:mrow><mml:mo rspace="5.3pt">+</mml:mo><mml:mrow><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi>V</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:mrow><mml:mo rspace="5.3pt">+</mml:mo><mml:msub><mml:mi>B</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:math></disp-formula>
<disp-formula id="S2.E17"><label>(17)</label><mml:math id="M17"><mml:mrow><mml:msub><mml:mi>o</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x03C3;</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mrow><mml:msubsup><mml:mi>b</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>T</mml:mi></mml:msubsup><mml:mpadded width="+2.8pt"><mml:msub><mml:mi>W</mml:mi><mml:mi>o</mml:mi></mml:msub></mml:mpadded></mml:mrow><mml:mo rspace="5.3pt">+</mml:mo><mml:mrow><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi>V</mml:mi><mml:mi>o</mml:mi></mml:msub></mml:mrow><mml:mo rspace="5.3pt">+</mml:mo><mml:msub><mml:mi>B</mml:mi><mml:mi>o</mml:mi></mml:msub></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:math></disp-formula>
<disp-formula id="S2.E18"><label>(18)</label><mml:math id="M18"><mml:mrow><mml:msub><mml:mi>S</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mi mathvariant="normal">&#x03C3;</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>&#x002A;</mml:mo><mml:mpadded width="+2.8pt"><mml:msub><mml:mi>S</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:mpadded></mml:mrow><mml:mo rspace="5.3pt">+</mml:mo><mml:mrow><mml:msub><mml:mi>i</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo rspace="5.3pt">&#x002A;</mml:mo><mml:mover accent="true"><mml:msub><mml:mi>S</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>~</mml:mo></mml:mover></mml:mrow></mml:mrow><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:math></disp-formula>
<disp-formula id="S2.E19"><label>(19)</label><mml:math id="M19"><mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>=</mml:mo><mml:mrow><mml:mrow><mml:msub><mml:mi>o</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>&#x002A;</mml:mo><mml:mi>t</mml:mi></mml:mrow><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>h</mml:mi><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:math></disp-formula>
<disp-formula id="S2.E20"><label>(20)</label><mml:math id="M20"><mml:mrow><mml:mpadded width="+2.8pt"><mml:msub><mml:mover accent="true"><mml:mi>b</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub></mml:mpadded><mml:mo rspace="5.3pt">=</mml:mo><mml:mrow><mml:mrow><mml:msubsup><mml:mi>h</mml:mi><mml:mi>t</mml:mi><mml:mi>T</mml:mi></mml:msubsup><mml:msub><mml:mi>W</mml:mi><mml:mi>d</mml:mi></mml:msub></mml:mrow><mml:mo>+</mml:mo><mml:msub><mml:mi>B</mml:mi><mml:mi>d</mml:mi></mml:msub></mml:mrow></mml:mrow></mml:math></disp-formula>
<fig id="F2" position="float">
<label>FIGURE 2</label>
<caption><p>Schematic illustration of the LSTM network architecture. The basic structure encompasses <italic>k</italic> LSTM cells connected in series, where the cell <italic>i</italic> receives input from the previous cell in the form of the cell state <italic>S</italic><sub><italic>i&#x2013;1</italic></sub> (Eq. 18) and hidden cell state <italic>h</italic><sub><italic>i&#x2013;1</italic></sub> (Eq. 19), and then ends with a fully connected NN layer, which outputs the prediction of the LSTM network <inline-formula><mml:math id="INEQ25"><mml:mrow><mml:mover accent="true"><mml:mi>b</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover><mml:mo>.</mml:mo></mml:mrow></mml:math></inline-formula> Apart from the input from the previous cell, each LSTM cell also receives input from the stack of previous estimates <italic>b</italic><sub><italic>i</italic></sub>. Each LSTM cell consists of four fully connected NN layers (yellow boxes) which all have the same complexity <italic>d</italic> = 1,280: (i) <italic>f</italic><sub><italic>t</italic></sub> (Eq. 14), the &#x201C;forget gate layer,&#x201D; is an NN with a sigmoid activation function. This layer gates the previous cell states 0&#x2264;<italic>S</italic><sub><italic>t</italic>&#x2212;1</sub>&#x2264;1 (Eq. 18) depending on <italic>h</italic><sub><italic>t&#x2013;1</italic></sub> (Eq. 19) and the previous estimate <inline-formula><mml:math id="INEQ27"><mml:mrow><mml:mi>b</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mrow><mml:mi>t</mml:mi><mml:mo>-</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula> (Eq. 20). (ii) <italic>i</italic><sub><italic>t</italic></sub> (Eq. 15), the &#x201C;input gate layer,&#x201D; is also a sigmoid layer with the same inputs as <italic>f</italic><sub><italic>t</italic></sub>. It determines which cell state values to update. (iii) <inline-formula><mml:math id="INEQ28"><mml:msub><mml:mover accent="true"><mml:mi>S</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub></mml:math></inline-formula> (Eq. 16) is the subsequent fully connected NN layer with a <italic>tanh</italic> activation function, which creates candidate cell state values gated by <italic>i</italic><sub><italic>t</italic></sub>. The state <italic>S</italic><sub><italic>t</italic></sub> of the current cell is formed by &#x201C;forgetting&#x201D; outdated information of the previous cell state <italic>S</italic><sub><italic>t&#x2013;1</italic></sub> through a multiplication with <italic>f</italic><sub><italic>t</italic></sub> followed by an update with the gated new cell state candidates <inline-formula><mml:math id="INEQ29"><mml:mrow><mml:msub><mml:mi>i</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>&#x002A;</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>S</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub></mml:mrow></mml:math></inline-formula>. (iv) <italic>o</italic><sub><italic>t</italic></sub> is a fully connected NN layer activated by a sigmoid function. This layer decides which cell states to output. It gates the <italic>tanh</italic> scaled cell state <italic>S</italic><sub><italic>t</italic></sub>. Because all NN layers have the same number of neurons <italic>d</italic> except for the final output layer, <italic>S</italic><sub><italic>t</italic></sub> and <italic>h</italic><sub><italic>t</italic></sub> are both <italic>d</italic>-dimensional vectors, see section &#x201C;Contextual Estimates&#x201D; for more details. The illustration is adapted from <xref ref-type="bibr" rid="B49">Olah (2015)</xref>.</p></caption>
<graphic xlink:href="fnins-15-552666-g002.tif"/>
</fig>
<p>where &#x002A; denotes elementwise multiplication (Hadamard product), + elementwise addition, <italic>W</italic> is the adaptable weights kernel multiplied with <italic>b</italic><sub><italic>t</italic>&#x2212;1</sub>, <italic>V</italic> is the adaptable weights kernel multiplied with <italic>h</italic><sub><italic>t&#x2013;1</italic></sub> and <italic>B</italic> is the adaptable bias. <italic>W</italic><sub>{<italic>f,i,s,o</italic>}</sub> are all <italic>n</italic><sub>s</sub>&#x00D7;<italic>d</italic> dimensional real matrices, <italic>V</italic><sub>{<italic>f,i,s,o</italic>}</sub>> are all <italic>d</italic>&#x00D7;<italic>d</italic> dimensional real matrices and <italic>B</italic><sub>{<italic>f,i,s,o</italic>}</sub> are all <italic>d</italic> dimensional real vectors, where <italic>n</italic><sub>s</sub> = 5124 is the number of sources. <italic>W</italic><sub><italic>d</italic></sub> is the adaptable weights kernel matrix of the last densely connected neural network of dimensions <italic>d</italic>&#x00D7;<italic>n</italic><sub>s</sub> and <italic>B</italic><sub><italic>d</italic></sub> is the <italic>n</italic><sub>s</sub> dimensional bias vector. <inline-formula><mml:math id="INEQ39"><mml:mrow><mml:msub><mml:mi>f</mml:mi><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub><mml:mo rspace="5.3pt">,</mml:mo><mml:msub><mml:mi>i</mml:mi><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub><mml:mo rspace="5.3pt">,</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>S</mml:mi><mml:mo stretchy="false">~</mml:mo></mml:mover><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub><mml:mo rspace="5.3pt">,</mml:mo><mml:msub><mml:mi>o</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo rspace="5.3pt">,</mml:mo><mml:msub><mml:mi>S</mml:mi><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub><mml:mo rspace="5.3pt">,</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mtext>t</mml:mtext></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula> are <italic>d</italic>-dimensional and <italic>b</italic><sub>t</sub> is <italic>n</italic><sub>s</sub>-dimensional. The weight matrices and bias vectors <italic>W, V, B</italic> were trained using supervised learning and is described in section &#x201C;LSTM Network&#x201D;.</p>
</sec>
<sec id="S2.SS2">
<title>Data Analysis</title>
<sec id="S2.SS2.SSS1">
<title>Data Acquisition</title>
<p>MEG and MRI data were collected after informed consent from a healthy 27 years old male under a protocol approved by the Massachusetts General Hospital Institutional Review Board. The subject had no medical history of hearing loss.</p>
<p>T1-weighted, high resolution MPRAGE (Magnetization Prepared Rapid Gradient Echo) structural images were acquired on a 1.5 T Siemens whole-body MRI (magnetic resonance) scanner (Siemens Medical Systems) using a 32 channel head coil at MGH.</p>
<p>Auditory steady state response (ASSR) data were recorded from the subject in the MGH Martinos center MEG core in Charlestown, MA, using MEG and EEG. It is the same ASSR data that were used in <xref ref-type="bibr" rid="B55">Samuelsson et al. (2019)</xref>. The MEG system was an Elekta-Neuromag (Helsinki, Finland) VectorView 306 channel MEG with 102 triplets consisting of one magnetometer and two orthogonal planar gradiometers for a total of 204 planar gradiometers and 102 magnetometers. The EEG was recorded with a 58 channel EasyCap system (EasyCap GmbH, Germany). The experiment was performed in a quiet, magnetically shielded room (Imedco, Switzerland). The recording was bandpass filtered between 0.1 and 1,650 Hz and sampled at 5,000 samples/s. The data were then digitally lowpass filtered at a cutoff frequency of 270 Hz and downsampled to 810 Hz. The ASSRs were elicited by an amplitude modulated (AM) sound which lasted 1 s. The AM sound was followed by an inter-stimulus interval of 500 ms plus jitter that was uniformly distributed between 0 and 750 ms, U(0, 0.75). The sound was thus played to the subject with an inter-trial pause uniformly distributed between 0.5 and 1.25 s duration. The carrier signal was a <italic>f</italic><sub>0</sub> = &#x2004;1kHz sinusoid and was amplitude modulated to a depth of 90% by a superposition of a <italic>f</italic><sub>1</sub> = &#x2004;40Hz and <italic>f</italic><sub>2</sub> = &#x2004;223Hz sinusoid;</p>
<disp-formula id="S2.E21"><label>(21)</label><mml:math id="M21"><mml:mrow><mml:mrow><mml:mrow><mml:mi>y</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>t</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>=</mml:mo><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mn>0.1</mml:mn><mml:mo>+</mml:mo><mml:mrow><mml:mrow><mml:mn>0.9</mml:mn><mml:mrow><mml:mo stretchy="false">[</mml:mo><mml:mrow><mml:mrow><mml:mi>sin</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mn>2</mml:mn><mml:mi mathvariant="normal">&#x03C0;</mml:mi><mml:msub><mml:mi>f</mml:mi><mml:mn>1</mml:mn></mml:msub><mml:mi>t</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mo>+</mml:mo><mml:mrow><mml:mi>sin</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mn>2</mml:mn><mml:mi mathvariant="normal">&#x03C0;</mml:mi><mml:msub><mml:mi>f</mml:mi><mml:mn>2</mml:mn></mml:msub><mml:mi>t</mml:mi></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mrow><mml:mo stretchy="false">]</mml:mo></mml:mrow></mml:mrow><mml:mo>/</mml:mo><mml:mn>2</mml:mn></mml:mrow></mml:mrow><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi>sin</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mn>2</mml:mn><mml:mi mathvariant="normal">&#x03C0;</mml:mi><mml:mpadded width="+2.8pt"><mml:msub><mml:mi>f</mml:mi><mml:mn>0</mml:mn></mml:msub></mml:mpadded><mml:mi>t</mml:mi></mml:mrow><mml:mo rspace="0.8pt">)</mml:mo></mml:mrow></mml:mrow></mml:mrow></mml:mrow><mml:mo>.</mml:mo></mml:mrow></mml:math></disp-formula>
</sec>
<sec id="S2.SS2.SSS2">
<title>Data Processing</title>
<p>The structural data were preprocessed using FreeSurfer (<xref ref-type="bibr" rid="B10">Dale et al., 1999</xref>; <xref ref-type="bibr" rid="B18">Fischl et al., 1999</xref>). After correcting for topological defects, cortical surfaces were tessellated using triangular meshes with &#x223C;130,000 vertices in each hemisphere. To expose the sulci in the visualization of cortical data, we used the inflated surfaces computed by FreeSurfer. 49 bad epochs were dropped using autoreject (<xref ref-type="bibr" rid="B36">Jas et al., 2017</xref>), resulting in 1,653 clean, i.e., artifact free, epochs.</p>
</sec>
<sec id="S2.SS2.SSS3">
<title>Forward Model and Inverse Operator</title>
<p>The dense triangulation of the folded cortical surface provided by FreeSurfer was decimated to a grid of 2,562 dipoles per hemisphere, corresponding to a spacing of approximately 6.2 mm between adjacent source locations. A piecewise-homogenous head conductor model with three compartments bounded by the inner skull, outer skull and outer skin was assumed, and the boundary element method (BEM) was used to compute the gain matrix (<xref ref-type="bibr" rid="B29">Hamalainen and Sarvas, 1989</xref>). The conductivities were 0.3, 0.006, 0.3 for the brain, skull and scalp, respectively. The watershed algorithm in FreeSurfer was used to generate the tessellations based on the MRI scan of the participant.</p>
<p>The initial current distribution estimate <inline-formula><mml:math id="INEQ43"><mml:mover accent="true"><mml:msub><mml:mi>q</mml:mi><mml:mi>t</mml:mi></mml:msub><mml:mo>^</mml:mo></mml:mover></mml:math></inline-formula> was obtained using dSPM with loose current dipole orientation constraints set at 0.2, where 0.0 corresponds to fixed and 1.0 to free orientations. The regularized (&#x03BB; = 0.1) noise covariance matrix used to calculate the inverse operator was calculated over the pre-stimulus period. All forward and inverse calculations were done using MNE-C and MNE-python software (<xref ref-type="bibr" rid="B23">Gramfort et al., 2013a</xref>; <xref ref-type="bibr" rid="B17">Esch et al., 2019</xref>).</p>
</sec>
<sec id="S2.SS2.SSS4">
<title>Simulation Study</title>
<p>A simulation study was conducted to test the performance of CMNE in comparison to dSPM, pure LSTM prediction, a control estimate, mixed-norm estimate (MxNE) and the spatiotemporal Kalman approach estimate as presented in <xref ref-type="bibr" rid="B41">Lamus et al. (2012)</xref>. In the control estimate, 80 sequential dSPM distributions were averaged and multiplied with the dSPM of the following sample, thus mimicking our contextual estimate but without the LSTM network, which used a lookback of <italic>k</italic> = 80 samples. The gain of using LSTM networks can thus be examined by comparing this control estimate to CMNE. The simulations were designed to mimic the propagation of an epileptiform discharge in the left supratemporal cortex. The source configuration consisted of 5,124 current dipoles placed over the cortex with free orientations. Source space noise was added as stationary Gaussian noise with spectral characteristics taken from EEG readings, as described in <xref ref-type="bibr" rid="B34">Hunold et al. (2016)</xref>. The activation wave form that modeled the epileptiform discharge was a spike-wave complex lasting 200 ms, starting sequentially in the posterior-anterior direction and making one simulated epileptiform discharge lasting for a total duration of 1,000 ms (<xref ref-type="fig" rid="F3">Figure 3</xref>) and was superimposed on the noise. The spike-wave complex had an amplitude 5 times larger than that of the background activity (10 nAm). The propagating epileptic foci were represented by five current dipoles that were sequentially activated from posterior to anterior locations on the supratemporal cortex with a mutual distance of 9 mm. A total of 250 epileptiform discharges were simulated with a 500 ms interictal period. <xref ref-type="fig" rid="F3">Figure 3</xref> shows an outline of the dipole activations.</p>
<fig id="F3" position="float">
<label>FIGURE 3</label>
<caption><p>Simulation setup. <bold>(A)</bold> Gray matter surface with five current dipoles in the superior temporal gyrus modeling epileptic foci, color-coded according to their sequential activation pattern as shown in <bold>(B)</bold>. <bold>(B)</bold> Time courses of sequentially activated dipoles (A&#x2013;E) (color-coded graphs) modeling epileptiform discharges and background activity (lower right). One epoch comprises background activity lasting for 500 ms followed by a propagating epileptiform discharge lasting for 1 s.</p></caption>
<graphic xlink:href="fnins-15-552666-g003.tif"/>
</fig>
</sec>
<sec id="S2.SS2.SSS5">
<title>Performance Metrics</title>
<p>To evaluate the performance of CMNE and compare it to other related source estimation methods we used the spatial fidelity evaluation metrics presented in <xref ref-type="bibr" rid="B56">Samuelsson et al. (2020)</xref>; we calculated the peak localization error PE and spatial dispersion SD,</p>
<disp-formula id="S2.E22"><label>(22)</label><mml:math id="M22"><mml:mrow><mml:mrow><mml:mtext>PE</mml:mtext><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mo fence="true">||</mml:mo><mml:mrow><mml:msub><mml:mi>r</mml:mi><mml:mi>i</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>r</mml:mi><mml:mi>j</mml:mi></mml:msub></mml:mrow><mml:mo fence="true">||</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msub></mml:mrow><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
<disp-formula id="S2.E23"><label>(23)</label><mml:math id="M23"><mml:mrow><mml:mrow><mml:mi>j</mml:mi><mml:mo>=</mml:mo><mml:mrow><mml:munder><mml:mtext>argmax</mml:mtext><mml:mi>i</mml:mi></mml:munder><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mo>|</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>i</mml:mi></mml:msub><mml:mo>|</mml:mo></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mi>i</mml:mi></mml:msub><mml:mo rspace="0.8pt">)</mml:mo></mml:mrow></mml:mrow></mml:mrow><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
<disp-formula id="S2.E24"><label>(24)</label><mml:math id="M24"><mml:mrow><mml:mrow><mml:mtext>SD</mml:mtext><mml:mo rspace="5.3pt">=</mml:mo><mml:mfrac><mml:mrow><mml:msubsup><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:msubsup><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">|</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>k</mml:mi></mml:msub><mml:mo stretchy="false">|</mml:mo></mml:mrow></mml:mrow></mml:mrow><mml:mrow><mml:msubsup><mml:mo>&#x2211;</mml:mo><mml:mrow><mml:mi>k</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:msub><mml:mi>N</mml:mi><mml:mi>s</mml:mi></mml:msub></mml:msubsup><mml:mrow><mml:mo stretchy="false">|</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>k</mml:mi></mml:msub><mml:mo stretchy="false">|</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:mrow><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
<disp-formula id="S2.E25"><label>(25)</label><mml:math id="M25"><mml:mrow><mml:mrow><mml:msub><mml:mi>d</mml:mi><mml:mrow><mml:mi>j</mml:mi><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:msub><mml:mrow><mml:mo fence="true">||</mml:mo><mml:mrow><mml:msub><mml:mi>r</mml:mi><mml:mi>j</mml:mi></mml:msub><mml:mo>-</mml:mo><mml:msub><mml:mi>r</mml:mi><mml:mi>k</mml:mi></mml:msub></mml:mrow><mml:mo fence="true">||</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msub></mml:mrow><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
<p>where <italic>r</italic><sub>i</sub> is the location of the active source, <italic>r</italic><sub>j</sub> is the location of the peak reconstruction amplitude, <italic>d</italic><sub>jk</sub> is the distance between <italic>r</italic><sub>j</sub> and source <italic>k</italic> and <inline-formula><mml:math id="INEQ45"><mml:msub><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mrow><mml:mtext>i</mml:mtext></mml:mrow></mml:msub></mml:math></inline-formula> is, as before, the estimate at source <italic>i</italic>. To evaluate temporal fidelity, we calculated Pearson&#x2019;s correlation coefficient <italic>r</italic> in the simulation study between the true source activations (<xref ref-type="fig" rid="F3">Figure 3</xref>) and the time courses of the estimated reconstructions that peaked at the time of the spikes <inline-formula><mml:math id="INEQ46"><mml:mrow><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:msub><mml:mrow><mml:mo stretchy="false">(</mml:mo><mml:mi>t</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:mrow><mml:mrow><mml:mtext>j</mml:mtext></mml:mrow></mml:msub></mml:mrow></mml:math></inline-formula>. We also quantified SNR in source space as</p>
<disp-formula id="S2.E26"><label>(26)</label><mml:math id="M26"><mml:mrow><mml:mrow><mml:mtext>SNR</mml:mtext><mml:mo>=</mml:mo><mml:mfrac><mml:mrow><mml:mi mathvariant="normal">&#x03C3;</mml:mi><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mo>|</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mrow><mml:mi>t</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>|</mml:mo></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>A</mml:mi></mml:mrow><mml:mo rspace="8.1pt">,</mml:mo><mml:mrow><mml:mi>t</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>S</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup></mml:mrow><mml:mrow><mml:mi mathvariant="normal">&#x03C3;</mml:mi><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mo>{</mml:mo><mml:mrow><mml:mo>|</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>x</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mrow><mml:mi>t</mml:mi><mml:mo>,</mml:mo><mml:mi>i</mml:mi></mml:mrow></mml:msub><mml:mo>|</mml:mo></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mrow><mml:mrow><mml:mi>i</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>A</mml:mi></mml:mrow><mml:mo rspace="8.1pt">,</mml:mo><mml:mrow><mml:mi>t</mml:mi><mml:mo>&#x2209;</mml:mo><mml:mi>S</mml:mi></mml:mrow></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mn>2</mml:mn></mml:msup></mml:mrow></mml:mfrac></mml:mrow><mml:mo>,</mml:mo></mml:mrow></mml:math></disp-formula>
<p>where &#x03C3; is the standard deviation, <italic>A</italic> is the primary auditory cortex A1 in the ASSR data and the entirety of the auditory cortex in the simulations and <italic>S</italic> is the signal segment defined as the ictal period in the simulations and as the N1 and P2 responses in the ASSR data, i.e., the SNR is defined as the standard deviation of the activation in the auditory cortex during the activation period divided by standard deviation of the activation in the auditory cortex outside of the activation period (<xref ref-type="bibr" rid="B60">Shahin et al., 2007</xref>).</p>
</sec>
</sec>
<sec id="S2.SS3">
<title>LSTM Network</title>
<p>The LSTM networks were trained on dSPM source estimates. The available epochs were randomly divided up in one training data set (85%) and one validation data set (15%). The training and validation data sets were thus disjoint. The training data were generated using overlapping sliding windows in time over the epochs, each window containing <italic>k</italic> time steps, one for each LSTM cell. The LSTM network predicts the subsequent dSPM activation based on these <italic>k</italic> past time steps and the ground truth is the actual dSPM estimate that it is trying to predict. Prior to the training, the input (past <italic>k</italic> dSPM estimates) and ground truth (current dSPM estimate) were standardized by z-scoring.</p>
<p>We employed the mean-square error (MSE) as the loss function and stochastic gradient descent (Adam algorithm) as the optimization method (<xref ref-type="bibr" rid="B39">Kingma and Ba, 2014</xref>). The training was organized in a minibatch setting which split the training process into small batches comprising a small set of gradient evaluations, the LSTM weights being updated using the anti-gradient of the error with respect to the LSTM weights over each minibatch. The LSTM setup, training and evaluation was realized in CNTK/TensorFlow in combination with Keras as the frontend API (<xref ref-type="bibr" rid="B1">Abadi et al., 2015</xref>; <xref ref-type="bibr" rid="B59">Seide and Agarwal, 2016</xref>; <xref ref-type="bibr" rid="B7">Chollet, 2018</xref>).</p>
<p>Hyperparameter evaluation (the number of hidden units <italic>d</italic> in the LSTM network and the number of past time steps <italic>k</italic> used as inputs to the LSTM prediction) was done by cross-validation on the ASSR data. In the cross-validation, the training data sets amounted to 85% of all data points and the remaining 15% were used for testing; cross-validation was performed 10 times. The training data were grouped into 30 minibatches. Each minibatch consisted of 30 feature representations, each feature representation being a randomly selected window of 81 consecutive samples, 80 being used as inputs to the LSTM network to predict the 81st sample, which is compared to the ground truth. First, the influence of the LSTM units on the performance was tested by varying <italic>d</italic> with a constant look back of <italic>k=80</italic> samples. The training and testing results are shown in a loss graph in <xref ref-type="fig" rid="F4">Figure 4A</xref>. Second, the optimal number of past time steps <italic>k</italic> was determined with a fixed number of hidden units <italic>d=1280</italic>, which is an appropriate trade-of between prediction accuracy and training time. The results are depicted in <xref ref-type="fig" rid="F4">Figure 4B</xref>, which also offers insight into the genericity of the length of the time window used as input to the LSTM prediction; generally a longer time window results in more accurate predictions but comes at a higher computational cost in the case of the ASSR data. It is conceivable that other brain states elicited by other stimuli could affect these results.</p>
<fig id="F4" position="float">
<label>FIGURE 4</label>
<caption><p>Cross-validation of hyperparameter evaluation. <bold>(A)</bold> Loss progression: influence of the number of hidden units <italic>d</italic> in the LSTM network on the performance with a constant look back of <italic>k=80</italic> samples. <bold>(B)</bold> Loss progression: influence of the look back, i.e., number of past samples <italic>k</italic> used in the LSTM network with a fixed number of hidden units <italic>d=1280</italic>. The bar plots depict the cross-validation testing loss after training. The whiskers denote one standard error and the center refers to the mean loss.</p></caption>
<graphic xlink:href="fnins-15-552666-g004.tif"/>
</fig>
<p>Based on this evaluation, we chose a final LSTM network topology of <italic>d=1280</italic> units and a window size comprising the past <italic>k</italic> = 80 samples. The selection of the number of hidden units was a compromise between training time and prediction accuracy. We anticipate that a larger number of units would further improve the network performance. The choice of <italic>k</italic> was also a trade-off; shorter windows have fewer LSTM cells and thus fewer weights to adjust, leading to faster convergence, while wider time windows are more robust to fluctuations. <italic>k=80</italic> was found to be a suitable trade-off between the two.</p>
</sec>
</sec>
<sec id="S3">
<title>Results</title>
<sec id="S3.SS1">
<title>Simulation Study</title>
<p>In the simulation study, we trained the LSTM network with the topology (<italic>d</italic> = 1280,<italic>k</italic> = 80) using only 100 minibatch iterations. Each minibatch comprised 30 evaluations of 25 windows per evaluation. The windows contained 81 consecutive source estimation samples (80 used as input and 1 as the label), corresponding to a time window of 0.1 s, whose starting points were randomly selected from the 212 raw training epochs.</p>
<p><xref ref-type="fig" rid="F5">Figure 5</xref> shows a comparison between CMNE, dSPM, MxNE, LSTM prediction and a control estimate applied to an average of 20 epochs as well as the Kalman source estimation. CMNE has the highest SNR (Eq. 26) as seen in the third column of <xref ref-type="fig" rid="F5">Figure 5</xref>. However, the LSTM prediction is not able to capture the temporal dynamics of the neural activation patterns adequately; the waveforms get distorted as seen in the second column of <xref ref-type="fig" rid="F5">Figure 5</xref>. The correction step that utilizes the current dSPM estimation compensates for this; the peak of the CMNE estimate is on time but the ripples following the spikes are suppressed. The control estimate has a reduced SNR, significantly lower than the SNR of CMNE, and distorts the waveforms as well as exhibiting a high degree of spatial dispersion. The Kalman source estimate and particularly MxNE result in focal estimates with a low degree of spatial dispersion (column 4), although with lower noise suppression than the CMNE estimate as evident in the lower source space SNR.</p>
<fig id="F5" position="float">
<label>FIGURE 5</label>
<caption><p>Source estimations based on simulated data (20 averaged epochs) are shown in the source space column. The second column from the left shows the time traces of the estimated dipole with maximal amplitude within the marked area A as depicted in the first column. The third column shows the estimated SNR of the respective source reconstruction method (Eq. 26) and the fourth column shows the spatial dispersion of the estimates (Eq. 24). The tested source estimation methods are divided into rows: <bold>(a)</bold> dSPM estimate <inline-formula><mml:math id="INEQ49"><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub></mml:math></inline-formula>, <bold>(b)</bold> LSTM network prediction <inline-formula><mml:math id="INEQ50"><mml:mrow><mml:mover accent="true"><mml:mi>b</mml:mi><mml:mo stretchy="false">&#x00AF;</mml:mo></mml:mover><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>, <bold>(c)</bold> CMNE estimate <inline-formula><mml:math id="INEQ51"><mml:mrow><mml:mi>b</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mover accent="true"><mml:mi>q</mml:mi><mml:mo stretchy="false">^</mml:mo></mml:mover><mml:mi>t</mml:mi></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:math></inline-formula>, <bold>(d)</bold> control estimate, which averages the 80 previous estimates and uses that average to correct the current dSPM estimate based on the average of 20 epochs, <bold>(e)</bold> Kalman estimate, <bold>(f)</bold> MxNE estimate. All estimates were rectified and normalized to their peak value.</p></caption>
<graphic xlink:href="fnins-15-552666-g005.tif"/>
</fig>
<p><xref ref-type="fig" rid="F6">Figure 6</xref> shows the source reconstruction by dSPM, CMNE, MxNE, and the Kalman approach at the time of maximal activation along with the ground truth. The localization error PE was lower with CMNE as compared to dSPM for all dipole activations. While MxNE had zero localization error for dipoles B and D, and the Kalman approach resulted in marginally lower localization error than CMNE for dipole activations A and B, CMNE showed a consistent small localization error, being no larger than 4.5 mm for any activation, whereas the other spatiotemporal methods showed a highly variant result, particularly MxNE that resulted in localization errors varying between 0 and 25 mm. We also notice that while dSPM and the Kalman approach do not manage to reconstruct the amplitudes of dipoles C, D, and E, CMNE maintains an adequate amplitude reconstruction for all active vertices. Furthermore, CMNE does not result in spurious activations during interstimulus periods. However, while the activation signals are relatively well reconstructed with dSPM as measured by the relative amplitude of the damped oscillations to the peak value, CMNE concentrates most of the signal energy around the peak activation timepoint, resulting in a less authentic temporal reconstruction, quantified in the Pearson&#x2019;s correlation coefficient which is higher for dSPM than CMNE for all activations except one. This is, however, a drawback that CMNE shares with the other spatiotemporal methods; while MxNE and the Kalman approach adequately reconstruct the activation in some cases, the reconstruction is completely off in other activations resulting in a very low correlation coefficient.</p>
<fig id="F6" position="float">
<label>FIGURE 6</label>
<caption><p>Source activation (first row), dSPM estimate (second row), CMNE estimate (third row), Kalman estimate (fourth row) and MxNE (fifth row) of simulated data displayed over an inflated cortex at the time of peak activations of dipoles (A-E) along with the time traces of the reconstructured dipoles that had the largest amplitudes at the time of peak activations (marked A-E). The results are based on an average of 20 epochs. All estimates were rectified and normalized to their peak value.</p></caption>
<graphic xlink:href="fnins-15-552666-g006.tif"/>
</fig>
</sec>
<sec id="S3.SS2">
<title>Auditory Steady State Response</title>
<p>The same LSTM network topology was used for processing of the ASSR data (<italic>d</italic> = 1280,<italic>k</italic> = 80) and the results were compared with dSPM, MxNE, the Kalman approach and the LSTM prediction alone as well as the control estimate, as was done in the simulation study. The training was performed with 250 minibatch iterations each comprising 30 evaluations containing 20 windows per evaluation. The windows contained 81 subsequent source estimation samples, which were randomly selected from the 1,405 artifact-free epochs used for training. Validation was made based on the remaining 248 epochs that were not used in the training.</p>
<p><xref ref-type="fig" rid="F7">Figure 7</xref> shows the results where the estimates have been found from 20 averaged ASSR epochs. The label A1 marks the primary auditory cortex. The spatial dispersion of CMNE is lower than that with dSPM and results in higher SNR (Eq. 26). The MxNE does not reconstruct any activation in the primary auditory cortex, likely because the input SNR was too low. The Kalman estimate shows higher spatial dispersion than CMNE and does not seem to be able to capture the N1 and P2 responses well. The control estimate resulted in a very inadequate reconstruction, showcasing the added benefit of the LSTM prediction.</p>
<fig id="F7" position="float">
<label>FIGURE 7</label>
<caption><p>Source estimates (first column) of ASSR data based on averages of 20 epochs, time courses (second column) of the source dipole in A1 with the greatest amplitude over the evoked response, SNR (Eq. 26, third column) and spatial dispersion (Eq. 24, fourth column) of the estimates. The green segments in the time courses mark the N1 and P2 responses that were used in the calculation of SNR (Eq. 26). The rows correspond to dSPM <bold>(a)</bold>, LSTM prediction <bold>(b)</bold>, CMNE <bold>(c)</bold>, control estimate <bold>(d)</bold>, Kalman estimate <bold>(e),</bold> and MxNE <bold>(f)</bold>. All estimates were rectified and normalized to their peak value.</p></caption>
<graphic xlink:href="fnins-15-552666-g007.tif"/>
</fig>
</sec>
</sec>
<sec id="S4">
<title>Discussion</title>
<p>The contextual nature of brain activity as evidenced by intracranial electrophysiology and functional connectivity studies (<xref ref-type="bibr" rid="B5">Bullock et al., 1995</xref>; <xref ref-type="bibr" rid="B12">Destexhe et al., 1999</xref>; <xref ref-type="bibr" rid="B43">Leopold et al., 2003</xref>) in addition to the recent advances in employing RNN for processing data with a temporal structure, e.g., natural language processing, inspired the use of LSTM networks in the M/EEG inverse problem for predicting and correcting M/EEG source estimates based on their context. In this study, we developed this technique and applied it to dSPM estimates, naming the implementation CMNE. The approach presented here thus constitutes a novel spatiotemporal inverse method where M/EEG estimates are filtered based on their context without too strong and explicit <italic>a priori</italic> assumptions of their spatiotemporal dynamics.</p>
<p>We tested CMNE on simulated epileptiform and recorded ASSR data, showing that in the cases tested here, the CMNE estimates exhibited a higher SNR in source space (<xref ref-type="fig" rid="F5">Figures 5</xref>, <xref ref-type="fig" rid="F7">7</xref>), less spatial dispersion (<xref ref-type="fig" rid="F7">Figure 7</xref>) and smaller localization error (<xref ref-type="fig" rid="F6">Figure 6</xref>), thus implying a higher degree of spatial fidelity, than the unfiltered dSPM estimates. The other spatiotemporal methods tested in this study was the Kalman approach proposed by <xref ref-type="bibr" rid="B41">Lamus et al. (2012)</xref> and MxNE. While MxNE and the Kalman approach showed a high degree of spatial fidelity in some cases, manifested in very low localization error for some activations and low spatial dispersion in the simulation study, the simulation also showed that their performance was highly variant, e.g., the reconstruction error with MxNE varied between 0 and 25 mm. In comparison to the other spatiotemoral methods, CMNE thus showed a more consistent performance. That was also observed in the temporal fidelity comparison which showed that CMNE had a Pearson&#x2019;s correlation coefficient consistently above 0.78 with the true activation signal while the Kalman and mixed norm approaches resulted in a correlation varying between 0.06 and 0.96. Furthermore, the assessed source space SNR was significantly higher with CMNE than in any of the other approaches tested here because of the temporal sparsity. This ability of CMNE to extract the signal from noisy data could be the reason for the superior performance on the ASSR data, where the Kalman and MxNE approaches performed substantially worse than CMNE in spite of the steady local activity in the auditory cortex that occurs during ASSR where one might think the Kalman and MxNE approaches would do better.</p>
<p>However, the reconstructed time courses of the sources as predicted by the LSTM network were not always able to follow steep ascends, which relates to a lowpass characteristic (<xref ref-type="fig" rid="F5">Figures 5</xref>, <xref ref-type="fig" rid="F6">6</xref>). Correcting the prediction with the dSPM estimate based on the sensor data resulted in a higher degree of temporal fidelity than the LSTM prediction. Even after the correction, however, the damped oscillations following the spikes in the simulation study were not faithfully reconstructed. The CMNE filtering thus resulted in a distortion of the waveform following the spike, which does not take place to the same extent with dSPM. This highlights a drawback of CMNE; although we can achieve enhanced spatial fidelity, the fact that we have a spatial filter that changes over time can introduce a temporal phase shift which could distort the waveform reconstruction. This is, however, a characteristic that CMNE shares with other spatiotemporal methods and they must therefore be used with caution when doing temporal analysis, e.g., examining frequency bands or performing phase synchrony analysis. How to introduce a zero-phase shift spatial filter based upon spatiotemporal information without explicit <italic>a priori</italic> assumptions, such as the technique presented here, should be the topic of a future study.</p>
<p>In the simulation study, the activation pattern was in the form of dipoles at different locations activated subsequently. This activation pattern should be predictable and the CMNE estimation should therefore give better results over time as progressively more information on past activity is gathered since the internal cell state of each LSTM cell is passed forward to the next cell in the chain. This is indeed the case, as it can be seen from <xref ref-type="fig" rid="F6">Figure 6</xref> that while the dSPM estimate exhibited an increasingly higher degree of spatial dispersion, the CMNE estimate maintained an adequate amplitude reconstruction. It should also be noted that we here used the same source mesh and field computation method in the forward modeling as in the inverse modeling, which resulted in low localization errors for some of the inverse methods.</p>
<p>There is no definite rule how to select the number of neurons in each neural network layer <italic>d</italic> and the number of LSTM cells <italic>k</italic>; cross-validation is normally employed to select these hyperparameters. Due to limitations in computational resources and the difficulties in presenting results for many different hyperparameter values, we resorted here to the conventional approach of evaluating hyperparameters by cross-validation first and then employing these hyperparameters throughout the study. Further evaluation of how the choice of network topology could influence the result should be explored in future studies. How well these hyperparameters will generalize to unseen data, such as a new subject or measurement system or evoked response, will depend upon the spatiotemporal distribution of the new data.</p>
<p>The distributed source estimates found with dSPM that we use as inputs to the network makes the input data somewhat more invariant across subjects and measurement systems than if we had used sensor space data, which would likely not have generalized well across measurement systems. However, different subjects, evoked responses and measurement systems might still require new training of a subset of the weights. It is also possible that this spatial and temporal variability could be addressed by using a larger <italic>k</italic> and <italic>d</italic> to account for temporal and spatial variability, respectively. Larger LSTM networks with a high dropout rate (&#x003E;0.7) might thus improve the generalization of CMNE by increasing the complexity of the model and letting a high dropout rate mitigate overfitting. This would, however, also increase the computational complexity of the training which is already quite high (&#x223C;8&#x2013;12 h on a conventional workstation with dual XEON E5-2687W, 64&#x2009;GB RAM, and NVIDIA Quadro 4000). Efficient transfer learning schemes with automatic hyperparameter search could potentially be employed as an alternative (<xref ref-type="bibr" rid="B67">Yogatama and Mann, 2014</xref>). It would also be of great interest to see how the weights in the LSTM network differs in different evoked responses. It is conceivable that the internal cell states that are modulated by the weights carry information about the active brain state. How these are modulated in different tasks that activate different functional networks is an interesting aspect of this technique that needs further investigation.</p>
<p>Another aspect that warrants further investigation is combining the CMNE approach used here with other spatiotemporal source estimates. For instance, this approach could be combined with Kalman filtering, e.g., where a Kalman or extended Kalman filter could be used to update the weights in the LSTM network, instead of backpropagation.</p>
<p>Finally, there is a wide variety of neural networks and it is hard to predict, without empirical testing, which implementation and combination of networks that would yield the optimal performance given a measure of goodness. It is conceivable that, for instance, bi-directional LSTM networks using both past and future estimates would capture the temporal dynamics better than the unidirectional LSTM network implemented in this study, or that convolutional neural networks (CNN), commonly used in computer vision, could be used to increase the spatial fidelity even further. A fundamental issue with implementing machine learning methods in M/EEG source estimation is the lack of ground truth data. It also remains unclear to what degree the networks can be trained on a variety of subjects and tasks or if they should be trained separately as was done here. Addressing these questions will be critical for the future of machine learning in M/EEG source estimation.</p>
</sec>
<sec id="S5">
<title>Conclusion</title>
<p>A novel technique was introduced where a spatiotemporal LSTM network is used to predict the source estimate following a sequence of past estimates. The prediction is then used as a spatial filter to correct the estimate, which is context dependent since it is a function of past estimates. Because this technique can be used in conjunction with any source estimation method that has a temporal sequence and does not rest on strong and explicit <italic>a priori</italic> modeling assumptions, any source estimation method can be turned into a spatiotemporal method using the technique presented here. We tested an implementation of this technique on dSPM estimates, naming it CMNE, and benchmarked it on simulations of ictal events and recorded M/EEG data from an ASSR experiment, showing that it can result in a higher degree of spatial fidelity as compared to the unfiltered, non-contextual estimates. We conclude that the results shown here indicate promise for the emerging field of the application of machine learning in M/EEG source estimation and warrant more studies on different network configurations and training procedures.</p>
</sec>
<sec id="S6">
<title>Data Availability Statement</title>
<p>The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation, to any qualified researcher.</p>
</sec>
<sec id="S7">
<title>Ethics Statement</title>
<p>The studies involving human participants were reviewed and approved by Massachusetts General Hospital Institutional Review Board. The patients/participants provided their written informed consent to participate in this study.</p>
</sec>
<sec id="S8">
<title>Author Contributions</title>
<p>CD conceptualized and designed the study and performed the data visualization. JS and SK collected the ASSR data. AH performed the epileptiform simulations. CD and JS performed the analysis. CD, JS, and MH wrote the first draft of the manuscript. MH contributed funding. All authors contributed to manuscript revision, read, and approved the submitted version.</p>
</sec>
<sec sec-type="COI-statement" id="conf1">
<title>Conflict of Interest</title>
<p>The authors declare that the research was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.</p>
</sec>
</body>
<back>
<fn-group>
<fn fn-type="financial-disclosure">
<p><bold>Funding.</bold> This work was supported by the National Institutes of Health (NIH, grants 1U01EB023820, 1P41EB030006, 1R01NS104585, and 5P41EB015896), Microsoft Azure Research Award and the Sweden-America foundation.</p>
</fn>
</fn-group>
<ref-list>
<title>References</title>
<ref id="B1"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Abadi</surname> <given-names>M.</given-names></name> <name><surname>Agarwal</surname> <given-names>A.</given-names></name> <name><surname>Barham</surname> <given-names>P.</given-names></name> <name><surname>Brevdo</surname> <given-names>E.</given-names></name> <name><surname>Chen</surname> <given-names>Z.</given-names></name> <name><surname>Citro</surname> <given-names>C.</given-names></name><etal/></person-group> (<year>2015</year>). <source><italic>TensorFlow</italic><italic>: Large-Scale Machine Learning on Heterogeneous Systems.</italic></source> Available online at: <ext-link ext-link-type="uri" xlink:href="https://arxiv.org/abs/1603.04467">https://arxiv.org/abs/1603.04467</ext-link> <comment>(accessed December 1, 2017)</comment>.</citation></ref>
<ref id="B2"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ali</surname> <given-names>H.</given-names></name> <name><surname>Karim</surname> <given-names>F.</given-names></name> <name><surname>Qureshi</surname> <given-names>J. J.</given-names></name> <name><surname>Abuassba</surname> <given-names>A. O.</given-names></name> <name><surname>Bulbul</surname> <given-names>M. F.</given-names></name></person-group> (<year>2019</year>). <article-title>Seizure prediction using bidirectional LSTM.</article-title> in <source><italic>Proceedings of the International Conference Cyberspace Data and Intelligence, and Cyber-Living, Syndrome, and Health.</italic></source> <publisher-loc>Berlin</publisher-loc>: <publisher-name>Springer</publisher-name>, <fpage>349</fpage>&#x2013;<lpage>356</lpage>. <pub-id pub-id-type="doi">10.1007/978-981-15-1922-2_25</pub-id></citation></ref>
<ref id="B3"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Baillet</surname> <given-names>S.</given-names></name> <name><surname>Garnero</surname> <given-names>L.</given-names></name></person-group> (<year>1997</year>). <article-title>A bayesian approach to introducing anatomo-functional priors in the EEG/MEG inverse problem.</article-title> <source><italic>IEEE Trans. Biomed. Eng.</italic></source> <volume>44</volume> <fpage>374</fpage>&#x2013;<lpage>385</lpage>. <pub-id pub-id-type="doi">10.1109/10.568913</pub-id></citation></ref>
<ref id="B4"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Bolstad</surname> <given-names>A.</given-names></name> <name><surname>Van Veen</surname> <given-names>B.</given-names></name> <name><surname>Nowak</surname> <given-names>R.</given-names></name></person-group> (<year>2009</year>). <article-title>Space&#x2013;time event sparse penalization for magneto-/electroencephalography.</article-title> <source><italic>Neuroimage</italic></source> <volume>46</volume> <fpage>1066</fpage>&#x2013;<lpage>1081</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2009.01.056</pub-id> <pub-id pub-id-type="pmid">19457366</pub-id></citation></ref>
<ref id="B5"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Bullock</surname> <given-names>T.</given-names></name> <name><surname>McClune</surname> <given-names>M.</given-names></name> <name><surname>Achimowicz</surname> <given-names>J.</given-names></name> <name><surname>Iragui-Madoz</surname> <given-names>V.</given-names></name> <name><surname>Duckrow</surname> <given-names>R.</given-names></name> <name><surname>Spencer</surname> <given-names>S.</given-names></name></person-group> (<year>1995</year>). <article-title>Temporal fluctuations in coherence of brain waves.</article-title> <source><italic>Proc. Natl. Acad. Sci. U.S.A.</italic></source> <volume>92</volume> <fpage>11568</fpage>&#x2013;<lpage>11572</lpage>. <pub-id pub-id-type="doi">10.1073/pnas.92.25.11568</pub-id> <pub-id pub-id-type="pmid">8524805</pub-id></citation></ref>
<ref id="B6"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Calvetti</surname> <given-names>D.</given-names></name> <name><surname>Somersalo</surname> <given-names>E.</given-names></name> <name><surname>Strang</surname> <given-names>A.</given-names></name></person-group> (<year>2019</year>). <article-title>Hierachical bayesian models and sparsity: l 2-magic.</article-title> <source><italic>Inverse Probl.</italic></source> <volume>35</volume>:<issue>035003</issue>.</citation></ref>
<ref id="B7"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Chollet</surname> <given-names>F.</given-names></name></person-group> (<year>2018</year>). <source><italic>Keras: The Python Deep Learning Library.</italic></source> <publisher-name>Astrophysics Source Code Library</publisher-name>. Available online at: <ext-link ext-link-type="uri" xlink:href="https://ui.adsabs.harvard.edu/abs/2018ascl.soft06022C/abstract">https://ui.adsabs.harvard.edu/abs/2018ascl.soft06022C/abstract</ext-link> <comment>(accessed June, 2018)</comment>.</citation></ref>
<ref id="B8"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Chorowski</surname> <given-names>J. K.</given-names></name> <name><surname>Bahdanau</surname> <given-names>D.</given-names></name> <name><surname>Serdyuk</surname> <given-names>D.</given-names></name> <name><surname>Cho</surname> <given-names>K.</given-names></name> <name><surname>Bengio</surname> <given-names>Y.</given-names></name></person-group> (<year>2015</year>). &#x201C;<article-title>Attention-based models for speech recognition</article-title>,&#x201D; in <source><italic>Advances in Neural Information Processing Systems</italic></source>, <role>eds</role> <person-group person-group-type="editor"><name><surname>Jordan</surname> <given-names>M. I.</given-names></name> <name><surname>LeCun</surname> <given-names>Y.</given-names></name> <name><surname>Solla</surname> <given-names>S. A.</given-names></name></person-group> (<publisher-loc>Cambridge, MA</publisher-loc>: <publisher-name>MIT Press</publisher-name>).</citation></ref>
<ref id="B9"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Costa</surname> <given-names>F.</given-names></name> <name><surname>Batatia</surname> <given-names>H.</given-names></name> <name><surname>Oberlin</surname> <given-names>T.</given-names></name> <name><surname>d&#x2019;Giano</surname> <given-names>C.</given-names></name> <name><surname>Tourneret</surname> <given-names>J.-Y.</given-names></name></person-group> (<year>2017</year>). <article-title>Bayesian EEG source localization using a structured sparsity prior.</article-title> <source><italic>Neuroimage</italic></source> <volume>144</volume> <fpage>142</fpage>&#x2013;<lpage>152</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2016.08.064</pub-id> <pub-id pub-id-type="pmid">27639353</pub-id></citation></ref>
<ref id="B10"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Dale</surname> <given-names>A. M.</given-names></name> <name><surname>Fischl</surname> <given-names>B.</given-names></name> <name><surname>Sereno</surname> <given-names>M. I.</given-names></name></person-group> (<year>1999</year>). <article-title>Cortical surface-based analysis. i. segmentation and surface reconstruction.</article-title> <source><italic>Neuroimage</italic></source> <volume>9</volume> <fpage>179</fpage>&#x2013;<lpage>194</lpage>.</citation></ref>
<ref id="B11"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Dale</surname> <given-names>A. M.</given-names></name> <name><surname>Liu</surname> <given-names>A. K.</given-names></name> <name><surname>Fischl</surname> <given-names>B. R.</given-names></name> <name><surname>Buckner</surname> <given-names>R. L.</given-names></name> <name><surname>Belliveau</surname> <given-names>J. W.</given-names></name> <name><surname>Lewine</surname> <given-names>J. D.</given-names></name><etal/></person-group> (<year>2000</year>). <article-title>Dynamic statistical parametric mapping: combining fMRI and MEG for high-resolution imaging of cortical activity.</article-title> <source><italic>Neuron</italic></source> <volume>26</volume> <fpage>55</fpage>&#x2013;<lpage>67</lpage>.</citation></ref>
<ref id="B12"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Destexhe</surname> <given-names>A.</given-names></name> <name><surname>Contreras</surname> <given-names>D.</given-names></name> <name><surname>Steriade</surname> <given-names>M.</given-names></name></person-group> (<year>1999</year>). <article-title>Spatiotemporal analysis of local field potentials and unit discharges in cat cerebral cortex during natural wake and sleep states.</article-title> <source><italic>J. Neurosci.</italic></source> <volume>19</volume> <fpage>4595</fpage>&#x2013;<lpage>4608</lpage>. <pub-id pub-id-type="doi">10.1523/jneurosci.19-11-04595.1999</pub-id> <pub-id pub-id-type="pmid">10341257</pub-id></citation></ref>
<ref id="B13"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Dinh</surname> <given-names>C.</given-names></name></person-group> (<year>2015</year>). <source><italic>Brain monitoring: Real-time Localization of Neuronal Activity. 1st edn.</italic></source> <publisher-loc>Aachen</publisher-loc>: <publisher-name>Shaker</publisher-name>. <pub-id pub-id-type="doi">10.2370/9783844038378</pub-id></citation></ref>
<ref id="B14"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Dinh</surname> <given-names>C.</given-names></name> <name><surname>Esch</surname> <given-names>L.</given-names></name> <name><surname>R&#x00FC;hle</surname> <given-names>J.</given-names></name> <name><surname>Bollmann</surname> <given-names>S.</given-names></name> <name><surname>G&#x00FC;llmar</surname> <given-names>D.</given-names></name> <name><surname>Baumgarten</surname> <given-names>D.</given-names></name><etal/></person-group> (<year>2018</year>). <article-title>Real-time clustered multiple signal classification (RTC-MUSIC).</article-title> <source><italic>Brain Topogr.</italic></source> <volume>31</volume> <fpage>125</fpage>&#x2013;<lpage>128</lpage>. <pub-id pub-id-type="doi">10.1007/s10548-017-0586-7</pub-id> <pub-id pub-id-type="pmid">28879632</pub-id></citation></ref>
<ref id="B15"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Dinh</surname> <given-names>C.</given-names></name> <name><surname>Samuelsson</surname> <given-names>J. G.</given-names></name> <name><surname>Hunold</surname> <given-names>A.</given-names></name> <name><surname>H&#x00E4;m&#x00E4;l&#x00E4;inen</surname> <given-names>M. S.</given-names></name> <name><surname>Khan</surname> <given-names>S.</given-names></name></person-group> (<year>2019</year>). <article-title>Contextual minimum-norm estimates (CMNE): a deep learning method for source estimation in neuronal networks.</article-title> <source><italic>arXiv [preprint]</italic></source> doi: arXiv:1909.02636.</citation></ref>
<ref id="B16"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Dinh</surname> <given-names>C.</given-names></name> <name><surname>Strohmeier</surname> <given-names>D.</given-names></name> <name><surname>Luessi</surname> <given-names>M.</given-names></name> <name><surname>Gullmar</surname> <given-names>D.</given-names></name> <name><surname>Baumgarten</surname> <given-names>D.</given-names></name> <name><surname>Haueisen</surname> <given-names>J.</given-names></name><etal/></person-group> (<year>2015</year>). <article-title>Real-time MEG source localization using regional clustering.</article-title> <source><italic>Brain Topogr.</italic></source> <volume>28</volume> <fpage>771</fpage>&#x2013;<lpage>784</lpage>. <pub-id pub-id-type="doi">10.1007/s10548-015-0431-9</pub-id> <pub-id pub-id-type="pmid">25782980</pub-id></citation></ref>
<ref id="B17"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Esch</surname> <given-names>L.</given-names></name> <name><surname>Dinh</surname> <given-names>C.</given-names></name> <name><surname>Larson</surname> <given-names>E.</given-names></name> <name><surname>Engemann</surname> <given-names>D.</given-names></name> <name><surname>Jas</surname> <given-names>M.</given-names></name> <name><surname>Khan</surname> <given-names>S.</given-names></name><etal/></person-group> (<year>2019</year>). &#x201C;<article-title>MNE: software for acquiring, processing, and visualizing MEG/EEG data</article-title>,&#x201D; in <source><italic>Magnetoencephalography: From Signals to Dynamic Cortical Networks</italic></source>, <role>eds</role> <person-group person-group-type="editor"><name><surname>Supek</surname> <given-names>S.</given-names></name> <name><surname>Aine</surname> <given-names>C. J.</given-names></name></person-group> (<publisher-loc>Berlin</publisher-loc>: <publisher-name>Springer</publisher-name>), <fpage>355</fpage>&#x2013;<lpage>371</lpage>. <pub-id pub-id-type="doi">10.1007/978-3-030-00087-5_59</pub-id></citation></ref>
<ref id="B18"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Fischl</surname> <given-names>B.</given-names></name> <name><surname>Sereno</surname> <given-names>M. I.</given-names></name> <name><surname>Dale</surname> <given-names>A. M.</given-names></name></person-group> (<year>1999</year>). <article-title>Cortical surface-based analysis. II: inflation, flattening, and a surface-based coordinate system.</article-title> <source><italic>Neuroimage</italic></source> <volume>9</volume> <fpage>195</fpage>&#x2013;<lpage>207</lpage>. <pub-id pub-id-type="doi">10.1006/nimg.1998.0396</pub-id> <pub-id pub-id-type="pmid">9931269</pub-id></citation></ref>
<ref id="B19"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Friston</surname> <given-names>K.</given-names></name> <name><surname>Harrison</surname> <given-names>L.</given-names></name> <name><surname>Daunizeau</surname> <given-names>J.</given-names></name> <name><surname>Kiebel</surname> <given-names>S.</given-names></name> <name><surname>Phillips</surname> <given-names>C.</given-names></name> <name><surname>Trujillo-Barreto</surname> <given-names>N.</given-names></name><etal/></person-group> (<year>2008</year>). <article-title>Multiple sparse priors for the M/EEG inverse problem.</article-title> <source><italic>Neuroimage</italic></source> <volume>39</volume> <fpage>1104</fpage>&#x2013;<lpage>1120</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2007.09.048</pub-id> <pub-id pub-id-type="pmid">17997111</pub-id></citation></ref>
<ref id="B20"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Galka</surname> <given-names>A.</given-names></name> <name><surname>Yamashita</surname> <given-names>O.</given-names></name> <name><surname>Ozaki</surname> <given-names>T.</given-names></name> <name><surname>Biscay</surname> <given-names>R.</given-names></name> <name><surname>Vald&#x00E9;s-Sosa</surname> <given-names>P.</given-names></name></person-group> (<year>2004</year>). <article-title>A solution to the dynamical inverse problem of EEG generation using spatiotemporal kalman filtering.</article-title> <source><italic>Neuroimage</italic></source> <volume>23</volume> <fpage>435</fpage>&#x2013;<lpage>453</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2004.02.022</pub-id> <pub-id pub-id-type="pmid">15488394</pub-id></citation></ref>
<ref id="B21"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Gorodnitsky</surname> <given-names>I. F.</given-names></name> <name><surname>George</surname> <given-names>J. S.</given-names></name> <name><surname>Rao</surname> <given-names>B. D.</given-names></name></person-group> (<year>1995</year>). <article-title>Neuromagnetic source imaging with FOCUSS: a recursive weighted minimum norm algorithm.</article-title> <source><italic>Electroencephalogr. Clin. Neurophysiol.</italic></source> <volume>95</volume> <fpage>231</fpage>&#x2013;<lpage>251</lpage>. <pub-id pub-id-type="doi">10.1016/0013-4694(95)00107-a</pub-id></citation></ref>
<ref id="B22"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Gramfort</surname> <given-names>A.</given-names></name> <name><surname>Kowalski</surname> <given-names>M.</given-names></name> <name><surname>Hamalainen</surname> <given-names>M.</given-names></name></person-group> (<year>2012</year>). <article-title>Mixed-norm estimates for the M/EEG inverse problem using accelerated gradient methods.</article-title> <source><italic>Phys. Med. Biol.</italic></source> <volume>57</volume> <fpage>1937</fpage>&#x2013;<lpage>1961</lpage>. <pub-id pub-id-type="doi">10.1088/0031-9155/57/7/1937</pub-id></citation></ref>
<ref id="B23"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Gramfort</surname> <given-names>A.</given-names></name> <name><surname>Luessi</surname> <given-names>M.</given-names></name> <name><surname>Larson</surname> <given-names>E.</given-names></name> <name><surname>Engemann</surname> <given-names>D. A.</given-names></name> <name><surname>Strohmeier</surname> <given-names>D.</given-names></name> <name><surname>Brodbeck</surname> <given-names>C.</given-names></name><etal/></person-group> (<year>2013a</year>). <article-title>MEG and EEG data analysis with MNE-Python.</article-title> <source><italic>Front. Neurosci.</italic></source> <volume>7</volume>:<issue>267</issue>.</citation></ref>
<ref id="B24"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Gramfort</surname> <given-names>A.</given-names></name> <name><surname>Strohmeier</surname> <given-names>D.</given-names></name> <name><surname>Haueisen</surname> <given-names>J.</given-names></name> <name><surname>Hamalainen</surname> <given-names>M. S.</given-names></name> <name><surname>Kowalski</surname> <given-names>M.</given-names></name></person-group> (<year>2013b</year>). <article-title>Time-frequency mixed-norm estimates: sparse M/EEG imaging with non-stationary source activations.</article-title> <source><italic>Neuroimage</italic></source> <volume>70</volume> <fpage>410</fpage>&#x2013;<lpage>422</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2012.12.051</pub-id> <pub-id pub-id-type="pmid">23291276</pub-id></citation></ref>
<ref id="B25"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Graves</surname> <given-names>A.</given-names></name> <name><surname>Mohamed</surname> <given-names>A.-R.</given-names></name> <name><surname>Hinton</surname> <given-names>G.</given-names></name></person-group> (<year>2013</year>). &#x201C;<article-title>Speech recognition with deep recurrent neural networks</article-title>,&#x201D; in <source><italic>Proceedings of the 2013 IEEE International Conference on Acoustics, Speech and Signal Processing</italic></source>, (<publisher-loc>Pisacataway, NJ</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>6645</fpage>&#x2013;<lpage>6649</lpage>.</citation></ref>
<ref id="B26"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Greensite</surname> <given-names>F.</given-names></name></person-group> (<year>2003</year>). <article-title>The temporal prior in bioelectromagnetic source imaging problems.</article-title> <source><italic>IEEE Trans. Biomed. Eng.</italic></source> <volume>50</volume> <fpage>1152</fpage>&#x2013;<lpage>1159</lpage>. <pub-id pub-id-type="doi">10.1109/tbme.2003.817632</pub-id> <pub-id pub-id-type="pmid">14560768</pub-id></citation></ref>
<ref id="B27"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Gross</surname> <given-names>J.</given-names></name> <name><surname>Kujala</surname> <given-names>J.</given-names></name> <name><surname>H&#x00E4;m&#x00E4;l&#x00E4;inen</surname> <given-names>M.</given-names></name> <name><surname>Timmermann</surname> <given-names>L.</given-names></name> <name><surname>Schnitzler</surname> <given-names>A.</given-names></name> <name><surname>Salmelin</surname> <given-names>R.</given-names></name></person-group> (<year>2001</year>). <article-title>Dynamic imaging of coherent sources: studying neural interactions in the human brain.</article-title> <source><italic>Proc. Natl. Acad. Sci. U.S.A.</italic></source> <volume>98</volume> <fpage>694</fpage>&#x2013;<lpage>699</lpage>. <pub-id pub-id-type="doi">10.1073/pnas.98.2.694</pub-id> <pub-id pub-id-type="pmid">11209067</pub-id></citation></ref>
<ref id="B28"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hamalainen</surname> <given-names>M. S.</given-names></name> <name><surname>Ilmoniemi</surname> <given-names>R. J.</given-names></name></person-group> (<year>1994</year>). <article-title>Interpreting magnetic-fields of the brain - minimum norm estimates.</article-title> <source><italic>Med. Biol. Eng. Comput.</italic></source> <volume>32</volume> <fpage>35</fpage>&#x2013;<lpage>42</lpage>. <pub-id pub-id-type="doi">10.1007/bf02512476</pub-id> <pub-id pub-id-type="pmid">8182960</pub-id></citation></ref>
<ref id="B29"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hamalainen</surname> <given-names>M. S.</given-names></name> <name><surname>Sarvas</surname> <given-names>J.</given-names></name></person-group> (<year>1989</year>). <article-title>Realistic conductivity geometry model of the human head for interpretation of neuromagnetic data.</article-title> <source><italic>IEEE Trans. Biomed. Eng.</italic></source> <volume>36</volume> <fpage>165</fpage>&#x2013;<lpage>171</lpage>. <pub-id pub-id-type="doi">10.1109/10.16463</pub-id></citation></ref>
<ref id="B30"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>H&#x00E4;m&#x00E4;l&#x00E4;inen</surname> <given-names>M.</given-names></name> <name><surname>Hari</surname> <given-names>R.</given-names></name> <name><surname>Ilmoniemi</surname> <given-names>R. J.</given-names></name> <name><surname>Knuutila</surname> <given-names>J.</given-names></name> <name><surname>Lounasmaa</surname> <given-names>O. V.</given-names></name></person-group> (<year>1993</year>). <article-title>Magnetoencephalography - theory, instrumentation, and applications to noninvasive studies of the working human brain.</article-title> <source><italic>Rev. Mod. Phys.</italic></source> <volume>65</volume>:<issue>413</issue>. <pub-id pub-id-type="doi">10.1103/revmodphys.65.413</pub-id></citation></ref>
<ref id="B31"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Helmholtz</surname> <given-names>H. V.</given-names></name></person-group> (<year>1853</year>). <article-title>Ueber einige gesetze der vertheilung elektrischer str&#x00F6;me in k&#x00F6;rperlichen leitern, mit anwendung auf die thierisch-elektrischen versuche (schluss.).</article-title> <source><italic>Annalen der Physik</italic></source> <volume>165</volume> <fpage>353</fpage>&#x2013;<lpage>377</lpage>. <pub-id pub-id-type="doi">10.1002/andp.18531650702</pub-id></citation></ref>
<ref id="B32"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hochreiter</surname> <given-names>S.</given-names></name> <name><surname>Schmidhuber</surname> <given-names>J.</given-names></name></person-group> (<year>1997</year>). <article-title>Long short-term memory.</article-title> <source><italic>Neural Comput.</italic></source> <volume>9</volume> <fpage>1735</fpage>&#x2013;<lpage>1780</lpage>.</citation></ref>
<ref id="B33"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hofmann</surname> <given-names>S. M.</given-names></name> <name><surname>Klotzsche</surname> <given-names>F.</given-names></name> <name><surname>Mariola</surname> <given-names>A.</given-names></name> <name><surname>Nikulin</surname> <given-names>V. V.</given-names></name> <name><surname>Villringer</surname> <given-names>A.</given-names></name> <name><surname>Gaebler</surname> <given-names>M.</given-names></name></person-group> (<year>2018</year>). &#x201C;<article-title>Decoding subjective emotional arousal during a naturalistic VR experience from EEG using LSTMs</article-title>,&#x201D; in <source><italic>Proceedings of the 2018 IEEE International Conference on Artificial Intelligence (AIVR)</italic></source>, (<publisher-loc>Piscataway, NJ</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>128</fpage>&#x2013;<lpage>131</lpage>.</citation></ref>
<ref id="B34"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Hunold</surname> <given-names>A.</given-names></name> <name><surname>Funke</surname> <given-names>M. E.</given-names></name> <name><surname>Eichardt</surname> <given-names>R.</given-names></name> <name><surname>Stenroos</surname> <given-names>M.</given-names></name> <name><surname>Haueisen</surname> <given-names>J.</given-names></name></person-group> (<year>2016</year>). <article-title>EEG and MEG: sensitivity to epileptic spike activity as function of source orientation and depth.</article-title> <source><italic>Physiol. Meas.</italic></source> <volume>37</volume> <fpage>1146</fpage>&#x2013;<lpage>1162</lpage>. <pub-id pub-id-type="doi">10.1088/0967-3334/37/7/1146</pub-id></citation></ref>
<ref id="B35"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Izhikevich</surname> <given-names>E. M.</given-names></name> <name><surname>Edelman</surname> <given-names>G. M.</given-names></name></person-group> (<year>2008</year>). <article-title>Large-scale model of mammalian thalamocortical systems.</article-title> <source><italic>Proc. Natl. Acad. Sci. U.S.A.</italic></source> <volume>105</volume> <fpage>3593</fpage>&#x2013;<lpage>3598</lpage>. <pub-id pub-id-type="doi">10.1073/pnas.0712231105</pub-id> <pub-id pub-id-type="pmid">18292226</pub-id></citation></ref>
<ref id="B36"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Jas</surname> <given-names>M.</given-names></name> <name><surname>Engemann</surname> <given-names>D. A.</given-names></name> <name><surname>Bekhti</surname> <given-names>Y.</given-names></name> <name><surname>Raimondo</surname> <given-names>F.</given-names></name> <name><surname>Gramfort</surname> <given-names>A.</given-names></name></person-group> (<year>2017</year>). <article-title>Autoreject: automated artifact rejection for MEG and EEG data.</article-title> <source><italic>Neuroimage</italic></source> <volume>159</volume> <fpage>417</fpage>&#x2013;<lpage>429</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2017.06.030</pub-id> <pub-id pub-id-type="pmid">28645840</pub-id></citation></ref>
<ref id="B37"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Jirsa</surname> <given-names>V. K.</given-names></name> <name><surname>Jantzen</surname> <given-names>K. J.</given-names></name> <name><surname>Fuchs</surname> <given-names>A.</given-names></name> <name><surname>Kelso</surname> <given-names>J. S.</given-names></name></person-group> (<year>2002</year>). <article-title>Spatiotemporal forward solution of the EEG and MEG using network modeling.</article-title> <source><italic>IEEE Trans. Med. Imaging</italic></source> <volume>21</volume> <fpage>493</fpage>&#x2013;<lpage>504</lpage>. <pub-id pub-id-type="doi">10.1109/tmi.2002.1009385</pub-id> <pub-id pub-id-type="pmid">12071620</pub-id></citation></ref>
<ref id="B38"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Khan</surname> <given-names>S.</given-names></name> <name><surname>Michmizos</surname> <given-names>K.</given-names></name> <name><surname>Tommerdahl</surname> <given-names>M.</given-names></name> <name><surname>Ganesan</surname> <given-names>S.</given-names></name> <name><surname>Kitzbichler</surname> <given-names>M.</given-names></name> <name><surname>Zetino</surname> <given-names>M.</given-names></name><etal/></person-group> (<year>2015</year>). <article-title>Somatosensory cortex functional connectivity abnormalities in autism show opposite trends, depending on direction and spatial scale.</article-title> <source><italic>Brain</italic></source> <volume>138</volume>(<issue>Pt 5</issue>), <fpage>1394</fpage>&#x2013;<lpage>1409</lpage>. <pub-id pub-id-type="doi">10.1093/brain/awv043</pub-id> <pub-id pub-id-type="pmid">25765326</pub-id></citation></ref>
<ref id="B39"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kingma</surname> <given-names>D. P.</given-names></name> <name><surname>Ba</surname> <given-names>J.</given-names></name></person-group> (<year>2014</year>). <article-title>Adam: a method for stochastic optimization.</article-title> <source><italic>Comput. Sci. Mach. Learn.</italic></source> <fpage>1</fpage>&#x2013;<lpage>15</lpage>. Available online at: <ext-link ext-link-type="uri" xlink:href="http://arxiv.org/abs/1412.6980">http://arxiv.org/abs/1412.6980</ext-link> <comment>(accessed May 5, 2018)</comment>.</citation></ref>
<ref id="B40"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Kozhemiako</surname> <given-names>N.</given-names></name> <name><surname>Nunes</surname> <given-names>A.</given-names></name> <name><surname>Samal</surname> <given-names>A.</given-names></name> <name><surname>Rana</surname> <given-names>K.</given-names></name> <name><surname>Calabro</surname> <given-names>F.</given-names></name> <name><surname>H&#x00E4;m&#x00E4;l&#x00E4;inen</surname> <given-names>M.</given-names></name><etal/></person-group> (<year>2020</year>). <article-title>Neural activity underlying the detection of an object movement by an observer during forward self-motion: dynamic decoding and temporal evolution of directional cortical connectivity.</article-title> <source><italic>Prog. Neurobiol.</italic></source> <volume>195</volume>:<issue>101824</issue>. <pub-id pub-id-type="doi">10.1016/j.pneurobio.2020.101824</pub-id> <pub-id pub-id-type="pmid">32446882</pub-id></citation></ref>
<ref id="B41"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Lamus</surname> <given-names>C.</given-names></name> <name><surname>Hamalainen</surname> <given-names>M. S.</given-names></name> <name><surname>Temereanca</surname> <given-names>S.</given-names></name> <name><surname>Brown</surname> <given-names>E. N.</given-names></name> <name><surname>Purdon</surname> <given-names>P. L.</given-names></name></person-group> (<year>2012</year>). <article-title>A spatiotemporal dynamic distributed solution to the MEG inverse problem.</article-title> <source><italic>Neuroimage</italic></source> <volume>63</volume> <fpage>894</fpage>&#x2013;<lpage>909</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2011.11.020</pub-id> <pub-id pub-id-type="pmid">22155043</pub-id></citation></ref>
<ref id="B42"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>LeCun</surname> <given-names>Y.</given-names></name> <name><surname>Bengio</surname> <given-names>Y.</given-names></name> <name><surname>Hinton</surname> <given-names>G.</given-names></name></person-group> (<year>2015</year>). <article-title>Deep learning.</article-title> <source><italic>Nature</italic></source> <volume>521</volume> <fpage>436</fpage>&#x2013;<lpage>444</lpage>.</citation></ref>
<ref id="B43"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Leopold</surname> <given-names>D. A.</given-names></name> <name><surname>Murayama</surname> <given-names>Y.</given-names></name> <name><surname>Logothetis</surname> <given-names>N. K.</given-names></name></person-group> (<year>2003</year>). <article-title>Very slow activity fluctuations in monkey visual cortex: implications for functional brain imaging.</article-title> <source><italic>Cereb. Cortex</italic></source> <volume>13</volume> <fpage>422</fpage>&#x2013;<lpage>433</lpage>. <pub-id pub-id-type="doi">10.1093/cercor/13.4.422</pub-id> <pub-id pub-id-type="pmid">12631571</pub-id></citation></ref>
<ref id="B44"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Limpiti</surname> <given-names>T.</given-names></name> <name><surname>Van Veen</surname> <given-names>B. D.</given-names></name> <name><surname>Attias</surname> <given-names>H. T.</given-names></name> <name><surname>Nagarajan</surname> <given-names>S. S.</given-names></name></person-group> (<year>2008</year>). <article-title>A spatiotemporal framework for estimating trial-to-trial amplitude variation in event-related MEG/EEG.</article-title> <source><italic>IEEE Trans. Biomed. Eng.</italic></source> <volume>56</volume> <fpage>633</fpage>&#x2013;<lpage>645</lpage>. <pub-id pub-id-type="doi">10.1109/tbme.2008.2008423</pub-id> <pub-id pub-id-type="pmid">19272883</pub-id></citation></ref>
<ref id="B45"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Long</surname> <given-names>C. J.</given-names></name> <name><surname>Purdon</surname> <given-names>P. L.</given-names></name> <name><surname>Temereanca</surname> <given-names>S.</given-names></name> <name><surname>Desai</surname> <given-names>N. U.</given-names></name> <name><surname>Hamalainen</surname> <given-names>M. S.</given-names></name> <name><surname>Brown</surname> <given-names>E. N.</given-names></name></person-group> (<year>2011</year>). <article-title>State-space solutions to the dynamic magnetoencephalography inverse problem using high performance computing.</article-title> <source><italic>Ann. Appl. Stat.</italic></source> <volume>5</volume> <fpage>1207</fpage>&#x2013;<lpage>1228</lpage>. <pub-id pub-id-type="doi">10.1214/11-aoas483</pub-id> <pub-id pub-id-type="pmid">24568719</pub-id></citation></ref>
<ref id="B46"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Lucka</surname> <given-names>F.</given-names></name> <name><surname>Pursiainen</surname> <given-names>S.</given-names></name> <name><surname>Burger</surname> <given-names>M.</given-names></name> <name><surname>Wolters</surname> <given-names>C. H.</given-names></name></person-group> (<year>2012</year>). <article-title>Hierarchical Bayesian inference for the EEG inverse problem using realistic FE head models: depth localization and source separation for focal primary currents.</article-title> <source><italic>Neuroimage</italic></source> <volume>61</volume> <fpage>1364</fpage>&#x2013;<lpage>1382</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2012.04.017</pub-id> <pub-id pub-id-type="pmid">22537599</pub-id></citation></ref>
<ref id="B47"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Mattout</surname> <given-names>J.</given-names></name> <name><surname>Phillips</surname> <given-names>C.</given-names></name> <name><surname>Penny</surname> <given-names>W. D.</given-names></name> <name><surname>Rugg</surname> <given-names>M. D.</given-names></name> <name><surname>Friston</surname> <given-names>K. J.</given-names></name></person-group> (<year>2006</year>). <article-title>MEG source localization under multiple constraints: an extended Bayesian framework.</article-title> <source><italic>Neuroimage</italic></source> <volume>30</volume> <fpage>753</fpage>&#x2013;<lpage>767</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2005.10.037</pub-id> <pub-id pub-id-type="pmid">16368248</pub-id></citation></ref>
<ref id="B48"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Nummenmaa</surname> <given-names>A.</given-names></name> <name><surname>Auranen</surname> <given-names>T.</given-names></name> <name><surname>Hamalainen</surname> <given-names>M. S.</given-names></name> <name><surname>Jaaskelainen</surname> <given-names>I. P.</given-names></name> <name><surname>Lampinen</surname> <given-names>J.</given-names></name> <name><surname>Sams</surname> <given-names>M.</given-names></name><etal/></person-group> (<year>2007</year>). <article-title>Hierarchical Bayesian estimates of distributed MEG sources: theoretical aspects and comparison of variational and MCMC methods.</article-title> <source><italic>Neuroimage</italic></source> <volume>35</volume> <fpage>669</fpage>&#x2013;<lpage>685</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2006.05.001</pub-id> <pub-id pub-id-type="pmid">17300961</pub-id></citation></ref>
<ref id="B49"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Olah</surname> <given-names>C.</given-names></name></person-group> (<year>2015</year>). <source><italic>Understanding Lstm Networks.</italic></source> Available online at: <ext-link ext-link-type="uri" xlink:href="http://colah.github.io/posts/2015-08-Understanding-LSTMs/">http://colah.github.io/posts/2015-08-Understanding-LSTMs/</ext-link> <comment>(accessed March 17, 2018)</comment>.</citation></ref>
<ref id="B50"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Ou</surname> <given-names>W.</given-names></name> <name><surname>Hamalainen</surname> <given-names>M. S.</given-names></name> <name><surname>Golland</surname> <given-names>P.</given-names></name></person-group> (<year>2009</year>). <article-title>A distributed spatio-temporal EEG/MEG inverse solver.</article-title> <source><italic>Neuroimage</italic></source> <volume>44</volume> <fpage>932</fpage>&#x2013;<lpage>946</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2008.05.063</pub-id> <pub-id pub-id-type="pmid">18603008</pub-id></citation></ref>
<ref id="B51"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Pascual-Marqui</surname> <given-names>R. D.</given-names></name></person-group> (<year>2002</year>). <article-title>Standardized low-resolution brain electromagnetic tomography (sLORETA): technical details.</article-title> <source><italic>Methods Find. Exp. Clin. Pharmacol.</italic></source> <volume>24</volume> <fpage>5</fpage>&#x2013;<lpage>12</lpage>.</citation></ref>
<ref id="B52"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Pascual-Marqui</surname> <given-names>R. D.</given-names></name> <name><surname>Michel</surname> <given-names>C. M.</given-names></name> <name><surname>Lehmann</surname> <given-names>D.</given-names></name></person-group> (<year>1994</year>). <article-title>Low resolution electromagnetic tomography: a new method for localizing electrical activity in the brain.</article-title> <source><italic>Int. J. Psychophysiol.</italic></source> <volume>18</volume> <fpage>49</fpage>&#x2013;<lpage>65</lpage>. <pub-id pub-id-type="doi">10.1016/0167-8760(84)90014-x</pub-id></citation></ref>
<ref id="B53"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Phillips</surname> <given-names>C.</given-names></name> <name><surname>Mattout</surname> <given-names>J.</given-names></name> <name><surname>Rugg</surname> <given-names>M. D.</given-names></name> <name><surname>Maquet</surname> <given-names>P.</given-names></name> <name><surname>Friston</surname> <given-names>K. J.</given-names></name></person-group> (<year>2005</year>). <article-title>An empirical Bayesian solution to the source reconstruction problem in EEG.</article-title> <source><italic>Neuroimage</italic></source> <volume>24</volume> <fpage>997</fpage>&#x2013;<lpage>1011</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2004.10.030</pub-id> <pub-id pub-id-type="pmid">15670677</pub-id></citation></ref>
<ref id="B54"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Pirondini</surname> <given-names>E.</given-names></name> <name><surname>Babadi</surname> <given-names>B.</given-names></name> <name><surname>Obregon-Henao</surname> <given-names>G.</given-names></name> <name><surname>Lamus</surname> <given-names>C.</given-names></name> <name><surname>Malik</surname> <given-names>W. Q.</given-names></name> <name><surname>Hamalainen</surname> <given-names>M. S.</given-names></name><etal/></person-group> (<year>2018</year>). <article-title>Computationally efficient algorithms for sparse, dynamic solutions to the Eeg source localization problem.</article-title> <source><italic>IEEE Trans. Biomed. Eng.</italic></source> <volume>65</volume> <fpage>1359</fpage>&#x2013;<lpage>1372</lpage>. <pub-id pub-id-type="doi">10.1109/tbme.2017.2739824</pub-id> <pub-id pub-id-type="pmid">28920892</pub-id></citation></ref>
<ref id="B55"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Samuelsson</surname> <given-names>J. G.</given-names></name> <name><surname>Khan</surname> <given-names>S.</given-names></name> <name><surname>Sundaram</surname> <given-names>P.</given-names></name> <name><surname>Peled</surname> <given-names>N.</given-names></name> <name><surname>H&#x00E4;m&#x00E4;l&#x00E4;inen</surname> <given-names>M. S.</given-names></name></person-group> (<year>2019</year>). <article-title>Cortical Signal suppression (CSS) for detection of subcortical activity using MEG and EEG.</article-title> <source><italic>Brain Topogr.</italic></source> <volume>32</volume> <fpage>215</fpage>&#x2013;<lpage>228</lpage>. <pub-id pub-id-type="doi">10.1007/s10548-018-00694-5</pub-id> <pub-id pub-id-type="pmid">30604048</pub-id></citation></ref>
<ref id="B56"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Samuelsson</surname> <given-names>J. G.</given-names></name> <name><surname>Peled</surname> <given-names>N.</given-names></name> <name><surname>Mamashli</surname> <given-names>F.</given-names></name> <name><surname>Ahveninen</surname> <given-names>J.</given-names></name> <name><surname>H&#x00E4;m&#x00E4;l&#x00E4;inen</surname> <given-names>M. S.</given-names></name></person-group> (<year>2020</year>). <article-title>Spatial fidelity of MEG/EEG source estimates: a general evaluation approach.</article-title> <source><italic>Neuroimage</italic></source> <volume>224</volume>:<issue>117430</issue>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2020.117430</pub-id> <pub-id pub-id-type="pmid">33038537</pub-id></citation></ref>
<ref id="B57"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Sato</surname> <given-names>M.-A.</given-names></name> <name><surname>Yoshioka</surname> <given-names>T.</given-names></name> <name><surname>Kajihara</surname> <given-names>S.</given-names></name> <name><surname>Toyama</surname> <given-names>K.</given-names></name> <name><surname>Goda</surname> <given-names>N.</given-names></name> <name><surname>Doya</surname> <given-names>K.</given-names></name><etal/></person-group> (<year>2004</year>). <article-title>Hierarchical Bayesian estimation for MEG inverse problem.</article-title> <source><italic>Neuroimage</italic></source> <volume>23</volume> <fpage>806</fpage>&#x2013;<lpage>826</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2004.06.037</pub-id> <pub-id pub-id-type="pmid">15528082</pub-id></citation></ref>
<ref id="B58"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Schmidhuber</surname> <given-names>J.</given-names></name></person-group> (<year>2015</year>). <article-title>Deep learning in neural networks: an overview.</article-title> <source><italic>Neural Netw.</italic></source> <volume>61</volume> <fpage>85</fpage>&#x2013;<lpage>117</lpage>. <pub-id pub-id-type="doi">10.1016/j.neunet.2014.09.003</pub-id> <pub-id pub-id-type="pmid">25462637</pub-id></citation></ref>
<ref id="B59"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Seide</surname> <given-names>F.</given-names></name> <name><surname>Agarwal</surname> <given-names>A.</given-names></name></person-group> (<year>2016</year>). &#x201C;<article-title>CNTK: Microsoft&#x2019;s open-source deep-learning toolkit</article-title>,&#x201D; in <source><italic>Proceedings of the 22nd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining</italic></source>, (<publisher-loc>New York, NY</publisher-loc>: <publisher-name>Association for Computing Machinery</publisher-name>).</citation></ref>
<ref id="B60"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Shahin</surname> <given-names>A. J.</given-names></name> <name><surname>Roberts</surname> <given-names>L. E.</given-names></name> <name><surname>Miller</surname> <given-names>L. M.</given-names></name> <name><surname>McDonald</surname> <given-names>K. L.</given-names></name> <name><surname>Alain</surname> <given-names>C.</given-names></name></person-group> (<year>2007</year>). <article-title>Sensitivity of EEG and MEG to the N1 and P2 auditory evoked responses modulated by spectral complexity of sounds.</article-title> <source><italic>Brain Topogr.</italic></source> <volume>20</volume> <fpage>55</fpage>&#x2013;<lpage>61</lpage>. <pub-id pub-id-type="doi">10.1007/s10548-007-0031-4</pub-id> <pub-id pub-id-type="pmid">17899352</pub-id></citation></ref>
<ref id="B61"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Somersalo</surname> <given-names>E.</given-names></name> <name><surname>Voutilainen</surname> <given-names>A.</given-names></name> <name><surname>Kaipio</surname> <given-names>J.</given-names></name></person-group> (<year>2003</year>). <article-title>Non-stationary magnetoencephalography by Bayesian filtering of dipole models.</article-title> <source><italic>Inverse Probl.</italic></source> <volume>19</volume>:<issue>1047</issue>. <pub-id pub-id-type="doi">10.1088/0266-5611/19/5/304</pub-id></citation></ref>
<ref id="B62"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Sorrentino</surname> <given-names>A.</given-names></name> <name><surname>Parkkonen</surname> <given-names>L.</given-names></name> <name><surname>Pascarella</surname> <given-names>A.</given-names></name> <name><surname>Campi</surname> <given-names>C.</given-names></name> <name><surname>Piana</surname> <given-names>M.</given-names></name></person-group> (<year>2009</year>). <article-title>Dynamical MEG source modeling with multi-target Bayesian filtering.</article-title> <source><italic>Hum. Brain Mapp.</italic></source> <volume>30</volume> <fpage>1911</fpage>&#x2013;<lpage>1921</lpage>. <pub-id pub-id-type="doi">10.1002/hbm.20786</pub-id> <pub-id pub-id-type="pmid">19378276</pub-id></citation></ref>
<ref id="B63"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Strohmeier</surname> <given-names>D.</given-names></name> <name><surname>Haueisen</surname> <given-names>J.</given-names></name> <name><surname>Gramfort</surname> <given-names>A.</given-names></name></person-group> (<year>2014</year>). &#x201C;<article-title>Improved MEG/EEG source localization with reweighted mixed-norms</article-title>,&#x201D; in <source><italic>Proceedings of the 2014 International Workshop on Pattern Recognition in Neuroimaging</italic></source>, (<publisher-loc>Piscataway, NJ</publisher-loc>: <publisher-name>IEEE</publisher-name>), <fpage>1</fpage>&#x2013;<lpage>4</lpage>.</citation></ref>
<ref id="B64"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Trujillo-Barreto</surname> <given-names>N. J.</given-names></name> <name><surname>Aubert-V&#x00E1;zquez</surname> <given-names>E.</given-names></name> <name><surname>Penny</surname> <given-names>W. D.</given-names></name></person-group> (<year>2008</year>). <article-title>Bayesian M/EEG source reconstruction with spatio-temporal priors.</article-title> <source><italic>Neuroimage</italic></source> <volume>39</volume> <fpage>318</fpage>&#x2013;<lpage>335</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2007.07.062</pub-id> <pub-id pub-id-type="pmid">17904869</pub-id></citation></ref>
<ref id="B65"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Vivaldi</surname> <given-names>V.</given-names></name> <name><surname>Sorrentino</surname> <given-names>A.</given-names></name></person-group> (<year>2016</year>). <article-title>Bayesian smoothing of dipoles in magneto-/electroencephalography.</article-title> <source><italic>Inverse Probl.</italic></source> <volume>32</volume>:<issue>045007</issue>. <pub-id pub-id-type="doi">10.1088/0266-5611/32/4/045007</pub-id></citation></ref>
<ref id="B66"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Wright</surname> <given-names>J.</given-names></name> <name><surname>Rennie</surname> <given-names>C.</given-names></name> <name><surname>Lees</surname> <given-names>G.</given-names></name> <name><surname>Robinson</surname> <given-names>P.</given-names></name> <name><surname>Bourke</surname> <given-names>P.</given-names></name> <name><surname>Chapman</surname> <given-names>C.</given-names></name><etal/></person-group> (<year>2003</year>). <article-title>Simulated electrocortical activity at microscopic, mesoscopic, and global scales.</article-title> <source><italic>Neuropsychopharmacology</italic></source> <volume>28</volume> <fpage>S80</fpage>&#x2013;<lpage>S93</lpage>.</citation></ref>
<ref id="B67"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Yogatama</surname> <given-names>D.</given-names></name> <name><surname>Mann</surname> <given-names>G.</given-names></name></person-group> (<year>2014</year>). &#x201C;<article-title>Efficient transfer learning method for automatic hyperparameter tuning</article-title>,&#x201D; <source><italic>Proceedings of the Seventeenth International Conference on Artificial Intelligence and Statistics</italic></source>, <volume>33</volume> <fpage>1077</fpage>&#x2013;<lpage>1085</lpage>. <comment>Proceedings of the Seventeenth International Conference on Artificial Intelligence and Statistics, PMLR 33:1077-1085, 2014</comment>.</citation></ref>
<ref id="B68"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Yu</surname> <given-names>B.-W.</given-names></name> <name><surname>Jeong</surname> <given-names>J.-H.</given-names></name> <name><surname>Lee</surname> <given-names>D.-H.</given-names></name> <name><surname>Lee</surname> <given-names>S.-W.</given-names></name></person-group> (<year>2019</year>). &#x201C;<article-title>Detection of pilot&#x2019;s drowsiness based on multimodal convolutional bidirectional LSTM network</article-title>,&#x201D; in <source><italic>Proceedings of the Asian Conference on Pattern Recognition</italic></source>, (<publisher-loc>Berlin</publisher-loc>: <publisher-name>Springer</publisher-name>).</citation></ref>
<ref id="B69"><citation citation-type="journal"><person-group person-group-type="author"><name><surname>Zumer</surname> <given-names>J. M.</given-names></name> <name><surname>Attias</surname> <given-names>H. T.</given-names></name> <name><surname>Sekihara</surname> <given-names>K.</given-names></name> <name><surname>Nagarajan</surname> <given-names>S. S.</given-names></name></person-group> (<year>2008</year>). <article-title>Probabilistic algorithms for MEG/EEG source reconstruction using temporal basis functions learned from data.</article-title> <source><italic>Neuroimage</italic></source> <volume>41</volume> <fpage>924</fpage>&#x2013;<lpage>940</lpage>. <pub-id pub-id-type="doi">10.1016/j.neuroimage.2008.02.006</pub-id> <pub-id pub-id-type="pmid">18455439</pub-id></citation></ref>
</ref-list>
</back>
</article>
