[Paper Review] Sparse-softmax: A Simpler and Faster Alternative Softmax Transformation
This paper proposes sparse-softmax, a simplified and faster alternative to standard softmax that enforces sparsity by only normalizing the top-k logits, significantly improving convergence and performance in high-dimensional classification tasks. Experimental results show it outperforms baseline models across NLP and image classification tasks, especially when combined with pre-trained models.
The softmax function is widely used in artificial neural networks for the multiclass classification problems, where the softmax transformation enforces the output to be positive and sum to one, and the corresponding loss function allows to use maximum likelihood principle to optimize the model. However, softmax leaves a large margin for loss function to conduct optimizing operation when it comes to high-dimensional classification, which results in low-performance to some extent. In this paper, we provide an empirical study on a simple and concise softmax variant, namely sparse-softmax, to alleviate the problem that occurred in traditional softmax in terms of high-dimensional classification problems. We evaluate our approach in several interdisciplinary tasks, the experimental results show that sparse-softmax is simpler, faster, and produces better results than the baseline models.
Motivation & Objective
- To address the slow convergence of standard softmax in high-dimensional classification tasks (d ≥ 100 categories).
- To develop a simpler, more efficient alternative to softmax that leverages sparsity in output distributions.
- To evaluate the effectiveness of sparse-softmax across diverse tasks, including NLP and image classification.
- To investigate whether sparse-softmax mitigates overfitting in pre-trained models by reducing margin gaps in cross-entropy loss.
Proposed method
- Sparse-softmax selects the top-k logits from the input vector z, setting all others to zero before applying softmax normalization.
- The transformation is defined as: p_i = exp(z_i) / sum_{j in Ω_k} exp(z_j) if z_i is among the top-k, else 0.
- A modified cross-entropy loss function is used during training, focusing only on the top-k predictions to improve optimization efficiency.
- The method is evaluated on sequence-to-sequence tasks (e.g., abstractive summarization, question generation) and image classification (CIFAR-100).
- Experiments compare sparse-softmax against standard softmax in both fine-tuned and pre-trained model settings.
- Hyperparameter k is tuned to balance sparsity and performance, with k=5 showing strong gains in sequence tasks.
Experimental results
Research questions
- RQ1Does enforcing sparsity in the softmax output via top-k selection improve convergence speed in high-dimensional classification?
- RQ2How does sparse-softmax compare to standard softmax in terms of performance on NLP sequence-to-sequence tasks like abstractive summarization and question generation?
- RQ3Can sparse-softmax effectively reduce overfitting in pre-trained models by minimizing the margin gap in cross-entropy loss?
- RQ4Is the performance gain of sparse-softmax consistent across different model architectures and datasets, including image classification?
- RQ5Does the benefit of sparse-softmax depend on the use of pre-trained weights, particularly in high-dimensional output spaces?
Key findings
- On the Gigaword-10k dataset, sparse-softmax improved ROUGE-1 by 0.67% and ROUGE-2 by 0.79% over standard softmax at beam size 1.
- At beam size 5, sparse-softmax achieved 0.28% higher ROUGE-1 and 0.55% higher ROUGE-2, demonstrating consistent gains in decoding quality.
- In question generation on SQuAD 1.1, sparse-softmax outperformed the baseline by 0.90%, 0.62%, 0.80%, and 0.82% in BLEU-1, BLEU-2, BLEU-3, and BLEU-4, respectively.
- On CIFAR-100, sparse-softmax showed no improvement with Densenet (76.2% vs. 73.7% top-1 accuracy), suggesting limited benefit in non-pretrained settings.
- With InceptionV3, a pre-trained model, sparse-softmax improved top-1 accuracy from 77.1% to 77.8%, confirming its effectiveness in pre-trained frameworks.
- The results indicate that sparse-softmax is particularly effective in reducing overfitting and improving optimization in pre-trained models with high-dimensional outputs.
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.