Lune

ICML2024Top-tier venue

Outlier-Efficient Hopfield Layers for Large Transformer-Based Models

Jerry Yao-Chieh Hu, Pei-Hsuan Chang, Haozheng Luo, Hong-Yu Chen, Weijian Li, Wei-Po Wang, Han Liu

2024Year
46Citations
22Top-tier citations

Abstract

We introduce an Outlier-Efficient Modern Hopfield Model (termed OutEffHop\mathrm{OutEffHop}) and use it to address the outlier inefficiency problem of training gigantic transformer-based models. Our main contribution is a novel associative memory model facilitating outlier-efficient associative memory retrievals. Interestingly, this memory model manifests a model-based interpretation of an outlier-efficient attention mechanism (Softmax1{\rm Softmax}_1): it is an approximation of the memory retrieval process of OutEffHop\mathrm{OutEffHop}. Methodologically, this allows us to introduce novel outlier-efficient Hopfield layers as powerful alternatives to traditional attention mechanisms, with superior post-quantization performance. Theoretically, the Outlier-Efficient Modern Hopfield Model retains and improves the desirable properties of standard modern Hopfield models, including fixed point convergence and exponential storage capacity. Empirically, we demonstrate the efficacy of the proposed model across large-scale transformer-based and Hopfield-based models (including BERT, OPT, ViT, and STanHop-Net), benchmarking against state-of-the-art methods like Clipped_Softmax\mathtt{Clipped\_Softmax} and Gated_Attention\mathtt{Gated\_Attention}. Notably, OutEffHop\mathrm{OutEffHop} achieves an average reduction of 22+% in average kurtosis and 26+% in the maximum infinity norm of model outputs across four models. Code is available at GitHub; models are on Hugging Face Hub; future updates are on arXiv.

Ask about this paper

Your agent reads all of it.

Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.

Questions to start from

Your agent calls

Luneget_paper_fulltext

Ask in Lune

Free to start. No credit card required.

Cited by top-tier papers22

Ask how each one uses it

Builds on32

Related papers

Dusk over the sea between two cliffs drawn in fine vertical lines