Understanding genre similarity in Brazilian music through Vision Transformer embeddings - Guimarães, Victória; Kienen, João Gustavo; de Freitas, Rosiane (Anais do Simpósio Brasileiro de Computação Musical; 2025: Anais do XIX Simpósio Brasileiro de Computação MusicalDO - 10.5753/sbcm.2025.13212, 2025)
This work investigates how musical genre similarity is represented in the latent space learned by a Vision Transformer (ViT) model fine-tuned on Brazilian regional music. We present BYRM, a curated dataset that contains 1,082 tracks across ten culturally diverse genres. Our analysis focuses on the best-performing configuration identified in previous experiments, which uses 10-second segments extracted from the 90 to 120 second excerpt of each track. Mel-spectrograms were used as input to train the ViT, from which time-local embeddings were extracted. Dimensionality reduction techniques (PCA, t-SNE, and UMAP) were applied to visualize the latent space, and cosine similarity was computed to assess inter-genre proximity. The model achieved 81.94% accuracy and 81.84% F1-score under the best configuration, demonstrating its ability to learn discriminative representations. The similarity analysis shows that the ViT effectively captures stylistic relationships between related genres, such as samba and pagode or vaneira and xote ga´ucho, while maintaining separation from more distinct styles like Brazilian rock. These findings provide new insights into genre similarity modeling using transformer-based embeddings in a culturally rich and musically complex context.