\documentclass[pmlr]{jmlr}% new name PMLR (Proceedings of Machine Learning Research)
% Template adapted for the 1st Workshop on Emerging AI Technologies for Music, as part of AAAI
% https://amaai-lab.github.io/EAIM2026/

 % The following packages will be automatically loaded:
 % amsmath, amssymb, natbib, graphicx, url, algorithm2e

 %\usepackage{rotating}% for sideways figures and tables
\usepackage{longtable}% for long tables

 % The booktabs package is used by this sample document
 % (it provides \toprule, \midrule and \bottomrule).
 % Remove the next line if you don't require it.
\usepackage{booktabs}
 % The siunitx package is used by this sample document
 % to align numbers in a column by their decimal point.
 % Remove the next line if you don't require it.
\usepackage[load-configurations=version-1]{siunitx} % newer version
 %\usepackage{siunitx}
 \usepackage{adjustbox}

 % The following command is just for this sample document:
\newcommand{\cs}[1]{\texttt{\char`\\#1}}

 % Define an unnumbered theorem just for this sample document:
\theorembodyfont{\upshape}
\theoremheaderfont{\scshape}
\theorempostheader{:}
\theoremsep{\newline}
\newtheorem*{note}{Note}

 % change the arguments, as appropriate, in the following:
\jmlrvolume{303}
\jmlryear{2026}
\jmlrworkshop{EAIM2026 at AAAI}

\title[Encoder-Only Melodic Harmonization]{Encoder-Only Transformers for Melodic Harmonization: Representation Emergence and Inference Strategies}

 % Use \Name{Author Name} to specify the name.

 % Spaces are used to separate forenames from the surname so that
 % the surnames can be picked up for the page header and copyright footer.
 
 % If the surname contains spaces, enclose the surname
 % in braces, e.g. \Name{John {Smith Jones}} similarly
 % if the name has a "von" part, e.g \Name{Jane {de Winter}}.
 % If the first letter in the forenames is a diacritic
 % enclose the diacritic in braces, e.g. \Name{{\'E}louise Smith}

 % *** Make sure there's no spurious space before \nametag ***

 % Two authors with the same address
% \Name{Author Name2} \Email{xyz@sample.com}\\
%   \addr Address}

 % Three or more authors with the same address:
  \author{\Name{Maximos Kaliakatsos-Papakostas} \Email{maximoskp@hmu.gr}\\
  \Name{Dimos Makris} \Email{dimos@hmu.gr}\\
  \Name{Konstantinos Soiledis} \Email{ksoiledis@hmu.gr}\\
  \Name{Konstantinos-Theodoros Tsamis} \Email{ktsamis@hmu.gr}\\
  \addr Department of Music Technology and Acoustics
  \addr Hellenic Mediterranean University, Greece
  \addr Archimedes, Athena RC, Greece}


 % Authors with different addresses:
  % \author{\Name{Maximos Kaliakatsos-Papakostas} \Email{maximoskp@hmu.gr}\\
  % \addr Department of Music Technology and Acoustics
  % \addr Hellenic Mediterranean University, Greece
  % \addr Archimedes, Athena RC, Greece
  % \AND
  % \Name{Dimos Makris} \Email{dimos@hmu.gr}\\
  % \addr Department of Music Technology and Acoustics
  % \addr Hellenic Mediterranean University, Greece
  % \addr Archimedes, Athena RC, Greece
  % \AND
  % \Name{Konstantinos Soiledis} \Email{ksoiledis@hmu.gr}\\
  % \addr Department of Music Technology and Acoustics
  % \addr Hellenic Mediterranean University, Greece
  % \addr Archimedes, Athena RC, Greece
  % \AND
  % \Name{Konstantinos-Theodoros Tsamis} \Email{ktsamis@hmu.gr}\\
  % \addr Department of Music Technology and Acoustics
  % \addr Hellenic Mediterranean University, Greece
  % \addr Archimedes, Athena RC, Greece
  % \AND
  % \Name{Vassilis Katsouros} \Email{vsk@athenarc.gr}\\
  % \addr Institute of Language and Speech Processing
  % \addr Archimedes, Athena RC, Greece
  % \AND
  % \Name{Emilios Cambouropoulos} \Email{emilios@mus.auth.gr}\\
  % \addr School of Music Studies
  % \addr Aristotle University of Thessaloniki, Greece
 % }

\editors{D. Herremans, K. Bhandari, A. Roy, S. Colton, M. Barthet}

\begin{document}

\maketitle

\begin{abstract}

This paper addresses the problem of melodic harmonization --the automatic generation of harmonic accompaniments that complement a given melody-- using non-autoregressive, encoder-only transformer models operating on a synchronized melody–harmony time grid. The proposed framework allows flexible conditioning, such as fixing chords at specific positions, while maintaining high generative quality. Comparative experiments show that single-encoder models outperform dual-encoder architectures despite using fewer parameters. Interestingly, harmony-related attention patterns emerge even when harmony tokens remain fully masked during training, and models using only cross-attention achieve comparable results, suggesting implicit modeling of harmony–harmony relations. Different inference unmasking strategies further reveal notable effects on harmonic structure and coherence.

\end{abstract}

\begin{keywords}
Melodic harmonization; Non-autoregressive transformer; Encoder-only architecture; Attention dynamics
\end{keywords}

\input{1_intro}
\input{2_method}
\input{3_results}
\input{4_conclusions}

\acks{This work has been partially supported by project MIS 5154714 of the National Recovery and Resilience
Plan Greece 2.0 funded by the European Union under the NextGenerationEU Program.}

\bibliography{references}

\appendix

% \section{First Appendix}\label{apd:first}

% This is the first appendix.

% \section{Second Appendix}\label{apd:second}

% This is the second appendix.

\end{document}
