Prior-Fitted and Frozen Scorers for Multimodal Contrastive Learning
Authors: Tillmann Rheude, Roland Eils, Benjamin Wild
Organizations: Berlin Institute of Health, Charité - Universitätsmedizin Berlin · Department of Mathematics and Computer Science, Freie Universität Berlin · Intelligent Medicine Institute, Fudan University
Multimodal contrastive learning typically relies on manually specified scoring functions, such as cosine similarity, to quantify the similarity between representations from different modalities. Several such functions have been recently proposed to extend contrastive learning beyond two modalities. In principle, however, any function that assigns high compatibility to matched samples and low compatibility to mismatched ones could serve as a scorer. Motivated by this broader view, we instantiate the scorer with a Transformer and find that even a randomly initialized model, when kept frozen, can outperform strong handcrafted multimodal contrastive baselines, whereas optimizing the scorer jointly with the encoders is less effective. Building on this observation, we introduce the Prior-Fitted Scorer (PFS): a Transformer scorer pre-trained on synthetic multimodal data generated from structural causal model (SCM) priors before transferring it to real-world data. The SCM exposes the scorer to diverse dependency structures, including shared, pairwise, and private information, providing a structured prior over higher-order cross-modal similarity. Across four real-world datasets, frozen Transformer scorers are competitive to contrastive baselines, and prior-fitting further improves the random initialization. More broadly, our results suggest that multimodal contrastive learning need not rely on manual similarity functions: Transformers can provide strong inductive biases, while causal pretraining can further shape these biases.
Figures & tables
Figure 1: Overview of the Prior-Fitted Scorer (PFS) , illustrated on the trimodal MIMIC-Symile setting ( Saporta et al., 2024 ) . (a) We sample latent causal structures and generate synthetic multimodal tuples from an SCM prior M . (b) A Transformer scoring function sθ is pretrained on these synthetic tuples to distinguish compatible from mismatched multimodal combinations with loss L , thereby shaping its inductive bias. (c) The PFS is transferred to the real dataset and kept frozen while the modality encoders Ei are optimized through the contrastive objective. (d) After extensive tuning, the PFS is evaluated on zero-shot predicting the future chest X-ray. Overall, a PFS replaces a manually specified similarity function with a Transformer whose structure is learned from a synthetic causal prior.
Figure 2: Overview of synthetic multimodal data generation and contrastive prior-fitting. A DAG G defines causal dependencies among latent variables, while the binary assignment matrix A selects the latent subsets contributing to each modality, inducing shared, subset-specific, and modality-private information. The selected latent variables are combined through linear and nonlinear readouts to produce modality vectors. During prior-fitting, matched tuples contain modalities from the same synthetic sample, whereas negatives are formed by replacing the target modality with a sampled mismatched candidate before scoring with sθ .
Dataset
# Samples
Modalities
MIMIC-IV ( Johnson et al., 2023b ; Johnson et al., 2023a )
52,802
Reports, Clinicals, Demographics
MIMIC-Symile ( Saporta et al., 2024 )
10,345
Chest X-rays, ECGs , laboratory
UKB ( Sudlow et al., 2015 )
486,400
Proteomics, Metabolomics, EHR
INSPECT ( Huang et al., 2023 )
22,449
CTs, Reports, EHR
Table 1: Trimodal benchmark datasets with retrieval modality as first listed modality.
Scorer
INSPECT ↑
UKB ↑
MIMIC-Symile ↑
MIMIC-IV ↑
Baselines
Clip
0.5548±0.005
0.4738±0.008
0.3109±0.006
0.6503±0.001
Triangle
0.5183±0.014
0.5259±0.009
0.4477±0.005
0.6476±0.003
Gram
0.4586±0.012
0.4623±0.009
0.3240±0.005
0.6454±0.002
Symile
0.6979±0.003
0.5554±0.005
0.4707±0.008
0.6562±0.003
Proposed
Table 2: Comparison of well-tuned models optimized with different multimodal contrastive objectives. Values represent top-1 accuracy of the retrieval task (mean ± SE ). Best non-overlapping value bold.
Figure 3: Validation performance of well-tuned baselines, the frozen Transformer and the PFS on the UKB . a) Scaling the prior-fitting with more sampled SCMs improves transfer to real-world data. b) Using the frozen PFS leads to faster convergence and higher retrieval accuracy than the baselines.
Table 6
Ablation
Top-1 Acc ↑
Only private information SCMs
0.3170±0.007
Transformer scorer (frozen, Xavier)
0.4462±0.005
Permute BC
0.4643±0.003
2k SCMs
0.4723±0.015
Remove DAG edges
0.5431±0.008
5k SCMs
0.5527±0.003
Table 5: Ablation study for the SCM design and prior-fitting the PFS on the UKB dataset.
Metric
MLP
Transformer
PFS
Clip
Triangle
Gram
Symile
Training step wall time (s) ↓
0.049
0.244
0.244
0.032
0.031
0.035
0.038
Table 6: Wall time for the frozen Transformer, PFS , and the baselines averaged over 10 epochs.
Multimodal contrastive learning aligns representations from different data types so models can connect related images, text, audio, signals, and other modalities.
Multimodal contrastive learning is a dominant paradigm for learning transferable representations from unlabeled data, but standard objectives primarily capture information that is redundant between modalities. Partial Information Decomposition (PID) shows that task-relevant information in multimodal data decomposes into three components: redundancy shared between modalities, uniqueness specific to each modality, and synergy available only from their joint observation. Recent frameworks extend contrastive learning to capture all three components, yet synergy remains undertrained in practice. We propose SynCo (Synergy Contrastive Learning), a method that directly addresses synergy undertraining through dedicated supervision on an interaction residual. SynCo fits a linear projector to predict the fused representation from independently computed unimodal features, and the resulting interaction residual, which removes the linearly unimodal-predictable component, receives dedicated contrastive supervision at negligible computational cost. On the controlled Trifeature benchmark, SynCo achieves state-of-the-art synergy capture with a +5.98% gain over the baseline, and on real-world benchmarks from MultiBench, DARai, and MM-IMDb, SynCo consistently outperforms or matches prior methods across diverse modality combinations and task types. The method operates as a plug-in to existing contrastive multimodal frameworks without modifying the underlying fusion architecture and can further improve synergy capture when combined with other methods.
Yavuz Yarici, Ghassan AlRegib
OLIVES, CSIP, School of ECE Georgia Institute of Technology Atlanta, GA, USA
Contrastive learning is increasingly moving toward settings with three or more modalities instead of image-text pairs. Yet, extending models from pairwise to higher-order multimodal alignment can introduce optimization and representation challenges. We identify encoder Jacobian conditioning as a key factor in trimodal contrastive learning: poorly conditioned encoders exhibit collapsing or amplified singular-value spectra, leading to exploding Jacobian condition numbers and degraded multimodal alignment. We introduce geometry-preserving encoders (GPEs) by directly conditioning the Jacobian through regularization and demonstrating that simple modifications like LeakyReLU activations and residual paths recover these geometric benefits. Across a synthetic benchmark and four real-world datasets including missing modalities, improving Jacobian conditioning boosts retrieval and linear probe performance across multiple contrastive objectives, whereas expressive objectives yield little benefit in linear probes. More broadly, our results show that multimodal contrastive learning depends not only on objective expressivity, but also on the geometric and optimization properties of the underlying encoders.
Tillmann Rheude, Roland Eils, Benjamin Wild
Berlin Institute of Health, Charité - Universitätsmedizin Berlin · Department of Mathematics and Computer Science, Freie Universität Berlin · Intelligent Medicine Institute, Fudan University
Contrastive learning has become the standard paradigm for multimodal representation learning, aligning semantically matched pairs while separating mismatched ones in a shared embedding space. Although various contrastive training strategies have been proposed across negative selection, batch construction, and gradient modulation, their actual effectiveness under controlled, reproducible conditions remains poorly understood. This motivates a fundamental question: Do sophisticated contrastive strategies consistently bring meaningful downstream gains in multimodal embedding learning? To address this, we systematically evaluate representative strategies under a unified benchmarking framework on MMEB. Surprisingly, direct evaluations reveal that most existing strategies offer marginal gains over a standard aligned baseline, with several even degrading overall performance. To uncover the underlying failure modes, we introduce an MLLM-as-a-Judge diagnostic framework that dissects top-1 retrieval behaviors into labeled positives, false negatives (unlabeled valid matches), and hard/easy negative errors. Our systematic analysis yields three key insights: (1) Gradient distortion: Upweighting gradients from high-similarity negatives consistently hurts downstream generalization; (2) Distribution illusion: Wider separation between positive and negative similarity distributions does not necessarily translate to better retrieval performance; and (3) Synergistic training: While false-negative mitigation or hard-batch construction yields limited gains in isolation, integrating hard-negative mining, false-negative mitigation, and hard-batch construction achieves optimal performance, delivering an average improvement of 6.0% on MMEB with Qwen2-VL-2B. Overall, our findings demystify popular contrastive strategies and provide actionable recipes for training universal multimodal embedding models.
Duo Li, Haojun Pan, Zuhao Yang +4
CCDS, Nanyang Technological University · Alibaba Group · Universität Hamburg +1