Reproduce “Extracting Latent Steering Vectors from Pretrained Language Models” on OpenResearch

Turn your favorite coding agents into research agents that review literature, develop hypotheses, and run experiments.

Universal app for Apple silicon and Intel. Requires macOS 11 or later.

About this paper

Nishant Subramani, Nivedita Suresh, Matthew E. Peters

This research from AI2 and Arrive Bio introduces a method for controlling frozen pretrained language models by extracting and injecting fixed-length 'steering vectors' into their hidden states. The approach enables near-perfect sentence recovery and effective unsupervised style transfer using vector arithmetic, demonstrating that precise control can be achieved by leveraging the models' inherent latent capabilities.

Key insights

  • Middle layers of transformer models are optimal control points for manipulating text generation, indicating they robustly encode high-level semantic and stylistic information.
  • The latent space of extracted steering vectors is semantically meaningful and continuous, allowing for smooth interpolations and vector arithmetic for style transfer.
  • Steering vectors primarily leverage the language model's inherent linguistic knowledge rather than merely memorizing sequences, particularly when injected early in the decoding process.

Summary by alphaXiv.

Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.