SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2303.06595 · ICLR · 2023

A Convergent Single-Loop Algorithm for Relaxation of Gromov-Wasserstein in Graph Data

Jose Blanchet, Man-Cho Anthony, So, Jiajin Li, Huikang Liu, Lemin Kong

arXiv · PDF · Open in the Atlas

Code that ran

8 of 20 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, 2 violated it and 0 have no contract verdict; 5 failures of our instrument; 12 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/2303.06595.json · badge: /api/ran/2303.06595.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
squareroot3/gromov-wasserstein-for-graph canonical (classifier label)
classifier basis: classifier_2025
3 ran · 1 no recorded run
pythonot/pot canonical (classifier label)
classifier basis: classifier_2025
2 ran · 3 no recorded run
PythonOT/POT marked official in Papers with Code
Papers with Code archive
3 ran · 8 no recorded run
FunctionStatusWhere it lives
BAPG_numpy Ran
ran; our contract draft was wrong, not the code
squareroot3/gromov-wasserstein-for-graph/BAPG.py
pointer only (licence: NONE) · get_code("3732009447ef8794")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, squareroot3/gromov-wasserstein-for-graph when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

BAPG_torch Ran
ran; our contract draft was wrong, not the code
squareroot3/gromov-wasserstein-for-graph/BAPG.py
pointer only (licence: NONE) · get_code("fea4fdf57ebe3c67")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, squareroot3/gromov-wasserstein-for-graph when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

BAPG_torch Ran
ran; our contract draft was wrong, not the code
squareroot3/gromov-wasserstein-for-graph/BAPG.py
pointer only (licence: NONE) · get_code("2526e4236ba9aceb")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, squareroot3/gromov-wasserstein-for-graph when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

_check_args_backend Ran
ran, violated the contract we drafted
PythonOT/POT/ot/gromov/_bregman.py
code served (permissive licence) · get_code("f86b58c0521371f9")
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 bool, 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 torch
import numpy as np
from scipy import sparse

torch.manual_seed(0)

# Create a minimal backend implementation class
class TorchBackend:
    __type__ = torch.Tensor
    
    def issparse(self, arg):
        return False

class NumpyBackend:
    __type__ = np.ndarray
    
    def issparse(self, arg):
        return isinstance(arg, sparse.spmatrix)

class SparseBackend:
    __type__ = sparse.spmatrix
    
    def issparse(self, arg):
        return isinstance(arg, sparse.spmatrix)

# Create test arguments
torch_tensor_1 = torch.randn(2, 4)
torch_tensor_2 = torch.randn(3, 5)
numpy_array_1 = np.random.randn(2, 4)
numpy_array_2 = np.random.randn(3, 5)
sparse_matrix_1 = sparse.csr_matrix((2, 4))
sparse_matrix_2 = sparse.csr_matrix((3, 5))

# Valid case: all torch tensors
valid_torch_args = [torch_tensor_1, torch_tensor_2]

# Valid case: all numpy arrays
valid_numpy_args = [numpy_array_1, numpy_array_2]

# Valid case: all sparse matrices
valid_sparse_args = [sparse_matrix_1, sparse_matrix_2]

ARGS = {
    'backend_impl': TorchBackend,
    'args': valid_torch_args
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, 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
_get_backend_instance Ran
ran; our contract draft was wrong, not the code
PythonOT/POT/ot/gromov/_bregman.py
code served (permissive licence) · get_code("9cc04d687528332f")
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 MinimalBackend. 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 torch
import torch.nn as nn

# Define a minimal backend implementation class
class MinimalBackend:
    def __init__(self):
        self.initialized = True

# Create another distinct backend to test caching behavior
class AnotherBackend:
    def __init__(self):
        self.initialized = True

# Set up the backend_impl parameter - pass the class itself (not an instance)
backend_impl = MinimalBackend

ARGS = {
    "backend_impl": backend_impl
}
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 MinimalBackend — a MinimalBackend output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalBackend 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
im2mat Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
pythonot/pot/examples/gromov/plot_gromov_barycenter.py
code served (permissive licence) · get_code("f75fddd85ad85071")
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) and returned Tensor, ndim 2, dtype family float, shape (12, 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 torch
import numpy as np

torch.manual_seed(0)

# Create a small test image tensor
# Shape: (height, width, channels)
# Using distinct dimensions: 4 (height) x 3 (width) x 2 (channels)
img = torch.randn(4, 3, 2)

ARGS = {
    "img": img
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (12, 2) — shape (12, 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
loss Ran
ran, violated the contract we drafted
pythonot/pot/examples/gromov/plot_gromov.py
code served (permissive licence) · get_code("68f28b95be7dc320")
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) and returned ndarray, ndim 1, dtype family float, shape (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 as np
import torch

torch.manual_seed(0)

# Create small numpy arrays for x and y
x = np.array([1.0, 2.0, 3.0, 4.0])
y = np.array([1.5, 2.5, 2.8, 4.2])

ARGS = {
    "x": x,
    "y": y,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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 float, shape (4,) — shape (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
unif Ran
ran, honoured the contract we drafted
PythonOT/POT/ot/gromov/_bregman.py
code served (permissive licence) · get_code("0dd52901a4e5d301")
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) and returned ndarray, ndim 1, dtype family float, shape (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
import torch

# Define a minimal backend implementation for numpy
class NumpyBackend:
    __name__ = "NumpyBackend"
    __type__ = np.ndarray
    
    def ones(self, shape, type_as=None):
        return np.ones(shape)
    
    def issparse(self, arg):
        return False

# Define a minimal backend implementation for torch
class TorchBackend:
    __name__ = "TorchBackend"
    __type__ = torch.Tensor
    
    def ones(self, shape, type_as=None):
        if type_as is not None:
            return torch.ones(shape, dtype=type_as.dtype, device=type_as.device)
        return torch.ones(shape)
    
    def issparse(self, arg):
        return False

# Initialize the global backend implementations list
_BACKEND_IMPLEMENTATIONS = [NumpyBackend, TorchBackend]

# Test case 1: n with no type_as (should return numpy array)
ARGS_1 = {
    "n": 5,
    "type_as": None
}

# Test case 2: n with numpy type_as
torch.manual_seed(0)
numpy_array = np.array([1.0, 2.0, 3.0, 4.0])
ARGS_2 = {
    "n": 4,
    "type_as": numpy_array
}

# Test case 3: n with torch type_as
torch_tensor = torch.tensor([1.0, 2.0, 3.0, 4.0])
ARGS_3 = {
    "n": 4,
    "type_as": torch_tensor
}

# Use the first test case as the main ARGS
ARGS = ARGS_1
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch — 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 float, shape (5,) — shape (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
BAPG_gromov_wasserstein Not yet run
unverified (harvested, no recorded run)
pythonot/pot/ot/gromov/_bregman.py
code served (permissive licence) · get_code("a5238904a4e4c73a")
How it ran

no invocation recorded.

BAPG_gromov_wasserstein Not yet run
unverified (harvested, no recorded run)
PythonOT/POT/ot/gromov/_bregman.py
code served (permissive licence) · get_code("ca060481e43bc1a6")
How it ran

no invocation recorded.

BPG_torch Not yet run
unverified (harvested, no recorded run)
squareroot3/gromov-wasserstein-for-graph/BAPG.py
pointer only (licence: NONE) · get_code("50c4b814ae1f0351")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, squareroot3/gromov-wasserstein-for-graph when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. No invocation recorded.

_transform_matrix Not yet run
unverified (harvested, no recorded run)
PythonOT/POT/ot/gromov/_bregman.py
code served (permissive licence) · get_code("f9c6459155c463c5")
How it ran

no invocation recorded.

entropic_gromov_wasserstein Not yet run
unverified (harvested, no recorded run)
pythonot/pot/ot/gromov/_bregman.py
code served (permissive licence) · get_code("26a87c54800c3167")
How it ran

no invocation recorded.

entropic_gromov_wasserstein2 Not yet run
unverified (harvested, no recorded run)
pythonot/pot/ot/gromov/_bregman.py
code served (permissive licence) · get_code("5635a0e892b837ad")
How it ran

no invocation recorded.

get_backend Not yet run
unverified (harvested, no recorded run)
PythonOT/POT/ot/gromov/_bregman.py
code served (permissive licence) · get_code("712a6270c1dd0bbf")
How it ran

no invocation recorded.

gwggrad Not yet run
unverified (harvested, no recorded run)
PythonOT/POT/ot/gromov/_bregman.py
code served (permissive licence) · get_code("a88569799fd47931")
How it ran

no invocation recorded.

gwloss Not yet run
unverified (harvested, no recorded run)
PythonOT/POT/ot/gromov/_bregman.py
code served (permissive licence) · get_code("9089edb601ad1644")
How it ran

no invocation recorded.

init_matrix Not yet run
unverified (harvested, no recorded run)
PythonOT/POT/ot/gromov/_bregman.py
code served (permissive licence) · get_code("0d56c45cf5357710")
How it ran

no invocation recorded.

list_to_array Not yet run
unverified (harvested, no recorded run)
PythonOT/POT/ot/gromov/_bregman.py
code served (permissive licence) · get_code("0ff35a81986fcc45")
How it ran

no invocation recorded.

tensor_product Not yet run
unverified (harvested, no recorded run)
PythonOT/POT/ot/gromov/_bregman.py
code served (permissive licence) · get_code("eca75649af539797")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 18 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 1 later) and 17 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
im2mat 1 other paper
1 later
2402.03664 (2024-02)
Partial Gromov-Wasserstein Metric

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

In this work, we present the Bregman Alternating Projected Gradient (BAPG) method, a single-loop algorithm that offers an approximate solution to the Gromov-Wasserstein (GW) distance. We introduce a novel relaxation technique that balances accuracy and computational efficiency, albeit with some compromises in the feasibility of the coupling map. Our analysis is based on the observation that the GW problem satisfies the Luo-Tseng error bound condition, which relates to estimating the distance of a point to the critical point set of the GW problem based on the optimality residual. This observation allows us to provide an approximation bound for the distance between the fixed-point set of BAPG and the critical point set of GW. Moreover, under a mild technical assumption, we can show that BAPG converges to its fixed point set. The effectiveness of BAPG has been validated through comprehensive numerical experiments in graph alignment and partition tasks, where it outperforms existing methods in terms of both solution quality and wall-clock time.

For agents

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

get_harvested_code_for_paper("2303.06595")
get_code_for_paper("2303.06595")
have("2303.06595")

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

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

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

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

Connect an agent — have() is free.