SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1603.02754 · Knowledge Discovery and Data Mining · 2016

XGBoost: A Scalable Tree Boosting System

Carlos Guestrin, Tianqi Chen

arXiv · PDF · Open in the Atlas

Code that ran

7 of 17 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 7 have no contract verdict; 0 failures of our instrument; 10 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/1603.02754.json · badge: /api/ran/1603.02754.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
360jinrong/GBST community (classifier label)
classifier basis not recorded on the link
7 ran · 9 no recorded run
bw2color/bw2color community (classifier label)
classifier basis not recorded on the link
0 ran · 1 no recorded run
FunctionStatusWhere it lives
ctypes2numpy Ran
ran on a synthesized input
360jinrong/GBST/gbst_package/gbst/core.py
code served (permissive licence) · get_code("dcc420b0c0e4736f")
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 (5,) 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 ctypes
import numpy as np

# Create a ctypes pointer to float32 data
float_array = (ctypes.c_float * 5)(1.0, 2.0, 3.0, 4.0, 5.0)
cptr_float = ctypes.cast(float_array, ctypes.POINTER(ctypes.c_float))

ARGS = {
    'cptr': cptr_float,
    'length': 5,
    'dtype': np.float32
}
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 (5,) — shape (5,) 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
evalauc Ran
ran on a synthesized input
360jinrong/GBST/gbst_package/gbst/metrics.py
code served (permissive licence) · get_code("93ea111e4faa8eb4")
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 numpy as np

class MockDataset:
    def __init__(self, labels):
        self._labels = labels
    
    def get_label(self):
        return self._labels

# Create predictions: shape (batch_size=2, num_timesteps=4)
preds = np.random.randn(2, 4).astype(np.float32)

# Create labels: each sample has a label indicating the event time
# Labels should be integers in range [0, num_timesteps)
labels = np.array([1, 2], dtype=np.int32)

# Create dataset object
deval = MockDataset(labels)

ARGS = {
    'preds': preds,
    'deval': deval
}
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, 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
groups_to_rows Ran
ran on a synthesized input
360jinrong/GBST/gbst_package/gbst/training.py
code served (permissive licence) · get_code("2283c0485da99f5e")
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 int, shape (10,) 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

# groups_to_rows takes:
# - groups: list of group indices
# - boundaries: array of row index limits for each group

# The function uses groups to index into boundaries, and boundaries[g] and boundaries[g+1]
# to create ranges. So boundaries needs to be an array with length >= max(groups) + 2

# Create a simple example:
# Say we have 3 groups (indices 0, 1, 2)
# We need boundaries to have at least 4 elements defining start/end for each group

groups = [0, 2]  # Select group 0 and group 2
boundaries = np.array([0, 5, 10, 15])  # Group 0: rows 0-4, Group 1: rows 5-9, Group 2: rows 10-14

ARGS = {
    "groups": groups,
    "boundaries": boundaries
}
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 int, shape (10,) — shape (10,) 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
mkgroupfold Ran
ran on a synthesized input
360jinrong/GBST/gbst_package/gbst/training.py
code served (permissive licence) · get_code("ec4a12f8317bbdd8")
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 numpy as np
from unittest.mock import Mock, MagicMock

# Create a mock DMatrix-like object that has the methods called in mkgroupfold
class MockDMatrix:
    def __init__(self, data, groups=None):
        self.data = data
        self.groups = groups if groups is not None else np.array([0, len(data)])
    
    def get_uint_info(self, info_name):
        """Return group boundaries"""
        if info_name == 'group_ptr':
            return self.groups
        return None
    
    def slice(self, indices, allow_groups=False):
        """Slice the matrix and return a new MockDMatrix"""
        sliced_data = self.data[indices] if hasattr(self.data, '__getitem__') else self.data
        new_groups = np.array([0, len(indices)])
        return MockDMatrix(sliced_data, new_groups)
    
    def set_group(self, group_sizes):
        """Set group sizes"""
        self.group_sizes = group_sizes
        self.groups = np.concatenate([[0], np.cumsum(group_sizes)])

# Create mock Booster class
class MockBooster:
    def __init__(self, param, data):
        self.param = param
        self.data = data
    
    def update(self, dtrain, iteration, fobj):
        pass
    
    def eval_set(self, watchlist, iteration, feval):
        return [(name, 0.5) for _, name in watchlist]

# Mock the Booster class globally for CVPack
import builtins
original_builtins = builtins.__dict__.copy()
Booster = MockBooster
builtins.Booster = Booster

# Create test data
np.random.seed(0)
n_samples = 12
n_features = 4
data = np.random.randn(n_samples, n_features)

# Create group boundaries: 3 groups of 4 samples each
group_boundaries = np.array([0, 4, 8, 12])
group_sizes = np.diff(group_boundaries)

# Create mock dall (training data)
dall = MockDMatrix(data, group_boundaries)

# Define parameters
nfold = 3
param = {
    'objective': 'rank:ndcg',
    'metric': 'ndcg',
    'learning_rate': 0.1
}

evals = ('ndcg@10', 'ndcg@5')

def fpreproc_func(dtrain, dtest, param_copy):
    """Preprocessing function that returns modified data and params"""
    return dtrain, dtest, param_copy

ARGS = {
    'dall': dall,
    'nfold': nfold,
    'param': param,
    'evals': evals,
    'fpreproc': fpreproc_func,
    'shuffle': True
}
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 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
print_evaluation Ran
ran on a synthesized input
360jinrong/GBST/gbst_package/gbst/callback.py
code served (permissive licence) · get_code("2ede4efe489775eb")
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
import numpy as np

# Mock rabit module since it's used in the function
class MockRabit:
    @staticmethod
    def tracker_print(msg):
        print(msg, end='')

import sys
sys.modules['rabit'] = MockRabit()
import rabit

# Mock environment object that the callback receives
class MockEnv:
    def __init__(self):
        self.rank = 0
        self.iteration = 5
        self.begin_iteration = 0
        self.end_iteration = 10
        # evaluation_result_list contains tuples of (metric_name, value) or (metric_name, mean, stdv)
        self.evaluation_result_list = [
            ('auc', 0.85234),
            ('logloss', 0.32145, 0.01234),
            ('error', 0.12567)
        ]

ARGS = {
    'period': 1,
    'show_stdv': True
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, rabit, 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
record_evaluation Ran
ran on a synthesized input
360jinrong/GBST/gbst_package/gbst/callback.py
code served (permissive licence) · get_code("da2df451a1ec6956")
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
import numpy as np

# Create a simple mock environment object that mimics what the callback expects
class MockEnv:
    def __init__(self):
        # evaluation_result_list should be a list of tuples with keys in format "name-metric"
        self.evaluation_result_list = [
            ("train-loss", 0.5),
            ("train-accuracy", 0.95),
            ("valid-loss", 0.6),
            ("valid-accuracy", 0.93),
        ]

# Create the eval_result dictionary that will be populated by the callback
eval_result = {}

ARGS = {
    "eval_result": eval_result,
}

# Test the function to verify it works
def record_evaluation(eval_result):
    """Create a call back that records the evaluation history into **eval_result**.

    Parameters
    ----------
    eval_result : dict
       A dictionary to store the evaluation results.

    Returns
    -------
    callback : function
        The requested callback function.
    """
    if not isinstance(eval_result, dict):
        raise TypeError('eval_result has to be a dictionary')
    eval_result.clear()

    def init(env):
        """internal function"""
        for k, _ in env.evaluation_result_list:
            pos = k.index('-')
            key = k[:pos]
            metric = k[pos + 1:]
            if key not in eval_result:
                eval_result[key] = {}
            if metric not in eval_result[key]:
                eval_result[key][metric] = []

    def callback(env):
        """internal function"""
        if not eval_result:
            init(env)
        for k, v in env.evaluation_result_list:
            pos = k.index('-')
            key = k[:pos]
            metric = k[pos + 1:]
            eval_result[key][metric].append(v)
    return callback

# Verify the setup works
callback = record_evaluation(ARGS["eval_result"])
mock_env = MockEnv()
callback(mock_env)
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 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
reset_learning_rate Ran
ran on a synthesized input
360jinrong/GBST/gbst_package/gbst/callback.py
code served (permissive licence) · get_code("c42441cb9c13a0b8")
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
import numpy as np

# Create a minimal mock environment object for training context
class MockBooster:
    def __init__(self):
        self.learning_rate = 0.1
    
    def set_param(self, param_name, value):
        if param_name == 'learning_rate':
            self.learning_rate = value

class MockCVPack:
    def __init__(self):
        self.bst = MockBooster()

class MockEnvTrain:
    def __init__(self):
        self.model = MockBooster()
        self.cvfolds = None
        self.iteration = 0
        self.end_iteration = 10

class MockEnvCV:
    def __init__(self):
        self.model = None
        self.cvfolds = [MockCVPack(), MockCVPack()]
        self.iteration = 0
        self.end_iteration = 10

# Test with list of learning rates
learning_rates_list = [0.1, 0.09, 0.08, 0.07, 0.06, 0.05, 0.04, 0.03, 0.02, 0.01]

# Test with function-based learning rate
def learning_rate_func(iteration, num_boost_round):
    return 0.1 * (0.95 ** iteration)

ARGS = {
    'learning_rates': learning_rates_list
}
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 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
allreduce Not yet run
unverified (harvested, no recorded run)
360jinrong/GBST/gbst_package/gbst/rabit.py
code served (permissive licence) · get_code("56d023d699f86812")
How it ran

no invocation recorded.

broadcast Not yet run
unverified (harvested, no recorded run)
360jinrong/GBST/gbst_package/gbst/rabit.py
code served (permissive licence) · get_code("cb6b3b44c71c8b4d")
How it ran

no invocation recorded.

from_cstr_to_pystr Not yet run
unverified (harvested, no recorded run)
360jinrong/GBST/gbst_package/gbst/core.py
code served (permissive licence) · get_code("f3c98203a82d21f3")
How it ran

no invocation recorded.

from_pystr_to_cstr Not yet run
unverified (harvested, no recorded run)
360jinrong/GBST/gbst_package/gbst/core.py
code served (permissive licence) · get_code("b97f869f1e1f317a")
How it ran

no invocation recorded.

loadfmap Not yet run
unverified (harvested, no recorded run)
360jinrong/GBST/gbst_src/demo/binary_classification/mapfeat.py
code served (permissive licence) · get_code("a1073934e27565bc")
How it ran

no invocation recorded.

loss_with_metrics Not yet run
unverified (harvested, no recorded run)
bw2color/bw2color/colorization/training_utils.py
code served (permissive licence) · get_code("17365dbebfb45226")
How it ran

no invocation recorded.

plot_importance Not yet run
unverified (harvested, no recorded run)
360jinrong/GBST/gbst_package/gbst/plotting.py
code served (permissive licence) · get_code("02e322ab0e7455f6")
How it ran

no invocation recorded.

plot_tree Not yet run
unverified (harvested, no recorded run)
360jinrong/GBST/gbst_package/gbst/plotting.py
code served (permissive licence) · get_code("9b4357ad647895da")
How it ran

no invocation recorded.

to_graphviz Not yet run
unverified (harvested, no recorded run)
360jinrong/GBST/gbst_package/gbst/plotting.py
code served (permissive licence) · get_code("1495b6370c8c3330")
How it ran

no invocation recorded.

train Not yet run
unverified (harvested, no recorded run)
360jinrong/GBST/gbst_package/gbst/training.py
code served (permissive licence) · get_code("0deb98c24eb53d79")
How it ran

no invocation recorded.

Also present in other papers' code

Of 17 samples lifted from this paper's linked repositories, 17 carry a function identity and 0 do not. Of the 17 distinct functions with an identity, 1 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 1 the same month, 0 later) and 16 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.

FunctionAlso present inEarliest-datedOthers named
loss_with_metrics 1 other paper
1 the same month
1603.08511 (2016-03)
Colorful Image Colorization

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

Tree boosting is a highly effective and widely used machine learning method. In this paper, we describe a scalable endto-end tree boosting system called XGBoost, which is used widely by data scientists to achieve state-of-the-art results on many machine learning challenges. We propose a novel sparsity-aware algorithm for sparse data and weighted quantile sketch for approximate tree learning. More importantly, we provide insights on cache access patterns, data compression and sharding to build a scalable tree boosting system. By combining these insights, XGBoost scales beyond billions of examples using far fewer resources than existing systems.

For agents

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

get_harvested_code_for_paper("1603.02754")
get_code_for_paper("1603.02754")
have("1603.02754")

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

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

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

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

Connect an agent — have() is free.