All models

AST-Restore

An image restoration transformer whose attention combines a sparse branch and a dense branch.

2,595 operations Structure only

Structure-only capture: TorchLens recorded this graph without running real numbers through the model, so shapes and data types on the diagram are hypotheses, not measurements.

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 2,595 operations (40 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

Family
AST
Parameters
65.4M
Operations
2,595
Framework
PyTorch
Recurrent
No
Published
CVPR 2024
Cited by
229 (as of 28 October 2026)
Authors
Shihao Zhou, Duosheng Chen, Jinshan Pan and others
License
Apache-2.0
Checked
Structure only: shapes and data types are hypotheses, not measurements.

Files

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

Details
Stable ID
m14589
Graph hash
b8ea83a6b75d4494c9e4d2f5db1a147e5993938d50311a06ac330d7f7b38afb3
Skeleton hash
0a4a8be37d463bbd8b9d89487b63af6581366388979b17d6dff6a7a17a713ed0
Architecture hash
fcc3cc48d5914a09bfb0e393e86b92c33073c198f9301460ef927edd700449fb
Diagram SHA-256
82488e2fb0af156694281522e9312b1d6412e28a2b70d36a5f143d3de92056d7
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3

What it is

AST, the Adaptive Sparse Transformer, is a transformer for image restoration, evaluated in the paper on rain streak removal, real haze removal and raindrop removal. The paper's starting point is that efficient attention designs, by considering all available tokens, often involve redundant information and noisy interactions from irrelevant regions.

AST has two core designs: an Adaptive Sparse Self-Attention (ASSA) block and a Feature Refinement Feed-forward Network (FRFN). ASSA computes attention in two branches: a sparse branch filters out the negative impact of low query-key matching scores when aggregating features, while a dense branch ensures sufficient information flow through the network. FRFN uses what the authors call an enhance-and-ease scheme to eliminate feature redundancy in channels.

The released code borrows heavily from Uformer. It includes scripts to train AST on SPAD for deraining, Densehaze for dehazing and AGAN for raindrop removal.

Key idea. The paper proposes AST, which pairs two-branch sparse and dense self-attention with a feature refinement feed-forward network to reduce noisy interactions and feature redundancy in image restoration.

  • ast
  • adaptive sparse transformer
  • ast-restore
  • adapt or perish
  • image restoration
  • deraining
  • dehazing
  • raindrop removal
  • assa
  • frfn

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

Cite the paper

@inproceedings{Zhou_2024, title={Adapt or Perish: Adaptive Sparse Transformer with Attentive Feature Refinement for Image Restoration}, url={http://dx.doi.org/10.1109/cvpr52733.2024.00285}, DOI={10.1109/cvpr52733.2024.00285}, booktitle={2024 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, publisher={IEEE}, author={Zhou, Shihao and Chen, Duosheng and Pan, Jinshan and Shi, Jinglei and Yang, Jufeng}, year={2024}, month=June, pages={2952–2963} }