Papers
Topics
Authors
Recent
Search
2000 character limit reached

XAG-Net for Femur MRI Segmentation

Updated 8 July 2026
  • The paper introduces XAG-Net, a 2.5D U-Net architecture that combines pixel-wise cross-slice attention with skip attention gating to enhance inter-slice context and intra-slice refinement.
  • XAG-Net achieves state-of-the-art performance on femur MRI segmentation with DSC 0.9535 and IoU 0.9160, outperforming traditional 2D and 3D U-Nets while reducing computational cost.
  • The method bridges the gap between efficient 2D methods and computationally expensive 3D approaches, although its fixed three-slice input may require adaptation for different MRI protocols.

Searching arXiv for the exact XAG-Net paper and the similarly named SNAT-YOLO paper to ground the article in current arXiv records. XAG-Net is a 2.5D U-Net-based architecture for femur MRI segmentation that combines pixel-wise Cross-Slice Attention (CSA) and skip-level Attention Gating (AG) to improve inter-slice contextual modeling and intra-slice feature refinement (Ko et al., 8 Aug 2025). It was proposed to bridge the gap between efficient 2D methods, which lack through-slice context, and fully volumetric 3D approaches, which are computationally expensive and prone to overfitting in low-data musculoskeletal MRI regimes. In the reported study, XAG-Net is evaluated on a 10-subject femur MRI dataset and is presented as achieving state-of-the-art accuracy versus 2D, 2.5D, and 3D U-Nets while remaining efficient.

1. Problem setting and design rationale

Femur segmentation from Magnetic Resonance Imaging is described as critical for orthopedic diagnosis and surgical planning, but difficult because the femur exhibits complex 3D geometry, particularly in the proximal and distal regions. The paper identifies two limiting baselines. First, 2D U-Nets process slices independently and therefore often miss inter-slice continuity and volumetric context. Second, 3D U-Nets capture volumetric context but incur much higher memory use and FLOPs, and tend to overfit on small datasets typical in musculoskeletal MRI (Ko et al., 8 Aug 2025).

The 2.5D formulation is presented as the intermediate design point. A small number of adjacent slices, here three axial slices, are stacked and processed with 2D convolutions. This provides partial volumetric context at substantially lower computational cost than full 3D modeling. The specific gap targeted by XAG-Net is that prior CSA-based 2.5D methods such as CSA-Net and CSAM often omit pixel-level normalization across slices or operate at coarser spatial granularity, while attention-gated methods such as Attention U-Net refine features within a slice but do not explicitly model inter-slice continuity. XAG-Net addresses both deficiencies by combining pixel-wise softmax normalization across adjacent slices with attention gating in skip connections.

A plausible implication is that the architecture is tuned for anatomies in which rigid local boundaries, such as cortical edges, require both local spatial precision and consistent through-slice propagation. The paper explicitly frames this as advantageous for preserving local cortical boundaries rather than relying on coarser slice-wise or global attention.

2. Network topology and data flow

The backbone is a 2.5D U-Net with four encoder down-sampling stages, a bottleneck, and four decoder up-sampling stages linked by skip connections (Ko et al., 8 Aug 2025). The network expects a stack of three sequential axial slices as a 2.5D tensor. The Methods section reports an input tensor of shape (256×256×3)(256 \times 256 \times 3), while the dataset images are cropped to 360×160360 \times 160; the resizing or padding procedure used to reconcile these shapes is not explicitly stated.

CSA is inserted twice in the overall topology. An initial CSA module is applied to the stacked input before the encoder. Additional CSA modules are applied inside each skip path. AG is also applied to each encoder skip feature, conditioned on the corresponding decoder feature. At every decoder stage, the upsampled decoder representation is fused with both the CSA-refined skip and the AG-refined skip:

Fconcat=Concat(U,CSA(Senc),AG(Senc,g)).F_{\mathrm{concat}} = \mathrm{Concat}(U,\mathrm{CSA}(S_{\mathrm{enc}}),\mathrm{AG}(S_{\mathrm{enc}}, g)).

The reported stage-wise flow is as follows. The input is

X0RH×W×3,X_0 \in \mathbb{R}^{H \times W \times 3},

with H=W=256H=W=256 reported in the Methods section. Initial CSA preserves shape:

X0RH×W×3.X_0' \in \mathbb{R}^{H \times W \times 3}.

Four encoder stages successively produce features at spatial resolutions H×WH \times W, H/2×W/2H/2 \times W/2, H/4×W/4H/4 \times W/4, and H/8×W/8H/8 \times W/8, followed by max-pooling after each stage. The bottleneck is reported as

360×160360 \times 1600

The decoder then upsamples stage by stage, each time concatenating the upsampled decoder feature with CSA- and AG-processed skip features before convolution and batch normalization. A final 360×160360 \times 1601 convolution produces the segmentation mask, followed by sigmoid. The paper states an “output mask of 360×160360 \times 1602”; the exact output tensor shape is not clearly reported, and the text notes that in typical 2D segmentation this would ordinarily be 360×160360 \times 1603.

This organization is significant because it places cross-slice modeling both at the input and within the skip pathways, rather than treating skip fusion as a purely intra-slice transfer mechanism.

3. Pixel-wise Cross-Slice Attention

CSA is the principal inter-slice mechanism in XAG-Net (Ko et al., 8 Aug 2025). For an input

360×160360 \times 1604

with 360×160360 \times 1605 slices in this work, a 360×160360 \times 1606 convolution 360×160360 \times 1607 produces per-slice scores

360×160360 \times 1608

Softmax is then applied across the slice dimension at each spatial location:

360×160360 \times 1609

In tensor form,

Fconcat=Concat(U,CSA(Senc),AG(Senc,g)).F_{\mathrm{concat}} = \mathrm{Concat}(U,\mathrm{CSA}(S_{\mathrm{enc}}),\mathrm{AG}(S_{\mathrm{enc}}, g)).0

along the slice or channel dimension. The CSA output is defined as

Fconcat=Concat(U,CSA(Senc),AG(Senc,g)).F_{\mathrm{concat}} = \mathrm{Concat}(U,\mathrm{CSA}(S_{\mathrm{enc}}),\mathrm{AG}(S_{\mathrm{enc}}, g)).1

or equivalently

Fconcat=Concat(U,CSA(Senc),AG(Senc,g)).F_{\mathrm{concat}} = \mathrm{Concat}(U,\mathrm{CSA}(S_{\mathrm{enc}}),\mathrm{AG}(S_{\mathrm{enc}}, g)).2

The stated purpose is to normalize the contribution of each adjacent slice at every pixel, enforcing that attention weights across slices sum to Fconcat=Concat(U,CSA(Senc),AG(Senc,g)).F_{\mathrm{concat}} = \mathrm{Concat}(U,\mathrm{CSA}(S_{\mathrm{enc}}),\mathrm{AG}(S_{\mathrm{enc}}, g)).3 per spatial location. The paper contrasts this with prior approaches that commonly use slice-wise or channel-wise attention without pixel-level normalization, or compute attention at patch or global scales. XAG-Net’s formulation is explicitly described as pixel-wise, spatially localized, and stabilized by residual addition.

The pseudo-code given in the paper is minimal:

360×160360 \times 16001

Its computational overhead is correspondingly small. Parameter cost is approximately Fconcat=Concat(U,CSA(Senc),AG(Senc,g)).F_{\mathrm{concat}} = \mathrm{Concat}(U,\mathrm{CSA}(S_{\mathrm{enc}}),\mathrm{AG}(S_{\mathrm{enc}}, g)).4 for the Fconcat=Concat(U,CSA(Senc),AG(Senc,g)).F_{\mathrm{concat}} = \mathrm{Concat}(U,\mathrm{CSA}(S_{\mathrm{enc}}),\mathrm{AG}(S_{\mathrm{enc}}, g)).5 convolution plus bias, and with Fconcat=Concat(U,CSA(Senc),AG(Senc,g)).F_{\mathrm{concat}} = \mathrm{Concat}(U,\mathrm{CSA}(S_{\mathrm{enc}}),\mathrm{AG}(S_{\mathrm{enc}}, g)).6 this is described as negligible. FLOPs are dominated by the Fconcat=Concat(U,CSA(Senc),AG(Senc,g)).F_{\mathrm{concat}} = \mathrm{Concat}(U,\mathrm{CSA}(S_{\mathrm{enc}}),\mathrm{AG}(S_{\mathrm{enc}}, g)).7 convolution, Fconcat=Concat(U,CSA(Senc),AG(Senc,g)).F_{\mathrm{concat}} = \mathrm{Concat}(U,\mathrm{CSA}(S_{\mathrm{enc}}),\mathrm{AG}(S_{\mathrm{enc}}, g)).8 with Fconcat=Concat(U,CSA(Senc),AG(Senc,g)).F_{\mathrm{concat}} = \mathrm{Concat}(U,\mathrm{CSA}(S_{\mathrm{enc}}),\mathrm{AG}(S_{\mathrm{enc}}, g)).9, plus softmax and element-wise multiplication. This suggests that the key design choice is not heavy attention capacity but precise normalization over a very small slice stack.

4. Skip Attention Gating and decoder fusion

AG is the complementary intra-slice refinement mechanism (Ko et al., 8 Aug 2025). Given an encoder feature X0RH×W×3,X_0 \in \mathbb{R}^{H \times W \times 3},0 and a decoder gating signal X0RH×W×3,X_0 \in \mathbb{R}^{H \times W \times 3},1 at the corresponding level, the gate is defined as

X0RH×W×3,X_0 \in \mathbb{R}^{H \times W \times 3},2

and the gated skip feature is

X0RH×W×3,X_0 \in \mathbb{R}^{H \times W \times 3},3

Here X0RH×W×3,X_0 \in \mathbb{R}^{H \times W \times 3},4 and X0RH×W×3,X_0 \in \mathbb{R}^{H \times W \times 3},5 are learnable X0RH×W×3,X_0 \in \mathbb{R}^{H \times W \times 3},6 convolutions and X0RH×W×3,X_0 \in \mathbb{R}^{H \times W \times 3},7 is the sigmoid. The paper does not specify the intermediate gating dimensionality; the gate X0RH×W×3,X_0 \in \mathbb{R}^{H \times W \times 3},8 is broadcast to match the spatial shape of X0RH×W×3,X_0 \in \mathbb{R}^{H \times W \times 3},9 when necessary.

AG is applied to each encoder skip feature and conditioned on the matching decoder feature. In standard U-Net, the raw encoder feature is concatenated directly with the decoder feature. In XAG-Net, the skip path is transformed in two parallel ways: one branch carries inter-slice contextual refinement via CSA, and the other carries decoder-conditioned intra-slice saliency filtering via AG. These are jointly fused with the upsampled decoder representation through the concatenation rule already given.

The paper emphasizes that AG alone does not address inter-slice continuity. Its role is instead to suppress irrelevant background and emphasize salient structures within the skip features. The interaction between AG and CSA becomes important in the ablation study: AG alone is detrimental relative to the plain 2.5D baseline, but becomes beneficial when combined with CSA. This suggests that decoder-conditioned gating is most useful after or alongside explicit cross-slice contextualization, rather than as a standalone substitute for it.

5. Training protocol and empirical performance

The dataset consists of 4,802 axial MRI slices of the femur in PNG format at H=W=256H=W=2560 pixels, each paired with an expert binary mask (Ko et al., 8 Aug 2025). The study uses 10 adolescent subjects, TD01–TD10. Training uses TD01–TD08, corresponding to 3,761 slices, with some shaft-dominant slices removed to balance anatomies; testing uses TD09–TD10, corresponding to 1,041 slices. Images are reported as cropped to H=W=256H=W=2561, while the network input is described as H=W=256H=W=2562; the preprocessing step that reconciles these formats is not explicitly documented.

Optimization uses Adam for 100 epochs with initial learning rate H=W=256H=W=2563 and batch size H=W=256H=W=2564. Model selection is based on the lowest validation loss. Augmentation, regularization, and mixed precision are not detailed. Training was performed on an NVIDIA A100 GPU via Google Colab. The loss combines Dice loss with a Sobel boundary term:

H=W=256H=W=2565

H=W=256H=W=2566

H=W=256H=W=2567

where H=W=256H=W=2568 is the Sobel operator, and

H=W=256H=W=2569

Evaluation thresholds masks at X0RH×W×3.X_0' \in \mathbb{R}^{H \times W \times 3}.0 and reports DSC, IoU, and HD95. In full-scan evaluation on TD09–TD10, XAG-Net achieves DSC X0RH×W×3.X_0' \in \mathbb{R}^{H \times W \times 3}.1, IoU X0RH×W×3.X_0' \in \mathbb{R}^{H \times W \times 3}.2, and HD95 X0RH×W×3.X_0' \in \mathbb{R}^{H \times W \times 3}.3 px. The reported comparators are: 2.5D U-Net, DSC X0RH×W×3.X_0' \in \mathbb{R}^{H \times W \times 3}.4, IoU X0RH×W×3.X_0' \in \mathbb{R}^{H \times W \times 3}.5, HD95 X0RH×W×3.X_0' \in \mathbb{R}^{H \times W \times 3}.6 px; CSAM, DSC X0RH×W×3.X_0' \in \mathbb{R}^{H \times W \times 3}.7, IoU X0RH×W×3.X_0' \in \mathbb{R}^{H \times W \times 3}.8, HD95 X0RH×W×3.X_0' \in \mathbb{R}^{H \times W \times 3}.9 px; Attention U-Net, DSC H×WH \times W0, IoU H×WH \times W1, HD95 H×WH \times W2 px; U-Net, DSC H×WH \times W3, IoU H×WH \times W4, HD95 H×WH \times W5 px; and 3D U-Net, DSC H×WH \times W6, IoU H×WH \times W7, HD95 H×WH \times W8 px. XAG-Net is also reported to use 56.3% fewer parameters and approximately 72% fewer FLOPs than 3D U-Net, and approximately 33% fewer parameters and 72.7% fewer FLOPs than CSAM. Its parameter count is 23,138,641 and its FLOPs are 89,465,067,776. Average inference time is 250.89 ms per slice, compared with 181.88 ms for the U-Net baseline.

Regional evaluation is reported separately. In the proximal femur, XAG-Net is best with DSC H×WH \times W9, IoU H/2×W/2H/2 \times W/20, and HD95 H/2×W/2H/2 \times W/21 px. In the femoral shaft, it is second by a DSC margin of H/2×W/2H/2 \times W/22 (H/2×W/2H/2 \times W/23 versus H/2×W/2H/2 \times W/24), with HD95 H/2×W/2H/2 \times W/25 px. In the distal femur, it is near-best with DSC H/2×W/2H/2 \times W/26, slightly behind Attention U-Net at H/2×W/2H/2 \times W/27, with HD95 H/2×W/2H/2 \times W/28 px. The paper highlights the strongest gains in the proximal femur, where complex 3D geometry is particularly relevant.

The ablation study isolates the contributions of the three inserted modules. The baseline 2.5D U-Net without CSA or AG yields DSC H/2×W/2H/2 \times W/29 and IoU H/4×W/4H/4 \times W/40. Only Input CSA gives H/4×W/4H/4 \times W/41 and H/4×W/4H/4 \times W/42. Only Skip CSA gives H/4×W/4H/4 \times W/43 and H/4×W/4H/4 \times W/44. Only Skip AG gives H/4×W/4H/4 \times W/45 and H/4×W/4H/4 \times W/46. Input CSA + Skip CSA gives H/4×W/4H/4 \times W/47 and H/4×W/4H/4 \times W/48. Input CSA + Skip AG gives H/4×W/4H/4 \times W/49 and H/8×W/8H/8 \times W/80. Skip CSA + Skip AG gives H/8×W/8H/8 \times W/81 and H/8×W/8H/8 \times W/82. All three modules, constituting XAG-Net, give H/8×W/8H/8 \times W/83 and H/8×W/8H/8 \times W/84. The paper’s stated takeaway is that Skip CSA yields the largest gain, while AG alone is detrimental but becomes beneficial when combined with CSA. No statistical significance testing is reported.

Qualitative results are described as showing improved boundary adherence and continuity across slices, reductions in false positives in slices above the femur, and better alignment along cortical boundaries relative to 3D U-Net and CSAM.

6. Limitations, reproducibility, and nomenclature

The study has several explicitly stated limitations (Ko et al., 8 Aug 2025). The dataset is single-institutional, with 3,761 training slices and no external validation. The model is more computationally expensive than pure 2D U-Net and plain 2.5D U-Net, even though it is substantially lighter than 3D U-Net and CSAM. Sensitivity to slice thickness or inter-slice spacing is not directly studied. Because the CSA uses exactly three adjacent slices, adaptation to different acquisition protocols may require retuning that slice count.

Reproducibility is partially specified and partially underspecified. Clearly reported elements include the three-slice axial input stack, pixel-wise CSA softmax across the slice dimension, the combined loss

H/8×W/8H/8 \times W/85

Adam with learning rate H/8×W/8H/8 \times W/86, batch size H/8×W/8H/8 \times W/87, 100 epochs, checkpoint selection by lowest validation loss, thresholding at H/8×W/8H/8 \times W/88, and evaluation on TD09–TD10 with full-scan and regional analyses. Less clearly documented elements include the preprocessing that maps cropped H/8×W/8H/8 \times W/89 PNGs to the reported 360×160360 \times 16000 network input, the exact output mask tensor shape, augmentation and regularization details, code availability, and any post-processing beyond thresholding. Future work proposed in the paper includes external validation on public or multi-institutional datasets and pruning or architectural optimization to reduce computational overhead without degrading accuracy.

A separate nomenclature issue arises because the string “XAG-Net” can be confused with architectures that implement cross-layer aggregation in other domains. In particular, “SNAT-YOLO: Efficient Cross-Layer Aggregation Network for Edge-Oriented Gangue Detection” (Li, 9 Feb 2025) describes an efficient cross-layer aggregation design for coal gangue detection, but the paper explicitly states that the authors do not coin the acronym XAG-Net and do not refer to the architecture by that name. In current arXiv usage, XAG-Net properly denotes the femur MRI segmentation model introduced in (Ko et al., 8 Aug 2025), not the gangue-detection network.

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to XAG-Net.