Skip to main content
QUICK REVIEW

[論文レビュー] COLD Decoding: Energy-based Constrained Text Generation with Langevin Dynamics

Lianhui Qin, Sean Welleck|arXiv (Cornell University)|Feb 23, 2022
Topic Modeling被引用数 43
ひとこと要約

COLD decoding は制約付きテキスト生成を Langevin dynamics を用いた energy-based モデルからのサンプリングとして扱い、事前学習言語モデルのファインチューニングなしに柔軟でタスク非依存の制約統合を可能にする。 abductive reasoning、counterfactual story generation、and lexically constrained decoding で性能向上を示す。

ABSTRACT

Many applications of text generation require incorporating different constraints to control the semantics or style of generated text. These constraints can be hard (e.g., ensuring certain keywords are included in the output) and soft (e.g., contextualizing the output with the left- or right-hand context). In this paper, we present Energy-based Constrained Decoding with Langevin Dynamics (COLD), a decoding framework which unifies constrained generation as specifying constraints through an energy function, then performing efficient differentiable reasoning over the constraints through gradient-based sampling. COLD decoding is a flexible framework that can be applied directly to off-the-shelf left-to-right language models without the need for any task-specific fine-tuning, as demonstrated through three challenging text generation applications: lexically-constrained generation, abductive reasoning, and counterfactual reasoning. Our experiments on these constrained generation tasks point to the effectiveness of our approach, both in terms of automatic and human evaluation.

研究の動機と目的

  • 制約が硬い(キーワード)場合も soft(文脈)場合もあり、タスクごとに変化する制約付きテキスト生成を動機づける。
  • デコードをエネルギー駆動型モデル(EBM)からのサンプリングとして定式化し、様々な制約タイプを統合する。
  • Langevin dynamics を用いてタスク固有のファインチューニングなしに、勾配ベースの、微分可能な制約推論を有効にする。
  • 複数の制約付き生成タスクで本手法をデモンストレーションし、既存のデコード手法と比較する。

提案手法

  • 制約付きデコードを、テキスト系列に対して p(y) = exp{sum_i lambda_i f_i(y)} / Z のエネルギー関数を用いたエネルギー駆動分布からのサンプリングとして定式化する。
  • 離散的なテキストを連続的なソフト系列 y~ にリラックスさせ、エネルギー E(y~) = -sum_i lambda_i f_i(y~) を定義し、Langevin 更新 y~(n+1) = y~(n) - eta grad_y~ E(y~(n)) + epsilon^(n) を行う。
  • 連続的な出力に適用可能な微分可能な制約関数(ソフトな流暢さ、将来文脈予測、n-gram 類似性)を定義し、エネルギー関数に組み込めるようにする。
  • 基盤となる LM に導かれた top-k フィルタリングでソフトからディスクリートへのマッピングを用い、連続サンプルから流暢な離散出力を生成する。
  • LMベースのグリーディロジットで初期化し、Langevin ダイナミクス中に減衰するノイズスケジュールを適用し、任意で複数出力の中から選択するサンプル・アンド・セレクトを行う。
  • 離散化は各位置で top-k LM 候補の最も確率の高いトークンをとり、ハード制約を満たすように制約トークンを補助的に用いることで実現する。

実験結果

リサーチクエスチョン

  • RQ1Langevin dynamics を用いたエネルギー駆動型のデコードは、タスク固有のファインチューニングなしに既存の言語モデルと機能するのか?
  • RQ2微分可能な様々な制約関数(流暢さ、文脈的一貫性、n-gram 類似性)は、変化する制約付き生成タスクを実現するためにどう組み合わさるのか?
  • RQ3Cold デコードは abductive reasoning、counterfactual story generation、lexically constrained decoding において、タスク固有の手法や勾配ベースのベースラインを上回るのか?

主な発見

  • Cold デコーディングは abductive reasoning においてベースライン手法と比べ語彙カバレッジとテキスト整合性を向上させる。
  • 人間評価は Cold が左文脈・右文脈の両方において競合ベースラインより全体的な一貫性を高く達成することを示した。
  • counterfactual story rewriting では、Delorean と比較して一貫性が高く、最小編集量の指標も同等である。
  • lexically constrained decoding において、Cold はいくつかのベースラインより語彙キーワードのカバレッジを高くしつつ流暢さを維持した。
  • 全タスクを通じて、タスク固有のファインチューニングなしに統一的なデコード枠組み内で多様な制約を扱える能力を示した。

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

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

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

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