Decoupling Semantic Similarity from Spatial Alignment for Neural Networks

What representation do deep neural networks learn? How similar are images to each other for neural networks? Despite the overwhelming success of deep learning methods key questions about their internal workings still remain largely unanswered, due to their internal high dimensionality and complexity. To address this, one approach is to measure the similarity of activation responses to various inputs. Representational Similarity Matrices (RSMs) distill this similarity into scalar values for each input pair. These matrices encapsulate the entire similarity structure of a system, indicating which input leads to similar responses. While the similarity between images is ambiguous, we argue that the spatial location of semantic objects does neither influence human perception nor deep learning classifiers. Thus this should be reflected in the definition of similarity between image responses for computer vision systems. Revisiting the established similarity calculations for RSMs we expose their sensitivity to spatial alignment. In this paper, we propose to solve this through semantic RSMs, which are invariant to spatial permutation. We measure semantic similarity between input responses by formulating it as a set-matching problem. Further, we quantify the superiority of semantic RSMs over spatio-semantic RSMs through image retrieval and by comparing the similarity between representations to the similarity between predicted class probabilities.

Paper

References (34)

Scroll for more · 22 remaining

Similar papers

Peer review

Reviewer zPy66/10 · confidence 3/52024-07-09

Summary

In this paper, the authors propose a new method to measure similarity between responses of deep neural networks in vision. They reformulate the commonly used strategy to compute Representational Similarity Matrices (RSMs) by acknowledging the superiority of the semantic information over the spatio-semantic information in the creation of RSMs. The authors perform different experiments to show the improvement over the baseline method caused by their reformulation.

Strengths

- The paper is clearly written and tackles an important topic. - The idea is original and besides its limitation connected to high computational needs, it could serve as an inspiration for future works. - Although the experiments are not exhaustive, they are convincing and coherent and the gained insights seem relevant. - Being transparent with the limitation of the method and trying to provide the means to mitigate it is a plus.

Weaknesses

- The authors should better discuss the differences between the results obtained for ViTs and CNNs in their study, which are quite well visible. E.g. while in the case of an examined CNN, the spatio-semantic RSM does not reflect well the similarities between translated images, in the case of the examined ViT (appendix), these similarities can be observed. The other thing is that the experiment is slightly different, because in the experiment with CNNs much smaller images are used than in the ViT experiment. Also, the differences are also visible in Table 1 (ResNets obtain much higher absolute correlation values for the baseline and the proposed methods than ViTs). - The authors provided few visual examples of the results of their method. It would be good to provide more of them (e.g. for different similarity metrics used, for more images and for more netorks) to enable more comprehensive qualitative evaluation (they could be placed in the appendix). - The use of some methods at work is not well justified (e.g. Pearson correlation).

Questions

- Why do the authors use Pearson correlation to examine the relationship between the Jensen-Shannon Divergence and the representational similarity? E.g. Kendall/Spearman correlation can be more robust. - The authors should focus on the differences between the results obtained for CNNs and ViTs (see the comment in the weaknesses section). - The statement in the introduction “we argue that the spatial location of semantic objects does neither influence human perception nor deep learning classifiers.” is a little bit too bold - the paper does not examine human perception, therefore it would be better to leave only the deep learning here. - Also, a minor thing is that some typos, grammatical and formatting errors can be found in the paper (e.g. the sentence starting in l79, l205: a RSM -> an RSM, l25: SAMor CLIPSeg ,the retrieval performance) - The authors could provide more examples of their method for different networks to enable their better qualitative assessment which is now limited (e.g. in the appendix).

Rating

6

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

The authors adequately discussed the biggest limitation of their work (the computational cost of their method). They could also better highlight the limited data used in the experiments caused by the mentioned computational constraints.

Reviewer xk1Y6/10 · confidence 3/52024-07-12

Summary

This paper proposes Semantic RSMs to understand the internal representations in deep neural networks. The authors argue that the current RSMs are limited by their coupling of semantic and spatial information, which restricts the assessment of similarity. The proposed semantic RSMs are spatial permutation invariant and focus solely on semantic similarity. The proposed method is shown to enhance retrieval performance and provide a more accurate reflection of the predictive behavior of classifiers.

Strengths

1. This paper is well-written and easy to follow. 2. The introduction of semantic RSMs is a significant contribution, potentially leading to more meaningful comparisons between neural network models. 3. The empirical demonstration of improved retrieval performance using semantic RSMs is convincing and adds practical value to the theoretical development.

Weaknesses

1. While the paper does highlight the high computational complexity as a limitation, it would benefit from a more detailed discussion on the scalability of the proposed method to larger models and datasets and the approximation error.

Questions

I'm not an expert in this field, so I tend to start by looking at what other reviewers think of the paper.

Rating

6

Confidence

3

Soundness

3

Presentation

3

Contribution

3

Limitations

Yes, the authors have addressed the limitations.

Reviewer sf445/10 · confidence 3/52024-07-14

Summary

The authors introduce semantic RSMs, which are designed to be invariant to the spatial arrangement of elements within images. These semantic RSMs assess similarity by treating the problem as one of set-matching, where the focus is on matching semantic content rather than spatial details. This approach not only aligns more closely with human perception but also improves the relevance and accuracy of image retrieval tasks. The paper claims that semantic RSMs offer a more robust measure of similarity by comparing them to traditional spatio-semantic methods.

Strengths

- The focus on semantic content rather than spatial arrangement aligns more closely with human perception, potentially leading to more intuitive and relevant comparisons of neural network responses. - By being invariant to spatial permutations, this method can effectively compare images where the same objects appear in different locations. - Semantic RSMs can be used as drop-in replacements for traditional RSMs.

Weaknesses

- Employing algorithms like Hungarian matching to find the optimal permutation matrix can be computationally expensive. - The effectiveness of this approach relies heavily on accurate identification and parsing of semantic concepts within images, which can be challenging in complex scenes or under conditions of visual ambiguity. - While focusing on semantic content is generally advantageous, completely ignoring spatial information can sometimes omit useful contextual cues that contribute to overall image understanding. For example, [contextual cues] a picture of a dining table with plates, utensils, and food arranged in a specific way might convey a meal setting, which could be lost if the spatial relationships are ignored. [object interactions] Images where interactions between objects are important, such as a cat sitting on a mat, might lose their interpretative meaning if spatial information is disregarded. The semantic content (cat, mat) remains the same, but the relationship changes based on their arrangement. [abstract content] In abstract art or images with non-literal interpretations, spatial composition itself can carry meaning and affect how the content is perceived and classified.

Questions

- How well does the method scale to very large datasets or to more complex neural networks that handle highly varied or abstract visual content? - How does the method perform under noisy conditions or when semantic parsing is imperfect due to occlusions or poor image quality?

Rating

5

Confidence

3

Soundness

2

Presentation

2

Contribution

2

Limitations

- To better evaluate the impact of semantic RSMs, a set of diverse metrics should be established: Evaluate semantic RSMs against traditional spatio-semantic RSMs and other state-of-the-art similarity measures to highlight the improvements or shortcomings. - The authors should explicitly state the primary objectives of employing semantic RSMs. Show that semantic RSMs can make neural network decisions more interpretable by aligning more closely with how humans perceive images. - Apply semantic RSMs in specific use cases like medical imaging, satellite image analysis, and autonomous driving where ignoring spatial arrangements can be particularly detrimental or beneficial, providing a nuanced view of their applicability.

Authorsrebuttal2024-08-14

Discussion response

Thank you for engaging with our rebuttal. We are pleased that we have addressed most of your initial concerns. Regarding the remaining issues: >What are the derived insights from the proposal? e.g., Do ViT and CNN exhibit different behaviors? What can we learn from the results? A deeper analysis is needed beyond just showing that the proposal can predict output probabilities (e.g., Table 1). We believe our paper provides a plethora of insights and is not limited to "just show[ing] that the proposal can predict output probabilities". In our paper, we: 1. Highlight that current RSM construction is flawed and has limitations of requiring spatial alignment, which has not been adequately discussed previously. 2. Introduce an algorithm that addresses this by utilizing set-matching, offering a novel approach. 3. Demonstrate the utility of our method through two applications, revealing significantly improved retrieval performance with five general-purpose feature extractors across the EgoObjects and Cityscapes datasets, and better correlation between the Jensen-Shannon Divergence of output probabilities and inter-sample similarity. We believe our work underscores a critical gap in current RSM-based methods and sets the foundation for further exploration into RSM construction, effective inter-sample similarity measures, and their applications for retrieval. >There are counterexamples where neglecting location information leads to issues (e.g., visual anagrams), where semantically different images might not be distinguishable by the proposal since it matches features at a set level. We understand your concerns regarding location information. However, __i)__ our experiments on the EgoObjects dataset, which includes varied contextual scenarios such as the meal table example, indicate that our method outperforms existing RSMs. This suggests that issues related to spatial location might either be rare or of lesser importance. __ii)__ Our method is based on learned representations. _Should a visual anagram exist where similar representations are expressed by the network, we believe this is to be a failure of the model and not our approach_. We don't believe a retrieval method should try to compensate for this. __iii)__ There are other examples where spatial position is neglected entirely: E.g. the ViT paper [1] shows (in Appendix D.4) that ViT's are able to learn meaningful representations for classification without any positional embedding, making the input a bag-of-words. > Also, how can this proposal be applied in complex scenarios, such as when the data contains multiple objects of the same class? Our method has already been successfully applied in scenarios involving multiple objects of the same class. Both retrieval datasets, EgoObjects (Figure 3) and Cityscapes (Rebuttal PDF) contain multiple objects of the same class. Additionally, one currently provided qualitative example in the paper and the additional qualitative examples in our rebuttal PDF illustrate our propose methods effectiveness in exactly such complex scenarios, highlighting retrieval on images with multiple instances of glasses or bowls. >Last but not least, the permutation matrix required for set-matching introduces high computational overhead, which could limit the applicability of the proposal to high-resolution data. We acknowledge the computational demands introduced by the permutation matrix for set-matching. Nevertheless, we have applied our method to high-resolution images (1920x1080) from the EgoObjects and Cityscapes datasets, which demonstrates its feasibility on large-scale data. If your concerns are aimed towards retrieval, we want to emphasize that retrieval is generally a two stage process (see [2] Section 4), with the first being a ranking by global cosine similarity and the second being a re-ranking of the top 100-400 cases which are most similar through e.g. our method. Hence such a two-stage application can enable our method to scale easily to any number of retrieval dataset size. Aside from this, we transparently address this limitation in our paper and have expanded on this topic in the appendix during the rebuttal phase. Moreover we'd kindly refer you to our general response which goes into more detail on the scalability of our method and would be happy to answer any more specific concerns regarding the scalability of our method should there be any remaining. We hope this addresses your concerns and look forward to any further questions you might have. [1] Dosovitskiy, Alexey, et al. "An image is worth 16x16 words: Transformers for image recognition at scale." arXiv preprint arXiv:2010.11929 (2020). [2] Cao, Bingyi, Andre Araujo, and Jack Sim. "Unifying deep local and global features for image search." Computer Vision–ECCV 2020: 16th European Conference, Glasgow, UK, August 23–28, 2020, Proceedings, Part XX 16. Springer International Publishing, 2020.

Reviewer Xdnj5/10 · confidence 2/52024-07-14

Summary

This paper makes a contribution to the construction of RSMs in the field of vision neural networks and puts forward the concept of semantic RSMs, which is innovative and theoretical.

Strengths

The proposed semantic RSMs are used for spatial alignment by means of optimal permutation, which is a relatively new and promising method. This paper verifies the validity of semantic RSMs through experiments such as image retrieval and probabilistic similarity comparison. An in-depth analysis of the experimental results is carried out, and the advantages of semantic RSMs in specific tasks are pointed out.

Weaknesses

This paper lacks the experimental verification of specific downstream tasks, such as detection and segmentation, on semantic RSMs. I need to know which scenario is more suitable for RSMs and semantic RSMs. Lack of quantitative comparative data. It is suggested to add tables or charts to show specific performance comparison data between semantic RSMs and existing methods in different tasks (such as image retrieval, class probability similarity comparison, etc.), including accuracy, time complexity and other indicators. The discussion of the experimental results was not thorough enough. It is recommended to add a detailed analysis of the experimental results to explain why semantic RSMs perform better on certain tasks, as well as possible reasons and limitations. "aligns" to "align" in line 57.

Questions

It is suggested to further elaborate the potential and specific scenarios of the research in practical applications to enhance readers' understanding of its practical value.

Rating

5

Confidence

2

Soundness

2

Presentation

2

Contribution

3

Limitations

see weekness

Reviewer zPy62024-08-12

I would like to thank the authors for their response along with some additional results and wish them good luck!

Reviewer sf442024-08-13

Post-rebuttal response

Thanks for the clarification. The paper focuses on computing representational similarity by comparing semantics with location similarity. Instead of considering both simultaneously, the proposal focuses solely on semantics. This is achieved by extracting semantic vectors from the feature tensor and comparing them as a set, rather than matching the vectors individually in spatial terms. The concept is straightforward, but the application is unclear, and the derived insights may not be sufficient for publication. Here are the remaining concerns: - What are the derived insights from the proposal? e.g., Do ViT and CNN exhibit different behaviors? What can we learn from the results? A deeper analysis is needed beyond just showing that the proposal can predict output probabilities (e.g., Table 1). - There are counterexamples where neglecting location information leads to issues (e.g., visual anagrams), where semantically different images might not be distinguishable by the proposal since it matches features at a set level. - Also, how can this proposal be applied in complex scenarios, such as when the data contains multiple objects of the same class? - Last but not least, the permutation matrix required for set-matching introduces high computational overhead, which could limit the applicability of the proposal to high-resolution data.

Program Chairsdecision2024-09-25

Decision

Accept (poster)

© 2026 NYSGPT2525 LLC