SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2512.02494 · ICML · 2025

A Fully First-Order Layer for Differentiable Optimization

Kai Wang, Brandon Amos, Zihao Zhao, Kai-Chia Mo, Shing-Hei Ho

arXiv · PDF · Open in the Atlas

Code that ran

24 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; 1 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 23 failures of our instrument; 3 no recorded run), measured 2026-11-22; 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/2512.02494.json · badge: /api/ran/2512.02494.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
GT-KOALA/FFOLayer canonical (classifier label)
classifier basis: census
24 ran · 3 no recorded run
FunctionStatusWhere it lives
AltDiffLayer Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/baselines/AltDiff_my.py
code served (permissive licence) · get_code("5da01a2cfc6e4a3c")
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 method. 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

torch.manual_seed(0)

ARGS = {
    "eps": 1e-05,
    "max_iter": 2500,
    "rho": 1.0,
    "reg_fwd": 1e-05,
    "active_tol": 1e-06,
    "reg_bwd": 1e-05,
    "sym_P": True,
}
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 method — a method output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a method 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
AltDiffLayer Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/baselines/AltDiff_socp.py
code served (permissive licence) · get_code("721a2edf0c8c6c88")
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 method. 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 test tensors for a QP problem
# minimize: 0.5 * x^T P x + q^T x
# subject to: A x = b, G x + s = h, ||x|| <= 1

n = 4  # number of variables
m = 2  # number of equality constraints
p = 3  # number of inequality constraints

# P: positive definite matrix (n x n)
P = torch.eye(n, dtype=torch.float32)

# q: linear term (n,)
q = torch.randn(n, dtype=torch.float32)

# A: equality constraint matrix (m x n)
A = torch.randn(m, n, dtype=torch.float32)

# b: equality constraint RHS (m,)
b = torch.randn(m, dtype=torch.float32)

# G: inequality constraint matrix (p x n)
G = torch.randn(p, n, dtype=torch.float32)

# h: inequality constraint RHS (p,)
h = torch.randn(p, dtype=torch.float32)

ARGS = {
    'eps': 1e-08,
    'max_iter': 2000,
    'rho': 50.0,
}
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 method — a method output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a method 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
BPQPLayer Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/baselines/BPQP_cvxpy.py
code served (permissive licence) · get_code("f059057e92cf65ce")
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 method. 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)

ARGS = {
    'sign': 1,
    'act_tol': 1e-06
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cvxpy, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type method — a method output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a method 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
alt_diff_qp_ball Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
GT-KOALA/FFOLayer/baselines/AltDiff_socp.py
code served (permissive licence) · get_code("0ed505c799b8ab88")
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)

# Problem dimensions
n = 4  # primal variable dimension
m = 2  # equality constraint dimension
p = 3  # inequality constraint dimension

# Construct QP matrices
# Minimize: 0.5 * x^T P x + q^T x
# subject to: A x = b (equality)
#             G x + s = h, s >= 0 (inequality)
#             ||x|| <= 1 - t, t >= 0 (ball constraint)

P = torch.randn(n, n)
P = P @ P.T + 0.1 * torch.eye(n)  # Make positive definite

q = torch.randn(n)

# Equality constraint matrix (m x n)
A = torch.randn(m, n)
b = torch.randn(m)

# Inequality constraint matrix (p x n)
G = torch.randn(p, n)
h = torch.randn(p)

# Optional parameters with defaults
rho = 50.0
eps = 1e-8
max_iter = 2000

ARGS = {
    'P': P,
    'q': q,
    'A': A,
    'b': b,
    'G': G,
    'h': h,
    'rho': rho,
    'eps': eps,
    'max_iter': max_iter,
}
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
alt_qp_solve_batched Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/baselines/AltDiff_my.py
code served (permissive licence) · get_code("965a326c258ca206")
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)

# Problem dimensions
B = 2  # batch size
n = 4  # primal dimension
m = 3  # equality constraint dimension
p = 2  # inequality constraint dimension

# Construct P (n x n, positive definite for each batch element)
P = torch.eye(n).unsqueeze(0).expand(B, n, n).clone()
P = P + 0.1 * torch.randn(B, n, n)
P = (P + P.transpose(-1, -2)) / 2  # symmetrize
P = P + 2.0 * torch.eye(n).unsqueeze(0)  # make positive definite

# Construct q (B x n)
q = torch.randn(B, n)

# Construct A (B x m x n) for equality constraints Ax = b
A = torch.randn(B, m, n)

# Construct b (B x m)
b = torch.randn(B, m)

# Construct G (B x p x n) for inequality constraints Gx + s = h, s >= 0
G = torch.randn(B, p, n)

# Construct h (B x p)
h = torch.randn(B, p)

ARGS = {
    'P': P,
    'q': q,
    'A': A,
    'b': b,
    'G': G,
    'h': h,
    'rho': 1.0,
    'eps': 1e-6,
    'max_iter': 5000,
    'reg': 1e-7,
}
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
bpqp_backward Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
GT-KOALA/FFOLayer/baselines/BPQP.py
code served (permissive licence) · get_code("51a84d27ffe9312e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import scipy.sparse as sp

# Define dimensions
n = 4  # number of variables
m = 3  # number of inequality constraints
p = 2  # number of equality constraints

# Create xn: primal solution vector
xn = np.array([1.0, 2.0, 3.0, 4.0], dtype=np.float64)

# Create yn: dual solution vector (m + p components)
yn = np.array([0.5, 0.3, 0.1, 0.2, 0.4], dtype=np.float64)

# Create P_csc: sparse positive definite matrix (n x n)
P_dense = np.array([
    [2.0, 0.1, 0.0, 0.0],
    [0.1, 2.0, 0.0, 0.0],
    [0.0, 0.0, 2.0, 0.1],
    [0.0, 0.0, 0.1, 2.0]
], dtype=np.float64)
P_csc = sp.csc_matrix(P_dense)

# Create Gn: inequality constraint matrix (m x n)
Gn = np.array([
    [1.0, 0.0, 0.0, 0.0],
    [0.0, 1.0, 0.0, 0.0],
    [0.0, 0.0, 1.0, 1.0]
], dtype=np.float64)

# Create hn: inequality constraint bounds (m,)
hn = np.array([5.0, 5.0, 8.0], dtype=np.float64)

# Create An: equality constraint matrix (p x n)
An = np.array([
    [1.0, 1.0, 1.0, 1.0],
    [1.0, -1.0, 0.0, 0.0]
], dtype=np.float64)

# Create gnp: gradient vector (n,)
gnp = np.array([0.1, 0.2, 0.3, 0.4], dtype=np.float64)

# Define hyperparameters
act_tol = 1e-5
backward_eps = 1e-6

ARGS = {
    'xn': xn,
    'yn': yn,
    'P_csc': P_csc,
    'Gn': Gn,
    'hn': hn,
    'An': An,
    'gnp': gnp,
    'm': m,
    'p': p,
    'act_tol': act_tol,
    'backward_eps': backward_eps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, osqp, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
bpqp_backward Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
GT-KOALA/FFOLayer/baselines/BPQP_cvxpy.py
code served (permissive licence) · get_code("bc3853e5579d499e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import cvxpy as cp

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

# Define small problem dimensions
n = 4  # decision variable dimension
m = 3  # inequality constraint dimension
p = 2  # equality constraint dimension

# Create test data
xn = np.random.randn(n)  # primal solution
yn = np.random.randn(m)  # dual variables for inequality constraints

# Create a positive definite matrix for Pn
P_temp = np.random.randn(n, n)
Pn = P_temp @ P_temp.T + np.eye(n)  # Ensure positive definiteness

# Gradient vector
gnp = np.random.randn(n)

# Inequality constraint matrix (m x n)
Gn = np.random.randn(m, n)

# Inequality constraint bounds (m,)
hn = np.random.randn(m)

# Equality constraint matrix (p x n)
An = np.random.randn(p, n)

# Activity tolerance
act_tol = 1e-4

ARGS = {
    'xn': xn,
    'yn': yn,
    'Pn': Pn,
    'Gn': Gn,
    'hn': hn,
    'An': An,
    'gnp': gnp,
    'm': m,
    'p': p,
    'act_tol': act_tol,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cvxpy, numpy — 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
compact_active_rows Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
GT-KOALA/FFOLayer/src/ffolayer/ffoqp_eq.py
code served (permissive licence) · get_code("9073396df5ed4d7f")
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)

# The function expects A to be a 3D tensor with shape (B, m, n)
# where B is batch size, m is number of rows, n is number of columns
# The function:
# 1. Iterates over batch dimension
# 2. For each batch element, computes rowmask using .abs().amax(dim=-1) > 0
# 3. Indexes with the rowmask
# 4. Calls .nonzero(as_tuple=False).squeeze(-1) on the mask

# Create a small 3D tensor: (batch=2, rows=4, cols=3)
A = torch.tensor([
    [[1.0, 0.0, 0.0],
     [0.0, 0.0, 0.0],
     [2.0, 3.0, 0.0],
     [0.0, 0.0, 0.0]],
    [[0.0, 0.0, 0.0],
     [1.0, 2.0, 3.0],
     [0.0, 0.0, 0.0],
     [4.0, 0.0, 5.0]]
])

ARGS = {
    'A': A
}
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
ffoqp Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/src/ffolayer/ffoqp.py
code served (permissive licence) · get_code("472594fac39e3ee0")
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 method. 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)

# The function needs helper functions that are referenced but not defined
# We'll create minimal stand-in implementations

def extract_nBatch(Q_, p_, G_, h_, A_, b_):
    """Extract batch size from tensor parameters"""
    if Q_ is not None and Q_.dim() >= 1:
        return Q_.size(0) if Q_.dim() >= 2 else 1
    if p_ is not None and p_.dim() >= 1:
        return p_.size(0) if p_.dim() >= 2 else 1
    if G_ is not None and G_.dim() >= 1:
        return G_.size(0) if G_.dim() >= 2 else 1
    return 1

def expandParam(param, nBatch, nDim):
    """Expand parameter to have batch dimension"""
    if param is None or param.numel() == 0:
        return param, False
    
    if param.dim() < nDim:
        # Expand to nDim dimensions with batch size nBatch
        while param.dim() < nDim:
            param = param.unsqueeze(0)
        param = param.expand(nBatch, *param.shape[1:])
        return param, True
    return param, False

def forward_single_np(Q, p, G, h, A, b, solver='GUROBI', solver_opts=None):
    """Solve a single QP problem and return solution"""
    # Minimal mock implementation
    nz = Q.shape[0]
    nineq = G.shape[0] if G is not None else 0
    neq = A.shape[0] if A is not None else 0
    
    # Return mock values: objective value, solution, nu, lambda, slack
    zhati = np.zeros(nz)
    nui = np.zeros(neq) if neq > 0 else np.array([])
    lami = np.zeros(nineq)
    si = np.zeros(nineq)
    obj_val = 0.0
    
    return obj_val, zhati, nui, lami, si

# Create minimal test arguments
nBatch = 2
nz = 4  # primal variables
nineq = 3  # inequality constraints
neq = 2  # equality constraints

# Q must be SPD (symmetric positive definite)
Q_base = torch.randn(nz, nz)
Q_base = Q_base @ Q_base.T + torch.eye(nz) * 2  # Make it SPD
Q = Q_base.unsqueeze(0).expand(nBatch, nz, nz).clone()

# p vector
p = torch.randn(nBatch, nz)

# G matrix for inequality constraints (G @ z <= h)
G = torch.randn(nBatch, nineq, nz)

# h vector for inequality constraints
h = torch.randn(nBatch, nineq)

# A matrix for equality constraints (A @ z = b)
A = torch.randn(nBatch, neq, nz)

# b vector for equality constraints
b = torch.randn(nBatch, neq)

ARGS = {
    'eps': 1e-12,
    'verbose': 0,
    'notImprovedLim': 3,
    'maxIter': 20,
    'lamb': 100,
    'check_Q_spd': True,
    'solver': 'GUROBI',
    'solver_opts': {'verbose': False},
}
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 method — a method output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a method 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
get_feasible_b Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/sudoku/models_sudoku.py
code served (permissive licence) · get_code("a007b5cf56c8bae4")
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 (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)

# A is a matrix of shape (num_eq, y_dim)
# z0 is a vector of shape (y_dim,)
# The function computes b = A @ z0

num_eq = 2
y_dim = 4

A = torch.randn(num_eq, y_dim)
z0 = torch.randn(y_dim)

ARGS = {
    "A": A,
    "z0": z0,
}
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 (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
get_feasible_h Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/sudoku/models_sudoku.py
code served (permissive licence) · get_code("cb22acf193c96cee")
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 (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)

# G is a matrix of shape (num_ineq, y_dim)
# The function does: torch.matmul(G, z0) + s0
# So G @ z0 must be valid, meaning G.shape[1] == z0.shape[0]
num_ineq = 2
y_dim = 4

G = torch.randn(num_ineq, y_dim)
z0 = torch.randn(y_dim)
s0 = torch.abs(torch.randn(num_ineq))  # ensure all positive to satisfy assertion

ARGS = {
    "G": G,
    "z0": z0,
    "s0": s0,
}
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 (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
kkt_schur_complement Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/src/ffolayer/ffoqp_eq.py
code served (permissive licence) · get_code("2b5d032faf67c537")
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)

# Small problem dimensions
B = 2  # batch size
n = 4  # primal dimension
m = 3  # dual dimension

# Q: (B, n, n) positive definite matrix
Q = torch.randn(B, n, n)
Q = Q @ Q.transpose(-1, -2)  # Make it positive definite
Q = Q + 0.1 * torch.eye(n)   # Ensure it's well-conditioned

# A: (B, m, n) constraint matrix
A = torch.randn(B, m, n)

# delta: (B, n) or (B, n, 1) residual/gradient vector
delta = torch.randn(B, n)

ARGS = {
    "Q": Q,
    "A": A,
    "delta": delta,
}
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
make_schur_op Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
GT-KOALA/FFOLayer/src/ffolayer/ffoqp_eq.py
code served (permissive licence) · get_code("ad95d972f968bea3")
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 function. 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)

# A is a list of matrices that will be used with @ (matrix multiplication)
# and transposed. Each element needs to support transpose(-1, -2) and @ operations.
# Let's make a list of 2 matrices with shapes (4, 3) and (4, 3)
A = [
    torch.randn(4, 3),
    torch.randn(4, 3)
]

# L is used with torch.cholesky_solve, which expects L to be the Cholesky factor
# of a square matrix. For cholesky_solve(B, L), L should be (n, n) where B is (n, k)
# Since AT @ vb will produce shape (4, 2) (4 rows from A transposed, 2 from batch),
# we need L to be (4, 4) and it should be a valid Cholesky factor (lower triangular)
# Create a positive definite matrix and get its Cholesky decomposition
temp = torch.randn(4, 4)
pos_def = temp @ temp.T + torch.eye(4) * 0.1
L = torch.linalg.cholesky(pos_def)

# eps_s is a scalar that controls regularization
eps_s = 0.01

ARGS = {
    "A": A,
    "L": L,
    "eps_s": eps_s
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
osqp_solve Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/baselines/BPQP.py
code served (permissive licence) · get_code("72e51987bf0b497f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
import scipy.sparse as sp
import osqp

# Create a small quadratic program: minimize 0.5 * x^T P x + q^T x
# subject to l <= A x <= u

# P matrix (2x2, positive definite)
P_dense = np.array([[4.0, 1.0], [1.0, 3.0]])
P_csc = sp.csc_matrix(P_dense)

# q vector (2,)
q_np = np.array([1.0, -1.0])

# A matrix (3x2, three constraints)
A_dense = np.array([[1.0, 1.0], [1.0, 0.0], [0.0, 1.0]])
A_csc = sp.csc_matrix(A_dense)

# l vector (lower bounds, 3,)
l_np = np.array([0.5, 0.0, 0.0])

# u vector (upper bounds, 3,)
u_np = np.array([2.0, 1.0, 1.0])

# eps parameter
eps = 1e-6

ARGS = {
    'P_csc': P_csc,
    'q_np': q_np,
    'A_csc': A_csc,
    'l_np': l_np,
    'u_np': u_np,
    'eps': eps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, osqp, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
pack_osqp Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/baselines/BPQP.py
code served (permissive licence) · get_code("e79ddef8d0f4a1b9")
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
import scipy.sparse as sp

torch.manual_seed(0)

# Create small test tensors for a quadratic program
# Variables: n = 4
# Inequality constraints (G, h): m = 3
# Equality constraints (A, b): p = 2

n = 4
m = 3
p = 2

# P: Hessian matrix (n x n), symmetric positive semi-definite
P = torch.tensor([
    [2.0, 0.5, 0.0, 0.0],
    [0.5, 2.0, 0.5, 0.0],
    [0.0, 0.5, 2.0, 0.5],
    [0.0, 0.0, 0.5, 2.0]
], dtype=torch.float64)

# q: linear cost term (n,)
q = torch.tensor([1.0, -1.0, 2.0, -2.0], dtype=torch.float64)

# G: inequality constraint matrix (m x n), Gx <= h
G = torch.tensor([
    [1.0, 0.0, 0.0, 0.0],
    [0.0, 1.0, 0.0, 0.0],
    [0.0, 0.0, 1.0, 0.0]
], dtype=torch.float64)

# h: inequality constraint bounds (m,), Gx <= h
h = torch.tensor([5.0, 5.0, 5.0], dtype=torch.float64)

# A: equality constraint matrix (p x n), Ax = b
A = torch.tensor([
    [1.0, 1.0, 1.0, 1.0],
    [1.0, -1.0, 1.0, -1.0]
], dtype=torch.float64)

# b: equality constraint bounds (p,), Ax = b
b = torch.tensor([10.0, 2.0], dtype=torch.float64)

ARGS = {
    "P": P,
    "q": q,
    "G": G,
    "h": h,
    "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, scipy, 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
proj Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
GT-KOALA/FFOLayer/baselines/AltDiff.py
code served (permissive licence) · get_code("cdcb4c4d2efd9bcd")
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 math

torch.manual_seed(0)

# The function proj takes a parameter 's' which is indexed like a list/array
# and modified in place (ss[i] = ...), so it needs to be a mutable sequence.
# The function checks s[i] < 0 and performs arithmetic operations on elements.
# A list of floats or a numpy array would work. Let's use a list of floats.

s = [-0.5, 0.3, -1.2, 0.1]

ARGS = {
    "s": s
}
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 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
relu Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
GT-KOALA/FFOLayer/baselines/AltDiff.py
code served (permissive licence) · get_code("75a806c121e013d2")
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

torch.manual_seed(0)

# The relu function takes a single parameter 's' which is treated as a list-like object
# It iterates through indices and checks if elements are negative
# It modifies elements in place and returns the modified object

# Create a list with both positive and negative values
s = [-2.0, 1.5, -0.3, 4.2]

ARGS = {
    "s": s
}
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
setup_cvxpy_synthetic_problem Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/synthetic_task/models.py
code served (permissive licence) · get_code("6e7c154f827b7fea")
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 cvxpy as cp
import numpy as np

torch_seed = 0

n = 4
n_ineq_constraints = 3

ARGS = {
    "n": n,
    "n_ineq_constraints": n_ineq_constraints,
    "unconstrained": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cvxpy, numpy — 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
setup_cvxpy_synthetic_problem_with_cones Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/synthetic_task/models.py
code served (permissive licence) · get_code("a2a1f2f1f52d1afe")
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 cvxpy as cp
import numpy as np

ARGS = {
    "n": 8,
    "n_ineq_constraints": 5,
    "cone_dim": 3,
    "num_cones": 30,
    "unconstrained": False,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cvxpy, numpy — 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
sgn Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
GT-KOALA/FFOLayer/baselines/AltDiff.py
code served (permissive licence) · get_code("b7c2cacc2ff70644")
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)

# The function sgn takes a single parameter 's' which is used as:
# - len(s) is called, so it must be a sequence
# - s[i] is indexed, so it must be indexable
# - s[i] <= 0 is compared, so elements must be numeric
# A torch.Tensor satisfies all these requirements

s = torch.tensor([1.5, -0.3, 0.0, 2.1])

ARGS = {
    "s": s
}
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
slice_params_for_batch Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
GT-KOALA/FFOLayer/src/ffolayer/utils.py
code served (permissive licence) · get_code("e9c8c0ade37ae3f5")
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. 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)

# params_req: a list of parameters, where each can be indexed
# batch_sizes: a list of integers indicating batch size for each parameter
# i: an index to slice with

# Create sample parameters - some batched (batch_sizes > 0), some not
params_req = [
    torch.randn(2, 4),      # batched parameter with batch_size=2
    torch.randn(3, 4),      # non-batched parameter
    torch.randn(2, 5),      # batched parameter with batch_size=2
    torch.randn(6, 4),      # non-batched parameter
]

# batch_sizes: 0 means not batched, >0 means batched
batch_sizes = [2, 0, 2, 0]

# index to slice at
i = 1

ARGS = {
    "params_req": params_req,
    "batch_sizes": batch_sizes,
    "i": i
}
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 — a list 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
to_numpy Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/src/ffolayer/ffoqp.py
code served (permissive licence) · get_code("61f11299147431ec")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function to_numpy takes a tensor x and converts it to numpy
# It calls: x.cpu(), .detach(), .double(), .numpy()
# So x must be a torch.Tensor

x = torch.randn(2, 4)

ARGS = {
    "x": x
}
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 ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
to_numpy Ran
ran, honoured the contract we drafted
GT-KOALA/FFOLayer/src/ffolayer/utils.py
code served (permissive licence) · get_code("00d531ce728a6d76")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. 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 numpy as np
import torch

torch.manual_seed(0)

# The function to_numpy takes a single parameter 'x' which can be a torch.Tensor or something else
# It checks if x is a torch.Tensor, checks device type, and converts to numpy
# We need to provide test cases for the main parameter

# Test case 1: CPU tensor
cpu_tensor = torch.randn(2, 4, dtype=torch.float32)

# Test case 2: numpy array (fallback case)
numpy_array = np.array([1.0, 2.0, 3.0])

# Test case 3: list (fallback case)
list_input = [1, 2, 3, 4]

# We'll test with the CPU tensor as the primary case
ARGS = {
    'x': cpu_tensor
}
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 ndarray, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
to_torch Ran
ran; our contract draft was wrong, not the code
GT-KOALA/FFOLayer/src/ffolayer/utils.py
code served (permissive licence) · get_code("ed333bcc321221bc")
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, 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 a small numpy array
x = np.array([[1.0, 2.0, 3.0, 4.0],
              [5.0, 6.0, 7.0, 8.0]], dtype=np.float32)

# Define dtype
dtype = torch.float32

# Define device
device = 'cpu'

ARGS = {
    'x': x,
    'dtype': dtype,
    'device': device
}
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 Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
FFOLayer Not yet run
unverified (harvested, no recorded run)
GT-KOALA/FFOLayer/src/ffolayer/ffocp_eq.py
code served (permissive licence) · get_code("5ae4fc2c87a7123b")
How it ran

no invocation recorded.

active_counts_dict Not yet run
unverified (harvested, no recorded run)
GT-KOALA/FFOLayer/src/ffolayer/ffocp_eq.py
code served (permissive licence) · get_code("40c8b005ce29c676")
How it ran

no invocation recorded.

solve_loss Not yet run
unverified (harvested, no recorded run)
GT-KOALA/FFOLayer/ffo_sdp.py
code served (permissive licence) · get_code("ffbf19d3814db061")
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 27 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 27 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

Differentiable optimization studies how to embed a mathematical program as a differentiable layer in machine learning pipelines. However, existing approaches typically rely on implicit differentiation, involving expensive Hessian computation while differentiating through optimality conditions. To address this challenge, we formulate the differentiable optimization problem as a bilevel optimization instance. We construct a new active-set Lagrangian as a proxy to compute an ϵ-approximate hypergradient using only near-constant O(log(1/ϵ)) first-order information. We also show that applying this efficient hypergradient oracle to constrained bilevel optimization improves the overall gradient complexity to Õ(δ -1 ϵ -3 ) to reach a (δ, ϵ)-Goldstein stationary point. We implement our method FFOLayer, as a drop-in Python library compatible with existing differentiable optimization solvers. Our algorithm shows significantly faster computation with similar convergence compared to other existing solvers. The source code is available at https://github.com/GT-KOALA/FFOLayer.

For agents

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

get_harvested_code_for_paper("2512.02494")
get_code_for_paper("2512.02494")
have("2512.02494")

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

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

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

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

Connect an agent — have() is free.