arXiv:2607.17624cs.LG2026-07被引 2

通过数据驱动优化变换器结构,发现特定任务更优的模型设计。

Can Transformers Really Do It All? On the Compatibility of Inductive Biases Across Tasks

论文配图:Can Transformers Really Do It All? On the Compatibility of Inductive Biases Across Tasks
图 1 · 摘自论文原文
  • 用可学习函数替代Transformer中的非线性层,针对数据定制架构。
  • 在算法任务上显著提升学习速度与泛化能力,但跨任务迁移差。
  • 代码与语言任务中改进较小但迁移性强,暗示通用性能有提升空间。

Transformer结构在多种应用中表现出色,但其是否为特定任务的最优设计仍存疑。本文提出一种方法:将关键非线性单元(GeLU、softmax)替换为在预留数据上学习得到的函数,从而优化特定数据集的Transformer架构,并以此研究任务间的归纳偏置兼容性。在算法类玩具任务中,新架构显著提升学习速度、分布内/外泛化能力及训练稳定性,但高度任务特异,表明其所需归纳偏置与标准Transformer差异显著。在代码和语言建模数据集上,也发现了稳定但幅度较小的性能提升,且新架构在不同数据集和领域间(如英语与代码)具备更强迁移能力。结果表明,标准Transformer在架构空间中极少处于局部最优;简单替代方案可大幅提升性能,但牺牲通用性。这提示存在更优架构,能同时支持流畅生成与稳健推理等多重能力。

原文摘要 · Abstract (English)

Transformers are remarkably versatile and their design is largely consistent across a variety of applications. But are they optimal for any given task or dataset? The answer may be key for pushing AI beyond merely scaling current designs. *Method.* We present a method to optimize a transformer architecture for a given dataset, which we use as a tool to study optimal task-specific inductive biases. This method replaces the most important non-linearities (GeLUs,;softmax) with functions learned on held-out data. We then train the resulting architectures on other datasets, as a way to evaluate the compatibility between pairs of tasks. Findings. On algorithmic toy tasks, we identify new architectures with dramatic improvements in learning speed, in- and out-of-distribution generalization, and stability across seeds. The new designs prove very task-specific however, and indicate that these tasks require inductive biases very different from those of standard transformers. On code and language modeling datasets, we also find architectures with consistent, yet smaller improvements. These designs transfer much better across datasets and domains (English & computer code). Implications. Our results show that standard transformers are rarely a local optimum in the space of architectures. Simple alternatives can perform much better but sacrifice universality. This suggests that there may be room for improved architectures that better support multiple capabilities simultaneously, such as fluency and robust reasoning.

Transformer架构优化归纳偏置迁移能力

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