Improving Instruction-Following in Language Models through Activation Steering

Alessandro Stolfo, Vidhisha Balachandran, Safoora Yousefi, Eric Horvitz, Besmira Nushi
2/12/2026

Official code: microsoft/llm-steer-instruct (96 stars, MIT, last commit 2026-04-18).

Abstract

The ability to follow instructions is crucial for numerous real-world applications of language models. In pursuit of deeper insights and more powerful capabilities, we derive instruction-specific vector representations from language models and use them to steer models accordingly. These vectors are computed as the difference in activations between inputs with and without instructions, enabling a modular approach to activation steering. We demonstrate how this method can enhance model adherence to constraints such as output format, length, and word inclusion, providing inference-time control over instruction following. Our experiments across four models demonstrate how we can use the activation vectors to guide models to follow constraints even without explicit instructions and to enhance performance when instructions are present. Additionally, we explore the compositionality of activation steering, successfully applying multiple instructions simultaneously. Finally, we demonstrate that steering vectors computed on instruction-tuned models can transfer to improve base models. Our findings demonstrate that activation steering offers a practical and scalable approach for fine-grained control in language generation. Our code and data are available at https://github.com/microsoft/llm-steer-instruct.

View on arXivView PDF

Code Implementations(1)

MIT

A method for steering llms to better follow instructions

9616Shell, PythonAug 28, 20246 months agoMIT

Similar Papers

Cite this paper

@article{stolfo2026improving,
  title  = {Improving Instruction-Following in Language Models through Activation Steering},
  author = {Alessandro Stolfo and Vidhisha Balachandran and Safoora Yousefi and Eric Horvitz and Besmira Nushi},
  year   = {2026},
  eprint = {2410.12877},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2410.12877},
  journal = {ICLR 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2410.12877.svg)](https://codeofpaper.com/paper/2410.12877)

Discussion