注意力仅与其见证者相当:高阶层何时有益,何时无益 Attention Is Only as Good as Its Witnesses: When Higher-Order Layers Help, and When They Do Not 预印本

⚠️ 本文为 预印本(arXiv 公开版本),尚未经过正式同行评审。作者自发公开,结论未经期刊审稿验证,阅读时请知悉。
发布时间:2026-11-09
⬇️ 3 次下载
👁️ 预览文献
💡 AI 中文简介
这篇论文探讨了Transformer模型在图搜索和卡牌游戏SET上的学习失败原因。作者从逻辑和统计物理角度提出两个定律:深度定律指出L层注意力只能看到2^L-1步内的信息,大小定律则要求温度与边际的乘积至少为候选数的对数才能正确判断存在性。基于这些定律设计的传播器层在250个顶点的图上能回答所有深度的问题,且仅用18.6万参数就在CLRS-30的9/12图任务上匹敌或超越7300万参数的大模型。
领域机器学习/深度学习理论
适合谁读需要一定专业背景(深度学习、逻辑或统计物理基础)
核心贡献1. 提出注意力层的深度定律和大小定律,从逻辑和统计物理角度解释Transformer的局限性;2. 设计基于定律的传播器层,以极小参数量在多个任务上达到或超越大模型性能。
关键数据传播器层在49顶点图训练后泛化到250顶点图;指数牛顿法计算2-单纯形注意力softmax需3^d n次操作;18.6万参数模型在CLRS-30的9/12任务上匹敌至少7300万参数模型。
推荐理由想了解Transformer为何在某些任务上失败,以及如何用更小模型实现更强性能?这篇论文给出了理论解释和实用方案。
关键词["Transformer", "注意力机制", "高阶注意力", "图搜索", "逻辑深度", "统计物理"]

原文摘要

查看英文原文摘要

Transformers stop learning graph search as graphs grow, and learn the card game SET only after many distinct questions, although attention can represent both. We read these failures, and the uneven record of higher-order attention, from what a layer sums over: each layer we study computes the partition function of a family of witnesses and reads it at a temperature. Two laws follow. The depth law is a known result of logic, which we state for these layers: L layers over two-step walks reach exactly 2^L - 1 steps, just as a logical statement with L nested clauses of the form "there is a vertex such that" sees exactly that far. We build a construction that reaches this far, checked in Lean, and, when vertices carry no names, no such network reaches further. The size law is the cost of reading at a temperature, which logic does not have: existence is read correctly at every size, in the worst case, if and only if inverse temperature times margin is at least the logarithm of the number of candidates. Layers built on these laws, and on two principles that we test, learn where Transformers fail. One propagator layer trained on 49-vertex graphs answers every question at every search depth on 250-vertex graphs. Given the modulus 3, exponential Newton computes the softmax of 2-simplicial attention over pairs exactly in 3^d n operations for d clocks; with six clocks it learns SET from as few deals as 2-simplicial attention and transfers from 8- to 20-card tables. On CLRS-30 without hints, a 186,000-parameter block of OR-join and power-mean channels matches (within half a point) or beats a model of at least 73 million parameters on 9 of 12 graph tasks of the official test set, and on 8 of 12 with freshly drawn test graphs. The same account explains where pair layers did not help and where parallel layers must loop.