paper-with-me

홈 › Papers

Representation Tuning

2024-09-11 · Christopher M. Ackerman

Activation engineering is becoming increasingly popular as a means of online control of large language models (LLMs). In this work, we extend the idea of inference-time steering with vectors that represent a behavioral direction of interest to tuning those vectors directly into the model, obviating the need for online control. First, we identify activation vectors related to honesty in an open-source LLM (Llama-2-13b-chat). Next, we demonstrate that model output can be made more or less honest by adding positive or negative multiples of these vectors to residual stream activations during generation. Then, we show that a similar effect can be achieved by fine-tuning the vectors directly into the model, by use of a dual loss function based on the cosine similarity of residual stream activations to the vectors combined with a standard token-based loss ("representation tuning"). Finally, we compare the generations in response to honesty-probing prompts from the resulting models to those from models fine-tuned with a token-based loss alone, and to those from the untuned model subjected to online steering. Overall, fine-tuning the vectors into the models using the cosine similarity plus token loss showed a stronger effect than online steering, and generalized better than using the standard loss, suggesting the potential utility of this approach as a safety measure. Code and data are available at https://github.com/cma1114/representation_tuning. Tuned models are available at https://huggingface.co/collections/cackerman/representation-tuning-66da1e5ab41cd1b824687d9f.

📄 PDF Abstract BibTeX arXiv:2409.06927

Code (1)

cma1114/representation_tuning 공식 구현 pytorch

Similar Papers 제목 키워드 기반

Improving language models fine-tuning with representation consistency targets

2022-01-16 · ACL ARR January 2022 1 · Anonymous

Fine-tuning contextualized representations learned by pre-trained language models has become a standard practice in the NLP field. However, pre-trained representations are prone to degradation (also known as representati…

A Closer Look at How Fine-tuning Changes BERT

2021-06-27 · ACL 2022 5 · Yichu Zhou, Vivek Srikumar

Given the prevalence of pre-trained contextualized representations in today's NLP, there have been many efforts to understand what information they contain, and why they seem to be universally successful. The most common…

Keeping Representation Similarity in Finetuning for Medical Image Analysis

2025-03-10 · Wenqiang Zu, Shenghao Xie, Hao Chen, Yiming Liang 외

Foundation models pretrained on large-scale natural images have been widely used to adapt to medical image analysis through finetuning. This is largely attributed to pretrained representations capturing universal, robust…

image-classificationImage ClassificationMedical Image AnalysisMedical Image Classification

Human-Guided Complexity-Controlled Abstractions

2023-09-21 · NeurIPS 2023 11

Neural networks often learn task-specific latent representations that fail to generalize to novel settings or tasks. Conversely, humans learn discrete representations (i.e., concepts or words) at a variety of abstraction…

How Fine-Tuning Allows for Effective Meta-Learning

2021-05-05 · NeurIPS 2021 12 · Kurtland Chua, Qi Lei, Jason D. Lee

Representation learning has been widely studied in the context of meta-learning, enabling rapid learning of new tasks through shared representations. Recent works such as MAML have explored using fine-tuning-based metric…

Few-Shot LearningMeta-LearningRepresentation Learning