All models

SQSFormer

A transformer that classifies a hyperspectral pixel by letting it query spatial information from its neighbors.

Image classification · 104 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

Loading diagram (26 KB)

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
1.3M
Operations
104
Framework
PyTorch
Recurrent
No
Published
2024, IEEE Transactions on Geoscience and Remote Sensing
Cited by
60 (as of 27 October 2026)
Authors
Ning Chen, Leyuan Fang, Yang Xia 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
m20121
Graph hash
c5876b138709162a117f2cd0d532bfc373d9e9897cf99d79748d6007081b5ed0
Skeleton hash
72973b2c7bd3c6e2f3ccc23b97f56f2d792683de9c165198ff569c5d00e4446a
Architecture hash
02682e7bb849e3d87cc615ed71738995ddaac044739012035d8faf0f30ebccd7
Diagram SHA-256
cc9201234f6ed81570b42847c38e055b86f45dae1382714c9ec86134d03ff982
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

SQSFormer, short for Spectral Query Spatial Transformer, is a framework for Hyperspectral Image (HSI) classification. The paper observes that Transformer methods for this task, while extracting spectral-spatial features, may introduce irrelevant spatial information that interferes with classification. SQSFormer uses the center pixel, which is the pixel to be classified, to adaptively query relevant spatial information from neighboring pixels, so that spectral features are preserved.

A Rotation-Invariant Position Embedding module combines random central rotation with center relative position embedding, to reduce the interference of absolute position and orientation information. A Spectral-Spatial Center Attention module lets the network focus on the center pixel by adaptively extracting spatial features from neighboring pixels at multiple scales. The paper reports that the framework outperformed earlier methods on multiple public datasets.

Key idea. SQSFormer uses the center pixel, the pixel to be classified, to adaptively query relevant spatial information from neighboring pixels while preserving spectral features.

  • sqsformer
  • spectral query spatial transformer
  • spectral query spatial
  • hyperspectral image classification
  • hsi classification
  • center pixel
  • rotation-invariant position embedding

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

Cite the paper

@article{Chen_2024, title={Spectral Query Spatial: Revisiting the Role of Center Pixel in Transformer for Hyperspectral Image Classification}, volume={62}, ISSN={1558-0644}, url={http://dx.doi.org/10.1109/TGRS.2024.3361652}, DOI={10.1109/tgrs.2024.3361652}, journal={IEEE Transactions on Geoscience and Remote Sensing}, publisher={Institute of Electrical and Electronics Engineers (IEEE)}, author={Chen, Ning and Fang, Leyuan and Xia, Yang and Xia, Shaobo and Liu, Hui and Yue, Jun}, year={2024}, pages={1–14} }