How Far Should Tokenization Go? Predictive Effectiveness and Relational Losslessness
Organizations: Department of Electronic Engineering, Tsinghua University
Abstract
GPT-style models have achieved remarkable success with finite vocabularies of reusable tokens, making the token interface a central component of modern sequence modeling. Symbolic music appears naturally compatible with this paradigm: it consists of discrete note events and recurring structures such as chords, motifs, and phrases. However, when tokenization moves beyond language, the interface must be specified for each domain. Existing work offers many effective designs, but no unified criterion for deciding what tokenization should represent and how far it should go. Using predictive codelength as a common criterion, we formulate the Effectiveness--Losslessness Framework to define where tokenization should begin and where it should end. The Fact--Token Boundary marks where observation-determined structure should enter the token interface, through operations such as coordinate construction. Within this interface, the resulting carrier may be reversibly recoded without changing the represented facts. The Token--State Boundary marks where tokenization should stop: relations that depend on context should remain for model-state computation rather than being fixed in advance by the tokenizer. We validate the framework through controlled multi-seed symbolic-music experiments, with an independent-corpus replication of the temporal intervention. Making musical time explicit consistently reduces predictive code and also improves pitch and duration prediction, while tonal-frame canonicalization and pitch factorization provide further gains. Fixed circle-of-fifths pitch coordinates instead increase predictive code, suggesting that imposing a fixed pitch relation before context can burden prediction. Reversible BPE substantially shortens the carrier but increases predictive codelength in every seed, showing that carrier compaction alone does not guarantee predictive gain.
Figures & tables
Appendix figures & tables10 assets
Supplementary material from the paper’s appendix.
Appendix
| Item | Frozen value |
|---|---|
| Dataset | Pop1K7 constant-4/4 piano arrangements; source-song split before windowing |
| Songs / windows | 1,378 / 18,460 train; 184 / 2,011 validation; 185 / 1,979 sealed test |
| Carrier and target | A–I: exact Note/REST stream with a separate termination target and Type Time Pitch Duration factors; J/K: lossless Bar / Position /pitch-or- Rest /duration stream, with train-only reversible BPE in K |
| Accounting | numerator: all Note/REST factor bits, EOS overhead, and required per-sample side bits; denominator: declared Note/REST facts only |
| Backbone | 16 Transformer layers, width 64, 4 heads, FFN 128, dropout 0; J/K use the same causal backbone with a serialized-token input/output head |
| Parameters | 815,571 total; effective trainable counts are A 809,475; B 811,079; C 810,499; D/F/G 812,815; E/I 805,455; H 813,519. Vocabulary-dependent J/K totals are 689,349 / 804,675 |
| Family | Arm | Active interface | Validation | Held-out test |
|---|---|---|---|---|
| Coordinate: time | A | raw pitch identity; generic sequence position | ||
| Coordinate: time | B | A + learned absolute onset/bar lookup | ||
| Coordinate: time | C | raw pitch; unary ordered and multi-scale metric time replacing generic/absolute position features | ||
| Coordinate: time | D | C + pairwise onset, meter, bar, and beat relations | ||
| Relation: chromatic | E | D time; chromatic-circle phase + absolute register replacing categorical pitch-class identity | ||
| Coordinate: canonicalization | F | original absolute pitch on the matched music21 high-confidence subset |
| Ledger | F code | G code | |
|---|---|---|---|
| Model code only | 6.48686 | 6.36174 | 0.12512 |
| 4 bits / 8-bar window | 6.48686 | 6.39631 | 0.09055 |
| 4 bits / source song | 6.48686 | 6.36478 | 0.12208 |
| Comparison | Class | Total | Type | Time | Pitch | Duration | Side |
|---|---|---|---|---|---|---|---|
| B A | |||||||
| C B | |||||||
| D C | |||||||
| D A | |||||||
| E D | |||||||
| G F |
| Condition | bits/event | change from Full |
|---|---|---|
| Full | — | |
| Left | ||
| Right | ||
| Shuffled |
| Interface | serialized targets/fact | held-out bits/fact |
|---|---|---|
| J: uncompressed serialized coordinate stream | 3.563 | |
| K: J + train-only reversible BPE | 1.538 | |
| Comparison | mean difference | seed direction | interpretation |
|---|---|---|---|
| J–D | 3/3 J below D | descriptive only | |
| K–D | 3/3 K above D | descriptive only |
| Arm/seed | validation | clean test | test D A |
| A: raw sequence | — | ||
| D: musical-time coordinates | |||
| 20260814 | — | A: 12.37089; D: 12.34337 | |
| 20260815 | — | A: 12.18388; D: 12.02022 | |
| 20260816 | — | A: 12.46503; D: 12.32205 |