Skip to main content
QUICK REVIEW

[論文レビュー] Understanding Finetuning for Factual Knowledge Extraction from Language Models

Mehran Kazemi, Sid Mittal|arXiv (Cornell University)|Jan 26, 2023
Topic ModelingComputer Science被引用数 3
ひとこと要約

本稿は、ファクト抽出のための言語モデルのファインチューニングにおける有害な副作用「Frequency Shock」を特定する。これは、トレーニングデータの頻度バイアスにより、レアなエンティティを過剰に予測し、一般的なエンティティを低く予測する現象である。著者らは、事前学習タスクを用いたモデルミキシングとミックスチャネルファインチューニングを提案し、これによりFrequency Shockが軽減され、アンダーファインチューニングに比べてHit@1で最大12.4%の相対的向上が達成される。

ABSTRACT

Language models (LMs) pretrained on large corpora of text from the web have been observed to contain large amounts of various types of knowledge about the world. This observation has led to a new and exciting paradigm in knowledge graph construction where, instead of manual curation or text mining, one extracts knowledge from the parameters of an LM. Recently, it has been shown that finetuning LMs on a set of factual knowledge makes them produce better answers to queries from a different set, thus making finetuned LMs a good candidate for knowledge extraction and, consequently, knowledge graph construction. In this paper, we analyze finetuned LMs for factual knowledge extraction. We show that along with its previously known positive effects, finetuning also leads to a (potentially harmful) phenomenon which we call Frequency Shock, where at the test time the model over-predicts rare entities that appear in the training set and under-predicts common entities that do not appear in the training set enough times. We show that Frequency Shock leads to a degradation in the predictions of the model and beyond a point, the harm from Frequency Shock can even outweigh the positive effects of finetuning, making finetuning harmful overall. We then consider two solutions to remedy the identified negative effect: 1- model mixing and 2- mixture finetuning with the LM's pre-training task. The two solutions combined lead to significant improvements compared to vanilla finetuning.

研究の動機と目的

  • ファインチューニング中に生じる意図しないバイアスを含め、ファインチューニド言語モデルのファクト抽出における失敗モードを理解すること。
  • ファインチューニングデータセットにおけるエンティティの頻度に起因する、予測が歪む現象「Frequency Shock」を特定・分析すること。
  • 特に、稀なエンティティと一般的なエンティティの予測において、ファインチューニングが知識抽出性能を向上させるか、悪化させるかを評価すること。
  • Frequency Shockを是正し、全体的なパフォーマンスを向上させる2つの戦略—モデルミキシングと事前学習タスクを用いたミックスチャネルファインチューニング—を提案・検証すること。
  • ファインチューニド言語モデルを用いた実世界の知識グラフ構築のための実用的レシピを提供すること。

提案手法

  • 著者らは、エンティティ頻度分布が異なる3つのデータセットを用いて、ファインチューニド言語モデルの分析を行い、タスク学習、Frequency Shock、Range Shiftの影響を分離する。
  • 正解が既知のクエリを用いた制御された評価設定を導入し、ファインチューニング後の予測シフトを測定する。
  • モデルミキシングは、ファインチューニドモデルとゼロショットまたはフェイントショットモデルを重み付き平均で組み合わせることで、予測をバランス化し、過剰・低予測を軽減する。
  • ミックスチャネルファインチューニングは、ファインチューニングタスクと元の事前学習目的(例:マスキング言語モデル)を同時に学習することで、事前学習の統計を保持する。
  • 評価指標として、データセット全体でマクロ平均Hit@1、Hit@3、Hit@5を用い、一般的なエンティティおよび稀なエンティティのパフォーマンスを評価する。
  • 最終的な知識抽出レシピは、ミックスチャネルファインチューニングモデルとフェイントショットモデルを組み合わせ、稀なエンティティや一般的なエンティティにおいても劣化が最小限に抑えられる最適なパフォーマンスを達成する。
Figure 1: For the query “Marat Makhmutov was born in [MASK] .” , a pre-trained language model correctly returns “Moscow” as answer. Once we finetune the language model on some data, it changes its prediction to “Baku” even though both “Moscow” and “Baku” appear as answers in the training set an equa
Figure 1: For the query “Marat Makhmutov was born in [MASK] .” , a pre-trained language model correctly returns “Moscow” as answer. Once we finetune the language model on some data, it changes its prediction to “Baku” even though both “Moscow” and “Baku” appear as answers in the training set an equa

実験結果

リサーチクエスチョン

  • RQ1知識抽出のための言語モデルのファインチューニングは、特に稀なエンティティや一般的なエンティティにおいて、意図しないバイアスを引き起こすか?
  • RQ2トレーニングデータの頻度に起因するFrequency Shockは、タスク学習の利益を上回るほどモデルパフォーマンスを低下させるか?
  • RQ3モデルミキシングは、ファインチューニングによって生じる稀なエンティティの過剰予測と一般的なエンティティの低予測を緩和できるか?
  • RQ4事前学習タスクを用いたミックスチャネルファインチューニングは、事前学習の頻度統計を保持し、Frequency Shockを軽減するのに役立つか?
  • RQ5実世界の知識グラフ構築において、ファインチューニド言語モデルからの知識抽出の最適な戦略は何か?

主な発見

  • Frequency Shockにより、トレーニングデータに同じ頻度で登場するにもかかわらず、事前学習の頻度統計との乖離により、ファインチューニドモデルは稀なエンティティを過剰に予測し、一般的なエンティティを低く予測する。
  • Frequency Shockの負の影響は、タスク学習の利益を上回り、エンティティ頻度統計の不一致がある場合、ファインチューニング自体が全体的に有害になることがある。
  • フェイントショットモデルとのモデルミキシングにより、稀なエンティティの過剰予測と一般的なエンティティの低予測が軽減され、両方のエンティティタイプでパフォーマンスが向上する。
  • 事前学習タスクを用いたミックスチャネルファインチューニングにより、モデルは事前学習に近い頻度統計を維持でき、Frequency Shockが軽減され、一般化性能が向上する。
  • モデルミキシングとミックスチャネルファインチューニングを組み合わせることで、アンダーファインチューニングに比べてHit@1で12.4%の相対的向上が達成され、特にミックスチャネルファインチューニングモデルとフェイントショットモデルを組み合わせたアプローチが最良の全体的パフォーマンスを達成する。
  • 提案されたレシピ—ミックスチャネルファインチューニングモデルに加えてフェイントショットモデルを組み合わせること—は、最高のパフォーマンスを達成し、頻度不一致の異なるデータセット間でも安定性を示す。
Figure 2: Macro average relative improvement of FT over ZS for different relation types in LowMismatch as a function of entity coverage and Pearson correlation for the train and test sets. The figures show that most of the improvement comes from the relations with a high entity coverage and Pearson
Figure 2: Macro average relative improvement of FT over ZS for different relation types in LowMismatch as a function of entity coverage and Pearson correlation for the train and test sets. The figures show that most of the improvement comes from the relations with a high entity coverage and Pearson

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。