Pushdown Layers: Encoding Recursive Structure in Transformer Language Models

要約

再帰は人間の言語の顕著な特徴であり、明示的な再帰状態追跡メカニズムが欠如しているため、自己注意を払うのが根本的に困難です。
その結果、Transformer 言語モデルはロングテール再帰構造を十分に捕捉できず、サンプル非効率な構文一般化を示します。
この研究では、プッシュダウン レイヤーを導入します。これは、観察されたプレフィックスの増分解析ですべてのトークンの推定深さを追跡するスタック テープを介して再帰的状態をモデル化する新しいセルフ アテンション レイヤーです。
プッシュダウン層を備えた Transformer LM は、新しいトークンを予測する際にこのスタック テープを自己回帰的かつ同期的に更新する構文言語モデルです。その結果、スタック テープを使用してトークンに対する注意をソフトに調整します。たとえば、閉じた構成要素を「スキップ」することを学習します。
Silver Constituency 解析で注釈が付けられた文字列のコーパスでトレーニングすると、プッシュダウン レイヤーを備えた Transformers は、同様の複雑さを維持しながら、劇的に優れた 3 ~ 5 倍のサンプル効率の構文一般化を実現します。
プッシュダウン レイヤーは、標準のセルフ アテンションをドロップインで置き換えるものです。
これを、自動的に解析される WikiText-103 上でプッシュダウン レイヤーを使用して GPT2-medium を微調整することでこれを説明し、いくつかの GLUE テキスト分類タスクの改善につながります。

要約(オリジナル)

Recursion is a prominent feature of human language, and fundamentally challenging for self-attention due to the lack of an explicit recursive-state tracking mechanism. Consequently, Transformer language models poorly capture long-tail recursive structure and exhibit sample-inefficient syntactic generalization. This work introduces Pushdown Layers, a new self-attention layer that models recursive state via a stack tape that tracks estimated depths of every token in an incremental parse of the observed prefix. Transformer LMs with Pushdown Layers are syntactic language models that autoregressively and synchronously update this stack tape as they predict new tokens, in turn using the stack tape to softly modulate attention over tokens — for instance, learning to ‘skip’ over closed constituents. When trained on a corpus of strings annotated with silver constituency parses, Transformers equipped with Pushdown Layers achieve dramatically better and 3-5x more sample-efficient syntactic generalization, while maintaining similar perplexities. Pushdown Layers are a drop-in replacement for standard self-attention. We illustrate this by finetuning GPT2-medium with Pushdown Layers on an automatically parsed WikiText-103, leading to improvements on several GLUE text classification tasks.

arxiv情報

著者 Shikhar Murty,Pratyusha Sharma,Jacob Andreas,Christopher D. Manning
発行日 2023-10-29 17:27:18+00:00
arxivサイト arxiv_id(pdf)

提供元, 利用サービス

arxiv.jp, Google

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