Papers › Medical Image Segmentation Using Squeeze-and-Expansion Transformers

Medical Image Segmentation Using Squeeze-and-Expansion Transformers

20 May 2021arXiv:2105.09511archive 2025-07-28

Shaohua Li, Xiuchao Sui, Xiangde Luo, Xinxing Xu, Yong liu, Rick Goh

Medical image segmentation is important for computer-aided diagnosis. Good segmentation demands the model to see the big picture and fine details simultaneously, i.e., to learn image features that incorporate large context while keep high spatial resolutions. To approach this goal, the most widely used methods -- U-Net and variants, extract and fuse multi-scale features. However, the fused features still have small "effective receptive fields" with a focus on local image cues, limiting their performance. In this work, we propose Segtran, an alternative segmentation framework based on transformers, which have unlimited "effective receptive fields" even at high feature resolutions. The core of Segtran is a novel Squeeze-and-Expansion transformer: a squeezed attention block regularizes the self attention of transformers, and an expansion block learns diversified representations. Additionally, we propose a new positional encoding scheme for transformers, imposing a continuity inductive bias for images. Experiments were performed on 2D and 3D medical image segmentation tasks: optic disc/cup segmentation in fundus images (REFUGE'20 challenge), polyp segmentation in colonoscopy images, and brain tumor segmentation in MRI scans (BraTS'19 challenge). Compared with representative existing methods, Segtran consistently achieved the highest segmentation accuracy, and exhibited good cross-domain generalization capabilities. The source code of Segtran is released at https://github.com/askerlee/segtran.

PaperPDFCodeCode Syntology ranMethod as code

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 20 code samples harvested from 1 repository linked to this paper: 13 ran (of which 8 constructed an object rather than computing a result; 11 with no instrument failure: 1 honoured, 0 violated, 10 with no contract checked; 2 where Syntology's instrument failed) · 7 unverified. Where Syntology's instrument failed: 2 where our contract draft was wrong; failures of Syntology's instrument, not of the code.

By repository: official repository: 20 samples from 1 repository, 13 ran (11 with no instrument failure; 2 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 between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

askerlee/segtran officialmentioned in papermentioned on GitHubpytorchSyntology: 20 samples, 13 ran (2 instrument-failed) · 7 unverified report
maxiao0234/ttga mentioned on GitHubpytorchSyntology: not harvested report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. 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

20 samples harvested: 13 ran (of which 8 constructed an object rather than computing a result; 11 with no instrument failure: 1 honoured, 0 violated, 10 with no contract checked; 2 where Syntology's instrument failed) · 7 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

1ran · honoured contract
2ran · our draft was wrong
10ran
7unverified

Licence: 20 of the 20 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 askerlee/segtran. “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”. For 4 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “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.

askerlee/segtran official repository 20 samples, 13 ran (2 instrument-failed) · 7 unverified
LearnedSinuPosEmbedder code/networks/segtran_shared.py ran · metamorphic tier: deterministic no licence file found · pointer only · 8631456f20d9c1b9 · report fixture: returned LearnedSinuPosEmbedder · level recorded 2026-09-22
LearnedSoftAggregate code/networks/segtran_shared.py ran fingerprinted no licence file found · pointer only · ce585f7154f9dc0c · report fixture: signature x:Tensor/3/float, score_basis:NoneType/0/? · returned Tensor · level recorded 2026-09-24
MMPrivateMid code/networks/segtran_shared.py ran · metamorphic tier: deterministic no licence file found · pointer only · 060455705ae47d70 · report fixture: returned MMPrivateMid · level recorded 2026-09-22
MMSharedMid code/networks/segtran_shared.py ran · metamorphic tier: deterministic fingerprinted no licence file found · pointer only · 4af27a1b2e04f6f6 · report fixture: returned MMSharedMid · level recorded 2026-09-22
MultiHeadFeatTrans code/networks/segtran_shared.py ran · metamorphic tier: deterministic no licence file found · pointer only · 6f29f1ac1dd4e5ae · report fixture: returned MultiHeadFeatTrans · level recorded 2026-09-22
NoneEmbedder code/networks/segtran_shared.py ran no licence file found · pointer only · 86e01c2857885263 · report fixture: signature pos_normed:Tensor/2/float · returned NoneType · level recorded 2026-09-24
RandPosEmbedder code/networks/segtran_shared.py ran · metamorphic tier: deterministic fingerprinted no licence file found · pointer only · 4ad6430b01c09cb6 · report fixture: returned RandPosEmbedder · level recorded 2026-09-22
SinuPosEmbedder code/networks/segtran_shared.py ran fingerprinted no licence file found · pointer only · f0592e287a093c48 · report fixture: returned SinuPosEmbedder · level recorded 2026-09-22
SlidingPosBiases2D code/networks/segtran_shared.py ran · metamorphic tier: deterministic no licence file found · pointer only · 9519a9bc56a4dc51 · report fixture: returned SlidingPosBiases2D · level recorded 2026-09-22
SlidingPosBiases3D code/networks/segtran_shared.py ran · metamorphic tier: deterministic no licence file found · pointer only · 3287ec7b8fd0c808 · report fixture: returned SlidingPosBiases3D · level recorded 2026-09-22
fracs_to_indices code/networks/segtran_shared.py ran · our draft was wrong fingerprinted no licence file found · pointer only · 3fa83a75e1d882d9 · report fixture: signature feat_dim:int/0/int, mince_channel_props:list/1/int · returned tuple · level recorded 2026-09-22
multi_resize_shape code/networks/segtran_shared.py ran · our draft was wrong no licence file found · pointer only · 46cc07a5b47f925b · report fixture: signature shape:Size/1/int, scales:list/1/int · returned list · level recorded 2026-09-22
positionalencoding2d in 17 papers code/networks/segtran_shared.py ran · honoured contract fingerprinted no licence file found · pointer only · 8835d90bb9dd73b8 · report fixture: signature pos_embed_dim:int/0/int, height:int/0/int, width:int/0/int · returned Tensor · level recorded 2026-09-22
CrossAttFeatTrans code/networks/segtran_shared.py unverified no licence file found · pointer only · af5fb5367ebfbfb3 · report
CrossMinceAttFeatTrans code/networks/segtran_shared.py unverified no licence file found · pointer only · 5c226db1ced864bd · report
ExpandedFeatTrans code/networks/segtran_shared.py unverified no licence file found · pointer only · 06117d01318bffe8 · report
SegtranFusionEncoder code/networks/segtran_shared.py unverified no licence file found · pointer only · acabdd901645b3e6 · report
SegtranPosEncoder code/networks/segtran_shared.py unverified no licence file found · pointer only · a5f46c66fa54514b · report
SqueezedAttFeatTrans code/networks/segtran_shared.py unverified no licence file found · pointer only · efcfd592a205f3eb · report
resize_flat_features code/networks/segtran_shared.py unverified no licence file found · pointer only · 556f05e13b45cdee · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for Segtran (graph method: Segtran). 22 bricks; individually on a fixture: 15 ran (of which 9 constructed an object rather than computing a result; 13 with no instrument failure: 1 honoured, 0 violated, 12 with no contract checked; 2 where Syntology's instrument failed) · 7 unverified. The assembly has not been run end-to-end.

  1. SegtranFusionEncoder entry · level 0 · unverified · acabdd901645b3e6
  2. CrossAttFeatTrans model · level 0 · unverified · af5fb5367ebfbfb3
  3. CrossMinceAttFeatTrans model · level 0 · unverified · 5c226db1ced864bd
  4. SegtranPosEncoder model · level 0 · unverified · a5f46c66fa54514b
  5. SqueezedAttFeatTrans model · level 0 · unverified · efcfd592a205f3eb
  6. multi_resize_shape helper · level 1 · ran · our draft was wrong · 46cc07a5b47f925b
  7. ExpandedFeatTrans model · level 0 · unverified · 06117d01318bffe8
  8. MultiHeadFeatTrans helper · level 1 · ran · 6f29f1ac1dd4e5ae
  9. fracs_to_indices helper · level 1 · ran · our draft was wrong · 3fa83a75e1d882d9
  10. resize_flat_features helper · level 0 · unverified · 556f05e13b45cdee
  11. LearnedSinuPosEmbedder helper · level 1 · ran · 8631456f20d9c1b9
  12. NoneEmbedder helper · level 1 · ran · 86e01c2857885263
  13. RandPosEmbedder helper · level 1 · ran · 4ad6430b01c09cb6
  14. SinuPosEmbedder helper · level 1 · ran · f0592e287a093c48
  15. SlidingPosBiases2D helper · level 1 · ran · 9519a9bc56a4dc51
  16. SlidingPosBiases3D helper · level 1 · ran · 3287ec7b8fd0c808
  17. LearnedSoftAggregate model · level 1 · ran · ce585f7154f9dc0c
  18. MMPrivateMid model · level 1 · ran · 060455705ae47d70
  19. MMPrivateOutput model · level 1 · ran · e9781e1438fd9ef6
  20. MMSharedMid model · level 1 · ran · 4af27a1b2e04f6f6
  21. MMSharedOutput model · level 1 · ran · dfa223728f6e6fa3
  22. positionalencoding2d helper · level 1 · ran · honoured contract · 8835d90bb9dd73b8

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2105.09511") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Brain Tumor SegmentationDomain GeneralizationImage SegmentationInductive BiasMedical Image SegmentationOptic Cup SegmentationOptic Disc SegmentationSegmentationSemantic SegmentationTumor Segmentation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Brain Tumor Segmentation BRATS 2019 Segtran (i3d) Avg. 0.817 #1 of 5 Archive leaderboard report
Brain Tumor Segmentation BRATS 2019 Segtran (i3d) TC 0.817 #1 of 5 Archive leaderboard report
Brain Tumor Segmentation BRATS 2019 Extension of nnU-Net Avg. 0.812 #2 of 5 Archive leaderboard report
Brain Tumor Segmentation BRATS 2019 Extension of nnU-Net ET 0.740 #2 of 5 Archive leaderboard report
Brain Tumor Segmentation BRATS 2019 Extension of nnU-Net TC 0.807 #2 of 5 Archive leaderboard report
Brain Tumor Segmentation BRATS 2019 Extension of nnU-Net WT 0.894 #2 of 5 Archive leaderboard report
Brain Tumor Segmentation BRATS 2019 Bag of tricks ET 0.729 #3 of 5 Archive leaderboard report
Brain Tumor Segmentation BRATS 2019 Bag of tricks TC 0.802 #3 of 5 Archive leaderboard report
Brain Tumor Segmentation BRATS 2019 Bag of tricks WT 0.895 #3 of 5 Archive leaderboard report
Optic Cup Segmentation REFUGE Challenge Segtran (EfficientNet-B4) Dice 0.872 #2 of 2 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Concatenated Skip ConnectionConvolutionMax PoolingReLUU-Net

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