Manuscript Offprint

arXiv:2609.03085

Solving the Needle-in-a-Haystack Problem in Mammography Vision-Language Model with Differentiable Subset Sampling

Young Seok Jeon, Beatrice Brown-Mulry, Rohan Satya Isaac, Anjana Dissanayaka, Theo Dapamede, Mohammadreza Chavoshi, Judy Gichoya, Hari Trivedi

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

ABSTRACT

There is growing interest in adopting CLIP-style vision-language model (VLM) pretraining for mammography. However, models that directly employ the standard CLIP architecture and training objective exhibit limited zero-shot performance in clinically important tasks such as cancer, finding-type, and BI-RADS predictions. We argue that this underwhelming performance is due to neglecting two characteristics of mammography data: (1) its high-res nature, and (2) homogeneity of radiology reports, largely driven by a predominance of negative/benign findings on examinations. We propose TopKSigLIP, a VLM designed to address these two limitations through a novel architecture and learning objectives. Instead of downscaling high-res mammography images to satisfy GPU memory constraints, TopKSigLIP introduces TopK-Patch module that learns to sample a sparse set of high-res patches likely to contain lesions, sidestepping the resolution-batch size tradeoff of VLM training. The sampled patch locations additionally serve as a built-in localization tool. To address report homogeneity, we replace the contrastive loss, which falsely repels semantically similar pairs, with a Sup-sigmoid loss. Sup-sigmoid loss extends the sigmoid loss from SigLIP with soft labels derived from structured data. TopKSigLIP outperforms existing open-source mammography and general medical VLMs on both internal and external benchmarks on density assessment, BI-RADS classification, finding subtyping, and cancer prediction under zero-shot evaluation. TopKSigLIP remains competitive under linear probing despite using a significantly smaller vision encoder and smaller training batches than baselines. The TopK-Patch module additionally achieves superior lesion localization over post-hoc Grad-CAM. Code and weights are made public 1^{1}

1 Introduction

CLIP-style VLM pretraining [5,6,9] aligns images and text in a shared embedding space via contrastive learning [32], yielding transferable representations for various downstream tasks such as image generation [4], visual instruction tuning [7], open-vocabulary detection [11], and segmentation [3]. This paradigm has been widely adopted in medical imaging, including chest radiography [17,19], abdominal CT [27], and pathology [2], as well as recent efforts to unify modalities within a single framework [18,28]. Most works adhere closely to the original CLIP formulation with minimal modification, yet already achieve strong performance on downstream tasks such as medical VQA [13,47,48] and segmentation [15].

There has been growing interest in training VLMs for digital mammography [20–22, 29, 30], a clinically vital modality where breast cancer accounts for approximately 42,000 deaths per year in the United States alone [24] and regular screening has been shown to reduce mortality by 38–48% [1, 25]. A defining characteristic of mammography is its multi-view nature: each exam typically includes four images—two views (craniocaudal (CC), and mediolateral oblique, (MLO)) per breast—interpreted jointly to produce a single report. To date, most mammography VLMs have

∗^{*}Corresponding Author: Hari Trivedi, hari.trivedi@emory.edu

1^{1}https://github.com/Youngseok0001/TopKSigLIP

Solving the Needle-in-a-Haystack Problem in Mammography Vision-Language Model with Differentiable Subset Sampling

Challenge 1: fine-grained & sparse lesions

Figure

Challenge 2: Report homogeneity

Figure

Figure 1: Existing mammography VLMs overlook two key properties of mammography data. (1) High resolution with sparse findings: mammograms contain small, sparsely located lesions that are easily destroyed by downsampling, yet retaining full resolution forces a prohibitive batch size tradeoff. (2) Report homogeneity: the screening-dominant nature of mammography produces highly similar reports, causing the contrastive loss to falsely repel semantically similar image–report pairs.

focused almost exclusively on this multi-view characteristic, using view-specific encoders [21, 29, 30] and cross-view correspondence learning [22]. However, this multi-view challenge is only part of the problem. We identify two more fundamental limitations overlooked by prior work:

Challenge 1: High resolution and sparse findings. Mammograms are acquired at much higher resolutions than the natural images used in standard CLIP training (224²–512² pixels), often reaching over 12 megapixels. This resolution is clinically important (Fig. 1(a)), as many lesions in breasts are often small (<5% of the image) or obscured by tissue overlaps, especially in dense breasts [31]. Downsampling risks erasing these fine-grained features, yet directly applying the standard CLIP framework at full resolution is not viable: the resulting reduction in batch size increases training time and can degrade performance, since contrastive loss benefits from large-batch training [6,33,34]. Furthermore, the lesions are not only small but also sparse, with a typical exam containing only a handful when present. The mammography report, which we aim to align with the mammogram images, primarily describes these findings. This differs from the image–caption pairs used in standard CLIP pretraining, where captions often describe clearly visible objects in images. If lesion locations are known in advance, the majority part of the image can be safely discarded, retaining only regions described in the report. A potential approach is a two-step pipeline: (1) a Region Proposal Network [35] to localize findings, followed by (2) CLIP pretraining on the selected patches. However, this is impractical for most mammography datasets [36–38], where spatial annotations are largely unavailable or insufficient to train a reliable proposal network.

Challenge 2: Report homogeneity. In the US, women are recommended to undergo annual screening mammography beginning at age 40 [39], with approximately 90% of exams yielding normal or benign findings. For example, in the EMBED dataset [36], 75% of exams are BI-RADS 1 (Negative), and these reports differ only in density and demographics (Fig. 1(b)). In contrast, standard CLIP training data [40,41] exhibits high caption diversity, and the contrastive loss is specifically designed to exploit this: the softmax normalization, paired with an identity ground-truth matrix, assumes each caption is semantically distinct from all others in the batch. This assumption is violated in mammography, where reports are largely homogeneous. As Fig. 1(b) illustrates, the semantic similarity of reports in a minibatch is pervasive (see Sec. 3.3.1 for the derivation of similarity matrix), causing the contrastive loss to falsely repel semantically similar image–report pairs. While prior work has addressed related issues via supervised [42–44] and hard-negative mining approaches [45,46], they are not tailored to this extreme low-diversity setting, where the fixes are insufficient.

Contributions. We propose TopKSigLIP, a VLM for mammography that addresses two underexplored challenges. To handle high resolution and sparse findings, we introduce TopK-Patch, a differentiable top-kk patch selection module that predicts sampling scores from low-res inputs and selects KK high-res patches likely to contain lesions. This preserves fine-grained detail while discarding irrelevant regions, and the learned scores/locations provide built-in localization capability, replacing post-hoc methods such as Grad-CAM [49]. To address report homogeneity, we propose a Sup-sigmoid loss, which extends the sigmoid loss from SigLIP [57] with soft labels derived from structured clinical data (e.g.,

Solving the Needle-in-a-Haystack Problem in Mammography Vision-Language Model with Differentiable Subset Sampling

Figure

Figure 2: Overall training pipeline of TopKSigLIP. The model comprises a Vision Tower, which selects KK high-res patches that contain suspicious lesions via a TopK-Patch module based on a low-res image, and a Text Tower, which encodes LLM-preprocessed radiology reports into text embeddings. The image and text embeddings are jointly optimized using three objectives: a Sup-sigmoid loss supervised by tabular-derived semantic similarity and ROI supervision via Soft Dice when bounding-box annotations are available.

MagView [67]). While the sigmoid loss was originally introduced to reduce the computational burden of the contrastive loss, we repurpose it to mitigate a training bias: softmax-based supervised contrastive objectives [43,44] force each pair to compete against all others in the batch, even when most are semantically similar, as is the case in mammography. The sigmoid formulation instead treats each pair independently, alleviating this unnecessary competition.

Trained on a subset of the EMBED dataset [36], TopKSigLIP achieves state-of-the-art performance on internal and external benchmarks (VinDr [37], RSNA [38]) across BI-RADS classification, density estimation, lesion subtyping, and cancer prediction, in both zero-shot and linear probing settings. TopK-Patch enables memory-efficient training with large batch sizes on a single GPU even at full resolution, while its built-in localization outperforms Grad-CAM for lesion detection.

References (58)