Skip to main content
QUICK REVIEW

[Paper Review] NxMTransformer: Semi-Structured Sparsification for Natural Language Understanding via ADMM

Connor Holmes, Minjia Zhang|arXiv (Cornell University)|Oct 28, 2021
Non-Destructive Testing TechniquesEngineering29 references6 citations
TL;DR

NxMTransformer introduces a novel ADMM-based framework to induce NxM semi-structured sparsity in large pre-trained Transformer models for natural language understanding, achieving 1.7 higher GLUE score than current best practices while maintaining hardware efficiency. The method jointly optimizes model fine-tuning and sparsity constraints via constrained optimization, enabling high-accuracy, deployable models on modern sparse-inferencing hardware.

ABSTRACT

Natural Language Processing (NLP) has recently achieved success by using huge pre-trained Transformer networks. However, these models often contain hundreds of millions or even billions of parameters, bringing challenges to online deployment due to latency constraints. Recently, hardware manufacturers have introduced dedicated hardware for NxM sparsity to provide the flexibility of unstructured pruning with the runtime efficiency of structured approaches. NxM sparsity permits arbitrarily selecting M parameters to retain from a contiguous group of N in the dense representation. However, due to the extremely high complexity of pre-trained models, the standard sparse fine-tuning techniques often fail to generalize well on downstream tasks, which have limited data resources. To address such an issue in a principled manner, we introduce a new learning framework, called NxMTransformer, to induce NxM semi-structured sparsity on pretrained language models for natural language understanding to obtain better performance. In particular, we propose to formulate the NxM sparsity as a constrained optimization problem and use Alternating Direction Method of Multipliers (ADMM) to optimize the downstream tasks while taking the underlying hardware constraints into consideration. ADMM decomposes the NxM sparsification problem into two sub-problems that can be solved sequentially, generating sparsified Transformer networks that achieve high accuracy while being able to effectively execute on newly released hardware. We apply our approach to a wide range of NLP tasks, and our proposed method is able to achieve 1.7 points higher accuracy in GLUE score than current practices. Moreover, we perform detailed analysis on our approach and shed light on how ADMM affects fine-tuning accuracy for downstream tasks. Finally, we illustrate how NxMTransformer achieves performance improvement with knowledge distillation.

Motivation & Objective

  • To address the challenge of deploying large pre-trained NLP models with high latency due to model size.
  • To enable effective semi-structured sparsity (NxM) in Transformers that respects hardware constraints while preserving model accuracy.
  • To develop a principled, hardware-aware sparsification method that avoids costly retraining and maintains transferability to downstream tasks.
  • To investigate the compatibility and performance gains of combining NxM sparsity with knowledge distillation in compressed models.
  • To provide a framework that maintains dense pre-trained representations while enabling efficient inference on emerging NxM sparse hardware.

Proposed method

  • Formulates NxM sparsity induction as a constrained optimization problem, integrating hardware-aware sparsity patterns into the fine-tuning objective.
  • Employs the Alternating Direction Method of Multipliers (ADMM) to decompose the problem into two sequential sub-problems: weight update and sparsity constraint enforcement.
  • Uses dual ascent and augmented Lagrangian to iteratively enforce NxM constraints while fine-tuning on downstream NLP tasks.
  • Applies the method to BERT and DistilBERT models, enabling sparsity without retraining the original pre-trained weights.
  • Integrates with knowledge distillation by applying NxM sparsity to distilled student models, preserving high accuracy with reduced parameters.
  • Maintains compatibility with existing dense models by preserving the original pre-trained weights and only sparsifying during fine-tuning.

Experimental results

Research questions

  • RQ1Can ADMM-based optimization effectively induce NxM semi-structured sparsity in large pre-trained Transformers without sacrificing downstream performance?
  • RQ2How does NxM sparsity via ADMM compare to standard fine-tuning and existing sparsification methods in terms of accuracy and hardware efficiency?
  • RQ3To what extent can NxM sparsity be combined with knowledge distillation to further compress models while retaining high accuracy?
  • RQ4Does the ADMM-based sparsification method preserve model generalization ability on low-resource downstream NLP tasks?
  • RQ5What is the impact of sparsity on distilled models, and does the method reveal structural redundancy even in already-compressed models like DistilBERT?

Key findings

  • NxMTransformer achieves a 1.7-point higher average GLUE score than current best practices on standard NLP benchmarks.
  • The method maintains 98.4% of the original BERT base model's accuracy while applying NxM sparsity, demonstrating strong performance preservation.
  • When applied to DistilBERT, NxMTransformer retains 97.6% of the distilled model's accuracy with a 32% parameter reduction (from 66.6M to 45.3M parameters).
  • The approach outperforms standard DistilBERT by 2 points on average GLUE, indicating superior redundancy capture via intra-layer sparsity.
  • The method enables high-accuracy, hardware-optimized models without requiring retraining of the pre-trained weights, preserving transferability.
  • The results suggest the existence of winning tickets in highly compressed models, even after knowledge distillation.

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.