Manuscript Offprint
arXiv:2610.22094SCCL-DT: Semantic-Conflict-Aware Contrastive Learning with Dual-Rule Teacher Distillation for Zero-Shot Chest X-Ray Diagnosis
Abstract
Contrastive vision–language pre-training supports zero-shot chest X-ray diagnosis, but standard objectives treat every off-diagonal image–report pair in a batch as a negative. In radiology, recurring findings across patients mean that instance mismatch need not imply semantic incompatibility, creating false-negative supervision that we term a semantic conflict. A training-trace audit shows that pair-observations selected by the online mask used during training are enriched for report-derived finding agreement, although this proxy analysis does not establish clinical equivalence. Fixed thresholds can become miscalibrated as similarity distributions evolve, while soft reweighting leaves residual repulsive gradients. We therefore propose Semantic-Conflict-Aware Contrastive Learning (SCCL), which tracks modality-specific similarity distributions with exponential-moving-average (EMA) statistics, derives adaptive thresholds, and hard-masks flagged candidates before softmax normalization. Inclusive (OR) and consensus (AND) rules define two SCCL teachers, whose bidirectional cross-modal rankings are consolidated through standard distillation into a single deployable student, SCCL-DT. Across five public chest X-ray benchmarks, SCCL-DT achieves a mean zero-shot AUC of 0.850, compared with 0.837 for the strongest evaluated baseline in our comparison. Code will be made publicly available soon.
1. Introduction
Vision–language pre-training (VLP) has emerged as a promising paradigm for zero-shot chest X-ray diagnosis. By aligning radiographs with their free-text reports, VLP models learn joint representations that can be queried with disease prompts at inference without requiring task-specific annotations [12, 27, 37]. Most medical VLP approaches optimize a batch-wise contrastive objective [23, 25]: within a mini-batch of B image–report pairs, matched pairs are treated as positives, whereas all off-diagonal pairs are treated as negatives. This formulation inherits a key assumption from instance-level contrastive learning: every unmatched pair is a valid negative.
a Traced training pair

A report cues
bibasilar atelectasis
pulmonary edema
bilateral effusions

B report cues
basal atelectasis
pulmonary edema
bilateral effusions
Training-time masking decision
Image-image
similarity ✓
OR
Report-Report
similarity ✓
→ Marked
Post-hoc proxy check
Exact match of CheXpert present-label sets
b In-batch proxy-label matches

Batch size B
Batch size B
c Online-mask enrichment

Flagged subset
Epoch window
Figure 1. Motivation and label-based analysis of candidate semantic conflicts. (a) Online inclusive masking excludes an off-diagonal candidate from the negative set when either its image–image or report–report similarity exceeds the adaptive threshold. (b) Anchor-level probability and expected count of cross-patient matches with identical present-label sets. (c) Exact present-label-set agreement for flagged versus all eligible pair-observations, overall and across training windows.
This assumption is particularly fragile in radiology, where reports from different patients frequently describe overlapping findings using similar or interchangeable expressions. As illustrated in Figure 1(a), the two batch items underlying an unmatched image–report candidate may share the same report-derived finding set. At a mini-batch size of 256, an exact corpus-level calculation under uniform random batching estimates that 66.8% of pathology-positive anchors would encounter at least one cross-patient batch mate with an identical CheXpert present-label set, with 2.78 such matches per anchor on average (Figure 1(b)). A related enrichment appears in the recorded online masking decisions. Within the trace prefix ending at the best checkpoint, the inclusive rule used in the trace—which masks an off-diagonal pair when either the corresponding image–image or report–report similarity exceeds its modality-specific adaptive threshold—flags pair-observations with 3.96% exact present-label-set agreement, compared with 1.83% across all eligible pair-observations. Here, eligibility requires different patients and at least one positive label among the 12 pathology findings in each report; exact agreement is then evaluated over all 14 labels. The resulting enrichment remains above one throughout five consecutive training windows (Figure 1(c)). Although exact CheXpert present-label-set agreement does not establish clinical equivalence, its enrichment among flagged pair-observations suggests that this subset may contain a higher proportion of semantically compatible pairs. Consequently, semantically compatible pairs may still receive negative contrastive targets, giving rise to false-negative supervision. Such false negatives are known to degrade generic contrastive learning [5, 7]. We refer to this mismatch between semantic compatibility and the assigned contrastive target as a semantic conflict.
Prior work has attempted to mitigate false negatives by incorporating external clinical knowledge [19, 30], mining additional positive pairs from report- or study-level semantics [20, 21, 33], or softly reweighting suspected false negatives during optimization [15, 18]. Despite their effectiveness, two gaps remain. Detection: rules based on single-modality evidence or fixed, globally normalized similarity thresholds can become miscalibrated as modality-specific similarity distributions shift during representation learning. Optimization: additional positive mining may promote partial semantic compatibility to full equivalence, whereas soft reweighting still allows suspected false negatives to exert residual repulsive gradients unless their weights become exactly zero. An effective solution must therefore identify semantic conflicts adaptively and prevent them from being pushed apart without indiscriminately relabeling them as positives.
To address both gaps, we propose Semantic-Conflict-Aware Contrastive Learning (SCCL), which dynamically flags potential semantic-conflict candidates using evidence from both modalities and removes them through adaptive hard masking. For detection, SCCL maintains separate exponential-moving-average (EMA) statistics for intra-batch image–image and report–report similarities, allowing each threshold to track its modality-specific distribution as training evolves. Flagged candidates are excluded from contrastive normalization, eliminating their probability mass and repulsive gradients rather than treating them as additional positives. To account for uncertainty in the modality-specific intra-modal cues, we instantiate two rule-specific teachers: an inclusive (OR) teacher that accepts evidence from either modality to increase candidate coverage, and a consensus (AND) teacher that requires agreement between both modality-specific cues for more conservative selection. Standard distillation then consolidates the two teachers' cross-modal rankings into the single deployable student SCCL-DT. SCCL thus adapts candidate selection to evolving similarity distributions while explicitly preventing flagged candidates from being optimized as negatives.
Our contributions are:
• We propose SCCL, a contrastive framework that adaptively hard-masks similarity-flagged off-diagonal candidates using per-modality EMA thresholds, without adding trainable parameters to the masking module.
• We instantiate SCCL with inclusive and consensus rule-specific teachers and use standard distillation to consolidate their cross-modal rankings into SCCL-DT, a single deployable student.
• On five public chest X-ray benchmarks (Open-I, PadChest, ChestX-ray14, CheXpert, and ChestXDet10), SCCL-DT reaches a mean zero-shot AUC of 0.850, the highest among the compared methods, at single-model inference cost.
2.1. Medical vision–language pre-training
Contrastive alignment of chest radiographs with their reports has driven rapid progress in label-efficient and zero-shot diagnosis. ConVIRT [37] adapts image-text contrastive learning to radiology, while MedCLIP [30] decouples images and texts to exploit unpaired data. GLORIA [12] and MGCA [28] introduce local, multi-granularity alignment between image regions and report tokens; BioViL [2] strengthens the text encoder through domain-specific language modeling; and CheXzero [27] demonstrates expert-level zero-shot detection. KAD [35] incorporates a medical knowledge graph, and MRM [38] combines masked image and record modeling. More recent approaches replace global dot-product similarity with fine-grained cross-attention between image regions and report tokens. CARZero [16] scores pairs through cross-attention
Stage I · Rule-Specific Teacher Training

Stage II · Dual-Teacher Distillation
Figure 2. Overview of the two-stage SCCL-DT framework. Stage I trains inclusive and consensus teachers by hard-masking similarity-flagged off-diagonal candidates selected with modality-specific EMA thresholds. Stage II distills their image-to-text (i2t) and text-to-image (t2i) rankings into a single student using row- and column-wise Kullback–Leibler (KL) supervision. Only the student is retained for inference.
between one modality’s tokens and the other’s query, while RadZero [24] extends this paradigm toward region-level, explainable alignment. Beyond these advances in broader data utilization, stronger encoders, knowledge integration, or finer-grained alignment, SCCL addresses a distinct source of supervision error: treating semantically compatible off-diagonal pairs as negatives.
2.2. False negatives in contrastive learning
Instance-discrimination objectives treat unmatched samples as negatives, so semantically compatible pairs may receive repulsive gradients [4, 10, 23, 32]. Unlike valid hard negatives, false negatives should not be repelled. Prior work addresses this issue through distribution correction, hard-negative mining, progressive false-negative removal, or hardness scheduling [5, 7, 15, 26].
Medical VLP methods instead exploit clinical knowledge or report semantics. MedCLIP and MLIP construct knowledge-guided targets [19, 30]; SAT, SENSE, and FaNe use report- or study-level similarity to mine or reweight pairs [20, 21, 33]; and SAHN separates hard from false negatives using embedding and semantic similarity [18]. SCCL differs by applying modality-specific adaptive thresholds, hard-masking selected pairs without relabeling them, and distilling its rule-specific teachers into one student.
2.3. Knowledge distillation
Knowledge distillation transfers predictive distributions from a teacher to a student, commonly to compress a model or retain teacher behavior in a more deployment-efficient network [11]. Deep mutual learning extends this idea to online peer supervision [36], while ALBEF uses a momentum teacher to provide stable targets for noisy image-text alignment [17]. These formulations differ in teacher construction but use distillation to transfer or stabilize predictive behavior. In SCCL, standard distillation consolidates two rule-specific teachers—an inclusive teacher and a consensus teacher—into a single student for efficient inference.
3. Methodology
Figure 2 summarizes the two-stage training framework of SCCL-DT, from rule-specific teacher training to single-student distillation.
3.1. Preliminaries: Batch-Contrastive Alignment
Let a mini-batch contain image-report pairs , with global embeddings . A pairwise aligner produces bidirectional score matrices , where scores image against report , and scores report against image . The diagonal contains matched pairs. Because SCCL operates on these score matrices, may be implemented by similarity, a matching head, or cross-attention; a single-matrix aligner is handled analogously.
For the bidirectional instantiation, training minimizes a symmetric cross-entropy that treats each matrix as a B-way classification with the diagonal as the target label :
Every off-diagonal entry is therefore supervised as a negative. SCCL modifies this supervision only at the score-matrix level and does not alter the internal architecture of g.
3.2. Semantic-Conflict-Aware Contrastive Learning
Semantic-conflict candidates. An off-diagonal pair becomes a semantic-conflict candidate when its negative target may conflict with partial semantic compatibility. Because pair-level clinical adjudication is unavailable, SCCL treats similarity-flagged pairs only as candidates: it removes them from softmax normalization without relabeling them as positives.
Per-modality similarity. Given the batch's global embeddings, SCCL computes intra-modal cosine-similarity matrices
Let be the off-diagonal index set.
Adaptive thresholds via EMA. At each training step, SCCL maintains modality-specific EMA estimates of the batch mean and standard deviation of the off-diagonal similarities, using momentum m:
and analogously for . The modality-specific thresholds are
where k determines how far into the upper tail an entry must fall. Separate EMA statistics allow the thresholds to follow each modality's evolving similarity scale. The four EMA states are initialized from the first mini-batch. During the first steps, they continue to update while masking is disabled ( ). Statistics and masks are stop-gradient and device-local, without cross-device gathering. Validation freezes the EMA states and counters. Thresholds are not clipped; values above the cosine ceiling simply select no candidate.
Candidate-selection rules. SCCL uses two candidate-selection rules: the inclusive (OR) rule accepts evidence from either modality, whereas the consensus (AND) rule requires agreement between the two modality-specific cues:
with the diagonal forced to 0. Under identical thresholds, , so . OR therefore favors candidate coverage, whereas AND is more conservative. Without candidate-level ground truth, this is an expected coverage–precision trade-off rather than measured recall or precision.
Hard masking. For a given teacher, let denote its rule-specific mask. Flagged candidates are removed before the softmax:
where is implemented as . Because and are symmetric, both rules operate on the unordered pair and yield . Under this symmetric pair-level proxy, flagging provides no direction-specific evidence for retaining only one cross-swapped pairing, so we exclude both and . Specifically, the former occupies and , while the latter occupies and . Hence a teacher applies the same rule-specific to both score matrices, removing these candidates from all row- and column-wise softmaxes. This does not mean that the two teachers share a mask: the inclusive and consensus teachers use and , respectively. The training loss then replaces each by in Eq. (2), driving the masked candidates' softmax weights and gradients to zero. The masking module adds no trainable parameters; its cost is two similarity matrices and four scalar EMA updates per step. Algorithm 1 summarizes one step.
3.3. Dual-Rule Teacher Distillation
Rule-specific teachers. Training with and yields an inclusive teacher and a consensus teacher , respectively. We train one teacher under each rule and use both as sources for distillation.
Dual-rule distillation. We train a single student to match the ensemble of the two frozen teachers. The student is initialized independently rather than from either teacher or an average of their parameters; teacher knowledge is transferred only through logits computed on the fly for each batch, with no logits precomputed or stored. The teacher
Algorithm 1 One training step for a rule-specific SCCL teacher.
Input: logits , ; embeddings , ; step s
Param: k, momentum m, warm-up , rule
Output: masked loss
1: ;
2: update , , , by EMA over off-diagonal of ,
3: if then
4: {warm-up: no masking}
5: else
6: ;
7: ; set diagonal of M to 0
8: end if
9: masked by M; masked by M
10:
11: return
targets are the element-wise average of the two teachers' raw logits,
and the student matches them with a distillation loss at temperature , using both row- and column-normalized distributions of both score matrices:
(10)
where a denotes the normalization axis. The Stage-II student is trained solely with , so the teachers' contrastively learned bidirectional rankings provide its complete supervision. We refer to the resulting single-pass model as SCCL-DT.
Zero-shot inference. At test time, we retain only the student. For each disease c, we construct using the fixed template “There is [disease]”. For an image x and a disease prompt , the student encodes both inputs, including the global and any aligner-specific local features, and obtains bidirectional scores and . The final score for disease c is
We use this raw averaged score for multi-label evaluation, without a class-wise softmax; the teachers, EMA statistics, and candidate masks are absent at inference.
4. Experiments
4.1. Setup
Implementation details. Our implementation builds on CARZero [16], which serves as the unmasked Base model. We pre-train on frontal AP/PA MIMIC-CXR images with usable reports [14]. Available report fields are concatenated and truncated or padded to 97 tokens. Images are resized and zero-padded to , cropped to , and augmented with random horizontal flips, affine transformations, and brightness/contrast jitter. Each run uses a ViT-B/16 image encoder initialized from M3AE [6, 9] and a BioClinical BERT text encoder [1]. Teachers use , , and , and are optimized with Adam (learning rate , weight decay ). We halve the learning rate after five validation epochs without improvement, early-stop after ten, and select the lowest-loss checkpoint. The student is trained for six epochs with Adam at , using the same weight decay and scheduler and . All training runs are conducted on NVIDIA A800 GPUs. The masking operator itself maintains only four scalar EMA states and adds no trainable weights. The complete two-stage protocol nevertheless trains two rule-specific teachers and one student under supervision from the two frozen teachers; only the student is retained for inference.
Zero-shot evaluation. We evaluate on five public chest X-ray datasets without any fine-tuning: Open-I [8], Pad-Chest [3] (manually annotated subset), ChestX-ray14 [29], CheXpert [13], and ChestXDet10 [22]. For multi-label zero-shot classification, AUC is the primary metric; the PadChest ablations additionally report MCC, F1, and accuracy (ACC). For zero-shot grounding on ChestXDet10, we report the unweighted mean Pointing Game accuracy across ten findings. The cross-attention map is expanded to by patch-wise replication, and a trial is counted as a hit when a maximum-attention region overlaps an annotated lesion. Each map is independently min-max normalized for visualization.
Baselines. We compare against MedCLIP [30], BiomedCLIP [34], GLoRIA [12], BioViL [2], CheXzero [27], MedKLIP [31], KAD [35], CARZero [16], and RadZero [24]. For the zero-shot classification comparison in Table 1, we re-evaluate all baselines using their publicly released models on the same five official test sets.
Candidate-set analysis. Across the recorded training trace, the actual OR mask enriches report-derived exact label agreement from 1.83% among eligible pairs to 3.96% among flagged pairs (2.16×). Descriptively, the lift is above one in each of five epoch windows and is also observed
| Method | Open-I | PadChest | ChestX-ray14 | CheXpert | ChestXDet10 | Mean |
|---|---|---|---|---|---|---|
| MedCLIP [30] | 0.551 | 0.508 | 0.564 | 0.744 | 0.571 | 0.588 |
| BiomedCLIP [34] | 0.577 | 0.513 | 0.639 | 0.677 | 0.630 | 0.607 |
| GLoRIA [12] | 0.589 | 0.565 | 0.610 | 0.750 | 0.645 | 0.632 |
| BioViL [2] | 0.702 | 0.655 | 0.729 | 0.789 | 0.708 | 0.717 |
| CheXzero [27] | 0.726 | 0.648 | 0.712 | 0.889 | 0.640 | 0.723 |
| MedKLIP [31] | 0.759 | 0.629 | 0.726 | 0.879 | 0.713 | 0.741 |
| KAD [35] | 0.807 | 0.750 | 0.789 | 0.905 | 0.735 | 0.797 |
| CARZero [16] | 0.838 | 0.810 | 0.811 | 0.923 | 0.796 | 0.836 |
| RadZero [24] | 0.851 | 0.841 | 0.807 | 0.903 | 0.785 | 0.837 |
| SCCL-DT (Ours) | 0.853 | 0.827 | 0.835 | 0.922 | 0.811 | 0.850 |
Table 1. Zero-shot classification performance (AUC) on five chest X-ray benchmarks. Mean is the unweighted dataset average; higher is better. Bold and underline denote the best and second-best results in each column, respectively.
for Image-only candidates; the same qualitative pattern is observed under partial-overlap measures and an alternative labeler. These analyses evaluate whether the online mask preferentially selects label-overlapping pairs; they do not measure the recall of clinically adjudicated false negatives. Full definitions, counts, and sensitivity analyses are provided in the supplementary material.
4.2. Main Results
Zero-shot classification. Table 1 compares SCCL-DT with published zero-shot chest X-ray classification methods across five benchmarks. The final distilled student achieves the highest mean AUC of 0.850, exceeding RadZero (0.837) and CARZero (0.836) by 0.013 and 0.014, respectively. Under this unified classification evaluation protocol, SCCL-DT achieves the highest AUC on Open-I, ChestX-ray14, and ChestXDet10, while ranking second on PadChest and CheXpert; on CheXpert, it trails the best result by only 0.001. The consistent performance across these heterogeneous datasets provides evidence of cross-dataset robustness, while inference retains a single model.
CARZero and RadZero provide the closest radiology-specific comparisons. SCCL-DT outperforms each on four of the five datasets: relative to CARZero, the gains are +0.015 on Open-I, +0.017 on PadChest, +0.024 on ChestX-ray14, and +0.015 on ChestXDet10, whereas the two methods are nearly tied on CheXpert (0.922 vs. 0.923). Relative to RadZero, SCCL-DT performs better on all datasets except PadChest and improves the mean AUC by 0.013. Accordingly, Table 1 provides a same-test-set, public-checkpoint classification comparison under a common dataset and label scope. The controlled ablations below further isolate the effect of semantic-conflict masking within a shared implementation.
Zero-shot grounding. Table 2 reports both mean and per-finding Pointing Game accuracy on ChestXDet10. SCCL-DT achieves the highest mean accuracy of 0.583, exceeding the CARZero (0.543) and RadZero at 224 pixels (0.537) values by 4.0 and 4.6 percentage points, respectively. Relative to each of the tabulated CARZero and RadZero rows, SCCL-DT improves on seven of ten findings, matches one, and is lower on two. Across all included methods, it obtains the highest or tied-highest accuracy on six findings. Figure 3 complements these per-finding results with six qualitative Base-versus-SCCL-DT comparisons. Since a Pointing Game hit requires a maximally attended region to overlap an annotated lesion, these results provide evidence of stronger zero-shot spatial correspondence between cross-attention and radiographic abnormalities, rather than detection or segmentation performance.
4.3. Ablation and Diagnostic Studies
We report controlled PadChest studies under a unified evaluation protocol across AUC, MCC, F1, and accuracy (ACC). The OR/AND/KD, threshold, and similarity-cue studies characterize prespecified SCCL configurations. Two-tier, count-matched Random, and Soft weighting instead serve as diagnostic controls rather than SCCL components: they examine whether a single compromise rule can replace the separate inclusive and consensus teachers, whether gains depend on structured candidate selection beyond mask quantity alone, and whether hard exclusion is preferable to soft attenuation, respectively. These results are not used for hyperparameter tuning or default-configuration selection. The five-dataset mean AUC provides a cross-dataset consistency check. We retain ACC as a critical classification metric; because it remains near 0.991 across configurations, most between-configuration differences appear in AUC, MCC, and F1. Unless otherwise specified, the controlled studies use a prespecified default comprising an adaptive threshold with , the inclusive rule, hard masking, and both similarity cues; Table 3 separately compares the two rule-specific teachers and the single- and dual-

Pneumothorax
Consolidation
Atelectasis
Nodule
Mass
Effusion
Figure 3. Qualitative zero-shot grounding on six ChestXDet10 cases. Rows show the unmasked Base model and SCCL-DT; green boxes are ground-truth lesions, white stars are Pointing Game maxima, and warmer colors indicate larger cross-attention weights. Each map is normalized independently.
| Method | Mean | ATE | CALC | CONS | EFF | EMPH | FIB | FX | MASS | NOD | PTX |
|---|---|---|---|---|---|---|---|---|---|---|---|
| GLoRIA [12] | 0.368 | 0.479 | 0.053 | 0.737 | 0.528 | 0.667 | 0.366 | 0.013 | 0.533 | 0.156 | 0.143 |
| MedKLIP [31] | 0.481 | 0.625 | 0.132 | 0.837 | 0.675 | 0.734 | 0.305 | 0.224 | 0.733 | 0.312 | 0.229 |
| KAD [35] | 0.391 | 0.646 | 0.132 | 0.699 | 0.618 | 0.644 | 0.244 | 0.199 | 0.267 | 0.316 | 0.143 |
| CARZero [16] | 0.543 | 0.604 | 0.184 | 0.824 | 0.782 | 0.846 | 0.561 | 0.184 | 0.700 | 0.286 | 0.457 |
| RadZero (224 px) [24] | 0.537 | 0.604 | 0.211 | 0.806 | 0.813 | 0.795 | 0.451 | 0.197 | 0.767 | 0.325 | 0.400 |
| SCCL-DT (Ours) | 0.583 | 0.667 | 0.184 | 0.855 | 0.802 | 0.821 | 0.524 | 0.263 | 0.767 | 0.351 | 0.600 |
Table 2. Zero-shot grounding on ChestXDet10, measured by per-finding and unweighted mean Pointing Game (PG) accuracy. ATE, CALC, CONS, EFF, EMPH, FIB, FX, MASS, NOD, and PTX denote Atelectasis, Calcification, Consolidation, Effusion, Emphysema, Fibrosis, Fracture, Mass, Nodule, and Pneumothorax, respectively. Bold and underline denote the best and second-best results in each column.
teacher students.
| Components | PadChest | Cross-data | ||||||
|---|---|---|---|---|---|---|---|---|
| # | OR | AND | KD | AUC ↑ | MCC ↑ | F1 ↑ | ACC ↑ | mAUC ↑ |
| (a) | 0.810 | 0.156 | 0.143 | 0.991 | 0.836 | |||
| (b) | ✓ | 0.826 | 0.179 | 0.165 | 0.991 | 0.840 | ||
| (c) | ✓ | 0.825 | 0.173 | 0.159 | 0.991 | 0.846 | ||
| (d) | ✓ | ✓ | 0.823 | 0.178 | 0.162 | 0.991 | 0.846 | |
| (e) | ✓ | ✓ | 0.822 | 0.169 | 0.155 | 0.991 | 0.844 | |
| (f) | ✓ | ✓ | ✓ | 0.827 | 0.179 | 0.164 | 0.991 | 0.850 |
Table 3. Rule-specific teacher and knowledge-distillation analysis. OR/AND denote the teacher(s), KD denotes student distillation, and the empty setting is the unmasked Base. Cross-data mAUC averages five benchmarks; bold and underline mark best and second-best; ACC ties after rounding.
Teacher and student configurations. Both SCCL teachers improve over the unmasked Base model in PadChest AUC, MCC, and F1 (Table 3). Among the single-teacher students, distillation from the inclusive teacher obtains a higher cross-dataset mAUC than distillation from the consensus teacher (0.846 vs. 0.844; rows (d) and (e)). Using both rule-specific teachers raises mAUC to 0.850 (row (f)), while achieving the highest PadChest AUC and tying the highest MCC. The inclusive teacher remains marginally higher in F1. Distillation therefore serves model consolidation rather than the primary methodological contribution.
Controlled design analyses. Table 4 combines threshold sensitivity with diagnostic comparisons around the prespecified default configuration: adaptive , inclusive selection, hard masking, and joint cues.
Threshold rule. Panel A compares the implemented fixed- and adaptive-threshold variants. Under the imple-
| Design choice | AUC ↑ | MCC ↑ | F1 ↑ | ACC ↑ |
|---|---|---|---|---|
| A. Threshold sensitivity | ||||
| Fixed τ=0.85 | 0.807 | 0.147 | 0.130 | 0.991 |
| Fixed τ=0.90 | 0.812 | 0.155 | 0.136 | 0.991 |
| Fixed τ=0.95 | 0.814 | 0.156 | 0.138 | 0.991 |
| Adaptive k=1.5 | 0.820 | 0.157 | 0.139 | 0.991 |
| Adaptive k=2 (def.) | 0.826 | 0.179 | 0.165 | 0.991 |
| Adaptive k=2.5 | 0.819 | 0.159 | 0.141 | 0.991 |
| B. Diagnostic comparisons | ||||
| Candidate-selection logic | ||||
| Inclusive (def.) | 0.826 | 0.179 | 0.165 | 0.991 |
| Consensus | 0.825 | 0.173 | 0.159 | 0.991 |
| Two-tier | 0.818 | 0.162 | 0.146 | 0.991 |
| Random (count-matched) | 0.817 | 0.156 | 0.139 | 0.991 |
| Logit intervention | ||||
| Hard masking (def.) | 0.826 | 0.179 | 0.165 | 0.991 |
| Soft weighting | 0.820 | 0.161 | 0.139 | 0.991 |
Table 4. Controlled PadChest analyses: (A) threshold sensitivity; (B) candidate-selection and logit-intervention controls. “def.” marks the prespecified default; bold and underline mark best and second-best within each block; ACC ties after rounding.
| Similarity cue | AUC ↑ | MCC ↑ | F1 ↑ | ACC ↑ |
|---|---|---|---|---|
| Image only | 0.814 | 0.158 | 0.141 | 0.991 |
| Text only | 0.816 | 0.157 | 0.138 | 0.991 |
| Both (default) | 0.826 | 0.179 | 0.165 | 0.991 |
Table 5. PadChest similarity-cue ablation under the default inclusive setting. Bold and underline mark the best and second-best AUC, MCC, and F1; ACC ties at 0.991.
mented fixed branch, thresholds are omitted because early OR-mask saturation removes nearly all off-diagonal negatives and yields a degenerate near-zero loss. The adaptive rules use the device-local EMA statistics in Eq. (5), frozen during validation. Adaptive achieves an AUC/MCC/F1 of 0.826/0.179/0.165, compared with 0.814/0.156/0.138 for the strongest non-degenerate fixed threshold (). Figure 4 shows that the adaptive thresholds track the evolving similarity scale and converge to approximately 0.55 late in training. Among the tested adaptive settings, the prespecified gives the highest AUC, MCC, and F1 point estimates on PadChest.
Candidate-selection rule. Panel B compares diagnostic controls with the prespecified references. The inclusive and consensus rules are defined in Sec. 3.2. Two-tier combines stringent single-modality evidence with moderate agreement across modalities, while Random uniformly samples off-diagonal pairs to match the total per-batch inclusive mask budget. Inclusive obtains the highest AUC/MCC/F1 point estimates of 0.826/0.179/0.165. Con- sensus nearly preserves AUC (0.825) but reduces MCC/F1 to 0.173/0.159, whereas Two-tier performs worse across all three metrics. Together with Table 3, this comparison supports retaining the inclusive and consensus rules as separate teachers rather than collapsing them into a single heuristic. Count-matched random masking obtains 0.817/0.156/0.139, supporting the importance of SCCL's structured candidate selection beyond mask quantity alone. Masking operation and modality cues. Within Panel B, Soft weighting serves as a diagnostic control that attenuates likely conflicts rather than removing them. Hard masking improves AUC/MCC/F1 from 0.820/0.161/0.139 with soft weighting to 0.826/0.179/0.165, supporting complete removal of the associated probability mass under the tested setting. Combining image and text cues also outperforms either image-only or text-only selection across all three metrics (Table 5), indicating that the two modalities provide complementary evidence. Full definitions of the three diagnostic controls are provided in the supplement.

Figure 4. Adaptive image (solid) and text (dashed) thresholds for SCCL and the unmasked Base. Base values are logged but not applied; shading marks the fixed range 0.85–0.95 and the dotted line the cosine ceiling.
5. Conclusion
Standard contrastive pre-training treats all off-diagonal image–report pairs as negatives, which can introduce semantic conflicts when reports share findings. We proposed Semantic-Conflict-Aware Contrastive Learning (SCCL), which uses modality-specific adaptive thresholds to identify candidate conflicts and removes them from contrastive normalization without relabeling them as positives. Distillation consolidates the resulting rule-specific supervision into a single deployable model. The online mask is enriched for report-derived finding agreement, providing proxy evidence for the selection mechanism rather than pair-level clinical adjudication. Across five public benchmarks, SCCL-DT achieves the highest mean zero-shot AUC among the evaluated methods (0.850 vs. 0.837) and the highest mean ChestXDet10 Pointing Game accuracy (0.583). Together, these results support adaptive conflict removal as an effective alternative to indiscriminate negative supervision under the evaluated settings.
Future work should clinically adjudicate candidate pairs, study calibration across batch sizes and domains, and extend adaptive detection to local region–token alignment and other medical imaging modalities.
References
[1] Emily Alsentzer, John R. Murphy, Willie Boag, Wei-Hung Weng, Di Jin, Tristan Naumann, and Matthew B. A. McDermott. Publicly available clinical bert embeddings, 2019.
[2] Benedikt Boecking, Naoto Usuyama, Shruthi Bannur, Daniel C. Castro, Anton Schwaighofer, Stephanie Hyland, Maria Wetscherek, Tristan Naumann, Aditya Nori, Javier Alvarez-Valle, Hoifung Poon, and Ozan Oktay. Making the Most of Text Semantics to Improve Biomedical Vision-Language Processing, page 1–21. Springer Nature Switzerland, 2022.
[3] Aurelia Bustos, Antonio Pertusa, Jose-Maria Salinas, and Maria de la Iglesia-Vayá. Padchest: A large chest x-ray image dataset with multi-label annotated reports. Medical Image Analysis, 66:101797, 2020.
[4] Ting Chen, Simon Kornblith, Mohammad Norouzi, and Geoffrey Hinton. A simple framework for contrastive learning of visual representations, 2020.
[5] Tsai-Shien Chen, Wei-Chih Hung, Hung-Yu Tseng, Shao-Yi Chien, and Ming-Hsuan Yang. Incremental false negative detection for contrastive learning, 2022.
[6] Zhihong Chen, Yuhao Du, Jinpeng Hu, Yang Liu, Guanbin Li, Xiang Wan, and Tsung-Hui Chang. Multi-modal masked autoencoders for medical vision-and-language pre-training, 2022.
[7] Ching-Yao Chuang, Joshua Robinson, Lin Yen-Chen, Antonio Torralba, and Stefanie Jegelka. Debiased contrastive learning, 2020.
[8] Dina Demner-Fushman, Marc D Kohli, Marc B Rosenman, Sonya E Shooshan, Laritza Rodriguez, Sameer Antani, George R Thoma, and Clement J McDonald. Preparing a collection of radiology examinations for distribution and retrieval. Journal of the American Medical Informatics Association, 23(2):304–310, 2016.
[9] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al. An image is worth words: Transformers for image recognition at scale. arXiv preprint arXiv:2010.11929, 2020.
[10] Kaiming He, Haoqi Fan, Yuxin Wu, Saining Xie, and Ross B. Girshick. Momentum contrast for unsupervised visual representation learning. In IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 9726–9735. IEEE, 2020.
[11] Geoffrey Hinton, Oriol Vinyals, and Jeff Dean. Distilling the knowledge in a neural network, 2015.
[12] Shih-Cheng Huang, Liyue Shen, Matthew P Lungren, and Serena Yeung. Gloria: A multimodal global-local representation learning framework for label-efficient medical image recognition. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pages 3942–3951, 2021.
[13] Jeremy Irvin, Pranav Rajpurkar, Michael Ko, Yifan Yu, Silviana Ciurea-Ilcus, Chris Chute, Henrik Marklund, Behzad Haghgoo, Robyn Ball, Katie Shpanskaya, Jayne Seekins, David A. Mong, Safwan S. Halabi, Jesse K. Sandberg, Ricky Jones, David B. Larson, Curtis P. Langlotz, Bhavik N. Patel, Matthew P. Lungren, and Andrew Y. Ng. Chexpert: A large chest radiograph dataset with uncertainty labels and expert comparison. Proceedings of the AAAI Conference on Artificial Intelligence, 33(01):590–597, 2019.
[14] Alistair EW Johnson, Tom J Pollard, Seth J Berkowitz, Nathaniel R Greenbaum, Matthew P Lungren, Chih-ying Deng, Roger G Mark, and Steven Horng. Mimic-cxr, a de-identified publicly available database of chest radiographs with free-text reports. Scientific data, 6(1):317, 2019.
[15] Myunsoo Kim, Seongwoong Shim, and Byung-Jun Lee. Falcon: False-negative aware learning of contrastive negatives in vision-language alignment. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 701–711, 2026.
[16] Haoran Lai, Qingsong Yao, Zihang Jiang, Rongsheng Wang, Zhiyang He, Xiaodong Tao, and S. Kevin Zhou. Carzero: Cross-attention alignment for radiology zero-shot classification. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), pages 11137–11146, 2024.
[17] Junnan Li, Ramprasaath Selvaraju, Akhilesh Gotmare, Shafiq Joty, Caiming Xiong, and Steven Chu Hong Hoi. Align before fuse: Vision and language representation learning with momentum distillation. In Advances in Neural Information Processing Systems, pages 9694–9705. Curran Associates, Inc., 2021.
[18] Yongxin Li, Ying Cheng, Yaning Pan, Wen He, Qing Wang, Rui Feng, and Xiaobo Zhang. Semantic-aware hard negative mining for medical vision-language contrastive pretraining. In Proceedings of the 33rd ACM International Conference on Multimedia, pages 3133–3142, 2025.
[19] Zhe Li, Laurence T. Yang, Bocheng Ren, Xin Nie, Zhangyang Gao, Cheng Tan, and Stan Z. Li. Mlip: Enhancing medical visual representation with divergence encoder and knowledge-guided contrastive learning, 2024.
[20] Bo Liu, Donghuan Lu, Dong Wei, Xian Wu, Yan Wang, Yu Zhang, and Yefeng Zheng. Improving medical vision-language contrastive pretraining with semantics-aware triage. IEEE Transactions on Medical Imaging, 42(12):3579–3589, 2023.
[21] Bo Liu, Zexin Lu, and Yan Wang. Towards medical vision-language contrastive pre-training via study-oriented semantic exploration. In Proceedings of the 32nd ACM International Conference on Multimedia, pages 4861–4870, 2024.
[22] Jingyu Liu, Jie Lian, and Yizhou Yu. Chestx-det10: Chest x-ray dataset on detection of thoracic abnormalities, 2020.
[23] Aaron van den Oord, Yazhe Li, and Oriol Vinyals. Representation learning with contrastive predictive coding. arXiv preprint arXiv:1807.03748, 2018.
[24] Jonggwon Park, Byungmu Yoon, Soobum Kim, and Kyoyun Choi. Radzero: Similarity-based cross-attention for explainable vision-language alignment in chest x-ray with zero-shot multi-task capability. In Advances in Neural Information Processing Systems, pages 56008–56034, 2025.
[25] Alec Radford, Jong Wook Kim, Chris Hallacy, Aditya Ramesh, Gabriel Goh, Sandhini Agarwal, Girish Sastry, Amanda Askell, Pamela Mishkin, Jack Clark, Gretchen Krueger, and Ilya Sutskever. Learning transferable visual models from natural language supervision, 2021.
[26] Joshua Robinson, Ching-Yao Chuang, Suvrit Sra, and Stefanie Jegelka. Contrastive learning with hard negative samples, 2021.
[27] Ekin Tiu, Ellie Talius, Pujan Patel, Curtis P Langlotz, Andrew Y Ng, and Pranav Rajpurkar. Expert-level detection of pathologies from unannotated chest x-ray images via self-supervised learning. Nature biomedical engineering, 6(12):1399–1406, 2022.
[28] Fuying Wang, Yuyin Zhou, Shujun Wang, Varut Vardhanabhuti, and Lequan Yu. Multi-granularity cross-modal alignment for generalized medical visual representation learning. Advances in neural information processing systems, 35: 33536–33549, 2022.
[29] Xiaosong Wang, Yifan Peng, Le Lu, Zhiyong Lu, Mohammadhadi Bagheri, and Ronald M Summers. Chestx-ray8: Hospital-scale chest x-ray database and benchmarks on weakly-supervised classification and localization of common thorax diseases. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 2097–2106, 2017.
[30] Zifeng Wang, Zhenbang Wu, Dinesh Agarwal, and Jimeng Sun. Medclip: Contrastive learning from unpaired medical images and text. In Proceedings of the 2022 Conference on Empirical Methods in Natural Language Processing, pages 3876–3887, 2022.
[31] Chaoyi Wu, Xiaoman Zhang, Ya Zhang, Yanfeng Wang, and Weidi Xie. Medklip: Medical knowledge enhanced language-image pre-training for x-ray diagnosis. In 2023 IEEE/CVF international conference on computer vision (ICCV), pages 21315–21326. IEEE, 2023.
[32] Zhirong Wu, Yuanjun Xiong, Stella X Yu, and Dahua Lin. Unsupervised feature learning via non-parametric instance discrimination. In Proceedings of the IEEE conference on computer vision and pattern recognition, pages 3733–3742, 2018.
[33] Peng Zhang, Zhihui Lai, Wenting Chen, Xu Wu, and Heng Kong. Fane: Towards fine-grained cross-modal contrast with false-negative reduction and text-conditioned sparse attention. In Proceedings of the AAAI Conference on Artificial Intelligence, pages 12681–12689, 2026.
[34] Sheng Zhang, Yanbo Xu, Naoto Usuyama, Hanwen Xu, Jaspreet Bagga, Robert Tinn, Sam Preston, Rajesh Rao, Mu Wei, Naveen Valluri, et al. Biomedclip: a multimodal biomedical foundation model pretrained from fifteen million
scientific image-text pairs. arXiv preprint arXiv:2303.00915, 2023.
[35] Xiaoman Zhang, Chaoyi Wu, Ya Zhang, Weidi Xie, and Yanfeng Wang. Knowledge-enhanced visual-language pre-training on chest radiology images. Nature Communications, 14(1):4542, 2023.
[36] Ying Zhang, Tao Xiang, Timothy M Hospedales, and Huchuan Lu. Deep mutual learning. In 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, pages 4320–4328. IEEE, 2018.
[37] Yuhao Zhang, Hang Jiang, Yasuhide Miura, Christopher D Manning, and Curtis P Langlotz. Contrastive learning of medical visual representations from paired images and text. In Machine learning for healthcare conference, pages 2–25. PMLR, 2022.
[38] Hong-Yu Zhou, Chenyu Lian, Liansheng Wang, and Yizhou Yu. Advancing radiograph representation learning with masked record modeling. arXiv preprint arXiv:2301.13155, 2023.
Supplementary Material
This supplement documents the data and evaluation scope, the Stage-II student-distillation objective, the Pointing Game evaluation protocol, implementation-level definitions of the Two-tier, count-matched Random, and Soft-weighting ablations, the candidate-set analysis, and the failure mode observed for low fixed thresholds. The descriptions below distinguish the proposed SCCL components from dataset and evaluation choices that remain fixed across all model variants.
A. Data and Evaluation Scope
A.1. Pre-training data
We pre-train on frontal AP/PA MIMIC-CXR images with usable report content, using the archived training and validation manifests and report filters associated with the Base implementation. The same manifests, filters, and data-loading configuration are used for the Base model, both rule-specific teachers, and the distilled student. SCCL changes the treatment of candidate negatives during pre-training; it does not redefine the dataset partition or report selection.
A.2. Downstream evaluation scope
We use the same five zero-shot evaluation sets and target-label mappings as in the main paper: Open-I [8]; the radiologist-annotated subset of PadChest [3]; the official NIH test split of ChestX-ray14 [29]; the CheXpert test set of 500 studies from 500 patients, evaluated on the five competition observations [13]; and the official ChestXDet10 test split with box annotations for ten findings [22]. ChestXDet10 is used for both zero-shot classification and grounding; the other four datasets are used for classification. All compared models are evaluated without fine-tuning using their publicly released checkpoints and inference code on the same benchmark subsets, target-label mappings, and metrics.
B. Stage-II Student Distillation Objective
Let and denote the raw logits from the frozen inclusive and consensus teachers for . Their element-wise average defines the teacher target,
For the student logits , we match both row- and column-normalized distributions at temperature :
(S2)
The Stage-II objective is pure distillation,
with no additional student loss. The two teachers are frozen throughout this stage, and only the student is retained for inference.
C. Grounding Evaluation Details
We evaluate zero-shot grounding on the ChestXDet10 test set using the Pointing Game (PG). For each image–finding trial, the cross-attention map produced for the corresponding disease prompt serves as the grounding prediction. A trial is counted as a hit when a maximally attended region overlaps the annotated lesion region. We compute PG independently for each of the ten findings and report their unweighted mean. The complete mean and per-finding comparison is reported in the main paper.
D. Diagnostic-Control Definitions and Stage-I Training Objective
This section precisely defines the Two-tier, count-matched Random, and Soft weighting controls used to interpret the main results. They are explanatory comparisons rather than removable components of SCCL: Two-tier examines a single compromise rule for the inclusive/consensus decision logic, Random controls for mask quantity, and Soft weighting contrasts attenuation with hard exclusion. Each changes only the within-batch logits passed to the contrastive cross-entropy during stage-one pre-training; none changes an encoder, the fusion module, or the inference path. The definitions follow the active MLP stage-one implementation and the configuration used by each run.
For a batch of B image–report pairs, let and be the global image and text embeddings. We first normalize them and construct the two within-modality, rather than cross-modal, similarity matrices:
Let and . Threshold-based branches compute, separately for each modality, the batch mean and sample standard deviation over all ordered off-diagonal cells:
(S6)
Thus both and enter the statistics. The code uses PyTorch std(), i.e., a sample standard deviation. It maintains separate EMAs of the mean and of the standard deviation itself, not an EMA of variance. The first update initializes each state with the current batch statistic; subsequent updates are
(S7)
When state updates are enabled, the current batch enters Eq. (S7) before its threshold is computed. Validation calls with frozen state reuse the latest training EMA. Variant-specific call-counting semantics are given below.
The fusion module produces two raw score matrices . For any matrix , with the batch diagonal as the positive pairing, define
All three variants optimize
The two directions are summed, not averaged; within each direction the row and column CE terms are averaged by Eq. (S9). Both directions reuse the same fusion module. The active implementation disables local/global auxiliary losses, so each variant affects Eq. (S10) only through .
D.1. Two-tier: modality-asymmetric two-level rule
Two-tier uses high and low thresholds with different image-and text-side multipliers:
For an off-diagonal pair, the high tier accepts strong evidence in either modality, whereas the low tier requires agreement between modalities:
The final mask is
All comparisons are strict; equality to a threshold does not trigger. The thresholds are not clipped to , and there is no cap on candidate count. Because the matrices in Eq. (S5) are symmetric, is symmetric. The implementation nevertheless uses its transpose explicitly in the t2i branch to preserve the score-axis semantics.
The actual parameters are and a warm-up of training masker calls. The first 500 training calls update the EMA but return an all-zero mask. The 501st call first updates the EMA and then applies Eq. (S15). The constructor parameter init_threshold=0.95 is displayed in warm-up logs only and does not enter a decision. Validation freezes the EMA, step, and trigger-rate state; after warm-up, validation loss still uses the current training EMA to form a mask.
Two-tier replaces logits rather than subtracting a finite offset:
The diagonal is always preserved. Mask generation runs under no_grad, so no gradient passes from the similarity decision branch to the global embeddings.
D.2. Count-matched Random
At training call s, the reference inclusive run records the total number of unordered pairs selected in the upper triangle,
Random replays this budget in the same training-call order. For , it samples exactly pairs uniformly without replacement:
The sampled pairs are mirrored to form a symmetric mask with a zero diagonal and are injected using the hard replacement in Eq. (S16). Sampling uses a private CPU random generator with base seed 1. The reference and Random runs otherwise use the same training configuration and batch schedule. This control exactly matches the total mask budget at every call, but not per-row or per-column counts or row degree; it therefore compares SCCL's structured candidate selection with an unstructured count-matched mask.
D.3. Soft weighting: continuous Noisy-OR retention
Soft weighting uses
(S19)
and assigns each modality a continuous false-negative probability
The quantity applied to logits is a retention weight, not the false-negative probability:
Equation (S21) is a De Morgan relaxation of hard OR: a high false-negative probability in either modality reduces retention. The configuration field T multiplies the standardized margin. We therefore denote this factor by : mathematically, it is a slope or inverse temperature, and larger produces a sharper transition closer to hard masking. The experiment fixes with no schedule.
The weight is neither multiplied into a sample loss after CE nor multiplied directly with a raw logit. It is added in log space after the shared fusion module creates the logits and before Eq. (S9):
Although is theoretically symmetric, the t2i implementation still takes its transpose explicitly. Since
the operation exactly multiplies each negative's exponentiated contribution to the softmax denominator by the clamped while preserving the positive through . A row-wise CE term is therefore
The actual settings are , , , and . The first 500 training get_mask calls update the EMA but return an all-one weight matrix; the 501st training call first enables Eq. (S21). init_threshold=0.95 remains log-only. Weights are computed under no_grad, so gradients pass only through the corrected fusion logits. During validation, the EMA state and warm-up counter are frozen, and the latest training EMA is reused without advancing either state.
D.4. Unified execution summary
The three variants follow the same high-level sequence:
-
Compute the normalized within-image and within-text matrices in Eq. (S5).
-
Compute mean/std on all ordered cells and update the modality-specific EMAs according to Eq. (S7). For all three variants, only training calls update the EMA and advance the warm-up counter; sanity and validation calls reuse the frozen training state.
-
During warm-up, use M = 0 for Two-tier, W = 1 for Soft, and read and use M = 0 for Random.
-
After warm-up, form M using Eqs. (S11)–(S15), sample exactly Random pairs using Eq. (S18), or compute W using Eqs. (S20)–(S21).
-
Inject the mask/weight: Two-tier and Random replace the selected i2t and transposed t2i cells by ; Soft adds and its transpose.
-
Compute Eq. (S10), averaging row/column CE within each direction and summing the two directions.
All three implementations unconditionally retain positive diagonal pairs, and mask/weight computation itself is excluded from gradient propagation.
E. Training-Time Candidate-Set Analysis
This section separates two questions represented in Fig. 1 in the main paper. First, a model-free corpus calculation asks how often uniform random batches contain cross-patient samples with matching report-derived finding sets. Second, an actual-trace analysis asks whether the inclusive OR masks used by the training loss are enriched for report-derived agreement. The latter follows the online decisions of the evolving model and EMA state; no final-checkpoint detector is reconstructed for the primary analysis.
E.1. Corpus-level collision analysis
The filtered pre-training corpus contains image–report items. CheXpert labels are mapped to Boolean present sets under L2/U-Zero: only a raw value of 1 is present, whereas 0, -1, and missing values are not. A pathology-positive anchor has at least one of the 12 findings remaining after excluding No Finding and Support Devices; this gives 134,937 pathology-positive anchors.
For anchor i, let be the number of other corpus items from a different patient with the same complete 14-label present set. Conditional on placing i in a uniformly sampled batch of size B, the number of matching batch mates is hypergeometric,
| Variant | Decision/sampling parameters | Logit intervention |
| Two-tier | , ; , ; ; training-call warm-up | Symmetric mask; i2t uses , t2i uses ; selected cells replaced by |
| Count-matched Random | OR source: , ; training-call warm-up; full upper-triangular pool; exact per-call ; global seed = 1, mask base seed = 1 | Same hard replacement; matches only total unordered-pair count, not row/column degree |
| Soft weighting | , ; training-call warm-up; ; std floor ; pre-log clamp | i2t adds , t2i its transpose, between fusion logits and CE |
Table S1. Implementation semantics of the three diagnostic controls.
The collision probability and expected count are therefore
Figure 1(b) in the main paper averages Eqs. (S27) and (S28) with equal weight over the prespecified anchor population. Table S2 gives the training-schedule batch sizes.
At , No Finding anchors account for 91.3% of the expected matches in the all-anchor calculation. The pathology-positive result (66.78% and 2.78 matches) therefore provides the cleaner main-text summary. As sensitivity checks, ignoring No Finding and Support Devices only in the matching criterion raises the collision probabilities to 86.03% for all anchors and 76.47% for pathology-positive anchors; removing the cross-patient restriction changes each exact probability by less than 0.05 percentage point.
E.2. Recorded online masks and analysis endpoint
The trace stores the ordered sample identities, epoch, batch index, global and mask steps, batch size, EMA statistics, thresholds, and the exact image-high, text-high, and applied masks for each training batch. Symmetric masks are represented by their strict upper triangle. For every analyzed batch, the stored applied mask equals the union of the stored image-high and text-high masks.
The lowest validation loss occurs at epoch=20-step=27504.ctkt. Its durable trace prefix ends at mask_step=27504; after excluding the 500-step warm-up, the primary endpoint is therefore mask_step=500, ..., 27504. This range contains 27,005 batches from logged epochs 0–20: 6,600 batches of size 64, 7,100 of size 128, and 13,305 of size 256. Their complete strict-upper-triangle spaces contain 505,289,600 pair-observations.
The primary CheXpert pool requires both samples to contain at least one of the 12 pathology findings and to come from different patients. This gives pair-observations. Exact agreement compares the complete 14-label present set after the pool is selected. NegBio is evaluated both on its analogous labeler-defined pool and on the fixed CheXpert pool.
E.3. Estimands and uncertainty
For eligible pair-observation , let denote the stored applied-mask decision and exact present-set agreement. We accumulate
The flagged agreement rate, eligible-pair baseline, lift, trigger rate, and agreement capture rate are
The baseline contains all eligible observations in the same batches and pool, including flagged observations; it is not a separately sampled control set. As a within-batch composition check, we also compute
Confidence intervals are estimated by an epoch-stratified batch-level bootstrap over the recorded training trace.
E.4. Exact-agreement results
Table S3 reports the complete primary counts. The online OR mask flags 6,613,862 of 178,150,296 CheXpert-pool observations; 261,620 of the flagged observations agree exactly. The resulting 3.9556% flagged rate, 1.8340% baseline, and 2.1568× lift give an 8.0071% capture rate. The batch-conditioned expectation is 121,400.07 agreements, compared with 261,620 observed, for O/E = 2.1550 (95% CI, 2.1455–2.1646).
| All anchors | Pathology-positive anchors | |||
|---|---|---|---|---|
| 64 | 62.46% | 6.37 | 38.47% | 0.69 |
| 128 | 72.05% | 12.83 | 53.41% | 1.38 |
| 256 | 80.21% | 25.77 | 66.78% | 2.78 |
Table S2. Exact cross-patient anchor-level collision statistics used in Fig. 1(b) in the main paper.
| Pool / agreement | Flagged | Baseline | Lift (95% CI) | Capture | ||||
|---|---|---|---|---|---|---|---|---|
| CheXpert / CheXpert | 178,150,296 | 6,613,862 | 3,267,352 | 261,620 | 3.9556% | 1.8340% | 2.1568 (2.1471–2.1664) | 8.0071% |
| NegBio / NegBio | 170,566,834 | 6,323,181 | 3,306,661 | 255,078 | 4.0340% | 1.9386% | 2.0809 (2.0715–2.0902) | 7.7141% |
| CheXpert / NegBio (fixed pool) | 178,150,296 | 6,613,862 | 3,304,696 | 255,801 | 3.8676% | 1.8550% | 2.0850 (2.0755–2.0943) | 7.7405% |
Table S3. Best-checkpoint-aligned enrichment using the masks actually applied during training. Counts are repeated pair-observations along the trace.
E.5. Temporal persistence
The right panel of Fig. 1(c) in the main paper groups the best-checkpoint-aligned trace into five consecutive epoch windows. Table S4 records the batch schedule and the complete strict-upper-triangle observation budget for each window. Lift ranges from 1.93 to 2.22, and every window-level bootstrap interval remains above one. Because batch size changes with epoch, the points establish persistence rather than a monotone learning trend.
E.6. Image, text, OR, and AND rules
Table S5 evaluates four decisions on the same fixed CheXpert pool. Image and Text are the corresponding high-threshold masks, OR is their inclusive union actually used by the analyzed teacher, and AND is their intersection. Image- and text-triggered sets are not disjoint; their intersection is the AND row. The OR result is therefore not explained only by the text rule.
The mutually exclusive source partition gives image-only, text-only, and both shares of 19.03%, 79.61%, and 1.36% of OR flags, respectively. Their exact-agreement lifts are 3.7490 (95% CI, 3.7190–3.7788), 1.7181 (1.7088–1.7273), and 5.5483 (5.4333–5.6626). This is an associative source decomposition rather than a causal modality ablation.
E.7. Partial finding overlap
Exact equality is intentionally strict. On the same eligible observations, the online OR set also shows greater partial overlap: 57.4% of flagged observations share at least one present finding, compared with 45.5% of all eligible observations, while mean Jaccard similarity is 0.252 versus 0.181 (Table S6). Thus the exact-agreement result is not solely a consequence of the equality threshold.
E.8. Alternative pools and full-trace sensitivity
Enrichment remains above one under every alternative CheXpert-defined pool (Table S7). Removing the different-patient condition changes the pathology-positive estimate only from 2.1568 to 2.1597.
Extending the descriptive calculation to the full post-warm-up trace through mask_step=36374 yields 280,227,481 CheXpert-pool observations and a 2.1774× lift (3.9940% vs. 1.8343%). The analogous NegBio-defined analysis contains 268,294,947 observations and yields 2.1013× (4.0745% vs. 1.9390%). These are sensitivity estimates; the best-checkpoint-aligned prefix remains the primary endpoint.
E.9. Interpretation
The actual online mask is persistently enriched for report-derived exact and partial finding agreement, including under image-triggered decisions and a second automatic labeler. This evidence concerns association within one recorded training trajectory. The absolute exact-agreement rate is 3.9556%, the OR capture rate is 8.0071%, and no independent manual clinical adjudication has been completed. The analysis therefore does not establish pair-level clinical equivalence or a causal downstream benefit of masking.
F. Fixed-Threshold Mask Saturation
The implemented fixed-threshold branch returns an all-zero mask for the first 500 masker calls and then applies one shared image/text cutoff:
The warm-up counter follows masker calls rather than optimizer steps. Selected i2t logits are replaced by , t2i uses the transposed mask, and positive diagonal pairs are always retained.
| Epoch window | Batch size | Batches | All observations / lift |
|---|---|---|---|
| 0–1 | 64 | 6,600 | 13,305,600 / 1.93× |
| 2–5 | 128 | 7,100 | 57,708,800 / 2.06× |
| 6–10 | 256 | 4,435 | 144,758,400 / 2.13× |
| 11–15 | 256 | 4,435 | 144,758,400 / 2.16× |
| 16–20 | 256 | 4,435 | 144,758,400 / 2.22× |
Table S4. Five-window temporal analysis displayed in Fig. 1(c) in the main paper. All window-level 95% CI lower bounds exceed one.
| Rule | Agreement | Baseline | Lift | Trigger / capture | ||
|---|---|---|---|---|---|---|
| Image | 1,348,802 | 95,719 | 7.0966% | 1.8340% | 3.8694 | 0.7571% / 2.9296% |
| Text | 5,355,304 | 175,084 | 3.2694% | 1.8340% | 1.7826 | 3.0061% / 5.3586% |
| OR | 6,613,862 | 261,620 | 3.9556% | 1.8340% | 2.1568 | 3.7125% / 8.0071% |
| AND | 90,244 | 9,183 | 10.1757% | 1.8340% | 5.5483 | 0.0507% / 0.2811% |
Table S5. Four-rule exact CheXpert agreement on the fixed primary pool. Trigger is and capture is .
| Metric | Flagged | Eligible | Difference | Ratio |
|---|---|---|---|---|
| Shared any finding | 57.4% | 45.5% | +11.9 pp | 1.26× |
| Mean Jaccard | 0.252 | 0.181 | +0.071 | 1.39× |
Table S6. Partial-overlap checks on the fixed CheXpert primary pool.
In the executed runs with , activation of the fixed OR mask removed nearly all off-diagonal negatives and drove the contrastive loss close to zero. At the audited representation, the image branch selected every off-diagonal pair, so any lower cutoff is no less permissive. Runs with remained non-degenerate. We therefore omit the saturated low-threshold settings from downstream evaluation and report as the best-performing non-degenerate fixed setting.
This behavior occurs when an absolute cutoff enters the bulk of the current similarity distribution. In contrast, SCCL's modality-specific thresholds track the evolving image and text similarity scales, reducing the risk of such saturation.
| Pair pool | N | F | Flagged | Baseline | Lift (95% CI) |
|---|---|---|---|---|---|
| All eligible i < j pairs | 505,289,600 | 27,476,966 | 35.6397% | 10.1071% | 3.5262 (3.5196–3.5329) |
| Exclude pairs where both are No Finding | 444,327,034 | 17,348,162 | 2.0469% | 1.0037% | 2.0394 (2.0313–2.0474) |
| Both samples have No Finding ≠ 1 | 215,233,750 | 7,968,418 | 4.4564% | 2.0720% | 2.1508 (2.1422–2.1593) |
| Both pathology-positive; no patient exclusion | 178,166,296 | 6,619,910 | 3.9619% | 1.8344% | 2.1597 (2.1501–2.1693) |
Table S7. Sensitivity to the CheXpert-defined pair pool.