Navigating Extremes: Dynamic Sparsity in Large Output Spaces

Nasib Ullah, Erik Schultheis, Mike Lasby, Yani Ioannou, Rohit Babbar
11/5/2024
cs.LGcs.AI

No official code found. Best implementation: xmc-aalto/NeurIPS24-dst (3 stars, last commit 2025-10-14).

Abstract

In recent years, Dynamic Sparse Training (DST) has emerged as an alternative to post-training pruning for generating efficient models. In principle, DST allows for a more memory efficient training process, as it maintains sparsity throughout the entire training run. However, current DST implementations fail to capitalize on this in practice. Because sparse matrix multiplication is much less efficient than dense matrix multiplication on GPUs, most implementations simulate sparsity by masking weights. In this paper, we leverage recent advances in semi-structured sparse training to apply DST in the domain of classification with large output spaces, where memory-efficiency is paramount. With a label space of possibly millions of candidates, the classification layer alone will consume several gigabytes of memory. Switching from a dense to a fixed fan-in sparse layer updated with sparse evolutionary training (SET); however, severely hampers training convergence, especially at the largest label spaces. We find that poor gradient flow from the sparse classifier to the dense text encoder make it difficult to learn good input representations. By employing an intermediate layer or adding an auxiliary training objective, we recover most of the generalisation performance of the dense model. Overall, we demonstrate the applicability and practical benefits of DST in a challenging domain -- characterized by a highly skewed label distribution that differs substantially from typical DST benchmark datasets -- which enables end-to-end training with millions of labels on commodity hardware.

View on arXivView PDF

Code Implementations(1)

Official Code for the paper Navigating Extremes: Dynamic Sparsity in Large Output Spaces (in NeurIPS 2024)

30Shell, PythonOct 28, 20241 years ago

Similar Papers

Cite this paper

@article{ullah2024navigating,
  title  = {Navigating Extremes: Dynamic Sparsity in Large Output Spaces},
  author = {Nasib Ullah and Erik Schultheis and Mike Lasby and Yani Ioannou and Rohit Babbar},
  year   = {2024},
  eprint = {2411.03171},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2411.03171},
  url    = {http://arxiv.org/abs/2411.03171v3},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2411.03171.svg)](https://codeofpaper.com/paper/2411.03171)

Discussion