Table of Contents
Fetching ...

In-Distribution Steering: Balancing Control and Coherence in Language Model Generation

Arthur Vogels, Benjamin Wong, Yann Choho, Annabelle Blangero, Milan Bhan

TL;DR

This work introduces In-distribution Steering (IDS), an adaptive activation-steering method that adjusts steering strength at inference time according to the input’s position within learned activation distributions. IDS builds contrastive activation models, reduces dimensionality with PCA, and uses Mahalanobis distance to keep interventions in-distribution, yielding a closed-form solution for the steering factor and selective layer application. Across six decoder models and seven datasets, IDS achieves strong steering performance (SPI) while maintaining text plausibility (low perplexity), outperforming CAA and MERA and avoiding the instability seen with fixed-strength methods. The approach enables precise, robust control of LLM behavior in both single-token predictions and open-ended generation, with practical implications for safety and reliability in real-world deployments.

Abstract

Activation steering methods control large language model (LLM) behavior by modifying internal activations at inference time. However, most existing activation steering methods rely on a fixed steering strength, leading to either insufficient control or unadapted intervention that degrades text plausibility and coherence. We introduce In-Distribution Steering (IDS), a novel method that adapts steering strength based on the input data distribution in representation space. IDS dynamically adjusts interventions according to how far a given input lies within the distribution, enabling adaptive intervention and generation stability during text generation. Experiments demonstrate that IDS achieves strong accuracy on classification tasks while producing coherent text without collapse, making IDS particularly well suited for real-world applications.

In-Distribution Steering: Balancing Control and Coherence in Language Model Generation

TL;DR

This work introduces In-distribution Steering (IDS), an adaptive activation-steering method that adjusts steering strength at inference time according to the input’s position within learned activation distributions. IDS builds contrastive activation models, reduces dimensionality with PCA, and uses Mahalanobis distance to keep interventions in-distribution, yielding a closed-form solution for the steering factor and selective layer application. Across six decoder models and seven datasets, IDS achieves strong steering performance (SPI) while maintaining text plausibility (low perplexity), outperforming CAA and MERA and avoiding the instability seen with fixed-strength methods. The approach enables precise, robust control of LLM behavior in both single-token predictions and open-ended generation, with practical implications for safety and reliability in real-world deployments.

Abstract

Activation steering methods control large language model (LLM) behavior by modifying internal activations at inference time. However, most existing activation steering methods rely on a fixed steering strength, leading to either insufficient control or unadapted intervention that degrades text plausibility and coherence. We introduce In-Distribution Steering (IDS), a novel method that adapts steering strength based on the input data distribution in representation space. IDS dynamically adjusts interventions according to how far a given input lies within the distribution, enabling adaptive intervention and generation stability during text generation. Experiments demonstrate that IDS achieves strong accuracy on classification tasks while producing coherent text without collapse, making IDS particularly well suited for real-world applications.
Paper Structure (41 sections, 19 equations, 12 figures, 3 tables)

This paper contains 41 sections, 19 equations, 12 figures, 3 tables.

Figures (12)

  • Figure 1: Aggregated comparison of IDS to competitors, per model. High SPI indicated high steering performance, low perplexity indicates plausible text.
  • Figure 2: Two scenarios for finding the optimal $\alpha$: - The largest $\alpha$ while staying in-distribution - The $\alpha$ that minimizes the distance to the distribution
  • Figure 3: Example of the evolution of the steering factor intensity across layers and token positions after applying MERA.
  • Figure 4: Example of the evolution of the steering factor intensity across layers and token positions after applying IDS.
  • Figure 5: Evolution of the Steering Performance with the proportion of variance explained by the principal components
  • ...and 7 more figures