SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2405.08424 · ICML · 2024

Tackling Prevalent Conditions in Unsupervised Combinatorial Optimization: Cardinality, Minimum, Covering, and More

Sungsoo Ahn, Kijung Shin, Soo Lee, Fanchen Bu, Hyeonsoo Jo

arXiv · PDF · Open in the Atlas

Code that ran

4 of 7 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 0 have no contract verdict; 4 failures of our instrument; 3 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2405.08424.json · badge: /api/ran/2405.08424.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
ai4co/unsupervised-co-ucom2 canonical (classifier label)
classifier basis: classifier_2025
3 ran · 0 no recorded run
bokveizen/unsupervised-CO-ucom2 canonical (classifier label)
classifier basis: census
1 ran · 0 no recorded run
Stalence/erdos_neu canonical (classifier label)
classifier basis: census
0 ran · 3 no recorded run
FunctionStatusWhere it lives
compute_objective Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
ai4co/unsupervised-co-ucom2/facility_location_and_max_cover/src/facility_location_methods.py
code served (permissive licence) · get_code("bbef25284deca89d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 1, dtype family float, shape (2,) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 testing
# points: (batch_size, num_points, feature_dim)
# cluster_centers: (batch_size, num_clusters, feature_dim)
# We'll use batch=2, num_points=5, num_clusters=3, feature_dim=4

points = torch.randn(2, 5, 4)
cluster_centers = torch.randn(2, 3, 4)

# choice_cluster should be indices of shape (batch_size, num_points)
# indicating which cluster each point belongs to
choice_cluster = torch.randint(0, 3, (2, 5))

ARGS = {
    'points': points,
    'cluster_centers': cluster_centers,
    'distance_metric': 'euclidean',
    'choice_cluster': choice_cluster
}
Setup block drafted by
a language model, Claude Sonnet 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 1, dtype family float, shape (2,) — shape (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
compute_objective_differentiable Ran
ran; our contract draft was wrong, not the code
ai4co/unsupervised-co-ucom2/facility_location_and_max_cover/src/facility_location_methods.py
code served (permissive licence) · get_code("5cf0360dde082472")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 4.5, prompt python_fixture_v1) and returned Tensor, ndim 1, dtype family float, shape (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

torch.manual_seed(0)

# Analyzing the function:
# - dist: used with .mean(), exp(-temp / dist.mean() * dist), unsqueeze(-1), sum(dim=(1,2))
#   Shape appears to be (N, M) where probs_per_dist * dist sums over dims (1,2)
# - probs: used with .unsqueeze(-1), multiplied with exp_dist.unsqueeze(0)
#   If exp_dist is (N, M) and unsqueeze(0) makes it (1, N, M)
#   probs.unsqueeze(-1) should broadcast, so probs is likely (K,) or (K, N)
#   exp_dist_probs.sum(1, keepdim=True) suggests dim 1 is summed
#   Final obj sums over (1, 2), so result shape suggests 3D intermediate
# 
# Let's trace through:
# - dist: shape (N, M) -> exp_dist: (N, M)
# - exp_dist.unsqueeze(0): (1, N, M)
# - probs.unsqueeze(-1): if probs is (K, N), this becomes (K, N, 1)
# - exp_dist_probs = (1, N, M) * (K, N, 1) = (K, N, M)
# - exp_dist_probs.sum(1, keepdim=True): sum over dim 1 -> (K, 1, M)
# - probs_per_dist: (K, N, M) / (K, 1, M) = (K, N, M)
# - (probs_per_dist * dist): dist needs to broadcast to (K, N, M), so dist is (N, M)
# - .sum(dim=(1, 2)): (K, N, M) -> (K,)

# So: dist is (N, M), probs is (K, N)
# Using distinct sizes: K=2, N=3, M=5

dist = torch.randn(3, 5)
probs = torch.softmax(torch.randn(2, 3), dim=1)
temp = 30

ARGS = {
    'dist': dist,
    'probs': probs,
    'temp': temp
}
Setup block drafted by
a language model, Claude Sonnet 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 1, dtype family float, shape (2,) — shape (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
compute_objective_differentiable_exact Ran
ran; our contract draft was wrong, not the code
ai4co/unsupervised-co-ucom2/facility_location_and_max_cover/src/facility_location_methods.py
code served (permissive licence) · get_code("789f7d80bd07072f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Sonnet 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)

# dist: a 2D tensor where we sort along dim=1
# probs: a 1D tensor (or flattenable) that gets indexed by dist_ordering

# Let's say we have batch_size=2, and each row has 5 elements
batch_size = 2
num_elements = 5

# dist is a 2D tensor of shape (batch_size, num_elements)
dist = torch.randn(batch_size, num_elements)

# probs needs to be indexable by dist_ordering
# dist_ordering will have shape (batch_size, num_elements) with values in range [0, num_elements)
# So probs should have at least num_elements elements when flattened
probs = torch.rand(num_elements)

ARGS = {
    'dist': dist,
    'probs': probs
}
Setup block drafted by
a language model, Claude Sonnet 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
param2string Ran
ran; our contract draft was wrong, not the code
bokveizen/unsupervised-CO-ucom2/facility_location_and_max_cover/facility_location_ucom2.py
code served (permissive licence) · get_code("6b87724bc1f4d71c")
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 str. 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)

def param2string(param_):
    return str(param_).replace('.', 'p')

# The function takes a single parameter and converts it to string, replacing dots with 'p'
# It works with any object that has a string representation
# Let's test with a simple numeric value

param_value = 3.14159

ARGS = {
    'param_': param_value
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
getNdiracs Not yet run
unverified (harvested, no recorded run)
Stalence/erdos_neu/myfuncs.py
pointer only (licence: NONE) · get_code("4478695b77856a66")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Stalence/erdos_neu 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.

getSparseData Not yet run
unverified (harvested, no recorded run)
Stalence/erdos_neu/myfuncs.py
pointer only (licence: NONE) · get_code("d5916393e74f24f6")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Stalence/erdos_neu 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.

trainModel Not yet run
unverified (harvested, no recorded run)
Stalence/erdos_neu/myfuncs.py
pointer only (licence: NONE) · get_code("10a72f4ad27cdd07")
How it ran

The body of this sample is withheld: GitHub detected no licence in this paper's repository, Stalence/erdos_neu 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.

Also present in other papers' code

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

Combinatorial optimization (CO) is naturally discrete, making machine learning based on differentiable optimization inapplicable. Karalias & Loukas (2020) adapted the probabilistic method to incorporate CO into differentiable optimization. Their work ignited the research on unsupervised learning for CO, composed of two main components: probabilistic objectives and derandomization. However, each component confronts unique challenges. First, deriving objectives under various conditions (e.g., cardinality constraints and minimum) is nontrivial. Second, the derandomization process is underexplored, and the existing derandomization methods are either random sampling or naive rounding. In this work, we aim to tackle prevalent (i.e., commonly involved) conditions in unsupervised CO. First, we concretize the targets for objective construction and derandomization with theoretical justification. Then, for various conditions commonly involved in different CO problems, we derive nontrivial objectives and derandomization to meet the targets. Finally, we apply the derivations to various CO problems. Via extensive experiments on synthetic and realworld graphs, we validate the correctness of our derivations and show our empirical superiority w.r.t. both optimization quality and speed.

For agents

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

get_harvested_code_for_paper("2405.08424")
get_code_for_paper("2405.08424")
have("2405.08424")

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

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

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

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

Connect an agent — have() is free.