Skip to main content
QUICK REVIEW

[論文レビュー] ByT5: Towards a token-free future with pre-trained byte-to-byte models

Linting Xue, Aditya Barua|arXiv (Cornell University)|May 28, 2021
Natural Language Processing Techniques被引用数 69
ひとこと要約

ByT5 は標準的な Transformer が UTF-8 バイトを直接処理できることを示し、トークンなしの事前学習モデルを可能にし、多くのタスクでトークンベースのベースラインに匹敵し、ノイズへの堅牢性が向上。

ABSTRACT

Most widely-used pre-trained language models operate on sequences of tokens corresponding to word or subword units. By comparison, token-free models that operate directly on raw text (bytes or characters) have many benefits: they can process text in any language out of the box, they are more robust to noise, and they minimize technical debt by removing complex and error-prone text preprocessing pipelines. Since byte or character sequences are longer than token sequences, past work on token-free models has often introduced new model architectures designed to amortize the cost of operating directly on raw text. In this paper, we show that a standard Transformer architecture can be used with minimal modifications to process byte sequences. We characterize the trade-offs in terms of parameter count, training FLOPs, and inference speed, and show that byte-level models are competitive with their token-level counterparts. We also demonstrate that byte-level models are significantly more robust to noise and perform better on tasks that are sensitive to spelling and pronunciation. As part of our contribution, we release a new set of pre-trained byte-level Transformer models based on the T5 architecture, as well as all code and data used in our experiments.

研究の動機と目的

  • 生のバイト列上で動作するトークンフリーのNLPモデルを動機づけ、評価する。
  • バイト列を処理するために最小限の変更で Transformer アーキテクチャを適応させる。
  • ByT5 とトークンベースのベースラインとの間で、パラメータ数、FLOPs、推論速度のトレードオフを、多言語タスク全体で評価する。
  • バイトレベルのモデリングにおける入力ノイズや綴りのばらつきへの堅牢性を示す。
  • 事前学習済み ByT5 モデルと付随するコード/データを公開する。

提案手法

  • トークン語彙を256バイト埋め込みと特殊トークンに置換; UTF-8 バイトを直接 Transformer に入力する。
  • 平均マスク済みバイト span の長さを20バイトとする span 汚損の事前訓練目的を使用(セントネルとして末尾の100バイトIDを再利用)。
  • 語彙埋め込み行列が欠如していることを補うため、エンコーダをデコーダより深くする(エンコーダの深さをデコーダの3倍に)。
  • 5つのモデルサイズを訓練(Small, Base, Large, XL, XXL)、シーケンス長を1024バイトに設定、2^20トークンのバッチで100万ステップ訓練。
  • ByT5 アーキテクチャを mT5 にパラメータを合わせつつ、d_model と d_ff を調整して d_ff/d_model 比を約2.5倍に保つ。
  • GLUE、SuperGLUE、XSum、TweetQA、DROP、Dakshina、Sigmorphon、xtreme などの英語・多言語ベンチマークで評価し、mT5 と比較する。

実験結果

リサーチクエスチョン

  • RQ1標準的な Transformer を最小限のアーキテクチャ変更でバイトレベル入力に効果的に適応させることができるか?
  • RQ2トークンベースからバイトベースの入力へ移行する際のパラメータ数、FLOPs、推論コストのトレードオフは何か?
  • RQ3ByT5 は英語および多言語の分類、生成、単語レベルのタスクで mT5 と比較してどう機能するか?
  • RQ4言語を超えて、ByT5 はトークンベースのモデルよりノイズや綴りのばらつきに対してより堅牢か?
  • RQ5トークンフリーのトランスフォーマーにおけるエンコーダ/デコーダの深さのバランスは性能にどう影響するか?

主な発見

モデルパラメータ語彙d_model / d_ffエンコ/デコモデル(ByT5)パラメータ語彙d_model / d_ffエンコ/デコ
300M85%512 / 10248/8mT5-Small300M85%512 / 10248/8
ベース582M66%768 / 204812/12mT5-Base582M66%768 / 204812/12
1.23B42%1024 / 281624/24mT5-Large1.23B42%1024 / 281624/24
XL3.74B27%2048 / 512024/24mT5-XL3.74B27%2048 / 512024/24
XXL12.9B16%4096 / 1024024/24mT5-XXL12.9B16%4096 / 1024024/24
-----ByT5-Large1.23B0.06%1536 / 384036/12
  • ByT5 は英語および多言語ベンチマークで mT5 と競合し、小さめのモデルサイズでは mT5 を上回ることがある。
  • バイトレベルの ByT5 は強力な生成性能を示し、複数のサイズで XSum、TweetQA、DROP でしばしば mT5 を上回る。
  • トークンフリーの ByT5 は語彙関連のパラメータを大幅に削減し、それらをトランスフォーマーレイヤへ再配分することで、エンコーダ/デコーダの深さ比を3:1にし、密なパラメータ利用を実現する。
  • ByT5 はタスクと言語を問わずノイズや乱れのあるテキストに対して優れた堅牢性を示し、mT5 と比較して様々な入力の破損に対する劣化が小さい。
  • xtreme 跨言語タスク全体で ByT5 は概して競争力がある。全ての対象言語でデータが利用可能な場合、同一言語ベンチマークで mT5 を上回り、モデルサイズに応じてゼロショットおよび translate-train の性能パターンが強い。
  • アブレーション研究は、重いエンコーダが ByT5 に最も良い利益をもたらすこと、長いバイト span マスキング(平均20、3や40と比較) が特定のタスクを改善すること、256バイト語彙が語彙行列から大半のパラメータを密な層へ移すことを示している。

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

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

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

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