Weitere ähnliche Inhalte Mehr von Deep Learning JP (20) Kürzlich hochgeladen (11) 【DL輪読会】GIT RE-BASIN: MERGING MODELS MODULO PERMU- TATION SYMMETRIES1. DEEP LEARNING JP
[DL Papers]
“GIT RE-BASIN: MERGING MODELS MODULO
PERMU- TATION SYMMETRIES”
発表者:岩澤有祐
http://deeplearning.jp/
2. “Git Re-Basin: Merging Models Modulo Permutation Symmetries” , ICLR 2023 Under review
書誌情報
2
• 著者:Samuel K. Ainsworth, Jonathan Hayase,
Siddhartha Srinivasa (University of Washington)
• 概要
– なぜSGDが毎回同じような性能を達成するの
か?
– SGDで到達されるほとんどの解はPermutationを
除いて
Linear Mode Connectedであるから(右図)
• SGDとLMCに関連する論文として下記も簡単に紹
介
– “Unmasking the Lottery Ticket Hypothesis:
What's Encoded in a Winning Ticket's Mask?”
※他に断りがない限り本資料の図表は当該論文より
3. Outline
• 前提知識:Linear Mode Connectivity
– “Linear Mode Connectivity and the Lottery Ticket
Hypothesis”,ICML2020
• “Git Re-Basin: Merging Models Modulo
Permutation Symmetries”
• “Unmasking the Lottery Ticket Hypothesis:
What's Encoded in a Winning Ticket's Mask?”
3
4. Instability, Error Barrier
4
Linear Mode Connectivity and the Lottery Ticket Hypothesisより抜粋
• ある初期値W0から開始
• 異なるノイズ(サンプルの順序な
ど)を加えてW0から2つの重みを
作る
• W1とW2の間を線形補間したとき
の
性能の劣化がError Barrierと呼ぶ
7. Linear Mode Connectivity
7
Definition: ε-Linear Mode Connected (LMC)
ある2つの重み𝒘𝟏 ,𝒘𝟐が次の性質を満たすときLMCと呼
ぶ.
𝐿 𝛼𝒘𝟏 + 1 − 𝛼 𝒘𝟐 ≤ 𝛼𝐿 𝒘𝟏 + 1 − 𝛼 𝐿 𝒘𝟏
Definition: Error Barrier
上記を満たす最小のεを𝒘𝟏 ,𝒘𝟐のError Barrierと呼ぶ
10. Outline
• 前提知識:Linear Mode Connectivity
– “Linear Mode Connectivity and the Lottery Ticket
Hypothesis”,ICML2020
• “Git Re-Basin: Merging Models Modulo
Permutation Symmetries”
• “Unmasking the Lottery Ticket Hypothesis:
What's Encoded in a Winning Ticket's Mask?”
10
11. Permutation symmetries of Neural Networks
• NNの重みは入れ替えても機能的には不変
𝑧𝑙+1 = 𝑃𝑇
𝑃𝑧𝑙+1 = 𝑃𝑇
𝑃𝜎 𝑊𝑙𝑧𝑙 + 𝑏𝑙 = 𝑃𝑇
𝜎 𝑃𝑊𝑙𝑧𝑙 + 𝑃𝑏𝑙
• σ:活性化関数
• P:Permutation Matrix
11
12. “The Role of Permutation Invariance in Linear Mode Connectivity of Neural
Networks”, arxiv, 2021
12
Conjecture
“Most SGD solution belong to a set
whose elements can be permuted so
that no barrier exists on linear
interpolation between any two
permuted elements”
図は“The Role of Permutation Invariance in Linear Mode Connectivity of Neural Networks”より抜粋
14. Permutation Selection Method
• 方法1:Matching Activations
– データが必要だがSolverがある
• 方法2:Matching Weights
– データは必要ないが素朴には解けないので層ごとに行う
• 方法3:Straight Through Estimator Matching
14
22. Outline
• 前提知識:Linear Mode Connectivity
– “Linear Mode Connectivity and the Lottery Ticket
Hypothesis”,ICML2020
• “Git Re-Basin: Merging Models Modulo
Permutation Symmetries”
• “Unmasking the Lottery Ticket Hypothesis:
What's Encoded in a Winning Ticket's Mask?”
22
23. “Unmasking the Lottery Ticket Hypothesis” , ICLR 2023 Under review
書誌情報2
23
• 著者
– Mansheej Paul, Feng Chen, Brett W. Larsen, Jonathan Frankle, Surya Ganguli,
Gintare Karolina Dziugaite
– Stanford, Metaなど
• 概要
– 宝くじ仮説の実験では,もとよりかなり小さいパラメータで同等の性能を
達成するサブネット(Matching Networks)が存在することが示唆されてい
る
– ただし,小さなサブネットの発見はOne-Shotでは行えず,Iterativeな
Pruningが必要
– かつ,Iterative Pruningの際に重みを初期値に戻す必要がある
(Rewinding)
– これらがなぜ必要なのかについてLMCの観点から考察
24. Iterative Magnitude Pruning
1. NNをランダムに初期化(𝜽𝟎). 𝒎𝟎
= 𝟏
2. NNを一定イテレーション訓練(𝜽𝒋)
3. For i in 0…L
1. 𝒎𝒊+𝟏
⊙ 𝜽𝒋を訓練
2. 重みの大きさ下位α%を刈り取るマスク𝒎𝒊+𝟏
を作成
4. 最終的な𝒎𝑳
⊙ 𝜽𝒋を訓練する
※上記の手続きで訓練したサブネットが普通に訓練したNNと
同程度の正解率を達成する場合Matching Networksと呼ばれ
る
24
25. IMP from LMC
25
• 各Levelでαだけ重みを残す場合のIterative Pruningの模式図
• 本論文では,各レベルでのMatching Networksがその前のNetworksと
Linearly ConnectedであることがIMPの成功に重要であることを検証
Hinweis der Redaktion Beyond Reward Based End-to-End RL: Representation Learning and Dataset Optimization Perspective Linear Mode Connectivity and the Lottery Ticket Hypothesisより抜粋 Bをまず線形割当する The Lottery Ticket Hypothesis: Finding Sparse, Trainable Neural Networks