arXiv(opens in a new tab)cs.LGOct 2026Cited by 1 paper on PaperVantage

Manuscript Offprint

arXiv:2610.01062

Kernelized Activation Steering

Laziz U. Abdullaev, Minh-Hieu Pham, Bach Do, Khoat Than, Tan M. Nguyen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Laziz U. Abdullaev ∗^{*}

National University of Singapore

laziz.abdullaev@u.nus.edu

Bach Do

Hanoi University of Science and Technology

bach.dtg225472@sis.hust.edu.vn

Minh-Hieu Pham ∗^{*}

Hanoi University of Science and Technology

hieu.pm220062@sis.hust.edu.vn

Khoat Than

Hanoi University of Science and Technology

khoattq@soict.hust.edu.vn

Tan M. Nguyen

National University of Singapore

tanmn@nus.edu.sg

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.

1 Introduction

Large language models (LLMs) are now known to encode rich semantic concepts such as sentiment, refusal, truthfulness, persona as identifiable structures in their internal representations [53, 29, 3]. A central problem in alignment and controllability is to manipulate these structures at inference time, in order to alter behaviour without the cost or fragility of full fine-tuning. Activation steering [54, 42, 3] has emerged as a particularly practical instrument for this purpose: it modifies a single layer’s activations using a precomputed direction and requires no parameter updates.

The dominant instantiation of this idea is Difference-in-Means (DiM) [42, 54, 3], which estimates the steering direction as the difference between mean activations on a source dataset (behaviour to suppress) and a target dataset (behaviour to elicit). DiM derives both its appeal and its limitations from the linear representation hypothesis (LRH) [36, 32, 5, 14] — the assumption that high-level concepts are encoded as linear directions in activation space. While the LRH has proven surprisingly robust for many tasks, mounting evidence highlights pervasive polysemanticity and curved structure in transformer representations [15, 14], where features cluster along nonlinear manifolds that no

∗^{*}Equal contribution. Correspondence to laziz.abdullaev@u.nus.edu

40th Conference on Neural Information Processing Systems (NeurIPS 2026).

(a) Difference-in-Means

Figure

(b) Kernelized Activation Steering (Ours)

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−μAv = \mu_B - \mu_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 α\alpha recovers the modes. (b) Kernelized activation steering (KAS) produces a data-adaptive vector field that routes each activation to its nearest mode.

single global translation can faithfully capture. As a consequence, DiM-style interventions can be either ineffective on out-of-distribution activations or destructive of unrelated capabilities once the steering coefficient is increased to compensate.

We propose Kernelized Activation Steering (KAS), a framework that retains the simplicity of DiM while relaxing its linear constraint via the kernel trick. We lift activations into a reproducing kernel Hilbert space (RKHS) H, define the feature-space steering direction as the lifted DiM vector, and derive an implicit steering score that depends on the input only through kernel evaluations against the reference sets. Steering then proceeds by gradient ascent on this score with a proximal regulariser that bounds deviation from the original activation. Because kernel gradients themselves depend on the current activation, the resulting update is locally adaptive: KAS attracts activations toward target reference points and repels them from source reference points, producing a nonlinear steering field (see Figure 1). Crucially, KAS recovers DiM exactly under a linear kernel, situating it as a strict generalization rather than an alternative.

Overall, our contributions are threefold:

  1. A nonlinear generalization of activation steering. We formulate activation steering as optimization in an RKHS and derive an implicit steering score that requires only kernel evaluations between the input and the source/target reference sets ( §4\S4). Furthermore, DiM is recovered exactly under the linear kernel (Remark 4.1), unifying classical kernel methods with modern activation-level interventions.

  2. A theoretical bridge between activation steering and kernel two-sample test. We show that the KAS score is the empirical witness function associated with maximum mean discrepancy, connecting activation steering to kernel two-sample testing and explaining how characteristic kernels can detect distributional differences that linear mean-based steering misses.

  3. A locally adaptive RBF instantiation. We instantiate the framework with the Gaussian RBF kernel, yielding a closed-form, activation-dependent gradient update ( §4.3\S4.3).

We evaluate KAS on jailbreak steering across three instruction-tuned LLMs, CAA-style behavioral steering, and text-to-image style control. KAS improves jailbreak attack success over ActAdd on Gemma and Qwen while matching it on Llama, achieves the strongest effects on four CAA behaviors with non-null steering responses, and improves style induction over Mean-Act across most tested intervention strengths while preserving prompt alignment. Additional ablations examine kernel approximation and steering from a single contrastive pair ( §5\S5).

References (53)

  • Concept heterogeneity-aware representation steering
  • Understanding intermediate layers using linear classifier probes (opens arXiv in a new tab)
  • Refusal in language models is mediated by a single direction
  • Linear algebraic structure of word senses, with applications to polysemy
  • Steering large language model activations in sparse spaces
  • LEACE: Perfect linear concept erasure in closed form
  • Reproducing kernel hilbert spaces in probability and statistics
  • Kernel methods for the approximation of nonlinear systems
  • Jailbreakbench: An open robustness benchmark for jailbreaking large language models
  • Microsoft coco captions: Data collection and evaluation server (opens arXiv in a new tab)
  • Fundamental limits of perfect concept erasure (opens arXiv in a new tab)
  • Toy models of superposition
  • Not all language model features are one-dimensionally linear
  • The Pile: An 800GB Dataset of Diverse Text for Language Modeling
  • A kernel two-sample test
  • Clipscore: A reference-free evaluation metric for image captioning
  • Kernel methods in machine learning
  • Kernel density steering: Inference-time scaling via mode seeking for image restoration
  • Catastrophic jailbreak of open-source llms via exploiting generation
  • Are sparse autoencoders useful? a case study in sparse probing
  • Inference-time intervention: Eliciting truthful answers from a language model
  • Generative moment matching networks
  • TruthfulQA: Measuring how models mimic human falsehoods
  • Stein variational gradient descent: A general purpose bayesian inference algorithm
  • The geometry of truth: Emergent linear structure in large language model representations of true/false datasets
  • A standardized evaluation framework for automated red teaming and robust refusal
  • Tdc 2023 (Ilm edition): The trojan detection challenge
  • Linguistic regularities in continuous space word representations
  • Kernel mean embedding of distributions: A review and beyond
  • Steering language model refusal with sparse autoencoders
  • Beyond linear steering: Unified multi-attribute control for language models
  • The linear representation hypothesis and the geometry of large language models
  • tinybenchmarks: evaluating llms with fewer examples
  • Qwen2.5 technical report, 2025
  • Curveball steering: The right direction to steer isn’t always linear (opens arXiv in a new tab)
  • Null it out: Guarding protected attributes by iterative nullspace projection
  • Steering llama 2 via contrastive activation addition
  • Controlling language and diffusion models by transporting activations, 2024
  • Nonlinear concept erasure: a density matching approach (opens arXiv in a new tab)
  • Learning with kernels: support vector machines, regularization, optimization, and beyond
  • Representation surgery: Theory and practice of affine steering
  • Hilbert space embeddings and metrics on probability measures
  • Support Vector Machines
  • Stanford alpaca: An instruction-following llama model
  • Scaling monosemanticity: Extracting interpretable features from claude 3 sonnet
  • The blessing and curse of dimensionality in safety alignment
  • Language models linearly represent sentiment
  • Steering Language Models With Activation Engineering
  • Attention is all you need
  • Understanding reasoning in thinking language models via steering vectors
  • Using the nyström method to speed up kernel machines
  • Representation Engineering: A Top-Down Approach to AI Transparency
  • Universal and transferable adversarial attacks on aligned language models