TL;DR
Emo-CLIM is a novel framework that bridges the gap between visual art and music by learning a shared, emotion-aligned embedding space. By leveraging supervised contrastive learning, it enables high-quality cross-modal retrieval (finding music that matches the mood of an image, and vice versa) while retaining general musical semantics for downstream tasks.
What Problem Does This Paper Address?
Traditional music search engines rely heavily on text metadata like artist names, song titles, or coarse genre tags. While some modern systems support cross-modal queries (like video-to-music retrieval), they typically focus on matching general semantics (e.g., matching a video of a car to fast-paced music). However, human pairing of music and imagery is deeply rooted in affect—the emotional resonance shared between modalities.
Mapping general semantic classes across entirely different modalities is notoriously difficult; an object class like "chair" has no direct musical equivalent. Emotions, however, serve as a universal language shared across images, text, speech, and music. While prior work has explored text-to-music and speech-to-music emotional alignment, retrieving emotionally relevant music directly from image queries remains largely unaddressed. Emo-CLIM tackles this challenge, opening up new possibilities for intuitive multimedia content creation and mood-based recommendation systems.
Methods
The authors introduce Emo-CLIM (Emotion-Aligned Contrastive Learning Between Images and Music), which utilizes a dual-branch architecture to project images and audio into a shared 128-dimensional embedding space.
Key components of the framework include:
- Feature Extraction: Images are processed using a frozen Vision Transformer from CLIP. For audio, the authors experiment with both music-specific models (Short-Chunk CNN, Harmonic CNN) and a general audio model (CLAP).
- Modality Alignment: Multi-Layer Perceptrons (MLPs) project the extracted features into the joint embedding space.
- Modality-Symmetric Supervised Contrastive Loss: Unlike prior emotional alignment works that rely on triplet loss, Emo-CLIM adapts the Supervised Contrastive (SupCon) loss. The total objective function is a balanced combination of four losses: two cross-modal losses (Image $\rightarrow$ Audio, Audio $\rightarrow$ Image) and two intra-modal losses (Image $\rightarrow$ Image, Audio $\rightarrow$ Audio). This symmetry ensures the embedding space doesn't favor one modality over the other, allowing for bidirectional retrieval.
Datasets
The framework was trained and evaluated using two primary datasets:
- DeepEmotion: An image dataset containing 21,829 images annotated with one of 8 emotion labels.
- AudioSet (Music Mood Subset): A collection of 13,713 10-second music clips annotated with one of 7 mood labels.
Because the emotion taxonomies differed between the datasets, the authors manually mapped equivalent labels (e.g., mapping "excitement" in images to "exciting" in music). Ambiguous categories without clear cross-modal equivalents (such as "awe" and "disgust" for images, and "tender" for music) were removed.
For downstream evaluation of general music semantics, the authors used the MagnaTagATune dataset, which consists of 25,000 music clips annotated with various binary semantic tags (genres, instruments, moods).
Key Insights and Ideas
- The Power of Batch-Wide Comparisons: Moving from a triplet loss to a supervised contrastive loss allows the model to compare all items in a training batch simultaneously. This significantly improves the robustness of the learned representations.
- Context Length Matters in Audio: Audio encoders with longer receptive fields performed noticeably better. CLAP (10-second inputs) and Harmonic CNN (5-second inputs) outperformed Short-Chunk CNN (3.7-second inputs), suggesting that capturing longer-term musical context is crucial for accurately modeling emotion.
- Affective Alignment Preserves Semantics: Surprisingly, training a model purely to align emotions does not destroy its understanding of general musical attributes. The music embeddings retained enough semantic information to perform well on downstream music tagging tasks (like identifying instruments or genres) without explicit training on those concepts.
Key Results
The authors evaluated Emo-CLIM on cross-modal retrieval using Precision@5 (P@5) and Mean Reciprocal Rank (MRR).
- Cross-Modal Retrieval: When using a frozen CLAP audio encoder, Emo-CLIM achieved a 68.15% P@5 for Image $\rightarrow$ Music retrieval. For Music $\rightarrow$ Image retrieval, an unfrozen Harmonic CNN yielded the best performance at 67.58% P@5.
- Comparison with Prior Work: Emo-CLIM substantially outperformed existing text-to-music emotion retrieval baselines and performed competitively with speech-to-music frameworks, despite the fact that aligning images and music is fundamentally more challenging than aligning two audio modalities.
- Downstream Music Tagging: On the MagnaTagATune benchmark, Emo-CLIM variants achieved up to 89.94% ROC-AUC, performing on par with models trained via standard self-supervised learning (SSL) methods.
Limitations and Future Work
The primary limitation of the current work is its reliance on a hard, manual mapping of categorical emotion labels. This forced the authors to discard data from categories that didn't have an exact match between datasets.
To address this, the authors propose moving away from discrete emotion classes in future iterations. Instead, they plan to incorporate continuous emotion models (such as the Valence-Arousal space) directly into the contrastive loss function, allowing the network to understand that "contentment" and "happiness" are closer in emotional space than "contentment" and "anger." Additionally, exploring data augmentation strategies within the training pipeline remains an open avenue for improvement.
Summary updated