Skip to main content
QUICK REVIEW

[论文解读] Inductive Conformal Prediction: A Straightforward Introduction with Examples in Python

Martim Sousa|arXiv (Cornell University)|Jun 23, 2022
Explainable Artificial Intelligence (XAI)被引用 6
一句话总结

本文提出归纳 conformal 预测(ICP),这是一种无需分布假设、与模型无关的方法,可生成具有保证覆盖概率的预测区间或集合。其方法为:在训练集上训练模型,计算校准集上的非符合性得分,并利用这些得分的分位数形成置信集合;其主要贡献在于提供了一套实用、面向实践的教程,配合 Python 示例,演示 ICP 在回归与分类任务中的应用,使用波士顿房价和 CIFAR-10 等真实数据集。

ABSTRACT

Inductive Conformal Prediction (ICP) is a set of distribution-free and model agnostic algorithms devised to predict with a user-defined confidence with coverage guarantee. Instead of having point predictions, i.e., a real number in the case of regression or a single class in multi class classification, models calibrated using ICP output an interval or a set of classes, respectively. ICP takes special importance in high-risk settings where we want the true output to belong to the prediction set with high probability. As an example, a classification model might output that given a magnetic resonance image a patient has no latent diseases to report. However, this model output was based on the most likely class, the second most likely class might tell that the patient has a 15% chance of brain tumor or other severe disease and therefore further exams should be conducted. Using ICP is therefore way more informative and we believe that should be the standard way of producing forecasts. This paper is a hands-on introduction, this means that we will provide examples as we introduce the theory.

研究动机与目标

  • 介绍归纳 conformal 预测(ICP)作为一种无需分布假设、与模型无关的机器学习不确定性量化方法。
  • 通过提供具有保证统计覆盖的预测区间或集合,弥补点预测的局限性。
  • 展示 ICP 如何通过提供比单一类别或点估计更丰富的输出,提升高风险应用场景中的决策质量。
  • 比较不同非符合性得分策略——朴素法、类别平衡法与自适应预测集法——以提升分类任务中的校准性与自适应能力。
  • 提供基于代码的实用教程,使用 scikit-learn 和 Keras 在真实数据集上实现 ICP,推动其在真实场景中的应用。

提出的方法

  • 将数据集划分为三个互不相交的子集:训练集(50%)、校准集(25%)和验证集(25%),以确保独立性。
  • 在训练集上训练机器学习模型,以生成对校准集和验证集的预测。
  • 定义非符合性得分函数 s(x, y) 以量化预测误差或不确定性;对于回归任务,s(x, y) = |f(x) - y|;对于分类任务,s(x, y) = 1 - f(x)_y。
  • 计算校准集上非符合性得分的 (1−α) 分位数,以确定阈值 q̂,从而保证边际覆盖。
  • 构建预测集 C(x_val),使其为区间或类别集合,使得 y_val ∈ C(x_val) 的概率至少为 1−α。
  • 对于自适应预测集,按置信度从高到低排序累积 softmax 概率,依次包含类别,直到累积和超过 q̂。

实验结果

研究问题

  • RQ1如何在回归与分类任务中应用归纳 conformal 预测,以生成具有保证边际覆盖的预测集?
  • RQ2在覆盖率与集合大小方面,朴素法、类别平衡法与自适应非符合性得分函数之间存在哪些实际差异?
  • RQ3非符合性得分函数的选择如何影响真实应用场景中预测集的大小与信息量?
  • RQ4ICP 在不同类别上(尤其是类别不平衡设置下)的覆盖性能如何?如何改进?
  • RQ5是否可以使用标准机器学习框架(如 scikit-learn 和 Keras)以极少的代码量在实践中有效实现 conformal 预测?

主要发现

  • 在回归任务中,朴素方法在 α=0.1 时实现了 90% 的覆盖率,证明了该方法生成有效预测区间的可行性。
  • 在分类任务中,朴素方法在 α=0.1 时实现了 88.18% 的验证覆盖率,确认了边际覆盖保证,尽管存在类别间差异。
  • 类别平衡方法提升了各类别间覆盖的一致性,减少了朴素方法中观察到的过度覆盖与覆盖不足问题。
  • 自适应预测集(APS)方法在 α=0.1 时实现了 90.44% 的验证覆盖率,表明其通过基于累积置信度的策略实现了更好的自适应性。
  • APS 生成的预测集比朴素方法更大,反映出其在捕捉不确定性方面更全面的能力,尤其适用于模糊输入。
  • 通过 T=100 次试验的实证验证表明,经验覆盖分布与理论 Beta(n_cal+1−l, l) 分布高度吻合,证实了 ICP 实现的正确性。

更好的研究,从现在开始

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

无需绑定信用卡

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