CVDec 4, 2023

Object Recognition as Next Token Prediction

arXiv:2312.02142v416 citationsh-index: 33Has CodeCVPR
AI Analysis

This work addresses efficiency in object recognition for computer vision applications, presenting an incremental improvement by adapting language models to visual tasks.

The paper tackles object recognition by framing it as next token prediction using a language decoder, achieving comparable performance to the full model while being more efficient through a compact decoder design and one-shot sampling.

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

Code Implementations1 repo
Foundations

The foundational work for this paper's niche, ranked by how specifically the neighbourhood builds on it — not by global fame.

Your Notes