# PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization

Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen ほか7名 · arXiv · 2023年6月8日

- **課題** instruction tuningされたLLMのハイパーパラメータを、自動的かつ信頼できる形で評価する方法が必要です。
- **手法** Alpacaデータから作った応答ペアをGPT-3.5で蒸留し、位置バイアスのフィルタリングを経て、LLaMAベースの判定モデルPandaLMを学習します。
- **結果** 人手ラベルのテストでは、PandaLM-70Bが精度0.6687でGPT-4の0.6647を上回り、PandaLMが選んだ設定はAlpacaの既定の設定より多くの優れた応答を得ました。

## LLMのinstruction tuningにおけるハイパーパラメータ評価の難しさ

instruction tuningされた大規模言語モデル（LLM）の性能は、オプティマイザ、学習率、エポック数、学習データの品質と規模に大きく左右されます。そのため、こうしたハイパーパラメータを選ぶには、チューニングされたモデルを自動的かつ信頼できる形で評価できる必要があります。既存の評価方法は人手によるアノテーションやAPIベースの評価に依存しており、費用と時間がかかり、再現性や一貫性にも限界があります。また、精度やF1のような従来の指標は、応答の簡潔さ、明確さ、指示への従い方、包括性、形式性といった主観的な品質を十分に反映できません。著者らは、こうした問題を解決するため、ハイパーパラメータ最適化に使える判定モデルを作ることを目標としています。

## PandaLMのデータ蒸留と学習手順

PandaLMはLLaMAを基盤とする判定モデルで、同じ指示文に対する2つの応答を入力として受け取り、どちらがより優れているかを判断するとともに、その理由と参照応答を生成するように学習されます。学習データの入力指示文と入力はAlpaca 52Kから取り、応答ペアは、LLaMA-7B、Bloom-7B、Cerebras-GPT-6.7B、OPT-7B、Pythia-6.9Bを、Alpacaと同じデータとハイパーパラメータでチューニングして作ったものです。人がすべてのラベルを作る代わりに、self-instructの方式に従ってGPT-3.5で評価結果、理由、参照応答を蒸留します。その後、応答の順序を入れ替えて2回推論した際に結果が食い違うサンプルを取り除き、位置バイアスを減らして最終的に30万個のサンプルを得ます。

学習では次トークン予測のための交差エントロピー損失を用い、AdamWオプティマイザ、学習率2e-5、コサインスケジューラで2エポックのあいだファインチューニングします。

![Figure 6: The prompt for training PandaLM](https://refivu.com/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2/figures/figure-8ed2bfbe107ed0e82aa7a9a74ff24f52.png?thumb=512)

**Figure 6** : The prompt for training PandaLM.

[出典](https://arxiv.org/abs/2306.05087v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang · PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization · 論文の図を引用 · 元のPDFの16ページ目から図の部分を抽出しています。

## 人手ラベルのテストセットでの判定精度

PandaLMの信頼性は、人がラベルを付けたテストセットで確認します。テストデータはself-instructの人手評価データから取り、3名の評価者が独立してラベルを付け、各評価者のInter Annotator Agreementが0.85より大きくなるように差の大きいサンプルを除外します。フィルタリング後のテストセットは1Kサンプルです。Table 2で人のアノテーションと比較した精度は、GPT-3.5が0.6296、GPT-4が0.6647、PandaLM-7Bが0.5926で、PandaLM-70Bは0.6687となりGPT-4を上回ります。したがって、PandaLM-7Bはこの精度指標では2つのGPT評価者より低く、論文が述べるGPT-3.5やGPT-4と同程度の性能は、PandaLM-7Bの複数の指標と比較グラフを合わせて見た結果です。

この結果は、人がラベルを付けたテストセットとそのサンプル選別の条件で得られたものです。

## チューニングされたハイパーパラメータの効果

PandaLMが選んだハイパーパラメータの効果は、Alpacaの既定の設定と比較して確認します。探索空間は、エポック1から5、学習率2e-6、1e-5、2e-5、2e-4、SGDとAdamWの2つのオプティマイザ、コサインと線形の2つのスケジューラを組み合わせた80通りの設定で構成されています。この探索は800回の比較で行われ、モデルごとに最適な設定は異なります。学習データは両方の設定で同じに保たれます。GPT-4を評価者として使った実験では、PandaLMが選んだ設定の5つのモデルは、平均して47.0個の優れた応答と26.2個の劣った応答を得ており、人による評価では平均79.8個の優れた応答と25.2個の劣った応答を得たと報告されています。

評価者ごとの詳細な比較はTable 5で確認できます。

![Figure 1: The models are evaluated and compared using both GPT-3.5, GPT-4 and human annotators. The ‘Win’ count represents the number of responses where models…](https://refivu.com/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2/figures/figure-082f89354e586176ea309e815cb03304.png?thumb=512)

**Figure 1** : The models are evaluated and compared using both GPT-3.5, GPT-4 and human annotators. The ‘Win’ count represents the number of responses where models fine-tuned with PandaLM-selected optimal hyperparameters outperform models using Alpaca’s hyperparameters. Conversely, the ‘Lose’ count represents the number of responses where models utilizing Alpaca’s hyperparameters produce superior responses compared with those fine-tuned with the optimal hyperparameters determined by PandaLM. Note that the overall test set comprises 170 instances, and ‘Tie’ scenarios are not considered in this illustration.

[出典](https://arxiv.org/abs/2306.05087v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang · PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization · 論文の図を引用 · 元のPDFの3ページ目から図の部分を抽出しています。

![Table 5: Evaluation of the effectiveness of PandaLM’s selected hyperparameters and Alpaca’s hyperparameters. The tuple in the table means (#win,#lose,#tie). Sp…](https://refivu.com/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2/figures/figure-b962075b539029fa7569970e8d92a2db.png?thumb=512)

**Table 5** : Evaluation of the effectiveness of PandaLM’s selected hyperparameters and Alpaca’s hyperparameters. The tuple in the table means (#win,#lose,#tie). Specifically, (45,26,99) in the first line of the table indicates that PandaLM’s hyperparameter-tuned LLaMA-7B outperforms Alpaca’s version in 45 responses, underperforms in 26, and matches the quality in 99 instances. The ‘Judged By’ column represents different methods of response evaluation.

[出典](https://arxiv.org/abs/2306.05087v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang · PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization · 論文の図を引用 · 元のPDFの8ページ目から図の部分を抽出しています。

![Figure 8: Hyperparameter Optimization Analysis in PandaLM. The figure illustrates the performance across different learning rates and variability in model perf…](https://refivu.com/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2/figures/figure-ff8cd52ef106bad823f9def18758a61c.png?thumb=512)

**Figure 8** : Hyperparameter Optimization Analysis in PandaLM. The figure illustrates the performance across different learning rates and variability in model performance across epochs.

[出典](https://arxiv.org/abs/2306.05087v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang · PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization · 論文の図を引用 · 元のPDFの21ページ目から図の部分を抽出しています。

## 評価理由と参照応答の役割

PandaLMは勝敗ラベルだけでなく、評価理由と参照応答も併せて学習します。この設計の効果を見るため、理由と参照応答を取り除き、勝ち・負け・引き分けのラベルのみを残したPandaLM-7Bを再学習しました。その結果、精度は0.4725となり、全体設定の0.5926より低く報告されています。この実験は、理由と参照応答が判定学習に役立ったという根拠であり、同じ実験で他の構成要素の寄与まで併せて証明したものではありません。

![Table 4: Comparison of PandaLM performance w/ and w/o reasons and references](https://refivu.com/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2/figures/figure-4818552bd2b9e863914a5fc417d75f60.png?thumb=512)

**Table 4** : Comparison of PandaLM performance w/ and w/o reasons and references.

[出典](https://arxiv.org/abs/2306.05087v2) · [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/) · Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang · PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization · 論文の図を引用 · 元のPDFの8ページ目から図の部分を抽出しています。

## 範囲と限界

著者らは、ハイパーパラメータの探索範囲は一般的な慣行と先行文献に基づいて決められたため、絶対的に最適な設定を含んでいないかもしれないと明記しています。また、中核となる学習データはGPT-3.5から蒸留されているため、人の選好と完全に一致しない可能性があります。論文は主に結果に基づく評価に焦点を当て、教師あり学習の設定のみを扱っています。したがって、半教師あり学習、ノイズのある学習、不均衡学習への拡張は今後の課題として残されています。

## 論文情報

- **著者**: Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang
- **学会・ジャーナル**: arXiv · プレプリント
- **公開日**: 2023年6月8日
- **登録日**: 2026年11月5日
- **更新日**: 2024年5月24日
- **バージョン**: v2
- **arXiv**: 2306.05087
- **カテゴリ**: cs.CL · cs.AI
- **ライセンス**: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- **掲載内容**: 論文情報・解説・論文の図

[元論文 ↗](https://arxiv.org/abs/2306.05087v2) · [PDF ↗](https://arxiv.org/pdf/2306.05087v2)

この解説は、Refivuの韓国語解説をAIで翻訳したものです。不正確な翻訳や誤りが含まれる可能性があります。論文と図の利用条件は各出典に従います。

## アブストラクト

Instruction tuning large language models (LLMs) remains a challenging task, owing to the complexity of hyperparameter selection and the difficulty involved in evaluating the tuned models. To determine the optimal hyperparameters, an automatic, robust, and reliable evaluation benchmark is essential. However, establishing such a benchmark is not a trivial task due to the challenges associated with evaluation accuracy and privacy protection. In response to these challenges, we introduce a judge large language model, named PandaLM, which is trained to distinguish the superior model given several LLMs. PandaLM's focus extends beyond just the objective correctness of responses, which is the main focus of traditional evaluation datasets. It addresses vital subjective factors such as relative conciseness, clarity, adherence to instructions, comprehensiveness, and formality. To ensure the reliability of PandaLM, we collect a diverse human-annotated test dataset, where all contexts are generated by humans and labels are aligned with human preferences. Our results indicate that PandaLM-7B achieves 93.75% of GPT-3.5's evaluation ability and 88.28% of GPT-4's in terms of F1-score on our test dataset. PandaLM enables the evaluation of LLM to be fairer but with less cost, evidenced by significant improvements achieved by models tuned through PandaLM compared to their counterparts trained with default Alpaca's hyperparameters. In addition, PandaLM does not depend on API-based evaluations, thus avoiding potential data leakage. All resources of PandaLM are released at https://github.com/WeOpenML/PandaLM.

## この論文を引用

Yidong Wang, Zhuohao Yu, Zhengran Zeng, Linyi Yang, Cunxiang Wang, Hao Chen, Chaoya Jiang, Rui Xie, Jindong Wang, Xing Xie, Wei Ye, Shikun Zhang, Yue Zhang (2023). PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization. arXiv:2306.05087v2. https://arxiv.org/abs/2306.05087v2

**BibTeX**

```
@misc{wang2023pandalm,
  title = {{PandaLM: An Automatic Evaluation Benchmark for LLM Instruction Tuning Optimization}},
  author = {Yidong Wang and Zhuohao Yu and Zhengran Zeng and Linyi Yang and Cunxiang Wang and Hao Chen and Chaoya Jiang and Rui Xie and Jindong Wang and Xing Xie and Wei Ye and Shikun Zhang and Yue Zhang},
  year = {2023},
  eprint = {2306.05087},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2306.05087v2}
}
```

## この論文の用語

- [accuracy](https://refivu.com/ja/terms/1995c0cd6282-accuracy)
- [perplexity](https://refivu.com/ja/terms/2b204e513801-perplexity)
- [cross-entropy loss](https://refivu.com/ja/terms/14067bdf8b9f-cross-entropy-loss)
- [GPT-4](https://refivu.com/ja/terms/1e2d0d2cdc44-gpt-4)
- [SGD](https://refivu.com/ja/terms/96a2d83e44ca-sgd)
- [AdamW](https://refivu.com/ja/terms/3228299bf379-adamw)
- [Federated learning](https://refivu.com/ja/terms/c6fc55e6f812-federated-learning)
- [Cohen’s Kappa](https://refivu.com/ja/terms/25228dabdda8-cohen-s-kappa)
- [log-likelihood](https://refivu.com/ja/terms/1b600a4b0bbc-log-likelihood)
- [PubMedQA](https://refivu.com/ja/terms/238ad55bc6c5-pubmedqa)
- [self-instruct](https://refivu.com/ja/terms/599304dadef6-self-instruct)
- [BioASQ](https://refivu.com/ja/terms/8cd523109c6e-bioasq)
- [Position bias](https://refivu.com/ja/terms/a70d2454f5a2-position-bias)
- [LLaMA-7B](https://refivu.com/ja/terms/31b2db9bb595-llama-7b)
- [PandaLM](https://refivu.com/ja/terms/df34d9c92878-pandalm)

## ほかの論文解説

- [Self-Distilled Reasoner: On-Policy Self-Distillation for Large Language Models](https://refivu.com/ja/papers/733bb47f-1989-4658-a978-6131bad900ad-self-distilled-reasoner-on-policy-self-distillation-for.md)
- [CAMR: Compatibility-Aware Memory Replay for Continual Learning in Large Language Models](https://refivu.com/ja/papers/24445413-cb2e-4d23-a34a-5020794de1e7-camr-compatibility-aware-memory-replay-for-continual.md)
- [PaLM-E: An Embodied Multimodal Language Model](https://refivu.com/ja/papers/c14507e3-43e7-434d-adc8-94f0d2c42b5f-palm-e-an-embodied-multimodal-language-model.md)
- [Large Language Models are Zero-Shot Reasoners](https://refivu.com/ja/papers/6b8a675c-a686-4e78-8256-301472d5cac2-large-language-models-are-zero-shot-reasoners.md)
- [Generative Agents: Interactive Simulacra of Human Behavior](https://refivu.com/ja/papers/3638efc4-db4a-48d9-bc16-5a758d9198fd-generative-agents-interactive-simulacra-of-human-behavior.md)
- [SWE-bench: Can Language Models Resolve Real-World GitHub Issues?](https://refivu.com/ja/papers/1cf41e87-39dc-4e23-9d0c-22ab7bc2a24b-swe-bench-can-language-models-resolve-real-world.md)
- [CLUE: A Chinese Language Understanding Evaluation Benchmark](https://refivu.com/ja/papers/b4bc9096-0098-4c87-8ac2-865871c6cfda-clue-a-chinese-language-understanding-evaluation-benchmark.md)
- [Chain-of-Thought Reasoning Without Prompting](https://refivu.com/ja/papers/177d9294-679d-436b-897e-3ec239de41b5-chain-of-thought-reasoning-without-prompting.md)
- [Robotic Control via Embodied Chain-of-Thought Reasoning](https://refivu.com/ja/papers/e0916502-601d-428e-90b1-cb59f1252a20-robotic-control-via-embodied-chain-of-thought-reasoning.md)
- [Neural Articulated Radiance Field](https://refivu.com/ja/papers/aa604c2f-5450-4fe1-b81c-ff26130ee0b1-neural-articulated-radiance-field.md)
- [MERF: Memory-Efficient Radiance Fields for Real-time View Synthesis in Unbounded Scenes](https://refivu.com/ja/papers/b88df5f3-e59a-4fcd-9cfd-d031cf876738-merf-memory-efficient-radiance-fields-for-real-time.md)
- [BARF: Bundle-Adjusting Neural Radiance Fields](https://refivu.com/ja/papers/ba143c7e-fe7b-41ec-83ca-c3ecd797e3e8-barf-bundle-adjusting-neural-radiance-fields.md)

---

AI解説には誤りが含まれることがあります。 [Refivu](https://refivu.com/ja/papers/2832dfcd-bd57-482f-9d55-f5bae8d2c8d2-pandalm-an-automatic-evaluation-benchmark-for-llm)
