Papers › Coarse-to-Fine Sparse Transformer for Hyperspectral Image Reconstruction

Coarse-to-Fine Sparse Transformer for Hyperspectral Image Reconstruction

9 Mar 2022arXiv:2203.04845archive 2025-07-28

Yuanhao Cai, Jing Lin, Xiaowan Hu, Haoqian Wang, Xin Yuan, Yulun Zhang, Radu Timofte, Luc van Gool

Many algorithms have been developed to solve the inverse problem of coded aperture snapshot spectral imaging (CASSI), i.e., recovering the 3D hyperspectral images (HSIs) from a 2D compressive measurement. In recent years, learning-based methods have demonstrated promising performance and dominated the mainstream research direction. However, existing CNN-based methods show limitations in capturing long-range dependencies and non-local self-similarity. Previous Transformer-based methods densely sample tokens, some of which are uninformative, and calculate the multi-head self-attention (MSA) between some tokens that are unrelated in content. This does not fit the spatially sparse nature of HSI signals and limits the model scalability. In this paper, we propose a novel Transformer-based method, coarse-to-fine sparse Transformer (CST), firstly embedding HSI sparsity into deep learning for HSI reconstruction. In particular, CST uses our proposed spectra-aware screening mechanism (SASM) for coarse patch selecting. Then the selected patches are fed into our customized spectra-aggregation hashing multi-head self-attention (SAH-MSA) for fine pixel clustering and self-similarity capturing. Comprehensive experiments show that our CST significantly outperforms state-of-the-art methods while requiring cheaper computational costs. The code and models will be released at https://github.com/caiyuanhao1998/MST

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 16 code samples harvested from 1 repository linked to this paper: 13 ran (of which 8 constructed an object rather than computing a result; 9 with no instrument failure: 0 honoured, 0 violated, 9 with no contract checked; 4 where Syntology's instrument failed) · 3 unverified. Where Syntology's instrument failed: 2 where our contract draft was wrong; 2 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 16 samples from 1 repository, 13 ran (9 with no instrument failure; 4 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed.

caiyuanhao1998/MST officialmentioned in papermentioned on GitHubpytorchSyntology: 16 samples, 13 ran (4 instrument-failed) · 3 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

16 samples harvested: 13 ran (of which 8 constructed an object rather than computing a result; 9 with no instrument failure: 0 honoured, 0 violated, 9 with no contract checked; 4 where Syntology's instrument failed) · 3 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

2ran · our draft was wrong
2ran; the contract check could not run
9ran
3unverified

Licence: 0 of the 16 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from caiyuanhao1998/MST. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 4 samples that ran, the graph records a signature this page does not show: for a class the fixture built without calling, the harness called the object with inputs it made up itself, so the recorded signature is the harness's probe, not the fixture's arguments. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

caiyuanhao1998/MST official repository 16 samples, 13 ran (4 instrument-failed) · 3 unverified
ASPP in 23 papers real/train_code/architecture/CST.py ran fingerprinted MIT (permissive) · e6b806ed01455bd5 · report fixture: returned ASPP · level recorded 2026-09-22
ASPPConv in 9 papers real/train_code/architecture/CST.py ran fingerprinted MIT (permissive) · 4bd71cba3602449c · report fixture: returned ASPPConv · level recorded 2026-09-22
ASPPPooling in 6 papers real/train_code/architecture/CST.py ran fingerprinted MIT (permissive) · dd36c1718253bd99 · report fixture: returned ASPPPooling · level recorded 2026-09-22
AsymmetricTransform real/train_code/architecture/CST.py ran MIT (permissive) · 58f6128456d2627d · report fixture: returned AsymmetricTransform · level recorded 2026-09-22
LSH real/train_code/architecture/CST.py ran MIT (permissive) · af8bb615fc66f945 · report fixture: signature q_hash:Tensor/3/int, k_hash:Tensor/3/int · returned Tensor · level recorded 2026-09-24
SAH_MSA real/train_code/architecture/CST.py ran MIT (permissive) · 7dea4c5caae45bd4 · report fixture: returned SAH_MSA · level recorded 2026-09-22
SALSH real/train_code/architecture/CST.py ran MIT (permissive) · 6a998c9227157700 · report fixture: returned SALSH · level recorded 2026-09-22
Sparsity_Estimator real/train_code/architecture/CST.py ran MIT (permissive) · 45281a471fb34442 · report fixture: returned Sparsity_Estimator · level recorded 2026-09-22
XBOXPLUS real/train_code/architecture/CST.py ran MIT (permissive) · 6d329196f36c232e · report fixture: returned XBOXPLUS · level recorded 2026-09-22
batch_gather real/train_code/architecture/CST.py ran; the contract check could not run (RAISES) MIT (permissive) · 169dedccb5536ed4 · report fixture: signature x:Tensor/3/float, index:Tensor/2/int, dim:int/0/int · returned Tensor · level recorded 2026-09-22
batch_scatter real/train_code/architecture/CST.py ran; the contract check could not run (RAISES) MIT (permissive) · 8b3f512fc8acb3da · report fixture: signature output:Tensor/3/float, src:Tensor/3/float, dim:int/0/int, index:Tensor/2/int · returned Tensor · level recorded 2026-09-22
lsh_clustering real/train_code/architecture/CST.py ran · our draft was wrong fingerprinted MIT (permissive) · aa9a1d1268999fa4 · report fixture: signature x:Tensor/3/float, n_rounds:int/0/int, r:int/0/int · returned Tensor · level recorded 2026-09-22
uniform in 58 papers real/train_code/architecture/CST.py ran · our draft was wrong MIT (permissive) · acc89f0bd5a8ecc6 · report fixture: signature a:float/0/float, b:float/0/float, shape:tuple/1/int, device:str/0/str · returned Tensor · level recorded 2026-09-22
CST real/train_code/architecture/CST.py unverified MIT (permissive) · 128f3f681fa4e5a2 · report
SAHAB real/train_code/architecture/CST.py unverified MIT (permissive) · 95caa6a06d8dfedc · report
SAHABs real/train_code/architecture/CST.py unverified MIT (permissive) · 0885baf6a0f88d0a · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for Coarse-to-Fine Sparse Transformer (CST) (graph method: Coarse-to-Fine Sparse Transformer (CST)). 21 bricks; individually on a fixture: 18 ran (of which 10 constructed an object rather than computing a result; 12 with no instrument failure: 0 honoured, 0 violated, 12 with no contract checked; 6 where Syntology's instrument failed) · 3 unverified. The assembly has not been run end-to-end.

  1. CST entry · level 0 · unverified · 128f3f681fa4e5a2
  2. SAHABs model · level 0 · unverified · 0885baf6a0f88d0a
  3. Sparsity_Estimator model · level 1 · ran · 45281a471fb34442
  4. trunc_normal_ helper · level 1 · ran; the contract check could not run · c76d18678f19d332
  5. SAHAB model · level 0 · unverified · 95caa6a06d8dfedc
  6. ASPP model · level 1 · ran · e6b806ed01455bd5
  7. _no_grad_trunc_normal_ helper · level 1 · ran; the contract check could not run · fa2dd3be10cf9804
  8. FeedForward model · level 1 · ran · 7e8271a317f4b387
  9. PreNorm helper · level 1 · ran · af8811a71d2ecceb
  10. SAH_MSA model · level 1 · ran · 7dea4c5caae45bd4
  11. batch_gather helper · level 1 · ran; the contract check could not run (RAISES) · 169dedccb5536ed4
  12. batch_scatter helper · level 1 · ran; the contract check could not run (RAISES) · 8b3f512fc8acb3da
  13. ASPPConv helper · level 1 · ran · 4bd71cba3602449c
  14. ASPPPooling helper · level 1 · ran · dd36c1718253bd99
  15. GELU helper · level 1 · ran · ace3b60e60ec9790
  16. XBOXPLUS helper · level 1 · ran · 6d329196f36c232e
  17. lsh_clustering helper · level 1 · ran · our draft was wrong · aa9a1d1268999fa4
  18. AsymmetricTransform helper · level 1 · ran · 58f6128456d2627d
  19. SALSH helper · level 1 · ran · 6a998c9227157700
  20. LSH helper · level 1 · ran · af8bb615fc66f945
  21. uniform helper · level 1 · ran · our draft was wrong · acc89f0bd5a8ecc6

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2203.04845") returns these assemblies with each brick's role and wiring (how to connect).

Tasks

Compressive SensingImage ReconstructionSpectral Reconstruction

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Spectral Reconstruction CAVE CST-L PSNR 36.12 #6 of 10 Archive leaderboard report
Spectral Reconstruction CAVE CST-L SSIM 0.957 #6 of 10 Archive leaderboard report
Spectral Reconstruction KAIST CST-L PSNR 36.12 #6 of 10 Archive leaderboard report
Spectral Reconstruction KAIST CST-L SSIM 0.957 #6 of 10 Archive leaderboard report
Spectral Reconstruction Real HSI CST-L User Study Score 14 #4 of 9 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Methods

Absolute Position EncodingsAdamAttentionAttention DropoutBPECosine AnnealingDense ConnectionsDropoutLabel SmoothingLayer NormalizationLinear LayerLinear Warmup With Cosine AnnealingMulti-Head AttentionPosition-Wise Feed-Forward LayerResidual ConnectionSoftmaxSparse TransformerTransformerWeight Decay

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections