---
title: Efficient Bidirectional Channel Attention (EBCA)
url: https://www.emergentmind.com/topics/efficient-bidirectional-channel-attention-ebca
type: topic
---

# Efficient Bidirectional Channel Attention (EBCA)

Efficient Bidirectional Channel Attention (EBCA) is a lightweight channel attention mechanism designed for deep learning models operating under constraints of low parameter count and computational overhead. EBCA is a core component of the Sebica network, which addresses single image super-resolution (SISR) for resource-limited and low-latency applications. EBCA distinguishes itself by employing bidirectional 1D convolutions on global channel descriptors, eschewing fully connected layers or expensive convolutions while maintaining the ability to model both forward and reverse channel dependencies. The mechanism, when coupled with spatial attention, enables Sebica to outperform or match the state of the art in lightweight SISR while maintaining minimal resource usage [2410.20546].

## 1. Motivation and Design Principles

EBCA was developed in response to deployment constraints in edge-based SISR scenarios, where models are budgeted very tightly in terms of both parameter count and floating point operations (FLOPs). While traditional channel attention modules such as Squeeze-and-Excitation (SE) rely on two fully connected layers, incurring $O(C^2)$ weights, these prove prohibitive for “ultra-light” SR. EBCA instead retains discriminative channel-wise reweighting by conducting all aggregation and weighting using 1D convolutions of small kernel size (typically $k=3$), enforcing a parameter and computational cost of $O(C\cdot k)$ and $O(HW\cdot k)$, respectively.

The “bidirectional” aspect addresses a limitation in prior channel attention (e.g., ECA-Net), which only leverages information along the canonical channel order. EBCA applies parallel convolutions both in the original and in the reversed channel order, capturing both forward and backward inter-channel statistical dependencies.

## 2. Internal Architecture and Workflow

The EBCA block processes a 3D feature map $X \in \mathbb{R}^{C \times H \times W}$. It begins by summarizing spatial information into a global channel descriptor via adaptive average pooling:
$$
F = \mathrm{GAP}(X), \quad F \in \mathbb{R}^{C \times 1 \times 1}.
$$

Two 1D convolutions are then applied in parallel:

- Forward: $F_\text{fwd} = \mathrm{Conv1D}_k(F)$.
- Backward: (i) flip channel order to obtain $F_\text{rev} = \mathrm{flip}(F)$; (ii) apply $F_\text{bwd,raw} = \mathrm{Conv1D}_k(F_\text{rev})$; (iii) flip back $F_\text{bwd} = \mathrm{flip}(F_\text{bwd,raw})$.

The outputs are averaged, normalized with a sigmoid, and broadcast over spatial dimensions:
$$
A_{\text{chan}} = \sigma\left( \frac{F_{\text{fwd}} + F_{\text{bwd}}}{2} \right), \quad Y_{c,i,j} = X_{c,i,j} \cdot (A_{\text{chan}})_c
$$
for channel $c$ and spatial locations $(i,j)$. The attended feature map is then typically followed by a residual addition with the input of the attention block.

A conceptual workflow:
- Input $X$
  - $\rightarrow$ Spatial Attention ($7 \times 7$ Conv) $\rightarrow X_\text{spatial}$
  - $\rightarrow$ EBCA $\rightarrow X_\text{spatial} \odot A_{\text{chan}}$
  - $\rightarrow$ Residual add
- Output

## 3. Mathematical Formalization

The EBCA computations are summarized as follows:
\begin{align*}
F &= \mathrm{GAP}(X) \\
F_{\mathrm{fwd}} &= \mathrm{Conv1D}_k(F) \\
F_{\mathrm{bwd}} &= \mathrm{flip}(\mathrm{Conv1D}_k(\mathrm{flip}(F))) \\
A_{\mathrm{chan}} &= \sigma \left( \frac{F_{\mathrm{fwd}} + F_{\mathrm{bwd}}}{2} \right) \\
Y &= X \odot A_{\mathrm{chan}}
\end{align*}

Here, $\odot$ represents channel-wise broadcasted multiplication, and $\sigma$ denotes the sigmoid. All convolutions involve $k=3$ and preserve channel dimension via padding.

## 4. Integration with Spatial Attention

Sebica combines spatial and channel attention within each of six attention blocks. Spatial attention aggregates information by concatenating average- and max-pooled feature maps over the channel axis ($M_{\text{avg}}, M_{\text{max}} \in \mathbb{R}^{1 \times H \times W}$) and applies a $7\times 7$ convolution followed by sigmoid activation. The output, $S \in \mathbb{R}^{1 \times H \times W}$, modulates $X$ spatially:
$$
X_s = X \odot S
$$

This spatially attended feature is then passed into the EBCA pipeline for channel-wise recalibration. The outputs are summed with the block input via a residual connection.

## 5. Computational Complexity and Model Efficiency

The parameter and FLOP counts for an EBCA attention block are minimal:
- Each Conv1D (per direction): $k \cdot C$ weights $+$ $C$ biases $= (k+1)C$ parameters
- Both directions: $2(k+1)C$ parameters
- $7 \times 7$ spatial attention: $98$ weights $+$ $1$ bias $= 99$ parameters

Example (Sebica with $C=16$, $k=3$):
- Channel attentions: $2 \cdot 4 \cdot 16 = 128$ parameters
- Spatial conv: $99$ parameters
- Total/block: $227$ parameters ($\sim 0.56\%$ of a $40.9$K parameter network)

For $H \times W = 288 \times 510$:
- Spatial conv: $\sim 0.0144$ GFLOPs/block
- Channel attention overhead: $<0.001$ GFLOPs/block
- Six blocks: $\sim 0.086$ GFLOPs attention in a $2.10$ GFLOP model ($\sim 4\%$ overhead)

Model comparison:

| Method        | Params (K) | GFLOPs |
|---------------|-----------:|-------:|
| FSRCNN        |     12.0   |   5.00 |
| EDSR          |    241.0   |  14.15 |
| RVSR          |    221.1   |  10.87 |
| Sebica        |     40.9   |   2.10 |
| Sebica_small  |      7.9   |   0.41 |

Sebica attains $17\%$ of the parameter count and $15\%$ of the FLOPs of EDSR, while delivering near-identical PSNR/SSIM.

## 6. Empirical Results and Performance

On the DIV2K and Flickr2K datasets, Sebica with six attention blocks and $C=16$ achieves PSNR/SSIM of $28.29$/$0.7976$ (DIV2K) and $30.18$/$0.8330$ (Flickr2K). Sebica_small (four blocks, $C=8$) attains $28.12$/$0.7931$ (DIV2K) and $30.09$/$0.8317$ (Flickr2K). By comparison, FSRCNN records $27.94$/$0.7863$ (DIV2K), and RVSR reaches $28.18$/$0.7954$. This positions Sebica and Sebica_small at or above the state of the art for lightweight SISR models, demonstrating that bidirectional, efficient channel attention enables competitive performance with a significantly reduced computational footprint.

## 7. Application to Object Detection

Sebica exhibits positive transfer to downstream vision tasks. For example, employing YOLOv5s on a UAV traffic dataset with low-resolution inputs ($180 \times 320$), Sebica enhances object detection mean average precision (mAP) at IoU $= 0.5$ from $0.307$ (baseline) to $0.366$, closely tracking ground truth ($0.363$). Sebica_small delivers $0.347$. This suggests that EBCA-empowered super-resolution not only restores image detail but also augments high-level perceptual tasks in real-world scenarios [2410.20546].

Object detection results:

| IoU | LR   | GT   | Sebica | Sebica_small |
|-----|------|------|--------|--------------|
| 0.1 | 0.446 | 0.462 | 0.487 | 0.478 |
| 0.2 | 0.446 | 0.461 | 0.486 | 0.478 |
| 0.5 | 0.307 | 0.363 | 0.366 | 0.347 |

Source: https://www.emergentmind.com/topics/efficient-bidirectional-channel-attention-ebca