Open Interpretability Models Contributors Research Posts About

ReFT: Representation Finetuning for Language Models

Source

Citation. Zhengxuan Wu, Aryaman Arora, Zheng Wang, Atticus Geiger, Dan Jurafsky, Christopher D. Manning and Christopher Potts. Geiger is at the Pr(Ai)²R Group, and the others are at Stanford University. Wu and Arora made an equal contribution. "ReFT: Representation Finetuning for Language Models". arXiv:2404.03592, version 3 of 22 May 2024. Version 1 is of 4 April 2024, and version 2 of 8 April 2024. The v3 text says "Preprint. Under review." The venue is NeurIPS 2024 (Advances in Neural Information Processing Systems 37, Main Conference Track, DOI 10.52202/[removed]), from the NeurIPS proceedings page. Code is the pyreft library at github.com/stanfordnlp/pyreft, under Apache-2.0, built on pyvene. The instruction-tuned ReFT weights are on HuggingFace. The text names no funding. Every experiment ran on one GPU: an NVIDIA A100 40G or 80G, or an RTX 6000.

Status. Planned. #4782 (catastrophic interference, weight-space programming and LoRA) would use it in its synthesis. #3229 would use the distributed interchange intervention of the paper's equation 1, which LoReFT extends. The page opens no new issue. It records evidence for #5125 and #3229, and the fix campaign stays the maintainer's.

Read. On 2026-11-19 we downloaded the arXiv v3 PDF and extracted its text with pdftotext. The reader was this page's author, a model (Claude Opus 5.5). We read in the source's own words the abstract, sections 1 to 6 and Appendices A to H. We read Tables 1 to 17 as text, and the start of Appendix I and of Appendix J. We did not see the figures as images. So Figures 1 to 11 come to this page only through their captions and the numbers that the text states. We did not read the references in full, most of Appendix I, or the NeurIPS camera-ready PDF. From the NeurIPS proceedings page, we read the title, the authors, the venue and the DOI only.

Summary

Claim. One can adapt a frozen language model by training small interventions on its hidden representations, in place of changes to its weights. LoReFT edits a low-rank linear subspace of the residual stream at a few layers and prompt positions. It uses 15×–65× fewer parameters than LoRA, the authors say, and matches or beats weight-based PEFTs on most of the benchmarks.

Method.

Findings, as the source reports them.

Setting Result
Commonsense mean, LLaMA-7B (Table 1) LoRA 74.7 (0.826% of parameters), DoRA 78.1 (0.838%), DiReFT 79.0 and LoReFT 80.2 (0.031%)
Commonsense mean, LLaMA-13B (Table 1) LoRA 80.5 (0.670%), DoRA 81.5, LoReFT 83.3 (0.025%)
Commonsense mean, Llama-3 8B (Table 1) LoRA 80.8 (0.700%), DoRA 85.2, LoReFT 86.6 (0.026%)
Commonsense, epochs matched to DoRA (Table 14) LoReFT with 3 epochs: 79.5 on LLaMA-7B and 83.1 on LLaMA-13B
Arithmetic mean, LLaMA-7B (Table 2) LoRA 46.9, LoReFT 42.6, DiReFT 40.6, prefix tuning 35.0
Arithmetic mean, LLaMA-13B (Table 2) LoRA 51.1, LoReFT 49.6, DiReFT 48.0
Alpaca-Eval v1.0 win rate, Llama-2 7B (Table 3) Full fine-tuning 80.93, LoRA 81.48 (0.1245%), RED 81.69, LoReFT 85.60 (0.0039%). GPT-3.5 Turbo 1106 86.30
Same, smaller LoReFT (Table 3) Half rank 84.12. 1K training examples 81.91, trained in 18 minutes on one A100
GLUE mean, RoBERTa-base (Table 4) Full fine-tuning 85.6, LoRA 84.7 (0.239%), RED 84.3, LoReFT 84.2 (0.015%), DiReFT 83.2
GLUE mean, RoBERTa-large (Table 4) Full fine-tuning 88.6, LoRA 88.1 (0.225%), LoReFT 88.2 (0.014%)
Ablations, arithmetic mean on LLaMA-7B (Table 17) h + Rᵀb (a learned constant) 31.3. h + Rᵀ(b − Rh) 37.1. h + Rᵀ(Wh + b) 42.9. LoReFT 42.6
Memorisation, one rank-1 intervention at the last prompt token (F.1) 4,097 parameters on LLaMA-1 7B. Recovers the first 2,048 tokens of Alice's Adventures in Wonderland at most layers, at 100%
Memorisation of random text (F.1) Random token sequences come back only up to 128 tokens
Codebook (F.2) A rank-1 intervention "can reliably remember up to 256 pairs" of a random ID and one output token
Few-shot style (G.2) A rank-4 LoReFT at layer 15 of Llama-2-Chat, 32,772 parameters, trained on 5 examples for 100 epochs in under 30 seconds
Time added (H) About 0.05 seconds for 10 layers at rank 8 on the last prompt token, on LLaMA-1 7B

In section 5, the authors draw a view on neurons from the instruction result. In their words, "a linear subspace distributed across a set of neurons can achieve generalised control over a vast number of tasks." They call this "a serious challenge to work seeking to interpret individual neurons in isolation." They say the result suggests an approach that "starts from the assumption that neurons will play different roles in different contexts." From F.2 they say that token identities are "likely superpositioned in the original basis," and that R can "disentangle superpositioned information to some degree."

Where the claims go beyond the evidence

The authors state several limits themselves. They mainly test the LLaMA family. They do not know why ReFT works, and they say the edit may create new causal pathways. They also report the arithmetic loss and the extra inference cost, which a LoRA merge does not have.

Use in this repo