arXiv:2411.01958cs.LG2024-11被引 7

用n-gram注意力头提升上下文强化学习的稳定性和数据效率

N-Gram Induction Heads for In-Context RL: Improving Stability and Reducing Data Needs

  • 引入n-gram注意力机制增强模型上下文学习能力
  • 数据需求减少,训练对超参数更不敏感且性能接近算法蒸馏
  • 适合追求高效、稳定上下文强化学习的科研与工程人员

上下文学习使Transformer等模型能在不更新权重的情况下,仅通过少量示例适应新任务,这对强化学习极具吸引力。然而,现有方法如算法蒸馏(Algorithm Distillation, AD)需要大量精心筛选的数据,且因上下文学习能力的短暂性,训练不稳定且成本高。本文在Transformer中引入n-gram诱导头,通过整合n-gram注意力模式,显著降低了泛化所需数据量,并通过减少对超参数的敏感性,简化了训练过程。该方法在网格世界和像素级环境中达到甚至超越了AD的性能,表明n-gram诱导头可有效提升上下文强化学习的效率。

原文摘要 · Abstract (English)

In-context learning allows models like transformers to adapt to new tasks from a few examples without updating their weights, a desirable trait for reinforcement learning (RL). However, existing in-context RL methods, such as Algorithm Distillation (AD), demand large, carefully curated datasets and can be unstable and costly to train due to the transient nature of in-context learning abilities. In this work, we integrated the n-gram induction heads into transformers for in-context RL. By incorporating these n-gram attention patterns, we considerably reduced the amount of data required for generalization and eased the training process by making models less sensitive to hyperparameters. Our approach matches, and in some cases surpasses, the performance of AD in both grid-world and pixel-based environments, suggesting that n-gram induction heads could improve the efficiency of in-context RL.

强化学习上下文学习注意力机制模型效率

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