深度度量学习中一种常见的架构选择是卷积神经网络后接全局平均池化(GAP)。GAP 虽简单,却是一种极为高效的信息聚合方式。关于 GAP 的有效性,一种可能的解释是:将每个特征向量视为代表不同语义实体,而 GAP 是这些特征向量的凸组合。基于这一视角,我们对 GAP 进行推广,提出了一种可学习的广义求和池化方法(GSP)。GSP 通过两项独特能力对 GAP 进行改进:一是能够选择语义实体的子集,有效学习忽略干扰信息;二是学习与每个实体重要性对应的权重。形式上,我们提出了一个熵平滑的最优传输问题,并证明它是 GAP 的严格推广,即该问题的一个特定实现可还原为 GAP。我们证明该优化问题具有解析梯度,使其可直接作为 GAP 的可学习替代模块。我们还提出了一种零样本损失函数以简化 GSP 的学习过程。我们在 4 个主流度量学习基准上进行了大量评估,验证了所提方法的有效性。代码可在 GSP-DML Framework 获取。
英文摘要:
A common architectural choice for deep metric learning is a convolutional neural network followed by global average pooling (GAP). Albeit simple, GAP is a highly effective way to aggregate information. One possible explanation for the effectiveness of GAP is considering each feature vector as representing a different semantic entity and GAP as a convex combination of them. Following this perspective, we generalize GAP and propose a learnable generalized sum pooling method (GSP). GSP improves GAP with two distinct abilities: i) the ability to choose a subset of semantic entities, effectively learning to ignore nuisance information, and ii) learning the weights corresponding to the importance of each entity. Formally, we propose an entropy-smoothed optimal transport problem and show that it is a strict generalization of GAP, i.e., a specific realization of the problem gives back GAP. We show that this optimization problem enjoys analytical gradients enabling us to use it as a direct learnable replacement for GAP. We further propose a zero-shot loss to ease the learning of GSP. We show the effectiveness of our method with extensive evaluations on 4 popular metric learning benchmarks. Code is available at: GSP-DML Framework