SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2507.03474 · 2025

Molecular Machine Learning Using Euler Characteristic Transforms

arXiv · PDF · Open in the Atlas

Code that ran

7 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 0 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/2507.03474.json · badge: /api/ran/2507.03474.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
victosdur/ectformoleculelearningtask canonical (classifier label)
classifier basis: census
7 ran · 0 no recorded run
FunctionStatusWhere it lives
concat_results_in_single_csv Ran
ran; our contract draft was wrong, not the code
victosdur/ectformoleculelearningtask/comparison.py
code served (permissive licence) · get_code("91129c89a18d1629")
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 DataFrame. 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 pandas as pd
import torch
import numpy as np

torch.manual_seed(0)

# Create sample DataFrames to concatenate
df1 = pd.DataFrame({
    'col1': [1, 2],
    'col2': ['a', 'b'],
    'col3': [1.1, 2.2]
})

df2 = pd.DataFrame({
    'col1': [3, 4],
    'col2': ['c', 'd'],
    'col3': [3.3, 4.4]
})

df3 = pd.DataFrame({
    'col1': [5],
    'col2': ['e'],
    'col3': [5.5]
})

results_dfs = [df1, df2, df3]

ARGS = {
    'results_dfs': results_dfs
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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_median_order Ran
ran; our contract draft was wrong, not the code
victosdur/ectformoleculelearningtask/comparison.py
code served (permissive licence) · get_code("9c53e6146926b2b9")
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 Index. 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 pandas as pd
import numpy as np

# Create a sample DataFrame with the structure expected by get_median_order
data = {
    'metric': ['R2', 'R2', 'R2', 'MSE', 'MSE', 'MSE'],
    'Method': ['MethodA', 'MethodB', 'MethodC', 'MethodA', 'MethodB', 'MethodC'],
    'value': [0.85, 0.92, 0.78, 0.15, 0.08, 0.22]
}

df = pd.DataFrame(data)

# Define the metric parameter
metric = 'R2'

ARGS = {
    'df': df,
    'metric': metric
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Index — a Index output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Index 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
read_results_file Ran
ran; our contract draft was wrong, not the code
victosdur/ectformoleculelearningtask/comparison.py
code served (permissive licence) · get_code("e3e534262c5b7ada")
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 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 pandas as pd
import os
import tempfile
import shutil

# Create a temporary directory with test CSV files
temp_dir = tempfile.mkdtemp()

# Create sample CSV files for different methods
fingerprint_data = pd.DataFrame({
    'metric1': [0.85, 0.90],
    'metric2': [0.75, 0.80]
})
fingerprint_data.to_csv(os.path.join(temp_dir, 'ECFP4.csv'), index=False)

descriptor_data = pd.DataFrame({
    'metric1': [0.82, 0.88],
    'metric2': [0.72, 0.78]
})
descriptor_data.to_csv(os.path.join(temp_dir, 'TOPO.csv'), index=False)

gnn_data = pd.DataFrame({
    'metric1': [0.91, 0.93],
    'metric2': [0.81, 0.85]
})
gnn_data.to_csv(os.path.join(temp_dir, 'GCN.csv'), index=False)

ect_data = pd.DataFrame({
    'metric1': [0.87, 0.92],
    'metric2': [0.77, 0.82]
})
ect_data.to_csv(os.path.join(temp_dir, 'ECT.csv'), index=False)

ARGS = {
    'dataset_path': temp_dir
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 3, dtype family float — 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
remove_duplicates_and_nans Ran
ran; our contract draft was wrong, not the code
victosdur/ectformoleculelearningtask/Experiments.py
code served (permissive licence) · get_code("79f85bd03d951197")
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 DataFrame. 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 pandas as pd

# Create a small dataset with some duplicates and NaN values
data = {
    'smiles': ['CC(C)Cc1ccc(cc1)C(C)C(O)=O', 'CC(C)Cc1ccc(cc1)C(C)C(O)=O', 'c1ccccc1', None, 'c1ccccc1C'],
    'molecular_weight': [206.28, 206.28, 78.11, 100.0, 93.13],
    'logp': [3.97, 3.97, 2.13, None, 2.73]
}
dataset = pd.DataFrame(data)

ARGS = {
    'dataset': dataset
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
pandas — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type DataFrame — a DataFrame output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a DataFrame output the recorded ndim 2 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
test Ran
ran, honoured the contract we drafted
victosdur/ectformoleculelearningtask/utils.py
code served (permissive licence) · get_code("cf2930b6b0ce6c1c")
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. 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 torch.nn as nn
import torch.nn.functional as F

torch.manual_seed(0)

# Define a minimal model that works with the test function
class MinimalModel(nn.Module):
    def __init__(self, input_dim, output_dim):
        super().__init__()
        self.linear = nn.Linear(input_dim, output_dim)
    
    def forward(self, *args, **kwargs):
        # Handle different input configurations
        if len(args) == 1:
            # For 'ect' case
            x = args[0]
        elif len(args) == 3:
            # For 'GAT' or 'GCN' case: (x, edge_index, batch)
            x = args[0]
        elif len(args) == 4:
            # For 'AttentiveFP' case: (x, edge_index, edge_attr, batch)
            x = args[0]
        else:
            x = args[0]
        
        # Flatten if needed and process
        if x.dim() > 2:
            x = x.view(x.size(0), -1)
        return self.linear(x)

# Create minimal data objects for test_loader
class MinimalData:
    def __init__(self, input_feature_type):
        self.input_feature_type = input_feature_type
        
        if input_feature_type == 'ect':
            self.ect = torch.randn(2, 4)
        elif input_feature_type in ['GAT', 'GCN']:
            self.x = torch.randn(2, 4)
            self.edge_index = torch.tensor([[0, 1], [1, 0]], dtype=torch.long)
            self.batch = torch.tensor([0, 1], dtype=torch.long)
        elif input_feature_type == 'AttentiveFP':
            self.x = torch.randn(2, 4)
            self.edge_index = torch.tensor([[0, 1], [1, 0]], dtype=torch.long)
            self.edge_attr = torch.randn(2, 3)
            self.batch = torch.tensor([0, 1], dtype=torch.long)
        
        self.y = torch.randn(2, 1)
    
    def to(self, device):
        # Move all tensors to device
        for key in self.__dict__:
            if isinstance(getattr(self, key), torch.Tensor):
                setattr(self, key, getattr(self, key).to(device))
        return self

# Test with 'ect' input feature
model_ect = MinimalModel(4, 1)
test_loader_ect = [MinimalData('ect') for _ in range(2)]

# Create ARGS dict for the 'ect' case
ARGS = {
    'test_loader': test_loader_ect,
    'model': model_ect,
    'InputFeature': 'ect'
}
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 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
train Ran
ran, honoured the contract we drafted
victosdur/ectformoleculelearningtask/utils.py
code served (permissive licence) · get_code("9c2f1520e0b48e84")
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. 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 torch.nn as nn
import math

torch.manual_seed(0)

# Create a minimal model for 'ect' input
class ECTModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, ect):
        return self.linear(ect)

# Create a minimal model for 'GAT'/'GCN' input
class GATModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, x, edge_index, batch):
        # Simple pooling: just use mean of node features
        return self.linear(x.mean(dim=0, keepdim=True))

# Create a minimal model for 'AttentiveFP' input
class AttentiveFPModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 1)
    
    def forward(self, x, edge_index, edge_attr, batch):
        return self.linear(x.mean(dim=0, keepdim=True))

# Create minimal data objects
class Data:
    def __init__(self, input_feature_type='ect'):
        self.num_graphs = 2
        if input_feature_type == 'ect':
            self.ect = torch.randn(2, 4)
        elif input_feature_type in ['GAT', 'GCN']:
            self.x = torch.randn(4, 4)  # 4 nodes, 4 features
            self.edge_index = torch.tensor([[0, 1, 2, 3], [1, 2, 3, 0]], dtype=torch.long)
            self.batch = torch.tensor([0, 0, 1, 1])
        elif input_feature_type == 'AttentiveFP':
            self.x = torch.randn(4, 4)
            self.edge_index = torch.tensor([[0, 1, 2, 3], [1, 2, 3, 0]], dtype=torch.long)
            self.edge_attr = torch.randn(4, 3)
            self.batch = torch.tensor([0, 0, 1, 1])
        self.y = torch.randn(2, 1)
    
    def to(self, device):
        # Return self for chaining
        return self

# Create train loaders for different input features
def create_train_loader(input_feature):
    return [Data(input_feature_type=input_feature) for _ in range(2)]

# Create models and optimizers
model_ect = ECTModel()
optimizer_ect = torch.optim.Adam(model_ect.parameters(), lr=0.001)
train_loader_ect = create_train_loader('ect')

ARGS = {
    'train_loader': train_loader_ect,
    'model': model_ect,
    'optimizer': optimizer_ect,
    'InputFeature': 'ect'
}
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 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
train_model Ran
ran; our contract draft was wrong, not the code
victosdur/ectformoleculelearningtask/utils.py
code served (permissive licence) · get_code("0db5bb59681c1f54")
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
from torch_geometric.data import Data, DataLoader

torch.manual_seed(0)
np.random.seed(0)

# Define a minimal model that supports the different InputFeature modes
class DummyModel(nn.Module):
    def __init__(self, input_dim=4, output_dim=2):
        super().__init__()
        self.input_dim = input_dim
        self.output_dim = output_dim
        self.fc = nn.Linear(input_dim, output_dim)
    
    def forward(self, *args, **kwargs):
        # Handle different input modes
        if len(args) == 1:
            # ect mode: single tensor input
            x = args[0]
        elif len(args) == 3:
            # GAT/GCN mode: (x, edge_index, batch)
            x = args[0]
        elif len(args) == 4:
            # AttentiveFP mode: (x, edge_index, edge_attr, batch)
            x = args[0]
        else:
            x = args[0]
        
        # Simple processing
        if x.dim() == 1:
            x = x.unsqueeze(0)
        if x.size(-1) != self.input_dim:
            x = x[:, :self.input_dim]
        
        out = self.fc(x)
        return out

# Create dummy data samples compatible with PyG Data
# Batch size 2, with node features of dim 4
data_list = []
for _ in range(2):
    # ECT feature (single vector per graph)
    ect = torch.randn(4)
    
    # Graph features
    x = torch.randn(3, 4)  # 3 nodes, 4 features
    edge_index = torch.tensor([[0, 1, 1, 2], [1, 0, 2, 1]], dtype=torch.long)
    edge_attr = torch.randn(4, 2)  # 4 edges, 2 attributes
    batch = torch.tensor([0, 0, 0], dtype=torch.long)  # all nodes in same graph
    y = torch.randn(1, 2)  # 1 graph, 2 output dims
    
    data = Data(x=x, edge_index=edge_index, edge_attr=edge_attr, batch=batch, y=y, ect=ect)
    data_list.append(data)

# Create a simple data loader
train_loader = data_list

# Initialize model and optimizer
device = torch.device('cpu')
model = DummyModel(input_dim=4, output_dim=2)
optimizer = torch.optim.Adam(model.parameters(), lr=0.01)

# Choose which InputFeature mode to test
InputFeature = 'GAT'  # Can be 'ect', 'GAT', 'GCN', or 'AttentiveFP'

ARGS = {
    'model': model,
    'train_loader': train_loader,
    'optimizer': optimizer,
    'device': device,
    'InputFeature': InputFeature
}
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

Also present in other papers' code

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

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

The shape of a molecule determines its physicochemical and biological properties. However, it is often underrepresented in standard molecular representation learning approaches. Here, we propose using the Euler Characteristic Transform (ECT) as a geometrical-topological descriptor. Computed directly on a molecular graph derived from handcrafted atomic features, the ECT enables the extraction of multiscale structural features, offering a novel way to represent and encode molecular shape in the feature space. We assess the predictive performance of this representation across nine benchmark regression datasets, all centered around predicting the inhibition constant $K_i$. In addition, we compare our proposed ECT-based representation against traditional molecular representations and methods, such as molecular fingerprints/descriptors and graph neural networks (GNNs). Our results show that our ECT-based representation achieves competitive performance, ranking among the best-performing methods on several datasets. More importantly, its combination with traditional representations, particularly with the AVALON fingerprint, significantly \emph{enhances predictive performance}, outperforming other methods on most datasets. These findings highlight the complementary value of multiscale topological information and its potential for being combined with established techniques. Our study suggests that hybrid approaches incorporating explicit shape information can lead to more informative and robust molecular representations, enhancing and opening new avenues in molecular machine learning tasks. To support reproducibility and foster open biomedical research, we provide open access to all experiments and code used in this work.

For agents

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

get_harvested_code_for_paper("2507.03474")
get_code_for_paper("2507.03474")
have("2507.03474")

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

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

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

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

Connect an agent — have() is free.