[Paper Review] TAPAS: Two-pass Approximate Adaptive Sampling for Softmax
TAPAS proposes a two-pass approximate adaptive sampling method for training large-vocabulary softmax models efficiently. It first samples from a pre-determined distribution, then adaptively resamples hard negative labels based on context and model parameters, significantly improving rank loss with minimal computational overhead, as shown on synthetic and real-world datasets with up to 30% MAP improvement.
TAPAS is a novel adaptive sampling method for the softmax model. It uses a two pass sampling strategy where the examples used to approximate the gradient of the partition function are first sampled according to a squashed population distribution and then resampled adaptively using the context and current model. We describe an efficient distributed implementation of TAPAS. We show, on both synthetic data and a large real dataset, that TAPAS has low computational overhead and works well for minimizing the rank loss for multi-class classification problems with a very large label space.
Motivation & Objective
- To address the high computational cost of computing the partition function in large-vocabulary softmax models.
- To improve training efficiency and ranking performance in multi-class classification with very large label spaces.
- To develop a sampling strategy that adaptively selects hard negative samples based on context and model state.
- To minimize computational overhead while maintaining or improving model accuracy, especially for rank-based metrics like MAP.
Proposed method
- TAPAS uses a two-pass sampling strategy: first sampling from a pre-defined distribution (e.g., unigram or power-law), then adaptively resampling a smaller subset based on predicted logits.
- The adaptive resampling focuses on labels with higher predicted probabilities for the given context, emphasizing hard negatives.
- The method leverages both GPU acceleration and distributed training platforms to minimize computational overhead.
- It is compatible with existing sampled softmax and importance sampling frameworks, enhancing them with adaptive sampling.
- The algorithm is implemented in TensorFlow and designed for integration into large-scale deep learning pipelines.
- The sampling process approximates the gradient of the partition function using only the adaptive subset, reducing computation.
Experimental results
Research questions
- RQ1Can a two-pass sampling strategy improve ranking performance in large-vocabulary softmax models with minimal computational cost?
- RQ2How does adaptive resampling based on context and model parameters affect rank loss compared to fixed or uniform sampling?
- RQ3To what extent does TAPAS reduce training overhead while maintaining or improving model accuracy?
- RQ4Does TAPAS better optimize for rank-based metrics like MAP compared to full softmax loss?
Key findings
- On a synthetic dataset with overlapping clusters, TAPAS improved accuracy by increasing the resample size r, with n=128,r=4 achieving similar accuracy to n=512,r=1 but 4× faster.
- On a real-world video recommendation dataset with 500,000 items, TAPAS with n=1000,r=8 achieved a MAP@20 score of 0.068, a 30% improvement over n=1000,r=1 (0.050).
- Even with a smaller pre-sample size, TAPAS (n=1000,r=8) outperformed a larger baseline (n=8000,r=1), achieving higher MAP (0.068 vs. 0.067) and better speed.
- The method incurred only a 10% overhead when increasing r from 1 to 8, demonstrating low computational cost despite adaptive sampling.
- Despite significant gains in MAP, the full softmax loss increased slightly (from 9.10 to 9.34), indicating TAPAS optimizes for rank loss, not cross-entropy loss.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.