LLM Reasoning 相关度: 8/10

Layerwise Dynamics for In-Context Classification in Transformers

Patrick Lutz, Themistoklis Haris, Arjun Chandra, Aditya Gangrade, Venkatesh Saligrama
arXiv: 2604.11613v1 发布: 2026-04-13 更新: 2026-04-13

AI 摘要

论文研究了Transformer在上下文分类中的层级动态,揭示了其内部涌现的更新规则。

主要贡献

  • 提出了深度索引递归的显式更新规则
  • 揭示了特征标签Gram结构驱动的注意力矩阵
  • 发现了geometry-driven的算法主题

方法论

通过强制特征和标签置换等变性,使Transformer的计算可识别,提取层级递归更新规则。

原文摘要

Transformers can perform in-context classification from a few labeled examples, yet the inference-time algorithm remains opaque. We study multi-class linear classification in the hard no-margin regime and make the computation identifiable by enforcing feature- and label-permutation equivariance at every layer. This enables interpretability while maintaining functional equivalence and yields highly structured weights. From these models we extract an explicit depth-indexed recursion: an end-to-end identified, emergent update rule inside a softmax transformer, to our knowledge the first of its kind. Attention matrices formed from mixed feature-label Gram structure drive coupled updates of training points, labels, and the test probe. The resulting dynamics implement a geometry-driven algorithmic motif, which can provably amplify class separation and yields robust expected class alignment.

标签

Transformers In-context learning Interpretability Classification

arXiv 分类

cs.LG cs.AI