Pith. sign in

REVIEW 4 cited by

A Study on ReLU and Softmax in Transformer

Not yet reviewed by Pith; the record is open.

This paper has not been read by Pith yet. Machine review is queued; the pith claim, tier, and objections will appear here once it completes.

SPECIMEN: schema-true, not a live event

T0 review · schema-true

One-sentence machine reading of the paper's core claim.

pith:XXXXXXXX · record.json · timestamp

arxiv 2302.06461 v1 pith:JMZQR3UA submitted 2023-02-13 cs.CL cs.AIcs.LG

A Study on ReLU and Softmax in Transformer

classification cs.CL cs.AIcs.LG
keywords relusoftmaxkey-valuememorytransformerdifferentequivalentself-attention
verification ladder T0 review T1 audit T2 compute T3 formal T4 reserved
0 comments
Share X Bluesky LinkedIn Reddit HN
read the original abstract

The Transformer architecture consists of self-attention and feed-forward networks (FFNs) which can be viewed as key-value memories according to previous works. However, FFN and traditional memory utilize different activation functions (i.e., ReLU and Softmax respectively), which makes them not equivalent. In this paper, we first rebuild the connections between FFN and key-value memory by conducting extensive studies on ReLU and Softmax, and find they are equivalent when adding an additional layer normalization module on Softmax. In addition, ReLU outperforms Softmax on both FFN and key-value memory when the number of value slots is large. We analyze the reasons and then explore this good property of ReLU on the self-attention network where the original Softmax activation performs poorly on long input sequences. We then propose a full ReLU architecture named ReLUFormer which performs better than the baseline Transformer on long sequence tasks such as document translation. This paper sheds light on the following points: 1) Softmax and ReLU use different normalization methods over elements which lead to different variances of results, and ReLU is good at dealing with a large number of key-value slots; 2) FFN and key-value memory are equivalent, and thus the Transformer can be viewed as a memory network where FFNs and self-attention networks are both key-value memories.

discussion (0)

Sign in with ORCID, Apple, or X to comment. Anyone can read and Pith papers without signing in.

Forward citations

Cited by 4 Pith papers

Reviewed papers in the Pith corpus that reference this work. Sorted by Pith novelty score.

  1. Gradient Flow Structure and Quantitative Dynamics of Multi-Head Self-Attention

    cs.LG 2026-05 unverdicted novelty 7.0

    Multi-head self-attention is modeled as a gradient flow with a non-decreasing energy functional under conditions on score matrices, yielding closed-form clustering thresholds in simplified regimes and monotonic entrop...

  2. Multi-Headed Transformer Architectures as Time-dependent Wasserstein Gradient Flows

    cs.LG 2026-05 unverdicted novelty 6.0

    Models multi-head transformer data flow as time-dependent Wasserstein gradient flows of an attention-capturing interaction energy, with proofs on omega-limit stationary points and stability under weight and input pert...

  3. Efficient Implementation of an Adaptive Transformer Accelerator for Massive MIMO Outdoor Localization

    cs.AR 2026-05 unverdicted novelty 6.0

    An FPGA accelerator for a sparsity-exploiting adaptive Transformer achieves up to 2x speedup and sub-2ms latency for massive MIMO localization with under 10% accuracy loss on real measurements.

  4. Gradient Flow Structure and Quantitative Dynamics of Multi-Head Self-Attention

    cs.LG 2026-05 unverdicted novelty 6.0

    Multi-head self-attention dynamics admit a non-decreasing energy functional under suitable score-matrix conditions, with closed-form clustering thresholds and monotonic entropy production in simplified regimes.