arXiv:2507.05019cs.LGcs.AI2025-07

用小而精的领域数据训练模型,提升上下文学习泛化能力。

Meta-Learning Transformers to Improve In-Context Generalization

  • 基于元学习,用多个小规模领域数据集训练
  • 在未见领域上表现优于大杂烩数据集
  • 适合注重隐私与模块化的实际应用

上下文学习使Transformer模型仅通过输入提示即可泛化到新任务,无需权重更新。然而现有训练范式依赖大规模、无结构的数据集,存储成本高,质量难评估,且存在隐私和伦理风险。为此,我们提出一种新策略:利用多个小规模、领域特定的数据集。实证表明,此类数据的质量与多样性可显著提升上下文学习者的泛化能力,超越其训练领域的范围,同时性能媲美单一大规模数据集训练的模型。我们在Meta-Album数据集上通过元学习,在多种设置下验证该范式:首先在测试域完全排除于训练知识的受控环境中评估性能;其次探索持续学习场景中遗忘问题的鲁棒性;最后研究更具挑战性的无监督场景。结果表明,即使训练数据为精心挑选的集合,变压器仍能实现有效的上下文预测,且具备模块化与可替换优势。

原文摘要 · Abstract (English)

In-context learning enables transformer models to generalize to new tasks based solely on input prompts, without any need for weight updates. However, existing training paradigms typically rely on large, unstructured datasets that are costly to store, difficult to evaluate for quality and balance, and pose privacy and ethical concerns due to the inclusion of sensitive information. Motivated by these limitations and risks, we propose an alternative training strategy where we leverage a collection of multiple, small-scale, and domain-specific datasets. We empirically demonstrate that the increased quality and diversity of such data improve the generalization abilities of in-context learners beyond their training domain, while achieving comparable performance with models trained on a single large-scale dataset. We investigate this paradigm by leveraging meta-learning to train an in-context learner on the Meta-Album collection under several settings. Firstly, we show the performance in a controlled environment, where the test domain is completely excluded from the training knowledge. Secondly, we explore the robustness of these models to forgetting in a continual scenario where the information is accessible for a limited time. Finally, we explore the more challenging unsupervised scenario. Our findings demonstrate that transformers still generalize for in-context prediction when trained on a curated dataset collection while offering advantages in modularity and replaceability.

元学习上下文学习数据效率隐私保护

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