Skip to main content
QUICK REVIEW

[論文レビュー] LoSparse: Structured Compression of Large Language Models based on Low-Rank and Sparse Approximation

Yixiao Li, Yifan Yu|arXiv (Cornell University)|Jun 20, 2023
Tensor decomposition and applicationsMathematics被引用数 7
ひとこと要約

LoSparseは各重み行列を低ランク部分とスパース部分に分解して圧縮する。従来の prune や 低ランク法よりも、NLU, QA, NLG タスクで性能が向上する。

ABSTRACT

Transformer models have achieved remarkable results in various natural language tasks, but they are often prohibitively large, requiring massive memories and computational resources. To reduce the size and complexity of these models, we propose LoSparse (Low-Rank and Sparse approximation), a novel model compression technique that approximates a weight matrix by the sum of a low-rank matrix and a sparse matrix. Our method combines the advantages of both low-rank approximations and pruning, while avoiding their limitations. Low-rank approximation compresses the coherent and expressive parts in neurons, while pruning removes the incoherent and non-expressive parts in neurons. Pruning enhances the diversity of low-rank approximations, and low-rank approximation prevents pruning from losing too many expressive neurons. We evaluate our method on natural language understanding, question answering, and natural language generation tasks. We show that it significantly outperforms existing compression methods.

研究の動機と目的

  • 大規模トランスフォーマーモデルの効率的な圧縮の必要性を動機づける。
  • 協調可能な低ランク成分と非協調なニューロン成分を捉えるための joint 低ランク+スパース近似を提案する。
  • 事前学習済み知識を保持しつつ、スパース成分を訓練・剪定するアルゴリズムを開発する。
  • 自然言語理解、質問応答、自然言語生成タスク全般で有効性を示す。

提案手法

  • 各重み W を W = UV + S と近似する。ここで U,V は低ランク行列、S は構造化スパース行列。
  • W(0) のトップ k 成分から U と V を初期化し、S(0) = W(0) − UV と設定する。順伝播は Y = (XU)V + XS と置換する。
  • U,V,S を勾配法で反復的に更新する。S はニューロン重要度スコア Γ(S*i) によって剪定され、上位 p_t% のニューロンのみを保持する。p_t には三次関数的減衰スケジュールを適用する。
  • ニューロン重要度 Γ(W*i) を、ニューロンに対して I(wij) = | w_ij ∂L/∂w_ij | の平滑化平均で計算し、構造化剪定に適用する。
  • トレーニングステップにわたり、残りの分数 p_t を 1 から目標値 p_T へ徐々に減少させる三次スケジュールを用いる。
  • 任意で LoSparse を知識蒸留や他の圧縮法と組み合わせ、性能をさらに向上させる。

実験結果

リサーチクエスチョン

  • RQ1低ランク近似とスパース近似の組み合わせは、トランスフォーマー圧縮において純粋な低ランク法や剪定法を上回るか。
  • RQ2LoSparse は GLUE(NLU)、SQuAD(QA)、XSum(NLG)ベンチマークで、Movement pruning や ITP などのベースラインと比較してどの程度性能を発揮するか。
  • RQ3低ランク成分とスパース成分の割り当ては、タスク間で性能と安定性にどのような影響を及ぼすか。
  • RQ4蒸留法や他の圧縮フレームワークと LoSparse は効果的に統合できるか。

主な発見

  • LoSparse は GLUE の MNLI などのタスクで既存の剪定法を顕著に上回り、場合によっては精度が 2.0% 以上向上する。
  • SQuADv1.1 では、極端なスパース性下で F1 が他の剪定法を 3.3 ポイント上回り、高い残存比でも競争力を保つ。
  • XSum の要約において LoSparse は ROUGE-1 で現行法を 2.99 ポイント上回り、抽象的要約が必要な難しいタスクでより大きな利得を示す。
  • LoSparse は訓練中の安定性を保ち、スパース部を剪定するだけでなく各重み行列に低ランク成分を保持することで他の剪定法で見られる発散を抑える。
  • 本手法は知識蒸留と直交しており、蒸留と併用したり CoFi などの他の圧縮フレームワークへ組み込むことで性能をさらに改善できる。

この論文を読む

Nubintのビューアで原文を開き、読みながら気になる箇所をすぐに質問できます。

Nubintでこの論文を読む

このレビューはAIが論文の原文をもとに作成しました。引用する前に原文をご確認ください。