arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2312.12385cs.CVcs.LG
收藏

面向Transformer神经网络高效训练与推理的位置一致性输入压缩方法

Input Compression with Positional Consistency for Efficient Training and Inference of Transformer Neural Networks

Purdue University(普渡大学)

Amrit Nagarajan, Anand Raghunathan

AI总结:

针对Transformer计算量大、易过拟合的问题,提出位置一致性输入压缩方法ICPC,通过多模态分级压缩与一致性位置选择,同时提升泛化能力与训练推理效率,在9项任务上实现准确率提升与2-3倍左右的速度提升。

摘要:

近年来,Transformer模型迅速普及,在文本、图像、音频和视频处理任务中取得了当前最优(state-of-the-art)性能。但Transformer的训练和推理都需要大量计算资源,且训练过程中容易出现过拟合问题。为解决这些挑战,我们提出了位置一致性输入压缩(Input Compression with Positional Consistency,ICPC)——一种全新的数据增强方法,与现有增强技术不同,它能同时提升模型的泛化能力和训练效率。\nICPC在每个训练轮次(epoch)中对每个训练样本施加不同程度的压缩。这使得Transformer处理的输入序列更短,从而加快训练速度,同时通过为每个输入提供不同压缩等级的样本,缓解过拟合问题。我们在ICPC中设计了一种一致性感知的位置选择方法,无需修改底层Transformer架构即可准确处理压缩后的输入。\n我们详细介绍了适配四种不同模态的基于压缩的增强方法:文本的非重要词剪枝、图像的分辨率调节、视频的时空分辨率调节,以及音频的频谱图尺寸调节。ICPC还支持高效的可变算力推理:先以高压缩等级对样本进行推理,对于更难处理的输入,再逐步降低压缩等级重新评估。在覆盖4种模态的9项不同任务上,ICPC将准确率最高提升了1%,同时将训练和推理速度分别最高提升了2.9倍和2.6倍。代码可在https://github.com/amrnag/ICPC 获取。

英文摘要:

Transformers have rapidly increased in popularity in recent years, achieving state-of-the-art performance in processing text, images, audio and video. However, Transformers present large computational requirements for both training and inference, and are prone to overfitting during training. To address these challenges, we present Input Compression with Positional Consistency (ICPC), a new data augmentation method that, unlike prior augmentation techniques, simultaneously improves both generalization and training efficiency. ICPC applies varying levels of compression to each training sample in each epoch. This leads to smaller input sequences being processed by the Transformer, and hence faster training, while also alleviating overfitting by presenting each input with different compression levels. We introduce a consistency-aware position selection method in ICPC that enables accurate processing of compressed inputs without any changes to the underlying Transformer architecture. We detail compression-based augmentation methods for four different modalities -- insignificant word pruning for text, resolution modulation for images, spatio-temporal resolution modulation for videos, and spectogram size modulation for audio. ICPC also enables efficient variable-effort inference, where samples are first inferred at high compression levels, and progressively re-evaluated with lower compression for more challenging inputs. On 9 diverse tasks spanning 4 different modalities, ICPC improves accuracy by up to 1%, while also accelerating training and inference by up to 2.9X and 2.6X, respectively. Code is available at https://github.com/amrnag/ICPC.

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

↑