ElemedexA pocket encyclopedia of AI architectures

Glossary (TM) › Training and tuning

TM139

Reward model

Also: preference model, RM

In Spanish: Modelo de recompensa

A model trained to give a response a numerical score according to how much human raters would prefer it; it acts as an automatic judge during RLHF.

RLHF requires millions of evaluations, and no company can pay people to read them all. The solution is to train a second model that predicts human judgment (Alammar & Grootendorst, 2024, p. 379). One takes a copy of the instruction-tuned model and swaps its "head": instead of probabilities over the vocabulary, it returns a single number. InstructGPT used 6-billion-parameter reward models (Ouyang et al., 2022, sec. 3.5).

The data are comparisons: a prompt, an accepted response and a rejected one (not necessarily a good one and a bad one; sometimes both are good and one is better) (Alammar & Grootendorst, 2024, pp. 380–382). Training pushes the accepted response to score higher. The difference in scores is read as a probability of preference, following the Bradley–Terry model (1952) or the Elo system in chess (Christiano et al., 2017, sec. 2.2.3):

P(A preferred to B) = 1 / (1 + e^−(r_A − r_B)). If r_A − r_B = 1, P ≈ 0.73.

The risk is that the optimized model learns to please the judge rather than do what the judge is trying to measure (so-called Goodhart's law). It is the linguistic version of the reward hacking that Buckner (2024) documents in reinforcement learning: an agent that circles endlessly to collect bonuses without ever finishing the race (2024, p. 68). This is why InstructGPT penalizes drifting away from the previous model (Ouyang et al., 2022, sec. 3.5), and why Llama 2 uses two reward models, one for helpfulness and one for safety (Alammar & Grootendorst, 2024, p. 383).

For an inferentialist, the procedure erases a distinction: that between taking something to be correct and its being correct. A reward model is a model of the approvals of a group of raters. Can a model of attitudes stand in for a model of norms? See inferentialism.

Sources

  • Alammar, J., & Grootendorst, M. (2024). Hands-on large language models: Language understanding and generation. O’Reilly Media. §
  • Bradley, R. A., & Terry, M. E. (1952). Rank analysis of incomplete block designs: I. The method of paired comparisons. Biometrika, 39(3–4), 324–345. https://doi.org/10.1093/biomet/39.3-4.324 §
  • Buckner, C. J. (2024). From deep learning to rational machines: What the history of philosophy can teach us about the future of artificial intelligence. Oxford University Press. https://doi.org/10.1093/oso/9780197653302.001.0001 §
  • Christiano, P. F., Leike, J., Brown, T., Martic, M., Legg, S., & Amodei, D. (2017). Deep reinforcement learning from human preferences. In Advances in Neural Information Processing Systems (Vol. 30). Curran Associates. https://proceedings.neurips.cc/paper_files/paper/2017/hash/d5e2c0adad503c91f91df240d0cd4e49-Abstract.html §
  • Ouyang, L., Wu, J., Jiang, X., Almeida, D., Wainwright, C., Mishkin, P., Zhang, C., Agarwal, S., Slama, K., Ray, A., Schulman, J., Hilton, J., Kelton, F., Miller, L., Simens, M., Askell, A., Welinder, P., Christiano, P. F., Leike, J., & Lowe, R. (2022). Training language models to follow instructions with human feedback. In Advances in Neural Information Processing Systems (Vol. 35, pp. 27730–27744). Curran Associates. https://doi.org/10.52202/068431-2011 §