English
Related papers

Related papers: The Two-Pass Softmax Algorithm

200 papers

This short paper discusses an efficient implementation of \emph{sampled softmax loss} for Tensorflow. The speedup over the default implementation is achieved due to simplification of the graph for the forward and backward passes.

Machine Learning · Computer Science 2020-04-14 Maciej Skorski

Randomized algorithms for low-rank approximation of quaternion matrices have gained increasing attention in recent years. However, existing methods overlook pass efficiency, the ability to limit the number of passes over the input…

Numerical Analysis · Mathematics 2026-03-25 Salman Ahmadi-Asl , Malihe Nobakht Kooshkghazi , Valentin Leplat

Policy-gradient approaches to reinforcement learning have two common and undesirable overhead procedures, namely warm-start training and sample variance reduction. In this paper, we describe a reinforcement learning method based on a…

Machine Learning · Computer Science 2017-10-17 Nan Ding , Radu Soricut

The attention mechanism in text generation is memory-bounded due to its sequential characteristics. Therefore, off-chip memory accesses should be minimized for faster execution. Although previous methods addressed this by pruning…

Hardware Architecture · Computer Science 2024-07-23 Junyoung Park , Myeonggu Kang , Yunki Han , Yanggon Kim , Jaekang Shin , Lee-Sup Kim

The softmax content-based attention mechanism has proven to be very beneficial in many applications of recurrent neural networks. Nevertheless it suffers from two major computational limitations. First, its computations for an attention…

Machine Learning · Computer Science 2016-09-20 Alexandre de Brébisson , Pascal Vincent

This paper describes practical randomized algorithms for low-rank matrix approximation that accommodate any budget for the number of views of the matrix. The presented algorithms, which are aimed at being as pass efficient as needed, expand…

Numerical Analysis · Mathematics 2018-05-25 Elvar K. Bjarkason

A widely-used actor-critic reinforcement learning algorithm for continuous control, Deep Deterministic Policy Gradients (DDPG), suffers from the overestimation problem, which can negatively affect the performance. Although the…

Machine Learning · Computer Science 2020-10-20 Ling Pan , Qingpeng Cai , Longbo Huang

Certified verification of transformer attention requires bounding the softmax function over interval constraints on the pre-softmax scores. Existing verifiers relax softmax ndependently of the downstream objective, leaving avoidable slack.…

Machine Learning · Computer Science 2026-05-13 Navid Rezazadeh , Arash Gholami Davoodi

We propose an approximate strategy to efficiently train neural network based language models over very large vocabularies. Our approach, called adaptive softmax, circumvents the linear dependency on the vocabulary size by exploiting the…

Computation and Language · Computer Science 2017-06-20 Edouard Grave , Armand Joulin , Moustapha Cissé , David Grangier , Hervé Jégou

Softmax classifiers with a very large number of classes naturally occur in many applications such as natural language processing and information retrieval. The calculation of full softmax is costly from the computational and energy…

Machine Learning · Computer Science 2021-07-30 Shabnam Daghaghi , Tharun Medini , Nicholas Meisburger , Beidi Chen , Mengnan Zhao , Anshumali Shrivastava

Homomorphic encryption is one of the main solutions for building secure and privacy-preserving solutions for Machine Learning as a Service. This motivates the development of homomorphic algorithms for the main building blocks of AI,…

Cryptography and Security · Computer Science 2024-10-16 Wonhee Cho , Guillaume Hanrot , Taeseong Kim , Minje Park , Damien Stehlé

To obtain accurate results in numerical computation, high-precision arithmetic is a straightforward approach. However, most processors lack hardware support for floating-point formats beyond double precision (FP64). Double-word arithmetic…

Mathematical Software · Computer Science 2025-10-16 Daichi Mukunoki , Katsuhisa Ozaki

Learning complicated value functions in high dimensional state space by function approximation is a challenging task, partially due to that the max-operator used in temporal difference updates can theoretically cause instability for most…

Machine Learning · Computer Science 2020-12-21 Yaozhong Gan , Zhe Zhang , Xiaoyang Tan

Softmax is the most commonly used output function for multiclass problems and is widely used in areas such as vision, natural language processing, and recommendation. A softmax model has linear costs in the number of classes which makes it…

Machine Learning · Computer Science 2018-08-03 Guy Blanc , Steffen Rendle

Q-learning is a stochastic approximation version of the classic value iteration. The literature has established that Q-learning suffers from both maximization bias and slower convergence. Recently, multi-step algorithms have shown practical…

Machine Learning · Computer Science 2024-07-03 Antony Vijesh , Shreyas S R

Typically, Softmax is used in the final layer of a neural network to get a probability distribution for output classes. But the main problem with Softmax is that it is computationally expensive for large scale data sets with large number of…

Machine Learning · Computer Science 2018-12-17 Abdul Arfat Mohammed , Venkatesh Umaashankar

Softmax with the cross entropy loss is the standard configuration for current neural classification models. The gold score for a target class is supposed to be 1, but it is never reachable under the softmax schema. Such a problem makes the…

Machine Learning · Computer Science 2025-08-06 Qi Lv , Lei Geng , Ziqiang Cao , Min Cao , Sujian Li , Wenjie Li , Guohong Fu

This paper questions whether the strong performance of softmax attention in transformers stems from producing a probability distribution over inputs. Instead, we argue that softmax's effectiveness lies in its implicit regularization of the…

Machine Learning · Computer Science 2026-03-16 Hemanth Saratchandran , Jianqiao Zheng , Yiping Ji , Wenbo Zhang , Simon Lucey

In Transformer models, non-GEMM (non-General Matrix Multiplication) operations -- especially Softmax and Layer Normalization (LayerNorm) -- often dominate hardware cost due to their nonlinear nature. To address this, previous approximation…

Hardware Architecture · Computer Science 2026-04-28 Dawon Choi , Hana Kim , Ji-Hoon Kim

The softmax attention mechanism has emerged as a noteworthy development in the field of Artificial Intelligence research, building on the successes of Transformer-based architectures. However, their ever increasing sizes necessitate ever…

Computation and Language · Computer Science 2023-05-19 Luca Herranz-Celotti , Ermal Rrapaj