[Paper Review] Top-KAST: Top-K Always Sparse Training
Top-KAST is a fully sparse training method that maintains constant sparsity in both forward and backward passes by selecting top-K magnitude weights for activation and a larger set for gradient updates, using an exploration loss to prevent convergence to suboptimal masks. It achieves state-of-the-art performance on ImageNet and enwik8, matching dense models up to 80% sparsity while enabling efficient, scalable training without dense parameter or gradient computation.
Sparse neural networks are becoming increasingly important as the field seeks to improve the performance of existing models by scaling them up, while simultaneously trying to reduce power consumption and computational footprint. Unfortunately, most existing methods for inducing performant sparse models still entail the instantiation of dense parameters, or dense gradients in the backward-pass, during training. For very large models this requirement can be prohibitive. In this work we propose Top-KAST, a method that preserves constant sparsity throughout training (in both the forward and backward-passes). We demonstrate the efficacy of our approach by showing that it performs comparably to or better than previous works when training models on the established ImageNet benchmark, whilst fully maintaining sparsity. In addition to our ImageNet results, we also demonstrate our approach in the domain of language modeling where the current best performing architectures tend to have tens of billions of parameters and scaling up does not yet seem to have saturated performance. Sparse versions of these architectures can be run with significantly fewer resources, making them more widely accessible and applicable. Furthermore, in addition to being effective, our approach is straightforward and can easily be implemented in a wide range of existing machine learning frameworks with only a few additional lines of code. We therefore hope that our contribution will help enable the broader community to explore the potential held by massive models, without incurring massive computational cost.
Motivation & Objective
- To develop a fully sparse training method that avoids dense parameter and gradient computation during training, enabling scalable and efficient model training.
- To address the computational and environmental costs of training large, dense models by maintaining sparsity throughout training.
- To democratize access to large-scale models by reducing hardware and energy requirements through constant sparsity.
- To enable effective sparsification of large architectures like Transformers in low-resource settings, particularly in natural language processing.
- To provide a simple, framework-compatible method that can be easily adopted across existing deep learning libraries.
Proposed method
- Top-KAST selects the top-K parameters by magnitude in the forward pass to maintain sparsity during inference.
- In the backward pass, gradients are applied to a larger set B of parameters, where B includes the top-K set A, to allow for more effective weight updates.
- An auxiliary exploration loss is introduced to encourage dynamic adaptation of the sparsity mask and prevent fixation on suboptimal weight subsets.
- The method avoids dense parameter or gradient computation entirely, ensuring constant sparsity in both forward and backward passes.
- The sparsity level is controlled by user-defined hyperparameters for the top-K and exploration set sizes, enabling flexibility based on resource constraints.
- The approach is designed for easy integration into existing deep learning frameworks with minimal code changes.
Experimental results
Research questions
- RQ1Can a fully sparse training method maintain performance comparable to dense models without ever materializing dense parameters or gradients?
- RQ2How does Top-KAST perform relative to existing sparse-to-sparse and dense-to-sparse training methods on standard benchmarks like ImageNet and enwik8?
- RQ3Can Top-KAST effectively sparsify large Transformer architectures in language modeling with minimal performance degradation?
- RQ4Does the inclusion of an exploration loss improve generalization and prevent convergence to poor sparse subnetworks?
- RQ5To what extent can Top-KAST scale model size while reducing computational and memory overheads in practice?
Key findings
- Top-KAST achieves state-of-the-art performance on the ImageNet benchmark across multiple FLOP budgets, outperforming existing sparse-to-sparse methods and matching RigL.
- On the enwik8 language modeling task, Top-KAST-trained Transformer-XL achieves 1.00 bits per character (bpc) at 55M parameters, outperforming a smaller dense model with 277M parameters (0.99 bpc).
- The method maintains high performance up to 80% sparsity on ImageNet, with minimal degradation, and performance begins to drift only beyond 90% sparsity.
- Top-KAST enables training of sparse models that match dense model performance at up to 80% sparsity, demonstrating strong efficiency and scalability.
- The approach is effective for both vision and language modeling, showing broad applicability across model types and domains.
- The method is easily implementable in existing frameworks with only a few additional lines of code, enabling wide adoption.
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.