SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1812.05055 · 2018

Graph Networks as a Universal Machine Learning Framework for Molecules and Crystals

arXiv · PDF · Open in the Atlas

Code that ran

9 of 9 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; 1 honoured the contract we drafted, 0 violated it and 7 have no contract verdict; 1 failure 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/1812.05055.json · badge: /api/ran/1812.05055.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
materialsvirtuallab/megnet canonical (classifier label)
classifier basis: census
9 ran · 0 no recorded run
FunctionStatusWhere it lives
accuracy Ran
ran on a synthesized input
materialsvirtuallab/megnet/megnet/utils/metrics.py
code served (permissive licence) · get_code("793d95f974b73be9")
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 float64, ndim 0, 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 numpy as np

# Create small numpy arrays for testing
# y_true: binary labels (0s and 1s)
y_true = np.array([0, 1, 1, 0, 1, 1])

# y_pred: sigmoid predictions (values between 0 and 1)
y_pred = np.array([0.1, 0.9, 0.8, 0.2, 0.7, 0.6])

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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
expand_1st Ran
ran on a synthesized input
materialsvirtuallab/megnet/megnet/utils/general.py
code served (permissive licence) · get_code("4fc6585b7b5fce76")
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 ndarray, ndim 4, dtype family float, shape (1, 3, 4, 5) 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 numpy as np

# Create a small numpy array with distinct dimensions for testing
x = np.random.randn(3, 4, 5)

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family float, shape (1, 3, 4, 5) — shape (1, 3, 4, 5) 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
fast_label_binarize Ran
ran, honoured the contract we drafted
materialsvirtuallab/megnet/megnet/utils/general.py
code served (permissive licence) · get_code("44e79b9c39926ed4")
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 torch
import numpy as np

# Construct arguments for fast_label_binarize
# The function takes a value to encode and a list of possible class labels
# It returns a binarized representation as a list of integers

# Example 1: Binary classification case (len(labels) == 2)
value_binary = "cat"
labels_binary = ["cat", "dog"]

# Example 2: Multi-class case
value_multiclass = 2
labels_multiclass = [0, 1, 2, 3]

# Example 3: Value not in labels
value_not_in = 5
labels_not_in = [1, 2, 3, 4]

# Use the binary case as primary example
ARGS = {
    "value": "cat",
    "labels": ["cat", "dog"]
}
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 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
mae Ran
ran on a synthesized input
materialsvirtuallab/megnet/megnet/utils/metrics.py
code served (permissive licence) · get_code("7cd70353cde137d0")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned float, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create small numpy arrays for ground truth and predictions
y_true = np.array([1.0, 2.0, 3.0, 4.0])
y_pred = np.array([1.1, 2.2, 2.9, 3.8])

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
mean_squared_error_with_scale Ran
ran on a synthesized input
materialsvirtuallab/megnet/megnet/losses.py
code served (permissive licence) · get_code("310cd70b817b692c")
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 SymbolicTensor. 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 tensorflow as tf
import numpy as np

# Create small tensors for y_true and y_pred
# Using batch size 2, dimension 4
y_true = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)
y_pred = tf.constant([[1.1, 2.1, 3.1, 4.1], [5.1, 6.1, 7.1, 8.1]], dtype=tf.float32)

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "scale": 10000
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type SymbolicTensor — a SymbolicTensor 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
repeat_with_index Ran
ran; our contract draft was wrong, not the code
materialsvirtuallab/megnet/megnet/utils/layer.py
code served (permissive licence) · get_code("2e536987121d9a8e")
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 EagerTensor, 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 tensorflow as tf

# Create small test tensors
# x should be a 3D tensor (N*M*K)
# N=2 (batch), M=3 (middle dimension to repeat), K=4 (feature dimension)
x = tf.constant([
    [[1.0, 2.0, 3.0, 4.0],
     [5.0, 6.0, 7.0, 8.0],
     [9.0, 10.0, 11.0, 12.0]],
    [[13.0, 14.0, 15.0, 16.0],
     [17.0, 18.0, 19.0, 20.0],
     [21.0, 22.0, 23.0, 24.0]]
], dtype=tf.float32)

# index tensor with shape (G,) where G=6
# This will map 6 elements to 3 unique indices (0, 1, 2)
# unique_with_counts will find 3 unique values with counts [3, 1, 2]
index = tf.constant([0, 0, 0, 1, 2, 2], dtype=tf.int32)

# axis for repetition
axis = 1

ARGS = {
    "x": x,
    "index": index,
    "axis": axis
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 3, dtype family float — no output shape is stated: observe_signature.py recorded SymbolicTensor ndim 0, which disagrees with the fixture run
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
softplus2 Ran
ran on a synthesized input
materialsvirtuallab/megnet/megnet/activations.py
code served (permissive licence) · get_code("b72502cbc4652705")
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 EagerTensor, 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 tensorflow as tf
import tensorflow.keras.backend as kb
import numpy as np

# Create a small test tensor
# The function uses kb.relu, kb.log, kb.exp, kb.abs which all work on tensors
x_input = tf.constant([[-2.0, -1.0, 0.0, 1.0],
                       [2.0, 0.5, -0.5, 3.0]], dtype=tf.float32)

ARGS = {
    "x": x_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, ndim 2, dtype family float — no output shape is stated: observe_signature.py could not observe it (import:TypeError)
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
swish Ran
ran on a synthesized input
materialsvirtuallab/megnet/megnet/activations.py
code served (permissive licence) · get_code("a66746c53f581f24")
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 EagerTensor, 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 tensorflow as tf
import tensorflow.keras.backend as kb
import numpy as np

# Create a small input tensor for the swish function
# The function expects a tensor input and applies x * sigmoid(x)
input_tensor = tf.constant([[1.0, 2.0, 3.0, 4.0],
                            [0.5, 1.5, 2.5, 3.5]], dtype=tf.float32)

ARGS = {
    "x": input_tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, tensorflow — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type EagerTensor, 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
to_list Ran
ran on a synthesized input
materialsvirtuallab/megnet/megnet/utils/general.py
code served (permissive licence) · get_code("5b8cd0953f2acd70")
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 torch
import numpy as np
from collections.abc import Iterable

torch.manual_seed(0)

# Test case 1: Iterable (tuple)
x_tuple = (1, 2, 3, 4)

# Test case 2: numpy array
x_numpy = np.array([5, 6, 7, 8])

# Test case 3: string (also Iterable)
x_string = "hello"

# Test case 4: list (already a list)
x_list = [10, 20, 30]

# Test case 5: scalar (not Iterable, not ndarray)
x_scalar = 42

# Test case 6: range object (Iterable)
x_range = range(5)

# Test case 7: 2D numpy array
x_numpy_2d = np.array([[1, 2], [3, 4]])

# Test case 8: torch tensor (Iterable)
x_tensor = torch.tensor([9, 10, 11])

# We need to pick one value for the parameter 'x'
# Using a tuple as the primary test case
ARGS = {
    "x": x_tuple
}
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 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

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 8 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 3 later) and 1 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
mean_squared_error_with_scale 2 other papers
1 dated earlier, 1 later
1806.01261 (2018-06)
Relational inductive biases, deep learning, and graph networks
2206.04968 (2022-06)
What Information is Necessary and Sufficient to Predict Materials Properties using Machine Learning?
softplus2 2 other papers
1 dated earlier, 1 later
1806.01261 (2018-06)
Relational inductive biases, deep learning, and graph networks
2206.04968 (2022-06)
What Information is Necessary and Sufficient to Predict Materials Properties using Machine Learning?
accuracy 1 other paper
1 dated earlier
1806.01261 (2018-06)
Relational inductive biases, deep learning, and graph networks
expand_1st 1 other paper
1 dated earlier
1806.01261 (2018-06)
Relational inductive biases, deep learning, and graph networks
fast_label_binarize 1 other paper
1 dated earlier
1806.01261 (2018-06)
Relational inductive biases, deep learning, and graph networks
mae 1 other paper
1 dated earlier
1806.01261 (2018-06)
Relational inductive biases, deep learning, and graph networks
repeat_with_index 1 other paper
1 dated earlier
1806.01261 (2018-06)
Relational inductive biases, deep learning, and graph networks
swish 1 other paper
1 later
2206.04968 (2022-06)
What Information is Necessary and Sufficient to Predict Materials Properties using Machine Learning?

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

Graph networks are a new machine learning (ML) paradigm that supports both relational reasoning and combinatorial generalization. Here, we develop universal MatErials Graph Network (MEGNet) models for accurate property prediction in both molecules and crystals. We demonstrate that the MEGNet models outperform prior ML models such as the SchNet in 11 out of 13 properties of the QM9 molecule data set. Similarly, we show that MEGNet models trained on $\sim 60,000$ crystals in the Materials Project substantially outperform prior ML models in the prediction of the formation energies, band gaps and elastic moduli of crystals, achieving better than DFT accuracy over a much larger data set. We present two new strategies to address data limitations common in materials science and chemistry. First, we demonstrate a physically-intuitive approach to unify four separate molecular MEGNet models for the internal energy at 0 K and room temperature, enthalpy and Gibbs free energy into a single free energy MEGNet model by incorporating the temperature, pressure and entropy as global state inputs. Second, we show that the learned element embeddings in MEGNet models encode periodic chemical trends and can be transfer-learned from a property model trained on a larger data set (formation energies) to improve property models with smaller amounts of data (band gaps and elastic moduli).

For agents

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

get_harvested_code_for_paper("1812.05055")
get_code_for_paper("1812.05055")
have("1812.05055")

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

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

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

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

Connect an agent — have() is free.