Learning Human-Aligned Representations with Contrastive Learning and Generative Similarity
Raja Marjieh, Sreejan Kumar, Declan Campbell, Liyi Zhang, Gianluca Bencomo, Jake Snell, Thomas L. Griffiths
TL;DR
The paper addresses learning representations aligned with human cognition by integrating a Bayesian notion of generative similarity into contrastive learning. Generative similarity $s_{\text{gen}}$ is defined as the Bayes odds ratio for two samples coming from the same distribution, and is incorporated into a contrastive objective to shape embeddings toward human-like structure. Across shape regularity, abstract Euclidean geometry via probabilistic programs (Geoclidean), and hierarchical ImageNet categories, GenSim improves alignment with human behavior over standard contrastive or supervised baselines. The results demonstrate closed-form and programmatic generative similarities that enable few-shot generalization and hierarchical decoding, offering a scalable path to human-centric representations with domain-informed priors. This approach reduces reliance on large-scale human judgments while preserving the ability to capture nuanced cognitive structure.
Abstract
Humans rely on effective representations to learn from few examples and abstract useful information from sensory data. Inducing such representations in machine learning models has been shown to improve their performance on various benchmarks such as few-shot learning and robustness. However, finding effective training procedures to achieve that goal can be challenging as psychologically rich training data such as human similarity judgments are expensive to scale, and Bayesian models of human inductive biases are often intractable for complex, realistic domains. Here, we address this challenge by leveraging a Bayesian notion of generative similarity whereby two data points are considered similar if they are likely to have been sampled from the same distribution. This measure can be applied to complex generative processes, including probabilistic programs. We incorporate generative similarity into a contrastive learning objective to enable learning of embeddings that express human cognitive representations. We demonstrate the utility of our approach by showing that it can be used to capture human-like representations of shape regularity, abstract Euclidean geometric concepts, and semantic hierarchies for natural images.
