This repository provides the official implementation of the paper Advancing Zero-Shot Open-Set Speech Deepfake Source Tracing, accepted at Odyssey 2026.
We provide scripts to reproduce the backend scoring experiments from the paper. For reproducing cosine similarity–based results in Table 2, please refer to the companion repository ➡️ STOPA.
This repository presents a novel zero-shot and few-shot framework for open-set speech deepfake source tracing. Moving beyond simple spoofing detection, this work focuses on attributing a spoofed utterance to its specific underlying generation method.
By treating source tracing as an open-set verification problem, similar to speaker verification, the system compares trial embeddings against enrolled attack fingerprints to accept or reject a claimed source. The framework utilizes an SSL-AASIST architecture (optimized with Additive Angular Margin (AAM) loss and a RegMixup strategy) to extract robust attack embeddings to ensure high discriminability across both known and unknown attack types.
Key features:
- Zero-shot and few-shot backend scoring for open-set spoof attribution
- SSL-AASIST embedding extractor with AAM-softmax objective
- Evaluation of MLP and Siamese backends
- Reproducible STOPA [1] + ASVspoof2019 [2] training/evaluation protocols
.
├── compute_eer_mlp.py # Compute EER for few-shot MLP backend
├── compute_eer_siamese.py # Compute EER for Siamese backends (few-shot, zero-shot)
├── config/
│ ├── Resnet34.conf # Config for SSL-ResNet + AAM training
│ └── AASIST_STOPA_ASVspoof2019.conf # Config for SSL-AASIST + AAM + RegMixup training
│
├── data_utils.py # Dataset utilities for STOPA and ASVspoof2019
├── evaluate_mlp.py # Evaluate few-shot MLP backend
├── evaluate_siamese_network.py # Evaluate Siamese network backends
├── evaluation.py # Unified evaluation and EER computation
│
├── extract_STOPA_ASVspoof2019_embeddings_from_SSL_AASIST_AAM_RegMixup.py # Extract training set embeddings from SSL-AASIST
├── extract_STOPA_ASVspoof2019_embeddings_from_SSL_ResNet_AAM.py # Extract training set embeddings from SSL-ResNet
│
├── models/ # Trained model checkpoints
│ ├── SSL_AASIST_AAM_RegMixup.pth* # Selected best checkpoint (renamed for convenience)
│ ├── SSL_ResNet34_AAM.pth* # Selected best checkpoint (renamed for convenience)
│ ├── few_shot_siamese_network_CL_SSL_AASIST_AAM_RegMixup.pt
│ └── zero_shot_siamese_network_CL_SSL_AASIST_AAM_RegMixup.pt
│
├── trial_embeddings_SSL_AASIST_AAM_RegMixup.npy* # Trial embeddings extracted from SSL-AASIST (NumPy .npy file)
├── trial_embeddings_SSL_ResNet_AAM.npy* # Trial embeddings extracted from SSL-ResNet (NumPy .npy file)
├── SSL_AASIST_AAM_RegMixup.py # Model definition / architecture used for training & inference
├── ResNet34.py # Model definition / architecture used for training & inference
│
├── STOPA+ASVspoof2019/ # Dataset directory
│ ├── protocols/
│ │ ├── stopa_asvspoof2019_train.txt
│ │ └── stopa_asvspoof2019_dev.txt
│ └── all_files/ # Place STOPA and ASVspoof2019 training files here
│
├── evaluation_files_with_scores/* # Score files from evaluation scripts
│ ├── evaluation_mlp_SSL_AASIST_AAM_RegMixup.csv
│ ├── evaluation_few_shot_siamese_network_CL_SSL_AASIST_AAM_RegMixup.csv
│ └── evaluation_zero_shot_siamese_network_CL_SSL_AASIST_AAM_RegMixup.csv
│
├── EERs_mlp/ # EER results for few-shot MLP backend
├── EERs_few_shot_siamese_network_CL/ # EER results for Siamese (CL)
├── EERs_zero_shot_siamese_network_CL/ # EER results for zero-shot Siamese
├── EERs_cosine_similarity/ # (See STOPA repo for cosine similarity setup)
│
├── train_SSL_AASIST_AAM_RegMixup.py # Train SSL-AASIST + AAM + RegMixup embedding extractor
├── train_SSL_ResNet34_AAM.py # Train SSL-ResNet + AAM embedding extractor
├── train_few_shot_mlp.py # Train few-shot MLP backend
├── train_few_shot_siamese_network_CL.py # Train Siamese backend (contrastive loss)
├── train_zero_shot_siamese_network_CL.py # Train zero-shot Siamese backend
│
├── utils.py # Utility and helper functions
├── fingerprint_all_emb_SSL_AASIST_AAM_RegMixup.csv* # Consolidated fingerprint embeddings derived from SSL-AASIST
└── fingerprint_all_emb_SSL_ResNet_AAM.csv* # Consolidated fingerprint embeddings derived from SSL-Resnet
*Large files/folders that could not be uploaded on GitHub due to size limit can be accessed here.
👉 The older version of this repository is also made available in the same drive folder as v1_Github.zip.
This repository assumes access to both STOPA and ASVspoof2019-LA datasets.
-
Download the datasets:
- STOPA: https://zenodo.org/records/15606628
- ASVspoof 2019-LA: https://www.asvspoof.org
-
Organize as follows (only include training files):
./STOPA+ASVspoof2019/all_files/
├── [STOPA training files]
├── [ASVspoof2019-LA training files]
└── ...
- Use provided protocols for training and development:
./STOPA+ASVspoof2019/protocols/stopa_asvspoof2019_train.txt
./STOPA+ASVspoof2019/protocols/stopa_asvspoof2019_dev.txt
- Download additional protocols for evaluation:
The evaluation scripts requireprotocols_trials_extended/, which can be downloaded from the STOPA repository:
➡️ https://github.com/Manasi2001/STOPA
python train_SSL_AASIST_AAM_RegMixup.py --config config/STOPA_ASVspoof2019.conf
or
python train_SSL_ResNet34_AAM.py --config config/Resnet34.conf
- Trains the SSL-AASIST/SSL-ResNet34 embedding extractor on STOPA + ASVspoof2019 data.
- Runs for 100 epochs, saving intermediate checkpoints in
exp_results/(e.g.,epoch_1.pth,epoch_100.pth, etc.). - For this repository, one of the best-performing models (based on minimum training loss) was selected and renamed to
SSL_AASIST_AAM_RegMixup.pth/SSL_ResNet34_AAM.pthfor convenience. - You may experiment with alternative checkpoints for performance comparison.
python extract_STOPA_ASVspoof2019_embeddings_from_SSL_AASIST_AAM_RegMixup.py
or
python extract_STOPA_ASVspoof2019_embeddings_from_SSL_ResNet_AAM.py
- Uses the trained model to extract attack embeddings.
- Saves the embeddings to
STOPA_ASVspoof2019_embeddings_from_SSL_AASIST_AAM_RegMixup.csv/STOPA_ASVspoof2019_embeddings_from_SSL_ResNet_AAM.csv.
👉 We proceed with SSL_AASIST_AAM_RegMixup as our front-end (see Table 1 in the paper for performance comparisons).
python train_few_shot_mlp.py
python train_few_shot_siamese_network_CL.py
python train_zero_shot_siamese_network_CL.py
Each model is saved under models/ and evaluated separately in the next step.
python evaluate_mlp.py
python evaluate_siamese_network.py
-
Generates score files in
evaluation_files_with_scores/for each backend configuration. -
Files include:
-
evaluation_mlp_SSL_AASIST_AAM_RegMixup.csv -
evaluation_few_shot_siamese_network_CL_SSL_AASIST_AAM_RegMixup.csv -
evaluation_zero_shot_siamese_network_CL_SSL_AASIST_AAM_RegMixup.csv
-
python compute_eer_mlp.py
python compute_eer_siamese.py
-
Computes Equal Error Rates (EER) for each backend strategy.
-
Results are stored in their respective folders:
EERs_mlp/ EERs_few_shot_siamese_network_CL/ EERs_zero_shot_siamese_network_CL/
The cosine-similarity baseline from Table 2 is not implemented in this repository. To reproduce those results, please refer to the STOPA repository:
➡️ https://github.com/Manasi2001/STOPA
If you use this repository or results from the paper, please cite:
@article{chhibber2025advancing,
title={Advancing Zero-Shot Open-Set Speech Deepfake Source Tracing},
author={Chhibber, Manasi and Mishra, Jagabandhu and Kinnunen, Tomi H},
journal={arXiv preprint arXiv:2509.24674},
year={2025}
}
MIT License
Copyright (c) 2025 Manasi Chhibber
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
- This work was partially supported by the Academy of Finland (Decision No. 349605, project “SPEECHFAKES”).
- Computational resources were provided by CSC – IT Center for Science, Finland.
- The SSL-AASIST architecture builds upon the implementation from TakHemlata/SSL_Anti-spoofing.
[1] STOPA: A Database of Systematic VariaTion Of DeePfake Audio for Open-Set Source Tracing and Attribution
@misc{firc2025stopadatabasesystematicvariation,
author={Anton Firc and Manasi Chhibber and Jagabandhu Mishra and Vishwanath Pratap Singh and Tomi Kinnunen and Kamil Malinka},
year={2025},
eprint={2505.19644},
archivePrefix={arXiv},
primaryClass={cs.SD},
url={https://arxiv.org/abs/2505.19644},
}[2] ASVspoof 2019: A large-scale public database of synthesized, converted and replayed speech
@article{wang2020asvspoof,
title={ASVspoof 2019: A large-scale public database of synthesized, converted and replayed speech},
author={Wang, Xin and Yamagishi, Junichi and Todisco, Massimiliano and Delgado, H{\'e}ctor and Nautsch, Andreas and Evans, Nicholas and Sahidullah, Md and Vestman, Ville and Kinnunen, Tomi and Lee, Kong Aik and others},
journal={Computer Speech \& Language},
volume={64},
pages={101114},
year={2020},
publisher={Elsevier}
}