XAttnRes: Cross-Stage Attention Residuals for Medical Image Segmentation
Organizations: Imperial College London · University of Nottingham · The Hong Kong Polytechnic University
Abstract
In the field of Large Language Models (LLMs), Attention Residuals have recently demonstrated that learned, selective aggregation over all preceding layer outputs can outperform fixed residual connections. We propose Cross-Stage Attention Residuals (XAttnRes), a mechanism that maintains a global feature history pool accumulating both encoder and decoder stage outputs. Through lightweight pseudo-query attention, each stage selectively aggregates from all preceding representations. To bridge the gap between the same-dimensional Transformer layers in LLMs and the multi-scale encoder-decoder stages in segmentation networks, XAttnRes introduces spatial alignment and channel projection steps that handle cross-resolution features with negligible overhead. When added to existing segmentation networks, XAttnRes consistently improves performance across four datasets and three imaging modalities. We further observe that XAttnRes alone, even without skip connections, achieves performance on par with the baseline, suggesting that learned aggregation can recover the inter-stage information flow traditionally provided by predetermined connections.
Figures & tables
| Method | Average | Dice Score (%) | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DSC | HD95 | mIoU | Aorta | GB | KL | KR | Liver | PC | Spleen | SM | |
| U-Net [ 27 ] | 76.25 | 26.93 | 65.96 | 89.93 | 54.42 | 78.87 | 72.87 | 92.71 | 59.65 | 85.98 | 75.55 |
| Unet3+ [ 14 ] | 76.93 | 26.77 | 66.02 | 88.87 | 61.93 | 83.06 | 76.52 | 93.83 | 56.21 | 81.88 | 73.17 |
| TransUNet [ 5 ] | 77.61 | 26.90 | 67.32 | 86.56 | 60.43 | 80.54 | 78.53 | 94.33 | 58.47 | 87.06 | 75.00 |
| Swin-UNet [ 4 ] | 77.58 | 27.32 | 66.88 | 81.76 | 65.95 | 82.32 | 79.22 | 93.73 | 53.81 | 88.04 | 75.79 |
| SSFormer [ 35 ] | 78.01 | 25.72 | 67.23 | 82.78 | 63.74 | 80.72 | 78.11 | 93.53 | 61.53 | 87.07 | 76.61 |
| Method | #Params | #FLOPs | ColonDB | ClinicDB | ISIC 2017 | Average |
|---|---|---|---|---|---|---|
| U-Net [ 27 ] | 1.06M | 2.50G | 86.01 | 92.13 | 82.13 | 86.76 |
| UNet++ [ 41 ] | 9.16M | 34.65G | 87.88 | 92.17 | 82.98 | 87.68 |
| Attn U-Net [ 23 ] | 34.88M | 66.64G | 86.46 | 92.20 | 83.66 | 87.44 |
| DeepLabv3+ [ 6 ] | 39.76M | 14.92G | 91.92 | 93.24 | 83.84 | 89.67 |
| PraNet [ 10 ] | 32.55M | 6.93G | 89.16 | 91.71 | 83.03 | 87.97 |
| Unet3+ [ 14 ] | 26.97M | 199.74G | 88.38 | 92.60 | 83.34 | 88.11 |
| Model | Skip | XAttnRes | Synapse | ColonDB | |
|---|---|---|---|---|---|
| DSC | HD95 | DSC | |||
| U-Net (baseline) | ✓ | – | 76.25 | 26.93 | 86.01 |
| U-Net (no skip) | – | – | 72.70 | 31.44 | 83.28 |
| U-Net + XAttnRes (replace) | – | ✓ | 76.31 | 26.95 | 86.07 |
| U-Net + XAttnRes (both) | ✓ | ✓ | 76.40 | 26.71 | 86.22 |
| EMCAD (baseline) | ✓ | – | 83.63 | 15.68 | 92.31 |
Attention Residual Connections
Attention residual connections use learned, input-dependent routing to combine earlier layer outputs instead of relying only on fixed skips.
See all 23 papers