← Back to project

Research logbook

An Instant Depression Screening Method via Valence and Arousal Prediction from Electroencephalogram and Galvanic Skin Response Data via Unsupervised Representation Learning

May 5 – Sep 14, 2024

Materials: GSR device, EEG device, GPU, computer, data

Original logbook (PDF) ↗

Day 1 Sun 5/5/24

  • Researched current depression screening methods and their limitations
  • Collected data on the depression status quo
  • Global
    • One in seven 10–19-year-olds experiences a mental disorder, 13% of the global burden of disease in this age group
    • Depression, anxiety and behavioural disorders are among the leading causes of illness and disability among adolescents
    • Suicide is the fourth leading cause of death among 15–29-year-olds
  • United States
    • About 1 in 5 adolescents report symptoms of anxiety or depression (KFF); many don’t get therapy because of cost, fear of what others will think, or not knowing how to get help
    • In 2021, 20% of 12–17-year-olds had at least one major depressive episode (MDE): 29% of females vs 12% of males; nearly 60% received no treatment
    • Teens who recently experienced depression rose 59% between 2007 and 2017 (66% for girls, 44% for boys)
    • Seven in ten teens call anxiety and depression a major problem among people their age (Pew Research Center, 2018); another 26% call it a minor problem
    • NIMH: 17% of 12–17-year-olds had a major depressive episode in 2020 (4.1 million teens); 12% had one with severe impairment
    • CDC (2021): 42% of students felt persistently sad or hopeless, 29% had poor mental health, 22% considered suicide, 10% attempted suicide
    • 4.8 million youth (19.5%) have major depression and 3.6 million (14.6%) severe depression; 59.8% of youth with depression received no mental health treatment
    • Adolescent depression rose from 8.1% in 2009 to 15.8% in 2019
    • MDD is the leading cause of disability for ages 15–44, affects about 8.4% of U.S. adults, and almost 49% of adults with MDD are untreated
    • 80–90% of people with depression who seek treatment eventually respond well to it
  • South Korea
    • In 2021, South Korea’s suicide rate was 26 per 100,000, the highest in the OECD; suicide was the main cause of death for ages 10–39 (44% of teenage deaths, 56.8% of deaths in people in their 20s), with mental illness the leading cause
    • Of about 50,000 middle and high school students surveyed in 2022, 14.3% had thought about suicide in the past 12 months
    • Suicide has been the number one cause of death for young people since 2007

How depression is diagnosed today. A doctor has to hear about specific symptoms, usually through standard screening questions. To be diagnosed, a person must have symptoms most of the day, nearly every day, for at least 2 weeks, including a depressed mood or loss of interest. Children and adolescents may be irritable rather than sad, and depression can look very different from person to person (withdrawal, irritability, changes in eating and sleep), which makes diagnosis hard.

Children’s Depression Inventory (CDI)

  • Modified from the adult Beck Depression Inventory
  • Ages 7–17; two scales: emotional and functional problems
  • Forms for parents (17 items), teachers (12) and a self-report (28)
  • 5–15 minutes

Children’s Depression Rating Scale (CDRS)

  • Designed for ages 6–12, validated up to 18
  • 17 symptom areas, adapted from the Hamilton Depression Rating Scale
  • Semi-structured interview
  • 10–15 minutes to give and score

Patient Health Questionnaire (PHQ-9)

  • Self-report screen for depressive symptoms
  • 1–5 minutes to complete, about the same to review
  • Available in many languages
  • 61% sensitivity / 94% specificity in adults; 89.5% / 77.5% in adolescents
The PHQ-9 questionnaire (Pfizer PHQ screeners).
The PHQ-9 questionnaire (Pfizer PHQ screeners).
  • Common thread: every existing method is a self-report questionnaire, which only works if the person recognizes their symptoms and answers honestly

Day 2 Sun 5/12/24

  • Developed and sent out a survey to gather depression-screening data
  • Survey design
    • Online survey of 50 high school students attending school in the United States or South Korea
    • Questions: types of screening taken, honesty during screening (1–5), reasons for dishonesty, whether screening is useful, negative connotation of depression, and whether technology would make results more trustworthy
Survey questions 1–3.
Survey questions 1–3.
Survey questions 4–6.
Survey questions 4–6.

Day 3 Sun 5/26/24

  • Reviewed and analyzed the survey results
  • Findings
    • 76% had taken online, school-based screening; 14% online on their own; 6% at a depression center or clinic; 4% never
    • 36 of the 38 students who took school-based tests rated their honesty 1 or 2 (dishonest)
    • Top reason for dishonesty (33 students): nobody else answered honestly, so they didn’t either; others: questions and answers were too obvious, the test was too long and annoying
    • 84% said screening questionnaires are not useful or accurate
  • Takeaway: school-wide self-report screening isn’t taken seriously, so a non-survey, emotion-based test is needed
  • Reviewed convolutional neural networks (CNNs) through research notes, printed separately
Types of depression screening taken.
Types of depression screening taken.
Honesty during screening, 1 (dishonest) to 5 (honest).
Honesty during screening, 1 (dishonest) to 5 (honest).
Reasons for dishonesty.
Reasons for dishonesty.
Are screening questionnaires useful/accurate?
Are screening questionnaires useful/accurate?
Is there a negative connotation to depression?
Is there a negative connotation to depression?
Would you trust results more if technology were incorporated?
Would you trust results more if technology were incorporated?

Day 4 Fri 5/31/24

  • Studied optimization techniques (Ch. 3, gradient descent algorithm)
  • Notes
    • Training a network means minimizing a loss function
    • Gradient descent updates each weight a small step in the direction that lowers the loss; the learning rate sets the step size
    • This is how the loss functions on Day 13 actually train the TOP-N, GSR-N and E-RN networks

Day 5 Tue 6/4/24

  • Began implementing the CNN model
  • Planned architecture (finalized on Day 14)
    • TOP-N (Topographical Map Network): a 2D CNN that turns EEG topographical maps into emotion-related feature vectors
    • GSR-N (Galvanic Skin Response Network): a 1D CNN that extracts emotion-related features from GSR signals
    • E-RN (Emotion Regression Network): combines both feature vectors and outputs the predicted arousal and valence values (AV-Prob)

Day 6 Sun 6/9/24

  • Background study on GSR and EEG

Galvanic Skin Response (GSR)

  • What it is: the electrical conductivity of the skin in response to stimuli; emotional triggers, positive or negative, activate sweat glands and raise conductivity
  • Why it’s useful: these changes are involuntary (autonomic nervous system), so GSR detects emotional intensity even when someone tries to hide it
  • Measurement: conductance between two points on the skin, in microsiemens (µS); higher conductance = more sweat-gland activity = higher arousal
  • Device: sensors on the index and middle fingers with Velcro, connected by Bluetooth; participants sit still, breathe normally and don’t talk
  • Signal: a slow-varying tonic level (baseline) plus fast phasic responses (peaks) 1–5 seconds after an emotional trigger
  • Analysis: count the peaks over time; more peaks = higher arousal

Electroencephalography (EEG)

  • What it is: a non-invasive way to record the brain’s electrical activity with electrodes on the scalp
  • Mechanism: neurons exchange ions across their membranes; the charge spreads by volume conduction, and electrodes pick up the voltage differences, which are amplified and graphed
  • Clinical use: spotting abnormal brain waves, e.g., seizures appear as rapid spiking waves
  • International 10-20 system: standard electrode placement; letters mark the lobe (Fp, F, T, P, O, C, A), even numbers = right side, odd = left, “z” = midline
  • Why combine them: EEG is very sensitive to noise, and GSR shows the strength of emotion the person feels unconsciously, so it can compensate

Day 7 Thu 6/13/24

  • Gathered background knowledge on EEG datasets
  • Read: Liu, Qiu, Zheng & Lu (2021), comparing recognition performance and robustness of multimodal deep learning models for emotion recognition (IEEE Transactions on Cognitive and Developmental Systems)
  • Chosen: SEED-IV (BCMI lab)
    • 72 film clips, chosen in a preliminary study to tend to induce happiness, sadness, fear or neutral emotions
    • 15 subjects, 3 sessions each on different days, 24 trials per session
    • EEG recorded with the 62-channel ESI NeuroScan System
    • Each session is cut into 4-second non-overlapping segments; one segment = one training sample

Day 8 Mon 6/17/24

  • Gathered background knowledge on GSR + EEG datasets
  • Read: Koelstra et al. (2011), DEAP: a database for emotion analysis using physiological signals (IEEE Transactions on Affective Computing)
  • Chosen: DEAP
    • Multimodal dataset for analyzing human affective states
    • EEG and GSR from 32 participants, each watching 40 one-minute music-video excerpts
    • Participants rated each video for arousal, valence, like/dislike, dominance and familiarity, which gives the arousal-valence labels the model learns to predict
  • Statistical analysis of the collected data

Day 9 Sat 6/22/24

  • Researched the arousal-valence (A-V) model
  • Two dimensions
    • Arousal: physiological and psychological activation, from low (calm, relaxed) to high (excitement, agitation)
    • Valence: how positive or negative the emotion is, from negative (sadness, anger) to positive (happiness, delight)
  • Four quadrants
    • High arousal, positive valence: excitement, surprise
    • High arousal, negative valence: anger, fear, anxiety
    • Low arousal, positive valence: calmness, relaxation
    • Low arousal, negative valence: sadness, depression, boredom
  • Why it matters: depression sits in the low-arousal, negative-valence quadrant, so predicting a point on this graph is a way to screen for it without asking any questions
Arousal-valence model with example emotions (Foucher et al.).
Arousal-valence model with example emotions (Foucher et al.).

Day 10 Wed 6/26/24

  • Reviewed traditional approaches to EEG- and GSR-based emotion recognition
  • From the paper’s related work
    • Plass-Oude Bos (2006): EEG-based emotion recognition and the influence of visual and auditory stimuli
    • Acharya et al. (2018): automated EEG-based depression screening using a deep CNN

Day 11 Sat 6/29/24

  • Surveyed previous research approaches
  • Existing depression screening (all self-report)
    • PHQ-9: 2–5 minutes; its accuracy depends on people being willing to take the test and answer honestly
    • CDI and CDRS for children and adolescents (see Day 1)
  • Where this project fits: predicting emotion directly from EEG and GSR, so screening doesn’t depend on honest self-report

Day 12 Wed 7/3/24

  • Developed the system overview and drafted the overview section
First system overview: EEG → topographical map → TOP-N and GSR signal → GSR-N, merged in E-RN to output the predicted arousal-valence value.
First system overview: EEG → topographical map → TOP-N and GSR signal → GSR-N, merged in E-RN to output the predicted arousal-valence value.

Day 13 Sun 7/7/24

  • Formulated and refined the loss function equations
L(i,j) = -log( e^similarity(zi,zj) / sum_k e^similarity(zi,zk) )
Eq. 1. Cross-entropy loss (with cosine similarity). Pulls feature vectors from similar emotions (zi, zj) together and pushes all other pairs (zk) apart. Cosine similarity ranges from −1 (opposite) to 1 (same direction). 0 = ideal, lowest loss.
L_av-prob = 1/N sum (arousal - predicted arousal)^2 + 1/N sum (valence - predicted valence)^2
Eq. 2. Mean squared error (MSE). Trains E-RN: the average squared difference between predicted and actual arousal and valence, over N feature vectors. 0 = ideal.
MAE = 1/N sum |t_i - predicted t_i|
Eq. 3. Mean absolute error (MAE). The evaluation metric: the average size of the errors, ignoring their direction. 0 = perfect.

Day 14 Fri 7/12/24

  • Refined the proposed system diagram
Overall architecture: topographical maps go into TOP-N (pre-trained feature extractor) and GSR signals into GSR-N (1D CNN); their emotion-related feature vectors are combined in E-RN (regression network), which outputs AV-Prob, the arousal/valence prediction.
Overall architecture: topographical maps go into TOP-N (pre-trained feature extractor) and GSR signals into GSR-N (1D CNN); their emotion-related feature vectors are combined in E-RN (regression network), which outputs AV-Prob, the arousal/valence prediction.

Day 15 Tue 7/16/24

  • Built the TOP-N model component
  • Phase 1: representation learning
    • EEG signals are converted into topographical maps, one map per epoch
    • An unsupervised CNN learns emotion-related feature vectors without labels
    • Assumption: feature vectors from similar emotions should be mathematically similar, enforced with the cosine-similarity loss (Eq. 1)
  • Phase 2: transfer learning
    • The pre-trained TOP-N becomes the feature extractor
    • E-RN is trained on top to predict arousal and valence, using MSE (Eq. 2)
TOP-N representation learning: EEG signals → topographical maps → CNN → emotion-related feature vectors.
TOP-N representation learning: EEG signals → topographical maps → CNN → emotion-related feature vectors.
Network variants: TOP-N + E-RN (EEG only) and the full model with GSR-N.
Network variants: TOP-N + E-RN (EEG only) and the full model with GSR-N.

Day 16 Sun 7/21/24

  • Built the GSR-N model component
  • A one-dimensional CNN that extracts emotion-related feature vectors from GSR signals, to be combined with TOP-N’s

Day 17 Thu 7/25/24

  • Built the E-RN model component
  • Regression network that takes the combined TOP-N and GSR-N feature vectors and outputs AV-Prob, the predicted arousal and valence values

Day 18 Mon 7/29/24

  • Organized and cleaned the dataset for analysis
  • SEED-IV: EEG in 4-second non-overlapping segments; DEAP: EEG + GSR with arousal and valence ratings

Day 19 Sat 8/3/24

  • Defined and refined evaluation metrics: mean absolute error (MAE, Eq. 3) for arousal, valence and their average (total); lower is better
  • Data split: 80% sampled at random from the 2 datasets for training, 20% for testing
  • Networks compared as feature extractors (from the paper)
    • VGG19: 16 convolutional + 3 fully connected layers (19 weight layers)
    • HRNet-W30-C: 82 layers
    • ResNet-101: 101 layers (33 bottleneck blocks of 3 layers)
    • DenseNet-264: 264 layers

Day 20 Thu 8/8/24

  • Trained the model using representation learning (8-hour session)

Day 21 Wed 8/14/24

  • Trained the model using transfer learning (1–2 hour session)
  • Compared with the 8-hour representation-learning session on Day 20

Day 22 Tue 8/20/24

  • Experiment 1: MAE by network architecture
Without GSR
NetworkArousalValenceTotal
VGG1930.922.526.7
HRNet-W30-C27.419.023.2
ResNet-10122.317.219.8
DenseNet-26421.315.518.4
With GSR
NetworkArousalValenceTotal
VGG1927.520.724.1
HRNet-W30-C23.717.520.6
ResNet-10119.715.117.4
DenseNet-26418.913.916.4
  • DenseNet-264 performed best and VGG19 worst; error falls as the network gets deeper, as expected for a baseline comparison
MAE (arousal, valence, total) for each network, with GSR.
MAE (arousal, valence, total) for each network, with GSR.

Day 23 Sun 8/25/24

  • Experiment 2: MAE with vs without GSR
  • Adding GSR lowered MAE for every network and every measure; best total MAE went from 18.4 to 16.4 (DenseNet-264)
  • Multimodal data makes training more consistent, which improves accuracy
MAE for arousal, valence and total, with vs without GSR, by network.
MAE for arousal, valence and total, with vs without GSR, by network.

Day 24 Thu 8/29/24

  • Experiment 3: ablation study, removing parts of the model to see what each contributes
Total MAE
NetworkNo rep. learningWith rep. learningL1-squared lossCosine loss (proposed)
VGG1926.924.125.324.1
HRNet-W30-C23.420.622.120.6
ResNet-10120.117.417.917.4
DenseNet-26418.816.417.216.4
  • Representation learning lowers MAE for every network (e.g., 18.8 → 16.4 for DenseNet-264)
  • The cosine-similarity loss beats an L1-squared comparison of feature vectors (17.2 → 16.4)
Ablation study: baseline, L1-squared function and cosine similarity function, with the differences.
Ablation study: baseline, L1-squared function and cosine similarity function, with the differences.

Day 25 Wed 9/4/24

  • Experiment 4: t-SNE visualization of the learned feature vectors
  • Trained two models, the baseline and the proposed approach; each dot is one input sample’s feature vector, colored by emotion (sad, happy, fear, neutral)
  • The proposed model’s features form more distinct clusters (better disentanglement); the baseline’s are more mixed together
t-SNE of feature vectors, baseline.
t-SNE of feature vectors, baseline.
t-SNE of feature vectors, proposed method.
t-SNE of feature vectors, proposed method.

Day 26 Mon 9/9/24

  • Researched brain anatomy related to depression indicators
  • Electrode groups by brain region for Experiment 5, using the 10-20 system from Day 6
Electrode groups tested: (a) occipital + parietal, (b) frontal, (c) frontal + temporal, (d) baseline.
Electrode groups tested: (a) occipital + parietal, (b) frontal, (c) frontal + temporal, (d) baseline.

Day 27 Sat 9/14/24

  • Experiment 5: brain anatomy correlation, comparing error when the model uses each electrode group
  • Occipital + parietal had by far the highest error (about 32); frontal + temporal came closest to the baseline
  • Final data analysis and interpretation
Brain anatomy-driven results: error for arousal, valence and total by electrode group.
Brain anatomy-driven results: error for arousal, valence and total by electrode group.