SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.08457 · IJCAI · 2023

MolHF: A Hierarchical Normalizing Flow for Molecular Graph Generation

Ben Liao, Yiheng Zhu, Jialu Wu, Chang-Yu Hsieh, Tingjun Hou, Jian Wu, Yixuan Wu, Zhenqiu Ouyang

arXiv · PDF · Open in the Atlas

Code that ran

14 of 23 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (7 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 10 have no contract verdict; 2 failures of our instrument; 9 no recorded run), measured 2026-11-22; 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/2305.08457.json · badge: /api/ran/2305.08457.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
violet-sto/molhf community
Papers with Code archive
14 ran · 9 no recorded run
FunctionStatusWhere it lives
ActNorm Ran
ran on a synthesized input · constructed an object; no result was computed
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("62239b0f787c9409")
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, ActNorm: 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 = {
    'in_channel': 4,
    'logdet': 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 ActNorm — 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 ActNorm 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
ActNorm2D Ran
ran on a synthesized input · constructed an object; no result was computed
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("1e9fb6d1a5de1997")
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, ActNorm2D: 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 = {
    'in_dim': 4,
    'logdet': 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 ActNorm2D — 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 ActNorm2D 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
AffineCoupling Ran
ran on a synthesized input · constructed an object; no result was computed
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("e0ea9e5584744a7e")
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, AffineCoupling: 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 = {
    "in_channel": 4,
    "filter_size": 8,
    "affine": True,
    "mask_swap": False,
}
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 AffineCoupling — 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 AffineCoupling 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
CrissCrossAttention Ran
ran on a synthesized input · constructed an object; no result was computed
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("673215531f5c9351")
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, CrissCrossAttention: 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
import math

torch.manual_seed(0)

# Create a small input tensor for testing
# Shape: (batch_size, channels, height, width)
# Using batch=2, channels=4, height=3, width=5 for distinct dimensions
x = torch.randn(2, 4, 3, 5)

# Create the module instance
ARGS = {
    "in_dim": 4,
    "out_dim": 4,
    "h": 2,
    "num_patch": 1,
    "scaled": 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 CrissCrossAttention — 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 CrissCrossAttention 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
GraphConv Ran
ran on a synthesized input · constructed an object; no result was computed
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("2c475547db518beb")
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, GraphConv: 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)

# Define ARGS dict for GraphConv.__init__
ARGS = {
    'in_channels': 4,
    'out_channels': 3,
    'num_edge_type': 2,
    'normalize': True
}

# Test data to verify the setup works
if __name__ == '__main__':
    # Create a GraphConv instance
    graph_conv = nn.GraphConv(**ARGS)
    
    # Create sample inputs for forward pass
    batch_size = 2
    num_nodes = 5
    in_channels = ARGS['in_channels']
    
    # Input node features: (batch, nodes, channels)
    h = torch.randn(batch_size, num_nodes, in_channels)
    
    # Adjacency matrix: (batch, edge_types, nodes, nodes)
    adj = torch.randn(batch_size, ARGS['num_edge_type'], num_nodes, num_nodes)
    
    # Forward pass
    output = graph_conv(h, adj)
    print(f"Output shape: {output.shape}")
    print(f"Expected shape: ({batch_size}, {num_nodes}, {ARGS['out_channels']})")
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 GraphConv — 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 GraphConv 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
INF Ran
ran, violated the contract we drafted
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("399928d133771096")
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 3, dtype family float, shape (6, 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

torch.manual_seed(0)

# Analyze the function:
# INF(B, H, W) takes three integer parameters: B (batch), H (height), W (width)
# It creates a diagonal matrix with -inf values and reshapes it
# The function returns a tensor of shape (B*W, H, H)

B = 2
H = 4
W = 3

ARGS = {
    "B": B,
    "H": H,
    "W": W,
}
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 3, dtype family float, shape (6, 4, 4) — shape (6, 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
InvConv2d Ran
ran on a synthesized input
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("0a804d8c8c4a8d7b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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 torch.nn as nn
import torch.nn.functional as F

class InvConv2d(nn.Module):
    """
    Invertible 1*1 conv
    """

    def __init__(self, in_channel):
        super().__init__()
        weight = torch.randn(in_channel, in_channel)
        q, _ = torch.linalg.qr(weight)
        weight = q.unsqueeze(2).unsqueeze(3)
        self.weight = nn.Parameter(weight)

    def forward(self, input):
        _, _, height, width = input.shape
        out = F.conv2d(input, self.weight)
        logdet = height * width * torch.linalg.slogdet(self.weight.squeeze().double())[1].float()
        return (out, logdet)

    def reverse(self, output):
        return F.conv2d(output, self.weight.squeeze().inverse().unsqueeze(2).unsqueeze(3))


INIT_ARGS = {
    'in_channel': 4
}

ARGS = {
    'input': torch.randn(2, 4, 3, 5)
}

if __name__ == '__main__':
    model = InvConv2d(**INIT_ARGS)
    output, logdet = model(**ARGS)
    print(f"Output shape: {output.shape}")
    print(f"Logdet shape: {logdet.shape}")
    print(f"Logdet value: {logdet}")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
InvConv2dLU Ran
ran on a synthesized input · constructed an object; no result was computed
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("76fecc6493ba2e83")
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, InvConv2dLU: 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
import numpy as np
from scipy import linalg as la

torch.manual_seed(0)

# Build a small input tensor for testing
# Shape: (batch, channels, height, width)
input_tensor = torch.randn(2, 4, 3, 5)

# The function signature is: __init__(self, in_channel, symmetry=False)
# We need to provide in_channel and symmetry

ARGS = {
    'in_channel': 4,
    'symmetry': False
}
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 InvConv2dLU — 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 InvConv2dLU 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
InvRotationLU Ran
ran on a synthesized input
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("37df6656e9f537ed")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) 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 torch.nn as nn
from scipy import linalg as la
import numpy as np

def logabs(x):
    return torch.log(torch.abs(x))

class InvRotationLU(nn.Module):

    def __init__(self, dim):
        super(InvRotationLU, self).__init__()
        weight = np.random.randn(dim, dim)
        q, _ = la.qr(weight)
        w_p, w_l, w_u = la.lu(q.astype(np.float32))
        w_s = np.diag(w_u)
        w_u = np.triu(w_u, 1)
        u_mask = np.triu(np.ones_like(w_u), 1)
        l_mask = u_mask.T
        w_p = torch.from_numpy(w_p)
        w_l = torch.from_numpy(w_l)
        w_s = torch.from_numpy(w_s)
        w_u = torch.from_numpy(w_u)
        self.register_buffer('w_p', w_p)
        self.register_buffer('u_mask', torch.from_numpy(u_mask))
        self.register_buffer('l_mask', torch.from_numpy(l_mask))
        self.register_buffer('s_sign', torch.sign(w_s))
        self.register_buffer('l_eye', torch.eye(l_mask.shape[0]))
        self.w_l = nn.Parameter(w_l)
        self.w_s = nn.Parameter(logabs(w_s))
        self.w_u = nn.Parameter(w_u)

    def forward(self, input):
        bs, height, width = input.shape
        weight = self.calc_weight()
        out = torch.matmul(input, weight)
        logdet = height * torch.sum(self.w_s)
        return (out, logdet)

    def calc_weight(self):
        weight = self.w_p @ (self.w_l * self.l_mask + self.l_eye) @ (self.w_u * self.u_mask + torch.diag(self.s_sign * torch.exp(self.w_s)))
        return weight.unsqueeze(0)

    def reverse(self, output):
        weight = self.calc_weight()
        return torch.matmul(output, weight.inverse())


INIT_ARGS = {
    'dim': 4
}

ARGS = {
    'input': torch.randn(2, 3, 4)
}

if __name__ == '__main__':
    model = InvRotationLU(**INIT_ARGS)
    output, logdet = model(**ARGS)
    print("Output shape:", output.shape)
    print("Logdet shape:", logdet.shape)
    print("Success!")
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
RGCN Ran
ran on a synthesized input · constructed an object; no result was computed
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("255d29628ddbc5c1")
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, RGCN: 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)

# Parameters for RGCN
num_layers = 2
n_node = 5
in_dim = 4
hid_dim = 8
out_dim = 3
dropout = 0.1
normalization = True
pool = False

ARGS = {
    "num_layers": num_layers,
    "n_node": n_node,
    "in_dim": in_dim,
    "hid_dim": hid_dim,
    "out_dim": out_dim,
    "dropout": dropout,
    "normalization": normalization,
    "pool": pool,
}
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 RGCN — 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 RGCN 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
Rescale Ran
ran on a synthesized input
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("b33a81dea55c1513")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, 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 torch.nn as nn

class Rescale(nn.Module):

    def __init__(self):
        super(Rescale, self).__init__()
        self.weight = nn.Parameter(torch.zeros([1]))

    def forward(self, x):
        if torch.isnan(torch.exp(self.weight)).any():
            print(self.weight)
            raise RuntimeError('Rescale factor has NaN entries')
        x = torch.exp(self.weight) * x
        return x


INIT_ARGS = {}

ARGS = {
    'x': torch.randn(2, 4)
}

if __name__ == '__main__':
    model = Rescale(**INIT_ARGS)
    output = model(**ARGS)
    print("Output shape:", output.shape)
    print("Output:", output)
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — no output shape is stated: observe_signature.py observed this class with its constructor sizes canonicalised where it could, which the node does not record, so its shape is not stated as this setup block's
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
logabs Ran
ran, honoured the contract we drafted
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("cd1a4050db5f5c36")
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)

# The function logabs takes a single parameter x and computes log(abs(x))
# x should be a tensor with non-zero values (to avoid log(0) issues)

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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
rescale_adj Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("19c4edfbb17dc994")
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, 3, 4, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small adjacency tensor
# Shape: (batch=2, num_views=3, num_nodes=4, num_nodes=4)
adj = torch.randn(2, 3, 4, 4)

# Parameters for rescale_adj
ARGS = {
    'adj': adj,
    'num_nodes': 4,
    'improved': False,
    'add_self_loops': True,
    'type': 'all'
}
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, 3, 4, 4) — shape (2, 3, 4, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
squeeze_adj Ran
ran; our contract draft was wrong, not the code
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("9b3bfa20027b4271")
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, 3, 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 torch

torch.manual_seed(0)

# adj: expected to be a tensor with shape (..., n_node, n_node)
# The function uses adj.shape[-1] to get n_node
# It performs einsum operations expecting shape (batch, edge?, n_node, n_node)
# Let's construct a 4D tensor: (batch=2, edge=3, n_node=4, n_node=4)
batch_size = 2
edge_dim = 3
n_node = 4
adj = torch.randn(batch_size, edge_dim, n_node, n_node)

# stride: integer that divides n_node evenly
# The function uses n_node // stride and creates assign_matrix of shape (n_node, n_node // stride)
stride = 2

ARGS = {
    "adj": adj,
    "stride": stride,
}
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, 3, 2, 2) — shape (2, 3, 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
Block Not yet run
unverified (harvested, no recorded run)
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("46b1f7a69cd6719a")
How it ran

no invocation recorded.

BlockOnGraph Not yet run
unverified (harvested, no recorded run)
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("1874778db54a827e")
How it ran

no invocation recorded.

CC_Glow Not yet run
unverified (harvested, no recorded run)
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("ddab52777bb4f278")
How it ran

no invocation recorded.

Flow Not yet run
unverified (harvested, no recorded run)
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("9ac0aa08d59068b7")
How it ran

no invocation recorded.

FlowOnGraph Not yet run
unverified (harvested, no recorded run)
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("9810c9a6a91778ff")
How it ran

no invocation recorded.

Gaussianize Not yet run
unverified (harvested, no recorded run)
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("117498aa88c3d909")
How it ran

no invocation recorded.

GraphAffineCoupling Not yet run
unverified (harvested, no recorded run)
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("0e21277976b52619")
How it ran

no invocation recorded.

GraphFlow Not yet run
unverified (harvested, no recorded run)
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("8b68ca797d26b070")
How it ran

no invocation recorded.

MolHF Not yet run
unverified (harvested, no recorded run)
violet-sto/molhf/models/MolHF.py
code served (permissive licence) · get_code("a0f64373d768ebb1")
How it ran

no invocation recorded.

Also present in other papers' code

Of 23 samples lifted from this paper's linked repositories, 23 carry a function identity and 0 do not. Of the 23 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 0 the same month, 0 later) and 21 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
Rescale
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2204.09410 (2022-04)
Generating 3D Molecules for Target Protein Binding
logabs
brick of this paper's assembly: helper
1 other paper
1 dated earlier · 1 only as an assembly brick
2006.04598 (2020-06)
WaveNODE: A Continuous Normalizing Flow for Speech Synthesis

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

Molecular de novo design is a critical yet challenging task in scientific fields, aiming to design novel molecular structures with desired property profiles. Significant progress has been made by resorting to generative models for graphs. However, limited attention is paid to hierarchical generative models, which can exploit the inherent hierarchical structure (with rich semantic information) of the molecular graphs and generate complex molecules of larger size that we shall demonstrate to be difficult for most existing models. The primary challenge to hierarchical generation is the non-differentiable issue caused by the generation of intermediate discrete coarsened graph structures. To sidestep this issue, we cast the tricky hierarchical generation problem over discrete spaces as the reverse process of hierarchical representation learning and propose MolHF, a new hierarchical flow-based model that generates molecular graphs in a coarse-to-fine manner. Specifically, MolHF first generates bonds through a multi-scale architecture, then generates atoms based on the coarsened graph structure at each scale. We demonstrate that MolHF achieves state-of-the-art performance in random generation and property optimization, implying its high capacity to model data distribution. Furthermore, MolHF is the first flow-based model that can be applied to model larger molecules (polymer) with more than 100 heavy atoms. The code and models are available at https://github.com/violet-sto/MolHF.

For agents

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

get_harvested_code_for_paper("2305.08457")
get_code_for_paper("2305.08457")
have("2305.08457")

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

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

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

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

Connect an agent — have() is free.