Towards Assessing Data Replication in Music Generation with Music Similarity Metrics on Raw Audio

Roser Batlle-Roca, Wei-Hsiang Liao, Xavier Serra, Yuki Mitsufuji, Emilia Gómez

This paper introduces MiRA (Music Replication Assessment), an open-source, model-agnostic tool designed to detect when AI-generated music "memorizes" and replicates fragments of its training data. By evaluating several audio similarity metrics through a "forced-replication" experiment, the authors demonstrate that embedding-based methods can reliably identify even small amounts of copied audio across diverse musical genres.

TL;DR

The authors present MiRA, a tool that uses raw audio similarity metrics to detect plagiarism and data replication in generative music models. Their findings show that embedding-based metrics like CLAP and DEfNet are highly sensitive, capable of detecting as little as 1.5 seconds of replicated audio in a 30-second clip.

What Problem Does This Paper Address?

As generative AI models—particularly diffusion models—become more sophisticated, they have shown a troubling tendency to "memorize" and verbatim reproduce parts of their training sets. In the music industry, where intellectual property (IP) and copyright are paramount, this poses a significant legal and ethical risk.

While tools exist to evaluate the quality of AI music, there is a distinct lack of standardized, open-source methods to evaluate its originality or detect data leakage from the training set. This paper fills that gap by providing a framework to assess whether a model is truly creating something new or simply "remixing" its training data in a way that violates IP rights.

Methods

The researchers developed a "forced-replication" experimental framework to test how well different metrics identify copied content. They created synthetic samples by taking a "mixture" song and splicing in a specific percentage of a "reference" song (the "stolen" fragment) at a random point.

They evaluated five metrics:

  1. CoverID: A traditional Music Information Retrieval (MIR) metric that looks for composition similarity (melody/harmony) while ignoring tempo or instrumentation changes.
  2. KL Divergence: Measures the difference between probability distributions of audio labels (using the PaSST classifier).
  3. CLAP Score: Uses Contrastive Language-Audio Pretraining embeddings to measure distance in a high-dimensional latent space.
  4. DEfNet Score: A novel metric introduced by the authors based on Essentia’s Discogs-EffNet embeddings, specifically trained for music similarity.
  5. Fréchet Audio Distance (FAD): A standard metric for generative quality, tested here for its ability to detect replication.
Figure 1: Synthetic data procedure with 5% of replication.

Datasets

The study utilized an in-house dataset derived from the Spotify API, consisting of over 18,000 30-second audio previews across 24 genres. For the core experiment, they focused on six genres with distinct musical characteristics: heavy metal, afrobeats, techno, dub, cumbia, and bolero.

Key Insights and Ideas

  • Embedding Sensitivity: Embedding-based metrics (CLAP and DEfNet) are remarkably sensitive. They showed a steady, linear response to the amount of replication, making them the most reliable for detecting even tiny "leaks" (5% of the total duration).
  • The FAD Paradox: Interestingly, Fréchet Audio Distance (FAD)—the current "gold standard" for measuring the quality of generative models—failed at detecting replication. It actually showed higher similarity for the baseline (no replication) than for the copied samples, suggesting it is unsuitable for plagiarism detection.
  • KL Divergence's Binary Nature: While KL Divergence could statistically distinguish between a "clean" song and a "copied" one, it was ineffective at telling how much was copied. It essentially acted as a binary detector rather than a nuanced scale.
  • Model Independence: The MiRA tool is model-agnostic. It doesn't need to know the architecture of the AI (e.g., whether it's a GAN or a Diffusion model); it only requires the training data and the generated output.

Key Results

  • CLAP and DEfNet were the top performers, showing high sensitivity to 5% replication (1.5 seconds).
  • CoverID proved robust for detecting replication at levels of 10% (3 seconds) or higher.
  • The authors implemented these findings into the MiRA tool, which provides both global and per-pair distances, allowing researchers to find specific "suspicious" pairs of generated vs. training samples.
Figure 4: CLAP (↑)

Limitations and Future Work

  • Exact vs. Near-Exact Replication: The study focused on "exact" copies. In the real world, an AI might slightly pitch-shift, time-stretch, or add reverb to a training fragment. Future work needs to test the robustness of these metrics against such "data augmentations."
  • Computational Cost: Some metrics, particularly KL Divergence and FAD, are computationally expensive and slow to run on large datasets.
  • Synthetic vs. Real AI Output: The authors used synthetic "cut-and-paste" samples to ensure a ground truth. The next step is to validate MiRA on actual samples from state-of-the-art generative models like MusicLM or MusicGen.
  • Legal Frameworks: The authors acknowledge the ethical complexity of using Spotify previews and call for clearer legal guidelines for MIR researchers.
Figure 7: MiRA’s structure scheme.

Summary updated

BibTeX
@misc{batlleroca2024towards,
  author = {Roser Batlle-Roca and Wei-Hsiang Liao and Xavier Serra and Yuki Mitsufuji and Emilia Gómez},
  title = {{Towards Assessing Data Replication in Music Generation with Music Similarity Metrics on Raw Audio}},
  year = {2024},
  eprint = {2407.14364},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2407.14364},
}
Figure