在 前一篇 里我们从线性回归推导到高斯过程回归。本篇把高斯过程回归当作代理模型,搭出贝叶斯优化的完整流程,并介绍 EI / EIC / NEIC / UCB / ES / PI 六种采集函数;最后扩展到多任务场景,介绍 ICM、SLFM、LMC、PC 四种多输出高斯过程回归方法以及多任务贝叶斯优化的采集函数。
1. 黑盒优化问题定义
存在未知目标函数 f : X → R f: \mathcal{X} \rightarrow \mathbf{R} f : X → R ,其中:
目标函数特性
黑盒性 :f f f 的解析表达式、梯度及高阶导数均不可获取,仅能通过输入参数 x ∈ X \mathbf{x} \in \mathcal{X} x ∈ X 获得观测值。
存在噪声 :观测值 y = f ( x ) + ϵ y = f(\mathbf{x}) + \epsilon y = f ( x ) + ϵ ,其中 ϵ ∼ N ( 0 , τ 2 ) \epsilon \sim \mathcal{N}(0, \tau^2) ϵ ∼ N ( 0 , τ 2 ) 为加性噪声(噪声与原始信号以线性叠加的方式存在)。
评估困难性 :
高计算成本:目标函数的单次函数评估需要消耗大量计算资源或时间。
有限评估次数:实际场景中目标函数评估次数受严格限制。
可能涉及多目标优化 ,即同时最小化多个目标。
定义域与约束
优化目标 :在有限次评估次数内,寻找近似最优解 x ∗ ∈ X \mathbf{x}^* \in \mathcal{X} x ∗ ∈ X ,满足:
x ∗ = arg min x ∈ X f ( x ) subject to w T x ⩽ b and c j ( x ) ≤ 0 , j = 1 , … , J . \mathbf{x}^* = \arg \min_{\mathbf{x} \in \mathcal{X}} f(\mathbf{x}) \text{ subject to } \mathbf{w}^T \mathbf{x} \leqslant b \text{ and } c_j(\mathbf{x}) \leq 0, \quad j=1, \ldots, J. x ∗ = arg x ∈ X min f ( x ) subject to w T x ⩽ b and c j ( x ) ≤ 0 , j = 1 , … , J .
2. 贝叶斯优化基本流程
贝叶斯优化方法通过找一个代理模型(Surrogate Model)来解决 f ( x ) f(\mathbf{x}) f ( x ) 未知且评估成本高的问题。这个替代模型 f ^ \hat{f} f ^ 需要满足如下两个特点:1)在代理模型上的评估成本要低。2)f ^ \hat{f} f ^ 能够很好的估计真实函数 f f f 。
另外为了在尽可能少的评估次数下达到目标,这里还需要一个函数来评价未评估参数的评估价值 ,找到评估价值最大的未知参数进行评估。这个函数称为采集参数(Acquisition Function),采集函数使用代理模型 f ^ \hat{f} f ^ 来计算参数的评估价值。
贝叶斯优化搜参的基本流程如下:
步骤一 :从参数空间中随机选取一些初始点进行评估,得到数据集 D = ( X , f ( x ) ) D = (\mathbf{X}, f(\mathbf{x})) D = ( X , f ( x )) 。
步骤二 :基于数据集 D D D ,使用代理模型对参数空间进行拟合,得到每个参数点的后验分布。
步骤三 :使用采集函数依据每个参数点的后验分布计算其价值,找到评估价值最高(满足约束的情况下,使优化目标最大/小化)的点进行评估。
步骤四 :将评估数据加入到数据集 D D D 中。继续优化过程,则返回步骤二,停止优化过程,则进入步骤五。
步骤五 :选出最好的已评估 参数。具体选择方式如下:
如果观测无噪声(无方差),那么直接从已评估的数据集中,找到最好的 f ( x ) f(\mathbf{x}) f ( x ) 对应的 x \mathbf{x} x 即可。
如果观测有噪声,可以计算已评估点的预测后验分布,依据后验分布的某种统计量(后验均值,中位数等)来选择最优的 x \mathbf{x} x 。在有约束条件的情况下,选出的点还要满足约束条件。
3. 常见的代理模型
3.1 对代理模型的要求
代理模型需提供候选点 x \mathbf{x} x 的后验概率分布 p ( f ( x ) ∣ D ) p(f(\mathbf{x}) \mid \mathcal{D}) p ( f ( x ) ∣ D ) ,输出均值(预测值)和方差(不确定性)。预测方差需准确反映真实不确定性(尤其低数据区域)。
无需预设目标函数形式(如线性,多项式),能自适应复杂非线性关系。
黑盒优化需频繁更新模型,计算复杂度需可控。
实际观测值常含噪声 y = f ( x ) + ϵ y = f(\mathbf{x}) + \epsilon y = f ( x ) + ϵ ,需模型有能力区分信号与噪声。
3.2 高斯过程
高斯过程是代理模型的首选,使用高斯过程回归可以高效的逼近黑盒函数。首先高斯过程是非参模型,其模型复杂度随数据量自适应调整,避免了参数模型(如多项式回归,神经网络)的结构限制:
核函数自由度:通过选择核函数(如 RBF 核,Matern 核),GP 可隐式映射到无限维特征空间,捕捉任意光滑度的非线性关系。例如:
RBF 核建模无限可微函数
Matern 核允许控制平滑度(如允许一定程度的”锯齿”)
数据驱动拟合:GP 不预设目标函数的具体形式(如线性,二次),而是通过核函数和超参数优化(如最大化边缘似然)从数据中学习函数形态。这种灵活性使其能适配高度非凸,多峰的黑箱函数。
另外高斯过程回归能够输出搜索空间的后验分布(均值和方差),而非单一的预测值,这个可以与采集函数完美结合 。侧重均值则偏向保守(守成,守住当前的成果,Exploitation);侧重方差则比较激进(探索、Exploration)。
具体原理在前面几节。核函数参考核函数那一节;高斯过程及高斯过程回归原理参考高斯过程回归推导 ;高斯过程回归的超参数优化参考超参数优化 。
4. 常见的采集函数
4.1 对采集函数的要求
有能力平衡 Exploitation 和 Exploration。
Exploitation(利用):在当前模型预测表现较好 的区域(即高均值区域)进行更多采样,以精细化局部最优解 。
应用场景 1:目标函数存在明显的最优区域(单峰或主峰显著)。
应用场景 2:评估成本极高,需快速收敛到可接受解的场景。
风险:过度利用可能导致陷入局部最优,忽略全局潜力区域。
Exploration(探索):在不确定性较高 的区域(即高方差区域)进行采样,以发现新的潜在最优解 。
应用场景 1:目标函数可能存在多个局部最优(多峰)。
应用场景 2:数据稀疏或初始采样不足,需全局搜索。
风险:过度探索可能导致资源浪费,收敛速度慢。
4.2 Expected Improvement (EI)
假设目标是最大化函数 f ( x ) f(\mathbf{x}) f ( x ) ,在无 Noise 场景下,已经迭代的数据是 D = ( X , f ( X ) ) D = (\mathbf{X}, \mathbf{f(X)}) D = ( X , f ( X ) ) ,使用高斯过程回归得到在候选点 x ∗ \mathbf{x}_* x ∗ 的后验分布为 f ( x ∗ ) ∼ N ( μ x ∗ , σ x ∗ ) f(\mathbf{x}_*) \sim \mathcal{N}(\mu_{\mathbf{x}_*}, \sigma_{\mathbf{x}_*}) f ( x ∗ ) ∼ N ( μ x ∗ , σ x ∗ ) 。到目前为止的最优观测点为 f ∗ = max i ∈ { 1 , . . . , n } f ( x i ) f^{*} = \max \limits_{i \in \{1,...,n\}} f(\mathbf{x}_i) f ∗ = i ∈ { 1 , ... , n } max f ( x i ) ,则候选点 x ∗ \mathbf{x}_* x ∗ 的 EI 定义为:
α EI ( x ∗ ∣ f ∗ ) = E [ max ( 0 , f ( x ∗ ) − f ∗ ) ∣ f ( x ∗ ) ∼ N ( μ x ∗ , σ x ∗ ) ] = E [ max ( 0 , μ x ∗ + σ x ∗ t − f ∗ ) ∣ t ∼ N ( 0 , 1 ) ] = ∫ − ∞ + ∞ max ( 0 , μ x ∗ + σ x ∗ t − f ∗ ) ϕ ( t ) d t = ∫ f ∗ − μ x ∗ σ x ∗ + ∞ ( μ x ∗ + σ x ∗ t − f ∗ ) ϕ ( t ) d t = ( μ x ∗ − f ∗ ) [ 1 − Φ ( f ∗ − μ x ∗ σ x ∗ ) ] + ∫ f ∗ − μ x ∗ σ x ∗ + ∞ σ x ∗ t ϕ ( t ) d t = ( μ x ∗ − f ∗ ) [ 1 − Φ ( f ∗ − μ x ∗ σ x ∗ ) ] − σ x ∗ 2 π ∫ f ∗ − μ x ∗ σ x ∗ + ∞ e − t 2 2 d ( − t 2 2 ) = ( μ x ∗ − f ∗ ) [ 1 − Φ ( f ∗ − μ x ∗ σ x ∗ ) ] + σ x ∗ 2 π e − ( f ∗ − μ x ) 2 2 σ x ∗ 2 令: z = f ∗ − μ x ∗ σ x ∗ = − σ x ∗ z Φ ( − z ) + σ x ∗ ϕ ( z ) \begin{aligned}
\alpha_{\text{EI}}(\mathbf{x}_* | f^{*}) & = \mathbb{E} [\max(0, f(\mathbf{x}_*) - f^{*}) | f(\mathbf{x}_*) \sim \mathcal{N}(\mu_{\mathbf{x}_*}, \sigma_{\mathbf{x}_*})] \\
& = \mathbb{E} [\max(0, \mu_{\mathbf{x}_*} + \sigma_{\mathbf{x}_*} t - f^{*}) | t \sim \mathcal{N}(0, 1)] \\
& = \int_{-\infty}^{+\infty} \max(0, \mu_{\mathbf{x}_*} + \sigma_{\mathbf{x}_*} t - f^{*}) \phi(t) dt \\
& = \int_{\frac{f^{*} - \mu_{\mathbf{x}_*}}{\sigma_{\mathbf{x}_*}}}^{+\infty} (\mu_{\mathbf{x}_*} + \sigma_{\mathbf{x}_*} t - f^{*}) \phi(t) dt \\
& = (\mu_{\mathbf{x}_*} - f^{*}) \left[ 1 - \Phi\left(\frac{f^{*} - \mu_{\mathbf{x}_*}}{\sigma_{\mathbf{x}_*}}\right) \right] + \int_{\frac{f^{*} - \mu_{\mathbf{x}_*}}{\sigma_{\mathbf{x}_*}}}^{+\infty} \sigma_{\mathbf{x}_*} t \phi(t) dt \\
& = (\mu_{\mathbf{x}_*} - f^{*}) \left[ 1 - \Phi\left(\frac{f^{*} - \mu_{\mathbf{x}_*}}{\sigma_{\mathbf{x}_*}}\right) \right] - \frac{\sigma_{\mathbf{x}_*}}{\sqrt{2\pi}} \int_{\frac{f^{*} - \mu_{\mathbf{x}_*}}{\sigma_{\mathbf{x}_*}}}^{+\infty} e^{-\frac{t^2}{2}} d\left(-\frac{t^2}{2}\right) \\
& = (\mu_{\mathbf{x}_*} - f^{*}) \left[ 1 - \Phi\left(\frac{f^{*} - \mu_{\mathbf{x}_*}}{\sigma_{\mathbf{x}_*}}\right) \right] + \frac{\sigma_{\mathbf{x}_*}}{\sqrt{2\pi}} e^{-\frac{(f^{*} - \mu_{\mathbf{x}})^2}{2\sigma_{\mathbf{x}_*}^2}} \\
& \qquad \text{令:} z = \frac{f^{*} - \mu_{\mathbf{x}_*}}{\sigma_{\mathbf{x}_*}} \\
& = -\sigma_{\mathbf{x}_*} z \Phi(-z) + \sigma_{\mathbf{x}_*} \phi(z)
\end{aligned} α EI ( x ∗ ∣ f ∗ ) = E [ max ( 0 , f ( x ∗ ) − f ∗ ) ∣ f ( x ∗ ) ∼ N ( μ x ∗ , σ x ∗ )] = E [ max ( 0 , μ x ∗ + σ x ∗ t − f ∗ ) ∣ t ∼ N ( 0 , 1 )] = ∫ − ∞ + ∞ max ( 0 , μ x ∗ + σ x ∗ t − f ∗ ) ϕ ( t ) d t = ∫ σ x ∗ f ∗ − μ x ∗ + ∞ ( μ x ∗ + σ x ∗ t − f ∗ ) ϕ ( t ) d t = ( μ x ∗ − f ∗ ) [ 1 − Φ ( σ x ∗ f ∗ − μ x ∗ ) ] + ∫ σ x ∗ f ∗ − μ x ∗ + ∞ σ x ∗ tϕ ( t ) d t = ( μ x ∗ − f ∗ ) [ 1 − Φ ( σ x ∗ f ∗ − μ x ∗ ) ] − 2 π σ x ∗ ∫ σ x ∗ f ∗ − μ x ∗ + ∞ e − 2 t 2 d ( − 2 t 2 ) = ( μ x ∗ − f ∗ ) [ 1 − Φ ( σ x ∗ f ∗ − μ x ∗ ) ] + 2 π σ x ∗ e − 2 σ x ∗ 2 ( f ∗ − μ x ) 2 令: z = σ x ∗ f ∗ − μ x ∗ = − σ x ∗ z Φ ( − z ) + σ x ∗ ϕ ( z )
有解析解,易于计算。
已观测点的 EI 为 0,因此不会重复采样。
需要能够确定当前的最优观测点是什么,因此只适用于 Noiseless 的场景。
4.3 EI with Constraints (EIC)
如果优化场景存在 J J J 个非线性约束,此时优化问题为:
max x f ( x ) subject to c j ( x ) ≤ 0 , j = 1 , … , J , \max_{\mathbf{x}} f(\mathbf{x}) \text{ subject to } c_j(\mathbf{x}) \leq 0, \quad j=1, \ldots, J, x max f ( x ) subject to c j ( x ) ≤ 0 , j = 1 , … , J ,
约束和目标具有一样的特征(黑盒,评估困难等);优化时会对每个约束,使用高斯过程回归,得到后验的均值和方差。到目前为止的最优观测点为(满足约束的点具有可见性(feasible)):
f c ∗ = max i ∈ { 1 , … , n } c j ( x i ) ≤ 0 , j = 1 , … , J f ( x i ) f_c^{*} = \max \limits_{\substack{i \in \{1,\dots,n\} \\ c_j(\mathbf{x}_i) \leq 0, j = 1,\dots,J}} f(\mathbf{x}_i) f c ∗ = i ∈ { 1 , … , n } c j ( x i ) ≤ 0 , j = 1 , … , J max f ( x i )
假设 { f , c 1 , . . . , c J } \{f, c_1, ..., c_J\} { f , c 1 , ... , c J } 相互独立,则:
α EIC ( x ∗ ∣ f c ∗ ) = α E I ( x ∗ ∣ f c ∗ ) ∏ j = 1 J P ( c j ( x ∗ ) ≤ 0 ) \alpha_{\text{EIC}}\left(\mathbf{x}_* \mid f_c^*\right) = \alpha_{\mathrm{EI}}\left(\mathbf{x}_* \mid f_c^*\right) \prod_{j=1}^J \mathbb{P}\left(c_j(\mathbf{x}_*) \leq 0\right) α EIC ( x ∗ ∣ f c ∗ ) = α EI ( x ∗ ∣ f c ∗ ) j = 1 ∏ J P ( c j ( x ∗ ) ≤ 0 )
Noiseless 场景,约束只有满足与不满足两种情况,因此 P ( c j ( x ∗ ) ≤ 0 ) \mathbb{P}\left(c_j(\mathbf{x}_*) \leq 0\right) P ( c j ( x ∗ ) ≤ 0 ) 非 0 即 1。
4.4 Noisy Expected Improvement With Constraints (NEIC)
真实场景,通常不仅有约束,还存在噪音。此时优化函数的已观测数据为 D f = ( X , y ) D_f = (\mathbf{X}, \mathbf{y}) D f = ( X , y ) ,其中 y i = f ( x i ) + ϵ i y_i = f(\mathbf{x}_i) + \epsilon_i y i = f ( x i ) + ϵ i 。为了高斯过程回归的简化,假设 ϵ i ∈ N ( 0 , τ i 2 ) \epsilon_{i} \in \mathcal{N}(0, \tau_i^2) ϵ i ∈ N ( 0 , τ i 2 ) 。此时的问题在于不知道 D f D_f D f 中哪个点是最优的观测点。一种方式是用各观测点的后验均值代替,但是这种方式收敛太慢(Vazquez & Bect, 2008);而且给出的建议点过于集中,无法有效探索整个空间(Letham et al. 2019, arXiv:1706.07094 )。
此时可以直接基于高斯过程回归得到的后验分布,对所有可能的结果做加权平均。已观测点的后验分布为:
f n ∣ D f ∼ N ( μ f , Σ f ) c j n ∣ D c j ∼ N ( μ c j , Σ c j ) , j = 1 , … , J . \begin{aligned}
\mathbf{f}^n \mid D_f & \sim \mathcal{N}\left(\boldsymbol{\mu}_f, \Sigma_f\right) \\
\mathbf{c}_j^n \mid D_{c_j} & \sim \mathcal{N}\left(\boldsymbol{\mu}_{c_j}, \Sigma_{c_j}\right), \quad j=1, \ldots, J.
\end{aligned} f n ∣ D f c j n ∣ D c j ∼ N ( μ f , Σ f ) ∼ N ( μ c j , Σ c j ) , j = 1 , … , J .
定义 D = { D f , D c 1 , . . . , D c J } D = \{D_f, D_{c_1}, ..., D_{c_J}\} D = { D f , D c 1 , ... , D c J } ,可得未探测点 x ∗ \mathbf{x}_* x ∗ 的 NEI 为:
α NEI ( x ∗ ∣ D ) = ∫ f n ∫ c n α EI ( x ∗ ∣ f n , c n ) p ( f n ∣ D f ) ∏ j = 1 J p ( c j n ∣ D c j ) d c n d f n \alpha_{\text{NEI}}(\mathbf{x}_* \mid D) = \int_{\mathbf{f}^n} \int_{\mathbf{c}^n} \alpha_{\text{EI}}\left(\mathbf{x}_* \mid \mathbf{f}^n, \mathbf{c}^n\right) p\left(\mathbf{f}^n \mid D_f\right) \prod_{j=1}^J p\left(\mathbf{c}_j^n \mid D_{c_j}\right) d\mathbf{c}^n d\mathbf{f}^n α NEI ( x ∗ ∣ D ) = ∫ f n ∫ c n α EI ( x ∗ ∣ f n , c n ) p ( f n ∣ D f ) j = 1 ∏ J p ( c j n ∣ D c j ) d c n d f n
注意这里 x ∗ \mathbf{x}_* x ∗ 的后验本身是确定的,只是在算 EI 的时候,需要考虑已观测点的后验。
没有解析解,但是值和梯度都可以高效计算,因此实际可行。
对于一次生成多个采样点的场景(batch):先产生一个采样点,然后将其后验加入到 f n \mathbf{f}^n f n 和 c n \mathbf{c}_n c n 中,再生成下一个采样点,循环往复。
和 EI 一样,已观测的采样点 NEI 为 0,也不会重复采样。
4.5 Upper Confidence Bound (UCB)
最大化场景下的 UCB 定义为后验区间上界:
α UCB ( x ∗ ) = μ x ∗ + β σ x ∗ \alpha_{\text{UCB}}\left(\mathbf{x}_*\right) = \mu_{\mathbf{x}_*} + \beta \sigma_{\mathbf{x}_*} α UCB ( x ∗ ) = μ x ∗ + β σ x ∗
最大化场景下的 UCB 定义为后验区间下界:
α UCB ( x ∗ ) = μ x ∗ − β σ x ∗ \alpha_{\text{UCB}}\left(\mathbf{x}_*\right) = \mu_{\mathbf{x}_*} - \beta \sigma_{\mathbf{x}_*} α UCB ( x ∗ ) = μ x ∗ − β σ x ∗
其中:
μ x ∗ \mu_{\mathbf{x}_*} μ x ∗ :候选点 x ∗ \mathbf{x}_* x ∗ 的后验均值。
σ x ∗ \sigma_{\mathbf{x}_*} σ x ∗ :候选点的后验标准差。
β ≥ 0 \beta \geq 0 β ≥ 0 :平衡参数。较大的 β \beta β 增加探索性(Exploration),较小的 β \beta β 强调利用(Exploitation)。
UCB 计算高效,仅需后验均值和方差。
β \beta β 需谨慎选择。固定 β \beta β 可能导致 double E 失衡,一般使用自适应策略。
UCB 的理论保证
在满足一定条件下,UCB 算法能保证累计遗憾(Cumulative Regret)R ( T ) R(T) R ( T ) 以次线性速度增长,此时算法能够保证会收敛到最优解 。即
R ( T ) = ∑ t = 1 T f ( x ∗ ) − f ( x t ) ≤ O ~ ( T ) R(T) = \sum_{t=1}^T f\left(\mathbf{x}^*\right) - f\left(\mathbf{x}_t\right) \leq \tilde{O}(\sqrt{T}) R ( T ) = t = 1 ∑ T f ( x ∗ ) − f ( x t ) ≤ O ~ ( T )
其中:
x ∗ \mathbf{x}^* x ∗ 是全局最优解。
x t \mathbf{x}_t x t 是第 t t t 步选择的点。
O ~ \tilde{O} O ~ 表示忽略对数因子的渐进上界。
4.6 Entropy Search (ES)
ES 旨在最小化目标函数最大值 x max \mathbf{x}_{\text{max}} x max 的不确定性(以信息熵衡量)。给定观测数据集 D D D ,定义:
ES 采集函数为熵的期望减少量:
α E S ( x ∗ ) = H ( x max ∣ D ) − E f ( x ∗ ) [ H ( x max ∣ D ∪ { ( x ∗ , f ( x ∗ ) ) } ) ] \alpha_{\mathrm{ES}}\left(\mathbf{x}_*\right) = H\left(\mathbf{x}_{\max} \mid D\right) - \mathbb{E}_{f\left(\mathbf{x}_*\right)}\left[H\left(\mathbf{x}_{\max} \mid D \cup \left\{\left(\mathbf{x}_*, f\left(\mathbf{x}_*\right)\right)\right\}\right)\right] α ES ( x ∗ ) = H ( x m a x ∣ D ) − E f ( x ∗ ) [ H ( x m a x ∣ D ∪ { ( x ∗ , f ( x ∗ ) ) } ) ]
ES 的计算成本很高,因为 p ( x max ∣ D ) p\left(\mathbf{x}_{\max} \mid D\right) p ( x m a x ∣ D ) 无解析解,需近似计算(蒙特卡洛采样等方法),因此适应与比较低维(10 维以内)的问题。
4.7 Probability of Improvement (PI)
PI 衡量候选点 x ∗ \mathbf{x}_* x ∗ 优于当前最优观测值 f ∗ f^* f ∗ 的概率。基于后验分布 f ( x ∗ ) ∼ N ( μ x ∗ , σ x ∗ ) f\left(\mathbf{x}_*\right) \sim \mathcal{N}\left(\mu_{\mathbf{x}_*}, \sigma_{\mathbf{x}_*}\right) f ( x ∗ ) ∼ N ( μ x ∗ , σ x ∗ ) :
α P I ( x ∗ ∣ f ∗ ) = P ( f ( x ∗ ) ≥ f ∗ ) = Φ ( μ x ∗ − f ∗ σ x ∗ ) \alpha_{\mathrm{PI}}\left(\mathbf{x}_* \mid f^*\right) = \mathrm{P}\left(f\left(\mathbf{x}_*\right) \geq f^*\right) = \Phi\left(\frac{\mu_{\mathbf{x}_*} - f^*}{\sigma_{\mathbf{x}_*}}\right) α PI ( x ∗ ∣ f ∗ ) = P ( f ( x ∗ ) ≥ f ∗ ) = Φ ( σ x ∗ μ x ∗ − f ∗ )
其中 Φ \Phi Φ 是标准正态累积分布函数(CDF)。引入探索参数 ξ ≥ 0 \xi \geq 0 ξ ≥ 0 避免局部最优:
α P I ( x ∗ ∣ f ∗ , ξ ) = Φ ( μ x ∗ − ( f ∗ + ξ ) σ x ∗ ) \alpha_{\mathrm{PI}}\left(\mathbf{x}_* \mid f^*, \xi\right) = \Phi\left(\frac{\mu_{\mathbf{x}_*} - \left(f^* + \xi\right)}{\sigma_{\mathbf{x}_*}}\right) α PI ( x ∗ ∣ f ∗ , ξ ) = Φ ( σ x ∗ μ x ∗ − ( f ∗ + ξ ) )
有解析解,仅依赖后验均值和方差,因此计算高效。
不加 ξ \xi ξ 时倾向过度利用(高均值、低方差区域)。
PI 忽略改进幅度,而 EI 能够平衡改进概率与幅度,因此 EI 更常用。
5. 多任务高斯过程回归
机器学习中有一种建模方式叫多任务学习(Multitask Learning),其核心思想是在不同任务之间共享信息,相较于单独学习每个任务,可以带来性能的提升。对应于优化场景,我们可以将具有相关性的多个优化任务,使用多任务优化来增强收益;或者对于成本很高的在线优化场景,我们可以构造一些有偏但相关的离线优化任务,使用多任务学习来增强在线优化的效果。在高斯过程回归的场景中,通常也称为 Multi-Output Learning 或 Vector-Valued Learning。
本节内容主要参考 Álvarez 等人的工作(Álvarez 2017 slides 、Álvarez, Rosasco & Lawrence 2012 (arXiv:1106.6251) )。
5.1 整体框架
在前面的单任务高斯过程回归 章节中,介绍的是单任务的高斯过程回归。对于多个任务的场景,我们定义向量值函数(Vector Valued Functions)f = [ f 1 , … , f O ] T \mathbf{f} = \left[f_1, \ldots, f_O\right]^T f = [ f 1 , … , f O ] T 服从高斯过程:
f ∼ G P ( m , K ) \mathbf{f} \sim \mathcal{G} \mathcal{P}(\mathbf{m}, \mathbf{K}) f ∼ G P ( m , K )
其中:
m \mathbf{m} m 是均值函数向量。一个 O O O 维函数向量:[ m 1 ( x ) , . . . , m O ( x ) ] T [m_1(\mathbf{x}), ..., m_O(\mathbf{x})]^T [ m 1 ( x ) , ... , m O ( x ) ] T 。
K \mathbf{K} K 是协方差函数矩阵。一个 O × O O \times O O × O 维的矩阵(positive matrix valued function)。每维都是单任务高斯过程回归中的协方差函数。如 K ( x , x ′ ) \mathbf{K}(\mathbf{x}, \mathbf{x}^{\prime}) K ( x , x ′ ) 中第 o o o 行、o ′ o^\prime o ′ 列的元素为:( K ( x , x ′ ) ) o , o ′ (\mathbf{K}(\mathbf{x}, \mathbf{x}^{\prime}))_{o, o^{\prime}} ( K ( x , x ′ ) ) o , o ′ ,表示两个任务 f o ( x ) f_o(\mathbf{x}) f o ( x ) 和 f o ′ ( x ′ ) f_{o^\prime}(\mathbf{x}^{\prime}) f o ′ ( x ′ ) 之间的相关性。
对于输入数据集 X \mathbf{X} X ,先验:
f ( X ) ∼ N ( m ( X ) , K ( X , X ) ) \mathbf{f}(\mathbf{X}) \sim \mathcal{N}(\mathbf{m}(\mathbf{X}), \mathbf{K}(\mathbf{X}, \mathbf{X})) f ( X ) ∼ N ( m ( X ) , K ( X , X ))
其中协方差函数矩阵:
K ( X , X ) = [ ( K ( X 1 , X 1 ) ) 1 , 1 ⋯ ( K ( X 1 , X O ) ) 1 , O ( K ( X 2 , X 1 ) ) 2 , 1 ⋯ ( K ( X 2 , X O ) ) 2 , O ⋮ ⋯ ⋮ ( K ( X O , X 1 ) ) O , 1 ⋯ ( K ( X O , X O ) ) O , O ] \mathbf{K}(\mathbf{X}, \mathbf{X}) = \left[\begin{array}{ccc}
\left(\mathbf{K}\left(\mathbf{X}_1, \mathbf{X}_1\right)\right)_{1,1} & \cdots & \left(\mathbf{K}\left(\mathbf{X}_1, \mathbf{X}_O\right)\right)_{1, O} \\
\left(\mathbf{K}\left(\mathbf{X}_2, \mathbf{X}_1\right)\right)_{2,1} & \cdots & \left(\mathbf{K}\left(\mathbf{X}_2, \mathbf{X}_O\right)\right)_{2, O} \\
\vdots & \cdots & \vdots \\
\left(\mathbf{K}\left(\mathbf{X}_O, \mathbf{X}_1\right)\right)_{O, 1} & \cdots & \left(\mathbf{K}\left(\mathbf{X}_O, \mathbf{X}_O\right)\right)_{O, O}
\end{array}\right] K ( X , X ) = ( K ( X 1 , X 1 ) ) 1 , 1 ( K ( X 2 , X 1 ) ) 2 , 1 ⋮ ( K ( X O , X 1 ) ) O , 1 ⋯ ⋯ ⋯ ⋯ ( K ( X 1 , X O ) ) 1 , O ( K ( X 2 , X O ) ) 2 , O ⋮ ( K ( X O , X O ) ) O , O
如果 O O O 个函数相互独立,则 K ( X , X ) \mathbf{K}(\mathbf{X}, \mathbf{X}) K ( X , X ) 是一个块对角矩阵(block diagonal matrix),其中每个块对应于一个函数的协方差矩阵:
[ ( K ( X 1 , X 1 ) ) 1 , 1 0 ⋯ 0 0 ( K ( X 2 , X 2 ) ) 2 , 2 ⋯ 0 ⋮ ⋮ ⋱ ⋮ 0 0 ⋯ ( K ( X O , X O ) ) O , O ] \left[\begin{array}{cccc}
\left(\mathbf{K}\left(\mathbf{X}_1, \mathbf{X}_1\right)\right)_{1,1} & 0 & \cdots & 0 \\
0 & \left(\mathbf{K}\left(\mathbf{X}_2, \mathbf{X}_2\right)\right)_{2,2} & \cdots & 0 \\
\vdots & \vdots & \ddots & \vdots \\
0 & 0 & \cdots & \left(\mathbf{K}\left(\mathbf{X}_O, \mathbf{X}_O\right)\right)_{O, O}
\end{array}\right] ( K ( X 1 , X 1 ) ) 1 , 1 0 ⋮ 0 0 ( K ( X 2 , X 2 ) ) 2 , 2 ⋮ 0 ⋯ ⋯ ⋱ ⋯ 0 0 ⋮ ( K ( X O , X O ) ) O , O
似然函数:
p ( y ∣ f , x , Σ ) = N ( f ( x ) , Σ ) p(\mathbf{y} \mid \mathbf{f}, \mathbf{x}, \Sigma) = \mathcal{N}(\mathbf{f}(\mathbf{x}), \Sigma) p ( y ∣ f , x , Σ ) = N ( f ( x ) , Σ )
其中 Σ \Sigma Σ 是对角矩阵,对角元素为 { σ o 2 } o = 1 O \{\sigma_o^2\}_{o=1}^{O} { σ o 2 } o = 1 O 。
预测后验:
p ( f ( x ∗ ) ∣ D , f , x ∗ , θ ) = N ( f ∗ ( x ∗ ) , K ∗ ( x ∗ , x ∗ ) ) , p\left(\mathbf{f}\left(\mathbf{x}_*\right) \mid D, \mathbf{f}, \mathbf{x}_*, \boldsymbol{\theta}\right) = \mathcal{N}\left(\mathbf{f}_*\left(\mathbf{x}_*\right), \mathbf{K}_*\left(\mathbf{x}_*, \mathbf{x}_*\right)\right), p ( f ( x ∗ ) ∣ D , f , x ∗ , θ ) = N ( f ∗ ( x ∗ ) , K ∗ ( x ∗ , x ∗ ) ) ,
其中:
f ∗ ( x ∗ ) = K x ∗ ⊤ ( K ( X , X ) + Σ ) − 1 y ‾ , K ∗ ( x ∗ , x ∗ ) = K ( x ∗ , x ∗ ) − K x ∗ ( K ( X , X ) + Σ ) − 1 K x ∗ ⊤ , \begin{aligned}
\mathbf{f}_*\left(\mathbf{x}_*\right) & = \mathbf{K}_{\mathbf{x}_*}^{\top}(\mathbf{K}(\mathbf{X}, \mathbf{X}) + \boldsymbol{\Sigma})^{-1} \overline{\mathbf{y}}, \\
\mathbf{K}_*\left(\mathbf{x}_*, \mathbf{x}_*\right) & = \mathbf{K}\left(\mathbf{x}_*, \mathbf{x}_*\right) - \mathbf{K}_{\mathbf{x}_*}(\mathbf{K}(\mathbf{X}, \mathbf{X}) + \boldsymbol{\Sigma})^{-1} \mathbf{K}_{\mathbf{x}_*}^{\top},
\end{aligned} f ∗ ( x ∗ ) K ∗ ( x ∗ , x ∗ ) = K x ∗ ⊤ ( K ( X , X ) + Σ ) − 1 y , = K ( x ∗ , x ∗ ) − K x ∗ ( K ( X , X ) + Σ ) − 1 K x ∗ ⊤ ,
其中:
Σ = Σ ⊗ I N \boldsymbol{\Sigma} = \Sigma \otimes \mathbf{I}_N Σ = Σ ⊗ I N
K x ∗ ∈ R O × N O \mathbf{K}_{\mathbf{x}_*} \in \mathbf{R}^{O \times N O} K x ∗ ∈ R O × N O has entries ( K ( x ∗ , x j ) ) o , o ′ \left(\mathbf{K}\left(\mathbf{x}_*, \mathbf{x}_j\right)\right)_{o, o^{\prime}} ( K ( x ∗ , x j ) ) o , o ′ for j = 1 , … , N j=1, \ldots, N j = 1 , … , N and o , o ′ = 1 , … , O o, o^{\prime}=1, \ldots, O o , o ′ = 1 , … , O
θ \boldsymbol{\theta} θ :所有核函数的超参数集合。
实际使用中,一个模型的提出,一般都是先做假设。如多任务的场景,先假设数据的分布及相关性,然后基于假设,推导出相关的模型。下面几节介绍基于不同数据假设推导出的模型。包括:
Separable Kernels and Sum of Separable Kernels (SoS kernels): A special class of multi-output kernel functions that can be formulated as a sum of products between a kernel function for the input space alone, and a kernel function that encodes the interactions among the outputs. Includes ICM (Intrinsic Coregionalization Model)、SLFM (Semiparametric Latent Factor Model) (Linear Model of Coregionalization)。LMC 是 ICM 和 SLFM 的泛化。
Beyond Separable Kernels: 一些更加复杂的模型。如 PC (Process Convolutions)。过程卷积,是对 LMC 的进一步泛化。
一些术语解释
cokriging:多元学习中的概率模型与高斯过程应用,最初是在地质统计学领域开创并发展成熟的,其中针对向量值输出数据的预测被称为 cokriging(多变量协同克里金?)。
autokrigeability:是一个描述多变量协同克里金(cokriging)可简化为单变量克里金(kriging)的特殊条件的术语。当数据满足特定条件时,多变量协同克里金模型的协方差矩阵为对角矩阵(块对角矩阵,表示变量间相互独立),此时可自动解耦为多个独立的单变量克里金问题。
Isotopic / Heterotopic Data:Isotopic 是不同任务的输入数据集完全一样;Heterotopic 是指不同任务的输入数据集存在偏差。
5.2 Intrinsic Coregionalization Model (ICM)
ICM 假设多个输出是基于同一个高斯过程回归的多个采样的不同的线性变换得到的 。
两个输出的场景
本节基于两个输出的场景来推导 ICM。考虑两个输出分别为 f 1 ( x ) f_1(\mathbf{x}) f 1 ( x ) 和 f 2 ( x ) f_2(\mathbf{x}) f 2 ( x ) ,其输入空间相同且 x ∈ R p \mathbf{x} \in \mathbf{R}^p x ∈ R p ,对应的向量值函数为(vector-valued function):
f ( x ) = [ f 1 ( x ) f 2 ( x ) ] \mathbf{f}(\mathbf{x}) = \left[\begin{array}{l}
f_1(\mathbf{x}) \\
f_2(\mathbf{x})
\end{array}\right] f ( x ) = [ f 1 ( x ) f 2 ( x ) ]
协方差为:
cov ( f ( x ) , f ( x ′ ) ) = E { f ( x ) [ f ( x ′ ) ] ⊤ } − E { f ( x ) } [ E { f ( x ′ ) } ] ⊤ = E { [ f 1 ( x ) f 2 ( x ) ] [ f 1 ( x ′ ) f 2 ( x ′ ) ] } − E { [ f 1 ( x ) f 2 ( x ) ] } [ E { [ f 1 ( x ′ ) f 2 ( x ′ ) ] } ] T = E { [ f 1 ( x ) f 1 ( x ′ ) f 1 ( x ) f 2 ( x ′ ) f 2 ( x ) f 1 ( x ′ ) f 2 ( x ) f 2 ( x ′ ) ] } − [ E { f 1 ( x ) } E { f 2 ( x ) } ] [ E { f 1 ( x ′ ) } E { f 2 ( x ′ ) } ] T = [ E { f 1 ( x ) f 1 ( x ′ ) } E { f 1 ( x ) f 2 ( x ′ ) } E { f 2 ( x ) f 1 ( x ′ ) } E { f 2 ( x ) f 2 ( x ′ ) } ] − [ E { f 1 ( x ) } E { f 1 ( x ′ ) } E { f 1 ( x ) } E { f 2 ( x ′ ) } E { f 2 ( x ) } E { f 1 ( x ′ ) } E { f 2 ( x ) } E { f 2 ( x ′ ) } ] \begin{aligned}
& \operatorname{cov}\left(\mathbf{f}(\mathbf{x}), \mathbf{f}\left(\mathbf{x}^{\prime}\right)\right) \\
& = \mathbb{E}\left\{\mathbf{f}(\mathbf{x})\left[\mathbf{f}\left(\mathbf{x}^{\prime}\right)\right]^{\top}\right\} - \mathbb{E}\{\mathbf{f}(\mathbf{x})\}\left[\mathbb{E}\left\{\mathbf{f}\left(\mathbf{x}^{\prime}\right)\right\}\right]^{\top} \\
& = \mathbb{E}\left\{\left[\begin{array}{l}
f_1(\mathbf{x}) \\
f_2(\mathbf{x})
\end{array}\right]\left[\begin{array}{ll}
f_1\left(\mathbf{x}^{\prime}\right) & f_2\left(\mathbf{x}^{\prime}\right)
\end{array}\right]\right\}
-
\mathbb{E}\left\{\left[\begin{array}{l}
f_1(\mathbf{x}) \\
f_2(\mathbf{x})
\end{array}\right]\right\}
\left[ \mathbb{E}\left\{\left[\begin{array}{l}
f_1(\mathbf{x}^\prime) \\
f_2(\mathbf{x}^\prime)
\end{array}\right]\right\} \right]^T \\
& = \mathbb{E} \left\{\left[\begin{array}{ll}
f_1(\mathbf{x}) f_1\left(\mathbf{x}^{\prime}\right) & f_1(\mathbf{x}) f_2\left(\mathbf{x}^{\prime}\right) \\
f_2(\mathbf{x}) f_1\left(\mathbf{x}^{\prime}\right) & f_2(\mathbf{x}) f_2\left(\mathbf{x}^{\prime}\right)
\end{array}\right] \right\}
-
\left[\begin{array}{l}
\mathbb{E}\left\{f_1(\mathbf{x})\right\} \\
\mathbb{E}\left\{f_2(\mathbf{x})\right\}
\end{array}\right]
\left[\begin{array}{l}
\mathbb{E}\left\{f_1(\mathbf{x}^\prime)\right\} \\
\mathbb{E}\left\{f_2(\mathbf{x}^\prime)\right\}
\end{array}\right]^T \\
& = \left[\begin{array}{ll}
\mathbb{E}\left\{f_1(\mathbf{x}) f_1\left(\mathbf{x}^{\prime}\right)\right\} & \mathbb{E}\left\{f_1(\mathbf{x}) f_2\left(\mathbf{x}^{\prime}\right)\right\} \\
\mathbb{E}\left\{f_2(\mathbf{x}) f_1\left(\mathbf{x}^{\prime}\right)\right\} & \mathbb{E}\left\{f_2(\mathbf{x}) f_2\left(\mathbf{x}^{\prime}\right)\right\}
\end{array}\right]
-
\left[\begin{array}{ll}
\mathbb{E}\left\{f_1(\mathbf{x}) \right\} \mathbb{E}\left\{ f_1\left(\mathbf{x}^{\prime}\right)\right\} & \mathbb{E}\left\{f_1(\mathbf{x}) \right\} \mathbb{E}\left\{ f_2\left(\mathbf{x}^{\prime}\right)\right\} \\
\mathbb{E}\left\{f_2(\mathbf{x}) \right\} \mathbb{E}\left\{ f_1\left(\mathbf{x}^{\prime}\right)\right\} & \mathbb{E}\left\{f_2(\mathbf{x}) \right\} \mathbb{E}\left\{ f_2\left(\mathbf{x}^{\prime}\right)\right\}
\end{array}\right]
\end{aligned} cov ( f ( x ) , f ( x ′ ) ) = E { f ( x ) [ f ( x ′ ) ] ⊤ } − E { f ( x )} [ E { f ( x ′ ) } ] ⊤ = E { [ f 1 ( x ) f 2 ( x ) ] [ f 1 ( x ′ ) f 2 ( x ′ ) ] } − E { [ f 1 ( x ) f 2 ( x ) ] } [ E { [ f 1 ( x ′ ) f 2 ( x ′ ) ] } ] T = E { [ f 1 ( x ) f 1 ( x ′ ) f 2 ( x ) f 1 ( x ′ ) f 1 ( x ) f 2 ( x ′ ) f 2 ( x ) f 2 ( x ′ ) ] } − [ E { f 1 ( x ) } E { f 2 ( x ) } ] [ E { f 1 ( x ′ ) } E { f 2 ( x ′ ) } ] T = [ E { f 1 ( x ) f 1 ( x ′ ) } E { f 2 ( x ) f 1 ( x ′ ) } E { f 1 ( x ) f 2 ( x ′ ) } E { f 2 ( x ) f 2 ( x ′ ) } ] − [ E { f 1 ( x ) } E { f 1 ( x ′ ) } E { f 2 ( x ) } E { f 1 ( x ′ ) } E { f 1 ( x ) } E { f 2 ( x ′ ) } E { f 2 ( x ) } E { f 2 ( x ′ ) } ]
基于一个采样函数
从高斯过程 μ ( x ) ∼ G P ( 0 , k ( x , x ′ ) ) \mu(\mathbf{x}) \sim \mathcal{GP}(\mathbf{0}, k(\mathbf{x}, \mathbf{x}^{\prime})) μ ( x ) ∼ G P ( 0 , k ( x , x ′ )) 采样出一个函数 μ 1 ( x ) \mu^1(\mathbf{x}) μ 1 ( x ) 。采样函数 μ 1 ( x ) \mu^1(\mathbf{x}) μ 1 ( x ) 也叫隐函数(latent function)。
假设 f 1 ( x ) f_1(\mathbf{x}) f 1 ( x ) 和 f 2 ( x ) f_2(\mathbf{x}) f 2 ( x ) 是从 μ 1 ( x ) \mu^1(\mathbf{x}) μ 1 ( x ) 的如下线性变换得到:
f 1 ( x ) = a 1 1 μ 1 ( x ) f 2 ( x ) = a 2 1 μ 1 ( x ) \begin{aligned}
& f_1(\mathbf{x}) = a_1^1 \mu^1(\mathbf{x}) \\
& f_2(\mathbf{x}) = a_2^1 \mu^1(\mathbf{x})
\end{aligned} f 1 ( x ) = a 1 1 μ 1 ( x ) f 2 ( x ) = a 2 1 μ 1 ( x )
向量值函数为:
f ( x ) = [ f 1 ( x ) f 2 ( x ) ] = [ a 1 1 μ 1 ( x ) a 2 1 μ 1 ( x ) ] = [ a 1 1 a 2 1 ] μ 1 ( x ) define a = [ a 1 1 a 2 1 ] T = a μ 1 ( x ) \begin{aligned}
\mathbf{f}(\mathbf{x}) & = \left[\begin{array}{l}
f_1(\mathbf{x}) \\
f_2(\mathbf{x})
\end{array}\right]
= \left[\begin{array}{l}
a_1^1 \mu^1(\mathbf{x}) \\
a_2^1 \mu^1(\mathbf{x})
\end{array}\right]
= \left[\begin{array}{l}
a_1^1 \\
a_2^1
\end{array}\right] \mu^1(\mathbf{x}) \\
& \quad \, \, \text{define } \mathbf{a} = \left[\begin{array}{ll} a_1^1 & a_2^1 \end{array}\right]^{T} \\
& = \mathbf{a} \mu^1(\mathbf{x})
\end{aligned} f ( x ) = [ f 1 ( x ) f 2 ( x ) ] = [ a 1 1 μ 1 ( x ) a 2 1 μ 1 ( x ) ] = [ a 1 1 a 2 1 ] μ 1 ( x ) define a = [ a 1 1 a 2 1 ] T = a μ 1 ( x )
协方差函数为:
cov ( f ( x ) , f ( x ′ ) ) = [ E { f 1 ( x ) f 1 ( x ′ ) } E { f 1 ( x ) f 2 ( x ′ ) } E { f 2 ( x ) f 1 ( x ′ ) } E { f 2 ( x ) f 2 ( x ′ ) } ] − [ E { f 1 ( x ) } E { f 1 ( x ′ ) } E { f 1 ( x ) } E { f 2 ( x ′ ) } E { f 2 ( x ) } E { f 1 ( x ′ ) } E { f 2 ( x ) } E { f 2 ( x ′ ) } ] = [ ( a 1 1 ) 2 E { u 1 ( x ) u 1 ( x ′ ) } a 1 1 a 2 1 E { u 1 ( x ) u 1 ( x ′ ) } a 1 a 2 E { u 1 ( x ) u 1 ( x ′ ) } ( a 2 1 ) 2 E { u 1 ( x ) u 1 ( x ′ ) } ] − [ ( a 1 1 ) 2 E { u 1 ( x ) } E { u 1 ( x ′ ) } a 1 1 a 2 1 E { u 1 ( x ) } E { u 1 ( x ′ ) } a 1 a 2 E { u 1 ( x ) } E { u 1 ( x ′ ) } ( a 2 1 ) 2 E { u 1 ( x ) } E { u 1 ( x ′ ) } ] = [ ( a 1 1 ) 2 a 1 1 a 2 1 a 1 a 2 ( a 2 1 ) 2 ] [ E { u 1 ( x ) u 1 ( x ′ ) } − E { u 1 ( x ) } E { u 1 ( x ′ ) } ] = [ a 1 1 a 2 1 ] [ a 1 1 a 2 1 ] [ E { u 1 ( x ) u 1 ( x ′ ) } − E { u 1 ( x ) } E { u 1 ( x ′ ) } ] ⏟ k ( x , x ′ ) define a = [ a 1 1 a 2 1 ] ⊤ = a a ⊤ k ( x , x ′ ) define B = a a ⊤ , B has rank one = B k ( x , x ′ ) = [ b 11 b 12 b 21 b 22 ] k ( x , x ′ ) \begin{aligned}
& \operatorname{cov}\left(\mathbf{f}(\mathbf{x}), \mathbf{f}\left(\mathbf{x}^{\prime}\right)\right) \\
& = \left[\begin{array}{ll}
\mathbb{E}\left\{f_1(\mathbf{x}) f_1\left(\mathbf{x}^{\prime}\right)\right\} & \mathbb{E}\left\{f_1(\mathbf{x}) f_2\left(\mathbf{x}^{\prime}\right)\right\} \\
\mathbb{E}\left\{f_2(\mathbf{x}) f_1\left(\mathbf{x}^{\prime}\right)\right\} & \mathbb{E}\left\{f_2(\mathbf{x}) f_2\left(\mathbf{x}^{\prime}\right)\right\}
\end{array}\right]
-
\left[\begin{array}{ll}
\mathbb{E}\left\{f_1(\mathbf{x}) \right\} \mathbb{E}\left\{ f_1\left(\mathbf{x}^{\prime}\right)\right\} & \mathbb{E}\left\{f_1(\mathbf{x}) \right\} \mathbb{E}\left\{ f_2\left(\mathbf{x}^{\prime}\right)\right\} \\
\mathbb{E}\left\{f_2(\mathbf{x}) \right\} \mathbb{E}\left\{ f_1\left(\mathbf{x}^{\prime}\right)\right\} & \mathbb{E}\left\{f_2(\mathbf{x}) \right\} \mathbb{E}\left\{ f_2\left(\mathbf{x}^{\prime}\right)\right\}
\end{array}\right] \\
& = \left[\begin{array}{ll}
\left(a_1^1\right)^2 \mathbb{E}\left\{u^1(\mathbf{x}) u^1\left(\mathbf{x}^{\prime}\right)\right\} & a_1^1 a_2^1 \mathbb{E}\left\{u^1(\mathbf{x}) u^1\left(\mathbf{x}^{\prime}\right)\right\} \\
a^1 a^2 \mathbb{E}\left\{u^1(\mathbf{x}) u^1\left(\mathbf{x}^{\prime}\right)\right\} & \left(a_2^1\right)^2 \mathbb{E}\left\{u^1(\mathbf{x}) u^1\left(\mathbf{x}^{\prime}\right)\right\}
\end{array}\right] \\
& \quad \, \, - \left[\begin{array}{ll}
\left(a_1^1\right)^2 \mathbb{E}\left\{u^1(\mathbf{x}) \right\} \mathbb{E}\left\{ u^1\left(\mathbf{x}^{\prime}\right)\right\} &
a_1^1 a_2^1 \mathbb{E}\left\{u^1(\mathbf{x}) \right\} \mathbb{E}\left\{ u^1\left(\mathbf{x}^{\prime}\right)\right\} \\
a^1 a^2 \mathbb{E}\left\{u^1(\mathbf{x}) \right\} \mathbb{E}\left\{ u^1\left(\mathbf{x}^{\prime}\right)\right\} &
\left(a_2^1\right)^2 \mathbb{E}\left\{u^1(\mathbf{x}) \right\} \mathbb{E}\left\{ u^1\left(\mathbf{x}^{\prime}\right)\right\}
\end{array}\right] \\
& = \left[\begin{array}{ll}
\left(a_1^1\right)^2 & a_1^1 a_2^1 \\
a^1 a^2 & \left(a_2^1\right)^2
\end{array}\right]
\left[
\mathbb{E}\left\{u^1(\mathbf{x}) u^1\left(\mathbf{x}^{\prime}\right)\right\} -
\mathbb{E}\left\{u^1(\mathbf{x})\right\} \mathbb{E}\left\{u^1\left(\mathbf{x}^{\prime}\right)\right\}
\right] \\
& = \left[\begin{array}{l}
a_1^1 \\
a_2^1
\end{array}\right]\left[\begin{array}{ll}
a_1^1 & a_2^1
\end{array}\right]
\underbrace{\left[\mathbb{E}\left\{u^1(\mathbf{x}) u^1\left(\mathbf{x}^{\prime}\right)\right\} - \mathbb{E}\left\{u^1(\mathbf{x})\right\} \mathbb{E}\left\{u^1\left(\mathbf{x}^{\prime}\right)\right\}\right]}_{k\left(\mathbf{x}, \mathbf{x}^{\prime}\right)} \\
& \quad \, \, \text{define } \mathbf{a} = \left[\begin{array}{ll} a_1^1 & a_2^1 \end{array}\right]^{\top} \\
& = \mathbf{a}\mathbf{a}^{\top} k\left(\mathbf{x}, \mathbf{x}^{\prime}\right) \\
& \quad \, \, \text{define } \mathbf{B} = \mathbf{a}\mathbf{a}^{\top}, \mathbf{B} \text{ has rank one} \\
& = \mathbf{B} k\left(\mathbf{x}, \mathbf{x}^{\prime}\right)\\
& = \left[\begin{array}{ll}
b_{11} & b_{12} \\
b_{21} & b_{22}
\end{array}\right] k\left(\mathbf{x}, \mathbf{x}^{\prime}\right)
\end{aligned} cov ( f ( x ) , f ( x ′ ) ) = [ E { f 1 ( x ) f 1 ( x ′ ) } E { f 2 ( x ) f 1 ( x ′ ) } E { f 1 ( x ) f 2 ( x ′ ) } E { f 2 ( x ) f 2 ( x ′ ) } ] − [ E { f 1 ( x ) } E { f 1 ( x ′ ) } E { f 2 ( x ) } E { f 1 ( x ′ ) } E { f 1 ( x ) } E { f 2 ( x ′ ) } E { f 2 ( x ) } E { f 2 ( x ′ ) } ] = [ ( a 1 1 ) 2 E { u 1 ( x ) u 1 ( x ′ ) } a 1 a 2 E { u 1 ( x ) u 1 ( x ′ ) } a 1 1 a 2 1 E { u 1 ( x ) u 1 ( x ′ ) } ( a 2 1 ) 2 E { u 1 ( x ) u 1 ( x ′ ) } ] − [ ( a 1 1 ) 2 E { u 1 ( x ) } E { u 1 ( x ′ ) } a 1 a 2 E { u 1 ( x ) } E { u 1 ( x ′ ) } a 1 1 a 2 1 E { u 1 ( x ) } E { u 1 ( x ′ ) } ( a 2 1 ) 2 E { u 1 ( x ) } E { u 1 ( x ′ ) } ] = [ ( a 1 1 ) 2 a 1 a 2 a 1 1 a 2 1 ( a 2 1 ) 2 ] [ E { u 1 ( x ) u 1 ( x ′ ) } − E { u 1 ( x ) } E { u 1 ( x ′ ) } ] = [ a 1 1 a 2 1 ] [ a 1 1 a 2 1 ] k ( x , x ′ ) [ E { u 1 ( x ) u 1 ( x ′ ) } − E { u 1 ( x ) } E { u 1 ( x ′ ) } ] define a = [ a 1 1 a 2 1 ] ⊤ = a a ⊤ k ( x , x ′ ) define B = a a ⊤ , B has rank one = B k ( x , x ′ ) = [ b 11 b 21 b 12 b 22 ] k ( x , x ′ )
或者:
cov ( f ( x ) , f ( x ′ ) ) = cov ( a μ 1 ( x ) , a μ 1 ( x ′ ) ) = a a ⊤ cov ( μ 1 ( x ) , μ 1 ( x ) ) = a a ⊤ k ( x , x ′ ) \begin{aligned}
\operatorname{cov}\left(\mathbf{f}(\mathbf{x}), \mathbf{f}\left(\mathbf{x}^{\prime}\right)\right)
= \operatorname{cov}(\mathbf{a}\mu^1(\mathbf{x}), \mathbf{a}\mu^1(\mathbf{x}^\prime))
= \mathbf{a}\mathbf{a}^{\top} \operatorname{cov}(\mu^1(\mathbf{x}), \mu^1(\mathbf{x}))
= \mathbf{a}\mathbf{a}^{\top} k\left(\mathbf{x}, \mathbf{x}^{\prime}\right)
\end{aligned} cov ( f ( x ) , f ( x ′ ) ) = cov ( a μ 1 ( x ) , a μ 1 ( x ′ )) = a a ⊤ cov ( μ 1 ( x ) , μ 1 ( x )) = a a ⊤ k ( x , x ′ )
基于两个采样函数
从高斯过程 μ ( x ) ∼ G P ( 0 , k ( x , x ′ ) ) \mu(\mathbf{x}) \sim \mathcal{GP}(\mathbf{0}, k(\mathbf{x}, \mathbf{x}^{\prime})) μ ( x ) ∼ G P ( 0 , k ( x , x ′ )) 采样出两个函数 μ 1 ( x ) \mu^1(\mathbf{x}) μ 1 ( x ) 和 μ 2 ( x ) \mu^2(\mathbf{x}) μ 2 ( x ) ,μ 1 ( x ) \mu^1(\mathbf{x}) μ 1 ( x ) 和 μ 2 ( x ) \mu^2(\mathbf{x}) μ 2 ( x ) 相互独立且来源于同一个协方差函数 k ( x , x ′ ) k(\mathbf{x}, \mathbf{x}^{\prime}) k ( x , x ′ ) 。
假设 f 1 ( x ) f_1(\mathbf{x}) f 1 ( x ) 和 f 2 ( x ) f_2(\mathbf{x}) f 2 ( x ) 是从 μ 1 ( x ) \mu^1(\mathbf{x}) μ 1 ( x ) 和 μ 2 ( x ) \mu^2(\mathbf{x}) μ 2 ( x ) 的如下线性变换得到:
f 1 ( x ) = a 1 1 μ 1 ( x ) + a 1 2 μ 2 ( x ) f 2 ( x ) = a 2 1 μ 1 ( x ) + a 2 2 μ 2 ( x ) \begin{aligned}
& f_1(\mathbf{x}) = a_1^1 \mu^1(\mathbf{x}) + a_1^2 \mu^2(\mathbf{x}) \\
& f_2(\mathbf{x}) = a_2^1 \mu^1(\mathbf{x}) + a_2^2 \mu^2(\mathbf{x})
\end{aligned} f 1 ( x ) = a 1 1 μ 1 ( x ) + a 1 2 μ 2 ( x ) f 2 ( x ) = a 2 1 μ 1 ( x ) + a 2 2 μ 2 ( x )
向量值函数为:
f ( x ) = u 1 ( x ) + a 2 u 2 ( x ) f(\mathbf{x}) = u^1(\mathbf{x}) + \mathbf{a}^2 u^2(\mathbf{x}) f ( x ) = u 1 ( x ) + a 2 u 2 ( x )
f ( x ) = [ f 1 ( x ) f 2 ( x ) ] = [ a 1 1 a 2 1 ] μ 1 ( x ) + [ a 1 2 a 2 2 ] μ 2 ( x ) define a 1 = [ a 1 1 a 2 1 ] T , a 2 = [ a 1 2 a 2 2 ] T = a 1 u 1 ( x ) + a 2 u 2 ( x ) \begin{aligned}
\mathbf{f}(\mathbf{x}) & = \left[\begin{array}{l}
f_1(\mathbf{x}) \\
f_2(\mathbf{x})
\end{array}\right]
= \left[\begin{array}{l}
a_1^1 \\
a_2^1
\end{array}\right] \mu^1(\mathbf{x})
+
\left[\begin{array}{l}
a_1^2 \\
a_2^2
\end{array}\right] \mu^2(\mathbf{x}) \\
& \quad \text{define } \mathbf{a}^1 = \left[\begin{array}{ll} a_1^1 & a_2^1 \end{array}\right]^T, \mathbf{a}^2 = \left[\begin{array}{ll} a_1^2 & a_2^2 \end{array}\right]^T \\
& = \mathbf{a}^1 u^1(\mathbf{x}) + \mathbf{a}^2 u^2(\mathbf{x})
\end{aligned} f ( x ) = [ f 1 ( x ) f 2 ( x ) ] = [ a 1 1 a 2 1 ] μ 1 ( x ) + [ a 1 2 a 2 2 ] μ 2 ( x ) define a 1 = [ a 1 1 a 2 1 ] T , a 2 = [ a 1 2 a 2 2 ] T = a 1 u 1 ( x ) + a 2 u 2 ( x )
协方差函数:
cov ( f ( x ) , f ( x ′ ) ) = a 1 ( a 1 ) ⊤ cov ( u 1 ( x ) , u 1 ( x ′ ) ) + a 2 ( a 2 ) ⊤ cov ( u 2 ( x ) , u 2 ( x ′ ) ) = a 1 ( a 1 ) ⊤ k ( x , x ′ ) + a 2 ( a 2 ) ⊤ k ( x , x ′ ) = [ a 1 ( a 1 ) ⊤ + a 2 ( a 2 ) ⊤ ] k ( x , x ′ ) define B = a 1 ( a 1 ) ⊤ + a 2 ( a 2 ) ⊤ which has rank two. = B k ( x , x ′ ) = [ b 11 b 12 b 21 b 22 ] k ( x , x ′ ) \begin{aligned}
\operatorname{cov}\left(f(\mathbf{x}), f\left(\mathbf{x}^{\prime}\right)\right) & = \mathbf{a}^1\left(\mathbf{a}^1\right)^{\top} \operatorname{cov}\left(u^1(\mathbf{x}), u^1\left(\mathbf{x}^{\prime}\right)\right) + \mathbf{a}^2\left(\mathbf{a}^2\right)^{\top} \operatorname{cov}\left(u^2(\mathbf{x}), u^2\left(\mathbf{x}^{\prime}\right)\right) \\
& = \mathbf{a}^1\left(\mathbf{a}^1\right)^{\top} k\left(\mathbf{x}, \mathbf{x}^{\prime}\right) + \mathbf{a}^2\left(\mathbf{a}^2\right)^{\top} k\left(\mathbf{x}, \mathbf{x}^{\prime}\right) \\
& = \left[\mathbf{a}^1\left(\mathbf{a}^1\right)^{\top} + \mathbf{a}^2\left(\mathbf{a}^2\right)^{\top}\right] k\left(\mathbf{x}, \mathbf{x}^{\prime}\right) \\
& \quad \text{define } \mathbf{B} = \mathbf{a}^1\left(\mathbf{a}^1\right)^{\top} + \mathbf{a}^2\left(\mathbf{a}^2\right)^{\top} \text{ which has rank two.} \\
& = \mathbf{B} k\left(\mathbf{x}, \mathbf{x}^{\prime}\right) = \left[\begin{array}{ll}
b_{11} & b_{12} \\
b_{21} & b_{22}
\end{array}\right] k\left(\mathbf{x}, \mathbf{x}^{\prime}\right)
\end{aligned} cov ( f ( x ) , f ( x ′ ) ) = a 1 ( a 1 ) ⊤ cov ( u 1 ( x ) , u 1 ( x ′ ) ) + a 2 ( a 2 ) ⊤ cov ( u 2 ( x ) , u 2 ( x ′ ) ) = a 1 ( a 1 ) ⊤ k ( x , x ′ ) + a 2 ( a 2 ) ⊤ k ( x , x ′ ) = [ a 1 ( a 1 ) ⊤ + a 2 ( a 2 ) ⊤ ] k ( x , x ′ ) define B = a 1 ( a 1 ) ⊤ + a 2 ( a 2 ) ⊤ which has rank two. = B k ( x , x ′ ) = [ b 11 b 21 b 12 b 22 ] k ( x , x ′ )
泛化到 R R R 个采样、O O O 个输出的场景
在 ICM 下,假设 O O O 个输出 { f o ( x ) } o = 1 O \{f_o(\mathbf{x})\}_{o = 1}^O { f o ( x ) } o = 1 O 都是同一个高斯过程的 R R R 个独立采样中得到。这些采样相互独立且共享同一个协方差:
f o ( x ) = ∑ r = 1 R a o r u r ( x ) f_o(\mathbf{x}) = \sum_{r=1}^R a_o^r u^r(\mathbf{x}) f o ( x ) = r = 1 ∑ R a o r u r ( x )
定义:
a r = [ a 1 r a 2 r . . . a O r ] T A = [ a 1 a 2 . . . a R ] μ ( x ) = [ μ 1 ( x ) μ 2 ( x ) . . . μ R ( x ) ] T \begin{aligned}
\mathbf{a}^r & = \left[
\begin{array}{llll} a_1^r & a_2^r & ... & a_O^r \end{array}
\right]^T \\
\mathbf{A} & = \left[
\begin{array}{llll} \mathbf{a}^1 & \mathbf{a}^2 & ... & \mathbf{a}^R \end{array}
\right] \\
\boldsymbol{\mu}(\mathbf{x}) & = \left[
\begin{array}{llll} \mu^1(\mathbf{x}) & \mu^2(\mathbf{x}) & ... & \mu^R(\mathbf{x}) \end{array}
\right]^T
\end{aligned} a r A μ ( x ) = [ a 1 r a 2 r ... a O r ] T = [ a 1 a 2 ... a R ] = [ μ 1 ( x ) μ 2 ( x ) ... μ R ( x ) ] T
向量值函数为:
f ( x ) = [ f 1 ( x ) ⋯ f O ( x ) ] ⊤ = A μ ( x ) \mathbf{f}(\mathbf{x}) = \left[f_1(\mathbf{x}) \cdots f_O(\mathbf{x})\right]^{\top} = \mathbf{A} \boldsymbol{\mu}(\mathbf{x}) f ( x ) = [ f 1 ( x ) ⋯ f O ( x ) ] ⊤ = A μ ( x )
协方差函数为:
cov [ f ( x ) , f ( x ′ ) ] = A A ⊤ k ( x , x ′ ) define B = A A ⊤ , B ∈ R O × O , B has rank R = B k ( x , x ′ ) \begin{aligned}
\operatorname{cov}\left[\mathbf{f}(\mathbf{x}), \mathbf{f}\left(\mathbf{x}^{\prime}\right)\right] & = \mathbf{A} \mathbf{A}^{\top} k\left(\mathbf{x}, \mathbf{x}^{\prime}\right) \\
& \quad \text{define } \mathbf{B} = \mathbf{A}\mathbf{A}^{\top}, \mathbf{B} \in \mathbf{R}^{O \times O}, \text{ B has rank } R \\
& = \mathbf{B} k\left(\mathbf{x}, \mathbf{x}^{\prime}\right)
\end{aligned} cov [ f ( x ) , f ( x ′ ) ] = A A ⊤ k ( x , x ′ ) define B = A A ⊤ , B ∈ R O × O , B has rank R = B k ( x , x ′ )
ICM 的特点:
如果各个任务的输出是无噪音的,那么在 isotopic data 的场景下,使用 ICM 模型和各个输出单独使用单任务高斯过程回归的结果相同。这种自动从 cokriging 到 kriging 的特性叫 autokrigeability。
5.3 Semiparametric Latent Factor Model (SLFM)
同 ICM 一样,SLFM 假设多个输出是多个采样的不同线性变换,只是这些采样来源于不同的高斯过程回归且相互独立(每个高斯过程回归中采样一个函数)。使用 Q Q Q 个高斯过程回归 μ q ( x ) ∼ G P ( 0 , k q ( x , x ′ ) ) , q ∈ { 1 , 2 , . . . , Q } \mu_q(\mathbf{x}) \sim \mathcal{GP}(\mathbf{0}, k_q(\mathbf{x}, \mathbf{x}^\prime)), q \in \{1, 2, ..., Q\} μ q ( x ) ∼ G P ( 0 , k q ( x , x ′ )) , q ∈ { 1 , 2 , ... , Q } ,得到 Q Q Q 个采样函数:{ μ q ( x ) } \{\mu_q(\mathbf{x})\} { μ q ( x )} 。Q = 1 Q = 1 Q = 1 对应 ICM 的 R = 1 R = 1 R = 1 。
同泛化的 ICM 一样,对于 O O O 个输出:
f o ( x ) = ∑ q = 1 Q a o , q μ q ( x ) f_o(\mathbf{x}) = \sum_{q=1}^Q a_{o, q} \mu_q(\mathbf{x}) f o ( x ) = q = 1 ∑ Q a o , q μ q ( x )
定义:
a q = [ a 1 , q a 2 , q . . . a O , q ] T \mathbf{a}_q = \left[\begin{array}{llll} a_{1,q} & a_{2,q} & ... & a_{O,q} \end{array}\right]^T a q = [ a 1 , q a 2 , q ... a O , q ] T
向量值函数为:
f ( x ) = [ f 1 ( x ) ⋯ f O ( x ) ] ⊤ = ∑ q = 1 Q a q μ q ( x ) \mathbf{f}(\mathbf{x}) = \left[f_1(\mathbf{x}) \cdots f_O(\mathbf{x})\right]^{\top} = \sum_{q = 1}^{Q} \mathbf{a}_q \mu_q(\mathbf{x}) f ( x ) = [ f 1 ( x ) ⋯ f O ( x ) ] ⊤ = q = 1 ∑ Q a q μ q ( x )
协方差函数为:
cov [ f ( x ) , f ( x ′ ) ] = ∑ q = 1 Q a q a q ⊤ k q ( x , x ′ ) define B q = a q a q ⊤ , The rank of each B q ∈ R O × O is one. = ∑ q = 1 Q B q k q ( x , x ′ ) \begin{aligned}
\operatorname{cov}\left[\mathbf{f}(\mathbf{x}), \mathbf{f}\left(\mathbf{x}^{\prime}\right)\right] & = \sum_{q=1}^Q \mathbf{a}_q \mathbf{a}_{q}^{\top} k_q\left(\mathbf{x}, \mathbf{x}^{\prime}\right) \\
& \quad \text{define } \mathbf{B}_q = \mathbf{a}_q \mathbf{a}_{q}^{\top}, \text{ The rank of each } \mathbf{B}_q \in \mathbf{R}^{O \times O} \text{ is one.} \\
& = \sum_{q=1}^Q \mathbf{B}_q k_q\left(\mathbf{x}, \mathbf{x}^{\prime}\right)
\end{aligned} cov [ f ( x ) , f ( x ′ ) ] = q = 1 ∑ Q a q a q ⊤ k q ( x , x ′ ) define B q = a q a q ⊤ , The rank of each B q ∈ R O × O is one. = q = 1 ∑ Q B q k q ( x , x ′ )
5.4 Linear Model of Coregionalization (LMC)
LMC 是 ICM 和 SLFM 的进一步泛化。基本假设相同,都是假设多个输出是一些采样函数的不同线性组合。不过 ICM 假设这些采样函数来源于同一个高斯过程;SLFM 假设这些采样函数来源于完全不同的高斯过程;LMC 假设这些采样函数有些来源于相同的高斯过程,有些来源于不同的高斯过程。
对于 O O O 个输出:
f o ( x ) = ∑ q = 1 Q ∑ r = 1 R q a o , q r u q r ( x ) f_o(\mathbf{x}) = \sum_{q=1}^Q \sum_{r=1}^{R_q} a_{o, q}^r u_q^r(\mathbf{x}) f o ( x ) = q = 1 ∑ Q r = 1 ∑ R q a o , q r u q r ( x )
这里有 Q Q Q 组采样,每组有 R q R_q R q 个采样函数,这 R q R_q R q 个采样函数相互独立且来源于同一个高斯过程,协方差为 k q ( x , x ′ ) k_q(\mathbf{x}, \mathbf{x}^\prime) k q ( x , x ′ ) ;所有 Q Q Q 组采样也相互独立。此时等价于 Q Q Q 个 ICM 的和 。
定义:
a q r = [ a 1 , q r a 2 , q r . . . a O , q r ] T A q = [ a q 1 a q 2 . . . a q R ] μ q ( x ) = [ μ q 1 ( x ) μ q 2 ( x ) . . . μ q R ( x ) ] T \begin{aligned}
\mathbf{a}_q^r & = \left[
\begin{array}{llll} a_{1, q}^r & a_{2, q}^r & ... & a_{O, q}^r \end{array}
\right]^T \\
\mathbf{A}_q & = \left[
\begin{array}{llll} \mathbf{a}_q^1 & \mathbf{a}_q^2 & ... & \mathbf{a}_q^R \end{array}
\right] \\
\boldsymbol{\mu}_q(\mathbf{x}) & = \left[
\begin{array}{llll} \mu_q^1(\mathbf{x}) & \mu_q^2(\mathbf{x}) & ... & \mu_q^R(\mathbf{x}) \end{array}
\right]^T
\end{aligned} a q r A q μ q ( x ) = [ a 1 , q r a 2 , q r ... a O , q r ] T = [ a q 1 a q 2 ... a q R ] = [ μ q 1 ( x ) μ q 2 ( x ) ... μ q R ( x ) ] T
则向量值函数:
f ( x ) = [ f 1 ( x ) ⋯ f O ( x ) ] ⊤ = ∑ q = 1 Q A q μ q ( x ) \mathbf{f}(\mathbf{x}) = \left[f_1(\mathbf{x}) \cdots f_O(\mathbf{x})\right]^{\top} = \sum_{q = 1}^{Q} \mathbf{A}_q \boldsymbol{\mu}_q(\mathbf{x}) f ( x ) = [ f 1 ( x ) ⋯ f O ( x ) ] ⊤ = q = 1 ∑ Q A q μ q ( x )
协方差函数:
cov [ f ( x ) , f ( x ′ ) ] = ∑ q = 1 Q A q A q ⊤ k q ( x , x ′ ) = ∑ q = 1 Q B q k q ( x , x ′ ) \operatorname{cov}\left[\mathbf{f}(\mathbf{x}), \mathbf{f}\left(\mathbf{x}^{\prime}\right)\right] = \sum_{q=1}^Q \mathbf{A}_q \mathbf{A}_q^{\top} k_q\left(\mathbf{x}, \mathbf{x}^{\prime}\right) = \sum_{q=1}^Q \mathbf{B}_q k_q\left(\mathbf{x}, \mathbf{x}^{\prime}\right) cov [ f ( x ) , f ( x ′ ) ] = q = 1 ∑ Q A q A q ⊤ k q ( x , x ′ ) = q = 1 ∑ Q B q k q ( x , x ′ )
其中 B q \mathbf{B}_q B q 通常被称为 coregionalization matrices,其秩为 R q R_q R q 。
5.5 Process Convolutions (PC)
在 LMC 中,向量值函数 f ( x ) \mathbf{f}(\mathbf{x}) f ( x ) 在 x \mathbf{x} x 点的结果,仅与采样函数在点 x \mathbf{x} x 的值有关,与采样函数其他点的值无关。这种简化的关系,使得 LMC 具有分离核(Separable Kernel)的形式。PC 使用平滑核(smoothing kernel)和采样函数做卷积,让输出和采样函数的所有点有关,对 LMC 做了进一步的泛化。因为采样函数是从高斯过程回归采样而来,因此卷积后的结果仍然是一个高斯过程,因此后验仍然具有解析解。
关于平滑核(smoothing kernel):
这里的平滑核是一类函数,但不是指核函数。卷积过程使用平滑核,本质是通过对邻域进行加权平均,生成更光滑的结果,因此有时也被称为 moving average function。
和 LMC 类似,假设有 Q Q Q 组采样,每组有 R q R_q R q 个采样函数。这 R q R_q R q 个采样函数 μ q r ( x ) , i ∈ { 1 , . . . , R q } \mu_q^r(\mathbf{x}), i \in \{1, ..., R_q\} μ q r ( x ) , i ∈ { 1 , ... , R q } 相互独立且来源于同一个高斯过程,协方差为 k q ( x , x ′ ) k_q(\mathbf{x}, \mathbf{x}^\prime) k q ( x , x ′ ) ;所有 Q Q Q 组采样函数也相互独立。对于 O O O 个输出 { f o ( x ) } o = 1 O \left\{f_o(\mathbf{x})\right\}_{o=1}^O { f o ( x ) } o = 1 O :
f o ( x ) = ∑ q = 1 Q ∑ r = 1 R q ∫ X G o , q r ( x − z ) u q r ( z ) d z + w d ( x ) = ∑ q = 1 Q f o q ( x ) + w o ( x ) , f_o(\mathbf{x}) = \sum_{q=1}^Q \sum_{r=1}^{R_q} \int_{\mathcal{X}} G_{o, q}^r(\mathbf{x} - \mathbf{z}) u_q^r(\mathbf{z}) \mathrm{d} \mathbf{z} + w_d(\mathbf{x}) = \sum_{q=1}^Q f_o^q(\mathbf{x}) + w_o(\mathbf{x}), f o ( x ) = q = 1 ∑ Q r = 1 ∑ R q ∫ X G o , q r ( x − z ) u q r ( z ) d z + w d ( x ) = q = 1 ∑ Q f o q ( x ) + w o ( x ) ,
其中:
f o q ( x ) = ∑ r = 1 R q ∫ X G o , q r ( x − z ) u q r ( z ) d z f_o^q(\mathbf{x}) = \sum_{r=1}^{R_q} \int_{\mathcal{X}} G_{o, q}^r(\mathbf{x} - \mathbf{z}) u_q^r(\mathbf{z}) \mathrm{d} \mathbf{z} f o q ( x ) = r = 1 ∑ R q ∫ X G o , q r ( x − z ) u q r ( z ) d z
且:
{ w o ( x ) } o = 1 O \left\{w_o(\mathbf{x})\right\}_{o=1}^O { w o ( x ) } o = 1 O 是相互独立,均值函数为 0 \mathbf{0} 0 ,协方差函数为 k w o ( x , x ′ ) k_{w_o}(\mathbf{x}, \mathbf{x}^\prime) k w o ( x , x ′ ) 的高斯过程。
为了保证上式的积分结果收敛,G o , q r ( x ) G_{o, q}^r(\mathbf{x}) G o , q r ( x ) 要是连续函数,且是 compact support(具有局部非零性质,使得积分不会无限大)或者平方可积(square-integrable)。
f o ( x ) f_o(\mathbf{x}) f o ( x ) 和 f o ′ ( x ′ ) f_{o^\prime}(\mathbf{x}^\prime) f o ′ ( x ′ ) 的协方差函数:
( K ( x , x ′ ) ) o , o ′ = ∑ q = 1 Q k f o q , f o ′ q ( x , x ′ ) + k w o ( x , x ′ ) δ o , o ′ \left(\mathbf{K}\left(\mathbf{x}, \mathbf{x}^{\prime}\right)\right)_{o, o^{\prime}} = \sum_{q=1}^Q k_{f_o^q, f_{o^{\prime}}^q}\left(\mathbf{x}, \mathbf{x}^{\prime}\right) + k_{w_o}\left(\mathbf{x}, \mathbf{x}^{\prime}\right) \delta_{o, o^{\prime}} ( K ( x , x ′ ) ) o , o ′ = q = 1 ∑ Q k f o q , f o ′ q ( x , x ′ ) + k w o ( x , x ′ ) δ o , o ′
其中:
k f o q , f o ′ q ( x , x ′ ) = ∑ i = 1 R q ∫ X G o , q i ( x − z ) ∫ X G o ′ , q i ( x ′ − z ′ ) k q ( z , z ′ ) d z ′ d z k_{f_o^q, f_{o^{\prime}}^q}\left(\mathbf{x}, \mathbf{x}^{\prime}\right) = \sum_{i=1}^{R_q} \int_{\mathcal{X}} G_{o, q}^i(\mathbf{x} - \mathbf{z}) \int_{\mathcal{X}} G_{o^{\prime}, q}^i\left(\mathbf{x}^{\prime} - \mathbf{z}^{\prime}\right) k_q\left(\mathbf{z}, \mathbf{z}^{\prime}\right) \mathrm{d} \mathbf{z}^{\prime} \mathrm{d} \mathbf{z} k f o q , f o ′ q ( x , x ′ ) = i = 1 ∑ R q ∫ X G o , q i ( x − z ) ∫ X G o ′ , q i ( x ′ − z ′ ) k q ( z , z ′ ) d z ′ d z
PC vs LMC
当平滑核选择狄拉克 δ \delta δ 函数 G o , q i ( x − z ) = a o , q i δ ( x − z ) G_{o, q}^i(\mathbf{x} - \mathbf{z}) = a_{o, q}^i \delta(\mathbf{x} - \mathbf{z}) G o , q i ( x − z ) = a o , q i δ ( x − z ) 时,PC 退化成 LMC。所以:
退化成 ICM:G o , q i ( x − z ) = a o , q i δ ( x − z ) , Q = 1 , R q > 1 G_{o, q}^i(\mathbf{x} - \mathbf{z}) = a_{o, q}^i \delta(\mathbf{x} - \mathbf{z}), \quad Q = 1, \quad R_q > 1 G o , q i ( x − z ) = a o , q i δ ( x − z ) , Q = 1 , R q > 1
退化成 SLFM:G o , q i ( x − z ) = a o , q i δ ( x − z ) , Q > 1 , R q = 1 G_{o, q}^i(\mathbf{x} - \mathbf{z}) = a_{o, q}^i \delta(\mathbf{x} - \mathbf{z}), \quad Q > 1, \quad R_q = 1 G o , q i ( x − z ) = a o , q i δ ( x − z ) , Q > 1 , R q = 1
退化成 LMC:G o , q i ( x − z ) = a o , q i δ ( x − z ) , Q > 1 , R q > 1 G_{o, q}^i(\mathbf{x} - \mathbf{z}) = a_{o, q}^i \delta(\mathbf{x} - \mathbf{z}), \quad Q > 1, \quad R_q > 1 G o , q i ( x − z ) = a o , q i δ ( x − z ) , Q > 1 , R q > 1
退化成 Dependent GPs:k 1 ( z , z ′ ) = σ 2 δ ( z , z ′ ) , Q = 1 , R q = 1 k_1\left(\mathbf{z}, \mathbf{z}^{\prime}\right) = \sigma^2 \delta\left(\mathbf{z}, \mathbf{z}^{\prime}\right), \quad Q = 1, \quad R_q = 1 k 1 ( z , z ′ ) = σ 2 δ ( z , z ′ ) , Q = 1 , R q = 1
6. 多任务贝叶斯优化
用多任务高斯过程回归拟合多个任务之后,多任务贝叶斯优化主要解决如何选择下一次的探测点。也就是定义多任务场景的采集函数。文章 Swersky, Snoek & Adams 2013 — Multi-Task Bayesian Optimization 介绍了将 Entropy Search 扩展到多任务场景的方法。文章 Letham et al. (2019) 介绍了将 Expected Improvement 扩展到多任务场景的方法,其实现开源在 facebook/ax 中。