SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2608.07713 · 2026

Tokenizer-Generator Coupling in Medical Image Generation

Liam Chalcroft

arXiv · PDF · Open in the Atlas

Code that ran

14 of 20 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; 5 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 9 failures of our instrument; 6 no recorded run), measured 2026-11-24; 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/2608.07713.json · badge: /api/ran/2608.07713.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
liamchalcroft/medtokenizers canonical (classifier label)
classifier basis: census
10 ran · 2 no recorded run
liamchalcroft/medlatents canonical (classifier label)
classifier basis: census
4 ran · 4 no recorded run
FunctionStatusWhere it lives
collate_conditional_batch Ran
ran; our contract draft was wrong, not the code
liamchalcroft/medlatents/src/medlatents/conditioning/collate.py
code served (permissive licence) · get_code("2af91ede38d69da0")
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
from dataclasses import dataclass
from typing import Any

torch.manual_seed(0)

@dataclass
class ConditionalBatchConfig:
    tokens_key: str = 'tokens'
    class_key: str | None = 'class'
    text_embeddings_key: str | None = None
    text_pooled_key: str | None = None
    text_mask_key: str | None = None
    spatial_key: str | None = None
    spatial_mask_key: str | None = None
    segmentation_key: str | None = None
    metadata_key: str | None = None
    raw_image_key: str | None = None
    pad_token_id: int = 0
    max_seq_length: int | None = None

batch = [
    {
        'tokens': torch.tensor([1, 2, 3], dtype=torch.long),
        'class': torch.tensor(0, dtype=torch.long),
        'text_embeddings': torch.randn(4),
        'text_pooled': torch.randn(3),
        'text_mask': torch.ones(4, dtype=torch.long),
        'spatial_condition': torch.randn(2, 4),
        'spatial_mask': torch.ones(2, 4, dtype=torch.long),
        'segmentation_mask': torch.ones(2, 4, dtype=torch.long),
        'metadata': torch.randn(5),
        'raw_image': torch.randn(3, 4),
    },
    {
        'tokens': torch.tensor([5, 6], dtype=torch.long),
        'class': torch.tensor(1, dtype=torch.long),
        'text_embeddings': torch.randn(4),
        'text_pooled': torch.randn(3),
        'text_mask': torch.ones(4, dtype=torch.long),
        'spatial_condition': torch.randn(2, 4),
        'spatial_mask': torch.ones(2, 4, dtype=torch.long),
        'segmentation_mask': torch.ones(2, 4, dtype=torch.long),
        'metadata': torch.randn(5),
        'raw_image': torch.randn(3, 4),
    },
]

config = ConditionalBatchConfig(
    tokens_key='tokens',
    class_key='class',
    text_embeddings_key='text_embeddings',
    text_pooled_key='text_pooled',
    text_mask_key='text_mask',
    spatial_key='spatial_condition',
    spatial_mask_key='spatial_mask',
    segmentation_key='segmentation_mask',
    metadata_key='metadata',
    raw_image_key='raw_image',
    pad_token_id=0,
    max_seq_length=None,
)

ARGS = {
    'batch': batch,
    'config': config,
}
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 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
compute_mae Ran
ran, honoured the contract we drafted
liamchalcroft/medtokenizers/src/medtokenizers/evaluation/metrics.py
code served (permissive licence) · get_code("5c2e304ef7c3d032")
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 float, 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 numpy as np

torch.manual_seed(0)

# Create small test tensors for reconstruction and target
# Shape: (B=2, C=1, H=4, W=3) for 4D case
reconstruction = torch.randn(2, 1, 4, 3)
target = torch.randn(2, 1, 4, 3)

# Create optional mask with same shape
mask = torch.randint(0, 2, (2, 1, 4, 3)).float()

ARGS = {
    "reconstruction": reconstruction,
    "target": target,
    "mask": mask
}
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 float, 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
compute_mse Ran
ran, honoured the contract we drafted
liamchalcroft/medtokenizers/src/medtokenizers/evaluation/metrics.py
code served (permissive licence) · get_code("4b806df4ec7208fb")
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 float, 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 numpy as np

torch.manual_seed(0)

# Create small test tensors for reconstruction and target
# Shape: (B=2, C=1, H=4, W=3) for 4D case
reconstruction = torch.randn(2, 1, 4, 3)
target = torch.randn(2, 1, 4, 3)

# Create a binary mask with same shape
mask = torch.randint(0, 2, (2, 1, 4, 3)).float()

ARGS = {
    "reconstruction": reconstruction,
    "target": target,
    "mask": mask,
}
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 float, 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
compute_psnr Ran
ran; our contract draft was wrong, not the code
liamchalcroft/medtokenizers/src/medtokenizers/evaluation/metrics.py
code served (permissive licence) · get_code("b6ddbbeb8cebe8e7")
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 float, 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 numpy as np

torch.manual_seed(0)

# Create small tensors with distinct dimensions for clarity
batch_size = 2
channels = 1
height = 4
width = 3
depth = 5

# Reconstruction tensor (B, C, H, W, D) - 5D case
reconstruction = torch.randn(batch_size, channels, height, width, depth)

# Target tensor (B, C, H, W, D) - same shape as reconstruction
target = torch.randn(batch_size, channels, height, width, depth)

# Optional mask (binary mask, same spatial dimensions)
mask = torch.randint(0, 2, (batch_size, channels, height, width, depth)).float()

# Data range for PSNR
data_range = 1.0

ARGS = {
    "reconstruction": reconstruction,
    "target": target,
    "data_range": data_range,
    "mask": mask,
}
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 float, 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
create_conditional_collate_fn Ran
ran; our contract draft was wrong, not the code
liamchalcroft/medlatents/src/medlatents/conditioning/collate.py
code served (permissive licence) · get_code("fe74f7596bc3cd62")
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 function. 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
from collections.abc import Callable
from dataclasses import dataclass
from typing import Any

torch.manual_seed(0)

@dataclass
class ConditionalBatchConfig:
    """Configuration for conditional batch collation.

    Specifies the keys in the dataset dicts that correspond to each
    conditioning modality.

    Attributes:
        tokens_key: Key for token sequence (the main generation target)
        class_key: Key for class labels (None to disable)
        text_embeddings_key: Key for pre-computed text embeddings
        text_pooled_key: Key for pooled text embeddings
        text_mask_key: Key for text attention mask
        spatial_key: Key for spatial conditioning (e.g., input image for super-res)
        spatial_mask_key: Key for spatial conditioning mask
        segmentation_key: Key for segmentation masks
        metadata_key: Key for scanner/acquisition metadata
        raw_image_key: Key for raw images (used for REPA alignment)
    """
    tokens_key: str = 'tokens'
    class_key: str | None = 'class'
    text_embeddings_key: str | None = None
    text_pooled_key: str | None = None
    text_mask_key: str | None = None
    spatial_key: str | None = None
    spatial_mask_key: str | None = None
    segmentation_key: str | None = None
    metadata_key: str | None = None
    raw_image_key: str | None = None
    pad_token_id: int = 0
    max_seq_length: int | None = None

# Create a minimal configuration
config = ConditionalBatchConfig(
    tokens_key='tokens',
    class_key='class',
    text_embeddings_key='text_embeddings',
    text_pooled_key='text_pooled',
    text_mask_key='text_mask',
    spatial_key='spatial',
    spatial_mask_key='spatial_mask',
    segmentation_key='segmentation',
    metadata_key='metadata',
    raw_image_key='raw_image',
    pad_token_id=0,
    max_seq_length=128
)

ARGS = {
    'config': config
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
create_model_variants Ran
ran; our contract draft was wrong, not the code
liamchalcroft/medlatents/src/medlatents/configs.py
code served (permissive licence) · get_code("a87d6af7f04a9527")
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 torch.nn as nn
from collections.abc import Callable
from dataclasses import dataclass
from typing import Any

torch.manual_seed(0)

@dataclass(frozen=True)
class ModelSize:
    """Standard transformer model size configuration."""
    depth: int
    hidden_size: int
    num_heads: int

# Define a minimal model class that accepts the parameters passed by the factory
class MinimalTransformer(nn.Module):
    def __init__(self, depth: int, hidden_size: int, num_heads: int, **kwargs):
        super().__init__()
        self.depth = depth
        self.hidden_size = hidden_size
        self.num_heads = num_heads
        self.extra_kwargs = kwargs
        # Create a simple linear layer as a placeholder
        self.linear = nn.Linear(hidden_size, hidden_size)
    
    def forward(self, x):
        return self.linear(x)

# Define MODEL_SIZES as expected by the function
MODEL_SIZES = {
    "Nano": ModelSize(depth=2, hidden_size=64, num_heads=2),
    "S": ModelSize(depth=4, hidden_size=128, num_heads=4),
    "B": ModelSize(depth=6, hidden_size=256, num_heads=8),
    "L": ModelSize(depth=12, hidden_size=512, num_heads=16),
    "XL": ModelSize(depth=24, hidden_size=1024, num_heads=32),
}

# Create custom sizes dictionary for testing
custom_sizes = {
    "Small": ModelSize(depth=3, hidden_size=96, num_heads=3),
    "Large": ModelSize(depth=8, hidden_size=384, num_heads=6),
}

# Define default kwargs to pass to all variants
default_kwargs = {
    "vocab_size": 256,
    "max_seq_length": 512,
    "dropout": 0.1,
}

ARGS = {
    "model_cls": MinimalTransformer,
    "base_name": "TestModel",
    "sizes": custom_sizes,
    "vocab_size": 256,
    "max_seq_length": 512,
    "dropout": 0.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 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
get_conv Ran
ran; our contract draft was wrong, not the code
liamchalcroft/medtokenizers/src/medtokenizers/modules/layers.py
code served (permissive licence) · get_code("eaa2e30c02052d7b")
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 Conv3d. 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 = {
    'dim': 3,
    'in_channels': 64,
    'out_channels': 128,
    'kernel_size': 3,
    'stride': 1,
    'padding': 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 Conv3d — a Conv3d output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Conv3d 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
get_cosine_schedule_with_warmup Ran
ran, honoured the contract we drafted
liamchalcroft/medlatents/src/medlatents/common/schedules.py
code served (permissive licence) · get_code("6d05388476add5d7")
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 float, 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 math

ARGS = {
    "step": 500,
    "warmup_steps": 100,
    "total_steps": 1000,
    "max_lr": 0.001,
    "min_lr": 0.00001,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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_padding Ran
ran, honoured the contract we drafted
liamchalcroft/medtokenizers/src/medtokenizers/modules/layers.py
code served (permissive licence) · get_code("b10e8e79b1c89c97")
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, 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

torch.manual_seed(0)

ARGS = {
    "dim": 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 tuple, ndim 1, dtype family int — a tuple output has no array shape of its own; none is stated
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
jaxtyped_compile_safe Ran
ran; our contract draft was wrong, not the code
liamchalcroft/medtokenizers/src/medtokenizers/modules/utils.py
code served (permissive licence) · get_code("3464031d3269e008")
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 function. 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
from beartype import beartype

torch.manual_seed(0)

# Create a simple typechecker function
def simple_typechecker(fn):
    """A minimal typechecker that just returns the function."""
    return fn

ARGS = {
    'typechecker': beartype
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
beartype, jaxtyping, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
load_latents Ran
ran, honoured the contract we drafted
liamchalcroft/medtokenizers/src/medtokenizers/inference.py
code served (permissive licence) · get_code("cb632039824220ae")
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
import numpy as np
from pathlib import Path
import tempfile
import os

torch.manual_seed(0)

# Create a temporary .npz file with latents data
temp_dir = tempfile.mkdtemp()
latents_data = np.random.randn(2, 4).astype(np.float32)
npz_path = os.path.join(temp_dir, "test_latents.npz")
np.savez(npz_path, latents=latents_data)

ARGS = {
    "load_path": npz_path,
    "device": None,
    "dtype": torch.float32,
}
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 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
pad_divisible Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
liamchalcroft/medtokenizers/src/medtokenizers/preprocessing.py
code served (permissive licence) · get_code("d97836d8c1ecc9ee")
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
from torch.nn import functional as nnf

torch.manual_seed(0)

# Create a small 5D tensor (B, C, D, H, W)
# Using distinct sizes: B=2, C=3, D=4, H=5, W=6
volume = torch.randn(2, 3, 4, 5, 6)

# Divisibility factor
k = 4

ARGS = {
    "volume": volume,
    "k": k,
}
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 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
percentile_normalize Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
liamchalcroft/medtokenizers/src/medtokenizers/preprocessing.py
code served (permissive licence) · get_code("834d158f1320c065")
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

np.random.seed(0)

# Create a sample volume with varied intensities
volume = np.random.rand(4, 5, 6).astype(np.float32) * 100

ARGS = {
    "volume": volume,
    "lower": 0.0,
    "upper": 99.5,
    "b_min": 0.0,
    "b_max": 1.0,
    "clip": False,
}
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
resample_to_spacing Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
liamchalcroft/medtokenizers/src/medtokenizers/preprocessing.py
code served (permissive licence) · get_code("7061c151f4be243f")
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 5, dtype family float, shape (2, 3, 8, 7, 6) 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

torch.manual_seed(0)

# Create a small input volume tensor with shape (B, C, D, H, W)
# B=2 (batch), C=3 (channels), D=4 (depth), H=5 (height), W=6 (width)
volume = torch.randn(2, 3, 4, 5, 6)

# Source spacing (z, y, x) - original voxel dimensions
src_spacing = (2.0, 1.5, 1.0)

# Target spacing (z, y, x) - desired voxel dimensions
tgt_spacing = (1.0, 1.0, 1.0)

# Interpolation mode
mode = 'trilinear'

ARGS = {
    'volume': volume,
    'src_spacing': src_spacing,
    'tgt_spacing': tgt_spacing,
    'mode': mode
}
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 Tensor, ndim 5, dtype family float, shape (2, 3, 8, 7, 6) — shape (2, 3, 8, 7, 6) 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
create_encoder Not yet run
unverified (harvested, no recorded run)
liamchalcroft/medlatents/src/medlatents/conditioning/encoders.py
code served (permissive licence) · get_code("614326f7bc65a4c4")
How it ran

no invocation recorded.

get_config Not yet run
unverified (harvested, no recorded run)
liamchalcroft/medtokenizers/src/medtokenizers/config.py
code served (permissive licence) · get_code("35851a6f82840307")
How it ran

no invocation recorded.

load_indices Not yet run
unverified (harvested, no recorded run)
liamchalcroft/medtokenizers/src/medtokenizers/inference.py
code served (permissive licence) · get_code("eb41b5ce332542b3")
How it ran

no invocation recorded.

sample_timesteps_u_shaped Not yet run
unverified (harvested, no recorded run)
liamchalcroft/medlatents/src/medlatents/common/time.py
code served (permissive licence) · get_code("de2375ed3a91d92c")
How it ran

no invocation recorded.

sample_timesteps_uniform Not yet run
unverified (harvested, no recorded run)
liamchalcroft/medlatents/src/medlatents/common/time.py
code served (permissive licence) · get_code("c0b00bf63adf9872")
How it ran

no invocation recorded.

sample_timesteps_uniform_shifted Not yet run
unverified (harvested, no recorded run)
liamchalcroft/medlatents/src/medlatents/common/time.py
code served (permissive licence) · get_code("78dfddf27211614b")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

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

Abstract

Latent medical image generators usually treat the tokenizer as fixed preprocessing. We test whether this separation is valid in a controlled ChestMNIST study at 64 × 64, crossing discrete tokenizers, generator families, and sampler settings under a shared latent grid, with continuous-latent reference cells. In this controlled setting, rankings depend jointly on the tokenizer, generator, and sampler: the best quantizer changes with the generator, and validation-based sampler selection changes the apparent generator ranking. We retrain the vocabulary-1024 interaction block at three seeds and the interaction survives (6 of 9 pairwise quantizer comparisons exceed three seed standard deviations), and we scope the wider single-seed grid accordingly. Reconstruction PSNR alone is not a reliable selection criterion; we instead introduce a generator-free statistic, neighbourconditional predictive gain, that separates the quantizer families by downstream generation quality (rank-AUC 1.00) where reconstruction PSNR and marginal token entropy do not. On LFQ-1024, retuning D3PM and SE-D3PM (selected on a held-out validation split) moves them from default FID-192 0.44/0.41 to 0.09/0.10 at lower NFE, replicated across seeds; the continuous references were not given an equivalent sampler sweep. We report FID-192 as an internal ranking metric; it ranks consistently with standard FID-2048 (Spearman 0.80) and with a label-free classifier two-sample test (0.78). We interpret these results through a rate-distortion-modelability framing, where modelability is conditional on the generator, sampler, and inference budget. All experiments are at 64 × 64 on low-resolution medical-style images, unconditional, and evaluated with nonclinical FID-based metrics, and we scope every claim to that setting. Implementations are released at https://github.com/liamchalcroft/medtokenizers and https://github.com/liamchalcroft/medlatents. Computer vision now offers alternatives along two axes. On the tokenizer side, vector quantization (VQ) [van den Oord et al., 2017], finite scalar quantization (FSQ) [Mentzer et al., 2024], lookupfree quantization (LFQ) [Yu et al., 2024], and continuous VAE/AE variants can all produce usable reconstructions while imposing different latent distributions. On the generator side, autoregressive Preprint.

For agents

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

get_harvested_code_for_paper("2608.07713")
get_code_for_paper("2608.07713")
have("2608.07713")

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

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

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

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

Connect an agent — have() is free.