SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2307.01770 · NeurIPS · 2023

Fast Optimal Transport through Sliced Wasserstein Generalized Geodesics

Nicolas Courty, Clément Bonet, Laetitia Chapel, Guillaume Mahey, Gilles Gasso

arXiv · PDF · Open in the Atlas

Code that ran

21 of 27 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 19 have no contract verdict; 2 failures of our instrument; 6 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/2307.01770.json · badge: /api/ran/2307.01770.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
MaheyG/SWGG canonical (classifier label)
classifier basis: census
19 ran · 4 no recorded run
maheyg/swgg canonical (classifier label)
classifier basis: classifier_2025
2 ran · 2 no recorded run
FunctionStatusWhere it lives
PWD Ran
ran on a synthesized input
MaheyG/SWGG/code/other_loss.py
code served (permissive licence) · get_code("d3e61fdc6a748dfa")
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 Tensor, 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

torch.manual_seed(0)

# PWD expects:
# X: tensor that can be matrix-multiplied by theta, then sorted and indexed
# Y: tensor that can be matrix-multiplied by theta, then sorted and indexed
# theta: weight vector for linear transformation

# Looking at the function:
# - X and Y are indexed by u and v (sort indices), so they need to support fancy indexing
# - X, Y are multiplied by theta, so theta must be compatible
# - torch.sum(..., axis=-1) is called on X[u] - Y[v], suggesting last dimension is the feature dim
# - torch.mean(..., axis=0) suggests there's a dimension to reduce over

# Creating small tensors with distinct sizes:
# X: (n_samples=2, features=4)
# Y: (n_samples=2, features=4)
# theta: (features=4, projection_dim=3) for projection to 3D

X = torch.randn(2, 4)
Y = torch.randn(2, 4)
theta = torch.randn(4, 3)

ARGS = {
    "X": X,
    "Y": Y,
    "theta": theta,
}
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 Tensor, 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
SWGG_smooth Ran
ran; our contract draft was wrong, not the code
maheyg/swgg/code/SWGG.py
code served (permissive licence) · get_code("a22c3f25a95d6153")
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 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

torch.manual_seed(0)

# Create small tensors for X and Y
# X and Y should have shape (n, dim) where n is number of samples, dim is dimension
n = 2
dim = 4

X = torch.randn(n, dim)
Y = torch.randn(n, dim)

# theta should be a direction vector of shape (dim,)
theta = torch.randn(dim)
theta = theta / torch.norm(theta)  # normalize it

# s is an integer scaling factor
s = 2

# std is standard deviation for noise
std = 0.1

# device
device = 'cpu'

ARGS = {
    'X': X,
    'Y': Y,
    'theta': theta,
    's': s,
    'std': std,
    'device': device
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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
W2_1d Ran
ran; our contract draft was wrong, not the code
maheyg/swgg/code/SWGG.py
code served (permissive licence) · get_code("09b0bdfef41ee4cd")
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 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 torch
import numpy as np

torch.manual_seed(0)

# Create two 1D sorted line tensors
# The function computes sum of squared differences along axis 0
# X_line_sort and Y_line_sort should be tensors that can be subtracted and summed

X_line_sort = torch.randn(2, 4)
Y_line_sort = torch.randn(2, 4)

ARGS = {
    "X_line_sort": X_line_sort,
    "Y_line_sort": Y_line_sort,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy, torch, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, 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
W2_1d Ran
ran on a synthesized input
MaheyG/SWGG/code/SWGG.py
code served (permissive licence) · get_code("10853de1303723dd")
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 Tensor, 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 torch

torch.manual_seed(0)

# W2_1d computes sum of squared differences between two sorted line tensors
# It expects two tensors of the same shape and performs element-wise operations
# Parameters: X_line_sort, Y_line_sort - both should be 1D or multi-dimensional tensors

X_line_sort = torch.randn(2, 4)
Y_line_sort = torch.randn(2, 4)

ARGS = {
    "X_line_sort": X_line_sort,
    "Y_line_sort": Y_line_sort,
}
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 Tensor, 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
bures Ran
ran on a synthesized input
MaheyG/SWGG/code/utils_Color_Transfer.py
code served (permissive licence) · get_code("f668fbaf283bfb9e")
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 positive semi-definite matrices for the Bures distance calculation
# The function expects square matrices that work with SVD and matrix operations

np.random.seed(0)

# Create two small positive semi-definite matrices (4x4)
# Using symmetric positive semi-definite construction: A = X @ X.T
X1 = np.random.randn(4, 4)
A = X1 @ X1.T

X2 = np.random.randn(4, 4)
B = X2 @ X2.T

ARGS = {
    "A": A,
    "B": B,
}
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
load_data Ran
ran on a synthesized input
MaheyG/SWGG/code/utils_GF.py
code served (permissive licence) · get_code("95742157c81daf61")
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 Tensor, ndim 2, dtype family float, shape (100, 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
import torch
from sklearn.datasets import make_swiss_roll, make_moons, make_circles, make_blobs, make_spd_matrix
from scipy.stats import random_correlation

torch.manual_seed(0)
np.random.seed(0)

ARGS = {
    'name': 'swiss_roll',
    'n_samples': 100,
    'dim': 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, scipy, sklearn, 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 (100, 2) — shape (100, 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
make_blobs_random Ran
ran on a synthesized input
MaheyG/SWGG/code/generate_data.py
code served (permissive licence) · get_code("0c49eeb3efa10d5b")
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 (100, 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

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

ARGS = {
    "n_samples": 100,
    "n_blobs": 5,
    "scale": 0.5,
    "offset": 3
}
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 (100, 2) — shape (100, 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
make_blobs_reg Ran
ran on a synthesized input
MaheyG/SWGG/code/generate_data.py
code served (permissive licence) · get_code("281c672a91d898db")
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 (100, 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

ARGS = {
    "n_samples": 100,
    "n_blobs": 5,
    "scale": 0.5
}
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 (100, 2) — shape (100, 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
make_spiral Ran
ran on a synthesized input
MaheyG/SWGG/code/generate_data.py
code served (permissive licence) · get_code("e6859576298167fd")
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 (10, 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

np.random.seed(0)

ARGS = {
    "n_samples": 10,
    "noise": 0.5,
}
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 (10, 2) — shape (10, 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
max_sw Ran
ran on a synthesized input
MaheyG/SWGG/code/other_loss.py
code served (permissive licence) · get_code("d5cd1f149cc19377")
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 torch

torch.manual_seed(0)

# Create small sample tensors
# X and Y must have same number of rows (N) and same number of columns (dn)
N = 2
dn = 4
X = torch.randn((N, dn))
Y = torch.randn((N, dn))

ARGS = {
    "X": X,
    "Y": Y,
    "num_iter": 10,
    "lr": 0.001,
}
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 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
monge Ran
ran on a synthesized input
MaheyG/SWGG/code/utils_Color_Transfer.py
code served (permissive licence) · get_code("020d9a0a810e3203")
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 (4, 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

# Create two small positive definite matrices for testing
np.random.seed(0)

# Generate random matrices and make them positive definite via A = M^T @ M
M1 = np.random.randn(4, 4)
A = M1.T @ M1

M2 = np.random.randn(4, 4)
B = M2.T @ M2

ARGS = {
    "A": A,
    "B": B
}
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 (4, 4) — shape (4, 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
nearest_neighbor Ran
ran on a synthesized input
MaheyG/SWGG/code/ICP.py
code served (permissive licence) · get_code("06574dd18197d712")
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
from sklearn import neighbors

# Create small numpy arrays for X and Y
# Both must have the same shape (nxd)
# Using n=2 points, d=4 dimensions
np.random.seed(0)
X = np.random.randn(2, 4).astype(np.float64)
Y = np.random.randn(2, 4).astype(np.float64)

ARGS = {
    "X": X,
    "Y": Y,
}
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 — 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
procruste Ran
ran on a synthesized input
MaheyG/SWGG/code/ICP.py
code served (permissive licence) · get_code("68ab46e49e152b1d")
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 torch
import numpy as np

torch.manual_seed(0)

# Create two small point clouds with n=2 points in d=4 dimensions
n = 2
d = 4

# X: 2x4 tensor of corresponding points
X = torch.randn(n, d, dtype=torch.float32)

# Y: 2x4 tensor of corresponding points (transformed version of X)
Y = torch.randn(n, d, dtype=torch.float32)

ARGS = {
    "X": X,
    "Y": Y,
}
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 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
quantile_to_plan Ran
ran on a synthesized input
MaheyG/SWGG/code/utils.py
code served (permissive licence) · get_code("128af456c8f6bf42")
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 Tensor, ndim 2, dtype family float, shape (4, 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 torch

torch.manual_seed(0)

# Analyze the function:
# - r: tensor of values to be placed at indices (w_a, w_b) in P
# - w_a: indices for rows in P
# - w_b: indices for columns in P
# - u: indices for rows, used to index into P1
# - v: indices for columns, used to index into P2
# - ns: number of rows in P and P1
# - nt: number of columns in P and P2

# Set up dimensions
ns = 4  # source dimension
nt = 3  # target dimension

# r: values to place at (w_a, w_b) positions
# Let's create a small number of assignments
num_assignments = 2
r = torch.tensor([1.0, 2.0])

# w_a: row indices into P (must be < ns)
w_a = torch.tensor([0, 2])

# w_b: column indices into P (must be < nt)
w_b = torch.tensor([0, 1])

# u: indices for P1, must have same length as ns
# P1[u, torch.arange(ns)] = 1 means u contains ns values, each < ns
u = torch.tensor([0, 1, 2, 3])

# v: indices for P2, must have same length as nt
# P2[v, torch.arange(nt)] = 1 means v contains nt values, each < nt
v = torch.tensor([0, 1, 2])

ARGS = {
    "r": r,
    "w_a": w_a,
    "w_b": w_b,
    "u": u,
    "v": v,
}
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 Tensor, ndim 2, dtype family float, shape (4, 3) — shape (4, 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
random_slice Ran
ran on a synthesized input
MaheyG/SWGG/code/utils.py
code served (permissive licence) · get_code("2a5e2478a8bf42d6")
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 Tensor, ndim 2, dtype family float, shape (3, 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 torch

torch.manual_seed(0)

ARGS = {
    'n_proj': 3,
    'dim': 4,
    'device': 'cpu'
}
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 Tensor, ndim 2, dtype family float, shape (3, 4) — shape (3, 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
rotation_matrix Ran
ran on a synthesized input
MaheyG/SWGG/code/utils_ICP.py
code served (permissive licence) · get_code("a3cf34348d116058")
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 Tensor, ndim 2, dtype family float, shape (2, 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
from scipy.stats import ortho_group

torch.manual_seed(0)

ARGS = {
    "dim": 2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
scipy, 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 (2, 2) — shape (2, 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
sort_to_plan Ran
ran on a synthesized input
MaheyG/SWGG/code/utils.py
code served (permissive licence) · get_code("26b94ccd4d0041f5")
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 Tensor, ndim 2, dtype family float, shape (4, 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 torch

torch.manual_seed(0)

# u and v are index tensors used to index into rows of P1 and P2
# They should be 1D tensors containing indices
# The function uses u.shape[0] to get n, so we need u and v with the same first dimension
n = 4
u = torch.tensor([2, 0, 3, 1])  # permutation indices for rows
v = torch.tensor([1, 3, 0, 2])  # permutation indices for rows

ARGS = {
    "u": u,
    "v": v,
}
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 Tensor, ndim 2, dtype family float, shape (4, 4) — shape (4, 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
sqrtm Ran
ran on a synthesized input
MaheyG/SWGG/code/utils_Color_Transfer.py
code served (permissive licence) · get_code("265432966cf60195")
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 (4, 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

# The function sqrtm takes a matrix A and computes its matrix square root
# using SVD decomposition. The matrix A should be a 2D numpy array.

# Create a small positive semi-definite matrix for valid sqrtm computation
# Using a simple symmetric positive definite matrix
np.random.seed(0)
A = np.random.randn(4, 4)
A = A @ A.T  # Make it symmetric positive definite

ARGS = {
    "A": A
}
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 (4, 4) — shape (4, 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
sw Ran
ran on a synthesized input
MaheyG/SWGG/code/other_loss.py
code served (permissive licence) · get_code("780b93de379e325c")
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 Tensor, 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

torch.manual_seed(0)

# Create small tensors with matching dimensions
# N=2 samples, dn=dm=4 features
N = 2
dn = 4

X = torch.randn(N, dn)
Y = torch.randn(N, dn)

# theta is optional (can be None), but if provided should be shape (dn,)
theta = torch.randn(dn)

ARGS = {
    "X": X,
    "Y": Y,
    "theta": theta
}
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 Tensor, 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
temperature Ran
ran on a synthesized input
MaheyG/SWGG/code/Simulated_Annealing.py
code served (permissive licence) · get_code("56963d39c9de6af6")
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 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 torch
import numpy as np

# Analyze the function:
# - temperature(n_iter, T_0=1)
# - n_iter: used in range(n_iter) and division, should be an integer
# - T_0: used as initial value in list, should be a number (int or float)
# - The function creates a list and appends values to it
# - Returns a list of temperature values

ARGS = {
    "n_iter": 5,
    "T_0": 1.0
}
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 float — 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
w2 Ran
ran on a synthesized input
MaheyG/SWGG/code/utils_GF.py
code served (permissive licence) · get_code("4ca72352fb69bafc")
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
import ot

np.random.seed(0)

# Create two point clouds with distinct shapes
# X: 4 points in 3D
X = np.random.randn(4, 3).astype(np.float64)

# Y: 5 points in 3D
Y = np.random.randn(5, 3).astype(np.float64)

ARGS = {
    "X": X,
    "Y": Y,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, ot — 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
W2_proj Not yet run
unverified (harvested, no recorded run)
maheyg/swgg/code/SWGG.py
code served (permissive licence) · get_code("f5c699456b9401ca")
How it ran

no invocation recorded.

W2_proj Not yet run
unverified (harvested, no recorded run)
MaheyG/SWGG/code/SWGG.py
code served (permissive licence) · get_code("805b00de71cd788c")
How it ran

no invocation recorded.

Y_to_X Not yet run
unverified (harvested, no recorded run)
MaheyG/SWGG/code/utils_ICP.py
code served (permissive licence) · get_code("a994c5d41db78bae")
How it ran

no invocation recorded.

compute_bary_line Not yet run
unverified (harvested, no recorded run)
maheyg/swgg/code/SWGG.py
code served (permissive licence) · get_code("0d22210ae635b4f5")
How it ran

no invocation recorded. this sample carries JSON test cases instead of a setup block; get_reference_implementation serves them with the level they back.

compute_bary_line Not yet run
unverified (harvested, no recorded run)
MaheyG/SWGG/code/SWGG.py
code served (permissive licence) · get_code("5803c476aaa8df6b")
How it ran

no invocation recorded.

load_image Not yet run
unverified (harvested, no recorded run)
MaheyG/SWGG/code/utils_ICP.py
code served (permissive licence) · get_code("ee959ae4d23366a2")
How it ran

no invocation recorded.

Also present in other papers' code

Of 27 samples lifted from this paper's linked repositories, 27 carry a function identity and 0 do not. Of the 24 distinct functions with an identity, 7 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 7 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
W2_1d 1 other paper
1 later
2503.11050 (2025-03)
Distance-Based Tree-Sliced Wasserstein Distance
W2_proj 1 other paper
1 later
2503.11050 (2025-03)
Distance-Based Tree-Sliced Wasserstein Distance
compute_bary_line 1 other paper
1 later
2503.11050 (2025-03)
Distance-Based Tree-Sliced Wasserstein Distance
make_blobs_random 1 other paper
1 later
2503.11050 (2025-03)
Distance-Based Tree-Sliced Wasserstein Distance
make_blobs_reg 1 other paper
1 later
2503.11050 (2025-03)
Distance-Based Tree-Sliced Wasserstein Distance
make_spiral 1 other paper
1 later
2503.11050 (2025-03)
Distance-Based Tree-Sliced Wasserstein Distance
temperature 1 other paper
1 later
2503.11050 (2025-03)
Distance-Based Tree-Sliced Wasserstein Distance

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

Wasserstein distance (WD) and the associated optimal transport plan have proven useful in many applications where probability measures are at stake. In this paper, we propose a new proxy for the squared WD, coined min-SWGG, which relies on the transport map induced by an optimal one-dimensional projection of the two input distributions. We draw connections between min-SWGG and Wasserstein generalized geodesics with a pivot measure supported on a line. We notably provide a new closed form of the Wasserstein distance in the particular case where one of the distributions is supported on a line, allowing us to derive a fast computational scheme that is amenable to gradient descent optimization. We show that min-SWGG is an upper bound of WD and that it has a complexity similar to that of Sliced-Wasserstein, with the additional feature of providing an associated transport plan. We also investigate some theoretical properties such as metricity, weak convergence, computational and topological properties. Empirical evidences support the benefits of min-SWGG in various contexts, from gradient flows, shape matching and image colorization, among others. Recently, OT has been successfully employed in a wide range of machine learning applications, in which the Wasserstein distance is estimated from the data, such as supervised learning [30], natural Preprint. Under review.

For agents

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

get_harvested_code_for_paper("2307.01770")
get_code_for_paper("2307.01770")
have("2307.01770")

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

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

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

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

Connect an agent — have() is free.