ONLINE CALIBRATION METHOD FOR A DIRECT NEURAL INTERFACE WITH HYPERPARAMETER DETERMINATION BY MEANS OF REINFORCEMENT LEARNING
The method addresses the challenge of online neural interface calibration by using penalized REW-NPLS regression with reinforcement learning to adapt hyperparameters, ensuring efficient and accurate real-time predictive model updates for systems like exoskeletons or computers.
Patent Information
- Application Number
- FR2021007070
- Authority / Receiving Office
- FR · FR
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2021-06-30
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2041-06-30
AI Technical Summary
Existing neural interfaces face challenges in efficiently updating predictive models during online calibration due to the need for significant calculations to optimize hyperparameters, which is not compatible with real-time learning requirements.
A method for online calibration of direct neural interfaces using a penalized REW-NPLS (Recursive Exponentially Weighted N-way Partial Least Squares) regression, where hyperparameter adaptation is achieved through reinforcement learning, specifically employing a multi-armed bandit algorithm to select optimal penalization coefficients without extensive computational demands.
Enables adaptive and efficient online calibration of neural interfaces by dynamically selecting hyperparameters, improving prediction accuracy and reducing computational overhead, thus enhancing the real-time operation of systems like exoskeletons or computer controls.
Smart Images

Figure 00000028_0000
Abstract
Description
Description Title of the invention: ONLINE CALIBRATION METHOD FOR A DIRECT NEURAL INTERFACE WITH DETERMINATION OF HYPERPARAMETERS BY MEANS OF AN AP- REINFORCEMENT PENDING technical field
[0001] The object of the present invention relates to the field of neural interfaces direct, also called BCI (Brain Computer Interface) or BMI (Brain Machine Interface). It is particularly applicable to direct neural control of a machine, such as an exoskeleton or a computer. Prior art
[0002] Direct neural interfaces use electrophysiological signals These interfaces are emitted by the cerebral cortex to generate a control signal. neuronal structures have been the subject of much research, particularly with the aim of restoring motor function to a paraplegic or quadriplegic subject using a prosthesis or motorized orthosis.
[0003] Neural interfaces can be invasive or non-invasive. The in- Invasive neuronal interfaces use intracortical electrodes (i.e., im- implanted in the cortex) or cortical electrodes (placed on the surface of the cortex) collecting electrocorticographic signals (EcoG) in the latter case. The in- Non-invasive neural interfaces use electrodes placed on the scalp to collect electroencephalographic (EEG) signals. Other types of sensors were also considered, such as magnetic sensors measuring the Magnetic fields induced by the electrical activity of neurons in the brain. We are talking about then of magnetoencephalographic (MEG) signals.
[0004] Regardless of the type of signals collected (EEG, ECoG, MEG), the BCI interface must perform signal processing in order to estimate the trajectory of the desired movement by the subject and deduce the control signals of the computer or machine. By For example, when it comes to ordering an exoskeleton, the BCI interface estimates the tra- projectory of the desired movement from the measured electro-physiological signals and in deduces the control signals allowing the exoskeleton to reproduce the trajectory in question. Similarly, when it comes to ordering a computer, The BCTI interface, for example, estimates the desired trajectory of a pointer or a cursor from electrophysiological signals and deduces the signals of cursor / pointer control. Trajectory estimation, also referred to as neural decoding in the literature, generally requires a prior learning or calibration phase. During this phase, the subject imagines, observes, or performs a movement along a predetermined trajectory during a given calibration interval. The electrophysiological signals measured during this interval are then analyzed in relation to the determined trajectory to construct a predictive model, and more specifically, to calculate the parameters of this model. In practice, the calibration phase takes into account a large number of successive movements, with the parameters of the predictive model being corrected based on prediction errors. The BCI interface then uses the predictive model thus obtained to estimate the desired trajectory from the measured electrophysiological signals. Numerous methods for constructing predictive models for direct neural interfaces have been proposed in the state of the art. Partial Least Squares (PLS) regression is among the most promising due to its ability to reduce the dimensionality of observation vectors. Recall that PLS is a method for determining a linear predictive model between input variables (or predictor variables) and output variables by using latent (i.e., unobservable) variables that explain both the input and output variables and are linked by linear regression. A detailed description of the PLS method can be found in the article by P. Geladi et al. entitled "Partial least-squares regression: a tutorial" published in Analytica Chimica Acta, 185, pages 1-17, 1986, as well as in the thesis by S. Vancolen entitled "La regression PLS", June 2004. More precisely, we denote X; the vector (of dimension #?, where 7? is the number of electrodes) of neural signals acquired at time # pet Y; the vector (of dimension M) of variables describing the trajectory (for example # = 9, the variables being the coordinates in space of the point on the trajectory, the components of the velocity vector, and the components of the acceleration vector at the considered time). We form the observation matrix Es (xxy of size JV < 7m representing the neural signals at successive times and the observation matrix Ÿ = (y, ua Yn y of size JV < 7m describing the trajectory at these same times. The PLS algorithm is an iterative process allowing the modeling of a linear relationship between input variables and output variables based on their respective observations (here the observation matrix X for the input variables and the observation matrix Ÿ for the output variables), i.e.: [Math.1] Y=-XB+V (1) where B is a coefficient matrix and V a noise matrix. The matrices X and Ÿ are projected into low-dimensional spaces (latent variable space) so as to simultaneously explain the variations of X and Ÿ. During the first iteration, the projection onto the spaces of the latent variables can be expressed as: [Math.2] X=tp,+E, @-1) [Math.3] Y = u,q; +F (2-2) where t, (y are latent variable vectors (also called score vectors), P, , Ÿ] are loading vectors, and E, F are residual matrices. The score vectors are calculated to maximize the covariance between t, and , and the regression coefficient b; between t, and U, is determined by the least squares method: [Math.4] u, =ht, +T, (2-3) by minimizing the residual vector F] At the second iteration, the same process is applied to the residual matrices, E, F, . In general, at iteration f + 1, the matrices considered are: [Math.5] z XX, = X,-tPp, (3-1) [Math.6] 7 You = Y;- 4.9, (3-2) We finally obtain, step by step, after # iterations: [Math.7] X=TP"'+FE (4-1) [Math.8] Y=UQ'+F (4-2) aT = (t, ss tr) and eU = (u, ce y) are respectively the coefficient matrices, p = (PL, “Pr) “Q = (qu Ir) are the load matrices (also called weighting matrices), and E and F are residual matrices. The PLS method has been generalized by using tensors instead of matrices to describe the input and output variables of the model. Recall that a vector and a matrix are special cases of tensors of order 1 and 2, respectively. The input variable is denoted K ∈ IR 1*-*A, where K is the order of the tensor and J is the dimension of the mode. The modes can be, for example, time (number of samples over time), frequency (number of spectral bands for analysis), or space (number of electrodes). The PLS method thus generalized is called multivariate PLS or NPLS (N-way PLS). A detailed description can be found in R. Bro's thesis entitled "Multi-way analysis in the food industry: models, algorithms and applications," 1998.The multivariate PLS method was applied to the calculation of the predictive model of trajectories in a BCI interface as described in the article by A. Eliseyev and T. Aksenova entitled "Recursive N-Way Partial Least Squares for Brain-Computer Interface" published in PLOS One, July 2013, vol. 8, no. 7, e69962 and in the international request WO-A-2013 / 057544. According to this method, the predictive model is constructed iteratively, by projecting the tensors (in place of the matrices) onto the spaces of latent variables, i.e. by transposing expressions (4-1) and (4-2): . [Math.9] #F X = NS t.ow'o. ow' + E —uif f Dit, ow / 0.0 wi 7=1 (5-1) [Math.10] F <=, Y = of Uu,°q / 0..0q / +F J7=l (5-2) where ° is the tensor product, and f F and U Ly are linked by the regression relation: [Math.11] u,=1,B, (6) where = Nxf and = - Tp Nxf are res- T, (t,,….1,)eR U, =(u,,…,u,)eR respectively the odds matrices at iteration f = 1 sv FB 7; is the regression coefficient matrix and where we R# q” e R”; are the point vectors- here i ù {, J - regression coefficients and where w eR“ q” er” are the weighting vectors of norm equal to 1 and where E , FF are residual tensors. Here again, we move from one iteration to the next by means of: [Math.12] F X,u = A; TS J f > tLOW o.o0W, J=l (7-1) [Math.13] FF =Y, _ = Y ps = Y,- Tu, 0q / 0..0q7 el (7-2) re LS NE Se Eee a ri tin Fate OT MEME St 00 OS RE RARE LEA ES Po I SE É j £ JE= ;= called projectors) w / eR” q7 eR#= 1, Aÿ = 1, Af and the matrices ,f=1l. . The set of matrices ,f=l. is called B,.f 1,...FB,.f 1, … ÆF is called the prediction model (or predictive model). When the BCI interface is then operational, the matrix X of measured electrophysiological signals is projected onto the latent variable space using the weighting vectors w / to deduce the odds matrix Tr - The odds matrix U p is then deduced using the regression equation, and the estimation Ÿ of Y is obtained from the weighting vectors q” (see expression 5-2). j In summary, the estimate y of the output tensor (control tensor of an effector or tensor describing the trajectory) at time a can be expressed in tensor form: [Math.14] Y, =X,B+p (8) where is the predictive model tensor and P is a bias tensor. The optimal dimension, F" of the latent variable space (or equivalently of the number of successive iterations in the PLS or NPLS method) is chosen so as to minimize the prediction error between the estimate Ÿ and + the observation Ÿ; at the current time from the predictive model of the previous time, -l. When BCI calibration is performed offline, the optimal dimension F' can be obtained through cross-validation between a training dataset and a test dataset. Conversely, when this calibration is performed online, this optimal dimension can be obtained through a recursive validation process as described in the article by A. Eliseyev et al. entitled "Recursive exponentially weighted N-way partial least squares regression with recursive hyperparameters in Brain-Computer Interface applications", Sci. Rep., vol. 7, No. 1, p. 16281, Nov. 2017. The calibration, or equivalently, the mechanism for updating the predictive model according to the REW-NPLS (Recursive Exponentially Weighted N-way Partial Least Squares) algorithm, is described below. If we denote the calibration data blocks (training dataset) during the calibration step (also called the training step) by {x, Y}, the basic idea of the REW-NPLS algorithm is to update the predictive model using the covariance and cross-covariance tensors obtained in the previous calibration step, denoted XX and XY, respectively. These two tensors allow us to obtain a condensed representation of the predictive model in the previous step, without needing to store the history of the previous calibration data blocks: {x, Y}{X, Y} → {X, Y} More specifically, the covariance and cross-covariance tensors are updated using recurrence relations: [Math.15] XX, = yXKX,, + X, x X, (9-1) [Math.16] XY, =#XY,_ +X, x, Y, (9-2) where X denotes the product of mode tensor 1 and Ÿ is a forgetting coefficient with O <y<l. It is thus understood that a current calibration period, carried out during iteration 4, takes into account a previous calibration period carried out during the iteration at —|] and the tensors of the observation data of the current calibration period, the history being weighted by the forgetting coefficient 7 with () < Ve 1: This operation of updating the covariance tensors is performed iteratively over the calibration steps. For each update, the predictive model is then obtained iteratively using a PARAFAC decomposition (a generalization to the tensor case of a singular value decomposition) of the cross-covariance tensor, XxY. Recall that, in general, a PARAFAC decomposition of a tensor Z, of order A, i.e., Ze → R* xL x. *T, allows us to represent this tensor as a linear combination of exterior products of vectors (first-order tensors) up to a residual tensor: [Math.17] K Z="'Ew,ow'o.ow" c 1 to 25; © at TE — y=| (10) with je; =1°= 1,..,À{ where ° is the exterior product and F, is a residual tensor ,|= x and Ÿ is the index of the PARAFAC iteration and R is a given integer. In the case of a REW-NPLS calibration step, each PARAFAC iteration only deals with an elementary decomposition, that is, R = 1. It allows us to extract from the tensor XY, a set of projection vectors, also called projectors, Wiscs v, of respective sizes { > £2> «+2 Lyg WHERE the iteration number # gives the dimension of a space of latent variables onto which the input tensor X, is projected; In order to simplify the presentation and without prejudice to generalization to a tensor of any order, we will assume in the following that the order of the tensor XY, is equal to 3 = 3), that is Hx1,*Z; with — | .Par gaa3 M = 3) XY, € R'*7*Save |XY,|=1 example, the first mode corresponds to the epoch, the second to the frequency and the third to the space (that is to say to the electrodes). At iteration f of the PARAFAC decomposition, we seek the projection vectors qu} 2 43 which satisfy: w 4. w 4> w + [Math.18] -—— |lê -xŸ,| min XV, with Xy, — 6, ow), ow* [Math.19] (w;|=|w;|=|w;|=1 (11) This minimization problem can be solved by an alternating least squares or ALS (Alternative Least Squares) method in which a minimization is performed sequentially for each of the vectors of the decomposition, i.e.: [Math.20] 2; L {pt 247 min XX, —w,(w; @w;) | (12-1) [Math.21] 7; 2 {pt LAF min |XY, -w7 (#7 Ow!;) | (12-2) [Math.22] 2; 3 pl 17 min |XY,e -w;(w; Ow,) | (12-3) where Σ) is the Kronecker product and Σ cn) is a matrix obtained by unfolding the tensor Z, taking mode α as the reference mode (tensor unfolding or flattening along mode α). For example, the matrix Z₀ is defined by y; (=; L- a δ) = RARE where the 2} are the columns of the matrix Z₀. The minimization operations (12-1), (12-2), and (12-3) are repeated until convergence. The least-squares (LS) minimization solutions for each of these operations are given by the projectors: [Math.23] XY 541) {w; ow,) 1 - w,- | Ow2 | (13-1) [Math.24] 3 XY,o(w; Ow;] |w} Bw;|' (13-2) [Math.25] XY (w; Sw,] 2 Ow}|" (13-3) Each iteration f of the PARAFAC decomposition yields a plurality Mf of 4771 M projectors and a prediction coefficient tensor, or predictive model J w pat w, p' of the direct neural interface, defined by a prediction coefficient tensor B / = R(5x xInk{Jx.xJ;) and a bias tensor p” ∈ RlAx-<72), = -u allowing prediction of the control tensor from the observation tensor. This yields a plurality of models, B / ; f = 1, > F, corresponding to different successive dimensions of the latent variable space. Next, in the following calibration step, 74 + | are determined among the models predictive B°; $ = 1, ..., F. The predictive model B f corresponding to the error of weakest prediction where we have noted f the index f corresponding to this weakest f the index prediction error. This determination of the predictive model in the next calibration step is referred to in the relevant literature as recursive validation. In practice, the REW-NPLS method is not applied as is to the observational data obtained during the training step. Indeed, it is preferable to use a penalty term in the regression equation to improve the robustness of the prediction and increase the sparsity of non-zero coefficients in the weighting vectors w / . In particular, when the mode is the spatial mode (electrodes), the sparsity of coefficients in this mode allows for se- Selecting only the electrodes relevant for trajectory prediction is key. A penalized REW-NPLS (PREW-NPLS) method has been proposed, introducing slice-based penalization at each iteration of the PARAFAC algorithm. Slice-based penalization involves eliminating elements with a specific index value from the prediction model tensor. Elements not penalized in iteration # are no longer penalized in subsequent iterations, f + L, f + 2, 5x F. Conversely, elements penalized in an iteration are included in the PARAFAC decomposition of the following iteration. This promotes blockwise sparsity of non-zero elements in the prediction model tensor, significantly simplifying the control calculation. More precisely, during an iteration f of the PARAFAC decomposition, the minimization of the quadratic deviations according to (12-1), (12-2) and (12-3) in the alternating least squares method is replaced by a minimization taking into account a penalty term favoring this rarity, namely: [Math.26] —#! (w; @w! y | fff +Afw5a, (14-1) (Matthew 6) [14-1] [Math.27] au —w2 (vw; @w!, 2 nn} (5087 AL) (14-2) [Math.28] 3 (2 1 ff —#;(w; Ow;,) | F||é nin| \XY,… — #*(w; &w! [+ Iw pin 0 #27 O# | Aa (143) where w, ; w, and w, are non-standard projectors and =, 2w, 3w, are the corresponding standard projectors and wW,=1521 77155 vw; vw, HAS are defined by: Iw5I,29= 0,1 [Math.29] Iila, + (37 kel), (15-1) [Math.30] “* el Jr] ! | | F2.34 keb3, (15-2) [Math.31] — LL *| ia, KeLl, (15-3) where w, # is the closed element of the projection vector w, , Ô is the Kronecker symbol, and (2 LS is the set of indices corresponding to the penalizable elements, it being understood that Q, sl c Q, F since the non-penalized elements of a projector at iteration f are not penalized at iteration F + 1]- In order to simplify the minimization calculation in expressions (14-1), (14-2), (14-3), we operate element by element, namely: [Math.32] 3 +8 (_5)| y (ww, OW, q\" 1 Æ=1,..., 1, (6-1) [Math.33] 2 —w2,(w2 Ow, | +28, (25) k=1,..., / ,(16-2) [Math.34] 2 3, (w2 Ow5 | +28,(35) k=1,...,1,(16-3) where the vectors 7%, 7", 7" are the f-êMes column vectors of the matrices les VeCIeurS 7 > 2, +23 fêtes vecteui KY XY ua) XY, @ obtained by deployment of the cross covariance tensor XY, according to modes 1, 2 and 3, respectively. The functions E4 + _ , apply to scalar values and are defined q=0,-,l #45 by: [Math.35] #0 (7279) =1- Jump, if ke eo £ x) = otherwise (17-1) [Math.36] Bvl9h x) A Jr] sike Of and êmn (w) = () otherwise (17-2) [Math.37] 8 (4 J)= The | if ke Cf and & (u) = Q otherwise (17-3) In particular, it can be shown that the result of the penalized minimization operation according to the L norm, (that is, @ = Q) gives: [Math.38] =0 (We La (18-1) si k ac Gr pe| STMho [Math.39] (95th = (#5 Juice) otherwise (18-2) where (wJ represents the least-squares minimization solution SR ITS (12-1), (12-2), (12-3), that is to say: [Math.40] z1(w, Ow,) (5x ds | Ow2 | (19-1) [Math.41] 1 25(w, Ow',] (3x Juice) |w; Ow}| (19-2) [Math.42] 25(w; Ow}] (3x bis |wz Ow! / (19-3) and the thresholds TR, »{=], 2, 3 are given by: [Math.43] Tri, = A6 res] F (20-1) [Math.44] TR _ JA — Chr} Ow;| (20-2) [Math.45] va This = 78 (20-3) Similarly, other threshold values can be calculated for the "duratt dy" standards It is understood that penalized minimization therefore amounts to performing a thresholding on the projector elements obtained at each step of the ALS method. A detailed description of the PREW-NPLS method can be found in the article by A. Moly et al. entitled “On-line adaptive group-wise sparse NPLS for ECoG neural signal decoding”, published on 14.10.2020 on arXiv.org as well as in the French application FR2010497 filed on 14.10.2020 on behalf of the present applicant. The aforementioned thresholds, Th, depend on the values of the hyperparameters A (penalty coefficients). The choice of these hyperparameters is critical for determining the block rarity of the non-zero elements in the predictive model. Like the dimension of the latent variable space, 7, the values of the hyperparameters A are generally optimized using a cross-validation phase between a training dataset and a test dataset. However, this optimization requires considering the entire set of available data each time and therefore involves significant computations that are incompatible with online learning. The object of the present invention is therefore to propose a direct neural interface whose predictive model is subject to a penalized multi-way online calibration, and more particularly to a PREW-NPLS calibration, in which the adaptation of the penalty coefficients is carried out adaptively during learning without requiring significant calculations. Presentation of the invention The present invention is defined by an online calibration method of a direct neural interface intended to receive a plurality of electrophysiological signals during a plurality of observation windows associated with observation times, to form an input tensor and to deduce therefrom, by means of a predictive model represented by a prediction tensor, an output tensor providing control signals intended to control one or more effectors, said calibration being carried out during a plurality of calibration phases, each calibration phase being carried out from input calibration data, represented by an input calibration tensor, X, ∂R' x.xInr), and output calibration data represented by an output calibration tensor Y, ∂R' x.xInr.xJw), said calibration phase implementing a penalized REW-NPLS regression, the penalization being applied to at least one modality of the prediction tensor and involving at least one hyperparameter, said method being original in that, during a calibration phase: . - we extract a subset, AY, of values of the hyperparameter to be tested from a set, À, of values of the hyperparameter; - a prediction performance indicator (g*) is calculated for each predictive model u of a plurality of penalized predictive models, each penalized predictive model (es) being associated with a dimension (f) of the space of bilater variables and having been obtained, during the previous calibration phase, 14 — 1, by penalized REW-NPLS regression using a hyperparameter value (A) of said subset, the prediction indicator of the penalized predictive model representing the quality of the prediction of the output calibration tensor by this model from the input calibration tensor - For each hyperparameter value (A) of said subset, a compensation (R) associated with the choice of this value is calculated, based on the prediction performance indicators (g*- / ) of the penalized predictive models (@: / ) = u- - For each hyperparameter value (A) of said subset, an action value (Q) corresponding to the choice of this value is updated (140), based on the compensation obtained (R) for the choice of this value in the previous step; - A hyperparameter value (A") is selected according to an action selection strategy from the set A of hyperparameter values based on the action values thus updated (o) - we update each of the penalized predictive models of said plurality, by means of a REW-NPLS regression penalized by means of a hyperparameter value ( A of the set A; - we use the penalized predictive model by means of the said selected and updated hyperparameter value in the previous step, to predict a control tensor providing said control signals from said input tensor. Advantageously, the prediction performance indicator, e*f, of a penalized predictive model u associated with a dimension f of the latent variable space and a hyperparameter value A of the subset is obtained recursively by VAI AE PA CE A ER SSID TS SX CAT AS AG II ECC SE VE EE Af\où <;7.f is the output tensor prediction 4, 4, ç° @u 1 = pebts5[Ya \ Y, obtained from the penalized predictit model obtained during the previous calibration phase, @ +, ART \ is a decreasing function of the difference between the sin. tensors Ÿ is ,etÛ < 4 < 1 is a forgetting coefficient. The reward R° associated with the choice of the hyperparameter value A, can then to be obtained from the best predictive performance indicator, e AT + u obtained by the penalized predictive models e . on the plurality of possible dimensions va, f = 1, …, Æ of the latent variable space. The R* reward can then be given by R° — max ( rank(e; )) _“ rank (e; ) where rank (.) is a sorting function (4 in descending order. According to one variant, the reward (R°) associated with the choice of a hyperparameter value (A) is further obtained from parsimony indicators of penalized predictive models (es; ), a parsimony indicator of a penalized predictive model being defined as an increasing function of the number of zero elements in the prediction tensor (B*”) that represents it. B.-1 According to a first example of implementation, the action value, a, associated with the choice of a hyperparameter value, A, in the calibration phase # is obtained by is the share value associated with this oO =Q° +—(Ri 0) * What choice, during the previous calibration phase, R° is the reward associated with that same choice and 4 is the number of calibration phases carried out. According to a second embodiment, the action value, Oo, associated with the choice of a hyperparameter value, À, in calibration phase 4 is obtained by o' — oO, + n(R} _ Q, ) where Oo, is the stock value associated with this choice, during the previous calibration phase, R° is the reward associated with that same choice and 7] is an update factor with 0 < 7 < 1. According to a first embodiment, the selected hyperparameter value (A") is obtained using a greedy strategy such as that corresponding to the highest action value over the set of hyperparameter values (A). According to a second embodiment, the selected hyperparameter value (A) is obtained using a greedy strategy, this value being taken with a probability β as that corresponding to the highest action value over the set of hyperparameter values (A) and with a probability (1-β) among the other values, called suboptimal. Advantageously, before the step of selecting the hyperparameter value during the calibration phase % , each action value, Oo , associated with the choice of a suboptimal hyperparameter value, À , is bounded above by MAJ Sa AT SOUS UT RES, 24 1 V5 AIRE VE to sindi to to 2 6 u—u(A) where w( A) is the index of the last phase of ca- Q u = oO, +0. M libration in which the value A has been selected and is a non-zero positive parameter. Brief description of the figures Other features and advantages of the invention will become apparent upon reading a preferred embodiment of the invention, with reference to the accompanying figures, among which: [Fig.1] The single figure schematically represents an online calibration method for a direct neural interface according to an embodiment of the present invention. Description of the implementation methods We will now consider the case of a direct neural interface (DNI), focusing particularly on the calibration (or equivalently, learning) phase of such an interface. The electrophysiological signal acquisition system can be an ECoG system or an ECG system. The calibration phases take place online, that is, while the BCI interface is operational. During a calibration phase, the subject imagines or performs a movement along a predetermined trajectory or one recorded over a given interval. The electrophysiological signals acquired by the interface during the calibration phase undergo preprocessing before being used to estimate the parameters of the predictive model. In a manner known per se, the preprocessing may include, for example, centering and normalization of the signals, time-frequency analysis, calculation of the absolute or quadratic values of the coefficients resulting from this analysis, and optionally, frequency smoothing or interpolation (envelope calculation) of the values thus obtained. At each calibration phase, we thus have a pair of tensors X and Y, corresponding respectively to observations of electrophysiological signals (input variables) and control signals (output variables), such as those of a multi-axis robot, for example. The calibration phase aims to obtain the parameters of a linear predictive model that allows us to predict the output variable tensor from the input variable tensor. The idea behind the invention is to use a REW-NPLS calibration method The penalized (PREW-NPLS) method uses a method in which the hyperparameters involved in the penalty, particularly the penalty coefficients, are obtained through reinforcement learning. More specifically, the selection of hyperparameter values is performed using a multi-armed bandit algorithm. This selection of hyperparameter values is carried out during the recursive validation step of the REW-NPLS method. In other words, this recursive validation step is now used to select all the hyperparameters, including the dimension of the latent variable space and the penalty coefficients. The single figure schematically represents the flowchart of an online calibration method for a direct neural interface according to an embodiment of the present invention. This flowchart describes the sequence of such a calibration phase, this phase beginning, at step 100, by taking into account new input and output calibration data, respectively in the form of an input tensor X, and an output tensor Y, : At this stage, we also have in memory the parameters of the penalized predictive models as estimated during the previous calibration phase, 24 — ]. In what follows, we will denote by A the set of penalty coefficients involved in estimating the penalized predictive model. Generally, this set can consist of L-tuples of discrete values and / or intervals of variation of these coefficients. Without loss of generality, we will assume the first case for illustrative purposes. Thus, in the example of a predictive model cited in the introductory section, the set ÆÀ could consist of discrete values (A; Æ, A). An element of A will be generically denoted A. In what follows, we can assume that {A, A} = ] for the sake of simplicity. This will be the case, in particular, if the penalty only applies to the spatial mode (electrodes). A predictive model penalized by the penalty coefficient A, obtained after a calibration phase # and for a dimension f of the variable space “Pr CA - latents will be denoted hereafter ©, 4,7 _ A @%f \. The set of penalized predictive models @; / =(B;7,p;7) associated with the different possible dimensions of the latent variable space, f =1,.., F will be denoted @* . In other words, u ©! ={e; / ;f=1...,F} Thus, during the calibration phase, U is available in memory, 190, and all penalized models are stored. Furthermore, for each value of A, A The memory contains an action value, Co; representing, in the sense of reinforcement learning, the estimated expected reward in response to the action selection (here, the selection of the value A), given the past rewards R# pau R°; during the preceding calibration phases. The reward R associated with the selection of the hyperparameter value A during the calibration phase will be specified later. In step 110, a subset Ac-A of penalty coefficient values (hyperparameters to be tested during the calibration phase %#), called the test set, is constructed from the test set, Af, used during the previous calibration phase and other penalty coefficient values belonging to A-At chosen according to a predetermined criterion. According to a first variant of the implementation, the other values of the penalty coefficients are obtained by random selection in the set A — A5. According to a second variant, the other values of the penalty coefficients are obtained by selecting in the set A — ASS those which correspond to the highest action values nu o. In step 120, a prediction performance indicator is calculated for each penalized predictive model, e* / ,ce for each penalty coefficient of ue imensi d of the test set A € AS , and for each dimension f = {1 F} e the space of latent variables. In other words, we determine to what extent the predictive models obtained during the previous calibration phase can predict the output tensor Y, from the input tensor X; The prediction performance indicator, et7, of the penalized model can be determined iteratively: [Math.46] A AF 6.7 = #48, rôpy EN AE A f =1,.., F@D “ x where <ÂS A,f 4,4 is the output tensor prediction obtained at Ÿ, = X,B, +B; from the penalized predictive model obtained during the previous calibration phase, AA S À is a decreasing function of the gap between the tensors Y, and 5(y,.$, c GS ,et0 < u< 1 is a forgetting coefficient. Y, Conversely, the performance indicator of an untested prediction model remains unchanged, that is: [Math.47] AU pt f ee = 64 ÂeA-AT",f=1...,FQ) In step 130, the reward associated with selecting each value of the penalty coefficient is then estimated. More precisely, this reward is obtained from the performance indicators and the prediction models. To do this, the dimension of the latent variable space that yields the best prediction is first determined, namely: [Math.48] = arg max (e*-* ) Lelit FI Jet} (23) and from this we deduce the maximum performance indicator on the values of f, denoted A _ a tz" êu T ê The reward, R°, for selecting the value A € A during the calibration phase % is determined from the maximum performance indicator related to that value, for example: [Math.49] R! = max(rank(e)})-rank(e;) (24) where rank(.) is a sorting function in descending order. In other words, the value of the hyperparameter A associated with the highest performance indicator, e*, is assigned the first rank (equal to 1), and the value associated with the lowest maximum performance indicator is assigned the last rank (equal to A). (max(rank(e; ))) The person skilled in the art will understand that other expressions of the function of re- Compensation R° may be considered without departing from the scope of the present invention. In particular, the reward obtained may depend not only on a prediction performance indicator (more precisely on its maximum value taken over the set f = L …, ÆF) but also on a sparsity indicator of the tensor B* / . s* »Ÿ, an increasing function of the number of zero elements of this tensor. As before, the sparsity indicator may be obtained recursively on the calibration phase index, by analogy with expression (21). In step 140, the value of each action stored in memory is updated based on the reward obtained for that action in the previous step: [Math.50] Q = Q ul + “I —(R£ -0! +) (25) This update assumes that the probability distribution of reward for each action is stationary. However, if this probability distribution is not stationary, an update that gives more weight to recent rewards can be used, for example: [Math.51] Q = 4 7 (Ri -Q! =) (26) œ0û0 < 7 < 1 is a constant update factor (step size parameter). The value of the action is simply a weighted average of past rewards: [Math.52] u Q, =(1- ue > Li 7 7 1 ou x R; À j=| @Q7 It should be noted that this update step concerns both the actions associated with the values tested (A € A*%* ) during the current calibration phase and those which are associated with untested values. Thus, for each action, or equivalently for each hyperparameter value, we obtain an action value, that is, an expected reward, o R Next, in step 150, we select the hyperparameter value for the new action. In other words, we choose the penalty coefficient (and more specifically general the L-tuple of penalty coefficients) allowing to hope to obtain the highest re- compensation taking into account the actions carried out previously, i.e.: [Math.53] HAS' = argmax(Q*) (28) This strategy, based exclusively on exploiting the action with the highest expected reward, is called greedy. Alternatively, one can opt for a less greedy strategy, resulting from a compromise between exploiting this action and exploring other, less frequently taken actions. Indeed, it is possible that a less explored action, or one that has not been explored recently, will ultimately lead to a higher reward than that obtained through a greedy strategy. According to a greedy strategy, we choose the optimal action, that is to say corresponding to the highest value (the expected reward) with a probability of ε and a suboptimal action by drawing randomly in an equiprobable manner from among the remaining actions, with an overall probability of ] — ε. We will thus understand that the value ε allows us to settle the compromise between exploitation and exploration. Advantageously, if we opt for a greedy strategy, we can select suboptimal stocks by favoring those that have not been selected for a long time. To do this, we can modify the stock values estimated in step 140, before the selection step 150, as follows: [Math.54] + gp #—#) 0” = oO M (29) where u(A) is the index of the last calibration phase in which the value A was selected, and Ÿ is a parameter (non-zero positive real number) used to adjust the trade-off between exploration and exploitation. In other words, when the value A was selected a long time ago, the action value is higher. The selection of the hyperparameter A value in step 150 is based on the modified action values, Q ë LÂE A. At step 160, tàj h of penalized dèles @*7 sant, ape 160, we update each of the penalized models @ € A: using the PREW-NPLS algorithm, the parameters of the other penalized models @**, AeA- A remaining unchanged. Among the updated penalized models, the one corresponding to the hyperparameter value selected in step 150 is used for the prediction of the tensor of exited the operational phase in 170. In the previous description, we assumed that A consisted of discrete values of a penalty coefficient. More generally, this set can consist of J_-tuples of discrete values for J, penalty coefficients respectively applied to J, and modalities of the prediction tensor. In addition, the set A can be an interval of variation | Âri A ] of a co- n°” 'max efficient of penalization or even a Cartesian product of Ÿ, intervals in cases where the penalization applies to / , modalities of the prediction tensor. In this case, a plurality of discrete values can be extracted from the range of variation, and each of them can be updated using a gradient descent algorithm to minimize the predictive performance indicator of the associated penalized models. The update can be performed using the rewards obtained from selecting these discrete values. Finally, the reinforcement learning method for penalization hyperparameters has so far been described in relation to the penalization coefficients applied to one or more modalities of the prediction tensor. It can alternatively or cumulatively take into account the type of penalization, in particular the type of L norm (q = 0, 1 / = , 1), with the value of G then being considered as a hyperparameter of the model.
Claims
Claims
1. Method for online calibration of a direct neural interface intended to receive a plurality of electrophysiological signals during a plurality of observation windows associated with instants observation, to form an input tensor and deduce from it, by means of a predictive model represented by a prediction tensor, a tensor output providing control signals intended to control one or more effectors, said calibration being carried out during a plurality of calibration phases, each calibration phase # being performed from input calibration data, represented by a input calibration tensor, X, e RG x.x1n), and data from output calibration represented by an output calibration tensor PRICE RO EIRE SR RE SE II NES SSSR TRE IE SM EEE SEE Y € TRVi<-x4m) . said calibration phase implementing a ——u penalized REW-NPLS regression, the penalization affecting at least a modality of the prediction tensor and involving at least one hyperparameter, characterized in that, during a calibration phase: - we extract (110) a subset, AS , of values of uw“ the hyperparameter to be tested from a set, A , of values of the hyperparameter; 4f) iction (g edict 7 dc pr rmance icator of perfoi indic: 120) a leule ( - on ca for each predictive model of a plurality of predictive models penalized, each penalized predictive model (@ 3 F) being associated with a dimension ( f ) of the latent variable space and having been obtained, during the previous calibration phase, 14 — ], by REW- regression NPLS penalized using a hyperparameter value ( A ) of said subset, the prediction indicator of the penalized predictive model representing the quality of the prediction of the output calibration tensor by this model from the input calibration tensor we calculate (130) for each hyperparameter value ( À ) of said subset, a reward (R°) associated with the choice of this valcur, from the performance indicators of prediction (e sf) penalized predictive models ( A} - for each hyperparameter value ( À ) of said subset, we updates (140) an action value ( o ) corresponding to the choice of this value, from the reward obtained ( R ) for the choice of this value in the previous step; - we select (150) according to an action selection strategy an hyperparameter value (_2") from the set of values hyperparameter from the action values thus updated ( Q k4 - we update (160) each of the penalized predictive models of said plurality, using a penalized REW-NPLS regression using of a hyperparameter value ( À ) of the set À ; - we use (170) the predictive model penalized by means of said value hyperparameter selected and updated in the previous step, for predict a control tensor providing said signals of command from said input tensor
2. Method for online calibration of a direct neural interface according to claim 1, characterized in that the performance indicator of prediction, g* / , of a penalized predictive model associated with a u dimension f of the latent variable space and has a value of hyperparameter A of the subset is obtained recursively by AF_ AS ee," =: 425 ; mA f\where © 11 is the prediction “5[Y, EE N° EE of output tensor obtained from the obtained penalized predictive model G4T East of output tensor obtained from the penalized predictive model during the previous calibration phase, @ #7, m4, easy, a decreasing function of the gap between the Y tensors, ' and<:4, and FY, 0 < 4 < 1 is a forgetting coefficient.
3. Method for online calibration of a direct neural interface according to claim 1 or 2, characterized in that the reward R” associated with the choice of the hyperparameter value A , is obtained from of the best prediction performance indicator, e””- / obtained by u penalized predictive models @ / , on the plurality of dimensions pe possible, f = 1, …, F of the latent variable space.
4. Method for online calibration of a direct neural interface according to claim 3, characterized in that the reward R° is given Pa RS max(rank(e;))- rank(e})*rank()es a sort function by descending values.
5. Method for online calibration of a direct neural interface according to claim 1 or 2, characterized in that the reward (R°) associated with the choice of a hyperparameter value ( À, ) is obtained in in addition to parsimony indicators of predictive models penalized ( @e* / ), an indicator of parsimony of a predictive model The penalized being defined as an increasing function of the number of zero elements of the prediction tensor ( B ) which represents it. >,
6. Method for online calibration of a direct neural interface according to any one of the preceding claims, characterized in that the action value, o , associated with the choice of a value of hyperparameter, À , at the calibration phase € is obtained by is the action value oO = o, lie +—(R ' ,where ; { -Oi,) Q. associated with this choice, during the previous calibration phase, R° is the reward associated with this same choice and W is the number of phases of calibration performed.
7. Method for online calibration of a direct neural interface according to any one of claims | to 5, characterized in that the action value, Oo associated with the choice of a hyperparameter value, At , at the calibration phase # is obtained by is the action value +7(R} Oo -Q -1 + n(Ri -Q,) where o 1 associated with this choice, during the previous calibration phase, R° is the reward associated with that same choice and 77 is an update factor aveOÜ< 7 <l.
8. Method for online calibration of a direct neural interface according to one of the preceding claims, characterized in that value of selected hyperparameter ( 2") is obtained by means of a greedy strategy like the one corresponding to the action value higher across all hyperparameter values ( À ).
9. Method for online calibration of a direct neural interface according to one of claims 1 to 7, characterized in that the value selected hyperparameter (2") is obtained by means of a strategy & - greedy, this value being taken with a probability & as the one corresponding to the highest share value on the set of hyperparameter values ( À; ) and with a probability (1 = g ) Among the other values, called sub-optimal.
10. Method for online calibration of a direct neural interface according to claim 9, characterized in that before the step of selecting the hyperparameter value during calibration phase 24, each action value, eo , associated with the choice of a hyperparameter value suboptimal, A , is bounded above oO =Q! _ + p ET) u (4 ar J "I where 4( À) is the index of the last calibration phase in which the value A was selected and @ is a non-zero positive parameter.
