Offline Regularised Reinforcement Learning for Large Language Models Alignment

Pierre Harvey Richemond,Yunhao Tang,Daniel Guo,Daniele Calandriello,Mohammad Gheshlaghi Azar,Rafael Rafailov,Bernardo Avila Pires,Eugene Tarassov,Lucas Spangher,Will Ellsworth,Aliaksei Severyn,Jonathan Mallinson,Lior Shani,Gil Shamir,Rishabh Joshi,Tianqi Liu,Remi Munos,Bilal Piot
2024-05-29
Abstract:The dominant framework for alignment of large language models (LLM), whether through reinforcement learning from human feedback or direct preference optimisation, is to learn from preference data. This involves building datasets where each element is a quadruplet composed of a prompt, two independent responses (completions of the prompt) and a human preference between the two independent responses, yielding a preferred and a dis-preferred response. Such data is typically scarce and expensive to collect. On the other hand, \emph{single-trajectory} datasets where each element is a triplet composed of a prompt, a response and a human feedback is naturally more abundant. The canonical element of such datasets is for instance an LLM's response to a user's prompt followed by a user's feedback such as a thumbs-up/down. Consequently, in this work, we propose DRO, or \emph{Direct Reward Optimisation}, as a framework and associated algorithms that do not require pairwise preferences. DRO uses a simple mean-squared objective that can be implemented in various ways. We validate our findings empirically, using T5 encoder-decoder language models, and show DRO's performance over selected baselines such as Kahneman-Tversky Optimization (KTO). Thus, we confirm that DRO is a simple and empirically compelling method for single-trajectory policy optimisation.
Machine Learning,Artificial Intelligence
What problem does this paper attempt to address?
This paper mainly discusses how to optimize the alignment of large language models (LLM) to better align with human preferences. The current commonly used methods include reinforcement learning from human feedback (RLHF) or direct preference optimization, which require preference data, i.e., a set of data consisting of prompts, two independent responses, and human preferences. However, collecting such data is both expensive and scarce. The researchers propose a new framework called Direct Reward Optimization (DRO), which does not require paired preference data but instead uses a simple mean square objective function that can be achieved in multiple ways. DRO is experimented on the T5 encoder-decoder language model, showing better performance than the selected baselines such as Kahneman-Tversky optimization (KTO). The paper also points out that single-trajectory data (containing prompts, responses, and human feedback triplets) is richer and easier to collect, thus more suitable for training. DRO aims to utilize this type of data for offline single-trajectory policy optimization. In addition, DRO is mathematically equivalent to traditional RL methods but avoids explicit learning and sampling of reward signals, reducing technical challenges during training. The main contributions of the paper are: 1. Introducing the DRO framework for single-trajectory RLHF optimization using a simple quadratic objective. 2. Proposing DRO-V, which combines offline policy learning with value function learning. 3. Comparing DRO-V with KTO and demonstrating the superiority of DRO-V on the T5 model. Through these methods, the paper addresses the problem of relying on expensive and scarce preference data and optimizing LLM behavior alignment, proposing a simple and effective algorithm suitable for offline single-trajectory settings.