Skip to main content
QUICK REVIEW

[論文レビュー] KnowCoder: Coding Structured Knowledge into LLMs for Universal Information Extraction

Zixuan Li, Yutao Zeng|arXiv (Cornell University)|Mar 12, 2024
Natural Language Processing Techniques被引用数 5
ひとこと要約

KnowCoder はコード風のスキーマ表現と、LLMs を用いた universal information extraction のための二段階学習フレームワークを導入し、few-shot、zero-shot、 supervised 設定において NER、RE、EE タスクで強力な性能を達成します。

ABSTRACT

In this paper, we propose KnowCoder, a Large Language Model (LLM) to conduct Universal Information Extraction (UIE) via code generation. KnowCoder aims to develop a kind of unified schema representation that LLMs can easily understand and an effective learning framework that encourages LLMs to follow schemas and extract structured knowledge accurately. To achieve these, KnowCoder introduces a code-style schema representation method to uniformly transform different schemas into Python classes, with which complex schema information, such as constraints among tasks in UIE, can be captured in an LLM-friendly manner. We further construct a code-style schema library covering over $\textbf{30,000}$ types of knowledge, which is the largest one for UIE, to the best of our knowledge. To ease the learning process of LLMs, KnowCoder contains a two-phase learning framework that enhances its schema understanding ability via code pretraining and its schema following ability via instruction tuning. After code pretraining on around $1.5$B automatically constructed data, KnowCoder already attains remarkable generalization ability and achieves relative improvements by $\textbf{49.8%}$ F1, compared to LLaMA2, under the few-shot setting. After instruction tuning, KnowCoder further exhibits strong generalization ability on unseen schemas and achieves up to $\textbf{12.5%}$ and $\textbf{21.9%}$, compared to sota baselines, under the zero-shot setting and the low resource setting, respectively. Additionally, based on our unified schema representations, various human-annotated datasets can simultaneously be utilized to refine KnowCoder, which achieves significant improvements up to $\textbf{7.5%}$ under the supervised setting.

研究の動機と目的

  • 複雑な UIE 知識(分類体系、制約、ポスト処理)を捉えるための統一的で LLM に優しいスキーマ表現を開発する。
  • Wikidata から数万の概念をカバーする大規模なコード風スキーマライブラリを構築する。
  • スキーマ理解を高めるための二段階学習フレームワークを提案する(コード事前訓練)と、スキーマ追従を高める(指示調整)。
  • few-shot、ゼロショット、低リソース、監視下学習のさまざまなデータ体制で NER、RE、EE タスクにおける強力な一般化と性能向上を示す。
  • さらなる研究のためにスキーマライブラリ、データ、コード、モデルを公開する。

提案手法

  • コード風スキーマ表現を導入:Entity、Relation、Event クラス、分類系統の継承、制約の型ヒント、定義のクラスコメント、ポスト処理のクラスメソッドを活用。
  • Wikidata からの大規模なコード風スキーマライブラリを構築(エンティティタイプ 29k 超、リレーションタイプ 876、イベントタイプ 519)。
  • 二段階学習フレームワーク:(i)スキーマ定義とインスタンスコードに対するコード事前訓練によるスキーマ理解(約 1.5B の自動構築データ);(ii)スキーマ認識プロンプトとタスクを用いた指示調整によるスキーマ追従。
  • 人手注釈 IE データセットを活用した洗練化で、タスク横断の性能をさらに向上。
  • 学習の詳細には、バックボーンとして大文脈 LLaMA2-base-7B、スキーマ導入戦略、後段階のパラメータ効率型微調整として LoRA を含む。
  • NER、RE、EE の 33 IE データセットを評価し、複数のベースラインと SOTA 結果と比較。

実験結果

リサーチクエスチョン

  • RQ1統合されたコード風スキーマ表現は LLM に多様な UIE スキーマを理解し、追従させることができるのか?
  • RQ2コード事前訓練+指示調整という二段階学習フレームワークは、未知のスキーマへの一般化と UIE タスクの性能を改善するのか?
  • RQ3few-shot、ゼロショット、低リソース、監視下設定で KnowCoder は NER、RE、EE のパフォーマンスをどのように示すのか?
  • RQ4統一スキーマライブラリを用いた人手注釈 IE データセットで KnowCoder を改良した場合、IE タスクの成果にどんな影響があるのか?
  • RQ5大規模なコード風スキーマライブラリは、複数の IE データセットを同時に活用するのに有効なのか?

主な発見

Model映画Rest.AILiteratura音楽政治科学平均
LLaMA2-7B31.019.630.824.128.038.744.130.9
LLaMA2-13B32.625.237.536.537.060.351.740.1
KnowCoder-7B (SU. only)37.236.441.842.653.860.651.646.3
  • KnowCoder のコード風スキーマ表現は、29k 以上のエンティティタイプ、876 のリレーションタイプ、519 のイベントタイプにわたる統一的なビューをサポートし、強力な UIE 能力を生み出す。
  • コード事前訓練の約 1.5B の自動注釈データ後、KnowCoder は few-shot NER で LLaMA2 に対して相対 F1 が 49.8% 向上。
  • 指示調整後、未知のスキーマに対するゼロショットおよび低リソースでの一般化が強力で、基準手法に対して平均的な相対改善が最大 12.5%(ゼロショット)および 21.9%(低リソース)。
  • 人手注釈 IE データセットの洗練化により、監視下設定の IE タスクで最大 7.5% の絶対改善を達成。
  • ゼロショット結果では、KnowCoder-7B が SU のみの事前訓練を受けた NER で平均 F1 が 46.3 に達し、LLaMA2-7B に対して大幅な改善を示し、この設定でいくつかの洗練ベースラインを上回る。
  • アブレーションは、スキーマ理解と追従の両方の段階が有意に寄与することを示し、形成段階を除去すると特にスキーマ追従ステップの性能が低下。

より良い研究を、今すぐ始めましょう

論文設計から論文執筆まで、研究時間を劇的に削減しましょう。

クレジットカード登録不要

このレビューはAIが作成し、人間の編集者が確認しました。