Papers
Topics
Authors
Recent
Search
2000 character limit reached

Disease-Level Contrastive Learning

Updated 6 July 2026
  • Disease-level contrastive learning is a representation-learning approach that uses clinical metadata to define positive and negative pairs, aligning embeddings with meaningful disease states.
  • It employs diverse data sources such as patient identity, timestamps, and disease labels to distinguish shared anatomy from disease-specific variations.
  • Empirical studies show that this method boosts label efficiency and diagnostic performance across modalities like retinal OCT, gastrointestinal endoscopy, and echocardiography.

Searching arXiv for recent and foundational papers on disease-level contrastive learning and closely related medical contrastive-learning formulations. Searching for metadata-aware medical contrastive learning in retinal OCT and supervised/clinical-oriented medical contrastive learning papers. Disease-level contrastive learning is a class of representation-learning methods in which the similarity structure used by contrastive objectives is chosen to reflect disease state, disease progression, or disease similarity, rather than only instance identity. In medical settings, this shift appears when positives are defined by longitudinal metadata such as patient identity, eye laterality, and time in retinal OCT (Holland et al., 2022), by shared disease labels in gastrointestinal endoscopy (Nath et al., 2023), by lesion and image-quality strata in low-quality fundus and chest imaging (Hou et al., 2024), by patient-level video correspondence in echocardiography (Holste et al., 2022), by ontology-derived code similarity in ICD coding (Lu et al., 2023), or by explicit separation of common healthy variation from salient disease-specific variation (Louiset et al., 2024). Across these formulations, the central objective is to learn embeddings whose geometry is aligned with clinically meaningful relations.

1. Conceptual scope

Conventional contrastive learning methods such as SimCLR, MoCo, and BYOL are built around an instance-level approximation: two augmented views of the same sample are positives, while other samples are treated as negatives unless labels are available. In medical imaging, this approximation is often systematically misleading because many samples share the same anatomy, the same disease, or the same patient-specific trajectory. In retinal OCT, for example, scans of the same eye at nearby time points may represent nearly the same age-related macular degeneration state, yet standard instance discrimination would treat them as negatives if they arise from different source images (Holland et al., 2022). Disease-level contrastive learning replaces that approximation with relations that better match the disease process.

A second conceptual axis is the contrastive-analysis view of healthy versus diseased populations. SepCLR formalizes the problem with a background dataset XX of healthy subjects and a target dataset YY of diseased subjects, and decomposes latent factors into common variables cc, shared by both populations, and salient variables ss, present only in the target dataset (Louiset et al., 2024). In that formulation, disease-level contrastive learning is not merely class separation; it is the separation of disease-specific variation from anatomy, demographics, and acquisition effects.

This suggests that disease-level contrastive learning is best understood as a relation-design paradigm rather than a single loss family. The loss may be InfoNCE, BYOL, MaxMargin, Barlow Twins, or a graph contrastive objective, but the defining feature is that the positive and negative structure is anchored to disease-relevant semantics.

2. Formalization of disease relations

A canonical formulation appears in metadata-enhanced retinal OCT pretraining. For longitudinal eye series

uel={(uxil,util)}i=1L,{}^{u}e^{l} = \{ ( {}^{u}x^{l}_i, {}^{u}t^{l}_i ) \}_{i=1}^{L},

a metadata-derived relation function is defined as

SδTmin,δT(uxil,vxjm)={+(u=v)(l=m)(δTmintiutjvδT) (uv) ?otherwise,S_{\delta_T^{\min}, \delta_T}({}^{u}x^{l}_i, {}^{v}x^{m}_j) = \begin{cases} + & (u = v) \land (l = m) \land (\delta_T^{\min} \le |t^u_i - t^v_j| \le \delta_T) \ - & (u \neq v) \ ? & \text{otherwise}, \end{cases}

so that positives are scans from the same patient and same eye within a temporal window, negatives are scans from different patients, and ambiguous pairs are excluded (Holland et al., 2022). This is a disease-level approximation because temporal proximity within one eye is used as a proxy for similar disease state.

A supervised formulation appears in gastrointestinal endoscopy and semi-supervised skin-lesion diagnosis. There, the positive set for anchor ii is P(i)={ji:yj=yi}P(i)=\{j\neq i: y_j=y_i\}, and negatives are N(i)={j:yjyi}N(i)=\{j: y_j\neq y_i\}, so the disease label itself defines the contrastive supervision (Nath et al., 2023, Purpura-Pontoniere et al., 2023). The same idea reappears in multimodal fusion for pulmonary embolism and future lung cancer prediction, where supervised sigmoid-based contrastive learning uses disease labels to determine positive and negative pairs among CT, tabular, and fused representations (Gu et al., 22 Sep 2025).

A hierarchy-aware variant appears in ICD coding. Each note’s ICD labels are lifted to a spanning super-tree Ti\mathcal{T}_i inside the ICD hierarchy, and inter-note similarity is defined by

YY0

where YY1 is tree edit distance (Lu et al., 2023). Contrast is then driven by soft disease similarity rather than a binary same-class relation.

A graph-biological variant appears in disease similarity prediction. PhenoGnet treats known gene–phenotype associations as positive pairs and unrelated pairs as negatives, then represents a disease by the mean embeddings of its associated genes and/or phenotypes; pairwise disease similarity is computed by cosine similarity (Baminiwatte et al., 17 Sep 2025). Here the disease-level object is induced from entity-level contrastive alignment.

Relation source Positive structure Representative paper
Longitudinal metadata Same patient, same eye, temporally close (Holland et al., 2022)
Disease labels Same disease class (Nath et al., 2023)
Hierarchical code similarity High ICD-tree similarity (Lu et al., 2023)
Cross-view biology Known gene–phenotype association (Baminiwatte et al., 17 Sep 2025)
Healthy/diseased partition Target-only salient factors, healthy salient collapse (Louiset et al., 2024)

3. Major design patterns

One major design pattern uses routinely available clinical metadata to define disease relations without explicit disease-stage labels. In retinal OCT, patient ID, eye laterality, and timestamps are used to build positive pairs from the same eye within YY2, to exclude fellow-eye or distant-time pairs as unknown, and to ensure that every image in a batch participates in at least one positive pair (Holland et al., 2022). This is a disease-aware self-supervised formulation: labels such as early, late, dry, and wet AMD are not used in pair construction, but disease progression is encoded implicitly through time.

A second pattern uses direct disease supervision. In Hyper-Kvasir gastrointestinal classification, any two images sharing the same disease or condition label are positives and images from different classes are negatives; the encoder is first trained with a supervised contrastive objective and then frozen while a classifier is trained on top, with optional class-weighted cross-entropy to address imbalance (Nath et al., 2023). In semi-supervised skin lesion diagnosis, supervised contrastive pre-training creates disease-aware clusters while Sample Relation Consistency regularizes the geometry of labeled and unlabeled data through student–teacher Gram matrices (Purpura-Pontoniere et al., 2023).

A third pattern is clinical stratification beyond labels alone. CoMCL partitions data into high-quality lesion images YY3, low-quality lesion images YY4, high-quality healthy images YY5, and low-quality healthy images YY6, then constructs contrastive losses among these levels to disentangle lesion features from low-quality artifacts; a lesion detector trained on IDRiD supplies lesion-centered patches, and self-paced hard-negative mining progressively emphasizes difficult confounders (Hou et al., 2024). This formulation treats disease/lesion status and image quality as separate but interacting axes of similarity.

A fourth pattern uses subject-level or modality-level correspondence. EchoCLR defines positive pairs as distinct parasternal long-axis videos from the same echocardiography study and adds a frame re-ordering pretext task to encode temporal coherence (Holste et al., 2022). Reduced-lead ECG diagnosis aligns a reduced-lead embedding YY7 to the corresponding 12-lead embedding YY8 through a joint loss YY9, thereby transferring disease-discriminative structure from rich to sparse measurements (Cao et al., 2023). Multimodal Alzheimer’s disease prediction aligns MRI and tabular modalities in a CLIP-style shared space and uses tabular attention to amplify salient biomarkers and assessments (Huang, 2023). Multimodal disease detection with missing modalities further extends this idea by adding learnable modality tokens and fused-representation contrastive terms cc0 (Gu et al., 22 Sep 2025).

A fifth pattern addresses distributional or infrastructural constraints. Federated dermatology pretraining shares feature vectors rather than raw images, uses MoCo-style instance discrimination, and removes local negatives so that images on the same device are not needlessly pushed apart (Wu et al., 2022). Cross-lingual clinical-text diagnosis aligns parallel symptom descriptions across English, Hindi, and Bengali by a Siamese contrastive module, a translation consistency loss, and a disease classifier, enabling zero-shot transfer without language-specific fine-tuning (Sar et al., 24 Sep 2025).

4. Objective families and architectural realizations

Disease-level contrastive learning is implemented with a wide range of objective functions. In retinal OCT, SimCLR-ME keeps the InfoNCE form but redefines positives and negatives via metadata, while BYOL-ME keeps the BYOL loss unchanged and only changes what counts as a positive pair (Holland et al., 2022). The implication is that disease-level behavior can arise from relation redesign without altering the base loss.

In gastrointestinal endoscopy, several supervised contrastive losses were compared—TripletMargin, MaxMargin, NPairs, and supervised NT-Xent—and MaxMargin yielded the best train and test loss for ResNet50, after which all backbone experiments used MaxMargin (Nath et al., 2023). In echocardiography, EchoCLR combines the standard NT-Xent loss with a frame-order prediction term,

cc1

so that temporal dynamics and patient-level invariance are learned jointly (Holste et al., 2022).

Other papers change the training architecture more radically. SRCL performs supervised contrastive pre-training and then fine-tunes with Sample Relation Consistency, where student and teacher Gram matrices are matched under perturbation; the two-stage formulation outperforms the joint variant at several label fractions, indicating objective conflict when contrastive clustering and relational stabilization are optimized simultaneously (Purpura-Pontoniere et al., 2023). EHR prediction in COVID-19 uses a supervised contrastive objective over patient embeddings and event embeddings, with patient–event and patient–patient terms weighted by cc2 and cc3, respectively, to increase margins under severe class imbalance (Wanyan et al., 2021). Social-media disease detection combines two cross-entropy losses with a Barlow Twins-style contrastive term on clean and self-augmented hidden states,

cc4

so that disease-related textual representations remain invariant under internal perturbation (Khan et al., 2024). DAAC for medical time series stacks hierarchical losses cc5 and cc6 on top of an AE-GAN-derived discrepancy channel that acts as a disease-probability-like feature (Wang et al., 7 Aug 2025). SepCLR derives common and salient alignment/uniformity objectives from an InfoMax formulation and adds kernel-based joint entropy maximization to prevent information leakage between healthy/shared and disease-specific spaces (Louiset et al., 2024).

This suggests that disease-level contrastive learning is not tied to a specific backbone either. The literature spans ResNet-50 (4× width), 3D-ResNet-18, DenseNet-121, Xception, InceptionTime, XLM-RoBERTa, graph convolutional networks, graph attention networks, and lightweight fusion MLPs, with the disease-aware component residing primarily in the supervision graph, pairing strategy, or population partition rather than in the encoder family.

5. Empirical behavior across domains

Across modalities, the most consistent empirical pattern is improved label efficiency on disease-focused tasks. In retinal OCT, metadata-enhanced pretraining outperformed both standard contrastive methods and a retinal image foundation model in five out of six image-level downstream tasks related to AMD, and on Southampton late-versus-early AMD classification the reported high-data AUCs were approximately cc7 for RETFound, approximately cc8 for standard BYOL, and approximately cc9 for BYOL-ME with ss0; BYOL-ME with only 100–400 labeled samples matched or exceeded RETFound trained with 10,000 labels (Holland et al., 2022).

In Hyper-Kvasir gastrointestinal classification, contrastive pretraining alone yielded strong performance across backbones, and for the best Xception encoder the downstream classifier reached approximately ss1 test accuracy and weighted ss2 without cost sensitivity; with class-weighted cross-entropy, the same pipeline reached ss3 accuracy and weighted ss4, with notable gains on several more difficult classes such as esophagitis_b_d (Nath et al., 2023).

For low-quality medical images, CoMCL improved robustness as image quality deteriorated. On EyeQ at the original quality proportion, CoMCL achieved Kappa / ACC ss5, and at 100% low-quality it achieved ss6, outperforming Lesion-aware CL at ss7. On Chest X-ray at 100% low-quality, CoMCL achieved Kappa / ACC ss8, again above the reported baselines (Hou et al., 2024).

Label-scarce settings show the same tendency. On ISIC 2018, SRCL reached AUROC ss9 and accuracy uel={(uxil,util)}i=1L,{}^{u}e^{l} = \{ ( {}^{u}x^{l}_i, {}^{u}t^{l}_i ) \}_{i=1}^{L},0 with 20% labeled data, and AUROC uel={(uxil,util)}i=1L,{}^{u}e^{l} = \{ ( {}^{u}x^{l}_i, {}^{u}t^{l}_i ) \}_{i=1}^{L},1 and accuracy uel={(uxil,util)}i=1L,{}^{u}e^{l} = \{ ( {}^{u}x^{l}_i, {}^{u}t^{l}_i ) \}_{i=1}^{L},2 with 50% labeled data (Purpura-Pontoniere et al., 2023). On echocardiography, EchoCLR reached AUROC uel={(uxil,util)}i=1L,{}^{u}e^{l} = \{ ( {}^{u}x^{l}_i, {}^{u}t^{l}_i ) \}_{i=1}^{L},3 on LVH classification with 10% of available training data, compared to uel={(uxil,util)}i=1L,{}^{u}e^{l} = \{ ( {}^{u}x^{l}_i, {}^{u}t^{l}_i ) \}_{i=1}^{L},4 for a standard transfer learning approach, and AUROC uel={(uxil,util)}i=1L,{}^{u}e^{l} = \{ ( {}^{u}x^{l}_i, {}^{u}t^{l}_i ) \}_{i=1}^{L},5 on severe AS classification with 1% of available training data, again compared to uel={(uxil,util)}i=1L,{}^{u}e^{l} = \{ ( {}^{u}x^{l}_i, {}^{u}t^{l}_i ) \}_{i=1}^{L},6 with transfer learning (Holste et al., 2022). In COVID-19 EHR prediction, contrastive-loss models on the restricted sample improved AUPRC by uel={(uxil,util)}i=1L,{}^{u}e^{l} = \{ ( {}^{u}x^{l}_i, {}^{u}t^{l}_i ) \}_{i=1}^{L},7 to uel={(uxil,util)}i=1L,{}^{u}e^{l} = \{ ( {}^{u}x^{l}_i, {}^{u}t^{l}_i ) \}_{i=1}^{L},8 and AUROC by uel={(uxil,util)}i=1L,{}^{u}e^{l} = \{ ( {}^{u}x^{l}_i, {}^{u}t^{l}_i ) \}_{i=1}^{L},9 to SδTmin,δT(uxil,vxjm)={+(u=v)(l=m)(δTmintiutjvδT) (uv) ?otherwise,S_{\delta_T^{\min}, \delta_T}({}^{u}x^{l}_i, {}^{v}x^{m}_j) = \begin{cases} + & (u = v) \land (l = m) \land (\delta_T^{\min} \le |t^u_i - t^v_j| \le \delta_T) \ - & (u \neq v) \ ? & \text{otherwise}, \end{cases}0 over cross-entropy models, while preserving clinically meaningful feature importance such as pulse oximetry (Wanyan et al., 2021).

Ontology- and fusion-based settings also show disease-level gains. In ICD coding, adding tree-based contrastive pretraining and masked section training increased MSMN Macro SδTmin,δT(uxil,vxjm)={+(u=v)(l=m)(δTmintiutjvδT) (uv) ?otherwise,S_{\delta_T^{\min}, \delta_T}({}^{u}x^{l}_i, {}^{v}x^{m}_j) = \begin{cases} + & (u = v) \land (l = m) \land (\delta_T^{\min} \le |t^u_i - t^v_j| \le \delta_T) \ - & (u \neq v) \ ? & \text{otherwise}, \end{cases}1 on MIMIC-rare-50 from SδTmin,δT(uxil,vxjm)={+(u=v)(l=m)(δTmintiutjvδT) (uv) ?otherwise,S_{\delta_T^{\min}, \delta_T}({}^{u}x^{l}_i, {}^{v}x^{m}_j) = \begin{cases} + & (u = v) \land (l = m) \land (\delta_T^{\min} \le |t^u_i - t^v_j| \le \delta_T) \ - & (u \neq v) \ ? & \text{otherwise}, \end{cases}2 to SδTmin,δT(uxil,vxjm)={+(u=v)(l=m)(δTmintiutjvδT) (uv) ?otherwise,S_{\delta_T^{\min}, \delta_T}({}^{u}x^{l}_i, {}^{v}x^{m}_j) = \begin{cases} + & (u = v) \land (l = m) \land (\delta_T^{\min} \le |t^u_i - t^v_j| \le \delta_T) \ - & (u \neq v) \ ? & \text{otherwise}, \end{cases}3, and MultiResCNN from SδTmin,δT(uxil,vxjm)={+(u=v)(l=m)(δTmintiutjvδT) (uv) ?otherwise,S_{\delta_T^{\min}, \delta_T}({}^{u}x^{l}_i, {}^{v}x^{m}_j) = \begin{cases} + & (u = v) \land (l = m) \land (\delta_T^{\min} \le |t^u_i - t^v_j| \le \delta_T) \ - & (u \neq v) \ ? & \text{otherwise}, \end{cases}4 to SδTmin,δT(uxil,vxjm)={+(u=v)(l=m)(δTmintiutjvδT) (uv) ?otherwise,S_{\delta_T^{\min}, \delta_T}({}^{u}x^{l}_i, {}^{v}x^{m}_j) = \begin{cases} + & (u = v) \land (l = m) \land (\delta_T^{\min} \le |t^u_i - t^v_j| \le \delta_T) \ - & (u \neq v) \ ? & \text{otherwise}, \end{cases}5, indicating particular benefit for rare codes (Lu et al., 2023). In multimodal PE detection, the proposed fusion framework achieved AUROC SδTmin,δT(uxil,vxjm)={+(u=v)(l=m)(δTmintiutjvδT) (uv) ?otherwise,S_{\delta_T^{\min}, \delta_T}({}^{u}x^{l}_i, {}^{v}x^{m}_j) = \begin{cases} + & (u = v) \land (l = m) \land (\delta_T^{\min} \le |t^u_i - t^v_j| \le \delta_T) \ - & (u \neq v) \ ? & \text{otherwise}, \end{cases}6 and AP SδTmin,δT(uxil,vxjm)={+(u=v)(l=m)(δTmintiutjvδT) (uv) ?otherwise,S_{\delta_T^{\min}, \delta_T}({}^{u}x^{l}_i, {}^{v}x^{m}_j) = \begin{cases} + & (u = v) \land (l = m) \land (\delta_T^{\min} \le |t^u_i - t^v_j| \le \delta_T) \ - & (u \neq v) \ ? & \text{otherwise}, \end{cases}7 in the image+tabular setting, and SδTmin,δT(uxil,vxjm)={+(u=v)(l=m)(δTmintiutjvδT) (uv) ?otherwise,S_{\delta_T^{\min}, \delta_T}({}^{u}x^{l}_i, {}^{v}x^{m}_j) = \begin{cases} + & (u = v) \land (l = m) \land (\delta_T^{\min} \le |t^u_i - t^v_j| \le \delta_T) \ - & (u \neq v) \ ? & \text{otherwise}, \end{cases}8 AUROC in the image-only setting; on NLST 2-year cancer prediction it achieved AUROC SδTmin,δT(uxil,vxjm)={+(u=v)(l=m)(δTmintiutjvδT) (uv) ?otherwise,S_{\delta_T^{\min}, \delta_T}({}^{u}x^{l}_i, {}^{v}x^{m}_j) = \begin{cases} + & (u = v) \land (l = m) \land (\delta_T^{\min} \le |t^u_i - t^v_j| \le \delta_T) \ - & (u \neq v) \ ? & \text{otherwise}, \end{cases}9 in the multimodal setting (Gu et al., 22 Sep 2025). In cross-lingual clinical-text diagnosis, SwasthLLM reported ii0 test accuracy and ii1 F1 in supervised settings, plus zero-shot accuracy ii2 on Hindi and ii3 on Bengali (Sar et al., 24 Sep 2025). For disease similarity prediction, PhenoGnet’s gene-based disease embeddings achieved AUCPR ii4 and AUROC ii5 on a benchmark of 1,100 similar and 866 dissimilar disease pairs (Baminiwatte et al., 17 Sep 2025).

6. Limitations, misconceptions, and open directions

A common misconception is that disease-level contrastive learning is synonymous with supervised contrastive learning over disease classes. The literature does not support that narrow reading. Disease-level structure can be imposed through longitudinal metadata (Holland et al., 2022), same-patient video correspondence (Holste et al., 2022), healthy-versus-diseased population structure (Louiset et al., 2024), ICD hierarchy (Lu et al., 2023), cross-lingual case alignment (Sar et al., 24 Sep 2025), or gene–phenotype associations aggregated to diseases (Baminiwatte et al., 17 Sep 2025). This suggests that the decisive ingredient is whether the contrastive relation encodes clinically meaningful proximity.

The principal limitations are equally heterogeneous. Metadata-driven methods depend on accurate identifiers and timestamps, and fixed temporal windows ignore heterogeneity in progression rates; fellow eyes remain excluded because their relationship is complex (Holland et al., 2022). In GI endoscopy, some extremely rare classes still had ii6 despite contrastive and cost-sensitive training (Nath et al., 2023). CoMCL requires disease labels, quality labels, and a lesion detector trained on a pixel-level annotated dataset, which increases annotation dependence and domain-transfer assumptions (Hou et al., 2024). SRCL-Joint can underperform the two-stage SRCL formulation because contrastive and relational objectives may conflict in the same embedding space (Purpura-Pontoniere et al., 2023). EchoCLR is limited to the parasternal long-axis view and to a single institution with temporal external validation rather than cross-site validation (Holste et al., 2022). Federated feature sharing improves dermatology pretraining but does not provide a formal privacy mechanism (Wu et al., 2022). SwasthLLM depends on parallel multilingual data for strong alignment (Sar et al., 24 Sep 2025).

The main research directions already identified in the literature are hybrid objectives and richer relation sources. Retinal OCT work explicitly proposes combining metadata-informed self-supervision with weakly supervised or supervised disease signals (Holland et al., 2022). GI endoscopy motivates joint optimization of disease-discriminative embeddings and misclassification-cost awareness beyond the current two-stage pipeline (Nath et al., 2023). CoMCL points toward extension to more modalities and multi-organ lesions, as well as more sophisticated disentanglement of nuisance factors such as quality, device, and protocol (Hou et al., 2024). EchoCLR proposes multi-view echocardiography and multimodal expansion (Holste et al., 2022). Reduced-lead ECG alignment motivates more complex contrastive learning than the current pairwise similarity term (Cao et al., 2023). Multimodal fusion with missing modalities points toward end-to-end training with unfrozen encoders and additional modalities beyond CT and tabular data (Gu et al., 22 Sep 2025).

Taken together, the field defines disease-level contrastive learning less by a single architecture than by a recurring principle: similarity in the embedding space should track disease process, disease mechanism, or disease-relevant uncertainty, and any available structure—time, anatomy, labels, hierarchies, modality correspondence, or healthy baselines—can be used to enforce that alignment.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (16)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Disease-Level Contrastive Learning.