[半监督学习] Deep Metric Learning-Based Semi-Supervised Regression With Alternate Learning

论文地址: Deep Metric Learning-Based Semi-Supervised Regression With Alternate Learning
代码地址: https://git.tu-berlin.de/rsim/DML-S2R
会议: ICIP 2022
任务: 回归

与之前的一篇文章 MSSR 类似, 在 MSSR 中, 通过度量学习来学习嵌入空间, 在新空间上执行目标数据点的回归估计. 并且都利用了孪生神经网络(Siamese neural network, SNN). 关于孪生神经网络的定义已在 MSSR 中进行相关介绍.

DML-S2R 旨在通过有效地利用未标记数据和标记数据来学习相似样本的度量空间. DML-S2R 方法由两个主要步骤组成: i) 使用标记数据进行成对相似性建模; ii) 具有大量未标记数据的基于三胞胎网络(Triplet network, 是孪生神经网络的变体形式)的度量学习. 如下图所示:
在这里插入图片描述
符号系统定义如下:

  • S = { ( x i l , y i l ) } i = 1 N \mathcal{S}=\{(x_i^l,y_i^l)\}_{i=1}^N S={(xil,yil)}i=1N 表示标记数据集.
  • U = { x j u } j = 1 M \mathcal{U}=\{x_j^u\}_{j=1}^M U={xju}j=1M 表示未标记数据集.
  • T = S ∪ U \mathcal{T}= \mathcal{S} \cup \mathcal{U} T=SU 表示训练集.
First Step: 使用标记样本训练孪生网络进行成对相似性建模

第一步主要进行相似性度量. 利用对比损失函数, 根据训练样本的目标值选择相似和不相似的对. DML-S2R 学习一个函数 f d f^d fd, 它用来估计两个标记样本的目标值差异:
f d ( x i l , x j l ) = y i l − y j l (1) f^d(x_i^l,x_j^l)=y_i^l-y_j^l \tag{1} fd(xil,xjl)=yilyjl(1)
对于有 N N N 个样本的标记数据, 训练时会产生 N ( N − 1 ) N(N-1) N(N1) 对样本. 在 SNN 中, 对于输入数据对 { ( x i l , x j l ) } \{(x_i^l,x_j^l)\} {(xil,xjl)}, 网络输出其相似性结果 f d ( { ( x i l , x j l ) } ) f^d(\{(x_i^l,x_j^l)\}) fd({(xil,xjl)}). 令 z i j z_{ij} zij 表示两个数据的目标差值, 定义损失函数如下:
L P S M = 1 N ( N − 1 ) ∑ i = 1 N ∑ j = 1 N 1 [ i ≠ j ] ( z i j − f d ( x i l , x j l ) ) 2 (2) \mathcal{L}_{\mathrm{PSM}}=\frac{1}{N(N-1)}\sum_{i=1}^N\sum_{j=1}^N\mathbb{1}_{[i \neq j]}(z_{ij}-f^d(x_i^l,x_j^l))^2 \tag{2} LPSM=N(N1)1i=1Nj=1N1[i=j](zijfd(xil,xjl))2(2)
其中 1 \mathbb{1} 1 表示指数函数. 使用该损失函数训练 SNN, SNN 模型学习完成后, 就可用其生成样本相似度的特征空间, 做为 Second Step 的基础.

Second Step: 使用未标记数据训练三胞胎网络进行度量学习

第二步旨在学习度量空间. 通过基于三胞胎的 DML 来实现, 该 DML 不仅考虑了标记样本, 还考虑了未标记样本. 基于三胞胎的 DML 需要一个三元组来表征度量空间. 因此, 将第一步的 SNN 转换为基于三胞胎的 SNN, 方法是在不改变权重的情况下, 对一个子网络复制三次, 从而使其适用于基于三胞胎的 DML.

标准三元组由一个锚定样本, 一个与锚定样本相似的正样本, 一个与锚定样本不同的负样本组成. 在这里, 锚定样本 x a l x_a^l xal S \mathcal{S} S 中选取, 根据与锚定样本的目标值差异, 使用第一步中的 f d f^d fd U U U 中选取一组正样本 P x a l \mathbb{P}_{x_a^l} Pxal 和一组负样本 N x a l \mathbb{N}_{x_a^l} Nxal, 每组的大小为 k k k. 具体选择算法如下:
在这里插入图片描述

  • 使用 f d f^d fd 估计每对的目标值差异. 与锚点差异最小的 k k k 个未标记样本被选择用于 P x a l \mathbb{P}_{x_a^l} Pxal.
  • 与锚点差异最大的 k k k 个未标记样本被选择用于 N x a l \mathbb{N}_{x_a^l} Nxal.

在为所有锚定样本选择正负集后, 采用排序列表损失函数:
w ( x a l , x j u ) = exp ⁡ ( τ ( d ( x a l , x j u ) − ( α − m ) ) ) , L P ( x a l , S ) = ∑ x j u ∈ S w ( x a l , x j u ) ∑ x j u ∈ S w ( x a l , x j u ) L m ( x a l , x j u ) , L R L L = 1 2 N ∑ i = 1 N L P ( x a l , P x a l ) + L P ( x a l , N x a l ) (3) w(x_a^l,x_j^u)=\exp(\tau(d(x_a^l,x_j^u)-(\alpha-m))), \\ \mathcal{L}_P(x_a^l,\mathbb{S})=\sum_{x_j^u\in \mathbb{S}}\frac{w(x_a^l,x_j^u)}{\sum_{x_j^u \in \mathbb{S}}w(x_a^l,x_j^u)}\mathcal{L}_m(x_a^l,x_j^u), \\ \mathcal{L}_{\mathrm{RLL}}=\frac{1}{2N}\sum_{i=1}^N\mathcal{L}_P(x_a^l,\mathbb{P}_{x_a^l})+\mathcal{L}_P(x_a^l,\mathbb{N}_{x_a^l}) \tag{3} w(xal,xju)=exp(τ(d(xal,xju)(αm))),LP(xal,S)=xjuSxjuSw(xal,xju)w(xal,xju)Lm(xal,xju),LRLL=2N1i=1NLP(xal,Pxal)+LP(xal,Nxal)(3)
其中, τ \tau τ 为温度参数, α \alpha α 为负样本边界, m m m 为边距, d d d 为测量特征空间两个样本间的欧几里得距离, L m \mathcal{L}_m Lm 为边际损失函数.

整个学习过程从第一步训练 SNN 一个 epoch 开始, 同时最小化 L P S M \mathcal{L}_{\mathrm{PSM}} LPSM. 然后, 使用所有锚定样本和相关的正负集对 SNN 进行一个 epoch 训练, 同时最小化 L R L L \mathcal{L}_{\mathrm{RLL}} LRLL.

在两个步骤之间交替进行训练, 直到两个损失函数收敛. DML-S2R 训练完成后, 对于一个新样本 x ∗ x^* x 的目标值估计如下:
y ∗ = 1 N ∑ i = 1 N f d ( x ∗ , x i l ) − f d ( x i l , x ∗ ) 2 + y i l (4) y*=\frac{1}{N}\sum_{i=1}^N\frac{f^d(x^*,x_i^l)-f^d(x_i^l,x^*)}{2}+y_i^l \tag{4} y=N1i=1N2fd(x,xil)fd(xil,x)+yil(4)

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Semi-supervised classification with graph convolutional networks (GCNs) is a method for predicting labels for nodes in a graph. GCNs are a type of neural network that operates on graph-structured data, where each node in the graph represents an entity (such as a person, a product, or a webpage) and edges represent relationships between entities. The semi-supervised classification problem arises when we have a graph where only a small subset of nodes have labels, and we want to predict the labels of the remaining nodes. GCNs can be used to solve this problem by learning to propagate information through the graph, using the labeled nodes as anchors. The key idea behind GCNs is to use a graph convolution operation to aggregate information from a node's neighbors, and then use this aggregated information to update the node's representation. This operation is then repeated over multiple layers, allowing the network to capture increasingly complex relationships between nodes. To train a GCN for semi-supervised classification, we use a combination of labeled and unlabeled nodes as input, and optimize a loss function that encourages the network to correctly predict the labels of the labeled nodes while also encouraging the network to produce smooth predictions across the graph. Overall, semi-supervised classification with GCNs is a powerful and flexible method for predicting labels on graph-structured data, and has been successfully applied to a wide range of applications including social network analysis, drug discovery, and recommendation systems.

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值