RawBMamba

RawBMamba: End-to-End Bidirectional State Space Model for Audio Deepfake Detection (Chen et al., Interspeech 2024). A sinc/Res front-end feeds a bidirectional Mamba (selective state-space) backbone with attention pooling and an angular-margin (A-softmax) head, operating directly on the raw waveform. The model returns a score where higher = more bona fide.

This repo is self-contained for inference: the vendored mamba_ssm backbone and network are in mamba_ssm/ + _net.py, and the exact wrapper used to produce the Arena scores is in rawbmamba.py.

Arena results

arena tier arena rank

EER% (lower is better); EmoSpoofTTS and LRLspoof are spoof-only and use 1-SRR% at the model's DeepVoice EER threshold. Per-dataset scores are under .eval_results/.

EER% 1.18 on ASVspoof2019_LA EER% 9.38 on ASVspoof2021_LA EER% 16.59 on ASVspoof2021_DF EER% 37.94 on ASVspoof5 EER% 47.82 on InTheWild EER% 38.71 on ADD22_eval_31 EER% 39.58 on ADD2023_track12_test_r1 EER% 35.15 on CFAD EER% 50.21 on CD-ADD EER% 49.18 on CVoiceFake_small EER% 47.61 on DeepVoice EER% 38.34 on LibriSeVoc EER% 49.87 on SONAR EER% 46.07 on ArAD EER% 17.91 on DECRO EER% 47.62 on J-SPAW_LA EER% 52.9 on ODSS EER% 36.71 on HABLA EER% 17.33 on DFADD EER% 15.19 on PyAra EER% 30.63 on XMAD EER% 23.59 on EmoFake_test 1-SRR% 74.33 on EmoSpoofTTS 1-SRR% 34.13 on LRLspoof

Architecture & inference notes

  • Input: raw float32 mono @ 16 kHz, deterministic first-64600-sample (β‰ˆ4 s) window (tile-repeat if shorter, no random crop). FP32.
  • Score = cos_theta[:, 1] - cos_theta[:, 0] (the AngleLinear head output the repo's evaluation uses).
  • Selective-scan path: the vendored mamba_ssm requires the causal_conv1d and selective_scan_cuda CUDA extensions for its fused fast path. We make those optional and run the pure-PyTorch reference selective-scan (use_fast_path off, fused_add_norm off) β€” numerically faithful to the fused kernels and, importantly, traceable for ONNX/TensorRT export.

ONNX / TensorRT

ONNX export + drop-in TensorRT inference class in trt_rawbmamba.py (RawBMambaTRT). Export required making the CUDA kernels optional, replacing the triton RMSNorm with a pure-PyTorch equivalent, and precomputing the AngleLinear renormalized weight (avoids the unsupported aten::renorm). The ONNX is uploaded here; the GPU-arch-specific engine is built locally (sidecar trt_rawbmamba.json).

Credits

All model design and weights are the work of the original RawBMamba authors (https://github.com/cyjie429/RawBMamba). This repository only packages their released checkpoint for the Speech Anti-Spoofing Arena.

@inproceedings{chen2024rawbmamba,
  title     = {RawBMamba: End-to-End Bidirectional State Space Model for Audio Deepfake Detection},
  author    = {Chen, Yujie and Yi, Jiangyan and Tao, Jianhua and others},
  booktitle = {Interspeech 2024},
  year      = {2024}
}
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Paper for SpeechAntiSpoofingBenchmarks/RawBMamba