ICML23 - Synthetic Data for Model Selection

2024-03-02 04:04

本文主要是介绍ICML23 - Synthetic Data for Model Selection,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

前言

如果你对这篇文章感兴趣,可以点击「【访客必读 - 指引页】一文囊括主页内所有高质量博客」,查看完整博客分类与对应链接。

本文关注的问题为:是否可以使用合成数据(Synthetic Data)用于模型选择?即不再划分验证集,而是将所有标记数据作为训练集,使用训练集生成的合成数据来挑选模型。

本文中关注的「模型选择」,是指根据训练集训练得到的多个模型(不同网络架构,不同超参等)的选择。

本文的整体行文逻辑为:

  • 首先给出包含 insight 的理论;
  • 随后用大量的实验说明:使用合成数据挑选模型是有效的。

Synthetic Data for Model Selection

本文首先定义了一个统计量 Δ ϵ \Delta \epsilon Δϵ,其具体定义如下:

Lemma 3.1. Let Δ ϵ \Delta \epsilon Δϵ denote the risk difference between two hypotheses, h 1 , h 2 ∈ H h_1, h_2 \in \mathcal{H} h1,h2H, measured over a probability distribution D = ⟨ Ω , μ ⟩ \mathcal{D}=\langle\Omega, \mu\rangle D=Ω,μ, i.e., Δ ϵ = \Delta \epsilon= Δϵ= ϵ ( h 2 ) − ϵ ( h 1 ) \epsilon\left(h_2\right)-\epsilon\left(h_1\right) ϵ(h2)ϵ(h1). Let f f f denote the labeling function. Let Ω 1 = { x ∈ Ω ∣ h 1 ( x ) ≠ f ( x ) ∧ h 2 ( x ) = f ( x ) } \Omega_1=\left\{\mathbf{x} \in \Omega \mid h_1(\mathbf{x}) \neq f(\mathbf{x}) \wedge h_2(\mathbf{x})=f(\mathbf{x})\right\} Ω1={xΩh1(x)=f(x)h2(x)=f(x)} and Ω 2 = \Omega_2= Ω2= { x ∈ Ω ∣ h 2 ( x ) ≠ f ( x ) ∧ h 1 ( x ) = f ( x ) } \left\{\mathbf{x} \in \Omega \mid h_2(\mathbf{x}) \neq f(\mathbf{x}) \wedge h_1(\mathbf{x})=f(\mathbf{x})\right\} {xΩh2(x)=f(x)h1(x)=f(x)}. Then,
Δ ϵ = ∫ Ω 2 μ ( x ) d x − ∫ Ω 1 μ ( x ) d x . \Delta \epsilon=\int_{\Omega_2} \mu(\mathbf{x}) d \mathbf{x}-\int_{\Omega_1} \mu(\mathbf{x}) d \mathbf{x} . Δϵ=Ω2μ(x)dxΩ1μ(x)dx.

简单讲,现在有两个模型 h 1 h_1 h1 h 2 h_2 h2,任务分布 D \mathcal{D} D 上的 Ground truth 为 f f f,则 Δ ϵ \Delta \epsilon Δϵ 刻画了「 h 2 h_2 h2 D \mathcal{D} D 上的准确率 - h 1 h_1 h1 D \mathcal{D} D 上的准确率」 。因此如果 Δ ϵ ≥ 0 \Delta \epsilon\geq 0 Δϵ0,则应选择模型 h 2 h_2 h2

根据上述统计量,可推出下述定理:

Theorem 3.2. Let Δ ϵ r \Delta \epsilon_r Δϵr and Δ ϵ s \Delta \epsilon_s Δϵs denote the risk difference between two hypotheses, h 1 , h 2 ∈ H h_1, h_2 \in \mathcal{H} h1,h2H, measured over the real and the synthetic probability distributions D r = ( Ω , μ r ) \mathcal{D}_r=\left(\Omega, \mu_r\right) Dr=(Ω,μr) and D s = ( Ω , μ s ) \mathcal{D}_s=\left(\Omega, \mu_s\right) Ds=(Ω,μs), respectively, i.e., Δ ϵ r = \Delta \epsilon_r= Δϵr= ϵ r ( h 2 ) − ϵ r ( h 1 ) \epsilon_r\left(h_2\right)-\epsilon_r\left(h_1\right) ϵr(h2)ϵr(h1) and Δ ϵ s = ϵ s ( h 2 ) − ϵ s ( h 1 ) \Delta \epsilon_s=\epsilon_s\left(h_2\right)-\epsilon_s\left(h_1\right) Δϵs=ϵs(h2)ϵs(h1). Let f f f denote the labeling function. Then, for any h 1 , h 2 ∈ H h_1, h_2 \in \mathcal{H} h1,h2H :
Δ ϵ s − Δ ϵ r ≤ δ h 1 ⊕ h 2 ( μ r , μ s ) , \Delta \epsilon_s-\Delta \epsilon_r \leq \delta_{h_1 \oplus h_2}(\mu_r, \mu_s), ΔϵsΔϵrδh1h2(μr,μs),where δ h 1 ⊕ h 2 \delta_{h_1 \oplus h_2} δh1h2 is the total variation computed over the subset of the domain Ω \Omega Ω, where the hypotheses h 1 h_1 h1 and h 2 h_2 h2 do not agree.

具体证明如下:
Δ ϵ s − Δ ϵ r = ∫ Ω 2 μ s ( x ) d x − ∫ Ω 1 μ s ( x ) d x − ∫ Ω 2 μ r ( x ) d x + ∫ Ω 1 μ r ( x ) d x = ∫ Ω 2 μ s ( x ) − μ r ( x ) d x − ∫ Ω 1 μ s ( x ) − μ r ( x ) d x ≤ ∫ Ω 2 ∣ μ s ( x ) − μ r ( x ) ∣ d x + ∫ Ω 1 ∣ μ s ( x ) − μ r ( x ) ∣ d x = ∫ Ω 1 ∪ Ω 2 ∣ μ s ( x ) − μ r ( x ) ∣ d x ≤ δ h 1 ⊕ h 2 ( μ r , μ s ) \begin{aligned} \Delta \epsilon_s- \Delta \epsilon_r & = \int_{\Omega_2} \mu_s(\mathbf{x}) d \mathbf{x}-\int_{\Omega_1} \mu_s(\mathbf{x}) d \mathbf{x} -\int_{\Omega_2} \mu_r(\mathbf{x}) d \mathbf{x}+\int_{\Omega_1} \mu_r(\mathbf{x}) d \mathbf{x} \\ &= \int_{\Omega_2} \mu_s(\mathbf{x})-\mu_r(\mathbf{x}) d \mathbf{x}-\int_{\Omega_1} \mu_s(\mathbf{x})-\mu_r(\mathbf{x}) d \mathbf{x} \\ & \leq \int_{\Omega_2}\left|\mu_s(\mathbf{x})-\mu_r(\mathbf{x})\right| d \mathbf{x}+\int_{\Omega_1}\left|\mu_s(\mathbf{x})-\mu_r(\mathbf{x})\right| d \mathbf{x} \\ &= \int_{\Omega_1 \cup \Omega_2}\left|\mu_s(\mathbf{x})-\mu_r(\mathbf{x})\right| d \mathbf{x} \\ & \leq \delta_{h_1 \oplus h_2}(\mu_r, \mu_s) \end{aligned} ΔϵsΔϵr=Ω2μs(x)dxΩ1μs(x)dxΩ2μr(x)dx+Ω1μr(x)dx=Ω2μs(x)μr(x)dxΩ1μs(x)μr(x)dxΩ2μs(x)μr(x)dx+Ω1μs(x)μr(x)dx=Ω1Ω2μs(x)μr(x)dxδh1h2(μr,μs)

上述定理想刻画 Δ ϵ r \Delta \epsilon_r Δϵr(真实数据分布上模型 h 1 h_1 h1 h 2 h_2 h2 的性能排序) 和 Δ ϵ s \Delta \epsilon_s Δϵs(合成数据分布上模型性能排序)之间的关系,并说明:

  • 使用合成数据对模型进行排名的能力仅取决于在模型分歧区域内合成数据分布和真实数据分布之间的概率密度差距 δ h 1 ⊕ h 2 ( μ r , μ s ) \delta_{h_1 \oplus h_2}(\mu_r, \mu_s) δh1h2(μr,μs).
  • 原文:The ability to use synthetic data for ranking models depends only on the probability density gap between the synthetic and real distribution in the area of disagreement, δ h 1 ⊕ h 2 ( μ r , μ s ) \delta_{h_1 \oplus h_2}(\mu_r, \mu_s) δh1h2(μr,μs).

根据上述定理可以得到下述推论:

  • Δ ϵ s ≥ δ ( μ r , μ s ) \Delta \epsilon_s\geq \delta(\mu_r,\mu_s) Δϵsδ(μr,μs) 时,可以得到 Δ ϵ r ≥ 0 \Delta \epsilon_r\geq 0 Δϵr0,其中 δ ( μ r , μ s ) \delta(\mu_r,\mu_s) δ(μr,μs) 为真实分布和合成分布之间的全变差 (Total variation)。

换句话说,只要 Δ ϵ s ≥ δ ( μ r , μ s ) \Delta \epsilon_s\geq \delta(\mu_r,\mu_s) Δϵsδ(μr,μs),则真实分布和合成分布上的模型排序,是一致的。即:

  • 如果模型 h 1 h_1 h1 h 2 h_2 h2 在合成分布上的准确率差距「大于」合成分布与真实分布之间的差距,则使用合成分布进行模型选择是有效的。

Synthetic Dataset Calibration

为了使合成分布和真实分布更为接近,本文在实验部分提出了一种「合成数据集校正的方法」,即选出一组模型,首先得到这组模型在训练数据中各类别上的经验损失 ϵ ^ r c \hat{\epsilon}_r^c ϵ^rc(假设为类别 c c c),随后再得到模型对合成数据上各数据的预测损失 Q c \mathbf{Q}_c Qc(0 为正确,1 为错误)。

随后对合成数据中各数据点进行加权,并求解下式得到样本权重:
w c = argmin ⁡ w { ∥ ϵ ^ r c − Q c T w ∥ 2 2 + λ ∥ w ∥ 2 2 } . \mathbf{w}_c=\underset{\mathbf{w}}{\operatorname{argmin}}\left\{\left\|\hat{\epsilon}_r^c-\mathbf{Q}_c{ }^T \mathbf{w}\right\|_2^2+\lambda\|\mathbf{w}\|_2^2\right\}. wc=wargmin{ ϵ^rcQcTw 22+λw22}.

更通用的做法一般是对数据进行加权,然后优化加权后的合成数据和训练数据之间的分布差距,不知道和上述这种做法对比,差距如何。


Experiments

这篇文章主要还是以实验为主,感兴趣的话可以直接去原论文看,此处列举一些主要的实验结果。

  1. 「使用合成数据挑模型」vs「使用验证集挑」,前者效果更好:
    在这里插入图片描述
  2. 训练集比较小的时候,「合成数据上的误差」和「测试集上的误差」相关性更强:
    • 文中的分析:训练集小导致 Δ ϵ s \Delta \epsilon_s Δϵs 更大, Δ ϵ s ≥ δ ( μ r , μ s ) \Delta \epsilon_s\geq \delta(\mu_r,\mu_s) Δϵsδ(μr,μs) 更易满足。

在这里插入图片描述
3. 不同数据生成模型,得到的效果差别也很大:
在这里插入图片描述


参考资料

  • ICML23 - Synthetic Data for Model Selection

这篇关于ICML23 - Synthetic Data for Model Selection的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/764856

相关文章

Python利用qq邮箱发送通知邮件(已封装成model)

因为经常喜欢写一些脚本、爬虫之类的东西,有需要通知的时候,总是苦于没有太好的通知方式,虽然邮件相对于微信、短信来说,接收性差了一些,但毕竟免费,而且支持html直接渲染,所以,折腾了一个可以直接使用的sendemail模块。这里主要应用的是QQ发邮件,微信关注QQ邮箱后,也可以实时的接收到消息,肾好! 好了,废话不多说,直接上代码。 # encoding: utf-8import lo

BD错误集锦3——ERROR: Can't get master address from ZooKeeper; znode data == null

hbase集群没启动,傻子!   启动集群 [s233 s234 s235]启动zk集群 $>zkServer.sh start $>zkServer.sh status   [s233] 启动dfs系统 $>start-dfs.sh 如果s237 namenode启动失败,则 [s237] $>hadoop-daemon.sh start namenode [s233]启动yarn集群

游戏高度可配置化(一)通用数据引擎(data-e)及其在模块化游戏开发中的应用构想图解

游戏高度可配置化(一)通用数据引擎(data-e)及其在模块化游戏开发中的应用构想图解 码客 卢益贵 ygluu 关键词:游戏策划 可配置化 模块化配置 数据引擎 条件系统 红点系统 一、前言 在插件式模块化软件开发当中,既要模块高度独立(解耦)又要共享模块数据,最好的方法是有个中间平台(中间件)提供标准的接口来进行数据的交换,这在很多行业软件开发中已经广泛应用。但是,由于中间件的抽象和封

▶《强化学习的数学原理》(2024春)_西湖大学赵世钰 Ch5 蒙特卡洛方法【model-based ——> model-free】

PPT 截取必要信息。 课程网站做习题。总体 MOOC 过一遍 1、视频 + 学堂在线 习题 2、 过 电子书 是否遗漏 【下载:本章 PDF GitHub 页面链接 】 【第二轮 才整理的,忘光了。。。又看了一遍视频】 3、 过 MOOC 习题 看 PDF 迷迷糊糊, 恍恍惚惚。 学堂在线 课程页面链接 中国大学MOOC 课程页面链接 B 站 视频链接 PPT和书籍下载网址: 【Gi

Core Data 网络应用实例

转自:http://www.cocoachina.com/applenews/devnews/2014/0430/8275.html 转自 answer_huang的博客 几乎每一个应用开发者都需要经历的就是将从 web service 获取到的数据转变到 Core Data 中。这篇文章阐述了如何去做。我们在这里讨论的每一个问题在之前的文章中都已经描述过了,并且 Apple 在

spring-data-redis 连接池应用

具体配置看我的项目。用的是redisTemplate ,和jdbctemplate  是不是很相似。 真的不想吐槽csdn,钻钱眼里了,我想上传我的代码,免费都不行吗 想要测试代码可以私信,也可以模仿https://www.cnblogs.com/tankaixiong/p/3660075.html  这个链接下的。

QuantML-Qlib Model | Kansformer: KAN+Transformer时序模型用于股票收益率预测

QuantML-Qlib Model | Kansformer: KAN+Transformer时序模型用于股票收益率预测 原创 QuantML QuantML 2024-06-18 20:57 上海 Content 之前公众号介绍了几篇KAN的文章,也做过KAN相关的模型: What KAN I say?KAN代码全解析 QuantML-Qlib开发版 | 最新神经网络结构KAN用于因

Windows 内核驱动无法使用 __DATA__、__TIME__、__TIMESTAMP__ 解决方法

项目 -> 属性 -> Driver Settings -> Driver Model -> Allow Date, Time and Timestamp -> Yes。 感谢单总的解答和这篇文章:https://developercommunity.visualstudio.com/content/problem/186922/-timestamp-macro-not-defined-in-r

Stable Diffusion Model网站

Civitai Models | Discover Free Stable Diffusion Modelshttps://www.tjsky.net/tutorial/488https://zhuanlan.zhihu.com/p/610298913超详细的 Stable Diffusion ComfyUI 基础教程(一):安装与常用插件 - 优设网 - 学设计上优设 (uisdc.com)ht

▶《强化学习的数学原理》(2024春)_西湖大学赵世钰 Ch4 值迭代 与 策略迭代 【动态规划 model-based】

PPT 截取必要信息。 课程网站做习题。总体 MOOC 过一遍 1、视频 + 学堂在线 习题 2、过 电子书 补充 【下载: 本章 PDF 电子书 GitHub】 [又看了一遍视频。原来第一次跳过了好多内容。。。] 3、总体 MOOC 过一遍 习题 学堂在线 课程页面链接 中国大学MOOC 课程页面链接 B 站 视频链接 PPT和书籍下载网址: 【GitHub 链接】 总述: