[論文レビュー] ByT5: Towards a token-free future with pre-trained byte-to-byte models
ByT5 は標準的な Transformer が UTF-8 バイトを直接処理できることを示し、トークンなしの事前学習モデルを可能にし、多くのタスクでトークンベースのベースラインに匹敵し、ノイズへの堅牢性が向上。
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 | エンコ/デコ |
|---|---|---|---|---|---|---|---|---|---|
| 小 | 300M | 85% | 512 / 1024 | 8/8 | mT5-Small | 300M | 85% | 512 / 1024 | 8/8 |
| ベース | 582M | 66% | 768 / 2048 | 12/12 | mT5-Base | 582M | 66% | 768 / 2048 | 12/12 |
| 大 | 1.23B | 42% | 1024 / 2816 | 24/24 | mT5-Large | 1.23B | 42% | 1024 / 2816 | 24/24 |
| XL | 3.74B | 27% | 2048 / 5120 | 24/24 | mT5-XL | 3.74B | 27% | 2048 / 5120 | 24/24 |
| XXL | 12.9B | 16% | 4096 / 10240 | 24/24 | mT5-XXL | 12.9B | 16% | 4096 / 10240 | 24/24 |
| - | - | - | - | - | ByT5-Large | 1.23B | 0.06% | 1536 / 3840 | 36/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が作成し、人間の編集者が確認しました。