Skip to main content
QUICK REVIEW

[논문 리뷰] NxMTransformer: Semi-Structured Sparsification for Natural Language Understanding via ADMM

Connor Holmes, Minjia Zhang|arXiv (Cornell University)|2021. 10. 28.
Non-Destructive Testing Techniques참고 문헌 29인용 수 6
한 줄 요약

NxMTransformer는 대규모 사전 훈련된 트랜스포머 모델에 대해 자연어 이해를 위한 NxM 준구조적 희소성(semi-structured sparsity)을 유도하기 위해 ADMM 기반의 새로운 프레임워크를 제안한다. 이는 하드웨어 효율성을 유지하면서 현재 최고의 실천 방식보다 GLUE 점수를 1.7점 높이는 데 성공했으며, 제약 최적화를 통해 모델 미세조정과 희소성 제약 조건을 동시에 최적화함으로써 현대의 준구조적 추론 하드웨어에서 구동 가능한 고정밀도 모델을 가능하게 한다.

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.

연구 동기 및 목표

  • 모델 크기로 인한 높은 지연 시간으로 인해 대규모 사전 훈련된 NLP 모델을 배포하는 데 발생하는 과제를 해결하기 위해.
  • 하드웨어 제약 조건을 고려하면서도 정확도를 유지하는 방식으로 트랜스포머에 효과적인 NxM 준구조적 희소성을 구현하기 위해.
  • 비용이 많이 드는 재훈련을 피하고 일관된 접근 방식으로 하드웨어에 맞는 희소화 방법을 개발하여 전이 가능성(transferability)을 유지하기 위해.
  • 압축된 모델에서 NxM 희소성과 지식 증류(Knowledge Distillation)를 결합할 경우의 호환성과 성능 향상 여부를 조사하기 위해.
  • 기존의 조밀한 사전 훈련된 표현을 유지하면서도 신속한 추론을 가능하게 하는 프레임워크를 제공하기 위해.

제안 방법

  • 하드웨어에 맞는 희소성 패턴을 미세조정 목표에 통합하여 NxM 희소성 유도를 제약 최적화 문제로 공식화한다.
  • 문제를 두 개의 순차적 하위문제로 분해하기 위해 상호교환 다중 승수 방법(Alternating Direction Method of Multipliers, ADMM)을 사용한다: 가중치 갱신과 희소성 제약 조건 이행.
  • 이중 상승(dual ascent)과 보완 라그랑주 함수(augmented Lagrangian)를 사용하여, 일관된 NLP 작업에 대한 미세조정 동안 반복적으로 NxM 제약 조건을 이행한다.
  • 원본 사전 훈련된 가중치를 재훈련 없이도 유지하면서 BERT와 DistilBERT 모델에 이 방법을 적용한다.
  • 지식 증류를 통합하기 위해, 학생 모델에 NxM 희소성을 적용함으로써 파rameter 수를 줄였지만 높은 정확도를 유지한다.
  • 기존의 조밀한 모델과의 호환성을 유지하기 위해 원본 사전 훈련된 가중치를 그대로 유지하고, 오직 미세조정 단계에서만 희소화를 수행한다.

실험 결과

연구 질문

  • RQ1ADMM 기반 최적화가 최대 사전 훈련된 트랜스포머에 대해 정확도를 저하시키지 않고도 효과적으로 NxM 준구조적 희소성을 유도할 수 있는가?
  • RQ2표준 미세조정 및 기존의 희소화 방법과 비교했을 때, ADMM를 통한 NxM 희소성의 정확도와 하드웨어 효율성은 어떻게 다른가?
  • RQ3NxM 희소성은 얼마나 깊이 지식 증류와 조합되어 추가적인 모델 압축을 가능하게 하면서도 높은 정확도를 유지할 수 있는가?
  • RQ4ADMM 기반의 희소화 방법은 자원이 제한된 일관된 NLP 작업에서 모델의 일반화 능력을 유지하는가?
  • RQ5희소성 적용이 증류된 모델에 미치는 영향은 무엇이며, DistilBERT와 같이 이미 압축된 모델에서도 구조적 부족 요소가 존재하는가?

주요 결과

  • NxMTransformer는 표준 NLP 벤치마크에서 현재 최고의 실천 방식보다 평균 GLUE 점수를 1.7점 높게 기록했다.
  • 원본 BERT base 모델의 정확도의 98.4%를 유지하면서 NxM 희소성을 적용함으로써 강력한 성능 유지 능력을 입증했다.
  • DistilBERT에 적용했을 때, 파arameter 수를 32% 감소시킨(66.6M에서 45.3M로) 상태에서도 학생 모델의 정확도의 97.6%를 유지했다.
  • 표준 DistilBERT보다 평균 GLUE 점수에서 2점 높은 성능을 기록하여, 층 내부 희소성에 의한 더 나은 부족 요소 탐지 능력을 입증했다.
  • 사전 훈련된 가중치를 재훈련 없이도 고정밀도의 하드웨어 최적화 모델을 생성할 수 있었으며, 전이 가능성도 유지했다.
  • 결과적으로, 지식 증류 이후에도 매우 압축된 모델 내에서 승리의 티켓(winning tickets)이 존재할 가능성이 제기된다.

더 나은 연구,지금 바로 시작하세요

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.