--- tags: - model_hub_mixin - pytorch_model_hub_mixin license: mit datasets: - Bisher/ASVspoof_2019_LA - Bisher/ASVspoof_2021_DF language: - en --- ### 1. Introduction Transformers and their variants have achieved great success in speech processing. However, their multi-head selfattention mechanism is computationally expensive. Therefore, one novel selective state space model, Mamba, has been proposed as an alternative. Building on its success in automatic speech recognition, we apply Mamba for spoofing attack detection. Mamba is well-suited for this task as it can capture the artifacts in spoofed speech signals by handling long-length sequences. However, Mamba’s performance may suffer when it is trained with limited labeled data. To mitigate this, we propose combining a new structure of Mamba based on a dual-column architecture with self-supervised learning, using the pre-trained wav2vec 2.0 model. The experiments show that our proposed approach achieves competitive results and faster inference on the ASVspoof 2021 LA and DF datasets, and on the more challenging In-theWild dataset, it emerges as the strongest candidate for spoofing attack detection. ### 2. Setup Environment You need to create the running environment by [Anaconda](https://www.anaconda.com/). First, create and activate the environment: ```bash conda create -n XLSR_Mamba python=3.10 conda activate XLSR_Mamba ``` Then install the requirements: ```bash pip install -r requirements.txt ``` Install fairseq: ```bash git clone https://github.com/facebookresearch/fairseq.git fairseq_dir cd fairseq_dir git checkout a54021305d6b3c pip install --editable ./ ``` ### 3. Pretrained Model The pretrained model XLSR can be found at this [link](https://dl.fbaipublicfiles.com/fairseq/wav2vec/xlsr2_300m.pt). ### 4. Results Dataset | **EER (%)** | **min t-DCF** | --------|--------------------|--------------------| ASVspoof2021 LA | **0.93** | **0.208** | ASVspoof2021 DF | **1.88** | **-** | In-The-Wild | **6.71** | **-** | ### 5. 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} } ``` This model has been pushed to the Hub using the [PytorchModelHubMixin](https://huggingface.co/docs/huggingface_hub/package_reference/mixins#huggingface_hub.PyTorchModelHubMixin) integration: - Library: [https://github.com/swagshaw/XLSR-Mamba] - Paper: [https://arxiv.org/pdf/2411.10027]