Manuscript Offprint

arXiv:2611.06418

Mind Control of LLMs via Closed-Loop Stimulation: Out-of-Distribution Robustness

Kasra Fallah, Rudramani Singha, Hannah Ghanei, Paul Sajda, James Anderson, Erfan Zabeh

Kasra Fallah¹*, Rudramani Singha²*, Hannah Ghaneí³, Paul Sajda¹,⁴, James Anderson¹, Erfan Zabeh²,⁴,⁵,†

¹Department of Electrical Engineering, Columbia University, New York, NY, USA

²Peter O'Donnell Jr. Brain Institute, UT Southwestern Medical Center, Dallas, TX, USA

³School of Computer Science and Electronic Engineering, University of Surrey, Guildford, UK

⁴Department of Biomedical Engineering, Columbia University, New York, NY, USA

⁵Center for Theoretical Neuroscience, Zuckerman Institute, Columbia University, New York, NY, USA

*Equal contribution

†Correspondence: ez2290@columbia.edu

Brains and large language models need not be considered equivalent systems to reveal an interpretable commonality: both exhibit high-dimensional, nonlinear dynamics whose behavior can only be modeled imperfectly. This creates a shared challenge whenever we seek to intervene in their dynamics. A controller may either rely on a model identified around a particular operating regime and risk failure as the system moves away from that regime, or explicitly account for uncertainty and a changing internal state. Neurostimulation has confronted an analogous problem for decades. The limitations of fixed, open-loop stimulation have motivated closed-loop and state-dependent approaches that condition intervention on the ongoing state of the neural system. Inspired by this principle, we formulate LLM steering as a feedback-control problem in which the network's internal state, rather than a fixed intervention alone, determines how the system is perturbed. We further account for the inevitable mismatch between tractable dynamical models and the nonlinear transformer they approximate by adopting a robust control approach. As one principled realization of this framework, we develop an H∞H_\infty-based steering controller that explicitly limits sensitivity to disturbances and linearization mismatches. Across multiple steering benchmarks, the resulting controller improves performance over existing steering baselines, with particularly pronounced gains under out-of-distribution conditions and varying length complexities—regimes in which the assumptions underlying locally identified dynamics are increasingly challenged. Beyond controller performance, we introduce robust steerability, SrobS_{rob}, a pre-deployment measure of tolerance to dynamics mismatch; across model-task pairs, it exhibits task-specific structure and varies systematically with model scale. Beyond robust LLM steering, our measure asks not merely whether control is possible, but how much uncertainty it can survive—a principle that may span artificial and biological neural systems.

Keywords: closed-loop steering, robust control, distribution shift, activation steering, H∞H_\infty control

Figure

Figure

Figure 1: Borrowing from closed-loop neurostimulation, we steer LLMs with robust H∞H_\infty feedback and derive a score characterizing steering reliability under distribution shift.

1 INTRODUCTION

Activation steering provides a partial control surface for large language models: residual-stream directions added or removed at inference can increase truthfulness, sustain refusal, or change language without weight updates (Li et al., 2023; Zou et al., 2023; Turner et al., 2024; Rimsky et al., 2024; Arditi et al., 2024). Yet these interventions—a direction, layer, and strength—are calibrated under one prompt distribution and deployed on unseen inputs. Calibration therefore measures success under construction conditions, not reliability in use. A vector that improves truthfulness on English calibration questions may weaken in Spanish or as the context length increases, while its calibration metrics give no warning (Tan et al., 2024; Hsu et al., 2026; Maraia et al., 2026). A successful perturbation is not the same as reliable control.

Neuroscience has confronted this distinction directly, and its response has two parts. First, the effect of stimulation depends on the state in which it is delivered: across invasive and non-invasive paradigms, state alters the magnitude, direction and behavioral consequence of otherwise identical stimulation (Faller et al., 2022; Silvanto & Pascual-Leone, 2008; Bergmann, 2018; Bradley et al., 2022). Response variability is not noise around a fixed input-output map but a signature of the dynamics through which perturbations propagate, and this motivated a shift from open-loop stimulation to state-aware closed-loop intervention (Zrenner et al., 2016; Zrenner & Ziemann, 2024; Hebb et al., 2014; Topalovic et al., 2023; Davila et al., 2022; Kao et al., 2015; Natarajan & Sajda, 2026; Shanechi, 2019). Second, reliable control of an imperfectly known system requires designing against that imperfection. Optimal feedback-control accounts of movement explain behavioral robustness as correction according to task consequence rather than tracking of a fixed trajectory (Todorov & Jordan, 2002; Scott, 2004), and human responses to unpredictable disturbances have been described by robust-control formulations related to H∞\mathcal{H}_{\infty} (Creve-coeur et al., 2019): intervention reliability depends on how uncertainty is amplified from perturbation to behavior. Language models and biological circuits are not equivalent systems, but both are high-dimensional, nonlinear and imperfectly modeled, and intervention in both inherits the same reliability problem.

In activation steering, this problem takes a concrete form. Recent work has cast transformer depth as a finite control horizon, hidden representations as states, and activation interventions as control inputs whose effects propagate through subsequent layers (Nguyen et al., 2026; Skifstad et al.,

Figure

Figure 2: Method Schematic. Closed-loop stimulation enables controlled modulation of the system's behavioral dynamics.

2026). These methods address how to steer a representation under an identified nominal model, but not whether it remains steerable when those dynamics change. At deployment, shifts in prompt, context, or activation trajectory alter the network's local Jacobians and therefore how the same intervention propagates. Distribution shift thus changes not only the state being controlled but also the dynamics of control itself. Consequently, two representations with similar decodability and nominal steering performance can differ sharply in reliability under shift. We therefore ask:

Can a language model's internal dynamics tell us, before deployment, whether a representation will remain reliably steerable as those dynamics change?

We study this question through robust control. Around a nominal steered trajectory, we model local representation dynamics as xk+1=Akxk+Bkuk+Dkwkx_{k+1} = A_k x_k + B_k u_k + D_k w_k, where AkA_k represents the identified layer dynamics, BkukB_k u_k the admissible activation intervention, and DkwkD_k w_k the deviation from the nominal model. Crucially, DkD_k is estimated from empirical representation-dynamics residuals, capturing the directions in which mismatch actually occurs rather than imposing isotropic uncertainty. We define robust steerability as Srob=1/γ∗S_{\text{rob}} = 1/\gamma^*, where γ∗=inf⁡K∥Tw→z(K)∥∞\gamma^* = \inf_K \|T_{w\to z}(K)\|_\infty is the minimum achievable closed-loop amplification from disturbance to steering-relevant output. We use robust control as a diagnostic of intervention reliability rather than as a new controller-synthesis method, and ask what SrobS_{\text{rob}}, computed from calibration activations alone, reveals about which model-behavior pairs admit reliable intervention. Beyond the benchmark gains, synthesis returns a measure for whether or not the controller is successful: SrobS_{\text{rob}} measures how much deviation from the identified dynamics an intervention can absorb before it stops producing the intended behavior, and it varies systematically across models and behaviors (Sec. 6). The question is not whether an intervention works, but how careful it has to be.

Our formulation has two ingredients; our pre-deployment analysis (Sec. 2) earns each separately. Robustness: in both intracranial recordings and transformer hidden states, local linearization holds near the identification regime and leaves a residual that grows as the trajectory departs from it—structured and state-dependent, not incidental noise. Feedback: in the neural recordings, where open- and closed-loop stimulation can be compared (Basu et al., 2023; Bush & Shin, 2006), conditioning on the evolving state lowers output-level mismatch and narrows the out-of-distribution gap; no language model affords that comparison, since there closed-loop efficacy is the claim under test. The intervention must therefore track the state, and the model that shapes it cannot be trusted beyond its fitting regime. An H∞\mathcal{H}_{\infty} feedback law is exactly that pair (Sec. 2).

A

Figure

C

Biologically inspired Cortical Organization

D

B

E

F

SST-2 Sentiment Benchmark

G

H

Figure

I

Figure

Figure 3: Linearization residuals under distribution shift in biological and artificial neural systems motivate closed-loop control. (A–D) Human intracranial recordings during MSIT show that neural dynamics admit useful short-horizon linear prediction, while residual model mismatch increases when a frozen model is evaluated under task-context shift. (E–G) We apply the same local-dynamics abstraction to GPT-2 hidden states under an analogous context shift. (H) In both systems, linearization residuals increase from in-distribution (ID) to out-of-distribution (OOD) conditions, indicating greater mismatch between locally identified and realized dynamics under shift. bf(I) In the human data, closed-loop stimulation reduces output-level mismatch and narrows the ID–OOD gap relative to open-loop stimulation. Together, these results motivate treating model mismatch as a disturbance and LLM steering as a state-dependent, robust closed-loop control problem.

The exchange runs both ways. A language model is not a model of the brain, but it is a large nonlinear network whose states can be measured, perturbed and evaluated at will—a model organism for intervention in complex neural systems. Sec. 6 returns the measure to that setting, where it could separate stimulation targets that tolerate coarse models from those that need precise closed-loop control. What follows begins with those dynamics: what a local model captures, and what it leaves behind.

2 PROBLEM FORMULATION

References (100)

Couldn't load all references. Reload the page to try again.