논문 리뷰(7) Self-Evolved Reward learning for LLMs

­문재원·2025년 7월 15일

Paper

목록 보기
7/8
post-thumbnail

요즘 RLHF의 분야에서 human preference 데이터의 한계를 뛰어넘고자 하는 self-evolve 아이디어가 많이 나오는 것 같습니다.

오늘 읽어볼 Self-Evolved Reward learning for LLms도 유사한 맥락입니다.
(참고로 이 논문은 제 벨로그의 '연구 주제 찾기(1)'의 To-do에서 언급한 논문 중 하나입니다. )

그럼 리뷰를 시작하겠습니다!

Abstract

  • RLHF의 핵심은 RM을 훈련시키는 것 ← human experts/AI system가 제공한 label에 의존
  • language model이 발전하면서 human input이 LM의 성능을 높이는데 덜 효과적이게 됨.
  • 본 논문에서는 RM이 training data를 생성해 학습하는 Self-Evolved Reward Learning(SER) 제시.
  • 실험의 데이터셋: HH-RLHF, UltraFeedback
  • 실험에서 사용한 모델: Mistal, Llama3
  • Resources of paper: https://microsoft.github.io/DKI_LLM/ser/ser_index.html

6. Conclusion

  • SER을 통해
    • 모델이 labeled data를 생성
    • 적절한 데이터를 선택하도록 모델의 학습 상태 조절
      ➡️ 뛰어난 성능을 내는 iterative evolution 이뤄냄
      ➡️ self-improvement of LLMs의 insight를 제공

1. Introduction

기존의 RLHF

  1. human preference로부터 RM 학습 → learned RM is frozen to tain LLM via RL such as PPO
  2. RM 학습 없이 human preference로부터 train LLM such as DPO
  • 위 방법들의 한계
    • human-annotated preference data에 의존
      → 이 데이터들은 제한적이고 비쌈
      → RL 발전에 제약 & LLM의 scalability를 발휘할 수 없게 함.(여기서 scalability: 많은 데이터로 높은 성능을 내는 것)
  • 한계를 극복하기 위한 해결책
    • RLAIF: Reinforcement Learning from AI Feedback
    • RLAIF의 한계:
      • RLAIF도 LLM이 높은 질의 feedback을 낼 수 있다는 가정을 함
      • feedback을 위해선 stronger LLM이 필요함

최근 발전 및 본 논문의 제안

  • LLM이 인간의 입력 없이 세계 지식과 복잡한 패턴을 이해할 수 있다는 word model로서의 능력이 있다고 제안.
    → 이 능력을 RLHF & RLAIF까지 확장; RM에서의 역할을 확장

    → 본 논문에서는 더 적은 human-annoated data를 기반으로 feedback loop을 통해 RM이 self-evolve하는 방법 제안

    • LLM이 RM으로 동작하며 dataset에 기반한 feedback 산출
    • feedback-then-train 루프를 통해 RM이 self-evolve 가능해짐.
    • iteration 과정에서 유사한 데이터가 성능 저하를 불러올 수 있기에 RM의 학습 상태를 구별데이터 선별 전략을 사용 for robost RM training

본 논문의 contributions

  1. 15%의 human-annotated seed data를 가지고 full human-labeled dataset으로 학습시킨 모델과 견줄만한 성과 이룸.
  2. self-learning paradigms in LLM에 insight 제공
    특히 RM 향상에서
  3. 다양한 실험을 통해 various LLM, model sizes dataset 에 걸친 성능 향상을 증명

2. Related work

2.1 Reinforcement Learning from external feedback

기존 RL의 한계들이 제시됩니다. 위에서 말했던 걸 다시 자세하게 언급합니다.

  • RLHF의 방법
    • 방법 1
    1. human preference data로부터 fixed RM 훈련시킴
    2. trained RM은 PPO 같은 RL을 통해 LLM을 훈련시키는 데 사용

    • 방법 2
    1. DPO가 human preference data를 이용해 RM training 없이 바로 LLM 훈련시킴.

    • 방법 3
    1. preference training schemes가 성능과 안정성을 향상시키도록 조정

  • 데이터셋으로 인한 기존 RLHF의 한계
    • human preference data는 비싸고 시간도 많이 소요됨.
      → data quality & size는 LL의 성능의 bottleneck이였음.
  • RLAIF 도입
    • RLHF의 한계를 극복하고자 RLAIF를 도입했음
    • 한계:
      • LLM이 높은 질의 피드백으 제공한다는 가정에 의존
      • 피드백을 제공하기 위해서는 stronger LLM이 필요

2.2 Self-learning in LLMs

  • self-learning의 발전

    self-learning in LLMs focuses on enhancing capabilities without external supervision.

    • self-alignment through principle-driven reasoning
    • self-training to enhance problem-solving abilities
    • self-correction & improvement using self-generated data
    • LLMs refine reasoning through self-generated augmented answers
    • self-rewarding

3. Self-Evolved Reward learning for LLMs

  • SER을 통해 RM이 스스로의 예측만으로 학습함으로써 iteratively improve itself하게 됨.
  • 간략한 순서는 아래와 같음
  1. RM을 작은 human-annotated dataset으로 훈련시킴

  2. RM이 self-labeling & iterative retraining를 통해 evolve됨.

  3. enhanced RM이 PPO를 통해 LLM 훈련시키는 데 사용

    보다 자세한 과정과 구성요소는 아래에서 설명하겠습니다.

    3.1 Overview

  • RM training은 아래의 iterative steps로 이루어짐.
  1. self-label with Reward Model
    (1) RM이 small set of human-annotated data로 훈련
    (2) RM이 unlabeled data에 self-labeling

  2. Identify the learning status of RM & select high-confidence data
    (1) RM이 good/bad answer을 구별하거나 유사한 답변 사이 차이점을 증폭시키는 능력을 평가.
    (2)평가를 기반으로 데이터 선정

  3. Retrain the RM with pairwise loss
    필터링 후, 선정된 데이터들을 pairwise loss와 함께 RM을 재훈련시키는 데 사용됨.
    → 답변의 질을 이해하는 능력 향상

위와 같이 RM training 이후 RM이 PPO를 통해 LLM을 훈련시키는 데 사용됨.

  • 2(1)에서 RM의 learning state를 구별하는 이유 3가지
    1. Targeted skill development
      • 다른 learning statuses를 인식 → RM이 특정 skill set에 집중
      • 초반: good vs. bad answers 구별
      • 중후반: refine with 미묘한 차이
    2. Adaptive data filtering
      • 현재 learning status에 의해 data filtering → 모델이 더 적절한 데이터를 통해 훈련
    3. Improved self-evaluation
      • learning status를 모니터링하며 RM이 learning focus를 결정

Step 1. Self-label with reward model

  • human-annotated data로 학습시켜 얻은 seed RM 기반
  • unlabeled data(question, answer)에 대해 reward score 예측
    ri=RM(Qi,Ai)r_i = RM(Q_i, A_i)

Step 2. Identify the learning status of the reward model and select high-confidence data

  • self-labeled dataset은 이렇게 구성됨

    Dtrain={(Qi,Ai1,Ai2)}i=1ND_{\text{train}} = \{\, (Q_i, A_i^{1}, A_i^{2}) \}_{i=1}^{N}
  • RM이 Ai1,Ai2A_i^{1}, A_i^{2}이 얼마나 좋은지에 해당하는 가능성을 제시
    ➡️ pi1,pi2p_i^{1}, p_i^{2}

  • learnig status S는 pi1,pi2p_i^{1}, p_i^{2} 의 차이를 이용해 결정됨.

i=pi1pi2∆_i = |p_i^{1}- p_i^{2}|

S={Status1,if (pi1>τhigh and pi2<τlow) or (pi1<τlow and pi2>τhigh),Status2,else if ΔiτΔ,Stop,otherwise.S = \begin{cases} \text{Status}_{1}, & \text{if }\bigl(p_i^{1} > \tau_{\text{high}} \,\text{ and }\, p_i^{2} < \tau_{\text{low}}\bigr) \text{ or } \bigl(p_i^{1} < \tau_{\text{low}} \,\text{ and }\, p_i^{2} > \tau_{\text{high}}\bigr), \\[4pt] \text{Status}_{2}, & \text{else if } \Delta_i \ge \tau_{\Delta}, \\[4pt] \text{Stop}, & \text{otherwise.} \end{cases}

- Status 1 vs. Status 2
status 1status 2
taskeasier taskharder task
구별하는 것good vs. bad samples비슷한 질의 답변 사이 미묘한 변화

Step 3. Retrain the reward model with filtered data using pairwise loss

  • data filtering strategy는 아래와 같음. 각 status 별 어떤 데이터를 고를지가 제시됨.
F(Dunlabeled,S)={{(Qj,Aj1,Aj2)  (RM(Qj,Aj1)>τhighRM(Qj,Aj2)<τlow) (RM(Qj,Aj1)<τlowRM(Qj,Aj2)>τhigh)},if S=Status1,{(Qj,Aj1,Aj2)  RM(Qj,Aj1)RM(Qj,Aj2)>δ},if S=Status2,,if S=Stop.\mathcal{F}\bigl(D_{\text{unlabeled}},\, S\bigr) = \begin{cases} \displaystyle \Bigl\{\,\bigl(Q_j, A_j^{1}, A_j^{2}\bigr)\ \big|\ \bigl(RM(Q_j, A_j^{1}) > \tau_{\text{high}} \,\land\, RM(Q_j, A_j^{2}) < \tau_{\text{low}}\bigr)\\ \qquad\qquad\qquad\quad \lor\ \bigl(RM(Q_j, A_j^{1}) < \tau_{\text{low}} \,\land\, RM(Q_j, A_j^{2}) > \tau_{\text{high}}\bigr)\Bigr\}, &\text{if } S = \text{Status}_{1},\\[6pt] \displaystyle \Bigl\{\,\bigl(Q_j, A_j^{1}, A_j^{2}\bigr)\ \big|\ \lvert RM(Q_j, A_j^{1}) - RM(Q_j, A_j^{2}) \rvert > \delta \Bigr\}, &\text{if } S = \text{Status}_{2},\\[6pt] \varnothing, &\text{if } S = \text{Stop}. \end{cases}

  • 위 strategy를 통해 filtering을 한 뒤 pairwise loss를 이용해 모델을 재훈련

    Lpair=1Dfiltered(Qj,Aj(1),Aj(2))Dfilteredmax ⁣(0,  Δ(RM(Qj,Aj(1))RM(Qj,Aj(2))))\mathcal{L}_{\text{pair}} = \frac{1}{\lvert D_{\text{filtered}}\rvert} \sum_{(Q_j,\,A_j^{(1)},\,A_j^{(2)}) \in D_{\text{filtered}}} \max\!\Bigl(0,\; \Delta - \bigl(RM(Q_j, A_j^{(1)}) - RM(Q_j, A_j^{(2)})\bigr)\Bigr)
    • Δ\Delta: 희망하는 reward score 간 차
    • Dfiltered=Dfilteredn+Dfilteredn1D_{filtered}=D_{filtered}^n + D_{filtered}^{n-1}
  • 위 step 1-step 3가 RM이 수렴할 때까지 iterative loop로 반복됨.

Step 4. Train the LLM via RL with self-evolved reward model

앞선 step 1~step 3를 통해 RM을 self-evolving 시켰으니 이제 RL을 이용해 LLM을 훈련시키자!

  • policy가 input Q에 대해 response A 생성.
  • objective는 RM에 의해 생성되 reward를 극대화하는 방향으로 policy를 최적화
  • self-evolved RM이 산출한 기대 reward를 극대화
  • policy는 clipped surrogate objective를 최대화하면서 update됨.
    LPPO=E[min(πϕ(AQ)πϕold(AQ)AR,  clip ⁣(πϕ(AQ)πϕold(AQ),1ϵ,1+ϵ)AR)]\mathcal{L}_{\text{PPO}} = \mathbb{E}\Bigl[ \min\Bigl( \frac{\pi_{\phi}(A \mid Q)}{\pi_{\phi_{\text{old}}}(A \mid Q)}\,A^{R}, \; \operatorname{clip}\!\Bigl( \frac{\pi_{\phi}(A \mid Q)}{\pi_{\phi_{\text{old}}}(A \mid Q)}, 1 - \epsilon,\, 1 + \epsilon \Bigr)\,A^{R} \Bigr) \Bigr]
    • ARA^R: advantage function based on reward from RM

4. Experiments

4.1 Reward modeling results

Main findings

  1. SER consistently and effectively enhances model performance
  2. SER can approach or even exceed the performance of full-scale human-labeled data

Fine-grained analysis

  1. The model can iteratively enhances its performance on self-labeled data, or even if the self labeled data contains noise.
  2. Similar data becomes marginally helpful after multiple iterations and may even harm the model's performance.
  3. By adjusting the error reduction strategy, more diverse self-labeled data can be obtained, further enhancing the effectiveness of self-learning.
  4. SER is more data and human-labor efficient than full fine-tuning.

4.2 PPO results

SER enhances the capabilities of LLMs, and the degree of enhancement is positively correlated with the performances of RMs.

5. Discussion

  • 미래에는 more robust and autonomous method to identify learning status & filter self-labeled data.

  • generate more diverse responses through LLMs

  • integrate LLMs into the entire self-evolved reward learning loop ← step 4를 loop에 합쳐서 LLM이 RM에 대한 response 생성하도록!


SER에서는 data를 filtering 하는 과정이 굉장히 중요한 것 같다.
filtering 된 data(high confidence sample)를 통해 RM을 다시 훈련시키는 과정이 반복된다.

그리고 최종적으로 self-evolved RM을 기반으로 PPO를 사용해 LLM을 훈련시킨다. 그래서 LLM이 high quality answer을 산출하도록 만든다.

profile
얼렁뚱땅 요리조리

0개의 댓글