[论文解读] An Improved Relative Self-Attention Mechanism for Transformer with Application to Music Generation
本文提出了一种改进的相对自注意力机制,将内存复杂度从 $O(l^2d)$ 降低至 $O(ld)$,从而实现了在更长音乐序列上的高效训练。该方法增强了音乐生成中的长期结构建模能力,即使在训练序列长度之外,也能生成更高品质的样本和连贯的延续。
Music relies heavily on self-reference to build structure and meaning. We explore the Transformer architecture (Vaswani et al., 2017) as a generative model for music, as self-attention has shown compelling results on tasks that require long-term structure such as Wikipedia summary generation (Liu et al, 2018). However, timing information is critical for polyphonic music, and Transformer does not explicitly model absolute or relative timing in its structure. To address this challenge, Shaw et al. (2018) introduced relative position representations to self-attention to improve machine translation. However, the formulation was not scalable to longer sequences. We propose an improved formulation which reduces the memory requirements of the relative position computation from $O(l^2d)$ to $O(ld)$, making it possible to train much longer sequences and achieve faster convergence. In experiments on symbolic music we find that relative self-attention substantially improves sample quality for unconditioned generation and is able to generate sequences of lengths longer than those from the training set. When primed with an initial sequence, the model generates continuations that develop the prime coherently and exhibit long-term structure. Relative self-attention can be instrumental in capturing richer relationships within a musical piece.
研究动机与目标
- 为了解决标准 Transformer 在音乐生成中缺乏显式时间建模的问题。
- 通过自注意力机制改进符号音乐生成中的长期结构建模。
- 通过降低内存复杂度,将相对位置表示扩展到更长的序列。
- 实现具有长距离依赖关系的高质量、连贯的无条件和条件音乐生成。
提出的方法
- 提出了一种重新设计的相对自注意力机制,将内存需求从 $O(l^2d)$ 降低至 $O(ld)$。
- 适配了 Shaw 等人(2018)最初提出的相对位置表示,以提升可扩展性。
- 保持了在长序列中建模标记之间相对位置关系的能力。
- 将改进的机制应用于基于 Transformer 的符号音乐生成模型中。
- 利用该机制捕捉对音乐结构和连贯性至关重要的长距离依赖关系。
实验结果
研究问题
- RQ1相对自注意力能否在不产生高昂内存成本的前提下,实现对更长音乐序列的可扩展性?
- RQ2改进的相对自注意力机制是否能提升无条件音乐生成中的样本质量?
- RQ3当以初始序列作为提示时,模型能否生成连贯的音乐延续?
- RQ4该机制在多大程度上能够捕捉音乐中的长期结构关系?
主要发现
- 改进的相对自注意力机制将内存使用量从 $O(l^2d)$ 降低至 $O(ld)$,从而实现了对显著更长序列的训练。
- 与标准自注意力相比,该模型在无条件生成中生成了更高品质的音乐样本。
- 在以初始序列为条件时,该模型能够生成连贯的音乐延续,保持了结构连贯性。
- 该模型成功生成了超过训练集长度的序列,展示了强大的长距离建模能力。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。