arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2402.04051cs.LG
收藏

基于置换的权重匹配分析线性模式连通性:兼论其他置换搜索方法

Analysis of Linear Mode Connectivity via Permutation-Based Weight Matching: With Insights into Other Permutation Search Methods

NTT Social Informatics Laboratories(NTT社会信息学研究所);NTT Computer and Data Science Laboratories(NTT计算机与数据科学研究所)

Akira Ito, Masanori Yamada, Atsutoshi Kumagai

AI总结:

本文通过置换权重匹配分析线性模式连通性,揭示其关键在于对齐大奇异值对应的奇异向量方向而非减小距离,并比较了激活匹配与直通估计器,表明权重匹配在多模型合并中更具优势。

摘要:

最近,Ainsworth等人表明,在模型参数的置换搜索中使用权重匹配(WM)来最小化L^2距离,能够有效识别满足线性模式连通性(LMC)的置换,即两个使用不同随机种子独立训练的模型之间,沿线性路径的损失几乎保持不变。本文利用WM分析LMC,这对于理解随机梯度下降的有效性及其在模型合并等领域的应用具有重要意义。我们首先通过实验表明,WM找到的置换并未显著减小两个模型之间的L^2距离,LMC的出现并不仅仅源于WM本身带来的距离减小。随后,我们证明置换可以改变每层权重矩阵奇异向量的方向,但不会改变奇异值。这一发现表明,WM找到的置换主要是在不同模型之间对齐与大奇异值相关的奇异向量方向。这种对齐使得决定模型功能的大奇异值对应的奇异向量在原始模型与合并模型之间更加接近,从而使合并后的模型能够保留与原始模型相似的功能,进而满足LMC。本文还从奇异向量的角度分析了激活匹配(AM),发现AM的原理很可能与WM相同。最后,我们分析了WM与直通估计器(STE)这一依赖数据集的置换搜索方法之间的差异,并表明在三个或更多模型之间实现LMC时,WM可能比STE更具优势。

英文摘要:

Recently, Ainsworth et al. showed that using weight matching (WM) to minimize the $L^2$ distance in a permutation search of model parameters effectively identifies permutations that satisfy linear mode connectivity (LMC), where the loss along a linear path between two independently trained models with different seeds remains nearly constant. This paper analyzes LMC using WM, which is useful for understanding stochastic gradient descent's effectiveness and its application in areas like model merging. We first empirically show that permutations found by WM do not significantly reduce the $L^2$ distance between two models, and the occurrence of LMC is not merely due to distance reduction by WM itself. We then demonstrate that permutations can change the directions of the singular vectors, but not the singular values, of the weight matrices in each layer. This finding shows that permutations found by WM primarily align the directions of singular vectors associated with large singular values across models. This alignment brings the singular vectors with large singular values, which determine the model's functionality, closer between the original and merged models, allowing the merged model to retain functionality similar to the original models, thereby satisfying LMC. This paper also analyzes activation matching (AM) in terms of singular vectors and finds that the principle of AM is likely the same as that of WM. Finally, we analyze the difference between WM and the straight-through estimator (STE), a dataset-dependent permutation search method, and show that WM can be more advantageous than STE in achieving LMC among three or more models.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑