SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1803.03319 · 2018

Efficient Loss-Based Decoding on Graphs For Extreme Classification

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/1803.03319.json · badge: /api/ran/1803.03319.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
ievron/wltls canonical (classifier label)
classifier basis: census
4 ran · 0 no recorded run
FunctionStatusWhere it lives
expLoss Ran
ran on a synthesized input
ievron/wltls/WLTLS/decoding/decodingLosses.py
code served (permissive licence) · get_code("4c7faeccda624274")
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 numpy as np

# Create small numpy arrays for y and z
# The function uses np.multiply, np.clip, and np.exp
# So both parameters should be numpy arrays of compatible shapes

y = np.array([[0.5, -0.3, 0.2, 0.1],
              [0.4, -0.5, 0.6, -0.2]], dtype=np.float32)

z = np.array([[0.2, 0.4, -0.1, 0.3],
              [-0.3, 0.5, 0.2, 0.1]], dtype=np.float32)

ARGS = {
    "y": y,
    "z": z
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (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
load_dataset Ran
ran on a synthesized input
ievron/wltls/WLTLS/datasets.py
code served (permissive licence) · get_code("59d05e451eafc11c")
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 itertools
import numpy as np
import random
from sklearn.datasets import load_svmlight_files
from sklearn.preprocessing import MultiLabelBinarizer, LabelEncoder
import tempfile
import os

# Create temporary SVMLight format files for testing
def create_temp_svmlight_file(n_samples, n_features, multilabel=False):
    """Create a temporary SVMLight format file"""
    fd, path = tempfile.mkstemp(suffix='.svm', text=True)
    with os.fdopen(fd, 'w') as f:
        for i in range(n_samples):
            if multilabel:
                labels = ','.join(str(j) for j in np.random.choice([0, 1, 2], size=np.random.randint(1, 3), replace=False))
            else:
                labels = str(np.random.randint(0, 3))
            
            features = []
            for j in range(n_features):
                if np.random.rand() > 0.7:
                    features.append(f"{j}:{np.random.rand():.4f}")
            
            if features:
                f.write(f"{labels} {' '.join(features)}\n")
            else:
                f.write(f"{labels}\n")
    
    return path

# Create temporary files
path_train = create_temp_svmlight_file(5, 10, multilabel=False)
path_valid = create_temp_svmlight_file(3, 10, multilabel=False)
path_test = create_temp_svmlight_file(2, 10, multilabel=False)

ARGS = {
    'path_train': path_train,
    'path_valid': path_valid,
    'path_test': path_test,
    'n_features': 10,
    'multilabel': False,
    'classes_': None
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, sklearn — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
squaredHingeLoss Ran
ran on a synthesized input
ievron/wltls/WLTLS/decoding/decodingLosses.py
code served (permissive licence) · get_code("1e7cc36cc49e67fe")
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 numpy as np

# squaredHingeLoss takes two parameters: y and z
# Both should be numpy arrays or array-like
# y represents labels (typically -1 or 1 for binary classification)
# z represents predictions/scores
# The function computes: max(0, 1 - y*z)^2

# Create small numpy arrays for testing
y = np.array([1.0, -1.0, 1.0, -1.0])  # Binary labels
z = np.array([0.5, -0.8, 1.2, -1.5])  # Predictions/scores

ARGS = {
    "y": y,
    "z": z
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 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
squaredLoss Ran
ran on a synthesized input
ievron/wltls/WLTLS/decoding/decodingLosses.py
code served (permissive licence) · get_code("765c978d12ea750a")
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 numpy as np

# The function squaredLoss takes two parameters: y and z
# It computes: (1 - y*z)^2
# Both y and z should be numpy arrays that can be element-wise multiplied

# Create small numpy arrays for y and z
y = np.array([[0.5, 0.3, 0.8, 0.2],
              [0.1, 0.9, 0.4, 0.6]])

z = np.array([[0.2, 0.7, 0.5, 0.9],
              [0.4, 0.1, 0.3, 0.8]])

ARGS = {
    'y': y,
    'z': z
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (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

Also present in other papers' code

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

In extreme classification problems, learning algorithms are required to map instances to labels from an extremely large label set. We build on a recent extreme classification framework with logarithmic time and space, and on a general approach for error correcting output coding (ECOC) with loss-based decoding, and introduce a flexible and efficient approach accompanied by theoretical bounds. Our framework employs output codes induced by graphs, for which we show how to perform efficient loss-based decoding to potentially improve accuracy. In addition, our framework offers a tradeoff between accuracy, model size and prediction time. We show how to find the sweet spot of this tradeoff using only the training data. Our experimental study demonstrates the validity of our assumptions and claims, and shows that our method is competitive with state-of-the-art algorithms.

For agents

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

get_harvested_code_for_paper("1803.03319")
get_code_for_paper("1803.03319")
have("1803.03319")

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

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

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

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

Connect an agent — have() is free.