【论文阅读】Towards Certified Robustness of Distance Metric Learning

【论文阅读】Towards Certified Robustness of Distance Metric Learning

距离度量学习的鲁棒性证明

时间:2022年10月26日

1. 主要贡献

  1. 主张在输入空间中引入对抗性边界,以提高度量学习算法的泛化性和鲁棒性。

  2. 引入对抗间隙(定义为输入空间中训练实例与其最接近的对抗示例之间的距离)。并证明了对抗间隙考虑了特征空间中的距离裕度以及度量和三元组约束之间的相关性。

  3. 为了增强对实例扰动的鲁棒性,提出通过最小化一个派生的新损失函数扰动损耗来扩大对抗间隙。提出的损耗可以看作是一种依赖于数据的正则化器,很容易插入到任何现有的度量学习方法中。

  4. 利用算法鲁棒性的理论技术证明了扩大间隙有利于泛化能力的提高。

2.主要内容

2.1 度量学习与泛化性

度量学习的目的是学习一个距离度量,这样语义相似的实例被拉到一起,而不相似的实例被推开。现有的许多方法都考虑最大化或至少限制特征空间中分离相似和不相似实例对的距离间隙,以保证其泛化能力(例如SVM中的间隔)。

2.2 马氏距离(Mahalanobis Distance)

马氏距离(Mahalanobis Distance)是一种距离的度量,可以看作是欧氏距离的一种修正,修正了欧式距离中各个维度尺度不一致且相关的问题。其定义为:

D M ( x , y ) = ( x − y ) T Δ ( x − y ) (1) D_M(x,y)=\sqrt {(x-y)^T\Delta (x-y)} \tag{1} DM(x,y)=(xy)TΔ(xy) (1)

其中 Δ \Delta Δ是多维随机变量的协方差矩阵,如果协方差矩阵是单位向量,也就是各维度独立同分布,马氏距离便退化为欧式距离。

马氏距离的提出,是因为欧式距离在面对维度不是独立同分布时会导致距离度量将维度的差异放大,导致学习结果的差异。在一个方差较小的维度下很小的差别就有可能成为离群点。

马氏距离的思想,便是将变量按照主成分进行旋转,让维度间相互独立,然后进行标准化,让维度同分布。

之前还学习过一个加权的欧氏距离,不知道和这个有啥联系和区别。

2.3 对抗间隙

度量学习可以使得算法具有良好的泛化能力,但如上题所说,距离度量也存在放大扰动的风险。在现有方法中广泛使用的距离间隙没有考虑到数据和学习到的度量之间的相关性。因此,它可能不足以承受在输入空间中发生的实例的小扰动,从而无法证明鲁棒性,甚至无法获得预期的泛化好处。我们引入了一种称为对抗性间隙的鲁棒性直接度量,它量化了在特征空间中不改变其最近邻居(或k个最近邻居(如果需要)的标签的情况下,训练实例可以被干扰的最大程度。

传统的基于三元组的算法,如LMNN通常对三元组施加以下约束:

f ( x i ) : = d M 2 ( x i , x l ) − d M 2 ( x i , x j ) ≥ 1 (2) f(x_i):=d^2_M(x_i,x_l)-d^2_M(x_i,x_j)\ge 1 \tag{2} f(xi):=dM2(xi,xl)dM2(xi,xj)1(2)

其中 x j , x l x_j,x_l xjxl分别是 x i x_i xi最近的相同标记和不同标记的邻近点。其中不等号右边的1表示距离水平上的单位间隙,设计用于增强模型对训练实例中的小噪声的鲁棒性。但这种间隙可能不足以承受故意操纵的扰动。故我们引入对抗距离间隙——定义为输入空间中训练实例与其最接近的对抗示例之间的距离。

一个对抗实例是一个扰动点 x i + Δ x i ( Δ x i x_i+\Delta x_i(\Delta x_i xi+Δxi(Δxi 是扰动大小),是训练实例最近的不同标记邻居,因此,它会被神经网络分类器误分类,增加kNN误分类的风险。如果一个实例的所有对抗例都远离实例本身,即不存在∆xi使得 ∥∆ x i ∥ 2 ≤ r 且 f ( x i + ∆ x i ) < 0 ∥∆x_i∥2≤r且f(x_i +∆x_i) < 0 ∥∆xi∥2rf(xi+xi)<0,则获得了较高的鲁棒性。在此基础上,我们将首先找到最接近的对抗性示例,然后将这一点从训练实例中推开。此外,由于测试实例可以被视为训练实例的扰动副本,在正确分类的训练实例上提高鲁棒性也有助于增强学习度量的泛化能力。

2.4 对抗间隙的推导

Adversarial attacks are a major concern in the field of deep learning as they can cause misclassification and undermine the reliability of deep learning models. In recent years, researchers have proposed several techniques to improve the robustness of deep learning models against adversarial attacks. Here are some of the approaches: 1. Adversarial training: This involves generating adversarial examples during training and using them to augment the training data. This helps the model learn to be more robust to adversarial attacks. 2. Defensive distillation: This is a technique that involves training a second model to mimic the behavior of the original model. The second model is then used to make predictions, making it more difficult for an adversary to generate adversarial examples that can fool the model. 3. Feature squeezing: This involves converting the input data to a lower dimensionality, making it more difficult for an adversary to generate adversarial examples. 4. Gradient masking: This involves adding noise to the gradients during training to prevent an adversary from estimating the gradients accurately and generating adversarial examples. 5. Adversarial detection: This involves training a separate model to detect adversarial examples and reject them before they can be used to fool the main model. 6. Model compression: This involves reducing the complexity of the model, making it more difficult for an adversary to generate adversarial examples. In conclusion, improving the robustness of deep learning models against adversarial attacks is an active area of research. Researchers are continually developing new techniques and approaches to make deep learning models more resistant to adversarial attacks.
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值