Imagine you’re trying to digitize a stack of old sheet music. You don’t just want a MIDI file that beeps out the notes; you want an editable file that looks exactly like the original—complete with the lyrics, the specific way the staves are grouped, and exactly where the line breaks occur.
This is the goal of Optical Music Recognition (OMR), but it’s surprisingly hard. Most AI models today either give you a "lite" version of the music (missing the layout) or get completely overwhelmed by the sheer verbosity of professional music formats. This paper introduces Cecilia, a clever "shorthand" for music notation that allows AI to see the music and the page layout without losing its mind.
TL;DR
Cecilia is a new, compact way to represent musical scores that includes layout and lyrics while being 27 times shorter than standard MusicXML. By using this representation, the authors built an OMR model that outperforms previous state-of-the-art systems, especially on real-world scans of complex scores.
What Problem Does This Paper Address?
The "gold standard" for digital sheet music is MusicXML. It’s powerful, but it’s incredibly "chatty." A single page of music can turn into hundreds of thousands of tokens of XML code. For an AI model, trying to predict that much text is like trying to write a novel while being forced to repeat the table of contents on every single page—it’s inefficient and prone to errors.
Because of this, many researchers use simpler formats like ABC notation. ABC is great for notes, but it usually ignores the "engraving" details: where does the system break? How wide is this measure? Where do the lyrics attach? Without these, you can’t reconstruct a truly faithful, editable score.
The authors tackle this "representation gap" by creating a format that is as compact as ABC but as detailed as MusicXML.
Methods
The team introduced two main innovations:
- The Cecilia Representation: Think of this as a "compressed" version of MusicXML. It uses fixed codes for common musical structures and layout instructions (like system breaks and measure widths). It keeps lyrics tied directly to their notes. As shown in Figure 1, Cecilia achieves a sequence length nearly as short as ABC while retaining all the rich metadata of MusicXML.
- Cecilia-OMR Architecture: To read the music, they built a model with a Vision Transformer (ViT) encoder and an autoregressive decoder. Crucially, they use a "segment-count head" to predict how many measures are on a page. The model then decodes the music measure-by-measure (segments), reusing the same visual memory for each part. This "divide and conquer" approach prevents the model from getting lost in long sequences.
Datasets
The model was tested on several rigorous benchmarks:
- OpenScore String Quartets & Lieder: Both "Rendered" (clean digital images) and "Camera" (scans of physical pages).
- Lieder with Lyrics: A new extension to the OpenScore set to specifically test how well the model handles sung text.
- CVC-MUSCIMA: A dataset of handwritten music. The authors contributed new, expert-transcribed MusicXML references for this set to help future researchers.
Key Insights and Ideas
- The 27x Factor: The most striking "aha" moment is the efficiency. Cecilia is 27.73 times shorter than raw MusicXML. This isn't just a storage win; it’s a performance win. Shorter sequences mean the model's "attention" isn't spread too thin.
- Layout is Content: The authors argue that layout isn't just aesthetic—it's part of the musical document. By including
new-systemandnew-pagetags, the model learns to understand the physical organization of the score. - Reinforcement Learning for Music: They used Group-Relative Policy Optimization (GRPO) to fine-tune the model. Instead of just guessing the next token, the model is rewarded for producing valid, compilable MusicXML that matches the reference.
Key Results
Cecilia-OMR set a new bar for the field:
- Better Accuracy: On the "Camera" (scanned) String Quartets, it achieved a Normalized Edit Distance (OMR-NED) of 0.2232, significantly beating the previous best of 0.2998 (Legato 2).
- Visual Fidelity: As seen in Figure 3, Cecilia-OMR is the only model that correctly captures the system breaks and layout of the original input, whereas other models (like Legato 1 or even GPT-4 based approaches) often fail to group measures correctly.
Limitations and Future Work
While Cecilia-OMR is a leap forward, it’s not perfect:
- Handwriting is still hard: On the handwritten CVC-MUSCIMA dataset, a direct-XML approach using a massive proprietary model (GPT-6 Astra) still held a slight lead.
- Geometric Precision: While the model gets the "logical" layout right (which measure goes on which line), it doesn't yet perfectly replicate the exact pixel-perfect spacing of every symbol.
- Future Directions: The authors suggest moving toward even more faithful page geometry and exploring better ways to align lyrics in highly polyphonic music.
Summary updated