CLIP Architecture for Abdominal CT Image-Text Alignment and Zero-Shot Learning: Investigating Batch Composition and Data Scaling
Organizations: Department of Radiodiagnosis and Imaging, PGIMER, Chandigarh, India-160012
Abstract
Vision-language models trained with contrastive learning on paired medical images and reports show strong zero-shot diagnostic capabilities, yet the effect of training batch composition on learned representations remains unexplored for 3D medical imaging. We reproduce Merlin, a dual-encoder model that aligns 3D abdominal CT volumes with radiology reports using symmetric InfoNCE loss, achieving a zero-shot macro F1 of 74.45% across 30 findings (original: 73.00%). We then investigate two axes of variation. First, we control the normal-to-abnormal ratio within training batches at 25:75, 50:50, and 75:25 using section-level balanced sampling on the full dataset. All three configurations underperform the unbalanced baseline by 2.4 to 2.8 points, with 75:25 achieving the best result (72.02%) among balanced variants. Second, we conduct data scaling ablations on a 4,362-study subset, training with 20%, 40%, and 100% of the data. Performance scales sub-linearly from 65.26% to 71.88%, with individual findings varying dramatically in data sensitivity. Enforcing 50:50 balanced sampling on the same subset further degrades performance to 68.01%, confirming that explicit class balancing hurts regardless of dataset or balancing granularity. Our results indicate that the stochastic diversity of random sampling, combined with Merlin's alternating batching over anatomical subsections, provides more effective regularization than engineered class ratios at the small batch sizes required by 3D medical volumes.
Figures & tables
| Parameter | Value |
|---|---|
| Batch size | 8 |
| Optimizer | AdamW |
| Peak learning rate | |
| LR schedule | Cosine annealing with linear warmup |
| Warmup fraction | 10% of total steps |
| Warmup start LR | lr/25 = |
| Experiment | Normal:Abnormal | Dataset | Sampler | Training Size |
|---|---|---|---|---|
| Baseline (Reproduction) | Natural distribution | Full | Shuffled | 15,314 |
| Ratio 25:75 | 25:75 | Full | SectionBalancedSampler | 15,314 |
| Ratio 50:50 | 50:50 | Full | SectionBalancedSampler | 15,314 |
| Ratio 75:25 | 75:25 | Full | SectionBalancedSampler | 15,314 |
| Data Fraction | Training Studies | Sampler | Normal:Abnormal |
|---|---|---|---|
| 100% | 3,489 | Shuffled | Natural (45:55) |
| 100% | 3,489 | NABBatchSampler | 50:50 (enforced) |
| 40% | 1,396 | Shuffled | Natural (45:55) |
| 20% | 697 | Shuffled | Natural (45:55) |
| Model | Macro F1 (%) | Best Epoch |
|---|---|---|
| Merlin (original pretrained) | 73.45 | – |
| Our reproduction | 74.45 | 187 |
| Finding | Original (%) | Reproduction (%) | |
|---|---|---|---|
| Abdominal aortic aneurysm | 75.68 | 82.93 | +7.25 |
| Anasarca | 88.95 | 79.80 | 9.15 |
| Aortic valve calcification | 82.52 | 90.67 | +8.15 |
| Appendicitis | 68.38 | 62.92 | 5.46 |
| Ascites | 81.05 | 87.33 | +6.28 |
| Atelectasis | 71.38 | 72.17 | +0.79 |
| Experiment | Normal:Abnormal | Best Macro F1 (%) | Best Epoch |
|---|---|---|---|
| Baseline (Reproduction) | Natural (shuffled) | 74.45 | 187 |
| Ratio 75:25 | 75:25 | 72.02 | 15 |
| Ratio 50:50 | 50:50 | 71.97 | 33 |
| Ratio 25:75 | 25:75 | 71.70 | 19 |
| Ablation | Data Fraction | Training Studies | Best Macro F1 (%) | Best Epoch |
|---|---|---|---|---|
| 100%, random | 100% | 3,489 | 71.88 | 25 |
| 100%, balanced (50:50) | 100% | 3,489 | 68.01 | 13 |
| 40%, random | 40% | 1,396 | 67.96 | 90 |
| 20%, random | 20% | 697 | 65.26 | 30 |
| Experiment | Dataset | Training Size | Sampler | Best F1 (%) | Best Epoch |
|---|---|---|---|---|---|
| Reproduction baseline | Full | 15,314 | Shuffled | 74.45 | 187 |
| 75:25 ratio | Full | 15,314 | SectionBalanced | 72.02 | 15 |
| 50:50 ratio | Full | 15,314 | SectionBalanced | 71.97 | 33 |
| 25:75 ratio | Full | 15,314 | SectionBalanced | 71.70 | 19 |
| 100%, random | NAB | 3,489 | Shuffled | 71.88 | 25 |
| 100%, balanced | NAB | 3,489 | NABBatchSampler | 68.01 | 13 |