Skip to content

Official Implementation of the paper "XLSR-Mamba: A Dual-Column Bidirectional State Space Model for Spoofing Attack Detection"

License

Notifications You must be signed in to change notification settings

swagshaw/XLSR-Mamba

Repository files navigation

XLSR-Mamba Official Pytorch Implementation

PWC

Official Implementation of our work "XLSR-Mamba: A Dual-Column Bidirectional State Space Model for Spoofing Attack Detection" published in IEEE Signal Processing Letters. For detailed insights into our methodology, you can access the complete paper. If you have any questions on this repository or the related paper, please create an issue or email me.

News

[Mar. 2025] We would like to inform you that the scores for XLSR-Mamba achieves 2nd Rank on the Speech-DF-Arena leaderboard.

[Feb. 2025] We release code, checkpoints, and extracted scores for XLSR-Mamba.

Getting Started

Setup Environment

You need to create the running environment by Anaconda. First, create and activate the environment:

conda create -n XLSR_Mamba python=3.10
conda activate XLSR_Mamba

Then install the requirements:

pip install -r requirements.txt

Install fairseq:

git clone https://github.com/facebookresearch/fairseq.git fairseq_dir
cd fairseq_dir
git checkout a54021305d6b3c
pip install --editable ./

Pretrained XLSR

The pretrained model XLSR can be found at this link.

We have uploaded the pretrained models of our experiments here.

Datasets

We used the LA partition of ASVspoof 2019 for training and validation, it can be downloaded from here.

We used the ASVspoof 2021 database for evaluation. LA can be found here, and DF here.

We also used the 'In-the-Wild' dataset for evaluation, it can be downloaded from here.

Training & Testing on fixed-length input

To train and produce the score for the LA set evaluation, run:

python main.py --algo 5

To train and produce the score for DF set evaluation, run:

python main.py --algo 3

Upon running this command, a new folder will be generated within the 'models' directory, containing the top 5 epochs from this training loop. Additionally, two score files will be created: one for LA and another for DF, both located in the 'Scores' folder. You can evaluate the score by:

bash evaluate.sh

Please remember to choose the correct score file and the dataset path.

Pretrained models

We have uploaded the pretrained models of our experiments to 🤗 HugginFace:

Model #Total Params Download
XLSR-Mamba-LA 319M 🤗 HuggingFace
XLSR-Mamba-DF 319M 🤗 HuggingFace

You could also download the checkpoints by Google Drive.

Results

Dataset EER (%) min t-DCF
ASVspoof2021 LA 0.93 0.208
ASVspoof2021 DF 1.88 -
In-The-Wild 6.71 -

Citation

If you find our repository valuable for your work, please consider giving a star to this repo and citing our paper:

@article{xiao2024xlsr,
  title={{XLSR-Mamba}: A Dual-Column Bidirectional State Space Model for Spoofing Attack Detection},
  author={Xiao, Yang and Das, Rohan Kumar},
  journal={arXiv preprint arXiv:2411.10027},
  year={2024}
}

Acknowledgements

Our implementations use the source code from the following repositories and users:

License

The project is available as open source under the terms of the MIT License.

About

Official Implementation of the paper "XLSR-Mamba: A Dual-Column Bidirectional State Space Model for Spoofing Attack Detection"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published