arXivDaily arXiv每日学术速递 周一至周五更新
arXiv周末暂无论文更新,休息一下吧,周末愉快~~
arXiv 2604.12151cs.LGcond-mat.dis-nncond-mat.stat-mech
收藏

transformers中不同机制 underlying in-context learning

Distinct mechanisms underlying in-context learning in transformers

Lewis-Sigler Institute for Integrative Genomics, Princeton University, Princeton, NJ 08544, USA(整合基因组学研究所,普林斯顿大学,新泽西州普林斯顿,08544,美国);Department of Physics, Princeton University, Princeton, NJ 08544, USA(物理学系,普林斯顿大学,新泽西州普林斯顿,08544,美国)

Cole Gibson, Wenping Cui, Gautam Reddy

AI总结:

研究揭示transformers在in-context learning中通过不同机制实现记忆与泛化,基于数据多样性K确定相变边界。

摘要:

现代分布式网络,特别是transformers,能够通过in-context learning适应输入统计特性,使固定网络可应用于多种系统。本文对transformers在有限离散马尔可夫链S上训练的行为进行完整机制分析,发现四个算法阶段,由记忆与泛化能力及1点或2点统计使用决定。通过多层子电路实现两种不同机制,最小模型隔离关键特征。记忆与泛化阶段由数据多样性K决定,K1*由子电路竞争决定,K2*由表征瓶颈决定。对transformer训练动态的对称约束理论解释了1点到2点泛化的尖锐转变,并识别了损失景观的关键特征,使网络能够泛化。

英文摘要:

Modern distributed networks, notably transformers, acquire a remarkable ability (termed `in-context learning') to adapt their computation to input statistics, such that a fixed network can be applied to data from a broad range of systems. Here, we provide a complete mechanistic characterization of this behavior in transformers trained on a finite set $S$ of discrete Markov chains. The transformer displays four algorithmic phases, characterized by whether the network memorizes and generalizes, and whether it uses 1-point or 2-point statistics. We show that the four phases are implemented by multi-layer subcircuits that exemplify two qualitatively distinct mechanisms for implementing context-adaptive computations. Minimal models isolate the key features of both motifs. Memorization and generalization phases are delineated by two boundaries that depend on data diversity, $K = |S|$. The first ($K_1^\ast$) is set by a kinetic competition between subcircuits and the second ($K_2^\ast$) is set by a representational bottleneck. A symmetry-constrained theory of a transformer's training dynamics explains the sharp transition from 1-point to 2-point generalization and identifies key features of the loss landscape that allow the network to generalize. Put together, we show that transformers develop distinct subcircuits to implement in-context learning and identify conditions that favor certain mechanisms over others.

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

↑