EEG Biometric Authentication

For the Decoding Neuronal Activity block course at the University of Osnabrück in summer 2024, I reproduced part of a study by Alzahab et al. on using EEG (electroencephalogram) signals as a biometric, like a fingerprint or a face. Their question was whether people are easier to tell apart from their brain activity while they listen to audio than while they sit at rest.

Background

Brain signals have a couple of properties that fingerprints and faces don’t. They’re hard to copy, and they depend on your mental state, so they only work if you’re alive and conscious. Alzahab et al. played different kinds of audio, such as a song in the listener’s native language or in a foreign one, and looked at how that affected identification.

The Data

EEG picks up tiny electrical signals through electrodes on the scalp. This dataset has recordings from 20 volunteers and uses four electrodes, placed according to the standard 10-10 system (basically a map of agreed-on scalp locations):

  • T7: left temporal, near the left ear and the auditory cortex
  • F8: right frontal, near the right side of the forehead
  • Cz: the top of the head
  • P4: right parietal, toward the back right of the head

The signals were recorded at 200 Hz (200 samples per second) while participants either:

  • Rested quietly with eyes open or closed
  • Listened to a song in their native language
  • Listened to a song in a foreign language
  • Listened to neutral instrumental music

The audio was played either through ordinary in-ear headphones or through bone-conducting headphones, which send sound through the bones of the skull.

Method

  1. Filtering. I applied a 1-40 Hz Butterworth bandpass filter and a 50 Hz notch filter for power line hum, matching what the dataset authors describe. My filtered signal correlated at 1.0 with the filtered data they published.

  2. Features. I cut each session into 4-second epochs and extracted 48 features from each one. Some are basic amplitude statistics (standard deviation, range, kurtosis), and the rest are the mean and standard deviation of power in the delta, theta, alpha, beta, and gamma bands on each channel.

  3. Classification. A small multi-layer perceptron learned to predict which of the 20 people an epoch came from. I trained one on resting-state data with eyes closed and one on data recorded while people listened to neutral music through in-ear headphones, training the second one longer so both saw the same amount of data.

Results

Averaged over ten random seeds, identification accuracy went from 68.51% at rest to 72.81% with music. The average per-seed relative improvement was 6.65%. Chance would be 5%, or one in 20.

I only compared those two conditions. The original paper also reports that in-ear headphones worked better than bone-conducting ones, and that the language of the audio didn’t matter.

In my runs, music helped, maybe because people’s brains respond to the same sound in more individual ways than they do at rest. Even so, at around 70% accuracy with only 20 people, you wouldn’t want to unlock your phone with this.

Project Repository
Original Dataset