OFF-CLIP

Improving Normal Detection Confidence in Radiology CLIP
with Simple Off-Diagonal Term Auto-Adjustment

Junhyun Park1*, Chanyu Moon2*, Donghwan Lee3, Kyungsu Kim3†, Minho Hwang1†
1Dept. of Robotics and Mechatronics Engineering, DGIST 2Dept. of Electrical Engineering and Computer Science, DGIST 3Seoul National University
* Equal contribution    † Corresponding author
MICCAI 2025 · Early accept (top 9%)

Abstract

Zero-shot classification with CLIP-style models is attractive in radiology because it reduces the need for manual labels. However, conventional contrastive training struggles with normal cases, producing many false positives and false negatives. We identify two causes: InfoNCE treats different normal patients as negative pairs, which prevents a cohesive normal cluster, and reports of abnormal patients contain normal sentences that are forced to align with abnormal images.

We propose OFF-CLIP, a simple refinement that introduces an off-diagonal term loss to cluster normal samples, and sentence-level text filtering that removes normal statements from abnormal reports. OFF-CLIP requires no architectural changes. Applied to CARZero, the state-of-the-art zero-shot baseline, it raises normal AUC on VinDr-CXR by 0.61 while maintaining or improving abnormal classification, and it improves pointing-game accuracy for zero-shot grounding.

Why do radiology CLIP models miss normal cases?

Radiology CLIP models such as CARZero are trained with InfoNCE, which treats only the matched image-report pair (the diagonal of the similarity matrix) as positive and every other pair in the batch as negative. In chest X-rays this assumption breaks in two ways.

Problem definition

(a) Conventional diagonal InfoNCE loss, (b) false positives in normal pairs, (c) false negatives in abnormal pairs.

Method

OFF-CLIP pipeline

OFF-CLIP pipeline: (1) text prompting, (2) sentence-level labeling, (3) text filtering and pair labeling, followed by the off-diagonal term loss and the abnormal InfoNCE loss.

Problem 1 · False positives in normal pairs

Normal images and normal reports look and read almost the same across patients ("There is no pneumothorax."). InfoNCE still pushes different normal patients apart as negatives (S13, S31 → 0 in (b)), so normal samples never form a cohesive cluster and the model is not confident that an image is normal.

Solution · Off-diagonal term loss

Every entry of the similarity matrix gets a binary cross-entropy target. The diagonal stays positive, and the off-diagonal entries between two normal pairs are also set positive:

\[ \hat{Y}_{ij} = \begin{cases} 1 & \text{if } i = j \ \text{ or both } i, j \text{ are normal}\\ 0 & \text{otherwise} \end{cases} \]

\[ \mathcal{L}_{\mathrm{off}} = -\frac{1}{2B^2}\sum_{i=1}^{B}\sum_{j=1}^{B} \Big[\hat{Y}_{ij}\log\sigma(S_{ij}) + (1-\hat{Y}_{ij})\log\big(1-\sigma(S_{ij})\big) + \hat{Y}_{ji}\log\sigma(S_{ji}) + (1-\hat{Y}_{ji})\log\big(1-\sigma(S_{ji})\big)\Big] \]

This pulls all normal samples together while keeping the standard diagonal alignment.

Problem 2 · False negatives in abnormal pairs

Reports of abnormal patients also contain normal sentences, e.g. "There is no focal consolidation." next to "There are bilateral nodular opacities." Training aligns these normal sentences with an abnormal image (S22 → 1 in (c)) and pushes them away from normal images (S21 → 0), which confuses the boundary between normal and abnormal.

Solution · Text prompting and filtering

  1. Text prompting: GPT-4o extracts the Findings and Impression sections and rewrites them into CARZero-style sentences ("There is pleural effusion at the left lung base.").
  2. Sentence labeling: a pretrained radiology sentence-level anomaly classifier labels each sentence as normal, abnormal or uncertain. A report with at least one abnormal sentence is abnormal; otherwise it is normal. These pseudo-labels need no human annotation.
  3. Filtering: normal and uncertain sentences are removed from abnormal reports, so an abnormal image is aligned only with text that describes its abnormality.

Abnormal InfoNCE and the final objective

To keep fine-grained discrimination between different abnormalities, the standard InfoNCE loss is applied only to the A abnormal pairs in the batch:

\[ \mathcal{L}_{ab} = -\frac{1}{A}\sum_{i=1}^{A}\left[ \log\frac{e^{S^{ab}_{ii}}}{\sum_{j=1}^{A} e^{S^{ab}_{ij}}} + \log\frac{e^{S^{ab}_{ii}}}{\sum_{j=1}^{A} e^{S^{ab}_{ji}}}\right], \qquad \mathcal{L}_{\text{OFF-CLIP}} = \mathcal{L}_{\mathrm{off}} + \lambda_{ab}\,\mathcal{L}_{ab}\ \ (\lambda_{ab}=1) \]

OFF-CLIP changes only the training objective and the text, not the architecture. Following CARZero, it uses a ViT-B/16 image encoder pretrained with M3AE and a BioBERT text encoder, trained on frontal images from MIMIC-CXR.

Results

Zero-shot classification

Applied to CARZero, OFF-CLIP raises normal AUC on all four external test sets, by 0.50 on average (0.61 on VinDr-CXR), and raises total AUC by 0.095 on average, so abnormal classes are maintained or improved rather than traded off.

DatasetOFF-CLIPNormalATECMEMPHEFFNODPLTPNATotal
VinDr-CXR✗0.250.740.910.930.940.470.750.900.79
✓0.860.840.930.950.940.860.860.830.87
Open-I✗0.320.790.890.830.930.550.730.840.72
✓0.740.810.900.910.930.600.760.840.81
PadChest✗0.240.780.870.780.950.520.660.800.68
✓0.770.820.880.890.950.640.810.800.76
CheXpert✗0.380.730.86-0.92--0.650.73
✓0.810.870.88-0.92--0.790.86

Zero-shot AUC of CARZero without (✗) and with (✓) OFF-CLIP. ATE: atelectasis, CM: cardiomegaly, EMPH: emphysema, EFF: effusion, NOD: nodule, PLT: pleural thickening, PNA: pneumonia.

Ablation: each component addresses one error type

On Open-I, the off-diagonal term loss alone lifts normal AUC above 0.7, but without filtering the abnormal classes collapse. Text filtering restores abnormal performance, and combining all three components gives the best balance: the gap between FN and FP shares of the errors drops from 0.9986 for the baseline, which labels almost everything abnormal, to 0.01.

Text filterLoffLabNormalATECALCCMEMPHMASSNODOPACPLTTotal|FN − FP| share
0.320.790.590.890.830.680.550.790.730.720.9986
✓0.720.290.490.340.330.310.470.240.280.320.06
✓✓0.750.240.460.300.270.270.440.230.260.290.14
✓0.620.580.500.640.460.270.490.310.410.440.46
✓✓0.720.770.550.840.850.760.610.750.740.780.14
✓✓✓0.740.810.600.900.910.850.600.730.760.810.01

Ablation on Open-I with CARZero (AUC). The last column is |FN/(FP+FN) − FP/(FP+FN)|; lower means false positives and false negatives are balanced. CALC: calcification, OPAC: opacity.

Zero-shot grounding

Better separation of normal and abnormal also improves localization. In the pointing game on VinDr-CXR, OFF-CLIP improves calcification from 0.30 to 0.59 with the top 10% attention, and pneumothorax from 0.63 to 1.00 with the top 20%.

AttentionMethodAEATECALCCMCONSEFFINFNODOPACPLTPTX
Top 10%CARZero0.940.610.300.990.840.690.800.470.660.330.63
+ OFF-CLIP1.000.780.591.000.950.890.900.730.920.471.00
Top 20%CARZero0.990.780.591.000.970.790.900.640.830.470.63
+ OFF-CLIP1.000.890.821.000.971.000.950.840.960.671.00

Pointing-game accuracy on VinDr-CXR using the top 10% / 20% attention per disease prompt. AE: aortic enlargement, CONS: consolidation, INF: infiltration, PTX: pneumothorax.

BibTeX

@inproceedings{park2025off,
  title     = {OFF-CLIP: Improving Normal Detection Confidence in Radiology CLIP with Simple Off-Diagonal Term Auto-Adjustment},
  author    = {Park, Junhyun and Moon, Chanyu and Lee, Donghwan and Kim, Kyungsu and Hwang, Minho},
  booktitle = {Proceedings of the 28th International Conference on Medical Image Computing and Computer-Assisted Intervention (MICCAI)},
  year      = {2025}
}