用环形循环结构减少参数量,同时保持Transformer高性能。
RingFormer: Rethinking Recurrent Transformer with Adaptive Level Signals
- 单层Transformer循环处理输入,通过低秩矩阵生成自适应信号
- 参数量显著降低,翻译与图像分类任务性能接近原版Transformer
- 适合追求轻量化模型的开发者和资源受限场景
Transformer在处理序列数据方面取得巨大成功,其由多个注意力与前馈块组成的架构可并行建模序列元素间的关系,训练高效且建模能力强。然而,与RNN、CNN等架构相比,其参数规模较大。为此,已有研究尝试在Transformer中引入参数共享与循环机制以缓解计算压力,但性能常难以媲美原始模型。本文提出RingFormer,采用单个Transformer层以环形循环方式反复处理输入,并利用低秩矩阵生成依赖输入的层级信号。该设计大幅减少模型参数,同时在机器翻译与图像分类等任务上保持高精度,实验验证了其有效性。
原文摘要 · Abstract (English)
Transformers have achieved great success in effectively processing sequential data such as text. Their architecture consisting of several attention and feedforward blocks can model relations between elements of a sequence in parallel manner, which makes them very efficient to train and effective in sequence modeling. Even though they have shown strong performance in processing sequential data, the size of their parameters is considerably larger when compared to other architectures such as RNN and CNN based models. Therefore, several approaches have explored parameter sharing and recurrence in Transformer models to address their computational demands. However, such methods struggle to maintain high performance compared to the original transformer model. To address this challenge, we propose our novel approach, RingFormer, which employs one Transformer layer that processes input repeatedly in a circular, ring-like manner, while utilizing low-rank matrices to generate input-dependent level signals. This allows us to reduce the model parameters substantially while maintaining high performance in a variety of tasks such as translation and image classification, as validated in the experiments.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。