Exploring Sampling Techniques for Generating Melodies with a Transformer Language Model

Mathias Rose Bjare, Stefan Lattner, Gerhard Widmer
8/18/2023
cs.SDcs.CLeess.AS
transformer-attention

No confident code implementation found for this paper. 3 possible matches can be shown below.

Abstract

Research in natural language processing has demonstrated that the quality of generations from trained autoregressive language models is significantly influenced by the used sampling strategy. In this study, we investigate the impact of different sampling techniques on musical qualities such as diversity and structure.

Show full abstract

To accomplish this, we train a high-capacity transformer model on a vast collection of highly-structured Irish folk melodies and analyze the musical qualities of the samples generated using distribution truncation sampling techniques. Specifically, we use nucleus sampling, the recently proposed "typical sampling", and conventional ancestral sampling. We evaluate the effect of these sampling strategies in two scenarios: optimal circumstances with a well-calibrated model and suboptimal circumstances where we systematically degrade the model's performance. We assess the generated samples using objective and subjective evaluations. We discover that probability truncation techniques may restrict diversity and structural patterns in optimal circumstances, but may also produce more musical samples in suboptimal circumstances.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 3 weaker matches are hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{bjare2023exploring,
  title  = {Exploring Sampling Techniques for Generating Melodies with a Transformer Language Model},
  author = {Mathias Rose Bjare and Stefan Lattner and Gerhard Widmer},
  year   = {2023},
  eprint = {2308.09454},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2308.09454v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2308.09454.svg)](https://codeofpaper.com/paper/2308.09454)

Discussion