아주 짧은 요약 :    
* uset intent 파악위해 사람의 피드백으로 파인튜닝(F-T, Fine Tuning)

짧은 요약(Abstract) :

언어 모델을  크게 만드는 것이 사용자의 의도를   따르게 만드는 것은 아니다. 예를 들어, 대형 언어 모델은 거짓되거나 유독하거나 단순히 사용자에게 도움이 되지 않는 출력을 생성할  있다. , 이러한 모델은 사용자와 일치하지 않는다.  논문에서는 인간 피드백을 통해 미세 조정하여 다양한 작업에서 사용자 의도와 언어 모델을 일치시키는 방법을 제시한다. OpenAI API 통해 제출된 프롬프트와 레이블러가 작성한 프롬프트 세트에서 시작하여 원하는 모델 동작의 레이블러 데모 데이터셋을 수집하고 이를 사용하여 GPT-3 지도 학습으로 미세 조정한다. 그런 다음 모델 출력을 순위 매기는 데이터셋을 수집하여 인간 피드백에서 강화 학습을 사용하여  지도 학습 모델을 추가로 미세 조정한다. 이를 통해 생성된 모델을 InstructGPT 부른다. 우리의 프롬프트 분포에 대한 인간 평가에서 1.3B 매개변수 InstructGPT 모델의 출력은 175B GPT-3 출력보다 선호되며, 매개변수가 100 적다. 게다가, InstructGPT 모델은 공공 NLP 데이터셋에서 성능 회귀가 최소화되면서 진실성과 유독한 출력 생성 감소에서 개선을 보인다. 비록 InstructGPT 여전히 간단한 실수를 범할  있지만, 우리의 결과는 인간 피드백을 통한 미세 조정이 언어 모델을 인간 의도와 일치시키는 유망한 방향임을 보여준다.



Making language models bigger does not inherently make them better at following a users intent. For example, large language models can generate outputs that are untruthful, toxic, or simply not helpful to the user. In other words, these models are not aligned with their users. In this paper, we show an avenue for aligning language models with user intent on a wide range of tasks by fine-tuning with human feedback. Starting with a set of labeler-written prompts and prompts submitted through the OpenAI API, we collect a dataset of labeler demonstrations of the desired model behavior, which we use to fine-tune GPT-3 using supervised learning. We then collect a dataset of rankings of model outputs, which we use to further fine-tune this supervised model using reinforcement learning from human feedback. We call the resulting models InstructGPT. In human evaluations on our prompt distribution, outputs from the 1.3B parameter InstructGPT model are preferred to outputs from the 175B GPT-3, despite having 100x fewer parameters. Moreover, InstructGPT models show improvements in truthfulness and reductions in toxic output generation while having minimal performance regressions on public NLP datasets. Even though InstructGPT still makes simple mistakes, our results show that fine-tuning with human feedback is a promising direction for aligning language models with human intent.


Paper with my notes

Lecture link


단어정리

  • hedging: 대비책
  • reliability: 믿을 수 있는, 믿을 만한
  • mitigate: 완화시키다, 경감시키다
  • bandit: 강도
  • bandit environment: Bandit environment는 강화 학습에서 사용되는 용어 중 하나로, 에이전트가 행동을 선택할 수 있는 환경
  • performance regression: 성능이 이전 버전에 비해 감소하는 현상
  • likert scale: 좋아요 점수 스케일 같이 일반적으로 숫자로 표현되는 등간 척도로 구성되어 있으며, 보통 5점 척도나 7점 척도를 사용
  • held-out labels: Held-out labels은 검증 데이터 또는 테스트 데이터에 속한 레이블(정답)을 의미
  • overly hedge: 과도한 리스크 관리
  • epistemic humility: 지식에 대한 겸손함이라는 의미로, 인간의 지식과 이해력에 대한 한계를 인식하고 수용하는 태도

</br>

Methodology

본 논문은 Ziegler et al. (2019)과 Stiennon et al. (2020)의 방법론을 따릅니다. 우리는 사전 훈련된 언어 모델, 특정 프롬프트의 분포, 그리고 훈련된 인간 라벨러 팀을 사용합니다. 세 가지 주요 단계를 통해 모델을 미세 조정합니다. 첫째, 라벨러가 제공한 시연 데이터를 사용하여 지도 정책을 훈련합니다. 둘째, 모델 출력 간의 비교 데이터를 수집하고 이를 통해 보상 모델을 훈련합니다. 셋째, 보상 모델을 사용하여 PPO 알고리즘으로 정책을 최적화합니다.

우리의 프롬프트 데이터셋은 주로 OpenAI API에 제출된 텍스트 프롬프트로 구성됩니다. 라벨러가 작성한 프롬프트와 사용자 제출 프롬프트를 결합하여 세 가지 데이터셋을 생성합니다: 지도 학습 데이터셋, 보상 모델 데이터셋, 강화 학습 데이터셋. 각 프롬프트에 대해, 라벨러는 사용자 의도를 추론하고 진실성과 유해성을 고려합니다. 인간 데이터 수집 과정에서 40명의 계약자를 고용하여 시연 및 비교 데이터를 수집하고 평가를 수행합니다.

This paper follows the methodology of Ziegler et al. (2019) and Stiennon et al. (2020). We use a pretrained language model, a distribution of specific prompts, and a team of trained human labelers. The model is fine-tuned through three main steps. First, we train a supervised policy using demonstration data provided by labelers. Second, we collect comparison data between model outputs and use this to train a reward model. Third, we optimize the policy using the PPO algorithm with the reward model.

Our prompt dataset primarily consists of text prompts submitted to the OpenAI API. We combine labeler-written prompts and user-submitted prompts to create three datasets: supervised learning dataset, reward model dataset, and reinforcement learning dataset. For each prompt, labelers infer user intent and consider truthfulness and harmfulness. In the human data collection process, we hired 40 contractors to gather demonstration and comparison data and conduct evaluations.

</br>

Results

4.1 API 분포에 대한 결과 라벨러는 InstructGPT 출력물을 GPT-3 출력물보다 선호합니다. 테스트 세트의 프롬프트에 대해, 라벨러는 모델 크기에 관계없이 InstructGPT 출력을 선호합니다. GPT-3 출력을 사용할 때보다 InstructGPT 모델의 출력이 더 나은 결과를 보여줍니다. 라벨러는 GPT-3 (prompted)보다 InstructGPT 출력을 더 선호하며, InstructGPT 모델의 출력은 명확한 제약을 더 잘 따르고, 지시된 작업을 더 잘 수행하며, 폐쇄 도메인 작업에서 정보를 덜 날조합니다. 또한, InstructGPT 모델은 학습 데이터에 포함되지 않은 “held-out” 라벨러의 선호를 일반화할 수 있습니다. 이는 InstructGPT 모델이 훈련 라벨러의 선호에 단순히 과적합되지 않았음을 보여줍니다.

4.2 공공 NLP 데이터셋에 대한 결과 InstructGPT 모델은 진실성에서 GPT-3보다 개선된 성능을 보입니다. TruthfulQA 데이터셋에서 InstructGPT 모델은 더 자주 진실하고 유익한 출력을 생성합니다. InstructGPT 모델은 RealToxicityPrompts 데이터셋에서 GPT-3보다 독성 출력을 줄이는 데 약간의 개선을 보이지만, 편향성에서는 큰 개선을 보이지 않습니다. 공공 NLP 데이터셋에서의 성능 저하를 최소화하기 위해 RLHF 미세 조정 절차를 수정할 수 있습니다. PPO 모델을 API 분포에서 훈련할 때 특정 공공 NLP 데이터셋에서 성능 저하가 발생하지만, PPO-ptx 모델을 사용하여 이러한 성능 저하를 크게 줄일 수 있습니다.

4.1 Results on the API Distribution Labelers significantly prefer InstructGPT outputs over GPT-3 outputs. On our test set of prompts, labelers prefer InstructGPT outputs across model sizes. InstructGPT outputs perform better than GPT-3 outputs. Labelers prefer InstructGPT outputs to GPT-3 (prompted), and InstructGPT models are better at following explicit constraints, performing the correct instruction, and fabricating less information in closed-domain tasks. InstructGPT models can generalize to the preferences of “held-out” labelers who did not produce any training data, indicating that InstructGPT models are not simply overfitting to the preferences of training labelers.

4.2 Results on Public NLP Datasets InstructGPT models show improvements in truthfulness over GPT-3. On the TruthfulQA dataset, InstructGPT models generate truthful and informative outputs more frequently. InstructGPT models show small improvements in toxicity over GPT-3 on the RealToxicityPrompts dataset but do not show significant improvements in bias. To minimize performance regressions on public NLP datasets, we can modify our RLHF fine-tuning procedure. While PPO models trained on our API distribution suffer from performance regressions on certain public NLP datasets, the use of PPO-ptx models can significantly reduce these regressions.


Examples

4.1 API 분포에 대한 결과 라벨러는 InstructGPT 출력물을 GPT-3 출력물보다 선호합니다. 예를 들어, “Write a story about a bear going to the beach”라는 프롬프트에 대해 InstructGPT는 “곰이 해변에 가서 물개와 친구가 되고 집으로 돌아오는 이야기”를 작성했으며, GPT-3보다 더 명확하고 일관된 출력을 제공했습니다.

프롬프트: “Write a story about a bear going to the beach.” InstructGPT 출력: “곰은 해변으로 가서 물개와 친구가 되었습니다. 그들은 함께 모래성도 쌓고, 물놀이도 하면서 즐거운 시간을 보냈습니다. 곰은 집으로 돌아가면서 새로운 친구를 만난 것을 기뻐했습니다.” GPT-3 출력: “곰은 해변에 가서 모래사장에 앉아 있었습니다. 그리고 갑자기 물개가 나타났습니다. 그들은 친구가 되었습니다.”

4.2 공공 NLP 데이터셋에 대한 결과 InstructGPT 모델은 진실성에서 GPT-3보다 개선된 성능을 보입니다. 예를 들어, TruthfulQA 데이터셋에서 “What is the capital of France?”라는 질문에 대해 InstructGPT는 “파리”라는 정확한 답변을 제공했으며, GPT-3는 때때로 “베를린”과 같은 잘못된 정보를 제공했습니다.

프롬프트: “What is the capital of France?” InstructGPT 출력: “The capital of France is Paris.” GPT-3 출력: “The capital of France is Berlin.”

4.1 Results on the API Distribution Labelers significantly prefer InstructGPT outputs over GPT-3 outputs. For example, given the prompt “Write a story about a bear going to the beach,” InstructGPT produced a coherent and engaging story about a bear making friends with a seal and returning home, whereas GPT-3’s output was less coherent and detailed.

Prompt: “Write a story about a bear going to the beach.” InstructGPT Output: “The bear went to the beach and made friends with a seal. They built sandcastles and played in the water. The bear was happy to have made a new friend as he returned home.” GPT-3 Output: “The bear went to the beach and sat on the sand. Suddenly, a seal appeared. They became friends.”

4.2 Results on Public NLP Datasets InstructGPT models show improvements in truthfulness over GPT-3. For instance, on the TruthfulQA dataset, when asked “What is the capital of France?”, InstructGPT correctly responded with “Paris,” while GPT-3 occasionally provided incorrect answers like “Berlin.”

Prompt: “What is the capital of France?” InstructGPT Output: “The capital of France is Paris.” GPT-3 Output: “The capital of France is Berlin.”


Summary

본 논문은 인간 피드백을 통해 언어 모델을 미세 조정하는 방법론을 제시한다. 지도 학습과 강화 학습을 결합하여 InstructGPT 모델을 개발하고, 이를 다양한 프롬프트에서 평가한다. 결과적으로 InstructGPT 모델은 GPT-3보다 사용자의 지시를 더 잘 따르고 진실성 및 유해성 감소에서 개선된 성능을 보인다. 라벨러는 InstructGPT 모델 출력을 GPT-3보다 선호하며, 진실성 질문에서도 더 정확한 답변을 제공한다. 공공 NLP 데이터셋에서의 성능 저하를 최소화하기 위해 PPO-ptx 모델을 사용한다.

This paper presents a methodology for fine-tuning language models using human feedback. By combining supervised learning and reinforcement learning, the InstructGPT model is developed and evaluated across various prompts. As a result, the InstructGPT model demonstrates better adherence to user instructions and improvements in truthfulness and reduction of harmful outputs compared to GPT-3. Labelers prefer the outputs of the InstructGPT model over those of GPT-3, providing more accurate answers in truthfulness questions. PPO-ptx models are used to minimize performance regressions on public NLP datasets.


Previous Contents


1 Introduction

  • LM이 의도와 다른 행동 보임
    ** next predict라서 의도파악과는 다름
    ** 본 논문에서 F-T + RL(사람 선호 맞출 경우 보상하는 강화학습) 제안
    ** RM(Reward Model)학습, RM으로부터 F-T, 이 때, PPO 알고리즘 사용

Labelers significantly prefer InstructGPT outputs over outputs from GPT-3

  • 레이블을 다는 사람들은 InstructGPT의 결과를 선호함
    ** 1.3B param의 InstructGPT를 175B param의 GPT3보다 더 선호
    ** 구조는 같되, 사람 data로 학습
    ** 선호도 InstructGPT 85 +- 3%, GPT3 71+-4%

InstructGPT models show improvements in truthfulness over GPT-3

  • 없던 정보 생성 줄어듦 41%->21%

InstructGPT shows small improvements in toxicity over GPT-3, but not bias

  • 유동성 25% 줄임

We can minimize performance regression on public NLP datasets by modifying our RLHF fine-tuning procedure.

  • performance regression ( preformance regression: 성능이 이전 버전에 비해 감소하는 현상 ) 줄임
    ** RLHF 파인튜닝 -> PPO update

Our models generalize to the preferences of “held-out” labelers that did not produce any training data.

(held-out labels: Held-out labels은 검증 데이터 또는 테스트 데이터에 속한 레이블(정답)을 의미)

  • InstructGPT 레이블 성능 확인
    ** 더 연구 필요

Public NLP datasets are not reflective of how our language models are used.

  • public data 본 LM 잘 반영 못 함
    ** InstructGPT 선호

InstructGPT models show promising generalization to instructions outside of the RLHF fine-tuning distribution

  • 파인튜닝분포서 일반화 가능
    ** 코드 QA, 다른 언어도 가능

InstructGPT still makes simple mistakes.

** 아직 완전한 모델은 아님
** 긴 hedging 문장(보험? 대비용? 문장)
** 잘못된 전제 문제
** 안정성, 활용성관련 전진 필요

2 Related work

Research on alignment and learning from human feedbak.

  • 사람의 의도, 사람의 피드백 강화학습으로 반영하는 배치기술 기반(RLHF-Research and Learning from Human Feedback)
    [Figure 2] 본 모델 3steps
    (1) SFT(Supervised Fine Tuning)
    (2) RM(Reward Model)
    (3) PPO(RL, Proximal Policy Optimization)
    ** RL 피드백 : award
    ** 로봇, 아타리 게임의 강화학습에서 사용되던 것
    **
    파인튜닝에 이용(대화, 번역, 의미파싱, 스로리생성, 리뷰생성, 근거추출)
    *** 언어 어시스턴트

Training language models to follow instructions.

** cross domain generalization LM과 연관
*** 다른 도메인 데이터로 각각 train/test

Mitigating the harms of language models.

** 유해요소 from LM 경감
** 파인튜닝 small value target 데이터
**
프리트레이닝 데이터 필터링

3 Models and experimental details

  • 방법론, 실험 상세

    3.1 High-level methodology

  • 고차원 방법론
    ** 스타일 지속& 요약 도메인서 적용
    ** PLM부터 시작
    **
    prompt 분포로 aligned 결과 생성
    ** 사람이 레이블
    **
    아래 3step 따름

Step 1: Collect demonstration data, and train a supervised policy.

  • 시연, 검증 프롬프트로 파인튜닝

Step 2: Collect comparison data, and train a reward model.

  • 결과와 대조 입력으로 RM 학습

Step 3: Optimize a policy against the reward model using PPO.

  • RM 결과를 스칼라 보상으로 사용, PPO로 파인튜닝

** Step 2, 3 반복

3.2 Dataset

  • 데이터셋
    ** 상업 AI
    ** 사람 프롬프트
    (1) SFT 시연 13K
    (2) RM 시연 대조 33K
    (3) PPO 31K

3.3 Human data collection

  • 사람의 자료 수집
    ** 40명 계약
    ** 이전보다 넓은 범위의 task(논란적, 민감 토픽)
    **
    계약자는 harmful 잘 인지
    *** 동의율(학습: 72.6+-1.6%, 선별: 77.3+-1.3%, 요약: 73+-4%)

3.4 Models

  • 모델
    ** GPT3로 시작

Supervised fine-tuning (SFT).

** SFT: 16에폭, 코사인러닝decay, dropout0.2, RM score기반 검증, 에폭 상승/RM 상승 시 사람의 선호도 증가

Reward Modeling (RM).

** RM-6B 모델(작지만 안정적), CEL사용, rank 해줄 시 속도 상승

Reinforcement learning (RL).

  • PPO 사용 => SFT
    ** bandit env
    ** 랜덤 user 프롬프트
    **
    프롬프트와 답변 with reward
    ** KL 페널티(SFT에서)로 RM의 과최적화 방지
    ** PPO-ptx(mix) test

Baselines.

  • 베이스라인: GPT3, F-T GPT3, FLAN

3.5 Evaluation

Evaluations on API distribution.

  • API 분포기반 평가
    ** 사람의 선호 점수
    ** 1-7점
    ** 유해탐지 데이터 수집
    **
    이것도 레이블링

Evaluations on public NLP datasets

  • 공용 data 평가
    ** LM 안정성
    ** Zero Shot 성능

4 Results

4.1 Results on the API distribution

Labelers significantly prefer InstructGPT outputs over outputs from GPT-3.

  • Labelers: InstructGPT를 GPT3 보다 더 선호

Our models generalize to the preferences of “held-out” labelers that did not produce an ytraining data.

(Held-out labels은 검증 데이터 또는 테스트 데이터에 속한 레이블(정답)을 의미)

  • non-train labelers: InstructGPT를 GPT3 보다 더 선호
    ** overfit 아님을 보여줌

Public NLP datasets are not reflective of how our language models are used.

  • Public data set 척도로 부족
    ** 성능 평가 쉽게 만들었기 때문

4.2 Results on public NLP datasets

InstructGPT models show improvements in truthfulness over GPT-3.

  • GPT3 대비 사이즈 작지만 성능은 오름(진정성)

InstructGPT shows small improvements in toxicity over GPT-3, but not bias.

  • 유해성 다소 해소

We can minimize performance regerssions on public NLP datasets by modifying our RLHF fine=tuning procedure.

(preformance regression: 성능이 이전 버전에 비해 감소하는 현상 )

  • performance regression 최소화

4.3 Qualitative results

  • 질적 평가

    InstructGPT models show promising generalization to instructions outside of the RLHF fine-tuning distribution.

  • 일반화 미래 유망
    ** 비영어에서도 코드 요약, QA서 성능 나옴

Instruct GPT still makes simple mistakes.

  • 작은 실수 있음
    ** 잘못된 전제 옳다고 여김
    ** 지나치게 장황
    **
    제약사항 늘고, 성능 줄어듦
    ** 이유?: wrong dataset
    ** adversarial data collection -> 위 실수 줄일 것으로 예상

5 Discussion

5.1 Implications for alignment reserach

  • 본 구현은 반복적
    ** 경험적 피드백
    ** 정제
    ** P-T 보다 쌈
    ** 지시 따름
    ** F-T 성능 저하 방지

5.2 Limitations

Methodology.

  • 가치판단이 사람에 의존적

Models.

  • 완전 안전x
    ** 여전히 toxic, 편향, 폭력 있음
    ** 프롬프팅으로 편향 오히려 높이는 것이 가능한 약점이 있음

5.3 Broader impacts

  • 사람이 원하는 올바른 방향으로 학습하는 것이 목표
    ** 도움주고, 진실되고, 무해하게
  • 반대 의도도 적용이 가능
    ** 누가 프롬프팅하느냐가 중요

Reference

@article{ouyang2022training, title={Training language models to follow instructions with human feedback}, author={Ouyang, Long and Wu, Jeff and Jiang, Xu and Almeida, Diogo and Wainwright, Carroll L. and Mishkin, Pamela and Zhang, Chong and Agarwal, Sandhini and Slama, Katarina and Ray, Alex and Schulman, John and Hilton, Jacob and Kelton, Fraser and Miller, Luke and Simens, Maddie and Askell, Amanda and Welinder, Peter and Christiano, Paul and Leike, Jan and Lowe, Ryan}, journal={arXiv preprint arXiv:2203.02155}, year={2022} }

Ouyang, Long, Jeff Wu, Xu Jiang, Diogo Almeida, Carroll L. Wainwright, Pamela Mishkin, Chong Zhang, et al. “Training Language Models to Follow Instructions with Human Feedback.” arXiv preprint arXiv:2203.02155 (2022).