Skip to main content
QUICK REVIEW

[论文解读] Never Train from Scratch: Fair Comparison of Long-Sequence Models Requires Data-Driven Priors

Ido Amos, Jonathan Berant|arXiv (Cornell University)|Oct 4, 2023
Machine Learning and Data Classification被引用 5
一句话总结

本文主张,对长序列模型的公平评估需要通过自监督预训练(SPT)获得数据驱动的先验,而非随机权重初始化。通过在下游任务数据上使用去噪目标对模型进行预训练,SPT显著提升了Transformer和状态空间模型(SSMs)的性能,使普通Transformer在LRA上的表现达到S4的水平,同时使SSMs在PathX-256上的准确率提升了20个百分点,从而消除了许多架构偏差的必要性。

ABSTRACT

Modeling long-range dependencies across sequences is a longstanding goal in machine learning and has led to architectures, such as state space models, that dramatically outperform Transformers on long sequences. However, these impressive empirical gains have been by and large demonstrated on benchmarks (e.g. Long Range Arena), where models are randomly initialized and trained to predict a target label from an input sequence. In this work, we show that random initialization leads to gross overestimation of the differences between architectures and that pretraining with standard denoising objectives, using $ extit{only the downstream task data}$, leads to dramatic gains across multiple architectures and to very small gaps between Transformers and state space models (SSMs). In stark contrast to prior works, we find vanilla Transformers to match the performance of S4 on Long Range Arena when properly pretrained, and we improve the best reported results of SSMs on the PathX-256 task by 20 absolute points. Subsequently, we analyze the utility of previously-proposed structured parameterizations for SSMs and show they become mostly redundant in the presence of data-driven initialization obtained through pretraining. Our work shows that, when evaluating different architectures on supervised tasks, incorporation of data-driven priors via pretraining is essential for reliable performance estimation, and can be done efficiently.

研究动机与目标

  • 解决因随机权重初始化导致的长序列模型性能比较不公平的问题。
  • 探究仅在下游任务数据上进行预训练是否能为长程建模提供有效的归纳偏置。
  • 评估当模型经过充分预训练时,SSMs中的架构创新是否依然必要。
  • 证明自监督预训练(SPT)能带来更优的泛化能力,并缩小不同架构间的性能差距。

提出的方法

  • 仅在下游任务数据上使用掩码去噪目标应用自监督预训练(SPT),不依赖外部语料。
  • 在Long Range Arena(LRA)和PathX-256基准上,对比从零开始训练与SPT微调的模型。
  • 采用两阶段训练流程:先在去噪任务上预训练,再在下游分类任务上微调。
  • 在随机初始化和SPT两种设置下,比较标准Transformer与S4状态空间模型的性能。
  • 开展计算量匹配的消融实验,以隔离SPT带来的性能增益与训练计算量增加的独立影响。
  • 在模型规模跨越四个数量级的范围内评估模型缩放性能,以检验SPT的鲁棒性。

实验结果

研究问题

  • RQ1随机权重初始化是否会导致长序列架构间性能比较产生偏差?
  • RQ2仅在下游任务数据上进行自监督预训练是否足以提供足够的归纳偏置,以弥合Transformer与SSMs之间的性能差距?
  • RQ3当模型使用数据驱动先验进行预训练时,SSMs中手工设计的架构偏差在多大程度上变得冗余?
  • RQ4SPT是否比单纯增加训练计算量更能提升泛化能力?
  • RQ5SPT在不同模型规模和序列长度下的性能表现如何?

主要发现

  • 经过SPT预训练的普通Transformer在Long Range Arena(LRA)上达到最先进性能,无需任何架构修改即可匹配S4报告的结果。
  • 与从零开始训练相比,S4在PathX-256任务上使用SPT后准确率提升了20个百分点。
  • 在LRA上,SPT将Transformer与SSMs之间的性能差距缩小至接近零,表明当使用恰当先验时,架构差异的影响显著降低。
  • SPT在所有测试的模型规模(从10万到1000万参数)上均一致提升性能,显示出对规模变化的强鲁棒性。
  • SPT带来的性能增益无法仅由额外计算量解释,因为计算量匹配的实验表明,SPT在固定总训练预算下仍优于从零开始训练。
  • 当与SPT结合时,SSMs中的结构化参数化变得基本冗余,表明数据驱动先验已涵盖手工设计架构偏差的大部分优势。

更好的研究,从现在开始

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

无需绑定信用卡

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