English
Related papers

Related papers: The Two-Pass Softmax Algorithm

200 papers

Large language models rely on attention mechanisms with a softmax activation. Yet the dominance of softmax over alternatives (e.g., component-wise or linear) remains poorly understood, and many theoretical works have focused on the…

Machine Learning · Computer Science 2026-02-27 O. Duranthon , P. Marion , C. Boyer , B. Loureiro , L. Zdeborová

In basic computational physics classes, students often raise the question of how to compute a number that exceeds the numerical limit of the machine. While technique of avoiding overflow/underflow has practical application in the electrical…

Computational Physics · Physics 2015-03-17 Chih-Yueh Wang , Chen-Yang Yin , Hong-Yu Chen , Yung-Ko Chen

Attention calculation is extremely time-consuming for long-sequence inference tasks, such as text or image/video generation, in large models. To accelerate this process, we developed a low-precision, mathematically-equivalent algorithm…

A soft-max function has two main efficiency measures: (1) approximation - which corresponds to how well it approximates the maximum function, (2) smoothness - which shows how sensitive it is to changes of its input. Our goal is to identify…

Machine Learning · Computer Science 2026-01-01 Alessandro Epasto , Mohammad Mahdian , Vahab Mirrokni , Manolis Zampetakis

Reinforcement learning algorithms can solve dynamic decision-making and optimal control problems. With continuous-valued state and input variables, reinforcement learning algorithms must rely on function approximators to represent the value…

Machine Learning · Computer Science 2021-11-16 Jiří Kubalík , Erik Derner , Jan Žegklitz , Robert Babuška

We consider the maximum matching problem in the semi-streaming model formalized by Feigenbaum, Kannan, McGregor, Suri, and Zhang that is inspired by giant graphs of today. As our main result, we give a two-pass $(1/2 + 1/16)$-approximation…

Data Structures and Algorithms · Computer Science 2017-04-24 Sagar Kale , Sumedh Tirodkar

In this work, we show that saturating output activation functions, such as the softmax, impede learning on a number of standard classification tasks. Moreover, we present results showing that the utility of softmax does not stem from the…

Machine Learning · Computer Science 2017-07-14 Anders Oland , Aayush Bansal , Roger B. Dannenberg , Bhiksha Raj

In the semi-streaming model, an algorithm receives a stream of edges of a graph in arbitrary order and uses a memory of size $O(n \mbox{ polylog } n)$, where $n$ is the number of vertices of a graph. In this work, we present semi-streaming…

Data Structures and Algorithms · Computer Science 2014-04-11 Christian Konrad , Frédéric Magniez , Claire Mathieu

Online algorithm selection (OAS) aims to adapt the optimization process to changes in the fitness landscape and is expected to outperform any single algorithm from a given portfolio. Although this expectation is supported by numerous…

Neural and Evolutionary Computing · Computer Science 2026-04-10 Denis Antipov , Carola Doerr

The Transformer model has been pivotal in advancing fields such as natural language processing, speech recognition, and computer vision. However, a critical limitation of this model is its quadratic computational and memory complexity…

Computer Vision and Pattern Recognition · Computer Science 2024-06-04 Firas Khader , Omar S. M. El Nahhas , Tianyu Han , Gustav Müller-Franzes , Sven Nebelung , Jakob Nikolas Kather , Daniel Truhn

Cross-entropy loss together with softmax is arguably one of the most common used supervision components in convolutional neural networks (CNNs). Despite its simplicity, popularity and excellent performance, the component does not explicitly…

Machine Learning · Statistics 2017-11-21 Weiyang Liu , Yandong Wen , Zhiding Yu , Meng Yang

Sparse attention has been proposed as a way to alleviate the quadratic cost of transformers, a central bottleneck in long-context training. A promising line of work is $\alpha$-entmax attention, a differentiable sparse alternative to…

Machine Learning · Computer Science 2026-04-17 Nuno Gonçalves , Hugo Pitorro , Vlad Niculae , Edoardo Ponti , Lei Li , Andre Martins , Marcos Treviso

Power iteration can improve the accuracy of randomized SVD, but requires multiple data passes, making it impractical in streaming or memory-constrained settings. We introduce a lightweight yet effective sketch-power iteration, allowing…

Numerical Analysis · Mathematics 2026-03-30 Chao Chang , Yuning Yang

Checkpoint averaging is a simple and effective method to boost the performance of converged neural machine translation models. The calculation is cheap to perform and the fact that the translation improvement almost comes for free, makes it…

Computation and Language · Computer Science 2022-10-24 Yingbo Gao , Christian Herold , Zijian Yang , Hermann Ney

Low Rank Approximation is among most fundamental subjects of numerical linear algebra having important applications to various areas of modern computing and %they range from machine learning theory and %neural networks to data mining and…

Numerical Analysis · Mathematics 2018-09-25 Victor Y. Pan , Qi Luan , John Svadlenka , Liang Zhao

We study the tradeoff between computational effort and classification accuracy in a cascade of deep neural networks. During inference, the user sets the acceptable accuracy degradation which then automatically determines confidence…

Machine Learning · Computer Science 2020-11-12 Konstantin Berestizshevsky , Guy Even

In the domain of point cloud registration, the coarse-to-fine feature matching paradigm has received substantial attention owing to its impressive performance. This paradigm involves a two-step process: first, the extraction of multi-level…

Computer Vision and Pattern Recognition · Computer Science 2023-10-17 Junjie Gao , Qiujie Dong , Ruian Wang , Shuangmin Chen , Shiqing Xin , Changhe Tu , Wenping Wang

The softmax function is a fundamental building block of deep neural networks, commonly used to define output distributions in classification tasks or attention weights in transformer architectures. Despite its widespread use and proven…

Machine Learning · Computer Science 2025-06-03 Wojciech Masarczyk , Mateusz Ostaszewski , Tin Sum Cheng , Tomasz Trzciński , Aurelien Lucchi , Razvan Pascanu

High throughput and low latency data processing is essential for systems requiring live decision making, control, and machine learning-optimized data reduction. We focus on two distinct use cases for in-flight streaming data processing for…

Instrumentation and Detectors · Physics 2023-02-14 Jack Hirschman , Andrei Kamalov , Razib Obaid , Finn H. O'Shea , Ryan N Coffee

In this paper, we propose a new method for calculating the output layer in neural machine translation systems. The method is based on predicting a binary code for each word and can reduce computation time/memory requirements of the output…

Computation and Language · Computer Science 2017-04-25 Yusuke Oda , Philip Arthur , Graham Neubig , Koichiro Yoshino , Satoshi Nakamura