KODA: Contrastive Representation Comparison and Alignment for Vision-Language Foundation Models

Youqi Wu, Mohammad Jalali, Farzan Farnia

Introduction

Vision-language foundation models (VLMs) like CLIP and SigLIP provide the backbone representations for many modern multimodal systems. Traditionally, the AI community evaluates these models based on downstream performance metrics, such as zero-shot classification or retrieval accuracy. However, aggregate metrics often mask fundamental structural differences in how models organize data. Two models might achieve identical accuracy scores while representing the underlying data in entirely different ways—one might excel at identifying textures, while another focuses on compositional relationships.

To address this "invisible" structural gap, researchers introduce Contrastive Embedding Clustering, a novel task designed to identify specific subsets of data where two models fundamentally disagree on sample similarity. To solve this, they propose KODA (Kernel Optimization for Discrepancy Analysis), a framework that moves beyond simple accuracy metrics to reveal the hidden structural differences and semantic blind spots between foundation models.

Methodology: How KODA Works

KODA is a kernel-based optimization framework designed to find "Contrastive Embedding Clusters"—groups of data that one model organizes tightly while another leaves scattered. The approach relies on several key mechanisms:

  • Kernel Similarity: For any two models (Model A and Model B), KODA constructs kernel similarity matrices based on a shared reference dataset. These matrices map out how each model perceives the relationships between data points.
  • Constrained Optimization: KODA formulates discrepancy discovery as an optimization problem. It searches for a specific direction (representing a subset of samples) that is maximally clustered in Model A, while remaining weakly clustered (constrained by a threshold) in Model B.
  • Iterative Discovery: By applying orthogonality constraints, KODA iteratively uncovers multiple "discrepancy directions," each corresponding to a distinct semantic theme.
  • Multimodal Product Kernels: To handle vision-language tasks, KODA utilizes a product kernel that fuses image and text similarities, enabling it to pinpoint discrepancies in how different models align the two modalities.
  • Scalability via RFF: Computing large kernel matrices is computationally prohibitive. KODA leverages Random Fourier Features (RFF) and covariance-block reductions to approximate these kernels, allowing the framework to scale to tens of thousands of samples without memory bottlenecks.

Key Insights and Results

The researchers evaluated KODA across standard benchmarks, including MS-COCO for multimodal tasks, and AFHQ, FFHQ, and ImageNet for unimodal image tasks.

Semantic, Interpretable Discrepancies KODA does not merely highlight random outliers; it identifies coherent semantic groups. For example, without using any labels during the discovery process, KODA successfully recovered specific dog breed categories in ImageNet as the primary sources of discrepancy between DINOv2 and CLIP. It might reveal that one model clusters "baseball" scenes tightly, while another scatters them.

The Importance of Asymmetric Comparison Because KODA's optimization is asymmetric, it can isolate exactly what Model A understands that Model B does not, and vice versa. This provides a much richer diagnostic tool than a standard symmetric difference metric.

Actionable Data Slices for Model Alignment The clusters identified by KODA represent actionable slices of data. In experiments, researchers demonstrated that fine-tuning CLIP on KODA-identified slices—specifically where it was structurally weaker than DINOv2—significantly improved its representation of those clusters. This effectively transferred structural strengths from the target model to the weaker model. Furthermore, on MS-COCO, KODA-selected subsets successfully amplified the retrieval performance gap between models, proving that the framework accurately isolates areas of model weakness.

Limitations and Future Directions

While KODA offers a powerful new lens for model comparison, it has a few limitations. Currently, it requires both models to be evaluated on a shared reference dataset; extending this to unmatched datasets remains an open challenge. Additionally, because the method is unsupervised, it relies on human interpretation to assign semantic meaning (e.g., recognizing that a cluster represents "surfing") to the discovered clusters. Future work will look toward providing stronger statistical guarantees for the interpretation of these clusters and further automating the semantic labeling process.

Summary updated

BibTeX
@inproceedings{wu2026koda,
  author = {Youqi WU and Mohammad Jalali and Farzan Farnia},
  title = {{KODA: Contrastive Representation Comparison and Alignment for Vision-Language Foundation Models}},
  booktitle = {International Conference on Machine Learning},
  year = {2026},
  url = {https://openreview.net/forum?id=InwrRdCQwD},
}
Figure