Abstract
Contrastive Analysis (CA) aims to distinguish patterns shared between a background and a target dataset from those unique to the target. While traditionally addressed with Variational Auto-Encoders (VAEs), these models often prioritize pixel-level reconstruction over high-level semantic features. We present SepCLR, a framework that adapts Contrastive Learning for CA. By leveraging the InfoMax principle and a novel kernel-based Joint Entropy Maximization (k-JEM) strategy, SepCLR effectively isolates salient features—such as pathological markers in medical imaging—while maintaining independence from common background variations.
Introduction
In many scientific domains, the ability to isolate "interesting" target variations from "normal" background noise is critical. For instance, in neuroimaging, clinicians must distinguish disease-specific pathological patterns (salient factors) from standard anatomical variations like head shape or age (common factors). This task, known as Contrastive Analysis (CA), has historically relied on VAE-based architectures. However, VAEs are often "reconstruction-heavy," focusing on low-level pixel details rather than high-level semantic concepts. SepCLR addresses this by bringing the strengths of Contrastive Learning (CL) to the CA domain, focusing on semantic agreement across data views.
Methodology
SepCLR treats Contrastive Analysis as a constrained optimization problem based on the InfoMax Principle. The framework employs two distinct encoders: a Common Encoder ($f_{\theta c}$) and a Salient Encoder ($f_{\theta s}$).
The Common Encoder is trained to maximize Mutual Information (MI) between its latent space and both the background and target datasets. Conversely, the Salient Encoder maximizes MI only with the target dataset and is constrained to output a "null" vector for background samples. To prevent "information leakage" between these spaces, the authors introduce kernel-based Joint Entropy Maximization (k-JEM). Instead of simply minimizing MI, which can lead to trivial solutions, k-JEM maximizes the individual entropies of the common and salient spaces alongside their joint entropy, driving mutual information to zero while preserving the informational richness of each space.
Experiments and Results
The framework was evaluated on a variety of datasets, including synthetic digits on CIFAR-10 backgrounds, CelebA portraits, and clinical neuroimaging data. In a Schizophrenia neuroimaging study, SepCLR was used to separate healthy brain variation from pathological patterns in T1-weighted MRI scans.
As shown in the results, the salient features captured by SepCLR correlated significantly more strongly with clinical symptoms (measured by SANS and SAPS scales) than those from VAE-based baselines like cVAE or SepVAE. Furthermore, on the ODIR fundus dataset, SepCLR achieved a subtype classification accuracy of 68.5% in the salient space, nearly doubling the performance of several competitors.
Discussion and Limitations
SepCLR demonstrates that moving from reconstruction-based to contrastive-based objectives allows for better isolation of high-level concepts. However, two primary limitations remain. First, like most non-linear models, there is no formal guarantee of "identifiability"—the assurance that learned factors correspond exactly to the true underlying data-generating process. Second, as a contrastive method, SepCLR lacks an inherent decoder for image reconstruction. Future work will focus on integrating generative components, such as Diffusion models, to visualize the salient patterns discovered by the encoders.
Summary updated