Visualizing Music Transformer

There are three possible visualizations currently available: relative attention visualizations for either a sample generated by model trained on Bach chorale or piano performances, as well as a ``duo'' mode that shows an analysis of relative vs regular attention on an existing piece.

Bach visualizer
Piano performance visualizer
Analyze relative vs. regular attention

Paper figures

All samples are generated by Transformer with relative attention, trained on either J.S. Bach Chorales or Piano-e-Competition, except Fig.1D which shows an analysis of an existing Bach chorale.

Fig. 1a: Multiple head visualization of a Bach chorale sample.
Fig. 1b: Visualizing the first layer of the Transformer model for a Bach chorale sample.
Fig. 1c: Visualizing the last layer of the Transformer model for a Bach chorale sample.
Fig. 1d: Analysis of the relative and regular attention models for an existing Bach chorale piece. Note: this loads a large file, and it takes a bit to load
Fig. 3aVisualizing motifs in a piano performance sample. Note: this loads a large file, and it takes a bit to load.
Fig. 3bVisualizing motifs in a piano performance sample. Note: this loads a large file, and it takes a bit to load.

Paper videos

Animated multiple head visualization of a Bach chorale:

Animated multiple head visualization of a piano performance:

Animated comparison of relative vs. regular attention on an existing Bach piece: