Stack-and-Delay: A New Codebook Pattern for Music Generation

Gaël Le Lan, Varun Nagaraja, Ernie Chang, David Kant, Zhaoheng Ni, Yangyang Shi, Forrest N. Iandola, Vikas Chandra

TL;DR

This paper introduces "stack-delay," a novel decoding strategy for text-to-music generation that significantly speeds up audio generation while maintaining high quality. By cleverly interleaving and stacking audio tokens, it achieves generation speeds comparable to less-quality methods, effectively bridging the gap between speed and fidelity in AI music creation.

What Problem Does This Paper Address?

Generating high-quality music from text prompts using Transformer-based language models is a computationally intensive task. These models represent audio as sequences of discrete tokens, often organized in hierarchical "stacks." The most effective method for decoding these tokens into audio, known as the "flat" pattern, yields excellent quality but is prohibitively slow due to the sheer number of decoding steps required. Existing faster methods, like the "delay" pattern, sacrifice audio quality. This creates a trade-off: high quality means slow generation, and fast generation means lower quality. The authors aim to resolve this by developing a decoding strategy that offers both high quality and fast inference, making AI music generation more practical for real-time applications.

Methods

The core innovation is the "stack-delay" decoding pattern. This approach builds upon the "stack" pattern, which retains more information than the "delay" pattern but is also slower. The "stack-delay" pattern introduces two key modifications:

  1. Parallel Streams & Stacked Tokens: Instead of processing tokens sequentially, it uses multiple parallel decoding streams. Crucially, it stacks tokens from the same time step across different hierarchical levels, rather than stacking tokens from different time steps as in the "flat" pattern. This allows for efficient parallel processing.
  2. Time Step Permutation: The decoding schedule is further optimized by interleaving the order in which time steps are decoded. This "time steps interleaving" ensures that adjacent time steps are not decoded until they have sufficient context from other, non-adjacent time steps. This is formalized by a decoding schedule function $G(i,t) = t + (t \mod (k+1)) \times (k-1) + i$, where $k$ controls the degree of permutation.

These techniques aim to reduce the inference time by allowing more parallel computation and optimizing context utilization, while retaining the quality benefits of stacking tokens.

Datasets

The models were trained on 20,000 hours of licensed music, including an internal dataset, Shutterstock, and Pond5 music collections. These recordings are at 32 kHz and come with textual descriptions. Evaluation was performed on an in-domain split (different from prior work) and the MusicCaps dataset.

Key Insights and Ideas

  • Bridging the Speed-Quality Chasm: The "stack-delay" pattern successfully demonstrates that it's possible to achieve near "flat" pattern quality with "delay" pattern speed. This is a significant step towards making high-fidelity AI music generation practical.
  • The Power of Permutation: The ablation study highlights that time step permutation is not just a minor tweak but a crucial component for the "stack-delay" pattern's success. Without it, the performance gains are marginal, suggesting that the "delay" pattern's weakness lies in its sequential decoding of adjacent time steps without enough context.
  • Stacking vs. Flattening: The paper reinforces that for the absolute highest quality, flattening tokens is superior, but at a steep computational cost. The "stack" and "stack-delay" patterns offer a more balanced approach.

Key Results

  • Efficiency: The "stack-delay" pattern achieves a Real-Time Factor (RTF) of 1.13 on A100 GPUs, comparable to the "delay" baseline (1.07) and significantly faster than the "flat" pattern (4.69).
  • Quality:
    • Objectively, "stack-delay" achieved an in-domain Frechet Audio Distance (FAD) of 0.48, which is only slightly worse than the "stack" pattern (0.38) and much better than the "delay" pattern (0.69).
  • Subjectively, human evaluators preferred samples generated by "stack-delay" over "delay" 51.3% of the time, indicating a noticeable quality improvement.
  • Ablation Study: Permuting time steps in the "stack-delay" pattern led to substantial improvements in FAD, with higher permutation factors (larger $k$ in the equation) generally yielding better results. Applying these permuted schedules to the "delay" pattern alone did not yield similar benefits, emphasizing the synergy with the "stack-delay" pattern.

Limitations and Future Work

  • Subjective Evaluation Scale: The authors acknowledge that the subjective evaluation, while showing a preference for "stack-delay," had a small margin of difference, which is expected given the scale of the experiment.
  • Future Directions: The paper suggests that their findings can inform the design of future non-autoregressive decoding strategies. The success of time step permutation also points towards further research into optimized decoding schedules for hierarchical token structures.

Summary updated

BibTeX
@inproceedings{lan2024stack,
  author = {Gaël Le Lan and Varun Nagaraja and Ernie Chang and David Kant and Zhaoheng Ni and Yangyang Shi and Forrest N. Iandola and Vikas Chandra},
  title = {{Stack-and-Delay: A New Codebook Pattern for Music Generation}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
  doi = {10.1109/icassp48485.2024.10447392},
}
Figure