ChatPaper.aiChatPaper

Sostituire la softmax con la ReLU nei Vision Transformers

Replacing softmax with ReLU in Vision Transformers

September 15, 2023
Autori: Mitchell Wortsman, Jaehoon Lee, Justin Gilmer, Simon Kornblith
cs.AI

Abstract

Ricerche precedenti hanno osservato un degrado dell'accuratezza quando si sostituisce la softmax dell'attenzione con un'attivazione punto-punto come la ReLU. Nel contesto dei vision transformer, abbiamo scoperto che questo degrado è mitigato quando si divide per la lunghezza della sequenza. I nostri esperimenti, addestrando vision transformer di dimensioni variabili da piccole a grandi su ImageNet-21k, indicano che l'attenzione con ReLU può avvicinarsi o eguagliare le prestazioni dell'attenzione con softmax in termini di comportamento di scalabilità in funzione del calcolo.
English
Previous research observed accuracy degradation when replacing the attention softmax with a point-wise activation such as ReLU. In the context of vision transformers, we find that this degradation is mitigated when dividing by sequence length. Our experiments training small to large vision transformers on ImageNet-21k indicate that ReLU-attention can approach or match the performance of softmax-attention in terms of scaling behavior as a function of compute.
PDF180December 15, 2024