arXiv:2508.04461cs.LGcs.AI2025-08被引 1

小规模Transformer在任务切换中表现不佳,改进注意力机制后准确率提升至95%。

Small transformer architectures for task switching

  • 引入非平移不变的cisformer与广义注意力机制,突破传统Transformer局限
  • 标准模型在任务切换任务中准确率仅达中等水平,最高达95%且需特定组合
  • 适合研究注意力机制本质与轻量级模型设计的研究者

大规模生成式AI的快速发展主要依赖于注意力机制。然而,设计出能在小规模场景下超越传统方法(如多层感知机或循环网络)的注意力架构仍具挑战性。本文在任务切换框架下研究此问题:模型处理连续标记序列,当前任务由随机插入的控制标记决定。我们发现,标准Transformer无法解决基于有限域算术的基准任务(包含增量、加法、逆序复制和上下文任务,简称IARC)。标准Transformer、LSTM和普通MLP均表现相似且仅达到中等预测准确率。通过引入非平移不变的cisformer及广义注意力机制,发现后者组合可实现约95%的显著性能提升。结果表明,在任务切换设置下,比较不同注意力形式有助于更深入理解并优化注意力机制。

原文摘要 · Abstract (English)

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.

Transformer注意力机制任务切换轻量模型

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