On the Necessity of Attention-FFN Split in Vision Transformers
Abstract
The standard Transformer architecture relies on a rigid pattern that alternates Attention and Feed-Forward Network (FFN) layers. Despite its widespread adoption, the inductive bias imposed by this strict separation has not been systematically examined. In this work, we investigate the necessity of the Attention-FFN dichotomy in Vision Transformers (ViTs). To facilitate this analysis, we introduce the AttenFeed module, a unified component that integrates the functional properties of both Attention and FFN. Based on this module, we devise the unified Vision Transformer (uViT), which replaces the conventional alternating Attention-FFN structure with a sequence of AttenFeed modules. We then use uViT as a control group that relaxes the Attention-FFN dichotomy of the standard ViT and systematically compare the two models across multiple datasets and model scales. Our experiments reveal that the Attention-FFN dichotomy can hinder performance at smaller model scales due to the rigid parameter allocation of ViTs. The AttenFeed module and uViT serve as new analytical tools for understanding the Attention-FFN structure and offer theoretical insights into the heuristically designed architecture of conventional ViTs.
Create a lesson
Related papers
V-CoLA: Vision Token Compression with Linear Attention
Shared title terminologycs.CVHao Jiang, Yiru Mao, Tianpeng Bu et al.
Dissecting Representation Structure in Vision Transformers: A Rigorous Architectural Study
Shared title terminologycs.CVKim-Cuc Nguyen, Ngai-Man Cheung
Semantic State Reading for Joint Image-Semantic Diffusion Transformers
Shared title terminologycs.CVGuanxi Lai, Zixuan Li, Zhiwei Li et al.
Beyond Logits: Coherent Hallucination Mitigation via Attention Contrastive Decoding
Shared title terminologycs.CVYujia Chen, Rui Sun, Huayu Mai et al.
Loop4D: Embodied World Modeling with 4D VAEs and Looped Diffusion Transformers
Shared title terminologycs.CVGen Li, Fan Luo, Mengjun Lin et al.
SPARC: Geometry-Guided Attention Pruning for Long-Horizon Camera-Controlled Video Generation
Shared title terminologycs.CVZesong Yang, Weikai Chen, Liyuan Cui et al.