Detection of Breast Cancer Lumpectomy Margin with SAM-incorporated Forward-Forward Contrastive Learning

Tyler Ward, Xiaoqin Wang, Braxton McFarland, Md Atik Ahamed, Sahar Nozad +4 more
6/26/2025
1 citation
cs.CV
contrastive-ssl

Official code: tbwa233/FFCL-SAM (2 stars, Jupyter Notebook, last commit 2025-02-28).

Abstract

Complete removal of cancer tumors with a negative specimen margin during lumpectomy is essential in reducing breast cancer recurrence. However, 2D specimen radiography (SR), the current method used to assess intraoperative specimen margin status, has limited accuracy, resulting in nearly a quarter of patients requiring additional surgery.

Show full abstract

To address this, we propose a novel deep learning framework combining the Segment Anything Model (SAM) with Forward-Forward Contrastive Learning (FFCL), a pre-training strategy leveraging both local and global contrastive learning for patch-level classification of SR images. After annotating SR images with regions of known maligancy, non-malignant tissue, and pathology-confirmed margins, we pre-train a ResNet-18 backbone with FFCL to classify margin status, then reconstruct coarse binary masks to prompt SAM for refined tumor margin segmentation. Our approach achieved an AUC of 0.8455 for margin classification and segmented margins with a 27.4% improvement in Dice similarity over baseline models, while reducing inference time to 47 milliseconds per image. These results demonstrate that FFCL-SAM significantly enhances both the speed and accuracy of intraoperative margin assessment, with strong potential to reduce re-excision rates and improve surgical outcomes in breast cancer treatment. Our code is available at https://github.com/tbwa233/FFCL-SAM/.

View on arXivView PDF

Code Implementations(1)

tbwa233/FFCL-SAMOfficial100%
20Jupyter NotebookFeb 28, 20251 years ago

Similar Papers

Cite this paper

@article{ward2025detection,
  title  = {Detection of Breast Cancer Lumpectomy Margin with SAM-incorporated Forward-Forward Contrastive Learning},
  author = {Tyler Ward and Xiaoqin Wang and Braxton McFarland and Md Atik Ahamed and Sahar Nozad and Talal Arshad and Hafsa Nebbache and Jin Chen and Abdullah Imran},
  year   = {2025},
  eprint = {2506.21006},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.21006v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.21006.svg)](https://codeofpaper.com/paper/2506.21006)

Discussion