00:00:00

Share Your Feedback 🏝️

PPO | Self-play PPO*

PPO | Self-play PPO*

MinWoo(Daniel) Park | Tech Blog

Read more
Previous: Spectral Editing of Activations for Large Language Model Alignment Next: Cross-Layer Attention

PPO | Self-play PPO*

  • Related Project: Private
  • Category: Paper Review
  • Date: 2024-05-02

Self-Play Preference Optimization for Language Model Alignment

  • url: https://arxiv.org/abs/2405.00675
  • pdf: https://arxiv.org/pdf/2405.00675
  • html https://arxiv.org/html/2405.00675v1
  • abstract: Traditional reinforcement learning from human feedback (RLHF) approaches relying on parametric models like the Bradley-Terry model fall short in capturing the intransitivity and irrationality in human preferences. Recent advancements suggest that directly working with preference probabilities can yield a more accurate reflection of human preferences, enabling more flexible and accurate language model alignment. In this paper, we propose a self-play-based method for language model alignment, which treats the problem as a constant-sum two-player game aimed at identifying the Nash equilibrium policy. Our approach, dubbed Self-Play Preference Optimization (SPPO), approximates the Nash equilibrium through iterative policy updates and enjoys theoretical convergence guarantee. Our method can effectively increase the log-likelihood of the chosen response and decrease that of the rejected response, which cannot be trivially achieved by symmetric pairwise loss such as Direct Preference Optimization (DPO) and Identity Preference Optimization (IPO). In our experiments, using only 60k prompts (without responses) from the UltraFeedback dataset and without any prompt augmentation, by leveraging a pre-trained preference model PairRM with only 0.4B parameters, SPPO can obtain a model from fine-tuning Mistral-7B-Instruct-v0.2 that achieves the state-of-the-art length-controlled win-rate of 28.53% against GPT-4-Turbo on AlpacaEval 2.0. It also outperforms the (iterative) DPO and IPO on MT-Bench and the Open LLM Leaderboard. Notably, the strong performance of SPPO is achieved without additional external supervision (e.g., responses, preferences, etc.) from GPT-4 or other stronger language models.

Contents

TL; DR


본 논문은 대규모 언어모델(Large Language Models, LLMs)의 학습에서 휴먼의 선호도를 효과적으로 반영하기 위한 새로운 방법을 제시합니다. 기존의 강화학습 기반 휴먼 피드백(Reinforcement Learning from Human Feedback, RLHF) 방식들이 가지는 한계를 극복하고자, 선호도 학습 문제를 두 플레이어 간의 제로섬 게임으로 재정의하고 이를 해결하기 위한 자기 대결(Self-Play) 알고리즘을 제안합니다.

  • 자연어 처리를 위한 선호도 기반 강화학습 방법
  • 휴먼 선호(human preference)도를 반영한 언어 모델 학습 기법
  • 내쉬 균형을 이용한 자기 대결 선호도 최적화 알고리즘

1. 문제 정의와 배경

대규모 언어모델의 발전으로 휴먼과 유사한 텍스트 생성, 질문 응답, 코딩 등 다양한 작업에서 좋은 성능을 보여주고 있습니다. 그러나 이런 모델들은 높은 수준의 신뢰성, 안전성, 윤리적 정렬이 요구되는 작업에서 여전히 한계를 보입니다. 이를 해결하기 위해 휴먼의 피드백을 활용한 강화학습(RLHF) 방법이 제안되었으나, 기존 RLHF 방식들은 다음과 같은 한계를 가집니다.

  • 명시적 또는 암묵적 보상 모델에 의존
  • 파라메트릭 선호도 모델(e.g., Bradley-Terry 모델)의 한계
  • 휴먼 선호(human preference)도의 비일관성과 비이행성 문제

[RLHF의 한계 및 문제점 색인마킹]


2. 제안 방법: 자기 대결 선호도 최적화(Self-Play Preference Optimization, SPPO) 이런 한계를 극복하기 위해 RLHF 문제를 다음과 같은 두 플레이어 제로섬 게임으로 재정의합니다.

\[(π^*, π^*) = \arg\max_π \min_{π'} \mathbb{E}_{x\sim X} \mathbb{E}_{y\sim π(\cdot\\|x), y'\sim π'(\cdot\\|x)} [P(y \succ y'\\|x)]\]

수식에서 $P(y \succ y’\|x)$는 프롬프트 $x$가 주어졌을 때 응답 $y$가 $y’$보다 선호될 확률입니다.

이 게임의 내쉬 균형을 찾기 위해, 멀티플리케이티브 가중치 갱신(multiplicative weight update) 알고리즘을 기반으로 한 반복적 프레임워크를 제안합니다.

\[π_{t+1}(y\\|x) \propto π_t(y\\|x) \exp(ηP(y \succ π_t\\|x))\]

수식에서 $η$는 학습률이며, $P(y \succ π_t\|x)$는 응답 $y$가 현재 정책 $π_t$보다 선호될 확률입니다.


3. SPPO 알고리즘

제안된 이론적 프레임워크를 바탕으로, 다음과 같은 SPPO 알고리즘을 제시합니다.

  • 초기 정책 $π_{θ_1}$로 시작
  • 각 라운드 $t$에서:
    • 프롬프트 $x$에 대해 $K$개의 응답 샘플링
    • 선호도 오라클을 통해 승률 계산
    • 데이터셋 $D_t$ 구성
    • 다음 목적함수를 최소화하여 정책 갱신
    \[θ_{t+1} ← \arg\min_θ \mathbb{E}_{(x,y,\hat{P}(y\succ π_t\\|x))\sim D_t} \left[\left(\log\frac{π_θ(y\\|x)}{π_t(y\\|x)} - η\left(\hat{P}(y \succ π_t\\|x) - \frac{1}{2}\right)\right)^2\right]\]


4. SPPO의 장점

  • 명시적 보상 모델 불필요
  • 휴먼 선호(human preference)도의 비일관성 허용
  • 승자의 우도(likelihood)를 직접적으로 증가시키고 패자의 우도를 감소
  • 내쉬 균형으로의 수렴 보장


5. 실험 결과

  • AlpacaEval 2.0 테스트 세트에서 GPT-4-Turbo 대비 11% 이상의 승률 향상
  • MT-Bench, Open LLM Leaderboard, PairRM 점수 등에서 강한 일반화 능력 입증
  • GPT-4와 같은 우수한 외부 감독 없이도 AlpacaEval 2.0 승률에서 GPT-4와 유사한 성능 달성

결론적으로, SPPO는 휴먼의 선호도를 효과적으로 반영하면서도 기존 RLHF 방식들의 한계를 극복한 새로운 언어 모델 학습 방법을 제시합니다.

Previous: Spectral Editing of Activations for Large Language Model Alignment Next: Cross-Layer Attention

post contain ""

    No matching posts found containing ""