arXiv:2601.16150cs.SDcs.AI2026-01

通过渐进解码策略,让模型更好理解旋律与和声的关联。

Pay (Cross) Attention to the Melody: Curriculum Masking for Single-Encoder Melodic Harmonization

  • 训练时先全掩码和声,逐步放开以增强旋律-和声交互
  • 在爵士标准曲上表现更优,尤其对陌生旋律适应性强
  • 适合想提升和声生成质量的研究者与音乐创作者

旋律和声化是为给定旋律生成伴奏的核心挑战。现有单编码器变压器方法将此任务视为掩码序列建模问题,但受离散扩散启发的训练流程常导致旋律与和声间注意力弱化,尤其在域外情境下表现受限。本文提出一种新训练课程FF(full-to-full),在训练初期保持所有和声标记掩码,随后逐步完整解码,以强化旋律与和声间的互动。我们在多个维度系统评估该方法:时间量化(四分音符与十六分音符)、小节级与拍号条件、旋律表示(全音高与音级)。模型在HookTheory数据集上训练,并在领域内与精选爵士标准曲集上评估,使用涵盖和弦进行结构、和声-旋律对齐、节奏一致性等指标。结果表明,所提FF课程在几乎所有指标上均优于基线,尤其在域外评估中显著提升对新颖旋律的适配能力。我们还发现四分音符量化、小节标记交织及音级表示在FF设置下更具优势。研究强调训练课程对有效旋律引导的重要性,证明全到全解码是一种鲁棒的单编码器和声生成策略。

原文摘要 · Abstract (English)

Melodic harmonization, the task of generating harmonic accompaniments for a given melody, remains a central challenge in computational music generation. Recent single encoder transformer approaches have framed harmonization as a masked sequence modeling problem, but existing training curricula inspired by discrete diffusion often result in weak (cross) attention between melody and harmony. This leads to limited exploitation of melodic cues, particularly in out-of-domain contexts. In this work, we introduce a training curriculum, FF (full-to-full), which keeps all harmony tokens masked for several training steps before progressively unmasking entire sequences during training to strengthen melody-harmony interactions. We systematically evaluate this approach against prior curricula across multiple experimental axes, including temporal quantization (quarter vs. sixteenth note), bar-level vs. time-signature conditioning, melody representation (full range vs. pitch class), and inference-time unmasking strategies. Models are trained on the HookTheory dataset and evaluated both in-domain and on a curated collection of jazz standards, using a comprehensive set of metrics that assess chord progression structure, harmony-melody alignment, and rhythmic coherence. Results demonstrate that the proposed FF curriculum consistently outperforms baselines in nearly all metrics, with particularly strong gains in out-of-domain evaluations where harmonic adaptability to novel melodic queues is crucial. We further find that quarter-note quantization, intertwining of bar tokens, and pitch-class melody representations are advantageous in the FF setting. Our findings highlight the importance of training curricula in enabling effective melody conditioning and suggest that full-to-full unmasking offers a robust strategy for single encoder harmonization.

和声生成序列建模训练策略

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。