Source-linked AI summary
Improving neural network representations using human similarity judgments
Lukas Muttenthaler, Lorenz Linhardt, Jonas Dippel, Robert A. Vandermeulen, Katherine Hermann, Andrew K. Lampinen, Simon Kornblith
TL;DR
Pretraining objectives do not directly constrain global representation structure, which may not match human similarity organization. The paper aligns representations with human judgments while preserving their local structure. This gLocal transform improves few-shot learning and anomaly detection, while naive alignment can impair downstream performance.
Problem
Pretraining objectives encourage related images to be close but do not directly determine global organization, whose optimality is uncertain.
Source: §1 · p. 2Method
Results
Takeaways & Limitations
The results suggest that contrastive representations can contain pre-existing concepts for human-like global organization even when their global structure is not human-like.
Source: §5 · p. 10The gLocal transform does not consistently improve ImageNet performance, and the authors conjecture that success may depend on representations capturing concepts underlying human organization.
Source: §5 · p. 10
Abstract
from arXiv · showhide
Deep neural networks have reached human-level performance on many computer vision tasks. However, the objectives used to train these networks enforce only that similar images are embedded at similar locations in the representation space, and do not directly constrain the global structure of the resulting space. Here, we explore the impact of supervising this global structure by linearly aligning it with human similarity judgments. We find that a naive approach leads to large changes in local representational structure that harm downstream performance. Thus, we propose a novel method that aligns the global structure of representations while preserving their local structure. This global-local transform considerably improves accuracy across a variety of few-shot learning and anomaly detection tasks. Our results indicate that human visual representations are globally organized in a way that facilitates learning from few examples, and incorporating this global structure into neural network representations improves performance on downstream tasks.
1 Introduction
Pretraining objectives do not directly constrain global relationships among learned representations, and their implicit global organization need not be optimal. The paper aligns representations with human similarity judgments while preserving local structure, improving downstream performance where naive alignment can impair it.
1 Introduction
- Standard classification and contrastive objectives do not directly constrain global structure, leaving the arrangement of separated clusters weakly determined.For example, class separability does not require tabby cats to be nearer other cat breeds than raccoons.Source: §1 · p. 2
- Implicit global organization in learned representations reflects visual similarity and model inductive biases, but may not be optimal.Representations have been observed to cluster roughly by superclasses and to resemble human- or brain-derived similarity structures.Source: §1 · p. 2
- The paper studies explicit global supervision from human triplet judgments, using alignment images three to six orders of magnitude fewer than pretraining images.Participants choose the odd image out among three, providing supervision for relationships among disparate concepts.Source: §1 · p. 2
- The gLocal transform substantially improves few-shot learning and anomaly-detection performance, whereas naive alignment impairs performance.It also achieves human alignment only marginally below the naive transform.Source: §1 · p. 3
2 Related work
Prior work finds that learned representations capture some human-like structure but do not fully reflect human similarity judgments. This section situates the paper's question of whether transforming representations toward human knowledge improves transfer.
2 Related work
- Representation research studies how training shapes features, since better task performance does not necessarily produce more transferable representations.Prior work also reports shortcut learning and implicit capture of some higher-order category structure.Source: §2 · p. 3
- Human representations combine perceptual and semantic features across multiple hierarchy levels, while models may capture only parts of this structure.Some work finds image-text models more human-aligned, and language can sometimes estimate human similarity more accurately than image representations.Source: §2 · p. 3
- Prior studies report that more human-aligned models can be more robust on few-shot tasks, motivating tests of whether alignment transformations improve transfer.Other work examines higher-level category structure, but the downstream effect of transforming representations toward human knowledge remains the question here.Source: §2 · p. 3
3 Methods
The methods align model similarity spaces with human odd-one-out judgments and introduce a transform that combines global alignment with preservation of local structure. Few-shot learning and anomaly detection are used to assess downstream transfer.
3 Methods
- Human alignment is measured using THINGS, a behavioral dataset with 4.70 million triplet responses from 12,340 participants for 1,854 natural-object images.Source: §3 · p. 3
- Triplet odd-one-out alignment evaluates whether representation similarities identify the pair humans judge most similar, leaving the remaining image as the odd one out.The alignment loss models the likelihood of a pair being most similar from the three pairwise similarities.Source: §3 · pp. 3–4
- The naive transform maximizes human alignment with L2 regularization, but does not encourage the transformed space to resemble the original.Its regularization parameter is selected by grid search with cross-validation.Source: §3 · p. 4
- The global transform instead regularizes the linear map toward a scaled identity, thereby favoring representations closer to the original space.Its regularization parameter is also selected by grid search with cross-validation.Source: §3 · p. 4
- The gLocal transform combines human-alignment and local contrastive losses to preserve original neighborhoods while incorporating global structure.Its balance parameter trades off alignment and local-structure preservation.Source: §3 · pp. 4–5
3.1 Downstream tasks
- Few-shot learning uses multinomial logistic regression, while anomaly detection uses k-nearest neighbors in a one-versus-rest setting.The few-shot regularization parameter is selected by cross-validation; anomaly-detection classes are treated in turn as nominal against the remaining classes.Source: §3.1 · p. 5
4 Experimental results
The experiments test whether human-similarity alignment can reshape global representations while preserving local structure, and assess downstream few-shot, anomaly-detection, and human-alignment outcomes. The gLocal transform generally improves few-shot and anomaly-detection performance, with dataset- and model-specific exceptions.
4.1 Experimental setup
- Experiments cover few-shot (FS) and anomaly-detection (AD) tasks, examine gLocal effects on local and global similarity, and assess image/text representational alignment on four human similarity-judgment datasets.Fine-grained FS uses CIFAR-100, SUN397, and DTD; coarse-grained FS uses Entity-{13,30}, where train and test superclasses are guaranteed disjoint due to a subpopulation shift.Source: §4 · p. 5, §4.3 · p. 7
4.2 Impact of transforms on global and local structure
- gLocal and global transforms resemble the naive transform in their top 10 principal components, but resemble the original representation in the remaining PCs.LCKA results and PCA/t-SNE visualizations indicate global structure like the naive transform and local structure like the untransformed representation.Source: Figure 3 · p. 6, §4.2 · pp. 6–7, Figure 4 · p. 6
- 76.3% of images retain their original closest neighbor among transformed-space neighbors with gLocal, versus 73.7% with the global transform and 12.2% with the naive transform.Figure 2 plots the percentage of images whose original nearest neighbor remains among the k closest after transformation.Source: Figure 2 · p. 6, §4.2 · p. 6
- Alignment transforms generally bring categories within a superordinate category closer and move different superordinate categories apart, with sensible exceptions such as food and drink moving closer.Source: §4.2 · p. 7
4 Experimental results
- Across few-shot and anomaly-detection tasks, gLocal generally improves performance, with exceptions for some fine-grained datasets and ImageNet models.For anomaly detection, improvements span the considered datasets for almost every image/text model; distribution-shift results are described as particularly striking.Source: §4.3 · p. 7, §4.4 · pp. 7–8
4.3 Few-shot learning
- gLocal substantially improves few-shot performance across coarse- and fine-grained tasks for the considered image/text models, but not uniformly across datasets or model families.LAION-trained CLIP models show no improvement on CIFAR-100 and DTD; ImageNet models improve on Entity-13/30 and show almost no impact on the remaining datasets.Source: §4.3 · p. 7
4.4 Anomaly detection
- gLocal substantially improves anomaly-detection performance across considered datasets for almost every image/text model, but ImageNet models show no improvement over untransformed representations.The paper also reports particularly striking improvements on distribution-shift datasets, where global similarity structure appears crucial for generalizing between superclasses.Source: §4.4 · pp. 7–8
4.5 Representational alignment
- gLocal incurs almost no representational-alignment trade-off relative to the naive transform, and both transforms produce global similarity structures that closely resemble human RSMs.The global RSM structures for the naive and gLocal transforms are described as qualitatively identical and close to human RSMs.Source: §4.5 · p. 8, Table 4 · p. 9
5 Discussion
Humans organize concepts with rich semantic features and global constraints, while gLocal alignment substantially improves downstream performance across few-shot and anomaly-detection tasks. The discussion also identifies boundaries to these gains and possible explanations for how global structure arises.
5 Discussion
- gLocal improves downstream performance over original and naively aligned representations across few-shot and anomaly-detection tasks, reaching state of the art on CIFAR-100 coarse anomaly detection.It approaches state of the art on other anomaly-detection benchmarks.Source: §5 · p. 9
- The gLocal representation transfers across human similarity datasets and achieves almost equally strong alignment as the naive approach [61].The authors take this as evidence that gLocal captures human notions of object similarity.Source: §5 · p. 9
- gLocal also improves results when combined with Tip-Adapter [93], a few-shot method for pretrained image/text representations.The comparison is against using Tip-Adapter without gLocal.Source: §5 · p. 9
- Optimizing gLocal with human-adversarial triplets either leaves representations and downstream performance unchanged or substantially deteriorates performance.The authors suggest the benefit most likely comes from an inductive bias about global object similarity.Source: §5 · p. 10
- The transform does not consistently improve ImageNet performance, and human judgments are costlier than other supervision and cover only 1,854 alignment images.The authors note that important human concepts may be absent from both these images and the pretrained representations.Source: §5 · p. 10
- Despite hundreds of millions of image/text pairs, contrastive learning does not produce human-like global organization; the authors suggest its global structure may depend on initialization.They also propose that image/text pairs may lack adequate global supervision, or that contrastive learning may not use available global signals.Source: §5 · p. 10
A Experimental details
The appendix documents the model features and procedures used to probe gLocal, evaluate few-shot transfer, and assess anomaly detection. It reports the selected probing hyperparameters and describes each evaluation protocol.
A.1 Model features
- Features came from penultimate layers of four ImageNet models and image encoders of four image/text models, including CLIP trained on WIT and Laion datasets.The listed models were AlexNet, VGG-16, ResNet-18, ResNet-50, CLIP RN50, and CLIP ViT-L/14.Source: §A.1 · p. 18
A.2 gLocal probing
- For CLIP RN50 and ViT-L/14 trained on WIT, α = 0.1, λ = 0.1, and η = 0.001 gave the lowest alignment loss and highest probing odd-one-out accuracy.The selection used a grid search; η = 0.001 generally performed best, while results were fairly insensitive to τ.Source: §A.2 · p. 18, Figure 6 · p. 18
A.3 Few-shot learning
- Few-shot experiments selected the ℓ2-regularization parameter using n_s-fold cross-validation, where n_s is the number of shots per class.The selected multinomial logistic regression was then refit.Source: §A.3 · p. 19
A.4 Anomaly Detection
- Anomaly detection evaluated one-vs-rest and leave-one-out class splits using nearest-neighbor cosine distances, with AUROC as the performance measure.The anomaly score averaged cosine distances to the k nearest normal training representations; experiments used k = 5, and performance was fairly insensitive to k.Source: §A.4 · p. 19
B What changes in the global structure of the representations after alignment?
Alignment reorganizes distances in ways that reflect human semantic groupings: related items and items within superordinate categories tend to move closer, while many distinct categories move farther apart. gLocal broadly follows the naive transform's pattern but with less varied changes.
B What changes in the global structure of the representations after alignment?
- Semantically related items such as curry and scrambled egg tend to move closer, while items such as handcuff and stethoscope tend to move farther apart.These examples are among the largest relative distance changes under naive alignment; gLocal changes are correlated with, but generally less varied than, naive changes.Source: B What changes in the global structure… · p. 20, Table 5 · p. 20
- Under naive alignment, items within superordinate categories tend to move slightly closer while items across categories move substantially farther apart, reflecting human semantic organization.Drink, food, plant, and animal categories show notable changes; food and drink are among the few category pairs whose distance decreases.Source: B What changes in the global structure… · p. 20, Figure 7 · p. 21
- The gLocal and naive transforms show strongly correlated distance-change patterns (r = 0.96, p ≤10^-16), but gLocal changes distances less.The figure describes a similar overall movement pattern under both transforms, with greater overall spreading under gLocal.Source: B What changes in the global structure… · p. 20, Figure 7 · p. 21
C Visualization of neighboring images
The neighbor visualization compares untransformed, gLocal, and naive representations for each anchor image. Untransformed and gLocal neighbors are generally similar, whereas naive-transform neighbors often differ.
C Visualization of neighboring images
- Neighbors in untransformed and gLocal spaces are generally similar, while naive-space neighbors are frequently different.The comparison uses nine anchor images and class-diverse nearest neighbors.Source: C Visualization of neighboring images · p. 21, Figure 8 · p. 22
- Naive neighbors appear to discard non-semantic image properties, while untransformed and gLocal neighbors remain sensitive to pose, color, and numerosity.Where the closest neighbor differs between naive and gLocal representations, the authors say the gLocal match is arguably better.Source: C Visualization of neighboring images · p. 21
- For each anchor, the visualization places the anchor image at left and shows nearest neighbors from untransformed, gLocal, and naive representations in separate rows.The ten closest images are selected subject to each coming from a unique class.Source: Figure 8 · p. 22
D Additional results on downstream tasks
Across the ImageNet and image/text models examined, few-shot learning and anomaly detection performance are strongly positively related.
Downstream task relationship
- r = 0.8524 (p ≤10−6) links average few-shot learning and anomaly detection performance across the examined ImageNet and image/text models.The relationship holds for original, naive-transformed, and gLocal-transformed representations.Source: D Additional results on downstream tasks · p. 23, Figure 9 · p. 23
D.1 Few-shot learning
Additional analyses examine how gLocal performs across few-shot and anomaly-detection settings, compare it with a global transform, and describe how human and network similarity matrices are constructed.
D.1 Few-shot learning
- gLocal improves few-shot accuracy in most Tip-Adapter scenarios, especially on Entity-{13,30}; ImageNet-model results are mixed, including negative impacts on several datasets.The Tip-Adapter increase appears stronger for OpenAI WIT models than LAION models; varying training-set size yields robust results, especially for CLIP, with largest benefits in low-data regimes.Source: §D.1 · pp. 23–24, Table 6 · p. 23, Table 7 · p. 24
D.2 Anomaly detection
- Across one-vs-rest and LOO/CIFAR10-vs-CIFAR100 anomaly detection, gLocal improves image/text models but not ImageNet models; nearest-neighbor k has little impact.The k observation holds across image/text models.Source: §D.2 · pp. 25–26
D.3 Global versus gLocal transform
- gLocal generally yields larger downstream-task improvements than the global transform, except for anomaly detection with CLIP RN50 and CLIP ViT-L/14 (WIT).The comparison averages few-shot results and anomaly-detection results across the reported tables.Source: Table 13 · p. 27, §D.3 · p. 27
D.4 Human-adversarial experiments
- The human-adversarial transform performs slightly worse than the original and substantially worse than gLocal across tasks for all CLIP models.The adversarial triplets replace each human-selected odd-one-out with a randomly chosen alternative from the other two objects.Source: §D.4 · p. 27
E.1 Human similarity judgments and RSMs
- Triplet odd-one-out judgments do not directly yield a similarity matrix; VICE learns object representations from responses, whose similarities are converted into an RSM.The final softmax step models pairwise similarities according to the triplet odd-one-out objective.Source: §E.1 · p. 28
E.2 Neural network representations and RSMs
- Network RSMs use Pearson correlations between image embeddings, with transforms applied before calculation; embeddings come from ImageNet penultimate layers or image/text image encoders.The passage describes Pearson correlation as centered cosine similarity and a more robust measure.Source: §E.2 · p. 28
E.3 Representational Similarity Analysis (RSA)
The figure contrasts human similarity RSMs with those from two CLIP models across four datasets and three representation spaces.
E.3 Representational Similarity Analysis (RSA)
- The four datasets’ human RSMs are compared with original, naive-transformed, and gLocal RSMs for CLIP RN50 and ViT-L/14.The figure places human RSMs in the leftmost column, original representations in the second, naive transforms in the third, and gLocal transforms at right.Source: Figure 14 · p. 29
F Global transform derivation
The global-transform derivation concludes by substituting an expression involving the mean diagonal of W; the following section describes linear CKA as a representation-similarity measure.
F Global transform derivation
- The derivation concludes after substituting the expression involving the mean diagonal of W and reversing the preceding steps.The supplied derivation passage gives the diagonal-average term as ℓ=1 Wℓℓ/p.Source: F Global transform derivation · p. 30
G Properties of LCKA
- Linear CKA compares centered representation Gram matrices; equivalently, it weights principal-component cosine similarities by the products of their explained-variance proportions.The representations are centered by subtracting column means.Source: G Properties of LCKA · p. 30
Related papers
This paper cites
- Learning Transferable Visual Models From Natural Language Supervision2021
- Very Deep Convolutional Networks for Large-Scale Image Recognition2014
- PyTorch: An Imperative Style, High-Performance Deep Learning Library2019
- A Simple Framework for Contrastive Learning of Visual Representations2020
- Bootstrap your own latent: A new approach to self-supervised Learning2020
- Shortcut Learning in Deep Neural Networks2020