Skip to main content
QUICK REVIEW

[论文解读] Position Prediction as an Effective Pretraining Strategy

Shuangfei Zhai, Navdeep Jaitly|arXiv (Cornell University)|Jul 15, 2022
Natural Language Processing Techniques被引用 8
一句话总结

本文提出MP3(掩码块位置预测),一种用于Transformer的新型自监督预训练方法,通过仅从内容本身预测图像或音频块的位置,而无需位置嵌入。该方法性能可与当前最先进的自监督方法相媲美,并使不使用位置编码的模型在视觉和语音基准测试中超越监督基线模型。

ABSTRACT

Transformers have gained increasing popularity in a wide range of applications, including Natural Language Processing (NLP), Computer Vision and Speech Recognition, because of their powerful representational capacity. However, harnessing this representational capacity effectively requires a large amount of data, strong regularization, or both, to mitigate overfitting. Recently, the power of the Transformer has been unlocked by self-supervised pretraining strategies based on masked autoencoders which rely on reconstructing masked inputs, directly, or contrastively from unmasked content. This pretraining strategy which has been used in BERT models in NLP, Wav2Vec models in Speech and, recently, in MAE models in Vision, forces the model to learn about relationships between the content in different parts of the input using autoencoding related objectives. In this paper, we propose a novel, but surprisingly simple alternative to content reconstruction~-- that of predicting locations from content, without providing positional information for it. Doing so requires the Transformer to understand the positional relationships between different parts of the input, from their content alone. This amounts to an efficient implementation where the pretext task is a classification problem among all possible positions for each input token. We experiment on both Vision and Speech benchmarks, where our approach brings improvements over strong supervised training baselines and is comparable to modern unsupervised/self-supervised pretraining methods. Our method also enables Transformers trained without position embeddings to outperform ones trained with full position information.

研究动机与目标

  • 开发一种自监督预训练策略,以减少对复杂重建目标(如掩码自编码器)的依赖。
  • 探究仅从内容中学习位置理解是否可行,而无需显式的方位监督。
  • 评估在预训练期间移除位置嵌入后,是否仍能获得强大的下游性能。
  • 与内容重建相比,探究位置预测作为代理任务的有效性。
  • 证明Transformer可通过仅位置预测学习到强大的空间或时间结构归纳偏置。

提出的方法

  • 模型通过线性分类头预测每个输入标记(如图像块或音频帧)的位置,将位置预测视为多分类问题。
  • 在预训练期间,从所有标记中移除位置信息,仅使用随机子集的标记(上下文标记)作为自注意力机制中的键和值。
  • 修改注意力机制,使所有标记的查询仅关注来自上下文标记的键和值,从而强制模型基于部分上下文推理位置。
  • 训练目标为预测位置与真实位置之间的交叉熵损失,不进行像素或频谱值的重建。
  • 预训练完成后,移除位置预测头,替换为下游任务头(如分类),并在微调阶段添加绝对位置嵌入。
  • 该方法在视觉(ImageNet、CIFAR)和语音(Google Speech Commands)基准上均取得一致的性能提升。

实验结果

研究问题

  • RQ1Transformer能否仅从内容中学习输入标记之间的位置关系,而无需任何位置监督?
  • RQ2与掩码重建相比,作为代理任务的位置预测在下游性能和效率方面表现如何?
  • RQ3在使用位置预测进行预训练时,不使用位置嵌入的Transformer是否能优于使用位置嵌入的模型?
  • RQ4位置预测任务在视觉和语音数据上的难度是否存在差异?部分位置监督如何影响性能?
  • RQ5MP3学习到了哪些归纳偏置?推理过程中模型的注意力模式如何反映这些偏置?

主要发现

  • 在ImageNet-1K基准上,MP3使用ViT-Base模型达到80.2%的top-1准确率,优于监督训练,并与当前最先进的自监督方法相当。
  • 在Google Speech Commands数据集上,MP3将测试准确率从监督基线的91.9%提升至94.2%,绝对提升2.3%,即使仅有5%的块提供位置信息。
  • 当所有块均可见时,MP3在视觉数据上的位置预测准确率接近完美(98.7%),表明其具备强大的空间关系学习能力。
  • 尽管预训练期间未使用位置嵌入,MP3在深层网络(如第6、10、11层)中仍能学习到强有效的定位模式,表明仅从内容中即可隐式形成位置理解。
  • 该方法通过仅使用上下文标记作为键和值,实现稀疏注意力机制,降低了计算成本,使预训练比全连接自注意力更高效。
  • 使用MP3预训练进行微调的性能优于使用完整位置嵌入的监督预训练,即使后者在预训练中使用了全部位置信息。

更好的研究,从现在开始

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

无需绑定信用卡

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