Most 3D segmentation networks repeat the same block many times across every stage. Each repeat costs parameters, memory and inference time, and few teams check whether each one earns its place. SlimFormer++, from Yang Hong, Lei Zhang, Zhihong Liu and Xujiong Ye at the University of Exeter and Jianqing Mo at Guangdong University of Technology, starts by checking. The authors measure which blocks and which token mixers actually change the features, remove the ones that do not, and end up with a 3D segmenter of 5.98 million parameters that ships as an nnU-Net v2 trainer, with released weights and a 3D Slicer extension. The paper is arXiv:2610.25488.
What SlimFormer++ is
SlimFormer++ is a volumetric segmentation network for CT, MRI and ultrasound. It plugs into nnU-Net v2 as a custom trainer (nnUNetTrainer_SlimFormerPlusPlus), so you keep nnU-Net’s preprocessing, patch sampling, sliding-window inference and folder layout. What changes is the network inside.
The design rests on one question: in a hierarchical encoder, where does token mixing (the part that moves information between voxels, such as attention, Mamba or large convolutions) actually help? The answer the paper reaches is “in the first stage and at the bottleneck, and almost nowhere in between”. The rest of the network is plain convolution and channel MLPs.
Why a viewer or AI pipeline team should care
If you run segmentation inside a viewer, on a hospital workstation or behind an API, model size is not an academic number. It decides whether a model fits next to a renderer on one GPU, whether CPU inference is tolerable, and how many studies you can process per hour. A 6M-parameter network that keeps nnU-Net’s training recipe is easy to slot into an existing pipeline: same dataset format, same commands, a different -tr flag.
The Slicer extension is the second reason. It segments 15 abdominal organs in CT on a plain CPU, on Windows, macOS or Linux, with weights of about 22 MB per mode. For a team that prototypes in 3D Slicer before building a product, that is a quick way to judge the masks on your own scans.
What the method does
- Find redundant blocks with CKA. Centered Kernel Alignment compares the input and output of each block. When they are almost the same, the block is doing little. Using this score to prune nnUNet, TransUNet and the original SlimFormer backbone removed 39 to 75% of their parameters while mean Dice dropped by less than 0.4 percentage points. That result alone says most 3D segmenters carry dead weight.
- Find useful mixers with ARD. The authors add a second diagnostic, Anatomical Relation Distortion. It switches off one token mixer at a time and measures how much the feature relations between labeled anatomical positions change. CKA said the middle encoder mixers looked redundant; ARD confirmed they barely matter, and showed that the bottleneck mixer matters most. When the bottleneck mixer was bypassed, 2,680 gallbladder pixels turned into background and 709 duodenum pixels were labeled as stomach, while the liver stayed mostly correct. Small, hard organs pay the price.
- Selective Mixing in stage 1 only. After a convolutional stem, the first encoder stage uses windowed (8x8x8) Mamba mixing. Stages 2 and 3 keep only residual channel MLPs, with convolutional skips and downsampling.
- Augmented Mixing at the bottleneck. The bottleneck uses a 3x3x3 depthwise convolution whose six axial taps also pull in context from a small set of similar voxels further away (up to 24 candidate slots). This adds about 6.2k parameters and costs time linear in the number of voxels. With its weight set to zero it falls back to a normal depthwise convolution.
- A light decoder. The decoder uses aligned upsampling with depthwise convolutions. Training follows nnU-Net: SGD with Nesterov momentum, Dice plus cross-entropy loss, sliding-window inference with Gaussian weighting and mirroring at test time.
What they found
The benchmark covers eight public datasets and 1,809 cases: AbdomenCT-1K and AMOS (abdominal CT), ACDC (cardiac MRI), CHAOS (liver MRI), MMWHS (whole heart CT and MRI), VESSEL12 (lung CT), RESECT (intraoperative brain tumor ultrasound) and Leg3DUS (leg muscle ultrasound). SlimFormer++ was compared with 12 baselines, including nnUNet, TransUNet, MedNeXt, SegMambaV2, nnWNet3D and pruned variants.
- Best mean accuracy with the smallest model. SlimFormer++ reached a mean Dice of 87.84% and a mean HD95 of 6.50 mm across the eight datasets with 5.98M parameters, against 30.8M for nnUNet and 151.1M for TransUNet. It ranked first or second on every dataset and metric pair.
- Clear gains on hard abdominal scans. On AMOS, Dice went from 83.61% with nnUNet to 89.76%, and HD95 roughly halved. On the other seven datasets the Dice gap to nnUNet ranges from 0.1 to 4.2 points.
- Far fewer operations, not faster yet. On a 96x96x96 patch it needs 189.3 GFLOPs, against 1,065.8 for nnUNet, and peaks at 0.43 GB of memory. But nnUNet is still faster per patch (7.33 ms against 12.99 ms on a GH200), because the Mamba scan and the remote gathers run on kernels that are less optimized than cuDNN convolutions.
The featured image above shows Fig. 9 of the paper: one slice each from cardiac MRI, abdominal CT and intraoperative ultrasound, with the input, the reference mask, nnUNet, TransUNet and SlimFormer++. Blue marks missed tissue, red false positives, yellow the wrong organ. On the ultrasound row every model under-segments the tumor; SlimFormer++ misses a thinner band than the others.
What this means for your stack
- If you already train nnU-Net, try it as a drop-in. Plan and preprocess as usual, then train with
nnUNetv2_train ... -tr nnUNetTrainer_SlimFormerPlusPlus. Compare against your current model on your own validation set, not on the paper’s table. - Measure latency on your hardware. Fewer FLOPs did not mean lower latency on a GH200. On older GPUs or on CPU the balance can go either way. The authors also provide a Mamba-free window-attention version, which avoids the custom CUDA build, though it has no pretrained weights.
- Use the Slicer extension for a quick look. It needs Slicer 5.10 or newer with the PyTorch and NNUNet extensions, and offers a Standard (1.5 mm) and a Fast (3 mm) mode, using a 6.0M-parameter Mamba-free model trained on 200 AMOS CT scans. The README reports mean Dice of 89.3% (Standard) and 84.4% (Fast) on 100 AMOS validation cases, and on an Apple laptop CPU about 30 seconds in Fast mode against about 45 seconds for TotalSegmentator’s fast mode. Those are repository claims, not results from the paper.
- Borrow the diagnostics even if you skip the model. CKA-based block pruning is cheap to run on a network you already own, and the paper suggests you can often remove a large share of blocks for a very small accuracy cost.
Where it falls short
- Latency. It is still slower than nnUNet per patch, and energy per volume is slightly higher (2.08 J against 1.93 J). The authors name hardware-efficient kernels as future work.
- Ultrasound tumors stay hard. On RESECT, Dice is only 68.29%, and every model under-segments the tumor. On Leg3DUS it is slightly behind MedNeXt.
- Research benchmarks only. All results come from public research datasets. There is no prospective or multi-site clinical evaluation, and the Slicer extension states it is for research use and is not a medical device.
- Setup cost. The full model needs Linux, an NVIDIA GPU, Python 3.12 and CUDA 12.6, and compiling the Mamba and causal-conv1d packages takes 10 to 20 minutes.
Code, weights and license
Code is public at github.com/WHHHHHY822/SlimFormerPlusPlus. Pretrained weights for ACDC, AbdomenCT-1K and AMOS CT are public and not gated, on the GitHub releases page and on Hugging Face (for example Yang0822/SlimFormerPlusPlus-AMOS2022-CT), and a predict.sh script runs them on *_0000.nii.gz files. The Slicer extension lives at github.com/WHHHHHY822/SlicerSlimFormerPlusPlus.
Read the license before you build on it. The model code and weights are under the SlimFormer++ Noncommercial Research License 1.0. It is source-available, not open source, and commercial use, including use in a product or in paid consulting, is not permitted. Third-party parts remain under Apache 2.0, and the Slicer module code is Apache 2.0, but its model file and weights follow the noncommercial license. For a commercial viewer or platform, treat SlimFormer++ as a reference design to learn from, or ask the authors about a separate license.
Related reading on PYCAD
- nnUNet for medical image segmentation
- SGAV-MP: Smaller Segmentation Models That Keep Their Uncertainty
- ReSeg: Organ Masks on CT, MRI and PET Without Real Training Scans
- SAT3D Puts Uncertainty-Guided Tumour Segmentation in 3D Slicer
- Automatic spine segmentation in 3D Slicer
Sources
- Yang Hong, Lei Zhang, Zhihong Liu, Jianqing Mo, Xujiong Ye. “SlimFormer++: Token Mixing Where It Matters for Efficient 3D Medical Image Segmentation.” arXiv:2610.25488, October 2026.
- Code and weights: github.com/WHHHHHY822/SlimFormerPlusPlus
- 3D Slicer extension: github.com/WHHHHHY822/SlicerSlimFormerPlusPlus
- Featured image: Fig. 9 of arXiv:2610.25488 (five of thirteen columns), credited to the authors.