オブジェクト認識を次のトークン予測として
Object Recognition as Next Token Prediction
December 4, 2023
著者: Kaiyu Yue, Bor-Chun Chen, Jonas Geiping, Hengduo Li, Tom Goldstein, Ser-Nam Lim
cs.AI
要旨
物体認識を次トークン予測として定式化するアプローチを提案する。このアイデアは、画像埋め込みからテキストトークンを自己回帰的に予測してラベルを形成する言語デコーダを適用するものである。この予測プロセスを自己回帰に基づかせるため、デコーダ用に非因果的アテンションマスクをカスタマイズし、2つの主要な特徴を組み込む:異なるラベルのトークンを独立としてモデル化すること、および画像トークンをプレフィックスとして扱うことである。このマスキングメカニズムは、推論時に複数ラベルのトークンを並列にサンプリングし、生成されたラベルをその確率に基づいてランク付けする効率的な方法——ワンショットサンプリング——を可能にする。さらに効率性を向上させるため、事前学習済み言語モデルの中間ブロックを単に削除することでコンパクトなデコーダを構築するシンプルな戦略を提案する。このアプローチにより、完全なモデルと同等の性能を維持しながら、著しく効率的なデコーダが得られる。コードはhttps://github.com/kaiyuyue/nxtpで公開されている。
English
We present an approach to pose object recognition as next token prediction.
The idea is to apply a language decoder that auto-regressively predicts the
text tokens from image embeddings to form labels. To ground this prediction
process in auto-regression, we customize a non-causal attention mask for the
decoder, incorporating two key features: modeling tokens from different labels
to be independent, and treating image tokens as a prefix. This masking
mechanism inspires an efficient method - one-shot sampling - to simultaneously
sample tokens of multiple labels in parallel and rank generated labels by their
probabilities during inference. To further enhance the efficiency, we propose a
simple strategy to construct a compact decoder by simply discarding the
intermediate blocks of a pretrained language model. This approach yields a
decoder that matches the full model's performance while being notably more
efficient. The code is available at https://github.com/kaiyuyue/nxtp