arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2412.11299cs.LGstat.ML
收藏

如何不拼接表示以度量相似性:任务损失匹配与直接匹配

How not to Stitch Representations to Measure Similarity: Task Loss Matching versus Direct Matching

University of Szeged(塞格德大学);HUN-REN-SZTE Research Group on AI(匈牙利研究网络-塞格德大学人工智能研究组)

András Balogh, Márk Jelasity

AI总结:

本文指出任务损失匹配作为深度网络表示相似性指标具有误导性,提出直接匹配方法,并通过实验证明其能避免分布外表示问题,在结构与功能要求间取得平衡。

摘要:

度量深度神经网络内部表示的相似性是一个重要且具有挑战性的问题。模型拼接已被提出作为一种可能的方法,其中两个半网络通过将第一个半网络的输出映射到第二个半网络的输入来连接。如果拼接后的网络在特定任务上取得良好的性能,则认为这些表示在功能上是相似的。通常,映射是通过在冻结两个半网络的同时,针对当前任务训练一个仿射拼接层来创建的,这种方法称为任务损失匹配。在此,我们认为任务损失匹配作为相似性指标可能极具误导性。例如,它可能表明相距很远的层之间具有非常高的相似性,而已知这些层的表示具有不同的功能特性。此外,它可能表明相距很远的层比架构上对应的层更相似。更令人惊讶的是,当比较同一网络内的层时,任务损失匹配通常表明某些层与某一层的相似度高于该层与自身的相似度。我们认为这些问题背后的主要原因是任务损失匹配倾向于创建分布外表示以提高任务特定性能。我们证明直接匹配(即映射最小化拼接表示之间的距离)不会遭受这些问题。我们比较了任务损失匹配、直接匹配以及诸如CCA和CKA等众所周知的相似性指标。我们得出结论,直接匹配在良好相似性指标的结构性和功能性要求之间取得了良好的平衡。

英文摘要:

Measuring the similarity of the internal representations of deep neural networks is an important and challenging problem. Model stitching has been proposed as a possible approach, where two half-networks are connected by mapping the output of the first half-network to the input of the second one. The representations are considered functionally similar if the resulting stitched network achieves good task-specific performance. The mapping is normally created by training an affine stitching layer on the task at hand while freezing the two half-networks, a method called task loss matching. Here, we argue that task loss matching may be very misleading as a similarity index. For example, it can indicate very high similarity between very distant layers, whose representations are known to have different functional properties. Moreover, it can indicate very distant layers to be more similar than architecturally corresponding layers. Even more surprisingly, when comparing layers within the same network, task loss matching often indicates that some layers are more similar to a layer than itself. We argue that the main reason behind these problems is that task loss matching tends to create out-of-distribution representations to improve task-specific performance. We demonstrate that direct matching (when the mapping minimizes the distance between the stitched representations) does not suffer from these problems. We compare task loss matching, direct matching, and well-known similarity indices such as CCA and CKA. We conclude that direct matching strikes a good balance between the structural and functional requirements for a good similarity index.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑