SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2311.05081 · NeurIPS · 2023

Generalized test utilities for long-tail performance in extreme multi-label classification

Erik Schultheis, Marek Wydmuch, Wojciech Kotłowski, Rohit Babbar, Krzysztof Dembczy

arXiv · PDF · Open in the Atlas

Code that ran

17 of 40 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (1 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 12 failures of our instrument; 23 no recorded run), measured 2026-11-23; 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/2311.05081.json · badge: /api/ran/2311.05081.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
mwydmuch/macro-measures-in-xmlc community
Papers with Code archive
17 ran · 23 no recorded run
FunctionStatusWhere it lives
ConfusionMatrix Ran
ran on a synthesized input · constructed an object; no result was computed
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("f8dd1f41eb10e704")
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 an instance of its own class, ConfusionMatrix: the run constructed the object and did not call it, so no result was computed. 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 autograd.numpy as np

# Create small test arrays with distinct dimensions
tp_array = np.array([[1.0, 2.0], [3.0, 4.0]])
fp_array = np.array([[0.5, 1.5], [2.5, 3.5]])
fn_array = np.array([[0.1, 0.2], [0.3, 0.4]])
tn_array = np.array([[5.0, 6.0], [7.0, 8.0]])

ARGS = {
    "tp": tp_array,
    "fp": fp_array,
    "fn": fn_array,
    "tn": tn_array,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ConfusionMatrix — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a ConfusionMatrix 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
_calculate_conf_mat_entry Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("aadf803574231500")
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 1, dtype family float, shape (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 autograd.numpy as np
from scipy.sparse import csr_matrix

def func_for_dense(y_true, y_pred, axis=0, dtype=None):
    """Simple dense function that returns a result based on axis"""
    if axis == 0:
        return np.sum(y_true * y_pred, axis=0)
    else:
        return np.sum(y_true * y_pred, axis=1)

def func_for_csr(y_true, y_pred, axis=0, dtype=None):
    """Simple sparse function that returns a result based on axis"""
    if axis == 0:
        result = y_true.multiply(y_pred).sum(axis=0)
        return np.asarray(result).flatten()
    else:
        result = y_true.multiply(y_pred).sum(axis=1)
        return np.asarray(result).flatten()

# Create small dense matrices
y_true_dense = np.array([[1.0, 0.0, 1.0],
                         [0.0, 1.0, 0.0]], dtype=np.float32)
y_pred_dense = np.array([[1.0, 0.0, 0.0],
                         [0.0, 1.0, 1.0]], dtype=np.float32)

# Create small sparse matrices with same shape
y_true_sparse = csr_matrix(y_true_dense)
y_pred_sparse = csr_matrix(y_pred_dense)

ARGS = {
    "y_true": y_true_dense,
    "y_pred": y_pred_dense,
    "func_for_dense": func_for_dense,
    "func_for_csr": func_for_csr,
    "normalize": False,
    "axis": 0,
    "dtype": np.float32,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (3,) — shape (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
_calculate_fn_dense Ran
ran; our contract draft was wrong, not the code
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("d3c5b814277a9e26")
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 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 autograd.numpy as np

# Create small dense matrices for testing
y_true = np.array([[1.0, 0.0, 1.0, 0.0],
                    [0.0, 1.0, 1.0, 0.0]], dtype=np.float32)

y_pred = np.array([[0.9, 0.1, 0.8, 0.2],
                    [0.3, 0.7, 0.6, 0.4]], dtype=np.float32)

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "axis": 0,
    "dtype": np.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_calculate_fp_dense Ran
ran; our contract draft was wrong, not the code
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("980f7510a1e06c60")
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 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 autograd.numpy as np

# Create small dense matrices for testing
# y_true: binary labels (batch_size=2, features=4)
y_true = np.array([[1.0, 0.0, 1.0, 0.0],
                    [0.0, 1.0, 0.0, 1.0]])

# y_pred: predictions (batch_size=2, features=4)
y_pred = np.array([[0.9, 0.1, 0.8, 0.2],
                    [0.3, 0.7, 0.4, 0.6]])

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "axis": 0,
    "dtype": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_calculate_tp_dense Ran
ran; our contract draft was wrong, not the code
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("e0390de4ace2fe3b")
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 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 autograd.numpy as np

# Create small test matrices
y_true = np.array([[1.0, 0.0, 1.0, 0.0],
                   [0.0, 1.0, 0.0, 1.0]])

y_pred = np.array([[0.9, 0.1, 0.8, 0.2],
                   [0.1, 0.95, 0.15, 0.85]])

ARGS = {
    "y_true": y_true,
    "y_pred": y_pred,
    "axis": 0,
    "dtype": None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
_metric_func_with_gradient_autograd Ran
ran, honoured the contract we drafted
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("4d3d74b62ac8f5e4")
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, 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 autograd
import autograd.numpy as np

# Define a simple metric function that takes 4 arguments (tp, fp, fn, tn)
# and returns a scalar value. This could represent something like precision, recall, F1, etc.
def simple_metric(tp, fp, fn, tn):
    # A simple metric: precision-like calculation
    # Avoid division by zero by adding small epsilon
    epsilon = 1e-8
    return (tp + tn) / (tp + tn + fp + fn + epsilon)

# Create small numpy arrays for the confusion matrix components
# Using distinct shapes to make dimensions clear: all scalars but distinct values
tp = np.array(5.0)
fp = np.array(2.0)
fn = np.array(1.0)
tn = np.array(8.0)

ARGS = {
    "metric_func": simple_metric,
    "tp": tp,
    "fp": fp,
    "fn": fn,
    "tn": tn,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
_predict_using_randomized_weighted_classifier_np Ran
ran; our contract draft was wrong, not the code
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("a3268e6e215d1c99")
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 autograd.numpy as np

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

# Define small test data
n = 2  # number of samples
m = 4  # number of classes
c = 3  # number of classifiers
k = 2  # top-k parameter

# y_proba: (n, m) - probability matrix for n samples and m classes
y_proba = np.array([
    [0.1, 0.3, 0.5, 0.1],
    [0.2, 0.2, 0.3, 0.3]
], dtype=np.float32)

# classifiers_a: (c, m) - scaling factors for each classifier and class
classifiers_a = np.array([
    [1.0, 1.5, 0.8, 1.2],
    [0.9, 1.1, 1.3, 0.7],
    [1.2, 0.9, 1.0, 1.5]
], dtype=np.float32)

# classifiers_b: (c, m) - bias terms for each classifier and class
classifiers_b = np.array([
    [0.1, -0.05, 0.2, 0.0],
    [-0.1, 0.15, 0.05, -0.2],
    [0.0, 0.1, -0.15, 0.25]
], dtype=np.float32)

# classifiers_proba: (c,) - probability distribution over classifiers
classifiers_proba = np.array([0.5, 0.3, 0.2], dtype=np.float32)

# dtype: optional dtype for output
dtype = np.float32

# seed: random seed
seed = 42

ARGS = {
    "y_proba": y_proba,
    "k": k,
    "classifiers_a": classifiers_a,
    "classifiers_b": classifiers_b,
    "classifiers_proba": classifiers_proba,
    "dtype": dtype,
    "seed": seed
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — 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
_predict_weighted_per_instance_dense Ran
ran; our contract draft was wrong, not the code
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("35558fd29c65e169")
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 autograd.numpy as np
from scipy.sparse import csr_matrix

# Set up small test data
n_samples = 2
n_classes = 4

# Create a small probability matrix (n_samples x n_classes)
y_proba = np.array([
    [0.1, 0.5, 0.3, 0.9],
    [0.2, 0.8, 0.4, 0.6]
], dtype=np.float32)

# Create optional weight/scaling matrices
a = np.array([
    [1.0, 0.5, 0.8, 1.2],
    [0.9, 1.1, 0.7, 1.0]
], dtype=np.float32)

b = np.array([
    [0.05, 0.1, 0.02, 0.15],
    [0.08, 0.12, 0.03, 0.1]
], dtype=np.float32)

ARGS = {
    'y_proba': y_proba,
    'k': 2,
    'th': 0.5,
    'a': a,
    'b': b,
    'keep_scores': True,
    'dtype': np.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd, scipy — 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
calculate_confusion_matrix Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("f77c581447ce8785")
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 ConfusionMatrix. 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 autograd.numpy as np
from scipy.sparse import csr_matrix

# Create small test matrices for confusion matrix calculation
# Using distinct sizes: 4 samples, 3 classes
n_samples = 4
n_classes = 3

# Dense numpy arrays - binary predictions and labels
y_true_dense = np.array([
    [1, 0, 0],
    [0, 1, 0],
    [1, 0, 1],
    [0, 1, 0]
], dtype=np.float32)

y_pred_dense = np.array([
    [1, 0, 0],
    [0, 1, 0],
    [1, 1, 0],
    [0, 0, 1]
], dtype=np.float32)

# Sparse CSR matrices for testing sparse functionality
data_true = np.array([1, 1, 1, 1, 1])
indices_true = np.array([0, 1, 0, 2, 1])
indptr_true = np.array([0, 1, 2, 4, 5])
y_true_sparse = csr_matrix((data_true, indices_true, indptr_true), shape=(n_samples, n_classes), dtype=np.float32)

data_pred = np.array([1, 1, 1, 1, 1])
indices_pred = np.array([0, 1, 0, 1, 2])
indptr_pred = np.array([0, 1, 2, 4, 5])
y_pred_sparse = csr_matrix((data_pred, indices_pred, indptr_pred), shape=(n_samples, n_classes), dtype=np.float32)

# Arguments for calculate_fn, calculate_fp, and calculate_tp functions
ARGS = {
    'y_true': y_true_dense,
    'y_pred': y_pred_dense,
    'normalize': False,
    'axis': 0,
    'dtype': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd, numba, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ConfusionMatrix — a ConfusionMatrix output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a ConfusionMatrix 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
calculate_fn Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("a771cf410b5301de")
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 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 autograd.numpy as np
from scipy.sparse import csr_matrix

# Create small dense matrices for testing
y_true_dense = np.array([[1.0, 0.0, 1.0, 0.0],
                         [0.0, 1.0, 0.0, 1.0]], dtype=np.float32)

y_pred_dense = np.array([[0.8, 0.1, 0.9, 0.2],
                         [0.3, 0.7, 0.4, 0.6]], dtype=np.float32)

# Create small sparse matrices for testing
# y_true_sparse: 2x4 sparse matrix
y_true_sparse = csr_matrix(y_true_dense)

# y_pred_sparse: 2x4 sparse matrix
y_pred_sparse = csr_matrix(y_pred_dense)

# Define helper functions for dense operations
def func_for_dense(y_true, y_pred, axis=0, dtype=None):
    return np.sum(y_true * (1 - y_pred), axis=axis, dtype=dtype)

# Define helper functions for sparse operations
def func_for_csr(y_true, y_pred, axis=0, dtype=None):
    # Simple implementation for CSR that converts to dense for calculation
    y_true_dense_conv = y_true.toarray()
    y_pred_dense_conv = y_pred.toarray()
    return np.sum(y_true_dense_conv * (1 - y_pred_dense_conv), axis=axis, dtype=dtype)

ARGS = {
    "y_true": y_true_dense,
    "y_pred": y_pred_dense,
    "normalize": False,
    "axis": 0,
    "dtype": np.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd, numba, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
calculate_fp Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("67c1a50ecde50f09")
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 1, dtype family float, shape (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 autograd.numpy as np
from scipy.sparse import csr_matrix

# Create small dense matrices for testing
y_true_dense = np.array([[1.0, 0.0, 1.0],
                         [0.0, 1.0, 0.0]], dtype=np.float32)

y_pred_dense = np.array([[0.9, 0.1, 0.8],
                         [0.2, 0.7, 0.3]], dtype=np.float32)

# Create small sparse matrices for testing
# Row 0: [1, 0, 1], Row 1: [0, 1, 0]
y_true_sparse = csr_matrix(np.array([[1.0, 0.0, 1.0],
                                      [0.0, 1.0, 0.0]], dtype=np.float32))

# Row 0: [0.9, 0.1, 0.8], Row 1: [0.2, 0.7, 0.3]
y_pred_sparse = csr_matrix(np.array([[0.9, 0.1, 0.8],
                                      [0.2, 0.7, 0.3]], dtype=np.float32))

ARGS = {
    'y_true': y_true_dense,
    'y_pred': y_pred_dense,
    'normalize': False,
    'axis': 0,
    'dtype': np.float32
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd, numba, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (3,) — shape (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
calculate_tp Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("967d26afea1749f4")
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 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 autograd.numpy as np
from scipy.sparse import csr_matrix

# Create small dense numpy arrays for testing
np.random.seed(0)
y_true_dense = np.array([[1, 0, 1, 0],
                         [0, 1, 0, 1]], dtype=np.float32)
y_pred_dense = np.array([[1, 0, 0, 0],
                         [0, 1, 1, 0]], dtype=np.float32)

# Create small sparse CSR matrices for testing
# Shape: (2, 4)
y_true_sparse = csr_matrix(y_true_dense)
y_pred_sparse = csr_matrix(y_pred_dense)

ARGS = {
    "y_true": y_true_dense,
    "y_pred": y_pred_dense,
    "normalize": False,
    "axis": 0,
    "dtype": np.float32,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd, numba, scipy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (4,) — shape (4,) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
str_bool_true Ran
ran, violated the contract we drafted
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("3c9f3cc506e4d8ed")
How it ran

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

import torch

torch.manual_seed(0)

ARGS = {
    'value': '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 bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
ternary_search Ran
ran, honoured the contract we drafted
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("045501f3a185770d")
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, 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
from typing import Callable, Tuple

# Define a simple quadratic function to minimize
def quadratic_func(x: float) -> float:
    """A simple quadratic function with minimum at x=2"""
    return (x - 2) ** 2

# Set up arguments for ternary_search
ARGS = {
    "low": 0.0,
    "high": 5.0,
    "eps": 0.001,
    "func": quadratic_func
}
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, ndim 1, dtype family float — a tuple 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
uniform_search Ran
ran, honoured the contract we drafted
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("ad4673e83380d7b5")
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, 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 autograd.numpy as np

# Define a simple callable function that will be used for uniform_search
# The function takes a float and returns a float (score/value)
def objective_func(x):
    # A simple quadratic function with maximum at x=2
    return -(x - 2.0)**2 + 5.0

# Construct the ARGS dictionary with all parameters
ARGS = {
    'low': 0.0,
    'high': 4.0,
    'step': 0.5,
    'func': objective_func
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple 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
unpack_csr_matrix Ran
ran; our contract draft was wrong, not the code
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("dec83cfff3139a49")
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 autograd.numpy as np
from scipy.sparse import csr_matrix
import numpy as real_np

# Create a small sparse matrix for testing
data = real_np.array([1, 2, 3, 4, 5], dtype=float)
indices = real_np.array([0, 2, 1, 0, 3], dtype=int)
indptr = real_np.array([0, 2, 3, 5], dtype=int)

# Construct the CSR matrix
matrix = csr_matrix((data, indices, indptr), shape=(3, 4))

ARGS = {
    "matrix": matrix
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd, numpy, 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
zeros_like Ran
ran; our contract draft was wrong, not the code
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("8be2535e47e2319f")
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, 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 autograd.numpy as np
from scipy.sparse import csr_matrix

# Create test matrices
dense_matrix = np.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]], dtype=np.float32)
sparse_matrix = csr_matrix(np.array([[1, 0, 2], [0, 3, 0]], dtype=np.float32))

# Test with dense matrix as primary argument
ARGS = {
    'a': dense_matrix,
    'shape': None,
    'dtype': None,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
autograd, scipy — 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, 3) — shape (2, 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
RandomizedWeightedClassifier Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("eae7134a9338e69c")
How it ran

no invocation recorded.

_calculate_fn_csr Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("6a437326b2853c18")
How it ran

no invocation recorded.

_calculate_fp_csr Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("46d480d4afbb7486")
How it ran

no invocation recorded.

_calculate_tp_csr Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("1886195b5bef94c2")
How it ran

no invocation recorded.

_find_best_alpha Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("be8bdd0c31d9f25e")
How it ran

no invocation recorded.

_predict_using_randomized_weighted_classifier_csr Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("7edcfacb7a6dd49b")
How it ran

no invocation recorded.

_predict_weighted_per_instance_csr Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("e4f75aae98b15d2b")
How it ran

no invocation recorded.

find_classifier_using_fw Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("a5c7600a012167a3")
How it ran

no invocation recorded.

log Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("01febb6c4f142e9d")
How it ran

no invocation recorded.

log_info Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("504deb2e28f93cbc")
How it ran

no invocation recorded.

numba_argtopk_csr Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("b8f054c37af5d33d")
How it ran

no invocation recorded.

numba_calculate_sum_csr_mat_mul_mat Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("4eb08eb9aeeb6206")
How it ran

no invocation recorded.

numba_calculate_sum_csr_mat_mul_ones_minus_mat Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("82b05bba7f433cc3")
How it ran

no invocation recorded.

numba_csr_vec_mul_ones_minus_vec Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("687f421957a9802f")
How it ran

no invocation recorded.

numba_csr_vec_mul_vec Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("5c74c11f6f018561")
How it ran

no invocation recorded.

numba_predict_weighted_per_instance_csr Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("a6ce3fbba16ea2fc")
How it ran

no invocation recorded.

numba_predict_weighted_per_instance_csr_step Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("dd53a088e9b96bef")
How it ran

no invocation recorded.

numba_resize Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("a80779c19991792d")
How it ran

no invocation recorded.

numba_set_gains_csr Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("6e08feeab5f41fbf")
How it ran

no invocation recorded.

numba_topk_csr Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("58c78794b61e760c")
How it ran

no invocation recorded.

predict_using_randomized_weighted_classifier Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("d7fc8c0c37869d63")
How it ran

no invocation recorded.

predict_weighted_per_instance Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("b5a7308f9eca72df")
How it ran

no invocation recorded.

unpack_csr_matrices Not yet run
unverified (harvested, no recorded run)
mwydmuch/macro-measures-in-xmlc/xcolumns/frank_wolfe.py
code served (permissive licence) · get_code("df2ecf91e2324681")
How it ran

no invocation recorded.

Also present in other papers' code

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

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Extreme multi-label classification (XMLC) is the task of selecting a small subset of relevant labels from a very large set of possible labels. As such, it is characterized by long-tail labels, i.e., most labels have very few positive instances. With standard performance measures such as precision@k, a classifier can ignore tail labels and still report good performance. However, it is often argued that correct predictions in the tail are more "interesting" or "rewarding," but the community has not yet settled on a metric capturing this intuitive concept. The existing propensity-scored metrics fall short on this goal by confounding the problems of long-tail and missing labels. In this paper, we analyze generalized metrics budgeted "at k" as an alternative solution. To tackle the challenging problem of optimizing these metrics, we formulate it in the expected test utility (ETU) framework, which aims to optimize the expected performance on a fixed test set. We derive optimal prediction rules and construct computationally efficient approximations with provable regret guarantees and robustness against model misspecification. Our algorithm, based on block coordinate ascent, scales effortlessly to XMLC problems and obtains promising results in terms of long-tail performance. 37th Conference on Neural Information Processing Systems (NeurIPS 2023).

For agents

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

get_harvested_code_for_paper("2311.05081")
get_code_for_paper("2311.05081")
have("2311.05081")

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

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

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

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

Connect an agent — have() is free.