{"status":"ok","message-type":"work","message-version":"1.0.0","message":{"indexed":{"date-parts":[[2025,10,10]],"date-time":"2025-10-10T01:43:02Z","timestamp":1760060582284,"version":"build-2065373602"},"reference-count":45,"publisher":"MDPI AG","issue":"9","license":[{"start":{"date-parts":[[2025,9,1]],"date-time":"2025-09-01T00:00:00Z","timestamp":1756684800000},"content-version":"vor","delay-in-days":0,"URL":"https:\/\/creativecommons.org\/licenses\/by\/4.0\/"}],"funder":[{"name":"European Union under the NextGenerationEU Program"}],"content-domain":{"domain":[],"crossmark-restriction":false},"short-container-title":["Information"],"abstract":"<jats:p>This paper explores different approaches to harmony tokenization in symbolic music for transformer-based models, focusing on two tasks: masked language modeling (MLM) and melodic harmonization generation. Four tokenization strategies are compared, each varying in how chord information is encoded: (1) as full chord symbols, (2) separated into root and quality, (3) as sets of pitch classes, and (4) as sets of pitch classes where one is designated as a root. A dataset of over 17,000 lead sheet charts is used to train and evaluate RoBERTa for MLM and GPT-2\/BART for harmonization. The results show that chord spelling methods\u2014those breaking chords into pitch-class tokens\u2014achieve higher accuracy and lower perplexity, indicating more confident predictions. These methods also produce fewer token-level errors. In harmonization tasks, chunkier tokenizations (with more information per token) generate chords more similar to the original data, while spelling-based methods better preserve structural aspects such as harmonic rhythm and melody\u2013harmony alignment. Audio evaluations reveal that spelling-based models tend toward more generic pop-like harmonizations, while chunkier tokenizations more faithfully reflect the dataset\u2019s style. Overall, while no single tokenization method dominates across all tasks, different strategies may be preferable for specific applications, such as classification or generative style transfer.<\/jats:p>","DOI":"10.3390\/info16090759","type":"journal-article","created":{"date-parts":[[2025,9,2]],"date-time":"2025-09-02T13:01:13Z","timestamp":1756818073000},"page":"759","update-policy":"https:\/\/doi.org\/10.3390\/mdpi_crossmark_policy","source":"Crossref","is-referenced-by-count":0,"title":["HarmonyTok: Comparing Methods for Harmony Tokenization for Machine Learning"],"prefix":"10.3390","volume":"16","author":[{"ORCID":"https:\/\/orcid.org\/0000-0002-9062-9915","authenticated-orcid":false,"given":"Maximos","family":"Kaliakatsos-Papakostas","sequence":"first","affiliation":[{"name":"Department of Music Technology and Acoustics, Hellenic Mediterranean University, E. Daskalaki, Perivolia, 74133 Rethymno, Greece"},{"name":"Institute of Language and Speech Processing, Athena RC, 15125 Marousi, Greece"},{"name":"Archimedes, Athena RC, 15125 Marousi, Greece"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"ORCID":"https:\/\/orcid.org\/0000-0002-4556-4227","authenticated-orcid":false,"given":"Dimos","family":"Makris","sequence":"additional","affiliation":[{"name":"Department of Music Technology and Acoustics, Hellenic Mediterranean University, E. Daskalaki, Perivolia, 74133 Rethymno, Greece"},{"name":"Archimedes, Athena RC, 15125 Marousi, Greece"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Konstantinos","family":"Soiledis","sequence":"additional","affiliation":[{"name":"Department of Music Technology and Acoustics, Hellenic Mediterranean University, E. Daskalaki, Perivolia, 74133 Rethymno, Greece"},{"name":"Archimedes, Athena RC, 15125 Marousi, Greece"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Konstantinos-Theodoros","family":"Tsamis","sequence":"additional","affiliation":[{"name":"Department of Music Technology and Acoustics, Hellenic Mediterranean University, E. Daskalaki, Perivolia, 74133 Rethymno, Greece"},{"name":"Archimedes, Athena RC, 15125 Marousi, Greece"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Vassilis","family":"Katsouros","sequence":"additional","affiliation":[{"name":"Department of Music Technology and Acoustics, Hellenic Mediterranean University, E. Daskalaki, Perivolia, 74133 Rethymno, Greece"},{"name":"Institute of Language and Speech Processing, Athena RC, 15125 Marousi, Greece"}],"role":[{"role":"author","vocabulary":"crossref"}]},{"given":"Emilios","family":"Cambouropoulos","sequence":"additional","affiliation":[{"name":"School of Music Studies, Aristotle University of Thessaloniki, 54124 Thessaloniki, Greece"}],"role":[{"role":"author","vocabulary":"crossref"}]}],"member":"1968","published-online":{"date-parts":[[2025,9,1]]},"reference":[{"key":"ref_1","doi-asserted-by":"crossref","unstructured":"Sennrich, R., Haddow, B., and Birch, A. (2015). Neural machine translation of rare words with subword units. arXiv.","DOI":"10.18653\/v1\/P16-1162"},{"key":"ref_2","doi-asserted-by":"crossref","unstructured":"Kudo, T., and Richardson, J. (2018). Sentencepiece: A simple and language independent subword tokenizer and detokenizer for neural text processing. arXiv.","DOI":"10.18653\/v1\/D18-2012"},{"key":"ref_3","first-page":"1","article-title":"Exploring the limits of transfer learning with a unified text-to-text transformer","volume":"21","author":"Raffel","year":"2020","journal-title":"J. Mach. Learn. Res."},{"key":"ref_4","first-page":"1877","article-title":"Language models are few-shot learners","volume":"33","author":"Brown","year":"2020","journal-title":"Adv. Neural Inf. Process. Syst."},{"key":"ref_5","unstructured":"Kaplan, J., McCandlish, S., Henighan, T., Brown, T.B., Chess, B., Child, R., Gray, S., Radford, A., Wu, J., and Amodei, D. (2020). Scaling laws for neural language models. arXiv."},{"key":"ref_6","unstructured":"Agosti, G. (2021). Transformer Networks for the Modelling of Jazz Harmony. [Master\u2019s Thesis, Politecnico di Milano]."},{"key":"ref_7","doi-asserted-by":"crossref","unstructured":"Hahn, S., Yin, J., Zhu, R., Xu, W., Jiang, Y., Mak, S., and Rudin, C. (2024, January 25\u201329). SentHYMNent: An Interpretable and Sentiment-Driven Model for Algorithmic Melody Harmonization. Proceedings of the 30th ACM SIGKDD Conference on Knowledge Discovery and Data Mining, Barcelona, Spain.","DOI":"10.1145\/3637528.3671626"},{"key":"ref_8","unstructured":"Cambouropoulos, E., Kaliakatsos-Papakostas, M.A., and Tsougras, C. (2014, January 14\u201320). An idiom-independent representation of chords for computational music analysis and generation. Proceedings of the Joint 40th International Computer Music Conference (ICMC) and 11th Sound and Music Computing (SMC) Conference (ICMC-SMC2014), Athens, Greece."},{"key":"ref_9","unstructured":"Kaliakatsos-Papakostas, M., Katsiavalos, A., Tsougras, C., and Cambouropoulos, E. (2014, January 12\u201313). Harmony in the polyphonic songs of epirus: Representation, statistical analysis and generation. Proceedings of the 4th International Workshop on Folk Music Analysis, Istanbul, Turkey."},{"key":"ref_10","unstructured":"Kaliakatsos-Papakostas, M.A., Zacharakis, A.I., Tsougras, C., and Cambouropoulos, E. (2015, January 26\u201330). Evaluating the General Chord Type Representation in Tonal Music and Organising GCT Chord Labels in Functional Chord Categories. Proceedings of the International Society for Music Information Retrieval (ISMIR) Conference, M\u00e1laga, Spain."},{"key":"ref_11","doi-asserted-by":"crossref","first-page":"2185849","DOI":"10.1080\/08839514.2023.2185849","article-title":"Neural networks and ensemble based architectures to automatic musical harmonization: A performance comparison","volume":"37","author":"Costa","year":"2023","journal-title":"Appl. Artif. Intell."},{"key":"ref_12","doi-asserted-by":"crossref","first-page":"37","DOI":"10.1080\/09298215.2021.1873392","article-title":"Automatic melody harmonization with triad chords: A comparative study","volume":"50","author":"Yeh","year":"2021","journal-title":"J. New Music Res."},{"key":"ref_13","unstructured":"Chen, Y.W., Lee, H.S., Chen, Y.H., and Wang, H.M. (2021). SurpriseNet: Melody harmonization conditioning on user-controlled surprise contours. arXiv."},{"key":"ref_14","doi-asserted-by":"crossref","unstructured":"Sun, C.E., Chen, Y.W., Lee, H.S., Chen, Y.H., and Wang, H.M. (2021, January 6\u201311). Melody harmonization using orderless NADE, chord balancing, and blocked Gibbs sampling. Proceedings of the ICASSP 2021\u20142021 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Toronto, ON, Canada.","DOI":"10.1109\/ICASSP39728.2021.9414281"},{"key":"ref_15","doi-asserted-by":"crossref","unstructured":"Zeng, T., and Lau, F.C. (2021). Automatic melody harmonization via reinforcement learning by exploring structured representations for melody sequences. Electronics, 10.","DOI":"10.3390\/electronics10202469"},{"key":"ref_16","doi-asserted-by":"crossref","first-page":"4","DOI":"10.1186\/s13636-023-00314-6","article-title":"Generating chord progression from melody with flexible harmonic rhythm and controllable harmonic density","volume":"2024","author":"Wu","year":"2024","journal-title":"EURASIP J. Audio Speech Music Process."},{"key":"ref_17","doi-asserted-by":"crossref","unstructured":"Wu, S., Li, X., and Sun, M. (2023, January 4\u201310). Chord-conditioned melody harmonization with controllable harmonicity. Proceedings of the ICASSP 2023\u20142023 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Rhodes Island, Greece.","DOI":"10.1109\/ICASSP49357.2023.10096398"},{"key":"ref_18","unstructured":"Yi, L., Hu, H., Zhao, J., and Xia, G. (2022). Accomontage2: A complete harmonization and accompaniment arrangement system. arXiv."},{"key":"ref_19","doi-asserted-by":"crossref","first-page":"28261","DOI":"10.1109\/ACCESS.2022.3155467","article-title":"Translating melody to chord: Structured and flexible harmonization of melody with transformer","volume":"10","author":"Rhyu","year":"2022","journal-title":"IEEE Access"},{"key":"ref_20","unstructured":"Zhou, J., Zhu, H., and Wang, X. (2023). Choir Transformer: Generating Polyphonic Music with Relative Attention on Transformer. arXiv."},{"key":"ref_21","unstructured":"Huang, J., and Yang, Y.H. (2024). Emotion-driven melody harmonization via melodic variation and functional representation. arXiv."},{"key":"ref_22","unstructured":"Wu, S., Wang, Y., Li, X., Yu, F., and Sun, M. (2024). Melodyt5: A unified score-to-score transformer for symbolic music processing. arXiv."},{"key":"ref_23","unstructured":"Cholakov, V. (2018). AI Enhancer\u2014Harmonizing Melodies of Popular Songs with Sequence-to-Sequence. [Master\u2019s Thesis, The University of Edinburgh]."},{"key":"ref_24","unstructured":"Huang, C.Z.A., Vaswani, A., Uszkoreit, J., Shazeer, N., Simon, I., Hawthorne, C., Dai, A.M., Hoffman, M.D., Dinculescu, M., and Eck, D. (2018). Music Transformer. arXiv."},{"key":"ref_25","unstructured":"Wang, Z., Wang, D., Zhang, Y., and Xia, G. (2020). Learning interpretable representation for controllable polyphonic music generation. arXiv."},{"key":"ref_26","unstructured":"Min, L., Jiang, J., Xia, G., and Zhao, J. (2023). Polyffusion: A diffusion model for polyphonic score generation with internal and external controls. arXiv."},{"key":"ref_27","doi-asserted-by":"crossref","first-page":"11128","DOI":"10.1109\/TNNLS.2023.3248793","article-title":"Rl-chord: Clstm-based melody harmonization using deep reinforcement learning","volume":"35","author":"Ji","year":"2023","journal-title":"IEEE Trans. Neural Netw. Learn. Syst."},{"key":"ref_28","unstructured":"Lim, H., Rhyu, S., and Lee, K. (2017). Chord generation from symbolic melody using BLSTM networks. arXiv."},{"key":"ref_29","doi-asserted-by":"crossref","unstructured":"Ji, S., and Yang, X. (2023, January 1\u20134). Emotion-conditioned melody harmonization with hierarchical variational autoencoder. Proceedings of the 2023 IEEE International Conference on Systems, Man, and Cybernetics (SMC), Honolulu, HI, USA.","DOI":"10.1109\/SMC53992.2023.10394545"},{"key":"ref_30","unstructured":"Raffel, C., McFee, B., Humphrey, E.J., Salamon, J., Nieto, O., Liang, D., Ellis, D.P., and Raffel, C.C. (2014, January 27\u201331). MIR_EVAL: A Transparent Implementation of Common MIR Metrics. Proceedings of the ISMIR, Taipei, Taiwan."},{"key":"ref_31","unstructured":"Liu, Y., Ott, M., Goyal, N., Du, J., Joshi, M., Chen, D., Levy, O., Lewis, M., Zettlemoyer, L., and Stoyanov, V. (2019). Roberta: A robustly optimized bert pretraining approach. arXiv."},{"key":"ref_32","unstructured":"Devlin, J., Chang, M.W., Lee, K., and Toutanova, K. (2019, January 2\u20137). Bert: Pre-training of deep bidirectional transformers for language understanding. Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Minneapolis, MN, USA. (Long and Short Papers)."},{"key":"ref_33","doi-asserted-by":"crossref","unstructured":"Lewis, M., Liu, Y., Goyal, N., Ghazvininejad, M., Mohamed, A., Levy, O., Stoyanov, V., and Zettlemoyer, L. (2019). Bart: Denoising sequence-to-sequence pre-training for natural language generation, translation, and comprehension. arXiv.","DOI":"10.18653\/v1\/2020.acl-main.703"},{"key":"ref_34","first-page":"9","article-title":"Language models are unsupervised multitask learners","volume":"1","author":"Radford","year":"2019","journal-title":"OpenAI Blog"},{"key":"ref_35","doi-asserted-by":"crossref","unstructured":"Krumhansl, C.L. (2001). Cognitive Foundations of Musical Pitch, Oxford University Press.","DOI":"10.1093\/acprof:oso\/9780195148367.001.0001"},{"key":"ref_36","doi-asserted-by":"crossref","unstructured":"Fradet, N., Gutowski, N., Chhel, F., and Briot, J.P. (2023). Byte pair encoding for symbolic music. arXiv.","DOI":"10.18653\/v1\/2023.emnlp-main.123"},{"key":"ref_37","unstructured":"Snover, M., Dorr, B., Schwartz, R., Micciulla, L., and Makhoul, J. (2006, January 8\u201312). A study of translation edit rate with targeted human annotation. Proceedings of the 7th Conference of the Association for Machine Translation in the Americas: Technical Papers, Cambridge, MA, USA."},{"key":"ref_38","doi-asserted-by":"crossref","unstructured":"Harte, C., Sandler, M., and Gasser, M. (2006, January 27). Detecting harmonic change in musical audio. Proceedings of the 1st ACM Workshop on Audio and Music Computing Multimedia, Santa Barbara, CA, USA.","DOI":"10.1145\/1178723.1178727"},{"key":"ref_39","first-page":"2350","article-title":"Fr\u00e9chet Audio Distance: A Reference-Free Metric for Evaluating Music Enhancement Algorithms","volume":"2019","author":"Kilgour","year":"2019","journal-title":"Proc. Interspeech"},{"key":"ref_40","unstructured":"Wang, Z., Chen, K., Jiang, J., Zhang, Y., Xu, M., Dai, S., Bin, G., and Xia, G. (2020, January 11\u201316). POP909: A Pop-song Dataset for Music Arrangement Generation. Proceedings of the of 21st International Conference on Music Information Retrieval, ISMIR, Virtual."},{"key":"ref_41","unstructured":"Li, Y., Yuan, R., Zhang, G., Ma, Y., Chen, X., Yin, H., Lin, C., Ragni, A., Benetos, E., and Gyenge, N. (2023). MERT: Acoustic Music Understanding Model with Large-Scale Self-supervised Training. arXiv."},{"key":"ref_42","doi-asserted-by":"crossref","unstructured":"Gui, A., Liu, S., Yang, Y., Yang, L., and Li, Y. (2024, January 14\u201319). Adapting Fr\u00e9chet Audio Distance for Generative Music Evaluation. Proceedings of the ICASSP 2024\u20142024 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), Seoul, Republic of Korea.","DOI":"10.1109\/ICASSP48485.2024.10446663"},{"key":"ref_43","unstructured":"Deutsch, P. (2025, August 28). Rfc1951: Deflate Compressed Data Format Specification Version 1.3. Available online: https:\/\/www.ietf.org\/rfc\/rfc1951.txt."},{"key":"ref_44","doi-asserted-by":"crossref","first-page":"337","DOI":"10.1109\/TIT.1977.1055714","article-title":"A universal algorithm for sequential data compression","volume":"23","author":"Ziv","year":"1977","journal-title":"IEEE Trans. Inf. Theory"},{"key":"ref_45","doi-asserted-by":"crossref","first-page":"1098","DOI":"10.1109\/JRPROC.1952.273898","article-title":"A method for the construction of minimum-redundancy codes","volume":"40","author":"Huffman","year":"1952","journal-title":"Proc. IRE"}],"container-title":["Information"],"original-title":[],"language":"en","link":[{"URL":"https:\/\/www.mdpi.com\/2078-2489\/16\/9\/759\/pdf","content-type":"unspecified","content-version":"vor","intended-application":"similarity-checking"}],"deposited":{"date-parts":[[2025,10,9]],"date-time":"2025-10-09T18:37:27Z","timestamp":1760035047000},"score":1,"resource":{"primary":{"URL":"https:\/\/www.mdpi.com\/2078-2489\/16\/9\/759"}},"subtitle":[],"short-title":[],"issued":{"date-parts":[[2025,9,1]]},"references-count":45,"journal-issue":{"issue":"9","published-online":{"date-parts":[[2025,9]]}},"alternative-id":["info16090759"],"URL":"https:\/\/doi.org\/10.3390\/info16090759","relation":{},"ISSN":["2078-2489"],"issn-type":[{"type":"electronic","value":"2078-2489"}],"subject":[],"published":{"date-parts":[[2025,9,1]]}}}