Skip to main content
QUICK REVIEW

[Paper Review] The Emergence of Essential Sparsity in Large Pre-trained Models: The Weights that Matter

Ajay Jaiswal, Shiwei Liu|arXiv (Cornell University)|Jun 6, 2023
Domain Adaptation and Few-Shot LearningComputer Science6 citations
TL;DR

This paper introduces 'essential sparsity'—a phenomenon in large pre-trained transformers where removing the lowest-magnitude weights in one-shot pruning causes a sharp performance drop beyond a critical sparsity threshold. The authors show that high-quality sparse subnetworks exist within dense checkpoints without retraining, enabling free, transferable pruning across downstream tasks, even in modern LLMs like Vicuna-7B.

ABSTRACT

Large pre-trained transformers are show-stealer in modern-day deep learning, and it becomes crucial to comprehend the parsimonious patterns that exist within them as they grow in scale. With exploding parameter counts, Lottery Ticket Hypothesis (LTH) and its variants, have lost their pragmatism in sparsifying them due to high computation and memory bottleneck of repetitive train-prune-retrain routine of iterative magnitude pruning (IMP) which worsens with increasing model size. This paper comprehensively studies induced sparse patterns across multiple large pre-trained vision and language transformers. We propose the existence of -- essential sparsity defined with a sharp dropping point beyond which the performance declines much faster w.r.t the rise of sparsity level, when we directly remove weights with the smallest magnitudes in one-shot without re-training. We also find essential sparsity to hold valid for N:M sparsity patterns as well as on modern-scale large language models (Vicuna-7B). We also present an intriguing emerging phenomenon of abrupt sparsification during the pre-training of BERT, i.e., BERT suddenly becomes heavily sparse in pre-training after certain iterations. Moreover, our observations also indicate a counter-intuitive finding that BERT trained with a larger amount of pre-training data tends to have a better ability to condense knowledge in comparatively relatively fewer parameters. Lastly, we investigate the effect of the pre-training loss on essential sparsity and discover that self-supervised learning (SSL) objectives trigger stronger emergent sparsification properties than supervised learning (SL). Our codes are available at \url{https://github.com/VITA-Group/essential_sparsity}.

Motivation & Objective

  • To identify and validate a previously overlooked structural property—'essential sparsity'—in large pre-trained transformers.
  • To demonstrate that high-quality sparse subnetworks can be identified without retraining by one-shot magnitude pruning of the lowest-magnitude weights.
  • To investigate whether essential sparsity holds across diverse architectures, including modern large language models like Vicuna-7B.
  • To explore the emergence of sparsification during pre-training, particularly in BERT, and its dependence on pre-training data and loss objectives.
  • To compare the performance of one-shot pruning (OMP) with iterative magnitude pruning (LTH) and assess transferability across downstream tasks.

Proposed method

  • Propose 'essential sparsity' as a sharp performance drop threshold beyond which pruning causes rapid accuracy decline in one-shot magnitude pruning.
  • Apply one-shot magnitude pruning (OMP) to pre-trained checkpoints by removing weights with the smallest magnitudes, without any fine-tuning or retraining.
  • Evaluate performance on downstream tasks using the pruned subnetworks, comparing OMP to Lottery Ticket Hypothesis (LTH) and SparseGPT.
  • Conduct ablation studies on BERT to analyze sparsification emergence during pre-training, varying data size and pre-training objectives.
  • Use cosine similarity between pruning masks from LTH and OMP to assess mask similarity and transferability across tasks.
  • Evaluate zero-shot performance on Vicuna-7B using the MMLU benchmark after OMP and SparseGPT pruning to validate essential sparsity in modern LLMs.
Figure 1: Naturally induced sparsity patterns of bert-base-uncased across the components of transformer blocks. The pre-trained model is pruned by 21.50% using one-shot-magnitude pruning. Yellow dots indicate the location of pruned low-magnitude weights.
Figure 1: Naturally induced sparsity patterns of bert-base-uncased across the components of transformer blocks. The pre-trained model is pruned by 21.50% using one-shot-magnitude pruning. Yellow dots indicate the location of pruned low-magnitude weights.

Experimental results

Research questions

  • RQ1Does essential sparsity exist in large pre-trained vision and language transformers, and is it transferable across downstream tasks?
  • RQ2Can one-shot magnitude pruning identify high-quality sparse subnetworks comparable to those found via iterative training (LTH) in large models?
  • RQ3Does the emergence of sparsification occur abruptly during BERT's pre-training, and if so, when and why?
  • RQ4How does pre-training data volume affect the model's ability to condense knowledge into fewer parameters?
  • RQ5Do self-supervised learning objectives lead to stronger emergent sparsification than supervised objectives?

Key findings

  • Essential sparsity exists across diverse large pre-trained models, including ViT, BERT, and Vicuna-7B, with a sharp performance drop beyond a critical sparsity threshold.
  • One-shot magnitude pruning (OMP) achieves performance comparable to LTH for sparsity levels below 50%, indicating that high-quality sparse subnetworks exist in dense checkpoints without retraining.
  • Cosine similarity between OMP and LTH masks is high in the essential sparsity range, suggesting that OMP identifies similar, transferable subnetworks at no additional cost.
  • BERT exhibits abrupt sparsification during pre-training, becoming heavily sparse after a certain number of training iterations, indicating a dynamic emergence of structure.
  • Models pre-trained on larger datasets show a greater ability to condense knowledge into fewer parameters, suggesting improved parameter efficiency.
  • Self-supervised learning (SSL) objectives trigger stronger emergent sparsification than supervised learning (SL), indicating SSL fosters more intrinsic sparsity.
Figure 2: Fine-tuning performance drop estimated with respect to dense counterpart for various downstream tasks of NLP pre-trained models ( bert-base, OPT-125m, OPT-350m, OPT-1.3B ). Note that for fair evaluation, we have used exactly same fine-tuning settings across all pruning ratios.
Figure 2: Fine-tuning performance drop estimated with respect to dense counterpart for various downstream tasks of NLP pre-trained models ( bert-base, OPT-125m, OPT-350m, OPT-1.3B ). Note that for fair evaluation, we have used exactly same fine-tuning settings across all pruning ratios.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.