Un'immagine vale più di 16x16 patch: esplorare i Transformer sui singoli pixel
An Image is Worth More Than 16x16 Patches: Exploring Transformers on Individual Pixels
June 13, 2024
Autori: Duy-Kien Nguyen, Mahmoud Assran, Unnat Jain, Martin R. Oswald, Cees G. M. Snoek, Xinlei Chen
cs.AI
Abstract
Questo lavoro non introduce un nuovo metodo. Piuttosto, presentiamo una scoperta interessante che mette in discussione la necessità del bias induttivo -- la località nelle moderne architetture di visione artificiale. Nello specifico, abbiamo scoperto che i Transformer standard possono operare trattando direttamente ogni singolo pixel come un token e ottenere risultati altamente performanti. Questo è sostanzialmente diverso dal design popolare nel Vision Transformer, che mantiene il bias induttivo derivato dalle ConvNet verso i vicinati locali (ad esempio, trattando ogni patch 16x16 come un token). Dimostriamo principalmente l'efficacia dei pixel-come-token in tre compiti ben studiati nella visione artificiale: apprendimento supervisionato per la classificazione di oggetti, apprendimento auto-supervisionato tramite auto-codifica mascherata e generazione di immagini con modelli di diffusione. Sebbene operare direttamente sui singoli pixel sia meno pratico dal punto di vista computazionale, riteniamo che la comunità debba essere consapevole di questa sorprendente conoscenza quando si progetta la prossima generazione di architetture neurali per la visione artificiale.
English
This work does not introduce a new method. Instead, we present an interesting
finding that questions the necessity of the inductive bias -- locality in
modern computer vision architectures. Concretely, we find that vanilla
Transformers can operate by directly treating each individual pixel as a token
and achieve highly performant results. This is substantially different from the
popular design in Vision Transformer, which maintains the inductive bias from
ConvNets towards local neighborhoods (e.g. by treating each 16x16 patch as a
token). We mainly showcase the effectiveness of pixels-as-tokens across three
well-studied tasks in computer vision: supervised learning for object
classification, self-supervised learning via masked autoencoding, and image
generation with diffusion models. Although directly operating on individual
pixels is less computationally practical, we believe the community must be
aware of this surprising piece of knowledge when devising the next generation
of neural architectures for computer vision.