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

用于任务切换的小型Transformer架构

Small transformer architectures for task switching

Institute for Theoretical Physics(理论物理研究所);Goethe University Frankfurt(弗赖堡大学)

Claudius Gros

AI总结:

本研究探讨小型Transformer在任务切换中的性能,发现标准模型无法解决IARC任务,而cisformer结合广泛注意力能达到约95%的准确率,优于传统架构。

摘要:

大规模生成式人工智能的快速发展主要基于注意力机制。然而,构思出基于注意力的架构优于传统方法(如多层感知器或循环网络)的小规模应用并非易事。我们在“任务切换”的背景下研究这一问题。在该框架中,模型处理连续的令牌序列,当前任务由随机插入的控制令牌决定。我们证明,标准Transformer无法解决一个基于有限域算术的基本任务切换参考模型,该模型包含专门用于递增/加法/反向复制/上下文(IARC)的子任务。我们表明,Transformer、长短期记忆循环网络(LSTM)和普通多层感知器(MLP)实现了相似但仅适度的预测精度。我们通过纳入标准Transformer架构的扩展——非平移不变对应物cisformer,以及一种替代注意力机制——广泛注意力,来扩大我们的比较研究。我们发现,后两者的组合是唯一能够实现约95%的显著性能水平的模型。我们的结果表明,在任务切换设置中比较定性不同的公式时,可以更好地理解注意力机制的工作原理,甚至加以改进。

英文摘要:

The rapid progress seen in terms of large-scale generative AI is largely based on the attention mechanism. It is conversely non-trivial to conceive small-scale applications for which attention-based architectures outperform traditional approaches, such as multi-layer perceptrons or recurrent networks. We examine this problem in the context of 'task switching'. In this framework models work on ongoing token sequences with the current task being determined by stochastically interspersed control tokens. We show that standard transformers cannot solve a basic task switching reference model based on finite domain arithmetics which contains subtasks dedicated to increment / addition / reverse copy / context (IARC). We show that transformers, long short-term memory recurrent networks (LSTM), and plain multi-layer perceptrons (MLPs) achieve similar, but only modest prediction accuracies. We enlarge our comparative study by including an extension of the standard transformer architecture to its non-translational invariant counterpart, the cisformer, and an alternative attention mechanism, extensive attention. A combination of the latter is found to be the only model able to achieve considerable performance levels, of around 95%. Our results indicate that the workings of attention can be understood better, and even improved, when comparing qualitatively different formulations in task-switching settings.

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

↑