about
Pay Attention to MLPs (arxiv.org)
3 points by fzliu on Apr 12, 2023 | hide | past | pdf | discuss on HN

In plain words: Instead of letting every word or pixel look at every other one, this network stacks simple layers that mix information across positions and then gate it by multiplying two halves. It matched today's attention-based networks on language and vision tasks, showing attention isn't essential.

Abstract

Transformers have become one of the most important architectural innovations in deep learning and have enabled many breakthroughs over the past few years. Here we propose a simple network architecture, gMLP, based on MLPs with gating, and show that it can perform as well as Transformers in key language and vision applications. Our comparisons show that self-attention is not critical for Vision Transformers, as gMLP can achieve the same accuracy. For BERT, our model achieves parity with Transformers on pretraining perplexity and is better on some downstream NLP tasks. On finetuning tasks where gMLP performs worse, making the gMLP model substantially larger can close the gap with Transformers. In general, our experiments show that gMLP can scale as well as Transformers over increased data and compute.

Hanxiao Liu, Zihang Dai, David R. So, Quoc V. Le
arXiv:2105.08050 · cs.LG, cs.CL, cs.CV · submitted May 17, 2021 · updated Jun 1, 2021
abstract · pdf · html

add comment on HN
Also discussed: Oct 2021 (1 point, 0 comments) · May 2021 (2 points, 0 comments)