arXiv:2505.09855cs.LGcs.AI2025-05被引 1

揭示Transformer学习策略的进化机制:环境稳定则调参,环境多变则用上下文。

An evolutionary perspective on modes of learning in Transformers

  • 用环境稳定性与线索可靠性建模,模拟Transformer在不同场景下的学习策略选择。
  • 稳定环境更依赖参数更新(IWL),多变环境更依赖上下文调优(ICL)。
  • 策略切换由最优性与优化成本决定,适用于理解模型适应性设计。

Transformer的成功源于两种互补的学习策略:通过参数持续优化的权重内学习(IWL),以及利用激活中上下文信息进行瞬时推理调制的上下文学习(ICL)。进化生物学表明,环境在时间尺度上的可预测性决定了类似策略的适用程度。基因演化通过代际缓慢调整适应稳定环境;而环境波动则偏好可塑性,使单一基因型在一生中根据可靠线索表达不同特征。我们在控制任务(正弦回归与Omniglot分类)中量化环境稳定性与线索可靠性,研究其对Transformer学习的影响。结果发现:环境稳定时倾向于IWL,常出现显著性能跃迁;线索可靠时更倾向ICL,尤其在环境波动情况下。进一步分析显示,学习策略在ICL与IWL间存在任务依赖的动态转换,受策略在特定环境中的渐近最优性及获取该策略的优化成本双重影响,后者取决于任务结构与学习者的归纳偏置。

原文摘要 · Abstract (English)

The success of Transformers lies in their ability to improve inference through two complementary strategies: the permanent refinement of model parameters via in-weight learning (IWL), and the ephemeral modulation of inferences via in-context learning (ICL), which leverages contextual information maintained in the model's activations. Evolutionary biology tells us that the predictability of the environment across timescales predicts the extent to which analogous strategies should be preferred. Genetic evolution adapts to stable environmental features by gradually modifying the genotype over generations. Conversely, environmental volatility favors plasticity, which enables a single genotype to express different traits within a lifetime, provided there are reliable cues to guide the adaptation. We operationalize these dimensions (environmental stability and cue reliability) in controlled task settings (sinusoid regression and Omniglot classification) to characterize their influence on learning in Transformers. We find that stable environments favor IWL, often exhibiting a sharp transition when conditions are static. Conversely, reliable cues favor ICL, particularly when the environment is volatile. Furthermore, an analysis of learning dynamics reveals task-dependent transitions between strategies (ICL to IWL and vice versa). We demonstrate that these transitions are governed by (1) the asymptotic optimality of the strategy with respect to the environment, and (2) the optimization cost of acquiring that strategy, which depends on the task structure and the learner's inductive bias.

Transformer学习机制上下文学习

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