SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.00522 · ICLR · 2025

Periodic Materials Generation using Text-Guided Joint Diffusion Model

Pawan Goyal, Subhojyoti Khastagir, Kishalay Das, Seung-Cheol Lee, Satadeep Bhattacharjee, Niloy Ganguly

arXiv · PDF · Open in the Atlas

Code that ran

12 of 13 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; 3 honoured the contract we drafted, 0 violated it and 6 have no contract verdict; 3 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/2503.00522.json · badge: /api/ran/2503.00522.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
kdmsit/TGDMat canonical (classifier label)
classifier basis not recorded on the link
12 ran · 1 no recorded run
FunctionStatusWhere it lives
coord2diff Ran
ran on a synthesized input
kdmsit/TGDMat/csp_task/model/utils.py
code served (permissive licence) · get_code("767f69d375a6d9e3")
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

torch.manual_seed(0)

# x: tensor of node coordinates, shape [num_nodes, num_features]
# The function indexes into x with i and j, so we need num_nodes >= 2
x = torch.randn(2, 4)

# edge_index: tensor of shape [2, num_edges]
# i and j are used to index x, so values must be in range [0, num_nodes)
# The function computes coord_diff = x[i] - x[j], then sums over dimension 1
# This means coord_diff has shape [num_edges, num_features]
# Then dist = torch.sum(..., 1) gives shape [num_edges], unsqueezed to [num_edges, 1]
edge_index = torch.tensor([[0, 1], [1, 0]], dtype=torch.long)

# norm_constant: scalar value used in normalization
norm_constant = 1

ARGS = {
    "x": x,
    "edge_index": edge_index,
    "norm_constant": norm_constant,
}
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
cosine_beta_schedule Ran
ran, honoured the contract we drafted
kdmsit/TGDMat/csp_task/model/diff_utils.py
code served (permissive licence) · get_code("cda1449e300d44f3")
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 float, shape (10,) 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 math

torch.manual_seed(0)

ARGS = {
    "timesteps": 10,
    "s": 0.008
}
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 1, dtype family float, shape (10,) — shape (10,) 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
generation Ran
ran on a synthesized input
kdmsit/TGDMat/csp_task/evaluate.py
code served (permissive licence) · get_code("5d418b6dcded34ba")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import numpy as np

torch.manual_seed(0)

# Create a minimal mock model that implements the .sample() method
class MockGenerativeModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(10, 10)
    
    def sample(self, batch, step_lr):
        # Return outputs dict and a trajectory
        # Batch size is 2, with different dimensions for each output
        batch_size = 2
        max_atoms = 4
        
        outputs = {
            'frac_coords': torch.randn(batch_size, max_atoms, 3),
            'num_atoms': torch.randint(1, 5, (batch_size,)),
            'atom_types': torch.randint(0, 10, (batch_size, max_atoms)),
            'lattices': torch.randn(batch_size, 3, 3),
        }
        traj = None
        return outputs, traj

# Create a mock batch object with cuda method
class MockBatch:
    def cuda(self):
        # This method gets called if CUDA is available, but we're CPU-only
        # so it won't be called in practice
        pass

# Create a data loader (list of batches)
loader = [MockBatch() for _ in range(2)]

# Create the model
model = MockGenerativeModel()

# Set step_lr parameter
step_lr = 0.01

ARGS = {
    'loader': loader,
    'model': model,
    'step_lr': step_lr,
}
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 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
get_file_paths Ran
ran; our contract draft was wrong, not the code
kdmsit/TGDMat/csp_task/compute_metrics.py
pointer only (licence: MIT); the stored copy get_code serves, from sibasmarak/symmcd, is pointer only (licence: NONE) · get_code("8d63ea1111adc6f6")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from sibasmarak/symmcd, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

get_model_path Ran
ran on a synthesized input
kdmsit/TGDMat/csp_task/eval_utils.py
code served (permissive licence) · get_code("a9a11e4f977a3fc2")
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 PosixPath. 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 pathlib import Path

ARGS = {
    'eval_model_name': 'test_model'
}
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 PosixPath — a PosixPath output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a PosixPath 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
lattices_to_params_shape Ran
ran; our contract draft was wrong, not the code
kdmsit/TGDMat/csp_task/evaluate.py
code served (permissive licence) · get_code("f4df852f3a0bac35")
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 3, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function expects a lattices tensor with shape (..., 3, 3)
# where the last two dimensions represent 3 lattice vectors of 3 components each
# Let's create a batch of 2 lattice systems
lattices = torch.randn(2, 3, 3)

ARGS = {
    "lattices": lattices,
}
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 tuple, ndim 3, dtype family float — 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
linear_beta_schedule Ran
ran, honoured the contract we drafted
kdmsit/TGDMat/csp_task/model/diff_utils.py
code served (permissive licence) · get_code("84a1879c66fb8e8b")
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 float, shape (10,) 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)

ARGS = {
    "timesteps": 10,
    "beta_start": 0.0001,
    "beta_end": 0.02,
}
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 1, dtype family float, shape (10,) — shape (10,) 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
load_data Ran
ran on a synthesized input
kdmsit/TGDMat/csp_task/eval_utils.py
code served (permissive licence) · get_code("255352a46c0e6633")
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 numpy as np
import torch
import tempfile
import os

torch.manual_seed(0)

# Create a temporary .npy file with the expected structure
temp_dir = tempfile.mkdtemp()
npy_file_path = os.path.join(temp_dir, "test_data.npy")

# Create mock data structure matching what load_data expects
mock_data = {
    'input_data_batch': {
        'tensor_a': np.random.randn(2, 4).astype(np.float32),
        'tensor_b': np.random.randn(2, 3).astype(np.float32),
    },
    'labels': np.random.randn(2, 5).astype(np.float32),
    'metadata': np.array([1, 2]).astype(np.int32),
}

np.save(npy_file_path, mock_data)

ARGS = {
    'file_path': npy_file_path
}
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
quadratic_beta_schedule Ran
ran, honoured the contract we drafted
kdmsit/TGDMat/csp_task/model/diff_utils.py
code served (permissive licence) · get_code("f9097d641770f184")
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 float, shape (10,) 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)

ARGS = {
    "timesteps": 10,
    "beta_start": 0.0001,
    "beta_end": 0.02,
}
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 1, dtype family float, shape (10,) — shape (10,) 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
reconstructon Ran
ran on a synthesized input
kdmsit/TGDMat/csp_task/evaluate.py
code served (permissive licence) · get_code("5691f086c26974f7")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
from torch_geometric.data import Batch, Data
from torch import nn

torch.manual_seed(0)

class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(10, 10)
    
    def sample(self, batch, step_lr=1e-05):
        batch_size = batch.num_graphs
        max_atoms = 8
        
        outputs = {
            'frac_coords': torch.randn(batch_size, max_atoms, 3),
            'num_atoms': torch.randint(1, max_atoms, (batch_size,)),
            'atom_types': torch.randint(1, 5, (batch_size, max_atoms)),
            'lattices': torch.randn(batch_size, 3, 3),
        }
        
        traj = None
        
        return outputs, traj

def create_mock_batch(batch_size=2):
    data_list = []
    for i in range(batch_size):
        x = torch.randn(4, 10)
        edge_index = torch.tensor([[0, 1, 2], [1, 2, 3]], dtype=torch.long)
        data = Data(x=x, edge_index=edge_index)
        data_list.append(data)
    
    return Batch.from_data_list(data_list)

loader = [create_mock_batch(batch_size=2), create_mock_batch(batch_size=2)]

model = MockModel()

num_evals = 2

step_lr = 1e-05

ARGS = {
    'loader': loader,
    'model': model,
    'num_evals': num_evals,
    'step_lr': step_lr,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch, torch_geometric — 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
sample_centered_gaussian Ran
ran on a synthesized input
kdmsit/TGDMat/csp_task/model/utils.py
code served (permissive licence) · get_code("1ab907ce7ea53c6d")
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)

# Analyze the function:
# - size: passed to torch.randn, should be a tuple/shape
# - n_mask: has .device attribute, supports torch operations (sum, multiplication)
#          used in dim=1 operations, so should be 2D tensor with batch dimension

# Create a small n_mask tensor (batch_size=2, feature_dim=4)
n_mask = torch.ones(2, 4)

# size should be compatible with n_mask for the operations
# torch.randn(size) creates tensor, then we do operations on dim=1
# So size should match n_mask shape for broadcasting
size = (2, 4)

ARGS = {
    "size": size,
    "n_mask": n_mask,
}
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
unsorted_segment_sum Ran
ran; our contract draft was wrong, not the code
kdmsit/TGDMat/csp_task/model/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from HaokaiHong/GOAT, is pointer only (licence: NONE) · get_code("d96ea1a7adc8e5bb")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from HaokaiHong/GOAT, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

load_model Not yet run
unverified (harvested, no recorded run)
kdmsit/TGDMat/csp_task/eval_utils.py
code served (permissive licence) · get_code("415e6a383e6ff70c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 13 distinct functions with an identity, 6 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 4 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.

FunctionAlso present inEarliest-datedOthers named
unsorted_segment_sum 3 other papers
3 dated earlier
2304.12436 (2023-04)
An Equivariant Generative Framework for Molecular Graph-Structure Co-Design
2405.15252 (2024-05)
Accelerating 3D Molecule Generation via Jointly Geometric Optimal Transport
2410.20255 (2024-10)
Equivariant Blurring Diffusion for Hierarchical Molecular Conformer Generation
linear_beta_schedule 2 other papers
1 dated earlier, 1 later
2206.00927 (2022-06)
DPM-Solver: A Fast ODE Solver for Diffusion Probabilistic Model Sampling in Around 10 Steps
2512.07289 (2025-12)
Equivariant Diffusion for Crystal Structure Prediction
quadratic_beta_schedule 2 other papers
1 dated earlier, 1 later
2206.00927 (2022-06)
DPM-Solver: A Fast ODE Solver for Diffusion Probabilistic Model Sampling in Around 10 Steps
2512.07289 (2025-12)
Equivariant Diffusion for Crystal Structure Prediction
cosine_beta_schedule 1 other paper
1 later
2512.07289 (2025-12)
Equivariant Diffusion for Crystal Structure Prediction
get_file_paths 1 other paper
1 dated earlier
2502.06485 (2025-02)
WyckoffDiff -A Generative Diffusion Model for Crystal Symmetry
lattices_to_params_shape 1 other paper
1 later
2512.07289 (2025-12)
Equivariant Diffusion for Crystal Structure Prediction

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

Equivariant diffusion models have emerged as the prevailing approach for generating novel crystal materials due to their ability to leverage the physical symmetries of periodic material structures. However, current models do not effectively learn the joint distribution of atom types, fractional coordinates, and lattice structure of the crystal material in a cohesive end-to-end diffusion framework. Also, none of these models work under realistic setups, where users specify the desired characteristics that the generated structures must match. In this work, we introduce TGDMat, a novel text-guided diffusion model designed for 3D periodic material generation. Our approach integrates global structural knowledge through textual descriptions at each denoising step while jointly generating atom coordinates, types, and lattice structure using a periodic-E(3)-equivariant graph neural network (GNN). Extensive experiments using popular datasets on benchmark tasks reveal that TGDMat outperforms existing baseline methods by a good margin. Notably, for the structure prediction task, with just one generated sample, TGDMat outperforms all baseline models, highlighting the importance of text-guided diffusion. Further, in the generation task, TGDMat surpasses all baselines and their text-fusion variants, showcasing the effectiveness of the joint diffusion paradigm. Additionally, incorporating textual knowledge reduces overall training and sampling computational overhead while enhancing generative performance when utilizing real-world textual prompts from experts. Code is available at https://github.com/kdmsit/TGDMat

For agents

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

get_harvested_code_for_paper("2503.00522")
get_code_for_paper("2503.00522")
have("2503.00522")

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

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

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

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

Connect an agent — have() is free.