arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2606.16694cs.LGcs.AIphysics.app-phq-bio.NC
收藏

深度变换器中的自适应推理与函数向量

When Does Depth Matter For In-Context Learning? Adaptive Inference in Deep Transformers

Joseph Henry Laboratories of Physics, Princeton University(普林斯顿大学约瑟夫·亨利物理实验室)

Ravin Raj, Gautam Reddy

AI总结:

提出深度变换器作为平均场交互系统实现分布式推理的理论,利用函数向量逐层推断潜在上下文变量,在上下文回归任务中预测非高斯分层结构与深度的关系,并通过约束线性注意力变换器验证。

摘要:

变换器被广泛用作学习大量耦合变量间复杂相关性的通用基础架构,但其内部机制仍不明确。我们提出了一种深度变换器作为平均场交互系统的理论,该系统在通信、局部性和深度约束下实现分布式推理。我们证明,这样的系统可以利用内部状态表示(“函数向量”)在其层上以越来越精细的尺度推断潜在上下文变量。在上下文回归任务中,该理论预测了潜在上下文变量中的非高斯分层结构与变换器深度之间的非平凡关系。使用约束线性注意力变换器对预测进行了测试,并展示了深度架构中的自适应推理。前馈模块和深度使变换器能够实现比先前描述的更丰富的上下文学习算法类别。

英文摘要:

Transformers perform computations through many successive attention and feedforward blocks, allowing them to learn complex correlations between a large collection of coupled variables. When does stacking successive attention-feedforward computations over many layers provide a computational advantage over a single transformer block? We address this question by examining in-context learning in generalized linear attention transformers. We first introduce a general theory of distributed inference in such transformers, subject to constraints on communication and depth. We show that such systems can exploit internal representations (`function vectors') to infer a latent context variable at increasingly finer scales over its layers. For an in-context linear regression task, the theory predicts that while one-layer transformers without feedforward blocks are optimal for Gaussian priors over the context variable, multi-layer transformers are superior for non-Gaussian, tree-like priors. Trained linear attention transformers reproduce quantitative predictions from the theory. Using causal key-patching experiments, we verify that function vectors in intermediate layers mediate adaptive routing of information. Our results suggest that depth and feedforward blocks enable transformers to implement adaptive inference, and this is advantageous when the distribution over latent variables has hierarchical structure.

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

↑