# A Simple Guide to LLM Activation Steering With Control Systems

#114 Aug 10 LLMs

https://www.aibutsimple.com/p/a-simple-guide-to-llm-activation-steering-with-control-systems

It’s known that even the most aligned LLMs can sometimes say dishonest, offensive, or unsafe things.

The usual fix for this in AI development is fine-tuning, but this method is slow, needs a lot of data, and can unintentionally degrade model skills that were never meant to be touched.

Which is why researchers lean on a lighter-weight trick called activation steering, where you nudge hidden activations mid-generation toward a desired behavior instead of retraining.

The problem is that most steering methods are basically a guess and a shove because you compute a direction offline, add it at every layer and hope that it survives the trip through the rest of the layers.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/70f41889-2ca7-4830-b326-ade6d78df6fd/LLM_Activation_Steering__1_.png)

A team from Georgia Tech (Skifstad et al., 2026) asked an interesting question: if the LLM already evolves activation by activation, why not steer it the way engineers steer rockets, drones, and thermostats?

Their answer is a method called A-LQR, short for Activation-LQR or Activation-Linear Quadratic Regulator, introduced in their paper "[Local Linearity of LLMs Enables Activation Steering via Model-Based Linear Optimal Control.](https://arxiv.org/pdf/2604.19018?utm_source=newsletter.aibutsimple.com&utm_medium=referral&utm_campaign=a-simple-guide-to-llm-activation-steering-with-control-systems)"

---

#### What You'll Learn

1. Why activation steering is secretly a control systems problem
2. Why transformer layers, despite being nonlinear, can behave like locally linear systems
3. How the LQR is the same tool used in aerospace and robotics
4. How A-LQR performs on toxicity, truthfulness, and even jailbreaking

#### What's Helpful to Know

- Activation steering
  - Perturbing an LLM's hidden activations during inference to change its output (without changing the model weights).
- Jacobian
  - The matrix of partial derivatives of a function's outputs with respect to its inputs.
  - It tells you how a small nudge to the input can locally move the output locally as if you zoomed in far enough on a curve that it looked like a straight line.
- [Linear quadratic regulator (LQR)](https://en.wikipedia.org/wiki/Linear%E2%80%93quadratic_regulator?utm_source=newsletter.aibutsimple.com&utm_medium=referral&utm_campaign=a-simple-guide-to-llm-activation-steering-with-control-systems)
  - A classical control algorithm that computes the cheapest sequence of interventions to steer a linear system toward a reference/desired target.
  - It balances how far you are from the goal against how hard you are pushing to get there.

---

| In partnership with | ![Oumi](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/2ced739a-0974-418d-8f06-0c4ab73ea1cd/oumi-mark-96.png) |

### Your AI stopped learning the day it shipped.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/18ba4dfd-b14b-4061-b0f8-06f9efef1f2f/hero-1200x630.png)

A general-purpose model doesn't learn from your production failures, operator corrections, or the work that makes your business different.

On August 11, Oumi is launching the AI Factory that runs the complete loop: Evaluate, Synthesize, Train, Deploy, Compound. We'll show it live on a real task and reveal three product announcements.

Join Manos Koukoumidis and the Oumi team at 10:00 AM PT / 1:00 PM ET.

[Reserve your seat today!](https://events.oumi.ai/register/summer26?utm_source=ai_but_simple&utm_medium=newsletter&utm_campaign=summer26-launch&utm_content=primary_sponsored_ad)

---

#### Steering Is Usually Just a Nudge and a Prayer

How most activation steering methods work is by collecting 2 sets of prompts:

- Ones with a trait you want (e.g., non-toxic),
- Ones without the trait.

These are then run through the model, and the difference in activations at each layer is averaged.

That difference becomes a steering vector added to the activations at inference time, layer by layer, scaled by some strength you picked ahead of time.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/6dd98056-b4e6-4b36-9ef8-ff5071b6f3f4/LLM_Activation_Steering.png)

Even though this works reasonably well, this is what control engineers call an open-loop and non-anticipative method.

You compute the push once offline and never check whether it actually landed where you wanted.

- You also ignore the fact that a nudge at layer 3 can change what layer 4 sees, which also affects layer 5, and so on.

It is a bit like firing a thruster on a spacecraft once at launch and never adjusting the course again no matter what the sensors say afterwards.

---

#### A Simple Introduction to Control Systems

As mentioned earlier, a solution found by the authors of the A-LQR paper utilizes a method from classical control theory.

The LLM is reframed as a dynamical system, similar to a physical dynamical system such as a vehicle, an aircraft, or even a temperature-controlled room.

With the right set of tools, this reframing of the LLM allows us to control its behavior and nudge it towards a desired state.

Activation steering already tries to do this, but it works as an open-loop system. It doesn’t actively look at whether your initially steered activations are driving the LLM towards the desired output.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/b732ebe1-e819-4316-8011-7a85497ef919/LLM_Activation_Steering__2_.png)

This stops us from being able to efficiently control the LLMs’ behavior.

Let’s walk through an example of cruise control with open and closed loops to better understand the difference.

If a car is equipped with open-loop cruise control, the driver sets a fixed speed (e.g., 80 km/h). The vehicle receives the speed and adjusts the throttle to match it.

- The open-loop controller can’t handle real-time disturbances that affect speed (e.g., uphills, downhills) since the system doesn’t have a feedback measurement of the car’s speed.

On the other hand, if it is equipped with closed-loop cruise control, it uses a speed sensor and continuously measures the actual speed and calculates a speed error.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/4c5f0b01-8420-4a83-aa8f-e3fab8416e1e/image.png)

If the car slows down to 75 km/h during an uphill, the controller increases the throttle. If the car accelerates to 85 km/h downhill, the controller reduces the throttle.

It keeps adjusting until the error is close to zero.

---

#### How is the LQR Used as a Closed-Loop Controller?

LQR is one of the few methods in classical control that works using optimization.

It decides how strongly the system should react to measured deviations while balancing accuracy against control effort.

For the cruise control example, a state error is defined as:

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/8b6840af-6b0a-4c1f-b5da-6b546a7fb0f8/image.png)

Here, ex is the speed error. LQR calculates a feedback rule shown below.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/3c7e1590-38c1-49b8-936d-82c7e80d95ad/image.png)

- u is the throttle or braking correction
- K is the feedback gain chosen by LQR

If the car is too slow, LQR increases the throttle, and if it is too fast, LQR reduces the throttle or applies braking.

LQR chooses K by minimizing a cost function such as:

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/3356d209-ac15-43a2-9ef9-5bbd9c9ffb8d/image.png)

The matrices Q and R express the following design priorities:

- Larger Q: correct speed errors more aggressively
- Larger R: avoid large or rapid throttle/brake commands

Their balance determines responsiveness versus smoothness and energy use.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/f8812c2b-b5f7-4dac-a48a-17aa496efade/LLM_Activation_Steering__4_.png)

In short, feedback makes the system closed-loop; LQR mathematically selects the feedback gains to produce a stable and accurate response without using excessive control effort.

This fundamental method from control theory used in cars, aircrafts and rockets is used for LLMs by the authors of the A-LQR paper, and further we will see how this was done.

---

#### Reframing the LLM as a Dynamical System

The paper's first decision is to treat the residual stream itself as the state of a dynamical system.

Each transformer block is basically a nonlinear function that pushes the activation forward one layer at a time:

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/bfdf4154-95ac-4006-92d5-d085bc88100d/image.png)

Steering here just means adding a control input uk at each layer:

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/23c3990f-0e98-4af1-9573-81e6709e88bc/image.png)

When framed this way, activation steering stops being a one-off perturbation and becomes an honest control synthesis problem.

- Essentially, we find the sequence of uk that drives the activations toward a target behavior (at minimum cost), while accounting for how each nudge propagates forward through layers.

This reframing is not exactly new, as a handful of earlier papers have already taken a control-theoretic view of steering.

What is new here is what the authors find when they actually look at the internal geometry of these layers, and it is the finding that makes the rest of the method possible.

---

#### Transformers Are Locally Linear

Transformer blocks are nonlinear, as Attention and MLPs are full of nonlinear operations like softmax, layer norm, and gated activations.

But they actually demonstrate something called local linearity.

If you compute the Jacobian of a given layer’s function (the "local slope") at various activations produced from different prompts, those Jacobians point in remarkably similar directions.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/f9645e30-2f47-4045-9dd7-3e712157bc6d/LLM_Activation_Steering__5_.png)

A transformer layer can have a consistent personality because it creates activations roughly the same way whether the input was about dogs, football, or code.

The authors formalize this with a top-m subspace similarity score between two matrices, W and X:

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/c23c18df-3117-493d-b48f-07556eedcd42/image.png)

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/3c0942f9-49ec-4df6-88d3-b06ed641cf82/image.png)

Here, Σ(m) and U(m) are the top-m singular values and vectors of each Jacobian, and || · ||* is the nuclear norm.

- A score near 1 means the two Jacobians share the same dominant directions; a score near 0 means they barely overlap.

Randomly sampled Jacobians at the same layer reach similarity scores around 0.8 in early and late layers across eight open-source model families, including Gemma-2, Qwen-2.5, Llama-3, and more.

This also shows that prompts about the same concept align even more tightly.

This matters practically because it means you do not need to recompute an expensive Jacobian for every single input during generation.

You can compute a representative one offline (once) and reuse it as a good approximation everywhere.

That turns an intractable nonlinear control problem into a much friendlier [linear time-varying (LTV)](https://en.wikipedia.org/wiki/Time-variant_system?utm_source=newsletter.aibutsimple.com&utm_medium=referral&utm_campaign=a-simple-guide-to-llm-activation-steering-with-control-systems) one, which is exactly one of the settings that classical control theory was built for.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/cd0fd8cb-cb67-4081-9e9a-dbf31ec990b7/image.png)

Figure from the paper

---

#### Using Activation-LQR to Close the Loop

With a linear approximation of the dynamics and a target to chase (how strongly a feature like toxicity or truthfulness should show up), the paper plugs both into the classical LQR machinery.

LQR minimizes a cost that trades off tracking error (Q, how far you are from the goal) against control effort (R, how hard you are pushing to get to the goal).

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/9e6c5295-ed4b-4660-816e-7ca6ed22250d/image.png)

A fixed steering vector pushes the same amount no matter what.

A-LQR pushes harder when the model is far from the target and eases off as it gets close, reacting to the real, currently observed activation.

![](https://media.beehiiv.com/cdn-cgi/image/fit=scale-down,width=1200,format=auto,onerror=redirect,quality=80/uploads/asset/file/7666f23c-83d4-4cbf-8541-c31b1d5e79bc/LLM_Activation_Steering__6_.png)

There’s some interesting math that produces a feedback gain Kk at every layer, telling the controller how hard to push given the current gap to target. We’ll also define something called a linear feature setpoint (LFS). Deeper dives can be found with [PRO](https://www.aibutsimple.com/pro?utm_source=newsletter.aibutsimple.com&utm_medium=referral&utm_campaign=a-simple-guide-to-llm-activation-steering-with-control-systems).

The gains Kk can be precomputed and reused thanks to local linearity, so this closed-loop behavior costs almost nothing extra at inference time beyond a few extra matrix multiplications per layer.

The authors also derive a formal bound on how far the tracking error can drift given the linearization error.

- They show empirically, on Gemma-2-2B, that real closed-loop rollouts stay comfortably inside that theoretical worst case across all 26 layers.

---

#### Does It Actually Work?

The authors showed that across eight models ranging from 1B to 70B parameters, A-LQR consistently outperforms 7 baselines (Inference-Time Intervention, Activation Addition, etc.) on toxicity mitigation and truthfulness.

A sample of the toxicity results, measured on 1,000 Real Toxicity Prompts samples per model, is presented in the below table:

| Model | Baseline toxicity | Best other method | A-LQR toxicity |
| --- | --- | --- | --- |
| Gemma-2-2B | 4.16% | 0.50% (Mean-AcT) | 0.18% |
| Llama-3-8B | 5.14% | 0.56% (ActAdd) | 0.12% |
| Qwen-2.5-14B | 3.26% | 0.16% (ActAdd) | 0.12% |

This is roughly a 20x to 40x reduction in toxic outputs compared to the unsteered model, while keeping Dist-n diversity scores and MMLU accuracy close to baseline.

This means the model is not just going silent or incoherent to avoid saying something toxic.

---

#### Conclusion

The core idea of the paper is that, while transformers may be nonlinear overall, they are locally linear enough to behave predictably such that decades-old control theory equations can steer them consistently.

That is an interesting bridge between two fields that don’t cross paths much, but as with developments in AI, a lot of new combined research such as this is emerging, helping us make better AI models.

---

Here's a special thanks to our [biggest supporters](https://www.aibutsimple.com/upgrade?utm_source=newsletter.aibutsimple.com&utm_medium=referral&utm_campaign=a-simple-guide-to-llm-activation-steering-with-control-systems):

- Sushant Waidande
- Sai Krishna Pashapu (AI Developer, BTech, [LinkedIn](https://www.linkedin.com/in/sai-krishna-pashapu-997358283/?utm_source=newsletter.aibutsimple.com&utm_medium=referral&utm_campaign=a-simple-guide-to-llm-activation-steering-with-control-systems), [GitHub](https://github.com/saikrishna-pashapu?utm_source=newsletter.aibutsimple.com&utm_medium=referral&utm_campaign=a-simple-guide-to-llm-activation-steering-with-control-systems))
- Bob Boncella
- Demet Yazici
- Imran Khan

---

If you enjoy our content, consider supporting us so we can keep doing what we do. Please share this with a friend!

Want to reach 10000+ AI researchers? Advertising Inquiries:

[WORK WITH US 📈](https://tally.so/r/A7Dgdk?utm_source=newsletter.aibutsimple.com&utm_medium=referral&utm_campaign=a-simple-guide-to-llm-activation-steering-with-control-systems)

Feedback or inquiries? Send us an email at [edwin@aibutsimple.com](mailto:edwin@aibutsimple.com).

---

That's it for this week's issue of AI, but simple. See you next week!

—AI, but simple team
