SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.16608 · ICML · 2024

Efficient Probabilistic Modeling of Crystallization at Mesoscopic Scale

Vlado Menkovski, Koen Minartz, Pol Timmer

arXiv · PDF · Open in the Atlas

Code that ran

10 of 17 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (3 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 3 have no contract verdict; 5 failures of our instrument; 7 no recorded run), measured 2026-11-23; 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/2405.16608.json · badge: /api/ran/2405.16608.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
poltimmer/CGNE marked official in Papers with Code
Papers with Code archive
10 ran · 7 no recorded run
FunctionStatusWhere it lives
ConditionalEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("94365ddc5119d1c3")
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, ConditionalEncoder: 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
from torch import nn
import math

torch.manual_seed(0)

# Define the helper functions and classes needed
def round_hidden_dim(val):
    """Rounds a hidden number to a nice value for a hidden dimension size."""
    if val < 32:
        return max(1, 2 ** math.ceil(math.log2(val)))
    elif val < 256:
        return 32 * round(val / 32)
    else:
        return 64 * round(val / 64)

def get_dims(in_dim, out_dim, hidden_dim=128, n_layers=7):
    """
    Returns a list of dimensions for a linear network with `n_layers` layers.
    """
    if n_layers < 2:
        raise ValueError('num_layers must be at least 2')
    half_layers = (n_layers - 2) // 2
    increase_dims = [int(in_dim + i * (hidden_dim - in_dim) / (half_layers + 1)) for i in range(1, half_layers + 1)]
    increase_dims = [round_hidden_dim(dim) for dim in increase_dims]
    middle_layers = [hidden_dim] if n_layers % 2 == 0 else [hidden_dim, hidden_dim]
    decrease_dims = [int(hidden_dim - i * (hidden_dim - out_dim) / (half_layers + 1)) for i in range(1, half_layers + 1)]
    decrease_dims = [round_hidden_dim(dim) for dim in decrease_dims]
    return [in_dim] + increase_dims + middle_layers + decrease_dims + [out_dim]

def linear(in_dim, out_dim, hidden_dim=128, n_layers=7, activation=nn.GELU):
    """
    Gives a Sequential of linear layers.
    """
    dims = get_dims(in_dim, out_dim, hidden_dim, n_layers)
    layers = []
    for i in range(len(dims) - 1):
        layers.append(nn.Linear(dims[i], dims[i + 1]))
        if i < len(dims) - 2:
            layers.append(activation())
    return nn.Sequential(*layers)

# Create arguments for ConditionalEncoder
ARGS = {
    'in_channels': 1,
    'hidden_dim': 32,
    'cond_dim': 7,
    'z_dim': 4,
    'spatial_z': False,
    'cond_embed_dim': 16,
    'cond_hidden_dim': 12,
    'cond_n_layers': 3
}
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 ConditionalEncoder — 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 ConditionalEncoder 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
SpatialZDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("ca11a07853fcfd9a")
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, SpatialZDecoder: 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 = {
    'z_dim': 32,
    'out_dim': 7,
    'fc_hidden_dim': 512,
    'fc_n_layers': 5,
}
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 SpatialZDecoder — 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 SpatialZDecoder 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
UNet Ran
ran on a synthesized input · constructed an object; no result was computed
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("30bd8f3af6765427")
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, UNet: 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 = {
    'c_in': 1,
    'c_out': 1,
    'z_dim': 32,
    'hidden_dim': 64,
    'spatial_z': False,
    'z_emb_dim': -1,
    'z_emb_hidden_dim': -1,
    'z_emb_n_layers': -1,
    'z_inject_method': 'cat'
}
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 UNet — 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 UNet 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_dims Ran
ran, honoured the contract we drafted
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("a03305db8cde716f")
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 list, 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 math

def round_hidden_dim(val):
    """Rounds a hidden number to a nice value for a hidden dimension size."""
    if val < 32:
        return max(1, 2 ** math.ceil(math.log2(val)))
    elif val < 256:
        return 32 * round(val / 32)
    else:
        return 64 * round(val / 64)

def get_dims(in_dim, out_dim, hidden_dim=128, n_layers=7):
    """
    Returns a list of dimensions for a linear network with `n_layers` layers.
    The layer dims interpolate from in_dim, to hidden_dim in the middle, to out_dim.
    The interpolation is linear, but the hidden dims should always be either
    a power of 2, or a multiple of 32 (or 64 when > 256).
    """
    if n_layers < 2:
        raise ValueError('num_layers must be at least 2')
    half_layers = (n_layers - 2) // 2
    increase_dims = [int(in_dim + i * (hidden_dim - in_dim) / (half_layers + 1)) for i in range(1, half_layers + 1)]
    increase_dims = [round_hidden_dim(dim) for dim in increase_dims]
    middle_layers = [hidden_dim] if n_layers % 2 == 0 else [hidden_dim, hidden_dim]
    decrease_dims = [int(hidden_dim - i * (hidden_dim - out_dim) / (half_layers + 1)) for i in range(1, half_layers + 1)]
    decrease_dims = [round_hidden_dim(dim) for dim in decrease_dims]
    return [in_dim] + increase_dims + middle_layers + decrease_dims + [out_dim]

ARGS = {
    "in_dim": 16,
    "out_dim": 8,
    "hidden_dim": 128,
    "n_layers": 7
}
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 list, ndim 1, dtype family int — a list 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
get_reduce_fn Ran
ran; our contract draft was wrong, not the code
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("cc806af544656971")
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

torch.manual_seed(0)

# Construct arguments for get_reduce_fn
# The function takes:
# - reduce: str (default 'mean')
# - pad_masks: Optional[torch.Tensor] (default None)

# Create a small pad_masks tensor
# Based on the code, pad_masks is reshaped to [-1] + [1] * (x.dim() - 1)
# and used in mean calculations, so it should be 1D with batch size matching x
pad_masks = torch.tensor([1.0, 1.0, 0.5, 0.5])  # batch size 4, some padded

ARGS = {
    'reduce': 'mean',
    'pad_masks': pad_masks,
}
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
inject Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("23c70171bfdea31e")
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 (2, 11, 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
from torch import Tensor

torch.manual_seed(0)

# Create two 4D tensors with different channel dimensions
# x: batch=2, channels=8, height=4, width=4
x = torch.randn(2, 8, 4, 4)

# y: batch=2, channels=3, height=4, width=4
y = torch.randn(2, 3, 4, 4)

# Test with 'cat' method
method = 'cat'

ARGS = {
    'x': x,
    'y': y,
    'method': method
}
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 (2, 11, 4, 4) — shape (2, 11, 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
linear Ran
ran; our contract draft was wrong, not the code
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("bbcbb9086e4f6c57")
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 Sequential. 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_dim": 4,
    "out_dim": 3,
    "hidden_dim": 128,
    "n_layers": 7,
    "activation": nn.GELU,
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential 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
prefix_dict Ran
ran; our contract draft was wrong, not the code
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("07f4def57668ac20")
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

torch.manual_seed(0)

# Construct arguments for prefix_dict function
# The function takes:
# - d: dict - a dictionary to prefix keys
# - prefix: str - a string prefix to add to each key

test_dict = {
    "key1": 42,
    "key2": "value",
    "key3": [1, 2, 3],
    "key4": {"nested": True}
}

test_prefix = "my_prefix_"

ARGS = {
    "d": test_dict,
    "prefix": test_prefix
}
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
round_hidden_dim Ran
ran, honoured the contract we drafted
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("a94bffaac953f8ac")
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 int, ndim 0, dtype family int, 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

def round_hidden_dim(val):
    """Rounds a hidden number to a nice value for a hidden dimension size."""
    if val < 32:
        return max(1, 2 ** math.ceil(math.log2(val)))
    elif val < 256:
        return 32 * round(val / 32)
    else:
        return 64 * round(val / 64)

ARGS = {
    "val": 48
}
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 int, ndim 0, dtype family int, 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
samplewise_dropout Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("9c15697cc6b908dd")
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 (2, 4, 3, 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)

# Create a small 4D tensor (batch_size=2, channels=4, height=3, width=3)
x = torch.randn(2, 4, 3, 3)

# Define arguments for samplewise_dropout
ARGS = {
    "x": x,
    "p": 0.5,
    "training": True,
}
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 (2, 4, 3, 3) — shape (2, 4, 3, 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
ApproximatePosterior Not yet run
unverified (harvested, no recorded run)
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("8b26bb1316edf4f7")
How it ran

no invocation recorded.

CGNE Not yet run
unverified (harvested, no recorded run)
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("1a5eb01f3d5a8d75")
How it ran

no invocation recorded.

ConditionalPrior Not yet run
unverified (harvested, no recorded run)
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("805d5ad4e3ab108d")
How it ran

no invocation recorded.

ConvEncoder Not yet run
unverified (harvested, no recorded run)
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("0c907c94d8dd9ffd")
How it ran

no invocation recorded.

ResBlock Not yet run
unverified (harvested, no recorded run)
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("d1c55394546f648e")
How it ran

no invocation recorded.

ResBlockDown Not yet run
unverified (harvested, no recorded run)
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("2772856799b7f6e3")
How it ran

no invocation recorded.

ResBlockUp Not yet run
unverified (harvested, no recorded run)
poltimmer/CGNE/CGNE/lightning_modules/cgne.py
code served (permissive licence) · get_code("ee1edaf3879a5653")
How it ran

no invocation recorded.

Also present in other papers' code

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

Crystallization processes at the mesoscopic scale, where faceted, dendritic growth, and multigrain formation can be observed, are of particular interest within materials science and metallurgy. These processes are highly nonlinear, stochastic, and sensitive to small perturbations of system parameters and initial conditions. Methods for the simulation of these processes have been developed using discrete numerical models, but these are computationally expensive. This work aims to scale crystal growth simulation with a machine learning emulator. Specifically, autoregressive latent variable models are well suited for modeling the joint distribution over system parameters and the crystallization trajectories. However, successfully training such models is challenging due to the stochasticity and sensitivity of the system. Existing approaches consequently fail to produce diverse and faithful crystallization trajectories. In this paper, we introduce the Crystal Growth Neural Emulator (CGNE), a probabilistic model for efficient crystal growth emulation at the mesoscopic scale that overcomes these challenges. We validate CGNE results using the morphological properties of the crystals produced by numerical simulation. CGNE delivers a factor of 11 improvement in inference time and performance gains compared with recent state-of-the-art probabilistic models for dynamical systems.

For agents

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

get_harvested_code_for_paper("2405.16608")
get_code_for_paper("2405.16608")
have("2405.16608")

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

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

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

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

Connect an agent — have() is free.