Papers › Partial Gromov-Wasserstein Metric

Partial Gromov-Wasserstein Metric

6 Feb 2024arXiv:2402.03664archive 2025-07-28

Yikun Bai, Rocio Diaz Martin, Abihith Kothapalli, Hengrong Du, Xinran Liu, Soheil Kolouri

The Gromov-Wasserstein (GW) distance has gained increasing interest in the machine learning community in recent years, as it allows for the comparison of measures in different metric spaces. To overcome the limitations imposed by the equal mass requirements of the classical GW problem, researchers have begun exploring its application in unbalanced settings. However, Unbalanced GW (UGW) can only be regarded as a discrepancy rather than a rigorous metric/distance between two metric measure spaces (mm-spaces). In this paper, we propose a particular case of the UGW problem, termed Partial Gromov-Wasserstein (PGW). We establish that PGW is a well-defined metric between mm-spaces and discuss its theoretical properties, including the existence of a minimizer for the PGW problem and the relationship between PGW and GW, among others. We then propose two variants of the Frank-Wolfe algorithm for solving the PGW problem and show that they are mathematically and computationally equivalent. Moreover, based on our PGW metric, we introduce the analogous concept of barycenters for mm-spaces. Finally, we validate the effectiveness of our PGW metric and related solvers in applications such as shape matching, shape retrieval, and shape interpolation, comparing them against existing baselines. Our code is available at https://github.com/mint-vu/PGW_Metric.

PaperPDFCodeCode Syntology ranMethod as code

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 39 code samples: 38 from 1 repository linked to this paper, 1 identical to code harvested from another paper's repository. Across all 39: 28 ran (of which 0 constructed an object rather than computing a result; 18 with no instrument failure: 5 honoured, 1 violated, 12 with no contract checked; 10 where Syntology's instrument failed) · 11 unverified. Where Syntology's instrument failed: 3 where our contract draft was wrong; 7 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 38 samples from 1 repository, 28 ran (18 with no instrument failure; 10 where Syntology's instrument failed); 1 identical to code first harvested elsewhere. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 28 samples that ran has no recorded date.

mint-vu/pgw_metric officialmentioned in paperpytorchSyntology: 38 samples, 28 ran (10 instrument-failed) · 10 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

39 samples harvested: 28 ran (of which 0 constructed an object rather than computing a result; 18 with no instrument failure: 5 honoured, 1 violated, 12 with no contract checked; 10 where Syntology's instrument failed) · 11 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page last changed ; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

5ran · honoured contract
1ran · violated contract
3ran · our draft was wrong
7ran; the contract check could not run
12ran
11unverified

Licence: 39 of the 39 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from mint-vu/pgw_metric. 1 sample is listed last, in a group without a repository. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. For 1 sample that ran, the graph records a signature this page does not show: an argument's recorded type or element kind is a printout of an object in Syntology's harness (such as a mock object, a class or a pandas printout), not the type of an input, so it does not describe the call's shape. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity.

mint-vu/pgw_metric official repository 38 samples, 28 ran (10 instrument-failed) · 10 unverified
HKExpMonge lib/HK/LinHK.py ran; the contract check could not run (RAISES) no licence file found · pointer only · 6f5e13570a85cb9e · report fixture: signature v:ndarray/2/float, alpha:ndarray/1/float, HKScale:float/0/float · returned tuple · level recorded 2026-09-24
HKLog lib/HK/LinHK.py ran; the contract check could not run (RAISES) no licence file found · pointer only · ddfb05aa653b2aeb · report fixture: signature x0:ndarray/2/float, u0:ndarray/1/float, x1:ndarray/2/float, u1:ndarray/1/float, HKScale:float/0/float · returned tuple · level recorded 2026-09-24
KL in 20 papers lib/HK/SinkhornNP.py ran fingerprinted no licence file found · pointer only · 5f4ad09f57a60dd3 · report fixture: signature muEff:ndarray/1/float, mu:ndarray/1/float, muThresh:float/0/float · returned float64 · level recorded 2026-09-24
MDS_test lib/gromov_barycenter.py ran fingerprinted no licence file found · pointer only · 92b599f21803d223 · report fixture: signature dist_mat:ndarray/2/float, d:int/0/int, seed:int/0/int · returned ndarray · level recorded 2026-09-24
PCA_numpy lib/_utils.py ran; the contract check could not run (RAISES) fingerprinted no licence file found · pointer only · 8d9de98e89cbef33 · report fixture: signature X:ndarray/3/float, k:int/0/int · returned tuple · level recorded 2026-09-24
buildDataMatrix lib/HK/LinW2.py ran; the contract check could not run (RAISES) no licence file found · pointer only · dbcd9cca06939b5e · report fixture: signature tangentList:list/1/ndarray, mu:ndarray/1/float · returned ndarray · level recorded 2026-09-24
check_number_threads lib/opt.py ran · honoured contract fingerprinted no licence file found · pointer only · b0bb632a9a1e6e72 · report fixture: signature numThreads:int/0/int · returned int · level recorded 2026-09-24
cost_function lib/lopt.py ran · violated contract fingerprinted no licence file found · pointer only · 1ec964d986f17239 · report fixture: signature x:ndarray/2/float, y:ndarray/2/float · returned ndarray · level recorded 2026-09-24
cost_matrix lib/lopt.py ran · our draft was wrong fingerprinted no licence file found · pointer only · a58377b969a103e3 · report fixture: signature X:ndarray/1/float, Y:ndarray/1/float · returned ndarray · level recorded 2026-09-24
decomposeEigenvectors lib/HK/LinW2.py ran no licence file found · pointer only · 9b4ba556ee545dc6 · report fixture: signature evList:list/1/ndarray, mu:ndarray/1/float · returned list · level recorded 2026-09-24
emd_lp lib/opt.py ran no licence file found · pointer only · d17fd94b1af0d3f1 · report fixture: signature a:ndarray/1/float, b:ndarray/1/float, M:ndarray/2/float, numItermax:int/0/int, log:bool/0/bool, center_dual:bool/0/bool, numThreads:int/0/int, check_marginals:bool/0/bool · returned tuple · level recorded 2026-09-24
extractMongeData lib/HK/LinHK.py ran; the contract check could not run (RAISES) no licence file found · pointer only · 0ecd3739ff2fee74 · report fixture: signature pi:csr_matrix/2/float, mu:ndarray/1/float, nu:ndarray/1/float, posNu:ndarray/2/float, zeroThresh:float/0/float · returned tuple · level recorded 2026-09-24
extractMongeData lib/HK/LinW2.py ran no licence file found · pointer only · 5b69e57118377810 · report fixture: signature pi:csr_matrix/2/float, posNu:ndarray/2/float · returned ndarray · level recorded 2026-09-24
gamma_to_T lib/_utils.py ran · honoured contract no licence file found · pointer only · e04b1361dd2fa985 · report fixture: signature gamma:ndarray/2/int · returned ndarray · level recorded 2026-09-24
generate_d_sphere lib/shape_matching.py ran no licence file found · pointer only · 57b010a6f658afcf · report fixture: signature d:int/0/int, n:int/0/int, seed:int/0/int · returned ndarray · level recorded 2026-09-24
generate_d_square lib/shape_matching.py ran · honoured contract fingerprinted no licence file found · pointer only · 10538f2e3b860e1c · report fixture: signature d:int/0/int, n:int/0/int · returned ndarray · level recorded 2026-09-24
getCostEuclidean lib/HK/SinkhornNP.py ran no licence file found · pointer only · d6ff84d8980cc90d · report fixture: signature posX:ndarray/2/float, posY:ndarray/2/float, p:int/0/int, HKMode:bool/0/bool, HKScale:float/0/float · returned ndarray · level recorded 2026-09-24
getPoslistNCube lib/HK/OTCommon.py ran · our draft was wrong no licence file found · pointer only · e39a27451d50dff2 · report fixture: returned ndarray · level recorded 2026-09-24
im2mat lib/gromov_barycenter.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant fingerprinted no licence file found · pointer only · f75fddd85ad85071 · report fixture: signature img:Tensor/3/float · returned Tensor · level recorded, date not recorded
lot_geodesic lib/geodesic.py ran no licence file found · pointer only · 8f98f1be91d759a4 · report fixture: signature X0:ndarray/2/float, U1:ndarray/2/float, U2:ndarray/2/float, t_list:ndarray/1/float · returned ndarray · level recorded 2026-09-24
normalize_X lib/pu_learning.py ran · honoured contract fingerprinted no licence file found · pointer only · ddac89a10bbaf59f · report fixture: signature X:ndarray/2/float · returned ndarray · level recorded 2026-09-24
opt_interpolation lib/geodesic.py ran no licence file found · pointer only · b799916ef80c00ac · report fixture: signature X0:ndarray/2/float, U1:ndarray/2/float, p0:ndarray/1/float, p1_hat:ndarray/1/float, t_list:ndarray/1/float · returned tuple · level recorded 2026-09-24
ot_geodesic lib/geodesic.py ran no licence file found · pointer only · f9b40f8f3c9ea5f3 · report fixture: signature X0:ndarray/2/float, U1:ndarray/2/float, t_list:ndarray/1/float · returned ndarray · level recorded 2026-09-24
pu_gw_emd lib/mpgw/partial_gw.py ran · our draft was wrong no licence file found · pointer only · bde78b222d343cc7 · report fixture: signature C1:ndarray/2/float, C2:ndarray/2/float, p:ndarray/1/float, q:ndarray/1/float, nb_dummies:int/0/int, group_constraints:bool/0/bool, G0:ndarray/2/float, log:bool/0/bool, max_iter:int/0/int · returned ndarray · level recorded 2026-09-22
pu_w_emd lib/mpgw/partial_gw.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant no licence file found · pointer only · dcd88e715c0b7a9c · report fixture: signature p:ndarray/1/float, q:ndarray/1/float, C:ndarray/2/float, nb_dummies:int/0/int · returned ndarray · level recorded 2026-09-22
random_projections lib/lopt.py ran no licence file found · pointer only · 994e8f3b082dd270 · report fixture: signature d:int64/0/int, n_projections:int64/0/int, Type:int64/0/int · returned ndarray · level recorded 2026-09-24
rotation_2d lib/shape_matching.py ran · honoured contract fingerprinted no licence file found · pointer only · 49a9dad58dc9c817 · report fixture: signature theta:float/0/float · returned ndarray · level recorded 2026-09-24
smacof_mds lib/gromov_barycenter.py ran no licence file found · pointer only · ac03fc0948a770f5 · report fixture: signature C:ndarray/2/float, dim:int/0/int, max_iter:int/0/int, eps:float/0/float, seed:int/0/int · returned ndarray · level recorded 2026-09-24
SolveW2 lib/HK/SinkhornNP.py unverified no licence file found · pointer only · 3932dc6120481ab3 · report
data_process in 6 papers lib/pu_learning.py unverified no licence file found · pointer only · 657b63a2f201207a · report
draw_pu_dataset_scar lib/pu_learning.py unverified no licence file found · pointer only · ee5ed42010b9accc · report
gwgrad_partial1 lib/gromov.py unverified no licence file found · pointer only · 56455786f838bd02 · report
gwloss lib/mpgw/partial_gw.py unverified no licence file found · pointer only · af7ad3707397d5b0 · report
importMeasure lib/HK/OTCommon.py unverified no licence file found · pointer only · ca28591bfb28a4f0 · report
opt_lp lib/opt.py unverified no licence file found · pointer only · 46a6ff2f033b3222 · report
processDensity_Grid lib/HK/OTCommon.py unverified no licence file found · pointer only · e332456cb147b40e · report
sampling in 26 papers lib/_utils.py unverified no licence file found · pointer only · a7e27a1315a1af98 · report
tensor_dot_func lib/gromov.py unverified no licence file found · pointer only · 02b0df05801406da · report
Repository not located 1 sample, 0 ran · 1 unverified
1 sample is identical to code Syntology harvested from another paper's repository; this paper's own copy was not located, so no repository is named and no licence is recorded.
gwgrad repository not located unverified licence of this copy not recorded · 147fd80456b80804 · report

Method as code Syntology

What Syntology's graph records as this paper's claimed method, lifted into code: each assembly names its bricks (functions and classes), each with its own role and its own verification level. An assembly is not a check that the code implements the method correctly or reproduces the paper's results. Levels are each brick's own verification level in Syntology's graph (level 0: no recorded run), listed brick by brick and never combined into one level; “ran” means the brick executed on a synthesized input, not that its output is correct, and the instrument figure counts failures of Syntology's instrument, not of the code. Where a model read the code against the paper's claim, each assembly's label verdict is one model's judgement, kept in this page's JSON twin; it is not calibrated, so no card prints it.

1 assembly on this paper: 1 harvested, 0 generated.

harvested Assembly for Partial Gromov-Wasserstein Metric (graph method: Partial Gromov-Wasserstein Metric). 4 bricks; individually on a fixture: 2 ran (of which 0 constructed an object rather than computing a result; 0 with no instrument failure: 0 honoured, 0 violated, 0 with no contract checked; 2 where Syntology's instrument failed) · 2 unverified. The assembly has not been run end-to-end.

  1. pu_gw_emd entry · level 1 · ran · our draft was wrong · bde78b222d343cc7
  2. gwgrad update_rule · level 0 · unverified · 147fd80456b80804
  3. gwloss loss · level 0 · unverified · af7ad3707397d5b0
  4. pu_w_emd helper · level 1 · ran; the contract check could not run (RAISES) · dcd88e715c0b7a9c

Each brick ends with its code_sha256, Syntology's identity for that exact code; click one to copy the get_code call that returns it. For agents, on Syntology's MCP service: assembly(arxiv_id="2402.03664") returns these assemblies with each brick's role and wiring (how to connect).

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections