SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2110.06672 · 2021

The Deep Generative Decoder: MAP estimation of representations improves modeling of single-cell RNA data

arXiv · PDF · Open in the Atlas

Code that ran

7 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 7 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/2110.06672.json · badge: /api/ran/2110.06672.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
Center-for-Health-Data-Science/scDGD canonical (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
center-for-health-data-science/dgd_paper community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
collate_sparse_batches Ran
ran on a synthesized input
Center-for-Health-Data-Science/scDGD/scDGD/classes/data.py
code served (permissive licence) · get_code("d364a0333d8f8cb7")
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 tuple. 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 scipy.sparse
import numpy as np

torch.manual_seed(0)

# Create a batch of sparse matrices and library tensors
# Each item in batch is (sparse_data, library_tensor, index)

# Create first sparse matrix (3x4)
data1 = np.array([1, 2, 3, 4, 5])
row1 = np.array([0, 1, 2, 0, 1])
col1 = np.array([0, 1, 2, 3, 3])
sparse1 = scipy.sparse.coo_matrix((data1, (row1, col1)), shape=(3, 4))

# Create second sparse matrix (3x4)
data2 = np.array([6, 7, 8, 9])
row2 = np.array([0, 1, 2, 2])
col2 = np.array([1, 2, 0, 3])
sparse2 = scipy.sparse.coo_matrix((data2, (row2, col2)), shape=(3, 4))

# Create library tensors (small size: 2 elements each)
library1 = torch.tensor([0.5, 1.5])
library2 = torch.tensor([2.5, 3.5])

# Create indices
idx1 = "sample_1"
idx2 = "sample_2"

# Construct batch as list of tuples
batch = [
    (sparse1, library1, idx1),
    (sparse2, library2, idx2)
]

ARGS = {
    "batch": batch
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
compute_distances Ran
ran on a synthesized input
Center-for-Health-Data-Science/scDGD/scDGD/functions/analysis.py
code served (permissive licence) · get_code("eca70d88d14b7499")
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 2, dtype family float, shape (2, 2) 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 numpy as np
import sklearn.metrics

torch_manual_seed = 0

# Create a small matrix for testing
# The function uses sklearn.metrics.pairwise.euclidean_distances
# which expects a 2D array-like input (n_samples, n_features)
mtrx = np.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=np.float64)

ARGS = {
    "mtrx": mtrx
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (2, 2) — shape (2, 2) 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
gmm_clustering Ran
ran on a synthesized input
Center-for-Health-Data-Science/scDGD/scDGD/functions/analysis.py
code served (permissive licence) · get_code("8f4289c0ba239112")
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 1, dtype family int, shape (2,) 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 sklearn import preprocessing

torch.manual_seed(0)

# Create a minimal GMM class that has the sample_probs method
class MinimalGMM:
    def __init__(self, n_components=3):
        self.n_components = n_components
    
    def sample_probs(self, r):
        # r is expected to be a tensor of shape (batch_size, feature_dim)
        # Return probabilities of shape (batch_size, n_components)
        batch_size = r.shape[0]
        probs = torch.randn(batch_size, self.n_components)
        # Apply softmax to make valid probabilities
        probs = torch.softmax(probs, dim=-1)
        return probs

# Create sample data
r = np.random.randn(2, 4).astype(np.float32)  # 2 samples, 4 features
gmm = MinimalGMM(n_components=3)  # 3 components
labels = np.array(['class_a', 'class_b'])  # 2 labels for 2 samples

ARGS = {
    'r': r,
    'gmm': gmm,
    'labels': labels
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn, 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, shape (2,) — shape (2,) 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
logNBdensity Ran
ran on a synthesized input
Center-for-Health-Data-Science/scDGD/scDGD/classes/output_distributions.py
code served (permissive licence) · get_code("3fd79f57237ce3ba")
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. 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)

# k and m must be tensors of the same shape
# r must be tensor of shape (1, n_genes)
# Based on the function body, these are used with torch.lgamma, torch.log, and arithmetic operations

# Create small tensors with distinct dimensions
batch_size = 2
n_genes = 4

k = torch.ones(batch_size, n_genes)
m = torch.ones(batch_size, n_genes) * 2.0
r = torch.ones(1, n_genes) * 0.5

ARGS = {
    "k": k,
    "m": m,
    "r": r
}
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
logNBdensity Ran
ran on a synthesized input
center-for-health-data-science/dgd_paper/DGD/OutputDistribution.py
code served (permissive licence) · get_code("ed5573c802b7c38e")
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. 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)

# k and m are tensors of same shape (batch_size x n_genes)
# r is tensor of shape (1, n_genes)
# Let's use batch_size=2, n_genes=4

batch_size = 2
n_genes = 4

k = torch.randn(batch_size, n_genes).abs() + 0.1  # ensure positive values
m = torch.randn(batch_size, n_genes).abs() + 0.1  # ensure positive values
r = torch.randn(1, n_genes).abs() + 0.1  # ensure positive values

ARGS = {
    "k": k,
    "m": m,
    "r": r,
}
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
order_matrix_by_max_per_class Ran
ran on a synthesized input
Center-for-Health-Data-Science/scDGD/scDGD/functions/analysis.py
code served (permissive licence) · get_code("cd9bf3cf8665bb08")
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 tuple. 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 numpy as np
import operator

# Create a small matrix with shape (3, 4)
# 3 rows (classes), 4 columns (features/predictions)
mtrx = np.array([
    [0.1, 0.9, 0.3, 0.2],
    [0.5, 0.2, 0.8, 0.1],
    [0.3, 0.4, 0.2, 0.7]
], dtype=np.float32)

# Class labels corresponding to the 3 rows
class_labels = ['class_A', 'class_B', 'class_C']

# Optional comp_order to reorder columns
comp_order = [2, 0, 3, 1]  # Reorder the 4 columns

ARGS = {
    'mtrx': mtrx,
    'class_labels': class_labels,
    'comp_order': comp_order
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is 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
sparse_coo_to_tensor Ran
ran on a synthesized input
Center-for-Health-Data-Science/scDGD/scDGD/classes/data.py
code served (permissive licence) · get_code("734f41d06f8f633b")
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 (3, 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
from scipy.sparse import coo_matrix
import numpy as np

torch.manual_seed(0)

# Create a small sparse COO matrix
row = np.array([0, 1, 2])
col = np.array([0, 1, 3])
data = np.array([1.0, 2.0, 3.0])
sparse_matrix = coo_matrix((data, (row, col)), shape=(3, 4))

ARGS = {
    "mtrx": sparse_matrix
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, 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 (3, 4) — shape (3, 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

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 6 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 6 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-23.

Repositories linked to this paper

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

Abstract

Learning low-dimensional representations of single-cell transcriptomics has become instrumental to its downstream analysis. The state of the art is currently represented by neural network models such as variational autoencoders (VAEs) which use a variational approximation of the likelihood for inference. We here present the Deep Generative Decoder (DGD), a simple generative model that computes model parameters and representations directly via maximum a posteriori (MAP) estimation. The DGD handles complex parameterized latent distributions naturally unlike VAEs which typically use a fixed Gaussian distribution, because of the complexity of adding other types. We first show its general functionality on a commonly used benchmark set, Fashion-MNIST. Secondly, we apply the model to multiple single-cell data sets. Here the DGD learns low-dimensional, meaningful and well-structured latent representations with sub-clustering beyond the provided labels. The advantages of this approach are its simplicity and its capability to provide representations of much smaller dimensionality than a comparable VAE.

For agents

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

get_harvested_code_for_paper("2110.06672")
get_code_for_paper("2110.06672")
have("2110.06672")

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

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

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

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

Connect an agent — have() is free.