Skip to main content
QUICK REVIEW

[论文解读] General-Purpose In-Context Learning by Meta-Learning Transformers

Louis Kirsch, J. Harrison|arXiv (Cornell University)|Dec 8, 2022
Machine Learning and Data Classification被引用 6
一句话总结

该论文提出了一种通用的少样本元学习框架GPICL,其中Transformer模型通过元训练学习多种任务,而无需显式定义损失函数或优化算法。通过扩大模型规模和任务多样性,该方法实现了从记忆到泛化的转变,其性能瓶颈在于可访问的内存大小而非参数量,从而在MNIST、Fashion-MNIST和CIFAR10等数据集上实现了零样本泛化。

ABSTRACT

Modern machine learning requires system designers to specify aspects of the learning pipeline, such as losses, architectures, and optimizers. Meta-learning, or learning-to-learn, instead aims to learn those aspects, and promises to unlock greater capabilities with less manual effort. One particularly ambitious goal of meta-learning is to train general-purpose in-context learning algorithms from scratch, using only black-box models with minimal inductive bias. Such a model takes in training data, and produces test-set predictions across a wide range of problems, without any explicit definition of an inference model, training loss, or optimization algorithm. In this paper we show that Transformers and other black-box models can be meta-trained to act as general-purpose in-context learners. We characterize transitions between algorithms that generalize, algorithms that memorize, and algorithms that fail to meta-train at all, induced by changes in model size, number of tasks, and meta-optimization. We further show that the capabilities of meta-trained algorithms are bottlenecked by the accessible state size (memory) determining the next prediction, unlike standard models which are thought to be bottlenecked by parameter count. Finally, we propose practical interventions such as biasing the training distribution that improve the meta-training and meta-generalization of general-purpose in-context learning algorithms.

研究动机与目标

  • 开发一种无需显式架构或优化设计的通用少样本元学习系统,通过示范进行学习。
  • 研究类似Transformer的黑箱模型在何种条件下能够元训练出可泛化的学习算法。
  • 识别决定少样本元学习中从记忆到泛化转变的关键因素,如模型规模、任务数量和元优化策略。
  • 探讨内存容量(状态大小)相较于参数量,如何限制元训练的少样本学习者的能力。
  • 提出实用干预措施,如通过有偏数据分布实现课程学习,以提升元泛化能力。

提出的方法

  • 使用基于Transformer的架构,端到端训练模型,将输入示范(支持集)映射到测试预测,而无需明确定义损失函数或优化器。
  • 在来自真实数据集(如MNIST、CIFAR10)的多样化任务分布上进行元训练,每个任务被定义为少样本分类问题。
  • 模型通过关注(x_i, y_i)对的输入序列并为查询x'预测y',从而模仿少样本学习,实现跨任务泛化。
  • 该方法采用黑箱、序列到序列的学习范式,模型的内部状态作为学习的动态内存。
  • 通过在元训练分布上使用标准反向传播进行元优化,超参数经过调优以提升泛化能力。
  • 实用干预措施包括通过有偏数据分布实现课程学习,以及精心选择优化器和学习率以稳定元训练过程。

实验结果

研究问题

  • RQ1在元训练过程中,黑箱Transformer在何种条件下会从记忆任务转变为在多样化数据集上实现泛化?
  • RQ2模型规模在元训练模型中如何影响通用少样本元学习能力的出现?
  • RQ3元训练的少样本元学习算法的性能在多大程度上受限于可访问内存(状态大小)而非参数量?
  • RQ4通过有偏数据分布或优化元优化等干预措施,能否提升通用少样本元学习中的元泛化能力?
  • RQ5元训练的少样本元学习算法在不同神经网络架构和输入/输出规模下的能力如何扩展?

主要发现

  • 从任务记忆到泛化的转变发生在大规模模型和大量元训练任务的范围内,观察到明显的算法阶段。
  • 元训练的少样本元学习算法受可访问内存(隐藏状态大小)的限制,而非总参数量,表明内存容量是关键约束。
  • 在元训练中具备足够规模和多样性时,模型在MNIST、Fashion-MNIST和CIFAR10等数据集上实现了零样本泛化。
  • 在元训练中使用有偏数据分布可作为课程学习,显著提升元泛化性能。
  • 元优化稳定性至关重要:次优的超参数或优化器会导致元训练失败或泛化能力差。
  • 该方法能够发现可在一个黑箱模型中同时结合领域特定学习与通用学习的通用学习算法。

更好的研究,从现在开始

从阅读论文到最终审阅,大幅缩短您的研究时间。

无需绑定信用卡

本解读由 AI 生成,并经人工编辑审核。