This repository contains the original implementation of
AASIST3: KAN-Enhanced AASIST Speech Deepfake Detection using SSL Features and Additional Regularization for the ASVspoof 2024 Challenge
.
Paper
AASIST3: KAN-Enhanced AASIST Speech Deepfake Detection using SSL Features and Additional Regularization for the ASVspoof 2024 Challenge
This is the original implementation of the paper. The model weights provided here are NOT the same weights used in the paper results.
Overview
AASIST3 is an enhanced version of the AASIST (Anti-spoofing with Adaptive Softmax and Instance-wise Temperature) architecture that incorporates
Kolmogorov-Arnold Networks (KAN)
for improved speech deepfake detection. The model leverages:
Self-Supervised Learning (SSL) Features
: Uses Wav2Vec2 encoder for robust audio representation
KAN Linear Layers
: Kolmogorov-Arnold Networks for enhanced feature transformation
Graph Attention Networks (GAT)
: For spatial and temporal feature modeling
Multi-branch Inference
: Multiple inference branches for robust decision making
Architecture
The AASIST3 model consists of several key components:
Wav2Vec2 Encoder
: Extracts SSL features from raw audio
KAN Bridge
: Transforms SSL features using Kolmogorov-Arnold Networks
Residual Encoder
: Processes features through multiple residual blocks
Graph Attention Networks
:
GAT-S: Spatial attention mechanism
GAT-T: Temporal attention mechanism
Multi-branch Inference
: Four parallel inference branches with master tokens
KAN Output Layer
: Final classification using KAN linear layers
Key Innovations
KAN Integration
: Replaces traditional linear layers with KAN linear layers for better feature approximation
Enhanced Regularization
: Additional dropout and regularization techniques
Multi-dataset Training
: Trained on multiple ASVspoof datasets for robustness
🚀 Quick Start
Installation
git clone https://github.com/your-username/AASIST3.git
cd AASIST3
pip install -r requirements.txt
Loading the Model
from model import aasist3
# Load the model from Hugging Face Hub
model = aasist3.from_pretrained("MTUCI/AASIST3")
model.eval()
Basic Usage
import torch
import torchaudio
# Load and preprocess audio
audio, sr = torchaudio.load("audio_file.wav")
# Ensure audio is 16kHz and monoif sr != 16000:
audio = torchaudio.transforms.Resample(sr, 16000)(audio)
if audio.shape[0] > 1:
audio = torch.mean(audio, dim=0, keepdim=True)
# Prepare input (model expects ~4 seconds of audio at 16kHz)# Pad or truncate to 64600 samplesif audio.shape[1] < 64600:
audio = torch.nn.functional.pad(audio, (0, 64600 - audio.shape[1]))
else:
audio = audio[:, :64600]
# Run inferencewith torch.no_grad():
output = model(audio)
probabilities = torch.softmax(output, dim=1)
prediction = torch.argmax(probabilities, dim=1)
# prediction: 0 = bonafide, 1 = spoofprint(f"Prediction: {'Bonafide'if prediction.item() == 0else'Spoof'}")
print(f"Confidence: {probabilities.max().item():.3f}")
Training Details
Datasets Used
The model was trained on a combination of multiple datasets:
If you use this implementation in your research, please cite the original paper:
@inproceedings{borodin24_asvspoof,
title = {AASIST3: KAN-enhanced AASIST speech deepfake detection using SSL features and additional regularization for the ASVspoof 2024 Challenge},
author = {Kirill Borodin and Vasiliy Kudryavtsev and Dmitrii Korzh and Alexey Efimenko and Grach Mkrtchian and Mikhail Gorodnichev and Oleg Y. Rogov},
year = {2024},
booktitle = {The Automatic Speaker Verification Spoofing Countermeasures Workshop (ASVspoof 2024)},
pages = {48--55},
doi = {10.21437/ASVspoof.2024-8},
}
License
This project is licensed under the Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License (CC BY-NC-ND 4.0) - see the
LICENSE
file for details.
This license allows you to:
Share
: Copy and redistribute the material in any medium or format
Attribution
: You must give appropriate credit, provide a link to the license, and indicate if changes were made
But does NOT allow:
Commercial use
: You may not use the material for commercial purposes
Derivatives
: You may not distribute modified versions of the material
Disclaimer
: This is a research implementation. The model weights provided are for demonstration purposes and may not match the exact performance reported in the paper.
Runs of MTUCI AASIST3 on huggingface.co
534
Total runs
40
24-hour runs
120
3-day runs
131
7-day runs
-125
30-day runs
More Information About AASIST3 huggingface.co Model
AASIST3 huggingface.co is an AI model on huggingface.co that provides AASIST3's model effect (), which can be used instantly with this MTUCI AASIST3 model. huggingface.co supports a free trial of the AASIST3 model, and also provides paid use of the AASIST3. Support call AASIST3 model through api, including Node.js, Python, http.
AASIST3 huggingface.co is an online trial and call api platform, which integrates AASIST3's modeling effects, including api services, and provides a free online trial of AASIST3, you can try AASIST3 online for free by clicking the link below.
AASIST3 is an open source model from GitHub that offers a free installation service, and any user can find AASIST3 on GitHub to install. At the same time, huggingface.co provides the effect of AASIST3 install, users can directly use AASIST3 installed effect in huggingface.co for debugging and trial. It also supports api for free installation.