Abstract
In the heart of "rhythm games" - games where players must perform actions in sync with a piece of music - are "charts", the directives to be given to players. We newly formulate chart generation as a sequence generation task and train a Transformer using a large dataset. We also introduce tempo-informed preprocessing and training procedures, some of which are suggested to be integral for a successful training. Our model is found to outperform the baselines on a large dataset, and is also found to benefit from pretraining and finetuning.
Introduction
In rhythm games like osu!mania or Dance Dance Revolution, players hit notes (charts) in time with music. Automating the creation of these charts is difficult because the placement of notes depends on both the complex audio features of the song and the desired difficulty level.
Previous approaches treated this as a binary classification problem: for every "frame" of audio, the model asks, "Is there a note here?" This leads to a massive class imbalance. In most songs—especially at lower difficulties—notes are rare, meaning the model sees "no note" 99% of the time. This sparsity makes it very hard for models to learn meaningful patterns. Furthermore, traditional models often struggle with varying tempos and precise rhythmic placement.
Methods
This paper reframes rhythm-game "chart" generation as a sequence-to-sequence task rather than a binary classification problem. The authors introduce a few key innovations to move beyond simple classification:
- Sequence-to-Sequence Formulation: Instead of classifying frames, the model generates a sequence of tokens. Each note is represented by two tokens: a time token (where in the beat it occurs) and an action token (what the player does, e.g., tap, hold). This naturally ignores the "empty space" between notes.
- Beat-Aligned Preprocessing: Rather than using fixed time windows (e.g., 10ms frames), the authors normalize the audio spectrograms based on the song's beats. They use a hop size corresponding to 1/48th of a beat. This makes the input "tempo-invariant," allowing the model to learn rhythmic patterns regardless of how fast or slow the song is.
- Transformer Architecture: They employ an encoder-decoder Transformer. The encoder processes four beats of log-Mel spectrograms, while the decoder takes the difficulty level and previous chart tokens to predict the next two beats of notes autoregressively.
- Difficulty Embeddings: To control the density of the generated notes, the model incorporates a 48-dimensional embedding representing the target difficulty.
Datasets
The study utilizes three primary datasets:
- osu!mania 4k (New): The authors curated a large-scale dataset from the popular game osu!. It contains 6,781 charts across 2,004 songs. This dataset is approximately 10x larger than previous benchmarks, providing the data volume necessary to train a Transformer effectively.
- Fraxtil: A standard benchmark dataset used in previous research.
- ITG (In The Groove): Another common benchmark based on a four-panel dance game.
Key Insights and Ideas
- Beat Alignment is Essential: The most striking finding was that aligning the audio to the beat (rather than absolute time) is critical. In ablation studies, the beat-aligned model significantly outperformed the unaligned version, especially for complex rhythms like 12th or 24th notes.
- The Power of Scale: While Transformers often underperform on small datasets, the 10x increase in data provided by the osu! dataset allowed the Transformer to finally "trump inductive bias," outperforming the CNN and LSTM baselines that were previously the gold standard.
- Transfer Learning Works: The authors found that "pretraining" the model on the large osu! dataset and then "fine-tuning" it on the smaller Fraxtil/ITG datasets yielded the best performance, suggesting the model learns a general "language" of rhythm that translates across different games.
Key Results
The model was evaluated using the Micro-F1 score, which measures the accuracy of note placement. The Transformer achieved state-of-the-art results across multiple benchmarks.
- On the new osu! dataset: The Transformer achieved an F1 score of 84.6%, beating the previous CNN (83.0%) and C-LSTM (83.9%) baselines.
- Cross-Dataset Performance: When pretrained on osu! and fine-tuned, the model hit 78.9% on Fraxtil and 74.3% on ITG, setting new state-of-the-art marks for both.
- Rhythmic Precision: The model is particularly strong on standard rhythms. For 8th notes, it achieved an 87.9% F1 score, compared to only 70.0% for a model that wasn't beat-aligned.
Limitations and Future Work
Despite its success, the model has a notable weakness: it struggles with very low-difficulty charts in the Fraxtil and ITG datasets. The authors hypothesize this is because the osu! training data doesn't contain enough extremely sparse examples, causing the model to over-generate notes when it should be quiet. Future work may involve training on a more diverse set of games to better handle these edge cases and exploring even larger models as more data becomes available.
Summary updated