All work

Vision, Language & MultimodalGlobal stock-media platform

Hierarchical music genre prediction with audio-text embeddings

A genre-prediction framework built on a 24-class hierarchy and MuQ-MuLan audio-text embeddings. A supervised layer raised five-class F1 from 69.3% zero-shot to 77.4%.

five-class F1 with the supervised layer, up from 69.3%
77.4%
retrieval Hit@10 with rich genre descriptions
91.7%
macro classes consolidating 278 micro-genres
24

The problem

Genre metadata is central to music-catalog discovery. It shapes search relevance, recommendations and how quickly a customer finds a licensable track with the required sound. The catalog held hundreds of human-curated genre labels, but the raw taxonomy was highly fragmented: related genres overlapped, tracks carried several labels, and some micro-genres appeared under more than one broader category. Only 20.8% of tracks mapped to a single macro genre. Applying machine learning directly to that flat label space would make the system difficult to train, evaluate and interpret.

What was built

The framework combines three components:

  • A hierarchy consolidating 278 micro-genres into 24 macro classes
  • MuQ-MuLan embeddings that place audio and text in a shared semantic space
  • A CatBoost one-vs-rest classifier per macro genre, trained on those embeddings

Where a micro-genre appeared under several parents, empirical label co-occurrence decided its single parent.

Each track is an audio embedding and each genre is a text embedding. Cosine similarity between them gives zero-shot predictions, so a new genre concept can be added through text without training a dedicated classifier. Three text formats were tested: the genre name, a keyword list and a richer description of instrumentation, production style, rhythm and mood.

The supervised layer learns more precise decision boundaries while preserving the multi-label nature of the task. Thresholds are selected per genre from its precision-recall trade-off, because a universal threshold proved unsuitable.

Results

Rich descriptions beat names and keyword lists in audio-text retrieval: Hit@1 rose from 31.3% to 38.6%, and Hit@10 reached 91.7%. On the five most frequent macro classes, zero-shot classification reached 69.3% macro-F1 and 0.815 macro-AUC. The CatBoost layer raised these to 77.4% and 0.903, and cut the overlap between positive and negative score distributions from 37.3% to 24.1%. Against the audio-only MuQ-SSL and BEATs, MuQ-MuLan had the highest F1 in 22 of 24 macro genres. The result is a framework that can support automated catalog enrichment.

Where it applies

The same method applies wherever labels are hierarchical, overlapping or semantically ambiguous: product categorization, media tagging, document classification, visual concept detection and content recommendations.

Delivered by Peak AI’s engineers, including in roles held before Peak AI. The organization is described rather than named, and sensitive details are left out.

Have a POC that needs to become a product?

Tell us what you are shipping. You will talk to the engineers who would build it.