Skip to main content
QUICK REVIEW

[论文解读] Revisiting Model Stitching to Compare Neural Representations

Yamini Bansal, Preetum Nakkiran|arXiv (Cornell University)|Jun 14, 2021
Domain Adaptation and Few-Shot LearningComputer Science参考文献 29被引用 22
一句话总结

本文重新审视模型拼接作为一种比较神经网络表征的方法,表明即使在不同目标(监督式与自监督式)、数据规模、宽度或训练时间下训练的优秀模型,也能以极小的性能损失进行拼接。主要贡献在于实证证据支持‘拼接连通性’与‘越多越好’原则,表明更优的表征在架构与训练制度之间具有模块化与互操作性。

ABSTRACT

We revisit and extend model stitching (Lenc & Vedaldi 2015) as a methodology to study the internal representations of neural networks. Given two trained and frozen models $A$ and $B$, we consider a "stitched model'' formed by connecting the bottom-layers of $A$ to the top-layers of $B$, with a simple trainable layer between them. We argue that model stitching is a powerful and perhaps under-appreciated tool, which reveals aspects of representations that measures such as centered kernel alignment (CKA) cannot. Through extensive experiments, we use model stitching to obtain quantitative verifications for intuitive statements such as "good networks learn similar representations'', by demonstrating that good networks of the same architecture, but trained in very different ways (e.g.: supervised vs. self-supervised learning), can be stitched to each other without drop in performance. We also give evidence for the intuition that "more is better'' by showing that representations learnt with (1) more data, (2) bigger width, or (3) more training time can be "plugged in'' to weaker models to improve performance. Finally, our experiments reveal a new structural property of SGD which we call "stitching connectivity'', akin to mode-connectivity: typical minima reached by SGD can all be stitched to each other with minimal change in accuracy.

研究动机与目标

  • 探究在不同训练设置下,表现良好的神经网络是否仍学习到相似的内部表征。
  • 检验‘良好’表征具有模块性且可在模型间互换的假设。
  • 评估随着数据量、模型宽度或训练时间的增加,表征是否持续改善,以及这些表征能否‘插入’到较弱模型中以提升性能。
  • 通过模型拼接的视角,探索SGD训练动力学的结构性质。

提出的方法

  • 使用不同目标、数据、宽度或训练时间训练两个冻结模型 A 和 B。
  • 通过一个可训练的适配器层,将模型 A 的底层与模型 B 的顶层连接,形成拼接模型。
  • 仅训练适配器层,其余所有权重保持冻结,并在下游任务上评估性能。
  • 将性能下降(拼接惩罚)作为表征兼容性的度量。
  • 系统性地改变拼接层位置(网络早期、中期或晚期),以评估逐层样本复杂度。
  • 在不同架构、数据制度与训练时长下比较结果,以评估模块性与可迁移性。

实验结果

研究问题

  • RQ1在不同目标(如监督式与自监督式)下训练的模型能否在任意层进行拼接且性能损失极小?
  • RQ2提升训练数据规模、模型宽度或训练时间是否会产生可‘插入’到弱模型中以提升性能的表征?
  • RQ3在不同随机种子下训练的不同训练运行所产生的表征在拼接时是否兼容,表明其结构相似性?
  • RQ4早期训练阶段的表征是否仍与后期阶段的表征兼容,暗示学习动力学的稳定性?
  • RQ5SGD训练是否存在某种结构性质,使得极小值‘可拼接连接’——即能通过低成本适配器相互连接?

主要发现

  • 在不同目标(如 ImageNet 上的监督式与自监督式)下训练的模型可在任意层进行拼接且性能损失极小,支持了共享表征的‘安娜·卡列尼娜’假说。
  • 在更多数据(如 10 万 vs. 5 千样本)下训练的表征可被拼接到更小模型中,无需微调即可提升准确率高达 2%。
  • 宽度为 2 倍的模型可被拼接到宽度为 0.25 倍的模型中以提升性能,但反之则不行,表明表征质量存在方向性模块性。
  • ResNet-18 的早期层表现出更快收敛性,且与后期训练阶段的表征兼容,表明学习动力学具有稳定性。
  • 在网络中层进行拼接时,性能迅速下降,表明每一层均有自身的样本复杂度,且早期层更具鲁棒性。
  • 将仅用 5 千样本训练的前 3 层和最后 3 层冻结,其余层使用完整数据微调,可恢复原始网络约 98% 的准确率,验证了逐层训练的样本效率。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。