How not to Stitch Representations to Measure Similarity: Task Loss Matching versus Direct Matching
- URL: http://arxiv.org/abs/2412.11299v1
- Date: Sun, 15 Dec 2024 20:18:49 GMT
- Title: How not to Stitch Representations to Measure Similarity: Task Loss Matching versus Direct Matching
- Abstract summary: We argue that task loss matching may be very misleading as a similarity index.<n>It can indicate very high similarity between very distant layers, whose representations are known to have different functional properties.<n>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.
- Score: 0.7366405857677227
- License: http://creativecommons.org/licenses/by-sa/4.0/
- Abstract: 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.
Related papers
- Same Task, Different Circuits: Disentangling Modality-Specific Mechanisms in VLMs [49.42020616826156]
Vision-Language models (VLMs) show impressive abilities to answer questions on visual inputs, yet demonstrate higher accuracies when performing an analogous task on text.<n>We investigate this accuracy gap by identifying and comparing the textitcircuits in different modalities.<n>To overcome this, we patch the representations of visual data tokens from later layers back into earlier layers.
arXiv Detail & Related papers (2025-06-10T17:59:21Z) - Tracing Representation Progression: Analyzing and Enhancing Layer-Wise Similarity [20.17288970927518]
We study the similarity of representations between the hidden layers of individual transformers.
We show that representations across layers are positively correlated, with similarity increasing when layers get closer.
We propose an aligned training method to improve the effectiveness of shallow layer.
arXiv Detail & Related papers (2024-06-20T16:41:09Z) - Coneheads: Hierarchy Aware Attention [40.685504511826885]
We introduce cone attention, a drop-in replacement for dot product attention.
Cone attention associates two points by the depth of their lowest common ancestor in a hierarchy defined by hyperbolic cones.
We show that it improves task-level performance over dot product attention and other baselines.
arXiv Detail & Related papers (2023-06-01T06:53:14Z) - Global-Local Self-Distillation for Visual Representation Learning [41.24728444810133]
Richer and more meaningful gradients updates are key to allow self-supervised methods to learn better and in a more efficient manner.
In a typical self-distillation framework, the representation of two augmented images are enforced to be coherent at the global level.
We propose to leverage the spatial information in the input images to obtain geometric matchings.
arXiv Detail & Related papers (2022-07-29T13:50:09Z) - Similarity and Matching of Neural Network Representations [0.0]
We employ a toolset -- dubbed Dr. Frankenstein -- to analyse the similarity of representations in deep neural networks.
We aim to match the activations on given layers of two trained neural networks by joining them with a stitching layer.
arXiv Detail & Related papers (2021-10-27T17:59:46Z) - Fine-Tuned Transformers Show Clusters of Similar Representations Across
Layers [27.68150225442148]
We use centered kernel alignment (CKA) to measure the similarity of representations in task-tuned models across layers.
In experiments across twelve NLU tasks, we discover a consistent block diagonal structure in the similarity of representations within fine-tuned RoBERTa and ALBERT models.
We verify in experiments that the top few layers of fine-tuned Transformers can be discarded without hurting performance, even with no further tuning.
arXiv Detail & Related papers (2021-09-17T08:32:41Z) - Mitigating Performance Saturation in Neural Marked Point Processes:
Architectures and Loss Functions [50.674773358075015]
We propose a simple graph-based network structure called GCHP, which utilizes only graph convolutional layers.
We show that GCHP can significantly reduce training time and the likelihood ratio loss with interarrival time probability assumptions can greatly improve the model performance.
arXiv Detail & Related papers (2021-07-07T16:59:14Z) - RICE: Refining Instance Masks in Cluttered Environments with Graph
Neural Networks [53.15260967235835]
We propose a novel framework that refines the output of such methods by utilizing a graph-based representation of instance masks.
We train deep networks capable of sampling smart perturbations to the segmentations, and a graph neural network, which can encode relations between objects, to evaluate the segmentations.
We demonstrate an application that uses uncertainty estimates generated by our method to guide a manipulator, leading to efficient understanding of cluttered scenes.
arXiv Detail & Related papers (2021-06-29T20:29:29Z) - Graph Sampling Based Deep Metric Learning for Generalizable Person
Re-Identification [114.56752624945142]
We argue that the most popular random sampling method, the well-known PK sampler, is not informative and efficient for deep metric learning.
We propose an efficient mini batch sampling method called Graph Sampling (GS) for large-scale metric learning.
arXiv Detail & Related papers (2021-04-04T06:44:15Z) - Why Do Better Loss Functions Lead to Less Transferable Features? [93.47297944685114]
This paper studies how the choice of training objective affects the transferability of the hidden representations of convolutional neural networks trained on ImageNet.
We show that many objectives lead to statistically significant improvements in ImageNet accuracy over vanilla softmax cross-entropy, but the resulting fixed feature extractors transfer substantially worse to downstream tasks.
arXiv Detail & Related papers (2020-10-30T17:50:31Z) - Learning to Match Jobs with Resumes from Sparse Interaction Data using
Multi-View Co-Teaching Network [83.64416937454801]
Job-resume interaction data is sparse and noisy, which affects the performance of job-resume match algorithms.
We propose a novel multi-view co-teaching network from sparse interaction data for job-resume matching.
Our model is able to outperform state-of-the-art methods for job-resume matching.
arXiv Detail & Related papers (2020-09-25T03:09:54Z) - GOCor: Bringing Globally Optimized Correspondence Volumes into Your
Neural Network [176.3781969089004]
Feature correlation layer serves as a key neural network module in computer vision problems that involve dense correspondences between image pairs.
We propose GOCor, a fully differentiable dense matching module, acting as a direct replacement to the feature correlation layer.
Our approach significantly outperforms the feature correlation layer for the tasks of geometric matching, optical flow, and dense semantic matching.
arXiv Detail & Related papers (2020-09-16T17:33:01Z) - Fitting the Search Space of Weight-sharing NAS with Graph Convolutional
Networks [100.14670789581811]
We train a graph convolutional network to fit the performance of sampled sub-networks.
With this strategy, we achieve a higher rank correlation coefficient in the selected set of candidates.
arXiv Detail & Related papers (2020-04-17T19:12:39Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.