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 View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

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

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 24 code samples harvested from 1 repository linked to this paper: 15 ran (of which 0 constructed an object rather than computing a result; 12 with no instrument failure: 2 honoured, 0 violated, 10 with no contract checked; 3 where Syntology's instrument failed) · 9 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: found in paper text by Syntology: 24 samples from 1 repository, 15 ran (12 with no instrument failure; 3 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written on 2026-09-26 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

cenweizhang/MedCore found in paper text by SyntologyApache-2.0Syntology: 24 samples, 15 ran (3 instrument-failed) · 9 unverified 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: 15 ran (of which 0 constructed an object rather than computing a result; 12 with no instrument failure: 2 honoured, 0 violated, 10 with no contract checked; 3 where Syntology's instrument failed) · 9 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · honoured contract
3ran · our draft was wrong
10ran
9unverified

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. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (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 are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. 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 six 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; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. 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.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

cenweizhang/MedCore found in paper text by Syntology 24 samples, 15 ran (3 instrument-failed) · 9 unverified
apply_head_mask_to_model medcore_pruning/pruning.py ran Apache-2.0 (permissive) · 2d5b4e5ac88130e4 · report fixture: signature model:callable/0/?, head_mask:ndarray/1/float, num_blocks:int/0/int, num_heads:int/0/int · returned list · level recorded 2026-09-26
apply_mlp_mask_to_model medcore_pruning/pruning.py ran Apache-2.0 (permissive) · 88b2d46468cf9a33 · report fixture: signature model:callable/0/?, neuron_mask:ndarray/1/float, num_blocks:int/0/int · returned list · level recorded 2026-09-26
compute_boundary_f1 medcore_pruning/metrics.py ran Apache-2.0 (permissive) · bbed6d1a723d39a1 · report fixture: signature pred:ndarray/2/bool, gt:ndarray/2/bool, radius:int/0/int · returned float · level recorded 2026-09-26
compute_cascade_stats medcore_pruning/pruning.py ran Apache-2.0 (permissive) · 1faef889488ec091 · report fixture: signature model:callable/0/?, head_mask:ndarray/1/int, neuron_mask:ndarray/1/int, num_blocks:int/0/int, num_heads:int/0/int, img_size:int/0/int, patch_size:int/0/int · returned dict · level recorded 2026-09-26
compute_cross_fisher medcore_pruning/fisher.py ran Apache-2.0 (permissive) · baf80ae7dc5ccf40 · report fixture: signature fisher_m:dict/0/?, fisher_s:dict/0/? · returned dict · level recorded 2026-09-26
compute_dice in 7 papers medcore_pruning/metrics.py ran · honoured contract Apache-2.0 (permissive) · 26d78e051b3db046 · report fixture: signature pred:ndarray/1/bool, gt:ndarray/1/bool · returned float · level recorded 2026-09-26
compute_head_scores medcore_pruning/scoring.py ran Apache-2.0 (permissive) · 390b8ca528024272 · report fixture: signature model:callable/0/?, sam_params:dict/0/?, fisher:dict/0/?, num_blocks:int/0/int, num_heads:int/0/int · returned tuple · level recorded 2026-09-26
compute_iou in 68 papers medcore_pruning/metrics.py ran · honoured contract fingerprinted Apache-2.0 (permissive) · c3ff88b7bf97c76a · report fixture: signature pred:ndarray/2/int, gt:ndarray/2/int · returned float · level recorded 2026-09-26
compute_mlp_neuron_scores medcore_pruning/scoring.py ran Apache-2.0 (permissive) · bcecb71b17db5fe7 · report fixture: signature model:callable/0/?, sam_params:dict/0/?, fisher:dict/0/?, num_blocks:int/0/int · returned tuple · level recorded 2026-09-26
file_sha256 in 8 papers medcore_pruning/utils.py ran · our draft was wrong Apache-2.0 (permissive) · f8aa46dcd86ec93d · report fixture: signature path:str/0/str · returned str · level recorded 2026-09-26
parse_config in 30 papers medcore_pruning/utils.py ran Apache-2.0 (permissive) · 94d3f90f149a1f97 · report fixture: signature parser:ArgumentParser/0/?, argv:list/1/str · returned Namespace · level recorded 2026-09-26
save_checkpoint in 36 papers medcore_pruning/checkpoints.py ran Apache-2.0 (permissive) · ec89cd9780053c16 · report fixture: signature path:PosixPath/0/?, model:callable/0/?, head_mask:Tensor/1/float, neuron_mask:Tensor/1/float, metadata:dict/0/? · returned dict · level recorded 2026-09-26
segmentation_logits medcore_pruning/training.py ran Apache-2.0 (permissive) · 66d6fd877bf3b503 · report fixture: signature model:callable/0/?, batch:dict/0/?, device:str/0/str · returned Tensor · level recorded 2026-09-26
segmentation_loss medcore_pruning/training.py ran · our draft was wrong fingerprinted Apache-2.0 (permissive) · 3326ff201e710fe5 · report fixture: signature logits:Tensor/4/float, target:Tensor/4/float · returned Tensor · level recorded 2026-09-26
validate_device medcore_pruning/utils.py ran · our draft was wrong Apache-2.0 (permissive) · 11b435db8e74e9a2 · report fixture: signature name:str/0/str · returned device · level recorded 2026-09-26
compute_boundary_sampling_weights medcore_pruning/evaluation.py unverified Apache-2.0 (permissive) · dd312e008248930c · report
compute_diagonal_fisher_boundary_aware medcore_pruning/fisher.py unverified Apache-2.0 (permissive) · 97de9bfe5b3e05f1 · report
eval_all medcore_pruning/evaluation.py unverified Apache-2.0 (permissive) · 94c2f9d0ac628556 · report
export_compact_model medcore_pruning/compact.py unverified Apache-2.0 (permissive) · aa3f8bc40bbfd638 · report
load_checkpoint in 277 papers medcore_pruning/checkpoints.py unverified Apache-2.0 (permissive) · 43f2aa47c9481875 · report
load_compact_checkpoint medcore_pruning/compact.py unverified Apache-2.0 (permissive) · 17dadc3fb49927f7 · report
load_sam_encoder_params medcore_pruning/scoring.py unverified Apache-2.0 (permissive) · 32a9ca5d937d9531 · report
run_epoch in 18 papers medcore_pruning/training.py unverified Apache-2.0 (permissive) · 858e877d2f3108c4 · report
save_compact_checkpoint medcore_pruning/compact.py unverified Apache-2.0 (permissive) · ae45b1e40594e114 · 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.

Placed on leaderboards by Syntology Syntology

Syntology's extractor, the model Claude Sonnet 4.5, judged this paper's tables to report on 4 leaderboards (a model's judgement, not a result) and has not placed the paper on any of them: Medical Image Segmentation · CVC-ClinicDB (refused by a rule: the table's column header does not name the leaderboard's metric); Medical Image Segmentation · CVC-ColonDB (refused by a rule: the table's column header does not name the leaderboard's metric); Medical Image Segmentation · ISIC2018 (refused by a rule: the table's column header does not name the leaderboard's metric); Medical Image Segmentation · Kvasir-SEG (refused by a rule: the table's column header does not name the leaderboard's metric). What is not shown.

Syntology has checked 8,886 of the 18,637 papers on this site that are newer than the archive (for 3,717 of them no archive leaderboard matched the paper's tables, so there was nothing further to check); 733 were read and have nothing to place (arXiv has no HTML version of the paper, or that version has no tables), 41 could not be read (the extractor's reply could not be parsed), and results from the other 8,977 appear after they are checked.

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