Codecfake: An Initial Dataset for Detecting LLM-based Deepfake Audio

Yi Lu, Yuankun Xie, Ruibo Fu, Zhengqi Wen, Jianhua Tao, Zhiyong Wang, Xin Qi, Xuefei Liu, Yongwei Li, Yukun Liu, Xiaopeng Wang, Shuchen Shi

Introduction

As Large Language Models (LLMs) increasingly dominate the field of audio generation, the underlying technology for speech synthesis is undergoing a fundamental shift. Traditional deepfake generation typically relies on a three-step pipeline involving text analysis, acoustic modeling, and a vocoder (such as HiFi-GAN) to synthesize the final waveform. Consequently, current state-of-the-art Audio Deepfake Detection (ADD) systems are optimized to identify the specific mathematical artifacts left by these vocoders.

However, modern LLM-based models like VALL-E and AudioLM utilize neural codecs to compress audio into discrete tokens and reconstruct it end-to-end, bypassing vocoders entirely. This paper introduces Codecfake, a massive dataset designed to address the resulting detection gap, demonstrating that detectors trained on traditional vocoder-based datasets are largely ineffective against these new codec-based fakes.

The Codecfake Dataset

To bridge the "vocoder gap," the authors developed the Codecfake dataset, which is significantly larger and more linguistically diverse than previous benchmarks.

  • Scale: 1,058,216 audio clips.
  • Diversity: Real audio was sourced from VCTK (English with various accents) and AISHELL3 (Mandarin Chinese).
  • Structure: The dataset includes seven diverse, open-source neural codec models (F01–F07), including SoundStream, EnCodec, and Descript-audio-codec (DAC). The data is split into "seen" conditions (F01–F06) for training and an "unseen" condition (C7, using the DAC codec) to evaluate real-world generalization.

Methodology

The researchers focused on the reconstruction artifacts created by the "neural codec to waveform" conversion. Their approach involved:

  1. Fake Audio Generation: Re-encoding and decoding real speech through seven representative codecs to isolate reconstruction artifacts.
  2. Detection Baselines: Evaluating two high-performing architectures: LCNN (Light Convolutional Neural Network) and AASIST (Audio Anti-Spoofing using Integrated Spectro-Temporal Graph Attention Networks).
  3. Feature Comparison: Comparing traditional Mel-spectrograms against self-supervised learning features using wav2vec2.

Key Insights

Visual Similarity is Deceptive

One of the primary challenges in detecting codec-based fakes is that their Mel-spectrograms appear nearly identical to original recordings. This visual fidelity makes the detection task difficult for simple CNN-based models and necessitates more sophisticated temporal modeling.

Comparison of original audio and reconstruction via AcademicCodec.

The Power of Self-Supervised Learning

The study found that using wav2vec2 features significantly outperformed hand-crafted Mel-spectrograms. The high-dimensional hidden states of wav2vec2 are better at capturing the subtle "unnaturalness" inherent in neural codec reconstruction that is invisible to the naked eye.

Results and Generalization

The experimental results highlight a critical vulnerability in existing systems. Models trained on the vocoder-heavy ASVspoof2019 dataset reached an average Equal Error Rate (EER) of 41.583% on Codecfake—performance barely better than random chance.

In contrast, the W2V2-AASIST model trained on Codecfake achieved a remarkably low EER of 0.177%. Crucially, the model maintained high performance even when faced with the "unseen" DAC codec, recording an EER of only 0.884%.

Spectrogram of audio reconstructed using the DAC codec, used as an unseen test condition.

Conclusion

The Codecfake dataset demonstrates that training detectors specifically on codec-based artifacts can reduce error rates by over 41%. While this work focuses on reconstruction artifacts, future iterations aim to incorporate prosodic and linguistic errors from full LLM outputs and explore "source tracing" to identify the specific models used in deepfake generation.

Summary updated

BibTeX
@inproceedings{lu2024codecfake,
  author = {Yi Lu and Yuankun Xie and Ruibo Fu and Zhengqi Wen and Jianhua Tao and Zhiyong Wang and Xin Qi and Xuefei Liu and Yongwei Li and Yukun Liu and Xiaopeng Wang and Shuchen Shi},
  title = {{Codecfake: An Initial Dataset for Detecting LLM-based Deepfake Audio}},
  booktitle = {Interspeech},
  year = {2024},
  doi = {10.21437/interspeech.2024-2428},
}
Figure