Nuclei segmentation is a core task in computational pathology, but automated methods often struggle with variations in cell shape, weak boundaries, crowding, and domain shifts caused by differences in tissue preparation, staining, and imaging. Deep learning models, including recent foundation models, tend to perform well only when test data closely matches their training distribution, limiting their use across real-world histopathology settings.

The authors propose GDBA-Net, which keeps the SAM2 encoder frozen and introduces a Gated Dual-Branch Adapter. One branch processes semantic representations from the pretrained model, while the other extracts structural priors from frequency information. A sample-adaptive channel-wise gating mechanism dynamically integrates the two branches, selectively emphasizing structural cues that help delineate nuclei.

With only 4.3 million trainable parameters, GDBA-Net achieves state-of-the-art in-dataset performance and consistently better cross-dataset generalization than competing CNN-, transformer-, and foundation-model methods across six nuclei segmentation benchmarks. It also performs strongly under five-shot adaptation, indicating annotation efficiency. Ablation studies confirm that the gains come from the coordinated design of semantic-frequency complementarity and adaptive gating rather than increased model capacity.