---
title: Through-Plane Attention Blocks (TAB)
url: https://www.emergentmind.com/topics/through-plane-attention-blocks-tab
type: topic
---

# Through-Plane Attention Blocks (TAB)

Through-Plane Attention Blocks (TAB) constitute the through-plane branch of the efficient multi-head self-attention module (eMSM-T) in LIT-Former, a transformer-convolutional hybrid architecture for 3D low-dose CT image denoising and deblurring. TAB is specifically designed to model inter-slice (through-plane) dependencies along the depth dimension of volumetric medical data, enabling efficient and effective representation learning without the computational burden of full 3D self-attention. This approach allows LIT-Former to address the dual challenges of in-plane denoising and through-plane deblurring for high-quality CT reconstruction in low-dose or rapid-acquisition regimes [2302.10630].

## 1. Core Architecture and Computation

TAB processes a 4D tensor feature map $F_{l-1} \in \mathbb{R}^{C \times D \times H \times W}$ from the previous block. The mechanism operates as follows:

1. **Global Average Pooling (GAP)** over the in-plane dimensions $(H, W)$ collapses local spatial features into a depth-wise representation:
   $$
   X_{\mathrm{th}} = \operatorname{GAP}_{\mathrm{th}}(F_{l-1}) \in \mathbb{R}^{C \times D}
   $$

2. **Multi-head Structure**: $X_{\mathrm{th}}$ is split into $h$ heads, each of size $d_k = C/h$.

3. **Linear Projection**: For each head $i$,
   $$
   Q_{\mathrm{th}}^i = f_{\mathrm{th}}^Q(X_{\mathrm{th}}^i), \quad K_{\mathrm{th}}^i = f_{\mathrm{th}}^K(X_{\mathrm{th}}^i), \quad V_{\mathrm{th}}^i = f_{\mathrm{th}}^V(X_{\mathrm{th}}^i)
   $$
   where $f_{\mathrm{th}}^{(\cdot)}$ are learned linear transformations.

4. **Self-Attention Along Depth**: The attention matrix over the $D$ slices is computed as
   $$
   A_{\mathrm{th}}^i = \operatorname{Softmax}\left(\frac{Q_{\mathrm{th}}^i (K_{\mathrm{th}}^i)^{T}}{\sqrt{d_k}}\right) \in \mathbb{R}^{D \times D}
   $$

5. **Aggregation**: Each head output is calculated by applying the attention to the value projection:
   $$
   \mathrm{head}_i = V_{\mathrm{th}}^i A_{\mathrm{th}}^i
   $$

6. **Concatenation and Output Projection**: Heads are concatenated, projected by $g_{\mathrm{th}}(\cdot)$, and the output tensor $O_{\mathrm{th}} \in \mathbb{R}^{C \times D}$ is reshaped back to $C \times D \times H \times W$.

The overall eMSM combines TAB (through-plane branch), in-plane attention (eMSM-I), and a residual path via element-wise summation:
$$
F_l' = \operatorname{eMSM-I}(F_{l-1}) + \operatorname{eMSM-T}(F_{l-1}) + F_{l-1}
$$

## 2. Mathematical Formulation and Processing Pipeline

The following table summarizes the major tensorial operations and flow in TAB:

| Stage                    | Operation                                                 | Output Shape            |
|--------------------------|----------------------------------------------------------|-------------------------|
| GAP over $H, W$          | $\operatorname{GAP}_{\mathrm{th}}(F_{l-1})$              | $C \times D$            |
| Linear projections       | $Q, K, V = f_{\mathrm{th}}^{(\cdot)}(X_{\mathrm{th}}^i)$ | $D \times d_k$ (per head)|
| Self-attention           | $A_{\mathrm{th}}^i = \operatorname{Softmax}(\cdots)$     | $D \times D$            |
| Attention aggregation    | $\mathrm{head}_i = V_{\mathrm{th}}^i A_{\mathrm{th}}^i$  | $D \times d_k$ (per head)|
| Concatenation + output   | $g_{\mathrm{th}}(\operatorname{Concat}(\mathrm{head}_i))$| $C \times D$            |

TAB converts spatial-extent features into a depth-sequence, enabling the transformer core to model long-range dependencies along the slice axis alone. This structure is pivotal for longitudinal context modeling without cubic scaling of token count.

## 3. Computational Efficiency and Design Rationale

Applying full 3D self-attention to a tensor of shape $1 \times C \times D \times H \times W$ entails $\mathcal{O}(D^2 H^2 W^2 C)$ complexity due to global attention over all $DHW$ tokens. Decomposing the mechanism into decoupled in-plane (2D) and through-plane (1D) attention, with TAB responsible for the latter, reduces complexity to $\mathcal{O}((D^2 + HWC)C)$. This is because TAB computes only a $D \times D$ attention matrix, instead of the substantially larger $(DHW) \times (DHW)$ matrix required for full 3D attention [2302.10630].

A comparison with 3D convolutional layers further illustrates efficiency: factorized (2+1)D convolution reduces FLOPs from $C_i C_o K^3 HWD$ for standard 3D convolution to $C_i C_o (K^2 + K) HWD$, and similarly cuts parameter count, paralleling the computational savings achieved by TAB for self-attention operations.

## 4. Parallel Fusion, Interaction with eCFN, and Network Flow

TAB (eMSM-T) operates in parallel with eMSM-I (in-plane attention), and their outputs are summed, along with the residual connection. This fusion strategy contrasts with serial or cascaded arrangements and is empirically found to yield better restoration metrics. The fused output $F_l'$ is then passed to an efficient convolutional feed-forward network (eCFN), which includes a $1 \times 3 \times 3$ in-plane convolution, a $3 \times 1 \times 1$ through-plane convolution, and identity mapping (or $1\times1\times1$ conv if needed).

The processing sequence is thus:
```text
F_{l-1}
   ├── eMSM-I (2D in-plane attention)
   ├── eMSM-T / TAB (1D through-plane attention)
   └── + residual
         ↓
       F_l'
         ↓
       eCFN = Conv-I + Conv-T + Identity
         ↓
       F_l
```

## 5. Empirical Contributions and Ablation Findings

Ablation studies demonstrate that eMSM-T, i.e., TAB, confers greater quantitative gains than in-plane attention alone for 3D CT reconstruction tasks. On a clinical dataset:

- (2+1)DUnet baseline: PSNR 41.49, RMSE 0.80, SSIM$_{3D}$ 97.49, SSIM$_{2D}$ 97.06
- (2+1)DUnet + eMSM-I: PSNR 42.48, RMSE 0.70, SSIM$_{3D}$ 97.63, SSIM$_{2D}$ 97.19
- (2+1)DUnet + eMSM-T: PSNR 42.89, RMSE 0.67, SSIM$_{3D}$ 97.72, SSIM$_{2D}$ 97.28
- LIT-Former: PSNR 43.10, RMSE 0.65, SSIM$_{3D}$ 97.74, SSIM$_{2D}$ 97.31

The isolated through-plane branch (eMSM-T) alone yields a $\sim$1.40 dB improvement in PSNR, compared to $\sim$0.99 dB for eMSM-I. Parallel fusion outperforms cascaded fusion by 0.12 dB in PSNR, substantiating the choice of the summing strategy for optimal accuracy.

Qualitative analysis links TAB to clearer details in coronal/sagittal slices, sharper edges, and improved intensity consistency across slices, especially critical for through-plane deblurring.

## 6. Context and Impact in 3D Medical Imaging

Prior approaches typically employ either 2D convolution/attention (neglecting inter-slice context) or full 3D architectures (with prohibitive computational and data requirements). TAB, as realized in LIT-Former, attains an effective tradeoff by modeling depth dependencies with 1D self-attention, while retaining computational tractability. This design is crucial for CT applications demanding high-quality volumetric reconstruction from low-dose or reduced-projection data. The architectural pattern demonstrated by TAB is likely extensible to other volumetric or sequential data domains where cross-slice or cross-frame dependencies are central and global 3D context is essential but full token-wise attention is infeasible [2302.10630].

Source: https://www.emergentmind.com/topics/through-plane-attention-blocks-tab