No noticeNo retraction, correction or concern found when last checked on Dec 4, 2026.
Escaping the Gradient Vanishing: Periodic Alternatives of Softmax in Attention Mechanism
Shulun Wang, Feng Liu, Bin Liu
IEEE Access · 2021
doi:10.1109/access.2021.3138201 (opens in a new tab)
We email you when a new notice or a question about this paper appears.
Abstract
Softmax is widely used in neural networks for multiclass classification, gate structure, and attention mechanisms. The statistical assumption that the input is normally distributed supports the gradient stability of softmax. However, when used in attention mechanisms such as transformers, because the correlation scores between embeddings are often not normally distributed, the gradient vanishing problem appears, and we prove this point through experimental confirmation. In this work, we suggest replacing the exponential function with periodic functions, and delve into some potential periodic alternatives of Softmax from the viewpoint of value and gradient. Through experiments on a simply designed demo referenced to LeViT, our method was proven to be able to alleviate the gradient problem and yield substantial improvements compared to Softmax and its variants. Further, we analyze the impact of pre-normalization for Softmax and our methods through mathematics and experiments. Finally, we increase the depth of the demo and prove the applicability of our method to deep structures. The code are available at <uri>https://github.com/slwang9353/Period-alternatives-of-Softmax</uri>.
Abstract licence: CC BY-NC-ND
Reads
Read by people on this page
None yet.
Checked or read by AI through naulon
None yet.
A person counts once a day per paper. We keep no cookie and no address: a reader is a hash that changes every day. Any month under five reads shows no number.
Are you an author?
Is this your paper?
Claim it to add your note and be paid when agents cite it. Free.