Reproduce “In-context Vectors: Making In Context Learning More Effective and Controllable Through Latent Space Steering” 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
Sheng Liu, Haotian Ye, Lei Xing, James Zou
Researchers at Stanford University developed In-Context Vectors (ICVs), an inference-only method that encodes task information from demonstrations into a single latent vector to steer large language models. This approach significantly enhanced performance in tasks like language detoxification (reducing toxicity by 45-50%) and style transfer, while offering quantitative control over task application and demonstrating the ability to jailbreak safety-aligned models with a 99% attack success rate.
Key insights
- In-context learning can be effectively re-framed as latent space steering by directly manipulating internal activations rather than relying solely on prompt engineering.
- Applying In-Context Vectors consistently across all layers of the Transformer architecture is crucial for robust task adaptation.
- In-Context Vectors exhibit arithmetic properties, allowing for the combination or reversal of multiple behavioral traits.
Summary by alphaXiv.
Tip: change arxiv.org to autoarxiv.org in any arXiv abstract link to open the paper here.