Nested Music Transformer: Sequentially Decoding Compound Tokens in Symbolic Music and Audio Generation
Jiwoo Ryu, Hao-Wen Dong, Jongmin Jung, Dasaem Jeong
TL;DR
The paper tackles long sequence challenges in symbolic music and discrete audio token generation by introducing the Nested Music Transformer (NMT), a memory-efficient autoregressive framework that decodes compound tokens via a main decoder and a sub-decoder with cross-attention. It couples a Note-based (NB) compound-token encoding with a Compound Shift strategy to better model interdependencies among sub-tokens, enhanced by an Embedding Enricher that contextualizes sub-token embeddings. Empirical results show that NMT, especially with cross-attention and Embedding Enricher, achieves competitive or superior negative log-likelihood on symbolic music across encodings and improves objective metrics for discrete audio tokens, with subjective listening tests corroborating comparable perceptual quality to strong baselines. The approach reduces memory usage and training time while remaining effective for both symbolic and audio-token generation, and is extended to EnCodec-ed MAESTRO for discrete audio token challenges, demonstrating practical impact for scalable music generation systems.
Abstract
Representing symbolic music with compound tokens, where each token consists of several different sub-tokens representing a distinct musical feature or attribute, offers the advantage of reducing sequence length. While previous research has validated the efficacy of compound tokens in music sequence modeling, predicting all sub-tokens simultaneously can lead to suboptimal results as it may not fully capture the interdependencies between them. We introduce the Nested Music Transformer (NMT), an architecture tailored for decoding compound tokens autoregressively, similar to processing flattened tokens, but with low memory usage. The NMT consists of two transformers: the main decoder that models a sequence of compound tokens and the sub-decoder for modeling sub-tokens of each compound token. The experiment results showed that applying the NMT to compound tokens can enhance the performance in terms of better perplexity in processing various symbolic music datasets and discrete audio tokens from the MAESTRO dataset.
