Skip to content

IanMGriff/audio-ssl

Repository files navigation

Toward Human-aligned Universal Audio Representations with Contrastive-Equivariant Self-Supervised Learning

Official repo for the CCN 2026 Proceedings paper Toward Human-aligned Universal Audio Representations with Contrastive-Equivariant Self-Supervised Learning.

This repository implements CE-SSL training and evaluation, including linear-probe transfer, zero-shot triplet tasks, parameter decoding, and fMRI analyses reported in the paper.

CE-SSL schematic

Getting Started

Clone with submodules, then create the conda environment:

git clone --recurse-submodules <repo-url> ce_audio_ssl
cd ce_audio_ssl
mamba env create -f environment.yml -n ce_audio_ssl
mamba activate ce_audio_ssl
pip install -e .

Dependencies

  • auditory_brain_dnn/ — brain–model comparison (fork extended for CE-SSL model lists and activations)
  • byol-a/BYOL-A baseline model training and evaluation (pretrained weights released in this parent repo)
  • robustness/ — Based on MadryLab/robustness, with changes for model architectures and audio augmentations.

Navigating the Code

Data And Checkpoints

Datasets and checkpoints are available upon request. Once obtained, set paths with COCHDNN_* environment variables (see default_paths.py). The key training variables are COCHDNN_JSIN_TRAIN_H5, COCHDNN_JSIN_VALID_H5, COCHDNN_AUDIONOISE_TRAIN_H5, COCHDNN_AUDIONOISE_VALID_H5, and COCHDNN_AUDIOSET_TRAIN_H5; evaluation scripts also use paths such as COCHDNN_CHECKPOINT_DIR, COCHDNN_ESC50_DIR, COCHDNN_NSYNTH_DIR, COCHDNN_TONE_PERFECT_DIR, and COCHDNN_JSIN_DIR.

Evaluation And Notebooks

Transfer, zero-shot, parameter-decoding, and fMRI analysis entry points are in lightning_scripts/ and fmri_analysis/. Start with the demo notebooks in notebooks/demo_notebooks/: audio_transforms_demo.ipynb shows the matched CE-SSL audio transforms, and zero_shot_eval_demo.ipynb runs the NSynth melody-match triplet evaluation path.

Paper figure notebooks are under notebooks/, including figure_2.ipynb, figure_3_parameter_decoding.ipynb, figure_3_zero_shot.ipynb, and figure_4_plot_fmri_components.ipynb. These notebooks expect generated evaluation outputs such as eval_jsin_results/, eval_nsynth_results/, and parameter_decoding_v2/.

About

Auditory SSL models

Resources

License

Stars

1 star

Watchers

2 watching

Forks

Packages

 
 
 

Contributors