Dependency Transformer Grammars: Integrating Dependency Structures into Transformer Language Models

要約

Syntactic Transformer 言語モデルは、構文ツリーと文を同時にモデル化することで、より優れた一般化を達成することを目的としています。
これまでの研究では、Constituency ベースの構造を Transformers に追加することに焦点を当ててきましたが、明示的な依存関係ベースの帰納的バイアスを備えた Transformer 言語モデルの新しいクラスである、Dependency Transformer Grammars (DTG) を導入します。
DTG は、アテンション マスクを変更することで制約されたアテンション パターンを使用して依存関係遷移システムをシミュレートし、相対位置エンコーディングを通じてスタック情報を組み込み、トークンの埋め込みと操作の埋め込みの組み合わせで依存関係のアーク表現を強化します。
依存関係ツリーで注釈が付けられた文のデータセットでトレーニングすると、DTG は、Transformer 言語モデルのベースラインと同等の複雑さを維持しながら、より優れた一般化を実現します。
また、DTG は最近の選挙区ベースのモデルよりも優れたパフォーマンスを示しており、依存関係が Transformer 言語モデルをより適切に導くことができることを示しています。
私たちのコードは https://github.com/zhaoyd1/Dep_Transformer_Grammars でリリースされています。

要約(オリジナル)

Syntactic Transformer language models aim to achieve better generalization through simultaneously modeling syntax trees and sentences. While prior work has been focusing on adding constituency-based structures to Transformers, we introduce Dependency Transformer Grammars (DTGs), a new class of Transformer language model with explicit dependency-based inductive bias. DTGs simulate dependency transition systems with constrained attention patterns by modifying attention masks, incorporate the stack information through relative positional encoding, and augment dependency arc representation with a combination of token embeddings and operation embeddings. When trained on a dataset of sentences annotated with dependency trees, DTGs achieve better generalization while maintaining comparable perplexity with Transformer language model baselines. DTGs also outperform recent constituency-based models, showing that dependency can better guide Transformer language models. Our code is released at https://github.com/zhaoyd1/Dep_Transformer_Grammars.

arxiv情報

著者 Yida Zhao,Chao Lou,Kewei Tu
発行日 2024-07-24 16:38:38+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

カテゴリー: cs.AI, cs.CL パーマリンク