ReFT: Representation Finetuning for Language Models

Parameter-efficient finetuning (PEFT) methods seek to adapt large neural models via updates to a small number of weights. However, much prior interpretability work has shown that representations encode rich semantic information, suggesting that editing representations might be a more powerful alternative. We pursue this hypothesis by developing a family of Representation Finetuning (ReFT) methods. ReFT methods operate on a frozen base model and learn task-specific interventions on hidden representations. We define a strong instance of the ReFT family, Low-rank Linear Subspace ReFT (LoReFT), and we identify an ablation of this method that trades some performance for increased efficiency. Both are drop-in replacements for existing PEFTs and learn interventions that are 15x--65x more parameter-efficient than LoRA. We showcase LoReFT on eight commonsense reasoning tasks, four arithmetic reasoning tasks, instruction-tuning, and GLUE. In all these evaluations, our ReFTs deliver the best balance of efficiency and performance, and almost always outperform state-of-the-art PEFTs. We release a generic ReFT training library publicly at https://github.com/stanfordnlp/pyreft.

Paper

Similar papers

Peer review

Reviewer 333n7/10 · confidence 3/52024-07-09

Summary

The paper introduces Representation Finetuning (ReFT) - a family of methods to learn interventions directly on model representations, rather than model weights. The authors compare ReFT to Parameter Efficient Finetuning (PEFT), and find that it yields similar performance while being significantly more parameter-efficient.

Strengths

- The paper is well-written. - The main ideas in the paper are clear and easy to understand. - Novel and impactful contribution. - The paper presents a new paradigm of learning modifications to representations, rather than learning modifications to weights. This new paradigm is more parameter-efficient, while appearing to have a similar level of expressivity. PEFT methods have been incredibly impactful, and I could see ReFT being similarly impactful.

Weaknesses

- Lack of representation-editing-based baselines - The paper focuses on comparing ReFT to PEFT methods. Appendix B discusses existing representation-editing methods, and casts them in terms of the ReFT framework. - I think it would strengthen the paper to compare ReFT and DiReFT to these existing representation-editing methods. I am curious to understand the difference in performance of an intervention learned by gradient descent (e.g. ReFT) vs an intervention learned by contrastive pairs (e.g. activation addition, RepE). - Some unclear presentation - Line 102 - What does "the hidden representation created at row $i$ and column $k$" refer to? As far as I can tell, this does not integrate with the previous notation defined in the second paragraph of Section 3. I assume this refers to layers and positions - if this is the case, then it would be clearer to say so explicitly. - Inconsistent variable names - I think the presentation would be clearer if variable names were used across sections. - Section 3.1 uses $\mathbf{b}$ to represent a hidden state, whereas Section 3.2 uses $\mathbf{b}$ to refer to a bias vector. I think this can be easily fixed by using $\mathbf{h}$ to represent the hidden state in Section 3.1. - Section 3 uses $m$ to represent the number of layers, whereas Section 3.2 uses $m$ to refer to the length of the output sequence $\mathbf{y}$. - Typo in Table 17 (?) - LLaMA-7B/DiReFT/AQuA: 221.3. - It might be worth double checking your numbers more generally if tables are not generated by code. - Other suggestions - Section 3.2 - The paper could benefit from a motivation of the LoReFT expression, and how it was selected over the other expressions mentioned in Appendix E. - Define dropout more explicitly - What does dropout refer to in this case? My assumption is that with probability $p$, the intervention is not performed. But in the cases where the intervention is not performed ("dropped out"), what is being optimized? - Include baseline generations in Appendix I - Only LoReFT outputs are given in Appendix I - it's hard to interpret these generations without having baselines to compare them to. For example, even examining the difference between the baseline (no intervention) and LoReFT would be helpful, particularly for the long-form generations.

Questions

- Practical recommendations for using ReFT: - Appendix E mentions that there is not one clear best expression of ReFT. Which variation would the authors recommend individuals use, and why? - Is there a recommended methodology for determining hyperparameters in practice? - In what scenarios should one use PEFT vs ReFT vs other inference-time interventions?

Rating

7

Confidence

3

Soundness

3

Presentation

3

Contribution

4

Limitations

- The authors address the following limitations: - The classes of models evaluated is limited. - Hyperparameter selection seems fairly complicated, and automating this selection will be valuable for future adoption of the methodology.

Reviewer ddW19/10 · confidence 4/52024-07-12

Summary

This work proposes a novel method for fine-tuning language models (LM) called Representation Fine-tuning (ReFT), which updates only a small number of parameters. Unlike existing parameter-efficient fine-tuning methods such as LoRA, ReFT enables fine-tuning with minimal parameter updates by learning small interventions in the representation of specific layers and token positions. The authors introduce Low-rank Linear Subspace ReFT as a method within ReFT, demonstrating experimentally that it can fine-tune LMs effectively with fewer parameter updates compared to existing parameter-efficient fine-tuning methods.

Strengths

- **Originality**: While representation engineering has been utilized in various works, applying it to parameter-efficient fine-tuning is unprecedented. The motivation from interpretability works is also interesting. From the perspective of originality, this work is commendable. - **Quality**: The proposed method’s effectiveness is empirically validated on multiple LMs based on Llama and RoBERTa across approximately 20 datasets and four tasks, proving its practical applicability. Additionally, the authors provide extensive experimental results with various hyperparameters in the appendix, offering sufficient reference data for future users and making it easy to identify scenarios requiring caution. Thus, this paper can be considered a complete piece of work. - **Clarity**: The paper is written very clearly, including appropriate figures to facilitate easy implementation by the reader. - **Significance**: This paper holds significant value as it suggests a more effective way to fine-tune LMs through interventions in representation rather than model weights, unlike existing PEFT methods. It can serve as a drop-in replacement for the widely used LoRA, potentially having a substantial impact on future LM fine-tuning research.

Weaknesses

- **Quality**: Although the extensive experimental results in numerous settings sufficiently demonstrate the method's significance compared to existing methods, including results from models other than Llama, such as Mistral or Phi, would emphasize the method's applicability in various scenarios. - **Significance**: The need for extensive hyperparameter optimization to decide which layer and position of hidden representation to apply the intervention function is a potential weakness. This issue is well explained and mentioned in the Limitations section.

Questions

### Questions Practically speaking, when do the authors believe this method should be attempted instead of LoRA? In other words, in what situations is the LoREFT most appropriate? Based on the experimental results, it appears that using the LoREFT might be unsuitable for achieving high performance on inference tasks such as GSM8K.

Rating

9

Confidence

4

Soundness

4

Presentation

4

Contribution

4

Limitations

The authors adequately addressed the limitations in Section 5.

Reviewer d9596/10 · confidence 4/52024-07-12

Summary

The authors propose an alternative PEFT method based on representation intervention techniques that are used in interpretability research. They evaluate their method in a variety of settings including multiple architectures and finetuning dataset families.

Strengths

* The method presented by the paper uses an order of magnitude fewer parameters than comparable baselines (e.g., LoRA, DoRA) while still maintaining comparable accuracies after finetuning. * The method achieves consistently stronger performance than the baselines on commonsense reasoning tasks * Evaluation was thorough: the authors evaluated multiple architectures across scale and multiple dataset families.

Weaknesses

LoRA and other baselines can adjust the number of tunable parameters via the rank parameter. The authors should evaluate specifically how their method compares to the baselines when there are a comparable number of tunable parameters, e.g, by lowering the LoRA rank. The original LoRA paper suggests that performance can sometimes increase (and often, at least, not decrease) when lowering the rank. Given that the ReFT intervention occurs on a fixed set of positions, the authors should evaluate if ReFT is effective even in long-context settings. While there are performance improvements on the commonsense reasoning tasks, performance decreases on other tasks (sometimes fairly substantially, e.g. in Table 2), which limits the applicability of this method. While the authors evaluate multiple settings, it would be interesting to present results on a wider class of evaluations and finetuning datasets to evaluate where ReFT would be preferable to other datasets. (Note: While this would be interesting and would make for a stronger paper, I do not believe it is necessary for a solid paper).

Questions

What is the memory footprint of ReFT in comparison with other methods? Since the intervention occurs on a fixed number of prefix tokens, what happens when the prompt prefix is shorter than the number of intervened positions?

Rating

6

Confidence

4

Soundness

4

Presentation

4

Contribution

3

Limitations

The authors adequately address the limitations.

Authorsrebuttal2024-08-08

Response from the authors.

Thanks for raising these methodological points! Throughout the paper, we report published numbers for other approaches rather than running our own evaluations of those approaches. Our assumption is that the other authors are the most expert in how to get their approaches to work best, and so this provides us with the most ambitious comparison points. We have carefully verified that we are using the same protocols for evaluation and use of the training data. For the hyperparameter searching comparisons, our method for choosing hyperparameters seems stricter than the norm. In particular, we use GSM8K (also in math reasoning domain) to select our hyperparameters and apply these to both the Math and Commonsense Reasoning benchmarks, to avoid any implicit model selection based on test runs. The other authors use the Math10K train/test split to do model selection. For the Math and Commonsense Reasoning benchmarks, both LoRA and ReFT are applied to all layers. For each layer, ReFT intervenes on the residual stream (which is weightless and therefore cannot be targeted by LoRA), while LoRA is applied to multiple weight matrices such as the Q/K/V projections. Although the LLM-Adaptor paper did not attempt to tune ranks on the Commonsense Reasoning benchmark, the DoRA paper (a newer variant of LoRA) [6] tried to halve the rank of DoRA (i.e., reducing the parameter count by 50%) and found that performance consistently dropped across all LLaMA models, as we reported in the paper (see DoRA (half) in our Table 1). We report ReFT evaluations with much smaller parameter counts than the other methods, which would seem to put us at a disadvantage rather than an advantage. We could double-check this by increasing the ReFT parameter count to match the LoRA numbers. We would worry about lowering the LoRA counts and running our own experiments, for the reason we noted above (LoRA advocates might argue for different settings than we would choose). [6] Liu et. al., 2024, “DoRA: Weight-Decomposed Low-Rank Adaptation” **Additional clarification:** regarding the evaluation setup, we would like to clarify that we *directly copied* the publicly available codebase for the LLM-Adaptor paper to ensure a fair comparison (e.g., same datasets, evaluation metrics, decoding strategies, etc..).

Reviewer d9592024-08-12

Thanks for the response! > Further, from their paper, it seems they tune the LoRA rank parameter on math reasoning datasets, which, as your results suggest, have potentially different behavior than other datasets To clarify what I mean by this: you find that your methods reasonably underperform e.g., LoRA, on arithmetic reasoning tasks (Table 2), which, as an example, could arise because LoRA has more trainable parameters. If this is true, then when tuning on an arithmetic reasoning task (GSM8K, Math10k, or otherwise), your hyperparameter selection might favor higher LoRA ranks because it adds additional trainable parameters. The most striking claim of your paper is that your method outperforms LoRA specifically on commonsense reasoning tasks with an order of magnitude fewer parameters. It's possible, then, that one could tune LoRA specifically to perform well on these commonsense reasoning tasks by using the same tricks that you use to tune your method (e.g., applying it to specific layers). I also did read your global response and see that with some additional tweaking you match LoRA on math reasoning datasets, which is interesting—what I'm arguing is simply that it's important to put the same effort into tuning LoRA as your method. For example, as I proposed above, adding an hyperparameter for LoRA (analogous to the one for your method) to specify which layers it is applied to. With that said I think you have a good paper and I am voting for acceptance, the reason my score isn't higher is because (1) I am not fully convinced that tuning LoRA (e.g., by applying it to specific layers and tuning the rank a bit) could not perform similarly to your method, and (2) because this method might not serve as a good drop-in replacement for LoRA because it underperforms on important datasets (arithmetic reasoning) without extra manual effort.

Reviewer Pcei6/10 · confidence 4/52024-07-14

Summary

This paper proposes representation finetuning for efficient tuning or intervening for task-specific representations in models while keeping the base model frozen. They define LoReFT and unify several current representation intervention methods under their framework. They conduct extensive experiments on several types of NLP benchmarks and models to demonstrate the efficiency and better understand the effectiveness of ReFT.

Strengths

1. The paper proposes a new and potentially useful paradigm for efficient fine-tuning of model representations for specific tasks. Their proposed LoReFT inherits the merits of previous representation intervention method and operates on a low-rank subspace to control the the representations. They also put LoReFT under a bigger framework of representation intervention and discuss its relationship with other previous method. They provide good insight on understanding the development process of current representation-level interpretability work. 2. Their experiments are extensive and solid. They successfully demonstrated the efficiency of their ReFT, as well as the effectiveness to some extent. I admire that the authors are willing to show the limitation of performance of their method on some types of tasks to faithfully argue the benefits of their method. 3. They have an open-sourced package for reproducing the whole pipeline. They also have detailed documentation of their hyperparameter tuning process. I think this is especially important for new methods like ReFT which I imagine would requires some deep understanding to tune the hyperparameters. 4. They have some interesting intervention examples in the Appendix. They also provide very good ablation of LoReFT design in the Appendix.

Weaknesses

1. I feel the hyperparameter tuning is still pretty heavy althoughtthe authors try to show that they only need to finetune the model on one task from a specific type and use the set of hyperparamters for other tasks in the same type. I expect to see more results on how robust the hyerparameters are across models in the wild. For example, if we find a set of hyperparameters for Llama 7B, will that generalize to Llama2 7B or models of the same size? I also want to see how much the variance is for the best set of hyperparameters for different models and tasks. 2. Sometimes I expect to see how ReFT would fit the current pipeline of SFT + RLHF alignment paradigm. Some results, for example, on the instruction tuning datasets, are lag behind the current SOTA by too far. I'm not saying the method should achieve SOTA but would expect to see the possibility of it to push the new boundaries in the current context of LLM fine-tuning.

Questions

1. What do the prefix and suffix refer here for classification tasks and generation tasks in your hyperparameter tuning descriptions? 2. You might not have experiments on that but just out of curious if ReFT can be used to optimize the objective in preference-based learning like the Bradley-Terry model in DPO and how it would perform. 3. For the ultrafeedback fine-tuning, do you select the best responses to do MLE? As this is usually used as a preference learning dataset.

Rating

6

Confidence

4

Soundness

3

Presentation

4

Contribution

3

Limitations

yes

Reviewer 333n2024-08-08

I've read the author rebuttal and the general response. I thank the authors for their diligent engagement. I think the proposed writing edits will improve the manuscript. I elect to maintain my overall score.

Reviewer d9592024-08-08

Thanks for the response and additional experiments. > LoRA with fewer parameters has been tried. Thanks for pointing this out, although I still believe there are some issues with the tuning setup. I think this brings up another issue that I missed in the review: you are using the evaluation from a different paper. How can you be sure that your evaluation setup exactly matches their setup? Further, from their paper, it seems they tune the LoRA rank parameter on math reasoning datasets, which, as your results suggest, have potentially different behavior than other datasets. Also, your method requires tuning which specific layers to which the adapter is applied—what happens if you do this with LoRA? It may be the case that if you apply LoRA to the same set of layers as you use for ReFT may lead to similar performance and a substantial drop in the number of the adapter parameters. In my view, the primary positive aspect of your method is that it requires fewer parameters than LoRA, but generally performs similarly (better on some datasets, worse on others). This is why being extremely careful in your comparison to the number of parameters that LoRA requires is so important. For the other responses—thank you, I appreciate the clarification.

Reviewer ddW12024-08-11

Thank the authors for their response. I would appreciate it if the details provided in the rebuttal could be included in the final version of the paper. I will maintain my score as I have no further concerns about this work.

Reviewer Pcei2024-08-13

Reply to the rebuttal

I appreciate the clarifications the authors made around my questions. I like the one that mentioning quicker iteration for data selection on alignment pipeline using ReFT. I would keep my overall positive feedback on the paper and will keep my score unchanged.

Program Chairsdecision2024-09-25

Decision

Accept (spotlight)

© 2026 NYSGPT2525 LLC