arXiv(opens in a new tab)cs.CLSep 2026Cited by 2 papers on PaperVantage

Manuscript Offprint

arXiv:2609.01878

GAPS: Dimension-Level Gates for Conditional Activation Steering

Moghis Fereidouni, Muhammad Umair Haider, Hassan Sajjad, A. B. Siddique

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

Abstract

Activation steering suppresses undesired behaviors in language models by adding a steering vector to the hidden state during generation. Recent conditional methods such as CAST and DSAS improve the behavior-capability trade-off by deciding when to intervene, but once active, they apply the full dense vector to all hidden dimensions, regardless of whether a neuron carries concept information or already lies in the desired regime. We introduce dimension-level conditioning as a complementary axis of selectivity that also decides which neurons to intervene on. Our method, GAPS (Gated Activation steering via Posterior and Separability), combines two training-free gates: a static separability gate that restricts steering to neurons with statistically reliable concept information (via AUROC), and a dynamic posterior gate that steers a neuron only when its current activation is better explained by the undesired concept under a Gaussian model. The gates add O(D) overhead per token, and they plug into existing conditional methods. On toxicity mitigation (RealToxicityPrompts) and concept removal (OneSeC) with Gemma-3 (4B) and Qwen-3 (1.7B), GAPS consistently matches or improves the Pareto front of its token-level counterparts; under a fixed capability budget, DSAS+GAPS reduces Gemma-3's toxicity rate from 6.52% to 0.48%, versus 3.52% for DSAS alone. Ablations attribute most of the gain to the posterior gate.

1 Introduction

Language models often need to avoid unwanted outputs, such as toxic continuations or references to a specific concept, but retraining the model for every new constraint is impractical. Activation steering offers a low-cost alternative: a steering vector, typically computed as the mean difference between hidden states collected from examples of desired and undesired behavior, is added to the model's hidden state during generation (Rimsky et al., 2024;

Suau et al., 2024; Rodriguez et al., 2025a,b). This approach requires no gradient updates and adds little inference cost. However, conventional activation steering applies the same dense vector at every generation step, regardless of whether the current context warrants intervention. Interventions can therefore degrade fluency and downstream accuracy. Steering methods are best compared by the trade-off they achieve between behavior change and capability loss.

Recent work improves this trade-off by deciding when to intervene: token-level conditional methods such as CAST (Lee et al., 2025) and DSAS (Ferrando et al., 2025) gate or scale the intervention based on the current context, intending to leave benign generation largely untouched; related approaches use probes or lightweight controllers to trigger, scale, or calibrate the intervention (Li et al., 2025; Wang et al., 2025a; Cheng et al., 2025; Hegazy et al., 2026).

However, whether conditional or not, the intervention itself remains dense in space: whenever steering is applied, the full vector is added to all DD neurons of the hidden state. We posit that this is more than the task requires, for two reasons. First, many neurons carry little or no information about the concept, so shifting them cannot suppress the undesired behavior and only perturbs the representation. Second, a neuron that does encode the concept may already be in the desired regime at the current step; pushing a non-toxic activation further in the non-toxic direction does not make the output less toxic, but it does move the representation away from the model's familiar activation distribution.

In this work, we add a second axis of conditioning. Token-level methods decide when to intervene; we also dynamically decide which neurons in the hidden state to intervene on, with the goal of changing the hidden state no more than the steering objective requires. We do this with two dimension-level gates (Figure 1). The first, a static separability gate, restricts steering to only the neurons that carry discernible information about the target concept. For each neuron, we measure how well its activations separate the two concepts with the Area under the ROC, and keep the neuron only if separable enough. The second, a dynamic posterior gate, decides at each generation step whether a neuron is currently expressing the undesired behavior. We model the concept-conditional activation distribution of each neuron as a Gaussian and steer a neuron only if its current activation is more likely under the undesired concept than under the desired one.

The separability gate is computed once from the contrastive data and fixes the set of neurons that can encode the behavior at all. The posterior gate is evaluated at every generation step and decides whether those neurons are currently expressing the undesired behavior. We refer to the combined gates as GAPS (Gated Activation steering via Posterior and Separability). GAPS strictly generalizes prior methods: with both dimension-level gates set to one, it reduces to CAST or DSAS, and with the token-level gate also set to one, it reduces to unconditional steering. The gates cost O(D)O(D) elementwise operations per token, the same order as the steering vector addition itself, so dimension-level conditioning adds only a constant-factor overhead to canonical steering, and all required statistics are estimated from the same contrastive activations used to construct the steering vector.

We evaluate on toxicity mitigation with RealToxicityPrompts (Gehman et al., 2020) and concept removal over seven OneSeC concepts (Scarlini et al., 2019), using Gemma-3 (4B) and Qwen-3 (1.7B) with CAST and DSAS as token-level baselines, sweeping the intervention strength to trace the trade-off against Wikipedia perplexity and MMLU (Wikimedia Foundation; Hendrycks et al., 2021). Across all eight combinations of model, token-level method, and task, GAPS matches or improves the Pareto front of its token-level counterpart. Under a fixed capability budget, DSAS+GAPS lowers Gemma-3's toxicity rate from 6.52% to 0.48%, versus 3.52% for DSAS alone. Ablations attribute most of the gain to the posterior gate, with the separability gate a cheap complement: the strongest operating point requires both.

Our contributions are as follows:

  • We introduce dimension-level conditioning as a second axis of selectivity in activation steering: beyond deciding when to steer, we dynamically decide which neurons to steer.

  • We propose GAPS, a pair of training-free gates: a static separability gate that restricts steering to neurons with reliable concept information, and a dynamic posterior gate that steers a neuron only when its activation is better explained by the undesired concept. GAPS plugs into existing conditional methods and strictly generalizes them.

  • Across two models, two token-level methods, and two tasks, GAPS consistently matches or improves the Pareto front of its token-level counterparts; ablations attribute most of the gain to the posterior gate.

References (25)

  • Alex Ferrando, Xavier Suau, Jordi González, and Pau Rodriguez. 2025. Dynamically scaled activation steering. arXiv preprint arXiv:2512.03661. (opens arXiv in a new tab)
  • Hanley and Barbara J. McNeil
  • Array programming with numpy
  • Scikit-learn: Machine learning in python
  • Scipy 1.0: fundamental algorithms for scientific computing in python
  • Qwen3 Technical Report
  • 4, with the Gaussian densities of Eq
  • 9 is one squared difference and one division per neuron
  • For each of the seven OneSeC concepts—football, cloud, baby, church, book, flower, and balloon—we provide the classifier with the corresponding WordNet definition and the generated continuation
  • The exact prompt is:
  • Answer only with 'yes' or 'no'
  • Each panel compares unconditional steering (dashed), the token-level conditional baseline (CAST, left; DSAS, right), and the same baseline augmented with our dimension-level gates (+GAPS)
  • At moderate intervention strengths, unconditional steer-
  • At large $\alpha$, however, their performance drops steeply, while the GAPS variants degrade more slowly at high intervention strengths
  • Because the token-level gates already leave little capability on the table, adding our dimension-level gates yields no further gain here: the +GAPS variants perform nearly identically to their token-level counterparts
  • Adding the dimension-level gates improves both families, with CAST+GAPS and DSAS+GAPS retaining clearly higher MMLU than their token-level counterparts at matched removal levels for low to moderate intervention strengths
  • (contrastive data, steering vectors, gate statistics, and evaluation setup are all recomputed at the new layer)
  • This is expected under our formulation: both gates are estimated directly from the contrastive activations of whichever layer is steered, so the separability statistics and concept-conditional Gaussians adapt automatically to the chosen layer
  • google/gemma-3-4b-it) and the Qwen-3 model with 1.7 billion parameters (Hugging Face name: Qwen/Qwen3-1.7B)
  • Figures 3 and 5 additionally report $\pm 1$ standard error of the mean across the OneSeC concepts
  • We then select operating points under two protocols
  • Below the band, at $\tau_z = 6$, fixed-budget toxicity rises to $0.56\%$ and the budget-averaged toxicity to $0.77 \pm 0.30\%$: a lower threshold admits weakly informative dimensions
  • We fix $\tau_z = 7$ for
  • >$\tau_z$</td><td colspan=
  • Left: operating point under the fixed capability budget of the main results (perplexity $\leq +5\%$, MMLU $\geq -3\%$; unsteered baseline)