arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2410.23970cs.LGcs.CV
收藏

TrAct: 使第一层预激活可训练

TrAct: Making First-layer Pre-Activations Trainable

Stanford University(斯坦福大学);University of Salzburg(萨尔茨堡大学)

Felix Petersen, Christian Borgelt, Stefano Ermon

AI总结:

针对视觉模型第一层梯度受像素值影响的问题,提出TrAct方法,通过构建激活提议并求解最优权重的闭式解加速训练,在多种视觉模型和优化器上实现1.25-4倍提速且开销低。

摘要:

我们研究了视觉模型第一层的训练,发现像素值与梯度更新幅度之间存在明确关联:根据定义,到达第一层权重的梯度与(归一化后的)输入像素值直接成正比。因此,低对比度图像对学习的影响小于高对比度图像,极亮或极暗图像对权重的影响强于中等亮度图像。本研究提出对模型第一层生成的嵌入执行梯度下降。然而,对于视觉模型而言,改用带嵌入层的离散输入并非合理方案。为此,我们提出了概念性流程:(i)对第一层激活执行梯度下降步骤以构建激活提议;(ii)求解第一层的最优权重,即能最小化与激活提议平方距离的权重。我们给出了该流程的闭式解,并对其进行调整以适配鲁棒的随机训练,同时确保所有计算高效执行。实验结果表明,TrAct(Training Activations,训练激活)可将训练速度提升1.25倍至4倍,且仅需很小的计算开销。我们在卷积架构和Transformer架构等多种不同视觉模型上,搭配不同优化器验证了TrAct的实用性。

英文摘要:

We consider the training of the first layer of vision models and notice the clear relationship between pixel values and gradient update magnitudes: the gradients arriving at the weights of a first layer are by definition directly proportional to (normalized) input pixel values. Thus, an image with low contrast has a smaller impact on learning than an image with higher contrast, and a very bright or very dark image has a stronger impact on the weights than an image with moderate brightness. In this work, we propose performing gradient descent on the embeddings produced by the first layer of the model. However, switching to discrete inputs with an embedding layer is not a reasonable option for vision models. Thus, we propose the conceptual procedure of (i) a gradient descent step on first layer activations to construct an activation proposal, and (ii) finding the optimal weights of the first layer, i.e., those weights which minimize the squared distance to the activation proposal. We provide a closed form solution of the procedure and adjust it for robust stochastic training while computing everything efficiently. Empirically, we find that TrAct (Training Activations) speeds up training by factors between 1.25x and 4x while requiring only a small computational overhead. We demonstrate the utility of TrAct with different optimizers for a range of different vision models including convolutional and transformer architectures.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑