All models

hFT-Transformer

A two-level Transformer that turns a spectrogram of piano audio into frame, onset, offset and velocity piano rolls.

Audio and speech · 373 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (13 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
5.5M
Operations
373
Framework
PyTorch
Recurrent
No
Published
ISMIR 2023
Cited by
10 (as of 28 October 2026)
Authors
Keisuke Toyama, Taketo Akama, Yukara Ikemiya and others
License
CC-BY-NC-SA-4.0
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m21624
Graph hash
4a317505645cab2c4b7820a630c96b6dcdfa274d79f4ee5cb6c3c20eda40d20b
Skeleton hash
911dc825a0564ca354adf6bd22e4c1830d7a228337a5d1b3a9a944dc151b07a1
Architecture hash
03c6626653e2d0f323af76e50c957b318d9f3b31c8e227ddd0526c2b8115f406
Diagram SHA-256
b07025d357f7f8a78b40fc37c745c8edbfccf7772042080754e531d72101d26e
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

hFT-Transformer transcribes piano audio: it turns N frames of a log-mel spectrogram into N frames of piano rolls for frame, onset, offset and velocity. The authors' starting point is that long-term dependencies along both the frequency axis and the time axis matter for finding the precise onset and offset of each note in polyphonic piano music, and that self-attention can capture them.

The model has two levels. The first applies a 1-D convolution along the time margin around each frame, then a Transformer encoder that works along the frequency axis only, independent of the time axis. A Transformer decoder with cross-attention then converts the frequency dimension from the number of frequency bins to the number of pitches, 88 for piano. The second level is another Transformer encoder, this time along the time axis.

Each level produces its own set of outputs. Both are used for computing losses during training, but only the second is used in inference. The paper sets 128 frames per chunk, 256 frequency bins and three layers with four heads in each Transformer, and it evaluates on the MAPS and MAESTRO v3.0.0 datasets, where it reports higher F1 scores than other piano transcription methods on all four of its metrics.

Key idea. hFT-Transformer applies Transformer encoders first along the frequency axis and then along the time axis, with a Transformer decoder between them that converts frequency bins into the 88 piano pitches.

  • hft-transformer
  • hierarchical frequency-time transformer
  • piano transcription
  • automatic music transcription
  • amt
  • maestro
  • maps
  • note onset offset velocity

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{toyama2023automaticpianotranscriptionhierarchical,
      title={Automatic Piano Transcription with Hierarchical Frequency-Time Transformer}, 
      author={Keisuke Toyama and Taketo Akama and Yukara Ikemiya and Yuhta Takida and Wei-Hsiang Liao and Yuki Mitsufuji},
      year={2023},
      eprint={2307.04305},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2307.04305}, 
}