All models

Xformer

An image denoising Transformer with parallel spatial-wise and channel-wise U-shaped branches that exchange features.

3,436 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

This diagram has 3,436 operations (92 KB) and is drawn when you ask.

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Parameters
25.2M
Operations
3,436
Framework
PyTorch
Recurrent
No
Published
ICLR 2024
Cited by
12 (as of 27 October 2026)
Authors
Jiale Zhang, Yulun Zhang, Jinjin Gu and others
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m21545
Graph hash
2e7d8e02163a256cfc4fdfb776a67241d0813ad39576b7668ce3205429f88f8d
Skeleton hash
c368bb51c82eaf4921907eb97f8198e447fc93cc89c1f021a2c28b1e99e78f17
Architecture hash
1d130a4a6380e367f6b925bd7118a89227a662c71ee60afc8ffde356812aed47
Diagram SHA-256
6234dbe551cacae7b8b9104501378bfd2a997363030da55f4f539d61e91cba03
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

Xformer is a hybrid X-shaped vision Transformer for image denoising. Its aim is to strengthen the global representation of tokens by treating them from two scopes, spatial and channel.

The network has two branches, each a U-shaped encoder-decoder with skip connections. The spatial-wise branch is built from window-based Transformer blocks, which perform fine-grained local patch interactions across tokens defined by the spatial dimension. The channel-wise branch is built from cross-covariance Transformer blocks, which perform direct global context interactions across tokens defined by the channel dimension. A Bidirectional Connection Unit (BCU) bridges the two branches: it refines each branch's features with a convolution layer and adds them to the opposite branch. At the end, the features of the two branches are concatenated and sent to a refinement module, and the network outputs a residual image that is added to the input.

On the Urban100 dataset at noise level 50, the paper reports a gain of 0.42 dB over Restormer, with comparable model size and FLOPs. The authors' code is based on Restormer and BasicSR.

Key idea. Xformer runs spatial-wise and channel-wise Transformer branches side by side and couples them with a Bidirectional Connection Unit for image denoising.

  • xformer
  • hybrid x-shaped transformer
  • x-shaped transformer
  • image denoising
  • denoising transformer
  • bidirectional connection unit
  • bcu
  • gaussian denoising
  • real image denoising

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{zhang2024xformerhybridxshapedtransformer,
      title={Xformer: Hybrid X-Shaped Transformer for Image Denoising}, 
      author={Jiale Zhang and Yulun Zhang and Jinjin Gu and Jiahua Dong and Linghe Kong and Xiaokang Yang},
      year={2024},
      eprint={2303.06440},
      archivePrefix={arXiv},
      primaryClass={cs.CV},
      url={https://arxiv.org/abs/2303.06440}, 
}