Table of Contents
Fetching ...

Attention Scheme Inspired Softmax Regression

Yichuan Deng, Zhihang Li, Zhao Song

TL;DR

This work formulates a regularized softmax regression problem with a normalization f(x) = α(x)^{-1} exp(Ax) and analyzes its gradient and Hessian structure. By decomposing the Hessian into low-rank and diagonal components, the authors prove positive definiteness and Hessian Lipschitzness under suitable conditions, enabling an efficient approximate Newton method. They leverage a sparsification tool to approximate the Hessian as A^T D A, achieving near input-sparsity time per iteration and a randomized algorithm with provable convergence guarantees. The results yield a practically scalable framework for attention-inspired softmax regression with strong convexity and controlled curvature, suitable for large-scale settings common in language modeling. Overall, the paper advances theory and algorithms for exact-to-approximate Newton methods in normalized exponential regression tied to attention mechanisms.

Abstract

Large language models (LLMs) have made transformed changes for human society. One of the key computation in LLMs is the softmax unit. This operation is important in LLMs because it allows the model to generate a distribution over possible next words or phrases, given a sequence of input words. This distribution is then used to select the most likely next word or phrase, based on the probabilities assigned by the model. The softmax unit plays a crucial role in training LLMs, as it allows the model to learn from the data by adjusting the weights and biases of the neural network. In the area of convex optimization such as using central path method to solve linear programming. The softmax function has been used a crucial tool for controlling the progress and stability of potential function [Cohen, Lee and Song STOC 2019, Brand SODA 2020]. In this work, inspired the softmax unit, we define a softmax regression problem. Formally speaking, given a matrix $A \in \mathbb{R}^{n \times d}$ and a vector $b \in \mathbb{R}^n$, the goal is to use greedy type algorithm to solve \begin{align*} \min_{x} \| \langle \exp(Ax), {\bf 1}_n \rangle^{-1} \exp(Ax) - b \|_2^2. \end{align*} In certain sense, our provable convergence result provides theoretical support for why we can use greedy algorithm to train softmax function in practice.

Attention Scheme Inspired Softmax Regression

TL;DR

This work formulates a regularized softmax regression problem with a normalization f(x) = α(x)^{-1} exp(Ax) and analyzes its gradient and Hessian structure. By decomposing the Hessian into low-rank and diagonal components, the authors prove positive definiteness and Hessian Lipschitzness under suitable conditions, enabling an efficient approximate Newton method. They leverage a sparsification tool to approximate the Hessian as A^T D A, achieving near input-sparsity time per iteration and a randomized algorithm with provable convergence guarantees. The results yield a practically scalable framework for attention-inspired softmax regression with strong convexity and controlled curvature, suitable for large-scale settings common in language modeling. Overall, the paper advances theory and algorithms for exact-to-approximate Newton methods in normalized exponential regression tied to attention mechanisms.

Abstract

Large language models (LLMs) have made transformed changes for human society. One of the key computation in LLMs is the softmax unit. This operation is important in LLMs because it allows the model to generate a distribution over possible next words or phrases, given a sequence of input words. This distribution is then used to select the most likely next word or phrase, based on the probabilities assigned by the model. The softmax unit plays a crucial role in training LLMs, as it allows the model to learn from the data by adjusting the weights and biases of the neural network. In the area of convex optimization such as using central path method to solve linear programming. The softmax function has been used a crucial tool for controlling the progress and stability of potential function [Cohen, Lee and Song STOC 2019, Brand SODA 2020]. In this work, inspired the softmax unit, we define a softmax regression problem. Formally speaking, given a matrix and a vector , the goal is to use greedy type algorithm to solve \begin{align*} \min_{x} \| \langle \exp(Ax), {\bf 1}_n \rangle^{-1} \exp(Ax) - b \|_2^2. \end{align*} In certain sense, our provable convergence result provides theoretical support for why we can use greedy algorithm to train softmax function in practice.
Paper Structure (56 sections, 31 theorems, 164 equations, 1 algorithm)

This paper contains 56 sections, 31 theorems, 164 equations, 1 algorithm.

Key Result

Theorem 1.5

Given matrix $A \in \mathbb{R}^{n \times d}$, $b \in \mathbb{R}^n$, and $w \in \mathbb{R}^n$. There is a randomized algorithm (Algorithm alg:main) that

Theorems & Definitions (74)

  • Definition 1.1: Static Attention Computation
  • Definition 1.2: Hyperbolic Regression lsz23
  • Definition 1.3: Softmax Regression
  • Definition 1.4: Regularized Softmax Regression
  • Theorem 1.5: Main Result, informal
  • proof
  • Definition 4.8
  • Lemma 4.9: Folklore, see lsz23 as an example
  • Definition 5.1: Function $f$
  • Lemma 5.2
  • ...and 64 more