Papers › MedCore: Boundary-Preserving Medical Core Pruning for MedSAM

MedCore: Boundary-Preserving Medical Core Pruning for MedSAM

13 May 2026arXiv:2605.13688added by Syntology

Cenwei Zhang, Suncheng Xiang, Lei You

Title, abstract, authors and date from arXiv's metadata (CC0); this paper is not in the Papers with Code archive (frozen 2025-07-28).

Medical segmentation foundation models such as SAM and MedSAM provide strong prompt-driven segmentation, but their image encoders are still too large for many clinical settings. Compression is also risky in medicine because a model can keep high Dice while losing boundary fidelity. We propose MedCore, a structured pruning framework for MedSAM. The main idea is to preserve two kinds of structures: structures that became important during SAM-to-MedSAM adaptation, and structures that have high boundary leverage. We identify the first type by a dual-intervention score that compares zeroing a group with resetting it to its original SAM weight. We identify the second type by boundary-aware Fisher estimation. We also introduce a boundary leverage principle, which shows that compression-induced boundary displacement is controlled by logit perturbation on the boundary divided by the logit spatial gradient. This principle explains why boundary metrics can degrade even when Dice remains high. On polyp segmentation benchmarks, MedCore reduces parameters by 60.0% and FLOPs by 58.4% while achieving Dice 0.9549, Boundary F1 0.6388, and HD95 5.14 after recovery fine-tuning. It also reaches 86.6% parameter reduction and 90.4G FLOPs with strong boundary quality. Our analysis further shows that MedSAM lies in a head-fragile boundary regime: head-pruning steps have 2.887 times larger 95th-percentile boundary leverage than MLP-pruning steps, and this logit-level effect is consistent with BF1 and HD95 degradation. Our code is available at https://github.com/cenweizhang/MedCore.

PaperPDFCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2605.13688")

Code

Syntology Ran 0 of 24 code samples harvested from 1 repository linked to this paper; 24 have no recorded run.

By repository: found in paper text by Syntology: 24 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

cenweizhang/MedCore found in paper text by SyntologyApache-2.0 report

Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

24 samples harvested; 0 ran; 0 honoured the contract we drafted; 24 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

24unverified

Licence: 0 of the 24 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from cenweizhang/MedCore. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

apply_head_mask_to_model cenweizhang/MedCore/medcore_pruning/pruning.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 2d5b4e5ac88130e4 · report
apply_mlp_mask_to_model cenweizhang/MedCore/medcore_pruning/pruning.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 88b2d46468cf9a33 · report
compute_boundary_f1 cenweizhang/MedCore/medcore_pruning/metrics.py found in paper text by Syntology unverified Apache-2.0 (permissive) · bbed6d1a723d39a1 · report
compute_boundary_sampling_weights cenweizhang/MedCore/medcore_pruning/evaluation.py found in paper text by Syntology unverified Apache-2.0 (permissive) · dd312e008248930c · report
compute_cascade_stats cenweizhang/MedCore/medcore_pruning/pruning.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 1faef889488ec091 · report
compute_cross_fisher cenweizhang/MedCore/medcore_pruning/fisher.py found in paper text by Syntology unverified Apache-2.0 (permissive) · baf80ae7dc5ccf40 · report
compute_diagonal_fisher_boundary_aware cenweizhang/MedCore/medcore_pruning/fisher.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 97de9bfe5b3e05f1 · report
compute_dice cenweizhang/MedCore/medcore_pruning/metrics.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 26d78e051b3db046 · report
compute_head_scores cenweizhang/MedCore/medcore_pruning/scoring.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 390b8ca528024272 · report
compute_iou cenweizhang/MedCore/medcore_pruning/metrics.py found in paper text by Syntology unverified Apache-2.0 (permissive) · c3ff88b7bf97c76a · report
compute_mlp_neuron_scores cenweizhang/MedCore/medcore_pruning/scoring.py found in paper text by Syntology unverified Apache-2.0 (permissive) · bcecb71b17db5fe7 · report
eval_all cenweizhang/MedCore/medcore_pruning/evaluation.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 94c2f9d0ac628556 · report
export_compact_model cenweizhang/MedCore/medcore_pruning/compact.py found in paper text by Syntology unverified Apache-2.0 (permissive) · aa3f8bc40bbfd638 · report
file_sha256 cenweizhang/MedCore/medcore_pruning/utils.py found in paper text by Syntology unverified Apache-2.0 (permissive) · f8aa46dcd86ec93d · report
load_checkpoint cenweizhang/MedCore/medcore_pruning/checkpoints.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 43f2aa47c9481875 · report
load_compact_checkpoint cenweizhang/MedCore/medcore_pruning/compact.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 17dadc3fb49927f7 · report
load_sam_encoder_params cenweizhang/MedCore/medcore_pruning/scoring.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 32a9ca5d937d9531 · report
parse_config cenweizhang/MedCore/medcore_pruning/utils.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 94d3f90f149a1f97 · report
run_epoch cenweizhang/MedCore/medcore_pruning/training.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 858e877d2f3108c4 · report
save_checkpoint cenweizhang/MedCore/medcore_pruning/checkpoints.py found in paper text by Syntology unverified Apache-2.0 (permissive) · ec89cd9780053c16 · report
save_compact_checkpoint cenweizhang/MedCore/medcore_pruning/compact.py found in paper text by Syntology unverified Apache-2.0 (permissive) · ae45b1e40594e114 · report
segmentation_logits cenweizhang/MedCore/medcore_pruning/training.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 66d6fd877bf3b503 · report
segmentation_loss cenweizhang/MedCore/medcore_pruning/training.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 3326ff201e710fe5 · report
validate_device cenweizhang/MedCore/medcore_pruning/utils.py found in paper text by Syntology unverified Apache-2.0 (permissive) · 11b435db8e74e9a2 · report

Results from the paper

The Papers with Code archive ends with its 2025-07-28 snapshot. This paper's arXiv identifier, 2605.13688, was issued in May 2026, after that date, so the archive has no leaderboard rows for it.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections