arXiv:2502.00571cs.CVcs.LG2025-02被引 6

改进前向-前向算法,让视觉Transformer训练更高效

Contrastive Forward-Forward: A Training Algorithm of Vision Transformer

  • 引入对比学习思想重构前向-前向算法
  • 在Vision Transformer上提升准确率最高达10%,收敛速度加快5-20倍
  • 在标注不准确时仍优于传统反向传播

尽管反向传播被广泛用于神经网络训练,研究者仍试图从大脑中获取灵感以寻找性能更优的替代方法。前向-前向(Forward-Forward)是一种更贴近大脑运作机制的新型训练算法,但其性能与反向传播相比仍有显著差距。该算法在每一层后设置损失函数,通过两次局部前向传递和一次局部反向传递更新参数。目前该算法仅在简单多层感知机上评估过,用于图像分类任务。本文将其扩展至更复杂、现代的Vision Transformer架构。受对比学习启发,我们对算法进行改进,提出对比前向-前向(Contrastive Forward-Forward)。实验表明,所提算法显著优于基线前向-前向,在准确率上最高提升10%,收敛速度加快5至20倍。此外,若以交叉熵为反向传播基线,本方法能缩小前向-前向与反向传播之间的性能差距,甚至在监督信息不准确的情况下表现更优。

原文摘要 · Abstract (English)

Although backpropagation is widely accepted as a training algorithm for artificial neural networks, researchers are always looking for inspiration from the brain to find ways with potentially better performance. Forward-Forward is a novel training algorithm that is more similar to what occurs in the brain, although there is a significant performance gap compared to backpropagation. In the Forward-Forward algorithm, the loss functions are placed after each layer, and the updating of a layer is done using two local forward passes and one local backward pass. Forward-Forward is in its early stages and has been designed and evaluated on simple multi-layer perceptron networks to solve image classification tasks. In this work, we have extended the use of this algorithm to a more complex and modern network, namely the Vision Transformer. Inspired by insights from contrastive learning, we have attempted to revise this algorithm, leading to the introduction of Contrastive Forward-Forward. Experimental results show that our proposed algorithm performs significantly better than the baseline Forward-Forward leading to an increase of up to 10% in accuracy and accelerating the convergence speed by 5 to 20 times. Furthermore, if we take Cross Entropy as the baseline loss function in backpropagation, it will be demonstrated that the proposed modifications to the baseline Forward-Forward reduce its performance gap compared to backpropagation on Vision Transformer, and even outperforms it in certain conditions, such as inaccurate supervision.

视觉Transformer前向-前向对比学习高效训练

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。