Skip to main content
QUICK REVIEW

[論文レビュー] Language Modeling Is Compression

Grégoire Delétang, Anian Ruoss|arXiv (Cornell University)|Sep 19, 2023
Natural Language Processing Techniques被引用数 26
ひとこと要約

本論は予測を不可逆圧縮として再定義し、巨大言語モデルがテキスト・画像・音声を横断するコンテキスト内圧縮に卓越した汎用予測子として機能することを示し、スケーリング、トークナイゼーション、圧縮機を生成モデルとして利用することを分析する。

ABSTRACT

It has long been established that predictive models can be transformed into lossless compressors and vice versa. Incidentally, in recent years, the machine learning community has focused on training increasingly large and powerful self-supervised (language) models. Since these large language models exhibit impressive predictive capabilities, they are well-positioned to be strong compressors. In this work, we advocate for viewing the prediction problem through the lens of compression and evaluate the compression capabilities of large (foundation) models. We show that large language models are powerful general-purpose predictors and that the compression viewpoint provides novel insights into scaling laws, tokenization, and in-context learning. For example, Chinchilla 70B, while trained primarily on text, compresses ImageNet patches to 43.4% and LibriSpeech samples to 16.4% of their raw size, beating domain-specific compressors like PNG (58.5%) or FLAC (30.3%), respectively. Finally, we show that the prediction-compression equivalence allows us to use any compressor (like gzip) to build a conditional generative model.

研究の動機と目的

  • 損失なし圧縮と情報理論の視点から基盤モデルの研究を動機づける。
  • モダリティを横断する大規模言語モデルのオフライン(文脈内)圧縮能力を経験的に評価する。
  • 圧縮性能に対するスケーリング法則と文脈長・モデルサイズの影響を分析する。
  • 圧縮機を条件付き生成モデルとして再利用する方法を示す。
  • トークナイゼーションとデータモダリティが圧縮効率に及ぼす役割を検討する。

提案手法

  • TransformerおよびChinchilla風モデルからの確率予測を用いた算術符号化を使って、損失のない圧縮機を作成する。
  • テキスト(enwik9)、画像(ImageNetパッチ)、および音声(LibriSpeech)からの1 GBサンプルで圧縮を評価する。
  • 一般目的の圧縮機(gzip、LZMA2)およびドメイン特化の圧縮機(PNG、FLAC)と比較する。
  • 最適な調整圧縮率のためのモデルサイズとデータセットサイズのトレードオフを調査する。
  • prior sequence に条件付けした生成モデルとして圧縮機からのサンプル生成方法を実演する。
Figure 1 : Arithmetic encoding of the sequence ‘AIXI’ with a probabilistic (language) model $P$ (both in blue) resulting in the binary code ‘0101001’ (in green). Arithmetic coding compresses data by assigning unique intervals to symbols based on the probabilities assigned by $P$ . It progressively r
Figure 1 : Arithmetic encoding of the sequence ‘AIXI’ with a probabilistic (language) model $P$ (both in blue) resulting in the binary code ‘0101001’ (in green). Arithmetic coding compresses data by assigning unique intervals to symbols based on the probabilities assigned by $P$ . It progressively r

実験結果

リサーチクエスチョン

  • RQ1主にテキストで訓練された基盤モデルは、複数のデータモダリティに跨る汎用圧縮機として機能し得るか。
  • RQ2文脈長とモデルサイズは文脈内圧縮性能にどう影響するか。
  • RQ3大規模モデルと組み合わせたとき、トークナイゼーション方式は圧縮を改善するか、あるいは損なうか。
  • RQ4圧縮機はテキスト、画像、音声データの条件付き生成モデルとして使えるか。
  • RQ5データサイズに対する圧縮性能のスケーリング法則の影響は何か。

主な発見

チャンクサイズ圧縮機enwik9 Raw (%)ImageNet Raw (%)LibriSpeech Raw (%)Random Raw (%)enwik9 Adjusted (%)ImageNet Adjusted (%)LibriSpeech Adjusted (%)Random Adjusted (%)
gzip32.370.736.4100.032.370.736.4100.0
LZMA223.057.929.9100.023.057.929.9100.0
PNG42.958.532.2100.042.958.532.2100.0
FLAC89.561.930.9107.889.561.930.9107.8
2048gzip48.168.638.5100.148.168.638.5100.1
2048LZMA250.062.438.2100.050.062.438.2100.0
2048PNG80.661.737.6103.280.661.737.6103.2
2048FLAC88.960.930.3107.288.960.930.3107.2
200KTransformer30.9194.0146.6195.530.9194.0146.6195.5
800KTransformer21.9185.3131.3200.321.9185.3131.3200.3
3.2MTransformer17.7216.5228.9224.717.7216.5228.9224.7
1BChinchilla211.3262.2224.9308.81410.21454.71423.61501.6
7BChinchilla1410.21454.71423.61501.61410.21454.71423.61501.6
70BChinchilla14008.314048.014021.014100.814008.314048.014021.014100.8
  • Chinchilla 70B は ImageNet パッチで 43.4% 圧縮、LibriSpeech で 16.4% を達成し、各々のドメインで PNG および FLAC を上回る。
  • 大規模基盤モデルは強力な文脈内学習を提供し、テキスト・画像・音声すべてで競争力のあるオフライン圧縮を可能にする。
  • 圧縮性能はスケーリング傾向に従うが、データセットサイズに制限される。ある閾値を超えると、パラメータ追加はモデルサイズを考慮した調整圧縮率を増加させる。
  • トークナイゼーションは小規模モデルでは生の圧縮率を改善しないことが多く、より大きな語彙は大規模モデルの性能を下げる可能性がある。
  • prior context に条件付けして条件付き圧縮長の差に従ってサンプリングすることで、生成モデルとして圧縮機を用いることが可能である。
Figure 2 : Adjusted compression rates (compressed size / raw size) for Transformers of different sizes, trained on enwik8 and evaluated on enwik (both axes are logarithmic). Here, the compressed size does not only consider the size of the compressed output (roughly equal to the $\log$ -loss) but als
Figure 2 : Adjusted compression rates (compressed size / raw size) for Transformers of different sizes, trained on enwik8 and evaluated on enwik (both axes are logarithmic). Here, the compressed size does not only consider the size of the compressed output (roughly equal to the $\log$ -loss) but als

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

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

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

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