Performance monitoring evaluates the cognitive processes involved in error detection and produces a corrective response to improve future performance. Error processing generates a specific neuronal response called error-related potential (ErrP). It represents a particular type of event-related potential (ERP) that can be observed through neuroimaging techniques such as electroencephalography (EEG). The ErrP manifests as a stimulus-blocked ERP waveform, which can be detected in the EEG recording when performance monitoring involves speed-choice tasks. The temporal and frequency characteristics of the ErrP allow us to study the cognitive process involved in the error response. In the ErrP, a negative peak (Ne) and a second positive peak (Pe) occur with characteristic amplitude and latency. In the frequency domain, Ne and Pe are typically associated with an increase in power in the theta and delta frequency band. In addition to being a useful diagnostic tool for cognitive deficits, ErrP can improve the performance of brain-computer interfaces (BCI) if properly detected. BCI presents itself as an innovative approach in the field of neuro-rehabilitation. Its purpose is to decode the user's will through a command signal from brain activity. The role of decoding is crucial in this application: the process has frequent errors and requires attention and commitment on the part of the subject. The ErrP presents itself as an informative tool during BCI applications: it can be used as a corrective signal in BCI outputs that provoke error in the subject or as reinforcement learning of a device that performs actions or makes decisions. The problem therefore lies in achieving optimal recognition of ErrP within the EEG trace. ii Aim of the project This thesis proposes a method for asynchronous classification of ErrPs by training machine learning models. The aim is to use the pre-trained models to identify error responses within the EEG trace, without the aid of a trigger that reveals the actual temporal location of the erroneous action. Method and materials The dataset used consists of EEG recordings of six subjects during a specific ErrP-generating experiment. Two models were used in the classification: a Linear Discriminant Analysis (LDA) model and an EEGNet convolution neural network. The final model presented here is a combination of the two models. The EEG signals follow two different pre-processing paths. The first path applies to the LDA model and includes filtering between 1 and 50 Hz, extraction of the epochs containing the events in a 1s time window and a subsequent extraction of the EEG signal source via the subspace regularization method. The second path, related to the EEGNet, consists of a CAR spatial filtering and a bandpass filtering between 1 and 10 Hz. Epochs are then obtained by extracting the signal in the interval [150; 650] ms after the presentation of feedback. The training of the models is based on a binary classification of two classes: class 1, related to ErrP, and class 0 containing epochs of NoErrP and Background EEG. The LDA model is trained on a set of attributes extracted from the signal source in the FCz and Cz channels. The EEGNet receives the signal input in the epochs on all 64 channels. Asynchronous classification involves a moving window, which runs on the Cz and FCz channels. At each step, the source of the signal and its attributes are obtained, then LDA model performs the prediction. If prediction is positive, the EEGNet model analyses that specific epoch and determines the actual presence or absence of ErrP. The metrics used to evaluate performance are: BA, TPR, FPR, FNR and ACC. Result In the test results, subjects 1,2,3 and 5 show high common metric values in respect to subjects 4 and 6. The confusion matrices reveal an abundance of predicted True Negatives due to the classification structure. The average BA value is ~85%. The introduction of the EEGNet model reduces the BA value but allows a lower False Positive classification of ~ -23%, excluding subject 6 where this does not occur. The average True Positive rate is ~71% while the average total accuracy is ~98%. Conclusion Although the LDA model obtained valid results up to ~90% BA, the need to reduce the high number of FPs led to the use of an EEGNet: a CNN with an architecture found in the literature and then adapted to the classification algorithm. The use of the EEGNet model in most subjects slightly reduces the BA main score (~85%) but provides a clear reduction in the number of FPs: a key result in ErrP-based BCI applications, as incorrect event detection can lead to user frustration.

L'elaborazione degli errori genera una risposta neuronale specifica chiamata potenziale legato all'errore (ErrP). Rappresenta un tipo particolare di potenziale legato agli eventi (ERP) che può essere osservato attraverso tecniche di neuroimaging, come l'elettroencefalogramma (EEG). L'ErrP si manifesta come una forma d'onda ERP bloccata dallo stimolo, rilevabile nella registrazione EEG quando il monitoraggio delle prestazioni prevede compiti di scelta della velocità di risposta. Le caratteristiche temporali e di frequenza dell'ErrP consentono di studiare il processo cognitivo coinvolto nella risposta all'errore. Nell'ErrP si verificano un picco negativo (Ne) e un secondo picco positivo (Pe) con ampiezza e latenza caratteristiche. Nel dominio della frequenza, Ne e Pe sono tipicamente associati a un aumento della potenza nella banda di frequenza theta e delta. Oltre a essere un utile strumento diagnostico per i deficit cognitivi, l'ErrP può migliorare le prestazioni delle interfacce cervello-computer (BCI) se adeguatamente rilevate. La BCI si presenta come un approccio innovativo nel campo della neuro-riabilitazione. Il suo scopo è quello di decodificare la volontà dell'utente, attraverso un segnale di comando proveniente dalla attività celebrale. Il ruolo della decodifica è cruciale in questa applicazione: il processo presenta frequenti errori e richiede attenzione e impegno da parte del soggetto. L'ErrP si presenta come uno strumento informativo durante le applicazioni con BCI: esso è impiegabile come segnale correttivo negli output della BCI che suscitano errore nel soggetto oppure come apprendimento per rinforzo di un dispositivo che compie azioni oppure prende decisioni. Il problema ricade quindi nell’ottenere un riconoscimento ottimale del ErrP all'interno del tracciato EEG. vi Scopo del Progetto Questa tesi propone un metodo di classificazione asincrona degli ErrP attraverso l’allenamento di modelli in machine learning. Lo scopo è utilizzare i modelli pre-allenati per identificare ErrP all'interno del tracciato EEG, senza l'ausilio di etichette che rivelino l'effettiva posizione temporale dell'azione errata. Metodi Il dataset utilizzato è costituito da registrazioni EEG di sei soggetti nel corso di un esperimento specifico per la generazione di ErrP. I modelli utilizzati nella classificazione sono due: un modello Linear Discriminant Analysis (LDA) e una rete neurale convoluzione EEGNet. Il modello finale qui presentato è una combinazione dei due modelli. I segnali EEG seguono due percorsi differenti di pre-processazione. Il primo percorso vale per il modello LDA e comprende un filtraggio tra 1 e 50 Hz, l’estrazione delle epoche contenenti gli eventi in una finestra temporale di 1s e una successiva estrazione della sorgente del segnale EEG attraverso il metodo di regolarizzazione dei sottospazi. Il secondo percorso, relativo alla rete EEGNet, consiste in un filtraggio spaziale CAR e in un filtraggio passa banda tra 1 e 10 Hz. Le epoche sono poi ottenute estraendo il segnale nell’intervallo [150; 650] ms dopo la presentazione del feedback. L’allenamento dei modelli si basa su una classificazione binaria di due classi: classe 1, relativa all’ErrP, e classe 0 contente epoche di NoErrP e Background EEG. Il modello LDA è allenato su una serie di attributi estratti dalla sorgente del segnale nei canali FCz e Cz. La rete EEGNet mentre riceve in input il segnale nelle epoche su tutti e 64 i canali. La classificazione asincrona coinvolge una finestra mobile, che scorre sui canali Cz e FCz. Ad ogni step si ricava la sorgente del segnale e i relativi attributi con i quali il modello LDA compie la predizione. Se questa è positiva, il modello EEGNet analizza quella specifica epoca e determina l’effettiva presenza o meno dell’ErrP. Le metriche utilizzate per valutare la performance sono: BA, TPR, FPR, FNR e ACC. Risultati Nei risultati in fase di test i soggetti 1,2,3 e 5 mostrano valori delle metriche comuni ed elevate rispetto ai soggetti 4 e 6. Le matrici di confusione rilevano un’abbondanza di Veri negativi predetti per via della struttura della classificazione. Il valore BA medio è ~85%. L’introduzione del modello EEGNet riduce il valore di BA ma permette una minore classificazione di Falsi Positivi di ~ -23%, escluso il soggetto 6 in cui questo non si verifica. Il tasso medio di Veri Positivi è ~71% mentre l’accuratezza totale media è ~98%. Conclusione Sebbene il modello LDA abbia ottenuto risultati validi fino a ~90% di BA, la necessità di ridurre l'elevato numero di FP ha portato all'utilizzo di una rete EEGNet: una CNN con un'architettura presente in letteratura e poi adattata all'algoritmo di classificazione. L'uso del modello EEGNet nella maggior parte dei soggetti riduce leggermente il punteggio principale di BA (~85%), ma fornisce una chiara riduzione del numero di FP: risultato fondamentale nelle applicazioni BCI basate su ErrP, poiché il rilevamento errato di eventi errati può portare alla frustrazione dell'utente.

Asynchronous classification of error-related potential through single sweep estimation

Marra, Agostino
2021/2022

Abstract

Performance monitoring evaluates the cognitive processes involved in error detection and produces a corrective response to improve future performance. Error processing generates a specific neuronal response called error-related potential (ErrP). It represents a particular type of event-related potential (ERP) that can be observed through neuroimaging techniques such as electroencephalography (EEG). The ErrP manifests as a stimulus-blocked ERP waveform, which can be detected in the EEG recording when performance monitoring involves speed-choice tasks. The temporal and frequency characteristics of the ErrP allow us to study the cognitive process involved in the error response. In the ErrP, a negative peak (Ne) and a second positive peak (Pe) occur with characteristic amplitude and latency. In the frequency domain, Ne and Pe are typically associated with an increase in power in the theta and delta frequency band. In addition to being a useful diagnostic tool for cognitive deficits, ErrP can improve the performance of brain-computer interfaces (BCI) if properly detected. BCI presents itself as an innovative approach in the field of neuro-rehabilitation. Its purpose is to decode the user's will through a command signal from brain activity. The role of decoding is crucial in this application: the process has frequent errors and requires attention and commitment on the part of the subject. The ErrP presents itself as an informative tool during BCI applications: it can be used as a corrective signal in BCI outputs that provoke error in the subject or as reinforcement learning of a device that performs actions or makes decisions. The problem therefore lies in achieving optimal recognition of ErrP within the EEG trace. ii Aim of the project This thesis proposes a method for asynchronous classification of ErrPs by training machine learning models. The aim is to use the pre-trained models to identify error responses within the EEG trace, without the aid of a trigger that reveals the actual temporal location of the erroneous action. Method and materials The dataset used consists of EEG recordings of six subjects during a specific ErrP-generating experiment. Two models were used in the classification: a Linear Discriminant Analysis (LDA) model and an EEGNet convolution neural network. The final model presented here is a combination of the two models. The EEG signals follow two different pre-processing paths. The first path applies to the LDA model and includes filtering between 1 and 50 Hz, extraction of the epochs containing the events in a 1s time window and a subsequent extraction of the EEG signal source via the subspace regularization method. The second path, related to the EEGNet, consists of a CAR spatial filtering and a bandpass filtering between 1 and 10 Hz. Epochs are then obtained by extracting the signal in the interval [150; 650] ms after the presentation of feedback. The training of the models is based on a binary classification of two classes: class 1, related to ErrP, and class 0 containing epochs of NoErrP and Background EEG. The LDA model is trained on a set of attributes extracted from the signal source in the FCz and Cz channels. The EEGNet receives the signal input in the epochs on all 64 channels. Asynchronous classification involves a moving window, which runs on the Cz and FCz channels. At each step, the source of the signal and its attributes are obtained, then LDA model performs the prediction. If prediction is positive, the EEGNet model analyses that specific epoch and determines the actual presence or absence of ErrP. The metrics used to evaluate performance are: BA, TPR, FPR, FNR and ACC. Result In the test results, subjects 1,2,3 and 5 show high common metric values in respect to subjects 4 and 6. The confusion matrices reveal an abundance of predicted True Negatives due to the classification structure. The average BA value is ~85%. The introduction of the EEGNet model reduces the BA value but allows a lower False Positive classification of ~ -23%, excluding subject 6 where this does not occur. The average True Positive rate is ~71% while the average total accuracy is ~98%. Conclusion Although the LDA model obtained valid results up to ~90% BA, the need to reduce the high number of FPs led to the use of an EEGNet: a CNN with an architecture found in the literature and then adapted to the classification algorithm. The use of the EEGNet model in most subjects slightly reduces the BA main score (~85%) but provides a clear reduction in the number of FPs: a key result in ErrP-based BCI applications, as incorrect event detection can lead to user frustration.
FARABBI, ANDREA
ING - Scuola di Ingegneria Industriale e dell'Informazione
4-mag-2023
2021/2022
L'elaborazione degli errori genera una risposta neuronale specifica chiamata potenziale legato all'errore (ErrP). Rappresenta un tipo particolare di potenziale legato agli eventi (ERP) che può essere osservato attraverso tecniche di neuroimaging, come l'elettroencefalogramma (EEG). L'ErrP si manifesta come una forma d'onda ERP bloccata dallo stimolo, rilevabile nella registrazione EEG quando il monitoraggio delle prestazioni prevede compiti di scelta della velocità di risposta. Le caratteristiche temporali e di frequenza dell'ErrP consentono di studiare il processo cognitivo coinvolto nella risposta all'errore. Nell'ErrP si verificano un picco negativo (Ne) e un secondo picco positivo (Pe) con ampiezza e latenza caratteristiche. Nel dominio della frequenza, Ne e Pe sono tipicamente associati a un aumento della potenza nella banda di frequenza theta e delta. Oltre a essere un utile strumento diagnostico per i deficit cognitivi, l'ErrP può migliorare le prestazioni delle interfacce cervello-computer (BCI) se adeguatamente rilevate. La BCI si presenta come un approccio innovativo nel campo della neuro-riabilitazione. Il suo scopo è quello di decodificare la volontà dell'utente, attraverso un segnale di comando proveniente dalla attività celebrale. Il ruolo della decodifica è cruciale in questa applicazione: il processo presenta frequenti errori e richiede attenzione e impegno da parte del soggetto. L'ErrP si presenta come uno strumento informativo durante le applicazioni con BCI: esso è impiegabile come segnale correttivo negli output della BCI che suscitano errore nel soggetto oppure come apprendimento per rinforzo di un dispositivo che compie azioni oppure prende decisioni. Il problema ricade quindi nell’ottenere un riconoscimento ottimale del ErrP all'interno del tracciato EEG. vi Scopo del Progetto Questa tesi propone un metodo di classificazione asincrona degli ErrP attraverso l’allenamento di modelli in machine learning. Lo scopo è utilizzare i modelli pre-allenati per identificare ErrP all'interno del tracciato EEG, senza l'ausilio di etichette che rivelino l'effettiva posizione temporale dell'azione errata. Metodi Il dataset utilizzato è costituito da registrazioni EEG di sei soggetti nel corso di un esperimento specifico per la generazione di ErrP. I modelli utilizzati nella classificazione sono due: un modello Linear Discriminant Analysis (LDA) e una rete neurale convoluzione EEGNet. Il modello finale qui presentato è una combinazione dei due modelli. I segnali EEG seguono due percorsi differenti di pre-processazione. Il primo percorso vale per il modello LDA e comprende un filtraggio tra 1 e 50 Hz, l’estrazione delle epoche contenenti gli eventi in una finestra temporale di 1s e una successiva estrazione della sorgente del segnale EEG attraverso il metodo di regolarizzazione dei sottospazi. Il secondo percorso, relativo alla rete EEGNet, consiste in un filtraggio spaziale CAR e in un filtraggio passa banda tra 1 e 10 Hz. Le epoche sono poi ottenute estraendo il segnale nell’intervallo [150; 650] ms dopo la presentazione del feedback. L’allenamento dei modelli si basa su una classificazione binaria di due classi: classe 1, relativa all’ErrP, e classe 0 contente epoche di NoErrP e Background EEG. Il modello LDA è allenato su una serie di attributi estratti dalla sorgente del segnale nei canali FCz e Cz. La rete EEGNet mentre riceve in input il segnale nelle epoche su tutti e 64 i canali. La classificazione asincrona coinvolge una finestra mobile, che scorre sui canali Cz e FCz. Ad ogni step si ricava la sorgente del segnale e i relativi attributi con i quali il modello LDA compie la predizione. Se questa è positiva, il modello EEGNet analizza quella specifica epoca e determina l’effettiva presenza o meno dell’ErrP. Le metriche utilizzate per valutare la performance sono: BA, TPR, FPR, FNR e ACC. Risultati Nei risultati in fase di test i soggetti 1,2,3 e 5 mostrano valori delle metriche comuni ed elevate rispetto ai soggetti 4 e 6. Le matrici di confusione rilevano un’abbondanza di Veri negativi predetti per via della struttura della classificazione. Il valore BA medio è ~85%. L’introduzione del modello EEGNet riduce il valore di BA ma permette una minore classificazione di Falsi Positivi di ~ -23%, escluso il soggetto 6 in cui questo non si verifica. Il tasso medio di Veri Positivi è ~71% mentre l’accuratezza totale media è ~98%. Conclusione Sebbene il modello LDA abbia ottenuto risultati validi fino a ~90% di BA, la necessità di ridurre l'elevato numero di FP ha portato all'utilizzo di una rete EEGNet: una CNN con un'architettura presente in letteratura e poi adattata all'algoritmo di classificazione. L'uso del modello EEGNet nella maggior parte dei soggetti riduce leggermente il punteggio principale di BA (~85%), ma fornisce una chiara riduzione del numero di FP: risultato fondamentale nelle applicazioni BCI basate su ErrP, poiché il rilevamento errato di eventi errati può portare alla frustrazione dell'utente.
File allegati
File Dimensione Formato  
Thesis.pdf

accessibile in internet solo dagli utenti autorizzati

Descrizione: Tesi Magistrale
Dimensione 2.48 MB
Formato Adobe PDF
2.48 MB Adobe PDF   Visualizza/Apri
Executive_summary.pdf

accessibile in internet solo dagli utenti autorizzati

Descrizione: Executive summary
Dimensione 1.13 MB
Formato Adobe PDF
1.13 MB Adobe PDF   Visualizza/Apri

I documenti in POLITesi sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/10589/211253