Steering Autoregressive Music Generation with Recursive Feature Machines

Daniel Zhao, Daniel Beaglehole, Taylor Berg-Kirkpatrick, Julian McAuley, Zachary Novack
10/21/2025
cs.LGcs.AIcs.SD

No official code found. Best implementation: astradzhao/music-rfm (41 stars, MIT, last commit 2025-10-26).

Abstract

Controllable music generation remains a significant challenge, with existing methods often requiring model retraining or introducing audible artifacts. We introduce MusicRFM, a framework that adapts Recursive Feature Machines (RFMs) to enable fine-grained, interpretable control over frozen, pre-trained music models by directly steering their internal activations. RFMs analyze a model's internal gradients to produce interpretable "concept directions", or specific axes in the activation space that correspond to musical attributes like notes or chords. We first train lightweight RFM probes to discover these directions within MusicGen's hidden states; then, during inference, we inject them back into the model to guide the generation process in real-time without per-step optimization. We present advanced mechanisms for this control, including dynamic, time-varying schedules and methods for the simultaneous enforcement of multiple musical properties. Our method successfully navigates the trade-off between control and generation quality: we can increase the accuracy of generating a target musical note from 0.23 to 0.82, while text prompt adherence remains within approximately 0.02 of the unsteered baseline, demonstrating effective control with minimal impact on prompt fidelity. We release code to encourage further exploration on RFMs in the music domain.

View on arXivView PDF

Code Implementations(1)

MIT

Open Source code for our paper, Steering Autoregressive Music Generation with Recursive Feature Machines (Zhao et al., 2025). aka MusicRFM

411Python, Jupyter NotebookOct 18, 202512 months agoMIT

Similar Papers

Cite this paper

@article{zhao2025steering,
  title  = {Steering Autoregressive Music Generation with Recursive Feature Machines},
  author = {Daniel Zhao and Daniel Beaglehole and Taylor Berg-Kirkpatrick and Julian McAuley and Zachary Novack},
  year   = {2025},
  eprint = {2510.19127},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2510.19127v1}
}

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/2510.19127.svg)](https://codeofpaper.com/paper/2510.19127)

Discussion