Introduction
Generating multi-instrumental music presents a significant challenge for artificial intelligence compared to solo piano compositions. While piano music is polyphonic, it utilizes a single timbre. Multi-instrumental music requires a model to manage complex interdependencies between distinct voices—such as a bass line, melody, and percussion—while maintaining a coherent global structure.
A primary obstacle in this field is data scarcity. High-quality multi-instrumental datasets are often small, while larger collections like the Lakh MIDI dataset are heterogeneous, featuring varying instrument combinations that are difficult to use for training models designed for specific ensembles. This paper, presented at ISMIR 2019, introduces LakhNES, a method that leverages transfer learning to overcome these data limitations.
Methodology
Event-Based Representation
To treat music generation as a sequence modeling task similar to Natural Language Processing (NLP), the authors utilize an event-based representation. Instead of a traditional "piano roll" grid, music is encoded into a sequence of 631 discrete tokens. These tokens represent specific actions such as "Note On/Off" for individual instruments and "Time Shift" events to denote duration.
Transformer-XL Architecture
The model employs the Transformer-XL architecture, which improves upon standard Transformers by incorporating a recurrence mechanism. This allows the model to maintain a memory of musical themes and structures far beyond a fixed training window, which is essential for capturing the repetition and long-term form inherent in music.
Cross-Domain Pre-training
The core innovation of LakhNES is the use of cross-domain pre-training. The authors developed a heuristic to map the diverse instruments found in the massive Lakh MIDI Dataset (over 9,000 hours of music) into the four specific channels of the Nintendo Entertainment System (NES) sound chip: two pulse waves, one triangle wave, and one noise channel.
By pre-training on this "noisy" mapped data, the model learns general principles of harmony, counterpoint, and rhythm before being fine-tuned on the high-quality, structurally homogeneous NES-MDB dataset (46 hours of NES music).
Key Results
The effectiveness of the LakhNES approach was validated through both quantitative metrics and human evaluation:
- Quantitative Performance: LakhNES achieved a Test Perplexity (PPL) of 2.46, a significant improvement over a standard Transformer-XL (3.50) and an LSTM baseline (14.11). Pre-training alone contributed to a 10% improvement in predictive accuracy.
- Human Evaluation (Turing Test): In "real vs. fake" listening tests, human participants found LakhNES-generated music significantly more convincing. Participants were only 73% accurate at identifying generated tracks as "fake," compared to 91% for simpler models. Notably, in 26% of head-to-head trials, judges preferred LakhNES-generated music over actual human-composed tracks.
Conclusion and Future Work
LakhNES demonstrates that musical logic is transferable across domains. Even imperfect heuristic mappings can provide enough signal for a model to learn useful patterns from large-scale datasets. While the model occasionally struggles with long-term rhythmic consistency, it represents a major step forward in multi-instrumental generation and serves as a powerful tool for human-AI co-composition. Future research may explore beat-based representations and the integration of expressive performance attributes like volume and timbre dynamics.
Summary updated