SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2203.04845 · ECCV · 2022

Coarse-to-Fine Sparse Transformer for Hyperspectral Image Reconstruction

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

arXiv · PDF · Open in the Atlas

Code that ran

13 of 16 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (8 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 9 have no contract verdict; 4 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2203.04845.json · badge: /api/ran/2203.04845.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
caiyuanhao1998/MST marked official in Papers with Code
Papers with Code archive
13 ran · 3 no recorded run
FunctionStatusWhere it lives
ASPP Ran
ran on a synthesized input · constructed an object; no result was computed
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("e6b806ed01455bd5")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ASPP: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Define the ARGS dictionary with all parameters for ASPP
ARGS = {
    'in_channels': 64,
    'atrous_rates': [6, 12, 18],
    'out_channels': 32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ASPP — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ASPP output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ASPPConv Ran
ran on a synthesized input · constructed an object; no result was computed
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("4bd71cba3602449c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ASPPConv: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'in_channels': 3,
    'out_channels': 4,
    'dilation': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ASPPConv — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ASPPConv output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ASPPPooling Ran
ran on a synthesized input · constructed an object; no result was computed
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("dd36c1718253bd99")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, ASPPPooling: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'in_channels': 64,
    'out_channels': 256,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ASPPPooling — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ASPPPooling output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
AsymmetricTransform Ran
ran on a synthesized input · constructed an object; no result was computed
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("58f6128456d2627d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, AsymmetricTransform: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

class AsymmetricTransform:
    def Q(self, *args, **kwargs):
        raise NotImplementedError('Query transform not implemented')
    
    def K(self, *args, **kwargs):
        raise NotImplementedError('Key transform not implemented')

# Since AsymmetricTransform has no __init__ parameters,
# ARGS should be an empty dict
ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type AsymmetricTransform — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a AsymmetricTransform output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
LSH Ran
ran on a synthesized input
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("af8bb615fc66f945")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 1, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

# LSH has no __init__ parameters, so INIT_ARGS is empty
INIT_ARGS = {}

# The compute_hash_agreement method takes q_hash and k_hash
# These should be hash tensors with shape (batch, num_hashes, hash_bits) or similar
# Based on the operations: (q_hash == k_hash).min(dim=-1)[0].sum(dim=-1)
# - Comparison along last dim
# - min along dim=-1 returns (values, indices), we take [0] for values
# - sum along dim=-1
# So input shape should be at least 3D: (batch, num_hashes, hash_length)

METHOD = 'compute_hash_agreement'

q_hash = torch.randint(0, 2, (2, 3, 4), dtype=torch.long)  # batch=2, num_hashes=3, hash_length=4
k_hash = torch.randint(0, 2, (2, 3, 4), dtype=torch.long)

ARGS = {
    'q_hash': q_hash,
    'k_hash': k_hash
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 1, dtype family int — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
SAH_MSA Ran
ran on a synthesized input · constructed an object; no result was computed
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("7dea4c5caae45bd4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, SAH_MSA: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
torch.manual_seed(0)

ARGS = {
    'heads': 4,
    'n_rounds': 2,
    'channels': 64,
    'patch_size': (12, 12),
    'r': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SAH_MSA — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SAH_MSA output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
SALSH Ran
ran on a synthesized input · constructed an object; no result was computed
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("6a998c9227157700")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, SALSH: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# SALSH.__init__ parameters:
# - n_rounds: int
# - dim: int
# - r: float or int
# - device: str (default 'cuda', but we use 'cpu')

ARGS = {
    'n_rounds': 3,
    'dim': 4,
    'r': 2.0,
    'device': 'cpu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SALSH — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SALSH output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
Sparsity_Estimator Ran
ran on a synthesized input · constructed an object; no result was computed
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("45281a471fb34442")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, Sparsity_Estimator: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Define the required helper classes
class ASPPConv(nn.Sequential):
    def __init__(self, in_channels, out_channels, dilation):
        modules = [nn.Conv2d(in_channels, out_channels, 3, padding=dilation, dilation=dilation, bias=False), nn.ReLU()]
        super(ASPPConv, self).__init__(*modules)

class ASPPPooling(nn.Sequential):
    def __init__(self, in_channels, out_channels):
        super(ASPPPooling, self).__init__(nn.AdaptiveAvgPool2d(1), nn.Conv2d(in_channels, out_channels, 1, bias=False), nn.ReLU())

    def forward(self, x):
        import torch.nn.functional as F
        size = x.shape[-2:]
        for mod in self:
            x = mod(x)
        return F.interpolate(x, size=size, mode='bilinear', align_corners=False)

class ASPP(nn.Module):
    def __init__(self, in_channels, atrous_rates, out_channels):
        super(ASPP, self).__init__()
        modules = []
        rates = tuple(atrous_rates)
        for rate in rates:
            modules.append(ASPPConv(in_channels, out_channels, rate))
        modules.append(ASPPPooling(in_channels, out_channels))
        self.convs = nn.ModuleList(modules)
        self.project = nn.Sequential(nn.Conv2d(len(self.convs) * out_channels, out_channels, 1, bias=False), nn.ReLU(), nn.Dropout(0.5))

    def forward(self, x):
        res = []
        for conv in self.convs:
            res.append(conv(x))
        res = torch.cat(res, dim=1)
        return self.project(res)

# Create valid arguments for Sparsity_Estimator
ARGS = {
    'dim': 28,
    'expand': 2,
    'sparse': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Sparsity_Estimator — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a Sparsity_Estimator output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
XBOXPLUS Ran
ran on a synthesized input · constructed an object; no result was computed
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("6d329196f36c232e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned an instance of its own class, XBOXPLUS: the run constructed the object and did not call it, so no result was computed. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

class AsymmetricTransform:
    def Q(self, *args, **kwargs):
        raise NotImplementedError('Query transform not implemented')

    def K(self, *args, **kwargs):
        raise NotImplementedError('Key transform not implemented')

class XBOXPLUS(AsymmetricTransform):
    def set_norms(self, x):
        self.x_norms = x.norm(p=2, dim=-1, keepdim=True)
        self.MX = torch.amax(self.x_norms, dim=-2, keepdim=True)

    def X(self, x):
        device = x.device
        ext = torch.sqrt((self.MX ** 2).to(device) - (self.x_norms ** 2).to(device))
        zero = torch.tensor(0.0, device=x.device).repeat(x.shape[:-1], 1).unsqueeze(-1)
        return torch.cat((x, ext, zero), -1)

# Create a small tensor for testing
x = torch.randn(2, 3, 4)

# Instantiate XBOXPLUS
xboxplus_instance = XBOXPLUS()

# Call set_norms to initialize x_norms and MX
xboxplus_instance.set_norms(x)

# Create ARGS dict with no parameters (XBOXPLUS.__init__ takes no arguments)
ARGS = {}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type XBOXPLUS — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a XBOXPLUS output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
batch_gather Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("169dedccb5536ed4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 2, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# x: [b, n, c] - batch of sequences with channels
x = torch.randn(2, 4, 3)

# index: [b, n//2] - indices to gather from dimension 1
index = torch.tensor([[0, 2], [1, 3]], dtype=torch.long)

# dim: int - dimension along which to gather (should be 1 for the rearranged tensor)
dim = 1

ARGS = {
    "x": x,
    "index": index,
    "dim": dim,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 2, 3) — shape (2, 2, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
batch_scatter Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("8b3f512fc8acb3da")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from einops import rearrange

torch.manual_seed(0)

# Create small tensors with distinct dimensions
b = 2  # batch size
n = 4  # sequence/key dimension
c = 3  # channel dimension

# output: [b,n,c]
output = torch.zeros(b, n, c)

# src: [b,n,c]
src = torch.randn(b, n, c)

# dim: int - dimension for scatter operation (should be 1 based on rearrange to '(b c) k')
dim = 1

# index: [b,n] - should contain valid indices for the scatter dimension
# After rearrange to '(b c) k', the scatter dim is 1, so indices should be in range [0, n)
index = torch.randint(0, n, (b, n))

ARGS = {
    "output": output,
    "src": src,
    "dim": dim,
    "index": index,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
einops, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
lsh_clustering Ran
ran; our contract draft was wrong, not the code
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("aa9a1d1268999fa4")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family int, shape (5, 2, 3) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    'x': torch.randn(2, 3, 4),
    'n_rounds': 5,
    'r': 1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family int, shape (5, 2, 3) — shape (5, 2, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
uniform Ran
ran; our contract draft was wrong, not the code
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("acc89f0bd5a8ecc6")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

ARGS = {
    'a': 0.0,
    'b': 1.0,
    'shape': (2, 4),
    'device': 'cpu'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
CST Not yet run
unverified (harvested, no recorded run)
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("128f3f681fa4e5a2")
How it ran

no invocation recorded.

SAHAB Not yet run
unverified (harvested, no recorded run)
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("95caa6a06d8dfedc")
How it ran

no invocation recorded.

SAHABs Not yet run
unverified (harvested, no recorded run)
caiyuanhao1998/MST/real/train_code/architecture/CST.py
code served (permissive licence) · get_code("0885baf6a0f88d0a")
How it ran

no invocation recorded.

Also present in other papers' code

Of 16 samples lifted from this paper's linked repositories, 16 carry a function identity and 0 do not. Of the 16 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 16 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Many learning-based algorithms have been developed to solve the inverse problem of coded aperture snapshot spectral imaging (CASSI). However, CNN-based methods show limitations in capturing long-range dependencies. Previous Transformer-based methods densely sample tokens, some of which are uninformative, and calculate multi-head selfattention (MSA) between some tokens that are unrelated in content. In this paper, we propose a novel Transformer-based method, coarse-tofine 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 f ine pixel clustering and self-similarity capturing. Comprehensive experiments show that our CST significantly outperforms state-of-the-art methods while requiring cheaper computational costs.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2203.04845")
get_code_for_paper("2203.04845")
have("2203.04845")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2203.04845.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2203.04845.svg)](https://syntology.ai/paper/2203.04845)

Connect an agent — have() is free.