SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2603.17637 · 2026

DSS-GAN: Directional State Space GAN with Mamba backbone for Class-Conditional Image Synthesis

Aleksander Ogonowski, Konrad Klimaszewski, Przemysław Rokita

arXiv · PDF · Open in the Atlas

Code that ran

6 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 6 failures of our instrument; 1 no recorded run), measured 2026-11-22; 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/2603.17637.json · badge: /api/ran/2603.17637.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
dssgan/DSS_GAN canonical (classifier label)
classifier basis: census
6 ran · 1 no recorded run
FunctionStatusWhere it lives
d_logistic Ran
ran; our contract draft was wrong, not the code
dssgan/DSS_GAN/src/model/losses.py
code served (permissive licence) · get_code("95f63d7491dafeef")
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 0, dtype family float, shape () 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 torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for d_real and d_fake
# These are discriminator outputs, typically 1D or scalar per sample
# Using batch size 2 with output dimension 1 (logits)
d_real = torch.randn(2, 1)
d_fake = torch.randn(2, 1)

ARGS = {
    "d_real": d_real,
    "d_fake": d_fake,
}
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 0, dtype family float, shape () — shape () 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
g_logistic Ran
ran; our contract draft was wrong, not the code
dssgan/DSS_GAN/src/model/losses.py
code served (permissive licence) · get_code("163dec9b0331ba96")
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 0, dtype family float, shape () 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 torch.nn.functional as F

torch.manual_seed(0)

# d_fake is a tensor that gets passed to F.softplus(-d_fake).mean()
# So we need a tensor with at least one dimension to support .mean()
d_fake = torch.randn(2, 4)

ARGS = {
    "d_fake": d_fake
}
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 0, dtype family float, shape () — shape () 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
generate_mixed_class Ran
ran; our contract draft was wrong, not the code
dssgan/DSS_GAN/src/viz.py
code served (permissive licence) · get_code("91559917568f6571")
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 ndarray, ndim 3, dtype family float, shape (16, 16, 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 torch.nn as nn

torch.manual_seed(0)

class ClassEmbed(nn.Module):
    def __init__(self, num_classes=10):
        super().__init__()
        self.weight = nn.Parameter(torch.randn(num_classes, 8))

class MambaBlock(nn.Module):
    def __init__(self, has_class_embeds=True):
        super().__init__()
        if has_class_embeds:
            self.class_embeds = {
                'up': ClassEmbed(10),
                'down': ClassEmbed(10),
                'left': ClassEmbed(10),
                'right': ClassEmbed(10),
            }

class StyleRefine(nn.Module):
    def __init__(self):
        super().__init__()
        self.style = nn.Embedding(10, 8)

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.mamba_8x8 = nn.ModuleList([MambaBlock() for _ in range(2)])
        self.mamba_16x16 = nn.ModuleList([MambaBlock() for _ in range(2)])
        self.mamba_32x32 = nn.ModuleList([MambaBlock() for _ in range(1)])
        self.mamba_64x64 = nn.ModuleList([MambaBlock() for _ in range(1)])
        self.mamba_128x128 = nn.ModuleList([MambaBlock() for _ in range(1)])
        self.style_refine_256 = StyleRefine()
    
    def forward(self, z, cls_tensor):
        batch_size = z.shape[0]
        return torch.randn(batch_size, 3, 16, 16)

model = MockModel()
device = 'cpu'
SCAN_DIRECTIONS = ['up', 'down', 'left', 'right']
z = torch.randn(2, 4)
base_cls = 0
override_dir_indices = [0, 1]
override_cls = 1
stage_filter = ['8x8', '16x16']
patch_cnn = True

ARGS = {
    'model': model,
    'device': device,
    'SCAN_DIRECTIONS': SCAN_DIRECTIONS,
    'z': z,
    'base_cls': base_cls,
    'override_dir_indices': override_dir_indices,
    'override_cls': override_cls,
    'stage_filter': stage_filter,
    'patch_cnn': patch_cnn,
}
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 ndarray, ndim 3, dtype family float, shape (16, 16, 3) — shape (16, 16, 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
get_dataset_cfg Ran
ran; our contract draft was wrong, not the code
dssgan/DSS_GAN/src/dataset.py
code served (permissive licence) · get_code("757e29ba9663e177")
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 dict. 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 numpy as np

ARGS = {
    'dataset': 'afhq'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
make_class_rows Ran
ran; our contract draft was wrong, not the code
dssgan/DSS_GAN/src/dataset.py
code served (permissive licence) · get_code("2d28c45fd1500c17")
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 4, dtype family float, shape (6, 3, 4, 4) 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 torch.nn as nn

torch.manual_seed(0)

# Create small tensors for testing
# imgs should be a 4D tensor (batch, channels, height, width)
imgs = torch.randn(8, 3, 4, 4)

# labels should be 1D tensor with class indices
labels = torch.tensor([0, 0, 1, 1, 2, 2, 0, 1])

# num_classes should be an integer
num_classes = 3

# n_per_class should be an integer (optional, has default)
n_per_class = 2

ARGS = {
    'imgs': imgs,
    'labels': labels,
    'num_classes': num_classes,
    'n_per_class': n_per_class
}
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 4, dtype family float, shape (6, 3, 4, 4) — shape (6, 3, 4, 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
r1_regularizer Ran
ran; our contract draft was wrong, not the code
dssgan/DSS_GAN/src/model/losses.py
code served (permissive licence) · get_code("7ff7632c4af12f41")
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 0, dtype family float, shape () 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 torch.nn as nn

torch.manual_seed(0)

# Create a small discriminator output tensor
# d_real needs to be a scalar or tensor that can be summed and differentiated
# It should come from a model's forward pass
batch_size = 2
img_channels = 3
img_height = 4
img_width = 4

# Create real_imgs tensor with requires_grad=True so we can compute gradients w.r.t. it
real_imgs = torch.randn(batch_size, img_channels, img_height, img_width, requires_grad=True)

# Create d_real as a discriminator output (logits or scores)
# This should be differentiable w.r.t. real_imgs
# We'll create it as a simple tensor that depends on real_imgs
d_real = real_imgs.sum(dim=[1, 2, 3], keepdim=True)  # Shape: (batch_size, 1, 1, 1)

ARGS = {
    "d_real": d_real,
    "real_imgs": real_imgs,
}
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 0, dtype family float, shape () — shape () 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
get_dataloader Not yet run
unverified (harvested, no recorded run)
dssgan/DSS_GAN/src/dataset.py
code served (permissive licence) · get_code("1b3c6f93e8b89cff")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 7 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

We present DSS-GAN, the first generative adversarial network to employ Mamba as a hierarchical generator backbone for noise-to-image synthesis. The central contribution is Directional Latent Routing (DLR), a novel conditioning mechanism that decomposes the latent vector into direction-specific subvectors, each jointly projected with a class embedding to produce a feature-wise affine modulation of the corresponding Mamba scan. Unlike conventional class conditioning that injects a global signal, DLR couples class identity and latent structure along distinct spatial axes of the feature map, applied consistently across all generative scales. DSS-GAN achieves improved FID, KID, and precision-recall scores compared to StyleGAN2-ADA [23] across multiple tested datasets. Analysis of the latent space reveals that directional subvectors exhibit measurable specialization: perturbations along individual components produce structured, direction-correlated changes in the synthesized image.

For agents

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

get_harvested_code_for_paper("2603.17637")
get_code_for_paper("2603.17637")
have("2603.17637")

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

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

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

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

Connect an agent — have() is free.