Monday, July 21, 2014

EEG data analysis of audio induced fear

My previous post ended with some statistics now I proceed to the analysis of the retrieved signals. The results and the measurement itself is rather instructive than useful and practical, so if you are interested in a working solution I have to disappoint you. I'm planning a measurement concept that is going to be much simpler and going to look at the problem from a different perspective. Also as I dived more into the literature, I found that there was no need for the 3-minute calm part, there was rather need for the measurements immediately before and after the effects played.

Hypothesis to test - frontal alpha asymmetry

Pattern of asymmetrical frontal EEG activity is found to distinguish positive (happiness, joy) from negative (fear, anger) emotions by Hell and Nitschke [James A. Coan, 2004]. Although, this hypothesis turned out to be false (at least other more supported hypothesis came), and instead some showed that it would be the indicator of valence - greater right frontal activity (which means greater left alpha power) compared to the left frontal activity indicates approach or engage stimulus and greater left frontal activity infer tendency to withdrawal stimulus. This is called Davidson's approach/withdrawal model [Davidson, 1993]. Here I should point out that activity is inversely related to alpha power, which means lower power reflects more activity and vice versa.

Alpha power means the values of the signal converted to frequency domain at 7 to 12 Hz. Here is the alpha power spatial representation of a fearful (withdrawal stimulus) person playing a horror game - not part of the main measurements. Here the alpha asymmetry model actually worked.

So the question I tried to answer is kind of layered - I wanted to know whether this approach/withdrawal model is feasible for detecting (only) audio induced fear and whether it can be measured by a commercial, low-resolution EEG tool like the Emotiv EPOC - too much to answer in one breath.

Coan and Allen argues that there's difference between the asymmetry used as a moderator or mediator of emotions [James A. Coan, 2004]. Using these terms, I tried to figure out if alpha asymmetry is good enough mediator of fear or not - according to studies Coan and Allen mentions, alpha asymmetry more robust as a mediator than a moderator.

Frontal alpha asymmetry as the mediator of fear. The (picture of a) snake as fear inducing and the elephant as neutral unconditional stimulus; the reaction is the conditional stimulus.

Signal processing

I wrote the processing code in Matlab using EEGLAB functions. I processed the signals of each subject separately and only after I had extracted the features I handled them as one to calculate the robustness of the model in question.

First I passed the EEG signal through a 1 to 30 Hz FIR filter to avoid signals on irrelevant frequencies. Then I selected epochs of the signal taking into consideration scores (7 or higher) the subjects had given for the scariness of the effects. Because the effects varied across subjects and also varied in length, it was not a trivial operation. The epochs included the whole the signals while the whole effect was played and 5 seconds before it so I could differentiate the alpha asymmetry between the more calm and more fearful states. Then I removed the base of the epoch.

EEG epoched data from -5 to 5 second windows around the markers indicating beginning of the effects.

After the preparation of the epochs, I extracted the features, which was the logarithm of the alpha power, than I saved the features for all subjects into one file. Here is the Matlab function for the feature extraction:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
function feature = alpha_feature(EEG)
    
    % constants
    alpha = 7 : 12;
    left_channels = 1 : 4;
    right_channels = 11 : 14;
    
    % left mean alpha power for every channel
    left_alpha_power_avg = 0;
    for chan = left_channels
        pxx = pwelch(EEG.data(chan, :));
        left_alpha_power_avg = left_alpha_power_avg + mean(pxx(alpha));
    end
    left_alpha_power_avg = left_alpha_power_avg / length(left_channels);
    
    % right mean alpha power for every channel
    right_alpha_power_avg = 0;
    for chan = right_channels
        pxx = pwelch(EEG.data(chan, :));
        right_alpha_power_avg = right_alpha_power_avg + mean(pxx(alpha));
    end
    right_alpha_power_avg = right_alpha_power_avg / length(right_channels);
    
    feature = [log(left_alpha_power_avg), log(right_alpha_power_avg)];

end

For measuring the asymmetry on the left hemisphere I collected signals from the AF3, F3, F7 and FC5 sensors, on the right hemisphere from AF4, F4, F8 and FC6 sensors. Alpha power was collected at discrete frequencies from 7 to 12 Hz.

Placements of the Emotiv EPOC sensors. The green area includes sensors measuring the alfa power of the left hemisphere, and the red area includes sensors measuring the right hemisphere.

Results

Alpha asymmetry before and after low and high scored stimuli

I measured the degree of asymmetry - left alpha power divided by right alpha power - before and after effects. According to Davidson's approach/withdrawal model, there should be a correlation between the given scores and asymmetry: if the score is low for the given effect the corresponding difference of alpha asymmetry before compared to after the effect should be minor, while higher scores indicates significant change in alpha asymmetry.

≥7 scored effects (45) ≤6 scored effects (50) not scored effects (175)
probability of increase in degree of asymmetry 55.56% 75.00% 54.86%
mean degree of increase1 7.73% 5.17% 3.03%

Although, in the degree of increase there is some subtle correlation with the scores, the probability shows no such correlation. It can be due to the small number of samples, the fault of Davidson's model, or the case that the scoring was too subjective and genuine fearful emotions were not or just rarely were present. I suspect the last one.

Conclusion

Thus, unfortunately no major conclusion can be drawn beside the fact that such ad hoc measurement concept with so much answers, few samples and varying recordings provides no answer. This work was nevertheless a proper lesson for me to build my measurement concept in details using standard methods.

Horror game

My long term plan is to develop an audio-only bio-feedback horror game that can figure out if you are in fear investigating EEG signals. Also I'd like to resolve the navigation of the player by ERS/ERD (event related (de)synchronization). The player will communicate by moving the head which is picked up by the gyroscope of EPOC. Hope it will get done in this decade :D

1 Calculation: mean( (after_stimuli_alpha_powi - before_stimuli_alpha_powi) / mean(before_stimuli_alpha_powi, after_stimuli_alpha_powi) ), for every i effect.

No comments:

Post a Comment