Correlated, Margin-Bounded Ant Search Over Song Structure

Music generators that plan a song's layout before producing audio fix a real weakness of long-form generation: they keep a five-minute track from drifting out of its verse–chorus form. The layout is a short sequence of discrete decisions about where sections begin, what each instrument does, and which sections reuse earlier material. Systems such as MusicLayout still sample this plan in one pass, one token at a time, and then freeze it. If you want a better plan, you have two options today. You can resample the whole thing, or you can raise the sampling temperature and let every token wander independently. Neither option can make a coherent change, such as "the second half revisits the opening theme with a sparser arrangement," because that change requires many decisions to deviate from the default together and stay deviated.

This note proposes an inference-time search over song layouts that is built to make exactly that kind of coordinated change. A colony of sampling agents ("ants") repeatedly builds layouts using the frozen planner as a prior. Three things shape the search. First, a shared, bounded memory of which structural choices scored well, borrowed from ant colony optimization. Second, perturbations to the planner's token scores that are correlated across the song's timeline, so a deviation persists for a section rather than flickering on and off. Third, hard floors and ceilings on every choice probability, so the persistent perturbations cannot pin decisions permanently to 0 or 1. The claim is that persistence and bounding are each necessary, and that only together do they beat simply drawing more samples and keeping the best one.

Core Claim

Independent per-token sampling is the discrete version of a known failure in continuous control. When random pushes are drawn independently at every step, they cancel out. The agent jitters in place instead of travelling anywhere. Making Deep Q-learning methods robust to time discretization shows this cancellation becomes total as control steps shrink, and Temporally-Extended ε-Greedy Exploration describes the resulting local random walk. In a layout of many bar- or segment-level tokens, independent sampling produces scattered one-off deviations. These read as structural noise, not as an alternative form.

Correlated noise is the known remedy in continuous control. Taken alone, though, it creates a second failure. Pink Noise Is All You Need shows that strongly correlated (red or Ornstein–Uhlenbeck) noise drives agents against the edges of the space and leaves them stuck there. In probability space, the edges are probabilities of 0 and 1, and a stuck choice is a fixed one.

Margins are the known remedy for fixation in discrete search. Simple Max-Min Ant Systems and the Optimization of Linear Pseudo-Boolean Functions proves polynomial runtimes once pheromones are kept inside $[1/n, 1-1/n]$. CatCMA with Margin shows that a lower bound on mutation probability stops discrete variables from locking in. Our hypothesis is that these fixes are complementary. Correlation supplies coordinated, section-length deviations. Margins keep those deviations from turning into permanent fixations. The ant colony's bounded memory carries what was learned across iterations.

Mechanism

Let $\ell_t(k)$ be the frozen layout model's score (logit) for option $k$ at structural position $t$, a segment or bar slot. Let $\tau_t(k) \in [\tau_{\min}, \tau_{\max}]$ be the colony's pheromone on that choice, and let $z_t(k)$ be a perturbation. For each option $k$, the perturbation sequence over $t$ is drawn with power spectrum $S(f) \propto f^{-\beta}$. Here $\beta = 0$ is independent (white) noise, $\beta = 1$ is pink noise, and $\beta = 2$ is red noise. An ant samples from

$$ p_t(k) \propto \exp\big(\ell_t(k) + \alpha \log \tau_t(k) + \sigma z_t(k)\big), \qquad \tilde p_t(k) = \mathrm{clip}\big(p_t(k),\, m,\, 1-(K-1)m\big)\ \text{renormalized}, $$

where $\alpha$ weights the pheromone, $\sigma$ scales the noise, $K$ is the number of options at that position, and $m$ is the probability margin. Pheromones are indexed by structural content rather than raw tokens. One index is (segment index, role attribute) for register, density and energy. Another is (earlier segment, later segment) pairs for "family" reuse, the mechanism by which MusicLayout marks recurring themes. After each iteration, the best layouts deposit pheromone, all trails evaporate at rate $\rho$, and trails are clipped to their bounds, following the MAX-MIN ant system.

The structural indexing is what makes correlated noise meaningful here. A pink-noise draw on "density" spanning positions 9–16 lowers density for a whole section, and the margin keeps that choice revisitable in later iterations. We will also track how often each probability sits at its margin ("boundary occupancy"). This measures directly the tension the research file flags: correlation might turn the margin from a safety net into a trap.

Research Program

The prior and renderer come from MusicLayout (MusicLayout), a 1.7B language model that writes a time-aligned layout before a frozen diffusion transformer renders audio. MusicLayout plans in one autoregressive pass and states that it cannot revise or in-paint plans. We leave its weights untouched and add search around it.

The search template comes from GFACS (Ant Colony Sampling with GFlowNets for Combinatorial Optimization), which guides parallel ants with a learned generative prior and pheromone updates for routing problems. GFACS uses neither probability margins nor correlated noise, and it never touches temporal generative domains. Those are exactly the two ingredients we add and test.

Search needs a score, and audio rendering is expensive. We therefore use two tiers. Inexpensive layout-level scores rank every ant: planner log-likelihood, consistency between segment durations and the prompt, and agreement between family labels and role similarity. The top few candidates per iteration are then rendered and scored by an aesthetic predictor trained on SongEval (SongEval), which reports Pearson 0.912 against professional ratings, compared with 0.61–0.66 for Audiobox-Aesthetic. We hold out MuseCritic (MuseCritic) and human listening as independent judges. This guards against the search exploiting its own critic.

Before touching audio, we run a planted-structure test. The reward is a synthetic layout task that pays only when a contiguous block of positions deviates jointly from the prior's mode, for example a whole section switched to a reused family. This tests the dithering hypothesis cheaply and with ground truth. To check that the mechanism is not specific to music, we also drop the margin and correlation components into GFACS on TSP-1000. There, $z$ is a per-city bias field that drifts slowly over construction steps, and the margin is the MAX-MIN pheromone bound.

Baselines

The naive reference is a single MusicLayout sample at its default decoding settings, rendered by the same frozen diffusion transformer. Below that sits the layout-free fine-tuned renderer, ACE-Step 1.5-FT, which MusicLayout's own matched ablation shows to be weaker on boundary agreement. For MusicLayout itself the file gives no numeric scores: no reported result found on Lacuna for exact MusicLayout $F_{0.5}$/$F_{3.0}$ values, only that it scores highest on FreeMIDI and MidiCaps against MusicGen-Large and Stable Audio 3. We therefore re-measure all of these ourselves under one pipeline.

The strongest competitor is best-of-N. It draws N independent MusicLayout plans with tuned temperature and nucleus settings, scores them with the identical two-tier critic, and keeps the best. It is the obvious way to spend extra inference compute and has no hyperparameters beyond those of the sampler, which makes it the comparison that decides whether search adds anything. It gets exactly the same number of layout-model forward passes, the same number of rendered candidates, and the same tuning budget, including a grid over temperature equal in size to our grid over $\sigma$, $\beta$ and $m$. Beating it means a statistically significant gain on held-out human structure ratings and on MuseCritic at matched compute. A gain on the SongEval predictor alone, which the search optimized, does not count.

The closest existing method is GFACS-style search transplanted to layouts. It uses the same prior and pheromone indexing, but with unbounded pheromones and independent sampling. On TSP-1000, GFACS reports a 2.63% optimality gap against 2.87% for DeepACO and 42.30% for POMO (Ant Colony Sampling with GFlowNets). Our transfer check counts as a success if margin-bounded, correlated GFACS reaches a lower gap than 2.63% under the original training and sampling budget we reproduce.

The ablations isolate each ingredient. The first crosses $\beta \in \{0, 1, 2\}$ with margins on or off at fixed $\sigma$. The second replaces pink noise with segment-held noise that is redrawn every $n$ positions, mirroring the periodic resampling of gSDE (Smooth Exploration for Robotic Reinforcement Learning). The third removes pheromone entirely, giving correlated and bounded sampling without colony memory.

Why not just…?

Why not just draw more samples and keep the best? This is the real threat, and the proposal stands or falls on it. Best-of-N explores only as widely as independent sampling does. If the planner's distribution rarely produces coordinated section-level deviations, more draws will not find them. The planted-structure task measures this directly by counting how often each method hits the planted block at fixed N. If best-of-N matches us there and on the human ratings, we report that search is unnecessary for layout planning.

Why not just raise the temperature or add an entropy bonus? Raising temperature adds independent per-token randomness. That is the white-noise regime, which Pink Noise Is All You Need finds recovers about 50% of an oracle's gain, compared with about 100% for pink noise. Heuristic spreading of the distribution is also known to be less robust than an explicit floor; Abdolmaleki et al. find an entropy lower bound outperforms covariance inflation. Temperature is still inside the best-of-N grid, so this alternative gets its fair test there.

Why not just hold the noise fixed within each segment? Piecewise-constant noise is simpler than pink noise. gSDE shows that resampling every 8 steps improves PyBullet Hopper from 2434 to 2646 while cutting continuity cost from 3.6 to 2.4. It could plausibly work as well as pink noise for layouts whose segment boundaries are already known. The segment-held ablation settles the question. If it ties pink noise, we adopt it, and the claim narrows to "persistence plus margins," with no particular noise spectrum required.

Why not just fine-tune the planner against the critic? Amortizing the search into the planner's weights could be faster at test time. The risk is that it collapses onto a single plan per prompt, the mode-collapse failure GFACS documents for reinforcement-learning heuristics, and that it is more exposed to critic exploitation. We run a modest reward-fine-tuned planner as a stretch baseline and report plan diversity alongside quality. Search is also complementary, since it can wrap a fine-tuned planner too.

Proposed Experiments

Prompts come from held-out MidiCaps captions (MidiCaps) and FreeMIDI, with a MuChin split testing transfer to real recorded accompaniment. Structural metrics are MusicLayout's acoustic-boundary $F_{0.5}$ and $F_{3.0}$, plus recurrence agreement: whether segments the plan marks as one family are actually similar in the rendered audio's self-similarity matrix. Quality is scored by the SongEval predictor, MuseCritic, and a blind listening test on SongEval's structure-clarity and coherence dimensions. Diversity is measured across seeds per prompt, and every run logs boundary occupancy.

There are three decisive checks. On the planted-structure task, $\beta = 1$ with margins should find the planted block far more often than $\beta = 0$ at equal budget. $\beta = 2$ without margins should show high boundary occupancy and stalled search, which would confirm the predicted trap. On music, the full method must beat tuned best-of-N on held-out human and MuseCritic structure scores at matched compute. On TSP-1000, the same two ingredients should improve on GFACS's 2.63% gap.

The outcomes are designed to be informative either way. If the first and third checks pass but the second fails, the mechanism is sound and layout planning is simply not search-limited. If the first fails, the dithering analogy does not carry over to discrete structure, and the proposal should be abandoned rather than tuned.