机器学习(machine learning)是一个非常大的研究领域,其主要关注点在于如何利用历史数据进行学习。作为机器学习领域的从业者,在阅读文献时会遇到许多不同类型的学习范式:从整个研究领域到具体技术。因此,这篇文章全面地介绍下机器学习领域的不同学习范式和术语来解决机器学习领域的名词困惑,例如对比学习、自监督学习、半监督学习等等。

首先了解下机器学习与人工智能的关系,此类术语或者概念说明网上已经非常多不再赘述。

简单说明下机器学习和深度学习的主要区别:

  • 模型结构:一般深度学习基于深度神经网络架构较为复杂化;
  • 人工干预:传统机器学习需要人工构造特征但深度学习基于神经网络自动提取特征;
  • 数据量:深度学习需要大量的数据集来训练多层神经网络;
机器学习与深度学习

学习范式

机器学习主要的研究内容就是如何“学习”,因此学术圈提出了非常多的“学习”方法和范式,例如迁移学习、强化学习等。

目前机器学习领域的学习范式包含但不局限于以下几种:

  • 主流学习范式
    • 监督学习(Supervised Learning)
    • 无监督学习(Unsupervised Learning)
    • 强化学习(Reinforcement Learning)
  • 混合学习范式
    • 半监督学习(Semi-Supervised Learning)
    • 自监督学习(Self-Supervised Learning)
      • 对比式学习(Contrastive Learning)
      • 生成式学习(Generative Learning)
    • 多示例学习(Multi-Instance Learning)
  • 统计推断
    • 归纳学习(Inductive Learning)
    • 演绎推断(Deductive Inference)
    • 直推学习(Transductive Learning)
  • 学习技术
    • 多任务学习(Multi-Task Learning)
    • 主动学习(Active Learning)
    • 在线学习(Online Learning)
    • 迁移学习(Transfer Learning)
    • 集成学习(Ensemble Learning)

以上概括了 14 种学习范式及其技术,之前也零零散散写过篇介绍学习范式:理解直推式学习和归纳式学习,但感觉仍旧不太全面因此想系统性地学习并记录下。

主流学习范式

监督学习

Applications in which the training data comprises examples of the input vectors along with their corresponding target vectors are known as supervised learning problems. —— Page 3, Pattern Recognition and Machine Learning, 2006.

监督学习模型主要是根据标注数据对模型的输入和输出学习到一种映射关系,以此对测试数据集中的样本进行预测。

Our goal is to find a useful approximationf(x)f(x) to the functionf(x)f(x) that underlies the predictive relationship between the inputs and outputs. — Page 28, The Elements of Statistical Learning: Data Mining, Inference, and Prediction, 2nd edition, 2016.

监督学习模型主要可以划分为以下两种:

  • 分类(Classification):训练的模型主要用于预测类别标签,例如手写数字识别;
  • 回归(Regression):训练的模型主要用来预测数值,例如房价预测;

无监督学习

相比于监督学习,无监督学习仅依赖于无标签的数据训练模型来学习数据表征;

The goal in such unsupervised learning problems may be to discover groups of similar examples within the data, where it is called clustering, or to determine the distribution of data within the input space, known as density estimation, or to project the data from a high-dimensional space down to two or three dimensions for the purpose of visualization. — Page 3, Pattern Recognition and Machine Learning, 2006.

无监督学习主要包括以下任务:

  • 聚类(Clustering):对输入数据进行分组;
  • 密度估计(Density Estimation):学习输入数据的分布;
  • 可视化(Visualization):对数据简单进行统计或将高维数据映射到低维向量空间进行可视化;

强化学习

强化学习强调如何基于环境而行动,以取得最大化的预期利益。与监督学习不同的是,强化学习不需要带标签的输入输出对,同时也无需对非最优解的精确地纠正。其关注点在于寻找探索(对未知领域的)和利用(对已有知识的)的平衡。

Reinforcement learning is learning what to do — how to map situations to actions—so as to maximize a numerical reward signal. The learner is not told which actions to take, but instead must discover which actions yield the most reward by trying them. — Page 1, Reinforcement Learning: An Introduction, 2nd edition, 2018.

Google’s AlphaGo 是较为成功的强化学习案例。

一些主流的强化学习算法:

  • Q-learning
  • temporal-difference learning
  • deep reinforcement learning

混合学习范式

半监督学习

半监督学习主要以少量标签数据和大量无标签数据来训练模型。

In semi-supervised learning we are given a few labeled examples and must make what we can of a large collection of unlabeled examples. Even the labels themselves may not be the oracular truths that we hope for. — Page 695, Artificial Intelligence: A Modern Approach, 3rd edition, 2015.

半监督学习在实际场景中应用较多,因为实际生产中存在少量有标签和大量无标签的数据情况。

自监督学习

自监督学习主要是利用辅助任务(pretext)从大规模的无监督数据中挖掘自身的监督信息来提高学习表征的质量,通过这种构造监督信息对网络进行训练,从而可以学习到对下游任务具有价值的表征。

The self-supervised learning framework requires only unlabeled data in order to formulate a pretext learning task such as predicting context or image rotation, for which a target objective can be computed without supervision. — Revisiting Self-Supervised Visual Representation Learning, 2019.

自监督学习的模型主要分为对比方法生成方法

对比学习属于自监督学习,所以对比学习是没有标签的。对比学习是通过构造正负样例来学习特征。如何构造正负样例对对比学习来说很重要。对于一个输入样本xx 来说,存在与之相似的样本x+x^+以及与之不相似的样本xx^-,对比学习要做的就是学习一个编码器ff,这个编码器ff 能够拉近xx 与其正样本间的距离,推远xx 与其负样本之间的距离。

多示例学习

多示例学习属于监督学习。在多示例学习中,训练集由一组具有分类标签(label)的多示例包(bag)组成,每个多示例包(bag)含有若干个没有分类标签的示例(instance)。如果多示例包(bag)至少含有一个正示例(instance),则该包被标记为正类多示例包(正包)。如果多示例包的所有示例都是负示例,则该包被标记为负类多示例包(负包)。

In multi-instance learning, an entire collection of examples is labeled as containing or not containing an example of a class, but the individual members of the collection are not labeled. — Page 106, Deep Learning, 2016.

多示例学习的目的是,通过对具有分类标签的多示例包的学习,建立多示例分类器,并将该分类器应用于未知多示例包的预测。

统计推断

归纳学习

归纳是从“具体到一般”的过程,即从一些实例中总结规律的过程。例如给你一堆猫,给你一堆狗,然后你总结出如何区别猫和狗。

the problem of induction, which is the problem of how to draw general conclusions about the future from specific observations from the past. — Page 77, Machine Learning: A Probabilistic Perspective, 2012.

机器学习模型基于训练数据进行拟合是一个归纳法的过程。该模型是训练数据集中具体实例的一般化。

演绎学习

演绎学习是从“一般到特殊”的过程,即根据基础原理推演出具体情况。例如有了一套关于猫和狗的知识和规则,忽然来了个小动物,根据知识推理出这只小家伙是猫还是狗。

… the simple observation that induction is just the inverse of deduction! — Page 291, Machine Learning, 1997.

在机器学习背景下,归纳是基于训练数据来拟合模型,演绎是基于训练的模型来对测试数据进行推断。

直推学习

直推学习是同时使用训练样本和测试样本来训练模型,然后再次使用测试样本来测试模型效果,例如现在 GNN 中图节点分类中较为常见。

Induction, deriving the function from the given data. Deduction, deriving the values of the given function for points of interest. Transduction, deriving the values of the unknown function for points of interest from the given data. — Page 169, The Nature of Statistical Learning Theory, 1995.

学习技术

迁移学习

迁移学习是属于机器学习的一种研究领域。它专注于存储已有问题的解决模型,并将其利用在其他不同但相关问题上,例如现在的计算机视觉任务很多都是基于预训练的模型。

In transfer learning, the learner must perform two or more different tasks, but we assume that many of the factors that explain the variations in P1 are relevant to the variations that need to be captured for learning P2. — Page 536, Deep Learning, 2016.

迁移学习中同时包含很多中其它方法,如下图所示

learning methods

多任务学习

现在大多数机器学习任务都是单任务学习。多任务学习是把多个相关(related)的任务放在一起学习同时学习多个任务,属于迁移学习的一种类型。相关联的多任务学习比单任务学习能去的更好的泛化(generalization)效果。

Multi-task learning is a way to improve generalization by pooling the examples (which can be seen as soft constraints imposed on the parameters) arising out of several tasks. — Page 244, Deep Learning, 2016.

多任务学习的一个典型的例子:使用相同的单词嵌入来学习文本中的单词的分布式表示,然后这些单词在多个不同的自然语言处理监督学习任务中共享。

主动学习

主动学习是在大多数情况下,有类标的数据比较稀少而没有类标的数据是相当丰富的,但是对数据进行人工标注又非常昂贵,此时学习算法可以主动地提出一些标注请求,将一些经过筛选的数据提交给专家进行标注,因此需要一个外在的专业人员能够对其进行标注的实体,即主动学习是交互进行的。这个筛选过程是主动学习主要研究点。

Active learning: The learner adaptively or interactively collects training examples, typically by querying an oracle to request labels for new points. — Page 7, Foundations of Machine Learning, 2nd edition, 2018.

在线学习

在线学习指利用在线流式的数据来迭代训练模型,online learning包括了incremental learning和decremental learning等情况,描述的是一个动态学习的过程。前者是增量学习,每次学习一个或多个样本,这些训练样本可以全部保留、部分保留或不保留;后者是递减学习,即抛弃“价值最低”的保留的训练样本。与在线学习相对的是离线学习(offline learning)。

Traditionally machine learning is performed offline, which means we have a batch of data, and we optimize an equation […] However, if we have streaming data, we need to perform online learning, so we can update our estimates as each new data point arrives rather than waiting until “the end” (which may never occur). — Page 261, Machine Learning: A Probabilistic Perspective, 2012.

集成学习

集成学习是组合多个弱监督模型以得到一个更好更全面的强监督模型,集成学习潜在的思想是即便某一个弱分类器得到了错误的预测,其他的弱分类器也可以将错误纠正回来。

The field of ensemble learning provides many ways of combining the ensemble members’ predictions, including uniform weighting and weights chosen on a validation set. — Page 472, Deep Learning, 2016.

集成学习的主流方法包括:bagging,boosting 和 stacking 等。

在这篇文章中对机器学习中常用学习范式进行简单介绍和区分,后续再查漏补全。

Contact