EEGFaceSem: An EEG Benchmark with Paired Generative Latents for Semantic Visual Modeling
Paper • 2611.10781 • Published
text stringlengths 0 24 |
|---|
# Core ML/DS Libraries |
tensorflow==2.9.0 |
torch==2.6.0+cu124 |
scikit-learn==1.5.1 |
numpy==1.26.4 |
pandas==2.2.3 |
scipy==1.14.1 |
# EEG Specific Libraries |
mne==1.7.1 |
# Plotting and Imaging |
matplotlib==3.9.2 |
Pillow==10.4.0 |
EEG Dataset for Semantic Visual Response
Accepted at NeurIPS 2026, Evaluations and Datasets Track.
git clone https://huggingface.co/datasets/yefllower/EEGFaceSem
cd EEGFaceSem
pip install -e .
import EEGFaceSem
# Auto-downloads data when loading
X, Y, ids = EEGFaceSem.load_data(task='female')
print(f"X: {X.shape}, Y: {Y.shape}") # X: (n_trials, 32, 1101), Y: (n_trials,)
# Or download specific subjects only (~300MB per subject)
# EEGFaceSem.download(subjects=[1])
# Load latent vectors and generate face image
image_ids, latents, id_to_idx = EEGFaceSem.load_latent()
EEGFaceSem.generate(latents[0:1])[0].save("face.png")
| Metric | Value |
|---|---|
| Subjects | 30 |
| Total epochs | 64,124 |
| EEG channels | 32 |
| Sampling rate | 1000 Hz |
| Epoch window | [-0.2, 0.9]s |
| Task ID | Task Name |
|---|---|
| 0 | female |
| 1 | male |
| 2 | blond |
| 3 | darkhaired |
| 4 | smiles |
| 5 | nosmile |
| 6 | old |
| 7 | young |
# Download data
EEGFaceSem.download(data_type="processed") # or "raw", "both"
EEGFaceSem.download(subjects=[1, 2, 3]) # specific subjects only
# Load data
X, Y, ids = EEGFaceSem.load_data(task='female')
# Random split
(X_train, Y_train), (X_test, Y_test) = EEGFaceSem.split_random(X, Y, test_size=0.2)
# Leave-one-subject-out
(X_train, Y_train), (X_test, Y_test) = EEGFaceSem.split_by_subject(X, Y, ids, test_subject=1)
EEGFaceSem.benchmark(
model='LDA', # LDA, LR, MLP, EEGNet, EEGPT
task_id=0, # 0-7 or -1 for all
strategy='single_subject',
)
# Load latent vectors
image_ids, latents, id_to_idx = EEGFaceSem.load_latent()
# Generate from latent
images = EEGFaceSem.generate(latents[0:1])
images[0].save("face.png")
# Generate from specific image ID in data
img_id = int(ids[0, 4])
EEGFaceSem.generate(latents[id_to_idx[img_id]:id_to_idx[img_id]+1])[0].save(f"face_{img_id}.png")
The dataset is released under CC BY 4.0. The accompanying benchmark code is released under the Apache License 2.0.
@misc{ma2026eegfacesem,
title = {EEGFaceSem: An EEG Benchmark with Paired Generative Latents for Semantic Visual Modeling},
author = {Jun Ma and Michiel M. Spapé and Keith M. Davis III and Tuukka Ruotsalo},
year = {2026},
eprint = {2611.10781},
archivePrefix = {arXiv},
primaryClass = {cs.LG},
url = {https://arxiv.org/abs/2611.10781}
}