# Towards non-invasive hybrid Brain-Computer Interfaces (hBCI)

## Brain-Heart Tech & Beyond

Hi there, 👋 it's Nguyen Ngoc Yen Nga here.&#x20;

I'm on a journey to explore my fascination with the brain and its connection to the body. This space is where I document what I’m learning.

This notebook is rooted in EmotionWave as a starting point to further explore hBCI later. EmotionWave is a project focused on EEG-ECG fusion, combining brain and heart data, aiming to give:&#x20;

{% stepper %}
{% step %}
An overview of different real world applications and industries,
{% endstep %}

{% step %}
How researchers are approaching and experimenting with different AI/ML architects,
{% endstep %}

{% step %}
An EEG-ECG stress detection machine learning pipeline as an beginner-friendly use case.
{% endstep %}
{% endstepper %}

Whether you're just curious or diving into neurotech yourself, I hope you find something useful along the way! :)

## Jump right in 👇

<table data-view="cards" data-full-width="false"><thead><tr><th></th><th></th><th data-type="content-ref"></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td>🧠 <strong>Exploring Brain-Heart Dynamics Applications</strong></td><td>A structured overview of EEG-ECG applications in biofeedback, neurocardiology, adaptive gaming, and health monitoring, highlighting the interdisciplinary potential of brain-heart integration.</td><td><a href="applications">applications</a></td><td></td><td></td><td><a href="broken-reference">Broken link</a></td></tr><tr><td>🤖 <strong>Machine Learning for Emotion Recognition</strong></td><td>A survey of machine learning and deep learning models for EEG-ECG emotion recognition, comparing traditional and advanced techniques for emotion and stress analysis.</td><td><a href="3.-overview-of-models-and-techniques-for-emotion-recognition">3.-overview-of-models-and-techniques-for-emotion-recognition</a></td><td></td><td></td><td><a href="broken-reference">Broken link</a></td></tr><tr><td>⚡ <strong>Hands-On Stress Detection ML Model</strong></td><td>A practical, reproducible EEG-ECG-based stress detection system using machine learning, providing a baseline model for further research in brain-heart dynamics.</td><td><a href="4.-stress-detection-model-with-eeg-ecg">4.-stress-detection-model-with-eeg-ecg</a></td><td></td><td></td><td><a href="broken-reference">Broken link</a></td></tr></tbody></table>

## Why Brain-Heart Tech?

Neurotechnology is no longer confined to research labs, it's becoming part of our daily lives. From smartwatches that track heart rhythms to headphones that measure brain activity, we’re seeing the rise of consumer devices that integrate biosignal monitoring.

### 🩺 **ECG in Everyday Devices**

<figure><img src="https://667781907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq28gTLTSVUnUZzNfNySc%2Fuploads%2Fy67QRB6zfGGCZEFHc5qR%2Fimage.png?alt=media&#x26;token=186a14b3-fc07-428b-9d78-50dcc2c052d5" alt=""><figcaption></figcaption></figure>

Heart monitoring is now at our fingertips with ECG-enabled wearables from Apple, Samsung, Google, and more.

### 🧠 **EEG in Everyday Devices**

<figure><img src="https://667781907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq28gTLTSVUnUZzNfNySc%2Fuploads%2FgqiZK610sAbLtzpI7OPB%2Fimage.png?alt=media&#x26;token=9dc8c8eb-7bce-4efc-9abd-869a19e6aebc" alt=""><figcaption></figcaption></figure>

Brainwave-sensing earbuds and headsets are emerging to enhance focus, sleep, and even VR experiences.

### 🚀 **The Future: Multi-Biosignal Wearables**

<figure><img src="https://667781907-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fq28gTLTSVUnUZzNfNySc%2Fuploads%2FVu4tCKEt79TyqZW3a1Uz%2Fimage.png?alt=media&#x26;token=63d163d0-9d60-4482-8820-191c764ed7aa" alt=""><figcaption></figcaption></figure>

[**Apple’s next-gen AirPods patent** ](https://ppubs.uspto.gov/pubwebapp/static/pages/ppubsbasic.html)(No. 20230225659) hints at a future where a single device could measure EEG, ECG, EMG, and more, paving the way for smarter brain-computer interfaces and personalized health tech. 🥳

***

## Table of Content

1. [**INTRODUCTION**](1.-introduction)\
   [1.1. Motivation and Problem Statement](1.-introduction/1.-motivation-and-problem-statement)
2. [**OVERVIEW OF APPLICATIONS IN BRAIN-HEART DYNAMICS**](applications)\
   [2.1. Intro](applications/2.1.-intro)\
   [2.2. Enhanced Hybrid Brain-Computer Interfaces](applications/2.2.-enhanced-hybrid-brain-computer-interfaces)\
   [2.3. Emotion Recognition](applications/2.3.-emotion-recognition)\
   [2.4. Neurofeedback and Heart Rhythm (Biofeedback) Regulation](applications/2.4.-neurofeedback-and-heart-rhythm-biofeedback-regulation)\
   &#x20;       [2.4.1. Sleep, Performance Enhancement, and Cognitive Health](applications/2.4.-neurofeedback-and-heart-rhythm-biofeedback-regulation/2.4.1.-sleep-performance-enhancement-and-cognitive-health)\
   &#x20;       [2.4.2. Stress Management, Creativity, and Clinical Applications](applications/2.4.-neurofeedback-and-heart-rhythm-biofeedback-regulation/2.4.2.-stress-management-creativity-and-clinical-applications)\
   [2.5. Personalized Health Monitoring and Adaptation](applications/2.5.-personalized-health-monitoring-and-adaptation)\
   [2.6. Neurocardiology: Cardiovascular and Neurological Disorders](applications/2.6.-neurocardiology-cardiovascular-and-neurological-disorders)\
   [2.7. Adaptive Gaming and VR Experience](applications/2.7.-adaptive-gaming-and-vr-experience)\
   [2.8. Outro](applications/2.8.-outro)
3. [**OVERVIEW OF MODELS AND TECHNIQUES FOR EMOTION RECOGNITION**](3.-overview-of-models-and-techniques-for-emotion-recognition)\
   [3.1. Datasets](3.-overview-of-models-and-techniques-for-emotion-recognition/3.1.-datasets)\
   [3.2. Existing Models and Techniques for Emotion Recognition](3.-overview-of-models-and-techniques-for-emotion-recognition/3.2.-existing-models-and-techniques-for-emotion-recognition)\
   [**3.3. Machine Learning Models**](3.-overview-of-models-and-techniques-for-emotion-recognition/3.3.-machine-learning-models)\
   &#x20;       [3.3.1. Decision Trees](3.-overview-of-models-and-techniques-for-emotion-recognition/3.3.-machine-learning-models/3.3.1.-decision-trees)\
   &#x20;       [3.3.2. Random Forest](3.-overview-of-models-and-techniques-for-emotion-recognition/3.3.-machine-learning-models/3.3.2.-random-forest)\
   &#x20;       [3.3.3. Light Gradient Boosting Machine (LightGBM)](3.-overview-of-models-and-techniques-for-emotion-recognition/3.3.-machine-learning-models/3.3.3.-light-gradient-boosting-machine-lightgbm)\
   &#x20;       [3.3.4. K-Nearest Neighbors](3.-overview-of-models-and-techniques-for-emotion-recognition/3.3.-machine-learning-models/3.3.4.-k-nearest-neighbors)\
   &#x20;       [3.3.5. Support Vector Machines (SVM)](3.-overview-of-models-and-techniques-for-emotion-recognition/3.3.-machine-learning-models/3.3.5.-support-vector-machines-svm)\
   &#x20;       [3.3.6. Naive Bayes](3.-overview-of-models-and-techniques-for-emotion-recognition/3.3.-machine-learning-models/3.3.6.-naive-bayes)\
   [**3.4. Deep Learning Models**](3.-overview-of-models-and-techniques-for-emotion-recognition/3.4.-deep-learning-models)\
   &#x20;       [3.4.1. Convolutional Neural Networks](3.-overview-of-models-and-techniques-for-emotion-recognition/3.4.-deep-learning-models/3.4.1.-convolutional-neural-networks)\
   &#x20;       [3.4.2. Long Short-Term Memory Networks (LSTM)](3.-overview-of-models-and-techniques-for-emotion-recognition/3.4.-deep-learning-models/3.4.2.-long-short-term-memory-networks-lstm)\
   &#x20;       [3.4.3. Temporal Convolutional Networks](3.-overview-of-models-and-techniques-for-emotion-recognition/3.4.-deep-learning-models/3.4.3.-temporal-convolutional-networks)\
   &#x20;       [3.4.4. Attention Networks](3.-overview-of-models-and-techniques-for-emotion-recognition/3.4.-deep-learning-models/3.4.4.-attention-networks)\
   &#x20;      [ 3.4.5. Transformer Models](3.-overview-of-models-and-techniques-for-emotion-recognition/3.4.-deep-learning-models/3.4.5.-transformer-models)\
   &#x20;       [3.4.6. Graph Neural Networks](3.-overview-of-models-and-techniques-for-emotion-recognition/3.4.-deep-learning-models/3.4.6.-graph-neural-networks)\
   [**3.5. Generative Models and Data Augmentation**](3.5.-generative-models-and-data-augmentation)\
   &#x20;       [3.5.1. Variational Autoencoders](3.5.-generative-models-and-data-augmentation/3.5.1.-variational-autoencoders)\
   &#x20;       [3.5.2. Generative Adversarial Networks](3.5.-generative-models-and-data-augmentation/3.5.2.-generative-adversarial-networks)\
   [3.6. Other Architectures](3.6.-other-architectures)
4. [**STRESS DETECTION MODEL WITH EEG-ECG**](4.-stress-detection-model-with-eeg-ecg)\
   [4.1. Introduction](4.-stress-detection-model-with-eeg-ecg/4.1.-introduction)\
   [4.2. Dataset Overview](4.-stress-detection-model-with-eeg-ecg/4.2.-dataset-overview)\
   [4.3. Data Processing and System Design](4.-stress-detection-model-with-eeg-ecg/4.3.-data-processing-and-system-design)\
   [4.4. Data Loading and Parsing](4.-stress-detection-model-with-eeg-ecg/4.4.-data-loading-and-parsing)\
   [4.5. EEG Preprocessing and Feature Extraction](4.-stress-detection-model-with-eeg-ecg/4.5.-eeg-preprocessing-and-feature-extraction)\
   [4.6. ECG Preprocessing and Feature Extraction](4.-stress-detection-model-with-eeg-ecg/4.6.-ecg-preprocessing-and-feature-extraction)\
   [4.7. Merge ECG and EEG Features for Stress Detection](4.-stress-detection-model-with-eeg-ecg/4.7.-merge-ecg-and-eeg-features-for-stress-detection)\
   [4.8. Model Development](4.-stress-detection-model-with-eeg-ecg/4.8.-model-development)\
   [4.9. Results and Evaluation](4.-stress-detection-model-with-eeg-ecg/4.9.-results-and-evaluation)
5. [**APPENDIX & BIBLIOGRAPHY**](5.-appendix-and-bibliography)\
   [Appendix A. Overview of Methods and Results for Emotion Recognition Studies](5.-appendix-and-bibliography/appendix-a.-overview-of-methods-and-results-for-emotion-recognition-studies)\
   [Appendix B. Visualization of Mean Power Spectral Density (PSD) Across EEG Channels for Different Emotion](5.-appendix-and-bibliography/appendix-b.-visualization-of-mean-power-spectral-density-psd-across-eeg-channels)\
   [Appendix C. Distribution of Emotion Dimension Ratings (Valence, Arousal, Dominance) Across Target](5.-appendix-and-bibliography/appendix-c.-distribution-of-emotion-dimension-ratings-valence-arousal-dominance-across-target)\
   [Bibliography](5.-appendix-and-bibliography/bibliography)

***

## What is this notebook about?

Welcome to my personal learning notebook on hybrid brain-computer interfaces (hBCIs) and how our brain and heart work together.&#x20;

While emotion recognition is one application of this, hBCIs have far broader potential, from cognitive load monitoring to adaptive gaming and neurorehabilitation. This is not a formal guide but rather a place where I document what I’m learning about EEG, ECG, and their applications.

## Why brain-heart dynamics matter?

Most brain-computer interfaces (BCIs) today focus only on brain signals (EEG), but the brain doesn’t work in isolation, it constantly communicates with the rest of the body. Your heart rate, breathing, and even gut activity influence your cognitive state and emotions. That’s where hybrid BCIs come in.

For example, by combining EEG (brain activity) with ECG (heart activity), we can:

* Improve the accuracy of brain-computer interfaces
* Detect stress and cognitive load more reliably
* Personalize adaptive neurotech for real-world applications
* Enhance mental health monitoring beyond subjective self-reports

Emotion recognition is just one piece of the puzzle. Understanding brain-heart dynamics as well as multi-biosignals opens the door to new possibilities in **assistive technology, neurofeedback, and human-computer interaction**.

## Who is this notebook for?

This notebook is for anyone curious about neurotechnology, especially those who are just starting out and might feel a bit overwhelmed by the field (like I did!). A fundamental familiarity with Machine Learning would be helpful too.

It might be useful if you:

* Come from a non-STEM background but want to understand the possibilities of neurotechnology
* Are an interdisciplinary researcher who wants a friendly introduction to EEG, ECG, and neurotech
* Are a developer or engineer interested in applying machine learning to biosignals
* Simply love learning about the brain and body and want to tinker with data! :)

## How to use this notebook?

This notebook is meant to be exploratory and evolving, it’s not a step-by-step tutorial but more of a collection of learning notes, experiments, and insights.

Feel free to:

* Read through sections that interest you, you don’t have to go in order
* Use this as a starting point to dive deeper into neurotech
* Reach out or discuss ideas, I’d love to connect with others exploring this space!

Since I’m learning as I go, I’ll update and refine things over time. If something doesn’t make sense or could be improved, I appreciate any feedback, I'm reachable at nganguyen.ngocyen@gmail.com! Let’s explore brain-heart interfaces together. 🧠&#x20;
