Kernelized Activation Steering

Laziz Abdullaev, Minh-Hieu Pham, Bach Do, Khoat Than, Tan Minh NguyenNeurIPS 2026

TL;DR

Standard activation steering nudges a generative model’s behavior by adding a single, fixed vector to its internal states—like trying to navigate a winding mountain road by locking your steering wheel at one angle. Kernelized Activation Steering (KAS) replaces that rigid translation with a locally adaptive vector field using the classic kernel trick. Without training a single parameter, KAS guides each activation along the curved geometry of representation space toward its nearest target behavior while preserving the model's general capabilities.

What Problem Does This Paper Address?

Suppose you want an LLM to stop refusing benign-looking prompts, or an image generator to paint in a cyberpunk style, all without the expense and fragility of fine-tuning. Activation steering achieves this at inference time by modifying hidden activations at a chosen layer.

The workhorse of this field is Difference-in-Means (DiM). You feed the model "source" prompts (behavior to suppress) and "target" prompts (behavior to elicit), take the difference between their average activations, and add that fixed vector to every future input.

DiM leans heavily on the linear representation hypothesis—the assumption that high-level concepts live along neat, straight lines in activation space. Yet mounting evidence shows that neural representations often curve along nonlinear manifolds or split into multiple distinct modes. If a target concept has two separate clusters surrounding a source cluster, averaging them points straight into an empty "dead zone" in the middle. Crank up the steering strength to compensate, and you push activations off the manifold entirely, wrecking model coherence.

Figure 1: An illustrative comparison between standard Difference-in-Means (DiM) and Kernelized Activation Steering (KAS). Source activations (orange) lie between two target modes (blue). (a) DiM applies a single global translation v = µB −µA, sending every activation into the saddle between the modes, a region with no semantic content under either target behaviour. No choice of steering strength α recovers the modes. (b) Kernelized activation steering (KAS) produces a data-adaptive vector field that routes each activation to its nearest mode.

Methods

Instead of forcing a linear push in raw activation space, the authors lift the problem into a high- (or infinite-) dimensional Reproducing Kernel Hilbert Space (RKHS), where nonlinear structures untangle and behave linearly.

Using the kernel trick—computing inner products in high-dimensional space purely via a similarity function $k(\mathbf{x}, \mathbf{y})$—KAS defines an implicit steering score $\Pi(\mathbf{x})$ that measures how aligned an activation $\mathbf{x}$ is with the target set relative to the source set. Steering then becomes a quick optimization problem: take one (or a few) normalized gradient ascent steps on $\Pi(\mathbf{x})$ at inference time, optionally regularized to keep $\mathbf{x}$ close to its starting point.

The authors instantiate KAS using the Gaussian Radial Basis Function (RBF) kernel, where similarity decays smoothly with Euclidean distance (picking the bandwidth automatically via the parameter-free median heuristic). Taking the gradient of the RBF score yields an intuitive physical picture: target reference points exert localized attractive forces on $\mathbf{x}$, while source reference points exert localized repulsive forces, weighted by proximity. Crucially, if you swap the RBF kernel for a simple linear kernel, KAS mathematically collapses back into standard DiM.

Datasets

No new benchmarks are introduced; KAS is evaluated across standard safety, behavioral, and multimodal datasets:

  • LLM Jailbreaking & Utility: Reference sets are drawn from AdvBench, MaliciousInstruct, TDC2023, HarmBench (harmful), and Alpaca (harmless). Testing uses JailbreakBench, TinyBenchmarks (tArc, tHella, tMMLU, tQA, tWino), Alpaca, and the Pile.
  • Behavioral Steering: Contrastive Activation Addition (CAA) multiple-choice datasets covering AI Coordination, Corrigibility, Hallucination, Myopic Reward, Survival Instinct, and Sycophancy.
  • Image Style Control: Microsoft COCO Captions (augmented with Llama-3-generated style tags for FLUX.1 diffusion steering).

Key Insights and Ideas

  • Steering meets hypothesis testing: The authors prove that the KAS steering score is mathematically identical to the empirical witness function of Maximum Mean Discrepancy (MMD), a classic statistical test used to tell two probability distributions apart. Whereas two-sample testing collapses this witness into a single number, KAS ascends its gradient—guaranteeing a steering signal with characteristic kernels (like RBF) even when two distributions share the exact same mean.
  • Extreme data efficiency: Nonlinear methods usually starve in low-data regimes (for instance, a kernel-PCA baseline struggled with just 256 reference samples). Remarkably, KAS works even with a single contrastive prompt pair, maintaining much lower perplexity (better text fluency) than linear steering because its localized forces vanish before pushing tokens into out-of-distribution territory.

Key Results

  • Jailbreaking LLMs: Under a strict validation perplexity cap ($\le 1.05\times$ unsteered), KAS achieves 96.00% Attack Success Rate (ASR) on Qwen2.5-7B and 86.00% on Gemma-2-9B—beating linear ActAdd by 5 and 10 percentage points respectively, with slightly lower perplexity. On Llama-3.1-8B, it ties ActAdd at 94.00% ASR.
  • CAA Behavioral Control: On Gemma-2-9B under a discouraging system prompt, KAS outperforms linear steering on all four responsive behaviors, jumping ahead by +9.63, +11.04, and +8.92 percentage points on Corrigibility, Hallucination, and Myopic Reward.
  • Diffusion Style Control: Steering FLUX.1 toward a cyberpunk aesthetic, KAS achieves higher zero-shot style classification scores than Mean-AcT across most intervention strengths—hitting near-1.0 style accuracy around $\eta=1$ while maintaining high prompt alignment (CLIPScore).
Figure 3: Style induction and content preservation (y-axis) for cyberpunk style control under increasing interven- tion strength η (x-axis). Left: 0-shot style-classification score, where higher is better. Right: CLIPSCORE with the original prompt, measuring content preservation.

Limitations and Future Work

  • Uniform compute per token: KAS applies the same number of gradient steps to every token, wasting compute on activations already near the target mode while potentially under-steering harder ones. Token-adaptive compute schedules are a natural next step.
  • Kernel approximation trade-offs: Attempting to speed up KAS via Nyström landmark approximation degraded jailbreak ASR significantly (e.g., dropping from 94% to 3% on Llama-3.1), though it slightly boosted two CAA tasks—leaving fast, universal approximations an open problem.
  • Principled kernel selection: While Gaussian RBF serves as a strong default, systematically matching kernel families to specific tasks and layer geometries remains unexplored.

Summary updated

Abstract

Activation steering provides a simple, training-free mechanism for controlling attributes of generative models such as sentiment, style, and helpfulness. However, standard approaches such as Difference-in-Means apply a single input-independent steering vector across all activations, limiting expressivity and ignoring the local geometry of the activation space. We propose Kernelized Activation Steering (KAS), a unifying framework that lifts activation steering into a reproducing kernel Hilbert space. KAS formulates steering as an optimization problem expressed purely via kernel evaluations, yielding an implicit, activation-dependent steering score without constructing explicit feature maps. Unlike DiM, KAS induces locally adaptive steering: each activation is modified according to its relative position with respect to source and target reference sets, producing a nonlinear steering field over the representation space. Importantly, DiM is recovered as a special case under a linear kernel, while richer kernels enable geometry-aware interventions. Across standard activation steering tasks, including jailbreaking LLMs and image style control, KAS outperforms or is on par with the existing methods.
BibTeX
@inproceedings{abdullaev2026kernelized,
  author = {Laziz Abdullaev and Minh-Hieu Pham and Bach Do and Khoat Than and Tan Minh Nguyen},
  title = {{Kernelized Activation Steering}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=F4iCxDrUbU},
}
Figure