SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2602.18419 · 2026

Benchmarking Graph Neural Networks in Solving Hard Constraint Satisfaction Problems

G Skenderi, L Buffoni, F D'amico, D Machado, R Marino, M Negri, F Ricci-Tersenghi, C Lucibello, M Angelini

arXiv · PDF · Open in the Atlas

Code that ran

3 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (2 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 2 have no contract verdict; 1 failure of our instrument; 3 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/2602.18419.json · badge: /api/ran/2602.18419.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
ArtLabBocconi/RandCSPBench community
Papers with Code archive
3 ran · 3 no recorded run
FunctionStatusWhere it lives
MLP Ran
ran on a synthesized input · constructed an object; no result was computed
ArtLabBocconi/RandCSPBench/algorithms/QuerySAT/model/querysat.py
code served (permissive licence) · get_code("3ff53d97eedf60bc")
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, MLP: 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 tensorflow as tf
from tensorflow.keras.models import Model
from tensorflow.keras.layers import Dense

# Set seed for reproducibility
tf.random.set_seed(0)

# Define the MLP class (from the function signature)
class MLP(Model):
    def __init__(self, layer_count, hidden_nmap, out_nmap, activation=tf.nn.leaky_relu, out_activation=None, **kwargs):
        super().__init__(**kwargs)
        self.dense_layers = [Dense(hidden_nmap, activation=activation) for _ in range(layer_count - 1)]
        self.dense_layers.append(Dense(out_nmap, activation=out_activation, bias_initializer='zeros'))

    @tf.function
    def call(self, inputs, training=None):
        current = inputs
        for layer in self.dense_layers:
            current = layer(current, training=training)
        return current

# Build valid arguments for MLP constructor
ARGS = {
    'layer_count': 3,
    'hidden_nmap': 8,
    'out_nmap': 4,
    'activation': tf.nn.leaky_relu,
    'out_activation': None,
}

# Create an instance to verify it works
model = MLP(**ARGS)

# Create a small test input tensor (batch_size=2, input_dim=4)
test_input = tf.constant([[1.0, 2.0, 3.0, 4.0], [5.0, 6.0, 7.0, 8.0]], dtype=tf.float32)

# Build the model by calling it once
_ = model(test_input, training=False)
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 MLP — 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 MLP 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
QuerySAT Ran
ran on a synthesized input · constructed an object; no result was computed
ArtLabBocconi/RandCSPBench/algorithms/QuerySAT/model/querysat.py
code served (permissive licence) · get_code("dad065c44d8c118c")
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, QuerySAT: 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 tensorflow as tf
from tensorflow.keras.optimizers import Adam

# Create a small sparse adjacency matrix for variables-clauses
# Shape: (num_literals, num_clauses) where num_literals = 2 * num_variables
num_variables = 4
num_clauses = 3
num_literals = 2 * num_variables

# Create sparse tensor indices and values for a simple SAT clause graph
indices = [
    [0, 0], [1, 0], [2, 1], [3, 1], [4, 2], [5, 2]
]
values = [1.0, 1.0, 1.0, 1.0, 1.0, 1.0]
adj_matrix = tf.SparseTensor(
    indices=indices,
    values=values,
    dense_shape=[num_literals, num_clauses]
)

# Create optimizer
optimizer = Adam(learning_rate=0.001)

ARGS = {
    'optimizer': optimizer,
    'feature_maps': 8,
    'msg_layers': 2,
    'vote_layers': 2,
    'train_rounds': 4,
    'test_rounds': 8,
    'query_maps': 4,
}
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 QuerySAT — 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 QuerySAT 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
is_batch_sat Ran
ran; our contract draft was wrong, not the code
ArtLabBocconi/RandCSPBench/algorithms/QuerySAT/model/querysat.py
code served (permissive licence) · get_code("14a9cca23e2238aa")
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 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 tensorflow as tf
import numpy as np

# Set seed for reproducibility
tf.random.set_seed(0)
np.random.seed(0)

# Create predictions tensor
# Shape: (4, 1) - 4 variables, batch size 1
# Values in range suitable for sigmoid
predictions = tf.constant([
    [0.5],
    [-0.5],
    [1.0],
    [-1.0]
], dtype=tf.float32)

# Create a sparse adjacency matrix representing clauses
# Each row is a clause, each column is a literal (variable or its negation)
# For 4 variables, we have 8 literals (var_0, var_1, var_2, var_3, ~var_0, ~var_1, ~var_2, ~var_3)
# Let's create 3 clauses (rows) over 8 literals (columns)
indices = np.array([
    [0, 0],  # clause 0 contains literal 0
    [0, 4],  # clause 0 contains literal 4 (~var_0)
    [1, 1],  # clause 1 contains literal 1
    [1, 5],  # clause 1 contains literal 5 (~var_1)
    [2, 2],  # clause 2 contains literal 2
    [2, 6],  # clause 2 contains literal 6 (~var_2)
], dtype=np.int64)

values = np.array([1, 1, 1, 1, 1, 1], dtype=np.float32)
dense_shape = [3, 8]  # 3 clauses, 8 literals

adj_matrix = tf.SparseTensor(
    indices=indices,
    values=values,
    dense_shape=dense_shape
)

ARGS = {
    "predictions": predictions,
    "adj_matrix": adj_matrix
}
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 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
PairNorm Not yet run
unverified (harvested, no recorded run)
ArtLabBocconi/RandCSPBench/algorithms/QuerySAT/model/querysat.py
code served (permissive licence) · get_code("e9bdf07539cc3123")
How it ran

no invocation recorded.

softplus_loss Not yet run
unverified (harvested, no recorded run)
ArtLabBocconi/RandCSPBench/algorithms/QuerySAT/model/querysat.py
code served (permissive licence) · get_code("66460f4515845c55")
How it ran

no invocation recorded.

softplus_mixed_loss Not yet run
unverified (harvested, no recorded run)
ArtLabBocconi/RandCSPBench/algorithms/QuerySAT/model/querysat.py
code served (permissive licence) · get_code("decc9ad595fe5c80")
How it ran

no invocation recorded.

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 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 4 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
softplus_loss
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2106.07162 (2021-06)
Goal-Aware Neural SAT Solver
softplus_mixed_loss
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2106.07162 (2021-06)
Goal-Aware Neural SAT Solver

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 neural networks (GNNs) are increasingly applied to hard optimization problems, often claiming superiority over classical heuristics. However, such claims risk being unsolid due to a lack of standard benchmarks on truly hard instances. From a statistical physics perspective, we propose new hard benchmarks based on random problems. We provide these benchmarks, along with performance results from both classical heuristics and GNNs. Our fair comparison shows that classical algorithms still outperform GNNs. We discuss the challenges for neural networks in this domain. Future claims of superiority can be made more robust using our benchmarks, available at https://github.com/ArtLabBocconi/RandCSPBench.

For agents

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

get_harvested_code_for_paper("2602.18419")
get_code_for_paper("2602.18419")
have("2602.18419")

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

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

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

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

Connect an agent — have() is free.