Attractive and Repulsive Pattern Control in Sequence Generation

By François Pachet

François Pachet. “Attractive and Repulsive Pattern Control in Sequence Generation.” arXiv:2606.24911, 2026.

About the paper

A sequence generator can get stuck repeating the same fragments, even when the underlying model supports many alternatives. This paper gives the generator a way to discourage overused fragments or deliberately make chosen patterns recur more often.

Abstract in brief

A weighted automaton tracks occurrences of target patterns, and belief propagation samples exactly from a distribution that gives those occurrences a reward or a penalty. In experiments on Baroque melodies and jazz solos, penalizing overused patterns reduced repetition and increased the diversity of longer generated fragments.

Related research

This work builds on the sampling method in the NeurIPS 2026 paper. The Markov Constraints project has more on the underlying method, code, and playground.