Skip to main content
QUICK REVIEW

[论文解读] The Depth-to-Width Interplay in Self-Attention

Yoav Levine, Noam Wies|arXiv (Cornell University)|Jun 22, 2020
Ferroelectric and Negative Capacitance Devices被引用 7
一句话总结

本文从理论和实证两方面研究了自注意力网络中的深度与宽度权衡问题,揭示了在宽度依赖下从深度高效到深度低效的转变。研究提供了最优深度与宽度分配的量化指导,表明对于1万亿参数的模型,最优宽度为30K,挑战了传统的深度高效范式,转而支持大规模拓宽。

ABSTRACT

Self-attention architectures, which are rapidly pushing the frontier in natural language processing, demonstrate a surprising depth-inefficient behavior: previous works indicate that increasing the internal representation (network width) is just as useful as increasing the number of self-attention layers (network depth). We theoretically predict a width-dependent transition between depth-efficiency and depth-inefficiency in self-attention. We conduct systematic empirical ablations on networks of depths 6 to 48 that clearly reveal the theoretically predicted behaviors, and provide explicit quantitative suggestions regarding the optimal depth-to-width allocation for a given self-attention network size. The race towards beyond 1-Trillion parameter language models renders informed guidelines for increasing self-attention depth and width in tandem an essential ingredient. Our guidelines elucidate the depth-to-width trade-off in self-attention networks of sizes up to the scale of GPT3 (which we project to be too deep for its size), and beyond, marking an unprecedented width of 30K as optimal for a 1-Trillion parameter network.

研究动机与目标

  • 理解在大规模语言模型背景下,自注意力机制中网络深度与宽度的相互作用。
  • 通过识别依赖于宽度的范式转变,挑战自注意力中普遍存在的深度高效观念。
  • 在固定参数预算下,为深度与宽度之间的参数分配提供原则性、量化的指导。
  • 通过系统消融实验(深度范围6至48)验证理论预测。
  • 通过优化深度与宽度的权衡,为下一代万亿参数语言模型的设计提供支持。

提出的方法

  • 对一个不包含非线性激活或归一化操作的简化自注意力模型进行理论分析,聚焦于核心连接性和表达能力。
  • 通过理论建模推导出深度高效与深度低效范式之间的宽度依赖型转变点。
  • 通过系统消融实验对深度6至48、宽度可变的网络进行实证评估,测量困惑度与损失。
  • 在对数宽度空间中使用线性回归拟合实证转变点,以验证理论预测。
  • 在疑似转变点附近进行密集测量,以提高估计精度并减少实证误差。
  • 使用统计指标(χ²_red 和 R²)验证观测到的转变趋势的拟合优度。

实验结果

研究问题

  • RQ1自注意力网络中的深度与宽度权衡如何随网络宽度变化?其是否如理论预测的那样表现出范式转变?
  • RQ2在某一特定宽度阈值之后,网络深度对性能的贡献有多大?何时拓宽比加深更为有效?
  • RQ3在给定总参数预算下,自注意力网络的最优深度与宽度分配是什么,尤其是在大规模场景下?
  • RQ4自注意力模型的实证性能是否遵循理论预测:即随着宽度增加,从深度高效转向深度低效?
  • RQ5转变点如何随深度变化?是否可将其建模为指数函数?

主要发现

  • 实证观察到深度高效与深度低效范式之间存在清晰的转变,且转变点随深度呈指数增长。
  • 对于1万亿参数的自注意力网络,预测最优宽度为30K,表明大规模拓宽比加深更为关键。
  • 实证数据显示,范式之间的转变点在对数宽度空间中呈线性趋势,R² = 0.998,χ²_red = 0.854,表明与理论模型拟合度极高。
  • 深度 >6 的网络表现出的性能趋势取决于总参数量而非深度与宽度的比值,但底层的范式转变仍影响其行为。
  • 研究揭示,当宽度超过某一临界值后,增加深度带来的收益递减,而拓宽成为性能提升的主要路径。
  • 最优深度与宽度分配并非在所有规模下都一致;相反,其为宽度依赖型,且转变点随深度呈指数增长。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。