Deciding how to treat bladder cancer comes down to one geometric question: has the tumor grown through the inner lining into the detrusor muscle, the bladder's muscular wall? Today the answer comes from cystoscopy, in which a scope is passed through the urethra, followed by resection of tissue. Patients find it painful, often need sedation, and are reluctant to repeat it, which matters because surveillance must continue for years after treatment (Review of Endoscopic Procedures). MRI can see the wall without entering the body. But the tumor and the muscle look almost the same on MRI, and the best published segmenter of bladder MRI reaches only 0.69 Dice on the tumor even though it reaches 0.98 on the clearly visible inner wall (Multi-region segmentation of bladder cancer structures in MRI with progressive dilated convolutional networks). The easy structure and the hard one sit right next to each other, and current models do not use the first to help with the second.
We propose to use the reliably segmented inner wall as a curved coordinate frame. The scan is resampled into short columns that run perpendicular to the wall, one column per point on the wall surface. Window-based self-attention, meaning attention restricted to small local neighborhoods so that cost grows linearly with image size, is then applied in this unrolled space: windows are long along the wall surface and short across its thickness. The network therefore compares tissue at the same depth along the wall, and at different depths at the same wall location, which is the comparison a radiologist makes when judging muscle invasion. From the output we read off a depth-of-invasion map, and stage is derived from that geometry rather than from a separate classifier.
Core Claim
Fixed square or cubic attention windows cut across a thin curved wall at arbitrary angles. As a result, one window holds a mix of urine, mucosa, tumor and muscle in proportions that depend on the wall's orientation rather than on the pathology. Aligning windows to the wall's own frame should cut boundary error specifically at the tumor–muscle interface, and should give more accurate non-muscle-invasive versus muscle-invasive (NMIBC vs. MIBC) decisions than either convolutional segmenters or Cartesian window transformers. The gain should come from the alignment itself, not merely from giving the network information about distance to the wall. That second part is what makes the claim worth testing: a cheaper alternative supplies the same distance information without any resampling, and our ablations are built to tell the two apart.
Where This Sits
Three window-attention designs for 3D medical images supply the starting mechanism. DwinFormer splits 3D window attention into sequential passes along the horizontal, vertical and depth axes and adds a depthwise convolution inside the attention block to keep edge texture, which improves HD95 on Synapse over the global transformer nnFormer (Medical Image Segmentation Using Directional Window Attention). NA-UNETR uses sliding cubic neighborhoods, some of them dilated, to segment a faint coronary artery on non-contrast CT (A Neighborhood Attention Transformer Network for Enhanced 3D Segmentation of the Left Anterior Descending Artery). Swin-style shifted windows move a fixed grid between layers so information can cross window edges (A Survey on Vision Transformer). All three define their windows along scanner axes. We keep the local, linear-cost attention and replace the axes with directions taken from the anatomy: along the wall and through it.
Two constraints shape the design. How Do Vision Transformers Work? found that self-attention behaves like a low-pass filter and that small local windows often beat global attention. The first finding warns that stacked attention can blur a faint edge; the second supports staying local. We respond by making windows short across the wall, so the smoothing happens mostly along the surface, where tissue really is similar, and by keeping DwinFormer-style depthwise convolution. NA-UNETR's authors also report that their model remains limited by how visible the anatomy is in the raw image. We take that seriously: our method cannot create contrast that is not in the scan. It can only make sure the faint contrast that exists is compared in the right direction.
The application side is motivated by two bladder MRI studies. MM-SFENet treats MRI as a substitute for cystoscopy and separates NMIBC from MIBC using bounding boxes and a classifier, with no attention mechanism and no dense contour (MM-SFENet). Dolz et al. segment the inner wall, outer wall and tumor with progressive dilated convolutions applied to 2D slices. Neither delineates the interface at the tumor base, which is where stage is decided. Boundary-focused polyp models, such as MISNet's separate boundary and reverse-attention branches (Multi-scale Information Sharing and Selection Network with Boundary Attention for Polyp Segmentation) and reverse attention with thresholding (Parallel Res2Net-based Network with ReverseAttention for Polyp Segmentation), work on video captured during an invasive colonoscopy. We borrow their boundary supervision idea as a baseline component, not as the contribution. Liquid biopsies, including urinary methylation panels with over 94% early-stage sensitivity (A diagnostic model for non-invasive urothelial cancer early detection based on methylation of urinary tumor DNA) and urinary cell-free DNA surveillance (Urinary Cell-Free DNA in Bladder Cancer Detection), show the demand for non-invasive testing. They report whether tumor is present, not how deep it reaches, which is the gap imaging has to fill.
Research Program
The pipeline has three stages.
First, an off-the-shelf 3D segmenter predicts the inner wall, the step known to be nearly solved, and we convert that mask into a surface mesh. At each mesh vertex we sample the MRI along the surface normal from a few millimetres inside the lumen to about 15–20 mm outward. This produces a "column image": two surface dimensions by one depth dimension. Tumors that bulge into the lumen are covered by the inward part of each column.
Second, a segmentation network operates on the column image. Within each column it uses full attention along depth, which is cheap because columns are short. Across columns it uses neighborhood attention over geodesic neighbors on the mesh, in the style of NA-UNETR but measured along the surface rather than as a Euclidean cube. A depthwise convolution sits alongside each attention block to preserve high-frequency edge content.
Third, predictions for tumor and outer wall are mapped back to voxels for evaluation. They are also summarized per vertex as invasion depth, defined as the furthest tumor extent along the normal relative to the predicted outer-wall position. Stage is read off directly: muscle-invasive if tumor extends past the inner muscle boundary over a contiguous patch larger than a set minimum area.
Training uses Dice plus a boundary-distance term weighted by learned uncertainty, as in NA-UNETR, computed in voxel space so the loss is identical to the baselines'. The main risk is that errors in the inner-wall surface propagate into the frame. We therefore train with randomly perturbed surfaces, varying the normal directions and adding mesh noise, and we measure sensitivity to frame error explicitly.
Baselines
The naive reference is a standard U-Net and the progressive dilated U-Net of Dolz et al. The latter reports tumor Dice 0.69, tumor ASSD 2.83 mm, and outer-wall Dice 0.84 on 60 patients, against 0.56 tumor Dice for the plain U-Net (Multi-region segmentation of bladder cancer structures in MRI with progressive dilated convolutional networks). These are the only published dense numbers on this task in the file, and we will reproduce them on our splits before comparing anything.
The strongest convolutional competitor is nnU-Net in 3D. It beat Swin UNETR and came within 3.1 Dice points of NA-UNETR on the low-contrast LAD-SEG cohort (42.54% versus 45.64% for NA-UNETR) (NA-UNETR). We found no reported result on Lacuna for nnU-Net on bladder MRI.
The strongest window-attention competitors are NA-UNETR, DwinFormer and Swin UNETR, run in their native Cartesian grids. DwinFormer reports Synapse Dice 87.38% and HD95 8.68 mm, against 86.57% and 10.63 mm for nnFormer. We found no reported result on Lacuna for any of them on bladder MRI.
For staging, MM-SFENet reports 93.34% mAP and 83.16% localization IoU on its 98-patient cohort. That is a detection metric, so we retrain it as a direct NMIBC/MIBC classifier on our data rather than comparing against its published number.
Fairness rules apply to every baseline. All models get the same patient-level cross-validation folds, the same augmentation, and the same GPU-hour tuning budget for each method. All models also receive the predicted inner-wall mask as an extra input channel, so that our method's only advantage is how it uses the wall, not access to it. The key ablations follow from the same logic. The first gives NA-UNETR the signed distance to the inner wall and the local normal direction as input channels, with no resampling. The second runs our column network with isotropic rather than anisotropic windows. The third builds columns along a fixed scanner axis instead of the surface normal.
Beating the baselines means two things. First, a statistically significant reduction in boundary distance within a 3 mm band around the tumor base relative to nnU-Net and the distance-channel NA-UNETR, using paired per-patient tests. Second, a higher patient-level NMIBC/MIBC AUC than the retrained MM-SFENet classifier. Whole-tumor Dice parity is acceptable.
Why not just…?
Why not just run nnU-Net and measure invasion depth from its masks afterward? This is the most serious threat, because nnU-Net is well tuned and post-hoc geometry costs nothing. We will run exactly this pipeline, using the same column read-out on nnU-Net's masks. If its staging AUC and interface error match ours, the contribution reduces to the read-out step, and we will report it that way. Our bet is that Cartesian models already make their largest errors at the tumor base. The fact that tumor Dice stalls at 0.69 while inner-wall Dice reaches 0.98 in Dolz et al. points to exactly this.
Why not just add distance-to-wall as an input channel to an existing window transformer? This gives the network the same anatomical information for far less engineering, and it may well be enough. It is our central ablation. If it matches the column network, the alignment of the windows is unnecessary and the paper's claim fails. The reason it might fall short is that the windows themselves still mix tissue depths unevenly when the wall is oblique to the scanner axes, regardless of what the input channels encode.
Why not just classify stage directly, as MM-SFENet does? A classifier can be accurate without telling a clinician where invasion happens or by how much. A direct classifier also trained on a few hundred patients may pick up shortcuts such as tumor size. We will compare AUCs. We will also check whether each method's errors concentrate on small or flat tumors, where size cues fail and geometry should help.
Why not just use urine or blood tests? They detect tumor-derived molecules but cannot report depth of invasion, which is the quantity that decides between transurethral resection and cystectomy. We see imaging as a complement to these tests, not a replacement.
Proposed Experiments
The primary setting is T2-weighted bladder MRI with inner wall, outer wall and tumor annotations of the kind used by Dolz et al., plus pathology-confirmed stage labels of the kind in Ren et al. The file does not say whether either cohort is public. Data access, through those groups or an institutional cohort of comparable size with surgical pathology, is therefore the first practical risk. We would aim for at least 100 patients so that the per-stage subgroups are not trivially small.
Metrics are tumor Dice, ASSD and HD95, boundary error restricted to the tumor-base band, outer-wall Dice, invasion-depth error in millimetres against pathology where available, and patient-level NMIBC/MIBC AUC with calibration. Where multiple annotators exist, we will also report agreement with each one, because boundaries this faint carry real disagreement between experts.
Four checks are decisive. The first is whether the improvement concentrates in the tumor-base band rather than spreading across whole-tumor Dice; that pattern is what wall alignment predicts. The second is whether the column network beats the distance-channel NA-UNETR ablation. The third is how quickly performance degrades as we inject controlled error into the inner-wall surface. Graceful degradation is required for clinical use, given that the frame comes from a model. The fourth is whether geometry-derived staging beats both the direct classifier and nnU-Net with the same read-out, on the subset of small or flat tumors where depth matters most.
If the second check fails, we will report that aligning windows to the wall adds nothing beyond supplying wall coordinates as input. That is a clean negative result and still useful to anyone building transformers for other hollow organs.
References
- https://www.zentimepublishing.com/journal/PMD/issues/Vol1Iss1/10.61189/550253gnnvtv.html
- Multi-region segmentation of bladder cancer structures in MRI with progressive dilated convolutional networks
- Medical Image Segmentation Using Directional Window Attention
- A Neighborhood Attention Transformer Network for Enhanced 3D Segmentation of the Left Anterior Descending Artery
- A Survey on Vision Transformer
- How Do Vision Transformers Work?
- MM-SFENet: multi-scale multi-task localization and classification of bladder cancer in MRI with spatial feature encoder network
- Multi-scale information sharing and selection network with boundary attention for polyp segmentation
- Parallel Res2Net-based Network with ReverseAttention for Polyp Segmentation
- A diagnostic model for non-invasive urothelial cancer early detection based on methylation of urinary tumor DNA
- Urinary Cell-Free DNA in Bladder Cancer Detection