This repository contains the code for the paper:
Target Trust Is Budget-Dependent: Source-Anchored Shrinkage for Calibration-Free Spiking EEG Driver Drowsiness Detection
code/— main Python scripts for preprocessing, source training, target-budget adaptation, baselines, analysis, and figure generationfigure_scripts/— scripts used to generate the main paper figuresconfigs/— frozen run configurations and provenance notesrequirements.txt— Python dependencies
spikemlda_revision_original.py— source training and full-target adaptation pipeline for the q2r SpikeMLDA variantspikemlda_baselines.py— baseline implementations (EEGNet, ID3RSNet-style, dense CORAL/MMD/DANN)spikemlda_conv.py— convolutional encoder and SNN componentsprepare_dd_database.py/download_dd_database.py— MPD-DF data preparationanalyze_exact_twin.py/analyze_external_validation.py— analysis helpersplot_publication_figures.py/make_bspc_framework_figure.py— figure generationbenchmark_latency_repeated.py/count_forward_macs.py— efficiency diagnostics
Data are not included; they must be downloaded from the public sources cited in the paper:
- SADT-derived bundle (Cao et al., 2019)
- MPD-DF (Li et al., 2026)
pip install -r requirements.txtThis repository contains code only. The manuscript PDF, LaTeX sources, and supplementary materials are stored separately.