Descriptor-Injected Cross-Modal Learning: A Systematic Exploration of Audio-MIDI Alignment via Spectral and Melodic Features
Organizations: Asociación Civil AlterMundi, Córdoba, Argentina
Abstract
Cross-modal retrieval between audio recordings and symbolic music representations (MIDI) remains challenging because continuous waveforms and discrete event sequences encode different aspects of the same performance. We study descriptor injection, the augmentation of modality-specific encoders with hand-crafted domain features, as a bridge across this gap. In a three-phase campaign covering 13 descriptor-mechanism combinations, 6 architectural families, and 3 training schedules, the best configuration reaches a mean S of 84.0 percent across five independent seeds, improving the descriptor-free baseline by 8.8 percentage points. Causal ablation shows that the audio descriptor A4, based on octave-band energy dynamics, drives the gain in the top dual models, while the MIDI descriptor D4 has only a weak inference-time effect despite improving training dynamics. We also introduce reverse cross-attention, where descriptor tokens query encoder features, reducing attention operations relative to the standard formulation while remaining competitive. CKA analysis shows that descriptors substantially increase audio-MIDI transformer layer alignment, indicating representational convergence rather than simple feature concatenation. Perturbation analysis identifies high-frequency octave bands as the dominant discriminative signal. All experiments use MAESTRO v3.0.0 with an evaluation protocol controlling for composer and piece similarity.
Figures & tables
| Band | Frequency range | STFT bins | Width (Hz) | Musical content |
|---|---|---|---|---|
| 0 | 47 – 94 Hz | 4 – 8 | 47 | Bass fundamentals |
| 1 | 94 – 188 Hz | 8 – 16 | 94 | Bass harmonics |
| 2 | 188 – 375 Hz | 16 – 32 | 187 | Low-mid register |
| 3 | 375 – 750 Hz | 32 – 64 | 375 | Mid register |
| 4 | 750 – 1500 Hz | 64 – 128 | 750 | Upper-mid/presence |
| 5 | 1500 – 3000 Hz | 128 – 256 | 1500 | Presence/harmonics |
| Rank | Arm | Descriptor | Mechanism | S (%) | Hard neg (%) | (pp) |
| 1 | d4a4 | D4+A4 | Dual concat | 69.8 | 91.6 | |
| 2 | A4r | A4 | Reverse cross-att | 68.6 | 91.6 | |
| 3 | D4r | D4 | Reverse cross-att | 64.2 | 93.2 | |
| 4 | D4 | D4 | Concat | 63.6 | 91.2 | |
| 4 | A4 | A4 | Concat | 63.6 | 92.4 | |
| 6 | A4x | A4 | Cross-attention | 62.6 | 92.4 |
| Rank | Arm | Family | S (%) | vs D0 (pp) |
|---|---|---|---|---|
| 1 | t3-wt | Third Tower | 67.6 | |
| 2 | t3-tri | Third Tower | 65.0 | |
| 3 | moe-a4-v2 | MoE | 60.2 | |
| 4 | film-dual | FiLM | 59.4 | |
| 4 | moe-a4-v4 | MoE | 59.4 | |
| 6 | film-a4 | FiLM | 59.2 |
| Arm | Schedule | Epochs | Best S (%) | Best epoch | Params (M) | (pp) |
|---|---|---|---|---|---|---|
| d4a4 | Cosine-60 | 60 | 83.8 | 50 | 75.5 | |
| a4r | Cosine-30 | 30 | 82.0 | 29 | 78.6 | |
| t3-wt | Trapez-50 | 50 | 81.2 | 50 | — | |
| a4r | Cosine-tail | 60 | 80.6 | 60 | 78.6 | |
| d4-a4r | Cosine-30 | 30 | 79.8 | 30 | 78.9 | |
| D0 | Cosine-tail | 60 | 73.4 | 50 | 74.2 | — |
| Arm | S (%) | R@1 a→m | R@10 a→m | MRR a→m | R@10 m→a | MRR m→a | Hard neg (%) |
|---|---|---|---|---|---|---|---|
| D0 | 73.4 | 22.2 | 74.8 | 0.380 | 73.4 | 0.372 | 98.4 |
| d4a4 | 83.8 | 28.0 | 84.4 | 0.458 | 83.8 | 0.442 | 99.0 |
| a4r | 82.0 | 27.6 | 82.6 | 0.438 | 82.0 | 0.424 | 98.8 |
| d4-a4r | 79.8 | 25.2 | 81.4 | 0.426 | 79.8 | 0.420 | 99.4 |
| Ablation mode | d4a4 ( ) | a4r ( ) | d4-a4r ( ) | |
|---|---|---|---|---|
| Audio (A4) | Zero | |||
| Noise | ||||
| Shuffle | ||||
| MIDI (D4) | Zero | — | ||
| Noise | — | |||
| Shuffle | — |
| Arm | Ret. | |||||||
|---|---|---|---|---|---|---|---|---|
| D0 | 13.8 | 26.6 | 65.6 | 73.4 | 64.0 | 27.4 | 13.4 | 37% |
| d4a4 | 24.2 | 41.4 | 75.2 | 83.8 | 75.6 | 44.6 | 25.6 | 51% |
| a4r | 27.0 | 46.2 | 76.6 | 82.0 | 76.8 | 51.0 | 27.6 | 59% |
| d4-a4r | 27.0 | 45.0 | 73.2 | 79.8 | 75.2 | 49.2 | 27.2 | 59% |
| Arm | CKA mean | vs D0 | RSA mean |
|---|---|---|---|
| D0 | 0.435 | — | 0.446 |
| d4a4 | 0.659 | 0.646 | |
| a4r | 0.766 | 0.721 | |
| d4-a4r | 0.794 | 0.761 |
| Band | Hz range | d4a4 | a4r | d4-a4r | Zone |
|---|---|---|---|---|---|
| 0 | 47 – 94 | 0.073 | 0.238 | 0.303 | Low |
| 1 | 94 – 188 | 0.224 | 0.335 | 0.313 | Low |
| 2 | 188 – 375 | 0.375 | 0.381 | 0.514 | Mid |
| 3 | 375 – 750 | 0.546 | 0.423 | 0.526 | Mid |
| 4 | 750 – 1500 | 0.664 | 0.478 | 0.773 | High |
| 5 | 1500 – 3000 | 0.662 | 0.476 | 0.599 | High |
| Perturbation | Level | D0 | d4a4 | a4r | d4-a4r |
|---|---|---|---|---|---|
| Temporal shift | 8000 samp ( 0.33 s) | 68.2 | 76.6 | 75.0 | 76.2 |
| Velocity scale | 0.5 | 5.2 | 8.8 | 6.8 | 6.4 |
| Velocity scale | 1.5 | 18.4 | 12.8 | 12.4 | 11.6 |
| Octave transp. | 12 st | 12.0 | 16.0 | 17.4 | 17.0 |
| Octave transp. | 12 st | 10.0 | 13.8 | 16.0 | 15.8 |
| Type | Probe | D0 | d4a4 | a4r | d4-a4r |
|---|---|---|---|---|---|
| Cross | Audio pitch histogram | 0.181 | 0.174 | 0.167 | 0.186 |
| Audio interval hist. | 0.094 | 0.112 | 0.095 | 0.115 | |
| MIDI chroma | 0.330 | 0.245 | 0.255 | 0.251 | |
| MIDI centroid | 0.616 | 0.637 | 0.662 | 0.652 | |
| Self | Audio chroma | 0.310 | 0.235 | 0.249 | 0.231 |
| MIDI pitch histogram | 0.239 | 0.236 | 0.233 | 0.233 |
| Arm | Mean S (%) | SD (pp) | Range | vs D0 (pp) |
|---|---|---|---|---|
| d4a4 | 84.0 | 2.7 | 81.4–87.6 | +8.8 |
| d4-a4r | 81.2 | 2.5 | 78.4–83.4 | +6.0 |
| a4r | 80.7 | 1.9 | 79.4–84.0 | +5.5 |
| D0 | 75.2 | 2.3 | 71.8–77.4 | — |
Appendix figures & tables11 assets
Supplementary material from the paper’s appendix.
Appendix
| Arm | Descriptor | Domain | Dims | Mechanism | S (%) | Description |
|---|---|---|---|---|---|---|
| D0 | — | — | — | — | 60.2 | VICReg baseline (no descriptors) |
| D4 | D4 | MIDI | 4 | C | 63.6 | Local pitch intervals |
| A4 | A4 | Audio | 8 | C | 63.6 | Octave-band energy dynamics |
| A7 | A7 | Audio | 12 | C | 58.8 | Rational attractor (just intonation) |
| A8 | A8 | Audio | 12 | C | 57.4 | Onset-weighted chroma |
| A9 | A9 | Audio | 12 | C | 58.8 | IDF-weighted rational attractor |
| Index | Ratio | log 2 | Cents | Musical interval |
|---|---|---|---|---|
| 0 | 1/1 | 0.000 | 0 | Unison / Octave |
| 1 | 16/15 | 0.093 | 112 | Minor second |
| 2 | 9/8 | 0.170 | 204 | Major second |
| 3 | 6/5 | 0.263 | 316 | Minor third |
| 4 | 5/4 | 0.322 | 386 | Major third |
| 5 | 4/3 | 0.415 | 498 | Perfect fourth |
| Layer | In ch. | Out ch. | Kernel | Stride | Padding | Norm | Activation |
|---|---|---|---|---|---|---|---|
| 1 | 1 | 512 | 10 | 5 | 0 | GN(32) | GELU |
| 2 | 512 | 512 | 3 | 2 | 1 | GN(32) | GELU |
| 3 | 512 | 512 | 3 | 2 | 1 | GN(32) | GELU |
| 4 | 512 | 1024 | 3 | 2 | 1 | GN(32) | GELU |
| Hyperparameter | Value |
|---|---|
| Number of layers | 4 |
| Model dimension ( ) | 1024 |
| Number of heads | 8 |
| Head dimension ( ) | 128 |
| Feed-forward dimension ( ) | 4096 |
| Activation | GELU |
| Feature | Vocabulary | Embedding dim | Fraction of |
|---|---|---|---|
| Pitch | 128 | 256 | |
| Velocity | 128 | 128 | |
| Duration | 32 | 128 | |
| Concatenated | 512 | ||
| + Linear proj. + LayerNorm | 512 | ||
| Hyperparameter | Value |
|---|---|
| Number of layers | 4 |
| Model dimension ( ) | 512 |
| Number of heads | 8 |
| Head dimension ( ) | 64 |
| Feed-forward dimension ( ) | 2048 |
| Activation | GELU |
| Component | D0 | d4a4 | a4r | d4-a4r |
|---|---|---|---|---|
| Audio CNN | 3.2M | 3.2M | 3.2M | 3.2M |
| Audio Transformer | 54.5M | 54.5M | 54.5M | 54.5M |
| Audio pos. embeddings | 6.1M | 6.1M | 6.1M | 6.1M |
| MIDI embeddings | 1.2M | 1.2M | 1.2M | 1.2M |
| MIDI Transformer | 10.5M | 10.5M | 10.5M | 10.5M |
| Audio projection | 0.8M | 0.8M | 0.8M | 0.8M |
| Parameter | D0 | d4a4 | a4r | d4-a4r |
|---|---|---|---|---|
| Optimizer | AdamW ( , ) | |||
| Weight decay | 0.01 | |||
| Batch size | 16 | |||
| Total epochs | 60 | 60 | 30 | 30 |
| Best epoch | 50 | 50 | 29 | 30 |
| Warmup steps | 500 | |||
Cross-Modal Retrieval
Cross-modal retrieval matches queries and items across different data types, such as text, images, video, audio, and sensor signals.
See all 184 papers