Research map / Large language models / Instruction and fine-tuning
Context Steering: Controllable Personalization at Inference Time
Read the paperCheck your idea against 108,967 papers
AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.
Introduces Context Steering (CoS), a training-free decoding method that linearly scales the difference between next-token logits with and without a user context to control personalization, and uses it for Bayesian inference over tone and implicit hate intent.
Problem
LLMs need to incorporate user context (personal, demographic, cultural) for personalized responses, but balancing personalization with general applicability usually requires collecting data and fine-tuning or prompt engineering, which are costly and inflexible.
Approach
Compute a contextual influence as the difference between LLM next-token logits with the context and without it, then add a scaled version (lambda) back to the context-conditioned logits, so lambda continuously amplifies or attenuates context at inference time; the same forward-model likelihoods are inverted via Bayesian inference to infer lambda or the context.
Key results
- In a 15-participant user study over 70 responses, average personalization score rose with lambda (Spearman rho=.67, p<.001).
- On implicit hate classification with lambda=-0.5, CoS is used to pick the most likely implied statement; CoS ratings of hatefulness correlate better with human expert ratings than GPT-based ratings (p=0.0295).
- On OpenbookQA with Llama-2-7B, higher lambda (lambda=3) reduces factual accuracy by at most 4.6%.
Measured effects reported in the paper
| What was changed | Where | Measured | Effect |
|---|---|---|---|
| Use an intermediate context weight (λ=-0.5 instead of no context, λ=-1) (ablation) | CoS on LaMP tweet paraphrasing · LaMP tweet paraphrase held-out set | Rouge-1: 0.40 -> 0.42 | Helped |
| Use an intermediate context weight (λ=-0.5 instead of no context, λ=-1) (ablation) | CoS on LaMP tweet paraphrasing · LaMP tweet paraphrase held-out set | Rouge-L: 0.35 -> 0.36 | Helped |
| Use higher λ values from -0.5 to 0.2 (ablation) | CoS on LaMP tweet paraphrasing · LaMP tweet paraphrase held-out set | Rouge-1: 0.42 -> 0.36 | Hurt |
| Use higher λ values from -0.5 to 0.2 (ablation) | CoS on LaMP tweet paraphrasing · LaMP tweet paraphrase held-out set | Rouge-L: 0.36 -> 0.30 | Hurt |
| Increase λ to amplify user context (ablation) | CoS movie summarization · Personalized movie recommendations user study | personalization score: ρ=.67, p<.001 | Helped |
| Use CoS rather than asking the model to paraphrase with the profile context (ablation) | CoS · OpenbookQA | accuracy: ≤ 4.6% when λ=3 | Hurt |
| Vary λ from 0.0 to 1 (ablation) | CoS open-ended generation · Open-ended generation across encyclopedia, science fiction, news, and poem prompts | coherence | No clear effect |
| Vary λ from 0.0 to 1 (ablation) | CoS open-ended generation · Open-ended generation across encyclopedia, science fiction, news, and poem prompts | diversity | No clear effect |
| Inject context at different positions in the prompt (ablation) | CoS · Prompt with 22 sentences | ROUGE-1 and ROUGE-L similarity to context-at-start generation | No clear effect |
| Use a negative λ with a negative context instead of a positive λ with a positive context (ablation) | CoS STEM proficiency personalization · Newton's second law explanation | contextual steering strength | Hurt |
Surprising findings
- Negative lambda with a negated context (low STEM proficiency) does not produce the effect of the opposite positive context, suggesting inversion in embedding space lacks clear meaning.
- Context steering at lambda=-0.5 or -0.2 outperforms lambda=0 (plain context prepending) on LaMP tweet paraphrasing, indicating attenuated context helps when context is long and noisy.
Limitations
- Composability across multiple context regions is unclear; the paper extends to multiple contexts only briefly.
- Effect of context may diminish on long input sequences since context is prepended to the prompt.
- Numerical instability and degenerate text at extreme lambda values (e.g., lambda >= 4 or very negative).
Experimental setup
Datasets: Implicit Hate Dataset OpenbookQA LaMP
Benchmarks: Implicit Hate Dataset OpenbookQA LaMP
Metrics: GPT win rate personalization Likert score Spearman correlation classification accuracy Rouge-1 Rouge-L coherence diversity
Baselines: multi-turn Q&A in-context learning LLM-based hate rating GPT-4 pairwise evaluation
Builds on: contrastive decoding steering vectors
Closest papers by meaning
- Rethinking Personalization in Large Language Models at the Token Level (ICML 2026 · similarity 0.88)
- Supervised Knowledge Makes Large Language Models Better In-context Learners (ICLR 2024 · similarity 0.87)
- Quantifying the Plausibility of Context Reliance in Neural Machine Translation (ICLR 2024 · similarity 0.87)
- Personalized Steering of Large Language Models: Versatile Steering Vectors Through Bi-directional Preference Optimization (NeurIPS 2024 · similarity 0.87)
- Generative Adapter: Contextualizing Language Models in Parameters with A Single Forward Pass (ICLR 2025 · similarity 0.87)
- Steering When Necessary: Flexible Steering Large Language Models with Backtracking (NeurIPS 2025 · similarity 0.87)
Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.
