Beyond Prompt Engineering: Robust Behavior Control in LLMs via Steering Target Atoms

Mengru Wang, Ziwen Xu, Shengyu Mao, Shumin Deng, Zhaopeng Tu, Huajun Chen, Ningyu Zhang

Abstract

Large Language Models (LLMs) are typically controlled via prompt engineering, which is often brittle and susceptible to adversarial attacks. This paper introduces Steering Target Atoms (STA), a novel method for robust behavior control. By utilizing Sparse Autoencoders (SAEs) to disentangle internal representations into monosemantic "knowledge atoms," STA allows for surgical interventions on specific behaviors. Experimental results demonstrate that STA significantly improves safety and jailbreak resistance while maintaining general model capabilities, outperforming traditional prompting and existing steering techniques across multiple benchmarks.

Introduction: The Limits of Prompting

While prompt engineering is the standard way to control LLMs, it is notoriously brittle. A tiny change in a system prompt can lead to unpredictable outputs, and expert-level "jailbreaks" can easily bypass these text-based instructions. The root of the problem is that LLM internal representations are highly entangled—a single neuron might contribute to many different concepts (polysemanticity). Previous attempts to "steer" models by adding vectors to their internal states often caused unintended side effects, such as reduced fluency or degraded general intelligence, because they intervened on these overlapping representations.

Figure 1: Comparison between brittle prompt engineering and robust steering for safety control.

Methodology: Steering Target Atoms (STA)

The authors propose STA, which leverages Sparse Autoencoders (SAEs) to move beyond simple vector addition through a three-step process:

  1. Disentanglement: SAEs project the LLM's dense hidden states into a high-dimensional, sparse space where features (or "atoms") are monosemantic, meaning each corresponds to a single, interpretable concept.
  2. Identifying Target Atoms: To find the right atoms to steer, the researchers compare activations of positive examples (safe answers) against negative examples (unsafe answers). Atoms are selected based on amplitude (activation strength) and frequency (consistency across samples).
  3. Surgical Intervention: Instead of shifting the entire representation, STA only manipulates these specific target atoms before projecting the state back into the original model space. This allows for fine-grained control with minimal "collateral damage" to the model's general capabilities.

Key Insights and Results

Robustness and Attention

Steering is inherently more robust than prompting because it intervenes directly in the computation path. While jailbreaks attempt to make a model "ignore" harmful instructions, steering forces the model to stay focused on the problematic content, triggering a refusal. Remarkably, effective steering vectors can be calculated with as few as 4 examples, whereas prompt engineering often requires extensive manual tuning.

Performance Metrics

On Gemma-2-9B-pt, STA increased the average detoxification rate from 59.97% (vanilla) to 83.45%, significantly outperforming manual prompts (63.24%) and previous steering methods like CAA (79.88%). In adversarial scenarios, STA achieved a 97.56% defense rate on Gemma-2-9B-it.

Figure 6: Detoxification performance (defense rate) and general capability (fluency) across different model layers.

As illustrated in Figure 6, STA maintains high defense rates across various layers while preserving model fluency better than competing methods. This minimal degradation is further confirmed by stable performance on general benchmarks like MMLU and GSM8K.

Reasoning Control

Beyond safety, the authors demonstrated the flexibility of STA by controlling the "Chain of Thought" (CoT) length in reasoning models like DeepSeek-R1. They successfully steered the model to be either more concise or more verbose without sacrificing mathematical accuracy, addressing the "overthinking" problem common in reasoning-heavy models.

Conclusion and Future Work

STA represents a significant step toward more reliable and interpretable LLM control. While currently dependent on the availability of high-quality pre-trained SAEs, the method offers a path toward models that are fundamentally safer and more steerable. Future research will focus on scaling these techniques to frontier models (100B+ parameters) and validating their effectiveness in complex, multi-turn dialogue settings.

Summary updated

BibTeX
@inproceedings{wang2025beyond,
  author = {Mengru Wang and Ziwen Xu and Shengyu Mao and Shumin Deng and Zhaopeng Tu and Huajun Chen and Ningyu Zhang},
  title = {{Beyond Prompt Engineering: Robust Behavior Control in LLMs via Steering Target Atoms}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure