Closing the Loop: PID Feedback Control for Interpretable Activation Steering in Symbolic Music Generation
Authors: Ioannis Prokopiou (1,2), Pantelis Vikatos (2), Maximos Kaliakatsos-Papakostas (3), Theodoros Giannakopoulos (4), Themos Stafylakis (1,5) Affiliations: 1 Athens University of Economics and Business 2 Orfium Research 3 Hellenic Mediterranean University 4 NCSR “Demokritos” 5 Archimedes / Athena Research Center
Accepted at the 43rd International Conference on Machine Learning (ICML 2026), Seoul, South Korea. 💻 Code Repository | 🎵 Audio Examples
Abstract
Activation steering controls generation at inference without retraining. In symbolic music, Sparse Activation Steering via Sparse Autoencoders enables interpretable single-layer attribute control but fails in temporal smoothing: fractional steering magnitudes fall below the Top-K sparsity threshold, zeroing the intervention. We propose PID Steering in two forms: Spatial PID validates control-theoretic steering in the generative music domain, while Temporal PID dynamically adjusts $\lambda(t)$ at each autoregressive step via a closed-loop controller whose integral term accumulates error to overcome the Top-K barrier. Experiments on the Multitrack Music Transformer show that Temporal PID overcomes the Top-K threshold failure for pitch and duration steering, enabling smooth transitions with less intervention strength and 5% lower Fréchet Music Distance versus static SAS.
The Top-K Threshold Problem
During a gradual cosine ramp, fractional $\lambda$ values from 0 to a target value are too small to enter the top-K, entirely zeroing the steering signal and forcing an abrupt binary transition instead of a smooth one.
Methodology
Spatial PID
Validates the layer-wise PID formulation on the MMT’s 12 sublayers. The steering vector $u(k)$ at each layer $k$ is computed as:
\[u(k) = K_{p}e(k) + K_{i}\sum_{j=0}^{k-1}e(j) + K_{d}(e(k) - e(k-1))\]Temporal PID
Transposes PID control from the spatial to the temporal domain, built around a Top-K-aware error signal. At each generation step $t$, the controller measures whether steered features survive re-sparsification and adapts $\lambda(t)$.
\[\lambda(t) = clamp(K_{p}e(t) + K_{i}I(t-1) + K_{d}(e(t) - e(t-1)))\]where $I(t)$ is the integral accumulator with anti-windup clamping. The steered sparse representation becomes:
\[\tilde{a}_{t}^{l} = \hat{a}^{l}(\sigma(f(a_{t}^{l}) + \lambda(t) \cdot v)) + \Delta\]Experimental Results
Single-Concept Temporal PID Steering
For pitch-up steering, PID achieves 72.65 semitones versus static SAS 72.30, using 62% less intervention (avg $\lambda=1.15$). PID achieves 5.3% lower FMD than static SAS for pitch[.
| Concept | Direction | PID | Static | Base. |
|---|---|---|---|---|
| Pitch (st) | ↑ ↓ |
72.65 43.99 |
72.30 44.91 |
68.79 67.94 |
| Dur. (ticks) | ↓ | 18.87 4.23 |
22.17 3.35 |
7.99 7.72 |
*Table 1: Single-concept steering ($n=40$). *
Dual-Concept Conditioned Steering
PID evaluates simultaneous pitch and duration steering using two independent temporal PID controllers. It achieves 4.7 lower degradation in unconditioned steering ($\delta=0.47$ vs. 2.19) and excels in the hardest opposing-direction conditioned case.
| Scenario | PID $\delta$ | Static $\delta$ | PID Success | Static Success |
|---|---|---|---|---|
| Uncond. L/S | 0.47 | 2.19 | 90% | 95% |
| H/S → L/L | 1.92 | 4.30 | 100% | 100% |
| H/L → L/S | 5.21 | 3.61 | 95% | 90% |
Table 2: Dual-concept condition steering ($n=20$).
Round-Trip Steering
Temporal PID enables reversible steering: steer away from a conditioned prefix, hold, then steer back. PID outperforms a passive release baseline ($\lambda=0$) by 8-26 percentage points (aggregate recovery: 46-74% vs. 36-62%).
🎵 Audio Examples
Single Attribute — Pitch
Dual Steering & Round-Trip
(Please replace audio sources with your actual filenames)
💻 Code & Reproducibility
Code and pre-trained SAEs are available in our primary GitHub repository. Running Temporal PID only adds a +1.9% marginal overhead versus static SAS.
# Generate with Temporal PID (Pitch)
python sparse_steering/steered_generator_sas.py \
--concept average_pitch \
--controller pid \
--kp 1.0 --ki 0.05 --kd 0.01 \
--layer 10
```
---
## Citation {#citation}
```bibtex
@inproceedings{prokopiou2026closing,
title={Closing the Loop: PID Feedback Control for Interpretable Activation Steering in Symbolic Music Generation},
author={Prokopiou, Ioannis and Vikatos, Pantelis and Kaliakatsos-Papakostas, Maximos and Giannakopoulos, Theodoros and Stafylakis, Themos},
booktitle={Proceedings of the 43rd International Conference on Machine Learning (ICML)},
year={2026},
address={Seoul, South Korea}
}
Acknowledgments
This work was supported by Athens University of Economics and Business, Orfium, Hellenic Mediterranean University, NCSR “Demokritos”, and Archimedes/Athena R.C and the European Horizon Research Project AIXPERT.
Base model: Multitrack Music Transformer (MMT) by Hao-Wen Dong et al.