SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1703.02161 · 2017

Distance Metric Learning using Graph Convolutional Networks: Application to Functional Brain Networks

arXiv · PDF · Open in the Atlas

Code that ran

6 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 5 have no contract verdict; 0 failures of our instrument; 3 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/1703.02161.json · badge: /api/ran/1703.02161.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
sk1712/gcn_metric_learning canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
coarsen Ran
ran on a synthesized input
sk1712/gcn_metric_learning/lib/coarsening.py
code served (permissive licence) · get_code("fc1a4e21a94ce757")
How it ran

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

import numpy as np
import scipy.sparse

# Create a small symmetric sparse adjacency matrix
# 5 nodes with some edges
np.random.seed(0)
size = 5
# Create a random sparse matrix and symmetrize it
data = np.array([1.0, 2.0, 1.5, 2.5, 1.0, 3.0, 2.0])
row = np.array([0, 0, 1, 1, 2, 3, 4])
col = np.array([1, 2, 0, 3, 1, 4, 3])
W = scipy.sparse.csr_matrix((data, (row, col)), shape=(size, size))
# Symmetrize
W = W + W.T
W = W.tocsr()

ARGS = {
    "A": W,
    "levels": 2,
    "self_connections": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
distance_scipy_spatial Ran
ran on a synthesized input
sk1712/gcn_metric_learning/lib/graph.py
code served (permissive licence) · get_code("01d4be9c45f5d3f2")
How it ran

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

import scipy.spatial.distance
import numpy as np

# Create a small 2D array for z parameter
# Using shape (5, 3) - 5 points in 3D space
np.random.seed(0)
z = np.random.randn(5, 3).astype(np.float64)

# k parameter: number of nearest neighbors (excluding self)
k = 4

# metric parameter: distance metric
metric = 'euclidean'

ARGS = {
    'z': z,
    'k': k,
    'metric': metric
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
distance_sklearn_metrics Ran
ran on a synthesized input
sk1712/gcn_metric_learning/lib/graph.py
code served (permissive licence) · get_code("ebb82619c724ec7f")
How it ran

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

import numpy as np
import sklearn.metrics.pairwise

torch_not_needed = True

# The function takes:
# - z: a 2D array of shape (n_samples, n_features)
# - k: number of neighbors (default 4)
# - metric: distance metric string (default 'euclidean')

# Create a small sample data matrix
np.random.seed(0)
z = np.random.randn(2, 4).astype(np.float64)  # 2 samples, 4 features

ARGS = {
    'z': z,
    'k': 4,
    'metric': 'euclidean'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, dtype family float — a tuple output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
grid Ran
ran, honoured the contract we drafted
sk1712/gcn_metric_learning/lib/graph.py
code served (permissive licence) · get_code("00b211ed8d329331")
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 2, dtype family float, shape (9, 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 numpy as np

# The grid function takes:
# - m: an integer for the grid size
# - dtype: a numpy dtype (defaults to np.float32)

ARGS = {
    "m": 3,
    "dtype": np.float32
}
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 2, dtype family float, shape (9, 2) — shape (9, 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
metis Ran
ran on a synthesized input
sk1712/gcn_metric_learning/lib/coarsening.py
code served (permissive licence) · get_code("5719e891497f15c2")
How it ran

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

import numpy as np
import scipy.sparse

# Create a small symmetric sparse weight matrix
# We'll create a 4x4 graph with some connections
N = 4
# Create a simple graph: 0-1, 1-2, 2-3, 0-3 (forming a cycle)
row = np.array([0, 1, 2, 3, 1, 2, 3, 0])
col = np.array([1, 0, 1, 2, 2, 3, 0, 3])
data = np.array([1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0])

W = scipy.sparse.csr_matrix((data, (row, col)), shape=(N, N))

# Ensure symmetry
W = W + W.T
W.eliminate_zeros()

# Test parameters
levels = 2

ARGS = {
    "W": W,
    "levels": levels,
    "rid": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy — 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
metis_one_level Ran
ran on a synthesized input
sk1712/gcn_metric_learning/lib/coarsening.py
code served (permissive licence) · get_code("3db137c20dc3bdc1")
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 1, dtype family int, shape (3,) 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

# Analyze the function to understand what arguments are needed:
# - rr: array of row indices, used with .shape[0] and indexing
# - cc: array of column indices, used for indexing
# - vv: array of values, used for indexing and arithmetic
# - rid: array mapping to row IDs, used for indexing
# - weights: array of weights, used for indexing and division

# Create a small sparse matrix in CSR format
# We'll create a 3x3 matrix with some non-zeros

# rr (row pointers): marks where each row starts in cc/vv arrays
# For a 3x3 matrix with entries at (0,0), (0,2), (1,1), (2,0), (2,1)
# nnz = 5, so rr should have 5 elements indicating which row each entry belongs to
rr = np.array([0, 0, 1, 2, 2], dtype=np.int32)

# cc (column indices): which columns the non-zero entries are in
cc = np.array([0, 2, 1, 0, 1], dtype=np.int32)

# vv (values): the actual values
vv = np.array([1.0, 2.0, 3.0, 4.0, 5.0], dtype=np.float64)

# rid (row ids): permutation or mapping of rows for clustering
# Should have length equal to number of rows (3 in this case)
rid = np.array([0, 1, 2], dtype=np.int32)

# weights: weights for each node/row
# Should have length equal to number of rows (3 in this case)
weights = np.array([1.0, 1.5, 2.0], dtype=np.float64)

ARGS = {
    "rr": rr,
    "cc": cc,
    "vv": vv,
    "rid": rid,
    "weights": weights
}
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 1, dtype family int, shape (3,) — shape (3,) 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
fetch_filenames Not yet run
unverified (harvested, no recorded run)
sk1712/gcn_metric_learning/lib/abide_utils.py
code served (permissive licence) · get_code("65882886f5ef7c64")
How it ran

no invocation recorded.

fetch_subject_files Not yet run
unverified (harvested, no recorded run)
sk1712/gcn_metric_learning/lib/abide_utils.py
code served (permissive licence) · get_code("fca1aa72e9b1972b")
How it ran

no invocation recorded.

get_ids Not yet run
unverified (harvested, no recorded run)
sk1712/gcn_metric_learning/lib/abide_utils.py
code served (permissive licence) · get_code("63ac2cdc4528de0c")
How it ran

no invocation recorded.

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, 6 are also present in other papers whose code we hold (6 with at least one paper dated earlier, 0 the same month, 3 later) and 3 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
grid 4 other papers
2 dated earlier, 2 later
1506.05163 (2015-06)
Deep Convolutional Networks on Graph-Structured Data
1612.07659 (2016-12)
Structured Sequence Modeling with Graph Convolutional Recurrent Networks
2003.05653 (2020-03)
Towards High-Fidelity 3D Face Reconstruction from In-the-Wild Images Using Graph Convolutional Networks
and 1 more not named here
distance_scipy_spatial 3 other papers
2 dated earlier, 1 later
1506.05163 (2015-06)
Deep Convolutional Networks on Graph-Structured Data
1612.07659 (2016-12)
Structured Sequence Modeling with Graph Convolutional Recurrent Networks
2003.05653 (2020-03)
Towards High-Fidelity 3D Face Reconstruction from In-the-Wild Images Using Graph Convolutional Networks
distance_sklearn_metrics 3 other papers
2 dated earlier, 1 later
1506.05163 (2015-06)
Deep Convolutional Networks on Graph-Structured Data
1612.07659 (2016-12)
Structured Sequence Modeling with Graph Convolutional Recurrent Networks
2003.05653 (2020-03)
Towards High-Fidelity 3D Face Reconstruction from In-the-Wild Images Using Graph Convolutional Networks
coarsen 1 other paper
1 dated earlier
1506.05163 (2015-06)
Deep Convolutional Networks on Graph-Structured Data
metis 1 other paper
1 dated earlier
1506.05163 (2015-06)
Deep Convolutional Networks on Graph-Structured Data
metis_one_level 1 other paper
1 dated earlier
1506.05163 (2015-06)
Deep Convolutional Networks on Graph-Structured Data

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

Evaluating similarity between graphs is of major importance in several computer vision and pattern recognition problems, where graph representations are often used to model objects or interactions between elements. The choice of a distance or similarity metric is, however, not trivial and can be highly dependent on the application at hand. In this work, we propose a novel metric learning method to evaluate distance between graphs that leverages the power of convolutional neural networks, while exploiting concepts from spectral graph theory to allow these operations on irregular graphs. We demonstrate the potential of our method in the field of connectomics, where neuronal pathways or functional connections between brain regions are commonly modelled as graphs. In this problem, the definition of an appropriate graph similarity function is critical to unveil patterns of disruptions associated with certain brain disorders. Experimental results on the ABIDE dataset show that our method can learn a graph similarity metric tailored for a clinical application, improving the performance of a simple k-nn classifier by 11.9% compared to a traditional distance metric.

For agents

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

get_harvested_code_for_paper("1703.02161")
get_code_for_paper("1703.02161")
have("1703.02161")

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

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

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

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

Connect an agent — have() is free.