SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2111.06685 · 2021

DeepXML: A Deep Extreme Multi-Label Learning Framework Applied to Short Text Documents

arXiv · PDF · Open in the Atlas

Code that ran

5 of 5 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 5 have no contract verdict; 0 failures of our instrument; 0 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/2111.06685.json · badge: /api/ran/2111.06685.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
extreme-classification/deepxml canonical (classifier label)
classifier basis not recorded on the link
5 ran · 0 no recorded run
FunctionStatusWhere it lives
collate_dense Ran
ran on a synthesized input
extreme-classification/deepxml/deepxml/libs/collate_fn.py
code served (permissive licence) · get_code("a00ad07f7c2546f7")
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 3, dtype family float, shape (2, 3, 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 batch of numpy arrays with distinct dimensions
# Each array has shape (3, 4) to represent dense documents/labels
batch_data = [
    np.random.randn(3, 4).astype(np.float32),
    np.random.randn(3, 4).astype(np.float32),
]

ARGS = {
    "x": iter(batch_data),
    "dtype": torch.FloatTensor,
}
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 3, dtype family float, shape (2, 3, 4) — shape (2, 3, 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
collate_sparse Ran
ran on a synthesized input
extreme-classification/deepxml/deepxml/libs/collate_fn.py
code served (permissive licence) · get_code("cfe02500577cab48")
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

torch.manual_seed(0)

# Test case 1: without weights (has_weight=False)
x_no_weight = [
    np.array([[1.0, 2.0, 3.0, 4.0]]),
    np.array([[5.0, 6.0, 7.0, 8.0], [9.0, 10.0, 11.0, 12.0]])
]

# Test case 2: with weights (has_weight=True)
x_with_weight = [
    (np.array([[1, 2, 3, 4]]), np.array([[0.1, 0.2, 0.3, 0.4]])),
    (np.array([[5, 6, 7, 8], [9, 10, 11, 12]]), np.array([[0.5, 0.6, 0.7, 0.8], [0.9, 1.0, 1.1, 1.2]]))
]

ARGS = {
    "x": x_no_weight,
    "pad_val": 0.0,
    "has_weight": False,
    "dtype": torch.FloatTensor
}
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 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
fetch_json Ran
ran on a synthesized input
extreme-classification/deepxml/deepxml/models/transform_layer.py
code served (permissive licence) · get_code("f21ed8ef91488087")
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 dict. 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 re
import json
import tempfile
import os

# Create a temporary JSON file with schema placeholders
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test_schema.json")

json_content = """{
    "model_name": "#ARGS.model_name;",
    "learning_rate": #ARGS.learning_rate;,
    "debug_mode": #ARGS.debug_mode;,
    "output_path": "#ARGS.output_path;",
    "batch_size": #ARGS.batch_size;
}"""

with open(temp_file, 'w', encoding='utf-8') as f:
    f.write(json_content)

# Create a simple args class to hold the arguments
class SimpleArgs:
    def __init__(self):
        self.model_name = "bert-base"
        self.learning_rate = 0.001
        self.debug_mode = True
        self.output_path = "/tmp/output"
        self.batch_size = 32

ARGS = {
    'file': temp_file,
    'ARGS': SimpleArgs()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict 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
pad_and_collate Ran
ran on a synthesized input
extreme-classification/deepxml/deepxml/libs/collate_fn.py
code served (permissive licence) · get_code("dd2e66143c2298d3")
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 3, dtype family float, shape (2, 5, 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
from torch.nn.utils.rnn import pad_sequence

torch.manual_seed(0)

# Create sample numpy arrays of different lengths
# These will be converted to tensors and padded
x_data = [
    np.random.randn(3, 4).astype(np.float32),  # shape (3, 4)
    np.random.randn(5, 4).astype(np.float32),  # shape (5, 4)
]

ARGS = {
    "x": x_data,
    "pad_val": 0,
    "dtype": torch.FloatTensor,
}
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 3, dtype family float, shape (2, 5, 4) — shape (2, 5, 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
resolve_schema_args Ran
ran on a synthesized input
extreme-classification/deepxml/deepxml/models/transform_layer.py
code served (permissive licence) · get_code("365e0d5159abf26b")
How it ran

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

import re

def resolve_schema_args(jfile, ARGS):
    arguments = re.findall('#ARGS\\.(.+?);', jfile)
    for arg in arguments:
        replace = '#ARGS.%s;' % arg
        to = str(ARGS.__dict__[arg])
        if to == 'True' or to == 'False':
            to = to.lower()
        if jfile.find('"#ARGS.%s;"' % arg) != -1:
            replace = '"#ARGS.%s;"' % arg
            if isinstance(ARGS.__dict__[arg], str):
                to = str('"' + ARGS.__dict__[arg] + '"')
        jfile = jfile.replace(replace, to)
    return jfile


class ArgsObject:
    def __init__(self, **kwargs):
        self.__dict__.update(kwargs)


jfile = 'config: #ARGS.learning_rate;, model: "#ARGS.model_name;", debug: #ARGS.debug_mode;'

ARGS = ArgsObject(
    learning_rate=0.001,
    model_name='bert_base',
    debug_mode=True
)

result = resolve_schema_args(jfile, ARGS)

ARGS = {
    'jfile': jfile,
    'ARGS': ARGS
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

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

Scalability and accuracy are well recognized challenges in deep extreme multi-label learning where the objective is to train architectures for automatically annotating a data point with the most relevant subset of labels from an extremely large label set. This paper develops the DeepXML framework that addresses these challenges by decomposing the deep extreme multi-label task into four simpler sub-tasks each of which can be trained accurately and efficiently. Choosing different components for the four sub-tasks allows DeepXML to generate a family of algorithms with varying trade-offs between accuracy and scalability. In particular, DeepXML yields the Astec algorithm that could be 2-12% more accurate and 5-30x faster to train than leading deep extreme classifiers on publically available short text datasets. Astec could also efficiently train on Bing short text datasets containing up to 62 million labels while making predictions for billions of users and data points per day on commodity hardware. This allowed Astec to be deployed on the Bing search engine for a number of short text applications ranging from matching user queries to advertiser bid phrases to showing personalized ads where it yielded significant gains in click-through-rates, coverage, revenue and other online metrics over state-of-the-art techniques currently in production. DeepXML's code is available at https://github.com/Extreme-classification/deepxml

For agents

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

get_harvested_code_for_paper("2111.06685")
get_code_for_paper("2111.06685")
have("2111.06685")

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

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

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

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

Connect an agent — have() is free.