TL;DR
VMAS (Video-to-Music Alignment Scheme) is a novel generative framework that creates realistic background music directly from video inputs by learning from large-scale web videos. By combining a high-level semantic contrastive objective with a low-level video-beat alignment mechanism, VMAS ensures the generated music matches both the overarching genre of the video and its frame-by-frame motion dynamics.
What Problem Does This Paper Address?
Automatic background music generation for video is highly sought after by content creators, yet existing methods fall short in two major ways:
- Reliance on Symbolic Data: Most prior approaches train on symbolic music formats like MIDI. MIDI data is scarce, lacks genre diversity, and completely misses the subtle nuances of real audio, such as timbre variations, instrument expressiveness, and articulation.
- Poor Temporal Alignment: Existing waveform-based models often struggle to synchronize musical beats with visual events (e.g., a dancer's movement or a sudden scene cut), leading to music that feels disconnected from the video.
While some recent models leverage web videos to learn from raw audio, they are typically constrained by small-scale, narrow-domain datasets (like purely dancing videos) that generalize poorly to arbitrary video content. VMAS tackles these limitations by scaling up the training data and introducing a dual-scale alignment strategy.
Methods
The VMAS framework consists of three primary components: an efficient video encoder, an autoregressive music decoder, and a dual-scale semantic alignment scheme.
1. Efficient Video Encoder
To capture fine-grained temporal cues, the model needs to look at many frames. However, standard video backbones (like Hiera or CLIP) are computationally prohibitive when densely sampled. The authors modified the Hiera architecture by drastically increasing the spatial downsampling rates in the early layers while preserving the temporal dimension. This allows VMAS to process 96 frames per 10-second clip (compared to the standard 16) at a lower computational cost (GFLOPs) than the baseline models.
2. Autoregressive Music Decoder
Continuous audio is converted into discrete tokens using EnCodec, a neural audio codec. A standard Transformer decoder then predicts these audio tokens autoregressively, conditioned on the visual features extracted by the video encoder via cross-attention layers.
3. Semantic Video-Music Alignment
To ensure the music actually fits the video, VMAS uses two complementary objectives:
- Global Video-Music Contrastive Loss: This aligns high-level semantics. It projects the averaged video features and predicted music embeddings into a shared space, forcing the model to understand macro-level concepts like genre, mood, and style.
- Video-Beat Alignment Scheme: This handles low-level synchronization. The model uses an off-the-shelf onset detection algorithm to find audio beats and calculates optical flow magnitudes to identify "video beats" (moments of high motion or scene cuts). It then computes an overlapping mask to dynamically weight the cross-entropy loss, punishing the model if it misses a beat during a high-action visual event.
Datasets
The authors introduce DISCO-MV, a massive dataset curated specifically for video-to-background-music generation:
- Scale: 2.28 million video-music samples spanning roughly 47,000 hours (derived from DISCO-10M and YouTube-8M). This is 2000× larger than prior symbolic datasets like SymMV.
- Data Cleaning: Web videos are notoriously noisy. The authors automatically filtered out videos with low visual variance (intra-frame similarity > 0.7) to eliminate static "single-image" videos.
- Vocal Removal: They applied Demucs to strip out vocals from 95% of the tracks, ensuring the model explicitly learns to generate instrumental background accompaniments.
For evaluation, the authors benchmarked on both the DISCO-MV test set and the public MusicCaps dataset.
Key Insights and Ideas
- Compute Redistribution for Video: The modified video encoder proves that for audio-visual alignment, temporal resolution matters more than spatial resolution. Sacrificing spatial detail early on allows the model to ingest 6× more frames, capturing the exact moment an action occurs without blowing up the compute budget.
- The Power of Soft Loss Weighting: Instead of forcing hard constraints on beat generation, using the overlapping video-music beats as importance weights ($P_{av}$) in the loss function gently guides the autoregressive model to naturally "drop the beat" during high-motion frames.
- Dataset Quality > Dataset Size: The ablation studies showed that training on the raw, unfiltered DISCO-10M dataset yielded poor results. Cleaning the dataset by removing static videos and vocals was vital to unlocking high-fidelity generation.
Key Results
VMAS significantly outperforms existing symbolic and waveform-based baselines across multiple metrics, including Fréchet Audio Distance (FAD), KL Divergence (KL), and Music-Video Alignment (MV Align).
- Quantitative Performance (MusicCaps): VMAS achieved an FAD score of 4.07, outperforming the state-of-the-art waveform model V2Meow (4.62) and the popular VidMusicGen (6.91).
- Efficiency: The custom video encoder achieved these top-tier results using only 130.7 GFLOPs, compared to standard Hiera (140.2 GFLOPs) and CLIP (281.6 GFLOPs), despite processing far more frames.
- Human Evaluation: In blind A/B testing with 200 human subjects, VMAS was preferred over 70% of the time for overall music quality and over 67% of the time for visual synchronization against competing methods.
Limitations and Future Work
While VMAS excels at generating visually synchronized instrumental tracks, the authors note a few areas for expansion:
- User Control: Currently, the model is purely video-conditioned. The authors plan to explore a joint video-and-text-to-music architecture so users can guide the generation process using text prompts (e.g., "generate a lo-fi track for this skateboarding video").
- Broader Applications: The underlying alignment and encoding mechanisms could easily be extended to adjacent tasks like video-music style transfer, smart video editing, and cross-modal video-music retrieval.
Summary updated