Transformer-based architectures are the model of choice for natural language understanding, but they come at a significant cost, as they have quadratic complexity in the input length, require a lot of training data, and can be difficult to tune. In the pursuit of lower costs, we investigate simple MLP-based architectures. We find that existing architectures such as MLPMixer, which achieves token mixing through a static MLP applied to each feature independently, are too detached from the inductive biases required for natural language understanding. In this paper, we propose a simple variant, HyperMixer, which forms the token mixing MLP dynamically using hypernetworks. Empirically, we demonstrate that our model performs better than alternative MLP-based models, and on par with Transformers. In contrast to Transformers, HyperMixer achieves these results at substantially lower costs in terms of processing time, training data, and hyperparameter tuning.
翻译:基于Transformer的架构是自然语言理解的首选模型,但其输入长度具有二次复杂度、需要大量训练数据且难以调参,代价高昂。为追求更低成本,我们研究了基于简单MLP的架构。我们发现现有架构(如MLPMixer)通过独立应用于每个特征的静态MLP实现token混合,其与自然语言理解所需的归纳偏置过于脱节。本文提出一种简单变体HyperMixer,利用超网络动态生成token混合MLP。实验表明,该模型性能优于其他基于MLP的模型,并与Transformer持平。与Transformer相比,HyperMixer在处理时间、训练数据和超参数调优方面以显著更低的成本实现了这些结果。