Steck, Ekanadham, and Kallus [arXiv:2403.05440] demonstrate that cosine similarity of learned embeddings from matrix factorization models can be rendered arbitrary by a diagonal ``gauge'' matrix $D$. Their result is correct and important for practitioners who compute cosine similarity on embeddings trained with dot-product objectives. However, we argue that their conclusion, cautioning against cosine similarity in general, conflates the pathology of an incompatible training objective with the geometric validity of cosine distance on the unit sphere. We prove that when embeddings are constrained to the unit sphere $\mathbb{S}^{d-1}$ (either during or after training with an appropriate objective), the $D$-matrix ambiguity vanishes identically, and cosine distance reduces to exactly half the squared Euclidean distance. This monotonic equivalence implies that cosine-based and Euclidean-based neighbor rankings are identical on normalized embeddings. The ``problem'' with cosine similarity is not cosine similarity, it is the failure to normalize.
Cosine Normalization: Using Cosine Similarity Instead of Dot Product in Neural Networks
Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);Beijing Academy of Frontier Science and Technology(北京前沿科学技术研究院)
Enhancing Adversarial Robustness through Multi-Objective Representation Learning
Safe Autonomous Systems, TU Dortmund University, Germany(安全自主系统,图恩多特大学,德国);Lamarr Institute for Machine Learning and Artificial Intelligence(拉马尔机器学习与人工智能研究所)
本文介绍了语音技术中心(STC)的说话人识别(SR)系统提交给VOiCES From a Distance Challenge 2019。挑战的SR任务集中在嘈杂条件下的单通道远场/远场音频中的说话人识别问题。在这项工作中,我们研究了不同的深度神经网络架构的说话人嵌入提取,以解决这个问题。我们发现,具有残留帧级连接的深度网络优于更浅的架构。本文研究了简单的基于能量的语音活动检测器(SAD)和基于SAD的自动语音识别(ASR)。我们还解决了鲁棒嵌入提取器训练的数据准备问题。使用自动房间脉冲响应发生器进行数据增强的混响。在我们的系统中,我们使用区分训练的余弦相似性度量学习模型作为嵌入后端。对我们使用的每个单独子系统应用评分标准化程序。我们最终提交的系统是基于不同子系统的融合。在VOiCES开发和评估集上获得的结果证明了所提出的系统在噪声条件下处理远场/远场音频时的有效性和鲁棒性。