atlas

Research map / Learning theory and algorithms / Matrix and tensor methods

Adaptive Sampling for Efficient Softmax Approximation

NeurIPS 2024 · Learning theory and algorithms › Matrix and tensor methods · approach: Low-rank approximation theory · 4 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes AdaptiveSoftmax, a bandit-based adaptive sampling algorithm that estimates the top softmax output of a matrix-vector product with PAC guarantees, reducing cost by subsampling features rather than classes.

Problem

Computing the full softmax of a high-dimensional matrix-vector product is expensive when only the top few softmax outputs are needed, e.g., in final LLM/classifier layers.

Approach

Reduce softmax computation to statistical estimation: adaptively subsample the inner (feature) dimension of Ax with importance-weighted estimators, using best-arm identification to find the top index and a two-stage sampling scheme (guided by estimated optimal frequencies alpha and gamma = exp(beta*mu/2)) to estimate the partition function with PAC (epsilon, delta) guarantees.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use AdaptiveSoftmax instead of brute-force softmax computationVGG-19 classifier · EuroSAT test setsample complexity gain: 5.18x (80.62%); 5.16x (83.00%); 4.54x (98.37%)Helped
Use AdaptiveSoftmax instead of brute-force softmax computationShallow CNN · MNIST test setsample complexity gain: 8.95x (92.25%); 8.81x (93.75%); 8.13x (99.38%)Helped
Use AdaptiveSoftmax instead of brute-force softmax computationGPT-2 · Wikitextsample complexity gain: 8.25x (88.94%); 7.80x (93.54%); 6.67x (98.26%)Helped
Use AdaptiveSoftmax instead of brute-force softmax computationLlama3-7B · Wikitextsample complexity gain: 14.68x (91.44%); 11.43x (94.04%); 6.88x (99.38%)Helped
Use AdaptiveSoftmax instead of brute-force softmax computationMistral7B · Wikitextsample complexity gain: 32.65x (89.08%); 26.37x (91.20%); 17.71x (97.77%)Helped
Use AdaptiveSoftmax instead of brute-force softmax computationGPT-2 · Penn Treebanksample complexity gain: 8.10x (81.68%); 7.50x (90.73%); 6.66x (96.79%)Helped
Use AdaptiveSoftmax instead of brute-force softmax computationLlama3-7B · Penn Treebanksample complexity gain: 19.18x (87.82%); 16.57x (91.60%); 10.72x (97.81%)Helped
Use AdaptiveSoftmax instead of brute-force softmax computationAdaptiveSoftmax · Synthetic all-ones query, δ = 10%, ε = 30%sample complexity gain: 3.953×Helped
Use AdaptiveSoftmax instead of brute-force softmax computationAdaptiveSoftmax · Synthetic sign query, δ = 10%, ε = 30%sample complexity gain: 29.039×Helped

Surprising findings

Limitations

Experimental setup

Datasets: MNIST EuroSAT Wikitext Penn Treebank

Benchmarks: MNIST EuroSAT Wikitext Penn Treebank synthetic all-ones and sign queries

Metrics: sample complexity gain over naive nd success rate at epsilon=30% multiplicative accuracy

Baselines: naive full softmax computation

Builds on: Bandit-Based Monte Carlo Optimization multi-round epsilon-arm best-arm identification Gumbel top-k sampling without replacement sampled softmax

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy