Artificial Intelligence and Brain-Computer
Interfaces (BCI) Using EEG
Presenter : Dr. Saran A. K.
Preceptor : Dr. Ganashree C. P.
DM Seminar | 18 September 2025
DEPT. OF PHYSIOLOGY, AIIMS PATNA 2
Source : Neuralink YouTube Channel
DEPT. OF PHYSIOLOGY, AIIMS PATNA 3
DEPT. OF PHYSIOLOGY, AIIMS PATNA 4
Overview
• Brain Computer Interfaces – Definition and History
• Components of BCI
• Types of BCIs
• BCI Using EEG
• Types of EEG Signals in BCI
• SSVEP and SMR Based BCI
• Signal Processing in Non-Invasive BCI
• Classification Methods and Use of Artificial Intelligence
• Ethical Issues and Considerations
DEPT. OF PHYSIOLOGY, AIIMS PATNA 5
“A brain-computer interface is a system that measures brain activity
and converts it in (nearly) real-time into functionally useful outputs to
replace, restore, enhance, supplement, and/or improve the natural
outputs of the brain, thereby changing the ongoing interactions
between the brain and its external or internal environments. It may
additionally modify brain activity using targeted delivery of stimuli to
create functionally useful inputs to the brain.”
BCI Working Definition – BCI Society (2024)
https://bcisociety.org/bci-definition
• A Brain–Computer Interface (BCI) is a direct, non-muscular
communication channel between the brain and the external world.
• It enables control of external devices or environments by using
recorded brain activity in a way that aligns with human intentions.
• First research papers on BCIs appeared in the 1970s.
• Seminal work by Jacques J. Vidal (considered the “father of BCI”).
• Core Motivation : Designed to help patients with paralysis or locked-
in syndrome – neural prosthesis
DEPT. OF PHYSIOLOGY, AIIMS PATNA 7
• Expansion beyond clinical use : Now also seen as a new form of
human–computer interaction (HCI).
• Applications include:
• Hands-free computing when manual control is inconvenient.
• Gaming and entertainment through brain-driven interaction.
• Human augmentation beyond medical uses.
https://www.byfounders.vc/insights/brain-computer-interfaces
DEPT. OF PHYSIOLOGY, AIIMS PATNA 9
Components of a BCI
Rao, Rajesh P. N. (2013). Brain-Computer Interfacing: An Introduction. Cambridge
University Press.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 10
Miller, K. J., Hermes, D., & Staff, N. P. (2020). The current state of electrocorticography-based brain-computer
interfaces. Neurosurgical focus, 49(1), E2.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 11
Tibrewal N, Leeuwis N, Alimardani M (2022) Classification of motor imagery EEG using deep learning increases performance in
inefficient BCI users. PLoS ONE 17(7): e0268880. https://doi.org/10.1371/journal.pone.0268880
Classical Statistical
Classifiers
DEPT. OF PHYSIOLOGY, AIIMS PATNA 12
Types of BCIs
Based on Mode of Control
• Active BCIs : User voluntarily modulates brain activity to send
commands. E.g. Motor Imagery
• Reactive BCIs : Rely on brain responses to external stimuli. E.g.
SSVEP-based BCI
• Passive BCIs : Monitor brain state without intentional control. E.g.
Detecting drowsiness in drivers or workload in pilots
DEPT. OF PHYSIOLOGY, AIIMS PATNA 13
Based on Function/Application
• Communication BCIs : For patients with locked-in syndrome (e.g.,
P300 speller, eye-tracking hybrids).
• Motor BCIs : Control prosthetic limbs, wheelchairs, exoskeletons.
• Replacement/Restorative BCIs
DEPT. OF PHYSIOLOGY, AIIMS PATNA 14
• Motor BCIs - for natural control of
robotic/paralyzed limbs)
• Communication BCIs -for fast,
accurate interaction with electronic
devices).
Kandel ER, Koester JD, Mack SH, Siegelbaum SA. Principles of Neural Science. 6th ed.
New York: McGraw-Hill
DEPT. OF PHYSIOLOGY, AIIMS PATNA 15
Based on Signal Acquisition Method
• Invasive BCIs : Electrodes implanted inside the brain (e.g., Utah
array, ECoG). High resolution, used in clinical trials for paralysis,
prosthetic limb control.
• Non-invasive BCIs : EEG, fNIRS, MEG, or MRI-based. Used in
research and consumer devices (gaming headsets,
neurofeedback).
DEPT. OF PHYSIOLOGY, AIIMS PATNA 16
DEPT. OF PHYSIOLOGY, AIIMS PATNA 17
Component Invasive BCI EEG-based Non-invasive BCI
Signal acquisition
Implanted electrodes (Utah array, ECoG,
depth electrodes) directly on/inside cortex
Scalp EEG electrodes (gel/dry caps)
placed non-invasively
Type of Signals
Single-unit spikes, multi-unit activity, local
field potentials; high-fidelity
Summed postsynaptic potentials → brain
rhythms
Resolution & SNR
Very high spatial & temporal resolution;
high SNR
High temporal but poor spatial resolution;
low SNR, artifact-prone
Pre-processing
Spike detection & sorting, LFP band-pass
filtering
Time, Frequency and Spatial Domain
Measures
Feature extraction
Firing rates, inter-spike intervals, LFP
power/coherence
ERP amplitudes/latencies, spectral power,
SSVEP frequency
Invasive BCIs v/s EEG Based Non-Invasive BCI
Kandel ER, Koester JD, Mack SH, Siegelbaum SA. Principles of Neural Science. 6th ed. New York: McGraw-Hill
Rao, Rajesh P. N. (2013). Brain-Computer Interfacing: An Introduction. Cambridge University Press.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 18
Components of BCI Using EEG
qEEG-based BCI system usually consists of three essential
components:
1. Intent “encoding” by the human brain,
2. Control command “decoding” by a computer algorithm, and
• EEG acquisition,
• EEG signal processing, and
• Pattern classification.
3. Real-time feedback of control results.
BCI Input: Intent “Encoding” by Human Brain
• Neuron-based BCI: Direct decoding of voluntary intent from single-neuron
activity
• EEG-based BCI: Noisy, low-resolution signals → explicit intent hard to decode
• Control commands like moving a cursor are assigned to specific mental states
beforehand
• Performing the corresponding mental task (motor imagery, attention shift, EEG
self-regulation) encodes the control command
Several EEG signals can serve as control media in BCI:
• SMR (Sensorimotor Rhythm) μ/β rhythm: Oscillations over
sensorimotor cortex linked to motor imagery
• SSVEP (steady-state visual evoked potentials): Brain response
locked to repetitive visual flicker
• P300 (event-related potential): Positive deflection ~300 ms after
rare/target stimulus
• SCP (slow cortical potentials): Slow voltage shifts reflecting cortical
excitation/inhibition
DEPT. OF PHYSIOLOGY, AIIMS PATNA 21
Mental
State
Performing a
mental task
Control
Media
Motor Imagery
“Imagining making a fist
with the left hand”
Sensorimotor Rhythm
Move cursor LEFT
Control
Command
Attenuation of Mu
Rhythm Right
DEPT. OF PHYSIOLOGY, AIIMS PATNA 22
• SMR & SCP: Modulated by voluntary intent after training
• SSVEP & P300: Modulated by attention shift
• EEG-based BCI design focuses on training the user to efficiently
encode voluntary intent
• Better encoding by the user → stronger, clearer EEG signals for
decoding
DEPT. OF PHYSIOLOGY, AIIMS PATNA 23
Practical Demonstration of Motor Imagery (MI)
BCI Core: Control Command “Decoding” with a BCI
Algorithm
• Feeding the BCI system with a clear input is the function of a
biological intelligent system—the Brain
• Translating input EEG signals into output control commands is the
purpose of an artificial intelligent system—the BCI algorithm
DEPT. OF PHYSIOLOGY, AIIMS PATNA 25
• Successful BCI requires
• high-quality EEG
• effective signal processing, and
• robust pattern classification
• Scalp EEGs are weak and noisy; target EEG components in BCI
are even weaker
• Signal processing improves SNR and extracts meaningful
features for classification.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 26
• Signal processing methods in BCI fall into three domains: time,
frequency, and space
• Time domain: Ensemble averaging (e.g., P300 BCI) improves
SNR
• Frequency domain: Fourier & wavelet analysis identify target
rhythms (SMR, SSVEP)
• Space domain: Spatial filters (PCA, ICA) combine channels into
more informative virtual channels (e.g., SMR BCI)
DEPT. OF PHYSIOLOGY, AIIMS PATNA 27
• Signal processing outputs a set of features for classification
• Pattern classification assigns EEG data to predefined brain states
(class labels)
• Classifier training has two phases:
• Offline: Parameters trained with labelled data
• Online: Classifier tested and applied during BCI operation
DEPT. OF PHYSIOLOGY, AIIMS PATNA 28
Movement Decoders in BMIs
• Central component of BMIs → map neural activity to intended
movements
• Two main types: Discrete and Continuous
DEPT. OF PHYSIOLOGY, AIIMS PATNA 29
Discrete Decoder
• Estimates one of several possible movement goals eg. selecting a letter on a
keyboard
• Solves a classification problem (statistics)
• Often applied in communication BMIs (speed & accuracy of key/goal selection)
Continuous Decoder
• Estimates moment-by-moment trajectory of movement eg. Reaching around
obstacles, turning a wheel
• Solves a regression problem (statistics)
• Typically used in motor BMIs (accurate trajectories)
DEPT. OF PHYSIOLOGY, AIIMS PATNA 30
Decoder Type Problem Classifiers EEG BCI Examples
Discrete
Classification (choose
among predefined
classes/mental states)
Linear Discriminant Analysis
(LDA), Fisher Discriminant,
Logistic Regression, SVM,
kNN, Decision Trees, CNNs,
RNNs
Communication BCI
Continuous
Regression (predict
continuous values like
trajectory or signal
amplitude)
Linear Regression, Wiener
Filter, Kalman Filter, Gaussian
Process Regression, RNNs,
Transformers
Motor BCIs
Kandel ER, Koester JD, Mack SH, Siegelbaum SA. Principles of Neural Science. 6th ed. New York: McGraw-Hill
DEPT. OF PHYSIOLOGY, AIIMS PATNA 31
• Historically: Linear classifiers dominated (Fisher Discriminant,
LDA, Logistic Regression, SVM with linear kernel).
• Now: With larger datasets + better computing, deep learning
(CNNs, RNNs, Transformers) is increasingly used, especially for
SSVEP and motor imagery decoding.
• In most small-sample EEG studies, linear classifiers remain more
stable and generalizable.
BCI Output: Real-Time Feedback of Control Results
Tong S, Thakor NV, editors. Quantitative EEG analysis: Methods and clinical applications.
Boston: Artech House; 2009.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 33
• Feedback Role:
• User modifies brain activity encoding, similar to natural motor control
• Feedback closes the loop, enabling stable control
• Without feedback → performance & robustness drop significantly
• Performance Factors:
• Quality of translation algorithm
• User’s skill in modulating brain activity
• Effective feedback design
DEPT. OF PHYSIOLOGY, AIIMS PATNA 34
Types of Signals
in EEG Based BCI
Event Related
Potentials
Oscillatory Signals
P300, P100 etc.
SSVEP, SMR, SCP etc.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 35
Aspect Evoked Potentials (ERP) Oscillatory EEG
P100, P300 SSVEP, SMR
Amplitude Tens of μV (small) Hundreds of μV (larger)
Locking Phase-locked to stimulus onset Time-locked but not strictly phase-locked
Response type Transient brain response Steady-state response
BCI Example P300 speller (locked-in patients) SSVEP-based BCI, SMR motor imagery
Advantage
Useful for communication in
clinical cases
Stronger, more stable signals for
processing
ERP vs Oscillatory EEG in BCIs
DEPT. OF PHYSIOLOGY, AIIMS PATNA 36
Advantages of Oscillatory EEG over ERP in BCI
1. Larger amplitude → no DC amplification needed; simpler EEG setup
2. Less sensitive to low-frequency noise (eye movement, electrode
impedance changes)
3. Sustained response → only coarse timing required; supports
asynchronous control
4. Flexible analysis → amplitude & phase extracted by FFT, Hilbert
transform, etc. → more analysis options than ERPs in single trials
DEPT. OF PHYSIOLOGY, AIIMS PATNA 37
SSVEP Based BCI
• VEPs: Reflect visual information processing along the visual pathway and visual cortex
• Types:
• Transient VEP (TVEP): Response to single stimulus; independent of previous trials
• Steady-State VEP (SSVEP): Generated when stimuli repeat faster than TVEP
duration (>6 Hz)
• Recording: SSVEP strongest at occipital region (EEG electrode Oz)
• 1970s – Vidal’s pilot VEP-based BCI
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 38
Physiological Mechanism of SSVEP
Photic Driving Response
• Visual cortex neurons synchronize with repetitive flicker stimulation
• Produces strong response at stimulus frequency and its harmonics (fundamental + 2nd
harmonic)
• Enables detection of stimulus frequency directly from EEG
Central Magnification Effect
• Large cortical area dedicated to central visual field processing
• Amplitude of SSVEP increases when stimulus is near the fovea (center of gaze)
• Results in stronger signals for central visual stimuli
Hello.
Tong S, Thakor NV, editors. Quantitative EEG analysis: Methods and clinical applications.
Boston: Artech House; 2009.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 40
Principle for SSVEP based BCI:
• By gazing at one of multiple frequency-coded flickers, user
generates distinct SSVEP patterns
• System detects the frequency → decodes user’s gaze/intent
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 41
Advantages of SSVEP-based BCI
1. High performance: Information Transfer Rate (ITR) > 40 bits/s
(higher than most BCI paradigms)
2. Easy system configuration: Simple setup with flickering visual stimuli
3. Minimal training: Users can operate with little practice
4. Robust performance: Reliable across users and sessions
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 42
Sensorimotor Rhythm (SMR) based BCI
• SMR : Alpha-band (8–13 Hz, mu rhythm) ± beta (~20 Hz) over
sensorimotor cortex
• Indicators of motor & somatosensory cortex activity
Modulation (Pfurtscheller, 1970s):
• Event-Related Desynchronization (ERD): Attenuation of SMR
during real/imagined movement or sensory stimulation
• Event-Related Synchronization (ERS): Increase in SMR amplitude
after movement/stimulation
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 43
Topography:
• ERD/ERS patterns follow the somatotopic body map
• Example: Left-hand/right-hand movements → strongest
ERD/ERS in contralateral hand area
Motor Imagery:
• Imagined movements produce SMR patterns similar to real
movement
• Provides the physiological basis of SMR-based BCI (also called
motor imagery BCI or mu rhythm BCI)
Hello.
Tong S, Thakor NV, editors. Quantitative EEG analysis: Methods and clinical applications.
Boston: Artech House; 2009.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 45
Signal Processing (Non-Invasive BCIs)
• Invasive BCIs use spike sorting to separate spikes from neural
hash.
• Non-invasive BCIs like EEG capture the combined activity of large
neuron populations, mainly oscillatory patterns.
• Feature extraction methods include time, frequency, and wavelet
analysis, often combined with spatial filtering (PCA, ICA, CSP) to
reduce noise and improve class separation.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 46
TIME
S
P
A
C
E
FREQUENCY
DEPT. OF PHYSIOLOGY, AIIMS PATNA 47
Signal Processing Methods – Feature Extraction
Time Domain Analysis Frequency Domain
Analysis
Time Frequency
Analysis
Spatial Filtering
Hijorth Parameters Fast Fourier Transform
Spectral Analysis
Short Time Fourier
Transform
Bipolar, Laplacian and
Common Average
Referencing
Fractal Dimension Wavelet Analysis Principal Component
Analysis (PCA)
Autoregressive
Modeling
Independent
Component Analysis
(ICA)
Bayesian Filtering Common Spatial
Patterns
DEPT. OF PHYSIOLOGY, AIIMS PATNA 48
Frequency Analysis : Fourier Transform
• Fourier Transform expresses signals as sums of sine and cosine
waves, revealing their frequency content.
• The power spectrum from FFT provides features for analysis
• Reduced mu-band (8–12 Hz) power during motor imagery can be
used in BCIs to control a cursor.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 49
Analyzing
Functions
Weights
Signal
DC/Zero
Frequency
Component
Fourier
Transform
Inverse Fourier
Transform
DEPT. OF PHYSIOLOGY, AIIMS PATNA 50
https://www.youtube.com/@ArtemKirsanov
Time
Voltage
DEPT. OF PHYSIOLOGY, AIIMS PATNA 51
https://www.hamradioschool.com/post/time-frequency-domain-signal-views
DEPT. OF PHYSIOLOGY, AIIMS PATNA 52
Fourier Transform is “blind” to time.
https://www.youtube.com/@ArtemKirsanov
DEPT. OF PHYSIOLOGY, AIIMS PATNA 53
https://www.youtube.com/@ArtemKirsanov
DEPT. OF PHYSIOLOGY, AIIMS PATNA 54
Rao, Rajesh P. N. (2013). Brain-Computer Interfacing: An Introduction. Cambridge
University Press.
Wavelet Transform
DEPT. OF PHYSIOLOGY, AIIMS PATNA 55
https://www.youtube.com/@ArtemKirsanov
DEPT. OF PHYSIOLOGY, AIIMS PATNA 56
https://www.youtube.com/@ArtemKirsanov
DEPT. OF PHYSIOLOGY, AIIMS PATNA 57
Time- Frequency Analysis : Wavelet Transform
• Wavelet transform uses scaled and shifted copies of a mother
wavelet.
• Provides multi-resolution analysis: large scales = coarse features,
small scales = fine details.
• Captures non-periodic signals and sharp changes, unlike Fourier.
• Signal is represented by wavelet coefficients for analysis – feature
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 58
Time Domain Analysis
1. Hjorth Parameters (1970): Fast descriptors of time-varying signals.
• Three measures:
• Activity → overall power of the signal
• Mobility → how fast the signal changes (frequency)
• Complexity → how irregular the signal is
• Advantages:
• Robust to noise, practical for real-world BCI.
• Complementary to band power features; improve classification.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 59
Bayesian Filtering
• EEG is noisy and artifact-prone (blinks, muscle, power line).
• Decisions can be dangerous if made from a poor estimate (e.g., wheelchair
moves when patient only blinked).
• Simple time-domain methods give estimates but ignore uncertainty.
• Bayesian filtering improves safety by providing both the state estimate and
confidence.
• Actions can be delayed or rejected when uncertainty is high.
• Eg Kalman Filter (KF) and Particle Filter (PF)
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 60
Spatial Filtering in EEG/BCI
• EEG is recorded from many electrodes across the scalp.
• Spatial filtering = mathematical methods that combine signals from multiple
electrodes
• Enhance local brain activity,
• Reduce noise/artifacts,
• Simplify data (reduce dimensions),
• Extract features useful for classification.
• Principal Component Analysis, Independent Component Analysis, CSP – Common
Spatial Patterns
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 61
Classification
Methods
Signal
Processing
Feature
Extraction
Time Domain
Frequency Domain
Time- Frequency Domain
Spatial Filtering
Hjorth Parameters
Skewness/ Kurtosis
Power Spectral Density
Wavelet Coefficient and Entropy
Fractal Dimension
Classical Statistical Methods
(Linear Discriminant Analysis etc.)
Machine Learning
Deep Learning
A.I.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 62
Tibrewal N, Leeuwis N, Alimardani M (2022) Classification of motor imagery EEG using deep learning increases performance in
inefficient BCI users. PLoS ONE 17(7): e0268880. https://doi.org/10.1371/journal.pone.0268880
Role of Artificial Intelligence in Brain Computer Interfaces
DEPT. OF PHYSIOLOGY, AIIMS PATNA 63
Artificial Intelligence
• Artificial intelligence is the ability of machines to perform tasks
that usually require human intelligence, such as learning,
reasoning, and problem-solving.
• It includes a range of approaches, such as rule-based systems,
evolutionary algorithms, machine learning, and others.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 64
Machine Learning
• Machine learning is a branch of A. I that enables computers to
learn from data and improve their performance over time without
being explicitly programmed.
• Extracting features like band power or Hjorth parameters from
EEG, then classifying motor imagery using an SVM.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 65
Deep Learning
• Deep learning is a subset of machine learning that uses neural
networks with multiple layers to model and understand complex
patterns in large datasets.
• Feeding raw EEG signals (or spectrograms) into a CNN to
automatically detect seizures or classify motor imagery.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 66
Artificial Neural Networks
An artificial neural network is a computational model inspired by the
human brain, made up of interconnected nodes that can learn from
data and process complex patterns.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 67
X. Gu et al., "EEG-Based Brain-Computer Interfaces (BCIs): A Survey of Recent Studies on Signal Sensing Technologies and
Computational Intelligence Approaches and Their Applications," in IEEE/ACM Transactions on Computational Biology and
Bioinformatics, vol. 18, no. 5, pp. 1645-1666, 1 Sept.-Oct. 2021
DEPT. OF PHYSIOLOGY, AIIMS PATNA 68
Classification
Classification is a supervised learning task in which a model is
trained to predict the category or class of an input from a set of
predefined classes, based on its features.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 69
Regression
Regression is a supervised learning task in which a model is trained
to predict a continuous numerical value based on input features.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 70
Classification/Regression in BCIs
• BCIs use classification algorithms to translate neural signals
into device commands.
• Key steps: feature extraction, classifier training, real-time
processing.
• Common algorithms: k-NN, Decision Trees, Support Vector Machine
— each with pros and cons.
• Example: Motor imagery classification to move a cursor left or right.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 71
• Regression in BCIs maps brain signals to continuous outputs for
smooth device control.
• Enables natural movement of cursors, robotic arms, etc.
• Linear methods: simple and interpretable.
• Non-linear methods: capture complex patterns for higher precision.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 72
Machine Learning- Classification Algorithms
• k-Nearest Neighbors (k-NN)
• Decision Trees
• Support Vector Machine (SVM)
Performance metrics
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 73
k-NN
K- Nearest Neighbour – Supervised learning algorithm that predicts
the label of a data point based on the majority label (for
classification) or the average value (for regression) of its k nearest
neighbors in the feature space.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 74
Decision Tree
A decision tree is a supervised learning algorithm that makes
predictions by recursively splitting data into subsets based on feature
values, forming a tree-like structure of decisions.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 75
Support Vector Machine
A support vector machine (SVM) is a supervised learning algorithm that
finds the optimal hyperplane to separate data points of different
classes in a high-dimensional space.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 76
Confusion Matrix
• A confusion matrix is a table used to evaluate the performance of
a classification model by comparing predicted and actual values.
• Accuracy (overall correctness), sensitivity (true positive rate),
specificity (true negative rate)
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 77
K-fold cross-validation
• K-fold cross-validation is an AI model training technique in which a dataset
is divided into k equal parts.
• The model is trained and validated k times, each time using a different
part as the validation set and the remaining parts as the training set.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 78
Deep Learning - Neural Networks
• Deep learning revolutionizes Brain-Computer Interfaces (BCIs) by
enabling automatic feature extraction from complex brain signals.
• Neural networks with multiple hidden layers can learn
hierarchical representations, improving tasks like motor imagery
classification and emotion recognition from EEG data.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 79
Convolutional Neural Network (CNN)
• A convolutional neural network (CNN) is a deep learning algorithm designed for
processing structured grid data.
• It uses convolutional layers with filters to capture spatial hierarchies and patterns.
• Suitable for spatial feature extraction in EEG topography analysis and motor
imagery classification
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 80
Recurrent Neural Networks
• RNN is a neural network architecture designed for sequential data.
• It maintains a hidden state to capture information from previous steps,
allowing it to model temporal dependencies.
• Suitable for temporal sequence processing in continuous EEG
decoding and P300 speller systems
• Vanishing gradient problem.
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 81
Long Short-Term Memory
• LSTM network is a type of RNN designed to capture long-term
dependencies in sequence data.
• It uses gates to control the flow of information and helps overcome the
vanishing gradient problem.
• Used in emotion recognition from EEG and sleep stage classification
Hello.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 82
• Various architectures excel in BCI applications.
• Applications in BCI encompass feature extraction and reducing
dimensionality of input data
• Classification tasks as well as regression tasks
Hello.
Deep Learning for BCI
DEPT. OF PHYSIOLOGY, AIIMS PATNA 83
What Happens After Classification in BCI?
• Translation Algorithm : Converts classifier output (e.g., motor
imagery) into control commands.
• Online vs Offline Modes
• Offline: Classifier trained and tested on pre-recorded EEG data.
• Online: Classifier runs in real time, predicting from live EEG for
immediate control.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 84
• Device/Application Control : Executes the command on external systems
(cursor, speller, robotic arm, neurofeedback).
• Feedback to User : Provides real-time visual, auditory, or tactile feedback.
• Adaptation
• System: Classifier updates for better accuracy.
• User: Learns to produce more consistent brain signals.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 85
Limitations of BCI using EEG
1. Low spatial resolution
2. Noisy signals
3. Non-stationarity – brain signals vary with fatigue, attention, and mood.
4. User dependence – requires training, calibration, and varies across
individuals.
5. Practical issues – electrode setup, comfort, and limited number of
reliable commands.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 86
DEPT. OF PHYSIOLOGY, AIIMS PATNA 87
Ethical Issues and Considerations
• Abuse of Tech: Physical augmentation may be misused in war, crime,
terrorism.
• Neuromarketing: Risk of subliminal influence through BCIs.
• Wireless Communication Risks: Mind reading, coercion, memory
manipulation, malware.
• Need neuro security with hybrid (neural + computer) protection.
DEPT. OF PHYSIOLOGY, AIIMS PATNA 88
• Responsibility for BCI actions; legality of adaptive/self-learning systems.
• Moral & Social Justice: Human enhancement may widen gap
Considerations
• Invasive BCIs need risk–benefit analysis and clear patient advice.
• Informed Consent
• Need for regulatory bodies and laid out policies
89
References
1. Kandel ER, Koester JD, Mack SH, Siegelbaum SA. Principles of Neural Science. 6th ed.
New York: McGraw-Hill
2. Rao, Rajesh P. N. (2013). Brain-Computer Interfacing: An Introduction. Cambridge University
Press.
3. Tong S, Thakor NV, editors. Quantitative EEG analysis: Methods and clinical applications.
Boston: Artech House; 2009.
4. Artem Kirsanov – YouTube ArtemKirsanov
5. AI in 100 images Ashish Bamania
6. X. Gu et al., "EEG-Based Brain-Computer Interfaces (BCIs): A Survey of Recent Studies on
Signal Sensing Technologies and Computational Intelligence Approaches and Their
Applications," in IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol.
18, no. 5, pp. 1645-1666, 1 Sept.-Oct. 2021
DEPT. OF PHYSIOLOGY, AIIMS PATNA 90
THANK YOU !
saran.adhoc@gmail.com
DEPT. OF PHYSIOLOGY, AIIMS PATNA

Artificial Intelligence and Brain-Computer Interfaces (BCI) Using EEG

  • 1.
    Artificial Intelligence andBrain-Computer Interfaces (BCI) Using EEG Presenter : Dr. Saran A. K. Preceptor : Dr. Ganashree C. P. DM Seminar | 18 September 2025
  • 2.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 2 Source : Neuralink YouTube Channel
  • 3.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 3
  • 4.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 4 Overview • Brain Computer Interfaces – Definition and History • Components of BCI • Types of BCIs • BCI Using EEG • Types of EEG Signals in BCI • SSVEP and SMR Based BCI • Signal Processing in Non-Invasive BCI • Classification Methods and Use of Artificial Intelligence • Ethical Issues and Considerations
  • 5.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 5 “A brain-computer interface is a system that measures brain activity and converts it in (nearly) real-time into functionally useful outputs to replace, restore, enhance, supplement, and/or improve the natural outputs of the brain, thereby changing the ongoing interactions between the brain and its external or internal environments. It may additionally modify brain activity using targeted delivery of stimuli to create functionally useful inputs to the brain.” BCI Working Definition – BCI Society (2024) https://bcisociety.org/bci-definition
  • 6.
    • A Brain–ComputerInterface (BCI) is a direct, non-muscular communication channel between the brain and the external world. • It enables control of external devices or environments by using recorded brain activity in a way that aligns with human intentions. • First research papers on BCIs appeared in the 1970s. • Seminal work by Jacques J. Vidal (considered the “father of BCI”). • Core Motivation : Designed to help patients with paralysis or locked- in syndrome – neural prosthesis
  • 7.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 7 • Expansion beyond clinical use : Now also seen as a new form of human–computer interaction (HCI). • Applications include: • Hands-free computing when manual control is inconvenient. • Gaming and entertainment through brain-driven interaction. • Human augmentation beyond medical uses.
  • 8.
  • 9.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 9 Components of a BCI Rao, Rajesh P. N. (2013). Brain-Computer Interfacing: An Introduction. Cambridge University Press.
  • 10.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 10 Miller, K. J., Hermes, D., & Staff, N. P. (2020). The current state of electrocorticography-based brain-computer interfaces. Neurosurgical focus, 49(1), E2.
  • 11.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 11 Tibrewal N, Leeuwis N, Alimardani M (2022) Classification of motor imagery EEG using deep learning increases performance in inefficient BCI users. PLoS ONE 17(7): e0268880. https://doi.org/10.1371/journal.pone.0268880 Classical Statistical Classifiers
  • 12.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 12 Types of BCIs Based on Mode of Control • Active BCIs : User voluntarily modulates brain activity to send commands. E.g. Motor Imagery • Reactive BCIs : Rely on brain responses to external stimuli. E.g. SSVEP-based BCI • Passive BCIs : Monitor brain state without intentional control. E.g. Detecting drowsiness in drivers or workload in pilots
  • 13.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 13 Based on Function/Application • Communication BCIs : For patients with locked-in syndrome (e.g., P300 speller, eye-tracking hybrids). • Motor BCIs : Control prosthetic limbs, wheelchairs, exoskeletons. • Replacement/Restorative BCIs
  • 14.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 14 • Motor BCIs - for natural control of robotic/paralyzed limbs) • Communication BCIs -for fast, accurate interaction with electronic devices). Kandel ER, Koester JD, Mack SH, Siegelbaum SA. Principles of Neural Science. 6th ed. New York: McGraw-Hill
  • 15.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 15 Based on Signal Acquisition Method • Invasive BCIs : Electrodes implanted inside the brain (e.g., Utah array, ECoG). High resolution, used in clinical trials for paralysis, prosthetic limb control. • Non-invasive BCIs : EEG, fNIRS, MEG, or MRI-based. Used in research and consumer devices (gaming headsets, neurofeedback).
  • 16.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 16
  • 17.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 17 Component Invasive BCI EEG-based Non-invasive BCI Signal acquisition Implanted electrodes (Utah array, ECoG, depth electrodes) directly on/inside cortex Scalp EEG electrodes (gel/dry caps) placed non-invasively Type of Signals Single-unit spikes, multi-unit activity, local field potentials; high-fidelity Summed postsynaptic potentials → brain rhythms Resolution & SNR Very high spatial & temporal resolution; high SNR High temporal but poor spatial resolution; low SNR, artifact-prone Pre-processing Spike detection & sorting, LFP band-pass filtering Time, Frequency and Spatial Domain Measures Feature extraction Firing rates, inter-spike intervals, LFP power/coherence ERP amplitudes/latencies, spectral power, SSVEP frequency Invasive BCIs v/s EEG Based Non-Invasive BCI Kandel ER, Koester JD, Mack SH, Siegelbaum SA. Principles of Neural Science. 6th ed. New York: McGraw-Hill Rao, Rajesh P. N. (2013). Brain-Computer Interfacing: An Introduction. Cambridge University Press.
  • 18.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 18 Components of BCI Using EEG qEEG-based BCI system usually consists of three essential components: 1. Intent “encoding” by the human brain, 2. Control command “decoding” by a computer algorithm, and • EEG acquisition, • EEG signal processing, and • Pattern classification. 3. Real-time feedback of control results.
  • 19.
    BCI Input: Intent“Encoding” by Human Brain • Neuron-based BCI: Direct decoding of voluntary intent from single-neuron activity • EEG-based BCI: Noisy, low-resolution signals → explicit intent hard to decode • Control commands like moving a cursor are assigned to specific mental states beforehand • Performing the corresponding mental task (motor imagery, attention shift, EEG self-regulation) encodes the control command
  • 20.
    Several EEG signalscan serve as control media in BCI: • SMR (Sensorimotor Rhythm) μ/β rhythm: Oscillations over sensorimotor cortex linked to motor imagery • SSVEP (steady-state visual evoked potentials): Brain response locked to repetitive visual flicker • P300 (event-related potential): Positive deflection ~300 ms after rare/target stimulus • SCP (slow cortical potentials): Slow voltage shifts reflecting cortical excitation/inhibition
  • 21.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 21 Mental State Performing a mental task Control Media Motor Imagery “Imagining making a fist with the left hand” Sensorimotor Rhythm Move cursor LEFT Control Command Attenuation of Mu Rhythm Right
  • 22.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 22 • SMR & SCP: Modulated by voluntary intent after training • SSVEP & P300: Modulated by attention shift • EEG-based BCI design focuses on training the user to efficiently encode voluntary intent • Better encoding by the user → stronger, clearer EEG signals for decoding
  • 23.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 23 Practical Demonstration of Motor Imagery (MI)
  • 24.
    BCI Core: ControlCommand “Decoding” with a BCI Algorithm • Feeding the BCI system with a clear input is the function of a biological intelligent system—the Brain • Translating input EEG signals into output control commands is the purpose of an artificial intelligent system—the BCI algorithm
  • 25.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 25 • Successful BCI requires • high-quality EEG • effective signal processing, and • robust pattern classification • Scalp EEGs are weak and noisy; target EEG components in BCI are even weaker • Signal processing improves SNR and extracts meaningful features for classification.
  • 26.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 26 • Signal processing methods in BCI fall into three domains: time, frequency, and space • Time domain: Ensemble averaging (e.g., P300 BCI) improves SNR • Frequency domain: Fourier & wavelet analysis identify target rhythms (SMR, SSVEP) • Space domain: Spatial filters (PCA, ICA) combine channels into more informative virtual channels (e.g., SMR BCI)
  • 27.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 27 • Signal processing outputs a set of features for classification • Pattern classification assigns EEG data to predefined brain states (class labels) • Classifier training has two phases: • Offline: Parameters trained with labelled data • Online: Classifier tested and applied during BCI operation
  • 28.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 28 Movement Decoders in BMIs • Central component of BMIs → map neural activity to intended movements • Two main types: Discrete and Continuous
  • 29.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 29 Discrete Decoder • Estimates one of several possible movement goals eg. selecting a letter on a keyboard • Solves a classification problem (statistics) • Often applied in communication BMIs (speed & accuracy of key/goal selection) Continuous Decoder • Estimates moment-by-moment trajectory of movement eg. Reaching around obstacles, turning a wheel • Solves a regression problem (statistics) • Typically used in motor BMIs (accurate trajectories)
  • 30.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 30 Decoder Type Problem Classifiers EEG BCI Examples Discrete Classification (choose among predefined classes/mental states) Linear Discriminant Analysis (LDA), Fisher Discriminant, Logistic Regression, SVM, kNN, Decision Trees, CNNs, RNNs Communication BCI Continuous Regression (predict continuous values like trajectory or signal amplitude) Linear Regression, Wiener Filter, Kalman Filter, Gaussian Process Regression, RNNs, Transformers Motor BCIs Kandel ER, Koester JD, Mack SH, Siegelbaum SA. Principles of Neural Science. 6th ed. New York: McGraw-Hill
  • 31.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 31 • Historically: Linear classifiers dominated (Fisher Discriminant, LDA, Logistic Regression, SVM with linear kernel). • Now: With larger datasets + better computing, deep learning (CNNs, RNNs, Transformers) is increasingly used, especially for SSVEP and motor imagery decoding. • In most small-sample EEG studies, linear classifiers remain more stable and generalizable.
  • 32.
    BCI Output: Real-TimeFeedback of Control Results Tong S, Thakor NV, editors. Quantitative EEG analysis: Methods and clinical applications. Boston: Artech House; 2009.
  • 33.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 33 • Feedback Role: • User modifies brain activity encoding, similar to natural motor control • Feedback closes the loop, enabling stable control • Without feedback → performance & robustness drop significantly • Performance Factors: • Quality of translation algorithm • User’s skill in modulating brain activity • Effective feedback design
  • 34.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 34 Types of Signals in EEG Based BCI Event Related Potentials Oscillatory Signals P300, P100 etc. SSVEP, SMR, SCP etc.
  • 35.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 35 Aspect Evoked Potentials (ERP) Oscillatory EEG P100, P300 SSVEP, SMR Amplitude Tens of μV (small) Hundreds of μV (larger) Locking Phase-locked to stimulus onset Time-locked but not strictly phase-locked Response type Transient brain response Steady-state response BCI Example P300 speller (locked-in patients) SSVEP-based BCI, SMR motor imagery Advantage Useful for communication in clinical cases Stronger, more stable signals for processing ERP vs Oscillatory EEG in BCIs
  • 36.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 36 Advantages of Oscillatory EEG over ERP in BCI 1. Larger amplitude → no DC amplification needed; simpler EEG setup 2. Less sensitive to low-frequency noise (eye movement, electrode impedance changes) 3. Sustained response → only coarse timing required; supports asynchronous control 4. Flexible analysis → amplitude & phase extracted by FFT, Hilbert transform, etc. → more analysis options than ERPs in single trials
  • 37.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 37 SSVEP Based BCI • VEPs: Reflect visual information processing along the visual pathway and visual cortex • Types: • Transient VEP (TVEP): Response to single stimulus; independent of previous trials • Steady-State VEP (SSVEP): Generated when stimuli repeat faster than TVEP duration (>6 Hz) • Recording: SSVEP strongest at occipital region (EEG electrode Oz) • 1970s – Vidal’s pilot VEP-based BCI Hello.
  • 38.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 38 Physiological Mechanism of SSVEP Photic Driving Response • Visual cortex neurons synchronize with repetitive flicker stimulation • Produces strong response at stimulus frequency and its harmonics (fundamental + 2nd harmonic) • Enables detection of stimulus frequency directly from EEG Central Magnification Effect • Large cortical area dedicated to central visual field processing • Amplitude of SSVEP increases when stimulus is near the fovea (center of gaze) • Results in stronger signals for central visual stimuli Hello.
  • 39.
    Tong S, ThakorNV, editors. Quantitative EEG analysis: Methods and clinical applications. Boston: Artech House; 2009.
  • 40.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 40 Principle for SSVEP based BCI: • By gazing at one of multiple frequency-coded flickers, user generates distinct SSVEP patterns • System detects the frequency → decodes user’s gaze/intent Hello.
  • 41.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 41 Advantages of SSVEP-based BCI 1. High performance: Information Transfer Rate (ITR) > 40 bits/s (higher than most BCI paradigms) 2. Easy system configuration: Simple setup with flickering visual stimuli 3. Minimal training: Users can operate with little practice 4. Robust performance: Reliable across users and sessions Hello.
  • 42.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 42 Sensorimotor Rhythm (SMR) based BCI • SMR : Alpha-band (8–13 Hz, mu rhythm) ± beta (~20 Hz) over sensorimotor cortex • Indicators of motor & somatosensory cortex activity Modulation (Pfurtscheller, 1970s): • Event-Related Desynchronization (ERD): Attenuation of SMR during real/imagined movement or sensory stimulation • Event-Related Synchronization (ERS): Increase in SMR amplitude after movement/stimulation Hello.
  • 43.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 43 Topography: • ERD/ERS patterns follow the somatotopic body map • Example: Left-hand/right-hand movements → strongest ERD/ERS in contralateral hand area Motor Imagery: • Imagined movements produce SMR patterns similar to real movement • Provides the physiological basis of SMR-based BCI (also called motor imagery BCI or mu rhythm BCI) Hello.
  • 44.
    Tong S, ThakorNV, editors. Quantitative EEG analysis: Methods and clinical applications. Boston: Artech House; 2009.
  • 45.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 45 Signal Processing (Non-Invasive BCIs) • Invasive BCIs use spike sorting to separate spikes from neural hash. • Non-invasive BCIs like EEG capture the combined activity of large neuron populations, mainly oscillatory patterns. • Feature extraction methods include time, frequency, and wavelet analysis, often combined with spatial filtering (PCA, ICA, CSP) to reduce noise and improve class separation. Hello.
  • 46.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 46 TIME S P A C E FREQUENCY
  • 47.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 47 Signal Processing Methods – Feature Extraction Time Domain Analysis Frequency Domain Analysis Time Frequency Analysis Spatial Filtering Hijorth Parameters Fast Fourier Transform Spectral Analysis Short Time Fourier Transform Bipolar, Laplacian and Common Average Referencing Fractal Dimension Wavelet Analysis Principal Component Analysis (PCA) Autoregressive Modeling Independent Component Analysis (ICA) Bayesian Filtering Common Spatial Patterns
  • 48.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 48 Frequency Analysis : Fourier Transform • Fourier Transform expresses signals as sums of sine and cosine waves, revealing their frequency content. • The power spectrum from FFT provides features for analysis • Reduced mu-band (8–12 Hz) power during motor imagery can be used in BCIs to control a cursor. Hello.
  • 49.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 49 Analyzing Functions Weights Signal DC/Zero Frequency Component Fourier Transform Inverse Fourier Transform
  • 50.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 50 https://www.youtube.com/@ArtemKirsanov Time Voltage
  • 51.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 51 https://www.hamradioschool.com/post/time-frequency-domain-signal-views
  • 52.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 52 Fourier Transform is “blind” to time. https://www.youtube.com/@ArtemKirsanov
  • 53.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 53 https://www.youtube.com/@ArtemKirsanov
  • 54.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 54 Rao, Rajesh P. N. (2013). Brain-Computer Interfacing: An Introduction. Cambridge University Press. Wavelet Transform
  • 55.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 55 https://www.youtube.com/@ArtemKirsanov
  • 56.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 56 https://www.youtube.com/@ArtemKirsanov
  • 57.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 57 Time- Frequency Analysis : Wavelet Transform • Wavelet transform uses scaled and shifted copies of a mother wavelet. • Provides multi-resolution analysis: large scales = coarse features, small scales = fine details. • Captures non-periodic signals and sharp changes, unlike Fourier. • Signal is represented by wavelet coefficients for analysis – feature Hello.
  • 58.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 58 Time Domain Analysis 1. Hjorth Parameters (1970): Fast descriptors of time-varying signals. • Three measures: • Activity → overall power of the signal • Mobility → how fast the signal changes (frequency) • Complexity → how irregular the signal is • Advantages: • Robust to noise, practical for real-world BCI. • Complementary to band power features; improve classification. Hello.
  • 59.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 59 Bayesian Filtering • EEG is noisy and artifact-prone (blinks, muscle, power line). • Decisions can be dangerous if made from a poor estimate (e.g., wheelchair moves when patient only blinked). • Simple time-domain methods give estimates but ignore uncertainty. • Bayesian filtering improves safety by providing both the state estimate and confidence. • Actions can be delayed or rejected when uncertainty is high. • Eg Kalman Filter (KF) and Particle Filter (PF) Hello.
  • 60.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 60 Spatial Filtering in EEG/BCI • EEG is recorded from many electrodes across the scalp. • Spatial filtering = mathematical methods that combine signals from multiple electrodes • Enhance local brain activity, • Reduce noise/artifacts, • Simplify data (reduce dimensions), • Extract features useful for classification. • Principal Component Analysis, Independent Component Analysis, CSP – Common Spatial Patterns Hello.
  • 61.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 61 Classification Methods Signal Processing Feature Extraction Time Domain Frequency Domain Time- Frequency Domain Spatial Filtering Hjorth Parameters Skewness/ Kurtosis Power Spectral Density Wavelet Coefficient and Entropy Fractal Dimension Classical Statistical Methods (Linear Discriminant Analysis etc.) Machine Learning Deep Learning A.I.
  • 62.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 62 Tibrewal N, Leeuwis N, Alimardani M (2022) Classification of motor imagery EEG using deep learning increases performance in inefficient BCI users. PLoS ONE 17(7): e0268880. https://doi.org/10.1371/journal.pone.0268880 Role of Artificial Intelligence in Brain Computer Interfaces
  • 63.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 63 Artificial Intelligence • Artificial intelligence is the ability of machines to perform tasks that usually require human intelligence, such as learning, reasoning, and problem-solving. • It includes a range of approaches, such as rule-based systems, evolutionary algorithms, machine learning, and others. Hello.
  • 64.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 64 Machine Learning • Machine learning is a branch of A. I that enables computers to learn from data and improve their performance over time without being explicitly programmed. • Extracting features like band power or Hjorth parameters from EEG, then classifying motor imagery using an SVM. Hello.
  • 65.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 65 Deep Learning • Deep learning is a subset of machine learning that uses neural networks with multiple layers to model and understand complex patterns in large datasets. • Feeding raw EEG signals (or spectrograms) into a CNN to automatically detect seizures or classify motor imagery. Hello.
  • 66.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 66 Artificial Neural Networks An artificial neural network is a computational model inspired by the human brain, made up of interconnected nodes that can learn from data and process complex patterns. Hello.
  • 67.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 67 X. Gu et al., "EEG-Based Brain-Computer Interfaces (BCIs): A Survey of Recent Studies on Signal Sensing Technologies and Computational Intelligence Approaches and Their Applications," in IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol. 18, no. 5, pp. 1645-1666, 1 Sept.-Oct. 2021
  • 68.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 68 Classification Classification is a supervised learning task in which a model is trained to predict the category or class of an input from a set of predefined classes, based on its features. Hello.
  • 69.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 69 Regression Regression is a supervised learning task in which a model is trained to predict a continuous numerical value based on input features. Hello.
  • 70.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 70 Classification/Regression in BCIs • BCIs use classification algorithms to translate neural signals into device commands. • Key steps: feature extraction, classifier training, real-time processing. • Common algorithms: k-NN, Decision Trees, Support Vector Machine — each with pros and cons. • Example: Motor imagery classification to move a cursor left or right. Hello.
  • 71.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 71 • Regression in BCIs maps brain signals to continuous outputs for smooth device control. • Enables natural movement of cursors, robotic arms, etc. • Linear methods: simple and interpretable. • Non-linear methods: capture complex patterns for higher precision. Hello.
  • 72.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 72 Machine Learning- Classification Algorithms • k-Nearest Neighbors (k-NN) • Decision Trees • Support Vector Machine (SVM) Performance metrics Hello.
  • 73.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 73 k-NN K- Nearest Neighbour – Supervised learning algorithm that predicts the label of a data point based on the majority label (for classification) or the average value (for regression) of its k nearest neighbors in the feature space. Hello.
  • 74.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 74 Decision Tree A decision tree is a supervised learning algorithm that makes predictions by recursively splitting data into subsets based on feature values, forming a tree-like structure of decisions. Hello.
  • 75.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 75 Support Vector Machine A support vector machine (SVM) is a supervised learning algorithm that finds the optimal hyperplane to separate data points of different classes in a high-dimensional space. Hello.
  • 76.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 76 Confusion Matrix • A confusion matrix is a table used to evaluate the performance of a classification model by comparing predicted and actual values. • Accuracy (overall correctness), sensitivity (true positive rate), specificity (true negative rate) Hello.
  • 77.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 77 K-fold cross-validation • K-fold cross-validation is an AI model training technique in which a dataset is divided into k equal parts. • The model is trained and validated k times, each time using a different part as the validation set and the remaining parts as the training set. Hello.
  • 78.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 78 Deep Learning - Neural Networks • Deep learning revolutionizes Brain-Computer Interfaces (BCIs) by enabling automatic feature extraction from complex brain signals. • Neural networks with multiple hidden layers can learn hierarchical representations, improving tasks like motor imagery classification and emotion recognition from EEG data. Hello.
  • 79.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 79 Convolutional Neural Network (CNN) • A convolutional neural network (CNN) is a deep learning algorithm designed for processing structured grid data. • It uses convolutional layers with filters to capture spatial hierarchies and patterns. • Suitable for spatial feature extraction in EEG topography analysis and motor imagery classification Hello.
  • 80.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 80 Recurrent Neural Networks • RNN is a neural network architecture designed for sequential data. • It maintains a hidden state to capture information from previous steps, allowing it to model temporal dependencies. • Suitable for temporal sequence processing in continuous EEG decoding and P300 speller systems • Vanishing gradient problem. Hello.
  • 81.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 81 Long Short-Term Memory • LSTM network is a type of RNN designed to capture long-term dependencies in sequence data. • It uses gates to control the flow of information and helps overcome the vanishing gradient problem. • Used in emotion recognition from EEG and sleep stage classification Hello.
  • 82.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 82 • Various architectures excel in BCI applications. • Applications in BCI encompass feature extraction and reducing dimensionality of input data • Classification tasks as well as regression tasks Hello. Deep Learning for BCI
  • 83.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 83 What Happens After Classification in BCI? • Translation Algorithm : Converts classifier output (e.g., motor imagery) into control commands. • Online vs Offline Modes • Offline: Classifier trained and tested on pre-recorded EEG data. • Online: Classifier runs in real time, predicting from live EEG for immediate control.
  • 84.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 84 • Device/Application Control : Executes the command on external systems (cursor, speller, robotic arm, neurofeedback). • Feedback to User : Provides real-time visual, auditory, or tactile feedback. • Adaptation • System: Classifier updates for better accuracy. • User: Learns to produce more consistent brain signals.
  • 85.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 85 Limitations of BCI using EEG 1. Low spatial resolution 2. Noisy signals 3. Non-stationarity – brain signals vary with fatigue, attention, and mood. 4. User dependence – requires training, calibration, and varies across individuals. 5. Practical issues – electrode setup, comfort, and limited number of reliable commands.
  • 86.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 86
  • 87.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 87 Ethical Issues and Considerations • Abuse of Tech: Physical augmentation may be misused in war, crime, terrorism. • Neuromarketing: Risk of subliminal influence through BCIs. • Wireless Communication Risks: Mind reading, coercion, memory manipulation, malware. • Need neuro security with hybrid (neural + computer) protection.
  • 88.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 88 • Responsibility for BCI actions; legality of adaptive/self-learning systems. • Moral & Social Justice: Human enhancement may widen gap Considerations • Invasive BCIs need risk–benefit analysis and clear patient advice. • Informed Consent • Need for regulatory bodies and laid out policies
  • 89.
    89 References 1. Kandel ER,Koester JD, Mack SH, Siegelbaum SA. Principles of Neural Science. 6th ed. New York: McGraw-Hill 2. Rao, Rajesh P. N. (2013). Brain-Computer Interfacing: An Introduction. Cambridge University Press. 3. Tong S, Thakor NV, editors. Quantitative EEG analysis: Methods and clinical applications. Boston: Artech House; 2009. 4. Artem Kirsanov – YouTube ArtemKirsanov 5. AI in 100 images Ashish Bamania 6. X. Gu et al., "EEG-Based Brain-Computer Interfaces (BCIs): A Survey of Recent Studies on Signal Sensing Technologies and Computational Intelligence Approaches and Their Applications," in IEEE/ACM Transactions on Computational Biology and Bioinformatics, vol. 18, no. 5, pp. 1645-1666, 1 Sept.-Oct. 2021
  • 90.
    DEPT. OF PHYSIOLOGY,AIIMS PATNA 90 THANK YOU ! saran.adhoc@gmail.com DEPT. OF PHYSIOLOGY, AIIMS PATNA

Editor's Notes

  • #6 Defining BCI
  • #9 Basically, our brain functions—from sensation to motor control to memory and decision making—originate from microvolt-level electrical pulses, the firing (action potential) of hundreds of billions of neurons. If all or part of the neuron firings could be captured, theoretically we would be able to interpret ongoing brain activity. With the help of microelectrode arrays and computational power advancements, this kind of system has been implemented. This high resolution gives neuron-based BCI a remarkable information transfer rate, which ensures real-time control of the motion trajectory of a computer cursor or a robotic arm. BCI interprets brain signals, such as neural spikes and cortical and scalp EEGs in an online fashion. For both of the BCI systems, the BCI code is embedded in an oscillatory signal, either as its amplitude or its frequency. With the merits of robust signal transmission and easy signal processing, the oscillatory EEG-based BCI shows a promising perspective for real applications as can be seen in the example systems described in this chapter.
  • #10 Because of the invasiveness and the technical difficulty of maintaining a long-term stable recording of neuron activity, the intracranial BCI has a long way to go before it is widely accepted by paralyzed patients. This obstacle holds true for the cortical EEG-based BCI [9], which places grid and/or strip electrodes under the dura, recording local field potentials from a large population of neurons. The electrical activity from populations of neurons not only spreads inside the dura and skull, but also propagates to the surface of the scalp, which makes it possible to conduct noninvasive recording and interpreting of neural electrical signals and, hence, possibly a noninvasive BCI However, because of volume conduction, the EEG signal captured on the scalp is a blurred version of local field potentials inside the dura. In addition, the muscle activity, eye movement, and other recording artifacts contaminate the signal more, which make it impossible to conduct a direct interpretation of such signals. As discussed in other chapters of this book, numerous efforts have been made to improve the SNR of qEEG signals. Here, in the context of BCI, the challenge of interpreting noisy qEEG signals is even harder, because a BCI system requires real-time online processing
  • #14 First, electrical neural activity in one or more brain areas is measured using penetrating multi- electrode arrays placed, Second, an arm movement is attempted but cannot be made in the case of people with paralysis. Action potentials and local field potentials are measured during these attempts.Together, these neural signals contain considerable information about how the person wishes to move her arm. Third, the relationship between neural activity and attempted movements is characterized. This relationship makes it possible to predict the desired movement from new neural activity, a statistical procedure we refer to as neural decoding Fourth, the BMI is then operated in its normal mode where neural activity is measured in real time and desired movements are decoded from the neural activity by a computer.  The decoded movements can be used to guide prosthetic devices, such as a cursor on a computer screen or a robotic arm. possible to electrically stimulate muscles in a paralyzed limb to enact the decoded movements, a procedure known as functional electrical stimulation. known as the “internet of things” Finally, because the person can see the prosthetic device, she can alter her neural activity by thinking different thoughts on a moment-by-moment basis so as to guide the prosthetic device more accurately. This closed-loop feedback control system can make use of nonvisual sensory modalities as well, including delivering pressure and position information from electronic sensors wrapped on or embedded in a prosthetic arm. Such surrogate sensory information can be transformed into electrical stimulation patterns that are delivered to proprioceptive and somatosensory cortex.
  • #19 Encoding – neuron based system and EEG Based System If the subject wants the computer cursor to move following a desired trajectory, he or she just needs to think about it as controlling his or her own hand In the neuron-based BCI system, the expression of subject’s voluntary intent is straightforward.  In an EEG-based BCI system, however, there is not enough information contained in noisy EEGs for such explicit decoding and control Typically, the control command, such as moving a cursor up or down, is assigned a specific mental state beforehand.
  • #20 SMR/SSVEP/SCP/P300 – EEG based system The subject needs to perform the corresponding mental task to “encode” the desired control command, either through attention shift or by voluntary regulation of his EEG  several types of EEG signals exist—such as sensorimotor rhythm (SMR; also known as μ/β rhythm) [11–13], steady-state visual evoked potential (SSVEP) [14, 15], slow cortical potential (SCP) [16, 17], and P300 [18, 19]—that can be used as neural media in the qEEG-based BCI system. Among these EEG signals, SMR and SCP can be modulated by the user’s voluntary intent after training, whereas the SSVEP and P300 can be modulated by the user’s attention shift. 
  • #22 In fact, the design of the EEG-based BCI paradigm is largely about how to train or instruct the BCI user to express (“encode”) his or her voluntary intent efficiently. The more efficient the user’s brain encodes voluntary intent, the stronger the target EEG signal we may have for further decoding.
  • #25 Besides a high-quality EEG recording, appropriate signal processing (SP) and robust pattern classification are two major parts of a successful BCI system. Because scalp EEGs are weak and noisy, and the target EEG components are even weaker in a BCI context, various SP methods have been employed to improve the SNR and to extract meaningful features for classification in BCI 
  • #26 Basically, these methods can be categorized into three domains: time, frequency, and space. In the time domain, for example, ensemble averaging is a widely used temporal processing technique to enhance the SNR of target EEG components, as in P300-based BCI. In the frequency domain, Fourier transform and wavelet analyses are very effective to find target frequency components, as in SMR and SSVEP-based BCI. In the space domain, spatial filter techniques such as common spatial pattern (CSP) [21] and independent component analysis (ICA) methods [22] have been proved to be very successful in forming a more informative virtual EEG channel by combining multiple real EEG channels, as has been done for SMR-based BCI.
  • #27 For most of the cases, the output of the signal processing is a set of features that can be used for further pattern classification.  The task of pattern classification of a BCI system is to find a suitable classifier and to optimize it for classifying the EEG data into predefined brain states, that is, a logical value of class label. The process usually consists of two phases: offline training phase and online operating phase. The parameters of the classifier are trained offline with given training samples with class labels and then tested in the online BCI operating session. 
  • #30 Before AI: rooted in statistics, simple linear models. ML: algorithmic, flexible, works with nonlinear boundaries but still needs hand-crafted features. DL: end-to-end feature learning + classification/regression, data-hungry but powerful.
  • #32 two links are used to interface the brain and external devices.  The BCI core as described earlier comprised of a set of amplifier and computer equipment with the proper program installed can be considered as a “hard link.” Meanwhile, the feedback of control results is perceived by one of the BCI user’s sensory pathway, such as the visual, auditory, or tactile pathway, which serves as a “soft link” to help the user adjust the brain activity for facilitating the BCI operation
  • #33 As discussed before, the BCI user needs to produce specific brain activity to drive the BCI system. The feedback tells the user how to modify their brain’s encoding in order to improve the output, as happens during a natural movement control through the normal muscular pathway. It is the feedback that closes the loop of the BCI, resulting in a stable control system without feedback, BCI performance and robustness are much lower than in the feedback the performance of a BCI system is not only determined by the quality of the BCI translation algorithm, but also greatly affected by the BCI user’s skill of modulating his or her brain activity a proper design for the presentation of feedback could be a crucial point that can make a difference in terms of BCI performance.
  • #35 Evoked potentials, early visual/auditory evoked potentials like P100 or late potentials like P300, are low-frequency components, typically in the range of tens of microvolts in amplitude. As a transient brain response, an evoked potential is usually phase locked to the onset of an external stimulus or event [25], although oscillatory EEG, such as SSVEP or SMR, has a relatively higher frequency and larger amplitude of several hundreds of microvolts. As a steady-state response, oscillatory EEG is usually time locked to the onset of an external stimulus or internal event, without strict phase locking Some transient evoked potential-based BCIs, such as the P300 speller [18, 19], show promising performance for real application with locked-in patients [26]. However, from the perspective of signal acquisition and processing, the oscillatory EEG-based BCI has several advantages over the ERP-based BCI: 
  • #36 1) The oscillatory EEG has a larger amplitude and needs no dc amplification, which greatly reduce the requirement of the EEG amplifier; (2) the oscillatory EEG is much less sensitive to low-frequency noise caused by eye movement and electrode impedance change, comparing with ERP; (3) the oscillatory EEG is a sustained response and requires merely coarse timing, which allows for the flexibility of asynchronous control, whereas for ERP-based BCI, stimulus synchrony is crucial for EEG recording and analysis; and (4) with amplitude and phase information easily obtained by robust signal processing methods, such as the FFT and Hilbert transform, there are more flexible ways of analysing oscillatory EEGs than ERPs in a single trial fashion.
  • #37 Visual evoked potentials (VEPs) reflect the visual information processing along the visual pathway and primary visual cortex. VEPs corresponding to low stimulus rates or rapidly repetitive stimulations are categorized as transient VEPs (TVEPs) and steady-state VEPs (SSVEPs), respectively Ideally, a TVEP is a true transient response to a visual stimulus that does not depend on any previous trial. If the visual stimulation is repeated with intervals shorter than the duration of a TVEP, the response evoked by each stimulus will overlap each other, and thus an SSVEP is generated. The SSVEP is a response to a visual stimulus modulated at a frequency higher than 6 Hz SSVEPs can be recorded from the scalp over the visual cortex, with maximum amplitude at the occipital region (around EEG electrode Oz). Among brain signals recorded from the scalp, VEPs may be the first kind used as a BCI control. After Vidal’s pilot VEP-based BCI system in the 1970s [28] and Sutter’s VEP-based word processing program with a speed of 10 to 12 words/minute in 1992 [29], Middendorf et al. [15] and Gao et al. [30] independently reported the method for using SSVEPs to determine gaze direction.
  • #38 photic driving response [25], which is characterized by an increase in amplitude at the stimulus frequency, resulting in significant fundamental and second harmonics. Therefore, it is possible to detect the stimulus frequency based on measurement of SSVEPw second one is the central magnification effect [25]. Large areas of the visual cortex are allocated to processing the center of our field of vision, and thus the amplitude of the SSVEP increases enormously as the stimulus is moved closer to the central visual field. For these two reasons, different SSVEP patterns can be pro- duced by gazing at one of a number of frequency-coded stimuli. This is the basic principle of an SSVEP-based BCI.
  • #47 . Bipolar, Laplacian, and Common Average Referencing (CAR) These are re-referencing techniques to improve signal quality. Bipolar: Subtracts signals between two nearby electrodes (e.g., C3–Cz), highlighting local activity. Laplacian: Each electrode is re-referenced against the average of its neighbors → sharpens local activity (like edge detection for the brain). CAR (Common Average Reference): Subtracts the average of all electrodes → reduces common noise across the scalp. 🔹 2. PCA (Principal Component Analysis) A dimensionality reduction method. Finds directions (principal components) that explain the most variance in the EEG data. Useful to compress signals while keeping most of the important information. 🔹 3. ICA (Independent Component Analysis) A blind source separation technique. Splits EEG into statistically independent components. Commonly used to remove artifacts (e.g., eye blinks, muscle noise) by isolating them as separate components. 🔹 4. CSP (Common Spatial Patterns) A spatial filtering method tailored for binary classification tasks (like left-hand vs right-hand motor imagery). Maximizes the variance difference between two classes. Very popular in motor imagery BCIs to separate EEG patterns.
  • #52 because sines and cosines occupy an ininite temporal extent, the Fourier transform does a poor job of representing signals that are inite and non- periodic, or have sharp peaks and discon- tinuities.
  • #57 the wavelet transform (WT) uses inite basis functions called wavelets, which are scaled and translated copies of a single inite- length waveform known as the mother wavelet By using basis functions at diferent scales, the wavelet transform allows a signal to be analyzed at multiple resolutions, with larger scale components revealing coarse features in the input signal and smaller scale components revealing iner structure Moreover, their inite extent allows wavelets (unlike the sines and cosines used in Fourier analysis) to represent signals that are non- periodic or have sharp discontinuities As in the case of the Fourier transform, the wavelet transform represents the original signal as a linear combination of basis functions, in this case, the wavelets. Analysis of the signal is performed using the corresponding wavelet coeficients
  • #59 EG is noisy and uncertain → full of artifacts (eye blinks, muscle, power line). Decisions can be dangerous if made from a poor estimate (e.g., wheelchair moves when patient only blinked). Most simple time-domain methods (variance, power, Hjorth parameters) don’t track uncertainty. They just give a number. Bayesian filtering adds safety:It doesn’t just estimate the brain state. It also tells how confident that estimate is.The system can then delay or reject actions if uncertainty is high.
  • #67 1. EEG Acquisition Brain activity is recorded using EEG electrodes placed on the scalp. These raw signals contain both useful information (neural activity) and noise (artefacts). 2. Pre-processing Before analysis, the raw EEG must be cleaned and prepared. Artefact Removal: Removes unwanted signals (e.g., eye blinks, muscle activity, powerline noise). Sampling: Standardizes data by resampling to a fixed frequency. Filtering: Extracts relevant frequency bands (e.g., delta, theta, alpha, beta, gamma). 3. Feature Extraction From the cleaned EEG, meaningful features are extracted. Examples: Power spectral features: Energy in different frequency bands. Connectivity measures: How different brain regions interact (coherence, phase-locking, etc.). These features reduce the complexity of raw EEG and highlight patterns relevant for learning. 4. Machine Learning / Deep Learning Two approaches can follow: Classical Machine Learning: Uses extracted features as inputs to models like SVM, Decision Trees, KNN, etc. Classifier: Predicts discrete labels (e.g., left vs right hand movement). Regression: Predicts continuous values (e.g., workload level, drowsiness index). Neural Networks (Deep Learning): Instead of hand-crafted features, deep learning can directly learn patterns from raw or minimally processed EEG. 5. Training & Testing Training: The model learns patterns from a labeled dataset. Testing: The model is evaluated on unseen data to check its generalization ability. This is crucial to avoid overfitting and ensure real-world reliability. Summary This diagram represents the full EEG + AI pipeline: EEG signals → Pre-processing → Feature extraction → Model training (ML/DL) → Prediction (classification/regression).
  • #71 Regression methods in BCIs enable precise, continuous control of devices like cursors and robotic arms. By mapping neural signals to continuous output variables, these techniques allow for smooth, natural movements that mimic real-life actions. Linear and non-linear regression approaches offer different benefits for BCI applications. While linear methods are simpler and more interpretable, non-linear techniques like Gaussian Process Regression can capture complex relationships in neural data, enhancing control precision.
  • #72 k-Nearest Neighbors (k-NN): Non-parametric algorithm classifies based on majority vote of k nearest neighbors, simple and effective for small datasets but computationally expensive for large ones Decision Trees: Hierarchical model with nodes representing features and branches representing decisions, interpretable and handles non-linear relationships but prone to overfitting Naive Bayes: Probabilistic classifier assumes independence between features, fast and works well with high-dimensional data but assumption may not hold in practice Performance metrics for comparison include accuracy, sensitivity, specificity, computational complexity, and robustness to noise in brain signals