Datasets:
Complex acoustic scenes. Synchronized EEG. Event-level behaviour.
A multi-subject resource for studying auditory target detection in noise and overlapping sound events.
Overview | Task & data | Quick start | Documentation | Citation & contact
At a glance
CAS-EEG pairs the sounds presented to listeners with their event-locked EEG and behavioural responses. The release spans source sounds, continuous listening streams, raw and preprocessed EEG, and aligned sample pairs. Target detection is studied under two SNR levels and event overlap, with speech babble and wind as the background mixture.
| Participants | EEG channels | Sound categories | Cleaned aligned pairs |
|---|---|---|---|
| 16 | 60 | 55 | 49,313 |
| Design | Details |
|---|---|
| Target sounds | Baby cry, glass break, gunshot |
| Listening streams | 40 trials per participant; 120 s per trial |
| Acoustic complexity | 0 / -10 dB SNR; single and overlapping events |
| Paired epochs | -0.2 to 1.2 s, aligned to event onset at 0 s |
| Data formats | EEG .npy, audio .wav, metadata .csv; continuous recordings also included |
Choose your starting point: use aligned pairs for event-level audio-EEG analyses, continuous recordings for custom EEG processing, or source sounds and stimulus logs to study event composition.
Task and data lineage
Participants detected target sounds within continuous acoustic scenes containing background noise and competing events. The schematic below illustrates the task structure; it is not a literal timeline of a specific recorded trial.
Explore the full data lineage: source sounds to synchronized pairs
The workflow illustration is reproduced from the dataset manuscript. Sample counts in this card refer specifically to unified_metadata_cleaned.csv.
Quick start
- Open Files and versions and select the archive files you need. The release is distributed as ZIP files; the automatic row viewer is disabled.
- Extract the selected archives into a common local directory, preserving the folder structure.
- Locate
unified_metadata_cleaned.csvand use its paths to access paired EEG and audio. See the loading example in the technical documentation below.
For evaluation: split by participant or recording trial when testing generalization. Random epoch splits can share participants, recordings or source sounds across training and test sets.
Technical documentation
Open the complete file guide, metadata dictionary and loading example
Dataset overview
1. Dataset Overview
CAS_EEG is an EEG-audio paired dataset for auditory target detection under continuous background noise. Participants listened to 120-second stimulus streams containing target events, non-target events, overlapping events, and pure background segments. The dataset covers the full pipeline from source audio and stimulus-generation scripts to participant-level raw/preprocessed EEG and final aligned EEG-audio samples.
1.1 Core Statistics (from unified_metadata_cleaned.csv)
- Number of participants: 16 (S01-S16)
- Total aligned samples: 49,313
- Target samples: 8,875
- Button-press samples: 8,758
- Overlap-event samples: 11,053
- Background samples (category_1=background): 16,056
Notes:
- These statistics are computed from 04_EEG_Audio_Paired_Dataset/eeg_sound_pairs_aligned/unified_metadata_cleaned.csv.
- Sample counts are not identical across participants; see per-subject files in split_metadata.
2. Directory Structure
CAS_EEG/
|- 01_Resources/
| |- paradigm.py / paradigm.psyexp
| |- generate_stimulus.py
| |- create_trigger_schedule.py
| |- trigger_map.py / trigger_map.csv
| \- preprocess_audio.py
|- 02_Source_Audio/
| \- unified_dataset/
| |- metadata.csv
| |- target/...
| |- nontarget/...
| \- Wind_150s/
|- 03_Participants/
| \- S01...S16/
| |- audio_stimuli/
| |- behavioral/
| |- eeg_raw/
| \- eeg_preprocessed/
\- 04_EEG_Audio_Paired_Dataset/
|- eeg_sound_pairs_aligned/
| |- unified_metadata.csv
| |- unified_metadata_cleaned.csv
| |- split_metadata/
| \- S01...S16/
\- sound_event_clips_aligned/
\- S01...S16/
3. Experiment and Stimulus Design
3.1 Per-trial Configuration
According to 01_Resources/generate_stimulus.py, each trial is configured as follows by default:
- Duration: 120 seconds
- Total events: 80
- Event duration: 1 second
- Minimum inter-event interval: 0.2 seconds
- Maximum inter-event interval (sampling constraint): 2.0 seconds
- Number of overlap pairs: 20 pairs (40 events involved in overlaps)
- SNR conditions: 0 dB (high) and -10 dB (low)
- Background: babble noise + wind noise (random crops and overlay)
Output files per trial:
- trial_X.wav: synthesized 120-second stimulus
- trial_X_log.csv: event-level category/onset/SNR/overlap relations
- trial_X_pure_noise_onsets.txt: start times of 1-second pure background segments
- trial_X_schedule.csv: final trigger schedule for experiment presentation
3.2 Target-category Notes
- Example target categories in scripts include gunshot, glassbreak, and babycry.
- Because some stages may include adjusted versions (for example adjusted log/schedule), use explicit metadata labels (especially is_target) as the source of truth during analysis.
4. Trigger Encoding
Trigger semantics are defined in trigger_map.csv and trigger_map.py. Main rules:
- Single events: 1-115 (low/high SNR are encoded separately)
- Non-target overlaps NT+NT: 120-123
- Target+non-target overlaps T+NT: 180-183
- Special triggers:
- 250: participant button response
- 253: start of pure background segment
- 254: trial start
- 255: trial end
Recommendation:
- For training and evaluation, avoid relying only on numeric trigger codes. Prefer explicit metadata fields such as is_target, is_overlap, and pressed.
5. Modalities and File Formats
5.1 Raw EEG
Path: 03_Participants/Sxx/eeg_raw/
- .cdt / .ceo / .dpa: acquisition-system raw files
- readme.txt: participant-level acquisition notes
5.2 Preprocessed EEG
Path: 03_Participants/Sxx/eeg_preprocessed/
- merged_120s_icaed_removed.set: preprocessed continuous EEG (EEGLAB)
- EEG_events.csv: event list (including fields such as type and latency)
- pressed/ and unpressed/:
- condition-split .set files (target/non-target/SNR/overlap/background/button, etc.)
5.3 Participant Stimuli and Behavioral Logs
Path: 03_Participants/Sxx/audio_stimuli/ and 03_Participants/Sxx/behavioral/
- Each participant usually contains 40 trial audio files and logs
- behavioral stores PsychoPy exports (.csv/.log/.psydat)
5.4 Final Aligned Dataset
EEG Segments
Path: 04_EEG_Audio_Paired_Dataset/eeg_sound_pairs_aligned/Sxx/
Further organized by class and response:
- target/pressed, target/unpressed
- nontarget/pressed, nontarget/unpressed
- background/pressed, background/unpressed
File extension: .npy (EEG segment)
Corresponding Audio Segments
Path: 04_EEG_Audio_Paired_Dataset/sound_event_clips_aligned/Sxx/
Directory layout mirrors EEG aligned folders, with .wav files.
6. Metadata Description
6.1 Unified Metadata Files
- 04_EEG_Audio_Paired_Dataset/eeg_sound_pairs_aligned/unified_metadata.csv
- 04_EEG_Audio_Paired_Dataset/eeg_sound_pairs_aligned/unified_metadata_cleaned.csv
Compared with unified_metadata.csv, the cleaned version adds a reject field to mark samples recommended for exclusion.
6.2 Field Dictionary
| Field | Type | Description |
|---|---|---|
| subject_id | string | Participant ID (for example S01) |
| eeg_filename | string | EEG-segment filename (.npy) |
| eeg_path | string | Relative path of EEG segment |
| sound_clip_path | string | Relative path of corresponding audio clip (.wav) |
| pressed | bool | Whether a behavioral button response occurred in this event window |
| trial_id | int | Trial index |
| onset_s | float | Event onset within trial (seconds) |
| trigger | int | Trigger value |
| lag_seconds | float | Alignment lag (seconds) |
| is_target | bool | Whether this is a target event |
| is_overlap | bool | Whether this is an overlap event |
| sound_filename_1 | string | Source audio filename of event 1 |
| category_1 | string | Category of event 1 (background indicates pure-background segment) |
| snr_db_1 | float | SNR of event 1 (dB) |
| sound_filename_2 | string/empty | Source audio filename of event 2 in overlaps |
| category_2 | string/empty | Category of event 2 in overlaps |
| snr_db_2 | float/empty | SNR of event 2 in overlaps |
| reject | bool | Available only in cleaned metadata; recommended exclusion flag |
Notes:
- For non-overlap events, *_2 fields are typically empty.
- Background segments usually have category_1=background and trigger 253.
7. Reproducible Build Workflow
Recommended minimum workflow (run scripts in the relevant folder):
- Normalize audio format (44.1 kHz, 16-bit, mono)
- Generate trial stimuli and trial logs
- Generate trigger map and per-trial schedules
- Run PsychoPy experiment (paradigm.py / paradigm.psyexp)
- Preprocess EEG and epoch/segment data
- Align EEG segments with audio segments and export unified metadata
Example commands (adjust paths to your environment):
python 01_Resources/preprocess_audio.py
python 01_Resources/generate_stimulus.py
python 01_Resources/trigger_map.py
python 01_Resources/create_trigger_schedule.py
8. Quick Loading Example
import os
import numpy as np
import pandas as pd
root = r"d:\CAS_EEG"
meta_path = os.path.join(root, "04_EEG_Audio_Paired_Dataset", "eeg_sound_pairs_aligned", "unified_metadata_cleaned.csv")
meta = pd.read_csv(meta_path)
# Keep only valid samples if reject exists
if "reject" in meta.columns:
meta = meta[meta["reject"].astype(str).str.upper() != "TRUE"]
# Load one sample
row = meta.iloc[0]
eeg = np.load(os.path.join(root, "04_EEG_Audio_Paired_Dataset", "eeg_sound_pairs_aligned", row["eeg_path"]))
print("subject:", row["subject_id"])
print("shape:", eeg.shape)
print("target:", row["is_target"], "pressed:", row["pressed"], "trigger:", row["trigger"])
Citation and contact
Dataset manuscript
Jianting Shi, Luzheng Bi, Jiaqi Wang, Aberham Genetu Feleke, and Weijie Fei. CAS-EEG: A multi-subject dataset of synchronized neural and acoustic events for complex auditory scene analysis.
Publication details will be added when available. For now, identify the dataset by its repository URL and the revision used in your work.
- Dataset: huggingface.co/datasets/jatshi/CAS_EEG
- Code: Code for CAS-EEG Dataset
- Correspondence: Luzheng Bi
- Institution: School of Mechanical Engineering, Beijing Institute of Technology, Beijing, China
License and ethics
The repository currently declares the Apache License, Version 2.0. Source audio provenance is recorded in the dataset metadata; consult the original source datasets for their respective terms.
The data collection procedure involved in creating this dataset was conducted in accordance with the Declaration of Helsinki. The study protocol was reviewed and approved by the Ethics Committee of Beijing Institute of Technology (Approval ID: BIT-EC-H-2024150). All participants provided informed consent prior to their involvement.
- Downloads last month
- 49

