Papers
Topics
Authors
Recent
Search
2000 character limit reached

Context Steering: Controllable Personalization at Inference Time

Published 2 May 2024 in cs.CL and cs.AI | (2405.01768v3)

Abstract: To deliver high-quality, personalized responses, LLMs must effectively incorporate context -- personal, demographic, and cultural information specific to an end-user. For example, asking the model to explain Newton's second law with the context "I am a toddler" should produce a response different from when the context is "I am a physics professor". However, leveraging the context in practice is a nuanced and challenging task, and is often dependent on the specific situation or user base. The model must strike a balance between providing specific, personalized responses and maintaining general applicability. Current solutions, such as prompt-engineering and fine-tuning, require collection of contextually appropriate responses as examples, making them time-consuming and less flexible to use across different contexts. In this work, we introduce Context Steering (CoS) -- a simple, training-free decoding approach that amplifies the influence of the context in next token predictions. CoS computes contextual influence by comparing the output probabilities from two LLM forward passes: one that includes the context and one that does not. By linearly scaling the contextual influence, CoS allows practitioners to flexibly control the degree of personalization for different use cases. We show that CoS can be applied to autoregressive LLMs, and demonstrates strong performance in personalized recommendations. Additionally, we show that CoS can function as a Bayesian Generative model to infer and quantify correlations between open-ended texts, broadening its potential applications.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (36)
  1. PENS: A dataset and generic framework for personalized news headline generation. In Chengqing Zong, Fei Xia, Wenjie Li, and Roberto Navigli (eds.), Proceedings of the 59th Annual Meeting of the Association for Computational Linguistics and the 11th International Joint Conference on Natural Language Processing (Volume 1: Long Papers), pp.  82–92, Online, August 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.acl-long.7. URL https://aclanthology.org/2021.acl-long.7.
  2. Measuring implicit bias in explicitly unbiased large language models, 2024.
  3. Man is to computer programmer as woman is to homemaker? debiasing word embeddings. In D. Lee, M. Sugiyama, U. Luxburg, I. Guyon, and R. Garnett (eds.), Advances in Neural Information Processing Systems, volume 29. Curran Associates, Inc., 2016. URL https://proceedings.neurips.cc/paper_files/paper/2016/file/a486cd07e4ac3d270571622f4f316ec5-Paper.pdf.
  4. Language models are few-shot learners, 2020.
  5. Crowd-based personalized natural language explanations for recommendations. In Proceedings of the 10th ACM Conference on Recommender Systems, RecSys ’16, pp.  175–182, New York, NY, USA, 2016. Association for Computing Machinery. ISBN 9781450340359. doi: 10.1145/2959100.2959153. URL https://doi.org/10.1145/2959100.2959153.
  6. Latent hatred: A benchmark for understanding implicit hate speech. In Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing, pp.  345–363, Online and Punta Cana, Dominican Republic, November 2021. Association for Computational Linguistics. URL https://aclanthology.org/2021.emnlp-main.29.
  7. Pragmatic language interpretation as probabilistic inference. Trends in cognitive sciences, 20(11):818–829, 2016.
  8. Olmo: Accelerating the science of language models, 2024.
  9. Toxigen: A large-scale machine-generated dataset for adversarial and implicit hate speech detection, 2022.
  10. Mistral 7b, 2023.
  11. Gender biases and where to find them: Exploring gender bias in pre-trained transformer-based language models using movement pruning. In Christian Hardmeier, Christine Basta, Marta R. Costa-jussà, Gabriel Stanovsky, and Hila Gonen (eds.), Proceedings of the 4th Workshop on Gender Bias in Natural Language Processing (GeBNLP), pp.  67–73, Seattle, Washington, July 2022. Association for Computational Linguistics. doi: 10.18653/v1/2022.gebnlp-1.6. URL https://aclanthology.org/2022.gebnlp-1.6.
  12. Debiasing pre-trained contextualised embeddings. In Paola Merlo, Jorg Tiedemann, and Reut Tsarfaty (eds.), Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pp.  1256–1266, Online, April 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.eacl-main.107. URL https://aclanthology.org/2021.eacl-main.107.
  13. Understanding black-box predictions via influence functions, 2020.
  14. Gender bias and stereotypes in large language models. In Proceedings of The ACM Collective Intelligence Conference, CI ’23, pp.  12–24, New York, NY, USA, 2023. Association for Computing Machinery. ISBN 9798400701139. doi: 10.1145/3582269.3615599. URL https://doi.org/10.1145/3582269.3615599.
  15. Towards controllable and personalized review generation, 2020.
  16. Contrastive decoding: Open-ended text generation as optimization, 2023.
  17. Holistic evaluation of language models, 2023.
  18. Generating personalized recipes from historical user preferences, 2019.
  19. Large language models are geographically biased, 2024.
  20. Engagement, user satisfaction, and the amplification of divisive content on social media, 2023.
  21. More human than human: measuring chatgpt political bias. Public Choice, 198, 08 2023. doi: 10.1007/s11127-023-01097-2.
  22. Training language models to follow instructions with human feedback, 2022.
  23. Bbq: A hand-built bias benchmark for question answering, 2022.
  24. Reducing non-normative text generation from language models. In Brian Davis, Yvette Graham, John Kelleher, and Yaji Sripada (eds.), Proceedings of the 13th International Conference on Natural Language Generation, pp.  374–383, Dublin, Ireland, December 2020. Association for Computational Linguistics. doi: 10.18653/v1/2020.inlg-1.43. URL https://aclanthology.org/2020.inlg-1.43.
  25. Direct preference optimization: Your language model is secretly a reward model, 2023.
  26. Lamp: When large language models meet personalization, 2024.
  27. Multitask prompted training enables zero-shot task generalization. CoRR, abs/2110.08207, 2021. URL https://arxiv.org/abs/2110.08207.
  28. Extracting latent steering vectors from pretrained language models, 2022.
  29. How to grow a mind: Statistics, structure, and abstraction. Science, 331(6022):1279–1285, 2011. doi: 10.1126/science.1192788. URL https://www.science.org/doi/abs/10.1126/science.1192788.
  30. Activation addition: Steering language models without optimization, 2023.
  31. Personalised language modelling of screen characters using rich metadata annotations, 2023.
  32. GPT-J-6B: A 6 Billion Parameter Autoregressive Language Model. https://github.com/kingoflolz/mesh-transformer-jax, May 2021.
  33. Compact personalized models for neural machine translation, 2018.
  34. Assessing the potential of gpt-4 to perpetuate racial and gender biases in health care: a model evaluation study. The Lancet Digital Health, 6:e12–e22, 1 2024. ISSN 25897500. doi: 10.1016/S2589-7500(23)00225-X.
  35. Explainable recommendation: A survey and new perspectives. Foundations and Trends® in Information Retrieval, 14(1):1–101, 2020.
  36. Gender bias in contextualized word embeddings. In Jill Burstein, Christy Doran, and Thamar Solorio (eds.), Proceedings of the 2019 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, Volume 1 (Long and Short Papers), pp.  629–634, Minneapolis, Minnesota, June 2019. Association for Computational Linguistics. doi: 10.18653/v1/N19-1064. URL https://aclanthology.org/N19-1064.
Citations (4)

Summary

No one has generated a summary of this paper yet.

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Continue Learning

We haven't generated follow-up questions for this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 3 tweets with 40 likes about this paper.