SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1911.03117 · 2019

Ground Metric Learning on Graphs

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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; 0 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-23; 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/1911.03117.json · badge: /api/ran/1911.03117.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
matthieuheitz/2020-JMIV-ground-metric-learning-graphs canonical (classifier label)
classifier basis: census
5 ran · 0 no recorded run
FunctionStatusWhere it lives
bilateral_approximation Ran
ran on a synthesized input
matthieuheitz/2020-JMIV-ground-metric-learning-graphs/bilateral_approximation.py
code served (permissive licence) · get_code("08c979376c45f53e")
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 (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 numpy
import math

# Create small test data arrays
# data: 2D array of values to be filtered
data = numpy.array([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=numpy.float64)

# edge: 2D array of edge/gradient values
edge = numpy.array([
    [0.1, 0.2, 0.3, 0.4],
    [0.5, 0.6, 0.7, 0.8]
], dtype=numpy.float64)

# Spatial and range sigma parameters
sigmaS = 4.0  # spatial sigma
sigmaR = 0.2  # range sigma

# Optional sampling parameters (can be None or explicit values)
samplingS = 2.0
samplingR = 0.1

# Optional edge min/max (can be None to auto-compute)
edgeMin = 0.0
edgeMax = 1.0

ARGS = {
    'data': data,
    'edge': edge,
    'sigmaS': sigmaS,
    'sigmaR': sigmaR,
    'samplingS': samplingS,
    'samplingR': samplingR,
    'edgeMin': edgeMin,
    'edgeMax': edgeMax
}
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 ndarray, 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
bilateral_approximation_color Ran
ran on a synthesized input
matthieuheitz/2020-JMIV-ground-metric-learning-graphs/bilateral_approximation.py
code served (permissive licence) · get_code("70dff2d4dfb3dd91")
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 3, dtype family float, shape (4, 5, 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
import math

# Create small test data with shape [height, width, 3]
height, width = 4, 5
data = numpy.random.rand(height, width, 3).astype(numpy.float32)
edge = numpy.random.rand(height, width, 3).astype(numpy.float32) * 10

# Define parameters
sigmaS = 2.0  # spatial sigma
sigmaR = 1.0  # range sigma
samplingS = 1.0  # spatial sampling
samplingR = 0.5  # range sampling
edgeMin = numpy.amin(edge)
edgeMax = numpy.amax(edge)

ARGS = {
    "data": data,
    "edge": edge,
    "sigmaS": sigmaS,
    "sigmaR": sigmaR,
    "samplingS": samplingS,
    "samplingR": samplingR,
    "edgeMin": edgeMin,
    "edgeMax": edgeMax,
}
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 ndarray, ndim 3, dtype family float, shape (4, 5, 3) — shape (4, 5, 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
color_transfer_ot_barycentric_proj Ran
ran on a synthesized input
matthieuheitz/2020-JMIV-ground-metric-learning-graphs/ml_color_transfer.py
code served (permissive licence) · get_code("8e46b1db6ed6aaed")
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 3, dtype family float, shape (4, 3, 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
from scipy import special

# Create a simple test image (height=4, width=3, channels=3)
im = np.random.rand(4, 3, 3).astype(np.float32)

# Create histogram bins - function expects size n^3
# Using n=2, so size should be 8
n = 2
hist_size = n ** 3
im_hist = np.random.rand(hist_size).astype(np.float32)
im_hist = im_hist / np.sum(im_hist)  # normalize to be valid histogram

target_hist = np.random.rand(hist_size).astype(np.float32)
target_hist = target_hist / np.sum(target_hist)  # normalize to be valid histogram

# Create a xi function that operates on arrays
# Based on usage in the code, xi takes array and returns array of same shape
def xi_func(x):
    """Simple positive transformation for color transfer"""
    if isinstance(x, np.ndarray):
        return np.exp(x) + 1e-8
    return np.exp(x) + 1e-8

# Number of Sinkhorn iterations
L = 5

ARGS = {
    'im': im,
    'im_hist': im_hist,
    'target_hist': target_hist,
    'xi': xi_func,
    'L': L,
    'color_interp': 'bin_value',
    'sink_conv_filebase': '',
    'apply_bilateral_filter': False,
    'sigmaRange': 0,
    'sigmaSpatial': 0,
    'colorspace': 'RGB'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, bilateral_approximation, cv2, matplotlib, numpy, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family float, shape (4, 3, 3) — shape (4, 3, 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
compute_sinkhorn_barycenter Ran
ran on a synthesized input
matthieuheitz/2020-JMIV-ground-metric-learning-graphs/OT_Sinkhorn.py
code served (permissive licence) · get_code("c580e1ce6330f316")
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.optimize

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

# Create small example data
# P: Input histograms flattened, shape (K, N) where K is number of histograms, N is dimension
K = 3  # number of histograms
N = 4  # dimension of each histogram

# Create valid probability distributions (non-negative, sum to 1)
P = np.array([
    [0.1, 0.2, 0.3, 0.4],
    [0.25, 0.25, 0.25, 0.25],
    [0.4, 0.3, 0.2, 0.1]
], dtype=np.float64)

# Weights for the histograms, should sum to 1
w = np.array([0.3, 0.5, 0.2], dtype=np.float64)

# Kernel operator: exp(-cost/gamma)
# This takes an array and returns exp of it (or similar transformation)
# Based on usage in the function, it should accept an array and return an array
def xi(x):
    # Standard kernel: exponential
    gamma = 1.0
    return np.exp(-x / gamma)

# Number of Sinkhorn iterations
L = 10

# Whether to use entropic sharpening
entropic_sharpening = False

ARGS = {
    'P': P,
    'w': w,
    'xi': xi,
    'L': L,
    'entropic_sharpening': entropic_sharpening
}
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
pdf_entropy Ran
ran on a synthesized input
matthieuheitz/2020-JMIV-ground-metric-learning-graphs/OT_Sinkhorn.py
code served (permissive licence) · get_code("ebde3b641f1cea99")
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

# pdf_entropy expects a probability distribution array
# The function computes Shannon entropy: -sum(p * log(p))
# We need a valid probability distribution (non-negative values summing to 1)

# Create a simple probability distribution
p = np.array([0.2, 0.3, 0.3, 0.2])

ARGS = {
    "p": p
}
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

Also present in other papers' code

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

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Optimal transport (OT) distances between probability distributions are parameterized by the ground metric they use between observations. Their relevance for real-life applications strongly hinges on whether that ground metric parameter is suitably chosen. Selecting it adaptively and algorithmically from prior knowledge, the so-called ground metric learning GML) problem, has therefore appeared in various settings. We consider it in this paper when the learned metric is constrained to be a geodesic distance on a graph that supports the measures of interest. This imposes a rich structure for candidate metrics, but also enables far more efficient learning procedures when compared to a direct optimization over the space of all metric matrices. We use this setting to tackle an inverse problem stemming from the observation of a density evolving with time: we seek a graph ground metric such that the OT interpolation between the starting and ending densities that result from that ground metric agrees with the observed evolution. This OT dynamic framework is relevant to model natural phenomena exhibiting displacements of mass, such as for instance the evolution of the color palette induced by the modification of lighting and materials.

For agents

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

get_harvested_code_for_paper("1911.03117")
get_code_for_paper("1911.03117")
have("1911.03117")

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

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

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

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

Connect an agent — have() is free.